/* =====================================================================
   乐道啤酒供应链仿真器 —— 全局样式 (Apple / 商务浅色主题)
   设计语言：Apple.com / macOS System Settings —— 干净、克制、留白充裕。
   近白背景、深色文字、发丝灰边框、柔和阴影、大圆角、苹果蓝点缀。
   字体即主角：系统字体栈，17px 基础字号，大标题。
   全站无 emoji、无 AI 风格图标——仅排版、留白与极少量细线 SVG 字形。
   ===================================================================== */

:root {
  /* ── 背景层 ── */
  --bg-page:        #fbfbfd;   /* 页面近白底 */
  --bg-surface:     #ffffff;   /* 卡片/面板纯白 */
  --bg-subtle:      #f5f5f7;   /* 浅灰填充（输入、内嵌块） */
  --bg-tint:        #f0f4fb;   /* 极淡蓝色调（高亮背景） */

  /* ── 文字 ── */
  --text-primary:   #1d1d1f;   /* 主文字（苹果近黑） */
  --text-secondary: #424245;   /* 次级文字 */
  --text-tertiary:  #6e6e73;   /* 说明文字 */
  --text-muted:     #86868b;   /* 极淡说明 */

  /* ── 边框 / 分隔 ── */
  --border:         #d2d2d7;   /* 发丝灰边框 */
  --border-light:   #e8e8ed;   /* 更淡的分隔线 */

  /* ── 强调色 ── */
  --accent:         #0071e3;   /* 苹果蓝 */
  --accent-hover:   #0077ed;
  --accent-tint:    rgba(0,113,227,0.08);

  /* ── 语义色 ── */
  --positive:       #34c759;   /* 绿 */
  --warning:        #ff9f0a;   /* 橙 */
  --danger:         #ff3b30;   /* 红 */
  --indigo:         #5e5ce6;   /* 靛蓝（market 情报） */

  /* ── 形状 ── */
  --radius-sm:      10px;
  --radius:         14px;
  --radius-lg:      18px;
  --radius-pill:    980px;

  /* ── 阴影（柔和） ── */
  --shadow-sm:      0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.06);
  --shadow:         0 4px 16px rgba(0,0,0,0.06), 0 1px 4px rgba(0,0,0,0.04);
  --shadow-lg:      0 12px 40px rgba(0,0,0,0.10), 0 4px 12px rgba(0,0,0,0.05);

  --font-stack: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
                "PingFang SC", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-stack);
  font-size: 17px;
  line-height: 1.5;
  color: var(--text-primary);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.01em;
}

h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.02em; color: var(--text-primary); }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

/* ── 通用排版尺度 ── */
.display     { font-size: clamp(40px, 5vw, 56px); font-weight: 700; line-height: 1.08; letter-spacing: -0.03em; }
.title-xl    { font-size: clamp(28px, 3.2vw, 40px); font-weight: 600; line-height: 1.12; letter-spacing: -0.025em; }
.title-lg    { font-size: 28px; font-weight: 600; letter-spacing: -0.02em; }
.title       { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; }
.subhead     { font-size: 21px; font-weight: 400; color: var(--text-tertiary); line-height: 1.45; }
.eyebrow     { font-size: 13px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-muted); }

