.grid-row{display:contents}
:root{--paper:#f7f5ef;--white:#fffefa;--ink:#253c33;--muted:#7a7d72;--line:#dedfd4;--green:#2e5141;--soft:#e9eee3;--selected:#dce9cd;--yellow:#e7c46a;--serif:Georgia,'Times New Roman',serif;--sans:'Local Sans',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;color-scheme:light;font-family:var(--sans);color:var(--ink);background:var(--paper);font-synthesis:none}
*{box-sizing:border-box}body{margin:0}button,input,textarea,select{font:inherit}button,a,input,textarea,select{-webkit-tap-highlight-color:transparent}button,a{touch-action:manipulation}button{cursor:pointer;color:inherit}button:disabled{opacity:.4;cursor:default}a{color:inherit}button{border:0;background:none}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible{outline:2px solid var(--focus);outline-offset:4px}[hidden]{display:none!important}.site-header{height:108px;display:flex;align-items:center;justify-content:space-between;max-width:1320px;margin:auto;padding:0 52px;border-bottom:1px solid var(--line)}.brand{display:flex;align-items:center;gap:12px;text-decoration:none}.brand svg{width:35px;height:35px;fill:var(--ink)}.brand>span{font-family:var(--serif);font-size:29px;font-weight:bold;letter-spacing:-1.3px;line-height:1}.brand-light{font-weight:normal}.brand small{display:block;font-family:var(--sans);font-size:8px;font-weight:600;letter-spacing:2px;margin-top:8px}.site-header nav{display:flex;gap:34px;align-self:stretch;align-items:center}.nav-link{text-decoration:none;height:100%;display:flex;align-items:center;gap:8px;font-size:13px;color:var(--muted);border-bottom:2px solid transparent;padding-top:2px}.nav-link.active{color:var(--ink);border-color:var(--ink)}.nav-link span{font-size:10px;background:var(--chip-bg);border-radius:10px;padding:3px 6px}.profile-button{display:flex;align-items:center;gap:9px;font-size:12px}.avatar{display:grid;place-items:center;width:30px;height:30px;background:var(--avatar-bg);border-radius:50%;font:italic 17px var(--serif)}main{max-width:1320px;margin:auto;padding:0 52px;min-height:70vh}.page-heading{display:flex;justify-content:space-between;align-items:center;margin:43px 0 38px;gap:20px}.eyebrow{font-size:9px;letter-spacing:1.7px;font-weight:650;line-height:1.6;margin:0 0 13px;display:flex;align-items:center;gap:9px}.little-line{width:19px;height:1px;background:currentColor}h1{font:normal clamp(30px,3.6vw,45px)/1.13 var(--serif);letter-spacing:-1.3px;margin:0 0 13px}h1 em{font-weight:normal;color:var(--accent)}.intro{font-size:12px;color:var(--muted);line-height:1.6;margin:0}.quiet-stamp{font-size:10px;letter-spacing:.15px;white-space:nowrap;position:relative;padding-left:16px}.quiet-stamp>.status-dot{position:absolute;left:0;top:4px}.quiet-stamp small{display:block;font:italic 12px var(--serif);color:var(--muted);margin-top:8px}.status-dot{width:6px;height:6px;background:var(--status);border-radius:50%;display:inline-block;flex-shrink:0}.puzzle-heading{display:flex;align-items:center;justify-content:space-between;border-top:1px solid var(--ink);padding:23px 0 21px;gap:15px}.puzzle-title .eyebrow{color:var(--muted);font-size:8px;letter-spacing:1.2px;margin-bottom:6px}h2{font:normal 25px var(--serif);letter-spacing:-.6px;margin:0 0 7px}h2 span{font-size:18px;color:var(--muted);margin-left:5px}.puzzle-title>p:last-child{font-size:10px;color:var(--muted);margin:0}.text-button{font-size:11px;padding:4px 0;line-height:1.5;text-decoration:none;white-space:nowrap}.text-button:hover{color:var(--focus)}.game-layout{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(310px,1fr);gap:29px;align-items:start}.board-panel{position:relative;background:var(--white);border:1px solid var(--line);border-radius:3px;min-width:0;box-shadow:0 3px 12px #253c3303}.board-toolbar{height:51px;border-bottom:1px solid var(--line);padding:0 20px;display:flex;align-items:center;justify-content:space-between;gap:8px}.save-status{display:flex;align-items:center;gap:7px;font-size:10px;color:var(--muted)}.save-status.error{color:var(--error)}.save-status.error .status-dot{background:var(--error)}.tool-group{display:flex;align-items:center;gap:5px}.icon-button{display:inline-grid;place-items:center;height:31px;min-width:31px;font-size:18px;border-radius:3px;padding:0 5px}.icon-button:hover{background:var(--soft)}.help-icon{font-size:12px;border:1px solid var(--line);border-radius:50%;height:19px;min-width:19px;margin-left:8px}.tool-divider{width:1px;height:15px;background:var(--line);margin:0 5px}#zoom-label{font-size:9px;color:var(--muted);min-width:37px;text-align:center}.board-scroll{overflow:auto;overscroll-behavior:contain;padding:28px 20px 27px;scrollbar-width:thin}.board{display:grid;margin:0 auto;width:100%;isolation:isolate;position:relative}.cell{position:relative;aspect-ratio:1;min-width:0;background:var(--white);border-radius:0;border:0;border-right:1px solid var(--cell-line);border-bottom:1px solid var(--cell-line);padding:0;font-family:var(--sans);display:grid;place-items:center;user-select:none;font-weight:550;font-size:clamp(10px,1.6vw,22px);line-height:1}.cell.blank{background:transparent;border:0;pointer-events:none}.cell.edge-left{border-left:1px solid var(--cell-line)}.cell.edge-top{border-top:1px solid var(--cell-line)}.cell.bar-left{border-left:3px solid var(--bar)}.cell.bar-top{border-top:3px solid var(--bar)}.cell .number{position:absolute;left:2px;top:2px;font-size:clamp(6px,.65vw,9px);font-weight:400;line-height:1}.cell .letter{padding-top:4px}.cell.in-word{background:var(--soft)}.cell.selected{background:var(--yellow);box-shadow:inset 0 0 0 1px var(--focus);z-index:1}.cell.correct .letter{color:var(--correct)}.cell.incorrect .letter{color:var(--error);text-decoration:underline wavy;font-weight:bold}.cell.incorrect{background:var(--error-bg)}.cell:focus-visible{outline-offset:-3px;z-index:2}.board-bottom{padding:1px 22px 19px}.progress-info{display:flex;justify-content:space-between;font-size:9px;color:var(--muted);margin-bottom:8px}.progress-track{height:3px;background:var(--track);border-radius:2px;overflow:hidden}.progress-track>div{height:100%;background:var(--status);transition:width .2s}.board-actions{display:flex;gap:8px;margin-top:19px;align-items:center;position:relative}.primary-button,.secondary-button{font-size:10px;font-weight:550;padding:11px 15px;border-radius:3px;line-height:1.3}.primary-button{color:var(--button-text);background:var(--green);border:1px solid var(--green)}.primary-button:hover{background:var(--button-hover)}.primary-button>span{margin-right:7px}.secondary-button{background:transparent;border:1px solid var(--line)}.secondary-button:hover{background:var(--soft)}.board-actions>.icon-button{margin-left:auto;font-size:12px;letter-spacing:2px}.solution-notice{font-size:10px;line-height:1.5;color:var(--muted);margin:12px 0 0}.more-menu{position:absolute;right:0;bottom:40px;min-width:210px;background:var(--white);border:1px solid var(--line);padding:6px;box-shadow:0 8px 24px #253c3315;z-index:5}.more-menu button{display:block;padding:11px;width:100%;text-align:left;font-size:11px}.more-menu button:hover{background:var(--soft)}.danger-text{color:var(--error)}.clue-panel{min-width:0}.active-clue{background:var(--soft);padding:16px 21px 12px;border-radius:3px;border:1px solid var(--line)}.clue-kicker{display:flex;justify-content:space-between;align-items:center;margin-bottom:9px}.clue-kicker>span{font-size:8px;letter-spacing:1.5px;font-weight:600}.clue-kicker .icon-button{font-size:17px;height:24px;min-width:26px}.clue-copy{display:flex;gap:12px;min-height:67px;margin-bottom:15px}.clue-copy>span{font:italic 30px var(--serif);line-height:1;color:var(--accent);min-width:27px}h3{font:normal 20px/1.35 var(--serif);margin:0;letter-spacing:-.2px}.answer-label{font-size:8px;letter-spacing:1.2px;display:flex;justify-content:space-between;color:var(--muted);margin-bottom:8px}.answer-label>span{font-size:8px;letter-spacing:0}.answer-input{width:100%;border:0;border-bottom:1px solid var(--line);background:transparent;border-radius:0;padding:6px 0 11px;font:500 20px/1.2 var(--sans);letter-spacing:4px;color:var(--ink);outline-offset:3px}.entry-hint{display:flex;align-items:center;justify-content:space-between;gap:6px;margin:10px 0 6px}.entry-hint .text-button{font-size:9px}.entry-hint>span{font-size:8px;color:var(--muted);white-space:nowrap}.notes-details{border-top:1px solid var(--line);margin-top:12px;padding-top:11px}.notes-details summary{font-size:10px;color:var(--muted);cursor:pointer;list-style:none;display:flex;justify-content:space-between}.notes-details summary::-webkit-details-marker{display:none}.notes-details summary>span{font-size:15px;line-height:10px}.notes-details textarea{width:100%;border:1px solid var(--line);background:var(--input-bg);border-radius:3px;margin-top:9px;padding:9px;font-size:12px;line-height:1.5;color:var(--ink);resize:vertical}.clue-list-heading{display:flex;justify-content:space-between;border-bottom:1px solid var(--line);margin-top:21px;align-items:center}.clue-list-heading>div{display:flex;gap:23px}.clue-tab{padding:0 0 12px;font-size:11px;color:var(--muted);border-bottom:2px solid transparent}.clue-tab.active{color:var(--ink);border-color:var(--ink)}.clue-tab>span{margin-left:8px}.clue-list-heading>span{font-size:8px;color:var(--muted);padding-bottom:11px}.clue-list{overflow:auto;max-height:273px;margin-top:5px;scrollbar-width:thin}.clue-item{display:flex;width:100%;text-align:left;gap:12px;padding:12px 10px 12px 2px;border-bottom:1px solid var(--line);border-left:2px solid transparent}.clue-item:hover{background:var(--hover)}.clue-item.active{border-left-color:var(--accent);background:var(--selected);padding-left:8px}.clue-item>.clue-nr{font-size:10px;color:var(--muted);min-width:18px;padding-top:2px}.clue-item>.clue-text{font:normal 13px/1.45 var(--serif);flex:1}.clue-item>.clue-length{font-size:8px;color:var(--muted);padding-top:3px;min-width:19px;text-align:right}.clue-item.filled>.clue-nr:after{content:'·';margin-left:3px}.under-board{display:flex;justify-content:space-between;align-items:center;gap:15px;margin-top:18px;font-size:9px;color:var(--muted)}.keycap{display:inline-block;border:1px solid var(--line);border-radius:3px;padding:2px 5px;font-size:8px;margin-right:4px}.keycap~.keycap{margin-left:12px}#timer-label{font-variant-numeric:tabular-nums}.site-footer{max-width:1216px;margin:56px auto 0;border-top:1px solid var(--line);padding:23px 0 28px;display:flex;justify-content:space-between;gap:15px;align-items:center;color:var(--muted);font-size:9px}.footer-brand{font:italic 18px var(--serif);color:var(--accent)}.site-footer .text-button{font-size:9px}.loading{padding:100px 0;text-align:center;font:italic 20px var(--serif);color:var(--muted)}dialog{background:var(--white);color:var(--ink);border:1px solid var(--line);border-radius:6px;width:min(510px,calc(100vw - 32px));padding:23px 28px 28px;box-shadow:0 20px 70px #182a3333;max-height:85dvh;overflow:auto}dialog::backdrop{background:#1b302b66;backdrop-filter:blur(3px)}.dialog-top{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px}.dialog-top .eyebrow{margin:0}.dialog-top>.icon-button{font-size:25px}dialog h2{font-size:29px;margin-bottom:15px}dialog p,dialog li{font-size:13px;line-height:1.75;color:var(--muted)}dialog ul{padding-left:20px}dialog .dialog-actions{display:flex;gap:10px;justify-content:flex-end;margin-top:25px}dialog label{display:block;font-size:11px;margin:18px 0 8px}dialog input[type=text]{padding:11px;width:100%;border:1px solid var(--line);background:var(--paper);border-radius:3px;font-size:14px}dialog input[type=file]{font-size:12px;width:100%;margin:10px 0}dialog code{font-size:11px;background:var(--soft);padding:3px 5px;overflow-wrap:anywhere}dialog .profile-list{display:grid;gap:6px;margin-top:15px}.profile-choice{text-align:left;padding:12px 14px;border:1px solid var(--line);border-radius:3px;font-size:13px;display:flex;justify-content:space-between}.profile-choice:hover,.profile-choice.selected{background:var(--soft)}.toast{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);background:var(--ink);color:var(--paper);padding:14px 21px;border-radius:4px;font-size:12px;max-width:calc(100vw - 30px);width:max-content;box-shadow:0 8px 24px #253c3320;z-index:20;line-height:1.6}.toast.error{background:var(--error-surface)}.archive-toolbar{display:flex;gap:15px;align-items:center;padding:19px 0;border-top:1px solid var(--ink);border-bottom:1px solid var(--line);margin-bottom:25px}.search-wrap{display:flex;align-items:center;gap:10px;flex:1}.search-wrap>span{font-size:25px;color:var(--muted)}.search-wrap>input{border:0;background:transparent;min-width:0;width:100%;padding:10px 0;font-size:12px;color:var(--ink);outline-offset:0}.archive-toolbar select{border:1px solid var(--line);padding:10px;background:var(--white);font-size:11px;border-radius:3px;color:var(--ink)}#archive-results{font-size:10px;color:var(--muted);white-space:nowrap}.archive-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:20px}.archive-card{background:var(--white);border:1px solid var(--line);padding:24px;text-align:left;border-radius:3px;transition:transform .15s,box-shadow .15s}.archive-card:hover{transform:translateY(-3px);box-shadow:0 8px 25px #253c3310}.archive-card .eyebrow{color:var(--muted);font-size:8px}.archive-card h3{font-size:22px;margin-bottom:6px}.archive-card .card-date{font-size:10px;color:var(--muted)}.card-art{display:flex;align-items:center;justify-content:space-between;margin:24px 0 19px}.mini-grid{width:97px;height:72px;opacity:.7;background:linear-gradient(90deg,var(--cell-line) 1px,transparent 1px),linear-gradient(var(--cell-line) 1px,transparent 1px);background-size:12px 12px;clip-path:polygon(12% 16%,24% 16%,24% 0,36% 0,36% 16%,60% 16%,60% 0,72% 0,72% 16%,96% 16%,96% 83%,84% 83%,84% 100%,72% 100%,72% 83%,36% 83%,36% 100%,24% 100%,24% 83%,0 83%,0 33%,12% 33%)}.card-art>span{font:italic 48px var(--serif);color:var(--art-number);letter-spacing:-2px}.card-status{display:flex;justify-content:space-between;font-size:10px;color:var(--muted);margin-bottom:8px}.card-bottom{display:flex;align-items:center;justify-content:space-between;border-top:1px solid var(--line);padding-top:15px;margin-top:20px;font-size:10px}.solution-badge{font-size:8px;border:1px solid var(--line);background:var(--soft);padding:4px 6px;border-radius:3px;color:var(--muted)}.archive-footer{display:flex;justify-content:space-between;align-items:center;margin-top:26px;gap:12px}.archive-footer>p{font:italic 14px var(--serif);color:var(--muted)}.empty-state{grid-column:1/-1;text-align:center;padding:65px 15px;font:italic 19px var(--serif);color:var(--muted)}.dialog-note{background:var(--soft);padding:12px;border-radius:3px;font-size:11px!important}.error-message{color:var(--error)!important}.import-result{padding:12px 0;font-size:12px;line-height:1.8}.management-actions{display:flex;flex-wrap:wrap;gap:10px;margin:18px 0}.management-actions a{display:inline-block;text-decoration:none}.source-detail{overflow-wrap:anywhere}
@media(min-width:1500px){.board-scroll{padding:34px 25px}.clue-list{max-height:335px}}
@media(max-width:1100px){.site-header{padding:0 30px}main{padding:0 30px}.site-footer{margin-left:30px;margin-right:30px}.game-layout{gap:20px;grid-template-columns:minmax(0,1.35fr) minmax(290px,1fr)}.quiet-stamp{display:none}.board-toolbar{padding:0 13px}.board-scroll{padding:25px 13px}.board-bottom{padding:0 15px 17px}.primary-button,.secondary-button{padding:10px 12px}.active-clue{padding:15px 17px}.clue-copy{min-height:83px}h3{font-size:19px}.clue-list{max-height:230px}}
@media(max-width:760px){.site-header{height:81px;padding:0 20px}.brand{gap:8px}.brand svg{width:27px;height:27px}.brand>span{font-size:23px}.brand small{font-size:6px;letter-spacing:1.6px;margin-top:6px}.site-header nav{gap:18px}.nav-link{font-size:11px}.profile-button{gap:5px;padding-right:0}.profile-button>#profile-name{display:none}.avatar{height:27px;width:27px;font-size:15px}main{padding:0 20px}.page-heading{margin:30px 0 27px}h1{font-size:34px;line-height:1.12;letter-spacing:-1px;max-width:340px}h1 em{display:block}.eyebrow{font-size:8px;letter-spacing:1.1px;margin-bottom:10px}.intro{font-size:11px;max-width:300px}.puzzle-heading{padding:18px 0;align-items:flex-end}h2{font-size:22px;max-width:260px}h2 span{font-size:16px;white-space:nowrap;display:inline-block;margin-left:0}.puzzle-title .eyebrow{font-size:7px}.puzzle-title>p:last-child{font-size:9px}.puzzle-heading>.text-button{font-size:9px;white-space:normal;max-width:72px;text-align:right}.game-layout{display:flex;flex-direction:column;gap:19px}.board-panel,.clue-panel{width:100%}.board-toolbar{height:44px;padding:0 13px}.board-scroll{padding:21px 12px 24px}.cell{font-size:clamp(10px,3.4vw,22px)}.cell .number{font-size:clamp(6px,1.7vw,9px);left:1px;top:1px}.cell.bar-left{border-left-width:2px}.cell.bar-top{border-top-width:2px}.cell .letter{padding-top:3px}.board-bottom{padding:0 15px 15px}.board-actions{margin-top:14px}.board-actions>.primary-button,.board-actions>.secondary-button{font-size:10px;padding:10px 12px}.clue-panel{display:flex;flex-direction:column}.active-clue{padding:15px 18px}.clue-copy{min-height:0;margin-bottom:20px;gap:13px}h3{font-size:21px}.clue-copy>span{font-size:30px}.answer-input{font-size:23px;padding-bottom:10px}.answer-label{font-size:8px}.entry-hint .text-button{font-size:10px}.entry-hint>span{font-size:9px}.notes-details summary{font-size:11px}.notes-details{padding-top:12px}.clue-list{max-height:330px}.clue-item{padding-top:13px;padding-bottom:13px}.clue-item>.clue-text{font-size:15px}.clue-item>.clue-nr{font-size:11px}.clue-list-heading{margin-top:24px}.clue-tab{font-size:12px;padding-bottom:13px}.under-board{margin-top:20px}.under-board>span:first-child{display:none}.site-footer{margin:36px 20px 0;padding:22px 0;flex-wrap:wrap;gap:15px}.site-footer>span:nth-child(2){order:3;flex-basis:100%;font-size:8px}.footer-brand{font-size:18px}.site-footer>.text-button{font-size:10px}.archive-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.archive-card{padding:17px}.archive-card h3{font-size:20px}.archive-card .eyebrow{font-size:7px}.card-art>span{font-size:34px}.mini-grid{width:60px;height:60px;background-size:9px 9px}.card-art{margin:22px 0}.card-bottom{font-size:9px}.solution-badge{font-size:7px;padding:3px}.archive-toolbar{flex-wrap:wrap;gap:10px;padding:13px 0}.search-wrap{flex-basis:100%}.archive-toolbar select{flex:1}.archive-footer{align-items:flex-start;flex-direction:column;gap:0}.archive-footer>p{font-size:13px}.page-heading>.primary-button{font-size:9px;padding:10px;max-width:110px}.toast{bottom:15px;font-size:11px}dialog{padding:20px}dialog h2{font-size:26px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{transition:none!important;scroll-behavior:auto!important}}
@media(max-width:500px){.card-art .mini-grid{display:none}.card-art{margin:18px 0}.card-art>span{font-size:32px}.card-status{display:block}.card-status>span{display:block;line-height:1.5}.card-status>span:last-child{margin-top:5px}.card-bottom{flex-direction:column;align-items:flex-start;gap:9px}.archive-card{padding:15px}.archive-card h3{font-size:19px}}
@media(max-width:400px){.site-header{padding:0 16px}.brand{gap:6px}.brand svg{width:24px;height:24px}.brand>span{font-size:21px}.brand small{letter-spacing:1.3px}.site-header nav{gap:13px}.nav-link span{font-size:9px;padding:2px 5px}.profile-button{gap:3px}}
@media print{body{background:white;color:black}.site-header,.page-heading,.site-footer,.board-toolbar,.board-bottom,.active-clue,.under-board,.puzzle-heading>.text-button,.clue-list-heading,dialog,.toast,#archive-view{display:none!important}main{padding:0;max-width:none}.puzzle-heading{padding:10px 0}.game-layout{display:block}.board-panel{width:85%;margin:0 auto;border:0}.board-scroll{overflow:visible;padding:10px}.board{width:100%!important}.cell{font-size:15px!important;background:white!important;print-color-adjust:exact}.cell .letter{visibility:hidden}.cell.blank{background:white!important}.cell .number{font-size:7px}.clue-panel{width:100%}.clue-list{max-height:none;overflow:visible;display:block!important;columns:3;column-gap:22px}.clue-item{break-inside:avoid;border:0;background:white!important;padding:3px 0!important}.clue-item>.clue-text{font-size:10px}.clue-item>.clue-nr{font-size:8px}.clue-item>.clue-length{display:none}}
.puzzle-instructions{font-size:12px;line-height:1.7;background:var(--soft);padding:14px 18px;border-left:3px solid var(--bar);margin:0 0 20px}.cell.shaded{background:var(--shaded)}.cell.shaded.in-word{background:var(--shaded-word)}.cell.shaded.selected{background:var(--yellow)}.grid-artwork{position:absolute;z-index:0;background:white;border:2px solid var(--bar);padding:3px;pointer-events:none;overflow:hidden}.grid-artwork img{display:block;width:100%;height:100%;object-fit:contain}@media print{.puzzle-instructions{font-size:10px;background:white}.grid-artwork{print-color-adjust:exact}.cell.shaded{background:#ddd!important}}
.under-board{flex-wrap:wrap;gap:8px}

/* Shared colors cover the puzzle, archive, dialogs and native form controls. */
:root{--focus:#a17423;--chip-bg:#e9e9df;--avatar-bg:#e5e9db;--accent:#798466;--status:#748966;--cell-line:#858d7d;--bar:#253c33;--correct:#34764c;--error:#b14736;--error-bg:#f9e6dc;--track:#eceee5;--button-text:#fffefa;--button-hover:#203e30;--input-bg:#f4f5ed;--hover:#eeefe6;--error-surface:#804c3b;--art-number:#bcc6ad;--shaded:#dedfd8;--shaded-word:#d5dfca;--selected-text:#253c33;--toast-bg:#253c33;--toast-text:#fffefa}
:root[data-theme="dark"]{color-scheme:dark;--paper:#171c19;--white:#212923;--ink:#e1e8df;--muted:#a7b4a5;--line:#424e43;--green:#9ebda5;--soft:#2b382d;--selected:#344a36;--yellow:#87611d;--focus:#dab66a;--chip-bg:#323d34;--avatar-bg:#344a37;--accent:#a9bc91;--status:#94b783;--cell-line:#69776a;--bar:#b9c7b7;--correct:#9ed5ae;--error:#f0a28d;--error-bg:#4b302b;--track:#354039;--button-text:#142318;--button-hover:#b1cfb7;--input-bg:#1b231e;--hover:#2f3b30;--error-surface:#653f32;--art-number:#82917b;--shaded:#39443a;--shaded-word:#465d40;--selected-text:#fff4d5;--toast-bg:#35443a;--toast-text:#e1e8df}
:root[data-theme="night"]{color-scheme:dark;--paper:#000;--white:#080b09;--ink:#c7d0c8;--muted:#93a091;--line:#344037;--green:#91aa95;--soft:#101b13;--selected:#1d3021;--yellow:#74591f;--focus:#c39e58;--chip-bg:#17201a;--avatar-bg:#1b2b20;--accent:#a0b18e;--status:#829d72;--cell-line:#526057;--bar:#8c9a8f;--correct:#94bf9b;--error:#d28e7b;--error-bg:#33201b;--track:#18211b;--button-text:#08110a;--button-hover:#a2bda5;--input-bg:#000;--hover:#142018;--error-surface:#4b2e24;--art-number:#65765d;--shaded:#222b24;--shaded-word:#2a3d28;--selected-text:#f3deb2;--toast-bg:#19261c;--toast-text:#c7d0c8}
:root[data-theme="night"] .cell:not(.blank):not(.shaded):not(.in-word):not(.selected):not(.incorrect):not(.referenced):not(.back-referenced){background:#000}.cell.selected,.cell.shaded.selected{color:var(--selected-text)}.cell.shaded.incorrect{background:var(--error-bg)}.toast{background:var(--toast-bg);color:var(--toast-text)}.toast.error{background:var(--error-surface)}.grid-artwork{background:var(--white)}
:root[data-theme="dark"][data-pictures="dim"] .grid-artwork img{filter:brightness(.72)}:root[data-theme="night"][data-pictures="dim"] .grid-artwork img{filter:brightness(.5)}:root:not([data-theme="light"])[data-pictures="invert"] .grid-artwork img{filter:invert(1) hue-rotate(180deg) brightness(.82)}
.header-tools{display:flex;align-items:center;gap:20px}.settings-button{display:flex;align-items:center;gap:7px;padding:8px;font-size:12px;border-radius:4px}.settings-button>span:first-child{font-size:21px}.settings-button:hover{background:var(--soft)}dialog.settings-dialog{width:min(760px,calc(100vw - 28px));max-width:none;max-height:calc(100dvh - 32px);overflow-y:auto}.settings-dialog .dialog-top{position:sticky;top:0;background:var(--white);z-index:2}.settings-dialog h2{font-size:30px}.settings-tabs{display:flex;gap:22px;border-bottom:1px solid var(--line);margin:23px 0 10px}.settings-tabs button{font-size:13px;padding:10px 0;border-bottom:2px solid transparent;color:var(--muted)}.settings-tabs button.active{border-color:var(--ink);color:var(--ink)}.settings-panel{min-height:100px}.setting-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(180px,.95fr);align-items:center;gap:18px;padding:14px 0;border-bottom:1px solid var(--line);font-size:13px;line-height:1.5}.setting-row small,.theme-option small{display:block;color:var(--muted);font-size:11px;font-weight:400;margin-top:3px}.setting-row select{width:100%;min-width:0;padding:9px;border:1px solid var(--line);border-radius:4px;background:var(--input-bg);color:var(--ink);font-size:12px}.setting-check{grid-template-columns:1fr auto}.setting-check input{width:19px;height:19px;accent-color:var(--green);margin:0 3px}.settings-note{font-size:12px!important;line-height:1.7}.settings-status{font-size:12px!important;min-height:20px;color:var(--ink)!important;line-height:1.6}.settings-presets{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin-top:18px}.settings-presets button{font-size:11px}.key-binding{display:grid;grid-template-columns:minmax(120px,.8fr) minmax(0,1.2fr);gap:14px;align-items:center;padding:12px 0;border-bottom:1px solid var(--line);font-size:12px;line-height:1.5}.key-binding>div{display:flex;flex-wrap:wrap;gap:6px;justify-content:flex-end}.binding-chip,.binding-add{border:1px solid var(--line);border-radius:4px;padding:5px 8px;font-size:11px;background:var(--input-bg);overflow-wrap:anywhere}.binding-chip>span{color:var(--muted);padding-left:5px}.binding-add{border-style:dashed;background:transparent;color:var(--muted)}.binding-add:focus{border-color:var(--focus)}.theme-options{border:0;padding:12px 0;margin:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.theme-options legend{font-size:13px;font-weight:600;padding:9px 0}.theme-option{display:flex;align-items:center;gap:10px;border:1px solid var(--line);padding:14px;border-radius:5px;font-size:13px;cursor:pointer}.theme-option:has(input:checked){border-color:var(--focus);box-shadow:inset 0 0 0 1px var(--focus)}.theme-option input{accent-color:var(--green);margin:0}.theme-swatch{width:24px;height:30px;border-radius:3px;flex-shrink:0;border:1px solid #6a756b}.swatch-system{background:linear-gradient(90deg,#f7f5ef 50%,#171c19 50%)}.swatch-light{background:#f7f5ef}.swatch-dark{background:#171c19}.swatch-night{background:#000}
@media(max-width:760px){.site-header{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;height:auto;min-height:90px;padding:15px 20px 0}.site-header .brand{grid-column:1;grid-row:1}.header-tools{grid-column:2;grid-row:1;gap:5px}.settings-label{display:none}.site-header nav{grid-column:1/-1;grid-row:2;height:38px;justify-content:flex-start;gap:26px}.settings-button{padding:5px}.settings-dialog .setting-row{grid-template-columns:1fr;gap:7px}.settings-dialog .setting-check{grid-template-columns:1fr auto}.settings-tabs{gap:20px}.settings-tabs button{font-size:12px}.settings-dialog h2{font-size:25px}.theme-option{padding:10px;gap:6px;font-size:12px}.theme-option small{font-size:10px}.theme-swatch{width:17px;height:24px}.key-binding{grid-template-columns:minmax(85px,.8fr) minmax(0,1.2fr);gap:8px}.binding-chip,.binding-add{padding:5px;font-size:10px}}
@media print{:root[data-theme]{--paper:white;--white:white;--ink:black;--muted:#333;--line:#bbb;--bar:black;--soft:#eee;--selected:#ddd;--shaded:#ddd;--cell-line:#888;--selected-text:black;color-scheme:light}.grid-artwork{background:white}.grid-artwork img{filter:none!important}}
.cell.selected .letter{color:var(--selected-text)}
.theme-option>span:last-child{min-width:0;overflow-wrap:anywhere}

/* Reference context stays distinct from the active answer and error states. */
:root{--reference-bg:#edf1f4;--reference-line:#78909e;--reference-text:#506878}
:root[data-theme="dark"]{--reference-bg:#26343c;--reference-line:#829cab;--reference-text:#afc6d2}
:root[data-theme="night"]{--reference-bg:#0e1a21;--reference-line:#6f8999;--reference-text:#9db3c1}
.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
.puzzle-heading{margin-top:26px;border-top:0;padding-top:0}
.clue-copy{min-height:0}
.clue-references{display:grid;gap:7px;border-left:2px solid var(--reference-line);margin:0 0 18px 39px;padding-left:10px}
.clue-reference{display:block;text-align:left;width:100%;padding:5px 4px;border-radius:3px;min-height:44px}
.clue-reference:hover{background:var(--reference-bg)}
.reference-label{display:block;font:600 10px/1.5 var(--sans);color:var(--reference-text);margin-bottom:3px}
.reference-text{display:block;font:14px/1.45 var(--serif);color:var(--ink);overflow-wrap:anywhere}
.reference-back{font-size:11px;text-align:left;text-decoration:underline;text-underline-offset:3px;min-height:36px;padding:0 0 12px;color:var(--reference-text)}
.clue-item.referenced:not(.active){background:var(--reference-bg);border-left-color:var(--reference-line)}
.cell.referenced:not(.in-word):not(.selected):not(.shaded):not(.incorrect){background:var(--reference-bg)}

/* Keep every letter at the physical cell center, independent of thick bars. */
.cell,.cell.edge-left,.cell.edge-top,.cell.bar-left,.cell.bar-top{border:0}
.cell::before{content:'';position:absolute;inset:0;border-right:1px solid var(--cell-line);border-bottom:1px solid var(--cell-line);pointer-events:none}
.cell.blank::before{content:none}
.cell.edge-left::before{border-left:1px solid var(--cell-line)}
.cell.edge-top::before{border-top:1px solid var(--cell-line)}
.cell.bar-left::before{border-left:3px solid var(--bar)}
.cell.bar-top::before{border-top:3px solid var(--bar)}
.cell .letter{position:absolute;inset:0;padding:0;display:grid;place-items:center;line-height:1}
.cell .number{z-index:1;pointer-events:none}

.answer-fields{display:flex;align-items:flex-end;gap:10px;max-width:100%;min-width:0;overflow-x:auto;padding:3px 2px 6px;scrollbar-width:thin}
.answer-input{min-width:0;min-height:44px;font-family:ui-monospace,'SFMono-Regular',Consolas,monospace;letter-spacing:.12ch}
.answer-fields.has-picture .answer-part{flex:0 0 auto;width:calc(var(--letters) * 1.12ch + .5ch)}
.picture-gap{display:flex;flex:0 0 auto;flex-direction:column;gap:3px;border:1px dashed var(--cell-line);border-radius:4px;padding:5px 7px 0;background:var(--white);min-width:0}
.picture-gap>span{font-size:10px;color:var(--muted);letter-spacing:.2px}
.picture-gap input{width:9ch;min-width:0;min-height:40px;background:transparent;color:var(--ink);border:0;border-bottom:1px solid var(--line);border-radius:0;padding:4px 0 10px;font:500 20px/1.2 ui-monospace,'SFMono-Regular',Consolas,monospace;letter-spacing:.12ch}
.picture-gap:focus-within{border-color:var(--focus);border-style:solid}
.answer-fields input:focus-visible{outline-offset:-2px}
.picture-help{font-size:11px;line-height:1.5;color:var(--muted);margin:6px 0 12px;overflow-wrap:anywhere}
.under-board #timer-label{font-variant-numeric:tabular-nums}
.archive-footer{justify-content:flex-end}
.page-heading:has(h1:only-child){margin:28px 0 24px}
.game-layout{grid-template-areas:"board active" "board clues";gap:0 29px;grid-template-rows:auto 1fr}
.board-panel{grid-area:board}
.active-clue{grid-area:active;min-width:0}
.clue-panel{grid-area:clues;min-width:0}
.reference-label,.picture-gap>span{font-size:11px}
.card-art{margin:18px 0}
.card-art>span{font-size:32px}
@media(min-width:761px) and (max-width:1100px){.game-layout{column-gap:20px}}
@media(max-width:760px){
  .game-layout{gap:16px}
  .active-clue{width:100%}
  .puzzle-heading{margin-top:20px;padding-bottom:15px}
  .clue-copy{min-height:0;margin-bottom:15px}
  .clue-references{margin-left:40px}
  .reference-text{font-size:14px}
  .reference-back{min-height:44px}
  .cell.bar-left::before{border-left-width:2px}
  .cell.bar-top::before{border-top-width:2px}
  .answer-fields.has-picture .answer-part{font-size:20px}
  .picture-gap input{width:7ch;font-size:20px}
  .entry-hint{flex-wrap:wrap;gap:8px}
  .entry-hint .text-button{min-height:32px}
  .clue-kicker .icon-button{height:40px;min-width:40px}
}
@media print{.cell.referenced{box-shadow:none!important}.cell.referenced:not(.shaded){background:white!important}}

/* A continuous tint leaves all cell boundaries untouched. */
:root{--reference-shaded:#dce5e9}
:root[data-theme="dark"]{--reference-shaded:#34434a}
:root[data-theme="night"]{--reference-shaded:#1a272d}
.cell.referenced.shaded:not(.in-word):not(.selected):not(.incorrect){background:var(--reference-shaded)}
.board-actions{flex-wrap:wrap}
.fullscreen-button svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.puzzle-fullscreen body{overflow:hidden}
.puzzle-fullscreen .site-header,.puzzle-fullscreen .site-footer{display:none}
.puzzle-fullscreen #game-view{position:fixed;inset:0;z-index:5;height:100dvh;background:var(--paper);padding:16px;overflow:auto}
.puzzle-fullscreen #game{max-width:1800px;margin:auto}
.puzzle-fullscreen .puzzle-heading{margin:0;padding:0 0 12px}
.puzzle-fullscreen .puzzle-instructions{margin:0 0 12px}
.puzzle-fullscreen .under-board{margin-top:8px}
@media(min-width:761px) and (min-height:600px){
  .puzzle-fullscreen #game{height:100%;display:grid;grid-template-areas:"heading" "instructions" "layout" "footer";grid-template-rows:auto auto minmax(0,1fr) auto}
  .puzzle-fullscreen .puzzle-heading{grid-area:heading}
  .puzzle-fullscreen .puzzle-instructions{grid-area:instructions}
  .puzzle-fullscreen .game-layout{grid-area:layout;min-height:0;align-items:stretch}
  .puzzle-fullscreen .under-board{grid-area:footer}
  .puzzle-fullscreen .board-panel{height:100%;display:flex;flex-direction:column}
  .puzzle-fullscreen .board-toolbar,.puzzle-fullscreen .board-bottom{flex:0 0 auto}
  .puzzle-fullscreen .board-scroll{flex:1 1 auto;min-height:0;padding:16px;display:flex;flex-direction:column}
  .puzzle-fullscreen .board{flex:0 0 auto;margin:auto}
  .puzzle-fullscreen .active-clue{max-height:60vh;overflow:auto}
  .puzzle-fullscreen .clue-panel{display:flex;flex-direction:column;min-height:0;overflow:hidden}
  .puzzle-fullscreen .clue-list-heading{flex:0 0 auto}
  .puzzle-fullscreen .clue-list{flex:1 1 auto;min-height:0;max-height:none}
  @supports(width:1cqw){
    .puzzle-fullscreen .board-scroll{container-type:size}
    .puzzle-fullscreen .board{width:calc(min(100cqw,100cqh * var(--grid-ratio)) * var(--board-zoom))!important}
    .puzzle-fullscreen .cell{font-size:clamp(8px,calc(min(100cqw / var(--grid-columns),100cqh / var(--grid-rows)) * .55 * var(--board-zoom)),22px)}
  }
}
@media(max-width:760px){.board-actions>#check-button{flex:1 0 100%}.board-actions>.secondary-button{flex:1 1 auto}}
@media(max-width:380px){.board-toolbar .tool-group{gap:2px}.board-toolbar #zoom-label{display:none}.board-toolbar .tool-divider{margin:0 2px}.board-toolbar .help-icon{margin-left:2px}}

/* Measured off-screen in the same physical geometry used by the print page. */
.print-sheet{position:fixed;left:-100000px;top:0;display:block;width:190mm;height:276mm;padding:0;margin:0;overflow:hidden;pointer-events:none;box-sizing:border-box;background:#fff;color:#111;--bar:#111;--cell-line:#777;--white:#fff;--print-clue-size:9pt;--print-grid-width:162mm}
.print-content{display:flow-root;width:190mm;transform-origin:top left;font:9pt/1.3 Georgia,'Times New Roman',serif;color:#111}
.print-heading{display:block;border-bottom:.3mm solid #111;padding-bottom:2mm;margin-bottom:3mm}
.print-heading h1{font:normal 17pt/1.15 Georgia,'Times New Roman',serif;letter-spacing:0;max-width:none;margin:0 0 1.2mm;color:#111}
.print-meta{font:8pt/1.3 Arial,sans-serif;color:#444;margin:0}
.print-sheet .print-grid{width:var(--print-grid-width)!important;max-width:100%;margin:0 auto 3mm}
.print-sheet .cell{background:#fff!important;color:#111;box-shadow:none!important;outline:0;aspect-ratio:1}
.print-sheet .cell.shaded{background:#dedede!important}
.print-sheet .cell .number{font:6.5pt/1 Arial,sans-serif;left:.55mm;top:.55mm;color:#111}
.print-sheet .cell.bar-left::before{border-left-width:.5mm}
.print-sheet .cell.bar-top::before{border-top-width:.5mm}
.print-sheet .grid-artwork{background:#fff;border:.4mm solid #111;padding:.8mm}
.print-sheet .grid-artwork img{filter:none!important}
.print-instructions{font:8pt/1.3 Arial,sans-serif;color:#222;border-left:.5mm solid #999;padding:0 0 0 2mm;margin:0 0 3mm}
.print-clues{column-count:3;column-gap:4mm;font-size:var(--print-clue-size);line-height:1.28;color:#111}
.print-clues h2{font:bold 9pt/1.3 Arial,sans-serif;letter-spacing:0;margin:0 0 1.5mm;break-after:avoid;page-break-after:avoid;color:#111}
.print-clue{font-size:inherit;line-height:inherit;margin:0 0 1.2mm;padding-left:5mm;text-indent:-5mm;break-inside:avoid;page-break-inside:avoid;overflow-wrap:anywhere;orphans:2;widows:2}
.print-clue strong{font-weight:bold;font-variant-numeric:tabular-nums}
.print-length{font:7pt Arial,sans-serif;color:#555}
.print-footer{font:7pt/1.3 Arial,sans-serif;color:#555;border-top:.2mm solid #bbb;padding-top:1.5mm;margin-top:2mm;text-align:center;white-space:pre-wrap}
@page{size:A4 portrait;margin:10mm}
.auth-locked main,.auth-locked .site-header,.auth-locked .site-footer{visibility:hidden}
.login-page{min-height:100dvh;display:grid;place-items:center;padding:24px}
.login-card{width:min(100%,420px);min-height:0;padding:30px;background:var(--white);border:1px solid var(--line);border-radius:6px}
.login-brand{font:600 20px var(--serif);margin:0 0 28px}
.login-card h1{font-size:30px;margin-bottom:14px}
.login-card>p:not(.login-brand){font-size:13px;line-height:1.6;color:var(--muted)}
.login-card #login-status{min-height:20px;overflow-wrap:anywhere}
.login-card form>label:not(.remember-device){display:block;font-size:13px;margin-bottom:7px}
.login-card input[type=password]{display:block;width:100%;font-size:16px;border:1px solid var(--line);border-radius:4px;background:var(--input-bg);color:var(--ink);padding:12px;min-height:46px}
.remember-device{display:flex;align-items:center;gap:10px;margin:18px 0;font-size:12px;line-height:1.5;min-height:32px}
.remember-device input{width:18px;height:18px;accent-color:var(--green);flex:0 0 auto}
.login-card button{width:100%;min-height:44px}
.clue-references{max-height:38vh;overflow:auto}
.clue-reference.indirect{margin-left:calc(var(--reference-depth) * 8px);width:calc(100% - var(--reference-depth) * 8px)}
:root{--reference-indirect:#f3f5f6}
:root[data-theme="dark"]{--reference-indirect:#232d32}
:root[data-theme="night"]{--reference-indirect:#091318}
.cell.referenced.reference-indirect:not(.in-word):not(.selected):not(.shaded):not(.incorrect){background:var(--reference-indirect)}
@media print{
  html:has(body.printing-puzzle){margin:0!important;padding:0!important;overflow:visible!important;background:white!important;color-scheme:light}
  body.printing-puzzle{display:block!important;margin:0!important;padding:0!important;overflow:visible!important;background:white!important;min-height:0!important}
  body.printing-puzzle>:not(#print-sheet){display:none!important}
  body.printing-puzzle>.print-sheet{position:relative;left:auto;top:auto;display:block!important;width:190mm;height:276mm;margin:0;padding:0;break-inside:avoid;page-break-inside:avoid;print-color-adjust:exact;-webkit-print-color-adjust:exact}
  .print-sheet .board{width:var(--print-grid-width)!important}
}

/* Family accounts and reliable storage feedback. */
.notice{padding:12px 16px;border:1px solid var(--reference-line);border-radius:4px;background:var(--reference-bg);font-size:14px;line-height:1.5;margin:12px 0}
.notice p{margin:0 0 10px}.notice button{margin:4px 8px 0 0}
.account-list{display:grid;gap:10px;margin:14px 0 24px}.account-row{display:flex;align-items:center;gap:12px;justify-content:space-between;padding:12px 0;border-bottom:1px solid var(--line);font-size:14px;overflow-wrap:anywhere}.account-row>span{min-width:0}.account-row small{display:block;font-size:12px;color:var(--muted);margin-top:5px}.account-row button{flex-shrink:0}
dialog input[type=password],dialog input[type=text],dialog select,.login-card input[type=text]{width:100%;min-height:44px;padding:10px;border:1px solid var(--line);border-radius:4px;background:var(--input-bg);color:var(--ink);font-size:16px}
dialog form>.primary-button,dialog form>.secondary-button{margin-top:16px}dialog h3{margin:20px 0 12px;font-size:20px}.check-label{display:flex;gap:10px;align-items:center;min-height:44px}.check-label input{width:18px;height:18px}.profile-admin-form{padding:12px;border:1px solid var(--line);border-radius:4px}.login-card input[type=text]{margin-bottom:18px}
/* The separator is keyboard operable and saves the pane ratio per account. */
.game-layout{grid-template-columns:minmax(0,var(--board-share,1.6fr)) 8px minmax(280px,1fr);grid-template-areas:"board divider active" "board divider clues";column-gap:12px}
.pane-divider{grid-area:divider;align-self:stretch;cursor:col-resize;touch-action:none;position:relative}.pane-divider:before{content:'';position:absolute;left:3px;top:5%;bottom:5%;width:2px;background:var(--line);border-radius:2px}.pane-divider:hover:before,.pane-divider:focus-visible:before,.pane-divider[data-dragging]:before{background:var(--focus)}
.mobile-only,.keyboard-only{display:none}.puzzle-fullscreen #game{max-width:none}.puzzle-fullscreen #game-view{height:var(--visible-height,100dvh);width:var(--visible-width,100%);top:var(--viewport-top,0);left:var(--viewport-left,0);padding:max(10px,env(safe-area-inset-top)) max(10px,env(safe-area-inset-right)) max(10px,env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left))}
@media(min-width:761px){
  .puzzle-fullscreen #game{height:100%;display:grid;grid-template-areas:"heading" "instructions" "conflict" "layout" "footer";grid-template-rows:auto auto auto minmax(0,1fr) auto}
  .puzzle-fullscreen .puzzle-heading{grid-area:heading}.puzzle-fullscreen .puzzle-instructions{grid-area:instructions}.puzzle-fullscreen #conflict-banner{grid-area:conflict}.puzzle-fullscreen .game-layout{grid-area:layout;min-height:0;align-items:stretch}.puzzle-fullscreen .under-board{grid-area:footer}
  .puzzle-fullscreen .board-panel{height:100%;display:flex;flex-direction:column}.puzzle-fullscreen .board-toolbar,.puzzle-fullscreen .board-bottom{flex:0 0 auto}.puzzle-fullscreen .board-scroll{flex:1;min-height:0;padding:10px;display:flex;flex-direction:column;container-type:size}.puzzle-fullscreen .board{flex:0 0 auto;margin:auto}
  .puzzle-fullscreen .active-clue{max-height:50vh;overflow:auto}.puzzle-fullscreen .clue-panel{display:flex;flex-direction:column;min-height:0;overflow:hidden}.puzzle-fullscreen .clue-list{flex:1;min-height:0;max-height:none}
  @supports(width:1cqw){.puzzle-fullscreen .board{width:calc(min(100cqw,100cqh * var(--grid-ratio)) * var(--board-zoom))!important}.puzzle-fullscreen .cell{font-size:clamp(10px,calc(min(100cqw / var(--grid-columns),100cqh / var(--grid-rows)) * .55 * var(--board-zoom)),34px)}}
}
@media(max-width:760px),(max-width:1000px) and (pointer:coarse),(max-height:500px) and (pointer:coarse){
  .site-header{padding-left:max(12px,env(safe-area-inset-left));padding-right:max(12px,env(safe-area-inset-right))}main{padding-left:max(12px,env(safe-area-inset-left));padding-right:max(12px,env(safe-area-inset-right))}
  .header-tools{gap:4px}.settings-button{font-size:11px;min-height:44px;padding:4px}.profile-button{min-height:44px}.brand>span{font-size:20px}.brand svg{width:24px;height:24px}
  .game-layout{display:flex;flex-direction:column;gap:10px}.pane-divider{display:none}.mobile-only{display:inline-grid}.icon-button,.help-icon{min-width:40px;min-height:40px;height:40px}.help-icon{margin-left:0}.tool-group{gap:0}.board-toolbar{padding:0 5px;height:48px}.save-status{font-size:10px;gap:4px;min-width:0;overflow-wrap:anywhere}.tool-divider{display:none}.tool-group #zoom-label{font-size:10px;min-width:30px}
  .active-clue{position:sticky;top:0;z-index:3;padding:10px 12px;max-height:45vh;overflow:auto}.clue-kicker{margin-bottom:4px}.clue-copy{margin-bottom:6px;gap:8px}.clue-copy h3{font-size:18px;line-height:1.25}.clue-copy>span{font-size:26px}.clue-references{margin:0 0 8px 30px;max-height:16vh}.reference-text{font-size:13px}.reference-label{font-size:11px}.clue-reference{min-height:44px}
  .answer-label{font-size:10px;letter-spacing:.5px;margin-bottom:2px}.answer-label>span{font-size:10px}.answer-fields{padding-bottom:0}.answer-input{min-height:44px;font-size:20px;padding:3px 0 6px}.entry-hint{margin:4px 0}.entry-hint .text-button{min-height:40px;font-size:12px}.entry-hint>span{font-size:10px}.notes-details{margin-top:4px;padding-top:4px}.notes-details summary{min-height:40px;align-items:center;font-size:13px}.notes-details textarea{font-size:16px}.board-scroll{max-height:55vh;padding:10px;touch-action:pan-x pan-y}.board-bottom{padding:8px 10px 10px}.board-actions{gap:6px;margin-top:10px}.board-actions button{min-height:44px;font-size:12px!important}.text-button{min-height:40px;display:inline-flex;align-items:center}.search-wrap>input,.archive-toolbar select{font-size:16px;min-height:44px}.clue-tab{min-height:44px}.clue-item{min-height:44px}.picture-help{font-size:11px;margin:4px 0}.picture-gap input{min-height:40px}.picture-gap{padding-top:2px}
  .puzzle-fullscreen #game,.keyboard-open #game{height:100%;display:flex;flex-direction:column;min-height:0}.puzzle-fullscreen .puzzle-heading,.keyboard-open .puzzle-heading{flex:0 0 auto;padding:0 0 5px;margin:0}.puzzle-fullscreen .puzzle-title .eyebrow,.keyboard-open .puzzle-title .eyebrow,.puzzle-fullscreen #puzzle-meta,.keyboard-open #puzzle-meta{display:none}.puzzle-fullscreen .puzzle-heading h2,.keyboard-open .puzzle-heading h2{font-size:16px;margin:0}.puzzle-fullscreen .puzzle-heading h2 span,.keyboard-open .puzzle-heading h2 span{font-size:14px}.puzzle-fullscreen .puzzle-instructions,.keyboard-open .puzzle-instructions{max-height:12vh;overflow:auto;font-size:11px;padding:6px;margin:0 0 5px}
  .puzzle-fullscreen .game-layout,.keyboard-open .game-layout{flex:1;min-height:0;position:relative}.puzzle-fullscreen .active-clue,.keyboard-open .active-clue{position:relative;top:auto;flex:0 0 auto;max-height:45%;width:100%}.puzzle-fullscreen .board-panel,.keyboard-open .board-panel{flex:1;min-height:0;display:flex;flex-direction:column}.puzzle-fullscreen .board-scroll,.keyboard-open .board-scroll{flex:1;min-height:0;max-height:none;overflow:auto}.puzzle-fullscreen .clue-panel,.keyboard-open .clue-panel{display:none}.puzzle-fullscreen .under-board,.keyboard-open .under-board{display:none}.puzzle-fullscreen.show-clues .clue-panel,.keyboard-open.show-clues .clue-panel{display:flex;position:absolute;inset:0;background:var(--paper);z-index:4;padding:0 10px 10px;overflow:hidden}.show-clues .clue-list{flex:1;max-height:none}.show-clues .clue-list-heading{margin-top:5px}
  .keyboard-open .site-header,.keyboard-open .site-footer{display:none}.keyboard-open body{overflow:hidden}.keyboard-open #game-view{position:fixed;z-index:5;top:var(--viewport-top,0);left:var(--viewport-left,0);width:var(--visible-width,100%);height:var(--visible-height,100dvh);padding:4px max(6px,env(safe-area-inset-right)) max(4px,env(safe-area-inset-bottom)) max(6px,env(safe-area-inset-left));overflow:hidden;background:var(--paper)}
  .keyboard-open .keyboard-only{display:inline-grid}.keyboard-open .active-clue{max-height:40%;padding:5px 8px}.keyboard-open .clue-copy h3{font-size:16px}.keyboard-open .clue-kicker{margin-bottom:0}.keyboard-open .notes-details,.keyboard-open .entry-hint,.keyboard-open .picture-help,.keyboard-open .clue-references,.keyboard-open .answer-label{display:none}.keyboard-open .board-bottom{display:none}.keyboard-open .answer-input{min-height:36px;font-size:18px}.keyboard-open .clue-kicker .icon-button{height:32px;min-height:32px}.keyboard-open .puzzle-heading{display:none}
}
@media(max-width:360px){.board-toolbar .icon-button{min-width:34px}.board-toolbar #zoom-label{display:none}.board-toolbar .save-status{font-size:9px}.header-tools #account-button{font-size:10px}.brand>span{font-size:18px}}
@media print{.pane-divider,#conflict-banner,#storage-warning,#clue-announcement{display:none!important}}
dialog.content-dialog{width:min(960px,calc(100vw - 24px));max-width:none}.editor-meta,.editor-coordinates{display:grid;grid-template-columns:repeat(auto-fit,minmax(100px,1fr));gap:10px}.editor-meta label,.editor-coordinates label{margin:0}.editor-meta input,.editor-coordinates input{width:100%;min-width:0;padding:8px;min-height:44px;border:1px solid var(--line);background:var(--input-bg);color:var(--ink);font-size:16px}.editor-coordinates{grid-template-columns:70px minmax(130px,1fr) repeat(3,70px)}#editor-entries fieldset{margin:18px 0;padding:12px;border:1px solid var(--line);border-radius:4px}#editor-entries legend{font-size:13px}#editor-entries textarea{width:100%;padding:10px;border:1px solid var(--line);border-radius:4px;background:var(--input-bg);color:var(--ink);font-size:16px}#content-editor .dialog-actions{position:sticky;bottom:0;background:var(--white);padding:10px;margin-top:10px}@media(max-width:600px){.editor-coordinates{grid-template-columns:repeat(3,minmax(0,1fr))}}
.offline-mode .save-status{color:var(--error)}.offline-mode .save-status:before{content:'Offline · '}.offline-mode #import-button,.offline-mode #manage-button{display:none}#offline-form>label{display:block;margin:14px 0 6px;font-size:14px}#offline-form input{width:100%;min-height:44px;font-size:16px;padding:10px;border:1px solid var(--line);border-radius:4px;background:var(--input-bg);color:var(--ink)}

/* Completion is verified by the server, distinct from a merely full grid. */
:root{--solved-ink:#2e5942;--solved-bg:#edf4e9;--solved-line:#849d77;--solved-seal:#dfc573;--solved-seal-ink:#41432b}
:root[data-theme="dark"]{--solved-ink:#c3dfbb;--solved-bg:#26382a;--solved-line:#829a78;--solved-seal:#c4ad63;--solved-seal-ink:#253320}
:root[data-theme="night"]{--solved-ink:#bed3b7;--solved-bg:#102015;--solved-line:#667e5d;--solved-seal:#a38f53;--solved-seal-ink:#101c10}
.board-panel.puzzle-solved{border-color:var(--solved-line)}
.completion-banner{display:flex;align-items:center;gap:12px;padding:14px 18px;border-bottom:1px solid var(--solved-line);background:var(--solved-bg);color:var(--solved-ink);flex:0 0 auto;border-radius:2px 2px 0 0}
.completion-mark{display:grid;place-items:center;flex:0 0 38px;width:38px;height:38px;border-radius:50%;background:var(--solved-seal);color:var(--solved-seal-ink)}
.completion-mark svg{width:26px;height:26px;fill:none;stroke:currentColor;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round}
.completion-copy{flex:1;min-width:0}.completion-copy h3{font:600 18px/1.3 var(--sans);margin:0;color:inherit}.completion-copy p{font-size:12px;line-height:1.5;margin:3px 0 0;color:inherit}
.completion-banner .text-button{font-size:12px;min-height:44px;white-space:nowrap;gap:6px;color:inherit}
.puzzle-solved #progress-label{color:var(--solved-ink);font-weight:600}
.archive-card.is-solved{border-color:var(--solved-line);box-shadow:inset 0 3px 0 var(--solved-line)}
.archive-card{display:flex;flex-direction:column;align-items:stretch}.archive-card .card-status{margin-top:auto;gap:8px}
.card-time{font:12px/1.5 var(--sans);color:var(--muted);margin:0 0 10px}.card-time time{font-variant-numeric:tabular-nums;font-weight:600}.is-solved .card-time{color:var(--solved-ink)}
.archive-card.is-solved .card-status>span:first-child{color:var(--solved-ink);font-weight:600}
.archive-card.is-solved .progress-track>div{background:var(--solved-line)}
.solved-seal{width:54px;height:54px;flex:0 0 54px;fill:var(--solved-bg);stroke:var(--solved-line);stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.solved-seal path{fill:none;stroke:var(--solved-ink);stroke-width:3}
.solution-badge.solved-badge{font-size:10px;font-weight:700;letter-spacing:.4px;background:var(--solved-bg);border-color:var(--solved-line);color:var(--solved-ink);white-space:nowrap}
.solution-badge.no-solution{background:#efe5e2;border-color:#dfcdc7;color:#805d54}
:root[data-theme="dark"] .solution-badge.no-solution{background:#382c29;border-color:#58433c;color:#c3a59b}
:root[data-theme="night"] .solution-badge.no-solution{background:#1b1210;border-color:#4b3430;color:#aa8a80}
@media(prefers-reduced-motion:no-preference){.solved-arrival .completion-mark{animation:solved-check .6s ease-out}@keyframes solved-check{0%{transform:scale(.65);opacity:.2}65%{transform:scale(1.12)}100%{transform:scale(1);opacity:1}}}
@media(max-width:480px){.completion-banner{padding:10px;gap:9px;flex-wrap:wrap}.completion-copy h3{font-size:16px}.completion-copy p{font-size:11px}.completion-banner .text-button{font-size:11px}.completion-mark{flex-basis:32px;width:32px;height:32px}.completion-mark svg{width:23px;height:23px}}
@media print{.completion-banner{display:none!important}}

@media(max-width:760px),(max-width:1000px) and (pointer:coarse),(max-height:500px) and (pointer:coarse){.puzzle-fullscreen .board-scroll,.keyboard-open .board-scroll{display:block;container-type:normal}.puzzle-fullscreen .board,.keyboard-open .board{width:calc(100% * var(--board-zoom))!important;margin:0 auto}.puzzle-fullscreen .cell,.keyboard-open .cell{font-size:clamp(12px,3.4vw,24px)}.keyboard-open #zoom-label,.keyboard-open #help-button{display:none}}
@supports(width:1cqw){
  .board-scroll{container-type:inline-size}
  .cell{font-size:clamp(10px,calc(100cqw / var(--grid-columns) * .55 * var(--board-zoom)),34px)}
  .cell .number{font-size:clamp(6px,calc(100cqw / var(--grid-columns) * .2 * var(--board-zoom)),11px)}
  @media(min-width:761px){.puzzle-fullscreen .board-scroll{container-type:size}}
  @media(max-width:760px),(max-width:1000px) and (pointer:coarse),(max-height:500px) and (pointer:coarse){.puzzle-fullscreen .board-scroll,.keyboard-open .board-scroll{container-type:inline-size}.puzzle-fullscreen .cell,.keyboard-open .cell{font-size:clamp(12px,calc(100cqw / var(--grid-columns) * .55 * var(--board-zoom)),32px)}}
}

/* Archive facets combine independently and wrap without squeezing the search. */
.archive-toolbar{flex-wrap:wrap;align-items:flex-end}
.archive-toolbar .search-wrap{flex:1 1 260px;min-width:0;align-self:center}
.archive-toolbar .search-wrap>input{min-height:44px}
.archive-facet{display:flex;flex-direction:column;gap:6px;min-width:0;max-width:100%;font-size:11px;color:var(--muted)}
.archive-facet select{width:100%;min-width:0;min-height:44px}
#archive-results{align-self:center}
@media(max-width:760px){
  .archive-toolbar .search-wrap{flex-basis:100%}
  .archive-facet{flex:1 1 140px}
}

/* A shared, viewport-sized workspace for desktop play and fullscreen. */
.puzzle-heading-tools{display:flex;align-items:center;gap:24px;flex-shrink:0}
.puzzle-title{min-width:0}
.puzzle-meta-line{display:flex;flex-wrap:wrap;gap:3px 14px;color:var(--muted);font:12px/1.45 var(--sans)}
.puzzle-meta-line p{margin:0}
.puzzle-timer{display:flex;flex-direction:column;gap:2px;align-items:flex-end;white-space:nowrap}
.puzzle-timer>span:first-child{font:500 11px/1.3 var(--sans);color:var(--muted)}
.more-menu.floating-menu{position:fixed;right:auto;bottom:auto;z-index:12;overflow:auto;max-width:calc(100vw - 16px)}
@media print{.puzzle-heading-tools,#more-menu{display:none!important}}
#timer-label{font:600 24px/1.15 var(--sans);font-variant-numeric:tabular-nums;letter-spacing:.3px}
@media screen and (min-width:761px) and (pointer:fine), screen and (min-width:1001px) and (min-height:501px){
  .site-header,main,.site-footer{max-width:none;width:100%;margin-left:0;margin-right:0}
  .site-header{height:64px;padding:0 clamp(12px,1.5vw,28px);gap:20px}
  .brand svg{width:28px;height:28px}.brand>span{font-size:25px}.brand small{font-size:8px;margin-top:5px}
  .nav-link{font-size:14px}.header-tools{gap:12px}.profile-button,.settings-button{font-size:13px}
  main{padding-left:clamp(12px,1.5vw,28px);padding-right:clamp(12px,1.5vw,28px)}
  .archive-grid{grid-template-columns:repeat(auto-fill,minmax(280px,1fr))}
  html[data-view="spielen"],html.puzzle-fullscreen{height:100%;overflow:hidden}
  html[data-view="spielen"] body{height:100dvh;display:grid;grid-template-rows:auto minmax(0,1fr) auto;overflow:hidden}
  html[data-view="spielen"] main{display:flex;flex-direction:column;min-height:0;margin:0;align-self:stretch;padding-top:10px;padding-bottom:0;overflow:hidden}
  html[data-view="spielen"] .site-footer{margin-top:0;padding:6px clamp(12px,1.5vw,28px);min-height:28px;font-size:11px;flex-wrap:wrap}
  html[data-view="spielen"] .site-footer .text-button{font-size:11px;padding:0}
  html[data-view="spielen"] #storage-warning{flex:none;max-height:18dvh;overflow:auto;margin:0 0 8px}
  html[data-view="spielen"] #game-view{flex:1;min-height:0;overflow:hidden}
  html[data-view="spielen"] .loading{margin:24px 0;font-size:16px}
  #game{height:100%;min-height:0;display:flex;flex-direction:column;max-width:none}
  #game .puzzle-heading{flex:none;margin:0;padding:0 0 10px;gap:16px;grid-area:auto}
  #game .puzzle-heading h2{font-size:24px;line-height:1.2;margin:0 0 5px}
  #game .puzzle-heading h2 span{font-size:20px;white-space:nowrap}
  #game .puzzle-title #issue-label,#game #puzzle-meta{display:block;font:12px/1.45 var(--sans);margin:0}
  #game .puzzle-heading .text-button{font-size:13px;min-height:36px;display:inline-flex;align-items:center;gap:5px}
  #game .puzzle-instructions{flex:none;max-height:16dvh;overflow:auto;margin:0 0 8px;padding:8px 12px;font-size:13px;line-height:1.45}
  #game #conflict-banner{flex:none;max-height:24dvh;overflow:auto;margin:0 0 8px}
  #game .game-layout{flex:1;min-height:0;grid-template-columns:minmax(0,var(--board-share,var(--default-board-share,1.6fr))) 8px minmax(270px,1fr);grid-template-rows:minmax(0,auto) minmax(0,1fr);align-items:stretch;gap:0 12px}
  #game .board-panel{height:auto;min-height:0;display:flex;flex-direction:column;overflow:visible}
  #game .board-toolbar{flex:none;height:46px;padding:0 12px}
  #game .save-status{font-size:12px;line-height:1.35}
  #game .board-toolbar .icon-button{min-width:34px;height:34px}
  #game .board-toolbar #zoom-label{font-size:12px;min-width:44px}
  #game .board-scroll{flex:1;min-height:0;max-height:none;display:flex;flex-direction:column;padding:12px;overflow:auto;container-type:size}
  #game .board{flex:none;margin:auto}
  #game .board-bottom{flex:none;padding:10px 12px 12px}
  #game .progress-info{font-size:12px;margin-bottom:6px;line-height:1.4}
  #game .board-actions{margin-top:10px;gap:8px}
  #game .board-actions .primary-button,#game .board-actions .secondary-button{font-size:13px;min-height:38px;padding:8px 12px}
  #game .solution-notice{font-size:12px;line-height:1.4;margin:8px 0 0}
  #game .active-clue{min-height:0;max-height:46dvh;overflow:auto;padding:14px 18px}
  #game .clue-kicker{margin-bottom:8px}#game .clue-kicker>span{font-size:11px}
  #game .clue-copy{gap:10px;margin-bottom:12px}
  #game .clue-copy h3{font-size:clamp(20px,1.35vw,28px);line-height:1.35;overflow-wrap:anywhere}
  #game .clue-copy>span{font-size:32px}
  #game .answer-label,#game .answer-label>span{font-size:11px}
  #game .answer-input{font-size:24px;min-height:42px}
  #game .entry-hint .text-button{font-size:12px}#game .entry-hint>span{font-size:11px}
  #game .notes-details summary{font-size:13px;min-height:32px;align-items:center}
  #game .clue-references{margin-bottom:12px;max-height:24dvh}
  #game .reference-label{font-size:12px}#game .reference-text{font-size:16px}
  #game .clue-panel{display:flex;flex-direction:column;min-height:0;overflow:auto}
  #game .clue-list-heading{flex:none;margin-top:8px;gap:8px}
  #game .clue-list-heading>div{gap:18px}#game .clue-tab{font-size:14px;min-height:40px;padding-bottom:8px}
  #game #clue-list-count{font-size:11px}
  #game .clue-list{flex:1;min-height:0;max-height:none;overflow:auto;margin-top:4px}
  #game .clue-item{font-size:16px;line-height:1.45;min-height:44px;padding:12px 6px}
  #game .clue-item>.clue-text{font-size:16px}
  #game .clue-item .clue-nr,#game .clue-item .clue-length{font-size:12px}
  #game .under-board{flex:none;flex-wrap:wrap;gap:4px 18px;max-height:15dvh;overflow:auto;padding:8px 0;margin:0;font-size:12px;line-height:1.4;grid-area:auto}
  #game .under-board .text-button{font-size:12px}
  #presence-label:empty{display:none}
  .puzzle-fullscreen #game-view{overflow:hidden;padding:12px}
  .puzzle-fullscreen body{display:block}
  @supports(width:1cqw){
    #game .game-layout{container-type:size}
    #game .active-clue{max-height:60cqh}
    #game .board{width:calc(max(var(--grid-columns) * 20px,min(100cqw,100cqh * var(--grid-ratio))) * var(--board-zoom))!important}
    #game .cell{font-size:clamp(11px,calc(min(100cqw / var(--grid-columns),100cqh / var(--grid-rows)) * .55 * var(--board-zoom)),36px)}
    #game .cell .number{font-size:clamp(6px,calc(min(100cqw / var(--grid-columns),100cqh / var(--grid-rows)) * .2 * var(--board-zoom)),11px)}
  }
  @media(max-height:650px) and (min-width:1100px),(min-aspect-ratio:21/9){
    .site-header{height:48px}.brand small{display:none}
    #game .puzzle-heading{padding-bottom:8px}#game .puzzle-heading h2{font-size:21px}
    #game .board-panel{display:grid;grid-template-columns:minmax(0,1fr) 168px;grid-template-rows:auto auto minmax(0,1fr);grid-template-areas:"grid complete" "grid tools" "grid actions"}
    #game .board-scroll{grid-area:grid}
    #game .board-toolbar{grid-area:tools;display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;gap:4px;height:auto;padding:8px;border-left:1px solid var(--line);border-bottom:0}
    #game .tool-group{flex-wrap:wrap;gap:0}#game .board-toolbar .tool-divider{display:none}
    #game .board-bottom{grid-area:actions;min-height:0;padding:6px 8px 10px;border-left:1px solid var(--line);overflow:auto}
    #game .board-actions{flex-direction:column;align-items:stretch;gap:6px}
    #game .board-actions .primary-button,#game .board-actions .secondary-button{padding:8px;font-size:12px;min-height:34px}
    #game .board-actions>.icon-button{margin-left:0;width:100%}
    #game .progress-info{flex-wrap:wrap;gap:2px;font-size:11px}
    #game .completion-banner{grid-area:complete;flex-wrap:wrap;gap:6px;padding:8px;max-height:none;border-left:1px solid var(--line)}
    #game .completion-mark{width:26px;height:26px;flex-basis:26px}#game .completion-mark svg{width:20px;height:20px}
    #game .completion-copy h3{font-size:14px}#game .completion-copy p{font-size:11px}
    #game .completion-banner .text-button{font-size:12px;min-height:32px}
  }
  @media(min-aspect-ratio:21/9){#game{--default-board-share:1.1fr}}
  @media(max-aspect-ratio:4/3) and (min-height:800px){
    #game .game-layout{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:minmax(0,1.35fr) minmax(0,1fr);grid-template-areas:"board board" "active clues";gap:12px}
    #game .pane-divider{display:none}#game .active-clue{max-height:none}#game .clue-list-heading{margin-top:0}
  }
}
@media(max-width:760px),(max-width:1000px) and (pointer:coarse){
  .puzzle-heading-tools{gap:10px;align-items:flex-end;flex-direction:column}
  #timer-label{font-size:21px}.puzzle-timer>span:first-child{font-size:10px}
  .puzzle-meta-line{font-size:11px;gap:2px}.puzzle-heading h2{font-size:20px}
  .puzzle-fullscreen .puzzle-heading-tools{flex-direction:row;align-items:center;gap:12px}
  .puzzle-fullscreen #timer-label{font-size:21px}
}

/* Relationship colors describe direction; the selected word keeps priority. */
:root{--backref-bg:#efeaf5;--backref-line:#a08bad;--backref-text:#70547f;--backref-shaded:#ddd2e7}
:root[data-theme="dark"]{--backref-bg:#342d3e;--backref-line:#a58ab9;--backref-text:#d0b8df;--backref-shaded:#493951}
:root[data-theme="night"]{--backref-bg:#1b1323;--backref-line:#8d739f;--backref-text:#c7a9d9;--backref-shaded:#30213b}
.clue-backlinks{display:grid;gap:7px;border-left:2px solid var(--backref-line);margin:0 0 18px 39px;padding-left:10px;max-height:24dvh;overflow:auto}
.clue-backlinks .reference-label{color:var(--backref-text)}
.reference-branch{min-width:0}
.reference-support{margin:4px 0 8px 12px;padding-left:10px;border-left:2px solid var(--reference-line)}
.clue-backlinks .reference-support .reference-label{color:var(--reference-text)}
.clue-backlinks .reference-support .clue-reference:hover{background:var(--reference-bg)}
.reference-support .reference-text{font-size:13px}
.clue-backlinks .clue-reference:hover{background:var(--backref-bg)}
.reference-reciprocal{display:inline-block;margin-left:8px;padding:2px 5px;border-radius:3px;background:var(--backref-bg);color:var(--backref-text);font:500 11px/1.4 var(--sans)}
.cell.back-referenced:not(.referenced):not(.in-word):not(.selected):not(.incorrect):not(.shaded){background:var(--backref-bg)}
.cell.back-referenced.shaded:not(.referenced):not(.in-word):not(.selected):not(.incorrect){background:var(--backref-shaded)}
.cell.referenced.back-referenced:not(.in-word):not(.selected):not(.incorrect):not(.shaded){background:linear-gradient(135deg,var(--reference-bg) 0 50%,var(--backref-bg) 50% 100%)}
.cell.referenced.back-referenced.shaded:not(.in-word):not(.selected):not(.incorrect){background:linear-gradient(135deg,var(--reference-shaded) 0 50%,var(--backref-shaded) 50% 100%)}
.clue-item.back-referenced:not(.active):not(.referenced){background:var(--backref-bg);border-left-color:var(--backref-line)}
.clue-item.back-referenced.referenced:not(.active){background:linear-gradient(90deg,var(--reference-bg),var(--backref-bg));border-left-color:var(--reference-line)}
@media(max-width:760px),(max-width:1000px) and (pointer:coarse){.clue-backlinks{max-height:16vh;margin:0 0 8px 30px}.keyboard-open .clue-backlinks{display:none}}
@media print{.cell.back-referenced{background:white!important;box-shadow:none!important}.clue-backlinks{display:none!important}}

/* Phone solving is a workspace, not a stack of desktop panels. */
.mobile-label{display:none}
.board-actions .desktop-label,.board-actions .mobile-label{margin:0}
@media screen and (max-width:760px),screen and (max-width:1000px) and (pointer:coarse),screen and (max-height:500px) and (pointer:coarse){
  html[data-view="spielen"]{height:100%;overflow:hidden}
  html[data-view="spielen"] body{height:var(--visible-height,100dvh);display:grid;grid-template-rows:calc(48px + env(safe-area-inset-top)) minmax(0,1fr);overflow:hidden}
  html[data-view="spielen"] .site-header{display:flex;height:calc(48px + env(safe-area-inset-top));min-height:48px;margin:0;padding:env(safe-area-inset-top) max(8px,env(safe-area-inset-right)) 0 max(8px,env(safe-area-inset-left));gap:8px;max-width:none}
  html[data-view="spielen"] .site-header nav,html[data-view="spielen"] .brand small,html[data-view="spielen"] .site-footer{display:none}
  html[data-view="spielen"] .brand{gap:6px}html[data-view="spielen"] .brand>span{white-space:nowrap}
  html[data-view="spielen"] .header-tools{margin-left:auto;gap:0}
  html[data-view="spielen"] .settings-label,html[data-view="spielen"] #profile-name{display:none}
  html[data-view="spielen"] .settings-button{min-width:40px;min-height:44px;padding:4px;font-size:11px}
  html[data-view="spielen"] .profile-button{min-height:44px;padding:0 0 0 5px;gap:4px}
  html[data-view="spielen"] main{display:flex;flex-direction:column;min-height:0;min-width:0;max-width:none;width:100%;margin:0;padding:6px max(6px,env(safe-area-inset-right)) max(6px,env(safe-area-inset-bottom)) max(6px,env(safe-area-inset-left));overflow:hidden;align-self:stretch}
  html[data-view="spielen"] #storage-warning{flex:none;max-height:15dvh;overflow:auto;margin:0 0 4px;padding:6px;font-size:12px}
  html[data-view="spielen"] #game-view{position:static;min-height:0;flex:1;width:100%;height:100%;padding:0;overflow:hidden}
  html[data-view="spielen"] #game{display:flex;flex-direction:column;height:100%;min-height:0}
  html[data-view="spielen"] #game .puzzle-heading{flex:none;align-items:center;gap:8px;margin:0;padding:0 4px 6px;min-height:40px}
  html[data-view="spielen"] #game .puzzle-title h2{font-size:16px;line-height:1.2;letter-spacing:-.3px;max-width:none;margin:0}
  html[data-view="spielen"] #game .puzzle-title h2 span{font-size:15px;white-space:nowrap}
  html[data-view="spielen"] #game .puzzle-meta-line,html[data-view="spielen"] #choose-puzzle{display:none}
  html[data-view="spielen"] #game .puzzle-heading-tools{flex-direction:row;align-items:center;gap:6px}
  html[data-view="spielen"] #game #mobile-puzzle-info{display:inline-grid;width:44px;height:44px;min-width:44px;min-height:44px;font-size:21px}
  html[data-view="spielen"] #game #timer-label{font-size:19px}
  html[data-view="spielen"] #game .puzzle-timer>span:first-child{font-size:9px}
  html[data-view="spielen"] #game .puzzle-instructions{display:none}
  html[data-view="spielen"] #conflict-banner{flex:none;max-height:26dvh;overflow:auto;margin:0 0 4px;padding:6px 8px;font-size:12px}
  html[data-view="spielen"] #game .game-layout{flex:1;min-height:0;position:relative;display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) auto;grid-template-areas:"board" "active";gap:6px;container-type:size;align-items:stretch}
  html[data-view="spielen"] #game .pane-divider{display:none}
  html[data-view="spielen"] #game .board-panel{grid-area:board;display:flex;flex-direction:column;min-height:0;min-width:0;width:100%;height:100%;overflow:hidden}
  html[data-view="spielen"] #game .board-toolbar{flex:none;height:44px;padding:0 4px;gap:0}
  html[data-view="spielen"] #game .save-status{font-size:10px;line-height:1.2;gap:4px;flex:1;min-width:0}
  html[data-view="spielen"] #game .tool-group{gap:0;flex:none}
  html[data-view="spielen"] #game .board-toolbar .icon-button{width:44px;min-width:44px;min-height:44px;height:44px;padding:0}
  html[data-view="spielen"] #game #help-button,html[data-view="spielen"] #game #zoom-label,html[data-view="spielen"] #game .tool-divider{display:none}
  html[data-view="spielen"] #game .board-scroll{flex:1;min-height:0;max-height:none;display:flex;flex-direction:column;container-type:size;padding:6px;overflow:auto;touch-action:pan-x pan-y}
  html[data-view="spielen"] #game .board{flex:none;margin:auto;width:calc(100% * var(--board-zoom))!important}
  @supports(width:1cqw){
    html[data-view="spielen"] #game .board{width:calc(max(var(--grid-columns) * 18px,min(100cqw,100cqh * var(--grid-ratio))) * var(--board-zoom))!important}
    html[data-view="spielen"] #game .cell{font-size:clamp(12px,calc(min(100cqw / var(--grid-columns),100cqh / var(--grid-rows)) * .65 * var(--board-zoom)),30px)}
    html[data-view="spielen"] #game .cell .number{font-size:clamp(6px,calc(min(100cqw / var(--grid-columns),100cqh / var(--grid-rows)) * .25 * var(--board-zoom)),10px)}
  }
  html[data-view="spielen"] #game .board-bottom{flex:none;padding:5px 6px 6px}
  html[data-view="spielen"] #game .progress-info{font-size:10px;line-height:1.2;margin-bottom:3px}
  html[data-view="spielen"] #game .board-actions{display:grid;grid-template-columns:1.2fr 1fr 1fr 44px;gap:4px;margin-top:5px}
  html[data-view="spielen"] #game .board-actions button{min-height:44px;padding:4px;font-size:12px!important;white-space:nowrap}
  html[data-view="spielen"] #game .board-actions>.icon-button{margin:0;width:44px}
  html[data-view="spielen"] #game .desktop-label{display:none}
  html[data-view="spielen"] #game .mobile-label{display:inline}
  html[data-view="spielen"] #game .solution-notice{font-size:10px;line-height:1.2;margin:4px 0 0}
  html[data-view="spielen"] #game .active-clue{grid-area:active;position:relative;top:auto;z-index:1;display:flex;flex-direction:column;height:clamp(150px,29cqh,210px);max-height:none;min-height:0;width:100%;padding:6px 10px;overflow:hidden}
  html[data-view="spielen"] #game .clue-kicker{flex:none;min-height:44px;margin:0;gap:4px}
  html[data-view="spielen"] #game #active-direction{display:none}
  html[data-view="spielen"] #game #mobile-direction{display:inline-flex;align-items:center;min-height:44px;padding:0;font-size:10px;letter-spacing:.3px;text-transform:uppercase;text-align:left}
  html[data-view="spielen"] #game .clue-kicker>div{display:flex;align-items:center;gap:0}
  html[data-view="spielen"] #game .clue-kicker .icon-button{width:44px;min-width:44px;min-height:44px;height:44px}
  html[data-view="spielen"] #game #clue-details-toggle{display:inline-flex;align-items:center;min-height:44px;font-size:11px;padding:0 8px}
  html[data-view="spielen"] #game .clue-context{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin}
  html[data-view="spielen"] #game .clue-copy{gap:8px;margin:0 0 4px}
  html[data-view="spielen"] #game .clue-copy h3{font-size:18px;line-height:1.25;overflow-wrap:anywhere}
  html[data-view="spielen"] #game .clue-copy>span{font-size:27px;min-width:24px}
  html[data-view="spielen"] #game .answer-label{display:flex;flex:none;font-size:9px;line-height:1.2;margin:4px 0 0}
  html[data-view="spielen"] #game .answer-label>span{font-size:10px}
  html[data-view="spielen"] #game .answer-fields{flex:none;padding:0}
  html[data-view="spielen"] #game .answer-input{min-height:44px;font-size:22px;line-height:1.2;padding:5px 0 7px;letter-spacing:3px}
  html[data-view="spielen"] #game .clue-references,html[data-view="spielen"] #game .clue-backlinks,html[data-view="spielen"] #game #reference-back,html[data-view="spielen"] #game .clue-utilities{display:none}
  html.show-clue-details[data-view="spielen"] #game .active-clue{height:min(55cqh,360px)}
  html.show-clue-details[data-view="spielen"] #game .clue-references,html.show-clue-details[data-view="spielen"] #game .clue-backlinks{display:grid;max-height:none;margin:6px 0;padding-left:8px}
  html.show-clue-details[data-view="spielen"] #game #reference-back{display:block}
  html.show-clue-details[data-view="spielen"] #game .clue-utilities{display:block;flex:none;max-height:min(32cqh,190px);overflow:auto}
  html.show-clue-details[data-view="spielen"] #game .entry-hint{display:flex;margin:0}
  html.show-clue-details[data-view="spielen"] #game .notes-details{display:block;margin:0;padding:0}
  html.show-clue-details[data-view="spielen"] #game .picture-help{display:block;font-size:11px}
  html[data-view="spielen"] #game .clue-panel{display:none}
  html.show-clues[data-view="spielen"] #game .clue-panel{grid-area:auto;display:flex;flex-direction:column;position:absolute;inset:0;z-index:4;min-height:0;padding:4px 10px 8px;background:var(--white);border:1px solid var(--line);border-radius:3px;overflow:hidden}
  html[data-view="spielen"] #game .clue-list-heading{flex:none;gap:4px;margin:0;min-height:48px}
  html[data-view="spielen"] #game .clue-tab{font-size:13px;min-height:44px;padding:0 0 4px}
  html[data-view="spielen"] #game .clue-list-heading>div{gap:18px}
  html[data-view="spielen"] #game #clues-close{display:inline-grid;min-width:44px;height:44px}
  html[data-view="spielen"] #game .clue-list{flex:1;min-height:0;max-height:none;overflow:auto}
  html[data-view="spielen"] #game .clue-item{min-height:48px;padding:12px 4px;gap:8px}
  html[data-view="spielen"] #game .clue-item .clue-text{font-size:16px;line-height:1.4}
  html[data-view="spielen"] #game .under-board{flex:none;min-height:0;gap:0;margin:0;font-size:10px}
  html[data-view="spielen"] #shortcut-hints,html[data-view="spielen"] #original-link{display:none}
  html[data-view="spielen"] #presence-label:empty{display:none}
  html[data-view="spielen"] #presence-label:not(:empty){padding:3px 4px;max-height:30px;overflow:auto}
  html[data-view="spielen"] #game .completion-banner{flex:none;padding:6px 8px;gap:6px;max-height:90px;overflow:auto}
  html[data-view="spielen"] #game .completion-mark{width:28px;height:28px;flex-basis:28px}
  html[data-view="spielen"] #game .completion-copy h3{font-size:14px}
  html[data-view="spielen"] #game .completion-copy p{font-size:11px}
  html[data-view="spielen"] #game .completion-banner .text-button{min-height:36px;font-size:11px}
  html.puzzle-fullscreen[data-view="spielen"] body,html.keyboard-open[data-view="spielen"] body{grid-template-rows:minmax(0,1fr)}
  html.puzzle-fullscreen[data-view="spielen"] main{padding-top:max(6px,env(safe-area-inset-top))}
  html.puzzle-fullscreen[data-view="spielen"] .site-header,html.keyboard-open[data-view="spielen"] .site-header{display:none}
  html.keyboard-open[data-view="spielen"] #game-view{position:fixed;z-index:5;top:var(--viewport-top,0);left:var(--viewport-left,0);width:var(--visible-width,100%);height:var(--visible-height,100dvh);padding:4px max(6px,env(safe-area-inset-right)) max(4px,env(safe-area-inset-bottom)) max(6px,env(safe-area-inset-left));background:var(--paper)}
  html.keyboard-open[data-view="spielen"] #game .puzzle-heading,html.keyboard-open[data-view="spielen"] #game .board-bottom{display:none}
  html.keyboard-open[data-view="spielen"] #game .keyboard-only{display:inline-grid}
  html.keyboard-open[data-view="spielen"] #game #fullscreen-button{display:none}
  html.keyboard-open[data-view="spielen"] #game .active-clue{height:clamp(160px,44cqh,200px)}
  html.keyboard-open.show-clue-details[data-view="spielen"] #game .active-clue{height:min(62cqh,360px)}
  html.keyboard-open.show-clue-details[data-view="spielen"] #game .active-clue:has(#note-input:focus) .answer-label,
  html.keyboard-open.show-clue-details[data-view="spielen"] #game .active-clue:has(#note-input:focus) .answer-fields{display:none}
  .more-menu button{min-height:44px;font-size:14px}
  @media(orientation:landscape) and (max-height:600px){
    html[data-view="spielen"] #game .game-layout{grid-template-columns:minmax(0,1.2fr) minmax(250px,1fr);grid-template-rows:minmax(0,1fr);grid-template-areas:"board active";gap:6px}
    html[data-view="spielen"] #game .active-clue,html.show-clue-details[data-view="spielen"] #game .active-clue{height:100%}
  }
}
