:root{--paper:#f7f8f4;--ink:#27392f;--muted:#728075;--green:#3b7654;--orange:#d99d5e;--line:#e1e7dd;--panel:#fff;--tile:#fffdf8;--gap:5px;--cell:54px}
*{box-sizing:border-box}
html,body{margin:0;width:100%;height:100%;overflow:hidden;overscroll-behavior:none}
body{font:14px/1.4 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--ink);background:var(--paper)}
button{font:inherit;cursor:pointer}button:focus-visible,a:focus-visible{outline:3px solid var(--orange);outline-offset:2px}
.app{height:100vh;height:100dvh;min-height:0;display:grid;grid-template-rows:53px 77px minmax(0,1fr) 34px;overflow:hidden}
.sitebar{display:flex;justify-content:space-between;align-items:center;padding:0 clamp(13px,3vw,36px);background:#fff;border-bottom:1px solid var(--line)}
.brand{display:flex;align-items:center;gap:10px;color:var(--ink);font-size:.99rem;font-weight:800;letter-spacing:-.04em;text-decoration:none}
.brand-symbol{width:24px;height:24px;display:grid;grid-template-columns:repeat(2,1fr);gap:3px;transform:rotate(-8deg)}
.brand-symbol i{border-radius:3px;background:#4c865f}.brand-symbol i:nth-child(2){background:#dfa15b}.brand-symbol i:nth-child(3){background:#f0c181}.brand-symbol i:nth-child(4){background:#8bbd91}
.sitebar-right{display:flex;align-items:center;gap:13px}
.prototype-tag{font-size:.66rem;color:#8c6c3d;background:#faf0dc;border:1px solid #efdcc0;padding:5px 9px;border-radius:100px;font-weight:800;letter-spacing:.055em}
.icon-btn{background:#f2f6f1;color:#417254;border:1px solid #dce9dc;border-radius:50%;width:29px;height:29px;font-size:16px;font-weight:900}
.headline{max-width:1400px;width:100%;margin:auto;padding:8px clamp(15px,3vw,34px);display:flex;align-items:center;justify-content:space-between;gap:16px}
.headline-left{display:flex;align-items:center;gap:14px}.game-mark{background:#e8f1e7;color:#398259;width:48px;height:48px;border-radius:14px;display:grid;place-items:center;font-size:2rem;font-weight:900}
h1{font:700 clamp(1.65rem,3vw,2.45rem)/1 Georgia,Cambria,serif;letter-spacing:-.065em;margin:0}
.dot{color:var(--orange)}.headline p{margin:5px 0 0;color:var(--muted);font-size:.8rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
.headline-right{display:flex;align-items:center;gap:12px}
.counter{font-weight:800;color:#578364;font-size:.8rem}
.header-reset{border:1px solid #d4e0d5;background:white;border-radius:10px;padding:9px 12px;color:#51715b;font-weight:750;white-space:nowrap}
.workspace{min-width:0;min-height:0;max-width:1400px;width:100%;margin:0 auto;padding:0 clamp(10px,2.8vw,32px) 6px;display:grid;grid-template-columns:minmax(0,1fr) minmax(275px,335px);gap:13px}
.board-panel,.tray-panel{background:#fff;border:1px solid #e0e7dc;border-radius:18px;min-width:0;min-height:0;overflow:hidden;box-shadow:0 9px 28px rgba(44,72,51,.035)}
.board-panel{display:flex;flex-direction:column;padding:14px 16px 10px;position:relative}
.panel-head,.tray-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;flex:none}
.micro-label{font-size:.66rem;font-weight:900;letter-spacing:.105em;color:#397653}
.micro-muted{color:#a3afa4;font-weight:700}
.rule-hint{font-size:.69rem;color:#8e9e90}
.board-viewport{min-height:0;flex:1;display:flex;align-items:center;justify-content:center;overflow:hidden;position:relative;padding:12px 12px 4px}
.board{position:relative;flex:none;isolation:isolate;--gap:5px;--cell:55px}
.cell-grid{width:100%;height:100%;display:grid;grid-template-columns:repeat(6,var(--cell));grid-template-rows:repeat(5,var(--cell));gap:var(--gap)}
.cell{width:var(--cell);height:var(--cell);border:1px solid #e5e9e3;border-radius:8px;box-shadow:0 2px 2px rgba(50,60,49,.04);padding:0;background:#f8f8f6;position:relative;z-index:1}
.cell[disabled]{cursor:default}
.cell:not([disabled]):hover{filter:brightness(.977)}
.cell.hole{visibility:hidden;pointer-events:none}
.cell.hover-ok{outline:3px solid #329d69;outline-offset:-3px;box-shadow:0 0 0 3px #43aa7a44,inset 0 0 0 3px #329d6955}
.cell.s-syn1{background:#f4e9f7}.cell.s-opp1{background:#f9e2e9}
.cell.s-birds{background:#e1f1ef}.cell.s-food{background:#f8ebda}
.cell.s-neutral{background:#f6f7f4}.cell.s-syn2{background:#e5eff8}
.cell.s-color{background:#fbf2d6}.cell.s-tools{background:#e8f1df}.cell.s-opp2{background:#fae6e6}
.region-lines,.chain-layer,.word-layer,.marker-layer{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
.region-lines{z-index:3;overflow:visible}.word-layer{z-index:4}.chain-layer{z-index:6;overflow:visible}.marker-layer{z-index:7}
.rim{fill:none;stroke-width:2.4;stroke-dasharray:5 4;stroke-linecap:round;opacity:.97;filter:drop-shadow(0 1px 1px rgba(255,255,255,.75))}
.rule-tag{position:absolute;transform:translate(-50%,-55%);background:var(--tag-color);border:2px solid #fff;color:#fff;border-radius:7px;padding:3px 5px;line-height:1.05;font-size:clamp(8px,1vw,10px);min-height:23px;min-width:25px;box-shadow:0 2px 5px #26342b24;font-weight:900;white-space:nowrap;pointer-events:auto;cursor:pointer;letter-spacing:.01em;z-index:10}
.rule-tag.is-complete{box-shadow:0 0 0 3px #7bbc844d,0 2px 5px #26342b24}
/* Fill the existing clue badge with a legible heavy glyph, without enlarging
   the badge itself. Multi-letter descriptor labels retain their own sizing. */
.rule-tag.rule-symbol{
 box-sizing:border-box;width:25px;height:23px;min-width:25px;min-height:23px;
 padding:0;display:flex;justify-content:center;align-items:center;
 font-family:Arial,"DejaVu Sans",system-ui,sans-serif;
 font-size:20px;font-weight:900;line-height:1;letter-spacing:-.035em;
 -webkit-text-stroke:.65px currentColor;text-shadow:0 0 .65px currentColor;
 text-align:center;
}
/* Identical centered vector artwork on board, legend and help. The square
   viewBox gives each mark a consistent clear margin at every display size. */
.linklets-rule-icon{display:block;width:1em;height:1em;flex:none}
.rule-tag.rule-symbol .rule-glyph.linklets-rule-icon{
 display:block;width:100%;height:100%;max-width:100%;max-height:100%;
}
.legend b{display:inline-grid;place-items:center;line-height:1}
.word-tile{display:flex;flex-direction:row;align-items:stretch;justify-content:stretch;padding:0;overflow:hidden;color:#25352b;border:1.5px solid #adbdac;border-radius:9px;background:#fffdfa;user-select:none;-webkit-user-select:none;touch-action:none;box-shadow:0 3px 0 #c5d0c0,0 4px 6px #22352218;font-weight:850;transition:border-color .14s,box-shadow .14s,background .14s}
.word-tile .half{display:flex;align-items:center;justify-content:center;min-width:0;min-height:0;flex:1;font-size:clamp(8px,1.15vw,11.5px);letter-spacing:-.012em;padding:1px;line-height:1;overflow:hidden;white-space:nowrap}
.word-tile .half+.half{border-left:1px dashed #b3c2b5}
.word-tile .half-label{display:inline-block;pointer-events:none;white-space:nowrap;transform-origin:center}
.word-tile.placed{
 position:absolute;pointer-events:auto;cursor:grab;display:flex;flex-direction:row;
 justify-content:stretch;align-items:stretch;gap:0;z-index:5;
 overflow:visible;border:1.5px solid #819a88;background:#fff;
 border-radius:9px;box-shadow:none;
}
.word-tile.placed.vertical{flex-direction:column}
.word-tile.placed .half{
 flex:1 1 50%;width:auto;height:auto;min-width:0;min-height:0;
 border:0;border-radius:0;position:relative;background:var(--half-shade,#f6f7f4);
 font-size:clamp(7px,1.1vw,11px);letter-spacing:-.018em;
 white-space:nowrap;overflow:visible;box-shadow:none;
}
.word-tile.placed .half+.half{border-left:1px dashed #8ea798}
.word-tile.placed.vertical .half+.half{border-left:0;border-top:1px dashed #8ea798}
.word-tile.placed.cross-region .half+.half{border-left:2px dashed var(--seam-color,#628967)}
.word-tile.placed.cross-region.vertical .half+.half{border-left:0;border-top:2px dashed var(--seam-color,#628967)}
.word-tile.placed .half:first-child{border-radius:7px 0 0 7px}
.word-tile.placed .half:last-child{border-radius:0 7px 7px 0}
.word-tile.placed.vertical .half:first-child{border-radius:7px 7px 0 0}
.word-tile.placed.vertical .half:last-child{border-radius:0 0 7px 7px}
.word-tile.placed.focused{
 outline:2px solid #418f62;outline-offset:2px;
 box-shadow:none;
}
.word-tile.placed.placed-rotating{
 z-index:8;transform:rotate(var(--board-angle,0deg));transform-origin:center;
 transition:transform .2s cubic-bezier(.17,1.14,.37,1);
}
.word-tile.placed.placed-rotating .half-label{
 transform:rotate(var(--board-counter-angle,0deg));
 transition:transform .2s cubic-bezier(.17,1.14,.37,1);
}
.placement-preview{
 position:absolute;display:flex;flex-direction:row;align-items:stretch;
 border:3px solid var(--preview-accent,#2d9c67);
 border-radius:10px;overflow:hidden;pointer-events:none;z-index:5;
 background:#fff;box-shadow:0 0 0 4px #46a97944,0 9px 20px #164d2b3f;
 opacity:.94;transition:left .06s ease,top .06s ease;
}
.placement-preview[hidden]{display:none}
.placement-preview.vertical{flex-direction:column}
.preview-half{
 flex:1 1 50%;min-width:0;min-height:0;display:grid;place-items:center;
 font-size:clamp(7px,1.1vw,11px);font-weight:900;color:#214633;
 white-space:nowrap;line-height:1;
}
.preview-half::after{content:"";width:13px;height:13px;border:2px solid #437955;
 border-radius:50%;background:#ffffffaa;box-shadow:inset 0 0 0 3px #ffffff66}
.preview-half+.preview-half{border-left:2px dashed #51966b}
.placement-preview.vertical .preview-half+.preview-half{border-left:0;border-top:2px dashed #51966b}
.word-tile.just-landed{animation:snap-tile .43s cubic-bezier(.15,1.5,.42,1) both}
@keyframes snap-tile{0%{transform:translateY(-12px) scale(1.08) rotate(-2deg)}65%{transform:translateY(2px) scale(.98)}100%{transform:translateY(0) scale(1)}}
.word-tile.in-tray{width:100%;height:100%;min-height:29px;position:relative;cursor:grab;background:#fffdfa}
.word-tile.in-tray .half{font-size:clamp(8px,.82vw,11px)}
.word-tile.in-tray.selected-slot{visibility:hidden}
.word-tile.selected-floating{position:fixed!important;z-index:110;pointer-events:auto;cursor:grab;background:#f4fff0;border:2px solid #347952;box-shadow:0 0 0 3px #b4d7b9,0 9px 18px #233f2850;transform-origin:center;transform:rotate(var(--turn-angle,0deg));transition:transform .19s cubic-bezier(.19,1.1,.38,1);overflow:visible}
.word-tile.selected-floating .half{background:#f4fff0;overflow:visible}
.word-tile.selected-floating .half-label{transform:rotate(var(--counter-angle,0deg));transition:transform .19s cubic-bezier(.19,1.1,.38,1);font-size:clamp(8px,2.15vw,10px)}
.word-tile.selected-floating .half+.half{border-left:1px dashed #9ebca4}
.word-tile.drag-ghost{position:fixed!important;z-index:9999!important;pointer-events:none!important;min-width:100px;opacity:.94;transform:rotate(var(--turn-angle,0deg));box-shadow:0 15px 30px #152d1d3e;overflow:visible;background:#fff}
.word-tile.drag-ghost .half-label{transform:rotate(var(--counter-angle,0deg))}
.chain-halo{stroke:none;pointer-events:none;filter:blur(4px)}
.chain-burst{fill:none;stroke-width:3;pointer-events:none;filter:drop-shadow(0 0 3px #ffffffbb)}
.chain-segment{fill:none;stroke-width:4;stroke-linecap:round;filter:drop-shadow(0 1px 3px #152a2277)}
.chain-loop{fill:none;stroke-width:3.6;filter:drop-shadow(0 1px 2px #142a2466)}
.chain-pin{stroke-width:2;fill:white}
.legend{display:flex;justify-content:center;gap:8px 14px;align-items:center;flex-wrap:nowrap;padding:6px 1px 8px;min-height:32px;flex:none;border-top:1px solid #edf0eb;color:#647367;font-size:.69rem}
.legend span{display:flex;align-items:center;gap:5px;white-space:nowrap}
.legend b{font-size:.9rem;color:#518364}
.board-bottom{display:flex;justify-content:space-between;align-items:center;flex:none;padding:5px 1px 0;font-size:.72rem;color:#6d8271;border-top:1px solid #f0f2ee}
.completion{display:flex;align-items:center;gap:7px}.completion-dot{height:7px;width:7px;background:#d2a069;border-radius:50%}
.completion.done .completion-dot{background:#398f5c}
.tray-panel{display:flex;flex-direction:column;padding:16px 14px 12px;gap:8px}
.tray-heading h2{font:700 1.32rem Georgia,serif;letter-spacing:-.035em;margin:1px 0 0}
.tray-counter{font-weight:800;color:#5c8464;font-size:.77rem;white-space:nowrap}
.tray-description{margin:0;color:#829183;font-size:.75rem;line-height:1.3}
.tray{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:minmax(30px,46px);gap:8px;overflow:hidden;min-height:0;align-content:start;flex:1;padding:4px}
.tray-controls{flex:none;display:flex;gap:8px;align-items:center;justify-content:space-between}
.rotation-tip{color:#568362;font-size:.7rem;font-weight:750;line-height:1.3;max-width:70%}
.tray-controls button{border:1px solid #dae5da;border-radius:9px;background:#f9fbf8;padding:9px 10px;font-size:.76rem;color:#447253;font-weight:800;white-space:nowrap}
.tray-controls button.demo-btn{background:#347653;border-color:#347653;color:#fff}
.tray-controls button:not(:disabled):hover{filter:brightness(.96)}
.prototype-disclaimer{font-size:.67rem;color:#8b8f83;line-height:1.4;margin:2px 0 0}
.status{display:flex;align-items:center;justify-content:center;gap:9px;min-width:0;overflow:hidden;padding:3px 13px 5px;color:#607b65;font-size:.77rem}
.status-link{color:#72a37e;font-size:1.5rem;line-height:1}
#status-message{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.win-overlay[hidden]{display:none}.win-overlay{position:absolute;inset:20% 17%;border-radius:20px;background:#f6fff2f6;border:2px solid #aacfb1;z-index:10;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:9px;box-shadow:0 22px 50px #324b3444;text-align:center}
.win-spark{font-size:3rem;color:#3e9c61}.win-overlay strong{font:700 1.7rem Georgia,serif}.win-overlay small{color:#5b8065}
.win-overlay button,.start-help{background:#387955;border:0;color:#fff;border-radius:9px;padding:10px 18px;font-weight:800}
dialog{max-width:min(500px,calc(100vw - 28px));border:1px solid #d5e3d6;border-radius:18px;padding:22px;line-height:1.65;box-shadow:0 20px 60px #172c1b4f;color:var(--ink)}
dialog::backdrop{background:#182b1d8b}dialog h2{font:700 1.9rem Georgia,serif;margin:4px 0 14px}
dialog p,dialog li{color:#566a5b;font-size:.9rem}dialog li+li{margin-top:6px}.dialog-head{display:flex;justify-content:space-between;align-items:center;gap:8px;font-size:.72rem;font-weight:900;letter-spacing:.08em;color:#3b8055}
.dialog-head button{border:0;background:#eff5ed;border-radius:99px;width:32px;height:32px}.disclaimer{background:#fbf4e8;border-left:3px solid #d4ad74;padding:8px 12px}
.start-help{width:100%;margin-top:5px}
@media(max-width:800px){
 .app{grid-template-rows:42px 44px minmax(0,1fr)}
 .sitebar{padding:0 12px}.prototype-tag{font-size:.6rem;padding:4px 7px}
 .headline{padding:1px 12px}.headline-left{gap:0}
 .game-mark,.headline p{display:none}
 h1{font-size:1.62rem}.headline-right{gap:6px}.counter{font-size:.68rem}
 .header-reset{font-size:.7rem;padding:6px 9px}
 .workspace{display:flex;flex-direction:column;padding:0 5px 3px;gap:5px}
 .board-panel{flex:1;min-height:0;padding:5px 5px 3px;border-radius:12px}
 .board-panel .panel-head{display:none}
 .board-viewport{padding:0 2px;min-height:0}
 .legend{gap:5px 11px;padding:3px 0;min-height:23px;font-size:.62rem;justify-content:center;flex-wrap:nowrap}
 .legend b{font-size:.78rem}
 .board-bottom{display:none}
 .tray-panel{height:clamp(190px,28dvh,231px);flex:none;padding:6px 9px 5px;gap:3px;border-radius:12px}
 .tray-heading h2{font-size:1rem}.tray-counter{font-size:.69rem}
 .tray-description,.prototype-disclaimer{display:none}
 .tray{grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:repeat(4,minmax(24px,1fr));grid-auto-rows:minmax(24px,1fr);gap:4px;padding:2px;align-content:stretch}
 .word-tile.in-tray{height:100%;max-height:51px}
 .word-tile.in-tray .half{font-size:clamp(8px,2.45vw,11px)}
 .tray-controls{display:flex;gap:5px}
 .tray-controls button{padding:6px 8px;font-size:.67rem}
 .rotation-tip{font-size:.61rem;max-width:65%}
 .status{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;padding:0}
}
@media(max-height:710px) and (max-width:800px){
 .app{grid-template-rows:40px 40px minmax(0,1fr)}
 .prototype-tag{font-size:.55rem}
 .tray-panel{height:clamp(185px,29dvh,209px);padding:5px 8px 4px;gap:2px}
 .tray-heading h2{font-size:.94rem}
 .tray{grid-template-rows:repeat(4,minmax(22px,1fr));gap:4px;padding:1px}
 .tray-controls button{padding:5px 6px;font-size:.64rem}
 .rotation-tip{font-size:.56rem}
 .legend{min-height:22px;gap:7px;font-size:.58rem}
}
@media(max-width:360px){.brand-text{font-size:.84rem}.tray-panel{height:clamp(188px,29dvh,210px)}.word-tile .half{letter-spacing:-.04em}.legend{gap:5px;font-size:.55rem}}
@media(min-width:801px) and (max-height:690px){.app{grid-template-rows:45px 58px minmax(0,1fr) 27px}.tray-panel{padding:9px}.tray{grid-auto-rows:minmax(25px,39px)}.board-panel{padding:8px}.headline p{display:none}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important}}


/* Timed puzzle scoring and submission states */
.time-score{display:flex;flex-direction:column;justify-content:center;align-items:center;
 gap:0;min-width:87px;padding:5px 13px 4px;background:#edf6ee;
 border:1px solid #c7ddcb;border-radius:12px;color:#215939}
.time-caption{font-size:.60rem;letter-spacing:.16em;font-weight:850;line-height:1.05;color:#759a7a}
.time-digits{font-variant-numeric:tabular-nums;font-feature-settings:"tnum";
 font-size:1.39rem;line-height:1.3;font-weight:850;letter-spacing:.015em}
.time-score.finished{background:#e0f4e3;border-color:#7fb88b}
.tray-controls{display:flex;flex-direction:column;align-items:stretch;gap:8px}
.rotation-tip{max-width:none;font-size:.71rem;text-align:center;color:#698473}
.tray-controls button.submit-btn{display:flex;justify-content:center;align-items:center;gap:14px;
 width:100%;min-height:49px;border:1px solid #275f41;border-bottom:3px solid #24593d;
 background:#317953;color:white;font-size:.95rem;font-weight:850;letter-spacing:.01em;
 border-radius:12px;box-shadow:0 4px 12px #35795035;transition:transform .12s,background .12s}
.tray-controls button.submit-btn:hover{background:#235d3e;filter:none}
.tray-controls button.submit-btn:active{transform:translateY(2px);border-bottom-width:1px}
.submit-btn span{font-weight:900;font-size:1.14rem}
.tray-controls button.submit-btn:disabled{opacity:.45;cursor:default;box-shadow:none;filter:none}
.submit-toast[hidden]{display:none}
.submit-toast{position:absolute;z-index:30;left:50%;top:15px;transform:translateX(-50%);
 width:max-content;max-width:calc(100% - 22px);padding:11px 15px;border-radius:11px;
 border:1px solid #e0b98b;background:#fff7e9;box-shadow:0 5px 21px #513d1c26;
 color:#80592f;font-size:.83rem;font-weight:800;text-align:center;
 pointer-events:none;animation:toast-pop .18s ease-out}
@keyframes toast-pop{from{transform:translate(-50%,-8px);opacity:0}
 to{transform:translate(-50%,0);opacity:1}}
/* Submission only: accent every exposed edge of a failed semantic region. */
.rim.invalid-region{stroke:#f52c46!important;stroke-width:5!important;
 stroke-dasharray:none;opacity:1;filter:drop-shadow(0 0 3px #fa284a)
 drop-shadow(0 0 7px #fc3f58);animation:region-error-flash .44s ease-out both}
.rule-tag.invalid-region{border:3px solid #fa2b45!important;outline:2px solid #fff;
 box-shadow:0 0 0 4px #f53950,0 0 13px #ff3a4fa8!important;
 animation:marker-error-flash .44s ease-out both}
@keyframes region-error-flash{
 0%{opacity:.35;stroke-width:9;filter:drop-shadow(0 0 12px #f42043)}
 55%{opacity:1;stroke-width:7;filter:drop-shadow(0 0 10px #f82a49)}
 100%{opacity:1;stroke-width:5;filter:drop-shadow(0 0 4px #f82a49)}
}
@keyframes marker-error-flash{0%{transform:translate(-50%,-55%) scale(1.32)}
 65%{transform:translate(-50%,-55%) scale(.96)}
 100%{transform:translate(-50%,-55%) scale(1)}}
.win-overlay{inset:13% 12%;padding:22px 16px;gap:7px;background:#f6fff5f9;
 border:1px solid #a4cda9;box-shadow:0 25px 70px #20392155;border-radius:20px}
.win-eyebrow{font-size:.70rem;font-weight:900;letter-spacing:.12em;color:#45805a}
.win-overlay strong{font-size:clamp(1.5rem,2.8vw,2.2rem)}
.win-subtitle{font-size:.82rem;font-weight:800;color:#688d70}
.win-time{font-size:clamp(2rem,4vw,3.15rem);font-weight:900;line-height:1.15;
 font-variant-numeric:tabular-nums;letter-spacing:-.04em;color:#26653d}
.win-overlay button{margin-top:9px;min-height:44px;cursor:pointer}
@media(max-width:800px){
 .headline-right{gap:6px}.counter{display:none}
 .time-score{min-width:71px;border-radius:9px;padding:3px 8px}
 .time-caption{font-size:.51rem}.time-digits{font-size:1.19rem}
 .tray-controls{gap:0}.rotation-tip{display:none}
 .tray-controls button.submit-btn{min-height:39px;padding:7px;font-size:.81rem;
 border-radius:9px}
 .tray-panel{height:clamp(190px,29dvh,236px)}
 .win-overlay{inset:12% 8%;padding:13px 9px}
 .win-spark{font-size:2.15rem}.win-time{font-size:2rem}
 .submit-toast{top:5px;font-size:.74rem;padding:9px 12px}
}
@media(max-height:710px) and (max-width:800px){
 .tray-panel{height:clamp(230px,36dvh,250px)}
 .tray{grid-template-rows:repeat(4,minmax(29px,1fr))}
 .tray-controls button.submit-btn{min-height:34px;padding:5px}
}
@media(max-width:360px){
 .tray-panel{height:clamp(230px,36dvh,250px)}
 .time-score{min-width:68px}.time-digits{font-size:1.11rem}
}


/* Compact workspace: keep the active puzzle on one screen while leaving room
   beneath the game for a future ad placement. No empty ad unit is inserted. */
.app{grid-template-rows:44px 60px minmax(0,1fr) 24px}
.headline{padding-top:4px;padding-bottom:4px}
.game-mark{height:39px;width:39px;border-radius:11px;font-size:1.7rem}
.headline-left{gap:10px}
.board-panel{align-self:start;height:min(560px,100%);padding:9px 12px 7px}
.workspace{align-items:start;gap:10px}
.board-viewport{padding:6px 8px 3px}
.panel-head{min-height:21px}
.rule-hint{font-size:.66rem}
.board-bottom{padding-top:3px}
.status{padding:2px 10px 3px;font-size:.72rem}
.tray-panel{
 align-self:start;justify-self:stretch;height:auto;max-height:100%;
 padding:11px 12px 10px;gap:8px
}
.tray-heading{min-height:25px}
.tray-heading h2{font-size:1.16rem;margin:0}
.tray{flex:none;grid-template-columns:repeat(2,minmax(0,1fr));
 grid-template-rows:none;grid-auto-rows:42px;gap:7px;padding:2px;
 align-content:start;overflow:visible}
.tray-description,.rotation-tip,.tray-controls,.prototype-disclaimer{display:none}
.board-action-row{display:flex;align-items:center;justify-content:center;gap:16px;
 min-height:34px;flex:none;border-top:1px solid #edf0eb;padding:3px 0 0}
.board-action-row .legend{flex:1;justify-content:center;border-top:0;min-height:27px;padding:1px 0}
.board-action-row .submit-btn{
 flex:none;min-width:90px;min-height:31px;padding:4px 15px;
 border:1px solid #296443;border-radius:9px;background:#347b54;color:white;
 box-shadow:0 2px 5px #20533825;font-weight:850;font-size:.83rem;
 line-height:1.2;cursor:pointer;
}
.board-action-row .submit-btn:hover{background:#286b46}
.board-action-row .submit-btn:active{transform:translateY(1px)}
.board-action-row .submit-btn[hidden]{display:none!important}
.board-action-row .submit-btn:disabled{opacity:.5;cursor:default}
.header-reset:disabled{opacity:.5;cursor:default}
@media(max-width:800px){
 .app{grid-template-rows:40px 40px minmax(0,1fr)}
 .headline{padding:1px 10px}
 .workspace{display:flex;flex-direction:column;justify-content:flex-start;
   align-items:stretch;gap:6px;padding:0 5px 4px}
 .board-panel{
  flex:none;align-self:stretch;
  height:min(calc(83.33vw + 35px),515px,calc(100dvh - 270px));
  min-height:0;padding:5px 5px 3px;
 }
 .board-viewport{padding:0 2px}
 .board-action-row{min-height:25px;padding:1px 0 0;gap:0}
 .board-action-row .legend{min-height:22px;flex:1;gap:5px 11px;
  padding:0;font-size:.61rem}
 .board-action-row.ready-to-submit .legend{display:none}
 .board-action-row .submit-btn{min-height:24px;padding:3px 20px;font-size:.74rem;
  border-radius:8px}
 .tray-panel{height:auto;flex:none;align-self:stretch;min-height:0;max-height:none;
  padding:7px 9px 8px;gap:5px;border-radius:12px}
 .tray-heading{min-height:20px}
 .tray-heading h2{font-size:1rem}
 .tray{grid-template-columns:repeat(3,minmax(0,1fr));
  grid-template-rows:none;grid-auto-rows:34px;gap:4px;padding:2px;
  flex:none;overflow:visible;align-content:start}
 .word-tile.in-tray{min-height:0;height:100%;max-height:none}
}
@media(max-height:710px) and (max-width:800px){
 .board-panel{height:min(calc(83.33vw + 35px),515px,calc(100dvh - 255px))}
 .tray-panel{height:auto;min-height:0;padding:5px 8px 6px;gap:3px}
 .tray{grid-template-rows:none;grid-auto-rows:30px;gap:3px;padding:1px}
 .tray-heading{min-height:19px}
 .tray-heading h2{font-size:.93rem}
 .board-action-row{min-height:23px}
}
@media(max-width:360px){
 .tray-panel{height:auto}
 .tray{grid-template-rows:none;grid-auto-rows:30px}
 .board-action-row .legend{gap:5px;font-size:.55rem}
}
@media(min-width:801px) and (max-height:690px){
 .app{grid-template-rows:42px 52px minmax(0,1fr) 20px}
 .board-panel{height:min(540px,100%);padding:7px 10px 5px}
 .tray-panel{padding:9px;gap:6px}
 .tray{grid-auto-rows:38px;gap:6px}
}
.generated-puzzle .board-action-row .legend{flex-wrap:wrap}
#win-stats:not([hidden]){display:block;margin:4px auto 0}


/* Final Linklets rule guide: scrollable on small screens, illustrated and keyboard-accessible. */
#help-dialog{
 width:min(720px,calc(100vw - 24px));max-width:720px;
 max-height:min(90dvh,900px);padding:0;overflow-y:auto;
 line-height:1.45;border:1px solid #cdded0;border-radius:20px;
 background:#fbfdf9;box-shadow:0 28px 80px #172c1b60;
 scrollbar-gutter:stable;overscroll-behavior:contain;
}
#help-dialog::backdrop{background:#12291bc2}
#help-dialog .help-dialog-head{
 position:sticky;top:0;z-index:3;padding:13px 23px;
 background:rgba(251,253,249,.96);border-bottom:1px solid #e2eade;
 backdrop-filter:blur(10px);font-size:.7rem;letter-spacing:.1em;
}
#help-dialog .help-dialog-head button{
 display:grid;place-items:center;flex:none;width:34px;height:34px;
 color:#365d43;font-size:1rem;cursor:pointer;
}
#help-dialog .help-intro{padding:22px 25px 8px}
#help-dialog .help-eyebrow{
 display:block;color:#568261;font-size:.65rem;font-weight:850;letter-spacing:.16em;
}
#help-dialog h2{font:700 clamp(1.65rem,4vw,2.15rem)/1.15 Georgia,serif;
 letter-spacing:-.045em;margin:7px 0 8px;color:#254631}
#help-dialog #help-intro{font-size:.91rem;line-height:1.55;max-width:590px;margin:0;color:#566a5b}
#help-dialog strong{color:#2b4f35}
#help-dialog .help-example{
 display:grid;grid-template-columns:minmax(0,1.35fr) minmax(0,.85fr);
 align-items:center;gap:15px;margin:14px 24px 0;padding:14px;
 border:1px solid #dce9dc;border-radius:15px;
 background:linear-gradient(130deg,#f0f6ee 0%,#f9faf3 100%);
}
#help-dialog .help-example-art{min-width:0}
#help-dialog .help-example-heading{
 font-weight:850;letter-spacing:.115em;font-size:.65rem;color:#668271;margin-bottom:5px;
}
#help-dialog .help-example-svg{display:block;width:100%;height:auto;max-height:145px}
#help-dialog .help-example-key{
 display:flex;flex-wrap:wrap;gap:8px 13px;align-items:center;
 margin:4px 0 0;color:#536a57;font-size:.73rem;font-weight:750;
}
#help-dialog .help-key-symbol{display:inline-grid;place-items:center;
 width:20px;height:20px;color:white;border-radius:5px;margin-right:3px;font-size:.9rem}
#help-dialog .help-key-syn{background:#9365b5}
#help-dialog .help-key-opp{background:#cf5e89}
#help-dialog .help-example-copy{display:flex;flex-direction:column;gap:9px;
 color:#617366;font-size:.83rem;line-height:1.5}
#help-dialog .help-example-copy strong{font-size:.96rem;line-height:1.3}
#help-dialog .help-section{padding:18px 24px 0}
#help-dialog .help-section h3{
 font-size:1.02rem;line-height:1.35;letter-spacing:-.015em;
 margin:0 0 10px;color:#294c34;font-weight:850;
}
#help-dialog .help-section-heading{
 display:flex;align-items:baseline;justify-content:space-between;gap:10px;
}
#help-dialog .help-section-heading span{font-size:.7rem;color:#829487}
#help-dialog .help-steps{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}
#help-dialog .help-step{
 display:flex;align-items:flex-start;gap:8px;
 padding:12px 10px;background:white;border:1px solid #e0e9df;border-radius:12px;
}
#help-dialog .help-step-number{
 display:grid;place-items:center;flex:none;width:25px;height:25px;
 border-radius:8px;background:#e6f0e5;color:#34744d;font-size:.85rem;font-weight:850;
}
#help-dialog .help-step p{font-size:.78rem;line-height:1.52;margin:0;color:#657468}
#help-dialog .help-rule-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
#help-dialog .help-rule{
 display:flex;align-items:flex-start;gap:10px;
 padding:10px 12px;background:#fff;border:1px solid #e0e9df;border-radius:11px;
}
#help-dialog .help-rule-symbol{
 width:31px;height:31px;flex:none;display:grid;place-items:center;
 border-radius:9px;color:#396b4c;background:#eaf4e8;
 font-size:1.3rem;line-height:1;font-family:Arial,"DejaVu Sans",sans-serif;font-weight:900;
}
#help-dialog .help-rule strong{display:block;font-size:.84rem;line-height:1.35}
#help-dialog .help-rule p{margin:3px 0 0;color:#65756b;font-size:.77rem;line-height:1.45}
#help-dialog .help-rule em{font-style:normal;color:#4b7759;font-weight:750}
#help-dialog .help-pair-note{
 margin:10px 1px 0;font-size:.76rem;line-height:1.5;color:#718176;
}
#help-dialog .help-section-description{margin:0 0 10px;font-size:.8rem;line-height:1.5}
#help-dialog .help-descriptor-grid{
 display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;
}
#help-dialog .help-descriptor-grid>div{
 display:flex;align-items:center;gap:10px;min-width:0;
 padding:8px 10px;border:1px solid #e2e9db;border-radius:10px;background:#fff;
 color:#68786b;font-size:.77rem;
}
#help-dialog .help-descriptor-grid>div span:last-child{min-width:0}
#help-dialog .help-clue{
 display:inline-block;flex:none;padding:5px 7px;border-radius:6px;
 background:#dbe9d5;border:1px solid #aac5a6;color:#396143;
 letter-spacing:.035em;font-size:.65rem;font-weight:900;white-space:nowrap;
}
#help-dialog .help-small-note{
 margin:13px 0 0;padding:11px 13px;
 font-size:.8rem;line-height:1.52;background:#eff5ed;
 border-left:3px solid #80a88a;border-radius:7px;
}
#help-dialog #wordnet-credit{font-size:.68rem;line-height:1.4;margin:14px 25px 0;color:#88968c}
#help-dialog [hidden]{display:none!important}
#help-dialog .help-footer{
 position:sticky;bottom:0;z-index:3;
 padding:13px 24px 16px;margin-top:10px;
 background:rgba(251,253,249,.97);border-top:1px solid #e2eade;
 backdrop-filter:blur(10px);
}
#help-dialog .start-help{
 display:block;width:100%;margin:0;padding:11px 18px;min-height:44px;
 border-radius:10px;font-size:.9rem;font-weight:850;cursor:pointer;
}
#help-dialog .start-help:hover{background:#2a6747}
@media(max-width:590px){
 #help-dialog{width:calc(100vw - 18px);max-height:94dvh;border-radius:15px}
 #help-dialog .help-dialog-head{padding:9px 14px}
 #help-dialog .help-intro{padding:15px 17px 4px}
 #help-dialog .help-example{margin:12px 15px 0;padding:12px;grid-template-columns:1fr;gap:7px}
 #help-dialog .help-example-art{max-width:370px;width:100%;margin:0 auto}
 #help-dialog .help-example-copy{gap:4px;font-size:.78rem}
 #help-dialog .help-section{padding:15px 16px 0}
 #help-dialog .help-section-heading span{display:none}
 #help-dialog .help-steps{grid-template-columns:1fr;gap:6px}
 #help-dialog .help-step{padding:8px 10px}
 #help-dialog .help-rule-grid{gap:6px}
 #help-dialog .help-rule{gap:7px;padding:9px 8px}
 #help-dialog .help-rule-symbol{width:25px;height:25px;font-size:1.04rem;border-radius:7px}
 #help-dialog .help-rule strong{font-size:.76rem}
 #help-dialog .help-rule p{font-size:.7rem;overflow-wrap:anywhere}
 #help-dialog .help-descriptor-grid{grid-template-columns:1fr;gap:6px}
 #help-dialog .help-descriptor-grid>div{padding:6px 9px}
 #help-dialog #wordnet-credit{margin:12px 17px 0}
 #help-dialog .help-footer{padding:9px 16px 12px}
}
@media(max-width:340px){
 #help-dialog .help-rule-grid{grid-template-columns:1fr}
}


/* Daily Linklets sharing, solved-state controls and browser-local statistics. */
.sitebar-right{gap:8px}
.stats-icon svg{display:block;width:19px;height:19px;margin:auto}
.next-header{display:flex;flex-direction:column;gap:0;align-items:center;line-height:1.12;
 color:#396b4b;font-variant-numeric:tabular-nums;white-space:nowrap}
.next-header small{font-size:.59rem;font-weight:850;letter-spacing:.11em}
.next-header strong{font-size:.88rem;font-weight:850;letter-spacing:-.03em}
#next-header[hidden],#view-result[hidden]{display:none!important}
.view-result-btn{color:#29623c;background:#edf7ed;border-color:#b6d9bc}
dialog.win-overlay,dialog.stats-dialog{
 position:fixed;inset:0;margin:auto;
 width:min(506px,calc(100vw - 28px));max-width:none;
 max-height:min(92dvh,820px);height:auto;
 overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;
 background:#fcfefa;color:#27392f;border:1px solid #bdd5c1;
 border-radius:18px;box-shadow:0 28px 80px #10251670;
 padding:0;scrollbar-gutter:stable;
}
dialog.win-overlay:not([open]),dialog.stats-dialog:not([open]){display:none!important}
dialog.win-overlay::backdrop,dialog.stats-dialog::backdrop{background:#0e2319ad}
.win-card,.stats-dialog-inner{padding:20px 23px 22px;position:relative;text-align:center}
.win-close{
 position:absolute;right:11px;top:11px;z-index:1;
 display:grid;place-items:center;width:33px;min-height:33px;height:33px!important;
 padding:0;border:1px solid #d8e8d7;border-radius:50%;
 color:#436b4b;background:#eef5ed;cursor:pointer;
 margin:0!important;font-size:1rem;
}
.win-card .win-spark{display:block;font-size:2rem;line-height:1.2;color:#498a5d}
.win-card .win-eyebrow{display:block;margin:4px 0 3px;font-size:.68rem;color:#558b64}
.win-card h2{font:700 1.9rem/1.13 Georgia,Cambria,serif;margin:4px 0 9px;letter-spacing:-.04em}
.win-card .win-subtitle{display:block;font-size:.76rem}
.win-card .win-time{display:block;margin:1px auto 5px;font-size:2.7rem}
.win-description{margin:3px 0 13px;color:#6b806d;font-size:.83rem}
.win-card button:not(.win-close),.stats-dialog button:not(.win-close){
 border-radius:9px;min-height:39px;cursor:pointer;
}
.win-primary,.win-secondary{display:block;width:100%;padding:10px 15px;
 font-size:.87rem;font-weight:850}
/* Legacy .win-overlay button rules are more specific than a bare .win-secondary.
   Keep share buttons legible in both dialogs, even while tapped or focused. */
dialog.win-overlay button.win-primary,
dialog.win-overlay button.win-secondary,
dialog.stats-dialog button.win-secondary{
 background:#347b54;border:1px solid #286e48;color:#fff
}
/* Touch browsers can retain :hover after closing the native sharing sheet.
   Only offer hover feedback when the pointer actually supports hovering. */
@media (hover:hover) and (pointer:fine){
 dialog.win-overlay button.win-primary:hover,
 dialog.win-overlay button.win-secondary:hover,
 dialog.stats-dialog button.win-secondary:hover{
  background:#286a46
 }
}
.share-status{font-size:.71rem;min-height:14px;margin:5px 0 0!important;color:#617b68}
.next-puzzle-countdown{font-size:.78rem;font-weight:750;color:#457851;
 margin:8px 0 4px;font-variant-numeric:tabular-nums}
.next-puzzle-countdown[hidden]{display:none!important}
.player-stats{border-top:1px solid #dae8db;margin-top:14px;padding-top:16px;text-align:left}
.player-stats h3{font-size:.76rem;font-weight:850;letter-spacing:.09em;text-align:center;
 margin:0 0 15px;color:#436b4a}
.stats-empty{font-size:.76rem;text-align:center;margin:0 0 10px;color:#7a897c}
.stats-empty[hidden]{display:none!important}
.stats-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px;
 padding:0 2px 15px;text-align:center}
.stat-value{display:block;font-size:1.68rem;line-height:1.13;color:#27492f;
 font-weight:850;font-variant-numeric:tabular-nums}
.stat-label{display:block;margin-top:4px;color:#758575;font-size:.71rem;font-weight:750}
.stats-chart-heading{font:850 .75rem/1.35 system-ui,-apple-system,sans-serif;
 letter-spacing:.05em;margin:0;color:#365d41}
.stats-chart-caption{font-size:.7rem;color:#809080;margin:3px 0 11px}
.stats-chart{display:flex;flex-direction:column;gap:5px}
.stats-bar-row{display:flex;align-items:center;gap:9px;min-height:18px;font-size:.74rem;
 font-variant-numeric:tabular-nums}
.stats-bar-label{flex:none;width:58px;color:#537156;font-weight:750}
.stats-bar-track{flex:1;min-width:0;height:15px;overflow:hidden;
 background:#edf2e9;border-radius:4px}
.stats-bar-fill{display:block;height:100%;background:#94b99c;border-radius:4px}
.stats-bar-row.today .stats-bar-fill{background:#377951}
.stats-bar-count{width:25px;flex:none;text-align:right;font-weight:850;color:#3d5c44}
#share-stats{margin-top:16px}
.stats-dialog-inner{text-align:left;padding-top:25px}
.stats-dialog-inner h2{text-align:center;font:700 1.7rem Georgia,serif;margin:0 28px 18px}
.stats-dialog .player-stats{border-top:0;margin-top:0;padding-top:0}
.stats-dialog .player-stats h3{display:none}
@media(max-width:800px){
 .sitebar-right{gap:6px}.next-header strong{font-size:.79rem}
 .next-header small{font-size:.54rem}
 .stats-icon svg{width:18px;height:18px}
 .headline-right{gap:5px}.view-result-btn{padding:6px 9px}
}
@media(max-width:390px){
 .brand-text{font-size:.85rem}
 .sitebar-right .icon-btn{width:27px;height:27px}
 .next-header strong{font-size:.75rem}
}
@media(max-width:590px){
 dialog.win-overlay,dialog.stats-dialog{width:calc(100vw - 16px);max-height:94dvh;border-radius:14px}
 .win-card,.stats-dialog-inner{padding:17px 15px 18px}
 .win-card h2{font-size:1.64rem}
 .win-card .win-time{font-size:2.24rem}
 .stat-value{font-size:1.53rem}
 .stats-grid{gap:12px 7px}
}

/* The hidden attribute must beat the button's presentational display rule. */
#share-stats[hidden]{display:none!important}
/* Override the legacy .win-overlay button padding and background: they shifted
   the glyph off-center inside the circular close button on narrow screens. */
dialog.win-overlay button.win-close,dialog.stats-dialog button.win-close{
 display:flex;align-items:center;justify-content:center;
 box-sizing:border-box;width:36px;height:36px!important;
 min-height:36px!important;max-height:36px!important;
 margin:0!important;padding:0!important;
 border:1px solid #d8e8d7!important;border-radius:50%!important;
 background:#eef5ed!important;color:#436b4b!important;
 line-height:1!important;
}
.win-close svg{display:block;width:20px;height:20px;flex:0 0 20px;pointer-events:none}

/* Override the old small board-overlay flex positioning in the full-screen dialog. */
dialog.win-overlay[open]{display:block}

/* Inactive tabs, windows and help dialogs do not consume solve time. */
.time-score.paused{background:#f1f2ef;border-color:#d7ddd5;color:#617267}
.time-score.paused .time-caption{color:#637568}


/* Linked-L wordmark and balanced stage: preserve clean space above and below
   the gameplay for possible future ad placements without adding empty ad units. */
.linklets-wordmark{
 display:block;flex:none;width:202px;max-width:100%;margin:0;
 color:#263c30;line-height:0;
}
.linklets-wordmark svg{display:block;width:100%;height:auto;overflow:visible}
.linklets-wordmark .wordmark-lettering{font-weight:400;letter-spacing:normal}
.wordmark-chain{filter:drop-shadow(0 1px 0 #e3f1e4)}
.headline-left{min-width:0;flex:0 1 auto}
.headline-right{flex:none}
.app{grid-template-rows:44px 80px minmax(0,1fr) 24px}
/* The board and bank stay grouped, but the puzzle moves to the middle of the
   screen instead of starting immediately below the heading. */
.workspace{align-items:center}
.board-panel{align-self:center;height:min(540px,calc(100% - 96px))}
.tray-panel{align-self:center}
@media(max-width:800px){
 .app{grid-template-rows:40px 55px minmax(0,1fr)}
 .headline{gap:7px;padding:1px 10px}
 .headline-left{flex:1 1 auto;min-width:0}
 .linklets-wordmark{width:139px;max-width:100%}
 /* Center the entire board/bank group on tall phones. Safe alignment keeps
    short phones top-aligned when the playable bank needs the available space. */
 .workspace{justify-content:center;justify-content:safe center;align-items:stretch}
 .board-panel{align-self:stretch;
  height:min(calc(83.33vw + 35px),515px,calc(100dvh - 270px))}
 .tray-panel{align-self:stretch}
}
@media(max-height:710px) and (max-width:800px){
 .board-panel{height:min(calc(83.33vw + 35px),515px,calc(100dvh - 255px))}
}
@media(min-width:801px) and (max-height:690px){
 .app{grid-template-rows:42px 70px minmax(0,1fr) 20px}
 .linklets-wordmark{width:180px}
 .board-panel{height:min(500px,calc(100% - 58px))}
}

/* Clue-safe board framing: measured badge gutters are applied as real board
   margins. In cramped layouts this viewport scrolls instead of clipping the
   bottom clue behind the legend or cropping clues along the left/right edge. */
.board-viewport{
 overflow:auto;scrollbar-width:thin;scrollbar-color:#cedbd0 transparent;
 overscroll-behavior:contain;justify-content:safe center;align-items:safe center;
}
/* A measured fit hides scrollbars completely; no canvas space is taken from
   the ad-safe margins around the existing fixed-height game panel. */
.board-viewport[data-scroll-fallback="false"]{overflow:hidden}
.board-stage{position:relative;flex:none;box-sizing:border-box;min-width:0;min-height:0}
.board-stage>.board{position:absolute;flex:none}
/* On short phones the bank remains reachable even when the board needs more
   height; default sized devices retain the same single-screen composition. */
@media(max-width:800px){
 html,body{height:auto;min-height:100%;overflow-x:hidden;overflow-y:auto}
 .app{overflow:visible}
}

/* The board is the primary interactive surface, not an image thumbnail.
   Give the measured clue gutters room on normal phones; shorter devices
   scroll the page/board instead of shrinking word cells below usability. */
@media(max-width:800px){
 .board-panel{
  height:min(510px,calc(100vw + 45px));
 }
 .board-viewport{
  touch-action:pan-x pan-y;
 }
}

/* A short phone must be able to scroll to the entire tile bank. Give the
   workspace natural document height, rather than leaving children extending
   beyond a fixed-height grid row that the page cannot scroll into. */
@media(max-width:800px) and (max-height:810px){
 .app{
  height:auto;min-height:100dvh;
  grid-template-rows:40px 55px auto;
 }
 .workspace{
  min-height:max-content;height:auto;
  justify-content:flex-start;align-items:stretch;
 }
 .board-panel{flex:none}
}

/* A short-lived, text-first explanation for a tapped semantic rule badge.
   Fixed positioning keeps it readable even for edge-of-board clues. */
.clue-tip[hidden]{display:none!important}
.clue-tip{
 position:fixed;left:50%;top:0;z-index:1000;
 max-width:min(250px,calc(100vw - 24px));
 padding:8px 13px;border-radius:10px;
 background:#274935;border:1px solid rgba(255,255,255,.32);color:#fff;
 box-shadow:0 5px 18px #18352240;
 font-size:.8rem;font-weight:800;line-height:1.3;letter-spacing:.005em;
 text-align:center;white-space:normal;pointer-events:none;
 opacity:0;transform:translate(-50%,5px);
 transition:opacity .23s ease,transform .23s ease;
}
.clue-tip.is-visible{opacity:1;transform:translate(-50%,0)}

/* This canvas sits inside the native result dialog's top layer so the
   celebration is visible in front of the modal instead of behind it. */
dialog.win-overlay .finish-confetti{
 position:fixed;inset:0;width:100vw;height:100dvh;
 pointer-events:none;z-index:4;display:block;
}
@media(prefers-reduced-motion:reduce){
 .clue-tip{transition:none}
}

/* Inline bank guidance: occupies only spare room in the existing heading row.
   Use shorter copy in narrow viewports and in the desktop sidebar. */
.tray-heading{flex-wrap:nowrap;gap:6px}
.tray-heading h2,.tray-heading .tray-counter{flex:none;white-space:nowrap}
.tray-instructions{
 flex:1 1 auto;min-width:0;white-space:nowrap;
 text-align:center;color:#718977;font-size:.66rem;
 font-weight:650;line-height:1.15;letter-spacing:-.015em;
}
.tray-instructions-short,.tray-instructions-desktop{display:none}
@media(max-width:800px){
 .tray-instructions{font-size:.62rem}
}
@media(max-width:375px){
 .tray-instructions-full{display:none}
 .tray-instructions-short{display:inline}
 .tray-instructions{font-size:.61rem}
}
@media(min-width:801px){
 .tray-instructions-full{display:none}
 .tray-instructions-desktop{display:inline}
 .tray-instructions{font-size:.64rem}
}


/* Shared Witlet dark theme. Keep the semantic colors of clues, outlines,
   chains and tiles; darken only surfaces and their tinted backgrounds. */
.theme-toggle{display:inline-grid;place-items:center;flex:none}
.theme-toggle svg{display:block;width:19px;height:19px}
.theme-toggle:hover{filter:brightness(.95)}
@media(max-width:390px){
 .sitebar{padding-inline:8px}
 .brand{gap:6px}
 .brand-symbol{width:20px;height:20px}
 .brand-text{font-size:.78rem}
 .sitebar-right{gap:4px}
 .sitebar-right .icon-btn{width:27px;height:27px}
 .theme-toggle svg{width:18px;height:18px}
}
:root[data-theme="dark"]{
 color-scheme:dark;
 --paper:#121b17;--ink:#e8f0e8;--muted:#aebfaf;
 --green:#9acda8;--line:#344939;--panel:#1e2b23;--tile:#293a2e;
}
:root[data-theme="dark"] body{background:var(--paper);color:var(--ink)}
:root[data-theme="dark"] .sitebar{background:#19261e}
:root[data-theme="dark"] .brand,
:root[data-theme="dark"] .linklets-wordmark{color:#e5f0e7}
:root[data-theme="dark"] .wordmark-chain{filter:none}
:root[data-theme="dark"] .icon-btn{
 background:#2a3f32;border-color:#4b6953;color:#c2e7c7
}
:root[data-theme="dark"] .header-reset{
 background:#253a2c;border-color:#506d56;color:#d2e8d5
}
:root[data-theme="dark"] .view-result-btn{
 background:#27422f;color:#c5ead0;border-color:#608467
}
:root[data-theme="dark"] .counter,
:root[data-theme="dark"] .micro-label,
:root[data-theme="dark"] .next-header,
:root[data-theme="dark"] .next-header strong,
:root[data-theme="dark"] .time-caption{color:#a8d3b3}
:root[data-theme="dark"] .micro-muted,
:root[data-theme="dark"] .rule-hint,
:root[data-theme="dark"] .tray-instructions,
:root[data-theme="dark"] .status,
:root[data-theme="dark"] .legend,
:root[data-theme="dark"] .board-bottom{color:#b2c3b5}
:root[data-theme="dark"] .board-panel,
:root[data-theme="dark"] .tray-panel{
 background:#1c2921;border-color:#344a39;box-shadow:0 9px 28px #00000029;
}
:root[data-theme="dark"] .time-score{
 background:#273d2d;border-color:#55775d;color:#def2e2
}
:root[data-theme="dark"] .time-score.finished{
 background:#294c34;border-color:#74a681
}
:root[data-theme="dark"] .time-score.paused{
 background:#2b342c;border-color:#566458;color:#b7cbb8
}
:root[data-theme="dark"] .time-score.paused .time-caption{color:#adc2b0}
:root[data-theme="dark"] .cell{
 background:#26332a;border-color:#435547;box-shadow:0 2px 2px #0002
}
:root[data-theme="dark"] .cell.s-syn1{background:#372a42}
:root[data-theme="dark"] .cell.s-opp1{background:#432c36}
:root[data-theme="dark"] .cell.s-birds{background:#203d3c}
:root[data-theme="dark"] .cell.s-food{background:#423223}
:root[data-theme="dark"] .cell.s-neutral{background:#26342c}
:root[data-theme="dark"] .cell.s-syn2{background:#293748}
:root[data-theme="dark"] .cell.s-color{background:#403b25}
:root[data-theme="dark"] .cell.s-tools{background:#2e4029}
:root[data-theme="dark"] .cell.s-opp2{background:#402b31}
/* Generated puzzles use an inline semitransparent region tint; never
   override those inline colors so the original group distinctions survive. */
:root[data-theme="dark"] .rim{
 filter:drop-shadow(0 1px 1px #000b)
}
:root[data-theme="dark"] .word-tile{
 background:#27392c;color:#eaf3e9;border-color:#68816c;
 box-shadow:0 3px 0 #162319,0 4px 8px #0005;
}
:root[data-theme="dark"] .word-tile.in-tray{background:#26372c}
:root[data-theme="dark"] .word-tile.placed{
 background:#26362b;border-color:#728976;box-shadow:none
}
:root[data-theme="dark"] .word-tile.placed .half{
 background:var(--half-dark-shade,#324536);
}
:root[data-theme="dark"] .word-tile .half+.half{
 border-left-color:#6e9076
}
:root[data-theme="dark"] .word-tile.placed.vertical .half+.half{
 border-top-color:#6e9076
}
:root[data-theme="dark"] .word-tile.selected-floating,
:root[data-theme="dark"] .word-tile.selected-floating .half{
 background:#315038;color:#f1f9f1
}
:root[data-theme="dark"] .word-tile.drag-ghost{
 background:#2a4031;color:#f0faf0
}
:root[data-theme="dark"] .chain-burst{filter:drop-shadow(0 0 3px #0009)}
:root[data-theme="dark"] .chain-pin{fill:#e4f1e7}
:root[data-theme="dark"] .board-action-row,
:root[data-theme="dark"] .legend,
:root[data-theme="dark"] .board-bottom{
 border-top-color:#364b3a
}
:root[data-theme="dark"] .legend b,
:root[data-theme="dark"] .tray-counter{color:#9dd2a8}
:root[data-theme="dark"] .board-viewport{
 scrollbar-color:#586f5e transparent
}
:root[data-theme="dark"] .tray-controls button:not(.submit-btn){
 background:#273d2f;border-color:#546e5a;color:#d4e7d5
}
:root[data-theme="dark"] .win-overlay,
:root[data-theme="dark"] dialog.win-overlay,
:root[data-theme="dark"] dialog.stats-dialog{
 background:#1d2c22;color:#e8f0e8;border-color:#537259;
 box-shadow:0 28px 80px #000b
}
:root[data-theme="dark"] .win-card .win-spark,
:root[data-theme="dark"] .win-card .win-eyebrow,
:root[data-theme="dark"] .win-card .win-subtitle,
:root[data-theme="dark"] .win-description,
:root[data-theme="dark"] .share-status,
:root[data-theme="dark"] .next-puzzle-countdown{color:#aed4b6}
:root[data-theme="dark"] .player-stats{border-top-color:#3a5541}
:root[data-theme="dark"] .player-stats h3,
:root[data-theme="dark"] .stats-chart-heading,
:root[data-theme="dark"] .stat-value,
:root[data-theme="dark"] .stats-bar-count{color:#e5f1e7}
:root[data-theme="dark"] .stats-empty,
:root[data-theme="dark"] .stat-label,
:root[data-theme="dark"] .stats-chart-caption,
:root[data-theme="dark"] .stats-bar-label{color:#b1c7b5}
:root[data-theme="dark"] .stats-bar-track{background:#304538}
:root[data-theme="dark"] .stats-bar-fill{background:#77a987}
:root[data-theme="dark"] .stats-bar-row.today .stats-bar-fill{background:#9ed4ac}
:root[data-theme="dark"] dialog.win-overlay button.win-close,
:root[data-theme="dark"] dialog.stats-dialog button.win-close{
 background:#304635!important;border-color:#5a795f!important;color:#e6f2e7!important
}
:root[data-theme="dark"] #help-dialog{
 background:#1d2c23;border-color:#537259;color:#e7f1e8
}
:root[data-theme="dark"] #help-dialog .help-dialog-head,
:root[data-theme="dark"] #help-dialog .help-footer{
 background:rgba(29,44,35,.97);border-color:#405b46;color:#d8ebda
}
:root[data-theme="dark"] #help-dialog .help-dialog-head button{
 color:#e6f1e7
}
:root[data-theme="dark"] #help-dialog h2,
:root[data-theme="dark"] #help-dialog h3,
:root[data-theme="dark"] #help-dialog strong,
:root[data-theme="dark"] #help-dialog .help-rule strong{
 color:#e7f1e8
}
:root[data-theme="dark"] #help-dialog #help-intro,
:root[data-theme="dark"] #help-dialog .help-example-key,
:root[data-theme="dark"] #help-dialog .help-example-copy,
:root[data-theme="dark"] #help-dialog .help-step p,
:root[data-theme="dark"] #help-dialog .help-rule p,
:root[data-theme="dark"] #help-dialog .help-pair-note,
:root[data-theme="dark"] #help-dialog .help-section-description,
:root[data-theme="dark"] #help-dialog .help-descriptor-grid>div,
:root[data-theme="dark"] #help-dialog #wordnet-credit{color:#b7cabb}
:root[data-theme="dark"] #help-dialog .help-example{
 background:linear-gradient(130deg,#2b4231,#24362b);border-color:#4b6650
}
:root[data-theme="dark"] #help-dialog .help-step,
:root[data-theme="dark"] #help-dialog .help-rule,
:root[data-theme="dark"] #help-dialog .help-descriptor-grid>div{
 background:#28392d;border-color:#4a624f
}
:root[data-theme="dark"] #help-dialog .help-step-number,
:root[data-theme="dark"] #help-dialog .help-rule-symbol{
 background:#38533e;color:#d4e9d7
}
:root[data-theme="dark"] #help-dialog .help-rule em{color:#bce7c5}
:root[data-theme="dark"] #help-dialog .help-clue{
 background:#385740;border-color:#74977a;color:#e9f3e9
}
:root[data-theme="dark"] #help-dialog .help-small-note{
 background:#2b4232;color:#d2e4d5
}

/* A hint places one canonical tile and locks it for the rest of the attempt.
   Keep controls in the existing board action row without enlarging the bank. */
.board-action-row{gap:8px}
.board-action-row .hint-btn{
 flex:none;border:1px solid #c4ad67;border-radius:9px;
 background:#fff6d9;color:#73551b;padding:4px 10px;
 min-height:28px;font-weight:850;font-size:.72rem;white-space:nowrap;
 line-height:1.2;cursor:pointer;
}
.board-action-row .hint-btn:not(:disabled):hover{background:#fff0c1}
.board-action-row .hint-btn:disabled{opacity:.48;cursor:default}
.board-action-row .hint-btn[hidden]{display:none!important}
.word-tile.placed.hint-locked{
 border:2px solid #b88731;outline:1.5px solid #f3c76d;
 outline-offset:1px;cursor:default;opacity:1;
}
.word-tile.placed.hint-locked::after{
 content:"🔒";position:absolute;right:-7px;top:-9px;z-index:12;
 background:#fff3c8;border:1px solid #b88731;
 border-radius:8px;padding:1px 2px;font-size:11px;line-height:1;
 filter:drop-shadow(0 1px 2px #0003);pointer-events:none;
}
.word-tile.hint-locked:disabled{opacity:1;pointer-events:none}
.win-rating{
 margin:0;color:#c79835;font-size:1.05rem;letter-spacing:.07em;
 line-height:1.15;min-height:1em;
}
.win-hints{
 margin:0;color:#775b2d;font-size:.77rem;font-weight:800;line-height:1.2;
}
.win-hints[hidden]{display:none!important}
@media(max-width:800px){
 .board-action-row{gap:4px}
 .board-action-row .hint-btn{
  min-height:24px;padding:3px 7px;border-radius:7px;font-size:.65rem
 }
}
:root[data-theme="dark"] .board-action-row .hint-btn{
 background:#4c3b20;border-color:#b58f51;color:#f4dfaa;
}
:root[data-theme="dark"] .board-action-row .hint-btn:not(:disabled):hover{
 background:#604c2d;
}
:root[data-theme="dark"] .word-tile.placed.hint-locked{
 border-color:#dbb263;outline-color:#e4bb68;color:#f6f0df;
}
:root[data-theme="dark"] .word-tile.placed.hint-locked::after{
 background:#514125;border-color:#dbb263;
}
:root[data-theme="dark"] .win-rating{color:#e5b75e}
:root[data-theme="dark"] .win-hints{color:#dfc58e}

/* Invisible but comfortably tappable hit target centered on the existing
   orange period. The logo artwork does not change, and no header space is used. */
.headline-left{position:relative}
.logo-dot-trigger{
 position:absolute;left:92%;top:68%;z-index:2;
 box-sizing:border-box;width:28px;height:28px;
 padding:0;border:0;border-radius:50%;
 background:transparent;transform:translate(-50%,-50%);
 cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent;
}
.logo-dot-trigger:hover{background:#d99d5e1c}
.logo-dot-trigger:focus-visible{outline:2px solid #b87730;outline-offset:2px}
:root[data-theme="dark"] .logo-dot-trigger:hover{background:#d99d5e29}
.test-reset-dialog{
 position:fixed;inset:0;margin:auto;
 width:min(306px,calc(100vw - 38px));max-width:none;height:auto;
 border:1px solid #b8cfb9;border-radius:15px;
 background:#fbfdf9;color:#283c2d;
 box-shadow:0 24px 70px #14271b65;padding:21px;
}
.test-reset-dialog:not([open]){display:none!important}
.test-reset-dialog::backdrop{background:#102116a8}
.test-reset-dialog form{display:flex;flex-direction:column;gap:10px;margin:0}
.test-reset-dialog h2{
 margin:0 0 3px;text-align:center;
 font:700 1.35rem/1.25 Georgia,serif;
}
.test-reset-dialog label{font-size:.76rem;font-weight:750}
.test-reset-dialog input{
 box-sizing:border-box;width:100%;min-height:40px;
 border:1px solid #a4b9a7;border-radius:8px;
 background:#fff;color:#273e2b;padding:8px 10px;
 font:inherit;font-size:1rem;
}
.test-reset-dialog input:focus-visible{
 outline:2px solid #4c8b60;outline-offset:2px;
}
.test-reset-dialog #test-reset-error{
 margin:0;color:#a12632;font-size:.75rem;font-weight:700;
}
.test-reset-dialog #test-reset-error[hidden]{display:none}
.test-reset-actions{display:flex;gap:8px;margin-top:5px}
.test-reset-actions button{
 flex:1;min-height:39px;padding:7px 12px;
 border:1px solid #a3bca9;border-radius:8px;
 background:#f1f6ef;color:#305638;font-weight:750;cursor:pointer;
}
.test-reset-actions button[type="submit"]{
 background:#36794e;border-color:#36794e;color:white;
}
:root[data-theme="dark"] .test-reset-dialog{
 background:#1f2e24;border-color:#607d62;color:#e6f0e7;
}
:root[data-theme="dark"] .test-reset-dialog input{
 background:#293b2f;color:#f1f8f1;border-color:#6b846e;
}
:root[data-theme="dark"] .test-reset-dialog #test-reset-error{color:#ffaba7}
:root[data-theme="dark"] .test-reset-actions button{
 background:#2d4534;border-color:#5b8264;color:#e0efe2;
}
:root[data-theme="dark"] .test-reset-actions button[type="submit"]{
 background:#37794e;color:#fff;
}

/* Intrinsic descriptor width must not depend on the old/new board width.
   Absolutely positioned shrink-to-fit text can unexpectedly wrap AFTER resize,
   invalidating measured collision-free geometry. */
.rule-tag:not(.rule-symbol){width:max-content}
/* Dense boards: keep descriptor badges attached and legible without forcing
   their entire one-line width into the board's horizontal scroll extent. */
@media(max-width:800px){
 .rule-tag:not(.rule-symbol){
  max-width:78px;white-space:normal;text-align:center;overflow-wrap:normal;
  min-height:20px;padding:1px 3px;border-width:1px;line-height:1;
 }
}
@media(max-width:360px){
 /* Reclaim internal card padding, NOT the reserved page/ad margins. */
 .board-panel{padding-inline:2px}
 .board-viewport{padding-inline:0}
 .rule-tag.rule-symbol{
  width:22px;height:21px;min-width:22px;min-height:21px;font-size:18px;
 }
}

/* Confirm hints before revealing an answer or deducting a star. The modal
   does not occupy board, bank, or the reserved future-ad space. */
dialog.hint-confirm-dialog{
 position:fixed;inset:0;margin:auto;
 box-sizing:border-box;width:min(390px,calc(100vw - 32px));max-width:none;
 max-height:calc(100dvh - 32px);overflow-y:auto;
 border:1px solid #b7cfba;border-radius:17px;
 background:#fffefa;color:#283c2d;padding:23px;
 box-shadow:0 22px 65px #14271b65;
}
dialog.hint-confirm-dialog:not([open]){display:none!important}
dialog.hint-confirm-dialog::backdrop{background:#1021169e}
.hint-confirm-dialog h2{
 font:700 1.5rem/1.2 Georgia,Cambria,serif;
 margin:0 0 12px;text-align:center;color:inherit;
}
.hint-confirm-dialog p{
 margin:0 0 12px;font-size:.88rem;line-height:1.55;color:#435848;
}
.hint-confirm-dialog .hint-confirm-warning{
 border-radius:10px;background:#fff4da;color:#73501c;
 border:1px solid #ecd3a2;padding:11px 12px;
}
.hint-confirm-actions{display:flex;gap:9px;margin-top:18px}
.hint-confirm-actions button{
 flex:1;min-width:0;min-height:42px;border-radius:9px;
 padding:8px 10px;font-size:.83rem;font-weight:800;
 border:1px solid #aec4b1;background:#f1f6ef;color:#315b3a;
}
.hint-confirm-actions #hint-confirm-accept{
 border-color:#a67d2b;background:#805f27;color:#fff;
}
.hint-confirm-actions button:hover{filter:brightness(.94)}
@media(max-width:360px){
 dialog.hint-confirm-dialog{padding:18px}
 .hint-confirm-actions{gap:6px}
 .hint-confirm-actions button{font-size:.78rem;padding:7px 6px}
}
:root[data-theme="dark"] dialog.hint-confirm-dialog{
 background:#213228;border-color:#58725d;color:#f1f5ec;
}
:root[data-theme="dark"] .hint-confirm-dialog p{color:#ccdacc}
:root[data-theme="dark"] .hint-confirm-dialog .hint-confirm-warning{
 background:#473921;border-color:#94723a;color:#f2dfb6;
}
:root[data-theme="dark"] .hint-confirm-actions button{
 background:#2e4835;border-color:#608269;color:#e3f0e3;
}
:root[data-theme="dark"] .hint-confirm-actions #hint-confirm-accept{
 background:#9a742f;border-color:#b38a43;color:#fff;
}