/* ── 卡片 / 面板 ── */
.surface {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

/* ── 按钮（苹果药丸样式） ── */
.btn-apple {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  font-family: var(--font-stack);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.01em;
  padding: 0.7em 1.6em;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  line-height: 1.2;
}
.btn-apple:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-apple:active:not(:disabled) { transform: scale(0.98); }

.btn-primary-apple { background: var(--accent); color: #fff; }
.btn-primary-apple:hover:not(:disabled) { background: var(--accent-hover); color: #fff; }

.btn-secondary-apple {
  background: var(--bg-subtle);
  color: var(--text-primary);
  border-color: var(--border);
}
.btn-secondary-apple:hover:not(:disabled) { background: #ececef; }

.btn-ghost-apple {
  background: transparent;
  color: var(--accent);
  border-color: var(--border);
}
.btn-ghost-apple:hover:not(:disabled) { background: var(--accent-tint); border-color: var(--accent); }

.btn-block { width: 100%; }
.btn-lg-apple { font-size: 19px; padding: 0.85em 2.2em; }

/* ── 表单控件 ── */
.input-apple {
  width: 100%;
  font-family: var(--font-stack);
  font-size: 17px;
  color: var(--text-primary);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.7em 0.9em;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.input-apple::placeholder { color: var(--text-muted); }
.input-apple:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-tint);
}
textarea.input-apple { resize: vertical; min-height: 80px; line-height: 1.5; }

.field-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-tertiary);
  margin-bottom: 0.5em;
}

/* ── 苹果分段控件 / 单选卡 ── */
.radio-cards { display: grid; gap: 0.75rem; }
.radio-cards.cols-2 { grid-template-columns: repeat(2, 1fr); }
.radio-cards.cols-3 { grid-template-columns: repeat(3, 1fr); }

.radio-card { position: relative; display: block; cursor: pointer; }
.radio-card input { position: absolute; opacity: 0; pointer-events: none; }
.radio-card .rc-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  border-radius: var(--radius);
  padding: 1rem 0.9rem;
  text-align: center;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.radio-card:hover .rc-body { border-color: #b0b0b8; }
.radio-card .rc-title { display: block; font-size: 17px; font-weight: 600; color: var(--text-primary); }
.radio-card .rc-desc  { display: block; font-size: 13px; color: var(--text-tertiary); margin-top: 0.25rem; line-height: 1.4; }
.radio-card input:checked + .rc-body {
  border-color: var(--accent);
  background: var(--accent-tint);
  box-shadow: 0 0 0 3px var(--accent-tint);
}
.radio-card input:checked + .rc-body .rc-title { color: var(--accent); }
.radio-card input:focus-visible + .rc-body { box-shadow: 0 0 0 4px var(--accent-tint); }

/* ── 细线徽标 ── */
.badge-soft {
  display: inline-flex; align-items: center; gap: 0.35em;
  font-size: 13px; font-weight: 500;
  color: var(--text-tertiary);
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-pill);
  padding: 0.3em 0.85em;
}

/* ── 工具类 ── */
.center-text { text-align: center; }
.muted { color: var(--text-muted); }

/* 干净滚动条 */
.scroll-clean { overflow-y: auto; }
.scroll-clean::-webkit-scrollbar { width: 8px; }
.scroll-clean::-webkit-scrollbar-thumb { background: #d2d2d7; border-radius: 4px; }
.scroll-clean::-webkit-scrollbar-track { background: transparent; }

/* 数字滚动动画微妙强调 */
.num-animate.counting { color: var(--accent); }

/* 细线 SVG 字形统一描边 */
.glyph { width: 20px; height: 20px; stroke: currentColor; stroke-width: 1.5; fill: none;
         stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.glyph-sm { width: 16px; height: 16px; }

/* ── 苹果风格弹层 / sheet ── */
.sheet-backdrop {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,0.32);
  backdrop-filter: saturate(120%) blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 1.5rem;
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease;
}
.sheet-backdrop.open { opacity: 1; pointer-events: auto; }
.sheet {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  max-width: 460px; width: 100%;
  padding: 1.75rem;
  transform: translateY(14px) scale(0.98);
  transition: transform 0.25s ease;
}
.sheet-backdrop.open .sheet { transform: translateY(0) scale(1); }
.sheet-title { font-size: 21px; font-weight: 600; margin-bottom: 0.25rem; }
.sheet-sub { font-size: 14px; color: var(--text-muted); margin-bottom: 1.1rem; }
.sheet-body { font-size: 16px; color: var(--text-secondary); line-height: 1.6; white-space: pre-line; }
.sheet-actions { margin-top: 1.5rem; text-align: right; }

/* ── 轻量 toast ── */
.toast-apple {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
  z-index: 1200;
  background: rgba(29,29,31,0.92);
  color: #fff;
  font-size: 15px; font-weight: 500;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(10px);
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  max-width: 90vw;
}
.toast-apple.show { opacity: 1; transform: translateX(-50%) translateY(0); }


/* =====================================================================
   登录页 (login.html)
   ===================================================================== */

.login-page {
  min-height: 100vh;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(0,113,227,0.06), transparent 70%),
    var(--bg-page);
}
.login-container { max-width: 1080px; margin: 0 auto; padding: 4.5rem 1.5rem 5rem; }

.login-hero { text-align: center; max-width: 760px; margin: 0 auto 3.5rem; }
.login-hero .eyebrow { margin-bottom: 1rem; }
.login-hero h1 { margin-bottom: 1.1rem; }
.login-hero .lede {
  font-size: 21px; line-height: 1.5; color: var(--text-tertiary);
  max-width: 640px; margin: 0 auto;
}
.login-hero .lede strong { color: var(--text-primary); font-weight: 600; }

.login-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 1.5rem;
  align-items: stretch;
}
@media (max-width: 900px) { .login-grid { grid-template-columns: 1fr; } }

