/* The world is the page. All controls live on top of the same WebGL canvas. */
html:has(body.fullscreen-game) { width:100%; height:100%; overflow:hidden; background:#dfe3df; }
body.scene-page.fullscreen-game {
  --text:#eff5ef; --muted:#b9cbc9; --cold:#8de4cf; --warm:#f2be80; --bad:#ffae97;
  --hud:#203b43e8; --hud-edge:#e0eee53d;
  position:fixed; inset:0; width:100%; height:100%; height:100dvh; padding:0;
  overflow:hidden; overscroll-behavior:none; color-scheme:dark; background:#dfe3df;
}
.fullscreen-game .game-world,.fullscreen-game .scene-stage { position:absolute; inset:0; width:100%; height:100%; overflow:hidden; }
.fullscreen-game .scene-stage { background:radial-gradient(ellipse at 50% 42%, #fbfaf5 0%, #eeeee7 52%, #dfe3df 100%); }
.fullscreen-game canvas#board { position:absolute; inset:0; display:block; width:100%; height:100%; aspect-ratio:auto; touch-action:none; cursor:grab; }
.fullscreen-game[data-scene-view=work] canvas#board { cursor:crosshair; }
.fullscreen-game canvas#board:focus-visible { outline:none; box-shadow:inset 0 0 0 2px #6dd6c57f; }
.fullscreen-game .scene-callouts { position:absolute; inset:0; z-index:2; pointer-events:none; overflow:hidden; }
.fullscreen-game .scene-callouts svg { position:absolute; inset:0; width:100%; height:100%; overflow:visible; }
.fullscreen-game .scene-callouts path { fill:none; stroke-linecap:round; stroke-linejoin:round; }
.fullscreen-game .callout-outline { stroke:#fbfaf5cc; stroke-width:2.5px; }
.fullscreen-game .callout-line { stroke:#62766c; stroke-width:1.2px; }
.fullscreen-game .scene-callouts g[data-occluded=true] .callout-line { stroke-dasharray:4 4; }
.fullscreen-game .callout-dot { fill:#fafaf3; stroke:var(--callout-accent); stroke-width:2px; }
.fullscreen-game .scene-callout-label { position:absolute; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px; width:78px; height:44px; box-sizing:border-box; padding:3px 2px; border:1px solid #91b3a1; border-left:3px solid var(--callout-accent); border-radius:8px; background:linear-gradient(#fbfff6,#dfede0); box-shadow:inset 0 1px #ffffff,0 3px 0 #779b88,0 5px 8px #203a3526; color:#263f36; font:650 13px/1.2 system-ui,-apple-system,sans-serif; white-space:nowrap; cursor:pointer; pointer-events:auto; touch-action:manipulation; transition:background-color .12s,box-shadow .12s; }
.fullscreen-game .callout-action { display:flex; align-items:center; gap:5px; font-size:12px; line-height:14px; font-weight:500; color:#3d725d; }
.fullscreen-game .callout-action::after { content:''; display:block; width:5px; height:5px; border-top:1.5px solid currentColor; border-right:1.5px solid currentColor; transform:rotate(45deg); }
@media(hover:hover) { .fullscreen-game .scene-callout-label:hover { background:linear-gradient(#fff,#d2eddb); border-color:#42886e; box-shadow:inset 0 1px #fff,0 3px 0 #56896f,0 6px 12px #203a3540; } }
.fullscreen-game .scene-callout-label:active { background:#cce5d5; box-shadow:inset 0 1px 2px #36584140,0 1px 0 #779b88; }
.fullscreen-game .scene-callout-label:focus-visible { outline:3px solid #257b6b; outline-offset:2px; }
.fullscreen-game .callouts-invite [data-callout=stave] { animation:callout-discover 1.2s ease-in-out 2; }
@keyframes callout-discover { 0%,100% { box-shadow:inset 0 1px #fff,0 3px 0 #779b88,0 5px 8px #203a3526; } 50% { box-shadow:inset 0 1px #fff,0 3px 0 #56896f,0 0 0 4px #78cda55c,0 5px 14px #29795357; } }
.fullscreen-game #section-key[data-invite=true] { color:#c0f2d8; font-weight:600; }
.fullscreen-game .callout-legend { position:absolute; transform:translateX(-50%); padding:2px 6px; border-radius:4px; background:#f8faf0ed; color:#455b55; white-space:nowrap; font-size:12px; line-height:16px; }
.fullscreen-game .hud-top,.fullscreen-game .hud-bottom { position:absolute; z-index:3; pointer-events:none; left:max(10px,env(safe-area-inset-left)); right:max(10px,env(safe-area-inset-right)); margin-inline:auto; }
.fullscreen-game .hud-top { top:max(10px,env(safe-area-inset-top)); max-width:760px; padding:10px 12px 9px; border-radius:18px; border:1px solid var(--hud-edge); background:linear-gradient(115deg,#203b43f5,#2f4849dc); box-shadow:0 8px 30px #142c2a20,inset 0 1px #eef5e91a; backdrop-filter:blur(12px); -webkit-backdrop-filter:blur(12px); }
.fullscreen-game .hud-top button,.fullscreen-game .hud-top .mission-heading,.fullscreen-game .hud-status-row { pointer-events:auto; }
.fullscreen-game .hud-heading { display:flex; align-items:center; gap:10px; }
.fullscreen-game .hud-button { display:flex; align-items:center; justify-content:center; gap:5px; min-width:44px; min-height:44px; padding:6px 9px; border:1px solid #c8e3d945; border-radius:12px; background:#edf7e90c; box-shadow:inset 0 1px #ffffff0b; color:#e4f3e9; font-size:12px; flex-shrink:0; }
.fullscreen-game .hud-button:hover { background:#edf7e91c; }
.fullscreen-game .level-toggle { flex-direction:column; gap:1px; max-width:none; width:62px; padding:3px 4px; }
.fullscreen-game .hud-icon { font-size:20px; line-height:1; }
.fullscreen-game #header-count { color:#d6e6df; font:12px ui-monospace,monospace; }
.fullscreen-game .hud-info-button { flex-direction:column; width:46px; gap:3px; }
.fullscreen-game .mission-heading { flex:1; min-width:0; }
.fullscreen-game .title-row { margin:0; gap:6px; }
.fullscreen-game .title-row h1 { font-size:20px; line-height:1.3; letter-spacing:.2px; font-weight:650; margin:0; }
.fullscreen-game .difficulty { font-size:11px; padding:1px 5px; border-color:#edbd7445; border-radius:4px; }
.fullscreen-game .task-summary { font-size:13px; line-height:1.45; color:#c1d5cd; margin:4px 0 0; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.fullscreen-game .hud-status-row { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-top:8px; padding-top:7px; border-top:1px solid #d4e1d51d; }
.fullscreen-game .hud-status-copy { min-width:0; display:flex; align-items:center; gap:8px; }
.fullscreen-game .mode-chip { flex-shrink:0; font-size:12px; padding:3px 6px; border-radius:5px; background:#89e1c910; border-color:#87d9c932; }
.fullscreen-game .board-origin { min-width:0; color:#bfcec8; font-size:12px; line-height:1.3; }
.fullscreen-game .material-label { flex-shrink:0; gap:6px; flex-wrap:nowrap; color:#cbdcd3; font-size:12px; }
.fullscreen-game .material-label strong { font:600 20px ui-monospace,monospace; color:#fbf4dc; }
.fullscreen-game #budget { color:#d1ded3; font-size:13px; }
.fullscreen-game .material-label.low strong { color:var(--warm); }
.fullscreen-game .hud-bottom { bottom:max(10px,env(safe-area-inset-bottom)); max-width:560px; display:flex; flex-direction:column; gap:7px; }
.fullscreen-game .dock { --action-gap:6px; position:static; width:100%; max-width:none; max-height:none; overflow:visible; margin:0; padding:9px; border-radius:17px; border:1px solid var(--hud-edge); background:var(--hud); box-shadow:0 5px 25px #142c2a29,inset 0 1px #eef5e914; backdrop-filter:blur(14px); -webkit-backdrop-filter:blur(14px); pointer-events:auto; }
.fullscreen-game .feedback { align-items:center; gap:7px; height:54px; min-height:54px; margin:0 0 7px; padding:0 0 0 8px; border-left-width:2px; }
.fullscreen-game .feedback-icon { font-size:18px; width:17px; }
.fullscreen-game .feedback-copy { flex:1; min-width:0; max-height:none; overflow:hidden; }
.fullscreen-game .feedback strong { font-size:13px; line-height:1.35; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.fullscreen-game .feedback p { font-size:12px; line-height:1.4; margin:2px 0 0; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; color:#bfd3cb; }
.fullscreen-game .feedback-toggle { flex-shrink:0; width:44px; height:44px; padding:0; border-radius:10px; color:#d5e8dc; background:transparent; font-size:25px; }
.fullscreen-game .locate-button { padding:4px 6px; min-width:44px; min-height:44px; border-radius:10px; }
/* All three views share the same feedback and action slots. */
.fullscreen-game .dock .dock-actions {
  display:grid; grid-template-columns:minmax(0,1fr) repeat(3,46px);
  grid-auto-rows:46px; align-items:stretch; gap:var(--action-gap);
}
.fullscreen-game .dock-actions .primary { min-width:0; min-height:0; padding:6px 8px; }
.fullscreen-game .dock-actions .quiet { grid-column:2/-1; }
.fullscreen-game .primary { min-height:46px; padding:8px 12px; border-radius:12px; font-size:14px; background:linear-gradient(140deg,#c0ecd3,#83d2bb); color:#173c34; border:1px solid #b9efd670; box-shadow:inset 0 1px #f6ffeab3,0 2px 0 #143d316b; }
.fullscreen-game .primary:hover { background:linear-gradient(140deg,#d5ffe7,#99e0cb); }
.fullscreen-game .tool { flex-shrink:0; flex-direction:column; min-width:46px; width:46px; min-height:46px; gap:0; padding:3px; border-radius:11px; border:1px solid #bad6cc38; background:#d6e9d812; box-shadow:inset 0 1px #e5f2d80e; color:#dcece2; }
.fullscreen-game .tool>span { font-size:21px; line-height:1.05; }
.fullscreen-game .tool small { font-size:12px; line-height:1.4; }
.fullscreen-game .tool[aria-pressed=true] { background:#c295552b; color:var(--warm); border-color:#e7b56c99; }
.fullscreen-game .selection-toggle[data-repair=true] { color:var(--warm); border-color:#e4b376a0; }
.fullscreen-game .scene-view-tabs { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:3px; padding:3px; border-radius:14px; border:1px solid #e1eadd35; background:#1b343de3; box-shadow:0 3px 15px #142a2626; backdrop-filter:blur(12px); pointer-events:auto; }
.fullscreen-game .scene-view-tabs button { display:flex; align-items:center; justify-content:center; gap:7px; min-height:44px; min-width:0; border-radius:10px; background:transparent; color:#b7cbc5; font-size:13px; padding:4px; }
.fullscreen-game .view-icon { font-size:17px; }
.fullscreen-game .scene-view-tabs button[aria-pressed=true] { color:#ecf6e9; background:linear-gradient(125deg,#5d82725e,#73968a38); box-shadow:inset 0 0 0 1px #c9e7d233; }
.fullscreen-game:not([data-scene-view=work]) .hud-top .material-label { visibility:hidden; }
.fullscreen-game .dock #success-actions { display:grid; margin:0; gap:var(--action-gap); }
.fullscreen-game .quiet { color:#d7e8dd; }
.fullscreen-game #success-actions .quiet { border:1px solid #c7ddce36; border-radius:11px; }
.fullscreen-game .scene-recovery { position:absolute; inset:0; display:flex; flex-direction:column; justify-content:center; align-items:center; padding:25px; gap:12px; pointer-events:none; }
.fullscreen-game .scene-status { max-width:360px; padding:22px; text-align:center; border:1px solid #e1e7d49c; border-radius:16px; background:#203b43ed; color:#e2ede0; font-size:15px; line-height:1.7; box-shadow:0 14px 40px #152a2635; }
.fullscreen-game .scene-status[data-state=loading]::before { content:''; display:block; width:24px; height:24px; margin:0 auto 12px; border:2px solid #6f9c893d; border-top-color:#a4e7ca; border-radius:50%; animation:scene-loading 1s linear infinite; }
.fullscreen-game .scene-fallback { pointer-events:auto; padding:13px 18px; border-radius:12px; color:#173b32; background:#b1e1c8; text-decoration:none; font-size:15px; }
.fullscreen-game[data-scene-state=error] .hud-top,.fullscreen-game[data-scene-state=error] .hud-bottom { visibility:hidden; }
.fullscreen-game[data-scene-state=loading] .hud-top,.fullscreen-game[data-scene-state=loading] .hud-bottom { visibility:hidden; }
.fullscreen-game dialog { width:min(540px,calc(100% - 24px)); max-height:calc(100dvh - max(24px,env(safe-area-inset-top)) - max(24px,env(safe-area-inset-bottom))); padding:20px; border-radius:22px; border:1px solid #b2c9ba85; background:linear-gradient(135deg,#2d484d,#1c353e); box-shadow:0 24px 100px #0a221b70; overscroll-behavior:contain; }
.fullscreen-game dialog::backdrop { background:#1029278a; backdrop-filter:blur(5px); }
.fullscreen-game .dialog-head { top:-20px; margin:-20px -20px 12px; padding:17px 20px 12px; background:#29444b; }
.fullscreen-game .dialog-head h2 { font-size:22px; }
.fullscreen-game .dialog-close { background:#e0ecda0b; color:#e2f0e3; border-color:#a9c2b657; }
.fullscreen-game .information-grid { grid-template-columns:1fr; gap:10px; }
.fullscreen-game .feedback-detail { padding:0 1px; }
.fullscreen-game .feedback-detail h3 { font-size:13px; font-weight:550; color:#aac7bb; margin:12px 0 6px; }
.fullscreen-game .feedback-detail p { font-size:14px; line-height:1.65; white-space:pre-line; margin:0; }
.fullscreen-game .selection-card { flex-wrap:wrap; background:#547b6917; border-color:#abc6b549; padding:12px; min-height:0; }
.fullscreen-game .selection-copy { min-width:120px; }
.fullscreen-game .selection-copy p { font-size:13px; }
.fullscreen-game .secondary-actions { margin:7px 0 10px; }
.fullscreen-game .secondary-actions button { padding:8px; border:1px solid #bfd3b734; border-radius:9px; background:#c4d8be08; font-size:13px; }
.fullscreen-game .legend { font-size:12px; padding:8px 0; }
.fullscreen-game .board-bottom { background:transparent; padding:5px 0 12px; border:0; color:#a9c5b8; }
.fullscreen-game .progress-panel { background:#c0d2ac08; border-color:#b7cbb43a; }
.fullscreen-game .info-panel { background:#a2c09b08; border-color:#a8c2b23b; }
.fullscreen-game .level-row.active { background:#80b99a19; }
.fullscreen-game .level-row { min-height:48px; }
.fullscreen-game [hidden] { display:none!important; }
@keyframes scene-loading { to{transform:rotate(360deg)} }
@media(max-width:430px) {
  .fullscreen-game .hud-top { padding:8px 9px; border-radius:15px; }
  .fullscreen-game .hud-heading { gap:7px; }
  .fullscreen-game .title-row h1 { font-size:17px; }
  .fullscreen-game .title-row { gap:5px; }
  .fullscreen-game .difficulty { display:none; }
  .fullscreen-game .hud-status-copy { flex-direction:column; align-items:flex-start; gap:3px; }
  .fullscreen-game .hud-status-row { margin-top:6px; padding-top:5px; }
  .fullscreen-game .mode-chip { border:0; padding:0; background:transparent; }
  .fullscreen-game .board-origin { font-size:12px; }
  .fullscreen-game .task-summary { font-size:12px; line-height:1.35; }
  .fullscreen-game .hud-top .level-toggle { width:48px; }
  .fullscreen-game .hud-info-button { width:44px; padding:3px; }
  .fullscreen-game .hud-bottom { gap:5px; }
  .fullscreen-game .dock { --action-gap:5px; padding:7px; border-radius:14px; }
  .fullscreen-game .feedback { height:54px; min-height:54px; margin-bottom:5px; padding-left:6px; gap:5px; }
  .fullscreen-game .feedback-icon { display:none; }
  .fullscreen-game .primary { font-size:14px; }
  .fullscreen-game .scene-view-tabs { padding:2px; border-radius:12px; }
  .fullscreen-game .scene-view-tabs button { gap:4px; font-size:12px; }
  .fullscreen-game .view-icon { font-size:16px; }
}
@media(max-height:650px) and (orientation:portrait) {
  .fullscreen-game .hud-top { top:max(6px,env(safe-area-inset-top)); }
  .fullscreen-game .hud-bottom { bottom:max(6px,env(safe-area-inset-bottom)); }
  .fullscreen-game .task-summary { -webkit-line-clamp:1; }
  .fullscreen-game .hud-status-copy { flex-direction:row; gap:6px; }
  .fullscreen-game .board-origin { max-width:130px; }
  .fullscreen-game .material-label { flex-direction:row; gap:6px; align-items:center; }
  .fullscreen-game .feedback { height:44px; min-height:44px; }
  .fullscreen-game .feedback strong { display:none; }
}
@media(max-height:500px) and (orientation:landscape) {
  .fullscreen-game .hud-top { max-width:600px; top:max(6px,env(safe-area-inset-top)); padding:6px 10px; }
  .fullscreen-game .hud-status-row { margin-top:3px; padding-top:3px; }
  .fullscreen-game .hud-bottom { max-width:660px; bottom:max(6px,env(safe-area-inset-bottom)); flex-direction:row; align-items:flex-end; gap:8px; }
  .fullscreen-game .dock { flex:1; width:auto; min-width:0; padding:6px; }
  .fullscreen-game .feedback { min-height:0; margin-bottom:4px; }
  .fullscreen-game .feedback strong { display:none; }
  .fullscreen-game .feedback p { -webkit-line-clamp:1; }
  .fullscreen-game .feedback-toggle,.fullscreen-game .locate-button { min-height:32px; height:32px; }
  .fullscreen-game .scene-view-tabs { width:180px; flex-shrink:0; }
  .fullscreen-game .scene-view-tabs button { flex-direction:column; gap:1px; font-size:12px; min-height:46px; }
}
/* Keep observation titles visible in the shared compact feedback slot. */
.fullscreen-game #view-tools .feedback strong { display:block; }
@media(prefers-reduced-motion:reduce) { .fullscreen-game .scene-status::before { animation:none!important; } }
/* Text changes during a stroke must never resize the camera's free area. */
.fullscreen-game .mode-chip,.fullscreen-game .board-origin { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.fullscreen-game .mode-chip { max-width:112px; }
@media(max-height:500px) and (orientation:landscape) {
  .fullscreen-game .hud-top { left:max(6px,env(safe-area-inset-left)); right:auto; width:26%; max-width:230px; }
  .fullscreen-game .hud-bottom { left:auto; right:max(6px,env(safe-area-inset-right)); width:26%; max-width:230px; flex-direction:column; align-items:stretch; }
  .fullscreen-game .hud-heading { gap:5px; flex-wrap:wrap; }
  .fullscreen-game .hud-top .mission-heading { flex-basis:calc(100% - 70px); }
  .fullscreen-game .hud-info-button { position:absolute; top:6px; right:7px; }
  .fullscreen-game .hud-top .level-toggle { width:48px; }
  .fullscreen-game .hud-top .mission-heading { order:3; flex-basis:100%; }
  .fullscreen-game .title-row h1 { font-size:16px; }
  .fullscreen-game .task-summary { font-size:12px; }
  .fullscreen-game .hud-status-copy { flex-direction:column; align-items:flex-start; gap:2px; }
  .fullscreen-game .hud-status-row { margin-top:5px; }
  .fullscreen-game .board-origin { max-width:95px; }
  .fullscreen-game .material-label { flex-direction:column; gap:0; }
  .fullscreen-game .dock { width:100%; flex:auto; }
  .fullscreen-game .feedback { height:58px; min-height:58px; }
  .fullscreen-game .feedback p { -webkit-line-clamp:2; }
  .fullscreen-game .feedback-toggle { width:32px; }
  .fullscreen-game .dock .dock-actions { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .fullscreen-game .dock-actions .primary,.fullscreen-game .dock-actions .quiet { grid-column:1/-1; }
  .fullscreen-game .tool { width:100%; min-width:0; }
  .fullscreen-game .scene-view-tabs { width:100%; }
}

.fullscreen-game .scene-explanation a { color:#a7eddc; text-decoration:underline; }

.fullscreen-game .hud-help-button { flex-direction:column; gap:2px; width:44px; padding:3px; }
.fullscreen-game #help-dialog .trial-intro { font-size:15px; line-height:1.6; margin:0 0 12px; }
.fullscreen-game #help-dialog .help-steps { margin:0; }
.fullscreen-game #help-dialog .help-steps li { margin-bottom:12px; }
.fullscreen-game #help-dialog .help-steps p { font-size:14px; line-height:1.6; }
.fullscreen-game #help-dialog .trial-more { margin:12px 0; }
.fullscreen-game #help-dialog .trial-actions {
  position:sticky; bottom:-20px; margin:12px -20px -20px; padding:12px 20px 20px;
  background:#203b43; border-top:1px solid var(--hud-edge);
}
.fullscreen-game #help-dialog .close-help { width:100%; }
.fullscreen-game .trial-answers a { color:#a7eddc; text-decoration:underline; }

.fullscreen-game #component-dialog { color-scheme:light; color:#263e3a; background:#f7f9f0; border-color:#b8c6b7; touch-action:pan-y; }
.fullscreen-game #component-dialog .dialog-head { background:#eff3e8; border-bottom:1px solid #d3ddcf; }
.fullscreen-game #component-dialog .dialog-close { color:#38534c; background:#e0e9dc; border-color:#b8cbbd; }
.fullscreen-game #component-dialog .component-kicker { color:#59766c; font-size:12px; }
.fullscreen-game #component-dialog h2 { margin:3px 0 0; }
.fullscreen-game #component-dialog .component-summary { margin:16px 0 18px; padding:12px 14px; border-left:3px solid var(--component-accent); background:#e7eee1; border-radius:0 8px 8px 0; color:#244339; font-size:16px; font-weight:600; line-height:1.65; }
.fullscreen-game #component-dialog .component-section { margin:18px 0; }
.fullscreen-game #component-dialog .component-section h3 { margin:0 0 5px; font-size:14px; color:#527264; }
.fullscreen-game #component-dialog .component-section p { margin:0; font-size:15px; line-height:1.75; overflow-wrap:anywhere; }
.fullscreen-game #component-dialog .component-sources { border-top:1px solid #d4dfd0; padding-top:12px; color:#526f62; }
.fullscreen-game #component-dialog .component-sources summary { padding:6px 0; font-size:13px; }
.fullscreen-game #component-dialog .component-sources ul { padding-left:19px; margin:6px 0; }
.fullscreen-game #component-dialog .component-sources li { margin:7px 0; font-size:13px; line-height:1.6; }
.fullscreen-game #component-dialog .component-sources a { color:#216e60; text-decoration:underline; }
.fullscreen-game #component-dialog .component-sources p { font-size:12px; line-height:1.65; }
.fullscreen-game #component-dialog .component-actions { position:sticky; bottom:-20px; margin:16px -20px -20px; padding:12px 20px 20px; background:#f7f9f0; border-top:1px solid #d4dfd0; }
.fullscreen-game #component-dialog .component-actions button { width:100%; }

/* Connection coaching uses the existing dock; the action row stays anchored. */
.fullscreen-game[data-section-close=true] #view-tools .feedback { height:96px; min-height:96px; }
.fullscreen-game[data-section-close=true] #view-tools .feedback strong { white-space:normal; overflow:visible; text-overflow:clip; }
.fullscreen-game[data-section-close=true] #section-key { -webkit-line-clamp:3; }
.fullscreen-game .section-extra-tools { display:flex; gap:4px; flex-shrink:0; }
.fullscreen-game .section-extra-tools .tool { width:44px; min-width:44px; height:44px; min-height:44px; }
.fullscreen-game #connection-dialog { color-scheme:light; background:#f7f9f0; color:#263e3a; border-color:#b8c6b7; }
.fullscreen-game #connection-dialog .dialog-head { background:#eff3e8; border-bottom:1px solid #d3ddcf; }
.fullscreen-game #connection-dialog .dialog-close { color:#38534c; background:#e0e9dc; }
.fullscreen-game #connection-dialog .component-kicker { color:#59766c; font-size:12px; }
.fullscreen-game #connection-dialog p { font-size:14px; line-height:1.65; color:#3d5149; }
.fullscreen-game #connection-dialog .connection-summary { padding:12px; border-left:3px solid #318d80; background:#e4eee1; font-size:16px; font-weight:600; }
.fullscreen-game .connection-loop { list-style:none; padding:0; margin:16px 0; display:grid; gap:8px; }
.fullscreen-game .connection-loop li { padding:10px 12px; border:1px solid #d4ddce; border-radius:9px; background:#edf1e6; display:grid; gap:4px; }
.fullscreen-game .connection-loop b { font-size:14px; }.fullscreen-game .connection-loop span { font-size:13px; line-height:1.5; }
.fullscreen-game #connection-dialog[data-port=supply] [data-loop-port=supply] { border-color:#318d80; background:#dbefe1; }
.fullscreen-game #connection-dialog[data-port=return] [data-loop-port=return] { border-color:#bc8745; background:#f3ead5; }
.fullscreen-game .connection-current { border-top:1px solid #ccd6c6; padding-top:12px; }
.fullscreen-game #connection-dialog details { font-size:13px; line-height:1.6; }
.fullscreen-game .connection-actions { position:sticky; bottom:-20px; margin:14px -20px -20px; padding:12px 20px 20px; background:#f7f9f0; border-top:1px solid #d3ddcf; }
.fullscreen-game .connection-actions button { width:100%; }
@media(max-height:500px) and (orientation:landscape) { .fullscreen-game .section-extra-tools { flex-direction:column; gap:2px; } }

.fullscreen-game[data-section-close=true] #view-tools .feedback-icon { display:none; }
.fullscreen-game .section-extra-tools .section-more { display:none; }
.fullscreen-game .section-menu-actions { display:grid; gap:12px; }
@media(max-width:720px) and (max-height:500px) and (orientation:landscape) {
  .fullscreen-game .section-extra-tools #section-back,.fullscreen-game .section-extra-tools #section-task-help { display:none; }
  .fullscreen-game .section-extra-tools .section-more { display:flex; }
}

.fullscreen-game .scene-callout-label[data-task-needed=true] { border-color:#bf8d4e; box-shadow:inset 0 1px #fff,0 3px 0 #ad8655,0 5px 8px #203a3526; }
.fullscreen-game .scene-callout-label[data-task-needed=true] .callout-action { color:#8c5a22; font-weight:650; }
.fullscreen-game #component-dialog .component-task { padding:12px; background:#f2ead9; border:1px solid #d2b281; border-radius:10px; }
.fullscreen-game #component-dialog .component-task h3 { margin:0 0 6px; font-size:14px; color:#79562e; }
.fullscreen-game #component-dialog .component-task p { color:#3d5149; font-size:14px; line-height:1.6; }
.fullscreen-game #component-dialog .component-task button { width:100%; }

.fullscreen-game .work-structure-note{margin:6px 0 0;color:#c9e8dc;font-size:12px;line-height:1.5;}
.fullscreen-game #legacy-record svg{border-radius:10px;}

.fullscreen-game #draw-button[aria-pressed=true] { color:#b9f5df; background:#81d9bb26; border-color:#92dfc899; }

/* Reserve the recycling row throughout preset levels: draft feedback must not
   resize the board and cancel the player's current stroke. */
.fullscreen-game .material-label { display:grid; grid-template-columns:auto auto; column-gap:6px; row-gap:0; }
.fullscreen-game #recycled-stock { grid-column:1 / -1; text-align:right; white-space:nowrap; font-size:12px; line-height:18px; color:#c7e5d7; }

/* Contextual hint sheet leaves the highlighted work surface visible. */
.fullscreen-game #hint-dialog { position:fixed; inset:auto 0 max(12px,env(safe-area-inset-bottom)); margin:0 auto; width:min(480px,calc(100% - 24px)); max-height:48dvh; color:#263e3a; background:#f7f9f0; }
.fullscreen-game #hint-dialog::backdrop { background:#10292718; backdrop-filter:none; }
.fullscreen-game #hint-dialog .dialog-head { background:#eff3e8; }
.fullscreen-game #hint-dialog .dialog-close { color:#38534c; background:#e0e9dc; }
.fullscreen-game #hint-dialog h2 { font-size:18px; }
.fullscreen-game #hint-dialog p { font-size:15px; line-height:1.7; overflow-wrap:anywhere; }
.fullscreen-game #hint-go { width:100%; min-height:44px; }
.fullscreen-game #hint-dialog p { color:#29483d; }
