/* Shared assessment → choice → result → next decision structure. */
.turn-dock {display:block;padding:0;background:var(--canvas);border-top:1px solid var(--border-subtle);z-index:12;min-width:0;}
.turn-context {min-width:0;flex:1;}
.turn-message {font-size:var(--text-meta);font-weight:600;line-height:1.4;margin:0;overflow-wrap:anywhere;}
.turn-detail {display:block;font-size:var(--text-meta);line-height:1.4;color:var(--fg-muted);margin-top:3px;}
.turn-dock.has-warning {border-top-color:var(--warn-fg);}
.turn-dock.has-warning .turn-message {color:var(--warn-fg);}
.context-body .decision-heading {display:none;}
.context-body .inline-work {margin-top:20px;}
.context-body .decision-row>summary {padding:12px;min-height:70px;gap:10px;}
.context-body .decision-label strong {font-size:var(--text-meta);}
.context-body .decision-label small {font-size:var(--text-meta);}
.context-body .decision-art {width:36px;height:36px;flex-basis:36px;}
.context-body .city-list-row,.city-list-row {display:flex;width:100%;justify-content:space-between;align-items:center;gap:12px;text-align:left;padding:14px 12px;margin-bottom:8px;border:1px solid var(--border-subtle);border-radius:var(--choice-radius);background:var(--surface);color:var(--fg);}
.city-list-row>span:first-child {display:grid;gap:5px;min-width:0;}
.city-list-row strong {font-size:var(--text-meta);}
.city-list-row small {font-size:var(--text-meta);color:var(--fg-muted);}
.city-list-facts {display:flex;gap:9px;align-items:center;font-size:var(--text-meta);}
.city-list-facts .resource-icon {width:16px;height:16px;}
.context-body .phone-running-row {display:flex;gap:12px;align-items:center;padding:10px 0;border-bottom:1px solid var(--border-subtle);}
.context-body .phone-running-row>.work-art {position:static;width:32px;height:36px;flex:none;}
.context-body .phone-running-row>span {display:grid;gap:4px;font-size:var(--text-meta);}
.context-body .phone-running-row small {color:var(--fg-muted);font-size:var(--text-meta);}
.context-body .city-stats {position:static!important;width:100%!important;inset:auto!important;margin:0;max-height:none;}
.context-body .city-work {position:static;}
.context-body .notification-stream {margin-top:16px;}
.context-body .notification-action {min-height:44px;padding:10px 14px;font-size:var(--text-meta);}
.context-body .op-card {background:var(--surface);border:1px solid var(--border-subtle);border-radius:var(--panel-radius);}
.context-body .decision-body p {font-size:var(--text-meta);}
.context-body .readiness-tags {flex-wrap:wrap;}
.context-body .decision-row .ending-art {height:48px;}
.context-body .inline-work .section-heading {margin:12px 0;}
.game-views {display:grid;grid-template-columns:repeat(4,1fr);border-bottom:1px solid var(--border-subtle);padding:0 8px;flex:none;}
body.strategy-game :is(.game-views,.phone-views) .ui-button {font-size:var(--text-meta);min-width:0;padding:10px 4px;border-radius:0;}
body.strategy-game :is(.game-views,.phone-views) .ui-button[aria-current=page] {color:var(--accent);box-shadow:inset 0 -2px var(--accent);}
.map-phone-facts,.map-work-state {display:none;}
.you {color:var(--player);}.rival {color:var(--rival);}
/* Research and endings open a wider workspace on computers. Ordinary city
   decisions keep their compact panel, and phones keep the shared bottom sheet. */
