/* Full-screen backdrop, proportional transparent actors and one compact answer dock. */
#north-chapter-game{position:fixed;inset:0;margin:0;padding:0;width:100vw;height:100dvh;max-width:none;max-height:none;border:0;border-radius:0;overflow:hidden;background:#18383c var(--activity-background) center/cover no-repeat;color:#fff0c0}
#north-chapter-game[open]{display:flex;flex-direction:column}#north-chapter-game::backdrop{background:#061820}
.nc-stage{position:relative;flex:1;min-height:0}.nc-stage canvas{width:100%;height:100%;object-fit:contain;display:block;touch-action:manipulation;aspect-ratio:20/9}
.nc-hud{position:absolute;inset:0 0 auto;display:flex;align-items:center;gap:10px;padding:12px 20px;background:linear-gradient(#08262cdd,transparent);pointer-events:none}.nc-hud>*{pointer-events:auto}.nc-menu{border:0!important;background:none!important;box-shadow:none!important;padding:0!important;width:52px;height:52px}.nc-menu img{width:100%;height:100%;object-fit:contain}.nc-hud h2{font:700 clamp(18px,2.1vw,28px) Georgia;margin:0;color:#ffebad;text-shadow:0 2px 5px #000}.nc-hud p{font-size:14px;margin:4px 0;color:#fff0be}.nc-lives{margin-left:auto;color:#ffdda1;font-size:25px;text-shadow:0 2px 5px #000}
.nc-notice{position:absolute;top:19%;left:10%;width:80%;text-align:center;color:#fff2c4;font:700 clamp(16px,1.8vw,24px) Georgia;text-shadow:0 2px 5px #000,0 0 12px #061922;pointer-events:none}
.nc-question{box-sizing:border-box;flex:0 0 auto;min-height:146px;max-height:42%;display:grid;grid-template-columns:1fr 1.2fr;gap:18px;align-items:center;padding:12px calc(var(--fullscreen-width,92px) + 25px) 16px 4%;background:linear-gradient(100deg,#08262cf5,#163e3eed);border-top:1px solid #ccb371;overflow:auto}.nc-problem{text-align:center}.nc-problem p{font-size:clamp(15px,1.5vw,20px);line-height:1.35;margin:0 0 6px}.nc-problem strong{font:700 clamp(23px,2.5vw,36px) Georgia;color:#fff0be}.nc-visual{display:flex;justify-content:center;max-height:80px;overflow:auto}.nc-visual svg{max-height:80px;max-width:220px;background:#fff4d6;border-radius:5px}.nc-visual img{max-width:22px;max-height:24px}.nc-visual .tc-count{display:flex;align-items:center;gap:9px}.nc-answers{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}.nc-answers button{position:relative;min-height:68px;min-width:44px;padding:9px 12px;border:1px solid #cfaa67;border-radius:18px 5px;background:linear-gradient(#fff0c9,#d7b16d);box-shadow:inset 0 0 0 3px #fff2d060,0 3px 0 #785328;color:#392815;font:700 clamp(18px,2vw,28px) Georgia;touch-action:manipulation}.nc-answers small{position:absolute;bottom:3px;right:7px;font:11px sans-serif;color:#75572b}.nc-answers button:focus-visible{outline:3px solid #8fe1dc;outline-offset:3px}.nc-answers button.right{background:#d0edbb}.nc-answers button.chosen:not(.right){background:#f1c7a6}.nc-answers button:disabled{opacity:1}
.nc-overlay{position:absolute;inset:0;display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;padding:6% 13%;background:linear-gradient(90deg,#062028d9,#0d2427b0);text-shadow:0 2px 8px #03181c}.nc-overlay small{color:#e6bf70;letter-spacing:.2em;text-transform:uppercase}.nc-overlay h2{font:700 clamp(30px,5vw,66px) Georgia;color:#ffebad;margin:15px 0}.nc-overlay p{max-width:750px;font-size:clamp(16px,1.7vw,23px);line-height:1.5;color:#f9ecc9;margin:10px 0 20px}.nc-overlay nav{display:flex;gap:15px 24px;justify-content:center;flex-wrap:wrap}.nc-overlay nav button{padding:10px 8px;border:0;border-bottom:1px solid #c1a15d;border-radius:0;background:none;box-shadow:none;color:#ffebad;font:700 clamp(18px,2vw,26px) Georgia}.nc-overlay nav button:hover{color:#fff7d7}.nc-overlay[hidden],.nc-question[hidden]{display:none!important}
#north-chapter-game[data-game=compass] .nc-answers{grid-template-columns:repeat(2,minmax(0,1fr))}#north-chapter-game[data-game=compass] .nc-answers button{font-size:17px;min-height:44px}
@media(max-height:550px){.nc-hud{padding:4px 10px;gap:7px}.nc-menu{width:44px;height:44px}.nc-hud h2{font-size:18px}.nc-hud p{font-size:12px;margin:2px 0}.nc-lives{font-size:20px}.nc-question{min-height:118px;padding:7px calc(var(--fullscreen-width,84px) + 18px) 8px 14px;gap:10px;grid-template-columns:1fr 1fr}.nc-problem p{font-size:13px}.nc-problem strong{font-size:23px}.nc-answers{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}.nc-answers button{min-height:44px;padding:5px 12px;font-size:21px}.nc-visual{max-height:57px}.nc-visual svg{max-height:57px}.nc-notice{top:22%;font-size:15px}.nc-overlay{padding:6% 9%}.nc-overlay h2{font-size:32px;margin:7px 0}.nc-overlay p{font-size:15px;margin:8px 0}.nc-overlay nav{gap:8px 18px}.nc-overlay nav button{font-size:18px;padding:7px}.nc-overlay small{font-size:11px}}

/* The river and all its actors share one fixed camera. The answer dock overlays
   the lower bank, so opening a question never resizes or moves the river. */
#north-chapter-game[data-game=raft]{background:#123c40}
#north-chapter-game[data-game=raft] .nc-stage{position:absolute;inset:0}
#north-chapter-game[data-game=raft] canvas{aspect-ratio:16/9}
#north-chapter-game[data-game=raft] .nc-question{position:absolute;inset:auto 0 0;z-index:2;min-height:125px;max-height:29%;padding-bottom:20px;background:linear-gradient(100deg,#08262cf5,#163e3ef2)}
#north-chapter-game[data-game=raft] .nc-notice{top:13%;font-size:clamp(14px,1.5vw,21px)}
.nc-visual .tc-sequence{display:flex;align-items:center;justify-content:center;gap:7px;font:700 clamp(20px,2.3vw,30px) Georgia;color:#fff0be;white-space:nowrap}
.nc-visual .tc-sequence>span{display:inline-block;min-width:1.2em;padding:4px 7px;border-bottom:1px solid #d5b96c80}
.nc-visual .tc-sequence .tc-sequence-separator{font-size:.65em;color:#d5b96c;font-style:normal}
@media(max-height:550px){#north-chapter-game[data-game=raft] .nc-question{min-height:112px;max-height:34%;padding-bottom:8px}.nc-visual .tc-sequence{font-size:21px;gap:4px}.nc-visual .tc-sequence>span{padding:3px 4px}#north-chapter-game[data-game=raft] .nc-notice{top:15%;font-size:13px}}
@media(max-width:600px) and (min-height:551px){#north-chapter-game[data-game=raft] .nc-stage{bottom:22%}#north-chapter-game[data-game=raft] .nc-question{grid-template-columns:1fr;max-height:40%;padding:14px 16px 56px}.nc-answers{grid-template-columns:repeat(2,minmax(0,1fr))}.nc-answers button{min-height:48px}}

/* Shared task visuals need their own styles here; tower/ruin selectors do not
   apply inside this dialog. Fractions and groups must remain visible. */
.nc-visual{max-height:125px;align-items:center}.nc-visual svg{max-height:120px;max-width:250px;flex-shrink:0}
.nc-visual .tc-count,.nc-visual .tc-groups,.nc-visual .tc-bags,.nc-visual .tc-coins{display:flex;gap:8px;justify-content:center;align-items:center;max-width:100%;flex-wrap:wrap}
.nc-visual .tc-count span,.nc-visual .tc-groups span{display:flex;flex-wrap:wrap;justify-content:center;gap:3px;max-width:180px}
.nc-visual .tc-count img,.nc-visual .tc-groups img{width:20px;height:24px;object-fit:contain}
.nc-visual .tc-count s{position:relative;opacity:.45}.nc-visual .tc-count s:after{content:'';position:absolute;left:0;right:0;top:50%;border-top:2px solid #ed8d78;transform:rotate(-50deg)}
.nc-visual .tc-groups span{border:1px solid #ceb77c;border-radius:8px;padding:5px}.nc-visual .tc-bags{margin-top:5px}.nc-visual .tc-bags span{border:1px solid #d7b578;border-radius:8px 8px 15px 15px;background:#d7b77e;color:#392815;width:30px;height:28px;display:grid;place-items:center}
.nc-visual .tc-fraction{display:flex;width:min(250px,100%);height:42px;border:2px solid #e5d49d;border-radius:6px;overflow:hidden;flex-shrink:0}.nc-visual .tc-fraction span{flex:1;border-right:2px solid #356d60;background:#fff8e5}.nc-visual .tc-fraction span:last-child{border:0}.nc-visual .tc-fraction .filled{background:#4b9d8c}
.nc-visual .tc-coins img{max-width:38px;max-height:38px;width:38px;height:38px;object-fit:contain}
.nc-visual .tc-code{text-align:left;padding:6px 12px;border-left:3px solid #ccb371;background:#fff4d6;color:#392815;font:14px/1.35 monospace}
@media(max-height:550px){.nc-visual{max-height:88px}.nc-visual svg{max-height:84px;max-width:170px}.nc-visual .tc-code{font-size:12px}.nc-visual .tc-coins img{max-width:28px;max-height:28px}.nc-visual .tc-count img,.nc-visual .tc-groups img{width:14px;height:18px}#north-chapter-game[data-game=raft] .nc-question.has-visual{max-height:39%;min-height:132px}}