.login-panel { padding: 2.25rem; }
.login-panel h2 { font-size: 24px; margin-bottom: 0.35rem; }
.login-panel .panel-sub { font-size: 15px; color: var(--text-muted); margin-bottom: 1.75rem; }
.form-block { margin-bottom: 1.5rem; }

/* 角色说明条 */
.role-note {
  background: var(--bg-tint);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  font-size: 15px; line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 1.75rem;
}
.role-note strong { color: var(--text-primary); font-weight: 600; }

/* 你将学到 */
.learn-title { font-size: 19px; font-weight: 600; margin-bottom: 1.25rem; }
.learn-list { display: flex; flex-direction: column; gap: 0.85rem; }
.learn-item {
  display: flex; align-items: flex-start; gap: 0.9rem;
  padding: 1rem 1.1rem;
  background: var(--bg-subtle);
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.learn-item:hover { border-color: var(--border); transform: translateX(2px); }
.learn-item .glyph { color: var(--accent); margin-top: 2px; }
.learn-item .li-title { font-size: 16px; font-weight: 600; color: var(--text-primary); margin-bottom: 0.15rem; }
.learn-item .li-en { font-size: 12px; font-weight: 500; color: var(--text-muted); letter-spacing: 0.02em; }
.learn-item .li-desc { font-size: 14px; color: var(--text-tertiary); line-height: 1.5; margin-top: 0.25rem; }

.login-footnote { text-align: center; margin-top: 2.5rem; }


/* =====================================================================
   游戏决策台 (game.html)
   ===================================================================== */

body.game-body { background: var(--bg-page); padding-bottom: 2rem; }

/* 顶部状态栏 */
.game-topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem;
  padding: 0.85rem 1.75rem;
  background: rgba(251,251,253,0.85);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border-light);
}
.topbar-left { display: flex; align-items: baseline; gap: 0.65rem; min-width: 0; }
.topbar-company { font-size: 19px; font-weight: 600; color: var(--text-primary); white-space: nowrap; }
.topbar-role { font-size: 14px; color: var(--text-muted); white-space: nowrap; }

.topbar-center { flex: 1; max-width: 380px; }
.period-line { display: flex; align-items: baseline; justify-content: center; gap: 0.4rem; }
.period-line .p-now { font-size: 17px; font-weight: 600; color: var(--text-primary); }
.period-line .p-total { font-size: 14px; color: var(--text-muted); }
.period-track { height: 4px; background: var(--border-light); border-radius: 2px; margin-top: 0.45rem; overflow: hidden; }
.period-fill { height: 100%; background: var(--accent); border-radius: 2px; transition: width 0.5s ease; }

.topbar-right { display: flex; align-items: center; gap: 1.5rem; }
.stat-readout { text-align: right; line-height: 1.1; }
.stat-readout .sr-label { display: block; font-size: 11px; font-weight: 500; letter-spacing: 0.03em; text-transform: uppercase; color: var(--text-muted); }
.stat-readout .sr-value { font-size: 24px; font-weight: 600; color: var(--text-primary); letter-spacing: -0.02em; }
.stat-readout .sr-unit { font-size: 14px; color: var(--text-muted); margin-left: 2px; }
.diff-badge { font-size: 13px; font-weight: 500; color: var(--text-tertiary); }

