/* Retro week: an enclosed stage, not a scrolling dashboard. */
.exploration-panel { position:absolute; inset:5% 4% 4%; z-index:12; display:flex; flex-direction:column; gap:14px; overflow:auto; padding:3px; }
.exploration-panel[hidden], .game-screen[data-exploring="true"] .character-stage, .game-screen[data-exploring="true"] .dialogue-shell { display:none; }
.exploration-person { position:absolute; top:0; right:0; width:30%; height:78%; padding:0; border:0; background:none; cursor:pointer; z-index:0; }
.exploration-person img { height:100%; width:100%; object-fit:contain; object-position:bottom; filter:drop-shadow(0 6px 8px #122a3255); mask-image:linear-gradient(#000 88%,transparent); }
.exploration-person:hover img,.exploration-person:focus-visible img { filter:drop-shadow(0 0 7px #ffe39b); }
.exploration-panel[data-person="true"] .exploration-intro { max-width:66%; }
.exploration-intro,.exploration-hotspots,.exploration-help { position:relative; z-index:1; }
.exploration-intro { max-width:680px; padding:16px 20px; border:1px solid #dcc890; border-radius:16px; background:#172e40eb; box-shadow:0 6px 24px #10232a66; color:#fff5dc; }
.exploration-intro > span { color:#e4cd8c; font-size:12px; letter-spacing:2px; }
.exploration-intro h2 { margin:6px 0; color:#ffe095; font-size:clamp(21px,3cqw,32px); }
.exploration-intro p { margin:0; font-size:clamp(13px,1.65cqw,18px); line-height:1.7; }
.exploration-hotspots { margin-top:auto; display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.exploration-spot { display:flex; align-items:center; gap:12px; min-height:74px; padding:12px 15px; text-align:left; color:#fff5d8; background:linear-gradient(115deg,#31566aef,#172e40f5); border:2px solid #bea66c; border-radius:12px; box-shadow:0 3px #132839; cursor:pointer; }
.exploration-spot:hover,.exploration-spot:focus-visible { background:#3c6474; border-color:#ffe193; outline:2px solid #fff1c1; outline-offset:2px; }
.spot-number { color:#ffd977; border:1px solid #d6be80; border-radius:50%; width:28px; height:28px; display:grid; place-items:center; flex-shrink:0; }
.exploration-spot strong { display:block; font-size:clamp(14px,1.9cqw,20px); }
.exploration-spot small { display:block; margin-top:5px; color:#e0e7df; font-size:clamp(11px,1.3cqw,14px); line-height:1.5; }
.exploration-leave { background:#182d3ad9; border-color:#86a5ad; }
.exploration-help { margin:0; padding:8px 14px; border-radius:8px; background:#152c3aeb; color:#fff1c9; font-size:12px; line-height:1.5; }
@media (max-width:600px) and (orientation:portrait) {
  .exploration-panel { inset:3% 3%; gap:10px; }
  .exploration-intro { padding:12px; }
  .exploration-person { display:none; }
  .exploration-panel[data-person="true"] .exploration-intro { max-width:none; }
  .exploration-hotspots { grid-template-columns:1fr; gap:8px; }
  .exploration-spot { min-height:58px; padding:9px 12px; }
}
body { background: #17232c; display: grid; place-items: center; min-height: 100dvh; }
#app { position: relative; width: min(1100px, 100vw, calc(100dvh * 4 / 3)); aspect-ratio: 4/3; min-height: 0; box-shadow: 0 16px 90px #0009; overflow: hidden; container-type: inline-size; }
.screen { position: absolute; inset: 0; min-height: 0; height: 100%; overflow: hidden; }
.topbar { position: absolute; inset: 0 0 auto; height: 9%; min-height: 0; padding: 0 2.4%; background: linear-gradient(#597b92ee,#2a415bd9); border-bottom: 3px solid #9cb7b7; z-index: 30; display: flex; gap: 12px; }
.brand-mini { display: none; }
.time-strip { margin: 0; display: flex; gap: 12px; color: #ffdb63; text-shadow: 2px 2px #3b3928; font-weight: 900; }
.time-strip strong,.time-strip span { font-size: clamp(13px,2.7cqw,28px); }
.top-actions { margin-left: auto; gap: 7px; }
.icon-btn { width: auto; min-width: 42px; height: 38px; border: 2px solid #8cb8bd; border-radius: 45%; background: linear-gradient(#78a9b1,#315c70); color: #fff7d9; font-size: 12px; box-shadow: 0 2px #17333c; }
.planner-screen { background: #a9c3b4 url("optimized/retro-town.775015018d94.webp") center/cover; }
.planner-screen[data-night="true"] { background-image: linear-gradient(#14284da6,#162239d9),url("optimized/retro-town.775015018d94.webp"); }
.weekly-goal-btn { position:absolute; z-index:2; left:4%; bottom:28%; max-width:92%; padding:6px 12px; font-size:13px; color:#fff1bd; background:#243e51f0; border:1px solid #cfb774; border-radius:6px; cursor:pointer; }
.goal-detail h3 { line-height:1.6; }
.goal-detail li { margin:14px 0; line-height:1.6; }
.goal-detail small { display:block; color:#5b746e; }
.goal-note { padding:12px; background:#fff9e7; border-left:3px solid #caa75e; line-height:1.8; }
.ending-goal { padding:14px; border:1px solid #ba9d61; background:#fff5d8; color:#314a50; line-height:1.7; }
.scene-night { background: radial-gradient(ellipse at 22% 45%,#c5ac7c 0%,#5a655f 29%,#253746 65%,#172333); }
.scene-night .decor-one { background:#1d3144; border-color:#849293; box-shadow:0 0 40px #bdcfcb22; }
.scene-night .decor-two { background:#655d50; }
.scene-night .decor-three { background:#29383a; }
.planner-body { position: absolute; inset: 9% 0 0; padding: 0; width: 100%; max-width: none; overflow: hidden; }
.planner-hero { position: absolute; bottom: 2%; left: 3%; right: 3%; margin: 0; padding: 15px 22px; height: 24%; min-height: 0; display: block; color: white; border: 4px solid #54758b; border-radius: 25px; background: #172b3eee; box-shadow: 0 0 0 2px #192934; }
.planner-hero h2 { display: none; }
.planner-hero .eyebrow { color: #ffe090; margin: 0 0 5px; font-size: 15px; letter-spacing: 1px; }
.planner-hero p:not(.eyebrow) { color: #fff9e9; font-size: clamp(14px,1.9cqw,21px); line-height: 1.7; margin: 0; max-width: none; }
.meeting-readiness,.planner-aside,.planner-footer,.section-heading,.ai-status-pill { display: none; }
.week-strip { position: absolute; top: 2%; left: 3%; right: 3%; gap: 6px; margin: 0; }
.day-pill { min-height: 0; padding: 7px 0; border-radius: 7px; background: #f9f1d8dc; border: 1px solid #9a9e87; box-shadow: 0 2px 3px #2344; }
.day-pill span,.day-pill i { display: none; }
.day-pill b { font-size: 13px; }
.day-pill.active { background: #f8d169; color: #273d49; border: 2px solid #fff1af; }
.planner-content,.planner-content > section { display: contents; }
.action-grid { position: absolute; inset: 13% 5% 29%; display: block; }
.action-card { position: absolute; width: 30%; min-height: 0; padding: 10px 12px; border: 2px solid #f3e1a6; border-radius: 9px; background: linear-gradient(#466b7a,#263d53); color: #fff8df; text-align: center; box-shadow: 0 3px 0 #172b3f,0 7px 15px #1236; transition: transform .15s; }
.action-card.rest-card { background: linear-gradient(#466b7a,#263d53); }
.action-card:hover { transform: translateY(-4px); background: #476b80; border-color: #ffdb68; }
.action-card:disabled { opacity: .55; }
.action-card strong { display: block; color: #fff3c6; margin: 0; font-size: clamp(12px,1.9cqw,20px); }
.action-card p,.action-card .action-gain,.action-icon { display: none; }
.action-card:nth-child(1) { left: 6%; top: 12%; }
.action-card:nth-child(2) { right: 2%; top: 18%; }
.action-card:nth-child(3) { left: 18%; top: 43%; }
.action-card:nth-child(4) { left: 1%; bottom: 4%; }
.action-card:nth-child(5) { right: 2%; bottom: 3%; }
.action-grid:has(.action-card:nth-child(6)) .action-card:nth-child(1) {left:3%;top:8%;bottom:auto;right:auto;}
.action-grid:has(.action-card:nth-child(6)) .action-card:nth-child(2) {right:3%;top:8%;bottom:auto;left:auto;}
.action-grid:has(.action-card:nth-child(6)) .action-card:nth-child(3) {left:3%;top:40%;bottom:auto;right:auto;}
.action-grid:has(.action-card:nth-child(6)) .action-card:nth-child(4) {right:3%;top:40%;bottom:auto;left:auto;}
.action-grid:has(.action-card:nth-child(6)) .action-card:nth-child(5) {left:3%;bottom:14%;top:auto;right:auto;}
.action-grid:has(.action-card:nth-child(6)) .action-card:nth-child(6) {right:3%;bottom:14%;top:auto;left:auto;}
.action-card.special { left: 25%; top: 35%; width: 50%; padding: 22px; background:linear-gradient(#466b7a,#263d53); }
.action-card.special::before,.action-card.special::after { display:none; }
.action-card.special .action-gain { display: block; color: #ffe091; margin-top: 10px; }
.scene { position: absolute; inset: 9% 0 0; min-height: 0; height: auto; overflow: hidden; }
.scene-doctor,.scene-pathology,.scene-lobby { background-color: #d6dfd2; }
.scene-office,.scene-meeting { background-color: #d9dacb; }
.scene { transition: none; }
.scene-office .scene-decor,.scene-meeting .scene-decor { display: none; }
.scene-doctor .scene-decor,.scene-pathology .scene-decor,.scene-lobby .scene-decor,.scene-noise { display: none; }
.mission-card,.statusbar { display: none; }
.character-stage { inset: 8% 0 18%; display: block; }
.npc-avatar.has-art { position: absolute; right: 3%; bottom: 0; width: 48%; height: 100%; aspect-ratio: auto; border: 0; border-radius: 0; box-shadow: none; background: none; transform: none; animation: none; overflow: hidden; mask-image: linear-gradient(to bottom,#000 83%,transparent 100%); }
.npc-avatar.has-art img { width: 100%; height: 100%; object-fit: cover; object-position: top center; border-radius: 45% 45% 0 0; mask-image: linear-gradient(to right,transparent,#000 9%,#000 91%,transparent); }
.npc-avatar.has-art > i { display: none; }
.game-screen[data-speaker="player"] .npc-avatar.has-art { right: auto; left: 3%; }
.npc-avatar.has-art[data-cutout="true"] img { object-fit: contain; object-position: bottom center; border-radius: 0; mask-image: none; }
.dialogue-shell { inset: auto 3% 2%; min-height: 25%; max-height: 56%; overflow-y: auto; padding: 40px 24px 24px; border: 5px solid #54738a; border-radius: 27px; background: #182b3ef5; box-shadow: 0 0 0 2px #182836; backdrop-filter: none; }
.speaker-row { top: 0; left: 20px; padding: 4px 30px; min-width: 230px; border-radius: 0; box-shadow: none; background: linear-gradient(90deg,transparent,#929b33 20%,#929b33 75%,transparent); }
.speaker-row strong { font-size: 21px; text-shadow: 1px 2px #333; }
.speaker-row span { font-size: 11px; }
.auto-btn { left: calc(100% + 18px); top: 3px; font-size: 12px; }
#dialogue-text { font-size: clamp(15px,2cqw,22px); line-height: 1.65; min-height: 0; padding-right: 32px; }
.choices { margin-top: 14px; gap: 7px; }
.choice-btn { padding: 10px 12px; border: 1px solid #88a2b1; border-radius: 5px; background: #2b475b; color: #fff4d4; font-size: clamp(12px,1.6cqw,17px); }
.next-btn { right: 14px; bottom: 10px; color: #ffe08a; }
.ai-practice-btn { font-size: 12px; margin: 8px 0 0; padding: 5px 9px; }
.title-screen { background: #cddaca url("optimized/retro-town.775015018d94.webp") center/cover; }
.title-art { display: none; }
.title-gradient { background: linear-gradient(90deg,#182d43f2,#203b5866 65%,transparent); }
.title-copy { position: relative; width: 85%; padding: 6%; color: #fff2c7; }
.title-copy h1 { font-family: "Songti SC","SimSun",serif; font-size: clamp(40px,8cqw,86px); text-shadow: 3px 4px #183044; }
.title-copy h1 span { color: #ffda73; }
.title-subtitle { color: #ffefcf; max-width: 420px; font-size: 15px; }
.title-copy .eyebrow,.title-copy .text-btn { color: #ffe3a6; }
.title-footer { color: #fff0c8; font-size: 11px; }
.primary-btn { background: linear-gradient(#f6d581,#d8a34d); color: #273c4d; border: 2px solid #ffe7a6; border-radius: 8px; }
.ending-screen { overflow: auto; background: #e9e0bd; }
.ending-content { padding: 24px; color:#273e49; }
.ending-content h2 {font-size:clamp(27px,3.8cqw,40px);color:#273e49;}
.ending-content > p:not(.eyebrow) {color:#3d555b;}
.ending-content .eyebrow {color:#78591d;}
.ending-stats div {border-color:#b5aa81;background:#fff8e4;}
.ending-stats span {color:#52646a;font-size:12px;}
.ending-stats b {color:#73551e;}
.ending-actions .ghost-btn {color:#fff5d6;border-color:#698a9a;background:#2d4b60;}
@keyframes retro-arrive { from { opacity: 0; translate: 12px 0; } to { opacity: 1; translate: 0 0; } }
@media (max-width: 600px) and (orientation: portrait) {
  #app { width: 100vw; height: 100dvh; aspect-ratio: auto; }
  .topbar { height: 8%; padding: 0 10px; gap: 5px; }
  .time-strip { gap: 5px; flex-wrap: wrap; }
  .time-strip span,.time-strip strong { font-size: 15px; }
  #location-label { display: inline; font-size: 12px; }
  .top-actions { gap: 3px; }
  .icon-btn { min-width: 34px; height: 34px; font-size: 10px; }
  .planner-body,.scene { top: 8%; }
  .planner-hero { height: 24%; padding: 12px; }
  .planner-hero p:not(.eyebrow) { font-size: 16px; }
  .action-card { width: 43%; padding: 12px 5px; }
  .action-card strong { font-size: 14px; }
  .action-card:nth-child(3) { left: 24%; }
  .npc-avatar.has-art { width: 77%; right: 0; height: 84%; }
  .dialogue-shell { min-height: 30%; max-height: 64%; padding: 42px 14px 32px; }
  #dialogue-text { font-size: 17px; padding-right: 0; }
  .speaker-row { left: 3px; min-width: 190px; padding: 5px 16px; }
  .speaker-row strong { font-size: 18px; }
  .choice-btn { font-size: 14px; }
  .title-copy { width: 100%; }
  .title-copy h1 { font-size: 56px; }
  .title-footer { gap: 5px; flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) { *,*::before,*::after { animation: none !important; transition: none !important; } }

/* Reading controls and tracked objectives. */
/* Keep a location's defining objects visible above dialogue, including old saves. */
.scene[data-scene-art] { background-size:cover; background-position:center top; background-repeat:no-repeat; }
.scene[data-scene-art] .scene-decor { display:none; }
.npc-avatar.has-art { width:42%; }
@media (max-width:600px) and (orientation:portrait) {
  .scene[data-scene-art] { background-size:auto 72%; background-color:#213a45; }
  .npc-avatar.has-art { width:60%; top:13%; bottom:auto; height:87%; }
  .npc-avatar.has-art[data-cutout="true"] img { object-position:top center; }
}

.save-panel {padding-top:6px;}
.save-help {font-size:13px;line-height:1.7;color:#526a69;}
.save-notice {padding:10px 12px;background:#fff0c7;border-left:4px solid #bc913f;color:#6c4d17;font-size:14px;line-height:1.6;}
.save-slot {margin:12px 0;padding:14px;border:1px solid #9aafad;border-radius:12px;background:#fffdf5;}
.save-slot-heading {display:flex;gap:14px;align-items:center;}
.save-slot-number {font-size:27px;font-weight:900;color:#a9823c;}
.save-slot h3 {margin:0 0 4px;font-size:17px;}
.save-slot p {margin:0;font-size:14px;line-height:1.5;}
.save-slot small {color:#667d77;font-size:12px;}
.save-slot-actions {display:flex;gap:10px;margin-top:12px;}
.save-slot-actions button {flex:1;padding:10px 8px;border:1px solid #789b9c;border-radius:7px;background:linear-gradient(#52798b,#2b485a);color:#fff4d4;font-weight:700;cursor:pointer;}
.save-slot-actions button:disabled {opacity:.4;cursor:not-allowed;}
.save-slot-actions button:focus-visible {outline:3px solid #c89b3c;outline-offset:3px;}
.dialogue-shell[data-can-advance="true"] { cursor:pointer; }
.dialogue-shell[data-can-advance="false"] { cursor:default; }
.dialogue-shell .story-clue,.exploration-panel .story-clue { color:#ffda63; font-weight:800; background:none; }
.goal-highlight { color:#ffe184; font-weight:900; text-decoration:underline; text-decoration-color:#be944c; text-underline-offset:4px; }
.goal-menu-btn { color:#243b49; background:linear-gradient(#ffe4a0,#d9ae55); border-color:#ffecc0; font-weight:900; }
.current-goal-chip { position:absolute; z-index:4; top:12px; left:3%; max-width:85%; padding:9px 14px; border:1px solid #e9c269; border-left:5px solid #ffda73; border-radius:7px; background:#19384be8; color:#ffe194; font-size:clamp(12px,1.55cqw,17px); font-weight:800; line-height:1.5; text-align:left; cursor:pointer; box-shadow:0 3px 12px #10253355; }
.weekly-goal-btn { border-left:5px solid #ffda73; color:#ffe194; font-weight:800; }
.current-goal-detail { background:#fff2c8; color:#263f45; border-left:5px solid #af7c23; padding:16px; margin-bottom:20px; }
.current-goal-detail h2 { font-size:23px; line-height:1.5; margin:7px 0; color:#734e13; }
.current-goal-detail p { line-height:1.7; margin:8px 0 0; }
.current-goal-detail small { color:#735220; font-weight:800; }
.ai-disclosure { font-size:12px; color:#687e75; margin:0 0 8px; }
.ai-disclosure summary { cursor:pointer; width:fit-content; margin-left:auto; }
.ai-disclosure p { font-size:12px; line-height:1.6; margin:8px 0; }
.ai-disclosure .ai-consent { display:block; }
@media (max-width:600px) and (orientation:portrait) {
  .topbar { height:92px; display:grid; grid-template-columns:1fr; grid-template-rows:1fr 1fr; gap:0; padding:5px 10px; }
  .time-strip { grid-column:1; grid-row:1; justify-self:start; flex-wrap:nowrap; gap:6px; }
  .top-actions { grid-column:1; grid-row:2; margin-left:0; width:100%; justify-content:flex-end; }
  .planner-body,.scene { top:92px; }
  .current-goal-chip { top:9px; max-width:94%; font-size:13px; padding:7px 9px; }
  .weekly-goal-btn { font-size:12px; }
}
.ending-screen { align-items: start; }
.ending-rank { width: 140px; height: 90px; font-size: 32px; border-radius: 22px; }
.ending-evaluation { text-align: left; color: #314a50; }
.review-total { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 2px solid #ba9d61; padding-bottom: 12px; }
.review-total strong { font-size: 36px; color: #73551e; }
.review-total small { font-size: 16px; font-weight: normal; }
.review-breakdown { display: grid; gap: 12px; }
.review-breakdown section { background: #fff8e4; border: 1px solid #c1b38b; border-radius: 12px; padding: 14px; }
.review-breakdown h3 { display: flex; justify-content: space-between; margin: 0 0 8px; font-size: 18px; }
.review-breakdown ul { list-style: none; margin: 0; padding: 0; }
.review-breakdown li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; font-size: 14px; }
.review-breakdown b { white-space: nowrap; color: #73551e; }
.review-relationships { display: flex; flex-wrap: wrap; gap: 8px; }
.review-relationships span { padding: 7px 12px; border-radius: 8px; background: #fff8e4; }
.review-missing { padding-left: 22px; font-size: 14px; line-height: 1.8; }
.review-missing li { margin-bottom: 8px; }
.review-rules { border-top: 1px solid #b5aa81; padding-top: 14px; font-size: 13px; line-height: 1.8; }
.review-rules summary { cursor: pointer; font-weight: bold; }
.goal-menu-btn[data-pending="false"] { background: linear-gradient(#78a9b1,#315c70); color: #fff7d9; }
.pending-task-list { list-style: none; padding: 0; }
.pending-task-list li { border-left: 3px solid #b9984a; padding: 6px 14px; background: #fff9e7; }
.pending-task-list h3 { margin: 4px 0; font-size: 18px; }
.pending-task-list p { margin: 4px 0; line-height: 1.8; }
.pending-task-list h3 b,.task-history h3 b { display:inline-block; margin-left:8px; font-size:14px; }
.task-history { list-style:none; padding:0; }
.task-history li { padding:10px 14px; border-left:4px solid; margin:14px 0; }
.task-history h3 { margin:0; font-size:18px; }
.task-history p { margin:6px 0 0; }
.task-completed { color:#146140; background:#eaf5ec; border-color:#27824c; }
.task-missed { color:#a52e35; background:#fff0ed; border-color:#c7434d; }
.task-completed h3,.task-completed h3 b { color:#146140; }
.task-missed h3,.task-missed h3 b { color:#a52e35; }
/* The travel map uses a wider stage and more vertical room than dialogue. */
#app:has(#planner-screen:not([hidden])) { width:min(1440px,100vw,calc(100dvh * 16 / 10)); aspect-ratio:16/10; }
.planner-hero { height:16%; padding:12px 20px; }
.planner-hero p:not(.eyebrow) { font-size:clamp(14px,1.5cqw,19px); }
.map-expanded { inset:11% 3% 21%; display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:5%; overflow:auto; padding:6px; align-items:stretch; align-content:start; }
.map-zone { min-width:0; padding:16px; border:2px solid #abbbad; border-radius:16px; background:#193547d9; box-shadow:0 4px 16px #13293288; }
.map-zone h3 { margin:0 0 16px; color:#ffe194; font-size:clamp(18px,2cqw,26px); line-height:1.4; text-align:center; }
.map-places { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); grid-auto-rows:1fr; gap:12px; }
.hospital-zone { display:flex; flex-direction:column; }
.hospital-zone .map-places { flex:1; align-items:stretch; }
.map-expanded .action-card:nth-child(n) { position:static; width:100%; min-height:58px; padding:12px 8px; }
.map-expanded .action-card strong { font-size:clamp(14px,1.4cqw,19px); }
.skip-meeting-btn { position:absolute; bottom:6%; left:20%; width:60%; padding:12px; background:#263d53; color:#fff4d4; border:2px solid #a9b7b7; border-radius:8px; cursor:pointer; }
.handoff-meeting-btn { bottom:16%; }
.meeting-day-actions { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:14px; overflow:auto; }
.meeting-day-actions .action-card.special,.meeting-day-actions .skip-meeting-btn { position:static; flex:none; width:60%; margin:0; }
.meeting-day-actions .action-card.special { min-height:90px; }
.map-expanded .end-work-btn { position:static; grid-column:1/-1; width:auto; justify-self:center; padding:10px 26px; }
.week-two-map .map-zone { display:flex; flex-direction:column; }
.week-two-map .map-zone p { color:#f6eccc; font-size:14px; line-height:1.6; }
.week-two-map .skip-meeting-btn { position:static; grid-column:1/-1; justify-self:center; max-width:100%; }
.week-two-map .map-places { flex:1; }
@media (min-width:1025px) {
  #game-screen:is([data-week="2"],[data-week="3"]) .time-strip { flex:1; min-width:0; gap:8px; }
  #game-screen:is([data-week="2"],[data-week="3"]) .time-strip span,#game-screen:is([data-week="2"],[data-week="3"]) .time-strip strong { font-size:clamp(16px,1.9cqw,22px); white-space:nowrap; }
  #game-screen:is([data-week="2"],[data-week="3"]) #location-label { overflow:hidden; text-overflow:ellipsis; }
  #game-screen:is([data-week="2"],[data-week="3"]) .top-actions { flex:none; }
  #game-screen:is([data-week="2"],[data-week="3"]) .icon-btn { white-space:nowrap; }
}
@media (max-width:600px) and (orientation:portrait) {
  #app:has(#planner-screen:not([hidden])) { width:100vw; height:100dvh; aspect-ratio:auto; }
  .map-expanded { grid-template-columns:1fr; gap:14px; inset:10% 2% 21%; }
  .map-zone { padding:12px; }
  .map-zone h3 { font-size:20px; margin-bottom:10px; }
  .map-places { gap:8px; }
  .map-expanded .action-card:nth-child(n) { min-height:48px; }
  .planner-hero { height:16%; padding:10px; overflow:auto; }
}
/* A negotiated cancellation is neither success nor a missed obligation. */
.task-cancelled { border-color: #94adad; opacity: .9; }
.task-cancelled h3 b { color: #94adad; }
.ending-share { margin: 1rem 0; display: flex; flex-wrap: wrap; gap: .75rem; }
.ending-share p { flex-basis: 100%; }
#ending-title { text-wrap: balance; }
.ending-content .trial-result { display:grid; grid-template-columns:1fr auto; gap:4px 14px; text-align:left; padding:16px 18px; border-radius:12px; border-width:2px; }
.trial-label { align-self:center; font-weight:700; }
.trial-status { font-size:26px; line-height:1.3; }
.trial-summary { grid-column:1 / -1; font-size:14px; line-height:1.6; }
.ending-content .trial-result.is-pass { background:#e9f3e6; border-color:#6a8b67; color:#2d563c; }
.ending-content .trial-result.is-fail { background:#fae9dd; border-color:#af493e; color:#813b32; }
.trial-rank.is-fail { background:#a64036; color:#fff6e8; box-shadow:0 12px 28px rgba(120,40,30,.18); }
.trial-reasons { margin:16px 0; padding:14px 16px; border-left:4px solid #af493e; border-radius:8px; background:#fae9dd; color:#813b32; }
.trial-reasons h3 { margin:0 0 8px; font-size:18px; }
.trial-reasons ul { margin:0; padding-left:20px; font-size:14px; line-height:1.7; }
.trial-reasons li + li { margin-top:8px; }
.trial-score { margin:16px 0; padding:16px; border:1px solid #ba9d61; border-radius:12px; background:#fff8e4; }
.trial-score .review-total { margin:0; gap:12px; }
.trial-score .review-total strong { white-space:nowrap; }
.trial-score-note { margin:10px 0 0; font-size:13px; line-height:1.7; color:#52646a; }
.trial-checks { margin:16px 0; padding:14px 16px; border:1px solid #c1b38b; border-radius:12px; background:#fff8e4; }
.trial-checks h3 { margin:0 0 8px; font-size:18px; }
.trial-checks ul { list-style:none; margin:0; padding:0; }
.trial-checks li { display:flex; justify-content:space-between; align-items:flex-start; gap:14px; padding:10px 0; line-height:1.6; font-size:14px; border-bottom:1px solid #ddd1ad; }
.trial-checks li b { flex-shrink:0; }
.trial-checks .is-met b { color:#2d6542; }
.trial-checks .is-unmet { color:#8a3831; font-weight:700; }
.trial-checks p { margin:12px 0 0; font-size:13px; line-height:1.7; }
@media (max-width:600px) {
  .ending-content .trial-result { padding:12px 14px; }
  .trial-status { font-size:24px; }
  .trial-score,.trial-checks { padding:14px; }
  .trial-score .review-total { font-size:14px; }
  .trial-score .review-total strong { font-size:30px; }
  .trial-score .review-total small { font-size:13px; }
}
