/* ================================================
   金舆·企业AI应用诊断系统 v2.2
   Brand-Aligned Design System (Gold + Navy)
   ================================================ */

/* ==== CSS Variables ==== */
:root {
  /* Brand core */
  --gold: #C9A040;
  --gold-bright: #D4A843;
  --gold-light: #B8922E;
  --gold-pale: #F5E6C8;
  --gold-dim: rgba(201, 160, 64, 0.12);
  --gold-glow: rgba(212, 168, 67, 0.25);
  --navy: #2D2618;
  --navy-light: #3D3420;
  --navy-card: rgba(255, 252, 247, 0.85);
  --dark: #FDF9F2;

  /* Semantic */
  --accent: #D4A843;
  --accent-glow: 0 0 24px rgba(212, 168, 67, 0.25);
  --success: #2DA862;
  --warning: #D49B20;
  --danger: #D9404E;

  /* Surfaces */
  --bg-root: #FDF9F2;
  --bg-card: rgba(255, 255, 255, 0.75);
  --bg-card-hover: rgba(255, 255, 255, 0.92);
  --border-card: rgba(0, 0, 0, 0.06);
  --border-gold: rgba(212, 168, 67, 0.25);
  --border-gold-bright: rgba(212, 168, 67, 0.55);
  --glass-blur: 14px;

  /* Text */
  --text-primary: #2D2618;
  --text-secondary: #6B5F4D;
  --text-dim: rgba(107, 95, 77, 0.45);
  --text-inverse: #FFFDF7;

  /* Typography */
  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-mono: 'SF Mono', 'JetBrains Mono', monospace;

  /* Layout */
  --mobile-max: 430px;
  --desktop-max: 860px;
  --large-max: 960px;
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
}

/* ==== Particle Canvas ==== */
#particleCanvas {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  z-index: 0; pointer-events: none;
}

/* ==== Cursor Glow ==== */
#cursorGlow {
  position: fixed; top: 0; left: 0; width: 300px; height: 300px;
  border-radius: 50%; pointer-events: none; z-index: 0;
  background: radial-gradient(circle, rgba(212,168,67,0.08) 0%, rgba(212,168,67,0.03) 30%, transparent 70%);
  transition: opacity .3s ease;
  opacity: 0;
}


/* ==== Reset ==== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: var(--font);
  background: var(--bg-root);
  color: var(--text-primary);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  max-width: var(--mobile-max);
  margin: 0 auto;
  min-height: 100vh;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background-image:
    radial-gradient(ellipse 70% 50% at 50% -15%, rgba(212,168,67,0.08) 0%, transparent 100%),
    radial-gradient(ellipse 30% 30% at 85% 85%, rgba(201,160,64,0.05) 0%, transparent 100%);
  background-attachment: fixed;
}

/* ==== Screens ==== */
.sc { display: none; min-height: 100vh; animation: fadeSlideIn .45s cubic-bezier(.22,.61,.36,1); position: relative; z-index: 1; }
.sc.ac { display: block; }

/* ==== Keyframes ==== */
@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes pulseGlow {
  0%, 100% { filter: drop-shadow(0 0 2px rgba(212,168,67,0.5)); }
  50% { filter: drop-shadow(0 0 8px rgba(212,168,67,0.85)); }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* ==== Buttons ==== */
.bp {
  background: linear-gradient(135deg, var(--gold-bright), var(--gold));
  color: #FFFDF7; border: none; padding: 16px 48px; border-radius: var(--radius);
  font-size: 17px; font-weight: 700; cursor: pointer; transition: all .3s cubic-bezier(.22,.61,.36,1);
  box-shadow: 0 6px 28px rgba(212, 168, 67, 0.25);
  letter-spacing: 0.02em; position: relative; overflow: hidden;
}
.bp::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.18), transparent);
  transform: translateX(-100%); transition: transform .5s;
}
.bp:hover::after { transform: translateX(100%); }
.bp:active { transform: scale(.97); }
.bp:disabled { opacity: .35; pointer-events: none; box-shadow: none; }