@media (max-width: 820px) {
  .game-topbar { flex-wrap: wrap; }
  .topbar-center { order: 3; flex-basis: 100%; max-width: none; }
  .topbar-right { gap: 1rem; }
  .stat-readout .sr-value { font-size: 20px; }
}

/* 主体布局 */
.game-main { max-width: 1480px; margin: 0 auto; padding: 1.5rem 1.5rem 0; }

/* 卡片 */
.g-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.25rem;
  overflow: hidden;
}
.g-card-head {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 1.1rem 1.35rem 0.75rem;
}
.g-card-head h3 { font-size: 18px; font-weight: 600; }
.g-card-head .head-glyph { color: var(--text-tertiary); }
.g-card-head .head-extra { margin-left: auto; font-size: 13px; color: var(--text-muted); }
.g-card-body { padding: 0 1.35rem 1.35rem; }
.g-card-body.pad-top { padding-top: 0.25rem; }

.count-chip {
  font-size: 12px; font-weight: 600;
  background: var(--bg-subtle); color: var(--text-tertiary);
  border-radius: var(--radius-pill); padding: 0.1em 0.6em;
}

/* 情报流 */
.news-feed { max-height: 340px; padding: 0 1.35rem 1.1rem; }
.news-item {
  display: flex; gap: 0.7rem; align-items: flex-start;
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--border);
  background: var(--bg-subtle);
  margin-bottom: 0.55rem;
  font-size: 15px; line-height: 1.5; color: var(--text-secondary);
  transition: background 0.2s ease;
}
.news-item .news-dot { width: 7px; height: 7px; border-radius: 50%; margin-top: 7px; flex-shrink: 0; background: var(--border); }
.news-item.news-system    { border-left-color: #b0b0b8; }    .news-system    .news-dot { background: #b0b0b8; }
.news-item.news-social    { border-left-color: var(--accent); } .news-social .news-dot { background: var(--accent); }
.news-item.news-market    { border-left-color: var(--indigo); } .news-market .news-dot { background: var(--indigo); }
.news-item.news-industry  { border-left-color: #b0b0b8; }    .news-industry  .news-dot { background: #b0b0b8; }
.news-item.news-analysis  { border-left-color: var(--warning); } .news-analysis .news-dot { background: var(--warning); }
.news-item.news-noise     { border-left-color: var(--border-light); opacity: 0.6; }  .news-noise .news-dot { background: var(--border); }
.news-item.news-highlight {
  background: var(--bg-tint);
  border-left-color: var(--accent);
  font-weight: 600; color: var(--text-primary);
}
.news-empty, .pipeline-empty { font-size: 14px; color: var(--text-muted); padding: 1rem 0; text-align: center; }

/* 生产在途 */
.pipeline-item {
  display: flex; align-items: center; gap: 0.85rem;
  padding: 0.75rem 0.9rem;
  background: var(--bg-subtle);
  border-radius: var(--radius-sm);
  margin-bottom: 0.55rem;
}
.pipeline-item .pl-glyph { color: var(--text-tertiary); }
.pipeline-item .pl-qty { font-size: 17px; font-weight: 600; color: var(--text-primary); }
.pipeline-item .pl-eta { font-size: 13px; color: var(--text-muted); }
.pipeline-item .pl-info { flex: 1; }
.eta-chip {
  font-size: 12px; font-weight: 600; padding: 0.2em 0.6em; border-radius: var(--radius-pill);
}
.eta-chip.eta-now  { background: rgba(52,199,89,0.14); color: #248a3d; }
.eta-chip.eta-soon { background: var(--accent-tint); color: var(--accent); }
.eta-chip.eta-far  { background: var(--bg-subtle); color: var(--text-tertiary); }

/* 订单卡 */
.orders-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.9rem; }
@media (max-width: 560px) { .orders-grid { grid-template-columns: 1fr; } }
.order-card {
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 1.1rem 1.15rem;
  background: var(--bg-surface);
}
.order-card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.5rem; }
.order-channel { font-size: 18px; font-weight: 600; color: var(--text-primary); }
.order-kind { font-size: 13px; color: var(--text-muted); margin-top: 1px; }
.order-qty-row { margin: 0.85rem 0; display: flex; align-items: baseline; gap: 0.4rem; }
.order-qty-num { font-size: 34px; font-weight: 600; letter-spacing: -0.02em; color: var(--text-primary); }
.order-qty-unit { font-size: 15px; color: var(--text-muted); }
.order-qty-label { font-size: 13px; color: var(--text-tertiary); margin-right: auto; align-self: center; }

.urgency-tag { font-size: 12px; font-weight: 600; padding: 0.2em 0.6em; border-radius: var(--radius-pill); white-space: nowrap; }
.urgency-critical { background: rgba(255,59,48,0.12);  color: #d70015; }
.urgency-urgent   { background: rgba(255,59,48,0.10);  color: #e8442f; }
.urgency-elevated { background: rgba(255,159,10,0.14); color: #c2700a; }
.urgency-normal   { background: var(--bg-subtle);      color: var(--text-tertiary); }
.urgency-low      { background: var(--bg-subtle);      color: var(--text-muted); }

.fulfill-row { display: flex; align-items: center; gap: 0.5rem; }
.fulfill-row .ff-label { font-size: 13px; color: var(--text-tertiary); }
.fulfill-input {
  width: 84px; font-family: var(--font-stack); font-size: 16px; font-weight: 600;
  text-align: center; color: var(--text-primary);
  background: var(--bg-subtle); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 0.45em 0.4em;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  -moz-appearance: textfield;
}
.fulfill-input::-webkit-outer-spin-button, .fulfill-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.fulfill-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint); }
.fulfill-input.over-stock { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(255,59,48,0.12); color: var(--danger); }
.fill-all-btn {
  font-family: var(--font-stack); font-size: 13px; font-weight: 500;
  color: var(--accent); background: transparent; border: none; cursor: pointer;
  padding: 0.4em 0.5em; border-radius: var(--radius-sm);
}
.fill-all-btn:hover { background: var(--accent-tint); }

/* 配货状态条 */
.alloc-status { margin-top: 1.25rem; padding: 1rem 1.15rem; background: var(--bg-subtle); border-radius: var(--radius); }
.alloc-line { display: flex; align-items: baseline; gap: 0.4rem; font-size: 15px; }
.alloc-line .al-label { color: var(--text-tertiary); }
.alloc-line .al-alloc { font-size: 20px; font-weight: 600; color: var(--text-primary); }
.alloc-line .al-sep { color: var(--text-muted); }
.alloc-line .al-avail { font-size: 20px; font-weight: 600; color: var(--text-primary); }
.alloc-line .al-unit { color: var(--text-muted); font-size: 13px; }
.alloc-line.over .al-alloc { color: var(--danger); }
.alloc-track { height: 6px; background: var(--border-light); border-radius: 3px; margin-top: 0.65rem; overflow: hidden; }
.alloc-fill { height: 100%; background: var(--accent); border-radius: 3px; transition: width 0.3s ease, background 0.3s ease; }
.alloc-fill.over { background: var(--danger); }

/* 决策分隔 */
.decision-sep { height: 1px; background: var(--border-light); margin: 1.5rem 0; }

/* 生产计划 */
.decision-label { display: flex; align-items: baseline; gap: 0.5rem; margin-bottom: 0.85rem; }
.decision-label .dl-main { font-size: 17px; font-weight: 600; color: var(--text-primary); }
.decision-label .dl-hint { font-size: 13px; color: var(--text-muted); }
.prod-input-row { display: flex; align-items: center; gap: 1.1rem; }
.prod-slider { flex: 1; -webkit-appearance: none; appearance: none; height: 4px; border-radius: 2px; background: var(--border-light); outline: none; }
.prod-slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 24px; height: 24px; border-radius: 50%;
  background: #fff; border: 0.5px solid rgba(0,0,0,0.1); box-shadow: var(--shadow-sm); cursor: pointer;
  transition: transform 0.15s ease;
}
.prod-slider::-webkit-slider-thumb:active { transform: scale(1.1); }
.prod-slider::-moz-range-thumb { width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 0.5px solid rgba(0,0,0,0.1); box-shadow: var(--shadow-sm); cursor: pointer; }
.prod-num-group { display: flex; align-items: baseline; gap: 0.3rem; }
.prod-num-input {
  width: 96px; font-family: var(--font-stack); font-size: 24px; font-weight: 600;
  text-align: center; color: var(--text-primary);
  background: var(--bg-subtle); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 0.25em 0.3em;
  -moz-appearance: textfield;
}
.prod-num-input::-webkit-outer-spin-button, .prod-num-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.prod-num-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint); }
.prod-unit { font-size: 14px; color: var(--text-muted); }
.prod-hints { display: flex; justify-content: space-between; gap: 1rem; margin-top: 0.8rem; font-size: 13px; color: var(--text-tertiary); }
.prod-hints b { color: var(--text-primary); font-weight: 600; }

