@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@400;600;700;800&display=swap');
:root{color-scheme:light;--paper:#f4efe6;--card:#fffdf8;--ink:#2a2f3a;--muted:#6f6a73;--line:#e0d9cb;--slate:#3f5a73;--teal:#1d7f80;--amber:#c27f22;--gold:#d9a531;--moss:#5f8a3a}
*{box-sizing:border-box}body{margin:0;background:var(--paper);color:var(--ink);font-family:'DM Sans',system-ui,sans-serif}
button,a,canvas,.stage{-webkit-tap-highlight-color:transparent}button{font:inherit;cursor:pointer;touch-action:manipulation;border:0;color:inherit}button:disabled{cursor:default}
button:focus-visible,a:focus-visible,canvas:focus-visible{outline:3px solid var(--teal);outline-offset:3px}a{color:inherit;text-decoration:none}[hidden]{display:none!important}
.shell{max-width:1220px;margin:auto;padding:24px 38px 44px}
header{display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line);padding-bottom:18px}
.brand{font:800 16px 'Manrope',sans-serif;letter-spacing:2px}.brand span{color:var(--amber)}
.utilities{display:flex;gap:8px}.utilities button{padding:9px 13px;border:1px solid var(--line);border-radius:8px;background:transparent;font-size:12px;font-weight:700}.utilities button:disabled{opacity:.45}
.heading{display:flex;align-items:flex-end;justify-content:space-between;margin:34px 0 25px}
.eyebrow{font-size:10px;font-weight:800;letter-spacing:1.8px;margin:0 0 12px;color:var(--slate)}
h1{font:800 clamp(38px,5vw,62px)/1.05 'Manrope',sans-serif;letter-spacing:-3px;margin:0}h1 em{font-style:normal;color:var(--teal)}
.tagline{color:var(--muted);font-size:14px;line-height:1.7;margin:0 0 4px;text-align:right}
.layout{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:30px}
.tower{border:1px solid var(--line);border-radius:20px;padding:20px;background:var(--card);box-shadow:0 12px 40px #3a2f1a08}
.hud{display:grid;grid-template-columns:1.2fr .8fr .8fr 1.1fr;padding-bottom:15px;border-bottom:1px solid var(--line)}
.hud>div{padding-left:15px;border-left:1px solid var(--line);min-width:0}.hud>div:first-child{padding-left:0;border:0}
.hud small{display:block;color:var(--muted);font-size:9px;letter-spacing:1px;font-weight:700}
.hud strong{display:flex;align-items:center;gap:6px;font:800 23px 'Manrope',sans-serif;margin-top:6px;white-space:nowrap;min-height:30px}
.stars{display:block;font-size:11px;letter-spacing:1px;color:var(--gold);margin-top:2px}
.parts{gap:3px!important}.part{display:inline-block;width:28px;height:28px;background:center/contain no-repeat;opacity:.22;filter:grayscale(1);transition:opacity .3s,filter .3s}.part.got{opacity:1;filter:none}
.opening{display:flex;align-items:center;gap:14px;background:#e6eef0;padding:18px;border-radius:12px;margin:16px 0}
.sun{font-size:38px;color:var(--teal)}.opening h2{font:800 18px 'Manrope',sans-serif;margin:0 0 6px}.opening p{font-size:12px;line-height:1.5;margin:0;color:#4f5a64}
.opening-condition{margin-top:8px!important}.opening-ai-note{margin-top:8px!important;color:var(--teal)!important;font-weight:600}.opening-actions{display:flex;gap:8px;margin-left:auto}
.primary,.secondary{padding:12px 15px;font-size:12px;font-weight:800;border-radius:9px;transition:transform .12s}
.primary{background:var(--teal);color:#fff}.secondary{background:#e6eef0;color:var(--teal);border:1px solid #c9dcdf}
.primary:active,.secondary:active{transform:translateY(2px)}.primary:disabled,.secondary:disabled{opacity:.55}
.text-button{background:none;color:var(--teal);padding:7px;font-size:11px;font-weight:700}.text-button:disabled{opacity:.45}
.day-line{display:flex;justify-content:space-between;gap:10px;font-size:10px;color:var(--muted);padding:12px 0 6px}.day-line span:first-child{color:var(--teal);font-weight:700}
.rule-impact{font-size:11px;color:var(--muted);margin:0 0 12px}.small{font-size:11px;color:var(--muted)}
.stage{display:flex;justify-content:center;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
.frame{position:relative;width:min(100%,420px);padding:8px;border-radius:18px;background:linear-gradient(#5d6a78,#38424e);box-shadow:inset 0 3px 0 #ffffff1c,0 14px 30px #1f2a3a33}
#stack{display:block;width:100%;height:auto;aspect-ratio:2/3;border-radius:12px;background:#4b4f86;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;cursor:pointer}
.flash{position:absolute;left:0;right:0;top:18%;margin:0;text-align:center;font:800 18px 'Manrope',sans-serif;color:#fff8e6;text-shadow:0 1px 4px #000a;pointer-events:none}
.notice{font-size:12px;line-height:1.5;color:var(--teal);min-height:36px;margin:11px 0}
.controls{font-size:9px;line-height:1.6;color:var(--muted);margin:10px 0 0}
.story-card,.result{background:#e9eff0;border:1px solid #d3e0e2;padding:22px;border-radius:14px}
.story-card h2,.result h2{font:800 25px/1.25 'Manrope',sans-serif;letter-spacing:-.8px;margin:0 0 12px}
.story-card>p:not(.eyebrow),.result>p{font-size:12px;line-height:1.75;color:#55606a}
.rule-note{padding:11px;border-left:2px solid #93bcc0;background:#fff8;font-size:11px;line-height:1.6;color:var(--teal);margin:15px 0}
.story-card .secondary{width:100%;background:var(--teal);color:#fff}.story-card .small{font-size:9px!important;margin-bottom:0}
.result{margin-top:16px;background:#f6ecdc;border-color:#eadbc3}.reflection{padding:12px;border:1px dashed #d6bc98;border-radius:9px}
.result .practice-stats{padding:9px 11px;border-radius:9px;background:#fff8;color:var(--slate);font-weight:600}
.reflection small{font-size:8px;letter-spacing:1px;color:#a27950;font-weight:800}.reflection p{font-size:12px;line-height:1.7;margin:7px 0 0}
.result-actions{display:grid;gap:8px;margin-top:16px}
.field-guide{margin:25px 0 20px;padding:0 6px}.field-guide h3{font:800 15px 'Manrope',sans-serif;margin:0 0 12px}.field-guide p{font-size:11px;color:var(--muted);line-height:1.7;margin:8px 0}.field-guide b{color:var(--ink)}
.game-help-links{display:flex;flex-wrap:wrap;align-items:center;gap:6px 16px;margin:14px 0}
.game-help-links a,.game-help-links button{display:inline-flex;align-items:center;min-height:44px;padding:0 8px;touch-action:manipulation;background:transparent}
.game-help-links .play-guide-link{color:var(--teal);font-size:14px;text-decoration:underline;text-underline-offset:3px}.catalog{font-size:11px;font-weight:700}
#help-panel{width:min(560px,calc(100vw - 24px));max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);padding:0;border:1px solid var(--line);border-radius:16px;background:var(--paper);color:var(--ink);overflow:hidden;box-shadow:0 18px 70px #2a2f3a33}
#help-panel::backdrop{background:#2a2f3a80}
.lab-help{display:flex;flex-direction:column;max-height:calc(100dvh - 24px)}
.help-body{min-height:0;overflow:auto;overscroll-behavior:contain;padding:22px;line-height:1.65;overflow-wrap:anywhere}
.help-body h2{font:800 24px/1.25 'Manrope',sans-serif;margin:0 0 14px}.help-body p,.help-steps{font-size:14px}
.help-state{padding:12px;border-radius:9px;background:#e6eef0;color:var(--teal)}
.help-steps{padding-left:22px}.help-steps li{padding-left:4px;margin:12px 0}.help-body .help-keys{font-size:12px;color:var(--muted)}
.help-full-guide{display:inline-flex;align-items:center;min-height:44px;color:var(--teal);text-decoration:underline;text-underline-offset:3px}
.help-actions{flex:0 0 auto;border-top:1px solid var(--line);padding:14px 22px;background:var(--paper)}.help-actions button{width:100%;min-height:44px;font-size:14px;white-space:normal}
body[data-phase=paused] .tower{border-color:#b9cfd2}body[data-phase=paused] .day-line span:first-child:before{content:'PAUSED · '}
@media(max-width:900px){.shell{padding:18px 22px 30px}.layout{grid-template-columns:minmax(0,1fr) 250px;gap:18px}.tower{padding:15px}.opening{flex-wrap:wrap}.opening-actions{width:100%;margin-left:0}.opening-actions button{flex:1}.tagline{display:none}}
/* Keep the HUD clear of the mobile sticky header when a tower starts or practice begins. */
.tower,.result{scroll-margin-top:76px}
@media(max-width:700px){.shell{padding:12px 12px 24px}header{position:sticky;top:0;z-index:3;background:var(--paper);padding:6px 0 12px}.brand{font-size:13px;letter-spacing:1.2px}.utilities button{padding:8px 10px;font-size:10px;min-height:44px}.heading{margin:21px 5px 18px}.eyebrow{font-size:9px;letter-spacing:1.3px}h1{font-size:38px;letter-spacing:-2px}.layout{display:block}.tower{padding:12px;border-radius:15px}.hud{grid-template-columns:1.25fr .8fr .8fr 1.15fr}.hud>div{padding-left:8px}.hud small{font-size:9px;letter-spacing:.4px}.hud strong{font-size:19px;gap:4px}#score{font-size:16px}.part{width:22px;height:22px}.opening{margin:12px 0;padding:13px}.opening .sun{display:none}.opening h2{font-size:16px}.opening p{font-size:12px}.day-line{padding:10px 0 4px}.rule-impact{margin-bottom:10px}.frame{padding:6px}.notice{font-size:12px}.controls{font-size:10px}aside{margin-top:18px}.help-body{padding:16px}.help-actions{padding:12px 16px}.help-body h2{font-size:22px}button{min-height:44px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{transition:none!important;animation:none!important}}
/* Reviewed goal choices sit with the start controls, including the compact feed. */
.opening-copy{min-width:0;flex:1}.opening-goals{min-width:0;margin:14px 0 0;padding:0;border:0}.opening-goals legend{font-size:12px;font-weight:800;margin:0 0 8px}.goal-options{display:flex;flex-wrap:wrap;gap:6px}.goal-choice{min-height:44px;padding:9px 11px;border:1px solid #b7c8c4;border-radius:8px;background:#fff9;color:var(--ink);font-size:11px;font-weight:700;line-height:1.35;text-align:left;white-space:normal}.goal-choice[aria-pressed=true]{background:var(--teal,var(--green));color:#fff;border-color:currentColor}.goal-choice:disabled{opacity:.6}.opening-goals p{margin:8px 0 0;font-size:11px;line-height:1.5;color:var(--muted)}.goal-choice:focus-visible{outline:3px solid var(--gold);outline-offset:2px}
@media(max-width:700px){.goal-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}.goal-choice{font-size:10px;padding:8px 6px}.opening-goals{margin-top:10px}}
.cc-embed .opening-goals{margin-top:10px}.cc-embed .opening-goals p{font-size:10px}.cc-embed .opening .opening-ai-note{font-size:10px}

.ai-choice{display:flex;align-items:center;flex-wrap:wrap;gap:4px 12px;margin-top:10px}.ai-choice button{min-height:44px;border:1px solid var(--line);border-radius:8px;background:#fff8;padding:9px 12px;font-size:12px}.ai-choice button:disabled{cursor:default;opacity:.65}.preview-date{font-size:10px;color:var(--muted)}.ai-choice p{flex:0 0 100%;margin:0;font-size:11px;line-height:1.5}.cc-embed .ai-choice p{font-size:10px}

/* Inside the /play/ feed (html.cc-embed, set by play-bridge.js): no site chrome, and the
   opening, HUD and tower share one screen. The opening sits over the tower, and the 2:3
   tower frame fits the height left for it. */
.cc-embed .brand,.cc-embed .heading,.cc-embed .story-card,.cc-embed .field-guide,.cc-embed .controls,.cc-embed .catalog{display:none}
.cc-embed .shell{position:relative;display:flex;flex-direction:column;height:100vh;height:100dvh;max-width:1220px;padding:8px 12px 10px}
.cc-embed header{position:static;justify-content:flex-end;border:0;padding:0 0 6px;background:none;z-index:auto}
.cc-embed .game-help-links{position:absolute;top:8px;left:12px;margin:0;z-index:3}
.cc-embed .game-help-links .play-guide-link{min-height:44px;padding:0 4px;font-size:0}
.cc-embed .game-help-links .play-guide-link::before{content:'How to play';font-size:12px;font-weight:700}
.cc-embed .layout{flex:1;min-height:0;grid-template-columns:minmax(0,1fr) auto;gap:16px}
.cc-embed aside{min-height:0;overflow:auto}
.cc-embed .tower{display:grid;min-height:0;padding:12px;grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto auto auto minmax(0,1fr) auto;grid-template-areas:"hud" "line" "status" "impact" "stage" "notice"}
.cc-embed .hud{grid-area:hud;padding-bottom:10px}.cc-embed .day-line{grid-area:line;padding:8px 0 2px}.cc-embed #progress-status{grid-area:status;margin:0}
.cc-embed .rule-impact{grid-area:impact;margin:0 0 8px}.cc-embed .notice{grid-area:notice;margin:6px 0 0;min-height:36px}
.cc-embed .stage{grid-area:stage;min-height:0;align-items:center;container-type:size}
.cc-embed .frame{width:min(100%,calc((100cqh - 16px) * 2 / 3 + 16px),420px)}
.cc-embed .opening{max-height:calc(100dvh - 150px);overflow:auto;overscroll-behavior:contain;grid-area:stage;z-index:2;align-self:center;justify-self:center;flex-wrap:wrap;max-width:520px;margin:0 6px;box-shadow:0 10px 34px #1d16288c}
.cc-embed .opening-actions{width:100%;margin-left:0}.cc-embed .opening-actions button{flex:1}
.cc-embed .result{display:flex;flex-direction:column;width:280px;margin-top:0}.cc-embed .result>*{margin-top:0}
.cc-embed .result-actions{order:1;margin:0 0 14px}.cc-embed .reflection{order:2}
@media(max-width:700px){
  .cc-embed .shell{padding:6px 8px 8px}.cc-embed .game-help-links{top:10px;left:8px}
  .cc-embed .layout{display:flex;flex-direction:column}.cc-embed .tower{flex:1;min-height:420px;padding:10px}.cc-embed aside{flex:none;margin:0;overflow:visible}
  .cc-embed .frame{width:min(100%,calc((100cqh - 12px) * 2 / 3 + 12px))}
  .cc-embed .result{width:auto;margin-top:10px}
  .cc-embed body:is([data-phase=won],[data-phase=failed]) .result{position:fixed;left:8px;right:8px;bottom:8px;z-index:5;max-height:calc(100dvh - 16px);overflow:auto;margin:0;box-shadow:0 -10px 40px #2a1f3a59}
}