.bs {
  flex: 1; padding: 14px; border-radius: var(--radius); font-size: 15px; font-weight: 600;
  background: rgba(0,0,0,0.03); border: 1px solid var(--border-card); color: var(--text-secondary);
  cursor: pointer; transition: all .2s ease;
}
.bs:hover:not(:disabled) { border-color: var(--border-gold-bright); color: var(--gold-light); background: rgba(212,168,67,0.08); }
.bs:disabled { opacity: .35; cursor: not-allowed; }

/* ==== Welcome Screen ==== */
#w {
  background: transparent;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 40px 24px; position: relative;
}
#w::before {
  content: ''; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 280px; height: 280px;
  background: radial-gradient(circle, rgba(212,168,67,0.12) 0%, transparent 70%);
  border-radius: 50%; pointer-events: none;
}
#w .logo { width: 80px; height: 80px; margin-bottom: 24px; object-fit: contain; position: relative; z-index: 1; }
#w h1 {
  color: var(--navy); font-size: 28px; font-weight: 800; margin-bottom: 10px;
  letter-spacing: 0.04em; position: relative; z-index: 1;
}
#w .bd {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--gold-dim); border: 1px solid var(--border-gold);
  border-radius: 20px; padding: 6px 18px; color: var(--gold-light); font-size: 13px;
  margin-bottom: 32px; position: relative; z-index: 1;
}
#w .hist-btn { color: var(--text-dim); font-size: 12px; margin-top: 20px; cursor: pointer; border: none; background: none; transition: color .2s; position: relative; z-index: 1; }
#w .hist-btn:hover { color: var(--gold-bright); }

/* ==== Survey Screen ==== */
#s { background: transparent; padding: 0; }
#s .h { padding: 24px 20px 28px; text-align: center; }
#s .pi { color: var(--text-secondary); font-size: 13px; margin-bottom: 12px; }
#s .pb { height: 3px; background: rgba(0,0,0,.06); border-radius: 2px; overflow: hidden; max-width: 280px; margin: 0 auto; }
#s .pb .f { height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-light)); transition: width .5s cubic-bezier(.22,.61,.36,1); border-radius: 2px; box-shadow: 0 0 8px rgba(212,168,67,0.4); }
#s .qa {
  background: var(--navy-card); backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--border-card); border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 32px 24px; min-height: 60vh; animation: slideUp .4s cubic-bezier(.22,.61,.36,1);
  border-bottom: none;
}
#s .qn { font-size: 11px; color: var(--gold-bright); margin-bottom: 6px; letter-spacing: 2px; text-transform: uppercase; font-weight: 600; }
#s .qt { font-size: 22px; font-weight: 800; color: var(--navy); margin-bottom: 6px; line-height: 1.4; }
#s .qs { font-size: 13px; color: var(--text-secondary); margin-bottom: 24px; }

.og { display: grid; gap: 10px; }
.oi {
  background: rgba(0,0,0,0.02); border: 1px solid rgba(0,0,0,0.07); border-radius: var(--radius);
  padding: 16px 18px; cursor: pointer; font-size: 15px; color: var(--text-secondary);
  transition: all .25s cubic-bezier(.22,.61,.36,1); text-align: left;
  -webkit-tap-highlight-color: transparent; user-select: none;
}
.oi.sl {
  border-color: var(--border-gold-bright); background: var(--gold-dim);
  color: var(--gold-light); font-weight: 600;
  box-shadow: 0 0 16px rgba(212,168,67,0.12), inset 0 0 16px rgba(212,168,67,0.04);
}
.oi:hover:not(.sl) { background: rgba(0,0,0,0.05); border-color: rgba(0,0,0,0.12); }

.inp {
  width: 100%; padding: 16px 18px; border: 1px solid rgba(0,0,0,0.1); border-radius: var(--radius);
  font-size: 16px; outline: none; background: #fff; color: var(--navy);
  transition: border .25s, box-shadow .25s; font-family: var(--font);
}
.inp:focus { border-color: var(--gold-bright); box-shadow: 0 0 20px rgba(212,168,67,0.12); }
.inp::placeholder { color: var(--text-dim); }
.inp+.inp { margin-top: 12px; }

.nr { display: flex; gap: 12px; margin-top: 28px; }
.nr .bp { flex: 1; padding: 15px; font-size: 15px; }