/* 财务概览 */
.fin-list { display: flex; flex-direction: column; }
.fin-item { display: flex; justify-content: space-between; align-items: baseline; padding: 0.6rem 0; font-size: 15px; }
.fin-item .fin-label { color: var(--text-tertiary); }
.fin-item .fin-value { font-weight: 600; color: var(--text-primary); font-variant-numeric: tabular-nums; }
.fin-divider { height: 1px; background: var(--border-light); margin: 0.4rem 0; }
.fin-item.fin-revenue .fin-value { color: var(--positive); }
.fin-item.fin-profit { padding: 0.75rem 0; }
.fin-item.fin-profit .fin-label { font-size: 16px; font-weight: 600; color: var(--text-primary); }
.fin-item.fin-profit .fin-value { font-size: 22px; }

/* 实时图表 */
.live-chart-wrap { padding-top: 0.25rem; }
.live-chart-wrap canvas { max-height: 240px; }
.chart-note { font-size: 12px; color: var(--text-muted); margin: 0.75rem 0 0; }

/* 市场调查 */
.invest-desc { font-size: 14px; color: var(--text-tertiary); margin: 0 0 1rem; line-height: 1.5; }
.invest-desc .cost-em { color: var(--accent); font-weight: 600; }
.investigate-btn {
  display: flex; align-items: center; gap: 0.65rem; width: 100%;
  font-family: var(--font-stack); text-align: left;
  background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 0.8rem 1rem; margin-bottom: 0.65rem; cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.investigate-btn:hover:not(:disabled) { border-color: var(--accent); background: var(--accent-tint); }
.investigate-btn:disabled { cursor: default; opacity: 0.7; }
.investigate-btn .ib-glyph { color: var(--accent); }
.investigate-btn.revealed .ib-glyph { color: var(--positive); }
.investigate-btn .ib-label { flex: 1; font-size: 15px; font-weight: 500; color: var(--text-primary); }
.investigate-btn .ib-cost { font-size: 13px; font-weight: 600; color: var(--text-muted); }
.investigate-btn.revealed .ib-cost { color: var(--positive); }

.invest-result {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 0.9rem 1rem; margin-top: 0.65rem;
}
.invest-result .ir-title { font-size: 13px; font-weight: 600; color: var(--accent); margin-bottom: 0.35rem; }
.invest-result .ir-text { font-size: 14px; color: var(--text-secondary); line-height: 1.55; white-space: pre-line; }

/* 周期过场 */
.period-transition {
  position: fixed; inset: 0; z-index: 900;
  background: rgba(251,251,253,0.94);
  backdrop-filter: saturate(180%) blur(20px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.4s ease;
}
.period-transition.active { opacity: 1; pointer-events: auto; }
.transition-content { text-align: center; transform: translateY(8px); transition: transform 0.4s ease; }
.period-transition.active .transition-content { transform: translateY(0); }
.transition-eyebrow { font-size: 14px; font-weight: 500; color: var(--text-muted); letter-spacing: 0.04em; }
.transition-period { font-size: clamp(40px, 6vw, 64px); font-weight: 700; letter-spacing: -0.03em; color: var(--text-primary); margin: 0.5rem 0; }
.transition-sub { font-size: 17px; color: var(--text-tertiary); }


/* =====================================================================
   复盘报告 (debrief.html)
   ===================================================================== */

body.debrief-body { background: var(--bg-page); padding-bottom: 4rem; }
.debrief-wrap { max-width: 1080px; margin: 0 auto; padding: 0 1.5rem; }

/* 加载态 */
.loading-screen { min-height: 70vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.25rem; }
.spinner-ring {
  width: 38px; height: 38px; border-radius: 50%;
  border: 3px solid var(--border-light); border-top-color: var(--accent);
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-screen .ls-text { font-size: 16px; color: var(--text-tertiary); }

/* HERO */
.db-hero {
  text-align: center;
  padding: 3.5rem 2rem 3rem;
  margin: 2.5rem 0;
  background:
    radial-gradient(ellipse 70% 60% at 50% 0%, var(--accent-tint), transparent 70%),
    var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: 24px;
  box-shadow: var(--shadow-sm);
}
.grade-letter { font-size: clamp(96px, 14vw, 160px); font-weight: 700; line-height: 0.9; letter-spacing: -0.04em; }
.grade-S { color: var(--warning); } .grade-A { color: var(--positive); }
.grade-B { color: var(--accent); }  .grade-C { color: var(--warning); }
.grade-D { color: var(--danger); }
.hero-overall { font-size: 19px; color: var(--text-tertiary); margin-top: 0.75rem; }
.hero-overall b { color: var(--text-primary); font-size: 28px; font-weight: 600; }
.hero-headline { font-size: 24px; font-weight: 600; color: var(--text-primary); margin: 1.25rem auto 0; max-width: 700px; letter-spacing: -0.02em; }

.subscore-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-top: 2.5rem; }
@media (max-width: 720px) { .subscore-grid { grid-template-columns: repeat(2, 1fr); } }
.subscore {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 1.25rem 1rem;
  text-align: left;
}
.subscore .ss-name { font-size: 14px; color: var(--text-tertiary); margin-bottom: 0.5rem; }
.subscore .ss-val { font-size: 34px; font-weight: 600; line-height: 1; color: var(--text-primary); letter-spacing: -0.02em; }
.subscore .ss-val small { font-size: 15px; font-weight: 400; color: var(--text-muted); }
.subscore .ss-track { height: 6px; background: var(--border-light); border-radius: 3px; margin-top: 0.85rem; overflow: hidden; }
.subscore .ss-fill { height: 100%; border-radius: 3px; transition: width 1s ease; }
.ss-fill.c-financial { background: var(--positive); }
.ss-fill.c-bullwhip  { background: var(--accent); }
.ss-fill.c-service   { background: var(--warning); }
.ss-fill.c-info      { background: var(--indigo); }

/* 区块 */
.section { margin: 3.5rem 0; }
.section-head { margin-bottom: 1.5rem; }
.section-head h2 { font-size: 28px; font-weight: 600; letter-spacing: -0.02em; }
.section-head .sec-sub { font-size: 16px; color: var(--text-muted); margin-top: 0.35rem; }

.panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 2rem;
}

.narrative-text { color: var(--text-secondary); line-height: 1.7; font-size: 18px; }
.narrative-text p { margin: 0 0 1.1rem; }
.narrative-text p:last-child { margin-bottom: 0; }

.chart-box { margin-top: 2rem; }
.chart-box canvas { max-height: 360px; }
.chart-caption { text-align: center; font-size: 14px; color: var(--text-muted); margin-top: 0.85rem; }

.profit-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-top: 2rem; }
@media (max-width: 720px) { .profit-compare { grid-template-columns: 1fr; } }
.profit-compare canvas { max-height: 260px; }

