:root {
  --surface-page: #fbfaf6;
  --surface-primary: #fffefa;
  --surface-secondary: #eeefe8;
  --text-primary: #233d32;
  --text-secondary: #58665b;
  --separator: #d8ded3;
  --accent: #9b4839;
  --accent-strong: #7b3529;
  --accent-soft: #f3e2d8;
  --focus-ring: #98531f;
  --forest: #274b3e;
  --sage: #e8eee3;
  --peach: #f1bea6;
  --serif: "PT Serif", Georgia, serif;
  --font-ui: "Avenir Next", "Helvetica Neue", Arial, sans-serif;
  --radius-compact: 7px;
  --radius-control: 10px;
  --radius-panel: 16px;
  --radius-m: 10px;
  --max: 1312px;
  --gutter: clamp(18px, 5vw, 76px);
  --shadow-panel: 0 12px 38px rgb(37 58 42 / 9%);
}
body { font-family: var(--font-ui); -webkit-font-smoothing: antialiased; }
.site-header { border: 0; background: var(--paper); }
.header-inner { min-height: 72px; height: 78px; border-bottom: 1px solid #c5cec3; }
.brand { gap: 11px; }
.brand-mark { width: 34px; height: 34px; border: 0; border-radius: 10px; color: #fff8ef; background: var(--accent); }
.brand-mark::after, .brand-copy span { display: none; }
.brand-copy strong { font: 700 23px/1 var(--font-ui); letter-spacing: -.055em; }
.main-nav .nav-link { font-size: 15px; font-weight: 500; }
.main-nav .nav-link.active { font-weight: 650; }
.nav-link.active::after { background: var(--forest); height: 2px; bottom: 0; border-radius: 2px; }
.profile-button { color: var(--muted); font-size: 14px; font-weight: 550; border-radius: 10px; }
h1,h2,h3,.session-titlebar h1 { font-weight: 400; letter-spacing: -.045em; }
.button, .primary-action, .secondary-action, .filter-chip, .search-field { border-radius: var(--radius-control); }
.button, .atlas-text-link, .atlas-route, .atlas-start, .atlas-row-go { min-height: 44px; }
.atlas-actions, .atlas-route, .atlas-start, .atlas-row-go { display: inline-flex; align-items: center; gap: 9px; }
.atlas-route svg, .section-head .button svg { width: 17px; height: 17px; }
:where(a, button, input, select):focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.page-shell.games-page:has(.atlas-feature) { padding-top: 0; }
.atlas-day, .atlas-section-head, .catalog-front { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; }
.atlas-day { padding: 26px 0 20px; align-items: center; }
.atlas-day p, .atlas-day time, .atlas-feature-meta, .atlas-intro, .atlas-relief, .catalog-quantity, .atlas-task { margin: 0; }
.atlas-day p { font: 400 26px/1.2 var(--serif); letter-spacing: -.04em; }
.atlas-day time { color: var(--muted); font-size: 15px; }
.atlas-day time::first-letter { text-transform: uppercase; }
.atlas-feature { background: var(--forest); border-radius: 19px; overflow: hidden; display: grid; grid-template-columns: .94fr 1.06fr; }
.atlas-feature-copy { display: flex; flex-direction: column; align-items: start; min-width: 0; padding: clamp(26px,3.1vw,47px); }
.atlas-feature-meta { color: #d8e4d5; font-size: 15px; font-weight: 550; }
.atlas-relief figcaption span { padding-inline: 4px; }
.atlas-feature h1 { margin: 18px 0; color: #fffaf0; font: 400 clamp(54px,5.9vw,87px)/.96 var(--serif); letter-spacing: -.053em; }
.atlas-feature h1 em { font-weight: 400; }
.atlas-intro { max-width: 37ch; font-size: clamp(16px,1.35vw,20px); line-height: 1.48; color: #e8eee4; }
.atlas-actions { margin-top: auto; padding-top: 25px; flex-wrap: wrap; gap: 12px 25px; }
.atlas-feature .button.primary { gap: 13px; padding: 12px 21px; border: 0; background: var(--peach); color: #352e25; font-size: 16px; font-weight: 650; border-radius: 11px; }
.atlas-feature .button.primary:hover { background: #fbd1bb; color: #30291e; }
.atlas-feature :focus-visible { outline-color: #ffdfbc; }
.atlas-text-link { display: inline-flex; align-items: center; text-decoration: underline; text-underline-offset: 5px; text-decoration-color: #aabcae; color: #fffaf0; font-size: 15px; }
.atlas-relief { min-width: 0; position: relative; overflow: hidden; min-height: 100%; background: #d6dcc2; }
.atlas-relief img { position: absolute; width: 100%; height: 100%; object-fit: cover; }
.atlas-relief figcaption { position: absolute; bottom: 16px; right: 16px; padding: 5px 13px; border-radius: 7px; font-size: 12px; font-weight: 600; background: #fafaf0ed; color: #33473a; }
.atlas-section-head { align-items: center; margin: 30px 0 12px; }
.atlas-section-head h2 { margin: 0; font-size: clamp(29px,2.6vw,40px); line-height: 1.15; }
.atlas-route, .atlas-start, .atlas-row-go { font-size: 14px; font-weight: 600; }
.atlas-start, .atlas-row-go { justify-content: center; border-radius: 9px; padding: 0 12px; }
.atlas-start { background: var(--sage); align-self: center; }
.atlas-start:hover, .atlas-row-go:hover { background: #dae4d6; }
.atlas-pick-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); border-block: 1px solid var(--line); }
.atlas-pick { display: flex; gap: 14px; justify-content: space-between; padding: 19px 22px 19px 0; min-width: 0; }
.atlas-pick + .atlas-pick { padding: 19px 0 19px 24px; border-left: 1px solid var(--line); }
.atlas-pick-main, .atlas-row-main { display: flex; align-items: center; gap: 17px; min-width: 0; }
.atlas-thumb { width: 88px; height: 76px; display: block; flex: none; border-radius: 12px; overflow: hidden; background: var(--sage); }
.atlas-pick-copy { display: grid; gap: 2px; min-width: 0; }
.atlas-pick-copy small { font-size: 12px; color: var(--muted); }
.atlas-pick-copy strong, .atlas-row h3 { font: 400 clamp(21px,1.8vw,27px)/1.15 var(--serif); letter-spacing: -.04em; }
.atlas-task { font-size: 14px; color: var(--muted); line-height: 1.42; }
.atlas-pick-main:hover strong, .atlas-row-main:hover h3, .atlas-route:hover { text-decoration: underline; text-underline-offset: 4px; }
.section { margin-top: 40px; }
.section-head .eyebrow, .eyebrow, .folio-label, .session-skill { font: 550 13px/1.4 var(--font-ui); text-transform: none; letter-spacing: 0; }
.activity-section .eyebrow { display: none; }
.activity-grid, .empty-state { border-radius: var(--radius-panel); }
.activity-grid { background: #f2f4ec; }
.cover-art, .detail-visual .cover-art, .last-result { border-radius: 13px; }
.catalog-front { padding: 46px 0 20px; border: 0; }
.catalog-front h1, .results-toolbar h1 { font: 400 clamp(42px,5.1vw,72px)/1.04 var(--serif); margin: 0; letter-spacing: -.052em; }
.catalog-quantity { padding: 0; white-space: nowrap; font-size: 15px; color: var(--muted); }
.catalog-tools { border: 0; padding: 0; grid-template-columns: minmax(150px,1fr) auto; gap: 12px; margin: 0 0 22px; }
.catalog-section-standalone { margin-top: 5px; }
.search-field { background: #fffefa; min-height: 46px; }
.search-field input { font-size: 15px; }
.filter-row { gap: 2px; }
.filter-chip { min-height: 42px; font-size: 14px; padding: 0 10px; }
.filter-chip.active { color: #253f32; background: var(--sage); border-color: transparent; }
.results-count:empty { display: none; }
.atlas-index { --index-cols: minmax(160px,1.3fr) minmax(136px,1fr) minmax(75px,.5fr) 44px 90px; }
.atlas-table-head, .atlas-row { display: grid; grid-template-columns: var(--index-cols); gap: clamp(8px,1.3vw,20px); align-items: center; padding-inline: 7px; }
.atlas-table-head { color: var(--muted); font-size: 13px; padding-block: 7px 10px; border-bottom: 1px solid #aab8aa; }
.atlas-row { padding-block: 13px; border-bottom: 1px solid var(--line); }
.atlas-row h3 { margin: 0; overflow-wrap: anywhere; }
.atlas-row .atlas-thumb { width: 79px; height: 58px; border-radius: 9px; }
.atlas-category { font-size: 14px; color: var(--muted); }
.atlas-row .favorite-button { position: static; width: 44px; height: 44px; border: 0; background: transparent; border-radius: 50%; }
.atlas-row .favorite-button:hover { background: var(--sage); }
.atlas-row .favorite-button.active path { fill: var(--accent); stroke: var(--accent); }
.atlas-row-go { padding: 0 5px; }
.results-toolbar { align-items: end; border-bottom: 1px solid var(--line); padding-bottom: 17px; }
.atlas-stats-select { display: inline-flex; align-items: center; gap: 10px; margin-top: 16px; color: var(--muted); font-size: 14px; }
.atlas-stats-select select, .catalog-filter-select select { font: 600 15px/1.3 var(--font-ui); color: var(--ink); border: 1px solid var(--line); background: var(--surface); min-height: 44px; padding: 0 12px; border-radius: 9px; }
.results-game-list, .game-analytics, .results-kpis, .heatmap-card { border-radius: var(--radius-panel); }
.results-kpis { background: #eef2e8; }
.results-thumb, .rail-cover, .results-game-scroll > button { border-radius: 7px; }
.results-list-head, .analytics-chart, .chart-empty { background: #f2f3ed; }
.results-list-head, .results-game-scroll { background: transparent; }
.chart-empty, .analytics-chart, .level-inspector, .level-stage-track, .period-slider, .period-switch, .period-switch.large { border-radius: 10px; }
.results-toolbar .period-slider::before { border-radius: 8px; }
.results-list-head { border-radius: 14px 14px 0 0; }
body[data-main-draft="true"] { --play-ink: var(--ink); --play-muted: var(--muted); --play-line: var(--line); --play-white: var(--surface); }
body[data-main-draft="true"] :is(.session-card,.levels-panel) { border-radius: 16px; }
body[data-main-draft="true"] .game-rail { padding: 0; border: 0; border-radius: 0; background: transparent; }
body[data-main-draft="true"] .rail-heading { height: auto; min-height: 0; border: 0; padding: 0 9px 16px; }
body[data-main-draft="true"] .rail-heading strong { font: 400 clamp(20px,1.7vw,26px)/1.18 var(--serif); }
body[data-main-draft="true"] .game-rail-list { padding: 0 5px 0 0; border-block: 1px solid var(--line); scrollbar-color: #9aa99b transparent; }
body[data-main-draft="true"] .rail-game:last-child { border-bottom-color: transparent; }
body[data-main-draft="true"] .rail-game { border-radius: 8px; }
body[data-main-draft="true"] .rail-game.active, .results-game-scroll > button.active { background: #e1eadc; border-left-color: #467052; }
body[data-main-draft="true"] .cabinet-preview { background: #e8eee3; border-radius: 12px; }
body[data-main-draft="true"] .game-stage { background: #ecf0e7; }
body[data-main-draft="true"] .session-titlebar { border-radius: 16px 16px 0 0; }
body[data-main-draft="true"] .session-titlebar h1 { font-size: clamp(24px,2.5vw,38px); }
body[data-main-draft="true"] .preview-instructions .folio-label { color: #526756; }
body[data-main-draft="true"] :is(.runtime-tool,.session-controls .icon-button) { border-radius: 8px; }
.map-specimen { border: 5px solid #fafbf5; background: #889c8a; border-radius: 9px; overflow: hidden; box-shadow: 0 4px 15px #334c3224; }
.map-specimen span { background: #f6f7ec; }
.mobile-nav { border-radius: 15px; }
.mobile-nav a { border-radius: 10px; }
@media(max-width:1160px) {
  .catalog-tools { grid-template-columns: 1fr; }
  .atlas-pick { gap: 8px; }
  .atlas-pick-main { gap: 11px; }
  .atlas-pick .atlas-thumb { width: 70px; height: 70px; }
}
@media(max-width:920px) {
  .atlas-pick-list { grid-template-columns: 1fr; }
  .atlas-pick, .atlas-pick + .atlas-pick { border: 0; padding: 13px 0; }
  .atlas-pick + .atlas-pick { border-top: 1px solid var(--line); }
  .atlas-pick-copy, .atlas-pick-main { gap: 3px 15px; }
}
@media(max-width:820px) {
  .header-inner { height: 63px; min-height: 0; }
  .header-actions .profile-button { border: 0; }
  .brand-copy strong { font-size: 21px; }
  .atlas-feature { grid-template-columns: 1.15fr 1fr; }
  .atlas-feature-copy { padding: 26px; }
  .atlas-feature h1 { font-size: clamp(49px,7vw,61px); }
  .results-toolbar { align-items: start; }
  .results-game-list { display: none; }
}
@media(max-width:690px) {
  .atlas-day { padding: 19px 0 13px; }
  .atlas-day p { font-size: 22px; }
  .atlas-day time { font-size: 13px; }
  .atlas-feature { display: flex; flex-direction: column; border-radius: 16px; }
  .atlas-feature-copy { padding: 23px; }
  .atlas-feature-meta { font-size: 13px; }
  .atlas-feature h1 { font-size: clamp(44px,12.5vw,63px); margin: 13px 0 12px; }
  .atlas-intro { max-width: 39ch; }
  .atlas-actions { padding-top: 16px; gap: 8px 16px; }
  .atlas-feature .button.primary { font-size: 14px; padding: 11px 14px; gap: 9px; }
  .atlas-text-link { font-size: 14px; }
  .atlas-relief { height: clamp(92px,28vw,170px); min-height: 0; }
  .atlas-relief img { object-position: center 52%; }
  .atlas-relief figcaption { bottom: 8px; right: 8px; padding: 3px 7px; font-size: 10px; }
  .atlas-section-head { margin-top: 17px; gap: 8px; }
  .atlas-section-head h2 { font-size: 28px; }
  .atlas-route { font-size: 13px; gap: 4px; }
  .atlas-pick .atlas-thumb { width: 59px; height: 59px; border-radius: 8px; }
  .atlas-pick-main { gap: 9px; }
  .atlas-start { font-size: 13px; padding: 0 9px; gap: 4px; }
  .catalog-front { display: block; padding: 24px 0 17px; }
  .catalog-quantity { margin-top: 7px; font-size: 14px; }
  .atlas-table-head { display: none; }
  .atlas-row { grid-template-columns: minmax(0,1fr) 44px auto; gap: 3px 4px; padding: 13px 0; }
  .atlas-row-main { grid-column: 1 / 3; grid-row: 1; gap: 12px; padding-right: 42px; }
  .atlas-row .atlas-thumb { width: 54px; height: 44px; }
  .atlas-row h3 { font-size: 21px; }
  .atlas-row .favorite-button { grid-row: 1; grid-column: 2; z-index: 1; }
  .atlas-row-go { grid-row: 1; grid-column: 3; font-size: 13px; }
  .atlas-task { grid-column: 1/-1; font-size: 14px; }
  .atlas-category { grid-column: 1/-1; font-size: 12px; }
  .atlas-index { border-top: 1px solid var(--line); }
  .atlas-stats-select { display: flex; margin-top: 10px; }
  .results-toolbar { padding-bottom: 12px; }
  .results-toolbar-actions { margin-top: 3px; }
  .section-head { flex-wrap: wrap; }
  .catalog-tools { gap: 8px; }
  .atlas-actions a { flex: 0 0 auto; }
}
@media(max-width:360px) {
  .atlas-actions { gap: 4px 10px; }
  .atlas-pick-copy strong { font-size: 19px; }
  .atlas-pick-main { gap: 7px; }
}

.page-shell.results-page { --calendar-gap: 18px; padding-top: var(--calendar-gap); }
.results-summary { display: flex; min-width: 0; }
.results-summary .results-kpis { flex: 1; grid-template-columns: repeat(2, minmax(0,1fr)); grid-template-rows: repeat(2,1fr); align-content: stretch; border: 0; padding: 8px 0; }
.results-summary .results-kpis article { justify-content: center; padding: 4px clamp(14px,1.6vw,23px); gap: 1px; border: 0; }
.results-summary .results-kpis article:nth-child(even) { border-inline-start: 1px solid var(--line); }
.results-summary .results-kpis article strong { font-size: 24px; line-height: 1; }
.results-kpis::before, .results-kpis::after { display: none; }
.results-kpis article { min-height: 0; display: flex; flex-direction: column; align-items: start; gap: 2px; padding: 0 clamp(12px,1.8vw,28px); }
.results-kpis article + article { border-left: 1px solid #d4dccf; }
.results-kpis article > * { align-self: start; text-align: start; max-width: none; }
.results-kpis article strong { margin: 1px 0; font-size: 29px; }
.results-kpis small { font-size: 12px; line-height: 1.35; }
.results-workspace { grid-template-columns: minmax(0,1.55fr) minmax(290px,.9fr); gap: 26px; margin-top: 23px; }
.atlas-stats-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.atlas-stats-side .heatmap-card { padding: clamp(15px,1.45vw,23px); }
.atlas-stats-side .heatmap-head { align-items: baseline; flex-wrap: wrap; gap: 6px 13px; margin-bottom: 15px; }
.atlas-stats-side .heatmap-head > strong { font-size: clamp(22px,2vw,29px); letter-spacing: -.045em; }
.atlas-stats-side .heatmap-detail { margin-top: 12px; }
.atlas-comparison { border-block: 1px solid var(--line); }
.atlas-comparison summary { padding: 13px 5px; cursor: pointer; font-weight: 600; font-size: 15px; }
.atlas-comparison summary:focus-visible { outline: 2px solid var(--focus); }
.atlas-comparison .results-game-list { display: block; contain: none; border: 0; height: auto; max-height: 300px; overflow-y: auto; }
.results-workspace .game-analytics { height: auto; border: 0; padding: 0; background: transparent; }
.game-analytics .analytics-chart { padding: clamp(15px,1.7vw,25px); border: 1px solid var(--line); border-radius: 16px; background: var(--surface-page); }
.game-analytics .chart-axis { align-items: center; padding-bottom: 12px; }
.game-analytics .chart-axis-title { margin: 0; font: 400 clamp(23px,2vw,29px)/1.14 var(--serif); letter-spacing: -.04em; }

.analytics-chart .chart-empty { background: var(--surface-page); }
.level-performance { margin-top: 13px; }
.level-inspector, .level-stage-track { background: transparent; border: 0; border-radius: 0; }
.level-inspector > div:first-child { padding-inline-start: 0; }
.level-stage-track { height: auto; gap: 12px 16px; overflow: visible; }
.level-stage-column { position: relative; height: auto; min-height: 0; padding: 0; background: transparent; }
.level-stage-column + .level-stage-column::before { content: ""; position: absolute; inset: 0 auto 0 -8px; border-inline-start: 1px solid var(--line); }
@media(max-width:820px) {
  .level-stage-column:nth-last-child(even)::before { display: none; }
  .results-workspace { gap: 16px; }
  .game-analytics .chart-axis { flex-wrap: wrap; gap: 5px; }
  .game-analytics .chart-axis .chart-legend { display: flex; flex-wrap: wrap; gap: 5px 13px; }
  .results-kpis article:nth-child(odd) { border-left: 0; }
  .results-kpis article { padding: 0 14px; }
  .results-kpis article strong { font-size: 24px; }
  .results-kpis small { font-size: 11px; }
  .atlas-stats-side { width: 100%; }
  .atlas-actions .button.primary { width: auto; }
}
@media(max-width:820px) {
  .game-analytics .chart-axis { display: flex; flex-direction: column; align-items: stretch; gap: 9px; }
  .game-analytics .chart-axis .chart-legend { justify-content: start; }

  .chart-empty { inset: 0; padding: 12px; }
}
.atlas-task small, .atlas-category small { display: block; margin-top: 3px; font-size: 12px; font-weight: 500; color: var(--muted); }
@media(min-width:921px) {
  .atlas-index { --index-cols: minmax(205px,1.35fr) minmax(175px,1.25fr) minmax(85px,.58fr) 44px 107px; }
}
@media(max-width:690px) {
  .atlas-task small { display: inline; margin-left: .5em; }
  .atlas-category small { display: inline; margin-left: .5em; }
}
@media(max-width:760px) {
  body[data-main-draft="true"] .session-titlebar { grid-template-columns: minmax(0,1fr) auto auto; gap: 8px; }
  body[data-main-draft="true"] .session-level { display: grid; min-width: 41px; padding-left: 8px; }
  body[data-main-draft="true"] .session-level span { font-size: 10px; }
  body[data-main-draft="true"] .session-titlebar h1 { white-space: normal; line-height: 1.06; }
}

/* The chart and the game index share a baseline. The index owns its scroll. */
.results-toolbar.atlas-stats-header { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.1fr); align-items: stretch; gap: 28px; border: 0; padding: 0; }
.atlas-stats-header .heatmap-card { width: 100%; min-width: 0; padding: 15px 19px 12px; }
.atlas-stats-header .heatmap-head { flex-wrap: wrap; gap: 6px 14px; }
.atlas-stats-header .heatmap-detail { margin-top: 8px; }
.results-workspace .atlas-stats-side { align-self: stretch; position: relative; display: grid; grid-template-rows: auto minmax(0,1fr); gap: 7px; padding: 16px 10px 9px; border: 1px solid var(--line); border-radius: 14px; min-height: 0; }
.atlas-stats-side h2 { margin: 0; padding: 0 9px 8px; font: 400 clamp(20px,1.7vw,26px)/1.18 var(--serif); }
.atlas-stats-side .results-game-scroll { min-height: 0; height: 0; min-block-size: 100%; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #9aa99b transparent; overscroll-behavior-y: contain; padding: 0 5px 0 0; }
.atlas-stat-row { display: grid; grid-template-columns: 1fr auto; align-items: center; border-bottom: 1px solid var(--line); gap: 3px; padding: 3px 5px; }
.atlas-stat-row:last-child { border-bottom-color: transparent; }
.atlas-stat-row.active { background: #e1eadc; border-radius: 8px; box-shadow: inset 3px 0 #467052; }
.atlas-select-game { display: flex; align-items: center; gap: 10px; background: transparent; color: var(--ink); width: 100%; min-width: 0; text-align: start; padding: 6px 3px; border: 0; }
.atlas-select-game:focus-visible, .atlas-stat-play:focus-visible { outline-offset: -2px; }
.atlas-select-game:hover strong { text-decoration: underline; }
.atlas-select-game .results-thumb { width: 41px; height: 36px; flex-shrink: 0; }
.atlas-select-game strong { font: 500 16px/1.15 var(--serif); }
.atlas-select-game small { font-size: 11px; line-height: 1.35; margin-top: 2px; }
.atlas-stat-play { display: grid; place-items: center; min-width: 64px; min-height: 35px; padding: 4px 9px; background: white; color: #253f32; border: 0; border-radius: 8px; font-size: 13px; font-weight: 650; }
.atlas-stat-row.active .atlas-stat-play { color: white; background: var(--accent); }
.atlas-stat-play:hover { text-decoration: underline; }
.game-analytics .chart-axis { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); gap: 8px; align-items: center; }
.chart-axis .chart-legend { justify-self: end; }
.atlas-chart-period { position: relative; isolation: isolate; display: grid; grid-template-columns: repeat(3,1fr); border-radius: 99px; background: #dfe6da; padding: 3px; }
.atlas-chart-period::before { content: ""; position: absolute; inset: 3px auto 3px 3px; width: calc((100% - 6px)/3); border-radius: inherit; background: #fffefa; transform: translateX(calc(var(--period-index) * 100%)); z-index: -1; }
.atlas-chart-period button { padding: 5px 8px; min-height: 28px; font: 550 12px/1.25 var(--font-ui); border: 0; border-radius: 99px; background: transparent; color: var(--muted); white-space: nowrap; }
.atlas-chart-period button.active { color: var(--ink); font-weight: 700; }
.filter-row .filter-chip { border-radius: 100px; min-height: 36px; padding-inline: 13px; border: 1px solid #ccd5c9; background: transparent; }
.filter-row .filter-chip.active { border-color: #526d59; background: #e5ecdf; }
@media (max-width: 920px) {
  .results-workspace { grid-template-columns: minmax(0,1fr); }
  .results-workspace .atlas-stats-side { height: 340px; }
}
@media (max-width: 700px) {
  .results-toolbar.atlas-stats-header { grid-template-columns: minmax(0,1fr); gap: var(--calendar-gap); }
  .atlas-stats-header .heatmap-card { padding: 12px; }
  .game-analytics .chart-axis { grid-template-columns: 1fr auto; }
  .game-analytics .chart-axis .chart-legend { grid-column: 1/-1; justify-self: start; }
  .game-analytics .chart-axis .atlas-chart-period { align-self: center; }
}
@media (max-width: 380px) {
  .game-analytics .chart-axis { grid-template-columns: 1fr; justify-items: start; }
}
.skip-link:not(:focus) { clip-path: inset(100%); }
@media(max-width: 560px) {
  .game-analytics .chart-axis { grid-template-columns: minmax(0,1fr); justify-items: start; gap: 8px; }
  .game-analytics .chart-axis .chart-legend { justify-self: start; }
}
.daily-carousel {position:relative;overflow:hidden;border-radius:19px}
.daily-slides {display:grid}
.daily-slide {grid-area:1/1;min-width:0;visibility:hidden;pointer-events:none}
.daily-slide .atlas-feature {height:100%}
.daily-slide.current {visibility:visible;pointer-events:auto}
.daily-carousel.is-switching .daily-slide.current {animation:banner-in .55s ease both}
.daily-slide.outgoing {visibility:visible;animation:banner-out .55s ease both}
@keyframes banner-in {from{transform:translateX(100%)}to{transform:none}}
@keyframes banner-out {to{transform:translateX(-101%)}}
.daily-dots {position:absolute;right:16px;top:16px;display:flex;background:#fafaf0ec;border-radius:30px;padding:0 4px}
.daily-dots button {width:24px;height:26px;border:0;display:grid;place-items:center;background:none;padding:0}
.daily-dots button::after {content:"";width:7px;height:7px;border-radius:50%;background:#a4aea1}
.daily-dots button[aria-pressed=true]::after {background:#274b3e}
@media(prefers-reduced-motion:reduce){.daily-carousel.is-switching .daily-slide.current{animation:none}.daily-slide.outgoing{visibility:hidden}}
@media(max-width:690px){.daily-carousel .atlas-feature-copy{padding-top:52px}.daily-dots{top:8px;right:8px}}
.atlas-stats-header .heatmap-detail { display: none; }
.atlas-stats-header .heatmap-head { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-bottom: 8px; }
.heatmap-key-label { font-size: 12px; color: var(--muted); }
.atlas-stats-header .heatmap-card { display: flex; flex-direction: column; justify-content: center; }
@media (max-width: 700px) {
  .atlas-stats-header .heatmap-card { grid-row: 1; }
  .results-summary .results-kpis { row-gap: 5px; }
}
.atlas-stats-header .heatmap-card {padding-block:10px;min-height:0}
.atlas-stats-header .heatmap-wrap {margin-top:0}
.results-workspace .atlas-stats-side {border:0;border-radius:0;padding:0;gap:8px}
.atlas-stats-side .results-game-scroll {border-block:1px solid var(--line)}
.otklik-mark {object-fit:contain}

body[data-main-draft="true"] .game-stage { position: relative; }
body[data-main-draft="true"][data-style="classic"] .game-stage .runtime-frame-shell.is-field-overlay {
  position: absolute; inset: 0; width: 100%; height: 100%; aspect-ratio: auto;
}
.preview-instructions h2 { font-size: calc(clamp(1.2rem, 2.5vw, 2.6rem) - 2px); margin: 0 0 .4em; }
.preview-instructions .preview-goal { max-width: 43ch; font-size: calc(clamp(.87rem, 1.2vw, 1.03rem) - 1px); }
.preview-copy { align-self: start; min-height: 0; max-height: 100%; overflow-y: auto; }
.preview-guide { box-sizing: border-box; position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 16px; border: 0; color: var(--ink); background: rgb(40 50 44 / 22%); backdrop-filter: blur(6px); z-index: 5; }
.preview-guide[open] { display: grid; place-items: center; }
.preview-guide:modal { position: fixed; height: 100dvh; background: transparent; }
.preview-guide::backdrop { background: rgb(40 50 44 / 30%); backdrop-filter: blur(6px); }
.guide-paper { box-sizing: border-box; width: min(100%, 560px); max-height: 100%; overflow: auto; padding: clamp(18px,2.8vw,32px); border: 1px solid var(--line); border-radius: 10px; background: var(--paper); }
.guide-paper h2 { margin: 0 0 12px; font: 500 clamp(21px,2.4vw,32px)/1.14 var(--serif); }
.guide-paper p { margin: 0 0 14px; font-size: 15px; line-height: 1.45; }
body[data-main-draft="true"] .levels-panel { height: auto; min-height: 0; padding: 0; background: transparent; border: 0; border-radius: 0; box-shadow: none; }
body[data-main-draft="true"] .session-level-inspector { margin: 0 0 10px; background: transparent; border: 0; }
body[data-main-draft="true"] .session-level-inspector > div:first-child { padding-inline-start: 0; }
body[data-main-draft="true"] .levels-scroll { background: transparent; }
body[data-main-draft="true"] .level-stage-group { background: transparent; }
body[data-main-draft="true"] .level-chip.active { color: var(--red-dark); background: #f3dadd; }
@media (min-width:761px) {
  body[data-main-draft="true"] .level-stage-group { height: auto; padding: 0 8px; }
  body[data-main-draft="true"] .level-stage-group:first-child { padding-inline-start: 0; }
  body[data-main-draft="true"] .level-stage-group:last-child { padding-inline-end: 0; }
  body[data-main-draft="true"] .levels-scroll { height: 64px; }
  body[data-main-draft="true"] .levels-scroll[data-game="hawk-eye"] { overflow: visible; }
  body[data-main-draft="true"] .levels-scroll[data-game="hawk-eye"] .level-stage-group {
    flex: 1 1 0;
    min-width: 0;
    padding-inline: clamp(3px, .4vw, 8px);
  }
  body[data-main-draft="true"] .levels-scroll[data-game="hawk-eye"] .level-stage-group:first-child { padding-inline-start: 0; }
  body[data-main-draft="true"] .levels-scroll[data-game="hawk-eye"] .level-stage-group:last-child { padding-inline-end: 0; }
  body[data-main-draft="true"] .stage-levels { gap: 3px; }
  body[data-main-draft="true"] .level-chip span { font-size: 12px; }
}
@media (min-width:901px) {
  body[data-main-draft="true"] .session-level-inspector { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1.3fr) minmax(95px, .75fr) minmax(105px, .7fr); }
  body[data-main-draft="true"] .session-level-inspector > div > span { font-size: 12px; }
  body[data-main-draft="true"] .session-level-inspector > div > strong { font-size: 12px; }
}
@media (max-width:760px) {
  body[data-main-draft="true"] .levels-scroll { gap: 10px 0; }
  body[data-main-draft="true"] .level-stage-group:nth-last-child(odd):not(:first-child) { border-inline-start: 1px solid var(--line); }
}

/* The card clips the header, artwork and overlay along the same inner edge. */
body[data-main-draft="true"] .session-card :is(.session-titlebar, .game-stage, .field-scene, .runtime-frame-shell, .game-runtime-frame) {
  border-radius: 0;
}
@media (min-width: 761px) {
  body[data-main-draft="true"][data-style="classic"] .play-workspace:has(.session-card) {
    height: clamp(520px, calc(100svh - 91px), 855px);
  }
  body[data-main-draft="true"][data-style="classic"] .play-grid { grid-template-rows: minmax(0, 1fr); }
  body[data-main-draft="true"][data-style="classic"] .play-workspace:has(.session-card) .play-column {
    min-height: 0;
    grid-template-rows: minmax(0, 1fr) 158px;
  }
  body[data-main-draft="true"][data-style="classic"] .session-card:not(:fullscreen) .game-stage {
    aspect-ratio: auto;
  }
  body[data-main-draft="true"][data-style="classic"] .game-stage :is(.runtime-frame-shell, .preview-scene) {
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
  }
}

.detail-visual .last-result {
  position: static;
  width: 100%;
  margin: 12px 0 0;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.results-page > .results-workspace { order: 0; margin-top: 0; }
.results-page > .atlas-stats-header { order: 1; margin-top: 24px; }
.heatmap-grid .heat-cell:is(:hover, :focus-visible, [aria-selected="true"]) {
  border-color: transparent;
  box-shadow: none;
  outline: none;
  transform: none;
}
.heatmap-grid .heat-cell:hover { background: #c79796; }
.heatmap-grid .heat-cell:is(:focus-visible, [aria-selected="true"]) {
  background: #a16667;
}
.heatmap-grid .heat-cell:focus-visible::after {
  content: "";
  position: absolute;
  inset: 4px;
  background: white;
  border-radius: 50%;
}
@media (forced-colors: active) {
  .heatmap-grid .heat-cell:is(:hover, :focus-visible, [aria-selected="true"]) {
    forced-color-adjust: none;
    background: Highlight;
  }
  .heatmap-grid .heat-cell:focus-visible::after { background: HighlightText; }
}

/* Keep a dated result and its empty state aligned in narrow chart columns. */
@media (min-width: 921px) and (max-width: 1100px) {
  .game-analytics .chart-axis { grid-template-columns: 1fr auto; }
  .game-analytics .chart-legend { grid-column: 1 / -1; justify-self: start; }
  .game-analytics .chart-day-detail { grid-template-columns: 1.2fr 1fr; }
}
@media (max-width: 380px) {
  .game-analytics .chart-day-detail {
    margin-inline: 0;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    grid-auto-rows: minmax(2.6em, auto);
    gap: 2px 8px;
    line-height: 1.3;
  }
}

/* Each invisible hit area extends halfway to the neighbouring bar. */
.chart-plot .chart-day-targets { inset: 0; display: block; }
.chart-plot .chart-day-target { position: absolute; top: 0; }
.chart-plot .chart-day-target:is(:hover, :active) {
  background: transparent;
  transform: none;
  box-shadow: none;
}
.puzzle-specimen {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: 7%;
  padding: 4%;
  border: 1px solid #c6cbbb;
  border-radius: 5px;
  background: #faf8ef;
}
.puzzle-specimen img { display: block; width: 100%; }
.puzzle-specimen img:last-child { transform: rotate(-20deg); }

@media (max-width: 760px) {
  .resume-grid, .resume-card { grid-template-columns: minmax(0, 1fr); }
  .resume-art { order: -1; aspect-ratio: 16 / 9; max-height: 260px; }
  .resume-copy .button.primary { width: auto; }

  body .compact-level-inspector.level-inspector {
    grid-template-columns: max-content max-content;
    height: auto;
    min-height: 0;
  }
  .compact-level-inspector > .inspector-desktop,
  .compact-level-inspector > div > .inspector-desktop { display: none; }
  body .compact-level-inspector.level-inspector > :is(.level-inspector-training, .level-inspector-stars) {
    display: flex;
    min-height: 0;
    align-items: center;
    gap: 4px;
    padding-block: 5px;
    border-bottom: 0;
  }
  body .compact-level-inspector.level-inspector > .level-inspector-training { padding-inline: 0 12px; }
  body .compact-level-inspector.level-inspector > .level-inspector-stars { padding-inline: 12px; }
  body .compact-level-inspector.level-inspector > div > strong { margin-top: 0; }

  body[data-main-draft="true"] .game-stage:has(.cabinet-preview) { height: auto; aspect-ratio: auto; }
  body[data-main-draft="true"] .cabinet-preview {
    min-height: clamp(270px, 76vw, 330px);
    height: auto;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    grid-template-rows: minmax(auto, 1fr) auto;
    gap: 10px;
    padding: 12px;
  }
  .cabinet-preview .preview-copy { display: contents; }
  .cabinet-preview .button.preview-play {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: center;
    width: auto;
  }
  .cabinet-preview .preview-goal { margin-bottom: 0; }
  .cabinet-preview .exercise-print { border-width: 4px; }
}