@media(min-width:701px) and (min-height:501px), (min-width:701px) and (pointer:fine) {
 .turn-workspace:is([data-panel=research],[data-panel=victories]) .context-panel {width:100%;background:var(--canvas);z-index:10;}
 .turn-workspace:is([data-panel=research],[data-panel=victories]) .context-panel::before {display:none;}
 .turn-workspace:is([data-panel=research],[data-panel=victories]) #board {visibility:hidden;}
 .turn-workspace:is([data-panel=research],[data-panel=victories]) .context-body {overflow:hidden;display:flex;flex-direction:column;padding:6px 20px 20px;}
 .desktop-research {display:grid;grid-template-columns:minmax(0,1fr) clamp(250px,23vw,320px);gap:20px;flex:1;min-height:0;min-width:0;}
 .research-map {display:flex;flex-direction:column;min-height:0;min-width:0;}
 .research-map-hint {font-size:var(--text-meta);line-height:1.5;color:var(--fg-muted);margin:0 0 12px;}
 .desktop-research .research-view {flex:1;min-height:0;height:auto;}
 .desktop-research .tree-scroll {position:relative;background:none;border:0;}
 .desktop-research .tech-detail {min-height:0;overflow:auto;padding:18px;border:1px solid var(--border-subtle);border-radius:var(--panel-radius);background:var(--surface);}
 .desktop-research .tech-detail h2 {margin:0 0 14px;font-size:23px;}
 .desktop-research .tech-detail .eyebrow {display:block;margin-bottom:8px;}
 .desktop-research .tech-detail p {font-size:var(--text-meta);line-height:1.6;}
 .desktop-research .tech-detail .choice-commit {border-bottom:0;border-top:1px solid var(--border-subtle);margin-top:18px;}
 .context-body>.readiness-view {width:100%;max-width:none;height:100%;min-height:0;padding:0;margin:0;overflow:hidden;grid-template-columns:minmax(0,1fr) clamp(310px,28vw,410px);grid-template-rows:auto minmax(0,1fr);grid-template-areas:'head detail' 'grid detail';gap:14px 24px;}
 .context-body .readiness-header {display:block;position:static;height:auto;margin:0;padding:0;min-height:0;border:0;background:none;box-shadow:none;}
 .context-body .readiness-header p {margin:0;}
 .context-body .readiness-header h2 {display:none;}
 .context-body .readiness-grid {overflow:auto;min-height:0;max-height:100%;align-content:start;grid-template-columns:repeat(3,minmax(0,1fr));}
 .context-body .readiness-title {display:grid;gap:5px;}
 .context-body .readiness-title b {font-size:var(--text-meta);font-weight:400;color:var(--fg-muted);}
 .context-body .readiness-detail {height:100%;max-height:none;min-height:0;position:static;align-self:stretch;}
 .context-body .readiness-detail-body {height:100%;max-height:none;min-height:0;}
 .context-body .readiness-detail-head,.context-body .readiness-action {flex:none;}
 .context-body .readiness-detail-head .readiness-hero {aspect-ratio:2/1;}
 .context-body .readiness-detail-scroll {min-height:0;}
 .context-body .ending-alternatives {grid-area:grid;overflow:auto;min-height:0;max-height:100%;}
 .context-body .ending-alternatives .readiness-grid {grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media(min-width:701px) and (max-width:1150px) {
 .context-body>.readiness-view {grid-template-columns:minmax(0,1fr) 310px;gap:14px;}
 .context-body .readiness-grid {grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media(min-width:701px) and (min-height:501px), (min-width:701px) and (pointer:fine) {
 #simulation.turn-flow {height:100dvh;display:flex;flex-direction:column;overflow:clip;}
 .turn-flow>.game-header {flex:none;}
 .turn-flow .turn-workspace {display:grid!important;grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) auto;flex:1 1 0;height:0;min-height:0;gap:0;padding:0!important;position:relative;}
 .turn-workspace #board.art-board {position:relative!important;inset:auto!important;display:block!important;grid-column:1;grid-row:1;width:100%;height:100%;min-height:0;padding:0!important;margin:0!important;overflow:hidden!important;}
 .turn-workspace #board>.world-view,.turn-workspace #board>.city-view,.turn-workspace .city-landscape {position:absolute!important;inset:0!important;width:100%!important;height:100%!important;min-height:0!important;}
 .turn-workspace .context-panel {position:relative;grid-column:1;grid-row:1;justify-self:end;display:flex;flex-direction:column;min-height:0;min-width:0;overflow:visible;background:linear-gradient(90deg,#05080ed9,#05080ef5 35%);border:0;width:clamp(340px,28vw,410px);padding:0;}
 .context-panel::before {content:"";position:absolute;right:100%;top:0;bottom:0;width:130px;background:linear-gradient(90deg,transparent,#05080ed9);pointer-events:none;}
 .context-panel-head {display:flex;align-items:center;justify-content:space-between;gap:12px;padding:15px 18px 10px;flex:none;}
 .context-panel-head h2 {margin:0;font-size:19px;line-height:1.3;letter-spacing:-.03em;}
 .context-body {flex:1;overflow:auto;overscroll-behavior:contain;scroll-padding:12px;min-height:0;padding:6px 18px 22px;}
 .turn-workspace>.turn-dock {grid-column:1/-1;grid-row:2;}
 .turn-workspace .map-key {position:absolute;bottom:10px;left:12px;right:calc(clamp(340px,28vw,410px) + 12px);display:flex;flex-wrap:wrap;gap:8px 18px;font-size:var(--text-meta);pointer-events:none;}
 .turn-workspace .map-key-caption {display:none;}
 .turn-workspace .map-key svg {width:13px;height:13px;}
 .desktop-scene-caption {position:absolute;top:12px;left:18px;z-index:8;display:flex;gap:14px;align-items:center;}
 .desktop-scene-caption h1 {font-size:22px;text-shadow:0 2px 8px #000;margin:0;}
 .turn-workspace #board :is(.city-heading,.city-work-dock,.building-directory,.scenery-navigation) {display:none!important;}
 .turn-workspace .city-shade {background:linear-gradient(180deg,#07101844,transparent 25%,transparent 80%,#07101866);}
 .turn-workspace .city-stats {padding:0;}
 .turn-workspace .city-incidents {position:static;margin:0 0 16px;padding:0;}
 .turn-workspace .city-incidents h2 {font-size:18px;}
}
@media(max-width:700px),(pointer:coarse) and (max-height:500px) {
 .art-phone .phone-drawer-head>.nav-close {position:static!important;align-self:center;flex:none;margin:0;}
 .art-phone .phone-drawer-head {padding-right:8px;}
 .phone-layout .world-label {min-width:0!important;min-height:44px!important;width:calc((100vw - 30px) / 3)!important;max-width:132px!important;height:auto!important;padding:5px 2px!important;border:0!important;border-radius:0!important;background:none!important;box-shadow:none!important;text-shadow:0 1px 3px #020810,0 0 8px #020810,0 0 14px #020810;white-space:normal;}
 .phone-layout .world-label>.map-caption-content {display:block!important;padding:0;background:none;}
 .phone-layout .world-label .map-name-row {display:flex;flex-direction:column;gap:2px;font-size:var(--text-meta);line-height:1.25;white-space:nowrap;}
 .phone-layout .world-label .map-status-icons {position:absolute;top:-8px;right:5px;background:none;border-radius:0;gap:2px;}
 .phone-layout .world-label .map-status-icon {width:9px;height:11px;}
 .phone-layout .world-label .map-adoption {display:none;}
 .phone-layout .world-label .map-phone-facts {display:flex!important;justify-content:center;gap:8px;font-size:var(--text-meta);line-height:1.5;font-weight:600;margin-top:2px;}
 .phone-layout .world-label .map-work-state {display:block!important;font-size:var(--text-meta);line-height:1.4;color:var(--player);}
 .phone-layout .world-label .map-work-state.at-risk {color:var(--danger-fg);}
 .phone-layout .world-label>.alert-label {display:none!important;}
 .phone-layout .world-label.robot-site>.robot-found,.phone-layout .world-label.robot-site>strong {display:inline!important;font-size:var(--text-meta);}
 .phone-layout .world-label::before {display:none;}
 .phone-layout .world-leaders {display:block!important;}
 .phone-layout .world-leaders line {stroke:#d9e4f466;stroke-width:.7;}
 .art-phone.panel-open .world-labels,.art-phone.panel-open .world-leaders {visibility:hidden;}
 .art-phone.panel-open .phone-scene {height:100%!important;}
 .art-phone .phone-scene {transition:none;}
 .art-phone .phone-drawer {background:var(--canvas);}
 .art-phone .city-incidents {position:static;margin:0 0 12px;}
 .art-phone .city-incidents h2 {font-size:16px;}
}
@media(max-width:360px),(max-height:620px) and (max-width:700px) {
}
@media(pointer:coarse) and (max-height:500px) and (min-width:701px) {
 .phone-layout .world-label {width:110px!important;}
}

/* Scenery belongs to its art viewport, never over the interactive sidebar. */
.turn-flow .turn-workspace :is(.game-scene,.scene-shade,.world-labels,.world-leaders,.building-labels) {position:absolute!important;inset:0!important;width:100%!important;height:100%!important;}
.turn-flow .turn-workspace .context-panel {z-index:10;height:100%;max-height:none;align-self:stretch;}
.turn-flow .turn-workspace .scene-shade {background:linear-gradient(180deg,#02050b44,transparent 25%,transparent 80%,#02050b88);}
.turn-flow .turn-workspace .compact-city-stats {position:static!important;inset:auto!important;width:100%;max-width:none;transform:none;padding:0;margin:0 0 16px;}
.turn-dock .turn-message {color:var(--fg);letter-spacing:0;text-transform:none;}
.turn-dock.has-warning .turn-message {color:var(--warn-fg);}
body.strategy-game :is(.game-views,.phone-views) .ui-button {border-color:transparent!important;background:transparent!important;font-weight:500;}
.turn-workspace .map-key-group {display:flex;align-items:center;gap:8px;}
.turn-workspace .map-key-group>span {display:inline-flex;align-items:center;gap:4px;}
@media(max-width:700px),(pointer:coarse) and (max-height:500px) {
 .art-phone .assessing-world .phone-art-dismiss {z-index:6;}
 .phone-layout .world-leaders line {display:block;opacity:.55;}
}
@media(max-width:360px),(max-height:620px) and (max-width:700px) {
}
@media(pointer:coarse) and (max-height:500px) and (min-width:701px) {
}

.context-body .notification-card {padding:14px;border:1px solid var(--border-subtle);border-radius:var(--panel-radius);background:var(--surface);}
.context-body .notification-card .notification-action {width:100%;margin-top:12px;}
.context-body .notification-card-head {align-items:flex-start;}
.context-body .city-resource-strip {display:flex;flex-wrap:wrap;gap:12px;}
.context-body .city-resource-strip .resource-stat {font-size:var(--text-meta);}
.context-body .city-resource-strip .resource-tooltip {position:static;transform:none;width:auto;max-width:100%;}

@media(min-width:701px) and (min-height:501px), (min-width:701px) and (pointer:fine) {
 .turn-workspace .world-label .map-work-state {display:block;font-size:var(--text-meta);color:var(--player);margin-top:1px;padding:0;background:none;}
 .turn-workspace .world-label .map-work-state.at-risk {color:var(--danger-fg);}
}

@media(max-width:700px),(pointer:coarse) and (max-height:500px) {
 .art-phone,.art-phone .phone-header {background:var(--canvas);}
}

/* Active work uses the same in-flow card as the choices below it. */
.context-body .city-slots {position:static!important;inset:auto!important;width:100%!important;max-height:none;display:block;margin:12px 0;transform:none;}
.context-body .city-slots .work-slot {position:static!important;inset:auto!important;width:100%!important;display:flex;flex-direction:column;align-items:stretch;gap:5px;margin:0;padding:12px;text-align:left;border:1px solid var(--border-strong);border-radius:var(--panel-radius);background:var(--surface-raised);color:var(--fg);box-shadow:none;}
.context-body .work-slot>span,.context-body .work-slot>small {font-size:var(--text-meta);color:var(--fg-muted);}
.context-body .work-slot>strong {font-size:var(--text-body);}
.context-body .work-slot .work-meter {height:3px;margin:3px 0;}
@media(max-width:700px),(pointer:coarse) and (max-height:500px) {
 .phone-actions .decision-action {position:sticky;bottom:0;z-index:2;background:var(--surface);padding-top:10px;padding-bottom:5px;box-shadow:0 -8px 12px var(--surface);}
}

@media(max-width:700px),(pointer:coarse) and (max-height:500px) {
 .phone-actions .decision-row[open] {overflow:visible;}
}

.context-body .city-slots .work-slot {height:auto!important;min-height:0!important;justify-content:flex-start;}
.context-body .city-slots .work-slot>* {flex:none;margin:0;line-height:1.4;}
.phone-game.art-phone>.phone-resources {background:var(--canvas);}

/* A single persistent prompt owns the decision sequence on both devices. */
.turn-dock .turn-prompt {position:relative;display:flex;align-items:center;gap:18px;width:100%;min-height:78px;margin:0;padding:16px 24px;text-align:left;border:0;border-radius:0;background:var(--surface);color:var(--fg);box-shadow:none;}
.turn-prompt:hover {background:var(--surface-raised);}
.turn-prompt:focus-visible {outline:2px solid var(--accent);outline-offset:-3px;}
.turn-prompt.has-choices {touch-action:pan-x;}
.turn-dock .turn-context {display:block;}
.turn-dock .turn-message {display:block;font-size:16px;line-height:1.3;}
.turn-dock .turn-detail {display:block;font-size:var(--text-meta);margin-top:4px;}
.turn-prompt-icon {display:grid;place-items:center;flex:none;width:42px;height:42px;border-radius:var(--control-radius);background:var(--accent);color:var(--on-accent,#160d06);font-size:23px;}
.turn-grip {position:absolute;top:6px;left:calc(50% - 18px);width:36px;height:3px;border-radius:2px;background:var(--fg-subtle);opacity:.5;}
.production-idle {display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 12px;padding:10px 0 16px;border-bottom:1px solid var(--border-subtle);}
.production-idle>span {display:grid;gap:4px;}
.production-idle strong {font-size:var(--text-meta);}
.production-idle small {font-size:var(--text-meta);color:var(--fg-muted);line-height:1.4;}
.production-idle .ui-button {min-width:70px;}
@media(max-width:700px),(pointer:coarse) and (max-height:500px) {
 .phone-game.art-phone>.phone-resources {grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;padding-left:16px;padding-right:16px;}
 .art-phone .phone-stat summary {grid-template-columns:18px 1fr;column-gap:4px;}
 .art-phone .phone-stat summary .resource-icon {width:16px;height:16px;}
 .art-phone .phone-stat summary strong {font-size:22px;}
 .art-phone .phone-stat summary small {font-size:var(--text-meta);}
 .art-phone .turn-dock.phone-controls {display:block;padding:0;min-height:0;}
 .art-phone .turn-dock .turn-prompt {min-height:76px;padding:17px 18px 12px;gap:10px;}
 .art-phone .turn-message {font-size:16px;}
 .art-phone .turn-detail {display:block;font-size:var(--text-meta);line-height:1.4;}
 .art-phone .turn-prompt-icon {width:38px;height:38px;font-size:22px;}
 .art-phone .map-totals {position:absolute;top:12px;left:0;right:0;display:flex;align-items:center;justify-content:center;gap:14px;z-index:5;font-size:var(--text-meta);line-height:1.4;pointer-events:none;text-shadow:0 1px 6px #020810;}
 .art-phone .map-totals>span:first-child {color:var(--fg-muted);}
 .art-phone.panel-open .map-totals {visibility:hidden;}
 .art-phone .phone-actions>.inline-work {margin-top:0;}
 .art-phone .phone-actions>.inline-work>.section-heading {display:none;}
}
/* The orange prompt stays the same as its choices slide into view below. */
@media(max-width:700px),(pointer:coarse) and (max-height:500px) {
 .art-phone .phone-workspace {overflow:hidden;}
 .art-phone .phone-workspace #board.phone-art-board {bottom:94px!important;height:auto!important;}
 .art-phone .turn-dock.phone-controls {position:absolute;left:12px;right:12px;bottom:8px;z-index:11;padding:0;border:2px solid var(--accent);border-radius:16px;background:var(--accent);overflow:hidden;}
 .art-phone .turn-dock .turn-prompt {min-height:74px;padding:17px 16px 13px;border:0;border-radius:0;background:var(--accent);color:var(--accent-on);}
 .art-phone .turn-prompt .turn-message {color:inherit;}
 .art-phone .turn-prompt .turn-detail {color:inherit;opacity:.8;}
 .art-phone .turn-prompt .turn-prompt-icon {width:30px;background:none;color:inherit;font-size:28px;font-weight:400;}
 .art-phone .turn-prompt .turn-grip {background:currentColor;opacity:.3;}
 .art-phone .turn-prompt:focus-visible {outline-color:var(--accent-on);outline-offset:-5px;}
 .art-phone .turn-dock.is-open {height:76%;max-height:calc(100% - 12px);background:var(--canvas);box-shadow:0 -12px 45px #0005;}
 .art-phone.panel-expanded .turn-dock.is-open {height:calc(100% - 12px);}
 .art-phone .turn-dock .phone-drawer {position:static;inset:auto;display:flex;flex-direction:column;width:100%;height:100%;max-height:none;border:0;border-radius:0;background:transparent;box-shadow:none;}
 .art-phone .phone-drawer>.turn-prompt {flex:none;}
 .art-phone .phone-art-dismiss {inset:0;width:100%;height:100%;}
 .art-phone .phone-actions {padding:12px 10px 18px;}
}
@media(max-width:360px),(max-height:620px) and (max-width:700px),(pointer:coarse) and (max-height:500px) {
 .art-phone .turn-dock .turn-prompt {min-height:66px;padding-top:13px;padding-bottom:10px;}
 .art-phone .turn-message {font-size:var(--text-body);}
 .art-phone .turn-prompt-icon {width:36px;height:36px;}
 .art-phone .map-totals {top:5px;font-size:var(--text-meta);}
}

@media(min-width:701px) and (min-height:501px), (min-width:701px) and (pointer:fine) {
 .turn-workspace>.turn-dock {min-height:0;}
 .turn-workspace .context-panel::before {z-index:-1;}
 .turn-workspace .world-labels,.turn-workspace .world-leaders {z-index:11;pointer-events:none;}
 .turn-workspace .world-label {pointer-events:auto;}
}
