
:root{font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#173936;background:#f3f6f5;font-size:16px;--ink:#173936;--muted:#58716e;--green:#17665b;--accent:#e9b454;--line:#d7e3df;--white:#fff}*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button{cursor:pointer;min-height:44px;border:1px solid var(--line);background:white;color:var(--ink);border-radius:9px;padding:9px 15px;font-size:.875rem;font-weight:650;transition:background .15s,box-shadow .15s}button:hover{background:#e9f3ef}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible{outline:3px solid #c48923;outline-offset:3px}button:disabled{opacity:.45;cursor:not-allowed}button.primary{background:var(--green);border-color:var(--green);color:#fff}button.primary:hover{background:#104d44}button.accent{background:#fff0d2;border-color:#e6c98e;color:#604917}button.active{background:#e0efea;border-color:#86b4a6;color:#104c41}.quiet{background:transparent;color:inherit;border-color:#496460}.text-button{border:0;background:transparent;padding:8px 3px;color:var(--green)}.danger-text{color:#a23937}.full{width:100%;margin-top:16px}.row{display:flex;align-items:end;gap:9px;flex-wrap:wrap}.row>label{flex:1;min-width:60px}.row>button{flex:1}.app-header{height:80px;background:#102d2b;color:#fff;display:flex;align-items:center;justify-content:space-between;padding:0 max(24px,calc((100vw - 1320px)/2));gap:12px}.brand{display:flex;gap:12px;align-items:center;text-decoration:none;color:inherit;font-size:1.55rem;font-weight:750;letter-spacing:-1px}.brand small{display:block;font-size:.625rem;letter-spacing:2px;margin-top:3px;font-weight:500;color:#adc9c0}.header-actions{display:flex;align-items:center;gap:14px}.connection{font-size:.75rem;color:#b8d3cb}.connection:before{content:'◌';margin-right:7px;color:#e9b454}main{max-width:1320px;margin:auto;padding:28px 24px}.project-bar{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:24px}.project-title{min-width:0;flex:1}.eyebrow{font-size:.7rem;letter-spacing:1.6px;font-weight:750;color:var(--muted);display:block;margin-bottom:8px}.project-title input{display:block;width:100%;border:0;background:none;font-size:1.5rem;letter-spacing:-.5px;font-weight:650;padding:0;color:var(--ink);min-height:36px}.project-actions{display:flex;gap:8px}.steps{display:flex;gap:0;border-bottom:1px solid var(--line);margin-bottom:24px}.steps button{background:none;border:0;border-radius:0;flex:0 1 190px;border-bottom:3px solid transparent;text-align:left;padding:12px 12px 16px;color:var(--muted)}.steps button span{font-size:.75rem;margin-right:10px;color:#7b928d}.steps button.active{color:var(--green);border-bottom-color:var(--green)}.workspace{display:grid;grid-template-columns:minmax(0,1fr) 350px;gap:28px;align-items:start}.surface-column{min-width:0}.surface-topline{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:45px;margin-bottom:10px;font-size:.875rem;font-weight:600}.surface-actions{display:flex;align-items:center;gap:4px}.surface-actions button{padding:0;width:34px;min-height:34px;font-size:1.1rem;background:transparent}.surface-actions output{font-size:.75rem;padding:0 4px}.viewport{position:relative;overflow:auto;overscroll-behavior:contain;background:#e4ece8;border:1px solid #c8d8d1;border-radius:16px;aspect-ratio:1;max-height:760px;scrollbar-width:thin;box-shadow:0 8px 32px #11382c0a}.board-surface{position:relative;width:100%;aspect-ratio:1;transform-origin:top left;touch-action:none;user-select:none}.board-surface canvas,.board-surface svg{position:absolute;inset:0;width:100%;height:100%;display:block}.board-surface svg{touch-action:none;overflow:visible}.board-surface svg .hex{cursor:pointer}.hex:focus-visible .hex-shape{stroke:#fff;stroke-width:7}.empty-state{min-height:100%;padding:30px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;background:radial-gradient(circle at 50% 35%,#f8fcf9,#e9f1ed 65%)}.upload-symbol{position:relative;color:#67958a;font-size:100px;line-height:1.1;margin-bottom:12px;font-weight:200}.upload-symbol span{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);font-size:36px;font-weight:200}.empty-state h1{font-family:Georgia,serif;font-weight:400;font-size:2rem;letter-spacing:-1px;margin:0 0 12px}.empty-state p{font-size:.95rem;color:var(--muted);line-height:1.65;margin:0 0 24px}.empty-state .primary{min-width:180px}.empty-state .text-button{margin-top:10px}.empty-state small{font-size:.75rem;color:var(--muted);max-width:240px;line-height:1.5;margin-top:24px}.board-caption{display:flex;justify-content:space-between;gap:12px;margin:12px 2px;color:var(--muted);font-size:.75rem;line-height:1.5}.status{font-size:.875rem;line-height:1.5;padding:10px 0;color:var(--green);min-height:40px;overflow-wrap:anywhere}.status.error{color:#a23937}.inspector{background:var(--white);border:1px solid var(--line);border-radius:14px;padding:22px}.panel-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:20px}.panel-heading h2{font-size:1.12rem;margin:0;letter-spacing:-.3px}.panel-heading .text-button{font-size:.8rem}.badge{font-size:.65rem;letter-spacing:1px;background:#eef4f1;border:1px solid var(--line);border-radius:5px;padding:6px 8px;color:var(--muted);white-space:nowrap}.tool-tabs{display:grid;grid-template-columns:repeat(4,1fr);gap:4px;background:#f0f5f2;border-radius:10px;padding:4px;margin-bottom:16px}.tool-tabs button{padding:8px 3px;border:0;background:none;font-size:.8rem}.tool-tabs button.active{background:#fff;box-shadow:0 1px 5px #17393615;color:var(--green)}.hint{font-size:.825rem;color:var(--muted);line-height:1.65;margin:12px 0 18px}.tool-panel label,label{display:block;font-size:.825rem;font-weight:600;line-height:1.5;margin:16px 0}.tool-panel label output,label output{float:right;font-size:.75rem;color:var(--muted);font-weight:500}input:not([type=range]):not([type=color]),select,textarea{width:100%;min-height:43px;margin-top:6px;border:1px solid var(--line);border-radius:7px;padding:9px 10px;background:#fbfdfc;color:var(--ink);font-size:1rem;max-width:100%}input[type=range]{display:block;width:100%;accent-color:var(--green);height:28px;margin:5px 0}input[type=color]{width:100%;height:43px;border:1px solid var(--line);background:none;padding:3px;border-radius:7px;display:block;margin-top:6px}.button-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:18px 0}.divider{height:1px;background:var(--line);margin:22px 0}.paint-tools{display:grid;grid-template-columns:repeat(3,1fr);gap:7px}.paint-tools button{padding:9px 4px;font-size:.8rem}.letter-input{text-transform:uppercase;text-align:center}.difficulty-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:.8rem;margin:20px 0 10px}.difficulty-heading button{font-size:.75rem;padding:8px}.levels{display:flex;gap:5px;flex-wrap:wrap}.levels button{width:33px;min-height:36px;padding:4px}.levels button.active{background:var(--green);color:white}.levels button:first-child{background:#f5f7f5;color:var(--muted)}details{border-top:1px solid var(--line);margin-top:20px;padding-top:16px}summary{font-size:.875rem;font-weight:650;cursor:pointer;min-height:35px}small{color:var(--muted)}.play-dock{border:1px solid var(--line);border-radius:12px;background:white;padding:16px;margin-top:14px;display:flex;align-items:center;justify-content:space-between;gap:12px}.play-dock #routeWord{font-size:1.4rem;font-weight:750;letter-spacing:2px;overflow-wrap:anywhere}.play-dock small{display:block;font-size:.75rem;line-height:1.5;max-width:300px;margin-top:4px}.play-dock>.row{flex-shrink:0}.play-stats{display:flex;justify-content:space-between;background:#edf5f1;border-radius:10px;padding:17px;margin-bottom:18px}.play-stats small{font-size:.65rem;letter-spacing:1px;display:block}.play-stats strong{font-size:2rem;display:block;margin-top:6px}.word-entry{display:flex;justify-content:space-between;gap:12px;border-bottom:1px solid var(--line);padding:12px 0;font-size:.9rem}.word-entry span{overflow-wrap:anywhere}.word-entry small{display:block;font-size:.7rem;margin-top:4px}.result-title{font-size:1.5rem;line-height:1.3}.result-row{display:flex;justify-content:space-between;padding:14px;border-bottom:1px solid var(--line)}.result-row:first-of-type{background:#fff4dc;border-radius:8px}.result-row strong{font-size:1.2rem}footer{max-width:1320px;margin:0 auto;padding:12px 24px 30px;display:flex;justify-content:space-between;gap:15px;color:#6f8881;font-size:.65rem;letter-spacing:1px}dialog{border:1px solid var(--line);border-radius:16px;padding:26px;width:min(540px,calc(100vw - 24px));max-height:85dvh;overflow:auto;color:var(--ink);box-shadow:0 20px 80px #08251b30}dialog::backdrop{background:#0b211ac9;backdrop-filter:blur(4px)}dialog h2{font-size:1.3rem;letter-spacing:-.4px}.dialog-heading{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:20px}.dialog-heading h2{margin:0}.dialog-heading button{font-size:1.5rem;line-height:1;padding:5px 13px}.share-choice{border-top:1px solid var(--line);padding:20px 0 0;margin-top:20px}.library-card{display:flex;gap:14px;border-top:1px solid var(--line);padding:16px 0;align-items:center}.library-card img{width:75px;height:75px;object-fit:cover;border-radius:8px}.library-card>div{min-width:0;flex:1}.library-card h3{font-size:.95rem;margin:0 0 6px;overflow-wrap:anywhere}.library-card small{font-size:.75rem}.library-card .row{gap:6px;margin-top:8px}.library-card button{font-size:.75rem;padding:6px;min-height:36px}.viewport.drag-over{outline:4px solid var(--green);outline-offset:4px}[hidden]{display:none!important}
@media(min-width:1100px){.viewport{max-height:none}}
@media(max-width:850px){.workspace{grid-template-columns:minmax(0,1fr) 300px;gap:16px}.inspector{padding:16px}.connection{display:none}.empty-state h1{font-size:1.65rem}.play-dock{flex-wrap:wrap}}
@media(max-width:700px){.app-header{height:66px;padding:0 16px}.brand{font-size:1.35rem;gap:9px}.brand small{font-size:.55rem}.header-actions{gap:6px}main{padding:20px 14px}.project-bar{gap:8px;margin-bottom:18px}.project-title input{font-size:1.18rem}.eyebrow{font-size:.625rem}.project-actions button{padding:8px 11px;font-size:.8rem}.project-actions{gap:5px}.steps{margin-bottom:12px;position:sticky;top:0;background:#f3f6f5;z-index:5}.steps button{flex:1;text-align:center;font-size:.825rem;padding:13px 3px}.steps button span{font-size:.65rem;margin-right:5px}.workspace{display:flex;flex-direction:column;gap:12px}.surface-column,.inspector{width:100%}.surface-topline{font-size:.75rem;margin-bottom:7px}.surface-actions{gap:2px}.surface-actions button{min-height:32px;width:30px}.viewport{border-radius:12px;max-height:none}.empty-state{padding:20px}.empty-state h1{font-size:1.7rem}.empty-state p{font-size:.85rem;margin-bottom:15px}.upload-symbol{font-size:65px;margin-bottom:7px}.upload-symbol span{font-size:25px}.empty-state small{font-size:.7rem;margin-top:12px}.empty-state .text-button{font-size:.8rem}.board-caption{font-size:.7rem;margin:9px 0}.inspector{padding:18px}.panel-heading{margin-bottom:16px}.tool-tabs button{font-size:.875rem}.play-dock{padding:12px;position:sticky;bottom:8px;z-index:4;box-shadow:0 4px 20px #102d2b15}.play-dock>.row{margin-left:auto}.play-dock #routeWord{font-size:1.1rem}.play-dock small{max-width:190px;font-size:.65rem}.play-dock button{padding:8px 10px;font-size:.8rem}.status{font-size:.8rem}footer{padding:10px 16px 25px;font-size:.6rem}footer span:last-child{display:none}}
@media(prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}}
.viewport{scroll-margin-top:65px}
/* Action glyphs retain the original names through title and aria-label. */
button.glyph-button{position:relative;min-width:44px;min-height:44px;padding:8px 12px}
.button-glyph{display:inline-flex;align-items:center;justify-content:center;font-family:Arial,sans-serif;font-size:23px;line-height:1;vertical-align:middle;margin:0!important}
.button-glyph svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.steps .button-glyph{font-size:23px}
.has-unsaved-changes::before{content:'';position:absolute;right:5px;top:5px;width:6px;height:6px;border-radius:50%;background:currentColor}
button.glyph-button:focus-visible::after{content:attr(aria-label);position:absolute;bottom:calc(100% + 5px);left:50%;transform:translateX(-50%);padding:5px 8px;border-radius:5px;background:#163b31;color:#fff;font-size:12px;line-height:1.4;white-space:normal;width:max-content;max-width:170px;z-index:20;pointer-events:none}
/* Compact board authoring: image above, one tool drawer below on every screen. */
.workspace.compact-workspace{display:flex;flex-direction:column;align-items:center;gap:8px;max-width:900px;margin-inline:auto}
.compact-workspace .surface-column,.compact-workspace .inspector{width:100%;min-width:0}
.compact-workspace .viewport{width:min(100%,56vh,600px);max-height:none;margin-inline:auto}
.compact-workspace .surface-topline,.compact-workspace .board-caption{max-width:600px;margin-inline:auto}
.compact-workspace .status{min-height:0;padding:3px 0;margin:0;font-size:.78rem}
.compact-workspace .inspector{padding:0;overflow:visible;border-radius:12px}
.board-menu-bar{display:flex;align-items:center;gap:8px;padding:8px 10px;background:#edf4f0;border-radius:12px}
.board-menu-tabs{display:flex;gap:4px}
.board-menu-bar h2{flex:1;font-size:.86rem;font-weight:600;margin:0;min-width:0}
.board-menu-bar button{flex-shrink:0}
.board-menu-tabs button{background:transparent;border-color:transparent}
.board-menu-tabs button.active{background:white;border-color:var(--green)}
#boardMenuBody{padding:10px 14px}
#boardMenuBody label{margin:5px 0;font-size:.78rem}
#boardMenuBody .hint{margin:6px 0;font-size:.75rem;line-height:1.45}
#boardMenuBody input:not([type=range]):not([type=color]),#boardMenuBody select{min-height:38px;margin-top:3px;padding:6px 8px;font-size:.875rem}
#boardPaintMenu{display:flex;align-items:center;flex-wrap:wrap;gap:8px 12px}
#boardPaintMenu .paint-tools{display:flex;gap:4px;flex-wrap:wrap}
#boardPaintMenu>.row{flex:1;min-width:90px;max-width:160px}
#boardPaintMenu>.row:has(label:not([hidden])){min-width:110px}
#boardPaintMenu>.row:not(:has(label:not([hidden]))){display:none}
#boardPaintMenu #hexDetails{order:4;flex-basis:100%;margin:0}
#boardPaintMenu #shuffleLetters{margin-left:auto}
#boardGridMenu,#boardColoursMenu,#boardRulesMenu{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));align-items:end;gap:8px 14px}
#boardGridMenu>.hint,#boardColoursMenu>.hint,#boardRulesMenu>.hint,#dictionaryCount{grid-column:1/-1}
#boardGridMenu>.hint{order:3}
#boardColoursMenu>button{justify-self:start}
#boardRulesMenu textarea{min-height:65px;margin-top:3px;font-size:.875rem}
@media(max-width:700px){
 .compact-workspace .viewport{width:100%}
 .board-menu-bar{flex-wrap:wrap;gap:4px;padding:6px}
 .board-menu-bar h2{order:5;flex-basis:100%;font-size:.75rem;padding:2px 6px}
 .board-menu-tabs{flex:1}
 .board-menu-bar button.glyph-button{padding:6px;min-width:40px}
 #boardMenuBody{padding:10px}
 #boardGridMenu,#boardColoursMenu,#boardRulesMenu{grid-template-columns:repeat(2,minmax(0,1fr))}
 #boardRulesMenu>label:has(select),#boardRulesMenu>label:has(textarea),#boardRulesMenu>label:has(input[type=file]){grid-column:1/-1}
 #boardPaintMenu .paint-tools{gap:3px}
 #boardPaintMenu .paint-tools button{min-width:40px;padding:6px}
}

/* All stages share the same under-image menu shell and compact fields. */
.stage-menu-body{padding:10px 14px}
.stage-menu-body label{margin:5px 0;font-size:.78rem;min-width:0}
.stage-menu-body .hint{margin:6px 0;font-size:.75rem;line-height:1.45}
.stage-menu-body input:not([type=range]):not([type=color]),.stage-menu-body select{min-height:38px;margin-top:3px;padding:6px 8px;font-size:.875rem}
#frameTools,#toneTools,#drawTools,#obscureTools,#regionSettings,#playSetup{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px 14px;align-items:end}
.stage-menu-body .hint,#regionSettings,#regionSettings>.levels,#playSetup>#partyDictionarySettings,#playSetup>#playerNamesLabel,#playSetup>#playDictionaryInfo{grid-column:1/-1}
#frameTools .button-grid{display:flex;flex-wrap:wrap;gap:4px;margin:0}
#frameTools>.row{align-self:end}
#drawTools>.row{grid-column:span 2}
#regionSettings{padding-top:8px;border-top:1px solid var(--line)}
#regionSettings .difficulty-heading{margin:5px 0}
#regionSettings>.levels{margin:4px 0}
.stage-menu-body button.full{width:auto;justify-self:start}
.stage-menu-body button:not(.glyph-button){min-height:44px}
#activePlay .play-stats{padding:10px 14px;margin-bottom:8px}
#activePlay .play-stats strong{font-size:1.6rem}
#activePlay .word-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0 14px;max-height:220px;overflow:auto}
#activePlay .word-entry{padding:8px 0}
#activePlay #revealStatus{margin:8px 0}
#activePlay button.full{display:inline-flex;margin-right:6px}
.compact-workspace .play-dock{max-width:600px;margin:8px auto;position:static;padding:10px 12px}
#playBadge{white-space:normal;max-width:200px;font-size:.6rem}
@media(max-width:700px){
 .stage-menu-body{padding:10px}
 #frameTools,#toneTools,#drawTools,#obscureTools,#regionSettings,#playSetup{grid-template-columns:repeat(2,minmax(0,1fr))}
 #frameTools .button-grid,#drawTools>.row,#playSetup>label:has(select),#obscureTools>label:has(select){grid-column:1/-1}
 #activePlay .word-list{grid-template-columns:repeat(2,minmax(0,1fr))}
 .compact-workspace .play-dock{position:sticky;bottom:8px}
 #imagePanel .board-menu-tabs{flex:1}
 #imagePanel .board-menu-bar{gap:3px}
}
/* Keep the full authoring/game column aligned with the existing controls. */
main>.project-bar,main>.steps{max-width:900px;margin-inline:auto}
.compact-workspace .viewport{width:100%;aspect-ratio:1 / 1;height:auto;min-height:0;max-height:none}
.compact-workspace .surface-topline,.compact-workspace .board-caption,.compact-workspace .play-dock{width:100%;max-width:none}
#challengePanel{border-top:1px solid var(--line);margin-top:12px;padding-top:10px;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px 10px;align-items:end}
#challengePanel>.hint{grid-column:1/-1}
#challengeListLabel,#playChallengeListLabel{grid-column:1/-1}

#letterSeedSettings{grid-column:1/-1;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px 10px;align-items:end}
#letterSeedSettings .hint{grid-column:1/-1}
#letterSeedSettings{grid-template-columns:minmax(0,1fr) auto auto}

.animal-layer{pointer-events:none;z-index:2}
.hex.animal-occupied .hex-shape{fill:#893f27;fill-opacity:.85;stroke:#ffdda2;stroke-width:4;stroke-dasharray:7 4}
.hex.animal-occupied{cursor:wait}

/* A restrained overhead tilt during play; image authoring stays square. */
.board-surface.angled-board{transform:translate(var(--camera-x,0%),var(--camera-y,0%)) perspective(var(--board-perspective,2700px)) rotateX(var(--camera-tilt,22deg)) rotateZ(var(--camera-yaw,0deg)) scale(.94);transform-origin:50% 50%;box-shadow:0 12px 18px #102d2b24;}

.board-surface{transform:perspective(var(--board-perspective,2700px)) rotateX(0deg) rotateZ(0deg) scale(1);transition:transform 650ms cubic-bezier(.22,.7,.25,1),box-shadow 650ms;transform-origin:50% 50%;}
.board-surface.camera-dragging{transition:none;}
.camera-controls{display:flex;flex-wrap:wrap;justify-content:flex-end;align-items:center;gap:3px;max-width:380px;margin:-3px 0 8px auto;}
.camera-controls button{min-height:32px;width:32px;padding:3px;font-size:19px;}
.camera-controls button[aria-pressed=true]{background:#17665b;color:white;}
.camera-controls output{font-size:11px;min-width:62px;text-align:right;}
@media(prefers-reduced-motion:reduce){.board-surface{transition:none;}}

/* A stable play viewport makes centered zoom and two-axis panning predictable. */
.compact-workspace .viewport.play-navigation{aspect-ratio:1;overflow:auto;overscroll-behavior:contain;}

/* Brook scene is decorative, independent of puzzle imagery and interaction. */
html{background:#172a20}body{isolation:isolate;background:transparent;min-height:100dvh}.brook-background{position:fixed;inset:0;z-index:-1;pointer-events:none;background:#172a20 url('./assets/backgrounds/brook.png') center/cover no-repeat}.brook-background canvas{display:block;width:100%;height:100%;opacity:0}.app-header{background:#102d2be8;backdrop-filter:blur(6px)}body>main{max-width:980px;width:calc(100% - 40px);margin:22px auto;background:#f3f6f5f2;border:1px solid #ffffff70;border-radius:18px;box-shadow:0 10px 45px #061b2433}body>footer{max-width:980px;color:#f2f7ed;text-shadow:0 1px 3px #102d2b}#backgroundMotion{min-width:40px;padding:8px;font-size:17px}@media(max-width:700px){body>main{width:calc(100% - 20px);margin:12px auto;padding:16px 12px;border-radius:12px}.header-actions .connection{display:none}}

.mine-explosion{position:absolute;z-index:10;pointer-events:none;font-size:clamp(70px,14vw,180px);color:#ffe287;text-shadow:0 0 16px #ff4d00,0 0 45px #ff9900;transform:translate(-50%,-50%);animation:mine-explode 1.5s ease-out forwards}@keyframes mine-explode{0%{opacity:1;transform:translate(-50%,-50%) scale(.2)}25%{opacity:1;transform:translate(-50%,-50%) scale(1.7) rotate(35deg)}100%{opacity:0;transform:translate(-50%,-50%) scale(2.5) rotate(80deg)}}@media(prefers-reduced-motion:reduce){.mine-explosion{animation:none;opacity:.8}}

.brook-background{overflow:hidden}.brook-background video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}.brook-background iframe{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:100vw;height:56.25vw;min-width:177.78vh;min-height:100vh;border:0;pointer-events:none}
@media(max-width:480px){.app-header{gap:8px}.app-header .brand{font-size:1.12rem;gap:7px}.app-header .brand img{width:28px;height:28px}.app-header .brand small{font-size:.48rem}.header-actions{gap:3px}.header-actions button,#backgroundMotion{min-width:34px;width:34px;padding:5px}}
#boardBackgroundMenu input[type=checkbox]{display:inline-block;width:18px;min-height:18px;height:18px;margin:0 8px 0 0;padding:0;vertical-align:middle}

#musicVolumeControl{color:white;margin:0;width:110px;font-size:11px}#musicVolumeControl output{color:white}#musicVolumeControl input{margin:0;height:24px}@media(max-width:700px){.app-header:has(#musicVolumeControl:not([hidden])){height:auto;min-height:66px;flex-wrap:wrap;padding-top:8px;padding-bottom:8px}.header-actions:has(#musicVolumeControl:not([hidden])){flex-wrap:wrap;justify-content:flex-end}#musicVolumeControl{width:90px}}

/* At the overview zoom the board is a fixed viewport; zooming enables panning. */
.compact-workspace .viewport.zoom-fitted{overflow:hidden;}
#backgroundAudio{position:relative;font-size:1.2rem;}
#backgroundAudio[aria-pressed="false"]::before{content:'';position:absolute;width:25px;height:3px;background:#ff6868;border-radius:2px;left:50%;top:50%;transform:translate(-50%,-50%) rotate(-45deg);box-shadow:0 0 0 1px #102d2b;}
#backgroundAudio[aria-pressed="true"]{background:#d9eee5;border-color:#92c7b1;color:#104c41;box-shadow:inset 0 0 0 1px #92c7b1;}

/* Landscape identifies background motion; the badge shows the available action. */
#backgroundMotion{position:relative;display:grid;place-items:center;width:44px;height:44px;}
#backgroundMotion svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;pointer-events:none;}
#backgroundMotion .motion-action{position:absolute;right:-6px;bottom:-5px;width:21px;height:21px;display:grid;place-items:center;border:1px solid #74968b;border-radius:50%;background:#102d2b;color:white;pointer-events:none;}
#backgroundMotion .motion-action svg{width:16px;height:16px;}
#backgroundMotion .motion-play{fill:currentColor;stroke:none;}
#backgroundMotion .motion-pause{stroke-width:3;}
#backgroundMotion[aria-pressed="true"]{background:#d9eee5;border-color:#92c7b1;color:#104c41;}
#backgroundMotion[aria-pressed="true"] .motion-play,#backgroundMotion[aria-pressed="false"] .motion-pause{display:none;}

#sharedLibraryDialog{width:min(860px,calc(100% - 24px));}#sharedPuzzleList{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:16px}.shared-puzzle{border:1px solid var(--line);border-radius:12px;padding:14px}.shared-puzzle img{width:100%;aspect-ratio:1;object-fit:cover;border-radius:8px}.shared-puzzle h3{overflow-wrap:anywhere}.shared-puzzle button{margin:4px 0}.shared-puzzle small{display:block}#submitToLibrary{width:18px;min-height:18px;height:18px;vertical-align:middle;margin-right:8px}

#accountButton{display:grid;place-items:center;padding:8px}#accountButton[aria-pressed="true"]{background:#d9eee5;border-color:#92c7b1;color:#104c41}#accountDialog{width:min(540px,calc(100% - 24px))}#accountDialog .row{align-items:center;margin-top:16px}#accountRecovery{padding:16px;border:1px solid #e9b454;border-radius:10px;background:#fff5de}#accountRecoveryCode{font-family:monospace;min-height:80px}#accountMember button{margin:6px 0}

.empty-state .start-options{display:flex;flex-direction:column;align-items:center;gap:10px}
.empty-state .start-options>button{margin:0;min-height:44px}
.empty-state .start-option-divider{display:block;margin:0;color:var(--muted);font-size:.8rem;line-height:1.2}

#boardTilt{display:grid;place-items:center;padding:8px}#boardTilt[aria-pressed="true"]{background:#d9eee5;border-color:#92c7b1;color:#104c41;box-shadow:inset 0 0 0 1px #92c7b1}

#arrangementSettings{grid-column:1/-1}#arrangementColour{display:flex;align-items:center;gap:12px}#arrangementColour label{flex:1}.board-surface.arrangement-picking{transform:none!important}.arrangement-picking #imageCanvas{visibility:visible!important}.arrangement-picking #overlay>*{visibility:hidden}.arrangement-picking #overlay{cursor:crosshair!important}

/* Expedition uses native bounded scrolling; the image is the complete world. */
.compact-workspace .viewport.expedition-view{aspect-ratio:1 / 1;height:auto;min-height:0;max-height:none;overflow:auto;overscroll-behavior:contain;scrollbar-width:none;position:relative;}
.viewport.expedition-view .board-surface{max-width:none;flex-shrink:0;margin:0;}
.expedition-navigator{display:flex;align-items:center;gap:14px;padding:12px;border:1px solid var(--line);border-radius:12px;background:#f7faf6;margin-top:12px;}
#expeditionMap{width:160px;height:auto;flex-shrink:0;border:1px solid #718780;border-radius:6px;cursor:crosshair;touch-action:none;}
.expedition-navigator .hint{margin:5px 0;font-size:.75rem}.expedition-navigator button{min-width:42px;min-height:42px;margin-right:5px}.expedition-navigator button[aria-pressed=true]{background:#175446;color:white}
#expeditionSettings{grid-column:1/-1;margin-top:0}#expeditionSettings label{margin:10px 0}
@media(max-width:480px){#expeditionNavigator{--map-size:112px}.expedition-navigator{gap:10px;padding:9px}}

.expedition-view #boardWorld{overflow:hidden;position:relative;isolation:isolate;}

#octagonOptions{grid-column:1/-1}

/* Keep drag, touch and wheel navigation without scrollbar chrome. */
.compact-workspace .viewport.play-navigation{scrollbar-width:none;-ms-overflow-style:none}
.compact-workspace .viewport.expedition-view::-webkit-scrollbar,.compact-workspace .viewport.play-navigation::-webkit-scrollbar{display:none;width:0;height:0}

/* Keep workspace stages legible as icons and concise labels on every screen. */
.steps button[data-view]{display:flex;align-items:center;justify-content:center;gap:9px;min-height:52px;flex:1;padding:12px 6px;}
.steps button[data-view] svg{width:30px;height:28px;flex:none;display:block;}
.steps button[data-view] .step-label{font-size:.875rem;font-weight:650;line-height:1.2;color:inherit;margin:0;}
@media(max-width:480px){.steps button[data-view]{gap:6px}.steps button[data-view] svg{width:26px;height:25px}.steps button[data-view] .step-label{font-size:.8rem}}

/* Picture / game piece branding: raised uppercase square letter tiles. */
.app-header .brand{gap:10px;flex-shrink:0;letter-spacing:0}
.app-header .brand .brand-picture{width:40px;height:48px;flex:none}
.brand-identity{display:block}.brand-letter-tiles{display:grid;grid-template-columns:repeat(9,24px);gap:3px}
.brand-letter-tiles>span{display:grid;place-items:center;width:24px;height:24px;background:#f4f1e9;color:#173d37;border-radius:2px;box-shadow:0 3px 0 #b4c5b1;font-family:Bahnschrift,'Segoe UI',sans-serif;font-size:16px;font-weight:600;line-height:1;letter-spacing:0}
.app-header .brand small{margin-top:8px;font-size:8px;font-weight:600;letter-spacing:1.65px;color:#e4ece2}
@media(max-width:560px){.app-header{height:auto;min-height:80px;flex-wrap:wrap;padding:10px 16px;gap:10px}.app-header .brand{gap:8px}.app-header .brand .brand-picture{width:34px;height:41px}.brand-letter-tiles{grid-template-columns:repeat(9,20px);gap:3px}.brand-letter-tiles>span{width:20px;height:20px;font-size:14px}.app-header .brand small{font-size:7px;letter-spacing:1.35px;margin-top:7px}.app-header .header-actions{margin-left:auto}}

/* Match the visible picture tile to the complete wordmark + tagline block. */
.app-header .brand{align-items:stretch}
.app-header .brand .brand-picture{height:auto;min-height:0;width:36px;align-self:stretch;object-fit:fill}
.app-header .brand-identity{line-height:1}
.app-header .brand small{line-height:12px}
@media(max-width:560px){.app-header .brand .brand-picture{width:31px;height:auto}.app-header .brand small{line-height:10px}}

.viewport.ticker-play{overflow:hidden!important}.ticker-play .board-surface{transform:none!important;width:100%!important;margin:0!important;transition:none!important}

.theme-choices{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:6px;max-height:270px;overflow:auto}.theme-choice{display:flex;align-items:center;gap:4px;padding:4px;background:#173b37;border-radius:8px;color:#fff}.theme-choice label{display:flex;align-items:center;gap:6px;margin:0;flex:1}.theme-choice input{width:auto}.theme-choice button{min-width:36px;padding:6px}

#boardRulesMenu details:has(#themeChoices){grid-column:1/-1}#themeChoices .theme-choice label{display:flex;justify-content:flex-start;color:#fff}#themeChoices input[type=checkbox]{width:18px;height:18px;min-height:18px;margin:0;flex:0 0 18px}#themeChoices .theme-choice{min-height:44px}

#sampleDialog{width:min(900px,94vw)}.sample-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:16px 0}.sample-card{display:flex;gap:14px;text-align:left;white-space:normal;align-items:center;padding:12px}.sample-card img{width:100px;height:100px;object-fit:cover;border-radius:10px}.sample-card>span{display:grid;gap:6px}.sample-card small{color:inherit;opacity:.8}.sample-card strong{font-size:1.1rem}@media(max-width:600px){.sample-list{grid-template-columns:1fr}.sample-card img{width:82px;height:82px}}

.ticker-rotary{width:min(360px,100%);margin:12px auto;text-align:center;padding:8px 12px;border-radius:20px;background:#f1f5e9;color:#173b37;box-shadow:0 3px 14px #102d2720}.ticker-rotary svg{display:block;width:100%;max-height:190px;touch-action:none;user-select:none;cursor:grab;overflow:visible}.ticker-rotary svg:active{cursor:grabbing}.ticker-rotary svg:focus-visible{outline:none}.ticker-rotary svg:focus-visible .rotary-track{stroke:#e9b454}.rotary-track{fill:none;stroke:#b3c6bc;stroke-width:18;stroke-linecap:round}.rotary-push{fill:none;stroke:#547e71;stroke-width:3}.ticker-rotary text{fill:#173b37;text-anchor:middle;font:20px system-ui}.ticker-rotary .rotary-caption{font:10px system-ui;letter-spacing:1px}[data-rotary-handle]{transition:transform .12s ease-out}[data-rotary-handle] circle{fill:#245c50;stroke:none}[data-rotary-handle] path{stroke:white;stroke-width:2}.ticker-rotary.selecting [data-rotary-handle] circle{fill:#b77e27}.ticker-rotary small{display:block;margin:4px 0;font-size:12px}.ticker-rotary label{max-width:160px;margin:auto}@media(prefers-reduced-motion:reduce){[data-rotary-handle]{transition:none}}

.viewport.ticker-play{position:relative}#tickerRotary{position:absolute;z-index:8;bottom:12px;left:50%;transform:translateX(-50%);width:min(300px,80%);margin:0;padding:4px 10px;background:#f1f5e9ed;box-shadow:0 4px 20px #102d2740}#tickerRotary svg{max-height:130px}#tickerRotary small:last-child{display:none}#tickerRotary small{font-size:11px}#tickerRotary label{font-size:11px}#tickerRotary select{min-height:28px;padding:2px}@media(max-width:600px){#tickerRotary{bottom:6px;width:65%;}#tickerRotary svg{max-height:90px}#tickerRotary small{font-size:9px}}

#tickerRotary{background:transparent;box-shadow:none;border:0;padding:0}.viewport.ticker-play{border:3px solid #317c70;box-sizing:border-box}

#tickerRotary,#tickerRotary svg{border:0;outline:none;box-shadow:none}

.warp-starfield{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}.warp-starfield[hidden]{display:none}
#tickerRotary .ticker-row-rocker{position:absolute;top:0;bottom:0;width:48px;padding:0;min-height:0;touch-action:none;background:transparent;border:0;box-shadow:none;cursor:ns-resize}#tickerRotary .ticker-row-rocker.left{left:-48px}#tickerRotary .ticker-row-rocker.right{right:-48px}#tickerRotary .ticker-row-rocker svg{width:48px;height:100%;max-height:110px;fill:none;stroke:#173b37;stroke-width:3}#tickerRotary [data-row-grip]{transition:transform .13s ease-out}#tickerRotary [data-row-grip] rect{fill:#173b37;stroke:none}#tickerRotary [data-row-grip] path{stroke:#fff}.ticker-row-rocker:focus-visible [data-row-grip] rect{fill:#b77e27!important}.source-credit{font-size:.7rem;margin:5px 0;color:#355c54}.source-credit a{color:inherit}

.brook-background .warp-starfield{opacity:1}

#tickerRotary{max-width:calc(100% - 100px)}

.ticker-rotate{display:none}.ticker-play .ticker-rotate{display:grid;place-items:center;line-height:1;position:absolute;bottom:14px;z-index:9;width:44px;height:44px;padding:0;font-size:30px;background:#173b37;color:#fff;border:0;border-radius:50%}.ticker-rotate.left{left:12px}.ticker-rotate.right{right:12px}.ticker-play #tickerRotary{max-width:calc(100% - 200px)}

#tickerRotary .ticker-row-rocker svg{stroke:#f0f7f3;filter:drop-shadow(0 1px 2px #102d2b)}#tickerRotary [data-row-grip] rect{fill:#e5efe9}#tickerRotary [data-row-grip] path{stroke:#173b37}

.completion-highlight .hex-shape{stroke:#fff3b2;stroke-width:4;filter:drop-shadow(0 0 5px #49cbbb)}

.ticker-rotate svg{display:block;flex:none;width:32px;height:32px;fill:none;stroke:currentColor;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round;pointer-events:none}

/* Border markers are painted after the tiles in the SVG foreground. */
.ticker-focus-indicators>path{stroke:#fff4ce;stroke-width:2;stroke-linejoin:round;paint-order:stroke fill;filter:drop-shadow(0 0 3px #fff4ce) drop-shadow(0 0 8px #e9b454);pointer-events:none}

#interfaceAudio{display:grid;place-items:center;padding:8px}#interfaceAudio .effects-mute{display:none}#interfaceAudio[aria-pressed="false"] .effects-mute{display:block;stroke:#ef7777;stroke-width:2.4}#interfaceAudio[aria-pressed="true"]{color:#c6edda;background:#ffffff12}