/* 关键决策卡 */
.decision-card {
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem; margin-bottom: 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-left: 4px solid var(--text-muted);
  box-shadow: var(--shadow-sm);
}
.decision-card.verdict-ok   { border-left-color: var(--positive); }
.decision-card.verdict-warn { border-left-color: var(--danger); }
.decision-card.verdict-info { border-left-color: var(--accent); }
.decision-card .dc-title { font-size: 18px; font-weight: 600; color: var(--text-primary); margin-bottom: 0.4rem; display: flex; align-items: center; gap: 0.65rem; flex-wrap: wrap; }
.decision-card .dc-desc { color: var(--text-secondary); font-size: 16px; line-height: 1.6; }
.verdict-tag { font-size: 12px; font-weight: 600; padding: 0.15em 0.6em; border-radius: var(--radius-pill); }
.verdict-tag.ok   { background: rgba(52,199,89,0.14); color: #248a3d; }
.verdict-tag.warn { background: rgba(255,59,48,0.12); color: #d70015; }
.verdict-tag.info { background: var(--accent-tint); color: var(--accent); }

/* 运筹学指标网格 */
.metric-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
@media (max-width: 720px) { .metric-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 460px) { .metric-grid { grid-template-columns: 1fr; } }
.metric-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem;
}
.metric-name { font-size: 14px; color: var(--text-tertiary); margin-bottom: 0.6rem; }
.metric-val { font-size: 32px; font-weight: 600; color: var(--text-primary); line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.metric-val.danger { color: var(--danger); }
.metric-val.good { color: var(--positive); }
.metric-note { font-size: 13px; color: var(--text-muted); margin-top: 0.65rem; line-height: 1.5; }

/* 改进建议 */
.suggestion-item {
  display: flex; gap: 1rem; padding: 1.1rem 1.35rem; margin-bottom: 0.85rem;
  background: var(--bg-surface); border: 1px solid var(--border-light);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.suggestion-num {
  flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent-tint); color: var(--accent);
  display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 15px;
}
.suggestion-text { color: var(--text-secondary); line-height: 1.6; font-size: 16px; }

/* 决策风格 */
.personality-card { text-align: center; }
.archetype { font-size: 34px; font-weight: 600; color: var(--text-primary); margin-bottom: 0.85rem; letter-spacing: -0.02em; }
.personality-desc { color: var(--text-secondary); line-height: 1.7; font-size: 18px; max-width: 720px; margin: 0 auto 1.75rem; }
.signal-tags { display: flex; flex-wrap: wrap; gap: 0.6rem; justify-content: center; }
.signal-tag { font-size: 14px; font-weight: 500; padding: 0.4em 1em; border-radius: var(--radius-pill); border: 1px solid; }
.signal-positive { color: #248a3d; border-color: rgba(52,199,89,0.4); background: rgba(52,199,89,0.08); }
.signal-negative { color: #d70015; border-color: rgba(255,59,48,0.35); background: rgba(255,59,48,0.07); }
.signal-neutral  { color: var(--text-tertiary); border-color: var(--border); background: var(--bg-subtle); }

/* 教训卡 */
.lesson-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
@media (max-width: 720px) { .lesson-grid { grid-template-columns: 1fr; } }
.lesson-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 1.75rem;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.lesson-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.lesson-num {
  width: 32px; height: 32px; border-radius: 9px;
  background: var(--accent-tint); color: var(--accent);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 600; margin-bottom: 0.85rem;
}
.lesson-cause { font-size: 12px; font-weight: 600; color: var(--accent); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.4rem; }
.lesson-title { font-size: 19px; font-weight: 600; color: var(--text-primary); margin-bottom: 0.6rem; }
.lesson-body { color: var(--text-secondary); font-size: 15px; line-height: 1.65; }

/* 页脚 */
.debrief-footer { display: flex; gap: 1rem; justify-content: center; margin: 3.5rem 0 1rem; flex-wrap: wrap; }