.mh { font-size: 13px; color: var(--text-secondary); margin-bottom: 10px; }
.mh em { font-style: normal; color: var(--gold-bright); font-weight: 700; }

/* ==== Report Screen ==== */
#r { background: transparent; padding: 0; }
.rh {
  background: rgba(255, 253, 247, 0.9); backdrop-filter: blur(20px);
  padding: 14px 20px; display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--border-card); position: sticky; top: 0; z-index: 10;
}
.rh .rlogo { width: 32px; height: 32px; border-radius: 6px; object-fit: contain; }
.rh span { color: var(--text-dim); font-size: 12px; }
.rb { padding: 16px; }

/* Header card */
.header-card {
  background: linear-gradient(135deg, #FFFDF7, #FFF9EC);
  backdrop-filter: blur(var(--glass-blur)); border-radius: var(--radius-lg);
  padding: 28px 24px; text-align: center; margin-bottom: 16px;
  border: 1px solid var(--border-gold);
  position: relative; overflow: hidden;
}
.header-card::before {
  content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 200px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-bright), transparent);
}
.header-card .company { color: var(--navy); font-size: 20px; font-weight: 800; margin-bottom: 6px; }
.header-card .industry-tag {
  display: inline-block; background: var(--gold-dim); color: var(--gold-light);
  font-size: 12px; padding: 4px 16px; border-radius: 12px; margin-bottom: 14px;
  border: 1px solid var(--border-gold);
}
.header-card .disclaimer {
  color: var(--text-dim); font-size: 11px; margin-top: 14px;
  border-top: 1px solid rgba(0,0,0,.06); padding-top: 14px; line-height: 1.6;
}

/* Glass card */
.cs {
  background: rgba(255,255,255,0.8); backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--border-card); border-radius: var(--radius-lg);
  padding: 24px 20px; margin-bottom: 14px;
  transition: border-color .3s, box-shadow .3s, transform .3s;
}
.cs:hover { border-color: var(--border-gold); box-shadow: 0 8px 32px rgba(0,0,0,.06); transform: translateY(-2px); }
.cs h3 {
  font-size: 16px; font-weight: 700; color: var(--navy); margin-bottom: 6px;
  display: flex; align-items: center; gap: 8px;
}
.cs h3::before {
  content: ''; width: 3px; height: 18px; border-radius: 2px;
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  display: inline-block;
}
.cs .csb { font-size: 12px; color: var(--text-secondary); margin-bottom: 18px; }

