/* RAD•IA•L / Crésus Phase 2D – visual skin only.
   The Phase 2C grid, engine, storage keys and OCR contract are unchanged.
   Gold is structural; blue is reserved for OCR and automated readings. */
:root, body {
  color-scheme: light;
  --felt: #f8f5f0;
  --felt2: #f3eee6;
  --bg: #f8f5f0;
  --card: #fffdf9;
  --card2: #fffaf3;
  --ivory: #202632;
  --ivory-2: #3d424b;
  --gold: #b58a4c;
  --gold-2: #97723f;
  --gold-dim: #d8bf91;
  --gold-soft: #bc965316;
  --sage: #6e6660;
  --sage-dim: #777169;
  --line: #e7ded1;
  --line-soft: #a78b5b19;
  --on-accent: #fff;
  --win: #16855f;
  --lose: #c63a42;
  --nm-rn-a: #bd3437;
  --shadow-card: 0 4px 16px #3b30250a;
  --scrim: #29251f80;
  font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
html { background:#f8f5f0; }
body {
  background:linear-gradient(145deg,#fcfaf6 0%,#f7f3ec 46%,#f5f2ee 100%)!important;
  color:#222a34!important;
}
body>header {border-bottom:1px solid #d8bd8b55!important;margin-bottom:3px!important;}
body>header .bname {color:#212b39!important;letter-spacing:-.045em!important;font-weight:800!important;}
body>header .bname .c {color:#b58a4c!important;}
body>header .tag {color:#8c795d!important;letter-spacing:.17em;}
body>header .montbadge {color:#8a724d!important;background:#fff7e9!important;border-color:#e3d5bc!important;}
#dashboard {gap:9px;}
#dashboard>.panel {
  background:linear-gradient(145deg,#fffefd,#fffaf4)!important;
  border:1px solid #e8dfd2!important;
  border-radius:15px!important;
  box-shadow:0 3px 11px #4033260b,0 1px 2px #40332608!important;
}
#dashboard h2 {
  color:#6d5940!important;
  letter-spacing:.065em!important;
  font-weight:800!important;
}
#dashboard .sub, #dashboard .history-hint {color:#7a766f;}
#dashboard .headrow {min-height:19px;}
#dashboard .plain {background:#fffaf4;border:1px solid #e1d7c8;color:#51483a;transition:background .15s,border-color .15s;}
#dashboard .plain:hover {background:#f5ebdc;border-color:#bfa576;}
#dashboard button:focus-visible, .radial-secondary button:focus-visible {outline:3px solid #20aeea;outline-offset:2px;}
/* OCR uses the only electric-blue emphasis. */
#dashboard #detectBar {
  background:linear-gradient(105deg,#f9fcff 0%,#f0f8ff 52%,#fffdf9 100%)!important;
  border:1px solid #cfdfea!important;
  box-shadow:0 4px 16px #248ec612!important;
}
#detectState {color:#214a69!important;font-weight:750;}
#detectBar[data-state=active] #detectState:before {color:#119b70;}
#detectBar[data-state=verify] #detectState:before {color:#d6a241;}
#detectMeta {color:#52718a!important;}
#detectSetup {background:#e8f5fe!important;border-color:#a5d8fb!important;color:#0870ab!important;font-weight:750!important;}
#detectSetup:hover {background:#d4ecfc!important;}
#detectPause:not(:disabled) {background:#eef8ff!important;border-color:#badceb!important;color:#006ca2!important;}
#detectOff:not(:disabled) {border-color:#e4d7ce!important;}
/* History retains 12 compact equally-sized spaces. */
#recentNumbers .ball {box-shadow:0 1px 2px #0a111522;}
#recentNumbers .ball:first-child {outline:2px solid #c79b5d;outline-offset:1px;box-shadow:0 2px 7px #b58a4c3b;}
#recentNumbers .ball.placeholder {background:#f0eee9!important;color:#9c968d;box-shadow:inset 0 0 0 1px #ebe4dc;}
.ball.red, .freq.red {background-color:#be393e!important;}
.ball.black, .freq.black {background-color:#262c33!important;}
.ball.green, .freq.green {background-color:#137d5d!important;}
/* Session cards: purposeful and restrained hierarchy. */
#sessionMetrics .metric label {color:#847666!important;letter-spacing:.012em;}
#sessionMetrics .metric b {font-weight:750!important;color:#233040;}
#sessionMetrics .metric b.positive {color:#178458!important;}
#sessionMetrics .metric b.negative {color:#c63a42!important;}
#sessionFoot {border-color:#efe6d7!important;color:#83786b!important;}
/* Recommendation: highly visible side and stake, no invented prediction. */
#dashboard .dashboard-recommend {border-color:#d9c6a7!important;background:linear-gradient(145deg,#fffdfa,#fff4e3)!important;}
#recommendations .recommend {
  background:linear-gradient(130deg,#fcfaf6,#f8f1e8)!important;
  border:1px solid #e6d8c4!important;
  border-left:3px solid #c19b61!important;
}
#recommendations .recommend strong {color:#1a2431!important;letter-spacing:-.035em;}
#recommendations .recommend strong.red {color:#bc363d!important;}
#recommendations .recommend .stake {
  color:#9c7034!important;font-weight:800!important;
  font-variant-numeric:tabular-nums;
}
#recommendations .recommend small {color:#786b5e!important;}
#recommendations .recommend.waiting {background:linear-gradient(135deg,#fffaf2,#f4eee5)!important;}
#recommendations .recommend.waiting strong {color:#69717a!important;}
/* Curve fills the available card height – viewBox is recomputed in split-view.js. */
#dashboard .dashboard-curve {
  display:grid;
  grid-template-rows:auto minmax(0,1fr);
  min-height:267px;
}
#dashboard .dashboard-curve .headrow {align-self:start;}
#curveValue {color:#a57b3c!important;font-weight:850!important;}
#sessionCurve {height:100%;min-height:220px;width:100%;min-width:0;overflow:hidden;}
#sessionCurve svg {height:100%!important;min-height:220px;width:100%!important;overflow:hidden!important;display:block;}
#sessionCurve text {fill:#817b72!important;font:11px Inter,-apple-system,system-ui,sans-serif!important;}
#sessionCurve .line {stroke:url(#curveStroke)!important;stroke-width:3!important;}
/* Original strategy counters, but with a more finished visual identity. */
#dashboard .dashboard-strategies {background:linear-gradient(150deg,#fffefc,#fff9f1)!important;}
#dashboard #mini .mcell {
  background:#fffefa!important;
  border:1px solid #e7dbcb!important;
  color:#25303b!important;
  box-shadow:0 1px 4px #3a2c1a0b;
}
#dashboard #mini .mcell:nth-child(1) {border-left:3px solid #c34449!important;}
#dashboard #mini .mcell:nth-child(2) {border-left:3px solid #c5a269!important;}
#dashboard #mini .mcell:nth-child(3) {border-left:3px solid #8e77b3!important;}
#dashboard #mini .mcell.play {border-color:#c7a15d!important;background:#fffaec!important;}
#dashboard #mini .mname {font-weight:750!important;}
#dashboard #mini .mscore {color:#252c35!important;font-variant-numeric:tabular-nums;}
#dashboard #mini .strategy-extra {color:#6b665f!important;border-left-color:#eadfd0!important;}
#dashboard #mini .strategy-extra div:first-child {color:#856036!important;}
#dashboard #mini .strategy-extra b {color:#42372a!important;}
/* The frequency board doubles as the manual emergency entry. */
#dashboard .dashboard-frequency {background:linear-gradient(135deg,#fffdf9,#fff9f1)!important;}
#frequencyGrid .freq {border:1px solid #ffffff77!important;box-shadow:inset 0 -2px 0 #00000012,0 1px 2px #0b0c0d12!important;font-weight:750!important;}
#frequencyGrid .freq small {font-weight:500!important;}
#frequencyGrid .freq:active {filter:brightness(.87);}
#freqPeriod {background:#fffdfa!important;border-color:#e3d8c8!important;color:#675a48!important;}
#manualActions .plain {color:#76644d!important;}
/* Auxiliary dialogs adopt the same light premium palette. */
.radial-secondary {background:#f9f6f1!important;color:#272b33!important;border-color:#dfd1ba!important;}
.radial-secondary .secondary-tabs button {border-color:#e1d5c4!important;background:#fffcf7!important;color:#554c40!important;}
.radial-secondary .secondary-tabs button.selected {background:#f3e7d3!important;border-color:#c7a469!important;color:#604521!important;}
.radial-secondary .secondary-header button {border-color:#e2d6c4!important;background:#fffaf4!important;color:#5b4b35!important;}
body>footer {color:#968c80!important;}
/* Only reduce the chart's minimum at narrow stacked layouts. */
@media(max-width:590px){#sessionCurve{min-height:190px}#sessionCurve svg{min-height:190px}#dashboard .dashboard-curve{min-height:233px}}
@media(prefers-reduced-motion:reduce){#sessionCurve .line{transition:none!important}}
