:root{font-family:system-ui,-apple-system,'Segoe UI',sans-serif;color-scheme:dark;--bg:#0b1021;--pane:#161f36;--cyan:#56e6da;--gold:#ffd37a;--muted:#a8b4d0;--pink:#c17cff;--red:#ff798a;--border:#374361}*{box-sizing:border-box}body{margin:0;background:radial-gradient(ellipse at 50% -15%,#263471,#0b1021 55%);min-height:100dvh;color:#f2f5ff}button,input{font:inherit}button{cursor:pointer}button:disabled{opacity:.45;cursor:not-allowed}.shell{max-width:680px;min-height:100dvh;margin:auto;display:flex;flex-direction:column;padding:env(safe-area-inset-top) 16px env(safe-area-inset-bottom)}.top{display:flex;justify-content:space-between;align-items:center;gap:14px;padding:22px 3px 17px}.logo{display:flex;align-items:center;gap:8px;font-size:18px}.logo-icon{background:linear-gradient(145deg,#8b68e9,#30d0c6);display:grid;place-items:center;width:34px;height:34px;border-radius:11px;font-size:25px}.dot{border:1px solid #4a69a0;border-radius:20px;padding:3px 7px;font-size:9px;letter-spacing:2px;color:var(--cyan)}#app{flex:1}.card{background:linear-gradient(160deg,#1b2744,#151d31);border:1px solid var(--border);border-radius:21px;padding:22px;margin:13px 0;box-shadow:0 12px 40px #02030b38}.hero{padding:26px 20px;text-align:center;background:linear-gradient(160deg,#2c2252,#101c32);border-color:#5a4481}.hero-mark{font-size:58px}.hero h1{font-size:31px;margin:8px 0 2px}.eyebrow{text-transform:uppercase;color:var(--cyan);letter-spacing:2px;font-size:11px;font-weight:800}.sub,.muted{color:var(--muted)}p{line-height:1.6}.center{text-align:center}h2,h3{margin:0 0 12px}h2{font-size:23px}h3{font-size:18px}.btn{display:block;width:100%;border:0;border-radius:13px;padding:15px 16px;background:linear-gradient(95deg,#26bbb3,#5b79d4);color:#0a1225;font-weight:900;margin:10px 0;text-align:center;min-height:48px}.btn.secondary{background:#28324e;color:#f3f6ff;border:1px solid #4b5980}.btn.warn{background:#533044;color:#ffd5df;border:1px solid #80445d}.small-button{color:#d9e2ff;background:#252f4c;border:1px solid #435578;border-radius:10px;padding:8px 12px}.form-field{display:block;width:100%;padding:14px 13px;border-radius:12px;background:#0e182c;border:1px solid #455274;color:white;margin:8px 0 15px;outline-offset:2px}.field-label{color:#d7e3fb;font-size:14px}.stack{display:grid;gap:12px}.statline{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}.pill{background:#102b38;color:var(--cyan);border-radius:20px;padding:7px 12px;font-size:13px;font-weight:700}.points{color:var(--gold);font-weight:800;font-variant-numeric:tabular-nums}.gridstats{display:grid;grid-template-columns:repeat(3,1fr);gap:9px}.metric{background:#101a30;border:1px solid #34415c;border-radius:13px;padding:12px 5px;text-align:center}.metric strong{display:block;font-size:21px}.metric small{color:var(--muted)}.bar{height:10px;overflow:hidden;background:#303c5c;border-radius:15px}.bar>span{height:100%;display:block;background:linear-gradient(90deg,#35e6d2,#7d91ed);transition:width .25s}.q-options{display:grid;gap:10px;margin-top:16px}.option{display:flex;align-items:center;min-height:54px;text-align:start;gap:10px;border:1px solid #4b5d85;border-radius:13px;background:#192845;color:#f5f8ff;padding:14px;font-weight:700;white-space:normal}.option b{display:grid;place-items:center;background:#344766;border-radius:7px;min-width:30px;height:30px;color:var(--cyan)}.option:active{transform:scale(.98)}.versus{display:grid;grid-template-columns:1fr auto 1fr;gap:9px;align-items:center}.side{background:#101b32;border-radius:12px;padding:12px;min-width:0}.side strong{display:block;overflow-wrap:anywhere}.vs{font-style:italic;color:var(--gold);font-weight:900}.feedback{margin:14px 0;border:1px solid #477d70;border-radius:12px;background:#10382f;color:#bafbe7;padding:12px;font-weight:700}.feedback.bad{background:#381e31;color:#ffd1dd;border-color:#7f435a}.board{display:grid;gap:5px;margin:13px auto;max-width:410px;touch-action:manipulation}.cell{aspect-ratio:1;border:1px solid #4f6485;background:#233653;border-radius:8px;color:white;display:grid;place-items:center;font-size:clamp(14px,4vw,27px);min-width:0;padding:2px;position:relative}.cell.active{background:#137d83;border-color:#69e3db}.cell.goal{outline:2px solid #f4cb75}.cell.locked{background:#59304f}.cell.wall{opacity:.35}.cell small{position:absolute;bottom:1px;right:3px;font-size:10px}.tools{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;margin-top:13px}.tools button{border:1px solid #536284;border-radius:9px;padding:9px;background:#263654;color:#fff}.lights{display:flex;justify-content:center;gap:7px;margin:9px 0 17px}.lamp{display:inline-grid;place-items:center;border:1px solid #64748d;border-radius:10px;width:37px;height:35px}.lamp.on{background:#167e75;color:#b2fff5}.timer{color:var(--gold);font-weight:900;font-size:28px;font-variant-numeric:tabular-nums}.timer.urgent{color:#ff798a}.ranking{list-style:none;padding:0}.ranking li{padding:12px;display:flex;justify-content:space-between;gap:10px;border-bottom:1px solid #344461}.ranking li:last-child{border:0}.notice{background:#352744;border:1px solid #765589;border-radius:13px;padding:12px;line-height:1.5}footer{font-size:10px;color:#7486ab;letter-spacing:1.2px;text-align:center;padding:24px 10px 20px}#status{display:block;color:#e8b16b;margin-top:7px;letter-spacing:0}body[dir="ltr"] .option{text-align:left}a{color:var(--cyan)}@media(min-width:600px){.shell{padding-inline:28px}.card{padding:26px}}@media(prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}

.result-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.result-stats .metric{min-width:0}

/* v0.25: same-level ladder, personal record, queue timing */
.history-title{margin-top:20px}.inline-tools{margin:0}.inline-tools .small-button{min-height:40px}.ranking li span{overflow-wrap:anywhere}.result-stats{grid-template-columns:repeat(2,minmax(0,1fr))}@media(max-width:390px){.statline h3{flex-basis:100%}.inline-tools{width:100%;justify-content:flex-start}}

/* Phase 06: inclusive mobile-first polish, robust large-text and keyboard operation. */
:root{--focus:#ffe49a;--interactive:#213651}
html{-webkit-text-size-adjust:100%;text-size-adjust:100%;scroll-padding-top:12px}
body{overflow-wrap:anywhere;line-height:1.5}
.shell{width:100%;padding-inline:max(14px,env(safe-area-inset-left)) max(14px,env(safe-area-inset-right))}
.logo{min-width:0}.logo strong{overflow-wrap:anywhere}
.card{box-shadow:0 12px 36px #03081944}
.hero{background:radial-gradient(ellipse at 50% 0%,#342a64 0%,#162443 66%,#131d33 100%)}
button,input{touch-action:manipulation}button,.small-button,.tools button,.cell{min-height:44px;min-width:44px}
.btn{font-size:1rem;line-height:1.35}.tools button{padding:10px 12px}
.form-field:focus-visible,button:focus-visible,a:focus-visible,#puzzle-title:focus-visible{outline:3px solid var(--focus);outline-offset:3px}
.skip-link{position:absolute;z-index:100;inset-inline-start:12px;top:-100px;padding:12px 18px;color:#0b1021;background:#ffe49a;border-radius:10px;font-weight:700}
.skip-link:focus{top:max(12px,env(safe-area-inset-top))}
.sr-only{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.board{width:100%;max-width:min(100%,410px)}.cell{overflow:hidden;line-height:1;user-select:none;-webkit-user-select:none}
.option{line-height:1.45;overflow-wrap:anywhere}.option b{flex-shrink:0}
.versus{grid-template-columns:minmax(0,1fr) auto minmax(0,1fr)}.side{min-width:0}.side .points{overflow-wrap:anywhere}
.ranking li{align-items:baseline}.ranking li b{white-space:nowrap}
.bar[role=progressbar]{outline-offset:2px}
@media(max-width:360px){.top{gap:8px}.dot{display:none}.card{padding:16px}.hero h1{font-size:clamp(1.35rem,7vw,2rem)}.versus{gap:5px}.side{padding:9px}.gridstats{gap:6px}.metric strong{font-size:1.2rem}.cell{font-size:clamp(14px,4.2vw,24px)}.ranking li{padding-inline:5px}}
@media(min-width:800px){.shell{max-width:760px}.top{padding-top:30px}.hero{padding-block:34px}}
@media(prefers-contrast:more){:root{--muted:#e2e8fa;--border:#889bbe}.card,.option,.form-field,.side,.cell{border-color:#9baed3}.small-button,.btn.secondary{border-color:#d0ddf8}}
@media(prefers-reduced-motion:reduce){.option:active{transform:none}.bar>span{transition:none}}

/* Phase 06 final: invitation dialog + large interactive boards */
.room-dialog{width:min(calc(100vw - 32px),440px);max-height:min(85dvh,760px);overflow:auto;border:1px solid #6478a1;border-radius:22px;padding:24px;background:#18233e;color:#f6f7ff;box-shadow:0 28px 90px #02040dd9}
.room-dialog::backdrop{background:#050a19d9;backdrop-filter:blur(4px)}
.room-dialog .dialog-error{min-height:1.5em;color:#ffd2db;margin:0 0 8px;font-weight:700}
.room-dialog #room-code{direction:ltr;text-align:center;font-size:1.4rem;letter-spacing:.22em;text-transform:uppercase}
.room-dialog [aria-invalid=true]{border-color:#ff98a8;outline:2px solid #ff98a8}
.board-scroll{max-width:100%;overflow-x:auto;overscroll-behavior-inline:contain;scrollbar-color:#637a9c #172640;border-radius:14px}
.board-scroll:focus-visible{outline:3px solid var(--focus);outline-offset:1px}
.board-scroll .board{width:100%;max-width:none;min-width:calc(var(--board-cols) * 44px + (var(--board-cols) - 1) * 5px)}
@media(max-width:360px){.room-dialog{padding:16px}.room-dialog #room-code{font-size:1.1rem}}

.board-hint{font-size:.875rem;margin:6px 4px 14px}

/* Let metrics reflow into stacked cards when users enlarge system text. */
.gridstats{grid-template-columns:repeat(auto-fit,minmax(min(100%,6rem),1fr))}
.top{flex-wrap:wrap}.logo{flex:1 1 auto}.logo strong{white-space:nowrap;overflow-wrap:normal}
.top .small-button{flex-shrink:0;white-space:nowrap}
@media(max-width:400px){.top .dot{display:none}}

.board-viewport{width:100%;max-width:100%;overflow-x:auto;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch;border-radius:12px;scrollbar-width:thin}
.board-viewport:focus-visible{outline:3px solid var(--focus);outline-offset:2px}

/* UI/UX Wave 01: battle-first shared visual language (mobile-first and RTL-safe). */
:root{--bg:#0a1021;--pane:#151f35;--cyan:#62e6d5;--gold:#ffcf77;--muted:#bbc8e1;--pink:#b3a1ff;--red:#ff8a9b;--border:#445671;--focus:#ffe6a6;--surface-raised:#1c2b45}
body{background:radial-gradient(ellipse 100% 60% at 50% -8%,#213a61 0%,#0a1021 65%);color:#f6f9ff}
.shell{max-width:740px}.top{border-bottom:1px solid #42536a55;margin-bottom:8px}
.logo-icon{background:linear-gradient(145deg,#62e6d5,#8377e7);color:#0a1021;font-weight:900}
.card{background:linear-gradient(156deg,#192740,#111c31);border-color:#435570;border-radius:22px;box-shadow:0 12px 34px #03091a4f}
.hero{padding:25px 20px;background:linear-gradient(153deg,#203a5a,#12223c 65%,#11192f);border:1px solid #529d9f;text-align:start}
.hero-mark{font-size:48px;line-height:1.4}.hero h1{line-height:1.23;font-weight:900}
.hero .eyebrow{color:#a9f5e9}.hero-actions{display:grid;gap:6px;margin-top:20px}
.hero-actions .btn:first-child{font-size:1.08rem;min-height:58px;background:#62e6d5;box-shadow:0 8px 26px #46d3c231}
.hero-actions .btn.secondary{background:#263855;border:1px solid #67859c;color:#f6f9ff}
.hero .gridstats{margin:20px 0}.hero .metric{background:#0c1a30ad;border-color:#476782;padding:15px 5px}
.hero .metric strong{color:#fff;font-size:clamp(1.25rem,5vw,1.9rem)}
.bar{background:#35465e}.bar>span{background:linear-gradient(90deg,#62e6d5,#a7c2ff)}
.btn{border-radius:15px;background:#62e6d5;color:#071b26;min-height:52px;font-weight:850}
.btn.secondary{border-color:#526986;background:#253851}.btn.warn{background:#3d2636}
.btn:focus-visible,.small-button:focus-visible,.option:focus-visible,.cell:focus-visible{outline:3px solid var(--focus);outline-offset:3px}
.battle-hud{margin:14px 2px 8px;gap:8px}.battle-hud .pill{background:#163748;border:1px solid #386b7f;min-height:44px;display:flex;align-items:center}
.battle-hud .timer{background:#29354b;border:1px solid #786546;border-radius:13px;padding:5px 13px;font-size:1.65rem}
.battle-hud .timer.urgent{border-color:#b05b75;background:#43253d}
.battle-scorecard{padding:16px;margin-top:8px}.battle-scorecard .side{border:1px solid #3e5675;background:#102239;padding:13px}
.battle-scorecard .vs{font-size:1.1rem;background:#223651;border-radius:999px;padding:8px}
.battle-puzzle{border-color:#6379a1}.battle-puzzle h2{font-size:clamp(1.15rem,4.4vw,1.5rem);line-height:1.5}
.option{background:#1c2b45;border-color:#5b708f;padding:14px 15px;min-height:60px;transition:background-color .15s,border-color .15s,transform .12s}
.option:hover:not(:disabled){background:#263d5b;border-color:#62e6d5}
.option b{background:#174052;color:#9cfff1;min-width:36px;height:36px;border-radius:10px}
.option:disabled{opacity:.62}.feedback{border-width:2px}.form-field{border-color:#526987}
@media(max-width:360px){.hero{padding:18px 15px}.battle-hud .pill{padding:6px 9px;font-size:12px}.battle-scorecard{padding:12px}}
@media(prefers-reduced-motion:reduce){.option{transition:none}.hero-actions .btn:first-child{box-shadow:none}}

.account-actions{display:flex;justify-content:flex-end;margin:0 4px 18px}.account-actions .btn{width:auto;min-height:44px;margin:0;padding-inline:19px;font-size:.92rem;background:transparent;border-color:#526987;color:#d1daef}


/* UI/UX Wave 02 — battle journey, visual feedback and stable keyboard focus. */
.battle-state{text-align:center;display:flex;flex-direction:column;align-items:center;gap:10px;padding-block:35px}
.battle-state .battle-state-icon{display:grid;place-items:center;width:86px;height:86px;border-radius:26px;background:#1b4561;color:var(--cyan);font-size:44px;font-weight:900;border:1px solid #547a92}
.battle-state h2{margin:4px 0;font-size:clamp(1.2rem,5vw,1.8rem)}
.battle-state p{max-width:36ch}.battle-state .invite-code{font-variant-numeric:tabular-nums;letter-spacing:.23em;overflow-wrap:anywhere;color:var(--gold)}
.queue-counter{background:#102b3e;padding:9px 16px;border-radius:999px;border:1px solid #467287;font-variant-numeric:tabular-nums}
.loading-rail{height:5px;width:min(100%,260px);border-radius:30px;overflow:hidden;background:#304359;margin-top:8px}
.loading-rail span{display:block;width:38%;height:100%;border-radius:30px;background:var(--cyan);animation:arena-scan 1.5s ease-in-out infinite alternate}
@keyframes arena-scan{from{transform:translateX(0)}to{transform:translateX(165%)}}
.answer-pending{display:flex;align-items:center;gap:12px;margin-top:16px;padding:18px;border:1px solid #64869a;background:#133747;color:#defffa;border-radius:15px;font-weight:800;line-height:1.5;min-height:62px}
.pending-pulse{display:block;flex:0 0 18px;height:18px;border:3px solid #70e5d7;border-top-color:transparent;border-radius:50%;animation:arena-spin .8s linear infinite}
@keyframes arena-spin{to{transform:rotate(360deg)}}
#rival-progress-value{font-variant-numeric:tabular-nums}
.battle-puzzle .center.muted{padding:20px 8px}
@media(prefers-reduced-motion:reduce){.pending-pulse,.loading-rail span{animation:none}}

.opponent-connection{margin-top:12px;border:1px solid #518d86;background:#17443b;color:#d4fff0;border-radius:12px;padding:11px 13px;font-weight:750;line-height:1.5}
.opponent-connection.is-offline{border-color:#bb7080;background:#422838;color:#ffe2ea}
.opponent-connection[hidden]{display:none!important}

/* UI/UX Wave 03 — accurate dense-grid touch targets and focused ranking. */
.board-scroll .board{min-width:calc(var(--board-cols) * 48px + (var(--board-cols) - 1) * 5px)}
.board-scroll.board-zoomed .board{min-width:calc(var(--board-cols) * 64px + (var(--board-cols) - 1) * 5px)}
.board-scroll .cell{min-width:48px;min-height:48px}
.board-scroll.board-zoomed .cell{min-width:64px;min-height:64px}
.board-zoom-controls{display:flex;align-items:center;gap:12px;justify-content:space-between;flex-wrap:wrap;margin:10px 0 16px}
.board-zoom-controls .board-hint{flex:1 1 190px;line-height:1.5;margin:0}
.board-zoom-controls .small-button{flex-shrink:0;min-height:44px}
.rank-entry{transition:background-color 130ms ease}
.rank-entry.rank-top{background:linear-gradient(90deg,#ffd67a18,transparent);border-radius:10px}
.rank-entry.rank-me{border-inline-start:4px solid var(--cyan);background:#163c41;color:#f1fffd}
.rank-entry .points{font-variant-numeric:tabular-nums}
@media(max-width:360px){.board-zoom-controls .board-hint{font-size:.85rem}.board-zoom-controls .small-button{width:100%}}
@media(prefers-reduced-motion:reduce){.rank-entry{transition:none}}

/* Wave 04: server-backed profile with accessible, responsive progress surfaces. */
.profile-header{text-align:center;background:linear-gradient(160deg,#26264b,#131e36);border-color:#59668c}
.profile-header h1{margin:10px 0 4px}
.profile-avatar{width:72px;height:72px;display:grid;place-items:center;border-radius:20px;background:#263f55;border:1px solid #52778e;margin:12px auto;font-size:37px}
.profile-name{font-weight:800;font-size:19px;overflow-wrap:anywhere}
.profile-progress-note{margin:8px 0 0;color:var(--muted);font-size:13px}
.profile-reward-count{font-size:28px;font-variant-numeric:tabular-nums;color:var(--gold);font-weight:900;margin:0}
.achievements{display:grid;gap:11px}.achievement{padding:15px;border:1px solid #455479;border-radius:15px;background:#151e35}
.achievement-complete{border-color:#927644;background:#29263b}
.achievement-title{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px;margin-bottom:12px}
.achievement-title span{font-size:12px;color:var(--muted)}.achievement-complete .achievement-title span{color:#ffd37a}
.achievement small{display:block;text-align:end;margin-top:8px}
.profile-history{padding:0;list-style:none}.profile-history-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:7px;padding:13px 0;border-bottom:1px solid #344461}
.profile-history-row div{overflow-wrap:anywhere}.profile-history-row strong{grid-column:2;grid-row:1/3;align-self:center;white-space:nowrap}
#profile-actions .btn{margin-bottom:20px}
:focus-visible{outline:3px solid #ffd37a;outline-offset:3px}
@media(max-width:360px){.profile-header .gridstats{gap:6px}.profile-header .metric{padding:11px 4px}.profile-header .metric strong{font-size:19px}}
@media(prefers-reduced-motion:reduce){.achievement .bar span,.profile-header .bar span{transition:none!important}}


/* UI/UX Wave 05 — settlement hierarchy and restrained, accessible motion. */
.result-hero{position:relative;overflow:hidden;border-color:#7485ac;padding-block:26px 30px;isolation:isolate}
.result-hero[data-outcome="win"]{border-color:#9b8144;background:radial-gradient(ellipse at 50% 0%,#534122 0%,#192940 60%,#151d32 100%)}
.result-hero[data-outcome="draw"]{border-color:#4b9eae;background:radial-gradient(ellipse at 50% 0%,#184b55 0%,#192940 65%,#151d32 100%)}
.result-hero[data-outcome="loss"]{border-color:#8270b1;background:radial-gradient(ellipse at 50% 0%,#34264d 0%,#19253f 65%,#151d32 100%)}
.result-hero[data-outcome="unknown"]{border-color:#7485ac}
.result-emblem{margin:0 auto 14px;display:grid;place-items:center;width:100px;height:100px;border-radius:50%;font-size:51px;background:#fff1;border:1px solid #ffffff35;animation:arena-reveal .44s cubic-bezier(.2,.8,.2,1) both;transform-origin:center}
.result-hero h1{font-size:clamp(1.4rem,6vw,2.05rem);line-height:1.25}
.result-integrity{font-size:.84rem;margin:9px auto 18px;max-width:32ch}
.result-stats{grid-template-columns:repeat(2,minmax(0,1fr))}
.result-stats .metric:last-child:nth-child(odd){grid-column:1 / -1}
.result-stats .metric{padding-block:18px;animation:arena-rise .36s .12s ease-out both}
.result-stats .metric strong{font-size:clamp(1.25rem,5vw,1.8rem);font-variant-numeric:tabular-nums}
.result-reason{font-size:.88rem}
.promotion-notice{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:3px 12px;text-align:start;background:#113b39;border:1px solid #4ec6b1;border-radius:15px;padding:15px;margin-top:16px;animation:arena-rise .4s .25s ease-out both}
.promotion-notice>span:first-child{grid-row:span 2;font-size:2rem;color:var(--cyan)}
.promotion-notice strong{color:#d2fff4}
.promotion-notice span:last-child{font-size:.86rem;color:#d0eee7}
#result-title:focus-visible{outline:3px solid var(--focus);outline-offset:4px;border-radius:5px}
@keyframes arena-reveal{from{opacity:0;transform:translateY(8px) scale(.94)}to{opacity:1;transform:translateY(0) scale(1)}}
@keyframes arena-rise{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}
@media(prefers-reduced-motion:reduce){.result-emblem,.result-stats .metric,.promotion-notice{animation:none!important;transition:none!important}}
@media(max-width:360px){.result-hero{padding-inline:15px}.result-emblem{width:82px;height:82px;font-size:44px}.result-stats .metric{padding:12px 5px}}


/* Wave 06 — isolated account security settings: no gamified destructive actions. */
.settings-hero{border-color:#468d8b;background:linear-gradient(145deg,#183c49,#161e33)}
.settings-hero h1{font-size:clamp(1.3rem,5vw,1.9rem);margin-block:7px 10px}
.settings-form{display:grid;gap:10px;margin-top:16px}
.settings-form .form-field{width:100%;min-height:50px;box-sizing:border-box}
.settings-form .btn{margin-top:10px}
.settings-danger{border-color:#8e556a;background:linear-gradient(145deg,#342235,#151d31)}
.settings-danger .btn.warn{background:#5c2b3c;color:#ffe6ea;border:1px solid #bd7086}
.form-error{min-height:1.25em;color:#ffb6c6;font-weight:750;line-height:1.5;overflow-wrap:anywhere}
.settings-form button:disabled{opacity:.55;cursor:not-allowed}
#settings-actions{display:flex;gap:8px;flex-wrap:wrap}
#settings-actions .btn{flex:1 1 170px}
#settings-heading:focus-visible{outline:3px solid var(--focus);outline-offset:3px}
@media(max-width:360px){.settings-hero{padding:19px 15px}.settings-form{gap:8px}}
@media(prefers-reduced-motion:reduce){.settings-hero,.settings-form .btn{transition:none!important}}

/* UI/UX Wave 07 — keyboard discoverability, enhanced contrast and 200% text. */
.board-scroll:focus-visible{outline:3px solid var(--focus);outline-offset:4px;border-radius:12px}
.board .cell:focus-visible{outline:3px solid #ffe49a;outline-offset:0;z-index:2}
.board-zoom-controls .board-hint{line-height:1.7}
@media(max-width:359px){.top{flex-wrap:wrap}.logo{max-width:100%}.gridstats{gap:6px}.metric strong{font-size:clamp(16px,6vw,22px)}.hero-actions .btn{overflow-wrap:anywhere}}
@media(prefers-contrast:more){.option{border-width:2px}.cell{border-width:2px}.feedback,.notice{outline:1px solid currentColor}}
@media(forced-colors:active){.cell.active,.rank-entry.rank-me,.btn:focus-visible{outline:2px solid Highlight}.option,.btn{forced-color-adjust:auto}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;animation:none!important;transition:none!important}}


/* UI/UX Wave 08 — explicit entry verification and per-card recovery. */
.entry-check{min-height:280px;display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;gap:12px}
.entry-check p{max-width:44ch;line-height:1.7}
.entry-check .loading-rail{margin:10px auto 0}
.state-error{display:flex!important;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;background:#3b2b3d;border:1px solid #996d85;border-radius:13px;padding:12px!important;line-height:1.6}
.state-error .btn{min-height:44px;max-width:100%;width:auto;padding:9px 14px;font-size:.9rem}
#battle-record>.state-error{grid-column:1/-1}
#battle-record [role=status],#battle-history [role=status]{font-size:.95rem}
@media(max-width:360px){.state-error{align-items:stretch;flex-direction:column}.state-error .btn{width:100%}}
@media(prefers-reduced-motion:reduce){.entry-check .loading-rail span{animation:none}}

/* Admin Upgrade 02: player support cases accessible inside the Account Center. */
.support-case-card{padding:15px;border-radius:12px;border:1px solid #64728b;margin:10px 0;overflow-wrap:anywhere}.support-case-card p{white-space:pre-wrap;line-height:1.7}.support-case-card .btn{margin-top:10px}
#support-detail{min-height:90px}#support-create textarea{min-height:120px;resize:vertical}