/* AI Maturity Badge */
.ai-badge {
  display: inline-block; padding: 6px 18px; border-radius: 20px;
  font-size: 13px; font-weight: 700; letter-spacing: 0.03em;
}
.ai-badge.explorer { background: rgba(217,64,78,0.08); color: #D9404E; border: 1px solid rgba(217,64,78,0.18); }
.ai-badge.practitioner { background: rgba(212,155,32,0.08); color: #D49B20; border: 1px solid rgba(212,155,32,0.18); }
.ai-badge.driver { background: rgba(45,168,98,0.08); color: #2DA862; border: 1px solid rgba(45,168,98,0.18); }
.ai-badge.leader { background: var(--gold-dim); color: var(--gold-light); border: 1px solid var(--border-gold); }

/* Ring progress */
.ring-container { text-align: center; padding: 10px 0 20px; }
.ring-svg { display: block; margin: 0 auto; }
.ring-bg { fill: none; stroke: rgba(0,0,0,.05); stroke-width: 8; }
.ring-fill {
  fill: none; stroke-width: 8; stroke-linecap: round;
  transition: stroke-dashoffset 1.5s cubic-bezier(.22,.61,.36,1);
}
.ring-text { font-size: 36px; font-weight: 800; fill: var(--navy); font-family: var(--font); }
.ring-sub { font-size: 12px; fill: var(--text-secondary); font-family: var(--font); }

/* Bar chart */
.bar-chart { padding: 6px 0; }
.bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.bar-label { width: 60px; font-size: 12px; font-weight: 600; color: var(--text-secondary); text-align: right; flex-shrink: 0; }
.bar-track { flex: 1; height: 28px; background: rgba(0,0,0,.04); border-radius: 6px; position: relative; overflow: hidden; }
.bar-avg-fill { position: absolute; left: 0; top: 3px; height: 22px; background: rgba(0,0,0,.05); border-radius: 5px; }
.bar-mine-fill { position: absolute; left: 0; top: 3px; height: 22px; border-radius: 5px; transition: width 1s cubic-bezier(.22,.61,.36,1); }
.bar-mine-fill.good { background: linear-gradient(90deg, #2DA862, #3DDC84); box-shadow: 0 0 10px rgba(45,168,98,0.2); }
.bar-mine-fill.warn { background: linear-gradient(90deg, #D49B20, var(--gold-bright)); box-shadow: 0 0 10px rgba(212,155,32,0.2); }
.bar-mine-fill.bad { background: linear-gradient(90deg, #D9404E, #FF5C72); box-shadow: 0 0 10px rgba(217,64,78,0.2); }
.bar-nums { width: 60px; display: flex; gap: 8px; font-size: 11px; flex-shrink: 0; }
.bar-mine-num { font-weight: 700; color: var(--navy); }
.bar-avg-num { color: var(--text-dim); }
.bar-legend { display: flex; justify-content: center; gap: 24px; margin-top: 14px; font-size: 11px; color: var(--text-secondary); }
.bar-legend span { display: flex; align-items: center; gap: 6px; }
.bar-legend .ldot { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.bar-legend .ldot.me { background: var(--gold-bright); box-shadow: 0 0 6px var(--gold-glow); }
.bar-legend .ldot.av { background: rgba(0,0,0,.08); }

/* Insights */
.il { list-style: none; }
.il li {
  padding: 14px 0; border-bottom: 1px solid rgba(0,0,0,.06); font-size: 14px;
  color: var(--text-secondary); line-height: 1.6; display: flex; gap: 12px; align-items: flex-start;
}
.il li:last-child { border: none; }
.il li strong { color: var(--navy); }
.il .ic {
  width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center;
  justify-content: center; font-size: 11px; flex-shrink: 0; margin-top: 2px; font-weight: 700;
}
.il .ic.g { background: rgba(45,168,98,0.12); color: #2DA862; }
.il .ic.b { background: var(--gold-dim); color: var(--gold-light); }
.il .ic.y { background: rgba(212,155,32,0.12); color: #D49B20; }
.il .ic.r { background: rgba(217,64,78,0.12); color: #D9404E; }

/* Action cards */
.ag { display: grid; gap: 10px; margin-top: 14px; }
.ac {
  background: rgba(0,0,0,0.02); border: 1px solid rgba(0,0,0,0.06);
  border-radius: var(--radius); padding: 16px; font-size: 14px; color: var(--text-secondary);
  line-height: 1.6; transition: all .25s ease;
}
.ac:hover { border-color: var(--border-gold); background: var(--gold-dim); }
.ac strong { color: var(--navy); display: block; margin-bottom: 6px; font-size: 15px; }

/* Inamori cards */
.inamori-card {
  background: linear-gradient(135deg, rgba(255,252,247,0.9), rgba(212,168,67,0.05));
  border: 1px solid var(--border-gold); border-radius: var(--radius);
  padding: 18px; margin-bottom: 10px;
  transition: all .3s ease;
}
.inamori-card:hover { border-color: var(--border-gold-bright); box-shadow: 0 4px 20px rgba(212,168,67,0.12); }
.inamori-card .inum {
  display: inline-block; background: linear-gradient(135deg, var(--gold-bright), var(--gold));
  color: #FFFDF7; width: 26px; height: 26px; border-radius: 50%;
  text-align: center; line-height: 26px; font-size: 12px; font-weight: 800; margin-right: 10px;
}
.inamori-card .iname { font-weight: 700; color: var(--gold-light); font-size: 15px; }
.inamori-card .idesc { color: var(--text-secondary); font-size: 12px; margin: 6px 0; font-style: italic; opacity: .8; }
.inamori-card .irel { font-size: 11px; margin: 6px 0; padding: 4px 10px; border-radius: 8px; display: inline-block; }
.inamori-card .irel.high { background: rgba(217,64,78,0.1); color: #D9404E; }
.inamori-card .irel.medium { background: rgba(212,155,32,0.1); color: #D49B20; }
.inamori-card .iadvice {
  color: var(--text-primary); font-size: 13px; line-height: 1.7; margin-top: 10px;
  padding-top: 10px; border-top: 1px dashed var(--border-gold);
}

/* Data table */
.dt { width: 100%; border-collapse: collapse; font-size: 13px; }
.dt td { padding: 10px 12px; border-bottom: 1px solid rgba(0,0,0,.06); vertical-align: top; color: var(--text-secondary); }
.dt td:first-child { font-weight: 600; color: var(--text-dim); width: 36%; white-space: nowrap; font-size: 12px; }

/* Share/Action buttons */
.qs {
  background: rgba(255,255,255,0.75); backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--border-card); border-radius: var(--radius-lg);
  padding: 24px; text-align: center; margin: 16px 0 80px;
}
.qs h3 { font-size: 16px; font-weight: 700; color: var(--navy); margin-bottom: 14px; }
.share-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.share-btns button {
  padding: 11px 18px; border-radius: 10px; border: 1px solid transparent;
  font-size: 13px; font-weight: 600; cursor: pointer; transition: all .25s ease;
}
.share-btns .save-btn { background: linear-gradient(135deg, var(--gold-bright), var(--gold)); color: #FFFDF7; }
.share-btns .copy-btn { background: rgba(0,0,0,0.04); color: var(--navy); border-color: rgba(0,0,0,0.1); }
.share-btns .data-btn { background: transparent; color: var(--text-secondary); border-color: rgba(0,0,0,0.08); }
.share-btns .ai-btn { background: linear-gradient(135deg, #6C5CE7, #A29BFE); color: #fff; }
.share-btns button:active { transform: scale(.95); }
.share-btns button:hover:not(:active) { transform: translateY(-1px); }

/* AI Report */
.ai-report-section { margin-top: 16px; }
.ai-exec-summary {
  background: var(--gold-dim); border-radius: var(--radius); padding: 18px;
  margin-bottom: 14px; border-left: 3px solid var(--gold-bright);
  font-size: 14px; line-height: 1.8; color: var(--text-primary);
}
.ai-action-item {
  display: flex; gap: 12px; padding: 12px 14px; margin-bottom: 8px;
  background: rgba(0,0,0,0.02); border-radius: 10px; font-size: 13px;
  border: 1px solid rgba(0,0,0,0.05);
}
.ai-timeline {
  font-size: 10px; padding: 3px 10px; border-radius: 10px;
  font-weight: 700; flex-shrink: 0; align-self: flex-start; margin-top: 2px;
  letter-spacing: 0.05em;
}
.ai-timeline.short { background: rgba(217,64,78,0.12); color: #D9404E; }
.ai-timeline.mid { background: rgba(212,155,32,0.12); color: #D49B20; }
.ai-timeline.long { background: var(--gold-dim); color: var(--gold-light); }

/* Loading */
.loading { text-align: center; padding: 30px; }
.loading p { color: var(--text-secondary); }
.spinner {
  display: inline-block; width: 36px; height: 36px;
  border: 2px solid rgba(0,0,0,.06); border-top-color: var(--gold-bright);
  border-radius: 50%; animation: spin .8s linear infinite;
}

/* ==== History Screen ==== */
#hist { padding: 0; }
.hist-item {
  background: rgba(255,255,255,0.8); backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--border-card); border-radius: var(--radius);
  padding: 18px; margin-bottom: 10px; cursor: pointer; transition: all .3s ease;
}
.hist-item:hover { border-color: var(--border-gold); box-shadow: 0 4px 20px rgba(0,0,0,.08); }
.hist-item:active { transform: scale(.98); }
.hist-item .hi-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.hist-item .hi-name { font-weight: 700; font-size: 15px; color: var(--navy); }
.hist-item .hi-meta { font-size: 12px; color: var(--text-secondary); display: flex; gap: 14px; flex-wrap: wrap; }
.hist-item .hi-date { color: var(--text-dim); font-size: 11px; margin-top: 4px; }
.hist-item .hi-scores { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.hist-item .hi-score-chip {
  font-size: 10px; padding: 3px 10px; border-radius: 8px;
  background: var(--gold-dim); color: var(--gold-light);
  border: 1px solid var(--border-gold);
}

.hist-empty { text-align: center; padding: 80px 20px; color: var(--text-dim); }
.hist-empty .big { font-size: 56px; margin-bottom: 16px; opacity: .5; }
.hist-pagination { display: flex; justify-content: center; gap: 10px; margin: 20px 0; align-items: center; }
.hist-pagination button {
  padding: 8px 18px; border-radius: 8px; border: 1px solid var(--border-card);
  background: rgba(255,255,255,0.7); cursor: pointer; font-size: 13px; color: var(--text-secondary);
  transition: all .2s ease;
}
.hist-pagination button:hover:not(:disabled) { border-color: var(--border-gold-bright); color: var(--gold-light); }
.hist-pagination button:disabled { opacity: .3; cursor: not-allowed; }
.hist-pagination .page-info { font-size: 13px; color: var(--text-secondary); }

/* ==== QR Code Section ==== */
.qr-section {
  text-align: center; padding: 32px 20px 20px; margin: 16px 0;
  background: rgba(255,255,255,0.8); backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--border-card); border-radius: var(--radius-lg);
}
.qr-text {
  color: var(--navy); font-size: 16px; font-weight: 700; margin-bottom: 16px;
  letter-spacing: 0.03em;
}
.qr-box {
  width: 200px; height: 200px; margin: 0 auto;
  border-radius: 12px; overflow: hidden;
  border: 3px solid var(--border-gold-bright);
  box-shadow: 0 0 32px rgba(212,168,67,0.15), 0 8px 32px rgba(0,0,0,0.08);
  background: #fff; display: flex; align-items: center; justify-content: center;
}
.qr-box img { width: 100%; height: 100%; object-fit: contain; display: block; }
.qr-placeholder { color: var(--text-dim); font-size: 12px; line-height: 1.6; padding: 20px; text-align: center; }

/* ==== Footer ==== */
.rf { padding: 20px 16px; text-align: center; background: transparent; border-top: 1px solid rgba(0,0,0,.05); }
.rf p { color: var(--text-dim); font-size: 11px; }
.rf strong { color: var(--text-secondary); }

/* ==== Toast ==== */
.toast {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
  background: rgba(45, 38, 24, 0.95); backdrop-filter: blur(20px);
  color: #FFFDF7; padding: 14px 28px; border-radius: 12px; font-size: 14px;
  z-index: 999; pointer-events: none; animation: fadeSlideIn .3s ease;
  white-space: nowrap; border: 1px solid var(--border-gold);
}

/* ==== Print ==== */
@media print {
  #s, #w, .rh, .rf, .qs, .share-btns, #hist { display: none !important; }
  .rb { padding: 0 !important; }
  .sc { display: block !important; min-height: auto !important; }
  body { background: #fff !important; color: #000 !important; max-width: 100% !important; }
  .cs, .header-card { background: #fff !important; border: 1px solid #ddd !important; backdrop-filter: none !important; }
}

/* ================================================
   RESPONSIVE
   ================================================ */
@media (min-width: 768px) {
  body { max-width: var(--desktop-max); padding: 0 24px; }
  #w { padding: 80px 60px; }
  #w h1 { font-size: 36px; }
  #s .qa { padding: 40px 36px; border-radius: var(--radius-lg); }
  .og { grid-template-columns: 1fr 1fr; }
  .nr { max-width: 520px; margin: 28px auto 0; }
  .rb { padding: 28px; max-width: 820px; margin: 0 auto; }
  .report-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
  .report-grid .cs { margin-bottom: 0; }
  .report-grid .full-width { grid-column: 1 / -1; }
  .bar-label { width: 80px; }
  .ag { grid-template-columns: 1fr 1fr; }
  .inamori-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
}

@media (min-width: 1024px) {
  body { max-width: var(--large-max); }
  .ag { grid-template-columns: 1fr 1fr 1fr; }
  .inamori-grid { grid-template-columns: 1fr 1fr 1fr; }
  .og { grid-template-columns: 1fr 1fr 1fr; }
  .header-card { padding: 36px 32px; }
  .header-card .company { font-size: 24px; }
}
