:root{color-scheme:dark;--yellow:#f2c230;--paper:#e9e6dc;--muted:#a9ada5;--line:#ffffff20;--dark:#171a19;font-family:Arial,Helvetica,sans-serif;font-size:16px;color:var(--paper);background:#111513}*{box-sizing:border-box}body{margin:0;min-height:100svh;background:linear-gradient(90deg,#101512ef 0%,#101512dd 58%,#101512ac 100%),url('./assets/prison-wall.jpg') center/cover fixed}button,a{-webkit-tap-highlight-color:transparent}button{font:inherit;cursor:pointer}button:disabled{cursor:default}button:focus-visible,a:focus-visible{outline:3px solid var(--yellow);outline-offset:5px}button svg,svg.icon{width:21px;height:21px}svg{fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}.svg-defs{position:absolute;width:0;height:0;overflow:hidden}.page-shell{max-width:1260px;margin:auto;padding:0 42px}.topbar{height:104px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line);gap:20px}.brand{display:flex;align-items:center;gap:14px;color:var(--paper);text-decoration:none;font-weight:800;font-size:19px;letter-spacing:1px}.brand small{display:block;font:10px/1.7 'Courier New',monospace;letter-spacing:1.6px;color:var(--muted);margin-top:5px}.brand-mark{width:44px;height:48px;background:var(--yellow);color:#171a19;display:grid;place-items:center;clip-path:polygon(0 0,100% 0,100% 80%,50% 100%,0 80%)}.brand-mark svg{width:26px;height:26px;stroke-width:2.3}.header-actions{display:flex;align-items:center;gap:17px}.icon-button,.text-button{border:0;background:none;color:#d3d4cc;min-width:44px;min-height:44px;display:flex;align-items:center;justify-content:center;gap:13px}.text-button{font-size:14px}.icon-button:hover,.text-button:hover{color:var(--yellow)}.help-circle{border:1px solid #a9ada580;border-radius:50%;width:19px;height:19px;display:grid;place-items:center;font-size:12px}.heading-row{display:flex;align-items:flex-end;justify-content:space-between;padding:32px 0 26px;gap:20px}.eyebrow{font:700 12px/1.6 'Courier New',monospace;letter-spacing:1.5px;color:var(--yellow);margin:0 0 10px}.eyebrow>span{display:inline-block;width:7px;height:7px;background:var(--yellow);margin-right:9px}h1{font:400 clamp(24px,3.1vw,40px)/1.05 Impact,'Arial Narrow',sans-serif;letter-spacing:.8px;margin:0}h1 em{font-style:normal;color:var(--yellow)}.edition-label{font:12px/1.8 'Courier New',monospace;text-align:right;letter-spacing:1px;color:#c5c8c0;white-space:nowrap}.edition-label>span{display:block;font-size:10px;color:#8d958c}.game-layout{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:40px;align-items:start}.board-frame{border:1px solid #565a50;padding:0 17px;background:linear-gradient(130deg,#42464055,#151917e6 45%);box-shadow:0 18px 60px #0008,inset 0 0 0 5px #262b29,inset 0 0 0 6px #ffffff0c;position:relative}.board-frame::before,.board-frame::after{content:'+';position:absolute;top:7px;font:12px/1 monospace;color:#999d90}.board-frame::before{left:7px}.board-frame::after{right:7px}.frame-heading,.frame-footer{display:flex;justify-content:space-between;align-items:center;font:10px/1.5 'Courier New',monospace;letter-spacing:1.25px;color:#b4b7a9;min-height:42px;gap:10px;padding:0 5px}.frame-heading>span:first-child{display:flex;align-items:center;gap:8px}.frame-heading i{width:5px;height:5px;background:var(--yellow)}#board-status{font-size:9px;color:#8d958a}.frame-footer{min-height:38px;font-size:9px;color:#8d958a}.mini-stripes{width:85px;height:8px;background:repeating-linear-gradient(130deg,#cfab35 0 7px,transparent 7px 14px);opacity:.5}.board{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:11px}.card{display:block;position:relative;aspect-ratio:1.14;border:0;background:transparent;padding:0;perspective:900px;border-radius:3px;touch-action:manipulation}.card-inner{position:absolute;inset:0;transition:transform .42s cubic-bezier(.2,.7,.2,1);transform-style:preserve-3d}.card.is-flipped .card-inner,.card.is-matched .card-inner{transform:rotateY(180deg)}.card-face{position:absolute;inset:0;backface-visibility:hidden;border-radius:3px;overflow:hidden}.card-back{background:linear-gradient(135deg,#353a36 0%,#232824 55%,#333833);border:1px solid #515749;box-shadow:inset 0 0 0 4px #171c1770,inset 0 0 0 5px #69705c30,0 4px 5px #0005;display:flex;flex-direction:column;align-items:center;justify-content:center}.card-back::before{content:'';position:absolute;inset:8px;background:linear-gradient(115deg,transparent 27%,#ffffff08 27.4%,transparent 27.8%,transparent 75%,#ffffff0a 75.4%,transparent 75.8%);border-top:1px solid #80887420;border-bottom:1px solid #1119}.card-back::after{content:'';position:absolute;bottom:10px;left:-8px;right:-8px;height:11px;background:repeating-linear-gradient(125deg,#d6b02d 0 10px,#151a16 10px 20px);opacity:.65}.card-back svg{width:30px;height:30px;color:#d2c898;stroke-width:1.4;margin-bottom:5px;filter:drop-shadow(0 2px 1px #000)}.card-back .card-back-label{font:8px/1.5 'Courier New',monospace;letter-spacing:1.8px;color:#b9b89a}.card-number{position:absolute;left:10px;top:9px;font:9px 'Courier New',monospace;color:#adb19778}.rivet{position:absolute;width:4px;height:4px;border-radius:50%;background:#858977;box-shadow:0 1px 2px #000;right:9px;top:9px}.card:not(.is-flipped):not(.is-matched):hover .card-back{border-color:var(--yellow);background:linear-gradient(135deg,#454b40,#2f342d)}.card-front{transform:rotateY(180deg);background:#e9e6dd;border:2px solid #c0bbae;display:flex;align-items:center;justify-content:center;flex-direction:column;box-shadow:inset 0 0 10px #73563640}.card-front img{width:76%;height:76%;object-fit:contain;mix-blend-mode:multiply;user-select:none;-webkit-user-drag:none}.card-front .object-name{font:700 9px/1.3 'Courier New',monospace;color:#464941;letter-spacing:.5px;position:absolute;bottom:6px}.card.is-matched .card-front{border-color:var(--yellow);background:#ede9d6;box-shadow:inset 0 0 0 2px #e6bd3945}.matched-check{display:none;position:absolute;right:5px;top:5px;width:17px;height:17px;padding:2px;background:var(--yellow);color:#1b2117;border-radius:50%;stroke-width:3}.is-matched .matched-check{display:block}.board-hint{text-align:center;color:#969e92;font-size:12px;margin:17px 0 0}.dossier{background:#191f1ce8;border:1px solid #50564a;padding:23px;box-shadow:0 10px 35px #0003;position:relative}.dossier::before{content:'';position:absolute;left:-1px;top:-1px;width:42px;height:3px;background:var(--yellow)}.dossier-top{display:flex;align-items:center;justify-content:space-between;gap:10px}.dossier-top .eyebrow{font-size:10px;margin:0;color:#b0b8a8}.stamp-small{font:9px/1.5 'Courier New',monospace;letter-spacing:.3px;border:1px solid #6e714b;padding:3px 5px;color:#c5c093}.pairs-count{display:flex;align-items:center;gap:11px;margin:22px 0 18px}.pairs-count>strong{font:68px/1 Impact,'Arial Narrow',sans-serif;color:var(--yellow)}.pairs-count>span{font:24px/1 'Courier New',monospace;color:#afb8a7}.pairs-count small{display:block;font:10px 'Courier New',monospace;letter-spacing:1px;color:#919c8b;margin-top:12px}.pairs-count>svg{width:38px;height:38px;margin-left:auto;color:#6e7965}.progress-slots{display:grid;grid-template-columns:repeat(8,1fr);gap:5px;margin-bottom:24px}.progress-slots span{height:5px;background:#394333}.progress-slots span.filled{background:var(--yellow);box-shadow:0 0 7px #f2c23022}.stats{display:grid;grid-template-columns:1.5fr 1fr;border-top:1px solid #ffffff15;border-bottom:1px solid #ffffff15;padding:20px 0;margin-bottom:23px}.stats>div+div{border-left:1px solid #ffffff15;padding-left:20px}.stats span,.win-stats span{display:block;font:10px/1.5 'Courier New',monospace;letter-spacing:1px;color:#a2ac99}.stats strong{display:block;font:28px/1.4 'Courier New',monospace;letter-spacing:-1px;font-variant-numeric:tabular-nums}.primary-button,.secondary-button{min-height:47px;padding:12px 17px;border:1px solid var(--yellow);font-size:14px;font-weight:700;display:flex;justify-content:center;align-items:center;gap:12px}.primary-button{background:var(--yellow);color:#202414}.primary-button:hover{background:#ffdb66;border-color:#ffdb66}.primary-button .button-arrow{margin-left:auto;width:18px}.secondary-button{background:transparent;color:var(--paper);border-color:#ffffff35}.dossier .primary-button{width:100%;justify-content:flex-start}.mission{padding:28px 7px 23px}.mission .eyebrow{font-size:10px;color:#c4b36a}.mission h2{font-size:21px;line-height:1.35;font-weight:500;letter-spacing:-.4px;margin:12px 0}.mission p{font-size:14px;line-height:1.7;color:#aab1a3;margin:0}.mission-note{display:flex;gap:13px;align-items:center;border-top:1px solid var(--line);margin-top:23px;padding-top:20px;color:#aab1a3;font:italic 12px/1.6 Georgia,serif}.mission-note svg{width:24px;height:24px;color:#c4b36a}.system-status{font:10px/1.5 'Courier New',monospace;color:#979f90;display:flex;align-items:center;gap:8px;padding:0 7px}.status-indicator{width:5px;height:5px;background:var(--yellow);border-radius:50%}.page-footer{display:flex;justify-content:space-between;gap:20px;padding:27px 0;margin-top:26px;border-top:1px solid var(--line);font:9px/1.7 'Courier New',monospace;letter-spacing:1.2px;color:#8e988a}.page-footer b{font-weight:400;color:#c3c8b9}.footer-divider{margin:0 12px;color:var(--yellow)}dialog{background:#1b211b;color:var(--paper);border:1px solid #6a725b;box-shadow:0 30px 100px #000c;padding:38px;width:min(460px,calc(100% - 32px));max-height:90svh}dialog::backdrop{background:#071008bd;backdrop-filter:blur(6px)}dialog h2{font-size:28px;line-height:1.2;margin:14px 0 22px}dialog p,dialog li{font-size:15px;line-height:1.7;color:#bcc4b3}dialog ol{padding-left:22px}dialog li{padding:5px 0 5px 5px}dialog .primary-button{width:100%;margin-top:23px}.close-button{position:absolute;right:10px;top:7px;width:40px;height:40px;border:0;background:none;color:#bec8b4;font-size:29px}.dialog-actions{display:flex;gap:12px;margin-top:25px}.dialog-actions .primary-button{margin:0;width:auto}.dialog-actions button{flex:1}.win-dialog{text-align:center;border-top:5px solid var(--yellow)}.win-lock{width:53px;height:53px;color:var(--yellow);margin-bottom:20px}.win-dialog h2{font:70px/1 Impact,'Arial Narrow',sans-serif;color:var(--yellow);border:4px solid var(--yellow);padding:8px 0;transform:rotate(-5deg);margin:25px 0}.win-stats{display:flex;justify-content:space-around;border-top:1px solid var(--line);border-bottom:1px solid var(--line);padding:22px 0;margin-top:24px}.win-stats strong{font:29px/1.5 'Courier New',monospace}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
@media(min-width:1400px){.page-shell{max-width:1330px}.game-layout{grid-template-columns:minmax(0,1fr) 320px;gap:50px}.card{aspect-ratio:1.3}.card-back svg{width:35px;height:35px}.card-back .card-back-label{font-size:9px}}
@media(max-width:1000px){.page-shell{padding:0 26px}.game-layout{gap:25px;grid-template-columns:minmax(0,1fr) 260px}.dossier{padding:19px}.heading-row{padding-top:25px}h1{font-size:30px}.card{aspect-ratio:1}.board{gap:8px}.board-frame{padding:0 12px}.frame-heading{font-size:9px}.frame-heading #board-status{display:none}.card-back .card-back-label{font-size:7px;letter-spacing:1px}.card-back svg{width:27px;height:27px}.card-front .object-name{font-size:8px}.mission h2{font-size:20px}}
@media(max-width:760px){.page-shell{max-width:580px;padding:0 18px}.topbar{height:83px;gap:8px}.brand{gap:9px;font-size:14px;letter-spacing:.4px}.brand small{font-size:8px;letter-spacing:.4px}.brand-mark{width:34px;height:39px}.brand-mark svg{width:22px;height:22px}.header-actions{gap:0}.text-button{font-size:0;min-width:39px;padding:0;gap:0}.icon-button{min-width:39px;padding:0}.help-circle{font-size:12px}.heading-row{padding:23px 0 20px}.heading-row .eyebrow{font-size:9px;letter-spacing:1px;margin-bottom:10px}.heading-row h1{font-size:clamp(21px,5.5vw,31px);letter-spacing:.3px}.edition-label{display:none}.game-layout{display:flex;flex-direction:column;gap:17px}.game-sidebar{display:contents}.dossier{order:-1;width:100%;padding:15px 17px;display:grid;grid-template-columns:1fr auto;gap:10px 18px}.dossier-top{display:none}.pairs-count{margin:0;gap:7px;grid-column:1}.pairs-count>strong{font-size:36px}.pairs-count>span{font-size:17px}.pairs-count small{font-size:8px;margin-top:5px;letter-spacing:.7px}.pairs-count>svg{display:none}.progress-slots{grid-column:1;margin:0;gap:4px;max-width:150px}.progress-slots span{height:3px}.stats{grid-column:2;grid-row:1 / 3;margin:0;padding:0;border:0;gap:18px;align-items:center;grid-template-columns:1fr 1fr}.stats>div+div{padding-left:18px}.stats span{font-size:8px;letter-spacing:.4px}.stats strong{font-size:22px;line-height:1.5}.dossier>.primary-button{display:none}.board-section{width:100%}.board-frame{padding:0 12px}.board{gap:8px}.card{aspect-ratio:.97}.card-back svg{width:28px;height:28px}.card-back .card-back-label{font-size:7px}.card-back::after{height:8px;bottom:9px}.card-number{font-size:8px;left:9px;top:8px}.frame-heading{min-height:34px;font-size:9px}.frame-heading #board-status{display:block;font-size:8px;letter-spacing:.6px}.frame-footer{min-height:31px;font-size:8px;letter-spacing:.7px}.mini-stripes{height:6px;width:65px}.board-hint{font-size:12px;margin:13px 0 0}.mission{display:none}.system-status{font-size:9px;align-self:center}.page-footer{font-size:8px;justify-content:center;text-align:center;margin-top:22px;padding:22px 0}.page-footer>span+span{display:none}.mobile-restart{display:flex!important;width:auto!important;justify-content:center!important;margin:0 auto;background:transparent;color:var(--yellow);border-color:#7a703e;min-height:42px}.card-front .object-name{font-size:7px;bottom:5px}.card-front img{width:80%;height:76%}dialog{padding:30px 24px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{transition:none!important;animation:none!important}dialog::backdrop{backdrop-filter:none}}
/* Readable labels, compact desktops, and reduced-motion resets. */
[hidden]{display:none!important}.mobile-restart{display:none}.resetting .card-inner{transition:none!important}.update-button{display:block;margin:18px auto;padding:12px 16px;border:1px solid var(--yellow);background:#171a19;color:var(--yellow);font-size:14px}
.brand small{font-size:12px;letter-spacing:.5px}.edition-label>span{font-size:12px}.frame-heading{font-size:12px;letter-spacing:.65px}#board-status{font-size:10px}.frame-footer{font-size:10px}.card-back .card-back-label{font-size:9px;letter-spacing:1px}.card-front .object-name{font-size:12px;letter-spacing:0}.dossier-top .eyebrow{font-size:12px;letter-spacing:.5px}.stamp-small{font-size:10px}.pairs-count small{font-size:12px;letter-spacing:.5px}.stats span,.win-stats span{font-size:12px;letter-spacing:.5px}.mission p{font-size:16px}.mission .eyebrow{font-size:12px}.mission-note{font-size:14px}.system-status{font-size:12px}.board-hint{font-size:14px}.page-footer{font-size:11px;letter-spacing:.6px}
@media(min-width:761px) and (max-height:900px){.page-shell{max-width:1160px}.topbar{height:82px}.heading-row{padding:24px 0}.card{aspect-ratio:1.3}.game-layout{gap:30px}.mission{padding-top:20px}.mission-note{display:none}.page-footer{margin-top:20px;padding:20px 0}}
@media(max-width:1000px){.dossier-top{flex-wrap:wrap}.brand small{font-size:10px}.card-back .card-back-label{font-size:8px}.card-front .object-name{font-size:10px}.frame-heading{font-size:10px}.stats span{font-size:10px}}
@media(max-width:760px){.mobile-restart{display:flex}.brand small{font-size:8px}.heading-row .eyebrow{font-size:10px;letter-spacing:.5px}.frame-heading{font-size:10px}.card-back .card-back-label{font-size:7px;letter-spacing:.4px}.card-front .object-name{display:none}.pairs-count small{font-size:10px;letter-spacing:0}.stats span{font-size:10px}.board-hint{font-size:13px}.page-footer{font-size:10px}.system-status{font-size:12px}}
@media(max-width:370px){.page-shell{padding:0 12px}.brand{font-size:12px}.brand small{font-size:7px}.brand-mark{width:28px;height:33px}.header-actions .icon-button,.header-actions .text-button{min-width:34px}.dossier{padding:13px;gap:10px}.stats{gap:12px}.stats>div+div{padding-left:12px}.stats span{font-size:9px}.pairs-count small{font-size:9px}.heading-row h1{font-size:21px}.heading-row .eyebrow{font-size:9px}.card-number{font-size:8px}.card-back .card-back-label{display:none}.frame-heading #board-status{font-size:7px}.win-dialog h2{font-size:56px}}
/* About, creator details, and privacy share a readable information surface. */
.footer-links{display:flex;gap:24px;align-items:center;flex-wrap:wrap}
.footer-links a,.creator-credit a,.info-content a,.info-topbar a,.info-dialog-nav a{color:var(--yellow);text-decoration:none;text-underline-offset:4px}
.footer-links a:hover,.creator-credit a:hover,.info-content a:hover,.info-topbar a:hover,.info-dialog-nav a:hover{text-decoration:underline}
.page-footer{flex-wrap:wrap;align-items:center;row-gap:12px}.footer-links{font:14px/1.5 Arial,Helvetica,sans-serif;letter-spacing:0}.page-footer .creator-credit{font-size:12px;letter-spacing:0;display:block}
.info-shell{max-width:850px;margin:0 auto;padding:0 28px}.info-topbar{min-height:88px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:20px;font-size:14px}.info-topbar nav{display:flex;gap:22px}.info-topbar a{display:inline-flex;align-items:center;min-height:44px}.info-topbar a[aria-current]{color:var(--paper);text-decoration:underline}.back-to-game{white-space:nowrap}
.info-content{font-size:1rem;line-height:1.75}.info-shell>.info-content{margin:32px 0;padding:36px 42px;background:#181e1beF;border:1px solid #4a5147;box-shadow:0 16px 60px #0004}.info-content .eyebrow{font-size:.75rem;line-height:1.6;color:var(--yellow)}.info-content h1{font-family:Arial,Helvetica,sans-serif;font-size:clamp(1.55rem,4.5vw,2rem);font-weight:700;line-height:1.25;letter-spacing:-.6px;margin:0 0 12px;color:var(--paper)}.info-content h1:focus{outline:none}.info-content section{margin-top:30px}.info-content h2{font-size:1.2rem;line-height:1.4;margin:0 0 12px;font-weight:700;letter-spacing:0;color:var(--paper)}.info-content p,.info-content li,.info-content dd{font-size:1rem;line-height:1.75;color:#c3c9be}.info-content p{margin:10px 0}.info-content ul{padding-left:22px;margin:10px 0}.info-content li{padding:4px 0 4px 5px}.info-content li::marker{color:var(--yellow)}.about-identity{display:flex;align-items:center;justify-content:center;gap:20px;padding:32px 0;border-bottom:1px solid var(--line);margin-bottom:30px}.about-identity img{border-radius:16px;width:80px;height:80px}.about-identity strong{display:block;font:1.7rem/1.2 Impact,'Arial Narrow',sans-serif;letter-spacing:1px}.about-identity span{display:block;color:#aeb7a5;font:11px/1.5 'Courier New',monospace;letter-spacing:2px;margin-top:6px}.creator-section{border-left:3px solid var(--yellow);padding:5px 0 5px 20px}.creator-section h2{margin-bottom:6px}.creator-section .eyebrow{margin:0 0 7px}.contact-list{margin:18px 0}.contact-list>div{display:flex;gap:18px;align-items:baseline;padding:5px 0}.contact-list dt{color:#aeb7a5;min-width:94px}.contact-list dd{margin:0}.info-content a{overflow-wrap:anywhere}.info-content .info-note,.info-content .info-updated{font-size:.875rem;color:#aeb7a5}.privacy-summary{background:#30302099;border:1px solid #a794444f;border-radius:4px;padding:23px 25px}.privacy-summary h2{color:var(--yellow)}.privacy-summary .inline-link{display:inline-flex;gap:16px;font-size:.9375rem;padding:6px 0}.privacy-intro{margin:28px 0}.privacy-intro p{margin:0}.privacy-details{margin:0}.privacy-details>div{padding:16px 0;border-bottom:1px solid var(--line)}.privacy-details dt{font-weight:700;color:#e9e6dc}.privacy-details dd{margin:8px 0 0}.info-page-footer{padding:0 0 30px;display:flex;justify-content:space-between;gap:20px;font-size:12px;color:#abb3a3}
.info-dialog{width:min(760px,calc(100% - 32px));max-height:90svh;padding:36px 38px 22px;scrollbar-color:#6c724f #1b211b;overscroll-behavior:contain}.info-dialog .info-content{padding-top:8px}.info-dialog .info-content>h1{padding-right:36px;margin-top:0}.info-dialog .info-content>.eyebrow{padding-right:40px}.info-close{width:44px;height:44px;border:1px solid #878b68;border-radius:50%;top:17px;right:17px;background:#242b23;line-height:1}.info-close:hover{border-color:var(--yellow);color:var(--yellow)}.info-dialog-nav{display:flex;align-items:center;gap:20px;border-top:1px solid var(--line);padding-top:24px;margin-top:30px;font-size:14px;flex-wrap:wrap}.info-dialog-nav a{padding:8px 0}.info-dialog-nav button{margin-left:auto}.info-dialog .info-content ol,.info-dialog .info-content ul{padding-left:22px}
@media(max-width:760px){.page-footer{gap:13px;flex-direction:column}.footer-links{justify-content:center}.page-footer .creator-credit{display:block;font-size:12px}.info-shell{padding:0 16px}.info-topbar{font-size:13px;gap:8px;min-height:76px}.info-topbar nav{gap:14px}.info-shell>.info-content{padding:26px 23px;margin:23px 0}.info-dialog{padding:30px 23px 22px;width:calc(100% - 24px);max-height:92svh}.info-dialog .info-content>h1{padding-right:24px}.info-close{right:10px;top:10px}.about-identity{gap:13px}.about-identity img{width:64px;height:64px;border-radius:12px}.about-identity strong{font-size:1.45rem}.about-identity span{font-size:10px;letter-spacing:1px}.privacy-summary{padding:18px}.info-content section{margin-top:26px}.contact-list>div{flex-direction:column;gap:0;padding:7px 0}.contact-list dt{font-size:.875rem}.info-dialog-nav{gap:18px}.info-dialog-nav button{width:100%;margin-left:0}.info-page-footer{font-size:11px;flex-wrap:wrap}.info-content .creator-section{padding-left:15px}}
/* Device-local completed-game history. */
.board-tools{display:flex;justify-content:center;margin:13px 0 0}.history-button{display:inline-flex;align-items:center;justify-content:center;gap:9px;min-height:44px;background:transparent;color:var(--yellow);border:1px solid #8b803855;padding:9px 14px;font-size:14px}.history-button:hover{background:#f2c23012;border-color:#b49b4a}.history-button>svg{width:18px;height:18px}.history-button>span{font:12px/1.4 'Courier New',monospace;background:#f2c2301c;padding:1px 6px;border-radius:3px;color:var(--paper)}.history-dialog{width:min(580px,calc(100% - 28px));padding:32px;max-height:88svh;scrollbar-color:#6c724f #1b211b;overscroll-behavior:contain}.history-dialog h2{margin-bottom:12px;padding-right:20px}.history-dialog>p{font-size:15px}.history-dialog .history-summary{font-size:12px;color:#bec5b4;margin-top:22px;border-bottom:1px solid var(--line);padding-bottom:14px}.history-table{width:100%;border-collapse:collapse;font-size:14px;font-variant-numeric:tabular-nums}.history-table th{text-align:left;color:#c5bb85;font-weight:400;font-size:12px;letter-spacing:.4px;padding:12px 8px}.history-table td{padding:13px 8px;border-top:1px solid var(--line);color:#e9e6dc}.history-table th:first-child,.history-table td:first-child{padding-left:0}.history-table th:not(:first-child),.history-table td:not(:first-child){text-align:right;white-space:nowrap}.history-table time span,.history-table time small{display:block}.history-table time small{font-size:12px;color:#aeb7a5;margin-top:5px}.history-empty{text-align:center;padding:25px 8px}.history-empty>svg{width:34px;height:34px;color:var(--yellow)}.history-empty h3{font-size:18px;margin:18px 0 8px}.history-empty p{margin:0;font-size:14px}.history-dialog .history-local-note{font-size:12px;color:#aeb7a5;margin:22px 0}.history-return{width:100%}.history-dialog .history-notice{color:var(--yellow);background:#f2c2300b;border-left:2px solid var(--yellow);padding:12px;font-size:14px}.win-dialog .history-save-status{font-size:13px;min-height:22px;margin:18px 0 7px}.win-dialog .history-button{border:0}.win-dialog .primary-button{margin-top:12px}@media(max-width:760px){.history-dialog{padding:27px 22px}.board-tools{margin-top:10px}.history-table{font-size:13px}.history-table th,.history-table td{padding-right:5px;padding-left:5px}}

/* Background music stays separate from sound effects. */
.board-tools{gap:10px;flex-wrap:wrap}.music-button{display:inline-flex;align-items:center;justify-content:center;gap:9px;min-height:44px;padding:9px 14px;border:1px solid #8b803855;background:transparent;color:#bfc7b6;font:14px Arial,Helvetica,sans-serif}.music-button svg{width:18px;height:18px}.music-button:hover{border-color:#b49b4a;background:#f2c23012}.music-button[aria-pressed="true"]{color:var(--yellow);border-color:#a58e3e;background:#f2c2300d}.music-status{text-align:center;font-size:12px;line-height:1.6;color:#b3bea8;margin:10px 0 0}.music-button:focus-visible{outline:2px solid var(--yellow);outline-offset:4px}
/* Fullscreen play keeps the current board and only essential controls. */
.fullscreen-entry{display:flex;justify-content:center;margin-top:8px}.fullscreen-button{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:8px 14px;min-height:44px;border:0;background:transparent;color:#bac3b1;font-size:14px}.fullscreen-button:hover{color:var(--yellow)}.fullscreen-button svg{width:18px;height:18px}
.focus-toolbar{display:flex;align-items:center;justify-content:space-between;gap:20px;width:100%;max-width:1200px;margin:0 auto 14px;padding-bottom:12px;border-bottom:1px solid var(--line);flex-shrink:0}.focus-stats{display:flex;align-items:center;gap:32px}.focus-stats>div>span{display:block;font-size:12px;line-height:1.5;color:#aeb7a5}.focus-stats strong{display:block;font:24px/1.4 'Courier New',monospace;font-variant-numeric:tabular-nums;color:var(--paper)}.focus-stats small{font:14px 'Courier New',monospace;color:#aeb7a5}.focus-actions{display:flex;gap:8px;align-items:center}.focus-actions .icon-button{border:1px solid #ffffff24;min-width:44px;min-height:44px;padding:10px;gap:9px}.focus-actions .focus-exit{color:var(--yellow);border-color:#a58e3e;font-size:14px}.focus-actions [aria-pressed="true"]{color:var(--yellow);background:#f2c23015;border-color:#a58e3e}
html.is-focus{overflow:hidden}.focus-mode{height:100dvh;min-height:0;overflow:hidden;background:#111713}.focus-mode .page-shell{width:100%;max-width:none;height:100%;padding:max(14px,env(safe-area-inset-top)) max(18px,env(safe-area-inset-right)) max(14px,env(safe-area-inset-bottom)) max(18px,env(safe-area-inset-left))}.focus-mode main{display:flex;flex-direction:column;height:100%;min-height:0}.focus-mode .topbar,.focus-mode .heading-row,.focus-mode .page-footer,.focus-mode .game-sidebar,.focus-mode .mobile-restart,.focus-mode .frame-heading,.focus-mode .frame-footer,.focus-mode .board-hint,.focus-mode .board-tools,.focus-mode .fullscreen-entry,.focus-mode .music-status,.focus-mode .update-button{display:none!important}.focus-mode .game-layout{display:flex;align-items:center;justify-content:center;flex:1;min-height:0;gap:0}.focus-mode .board-section{display:flex;align-items:center;justify-content:center;width:min(100%,1200px);height:100%;min-height:0;container-type:size}.focus-mode .board-frame{width:min(100%,calc((100dvh - 130px) * 1.2));aspect-ratio:1.2;padding:10px;border:1px solid #444c3f;background:#181f19;box-shadow:0 10px 50px #0005}.focus-mode .board-frame::before,.focus-mode .board-frame::after{display:none}.focus-mode .board{width:100%;height:100%;grid-template-rows:repeat(4,minmax(0,1fr));gap:10px}.focus-mode .card{aspect-ratio:auto;min-height:0;min-width:0}.focus-mode .card-back .card-back-label{display:none}.focus-mode .card-back svg{width:clamp(24px,5vh,46px);height:clamp(24px,5vh,46px);margin:0}.focus-mode .card-front .object-name{display:none}.focus-mode .card-front img{width:88%;height:88%}.focus-mode .card-number{font-size:11px}.focus-mode .card-back::after{height:7px;bottom:8px}.focus-mode dialog{max-height:calc(100dvh - 24px)}
@supports(width:1cqw){.focus-mode .board-frame{width:min(100cqw,calc(100cqh * 1.2));max-height:100%}}
@media(max-width:600px){.focus-mode .page-shell{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))}.focus-toolbar{gap:8px;margin-bottom:10px;padding-bottom:10px}.focus-stats{gap:14px}.focus-stats strong{font-size:19px}.focus-stats small{font-size:12px}.focus-actions{gap:4px}.focus-exit span{display:none}.focus-mode .board-frame{padding:6px;aspect-ratio:0.9;width:min(100%,calc((100dvh - 100px) * .9))}.focus-mode .board{gap:7px}@supports(width:1cqw){.focus-mode .board-frame{width:min(100cqw,calc(100cqh * .9))}}}
@media(max-height:500px) and (orientation:landscape){.focus-toolbar{margin-bottom:8px;padding-bottom:6px}.focus-stats{gap:24px}.focus-stats>div{display:flex;align-items:baseline;gap:7px}.focus-stats strong{font-size:19px}.focus-mode .board-frame{aspect-ratio:1.65;width:min(100%,calc((100dvh - 82px) * 1.65));padding:5px}.focus-mode .board{gap:6px}.focus-mode .card-back::after{height:4px;bottom:4px}.focus-mode .card-back svg{width:24px;height:24px}.focus-mode .card-number{font-size:9px;top:5px;left:6px}.focus-mode .rivet{top:5px;right:5px}@supports(width:1cqw){.focus-mode .board-frame{width:min(100cqw,calc(100cqh * 1.65))}}}
/* Shared-device players: one name per round, retained with each result. */
.player-dialog{width:min(480px,calc(100% - 28px))}.player-dialog h2{margin-bottom:14px}.player-dialog p{font-size:16px}.player-dialog label{display:block;color:var(--paper);font-size:14px;font-weight:700;margin:22px 0 9px}.player-dialog input{width:100%;min-height:48px;padding:12px 14px;border:1px solid #778269;border-radius:2px;background:#111713;color:var(--paper);font:16px/1.4 Arial,Helvetica,sans-serif}.player-dialog input::placeholder{color:#99a28f}.player-dialog input:focus-visible{outline:2px solid var(--yellow);outline-offset:3px}.player-dialog .player-name-error{color:#f5c27f;font-size:14px;margin:10px 0}.player-dialog .player-restart-warning{font-size:14px;color:#d6c389;border-left:2px solid var(--yellow);padding-left:12px;margin-top:20px}.player-dialog .dialog-actions .primary-button{margin-top:0}.current-player{font-size:13px;color:#aeb7a5;text-align:center;margin:16px 0 0;overflow-wrap:anywhere}.current-player strong{color:var(--paper);margin-left:6px}.current-player:not([hidden])+.board-hint{margin-top:7px}.focus-mode .current-player{display:none}.history-table{table-layout:fixed}.history-table th:first-child{width:58%}.history-player{display:block;font-size:14px;color:var(--paper);line-height:1.45;margin-bottom:7px;overflow-wrap:anywhere}.history-table time{font-size:12px;color:#aeb7a5}.history-table time small{margin-top:3px}.win-dialog #win-player-name{overflow-wrap:anywhere}

/* Keep mobile controls below the status bar and give each icon a clear touch target. */
@media (max-width: 760px) {
  .page-shell {
    padding-top: calc(env(safe-area-inset-top, 0px) + 32px);
    padding-left: max(18px, env(safe-area-inset-left, 0px));
    padding-right: max(18px, env(safe-area-inset-right, 0px));
  }
  .topbar { height: auto; min-height: 82px; padding: 8px 0 16px; gap: 10px; }
  .brand { min-width: 0; flex: 1; }
  .brand small { font-size: 7px; letter-spacing: .15px; white-space: nowrap; }
  .header-actions { flex-shrink: 0; gap: 6px; }
  .header-actions .icon-button,
  .header-actions .text-button {
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 0;
    border: 1px solid #c7c9b647;
    border-radius: 50%;
    background: #171d19d9;
  }
  .header-actions .help-circle { width: 22px; height: 22px; border: 0; font-size: 17px; }
}
@media (max-width: 370px) {
  .page-shell {
    padding-left: max(12px, env(safe-area-inset-left, 0px));
    padding-right: max(12px, env(safe-area-inset-right, 0px));
  }
  .brand small { display: none; }
  .topbar { gap: 5px; }
  .header-actions { gap: 3px; }
  .header-actions .icon-button,
  .header-actions .text-button { width: 42px; min-width: 42px; }
}

/* Keep card reveals responsive while leaving wrong pairs readable. */
.card-inner { transition-duration: .18s; }
.card.is-pending .card-back { border-color: var(--yellow); background: linear-gradient(135deg,#454735,#2d3328); box-shadow: inset 0 0 0 3px #171c17, 0 0 0 2px #f2c23066; }
.card.is-pending .card-back::after { opacity: 1; }
/* Pending server checks keep a stable face-down card, never a frozen mid-flip. */

.local-play-option { display: flex; align-items: flex-start; gap: 12px; margin: 16px 0; padding: 14px; border: 1px solid #69715f; background: #121914; cursor: pointer; }
.local-play-option:has(input:checked) { border-color: var(--yellow); background: #f2c23014; }
.local-play-option input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--yellow); flex: none; }
.local-play-option span { display: block; }
.local-play-option strong { display: block; font-size: 14px; color: var(--paper); }
.local-play-option small { display: block; margin-top: 4px; font-size: 12px; line-height: 1.4; color: #acb9a5; }

/* Round selection, pause, and the end of a timed escape. */
.time-options { border: 0; padding: 0; margin: 22px 0 0; min-width: 0; }
.time-options legend { color: var(--paper); font-size: 14px; font-weight: 700; padding: 0; margin-bottom: 10px; }
.time-option-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.player-dialog .time-option-grid label { display: block; position: relative; margin: 0; cursor: pointer; }
.player-dialog .time-option-grid input { position: absolute; width: 1px; height: 1px; min-height: 0; padding: 0; opacity: 0; }
.time-option-grid label span { display: flex; flex-direction: column; justify-content: center; min-height: 74px; padding: 9px 6px; border: 1px solid #69715f; background: #121914; text-align: center; line-height: 1.25; }
.time-option-grid label strong { color: var(--paper); font-size: 13px; }
.time-option-grid label small { color: #acb9a5; font-size: 11px; font-weight: 400; margin-top: 5px; }
.time-option-grid input:checked + span { border-color: var(--yellow); box-shadow: inset 0 0 0 1px var(--yellow); background: #f2c23014; }
.time-option-grid input:checked + span strong { color: var(--yellow); }
.time-option-grid input:focus-visible + span { outline: 2px solid var(--yellow); outline-offset: 3px; }
.board-control-button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 44px; padding: 9px 14px; border: 1px solid #8b803855; background: transparent; color: var(--paper); font-size: 14px; }
.board-control-button svg { width: 17px; height: 17px; }
.board-control-button:hover, .board-control-button[aria-pressed="true"] { color: var(--yellow); border-color: #b49b4a; background: #f2c23012; }
.board-control-button:disabled, .focus-actions .icon-button:disabled { opacity: .45; cursor: default; }
.pause-overlay { position: absolute; z-index: 3; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px; background: #111713f4; text-align: center; }
.pause-overlay > svg { width: 42px; height: 42px; color: var(--yellow); }
.pause-overlay h2 { margin: 18px 0 5px; font: 32px/1.1 Impact, 'Arial Narrow', sans-serif; letter-spacing: 1px; color: var(--yellow); }
.pause-overlay p { max-width: 260px; margin: 0 0 20px; color: #c0c8b8; font-size: 14px; line-height: 1.5; }
.pause-overlay .primary-button { min-width: 170px; }
.timeout-dialog { text-align: center; border-top: 5px solid var(--yellow); }
.timeout-dialog h2 { color: var(--yellow); font: 48px/1 Impact, 'Arial Narrow', sans-serif; letter-spacing: 1px; }
.timeout-dialog .primary-button { margin-top: 25px; }
@media (max-width: 760px) {
  .board-tools { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .board-tools > button, .board-tools .mobile-restart { width: 100%!important; min-height: 44px; margin: 0; padding: 8px 5px; font-size: 13px; }
  .board-tools .mobile-restart { display: flex!important; }
  .board-tools > button svg { width: 17px; height: 17px; }
  .time-option-grid label strong { font-size: 12px; }
  .time-option-grid label small { font-size: 10px; }
}

/* Twelve pairs use six columns on wide screens and four in portrait. */
.board { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.progress-slots { grid-template-columns: repeat(12, minmax(0, 1fr)); }
.focus-mode .board-frame { aspect-ratio: 1.5; width: min(100%, calc((100dvh - 130px) * 1.5)); }
.focus-mode .board { grid-template-columns: repeat(6, minmax(0, 1fr)); grid-template-rows: repeat(4, minmax(0, 1fr)); }
@supports (width: 1cqw) {
  .focus-mode .board-frame { width: min(100cqw, calc(100cqh * 1.5)); }
}
@media (max-width: 760px) {
  .board, .focus-mode .board { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .focus-mode .board { grid-template-rows: repeat(6, minmax(0, 1fr)); }
  .focus-mode .board-frame { aspect-ratio: .68; width: min(100%, calc((100dvh - 100px) * .68)); }
  .progress-slots { max-width: 180px; }
  @supports (width: 1cqw) {
    .focus-mode .board-frame { width: min(100cqw, calc(100cqh * .68)); }
  }
}
@media (max-height: 500px) and (orientation: landscape) {
  .focus-mode .board-frame { aspect-ratio: 1.65; width: min(100%, calc((100dvh - 82px) * 1.65)); }
  .focus-mode .board { grid-template-columns: repeat(6, minmax(0, 1fr)); grid-template-rows: repeat(4, minmax(0, 1fr)); }
  @supports (width: 1cqw) {
    .focus-mode .board-frame { width: min(100cqw, calc(100cqh * 1.65)); }
  }
}

/* A shorter escape uses the original four-by-four board. */
.board .card[hidden] { display: none; }
.board-compact .board { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.focus-mode.board-compact .board { grid-template-rows: repeat(4, minmax(0, 1fr)); }
.focus-mode.board-compact .board-frame { aspect-ratio: 1.2; width: min(100%, calc((100dvh - 130px) * 1.2)); }
.board-compact .progress-slots { grid-template-columns: repeat(8, minmax(0, 1fr)); }
@supports (width: 1cqw) {
  .focus-mode.board-compact .board-frame { width: min(100cqw, calc(100cqh * 1.2)); }
}
@media (max-height: 500px) and (orientation: landscape) {
  .focus-mode.board-compact .board-frame { width: min(100%, calc((100dvh - 82px) * 1.2)); }
  @supports (width: 1cqw) {
    .focus-mode.board-compact .board-frame { width: min(100cqw, calc(100cqh * 1.2)); }
  }
}
.board-size-options { margin-top: 14px; }
.board-size-options .time-option-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.board-size-options .time-option-grid label span { min-height: 58px; }
.history-table .history-board-size { display: block; color: #c9ba79; font-size: 11px; margin-top: 5px; }
/* Optional online play sits below the heading, away from mobile status bars. */
.online-strip{display:flex;align-items:center;justify-content:space-between;gap:18px;margin:-4px 0 25px;padding:15px 18px;background:#19201adf;border:1px solid #636b53;box-shadow:inset 3px 0 0 var(--yellow)}
.online-strip .eyebrow{display:block;margin:0 0 4px;font-size:10px;color:#b9b78b}
.online-strip strong{font-size:14px;font-weight:600;color:var(--paper)}
.online-actions{display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-end}
.online-actions .secondary-button{min-height:40px;padding:8px 12px;font-size:12px;white-space:nowrap}
.online-actions .secondary-button:hover,.account-actions .secondary-button:hover{border-color:var(--yellow);color:var(--yellow)}
.online-actions .secondary-button{gap:8px}
.online-actions .secondary-button svg{width:18px;height:18px;flex:none;stroke-width:1.8}
.online-actions .google-signin{background:#f4f5f2;border-color:#f4f5f2;color:#202621;box-shadow:0 2px 0 #0005}
.online-actions .google-signin:hover{background:#fff;border-color:#fff;color:#202621}
.footer-links a{display:inline-flex;align-items:center;gap:7px}
.footer-links svg{width:15px;height:15px;stroke-width:1.8}
.local-play-option strong{display:flex;align-items:center;gap:7px}
.local-play-option strong svg{width:17px;height:17px;color:var(--yellow);stroke-width:1.8}
.ranked-note{border-left:3px solid var(--yellow);padding:12px 14px;background:#f2c23012;color:#e6dbb0}
.account-actions{display:grid;gap:10px;margin-top:24px}.account-actions button{width:100%}
.danger-button{border-color:#d17668;color:#ffd5ce}.danger-button:hover{background:#7e302a;color:white;border-color:#e69788}
#delete-form label,.online-dialog label{display:block;margin:18px 0 7px;font-size:13px;font-weight:700}
#delete-form input,.online-dialog select{width:100%;min-height:45px;padding:10px 12px;border:1px solid #778269;background:#111713;color:var(--paper);font:16px Arial,Helvetica,sans-serif}
#delete-form .primary-button,#nickname-form .primary-button{width:100%;margin-top:18px}
#clear-device-history{width:100%;margin:0 0 10px;border-color:#936860;color:#e2a9a0}
.online-dialog{width:min(650px,calc(100% - 28px))}.online-dialog .history-table{margin-top:12px}
.online-dialog .history-table th:first-child{width:58%}.online-dialog .history-table td:first-child{overflow-wrap:anywhere}
.pager{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:20px}.pager span{font:12px 'Courier New',monospace;color:#c9c7ae}.pager button{min-height:38px;padding:8px 12px;font-size:12px}
.pager button:disabled,.online-actions button:disabled,.account-actions button:disabled{opacity:.48}
.focus-mode .online-strip{display:none!important}
@media(max-width:760px){.online-strip{display:block;margin:-5px 0 18px;padding:12px 14px}.online-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));margin-top:12px;justify-content:stretch}.online-actions .secondary-button{white-space:normal;padding:8px 6px;min-height:42px}.online-strip strong{font-size:12px}.online-dialog{padding:25px 18px}.online-dialog .history-table{font-size:12px}}
@media(max-width:760px){.online-actions #cloud-history-button:not([hidden]){grid-column:1/-1}}

.network-recovery{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;margin:12px 0}.network-recovery button{min-height:44px;font-size:12px}.network-recovery button:disabled{opacity:.5}

.focus-mode .network-recovery{display:none!important}
