/* 大森Office — Design System tokens (rooted in code.html palette) */

:root {
  /* Brand core */
  --primary: #001944;
  --primary-2: #002c6e;
  --primary-soft: #d9e2ff;
  --on-primary: #ffffff;

  /* Accent (warm) */
  --accent: #8b5000;
  --accent-2: #ff9800;
  --accent-soft: #ffdcbe;

  /* Surfaces */
  --bg: #f3faff;
  --surface: #ffffff;
  --surface-low: #e6f6ff;
  --surface-mid: #dbf1fe;
  --surface-high: #d5ecf8;
  --surface-highest: #cfe6f2;
  --surface-dim: #c7dde9;
  --surface-variant: #cfe6f2;

  /* Text */
  --on-surface: #071e27;
  --on-surface-variant: #454652;
  --on-surface-soft: #6a7682;

  /* Status */
  --success: #2e7d32;
  --success-soft: #d6f0d6;
  --warning: #c87100;
  --warning-soft: #ffe6c2;
  --danger: #ba1a1a;
  --danger-soft: #ffdad6;

  /* Strokes */
  --stroke: #c6d6e2;
  --stroke-soft: #e2eef6;

  /* Radius */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 20px;
  --r-pill: 999px;

  /* Shadow */
  --shadow-sm: 0 1px 2px rgba(7,30,39,.06);
  --shadow-md: 0 6px 18px rgba(7,30,39,.08);
  --shadow-lg: 0 14px 42px rgba(7,30,39,.12);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  color: var(--on-surface);
  background: #eef4f9;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.font-display { font-family: 'Manrope', 'Inter', sans-serif; letter-spacing: -0.01em; }

/* Material symbols sizing */
.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  user-select: none;
}
.ms-fill { font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 24; }

/* Stripe-placeholder (for missing images) */
.stripe-ph {
  background-image:
    linear-gradient(135deg, transparent 46%, rgba(0,25,68,.07) 46%, rgba(0,25,68,.07) 54%, transparent 54%);
  background-size: 14px 14px;
  background-color: var(--surface-high);
  display: flex; align-items: center; justify-content: center;
  color: var(--on-surface-soft);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: .04em;
}

/* Hide scrollbars on phone scroll regions */
.hide-scrollbar::-webkit-scrollbar { display: none; }
.hide-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* Generic mini chip */
.chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px;
  border-radius: var(--r-pill);
  font-size: 10px; font-weight: 600;
  background: var(--surface-high);
  color: var(--primary);
}
.chip-accent { background: var(--accent-soft); color: var(--accent); }
.chip-good { background: var(--success-soft); color: var(--success); }
.chip-warn { background: var(--warning-soft); color: var(--warning); }
.chip-danger { background: var(--danger-soft); color: var(--danger); }
.chip-primary { background: var(--primary-soft); color: var(--primary); }

/* Card */
.card {
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 18px;
  border-radius: var(--r-pill);
  font-weight: 700; font-size: 13px;
  border: 0; cursor: pointer;
  transition: transform .12s, opacity .12s;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--primary); color: white; }
.btn-accent  { background: var(--accent-2); color: white; }
.btn-ghost   { background: transparent; color: var(--primary); }
.btn-outline { background: transparent; color: var(--primary); border: 1px solid var(--primary); }

/* Phone mockup wrapper used in canvas */
.phone-shell {
  width: 390px;
  height: 844px;
  background: var(--bg);
  border-radius: 44px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 30px 80px rgba(7,30,39,.15), 0 0 0 12px #0b1320, 0 0 0 13px #1a2542;
}
.phone-screen {
  position: absolute; inset: 0;
  overflow: hidden;
  border-radius: 32px;
}

/* Safe top notch */
.phone-notch {
  position: absolute; top: 10px; left: 50%; transform: translateX(-50%);
  width: 110px; height: 28px; background: #0b1320; border-radius: 999px; z-index: 60;
}
.phone-statusbar {
  position: absolute; top: 0; left: 0; right: 0; height: 44px;
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 28px 0;
  font-family: 'Manrope', 'Inter', sans-serif;
  font-size: 14px; font-weight: 700;
  color: var(--on-surface);
  z-index: 50; pointer-events: none;
}
.phone-statusbar.dark { color: white; }
.phone-statusbar .icons { display: inline-flex; align-items: center; gap: 5px; }
.phone-home {
  position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%);
  width: 134px; height: 5px; background: #0b1320; border-radius: 999px; z-index: 60;
}

/* PC artboard chrome */
.pc-chrome {
  background: #0d1117;
  border-radius: 12px 12px 0 0;
  padding: 10px 14px;
  display: flex; align-items: center; gap: 8px;
  color: #aab4bf; font-size: 12px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
}
.pc-chrome .dot { width: 11px; height: 11px; border-radius: 999px; }

/* Section title */
.section-title {
  font-family: 'Manrope', 'Inter', sans-serif;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--primary);
}

/* Glass for VIP */
.glass-dark {
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
  border: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(8px);
}

/* Util */
.divider { height: 1px; background: var(--stroke-soft); }
.text-soft { color: var(--on-surface-soft); }
.text-variant { color: var(--on-surface-variant); }

/* Tab bar (phone) */
.tabbar {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 78px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--stroke-soft);
  display: grid; grid-template-columns: repeat(5, 1fr);
  z-index: 30;
}
.tabbar .tab {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; color: var(--on-surface-soft); font-size: 10px; font-weight: 600;
  cursor: pointer;
}
.tabbar .tab.active { color: var(--primary); }
.tabbar .tab .material-symbols-outlined { font-size: 22px; }

/* Bento metric */
.bento {
  background: var(--surface-low);
  border-radius: var(--r-md);
  padding: 14px;
  display: flex; flex-direction: column; gap: 12px;
}
.bento .icon {
  width: 32px; height: 32px; border-radius: 8px;
  background: white; color: var(--primary);
  display: flex; align-items: center; justify-content: center;
}
.bento .label { font-size: 10px; text-transform: uppercase; color: var(--on-surface-variant); letter-spacing: .04em; }
.bento .value { font-family: 'Manrope'; font-weight: 700; color: var(--primary); font-size: 15px; }

/* Pill nav */
.pill-nav {
  display: inline-flex; gap: 4px; padding: 4px;
  background: var(--surface-high);
  border-radius: var(--r-pill);
  font-size: 12px;
}
.pill-nav .pill {
  padding: 6px 14px; border-radius: 999px; cursor: pointer;
  color: var(--on-surface-variant); font-weight: 600;
}
.pill-nav .pill.active { background: var(--primary); color: white; }

/* Progress */
.progress {
  height: 6px; background: var(--surface-high); border-radius: 999px; overflow: hidden;
}
.progress > span {
  display: block; height: 100%; background: linear-gradient(90deg, var(--primary), var(--primary-2));
}

/* Misc small utilities */
.hstack { display: flex; align-items: center; }
.vstack { display: flex; flex-direction: column; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; } .gap-6 { gap: 24px; }
.f1 { flex: 1; }
