@font-face { font-family: "Space Grotesk"; src: url("./fonts/SpaceGrotesk-Variable.woff2") format("woff2"); font-style: normal; font-weight: 300 700; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("./fonts/Manrope-Variable.ttf") format("truetype"); font-style: normal; font-weight: 200 800; font-display: swap; }

/* Scoped to the browser workspace; the Game Bar keeps its own layout. */
.reader-workspace {
  --bg: #17191c; --panel: #222529; --panel-strong: #2b2e33; --text: #f1f0eb;
  --muted: #a4a8b0; --line: #36393e; --accent: #ff815d; --paper: #edece4;
  --ink: #242629; --gold: #eed09a; --gold-deep: #ab8242; --emerald: #7bceb3;
  --roulette-red: #ad3d4e; --roulette-black: #343841; --shadow: 0 16px 40px #00000018;
  margin: 0; padding: 0; color: var(--text); color-scheme: dark;
  background: radial-gradient(ellipse at 38% -20%, #62627035, transparent 55%), radial-gradient(ellipse at 100% 50%, #653d2d17, transparent 50%), var(--bg);
  font: 13px/1.5 "Manrope", sans-serif; font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased;
}
.reader-workspace::before { display: none; }
.reader-workspace :is(h1,h2,h3,h4), .reader-workspace .workspace-brand, .reader-workspace .roulette-chip { font-family: "Space Grotesk", sans-serif; letter-spacing: -0.04em; }
.reader-workspace h3 { font-size: 17px; font-weight: 600; }
.reader-workspace h4 { font-size: 15px; }
.reader-workspace :is(button,input,summary,a) { -webkit-tap-highlight-color: transparent; }
.reader-workspace :is(button,a,summary,input):focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.reader-workspace :is(button,input) { touch-action: manipulation; }
.reader-workspace button { cursor: pointer; }
.reader-workspace .skip-link { position: fixed; top: -80px; left: 20px; z-index: 100; padding: 12px; color: var(--ink); background: var(--paper); }
.reader-workspace .skip-link:focus { top: 8px; }
.reader-workspace .eyebrow { color: var(--muted); font-size: 8px; letter-spacing: 0.15em; font-weight: 600; margin: 0 0 7px; }

/* Brand and workspace navigation. */
.reader-workspace .workspace-header { height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 28px; border-bottom: 1px solid #ffffff10; background: #17191ceb; position: sticky; top: 0; z-index: 24; backdrop-filter: blur(18px); }
.reader-workspace .workspace-brand { display: flex; align-items: center; gap: 11px; color: var(--text); text-decoration: none; font-size: 29px; font-weight: 700; line-height: 0.95; }
.reader-workspace .brand-mark { display: grid; place-items: center; width: 39px; height: 43px; background: var(--accent); color: #222327; border-radius: 10px; transform: rotate(-9deg); box-shadow: 3px 3px 0 #ff815d26; }
.reader-workspace .brand-mark svg { width: 27px; height: 27px; transform: rotate(9deg); }
.reader-workspace .brand-dot { color: var(--accent); }
.reader-workspace .workspace-brand small { display: block; font: 600 7px "Manrope", sans-serif; letter-spacing: 0.25em; margin-top: 8px; color: var(--muted); }
.reader-workspace .header-desk-label { display: flex; align-items: center; gap: 8px; font-size: 9px; letter-spacing: 0.14em; color: var(--muted); }
.reader-workspace .header-divider { padding: 0 12px; color: #565a63; }
.reader-workspace .workspace-header-right { display: flex; align-items: center; gap: 22px; }
.reader-workspace .connection-state { color: var(--muted); font-size: 10px; }
.reader-workspace .connection-state::before, .reader-workspace .live-dot { content: ""; display: inline-block; width: 5px; height: 5px; background: var(--emerald); border-radius: 50%; margin-right: 6px; box-shadow: 0 0 0 4px #7bceb310; }
.reader-workspace .connection-state.is-local::before { background: var(--accent); }
.reader-workspace .workspace-nav { color: var(--text); text-decoration: none; font-size: 11px; border: 1px solid #ffffff24; border-radius: 30px; padding: 9px 14px; }
.reader-workspace .workspace-nav:hover { background: #ffffff0c; border-color: var(--accent); }
.reader-workspace .workspace-nav span { color: var(--accent); margin-left: 18px; font-size: 15px; }
.reader-workspace .app-shell { display: grid; grid-template-columns: 126px minmax(0, 1fr) 276px; gap: 18px; align-items: start; max-width: 1660px; min-height: calc(100dvh - 70px); margin: auto; padding: 20px 24px; overflow: visible; }
.reader-workspace .main-panel { min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.reader-workspace .workspace-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 62px; }
.reader-workspace .workspace-heading h2 { margin: 0; font-size: clamp(30px, 3vw, 42px); font-weight: 500; line-height: 1; letter-spacing: -0.06em; }
.reader-workspace .workspace-heading h2 > span, .reader-workspace .heading-slash { color: var(--accent); }
.reader-workspace .heading-slash { margin-right: 5px; }
.reader-workspace .last-spin-badge { display: grid; grid-template-columns: auto auto; align-items: center; gap: 1px 10px; font-size: 9px; color: var(--muted); padding-left: 16px; border-left: 1px solid var(--line); }
.reader-workspace .last-spin-badge > span:first-child { grid-column: 1; align-self: end; }
.reader-workspace .last-spin-badge small { grid-column: 1; grid-row: 2; font: 500 14px "Space Grotesk", sans-serif; color: var(--text); align-self: start; }
.reader-workspace .last-spin-badge .roulette-chip { grid-column: 2; grid-row: 1 / span 2; width: 44px; height: 44px; font-size: 22px; border-radius: 50%; box-shadow: 0 0 0 3px var(--bg), 0 0 0 4px var(--line); }
.reader-workspace .session-trail { margin-left: auto; display: flex; align-items: center; gap: 4px; height: 44px; }
.reader-workspace .trail-tick { width: 5px; border-radius: 4px; background: #84abc6; height: 14px; }
.reader-workspace .trail-tick.high { height: 25px; background: #e6b985; }
.reader-workspace .trail-tick.zero { height: 7px; background: var(--emerald); }
.reader-workspace .trail-tick:last-child { outline: 1px solid #ffffff65; outline-offset: 2px; }

.reader-workspace .card, .reader-workspace .hero-card, .reader-workspace .history-panel { border: 1px solid var(--line); background: var(--panel); border-radius: 16px; box-shadow: 0 2px 2px #0000000a, inset 0 1px 0 #ffffff04; backdrop-filter: none; }
.reader-workspace .card { padding: 17px 18px; min-width: 0; }
.reader-workspace .card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 14px; }
.reader-workspace .card-head h3 { margin: 0; display: flex; align-items: center; gap: 7px; }
.reader-workspace .card-head > p { display: none; }
.reader-workspace .module-icon { display: inline-grid; place-items: center; font: 400 20px "Space Grotesk", sans-serif; color: var(--accent); }
.reader-workspace .section-index { color: #9da1a8; font-size: 8px; letter-spacing: 0.1em; white-space: nowrap; }
.reader-workspace .section-index strong { color: var(--text); font: 600 13px "Space Grotesk", sans-serif; margin-left: 3px; }

/* Observed proportions, not model confidence. */
.reader-workspace .hero-card { display: flex; flex-direction: row; align-items: center; flex-wrap: wrap; position: sticky; top: 80px; z-index: 18; gap: 9px; padding: 13px 14px 15px; background: #25282dea; backdrop-filter: blur(18px); overflow: hidden; border-radius: 13px; }
.reader-workspace .stats-caption { color: #c8cbd0; font-size: 8px; letter-spacing: 0.14em; border-right: 1px solid #ffffff20; padding-right: 11px; }
.reader-workspace .hot-strip { display: flex; flex: 1; min-width: 0; gap: 5px; flex-wrap: wrap; margin: 0; }
.reader-workspace .hot-token { display: flex; flex: 0 0 auto; align-items: center; justify-content: center; min-width: 0; width: auto; min-height: 0; height: 30px; gap: 4px; padding: 0 7px; border-radius: 7px; border: 1px solid #ffffff20; box-shadow: inset 0 1px 0 #ffffff15; }
.reader-workspace .hot-token.red { background: #ad3d4e; }
.reader-workspace .hot-token.black { background: #383c44; }
.reader-workspace .hot-token.green { background: #226d56; }
.reader-workspace .hot-token strong { font: 600 16px "Space Grotesk", sans-serif; color: white; }
.reader-workspace .hot-token span { color: #ffffffb8; font-size: 9px; font-weight: 600; }
.reader-workspace .hot-token small { display: none; }
.reader-workspace .hot-strip.empty-state, .reader-workspace .live-breakdown.empty-state { padding: 0; font-size: 10px; border: 0; background: none; }
.reader-workspace .live-breakdown { display: flex; flex: 0 1 auto; flex-basis: auto; gap: 13px; margin: 0; }
.reader-workspace .live-breakdown-card { display: flex; align-items: baseline; min-width: 0; padding: 0; border: 0; background: none; gap: 5px; }
.reader-workspace .live-breakdown-card span { font-size: 9px; color: #b0b5bd; letter-spacing: 0; white-space: nowrap; }
.reader-workspace .live-breakdown-card strong { font: 500 18px "Space Grotesk", sans-serif; letter-spacing: -0.06em; }
.reader-workspace .live-breakdown-card.low strong { color: #a7cce6; }
.reader-workspace .live-breakdown-card.high strong { color: #e6be91; }
.reader-workspace .live-breakdown-card.zero strong { color: #87d4b7; }
.reader-workspace .live-breakdown-card small { display: none; }
.reader-workspace .session-balance { display: flex; height: 3px; position: absolute; bottom: 0; left: 0; right: 0; gap: 2px; }
.reader-workspace .balance-low { background: #8eacc3; }
.reader-workspace .balance-high { background: #d5a677; }
.reader-workspace .balance-zero { background: #7bceb3; }

.reader-workspace .live-workspace { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 14px; align-items: stretch; }
.reader-workspace .consigne-card { background: radial-gradient(ellipse at 105% -20%, #ffcaaa90, transparent 60%), var(--paper); color: var(--ink); border-color: #f4f2e9; box-shadow: 0 10px 40px #00000018; position: relative; }
.reader-workspace .consigne-card .module-icon { color: #c45837; }
.reader-workspace .consigne-card .section-index { color: #727572; }
.reader-workspace .consigne-card :is(button,a,summary):focus-visible { outline-color: #aa452a; }
.reader-workspace .decision-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.reader-workspace .decision-kicker { font-size: 8px; color: #727570; letter-spacing: 0.13em; }
.reader-workspace .decision-action { margin: 1px 0 0; font-size: clamp(29px, 3.1vw, 46px); font-weight: 500; line-height: 1.04; color: var(--ink); letter-spacing: -0.06em; overflow-wrap: anywhere; }
.reader-workspace .decision-action.confirmed { color: #25624f; }
.reader-workspace .decision-status { font-size: 9px; color: #646960; max-width: 72px; text-align: right; display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.reader-workspace .signal-glyph { width: 23px; height: 23px; border: 1px solid #8f9b8e; border-radius: 50%; position: relative; }
.reader-workspace .signal-glyph::before, .reader-workspace .signal-glyph::after { content: ""; position: absolute; background: #6e7f6b; inset: 10px 5px; }
.reader-workspace .signal-glyph::after { inset: 5px 10px; }
.reader-workspace .decision-leader { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.reader-workspace .decision-leader > span:first-child { font-size: 8px; color: #62665f; }
.reader-workspace .roulette-chip { display: inline-flex; justify-content: center; align-items: center; flex-shrink: 0; width: 38px; height: 38px; border-radius: 9px; border: 1px solid #ffffff25; color: white; font-size: 19px; font-weight: 600; line-height: 1; box-shadow: inset 0 1px 0 #ffffff10, 0 2px 2px #00000012; }
.reader-workspace .roulette-chip.red { background: #ad3d4e; }
.reader-workspace .roulette-chip.black { background: #343841; }
.reader-workspace .roulette-chip.green { background: #226d56; }
.reader-workspace .decision-targets { margin-top: 17px; display: flex; flex-direction: column; gap: 7px; }
.reader-workspace .decision-targets > span { font-size: 9px; font-weight: 600; color: #646961; }
.reader-workspace .decision-targets > div { display: flex; flex-wrap: wrap; gap: 5px; }
.reader-workspace .decision-targets .zone-chip { border: 1px solid #8d9a8c; border-radius: 7px; color: #2c4738; background: #dce4d7; padding: 6px 9px; font: 600 17px "Space Grotesk", sans-serif; }
.reader-workspace .waiting-mark { color: #727b6d; font: 500 22px "Space Grotesk", sans-serif; letter-spacing: 0.04em; }
.reader-workspace .decision-reason { color: #5b625a; font-size: 10px; line-height: 1.6; margin: 12px 0 0; }
.reader-workspace .decision-strategy { display: flex; flex-wrap: wrap; gap: 3px 8px; margin-top: 9px; padding-top: 7px; border-top: 1px solid #2f38201c; font-size: 9px; color: #5b625a; }
.reader-workspace .decision-strategy strong { color: #30392f; font-weight: 700; }
.reader-workspace .engine-predictions .roulette-chip { width: 42px; height: 42px; font-size: 22px; }
.reader-workspace .decision-targets .waiting-mark { font-size: 14px; letter-spacing: 0; }
.reader-workspace .workspace-disclosure { margin-top: 11px; border-top: 1px solid #ffffff0e; padding-top: 7px; }
.reader-workspace .workspace-disclosure > summary { font-size: 10px; color: #aeb4bd; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 10px; min-height: 26px; align-items: center; }
.reader-workspace .workspace-disclosure > summary::-webkit-details-marker { display: none; }
.reader-workspace .workspace-disclosure > summary::after { content: "+"; display: grid; place-items: center; border: 1px solid #ffffff20; width: 21px; height: 21px; border-radius: 50%; color: var(--text); font: 400 15px "Space Grotesk", sans-serif; flex-shrink: 0; }
.reader-workspace .workspace-disclosure[open] > summary::after { content: "\2212"; }
.reader-workspace .consigne-card .workspace-disclosure { border-color: #2f38201c; }
.reader-workspace .consigne-card .workspace-disclosure > summary { color: #535a50; }
.reader-workspace .consigne-card .workspace-disclosure > summary::after { color: #414a3d; border-color: #2f382035; }
.reader-workspace .consigne-card .workspace-disclosure[open] { background: #24282c; border-radius: 10px; padding: 10px; color: var(--text); --muted: #b2b8bd; }
.reader-workspace .consigne-card .workspace-disclosure[open] > summary { color: var(--text); }
.reader-workspace .consigne-card .workspace-disclosure[open] > summary::after { color: var(--text); border-color: #ffffff35; }
.reader-workspace .workspace-disclosure .leader-callout, .reader-workspace .workspace-disclosure .recommendation-card { padding: 12px 0; background: none; border: 0; box-shadow: none; }
.reader-workspace .workspace-disclosure .leader-note { font-size: 11px; }
.reader-workspace .workspace-disclosure .agent-reading { padding: 10px 0 0; margin: 0; border: 0; background: none; }
.reader-workspace .workspace-disclosure .signal-pill { font-size: 9px; padding: 4px 6px; }
.reader-workspace .companions-card { background: linear-gradient(120deg, #292d32, #222529); }
.reader-workspace .companions-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
.reader-workspace .mini-label { display: flex; align-items: center; gap: 6px; color: #b4b9c1; font-size: 9px; letter-spacing: 0.1em; margin: 0 0 8px; }
.reader-workspace .mini-label span { color: var(--accent); }
.reader-workspace .companions-grid .token-wrap { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 5px; }
.reader-workspace .context-token { width: auto; min-width: 0; border-radius: 9px; padding: 9px 0 7px; display: flex; flex-direction: column; justify-content: center; gap: 6px; background: #ffffff05; border: 1px solid #ffffff10; box-shadow: inset 0 1px 0 #ffffff04; }
.reader-workspace .context-token:first-child { border-color: #ff815d66; background: #ff815d0c; }
.reader-workspace .context-token strong { font: 600 19px "Space Grotesk", sans-serif; line-height: 1; }
.reader-workspace .context-token.red strong { color: #ffabb6; }
.reader-workspace .context-token.black strong { color: #e2e6ec; }
.reader-workspace .context-token.green strong { color: #8bdbba; }
.reader-workspace .context-token span { font-size: 8px; color: #a2aab6; }
.reader-workspace .token-wrap.empty-state { display: block; font-size: 11px; padding: 8px 0; }
.reader-workspace .watch-heading, .reader-workspace .watch-row { display: grid; grid-template-columns: minmax(0, 1fr) 45px 64px; align-items: center; gap: 7px; }
.reader-workspace .watch-heading { color: var(--muted); font-size: 8px; padding-bottom: 5px; }
.reader-workspace .watch-heading > :nth-child(n+2), .reader-workspace .watch-row > :nth-child(n+2) { text-align: right; }
.reader-workspace .watch-row { padding: 7px 0; border-top: 1px solid #ffffff0a; font-size: 11px; }
.reader-workspace .watch-identity { display: flex; align-items: center; gap: 8px; min-width: 0; }
.reader-workspace .watch-identity > div { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.reader-workspace .watch-row .roulette-chip { width: 31px; height: 31px; font-size: 15px; border-radius: 7px; }
.reader-workspace .watch-identity strong { color: #d3d8df; font-size: 10px; line-height: 1; }
.reader-workspace .return-track { display: flex; align-items: center; gap: 3px; height: 5px; }
.reader-workspace .return-track i { width: 3px; height: 3px; background: #50545c; border-radius: 2px; }
.reader-workspace .return-track i.hit { height: 6px; background: var(--accent); }
.reader-workspace .watch-row > span { color: var(--muted); }
.reader-workspace .watch-row > strong { color: #e4c198; font: 500 15px "Space Grotesk", sans-serif; }
.reader-workspace .micro-note { color: var(--muted); font-size: 9px; line-height: 1.5; margin: 8px 0 0; }
.reader-workspace .workspace-empty { color: var(--muted); font-size: 11px; margin: 12px 0; line-height: 1.7; }
.reader-workspace .strategy-card-wrap { background: radial-gradient(ellipse at 100% 0, #c88f5620, transparent 70%), #26272b; }
.reader-workspace .strategy-focus-state { color: #f1bf93; font: 500 28px/1.1 "Space Grotesk", sans-serif; letter-spacing: -0.05em; margin-bottom: 12px; }
.reader-workspace .strategy-focus-state.confirmed { color: var(--emerald); }
.reader-workspace .strategy-focus-targets { display: flex; flex-wrap: wrap; gap: 5px; }
.reader-workspace .strategy-focus-targets span { border: 1px solid #ffffff22; border-radius: 6px; padding: 4px 8px; font: 500 12px "Space Grotesk", sans-serif; color: #e3d0bc; background: #ffffff05; }
.reader-workspace .strategy-card-head { flex-direction: row; }
.reader-workspace .strategy-card-head button { min-height: 30px; padding: 6px 11px; font-size: 10px; border-radius: 20px; border-color: #c5956570; color: #f1bf93; background: #c5956510; }
.reader-workspace .strategy-idle-art { display: flex; align-items: center; gap: 0; margin: 16px 0 12px; }
.reader-workspace .strategy-idle-art span { display: grid; place-items: center; width: 37px; height: 43px; font: 500 13px "Space Grotesk", sans-serif; border: 1px solid #b39a8060; border-radius: 7px; background: #37312e; color: #e4c098; transform: rotate(-10deg); }
.reader-workspace .strategy-idle-art span + span { margin-left: -7px; transform: rotate(8deg); background: #343438; color: #c4c9d4; }
.reader-workspace .strategy-idle-art span + span + span { transform: rotate(22deg); background: #333d39; color: #91c6b0; }
.reader-workspace .session-details { border: 1px solid var(--line); background: #ffffff02; border-radius: 13px; scroll-margin-top: 150px; }
.reader-workspace .session-details > summary { display: flex; align-items: center; gap: 12px; list-style: none; padding: 12px 16px; cursor: pointer; font: 500 14px "Space Grotesk", sans-serif; }
.reader-workspace .session-details > summary::-webkit-details-marker { display: none; }
.reader-workspace .session-details > summary small { display: block; margin-top: 3px; color: var(--muted); font: 400 10px "Manrope", sans-serif; }
.reader-workspace .explore-icon { font-size: 25px; color: #aeb7c8; }
.reader-workspace .details-plus { font-size: 22px; font-weight: 300; color: var(--muted); margin-left: auto; }
.reader-workspace .session-details[open] .details-plus { transform: rotate(45deg); }
.reader-workspace .secondary-grid { display: grid; grid-template-columns: 1fr; gap: 12px; padding: 0 12px 12px; }
.reader-workspace .workspace-footnote { color: #9398a0; text-align: center; font-size: 9px; margin: 0; }

/* Independent history and input rails. */
.reader-workspace .history-panel { position: sticky; top: 90px; display: flex; min-height: 0; height: calc(100dvh - 110px); max-height: none; padding: 14px 10px; background: #1d2023; overflow: hidden; border-color: #30343b; }
.reader-workspace .panel-header h1 { display: flex; align-items: center; justify-content: space-between; margin: 0; font-size: 20px; font-weight: 500; }
.reader-workspace .panel-header .live-dot { margin: 0 3px 0 8px; width: 5px; height: 5px; }
.reader-workspace .history-meta { grid-template-columns: 1fr; margin: 14px 0 10px; gap: 10px; }
.reader-workspace .meta-card { padding: 0; border: 0; border-radius: 0; background: none; }
.reader-workspace .meta-card:first-child { display: flex; align-items: baseline; justify-content: space-between; border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.reader-workspace .meta-card span { font-size: 9px; margin: 0 0 4px; }
.reader-workspace .meta-card strong { font: 500 27px "Space Grotesk", sans-serif; letter-spacing: -0.04em; }
.reader-workspace .regime-chip-button { padding: 7px 5px; font-size: 10px; font-weight: 600; border: 1px solid #ff815d35; color: #e6b49d; background: #ff815d0a; border-radius: 7px; line-height: 1.4; }
.reader-workspace .meta-hint { display: none; }
.reader-workspace .history-actions { display: grid; grid-template-columns: 1fr; gap: 4px; margin: 0 0 10px; }
.reader-workspace .history-actions button { min-height: 31px; padding: 5px; font-size: 9px; border-radius: 7px; }
.reader-workspace .history-actions .ghost-button { color: #e6c6a9; border-color: #e6c6a933; background: #e6c6a909; }
.reader-workspace .history-actions .danger-button { color: #d79aa2; border: 1px solid #d79aa220; background: transparent; }
.reader-workspace .history-list { flex: 1; min-height: 0; gap: 8px; height: auto; overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; scrollbar-color: #424750 transparent; padding: 6px 7px 8px 1px; }
.reader-workspace .history-item { width: fit-content; max-width: 100%; padding: 3px; background: transparent; box-shadow: none; border: 1px solid transparent; border-radius: 8px; flex-shrink: 0; position: relative; }
.reader-workspace .history-item.low { margin: 0 auto 0 0; background: #78b1dd12; border-color: #78b1dd36; }
.reader-workspace .history-item.high { margin: 0 0 0 auto; background: #e6ac7212; border-color: #e6ac7236; }
.reader-workspace .history-item.zero { margin: 0 auto; }
.reader-workspace .history-item.repeated { background: #edc985; border-color: #ffde9f; box-shadow: 0 0 14px #e2c28a25; }
.reader-workspace .history-number { min-width: 31px; width: 31px; height: 31px; padding: 0; border-radius: 5px; font: 600 16px "Space Grotesk", sans-serif; outline: 0; }
.reader-workspace .history-number.red { background: #ad3d4e; }
.reader-workspace .history-number.black { background: #343841; }
.reader-workspace .history-number.green { background: #226d56; }
.reader-workspace .history-number.repeated { background: #edc985; color: #392816; box-shadow: none; }
.reader-workspace .history-flags, .reader-workspace .history-side { display: none; }
.reader-workspace .history-hit-marker { width: 13px; height: 13px; top: -5px; right: -6px; font-size: 9px; background: #ffb18e; box-shadow: 0 0 0 2px #1d2023; }
.reader-workspace .history-main { gap: 0; }
.reader-workspace .keyboard-rail { position: sticky; top: 90px; min-width: 0; }
.reader-workspace .entry-card { display: block; padding: 18px; background: linear-gradient(155deg, #323337, #26282d 65%); border-color: #46474c; box-shadow: 0 15px 45px #00000022, inset 0 1px 0 #ffffff08; }
.reader-workspace .entry-card .card-head h3 { font-size: 22px; gap: 0; }
.reader-workspace .entry-card .eyebrow { color: #b8aaa0; font-size: 7px; }
.reader-workspace .keyboard-symbol { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; border: 1px solid #ffffff1a; font-size: 18px; color: #c8bab0; }
.reader-workspace .keyboard-hint { color: #adb0b8; font-size: 10px; margin: -5px 0 14px; }
.reader-workspace .manual-entry-form { display: flex; gap: 7px; margin: 0 0 16px; }
.reader-workspace .manual-entry-form input { min-width: 0; width: 100%; border: 1px solid #55565e; border-radius: 9px; background: #191c21; padding: 11px; color: var(--text); font-size: 13px; box-shadow: inset 0 2px 4px #0002; }
.reader-workspace .manual-entry-form button { width: 42px; flex-shrink: 0; padding: 0; font-size: 24px; }
.reader-workspace .number-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.reader-workspace .number-chip { min-width: 0; min-height: 38px; padding: 8px 0; border: 1px solid #ffffff17; border-radius: 8px; font: 600 16px "Space Grotesk", sans-serif; box-shadow: inset 0 1px 0 #ffffff16, 0 3px 0 #00000028, 0 4px 7px #00000012; }
.reader-workspace .number-chip:hover { transform: translateY(-2px); filter: brightness(1.15); border-color: #ffffff60; }
.reader-workspace .number-chip:active { transform: translateY(1px); box-shadow: inset 0 1px 4px #0003; }
.reader-workspace .number-chip.red { background: linear-gradient(#a84455, #923b4b); color: #fff2f1; }
.reader-workspace .number-chip.black { background: linear-gradient(#454954, #363b45); color: #eef0f5; }
.reader-workspace .number-chip.zero, .reader-workspace .number-chip.double-zero { background: linear-gradient(#397c69, #2c6151); color: #e6fff2; grid-column: span 3; }
.reader-workspace .keyboard-actions { display: grid; margin: 16px 0 0; }
.reader-workspace .keyboard-actions button { min-height: 36px; padding: 7px; font-size: 11px; background: #ffffff04; }
.reader-workspace .keyboard-footnote, .reader-workspace .rail-note { color: #a7aab1; font-size: 9px; text-align: center; margin: 13px 0 0; }
.reader-workspace .keyboard-footnote span { margin: 0 4px; }
.reader-workspace .rail-note { padding: 0 10px; }
.reader-workspace .primary-button { color: #252426; border: 1px solid #ffb49670; background: var(--accent); border-radius: 9px; box-shadow: none; }
.reader-workspace .ghost-button { border: 1px solid #52555c; background: #32353c; color: #d6d9df; border-radius: 9px; }
.reader-workspace .danger-button { background: #663640; color: #f7dce0; border-radius: 9px; }
.reader-workspace .floating-entry-form, .reader-workspace .mobile-keyboard-toggle, .reader-workspace .mobile-keyboard-sheet { display: none; }
.reader-workspace .overlay { z-index: 70; background: #101115db; backdrop-filter: blur(10px); }
.reader-workspace .overlay-card { background: #24272d; border-color: #51545d; border-radius: 20px; max-height: 90dvh; box-shadow: 0 25px 100px #0008; }
.reader-workspace .overlay-head { flex-direction: row; border-bottom: 1px solid #ffffff10; padding-bottom: 14px; }
.reader-workspace .overlay-head h3 { font-size: 25px; }
.reader-workspace .overlay button { min-height: 36px; }
.reader-workspace #decision-summary { scroll-margin-top: 160px; }

@media (max-width: 1180px) and (min-width: 821px) {
  .reader-workspace .app-shell { grid-template-columns: 100px minmax(0, 1fr) 226px; gap: 12px; padding: 16px; }
  .reader-workspace .card { padding: 13px; }
  .reader-workspace .history-panel { top: 86px; padding: 10px 8px; }
  .reader-workspace .keyboard-rail { top: 86px; }
  .reader-workspace .live-workspace { gap: 10px; }
  .reader-workspace .card-head h3 { font-size: 14px; gap: 5px; }
  .reader-workspace .module-icon { font-size: 16px; }
  .reader-workspace .section-index, .reader-workspace .session-trail, .reader-workspace .header-desk-label { display: none; }
  .reader-workspace .hero-card { gap: 7px; padding: 10px 12px 12px; }
  .reader-workspace .live-breakdown { gap: 8px; }
  .reader-workspace .live-breakdown-card strong { font-size: 14px; }
  .reader-workspace .stats-caption { display: none; }
  .reader-workspace .decision-status .signal-glyph { display: none; }
  .reader-workspace .number-grid { gap: 5px; }
  .reader-workspace .number-chip { min-height: 34px; font-size: 14px; }
  .reader-workspace .watch-heading, .reader-workspace .watch-row { grid-template-columns: minmax(0, 1fr) 30px 50px; gap: 4px; }
  .reader-workspace .return-track { gap: 2px; }
  .reader-workspace .return-track i { width: 2px; }
  .reader-workspace .context-token strong { font-size: 16px; }
  .reader-workspace .context-token span { font-size: 7px; }
  .reader-workspace .entry-card .card-head h3 { font-size: 19px; }
  .reader-workspace .keyboard-symbol { display: none; }
  .reader-workspace .decision-action { font-size: 32px; }
}
@media (max-height: 800px) and (min-width: 821px) {
  .reader-workspace .workspace-header { height: 58px; }
  .reader-workspace .app-shell { padding-top: 14px; min-height: calc(100dvh - 58px); }
  .reader-workspace .workspace-heading { min-height: 47px; }
  .reader-workspace .workspace-heading h2 { font-size: 32px; }
  .reader-workspace .workspace-heading .eyebrow { margin-bottom: 5px; font-size: 7px; }
  .reader-workspace .history-panel, .reader-workspace .keyboard-rail { top: 72px; }
  .reader-workspace .history-panel { height: calc(100dvh - 90px); }
  .reader-workspace .hero-card { top: 66px; padding-top: 9px; padding-bottom: 11px; }
  .reader-workspace .main-panel { gap: 11px; }
  .reader-workspace .card { padding-top: 14px; padding-bottom: 12px; }
  .reader-workspace .card-head { margin-bottom: 10px; }
  .reader-workspace .decision-kicker { display: none; }
  .reader-workspace .decision-action { font-size: 28px; }
  .reader-workspace .decision-targets { flex-direction: row; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px; margin-top: 13px; }
  .reader-workspace .watch-row { padding-top: 3px; padding-bottom: 3px; }
  .reader-workspace .watch-row .roulette-chip { width: 28px; height: 28px; }
  .reader-workspace .context-token { padding-top: 8px; padding-bottom: 6px; }
  .reader-workspace .companions-grid { gap: 12px; }
  .reader-workspace .workspace-disclosure { margin-top: 8px; padding-top: 6px; }
}
@media (max-width: 820px) {
  .reader-workspace { padding: 0; min-height: 100dvh; overflow-x: clip; }
  .reader-workspace.mobile-keyboard-open { overflow-y: auto; overflow-x: clip; padding-bottom: 350px; }
  .reader-workspace .workspace-header { height: 54px; padding: 0 12px; gap: 10px; }
  .reader-workspace .workspace-brand { font-size: 24px; gap: 9px; }
  .reader-workspace .brand-mark { width: 28px; height: 31px; border-radius: 7px; }
  .reader-workspace .brand-mark svg { width: 21px; height: 21px; }
  .reader-workspace .workspace-brand small, .reader-workspace .header-desk-label { display: none; }
  .reader-workspace .workspace-header-right { gap: 10px; }
  .reader-workspace .workspace-nav { font-size: 10px; padding: 5px 9px; }
  .reader-workspace .workspace-nav span { margin-left: 5px; font-size: 12px; }
  .reader-workspace .connection-state { font-size: 8px; }
  .reader-workspace .app-shell { grid-template-columns: 62px minmax(0, 1fr); gap: 9px; padding: 12px 10px calc(80px + env(safe-area-inset-bottom)); min-height: calc(100dvh - 54px); overflow: visible; }
  .reader-workspace .keyboard-rail { display: none; }
  .reader-workspace .history-panel { position: static; height: auto; max-height: none; min-height: 0; padding: 9px 5px; overflow: visible; border-radius: 12px; }
  .reader-workspace .history-list { height: auto; max-height: none; overflow: visible; padding: 4px 0; gap: 7px; scrollbar-width: none; }
  .reader-workspace .panel-header h1 { font-size: 15px; white-space: nowrap; }
  .reader-workspace .panel-header .live-dot { width: 4px; height: 4px; margin: 0; box-shadow: none; }
  .reader-workspace .history-panel .eyebrow, .reader-workspace .history-panel .desktop-label { display: none; }
  .reader-workspace .history-meta { margin: 10px 0; gap: 7px; }
  .reader-workspace .meta-card:first-child { display: block; padding-bottom: 4px; }
  .reader-workspace .meta-card strong { font-size: 26px; }
  .reader-workspace .meta-card span { font-size: 8px; }
  .reader-workspace .regime-chip-button { padding: 5px 2px; font-size: 8px; overflow-wrap: anywhere; line-height: 1.4; }
  .reader-workspace .history-actions { margin-bottom: 8px; }
  .reader-workspace .history-actions button { min-height: 29px; padding: 4px 1px; font-size: 8px; }
  .reader-workspace .history-number { min-width: 27px; width: 27px; height: 29px; font-size: 14px; }
  .reader-workspace .history-item { padding: 2px; }
  .reader-workspace .main-panel { gap: 9px; }
  .reader-workspace .workspace-heading { min-height: 44px; gap: 8px; }
  .reader-workspace .workspace-heading .eyebrow, .reader-workspace .session-trail { display: none; }
  .reader-workspace .workspace-heading h2 { font-size: 31px; }
  .reader-workspace .last-spin-badge { padding-left: 9px; gap: 4px; font-size: 8px; }
  .reader-workspace .last-spin-badge small { display: none; }
  .reader-workspace .last-spin-badge > span:first-child { grid-row: 1; align-self: center; }
  .reader-workspace .last-spin-badge .roulette-chip { width: 29px; height: 29px; font-size: 15px; }
  .reader-workspace .hero-card { top: 60px; display: grid; grid-template-columns: 1fr; gap: 7px; padding: 8px 9px 11px; border-radius: 11px; }
  .reader-workspace .stats-caption { display: none; }
  .reader-workspace .hot-strip { width: 100%; gap: 4px; flex-wrap: wrap; }
  .reader-workspace .hot-token { height: 25px; padding: 0 6px; gap: 4px; border-radius: 5px; }
  .reader-workspace .hot-token strong { font-size: 14px; }
  .reader-workspace .hot-token span { font-size: 8px; }
  .reader-workspace .live-breakdown { display: flex; width: 100%; justify-content: space-between; gap: 4px; }
  .reader-workspace .live-breakdown-card { gap: 3px; }
  .reader-workspace .live-breakdown-card span { font-size: 8px; }
  .reader-workspace .live-breakdown-card strong { font-size: 14px; }
  .reader-workspace .live-workspace { display: flex; flex-direction: column; gap: 9px; }
  .reader-workspace .live-workspace > .card { width: 100%; order: initial; padding: 12px; border-radius: 13px; }
  .reader-workspace .card-head { margin-bottom: 9px; gap: 5px; }
  .reader-workspace .card-head h3 { font-size: 15px; gap: 5px; }
  .reader-workspace .module-icon { font-size: 17px; }
  .reader-workspace .section-index { font-size: 7px; }
  .reader-workspace .consigne-card .section-index { display: none; }
  .reader-workspace .decision-action { font-size: 27px; }
  .reader-workspace .decision-leader { flex-direction: row; gap: 5px; }
  .reader-workspace .decision-leader > span:first-child { max-width: 38px; font-size: 7px; line-height: 1.3; }
  .reader-workspace .decision-leader .roulette-chip { width: 30px; height: 30px; font-size: 15px; }
  .reader-workspace .decision-kicker { display: none; }
  .reader-workspace .decision-status { font-size: 8px; max-width: 58px; }
  .reader-workspace .decision-status .signal-glyph { display: none; }
  .reader-workspace .decision-targets { margin-top: 10px; gap: 6px; flex-direction: row; justify-content: space-between; align-items: center; flex-wrap: wrap; }
  .reader-workspace .decision-targets .roulette-chip { width: 31px; height: 31px; font-size: 16px; }
  .reader-workspace .decision-reason { margin-top: 8px; font-size: 9px; line-height: 1.5; }
  .reader-workspace .workspace-disclosure { margin-top: 8px; padding-top: 5px; }
  .reader-workspace .workspace-disclosure > summary { font-size: 9px; min-height: 24px; }
  .reader-workspace .workspace-disclosure > summary::after { width: 19px; height: 19px; }
  .reader-workspace .companions-grid { gap: 9px; }
  .reader-workspace .companions-grid > div { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 4px; align-items: center; }
  .reader-workspace .mini-label { font-size: 8px; letter-spacing: 0; margin: 0; }
  .reader-workspace .mini-label span { display: none; }
  .reader-workspace .companions-grid .token-wrap { gap: 4px; }
  .reader-workspace .context-token { padding: 7px 0 5px; border-radius: 6px; gap: 4px; }
  .reader-workspace .context-token strong { font-size: 14px; }
  .reader-workspace .context-token span { font-size: 7px; }
  .reader-workspace .watch-row { padding: 3px 0; }
  .reader-workspace .watch-row .roulette-chip { width: 28px; height: 28px; }
  .reader-workspace .watch-heading, .reader-workspace .watch-row { grid-template-columns: minmax(0, 1fr) 38px 56px; gap: 4px; }
  .reader-workspace .return-track { gap: 2px; }
  .reader-workspace .return-track i { width: 2px; }
  .reader-workspace .strategy-focus-state { font-size: 25px; margin-bottom: 10px; }
  .reader-workspace .session-details > summary { padding: 11px; gap: 8px; font-size: 12px; }
  .reader-workspace .session-details > summary small { font-size: 9px; }
  .reader-workspace .secondary-grid { padding: 0 5px 5px; }
  .reader-workspace .secondary-grid .card { padding: 10px; }
  .reader-workspace .overlay { padding: 10px; }
  .reader-workspace .overlay-card { padding: 16px; }
  .reader-workspace .overlay-head h3 { font-size: 21px; }
  .reader-workspace .floating-entry-form { display: flex; z-index: 50; left: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); width: 145px; height: 49px; padding: 5px; gap: 4px; border: 1px solid #666168; border-radius: 13px; background: #292b31f5; box-shadow: 0 4px 24px #0007; }
  .reader-workspace .floating-entry-form input { padding: 6px; font-size: 16px; background: #1a1c21; color: white; border-radius: 8px; }
  .reader-workspace .floating-entry-button { flex-basis: 33px; font-size: 22px; background: var(--accent); color: #242426; border-radius: 8px; }
  .reader-workspace .mobile-keyboard-toggle { display: flex; position: fixed; z-index: 50; left: 162px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); height: 49px; min-width: 0; border-radius: 13px; padding: 8px 12px; gap: 5px; background: var(--accent); color: #242426; border-color: #ffb69c; box-shadow: 0 4px 24px #0007; }
  .reader-workspace .mobile-keyboard-toggle span { font-size: 11px; font-weight: 800; }
  .reader-workspace .mobile-keyboard-toggle strong { font-size: 8px; font-weight: 600; }
  .reader-workspace.mobile-keyboard-open .floating-entry-form { display: none; }
  .reader-workspace.mobile-keyboard-open .consigne-card .workspace-disclosure:not([open]) { display: none; }
  .reader-workspace.mobile-keyboard-open .workspace-heading { min-height: 32px; }
  .reader-workspace.mobile-keyboard-open .workspace-heading h2 { font-size: 28px; }
  .reader-workspace.mobile-keyboard-open .main-panel { gap: 6px; }
  .reader-workspace.mobile-keyboard-open .hero-card { padding-top: 6px; padding-bottom: 8px; gap: 5px; }
  .reader-workspace.mobile-keyboard-open .live-workspace > .card { padding-top: 10px; padding-bottom: 10px; }
  .reader-workspace.mobile-keyboard-open .context-token { padding-top: 6px; padding-bottom: 4px; }
  .reader-workspace .mobile-keyboard-sheet { display: flex; position: fixed; inset: auto 0 0; z-index: 55; padding: 0; background: none; }
  .reader-workspace .mobile-keyboard-sheet:not(.open) { visibility: hidden; }
  .reader-workspace .mobile-keyboard-card { width: 100%; margin: 0; border-radius: 22px 22px 0 0; border: 1px solid #66636c; padding: 14px 12px calc(12px + env(safe-area-inset-bottom)); background: #2b2c32fa; box-shadow: 0 -12px 50px #0007; backdrop-filter: blur(18px); }
  .reader-workspace .mobile-keyboard-head { display: flex; flex-direction: row; margin: 0 0 11px; align-items: center; justify-content: space-between; gap: 6px; }
  .reader-workspace .keyboard-watch { display: flex; align-items: center; gap: 4px; }
  .reader-workspace .keyboard-watch > span:first-child { color: var(--muted); font-size: 8px; margin-right: 2px; }
  .reader-workspace .keyboard-watch .roulette-chip { width: 24px; height: 24px; font-size: 12px; border-radius: 6px; }
  .reader-workspace .mobile-keyboard-head h3 { font-size: 16px; margin: 0; }
  .reader-workspace .mobile-keyboard-head .eyebrow { display: none; }
  .reader-workspace .mobile-number-grid { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 5px; }
  .reader-workspace .mobile-number-grid .number-chip { min-height: 36px; padding: 6px 0; font-size: 16px; border-radius: 7px; }
  .reader-workspace .mobile-number-grid .zero, .reader-workspace .mobile-number-grid .double-zero { grid-column: span 1; }
  .reader-workspace .mobile-keyboard-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 11px; }
  .reader-workspace .mobile-keyboard-actions button { min-height: 38px; padding: 6px; font-size: 11px; border-radius: 9px; }
  .reader-workspace .mobile-close-button { border: 1px solid #ffb69c; background: var(--accent); color: #242426; }
}
@media (max-width: 360px) {
  .reader-workspace .app-shell { grid-template-columns: 54px minmax(0, 1fr); padding-left: 6px; padding-right: 6px; gap: 6px; }
  .reader-workspace .live-workspace > .card { padding: 10px; }
  .reader-workspace .section-index, .reader-workspace .last-spin-badge > span:first-child { display: none; }
  .reader-workspace .workspace-heading h2 { font-size: 28px; }
  .reader-workspace .decision-action { font-size: 25px; }
  .reader-workspace .floating-entry-form { width: 124px; }
  .reader-workspace .mobile-keyboard-toggle { left: 140px; }
  .reader-workspace .mobile-keyboard-toggle strong, .reader-workspace .return-track { display: none; }
  .reader-workspace .workspace-header { padding-left: 8px; padding-right: 8px; }
  .reader-workspace .workspace-brand { font-size: 22px; }
}

/* Arrival animation runs only when the actual last-result DOM changes. */
@media (prefers-reduced-motion: no-preference) {
  .reader-workspace .live-workspace > .card { animation: studio-reveal 450ms cubic-bezier(.16,1,.3,1) both; }
  .reader-workspace .live-workspace > .card:nth-child(2) { animation-delay: 55ms; }
  .reader-workspace .live-workspace > .card:nth-child(3) { animation-delay: 110ms; }
  .reader-workspace .live-workspace > .card:nth-child(4) { animation-delay: 165ms; }
  .reader-workspace .last-spin-badge .roulette-chip { animation: result-arrival 350ms ease-out; }
  .reader-workspace .number-chip { transition: transform 120ms ease, filter 120ms ease, border-color 120ms ease; }
  .reader-workspace .session-balance > span { transition: flex-grow 350ms ease; }
  .reader-workspace .mobile-keyboard-sheet.open .mobile-keyboard-card { animation: studio-reveal 220ms ease-out; }
  @keyframes studio-reveal { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
  @keyframes result-arrival { from { transform: scale(.85); opacity: .4; } to { transform: scale(1); opacity: 1; } }
}
@media (prefers-reduced-motion: reduce) {
  .reader-workspace *, .reader-workspace *::before, .reader-workspace *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
