
:root{--night:#101a3a;--night2:#1d2c50;--midnight:#0d1630;--text:#f5f2e7;--muted:#bec8dd;--gold:#ffcd67;--cream:#fce8c3;--mint:#69eac6;--pink:#ff84bd;--outline:rgba(255,255,255,.14);--board-light:#f3dfb6;--board-dark:#a87e60;--board-edge:#4a3150;--shadow:0 18px 50px rgba(2,6,24,.3);font-family:'Trebuchet MS','Segoe UI',Arial,sans-serif;color-scheme:dark}
*{box-sizing:border-box}html,body{margin:0;min-height:100%;width:100%}body{background:radial-gradient(ellipse 60% 38% at 16% 7%,rgba(112,90,178,.31),transparent 70%),radial-gradient(ellipse 48% 55% at 95% 85%,rgba(11,127,135,.22),transparent 73%),linear-gradient(145deg,#101b40,#111a36 49%,#111532);color:var(--text);overflow-x:hidden}
button,select{font:inherit}button{cursor:pointer;-webkit-tap-highlight-color:transparent}button:focus-visible,select:focus-visible{outline:3px solid var(--mint);outline-offset:3px}button:disabled{opacity:.44;cursor:not-allowed;filter:grayscale(.3)}.page-wrap{position:relative;width:100%;max-width:1490px;margin:0 auto;padding:24px clamp(12px,2.35vw,34px) 23px;isolation:isolate}.page-wrap:before{content:'✦    ✧        ✦          ✧         ✦';white-space:nowrap;overflow:hidden;letter-spacing:clamp(13px,3.5vw,65px);position:absolute;left:3%;width:94%;top:13px;color:rgba(247,218,167,.26);font-size:14px;pointer-events:none;z-index:-1}.page-wrap:after{content:'';position:absolute;z-index:-1;inset:90px 2% auto;height:230px;background:radial-gradient(ellipse at 52% 5%,rgba(84,149,186,.08),transparent 70%);pointer-events:none}
.site-header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 auto 16px}.brand{display:flex;align-items:center;gap:11px}.brand-mark{display:grid;place-items:center;height:46px;width:46px;border:2px solid rgba(255,217,133,.65);border-radius:16px;background:linear-gradient(140deg,#53345d,#2a2455);box-shadow:0 5px 0 rgba(0,0,0,.13),inset 0 0 0 2px rgba(255,255,255,.06);font-size:32px;line-height:1;color:#ffda8b;text-shadow:0 2px 6px #17152e}.brand strong{display:block;font-size:15px;letter-spacing:.11em;text-transform:uppercase;color:var(--cream)}.brand small{display:block;font-weight:700;letter-spacing:.12em;font-size:11px;color:var(--muted);margin-top:4px}.top-actions{display:flex;align-items:center;gap:10px}.collection-pill{border:1px solid rgba(255,218,145,.25);padding:9px 12px;border-radius:99px;background:rgba(29,34,69,.58);font-size:12px;color:var(--cream);font-weight:bold;white-space:nowrap}.audio-button{height:38px;min-width:38px;padding:0 11px;border:1px solid var(--outline);border-radius:13px;background:#ffffff12;color:var(--text);font-size:18px}.audio-button[aria-pressed="true"]{background:#1a645c;border-color:#68eac6}
.hero{text-align:center;margin:5px auto 20px;max-width:850px}.eyebrow{font-size:11px;letter-spacing:.28em;font-weight:900;color:var(--mint)}h1{font-family:Georgia,'Times New Roman',serif;margin:7px auto 7px;font-size:clamp(30px,4.1vw,53px);line-height:1.12;color:#fff6df;text-shadow:0 5px 20px rgba(8,8,26,.34)}h1 em{color:var(--gold);font-style:normal}.hero p{margin:0;color:var(--muted);font-size:clamp(13px,1.3vw,16px);line-height:1.65}.hero p strong{color:#eafff5}
.game-layout{display:grid;grid-template-columns:minmax(210px,252px) minmax(0,1fr) minmax(220px,264px);gap:clamp(12px,1.5vw,22px);align-items:start}.panel{background:linear-gradient(172deg,rgba(37,51,93,.9),rgba(26,34,70,.96));border:1px solid rgba(235,229,221,.14);box-shadow:var(--shadow);border-radius:23px;overflow:hidden}.sidebar{padding:19px 17px 19px}.section-eyebrow{margin:0 0 7px;color:var(--gold);font-size:11px;letter-spacing:.19em;font-weight:900;text-transform:uppercase}.panel-title{font-family:Georgia,serif;font-size:22px;margin:0 0 12px;color:#fff3d9}.aside-description{font-size:12px;color:var(--muted);line-height:1.5;margin:0 0 14px}.mode-list{display:grid;gap:8px}.mode-btn{width:100%;border:1px solid rgba(226,231,255,.12);border-radius:14px;display:flex;align-items:center;text-align:left;gap:9px;padding:10px 9px;color:var(--text);background:#ffffff0a;transition:background .15s,border-color .15s,transform .15s}.mode-btn:hover{background:#ffffff17;transform:translateY(-1px)}.mode-btn.active{background:linear-gradient(100deg,rgba(76,193,164,.22),rgba(72,139,195,.15));border-color:var(--mint);box-shadow:inset 0 0 0 1px #63e9bf34}.mode-symbol{font-size:23px;display:grid;place-items:center;flex:0 0 37px;height:37px;background:#ffffff12;border-radius:11px}.mode-btn .mode-name{display:block;font-weight:900;font-size:13px}.mode-btn .mode-details{display:block;font-size:11px;color:var(--muted);margin-top:3px}.mode-btn.active .mode-name{color:#a7ffe4}.level-box{margin:17px 0 13px;padding-top:15px;border-top:1px solid var(--outline)}.level-row{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}.level-row label{font-size:12px;font-weight:900;color:#fef0d0}.level-count{font-size:11px;color:var(--mint)}.level-select{appearance:none;width:100%;border-radius:12px;border:1px solid rgba(255,215,131,.35);background:#121d42;color:#fff7e5;padding:12px 30px 12px 13px;outline:none;font-size:13px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23ffe1a5' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 12px center;cursor:pointer}.progress-row{display:flex;justify-content:space-between;align-items:center;font-size:11px;color:var(--muted);margin-top:14px}.progress-row b{color:var(--cream)}.progress-track{height:9px;border-radius:99px;background:#09142d;border:1px solid rgba(255,255,255,.08);overflow:hidden;margin-top:8px}.progress-bar{height:100%;width:0;background:linear-gradient(90deg,#51d6ab,#e8d779);border-radius:99px;transition:width .25s}.rules-card{border:1px dashed rgba(255,209,116,.27);border-radius:15px;background:rgba(15,20,49,.53);padding:13px;margin-top:17px}.rules-card h3{margin:0 0 9px;font-size:13px;color:var(--gold)}.rule{display:flex;align-items:flex-start;gap:8px;color:#dce4f2;line-height:1.45;font-size:12px;margin:9px 0}.rule .number{display:grid;place-items:center;flex:0 0 20px;width:20px;height:20px;border-radius:7px;background:#527671;color:#fff;font-weight:900;font-size:11px}.pawn-note{font-size:11px;color:#aab9d1;line-height:1.55;margin:9px 0 0}.pawn-note strong{color:#e8f9ef}
.arena{padding:15px clamp(11px,1.9vw,23px) 18px;background:linear-gradient(170deg,rgba(51,55,96,.95),rgba(28,39,75,.98));border-color:rgba(255,219,143,.21)}.arena-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:13px}.arena-heading .label{display:block;font-size:11px;color:var(--mint);text-transform:uppercase;letter-spacing:.16em;font-weight:900}.arena-heading h2{font:700 clamp(19px,2vw,25px)/1.15 Georgia,'Times New Roman',serif;color:#fff4d6;margin:4px 0 0}.timer-box{min-width:84px;text-align:center;border:1px solid rgba(248,210,145,.18);border-radius:13px;background:rgba(6,12,37,.32);padding:8px 9px}.timer-box span{display:block;text-transform:uppercase;letter-spacing:.16em;font-weight:900;font-size:9px;color:#b9cce0}.timer-box strong{display:block;font-size:21px;font-variant-numeric:tabular-nums;color:#fef0ca;margin-top:4px}.board-stage{max-width:565px;margin:0 auto;position:relative;padding:11px;background:linear-gradient(145deg,#cda96a,#614c65 48%,#302d58);border:2px solid #ddbd82;border-radius:17px;box-shadow:0 13px 0 #131a33,0 25px 35px #0006,inset 0 0 0 2px #191c42}.board-stage:before{content:'✦';position:absolute;color:#ffdf9c;top:-8px;left:50%;font-size:18px;transform:translateX(-50%);text-shadow:0 2px 3px #201b3c}.board{--size:4;display:grid;grid-template-columns:repeat(var(--size),minmax(0,1fr));aspect-ratio:1/1;width:100%;border:2px solid #322740;border-radius:8px;overflow:hidden;box-shadow:inset 0 0 7px #0006;touch-action:manipulation}.tile{width:100%;min-width:0;min-height:0;aspect-ratio:1/1;border:0;position:relative;padding:0;display:grid;place-items:center;color:#381e2a;overflow:hidden}.tile.light{background:var(--board-light)}.tile.dark{background:var(--board-dark)}.tile.light:hover{background:#ffe8c5}.tile.dark:hover{background:#c69d79}.tile.selected{box-shadow:inset 0 0 0 clamp(3px,.5vw,6px) #70f5d7;background:#73b6a5}.tile.can-capture:after{content:'';position:absolute;z-index:2;width:76%;height:76%;border:4px solid #09bb8c;border-radius:50%;box-shadow:0 0 8px #06281f,0 0 0 1px #d2fff2,inset 0 0 9px rgba(24,165,125,.2);pointer-events:none}.tile.hint-from{box-shadow:inset 0 0 0 5px #ffd458;animation:hintPulse 1.1s infinite alternate}.tile.hint-to:after{content:'✦';display:grid;place-items:center;position:absolute;z-index:3;inset:6%;border:3px solid #ffe26a;border-radius:50%;font-size:25px;color:#fff7c2;text-shadow:0 0 7px #a94e00;pointer-events:none;animation:hintPulse 1.1s infinite alternate}.tile:focus-visible{z-index:5;outline:4px solid #72ffca;outline-offset:-4px}.piece{font-family:'Segoe UI Symbol','DejaVu Sans','Arial Unicode MS','Noto Sans Symbols 2',serif;display:block;font-size:calc(min(535px, (100vw - 125px)) / var(--size) * .71);font-weight:normal;line-height:1.05;color:#fff2cb;-webkit-text-stroke:clamp(.4px,.13vw,1.2px) #3d2140;text-shadow:0 3px 0 #42293a,0 5px 4px rgba(0,0,0,.4),0 0 9px #ffefc582;user-select:none;pointer-events:none;transform:translateY(-2%)}.piece.pawn{font-size:calc(min(535px, (100vw - 125px)) / var(--size) * .75)}.tile.selected .piece{transform:scale(1.11)}.file-label,.rank-label{position:absolute;color:#4a3744;font-weight:900;font-size:clamp(9px,1vw,12px);pointer-events:none;z-index:1;line-height:1}.tile.dark .file-label,.tile.dark .rank-label{color:#f3e1be}.file-label{right:4px;bottom:3px}.rank-label{left:4px;top:4px}@keyframes hintPulse{to{filter:brightness(1.35)}}
.board-subline{display:flex;justify-content:space-between;gap:12px;margin:15px 2px 12px;font-size:12px;color:var(--muted)}.board-subline b{color:#ffdea0}.controls{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.control-btn{border-radius:12px;border:1px solid rgba(255,255,255,.17);background:#ffffff12;color:var(--text);padding:12px 5px;font-weight:900;font-size:12px;transition:transform .13s,background .13s}.control-btn:hover:not(:disabled){background:#ffffff25;transform:translateY(-2px)}.control-btn .btn-icon{display:block;font-size:18px;margin-bottom:2px}.control-btn.primary{background:linear-gradient(110deg,#ffd576,#efab60);color:#2b2350;border-color:#ffe8a5;box-shadow:0 4px 0 #ac714c}.control-btn.primary:hover:not(:disabled){background:linear-gradient(110deg,#ffe297,#ffc06d)}.status{margin-top:13px;border-radius:13px;background:rgba(10,18,42,.6);border:1px solid rgba(109,223,195,.22);padding:12px 14px;display:flex;gap:10px;align-items:center;min-height:54px}.status-icon{font-size:20px;flex:0 0 22px;text-align:center}.status-message{font-size:12px;line-height:1.46;color:#e5f5ef}.status.warning{border-color:#e5a062;background:rgba(123,52,67,.22)}.status.success{border-color:#70ddb5;background:rgba(48,112,94,.26)}
.victory{position:absolute;z-index:12;inset:11px;display:flex;align-items:center;justify-content:center;padding:15px;background:rgba(15,19,49,.76);border-radius:9px;backdrop-filter:blur(5px);-webkit-backdrop-filter:blur(5px)}[hidden]{display:none!important}.victory-card{width:min(100%,390px);text-align:center;padding:22px 18px;border:2px solid #ffe39b;background:linear-gradient(160deg,#3b4679,#1b2d57);border-radius:19px;box-shadow:0 15px 45px #0008}.victory-crown{font-size:60px;filter:drop-shadow(0 4px 12px #ffcb5275)}.victory-card h3{font:700 clamp(23px,3vw,32px)/1.12 Georgia,serif;margin:7px 0;color:#fff0be}.victory-card p{margin:8px 0;color:#dce8f8;font-size:13px;line-height:1.5}.victory-stars{font-size:31px;letter-spacing:4px;color:#ffd56d;text-shadow:0 2px 8px #c17314}.victory-actions{display:flex;gap:9px;margin-top:15px}.victory-actions button{flex:1;padding:11px 7px;border-radius:10px;font-weight:900;font-size:12px;color:#fff;border:1px solid rgba(255,255,255,.24);background:#ffffff1c}.victory-actions button:first-child{background:var(--gold);color:#2e2443}.confetti{position:absolute;inset:0;pointer-events:none;overflow:hidden;border-radius:10px}.confetti span{display:block;position:absolute;top:-5%;height:12px;width:7px;opacity:.9;background:var(--gold);animation:fall 2.7s linear infinite}.confetti span:nth-child(3n){background:var(--mint)}.confetti span:nth-child(3n+1){background:var(--pink)}@keyframes fall{to{top:110%;transform:rotate(630deg) translateX(30px)}}
.dashboard-head{margin-bottom:13px}.piece-counter{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:11px 0 13px}.stat-card{border:1px solid rgba(255,255,255,.11);background:#111d42;border-radius:14px;text-align:center;padding:12px 5px}.stat-card strong{display:block;font:700 29px Georgia,serif;color:var(--gold)}.stat-card span{display:block;margin-top:5px;font-size:10px;letter-spacing:.05em;color:#bac7dd;text-transform:uppercase}.mini-title{font-weight:900;text-transform:uppercase;letter-spacing:.13em;font-size:11px;color:var(--gold);margin:17px 0 10px}.move-list{padding:7px 8px;background:rgba(8,16,38,.37);border:1px solid rgba(255,255,255,.1);border-radius:13px;max-height:193px;min-height:80px;overflow-y:auto}.move-row{display:grid;grid-template-columns:20px 1fr;gap:6px;align-items:center;padding:8px 4px;color:#e7eaf0;font-size:11px;border-bottom:1px solid rgba(255,255,255,.08)}.move-row:last-child{border-bottom:0}.move-number{font-size:10px;color:var(--mint);font-weight:900}.move-empty{font-size:11px;line-height:1.55;color:#aebbce;text-align:center;padding:12px 4px}.pieces-guide{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.piece-guide{border:1px solid rgba(255,255,255,.1);border-radius:11px;background:rgba(255,255,255,.05);text-align:center;padding:8px 1px}.piece-guide span{display:block;font-size:25px;color:#ffe4ad;font-family:'Segoe UI Symbol','DejaVu Sans',serif;text-shadow:0 2px 2px #100c27}.piece-guide small{display:block;font-weight:800;color:#dce0ef;font-size:10px;margin-top:2px}.tip{font-size:11px;color:#b8c6de;line-height:1.55;margin:12px 0 0}.tip strong{color:#ffe1aa}.total-completed{margin-top:14px;background:linear-gradient(110deg,#326666,#273c65);border-radius:14px;padding:12px 13px;display:flex;gap:9px;align-items:center}.total-completed .trophy{font-size:26px}.total-completed strong{font:700 23px Georgia,serif;color:#ffdc83}.total-completed small{display:block;color:#daeff0;font-size:10px;margin-top:1px}.footer{text-align:center;font-size:11px;color:#8da1c4;margin:24px auto 0;line-height:1.6}.footer strong{color:#e4c792}
@media (min-width:1240px){.piece{font-size:calc(535px / var(--size) * .71)}.piece.pawn{font-size:calc(535px / var(--size) * .75)}}
@media (max-width:1160px){.game-layout{grid-template-columns:minmax(195px,225px) minmax(0,1fr)}.sidebar.right{grid-column:1/-1;display:grid;grid-template-columns:1fr 1.05fr 1fr;column-gap:17px;align-items:start}.sidebar.right .dashboard-head{grid-column:1}.sidebar.right .piece-counter{grid-column:1;grid-row:2}.sidebar.right .move-section{grid-column:2;grid-row:1/span 3}.sidebar.right .guide-section{grid-column:3;grid-row:1/span 3}.sidebar.right .total-completed{grid-column:1;grid-row:3;margin:0}.pieces-guide{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media (max-width:770px){.page-wrap{padding:13px 11px 20px}.site-header{margin-bottom:15px}.hero{margin-bottom:14px}.hero p{padding:0 9px}.game-layout{display:flex;flex-direction:column;align-items:stretch;gap:12px}.arena{order:0}.sidebar.left{order:1}.sidebar.right{order:2;display:block}.sidebar.right .piece-counter{margin:11px 0}.sidebar.right .total-completed{margin-top:14px}.mode-list{grid-template-columns:repeat(2,minmax(0,1fr))}.rules-card{margin-top:13px}.pieces-guide{grid-template-columns:repeat(6,minmax(0,1fr))}.board-stage{max-width:min(95vw,550px)}.brand strong{font-size:12px}.brand small{font-size:10px}.collection-pill{font-size:10px;padding:7px 8px}}
@media (max-width:480px){.brand-mark{width:40px;height:40px;font-size:28px;border-radius:12px}.brand{gap:8px}.brand strong{font-size:11px;letter-spacing:.06em}.brand small{letter-spacing:.07em}.top-actions{gap:5px}.collection-pill{font-size:9px;padding:7px}.audio-button{height:34px;min-width:34px;font-size:16px;padding:0 6px}.hero{margin-top:4px}.hero p{font-size:12px}.arena{padding:11px 9px 14px;border-radius:17px}.arena-heading h2{font-size:19px}.arena-heading .label{font-size:10px}.timer-box{padding:7px 5px;min-width:73px}.timer-box strong{font-size:18px}.board-stage{padding:7px;border-radius:13px;box-shadow:0 7px 0 #141a32,0 15px 25px #0005}.board{border:1px solid #322740}.piece{font-size:calc((100vw - 58px) / var(--size) * .7)}.piece.pawn{font-size:calc((100vw - 58px) / var(--size) * .76)}.board-subline{font-size:11px;margin:12px 2px 10px}.controls{gap:5px}.control-btn{padding:10px 3px;font-size:10px;border-radius:10px}.control-btn .btn-icon{font-size:16px}.status{margin-top:10px;padding:10px;font-size:12px}.mode-btn{padding:8px 6px;gap:5px}.mode-symbol{flex-basis:29px;height:31px;font-size:19px}.mode-btn .mode-name{font-size:12px}.mode-btn .mode-details{font-size:10px}.pieces-guide{gap:4px}.piece-guide span{font-size:21px}.piece-guide small{font-size:9px}.victory-card{padding:16px 10px}.victory-crown{font-size:43px}.victory-card h3{font-size:24px}.victory-stars{font-size:26px}}
@media (prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}

/* Original Chess Quest Fantasy V6 backgrounds and matching fantasy characters */
:root{--royal-gold:#f8d691}body{background:radial-gradient(ellipse at 50% 0%,#2d4f86 0%,#101b3b 48%,#080f22 100%)}
.panel{background:linear-gradient(165deg,rgba(29,47,86,.97),rgba(14,26,55,.99));border-color:#eccc7838}
.hero h1{text-shadow:0 2px 0 #17213c,0 12px 24px #050814aa}
.arena{background:linear-gradient(175deg,#233c65,#13274a 75%,#18264a)}
.world-gallery{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;max-width:650px;margin:0 auto 12px}
.world-choice{min-width:0;appearance:none;border:3px solid #667994;border-radius:12px;padding:4px 4px 7px;background:linear-gradient(#1f355c,#0e2348);box-shadow:0 4px 8px #0005;color:#ffe9bb;font-size:clamp(10px,1.4vw,13px);font-weight:900;transition:transform .15s}
.world-choice:hover{transform:translateY(-2px)}.world-choice[aria-pressed="true"]{border-color:#fff1ad;box-shadow:0 0 0 2px #61d5fb,0 4px 8px #0008;background:#264f78}
.world-choice img{display:block;width:100%;aspect-ratio:2.8/1;object-fit:cover;object-position:center center;border-radius:6px;margin-bottom:5px}
.board-stage{position:relative;width:100%;max-width:650px;aspect-ratio:1/1;margin:0 auto 4px;padding:0;border:7px solid var(--world-edge,#a5eefe);border-radius:14px;overflow:hidden;isolation:isolate;box-shadow:0 0 0 3px #334d70,0 8px 0 #17234b,0 18px 28px #0009;background:#15294d}
.board-stage:before,.board-stage:after{content:'✦';position:absolute;z-index:6;color:var(--world-edge,#fbd78c);font-size:clamp(17px,4vw,30px);text-shadow:0 0 9px #fff;pointer-events:none;animation:glow-fantasy 3s ease-in-out infinite alternate}
.board-stage:before{left:3px;top:1px;transform:none}.board-stage:after{right:3px;bottom:1px;top:auto}
.world-art{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center;filter:brightness(.58) saturate(.88);z-index:0;user-select:none;pointer-events:none}
.board{position:absolute;z-index:2;left:50%;top:51%;transform:translate(-50%,-50%) perspective(1200px) rotateX(10deg);width:85%;aspect-ratio:1/1;border:7px solid var(--world-edge,#9beeff);border-radius:7px;box-shadow:0 0 0 4px #142441,0 0 0 7px #c3a16a,0 17px 25px #000b,0 0 30px #ffeabc55;overflow:hidden}
.tile{background-size:100% 100%;background-repeat:no-repeat;box-shadow:inset 0 0 0 1px #091e37a5,inset 2px 2px 2px #fff6,inset -2px -2px 2px #0005;touch-action:manipulation}
.tile.light{background-color:var(--board-light)}.tile.dark{background-color:var(--board-dark)}
.tile.light:hover,.tile.dark:hover{filter:brightness(1.13)}
.tile.selected{outline:4px solid #ffe876;outline-offset:-5px;filter:brightness(1.14)}
.tile.can-capture:after{border-color:#fdf7ba;box-shadow:0 0 15px #fff7ad,0 0 0 2px #3ceccc,inset 0 0 20px #91edff6b}
.fantasy-piece{display:block;position:relative;z-index:2;width:96%;height:96%;max-width:100%;object-fit:contain;object-position:center bottom;filter:drop-shadow(0 3px 2px #07182a9a);user-select:none;pointer-events:none;transform-origin:center bottom}
.piece-guide img{display:block;width:48px;height:48px;margin:0 auto;object-fit:contain;filter:drop-shadow(0 1px 2px #0008)}.tile.just-captured .fantasy-piece{animation:fantasy-arrive .43s cubic-bezier(.2,.77,.2,1.1) both}
.file-label,.rank-label{z-index:4;text-shadow:0 1px 2px #fff7;opacity:.85}
.stuck-stamp{font-weight:900;border:2px solid #ed9c60;border-radius:13px;padding:12px;margin:10px 0 8px;background:linear-gradient(110deg,#5b2341,#3b2449);color:#fff4cc;text-align:center;box-shadow:0 4px 12px #0005;line-height:1.4;font-size:13px}
.stuck-stamp[hidden]{display:none!important}
.controls{grid-template-columns:repeat(3,minmax(0,1fr))}
.control-btn.primary:not(:disabled){background:linear-gradient(110deg,#0c9751,#25c361);border-color:#83f09e;color:#fff;box-shadow:0 5px 12px #0005}
@keyframes fantasy-arrive{0%{opacity:.4;transform:translateY(-13%) scale(.76)}60%{transform:translateY(3%) scale(1.07)}100%{opacity:1;transform:translateY(0) scale(1)}}
@keyframes glow-fantasy{from{opacity:.45;filter:brightness(.7)}to{opacity:1;filter:brightness(1.2)}}
@media(max-width:770px){.world-gallery{margin-bottom:10px}.board-stage{width:100%;max-width:none}.board{width:91%;top:51%;transform:translate(-50%,-50%)}.world-choice{font-size:11px}}
@media(max-width:480px){.world-choice{font-size:10px;line-height:1.2;padding:3px 2px 5px;border-width:2px}.world-gallery{gap:5px}.board-stage{border-width:4px;border-radius:10px}.board{width:94%;border-width:4px;box-shadow:0 0 0 3px #142441,0 10px 18px #000b}.tile{box-shadow:inset 0 0 0 1px #091e37aa}.fantasy-piece{width:98%;height:98%}.piece-guide img{width:37px;height:37px}.tile.can-capture:after{border-width:2px}.stuck-stamp{padding:9px;font-size:11px}}
@media(prefers-reduced-motion:reduce){.tile.just-captured .fantasy-piece,.board-stage:before,.board-stage:after{animation:none}}

/* V5 — Fantasy piece selectors and original Web Audio sound packs */
.customizer{max-width:650px;margin:1px auto 14px;padding:10px 11px 11px;border:1px solid rgba(247,212,140,.45);background:linear-gradient(140deg,rgba(11,24,51,.97),rgba(33,47,79,.95));border-radius:14px;box-shadow:0 5px 12px rgba(0,0,0,.24)}
.picker-title{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:4px 8px;margin-bottom:8px;color:#f8dfa4;font-weight:900;font-size:12px;letter-spacing:.02em}.picker-title small{font-size:9px;color:#adcede;font-weight:700;letter-spacing:0}
.piece-style-options{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.piece-style{border:2px solid #536580;border-radius:10px;min-width:0;min-height:79px;padding:3px 2px 5px;background:linear-gradient(#2e4164,#112342);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;color:#e3edf8;font-size:10px;font-weight:800;line-height:1.15;cursor:pointer}
.piece-style:hover{border-color:#a5e7f0;transform:translateY(-1px)}.piece-style[aria-pressed="true"]{border-color:#ffe4a0;background:linear-gradient(#354d68,#284b68);box-shadow:inset 0 0 0 1px #f5d4a4,0 0 10px #f0c65b55;color:#fff2bd}
.piece-style img{height:47px;width:64px;max-width:100%;object-fit:contain;filter:drop-shadow(0 2px 3px #000a);pointer-events:none}.piece-style span{pointer-events:none}
.sound-row{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:7px;margin:11px auto 0;padding:9px 7px;border-radius:10px;background:rgba(7,14,33,.66);border:1px solid rgba(255,255,255,.12)}
.sound-label,.volume-label{font-size:11px;color:#e6dda9;font-weight:900;white-space:nowrap}.sound-select{flex:1 1 144px;min-width:120px;max-width:245px;border:1px solid #93c8d6;border-radius:7px;background:#112f4f;color:#fff5d8;font-size:11px;font-weight:700;padding:8px 6px;cursor:pointer}
.sound-action{border-radius:8px;padding:7px 9px;border:1px solid #89b9c9;min-height:33px;background:#315377;color:#fff4d1;font-size:11px;font-weight:850;white-space:nowrap;cursor:pointer}.sound-action:hover{background:#456c92}.sound-action.preview{background:#8a4d36;border-color:#ecc280}.sound-action[aria-pressed="true"]{background:#287f5d;border-color:#9cfbd2}.sound-action:focus-visible,.piece-style:focus-visible,.sound-select:focus-visible,#soundVolume:focus-visible{outline:3px solid #f9e298;outline-offset:2px}
.volume-label{display:flex;align-items:center;gap:5px}.volume-label span{color:#b8eafb;font-size:10px}#soundVolume{width:87px;height:20px;accent-color:#eac46b;cursor:pointer}
.style-help{font-size:10px;color:#9fbad0;line-height:1.45;margin:7px 1px 0;text-align:center}
@media(max-width:480px){.customizer{padding:9px 7px 8px}.piece-style-options{gap:4px}.piece-style{min-height:74px;font-size:9px;padding:4px 1px}.piece-style img{height:42px}.picker-title{font-size:11px}.sound-row{gap:5px;padding:7px 4px}.sound-label{width:100%;text-align:center}.sound-select{flex-basis:125px;font-size:10px}.sound-action{font-size:10px;padding:7px 6px}.style-help{font-size:9px}}

/* V6: more piece sets and a fully responsive fantasy alert overlay */
.piece-style-options{grid-template-columns:repeat(5,minmax(0,1fr));gap:5px}
.piece-style{min-height:76px}.piece-style img{width:min(100%,70px);height:47px}
.mode-btn.timed{border:2px solid #f9c56e;background:linear-gradient(125deg,#52417c,#6a314f 70%,#3d3a7b);box-shadow:0 6px 18px #080b2a58}
.mode-btn.timed .mode-symbol{font-size:27px}.mode-btn.timed .mode-name{color:#fff0b4}
.timer-box.timed{border-color:#ffd57e;background:linear-gradient(145deg,#523b60,#38244a)}
.timer-box.timed strong{color:#ffe7a8}.timer-box.danger{border-color:#ff756d;box-shadow:0 0 0 2px #ff75554a;animation:timer-warning .8s infinite alternate}.timer-box.danger strong{color:#ffe0d8}
@keyframes timer-warning{from{filter:brightness(.96)}to{filter:brightness(1.18)}}
.game-popup{position:absolute;z-index:25;inset:8px;display:flex;align-items:center;justify-content:center;padding:10px;border-radius:11px;background:rgba(8,9,28,.84);backdrop-filter:blur(5px);-webkit-backdrop-filter:blur(5px)}
.game-popup[hidden]{display:none!important}.game-popup-card{width:min(100%,370px);text-align:center;border:2px solid #ffcb82;border-radius:19px;padding:21px 15px 17px;background:linear-gradient(145deg,#53335f,#252e59 62%,#25234a);box-shadow:0 17px 45px #080b29b8;color:#fff6df}
.popup-symbol{font-size:45px;line-height:1.15;filter:drop-shadow(0 3px 8px #0006)}.game-popup-card h3{font:700 clamp(22px,3vw,30px)/1.15 Georgia,serif;color:#fff1c7;margin:8px 0 10px}.game-popup-card p{font-size:13px;line-height:1.55;color:#ecdfdf;margin:0 0 14px}.popup-actions{display:flex;gap:8px;justify-content:center;flex-wrap:wrap}.popup-actions button{min-height:44px;border:1px solid #fbd197;border-radius:10px;padding:10px 11px;background:linear-gradient(140deg,#ffd98e,#d9945f);color:#35224a;font-weight:900;font-size:12px}.popup-actions button:hover{filter:brightness(1.08)}.popup-view{display:inline-block;margin-top:11px;border:1px solid #b9c6df;border-radius:8px;padding:6px 10px;color:#e3edff;background:#15264d;font-size:11px}
@media(max-width:700px){.piece-style-options{grid-template-columns:repeat(3,minmax(0,1fr))}.piece-style{min-height:74px}}
@media(max-width:390px){.piece-style-options{grid-template-columns:repeat(3,minmax(0,1fr))}.piece-style img{height:41px}.game-popup-card{padding:13px 8px}.popup-actions{gap:5px}.popup-actions button{padding:8px 7px;font-size:11px}}
@media(prefers-reduced-motion:reduce){.timer-box.danger{animation:none}}

/* V7: traditional chess pieces, spoken coach, accessible one-minute quest. */
.voice-row{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:8px;margin:8px auto 0;padding:9px 7px;border:1px solid rgba(206,235,255,.25);background:rgba(14,40,62,.78);border-radius:10px}
.voice-row .sound-label{color:#c3f5e3}.voice-label{color:#e9dba7;font-size:11px;font-weight:800}
.voice-row .sound-select{flex:0 1 160px}.mode-btn.sprint{border:2px solid #71e8da;background:linear-gradient(130deg,#183d5d,#235c57 68%,#35466d)}
.mode-btn.sprint .mode-name{color:#b6fff3}.tile .standard-piece{width:100%;height:100%;filter:drop-shadow(0 2px 1px #0008)}
@media(max-width:480px){.voice-row{gap:5px;padding:8px 3px}.voice-row .sound-label{width:100%;text-align:center}.voice-row .sound-select{flex-basis:130px;max-width:160px}.voice-label{font-size:10px}}

/* V9: board stays compact, pieces stay comfortably INSIDE their squares.
   Mouse hover shows an independent, non-interactive preview outside the board. */
.world-gallery,.customizer{max-width:590px}
.board-stage{max-width:590px}
.board{width:83%;}
.board .tile{overflow:hidden;}
.board .tile > .fantasy-piece,
.board .tile > .fantasy-piece:hover{
  display:block;position:relative;z-index:2;
  width:73%;height:78%;max-width:73%;max-height:78%;
  object-fit:contain;object-position:center center;
  pointer-events:auto;transform:none!important;
  filter:drop-shadow(0 2px 2px rgba(7,19,36,.68));
  user-select:none;-webkit-user-drag:none;
}
.board .tile.just-captured > .fantasy-piece{animation:piece-arrive-v9 .22s ease-out both}
@keyframes piece-arrive-v9{from{opacity:.58}to{opacity:1}}
.piece-hover-name{display:none!important}
/* V10: an image-only transparent mouse-over preview, not a card or popup frame. */
.piece-hover-preview[hidden]{display:none!important}
.piece-hover-preview{
 position:fixed;left:0;top:0;z-index:99999;pointer-events:none;
 display:block;width:175px;height:175px;
 margin:0;padding:0;border:0;border-radius:0;outline:0;
 background:transparent;box-shadow:none;color:inherit;
 backdrop-filter:none;-webkit-backdrop-filter:none;
 opacity:1;overflow:visible;
}
.piece-hover-preview > img{
 display:block;width:100%;height:100%;object-fit:contain;
 margin:0;padding:0;border:0;border-radius:0;
 background:transparent;box-shadow:none;filter:none;
 user-select:none;-webkit-user-drag:none;pointer-events:none;
}
@media(max-width:770px){.world-gallery,.customizer{max-width:575px}.board-stage{width:96%;max-width:575px}.board{width:89%;}}
@media(max-width:480px){.board-stage{width:96%;}.board{width:90%}.board .tile > .fantasy-piece{width:75%;height:78%;max-width:75%;max-height:78%;}}
@media(hover:none),(pointer:coarse){.piece-hover-preview{display:none!important}.board .tile > .fantasy-piece{pointer-events:none!important;transform:none!important}}
.voice-row .sound-select{flex:0 1 153px}
.ai-voice-status{max-width:650px;margin:8px auto 2px;padding:7px 9px;text-align:center;background:rgba(12,33,60,.60);border:1px solid rgba(155,209,235,.28);border-radius:10px;color:#cde9ff;font:700 11px/1.45 Arial,sans-serif}
.ai-voice-status.is-ready{color:#b3ffd7;border-color:#49b88a88}
.ai-voice-status.is-offline{color:#ffe0ad;border-color:#d9ae6888}
.ai-voice-disclosure{max-width:650px;margin:7px auto 0;color:#b9cce3;font-size:10px;line-height:1.5;text-align:center}
@media(max-width:480px){.voice-row .sound-select{flex:0 1 144px;max-width:155px}.ai-voice-status{font-size:10px}.ai-voice-disclosure{font-size:9px}}

/* V12 Kids Edition: board-first, accessible practice and rewards */
.kid-playbar{max-width:550px;margin:1px auto 11px;padding:10px 11px;display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap;background:linear-gradient(110deg,rgba(13,62,82,.83),rgba(16,42,82,.87));border:1px solid rgba(153,247,209,.45);border-radius:13px}
.kid-goal{color:#ebfffb;font-weight:800;font-size:12px;line-height:1.5}.kid-goal strong{color:#ffe49d}
.kid-tool-buttons{display:flex;align-items:center;flex-wrap:wrap;gap:6px}
.kid-tool{appearance:none;background:#173f69;border:1px solid #8bcbe7;border-radius:10px;padding:9px 11px;color:#fff8d9;font-size:11px;font-weight:900;min-height:38px;cursor:pointer}
.kid-tool:hover,.kid-tool:focus-visible{background:#215a89;outline:2px solid #ffe6a3;outline-offset:1px}
.kid-tool[aria-pressed="true"]{background:#ffe4a4;border-color:#ffe4a4;color:#19294a}
.kid-studio{max-width:650px;margin:16px auto 0;background:rgba(8,20,50,.62);border:1px solid #657b9c;border-radius:14px;overflow:hidden}
.kid-studio>summary{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap;cursor:pointer;list-style:none;padding:14px 16px;color:#ffecb9;font-weight:900;font-size:14px;background:linear-gradient(110deg,#203c66,#162c53)}
.kid-studio>summary::-webkit-details-marker{display:none}
.kid-studio>summary:before{content:'+';display:grid;place-items:center;width:22px;height:22px;flex:none;background:#ffd681;color:#19335b;border-radius:50%;font-weight:900}
.kid-studio[open]>summary:before{content:'-'}
.kid-studio>summary small{font-size:10px;color:#bed9ee;font-weight:800}
.kid-studio .customizer{margin:9px auto 10px;max-width:620px}
.kid-mini-passport{margin:12px 0;width:100%;background:linear-gradient(110deg,#3c416f,#273f67);border:1px solid rgba(255,217,121,.6);color:#fff5d6;display:flex;align-items:center;gap:8px;text-align:left;padding:10px 8px;border-radius:12px;cursor:pointer}
.kid-mini-passport:hover,.kid-mini-passport:focus-visible{outline:2px solid #ffe39c}
.kid-mini-passport .kid-passport-icon{font-size:24px}.kid-mini-passport strong{display:block;font-size:12px}.kid-mini-passport small{display:block;font-size:10px;color:#d7def7;line-height:1.4;margin-top:3px}
.kid-passport-total{margin-left:auto;font-size:11px;font-weight:900;white-space:nowrap;color:#fbe1a2}
.kid-overlay[hidden]{display:none!important}
.kid-overlay{position:fixed;inset:0;display:grid;place-items:center;z-index:999999;overflow-y:auto;padding:16px;background:rgba(4,12,35,.83);backdrop-filter:blur(5px)}
.kid-dialog{position:relative;width:min(100%,560px);max-height:calc(100dvh - 32px);overflow-y:auto;background:linear-gradient(150deg,#293f73,#17274e 70%);border:3px solid #ffdf9a;border-radius:22px;box-shadow:0 24px 90px rgba(0,0,0,.65);color:#fff7df;padding:24px 24px 22px;text-align:center}
.kid-dialog-close{position:absolute;right:10px;top:9px;border:1px solid #aac2df;border-radius:10px;background:#213a68;color:#fff;width:34px;height:34px;cursor:pointer;font-size:15px}
.kid-dialog-kicker{font-size:11px;letter-spacing:.13em;color:#a4f5e0;font-weight:900;padding-right:20px}
.kid-dialog h2{font:800 clamp(23px,4.3vw,30px) Georgia,serif;color:#ffe0a2;margin:8px 0}
.kid-dialog-lead{font-size:13px;line-height:1.6;color:#e1ebf5;max-width:450px;margin:8px auto 12px}
.kid-step-tag{color:#9ce5f2;font-size:12px;font-weight:900;text-transform:uppercase;letter-spacing:.07em}
.kid-dialog h3{font:700 18px Georgia,serif;margin:8px 0;color:#ffe6ae}
.kid-practice-instruction{margin:7px auto 12px;color:#f0f5ff;font-size:13px;line-height:1.5}
.kid-practice-board{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));width:min(100%,310px);margin:12px auto;border:5px solid #ffd99b;border-radius:12px;overflow:hidden;box-shadow:0 7px 17px #0008}
.kid-practice-square{aspect-ratio:1/1;min-width:0;display:grid;place-items:center;position:relative;border:0;padding:4px;cursor:pointer}
.kid-practice-square.light{background:#f3dcba}.kid-practice-square.dark{background:#9f7790}.kid-practice-square.selected{box-shadow:inset 0 0 0 5px #6de9cc}
.kid-practice-square img{display:block;width:70%;height:75%;object-fit:contain;pointer-events:none;filter:drop-shadow(0 2px 2px #0008)}
.kid-practice-square:focus-visible{outline:4px solid #59dfff;outline-offset:-4px;z-index:1}
.kid-practice-feedback{min-height:36px;color:#d0ffed;font-size:13px;font-weight:800;line-height:1.4;margin:12px 4px}
.kid-dialog-actions{display:flex;justify-content:center;gap:9px;flex-wrap:wrap;margin-top:14px}
.kid-dialog-actions button{padding:12px 17px;border-radius:11px;min-height:44px;font-size:13px;font-weight:900;cursor:pointer}
.kid-primary{background:#36b883;color:#09273a;border:2px solid #a4ffe5}.kid-primary:disabled{opacity:.42;cursor:not-allowed}.kid-secondary{background:#293c68;color:#fff4d5;border:1px solid #9eb8e0}
.kid-sticker-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;margin:16px auto}
.kid-sticker{padding:13px 4px;border-radius:13px;border:1px solid #aebbd7;background:#354c73;min-width:0}
.kid-sticker .sticker-emoji{display:block;font-size:36px;line-height:1.2;filter:drop-shadow(0 3px 3px #0006)}
.kid-sticker strong{display:block;font-size:12px;color:#fff2ce;margin-top:5px;line-height:1.3}
.kid-sticker small{display:block;font-size:10px;color:#cde4ec;margin-top:3px}
.kid-sticker.locked{opacity:.55;background:#1e2b4a;border-style:dashed}
.kid-sticker.locked .sticker-emoji{filter:grayscale(1) brightness(.85)}
.kid-passport-progress{font-size:14px;color:#ffde90;font-weight:900;margin:10px auto}
.kid-privacy{font-size:11px;line-height:1.5;color:#bcd4e9;margin:12px auto}
.easy-read .kid-goal,.easy-read .status,.easy-read .aside-description,.easy-read .tip{font-size:clamp(14px,1.3vw,16px)!important;line-height:1.65}
.easy-read .control-btn,.easy-read .mode-btn,.easy-read .kid-tool{font-size:14px!important}
.easy-read .board-subline{font-size:13px!important}
.easy-read *, .easy-read *:before, .easy-read *:after{animation-duration:.01ms!important;transition-duration:.01ms!important}
@media (max-width:520px){.kid-playbar{padding:9px 7px}.kid-goal{width:100%;text-align:center}.kid-tool-buttons{width:100%;display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}.kid-tool{font-size:10px;padding:8px 3px}.kid-studio>summary{padding:11px 9px;font-size:12px}.kid-studio>summary small{font-size:9px}.kid-dialog{padding:21px 11px 15px}.kid-overlay{padding:8px}.kid-sticker-grid{gap:6px}.kid-sticker .sticker-emoji{font-size:27px}}
@media (prefers-reduced-motion:reduce){.kid-overlay{backdrop-filter:none}}


/* V13 Kids Polish: audited responsive popups, six lessons, quiet play and focus states */
.board-stage{overflow:visible;z-index:3}
.world-art{border-radius:7px;clip-path:inset(0 round 7px)}
.game-popup,.victory{overflow:visible}
.game-popup{background:rgba(11,17,42,.89);z-index:31}
.game-popup-card{max-height:calc(100dvh - 24px);overflow-y:auto;background:linear-gradient(145deg,#493f87,#273a72 59%,#1e345d);border:3px solid #ffda82;box-shadow:0 11px 45px #030d2db8,0 0 0 4px #1d476c;color:#fffefa}
.game-popup .popup-symbol{font-size:50px;filter:drop-shadow(0 3px 4px #121a36)}
.game-popup-card h3{color:#fff0b7;font-size:clamp(22px,3vw,29px)}
.game-popup-card p{color:#f2f7ff;font-size:clamp(12px,1.5vw,14px);line-height:1.55}
.popup-actions button,.popup-view{min-height:44px!important;font-weight:900;outline-offset:2px}
.popup-actions #popupUndo{background:linear-gradient(140deg,#4cbb91,#188d76)!important;color:#072d2c!important;border-color:#c6fff0!important}
.popup-actions #popupRestart{background:linear-gradient(140deg,#eac984,#b87855)!important;color:#31213a!important;border-color:#ffeabf!important}
.popup-actions #popupUndo:focus-visible,.popup-actions #popupRestart:focus-visible,.popup-view:focus-visible,.victory-actions button:focus-visible{outline:3px solid #5cf7df}
.victory{z-index:28;background:rgba(6,20,48,.87)}
.victory-card{max-height:calc(100dvh - 24px);overflow-y:auto;border:3px solid #ffe49a;box-shadow:0 14px 42px #031428d9,0 0 0 4px #24537c}
.victory-card h3{color:#fff4bb}
.victory-actions button{min-height:44px}
.kid-dialog-open{overflow:hidden}
.kid-tool{min-height:44px}
.kid-tool[aria-pressed="true"]{color:#192d46}
.kid-quiet-play .confetti span,.kid-quiet-play .board-stage:before,.kid-quiet-play .board-stage:after,.kid-quiet-play .tile.just-captured .fantasy-piece,.kid-quiet-play .timer-box.danger{animation:none!important}
.kid-quiet-play *, .kid-quiet-play *:before,.kid-quiet-play *:after{animation-duration:0s!important;transition-duration:0s!important}

.kid-practice-board{box-shadow:0 9px 28px #07112acc}
.kid-practice-square{min-height:48px}
.kid-dialog h2{line-height:1.2}
/* Keep every dialog readable even when the chessboard is narrower than the card. */
.game-popup-card{width:min(370px,calc(100vw - 24px));max-width:none;flex-shrink:0}
.victory-card{width:min(390px,calc(100vw - 24px));max-width:none;flex-shrink:0}
.confetti span{opacity:.65}
.kid-dialog-actions button:focus-visible,.kid-tool:focus-visible,.kid-practice-square:focus-visible{outline:3px solid #a6f9ff;outline-offset:2px}
@media(max-width:520px){
 .kid-tool-buttons{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
 .kid-tool{font-size:11px;padding:8px 5px;min-height:44px}
 .game-popup-card{width:min(100%,340px);padding:13px 9px}
 .game-popup-card p{font-size:12px;line-height:1.4}
 .popup-actions{gap:5px}
 .popup-actions button{padding:8px!important;min-height:44px!important}
 .victory-card{padding:14px 10px}
 .victory-crown{font-size:40px}
 .kid-practice-board{width:min(100%,270px)}
}
@media(max-width:360px){
 .game-popup-card{padding:9px 7px}
 .game-popup .popup-symbol{font-size:32px}
 .game-popup-card h3{font-size:21px;margin:4px 0 6px}
 .popup-view{margin-top:5px}
 .popup-actions button{font-size:11px;line-height:1.2}
 .victory-card p{font-size:12px}
}
/* Place narrow-screen dialogue cards above the board without clipping within the square. */
@media(max-width:520px){
 .game-popup-card{width:calc(100vw - 24px)!important;max-width:none!important;flex:0 0 auto}
 .victory-card{width:calc(100vw - 24px)!important;max-width:none!important;flex:0 0 auto}
 .victory-actions{gap:7px}
}


/* V15 Clean Fix — surgical UI changes; the tested V13 game engine is retained. */
.board-stage::before,.board-stage::after{content:none!important;display:none!important;animation:none!important}
.confetti,.confetti *{display:none!important;animation:none!important}
#kidStickersSideButton{display:none!important} /* Sticker Book still lives in the top play toolbar */
.board .tile > .fantasy-piece,
.board .tile > .fantasy-piece:hover,
.board .tile.selected > .fantasy-piece{
  display:block!important;position:relative!important;
  width:64%!important;height:68%!important;
  max-width:64%!important;max-height:68%!important;
  object-fit:contain!important;object-position:center center!important;
  transform:none!important;animation:none!important;
  filter:drop-shadow(0 2px 2px rgba(5,12,31,.5))!important;
}
.piece-hover-preview{width:106px!important;height:106px!important;overflow:visible!important;background:transparent!important;border:0!important;box-shadow:none!important}
.piece-hover-preview > img{width:100%!important;height:100%!important;object-fit:contain!important;object-position:center!important;background:transparent!important;border:0!important;box-shadow:none!important;filter:none!important}
.piece-style-options{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:7px!important}
.piece-style{min-height:92px!important;overflow:visible!important;padding:7px 4px 6px!important}
.piece-style img{display:block!important;width:100%!important;height:55px!important;max-height:55px!important;object-fit:contain!important;object-position:center!important;padding:2px 3px!important;box-sizing:border-box!important;flex-shrink:0!important}
.piece-style span{line-height:1.18!important}
.pieces-guide img{object-fit:contain!important;object-position:center!important;max-width:90%!important}
@media(max-width:480px){
 .board .tile > .fantasy-piece,
 .board .tile.selected > .fantasy-piece{width:67%!important;height:69%!important;max-width:67%!important;max-height:69%!important}
 .piece-style-options{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:4px!important}
 .piece-style{min-height:87px!important;padding:4px 2px 5px!important}
 .piece-style img{height:50px!important;max-height:50px!important;padding:3px!important}
 .piece-hover-preview{width:96px!important;height:96px!important}
}
@media(hover:none),(pointer:coarse){.piece-hover-preview{display:none!important}}


/* V16 - simple layout: keep play tools while removing redundant panels. */
.kid-playbar{justify-content:center}
.kid-tool-buttons{justify-content:center}
@media (min-width:771px) and (max-width:1160px){
  .sidebar.right{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 18px;align-items:start}
  .sidebar.right .dashboard-head{grid-column:1/-1;grid-row:auto;margin-bottom:0}
  .sidebar.right .piece-counter{grid-column:1;grid-row:auto;margin:0}
  .sidebar.right .kid-mini-passport{grid-column:2;grid-row:auto;margin:0}
  .sidebar.right .total-completed{grid-column:1/-1;grid-row:auto;margin:0}
}
@media (max-width:770px){.sidebar.right{display:block}}


/* V17: simpler gameplay toolbar and fantasy choices under Quest Tracker. */
.fantasy-picker{margin:4px 0 16px;border:1px solid rgba(231,202,141,.30);border-radius:13px;padding:12px 9px 10px;background:rgba(8,20,47,.28)}
.fantasy-picker h3{font-size:14px;line-height:1.3;font-weight:900;color:#f9e1a8;margin:0 0 10px;text-align:center}
.sidebar.right .piece-style-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
.sidebar.right .piece-style{min-height:79px;padding:7px 3px 6px;font-size:10px;line-height:1.15}
.sidebar.right .piece-style img{width:72px;max-width:95%;height:50px;max-height:50px;object-fit:contain;object-position:center}
.kid-playbar{margin-bottom:8px;padding:5px 6px;background:transparent;border:none;box-shadow:none}
.kid-playbar .kid-tool-buttons{justify-content:center}
@media(min-width:771px) and (max-width:1160px){
 .sidebar.right .fantasy-picker{grid-column:1/-1;grid-row:auto;margin-bottom:2px}
 .sidebar.right .piece-style-options{grid-template-columns:repeat(5,minmax(0,1fr))}
 .sidebar.right .piece-counter{grid-column:1;grid-row:auto}
 .sidebar.right .total-completed{grid-column:1/-1;grid-row:auto}
}
@media(max-width:770px){
 .sidebar.right .piece-style-options{grid-template-columns:repeat(5,minmax(0,1fr))}
}
@media(max-width:450px){
 .sidebar.right .piece-style-options{grid-template-columns:repeat(3,minmax(0,1fr))}
 .sidebar.right .piece-style{min-height:76px}
 .sidebar.right .piece-style img{height:45px;max-height:45px}
}


/* V18: eight transparent fantasy choices, with unclipped piece art. */
.sidebar.right .fantasy-picker{margin:4px 0 10px;padding:11px 9px 10px}
.sidebar.right .piece-style-options{
 display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;
 gap:5px!important;
}
.sidebar.right .piece-style{
 min-width:0;min-height:62px!important;aspect-ratio:0.94/1;
 display:flex;align-items:center;justify-content:center;
 padding:5px!important;margin:0;overflow:hidden!important;
 border-radius:10px;
}
.sidebar.right .piece-style img{
 display:block!important;object-fit:contain!important;object-position:center center!important;
 width:100%!important;height:100%!important;min-width:0;min-height:0;
 max-width:100%!important;max-height:100%!important;
 padding:2px!important;box-sizing:border-box!important;
 filter:drop-shadow(0 1px 2px #0008);
}
.sidebar.right .piece-style span{display:none!important}
.sidebar.right .kid-studio{
 display:block;max-width:100%;min-width:0;width:100%;margin:0 0 14px;
 overflow:hidden;border-radius:12px;
}
.sidebar.right .kid-studio>summary{padding:11px 10px;font-size:12px;gap:6px;flex-wrap:nowrap}
.sidebar.right .kid-studio>summary small{font-size:9px;white-space:nowrap}
.sidebar.right .customizer{margin:0;padding:9px 7px;max-width:100%;width:100%;min-width:0;border:0;box-shadow:none}
.sidebar.right .sound-row{display:flex;align-items:center;justify-content:space-between;gap:6px;padding:0;margin:0;background:none;border:0;flex-wrap:wrap}
.sidebar.right .sound-label{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
.sidebar.right #soundSelect{flex:1 1 100%;max-width:100%;min-width:0;width:100%;font-size:11px}
.sidebar.right #previewSound,.sidebar.right #soundButtonInline{flex:1 1 calc(50% - 4px);min-width:0;max-width:none;padding:8px 4px;font-size:10px;white-space:normal}
.sidebar.right .volume-label{flex:1 1 100%;white-space:normal;font-size:11px}
.sidebar.right #soundVolume{width:100%;flex:1 1 100%;margin:0;max-width:100%}
@media(min-width:771px) and (max-width:1160px){
  .sidebar.right .kid-studio{grid-column:1/-1;grid-row:auto}
  .sidebar.right .piece-style-options{grid-template-columns:repeat(8,minmax(0,1fr))!important}
  .sidebar.right .piece-style{min-height:65px!important;aspect-ratio:1/1}
}
@media(max-width:770px){
  .sidebar.right .piece-style-options{grid-template-columns:repeat(4,minmax(0,1fr))!important}
  .sidebar.right .piece-style{min-height:76px!important;aspect-ratio:1/1}
}
@media(max-width:400px){
  .sidebar.right .piece-style{min-height:59px!important;padding:4px!important}
}


/* V21 - clean silhouettes with true padding, no clipped selector images. */
.sidebar.right .piece-style{overflow:visible!important;isolation:isolate!important}
.sidebar.right .piece-style img{
 display:block!important;max-width:calc(100% - 5px)!important;max-height:calc(100% - 5px)!important;
 width:calc(100% - 5px)!important;height:calc(100% - 5px)!important;
 padding:0!important;object-fit:contain!important;object-position:center!important;
 overflow:visible!important;filter:drop-shadow(0px 1px 1px rgba(0,0,0,.3))!important;
}
.board .tile > .fantasy-piece{object-fit:contain!important;object-position:center!important}
.piece-hover-preview img{object-fit:contain!important;object-position:center!important}


/* V20: true clean fantasy chooser with larger full pieces and more breathing room. */
@media (min-width:1161px){
  .game-layout{grid-template-columns:minmax(210px,250px) minmax(0,1fr) minmax(300px,350px)}
}
.sidebar.right .fantasy-picker{
  margin:6px 0 14px!important;
  padding:14px 12px 13px!important;
  background:linear-gradient(180deg,rgba(11,22,52,.62),rgba(8,18,44,.92))!important;
  border:1px solid rgba(255,224,151,.30)!important;
  border-radius:15px!important;
}
.sidebar.right .fantasy-picker h3{
  margin:0 0 12px!important;
  font-size:15px!important;
}
.sidebar.right .piece-style-options{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:10px!important;
  align-items:stretch!important;
}
.sidebar.right .piece-style{
  min-width:0!important;
  min-height:132px!important;
  aspect-ratio:auto!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  padding:10px 7px!important;
  margin:0!important;
  overflow:visible!important;
  border:2px solid rgba(127,153,188,.72)!important;
  border-radius:14px!important;
  background:linear-gradient(180deg,rgba(43,61,97,.95),rgba(18,31,58,.98))!important;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.05), 0 6px 14px rgba(0,0,0,.18)!important;
}
.sidebar.right .piece-style:hover{
  border-color:#a5e7f0!important;
  transform:translateY(-1px)!important;
}
.sidebar.right .piece-style[aria-pressed="true"]{
  border-color:#ffe4a0!important;
  background:linear-gradient(180deg,rgba(63,85,115,.98),rgba(26,49,73,.98))!important;
  box-shadow:inset 0 0 0 1px #f5d4a4,0 0 0 2px rgba(245,212,164,.12),0 8px 16px rgba(0,0,0,.20)!important;
}
.sidebar.right .piece-style img{
  display:block!important;
  width:100%!important;
  height:104px!important;
  max-width:104px!important;
  max-height:104px!important;
  object-fit:contain!important;
  object-position:center center!important;
  padding:2px!important;
  box-sizing:border-box!important;
  filter:drop-shadow(0 2px 4px rgba(0,0,0,.55))!important;
}
.sidebar.right .piece-style span{display:none!important}
@media (min-width:771px) and (max-width:1160px){
  .sidebar.right .fantasy-picker{grid-column:1/-1!important}
  .sidebar.right .piece-style-options{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:8px!important}
  .sidebar.right .piece-style{min-height:112px!important;padding:8px 6px!important}
  .sidebar.right .piece-style img{height:86px!important;max-width:86px!important;max-height:86px!important}
}
@media (max-width:770px){
  .sidebar.right .piece-style-options{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:7px!important}
  .sidebar.right .piece-style{min-height:102px!important;padding:7px 4px!important}
  .sidebar.right .piece-style img{height:78px!important;max-width:78px!important;max-height:78px!important}
}
@media (max-width:450px){
  .sidebar.right .piece-style-options{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:6px!important}
  .sidebar.right .piece-style{min-height:96px!important}
  .sidebar.right .piece-style img{height:70px!important;max-width:70px!important;max-height:70px!important}
}


/* V21 full-silhouette source repairs, transparent edges, no cropped piece art */
.sidebar.right .piece-style img {object-fit:contain!important;image-rendering:auto!important;filter:drop-shadow(0 1px 2px rgba(0,0,0,.35))!important;}
.board .tile .fantasy-piece {object-fit:contain!important;object-position:center center!important;}

/* V22: transparent piece-only mouse over, precisely centered on the actual piece. */
.piece-hover-preview{
  position:fixed!important;
  transform:translate(-50%, -50%)!important;
  transform-origin:50% 50%!important;
  pointer-events:none!important;
  margin:0!important;padding:0!important;
  background:transparent!important;border:0!important;
  box-shadow:none!important;outline:0!important;
  transition:none!important;animation:none!important;
}
.piece-hover-preview>img{
  object-fit:contain!important;
  object-position:center center!important;
  background:transparent!important;
  border:0!important;box-shadow:none!important;
  transition:none!important;animation:none!important;
}
@media(hover:none),(pointer:coarse){
  .piece-hover-preview{display:none!important}
}

/* V23 polish: a modestly smaller fantasy chooser with complete silhouettes. */
.sidebar.right .fantasy-picker{padding:12px 10px 11px!important;margin:5px 0 12px!important}
.sidebar.right .piece-style-options{gap:8px!important}
.sidebar.right .piece-style{min-height:119px!important;padding:8px 6px!important}
.sidebar.right .piece-style img{height:94px!important;max-height:94px!important;max-width:94px!important;object-fit:contain!important;object-position:center center!important}
.board .tile.light{background-image:var(--gpc-light-tile)!important}
.board .tile.dark{background-image:var(--gpc-dark-tile)!important}
@media (min-width:771px) and (max-width:1160px){
 .sidebar.right .piece-style-options{gap:7px!important}
 .sidebar.right .piece-style{min-height:104px!important;padding:7px 5px!important}
 .sidebar.right .piece-style img{height:80px!important;max-height:80px!important;max-width:80px!important}
}
@media (max-width:770px){
 .sidebar.right .piece-style-options{gap:6px!important}
 .sidebar.right .piece-style{min-height:94px!important;padding:6px 4px!important}
 .sidebar.right .piece-style img{height:72px!important;max-height:72px!important;max-width:72px!important}
}
@media (max-width:450px){
 .sidebar.right .piece-style-options{gap:5px!important}
 .sidebar.right .piece-style{min-height:89px!important;padding:5px 3px!important}
 .sidebar.right .piece-style img{height:66px!important;max-height:66px!important;max-width:66px!important}
}

/* V26 drag-to-capture: clean artwork; keep exact-center mouse hover unchanged. */
#boardBadge:empty{display:none!important}
.board .tile{touch-action:none;}
.board .tile .fantasy-piece{user-select:none;-webkit-user-drag:none;}
.board .tile.drag-origin > img.fantasy-piece{opacity:.16!important;}
.board .tile.drag-target{outline:3px solid rgba(255,236,167,.9);outline-offset:-4px;z-index:3;}
.piece-drag-ghost{
  position:fixed;z-index:100100;pointer-events:none!important;touch-action:none;
  display:block;object-fit:contain;object-position:center center;
  background:transparent!important;border:0!important;padding:0!important;margin:0!important;
  filter:drop-shadow(0 5px 5px rgba(6,15,38,.46));
  transform:translate(-50%,-50%);user-select:none;-webkit-user-drag:none;
}

/* V27 — neutral flat chessboard, compact 8-piece chooser, and single-row sticker/timer. */
.world-gallery,.world-art{display:none!important}
.board-stage{
  display:block!important;position:relative!important;
  width:100%!important;max-width:590px!important;aspect-ratio:auto!important;
  margin:0 auto 6px!important;padding:8px!important;
  border:4px solid #e8c78d!important;border-radius:12px!important;
  background:#192c4f!important;overflow:visible!important;
  box-shadow:0 6px 17px rgba(0,0,0,.33),inset 0 0 0 1px #40536d!important;
}
.board-stage .board{
  position:relative!important;left:auto!important;top:auto!important;
  transform:none!important;perspective:none!important;
  width:100%!important;max-width:none!important;aspect-ratio:1/1!important;
  margin:0!important;border:2px solid #283954!important;
  border-radius:4px!important;box-shadow:none!important;
}
.board .tile.light{background-image:none!important;background-color:#f3dfb6!important}
.board .tile.dark{background-image:none!important;background-color:#a87e60!important}
.kid-playbar{
  width:100%!important;max-width:590px!important;
  margin:2px auto 12px!important;padding:4px 3px!important;
  display:flex!important;align-items:center!important;
  justify-content:space-between!important;
  gap:clamp(16px,4vw,48px)!important;flex-wrap:nowrap!important;
}
.kid-playbar .kid-tool-buttons{
  display:flex!important;flex:0 0 auto!important;
  justify-content:flex-start!important;align-items:center!important;
  width:auto!important;margin:0!important;
}
.kid-playbar #kidStickersButton{white-space:nowrap!important;min-height:41px!important;padding:9px 13px!important}
.kid-playbar #timerBox{flex:0 0 auto!important;margin-left:auto!important;min-width:94px!important;padding:7px 12px!important}
.kid-playbar #timerBox strong{font-size:20px!important;line-height:1.2!important}
@media(min-width:1161px){
 .game-layout{grid-template-columns:minmax(195px,240px) minmax(0,1fr) minmax(214px,246px)!important}
}
.sidebar.right .fantasy-picker{
  width:100%!important;max-width:290px!important;
  padding:10px 8px!important;margin:5px 0 12px!important;
}
.sidebar.right .fantasy-picker h3{font-size:12px!important;margin:0 0 9px!important}
.sidebar.right .piece-style-options{
  display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:6px!important;align-items:center!important;
}
.sidebar.right .piece-style{
  min-width:0!important;min-height:55px!important;height:55px!important;
  aspect-ratio:auto!important;padding:3px!important;margin:0!important;
  border-radius:9px!important;overflow:visible!important;
}
.sidebar.right .piece-style img{
  display:block!important;width:min(100%,45px)!important;height:45px!important;
  max-width:45px!important;max-height:45px!important;
  padding:0!important;margin:auto!important;object-fit:contain!important;
  object-position:center center!important;
}
@media(min-width:771px) and (max-width:1160px){
 .sidebar.right .fantasy-picker{grid-column:1/-1!important;justify-self:start!important}
}
@media(max-width:770px){
 .sidebar.right .fantasy-picker{margin:5px auto 12px!important}
 .kid-playbar{flex-wrap:nowrap!important}
}
@media(max-width:480px){
 .board-stage{padding:5px!important;border-width:3px!important;border-radius:9px!important}
 .board-stage .board{width:100%!important;transform:none!important;border-width:1px!important}
 .kid-playbar{gap:14px!important;padding:3px 2px!important}
 .kid-playbar #kidStickersButton{font-size:11px!important;padding:8px 10px!important}
 .kid-playbar #timerBox{min-width:85px!important;padding:6px 9px!important}
 .kid-playbar #timerBox strong{font-size:18px!important}
 .sidebar.right .piece-style-options{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:5px!important}
 .sidebar.right .piece-style{min-height:53px!important;height:53px!important}
 .sidebar.right .piece-style img{height:41px!important;max-height:41px!important;max-width:41px!important}
}

/* V28: Keep Stickers and ELAPSED together in the right-hand column next to the board.
   At narrower widths put them at the upper-right of the board, never BELOW the game. */
@media (min-width:1161px){
  .game-layout .sidebar.right{position:sticky!important;top:12px!important;align-self:start!important}
  .sidebar.right .kid-playbar{
    display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important;
    width:100%!important;max-width:100%!important;
    margin:10px 0 14px!important;padding:8px 0 11px!important;
    justify-content:space-between!important;align-items:center!important;
    gap:10px!important;border:0!important;
    border-top:1px solid rgba(236,215,172,.23)!important;
    border-bottom:1px solid rgba(236,215,172,.23)!important;
    border-radius:0!important;background:transparent!important;box-shadow:none!important;
  }
  .sidebar.right .kid-playbar .kid-tool-buttons{flex:0 1 auto!important;min-width:0!important}
  .sidebar.right .kid-playbar #kidStickersButton{
    min-width:0!important;min-height:39px!important;padding:7px 7px!important;
    font-size:11px!important;line-height:1.15!important;white-space:nowrap!important;
  }
  .sidebar.right .kid-playbar #timerBox{
    flex:0 0 auto!important;min-width:79px!important;margin:0!important;
    padding:5px 7px!important;
  }
  .sidebar.right .kid-playbar #timerBox strong{font-size:18px!important;line-height:1.2!important}
  .sidebar.right .kid-playbar #timerLabel{font-size:9px!important;letter-spacing:.12em!important}
}
@media (max-width:1160px){
  .arena .kid-playbar{
    display:flex!important;flex-wrap:nowrap!important;flex-direction:row!important;
    justify-content:flex-end!important;align-items:center!important;
    gap:clamp(18px,4vw,34px)!important;
    width:100%!important;max-width:590px!important;
    margin:1px auto 11px!important;padding:4px 1px!important;
    border:0!important;background:transparent!important;box-shadow:none!important;
  }
  .arena .kid-playbar .kid-tool-buttons{flex:0 0 auto!important;width:auto!important}
  .arena .kid-playbar #timerBox{flex:0 0 auto!important;margin-left:0!important}
}

/* V29: rectangular boards + challenge hub */
.board{grid-template-columns:repeat(var(--cols,4),minmax(0,1fr))!important;aspect-ratio:auto!important;max-width:min(100%,640px)!important;margin:0 auto!important}
.board-stage .board{aspect-ratio:auto!important;height:auto!important;}
.tile{aspect-ratio:1/1!important}
.challenge-box{margin-top:16px;padding:14px 14px 12px;border-radius:18px;background:rgba(9,16,30,.42);border:1px solid rgba(236,215,172,.18);box-shadow:0 10px 24px rgba(0,0,0,.18)}
.panel-title.small{font-size:1.02rem;margin:0 0 10px}
.challenge-buttons{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.challenge-btn{border:1px solid rgba(236,215,172,.25);background:linear-gradient(180deg,rgba(255,255,255,.09),rgba(255,255,255,.03));color:#fff;border-radius:14px;padding:10px 10px;font:inherit;font-weight:700;cursor:pointer;transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease}
.challenge-btn:hover,.challenge-btn:focus-visible{transform:translateY(-1px);border-color:rgba(255,215,130,.48);box-shadow:0 8px 18px rgba(0,0,0,.2)}
.challenge-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:12px}
.challenge-stat{padding:10px 9px;border-radius:14px;background:rgba(255,255,255,.05);border:1px solid rgba(236,215,172,.15)}
.challenge-stat span,.challenge-stat small{display:block}
.challenge-stat span{font-size:.72rem;letter-spacing:.08em;text-transform:uppercase;opacity:.75}
.challenge-stat strong{display:block;font-size:1.08rem;margin-top:4px}
.challenge-stat small{margin-top:4px;opacity:.78;line-height:1.25}
@media (max-width:720px){.challenge-buttons{grid-template-columns:1fr}.challenge-stats{grid-template-columns:1fr}}

/* V29 Challenge Hub layout correction: contained inside the wide playable area. */
.arena .challenge-box{
  box-sizing:border-box;width:100%;min-width:0;max-width:100%;
  margin:18px 0 0;padding:17px 18px 18px;
  overflow:hidden;border-radius:18px;
  border:1px solid rgba(233,211,160,.33);
  background:linear-gradient(150deg,rgba(9,21,46,.85),rgba(18,32,61,.84));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.05),0 8px 19px rgba(1,9,25,.16)
}
.arena .challenge-head{display:flex;align-items:end;justify-content:space-between;flex-wrap:wrap;gap:4px 16px;margin-bottom:13px}
.arena .challenge-heading-text{min-width:0}
.arena .challenge-heading-text .section-eyebrow{margin:0 0 5px;font-size:10px;letter-spacing:.17em}
.arena .challenge-head .panel-title.small{margin:0;font-size:20px;line-height:1.25}
.arena .challenge-intro{margin:0;max-width:360px;font-size:11px;color:#c5d4e7;line-height:1.45}
.arena .challenge-buttons{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:9px!important;min-width:0;max-width:100%;margin:0;padding:0}
.arena .challenge-btn{box-sizing:border-box;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;
  min-width:0;width:100%;min-height:79px;margin:0;padding:10px 6px;
  border:1px solid rgba(235,208,152,.25);border-radius:12px;
  background:linear-gradient(160deg,rgba(74,101,137,.28),rgba(43,62,105,.34));
  color:#fff1d1;text-align:center;font-size:12px;font-weight:800;line-height:1.3;
  white-space:normal;overflow-wrap:break-word;hyphens:auto;
}
.arena .challenge-btn:focus-visible{outline:3px solid #76f4d1;outline-offset:2px}
.arena .challenge-icon{font-size:22px;line-height:1;display:block;flex:0 0 auto}
.arena .challenge-stats{box-sizing:border-box;display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;
  min-width:0;max-width:100%;gap:9px!important;margin-top:11px!important}
.arena .challenge-stat{box-sizing:border-box;min-width:0;min-height:78px;padding:11px 12px;border-radius:12px;
  background:rgba(12,25,51,.62);border:1px solid rgba(207,227,255,.12);overflow-wrap:break-word;
}
.arena .challenge-stat span{display:block;font-size:10px;letter-spacing:.06em;font-weight:800;line-height:1.45;color:#c2d6e8;text-transform:uppercase;opacity:1}
.arena .challenge-stat strong{display:block;margin:5px 0 0;font-size:20px;line-height:1.25;color:#ffda8c;white-space:normal;overflow-wrap:break-word}
.arena .challenge-stat small{display:block;margin:3px 0 0;font-size:10px;line-height:1.4;color:#c2d6e8;opacity:1}
.arena .challenge-stat small b{font-weight:900;color:#fff2d5}
@media(max-width:1050px){.arena .challenge-buttons{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
@media(max-width:650px){
  .arena .challenge-box{margin-top:13px;padding:14px 12px 14px;border-radius:14px}
  .arena .challenge-head .panel-title.small{font-size:18px}
  .arena .challenge-intro{max-width:none;width:100%;font-size:11px}
  .arena .challenge-buttons{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
  .arena .challenge-btn{min-height:73px;padding:8px 4px;font-size:11px}
  .arena .challenge-icon{font-size:20px}
  .arena .challenge-stats{grid-template-columns:minmax(0,1fr)!important;gap:7px!important}
  .arena .challenge-stat{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto auto;column-gap:12px;
    align-items:center;min-height:0;padding:9px 11px}
  .arena .challenge-stat span{grid-column:1;grid-row:1;font-size:10px}
  .arena .challenge-stat strong{grid-column:2;grid-row:1/span 2;margin:0;max-width:125px;font-size:16px;text-align:right}
  .arena .challenge-stat small{grid-column:1;grid-row:2;font-size:10px;margin-top:4px}
}

/* V29 Challenge Hub puzzle counts: clearly aligned beneath each button's name. */
.arena .challenge-btn{
  min-height:107px!important;
  padding:12px 8px!important;
  gap:5px!important;
}
.arena .challenge-btn .challenge-name{
  display:block;max-width:100%;font-size:12px;font-weight:850;
  line-height:1.28;color:#fff0d0;
}
.arena .challenge-btn .challenge-count{
  display:block;max-width:100%;margin-top:1px;
  font-size:10px;font-weight:750;line-height:1.35;
  letter-spacing:0;color:#9debd5;white-space:normal;
  overflow-wrap:break-word;
}
.arena .challenge-pool-note{
  margin:9px 2px 0;color:#a9bfd5;
  font-size:10px;line-height:1.4;text-align:center;
}
@media(max-width:650px){
  .arena .challenge-btn{min-height:107px!important;padding:9px 4px!important;gap:5px!important;}
  .arena .challenge-btn .challenge-name{font-size:11px;}
  .arena .challenge-btn .challenge-count{font-size:10px;}
  .arena .challenge-pool-note{font-size:10px;text-align:left;}
}
/* V30 Quest Center: isolated scoped responsive layout, no changes to board, timer, or stickers */
.arena .v30-center{box-sizing:border-box;width:100%;min-width:0;margin:16px 0 0;padding:16px;border:1px solid rgba(230,207,158,.32);border-radius:18px;background:linear-gradient(150deg,rgba(10,30,60,.83),rgba(17,37,58,.83));color:#fff4dc;overflow:hidden}
.v30-center-head{display:flex;align-items:center;justify-content:space-between;gap:13px;flex-wrap:wrap;margin-bottom:12px}
.v30-center-head>div:first-child{flex:1 1 220px;min-width:0}
.v30-center-head .section-eyebrow{margin:0 0 4px;color:#ffdb8c;font-size:10px;letter-spacing:.12em}
.v30-center-head h3{font:800 22px/1.1 Georgia,serif;margin:0 0 5px;color:#ffdd97}
.v30-center-head p{margin:0;color:#c3d6e7;font-size:11px;line-height:1.45}
.v30-mascot{flex:0 1 185px;display:flex;align-items:center;gap:8px;padding:8px;border:1px solid rgba(242,214,141,.22);border-radius:12px;background:rgba(7,23,43,.55);font-size:11px;line-height:1.4;color:#ffe9ba}
.v30-knight{font-size:30px;color:#ffd785;text-shadow:0 3px 10px #b76432}
.v30-quick-actions{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}
.v30-action{box-sizing:border-box;width:100%;min-width:0;min-height:44px;border-radius:11px;border:1px solid rgba(255,234,183,.28);color:#fff0d6;background:rgba(79,103,128,.38);font-size:11px;line-height:1.35;font-weight:800;padding:9px 5px;cursor:pointer;overflow-wrap:anywhere}
.v30-action.v30-primary{background:linear-gradient(125deg,#f5c876,#edab64);border-color:#ffe6a4;color:#3c2940}
.v30-action[disabled]{opacity:.5;cursor:not-allowed}
.v30-action:focus-visible,.v30-center button:focus-visible,.v30-center select:focus-visible{outline:3px solid #79f3cd;outline-offset:2px}
.v30-options{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin:11px 0}
.v30-options>label{font-size:11px;font-weight:800;color:#e4eacb;min-width:0}
.v30-options select{box-sizing:border-box;display:block;width:100%;margin-top:5px;padding:9px 10px;border-radius:10px;border:1px solid rgba(242,213,167,.3);color:#fff;background:#17274d;font-size:12px;min-width:0}
.v30-no-undo-label{display:flex;align-items:center;gap:9px;padding:8px 10px;border-radius:10px;background:rgba(20,43,70,.54);border:1px solid rgba(242,213,167,.2);cursor:pointer}
.v30-no-undo-label input{accent-color:#e5bc67;flex:none;width:18px;height:18px}
.v30-no-undo-label small{display:block;font-weight:400;margin-top:3px;line-height:1.3;color:#bdd3e4}
.v30-sections{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;align-items:start}
.v30-feature{min-width:0;max-width:100%;box-sizing:border-box;border-radius:12px;border:1px solid rgba(196,215,237,.18);background:rgba(7,21,44,.52);overflow:hidden}
.v30-feature.v30-wide{grid-column:1/-1}
.v30-feature>summary{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:11px 12px;cursor:pointer;color:#ffe0a5;font-size:12px;font-weight:850;list-style:none}
.v30-feature>summary::-webkit-details-marker{display:none}
.v30-feature>summary:before{content:'+';width:18px;flex:none;font-size:17px;color:#83e2c7}
.v30-feature[open]>summary:before{content:'−'}
.v30-feature>summary small{margin-left:auto;color:#b7d0e6;font-size:10px;font-weight:550;text-align:right}
.v30-feature-description{margin:0 12px 10px;font-size:11px;line-height:1.55;color:#bed0e0}
.v30-map-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin:0 10px 11px}
.v30-kingdom{min-width:0;min-height:88px;padding:8px 4px;border:1px solid rgba(255,208,137,.24);border-radius:11px;background:linear-gradient(160deg,#1c4262,#162b4b);color:#ffebbb;cursor:pointer;font-size:10px;line-height:1.25;text-align:center}
.v30-kingdom .v30-kingdom-icon{display:block;font-size:22px;margin-bottom:3px}
.v30-kingdom strong,.v30-kingdom small{display:block;overflow-wrap:anywhere}
.v30-kingdom strong{font-size:10px}
.v30-kingdom small{font-size:9px;margin-top:4px;color:#b9dbd8}
.v30-kingdom[data-active=true]{outline:2px solid #8df0bc}
.v30-treasure-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:0 10px 10px}
.v30-chest{min-width:0;padding:9px;border:1px solid rgba(255,221,165,.22);border-radius:10px;background:#142d4c;color:#ffebbd;text-align:center;cursor:pointer;font-size:11px}
.v30-chest[disabled]{filter:saturate(.38);opacity:.72;cursor:default}
.v30-chest strong,.v30-chest small{display:block}.v30-chest>span{font-size:26px;display:block}.v30-chest small{font-size:10px;line-height:1.35;color:#bad2d9;margin-top:4px}
.v30-hint{margin:0 10px 10px;color:#a9d9cb;font-size:11px;line-height:1.45}
.v30-records-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:0 10px 11px}
.v30-record{padding:9px;border-radius:10px;background:#193552;min-width:0;overflow-wrap:anywhere}
.v30-record small{display:block;color:#bdd3db;font-size:10px;line-height:1.3}
.v30-record b{display:block;font-size:17px;color:#ffe09d;margin-top:4px}
.v30-favorite-list{display:grid;gap:7px;padding:0 10px 11px}
.v30-favorite-item{display:flex;gap:6px;align-items:center;min-width:0}
.v30-favorite-item button{font-size:11px;padding:8px 9px;line-height:1.3;border-radius:9px;border:1px solid rgba(255,215,148,.25);color:#ffe6a2;background:#1b3c57;cursor:pointer}
.v30-favorite-item .v30-fav-open{flex:1;min-width:0;text-align:left;overflow-wrap:anywhere}
.v30-ladder{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;padding:0 10px 11px}
.v30-ladder-region{min-width:0;padding:9px;border-radius:10px;border:1px solid rgba(232,212,170,.23);background:#162d49}
.v30-ladder-region strong{display:block;font-size:11px;color:#ffdf9d;margin-bottom:8px}
.v30-ladder-rounds{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:3px}
.v30-ladder-rounds button{min-width:0;border:1px solid rgba(254,214,140,.23);border-radius:7px;padding:6px 0;color:#c8dbe7;background:#29415c;font-size:10px;font-weight:700;cursor:pointer}
.v30-ladder-rounds button[disabled]{opacity:.43;cursor:not-allowed}
.v30-ladder-rounds button[data-done=true]{background:#247e66;color:#eaffdb}
.v30-ladder-rounds button[data-now=true]{background:#c99a51;color:#1f2430}
.v30-footnote{margin-top:10px;color:#afd3d0;font-size:11px;line-height:1.4;min-height:1.2em}
.v30-replay-overlay[hidden]{display:none!important}
.v30-replay-overlay{position:fixed;inset:0;z-index:25000;background:rgba(2,9,25,.86);display:flex;align-items:center;justify-content:center;overflow-y:auto;padding:16px;box-sizing:border-box}
.v30-replay-card{box-sizing:border-box;width:min(92vw,500px);max-height:calc(100vh - 25px);overflow:auto;background:#102544;border:1px solid #d7b277;border-radius:16px;box-shadow:0 15px 55px #0009;color:#fff6df;padding:15px}
.v30-replay-header{display:flex;align-items:center;justify-content:space-between;gap:12px}
.v30-replay-header h3{margin:0;color:#f3d38b;font-size:20px}
.v30-replay-header button,.v30-replay-actions button{border:1px solid #8aa6aa;color:#fff2d7;border-radius:10px;background:#294563;padding:9px 10px;cursor:pointer;font-size:12px}
.v30-replay-card .v30-feature-description{margin:10px 0}
.v30-replay-board{display:grid;grid-template-columns:repeat(var(--v30cols,4),minmax(0,1fr));max-width:min(70vw,350px);margin:0 auto;border:3px solid #6f4e34;border-radius:6px;overflow:hidden;aspect-ratio:var(--v30cols,4)/var(--v30rows,4)}
.v30-replay-square{aspect-ratio:1/1;display:grid;place-items:center;position:relative}
.v30-replay-square[data-dark=true]{background:#9c7852}
.v30-replay-square[data-dark=false]{background:#f0dfbb}
.v30-replay-square img{width:84%;height:84%;object-fit:contain;pointer-events:none}
.v30-replay-step{text-align:center;font-size:12px;color:#fff3cc;margin:12px 0;min-height:1.4em}
.v30-replay-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}
@media(max-width:900px){.v30-ladder{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:650px){.arena .v30-center{padding:12px 10px;border-radius:13px}.v30-center-head h3{font-size:20px}.v30-mascot{flex:1 1 100%;max-width:none}.v30-quick-actions{grid-template-columns:repeat(2,minmax(0,1fr))}.v30-options{grid-template-columns:1fr}.v30-sections{grid-template-columns:minmax(0,1fr)}.v30-feature.v30-wide{grid-column:1}.v30-map-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.v30-ladder{grid-template-columns:repeat(2,minmax(0,1fr))}.v30-replay-card{width:100%;padding:12px}}
@media(max-width:350px){.v30-map-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.v30-ladder{grid-template-columns:1fr}}


/* V31 visual redesign: the Grandmaster Arena replaces the dense Quest Center. */
.arena .v30-center.v31-arena{overflow:hidden;padding:0;margin-top:16px;border:1px solid rgba(255,216,129,.35);border-radius:18px;background:linear-gradient(145deg,#0c162b 0%,#14213d 56%,#0c2237 100%);box-shadow:0 18px 45px #02081666;color:#f9ecd4}
.v31-arena *{box-sizing:border-box}
.v31-arena-hero{display:flex;align-items:center;gap:14px;padding:21px 20px 18px;background:radial-gradient(circle at 82% 4%,rgba(255,205,107,.13),transparent 43%),linear-gradient(112deg,#101d3c,#162946 75%);border-bottom:1px solid rgba(255,218,149,.2)}
.v31-crest{flex:0 0 67px;height:67px;border-radius:18px;display:grid;place-items:center;font-family:Georgia,serif;font-size:52px;color:#f8d493;background:linear-gradient(145deg,#584028,#231c2b);border:1px solid #b99962;box-shadow:inset 0 0 14px #f1ce8433,0 5px 17px #0007}
.v31-arena-title{flex:1 1 200px;min-width:0}
.v31-eyebrow{margin:0 0 4px!important;font-size:10px!important;letter-spacing:.19em;font-weight:900;color:#ecc277!important}
.v31-arena-title h3{font-family:Georgia,serif;margin:0 0 5px;color:#ffe5af;font-size:clamp(21px,2.2vw,31px);line-height:1.06;letter-spacing:.015em}
.v31-arena-title>p:last-child{margin:0;color:#d7dfeb;font-size:12px;line-height:1.45}
.v31-coach{flex:0 0 154px;max-width:154px;min-width:0!important;margin:0!important;background:#09182c99;border-color:#bb99583b;min-height:54px;display:flex;align-items:center;gap:8px;padding:8px;border-radius:12px;font-size:10px;color:#ffedcb}
.v31-coach .v30-knight{font-size:26px}
.v31-arena-facts{display:flex;flex-wrap:wrap;justify-content:space-around;gap:8px;padding:10px 14px;background:#080f20;border-bottom:1px solid #d3a65c33}
.v31-arena-facts span{font-size:10px;color:#b8c8dd;letter-spacing:.08em;text-transform:uppercase;display:flex;align-items:center;gap:5px}
.v31-arena-facts b{font-size:17px;color:#f6cd86;letter-spacing:0}
.v31-trials{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));align-items:stretch;gap:11px;padding:17px}
.v31-trial{display:flex;flex-direction:column;min-width:0;gap:8px;border-radius:14px;border:1px solid #7892ab55;background:linear-gradient(160deg,#263b52 0%,#142239 90%);padding:16px 13px 13px;box-shadow:0 8px 22px #02091666}
.v31-trial-steel{border-color:#a6bacc77;background:linear-gradient(160deg,#243d4e,#101d35)}
.v31-trial-dragon{border-color:#d48f6280;background:linear-gradient(160deg,#4a2836,#1a1830 94%)}
.v31-trial-crown{border-color:#ffd67f88;background:linear-gradient(165deg,#423453,#1c1939 92%);box-shadow:0 10px 25px #7b4c5c2e}
.v31-trial-overline{display:flex;align-items:center;justify-content:space-between;gap:5px;color:#bcd4e5;font-size:9px;font-weight:900;letter-spacing:.13em}
.v31-trial-overline span:last-child{font-size:27px;letter-spacing:0}
.v31-trial-dragon .v31-trial-overline{color:#ffd0b2}.v31-trial-crown .v31-trial-overline{color:#ffe4a7}
.v31-trial h4{margin:1px 0 0;font-size:clamp(14px,1.5vw,18px);font-weight:900;line-height:1.19;color:#fff0d4;font-family:Georgia,serif}
.v31-trial>p{margin:0;color:#d0dced;font-size:10.5px;line-height:1.44;min-height:31px}
.v31-trial-rule{display:flex;flex-direction:column;align-items:flex-start;gap:1px;border-top:1px solid #ffffff20;border-bottom:1px solid #ffffff20;padding:10px 0}
.v31-trial-rule strong{font-size:28px;font-weight:900;line-height:1.05;color:#f5d69c;font-variant-numeric:tabular-nums}
.v31-trial-rule span{font-size:10px;color:#bdd0df;line-height:1.2}
.v31-trial-stats{display:flex;flex-wrap:wrap;align-items:center;gap:5px 8px;color:#f8e5c7;font-size:10px;font-weight:750}
.v31-trial-stats span{background:#07152566;padding:5px 7px;border-radius:6px;border:1px solid #ffffff15}
.v31-trial-pool{font-size:10px;color:#b9d6e4;letter-spacing:.005em;min-height:1em}
.v31-trial-play{margin-top:auto;display:flex;justify-content:space-between;align-items:center;gap:5px;width:100%;border:1px solid #dbd0bc;border-radius:10px;background:linear-gradient(100deg,#d1dde7,#91adc7);padding:10px 9px;color:#13243b;font-size:11px;font-weight:900;text-align:left;cursor:pointer;min-height:42px}
.v31-trial-dragon .v31-trial-play{color:#3b1c21;background:linear-gradient(100deg,#ffb58e,#e88668);border-color:#ffd8b4}
.v31-trial-crown .v31-trial-play{color:#332030;background:linear-gradient(100deg,#ffe0a1,#efb866);border-color:#ffebbb}
.v31-trial-play:hover{filter:brightness(1.08);transform:translateY(-1px)}
.v31-trial-play:focus-visible{outline:3px solid #97ffcd;outline-offset:2px}
.v31-trial-wins{font-size:10px;line-height:1.2;color:#b5d0df;text-align:center;font-variant-numeric:tabular-nums}
.v31-arena-message{margin:0 17px 16px;border:1px solid #9fb7bd35;background:rgba(13,32,45,.82);color:#d2eedf;padding:10px 12px;border-radius:10px;font-size:11px;line-height:1.5}
.v31-tools{border-top:1px solid #cda36c38;padding:13px 16px 10px;background:#0a1830aa}
.v31-tools-head{display:flex;align-items:baseline;justify-content:space-between;gap:10px;margin:0 0 9px}
.v31-tools-head h4{margin:0;color:#f6d9ab;font-size:13px;font-weight:900;text-transform:uppercase;letter-spacing:.08em}
.v31-tools-head span{color:#b1c4d4;font-size:10px;text-align:right}
.v31-arena .v30-quick-actions{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.v31-arena .v30-action{min-height:37px;border:1px solid #ffffff26;border-radius:9px;background:#263b5a;color:#e8eefa;font-size:10px;font-weight:800;padding:8px 4px;line-height:1.25}
.v31-arena .v30-action.v30-primary{background:#d4a95e;color:#1c2440;border-color:#f4d797}
.v31-arena .v30-action:disabled{opacity:.46}
.v31-arena .v30-options{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:10px 0 0}
.v31-arena .v30-options label{font-size:10px;color:#d9e3eb}
.v31-arena .v30-options select{box-sizing:border-box;width:100%;min-width:0;display:block;border:1px solid #a3bac04a;border-radius:8px;margin:5px 0 0;padding:8px 10px;background:#1b304e;color:#eaf1f7;font-size:11px}
.v31-arena .v30-no-undo-label{display:flex;align-items:center;gap:7px;border:1px solid #ffffff18;border-radius:9px;padding:7px;background:#ffffff09}
.v31-arena .v30-no-undo-label input{flex:0 0 17px;width:17px;height:17px;accent-color:#f0c16e}
.v31-arena .v30-no-undo-label small{display:block;margin-top:2px;font-size:9px;font-weight:400;color:#a6c1d3;line-height:1.3}
.v31-vault{margin:0 16px 12px;border:1px solid #d4aa634c;border-radius:10px;overflow:hidden;background:#12213a}
.v31-vault>summary{list-style:none;cursor:pointer;display:flex;align-items:center;justify-content:space-between;gap:12px;color:#f9e0af;padding:12px 14px;font-size:13px;font-weight:900}
.v31-vault>summary::-webkit-details-marker{display:none}
.v31-vault>summary:before{content:'+';font-size:18px;color:#f4c97a;margin-right:3px}
.v31-vault[open]>summary:before{content:'−'}
.v31-vault>summary small{font-size:10px;color:#b7c6d6;font-weight:500;margin-left:auto;text-align:right}
.v31-vault .v30-sections{padding:0 11px 11px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.v31-vault .v30-feature{background:#0e1b33;min-width:0;border-color:#ffffff22}
.v31-vault .v30-feature>summary{font-size:11px}
.v31-vault .v30-feature>summary small{font-size:9px}
.v31-vault .v30-feature.v30-wide{grid-column:1/-1}
.v31-arena .v30-footnote{padding:0 16px 15px;margin:0;font-size:10px;color:#b4cad2;line-height:1.45}
.v31-arena button:focus-visible,.v31-arena select:focus-visible,.v31-vault summary:focus-visible{outline:3px solid #7be9c9;outline-offset:2px}
@media(max-width:720px){.v31-arena-hero{gap:11px;flex-wrap:wrap;padding:15px 13px}.v31-crest{width:46px;height:46px;flex-basis:46px;font-size:35px;border-radius:12px}.v31-coach{flex:1 1 100%;max-width:none;min-height:auto}.v31-trials{grid-template-columns:minmax(0,1fr);gap:9px;padding:11px}.v31-trial{gap:7px;padding:13px}.v31-trial h4{font-size:19px}.v31-trial>p{min-height:0}.v31-trial-rule{padding:7px 0}.v31-trial-rule strong{font-size:23px}.v31-trial-stats{font-size:10px}.v31-arena-message{margin:0 11px 12px}.v31-tools{padding:12px 11px}.v31-arena .v30-quick-actions{grid-template-columns:repeat(2,minmax(0,1fr))}.v31-arena .v30-options{grid-template-columns:minmax(0,1fr)}.v31-vault{margin:0 11px 12px}.v31-vault .v30-sections{grid-template-columns:minmax(0,1fr)}.v31-vault .v30-feature.v30-wide{grid-column:1}.v31-arena-facts span{font-size:9px}.v31-arena-facts b{font-size:15px}}
@media(max-width:350px){.v31-arena-title h3{font-size:20px}.v31-vault>summary{flex-wrap:wrap}.v31-vault>summary small{flex:1 1 100%;text-align:left;margin-left:17px}}

/* V33 Chess Puzzle Arcade - isolated gameplay; preserve original capture board/sidebar. */
.arena .v30-center.v33-arcade{background:#12233a;border:1px solid rgba(245,202,121,.48);border-radius:18px;margin:18px 0 8px;padding:0;overflow:hidden;width:100%;min-width:0;box-sizing:border-box;box-shadow:0 15px 34px rgba(4,10,30,.25)}
.v33-arcade *{box-sizing:border-box}
.v33-hero{padding:19px 22px;display:flex;align-items:center;gap:15px;color:#fff1d7;background:linear-gradient(112deg,#223c68 0%,#173750 49%,#27505c 100%);border-bottom:3px solid #d9ad62}
.v33-hero-icon{height:62px;width:62px;min-width:62px;border-radius:18px;display:grid;place-items:center;font-family:Georgia,serif;font-size:54px;color:#ffe9b7;background:#e0a94b25;border:1px solid #f6cb777c}
.v33-eyebrow{font-size:10px;letter-spacing:1.2px;font-weight:850;color:#ffce7f;margin:0 0 5px}
.v33-hero h3{font-size:clamp(21px,2.5vw,30px);font-family:Georgia,'Times New Roman',serif;font-weight:800;margin:0 0 6px;color:#fff3da;line-height:1.12}
.v33-hero p:last-child{font-size:12px;max-width:620px;color:#d9e8f3;line-height:1.5;margin:0}
.v33-hero-counter{min-width:106px;text-align:center;margin-left:auto;border:1px solid #d3ceae65;background:#ffffff12;border-radius:14px;padding:10px 12px;flex-shrink:0}
.v33-hero-counter strong{font-size:28px;color:#fff1cf;display:block;font-variant-numeric:tabular-nums}
.v33-hero-counter span{display:block;font-size:10px;color:#dcebf7;line-height:1.2}
.v33-chooser-heading{padding:17px 20px 10px;color:#fff0d3;display:flex;justify-content:space-between;gap:12px;align-items:center;flex-wrap:wrap}
.v33-chooser-heading strong{font-size:12px;letter-spacing:1.1px}
.v33-chooser-heading span{font-size:11px;color:#a9c9df}
.v33-game-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;padding:0 17px 16px}
.v33-game-button{min-width:0;min-height:147px;cursor:pointer;text-align:center;border:1px solid #7999b55b;border-radius:14px;background:linear-gradient(155deg,#20385a,#1b304b);padding:13px 8px 10px;display:flex;align-items:center;flex-direction:column;gap:5px;color:#fff;box-shadow:none;transition:background .16s,border-color .16s,transform .16s;white-space:normal}
.v33-game-button:hover{transform:translateY(-2px);background:#2a4b71;border-color:#f0c477}
.v33-game-button:focus-visible{outline:3px solid #ffe5a0;outline-offset:2px}
.v33-game-button.is-active{border:2px solid #ffd482;background:linear-gradient(140deg,#345c84,#27465e);box-shadow:inset 0 0 0 1px #c59e5680}
.v33-game-emoji{font-family:Georgia,serif;font-size:31px;height:37px;display:flex;align-items:center;justify-content:center;line-height:1}
.v33-game-button strong{font-size:12px;color:#ffe5ae;line-height:1.25;font-weight:850}
.v33-game-button small{font-size:10px;font-weight:500;color:#c9dbea;line-height:1.25}
.v33-game-button em{font-size:9px;font-style:normal;letter-spacing:.3px;font-weight:750;border-radius:99px;background:#f0c87a22;color:#ffdc9d;padding:3px 8px;margin-top:auto}
.v33-play-panel{margin:2px 16px 17px;background:#f8f5ec;border-radius:15px;border:2px solid #f4d69a;overflow:hidden;color:#203a51}
.v33-play-toolbar{display:flex;align-items:center;gap:16px;justify-content:space-between;background:#e9f0f5;padding:15px 16px;border-bottom:1px solid #cfdee5;flex-wrap:wrap}
.v33-active-heading{display:flex;align-items:center;gap:11px;min-width:0}
.v33-active-heading>span{font-size:32px;color:#184878;line-height:1}
.v33-active-heading strong{font-size:19px;font-family:Georgia,serif;color:#183d61;display:block}
.v33-active-heading small{font-size:11px;color:#517187;display:block;line-height:1.3;margin-top:2px}
.v33-toolbar-buttons{display:flex;align-items:center;gap:7px;flex-wrap:wrap}
.v33-toolbar-buttons label{font-size:10px;font-weight:900;letter-spacing:.6px;color:#335470}
.v33-toolbar-buttons select,.v33-toolbar-buttons button,.v33-game-actions button{font:inherit;cursor:pointer;border-radius:9px;border:1px solid #94b1c8;background:white;color:#183f65;font-size:12px;font-weight:800;padding:9px 10px;max-width:100%}
.v33-toolbar-buttons button{background:#183f66;color:white;border-color:#183f66}
.v33-toolbar-buttons select:focus-visible,.v33-toolbar-buttons button:focus-visible,.v33-game-actions button:focus-visible,.v33-game-area button:focus-visible{outline:3px solid #e6ae4a;outline-offset:2px}
.v33-instructions{margin:0;padding:12px 16px 8px;color:#465c69;font-size:12px;line-height:1.5}
.v33-scorebar{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:0 15px 14px}
.v33-scorebar>div{background:#eef3f4;border:1px solid #d1dedf;border-radius:10px;padding:8px;text-align:center;min-width:0}
.v33-scorebar span{font-size:9px;letter-spacing:.9px;font-weight:900;color:#597383;display:block}
.v33-scorebar strong{font-size:17px;color:#24485f;display:block;font-variant-numeric:tabular-nums;overflow:hidden;text-overflow:ellipsis}
.v33-game-area{padding:6px 14px 14px;min-height:260px;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:12px}
.v33-board{display:grid;gap:1px;border:4px solid #435e72;background:#435e72;width:min(100%,440px);max-width:440px;user-select:none;touch-action:manipulation;margin:0 auto;aspect-ratio:1}
.v33-board.v33-small-board{width:min(100%,320px);max-width:320px}
.v33-board .v33-cell{min-width:0;min-height:0;aspect-ratio:1/1;border:0;border-radius:0;cursor:pointer;position:relative;display:flex;align-items:center;justify-content:center;padding:0;font-family:Georgia,'Segoe UI Symbol',serif;font-size:clamp(18px,4vw,37px);font-weight:700;line-height:1;color:#1c3042;box-shadow:none;overflow:hidden}
.v33-board .v33-cell.v33-light{background:#f4e7c9}.v33-board .v33-cell.v33-dark{background:#a4c1c8}
.v33-board .v33-cell:focus-visible{outline:3px solid #c26c05;outline-offset:-3px;z-index:3}
.v33-board .v33-cell:disabled{opacity:1;cursor:default}
.v33-board .v33-cell.v33-visited{background:#b9dfca;color:#365044}.v33-board .v33-cell.v33-current{background:#f7c86a!important;color:#16324f}
.v33-board .v33-cell.v33-selected{outline:3px solid #f6ab30;outline-offset:-3px;z-index:1}
.v33-board .v33-cell.v33-conflict{background:#f39fa1!important}
.v33-board .v33-cell.v33-block{background:#475568!important;color:#d5dae0}
.v33-board .v33-cell.v33-fixed{background:#cfb6e0!important;color:#482c6b}
.v33-board .v33-cell.v33-correct{background:#85cea0!important}
.v33-board .v33-cell .v33-axis{position:absolute;left:2px;top:1px;font:700 8px/1 system-ui;color:#324b5a}
.v33-board .v33-cell .v33-axis.v33-file{left:auto;right:2px;top:auto;bottom:2px}
.v33-board .v33-cell .v33-step{position:absolute;bottom:1px;right:2px;font:700 10px/1 system-ui;color:#37566b}
.v33-board .v33-cell .v33-chess{font-size:1.12em;text-shadow:0 1px 1px #ffffff88}
.v33-board .v33-cell .v33-chess.v33-black{color:#0f2534;text-shadow:0 1px 0 #fff5}
.v33-board .v33-cell .v33-chess.v33-white{color:#fffbea;text-shadow:0 1px 2px #1d3544,1px 1px #1d3544,-1px -1px #1d3544}
.v33-mini-title{font-size:12px;letter-spacing:.5px;font-weight:850;color:#32546f;margin:0;text-align:center}
.v33-scramble-view{width:100%;display:flex;justify-content:center;align-items:flex-start;gap:22px;flex-wrap:wrap}
.v33-scramble-view>div{flex:0 1 340px;min-width:min(100%,220px);text-align:center}
.v33-scramble-view .v33-board{width:min(100%,325px)}
.v33-scramble-view .v33-board.v33-target-board{width:min(100%,236px);border-width:3px}
.v33-target-board .v33-cell{cursor:default;font-size:clamp(16px,3vw,26px)}
.v33-puzzle-subtitle{max-width:600px;margin:0 auto;font-size:12px;text-align:center;color:#557083;line-height:1.5}
.v33-scrabble-clue{padding:12px 16px;background:#dcebf0;border:1px solid #c0d6de;border-radius:12px;width:min(100%,500px);text-align:center;color:#284b5f}
.v33-scrabble-clue b{display:block;font-size:11px;text-transform:uppercase;letter-spacing:1px;margin-bottom:5px}.v33-scrabble-clue p{font-size:14px;line-height:1.5;margin:0}
.v33-letter-row{display:flex;gap:5px;justify-content:center;flex-wrap:wrap;max-width:600px;margin:5px auto}
.v33-letter{border-radius:9px!important;border:1px solid #8c9eae!important;background:#fff1cb!important;color:#284258!important;min-width:35px;min-height:42px;padding:7px!important;font-size:20px!important;font-weight:850!important;box-shadow:0 3px 0 #d2b979!important}
.v33-letter:disabled{visibility:hidden}
.v33-word-answer{min-height:48px;display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:5px;border-bottom:2px dashed #9dadb5;width:min(100%,540px);padding:5px 7px}
.v33-word-answer span{min-width:27px;padding:6px 3px;border-radius:5px;background:#d8e5ec;font-weight:900;color:#304f69;text-align:center}
.v33-word-answer span.v33-empty{background:transparent;border-bottom:2px solid #88a0ae;color:transparent}
.v33-answer-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;width:min(100%,550px);margin:0 auto}
.v33-choice{border:1px solid #9cb3c4;border-radius:9px;padding:14px 12px;cursor:pointer;background:white;color:#214461;font-size:13px;font-weight:700;text-align:left;min-height:65px;line-height:1.4}
.v33-choice:hover{background:#dbeaf2}.v33-choice:disabled{opacity:.7;cursor:default}.v33-choice.v33-answer-correct{background:#bce8c4;border-color:#4c9e65}.v33-choice.v33-answer-wrong{background:#f5c7c7;border-color:#b74c57}
.v33-question{font-size:19px;font-weight:850;color:#234562;text-align:center;max-width:560px;line-height:1.35;margin:6px auto}
.v33-question small{font-size:11px;letter-spacing:1px;display:block;color:#58798c;margin-bottom:7px}
.v33-game-actions{display:flex;flex-wrap:wrap;justify-content:center;gap:9px;padding:0 12px 12px}
.v33-game-actions button:first-child{background:#e2edf2}.v33-game-actions button:last-child{background:#275474;color:#fff;border-color:#275474}
.v33-game-message{margin:0 13px 16px;padding:11px 12px;text-align:center;border-radius:9px;font-size:12px;line-height:1.45;font-weight:700;background:#d9e8f0;color:#264b67;min-height:38px}
.v33-game-message[data-result=win]{background:#d6edd9;color:#24633a}.v33-game-message[data-result=fail]{background:#f5d8d8;color:#8a3035}
.v33-bottombar{display:flex;gap:8px;align-items:center;justify-content:center}
.v33-bottomline{display:flex;gap:12px;justify-content:space-evenly;flex-wrap:wrap;padding:0 18px 18px;color:#b8d2e2;font-size:11px}
.v33-bottomline strong{color:#fff4bc}
.v33-utility{margin:0 16px 15px;border:1px solid #8ea9b45e;background:#192d46;border-radius:12px;overflow:hidden}
.v33-utility>summary{list-style:none;cursor:pointer;padding:15px 16px;display:flex;align-items:center;justify-content:space-between;gap:10px;color:#fff1ca;font-weight:850;font-size:13px}
.v33-utility>summary::-webkit-details-marker{display:none}.v33-utility>summary:before{content:'+';font-size:19px;color:#f6cf84}.v33-utility[open]>summary:before{content:'−'}
.v33-utility>summary small{color:#b7d1df;font-weight:400;font-size:10px;text-align:right;margin-left:auto}
.v33-utility-inner{padding:0 10px 10px}.v33-utility-inner .v30-quick-actions{margin:4px 0 12px}.v33-utility-inner .v30-options{margin:0 0 12px}
.v33-utility-inner .v31-vault{margin:0}.v33-small-feedback{display:block;text-align:center;font-size:10px;color:#a6c5d3;padding:0 10px 14px}
@media(max-width:800px){.v33-game-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.v33-game-button{min-height:128px}.v33-play-toolbar{gap:9px}.v33-scramble-view{gap:11px}}
@media(max-width:480px){.arena .v30-center.v33-arcade{border-radius:12px}.v33-hero{padding:13px 12px;gap:9px}.v33-hero-icon{min-width:45px;width:45px;height:48px;font-size:40px;border-radius:12px}.v33-hero h3{font-size:22px}.v33-hero p:last-child{font-size:10px}.v33-eyebrow{font-size:9px}.v33-hero-counter{display:none}.v33-chooser-heading{padding:13px 12px 9px}.v33-game-grid{padding:0 10px 10px;gap:7px}.v33-game-button{padding:9px 5px;min-height:122px;border-radius:10px}.v33-game-emoji{font-size:25px;height:28px}.v33-game-button strong{font-size:11px}.v33-game-button small{font-size:9px}.v33-game-button em{font-size:8px;padding:3px 5px}.v33-play-panel{margin:3px 9px 12px}.v33-play-toolbar{padding:11px}.v33-active-heading strong{font-size:16px}.v33-toolbar-buttons{width:100%;justify-content:space-between}.v33-toolbar-buttons select{flex:1}.v33-scorebar{gap:5px;margin:0 8px 9px}.v33-scorebar strong{font-size:14px}.v33-game-area{padding:5px 7px 12px;min-height:225px}.v33-board{border-width:3px}.v33-board .v33-cell{font-size:clamp(15px,6vw,29px)}.v33-answer-grid{grid-template-columns:1fr}.v33-choice{min-height:46px;padding:10px 12px}.v33-scramble-view>div{flex:1 1 100%}.v33-scramble-view .v33-board.v33-target-board{max-width:170px}.v33-scramble-view .v33-board{max-width:280px}.v33-bottomline{gap:8px;padding:0 10px 12px;font-size:10px}.v33-utility{margin:0 9px 12px}.v33-utility>summary{font-size:12px}.v33-utility>summary small{font-size:9px}.v33-letter{min-width:30px;min-height:35px;font-size:15px!important;padding:5px!important}}


/* V34 Legendary Score. Entire card lives in existing LEFT quest sidebar. */
.legendary-card{box-sizing:border-box;min-width:0;overflow:hidden;margin:0 0 21px;padding:12px 11px 11px;border:1px solid rgba(249,208,125,.70);border-radius:16px;color:#fff3db;background:radial-gradient(ellipse at 55% -20%,rgba(228,173,68,.28),transparent 60%),linear-gradient(160deg,#233454,#101c39 73%);box-shadow:inset 0 1px 0 rgba(255,235,176,.24),0 9px 22px rgba(4,10,26,.26);font-family:inherit}
.legendary-card *{box-sizing:border-box}
.legendary-header{display:flex;align-items:center;gap:7px;margin:0 0 9px}
.legendary-crest{flex:0 0 34px;width:34px;height:34px;border:1px solid rgba(250,216,145,.44);border-radius:10px;background:rgba(255,223,150,.09);display:grid;place-items:center;color:#f9dca5;font-size:24px}
.legendary-header>div{flex:1;min-width:0}
.legendary-overline{margin:0 0 2px;color:#d8bad4;font-size:8px;letter-spacing:.105em;font-weight:800;white-space:normal}
.legendary-header h2{margin:0;font-family:Georgia,'Times New Roman',serif;font-size:clamp(15px,1.3vw,17px);color:#ffdda2;line-height:1.15;white-space:normal}
.legendary-crown{font-size:19px;flex:0 0 auto}
.legendary-bigscore{display:flex;align-items:center;flex-direction:column;justify-content:center;padding:10px 4px 9px;border-radius:11px;background:linear-gradient(180deg,rgba(255,231,167,.14),rgba(255,231,167,.055));border:1px solid rgba(255,238,194,.22);gap:1px}
.legendary-bigscore>span{font-size:9px;letter-spacing:.12em;color:#f1d39c;font-weight:800}
.legendary-bigscore>strong{font-size:clamp(30px,3vw,38px);font-family:Georgia,'Times New Roman',serif;font-variant-numeric:tabular-nums;font-weight:800;color:#fff2ca;line-height:1.13;overflow-wrap:anywhere;text-align:center}
.legendary-bigscore>small{font-size:9px;color:#d1d9ea;text-align:center}
.legendary-metrics{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:7px;margin:8px 0}
.legendary-metrics>div{display:flex;flex-direction:column;align-items:center;justify-content:center;min-width:0;padding:7px 3px;border:1px solid rgba(234,229,208,.14);border-radius:9px;background:rgba(5,17,43,.37)}
.legendary-metrics span{font-size:8px;color:#d7dce8;letter-spacing:.045em;font-weight:800;text-align:center}
.legendary-metrics strong{font-size:clamp(16px,1.7vw,21px);line-height:1.28;color:#fff0cf;font-variant-numeric:tabular-nums;overflow-wrap:anywhere;text-align:center}
.legendary-metrics strong small{font-size:12px}
.legendary-rankline{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:4px 7px;margin:11px 0 6px}
.legendary-rankline span{font-size:8px;letter-spacing:.07em;color:#e0d3d3;font-weight:850}
.legendary-rankline strong{font-size:11px;color:#ffd886;text-align:right}
.legendary-rankbar{height:7px;max-width:100%;border-radius:999px;overflow:hidden;background:rgba(0,0,0,.45);border:1px solid rgba(250,221,159,.18)}
.legendary-rankbar>div{height:100%;width:0;background:linear-gradient(90deg,#c58c37,#ffe7a4);border-radius:999px;transition:width .28s ease}
.legendary-next{text-align:right;color:#a9c8d8;font-size:9px;margin-top:5px;line-height:1.35}
.legendary-achievements{display:flex;justify-content:space-between;gap:5px;margin-top:10px;padding-top:9px;border-top:1px solid rgba(251,222,163,.24);font-size:10px;color:#f8d896;flex-wrap:wrap}
.legendary-achievements strong{color:#fff4d7}
.legendary-footnote{color:#c3cfdd;font-size:9px;line-height:1.44;margin:9px 0 0;text-align:center;min-height:24px}
@media(max-width:1160px) and (min-width:771px){.legendary-header{gap:5px}.legendary-crest{flex-basis:30px;width:30px;height:31px}.legendary-header h2{font-size:15px}}
@media(max-width:770px){.arena>.legendary-card{width:min(100%,530px);margin:8px auto 12px;padding:11px 13px}.arena>.legendary-card .legendary-header h2{font-size:19px}.arena>.legendary-card .legendary-bigscore>strong{font-size:37px}.arena>.legendary-card .legendary-metrics{grid-template-columns:1fr 1fr}}
@media(max-width:375px){.arena>.legendary-card{padding:9px}.legendary-rankline{align-items:flex-start}.legendary-achievements{font-size:9px}.legendary-bigscore>strong{font-size:30px!important}}

/* V35: compact 24-game gallery and independent playable games. */
.v35-filterbar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:0 18px 13px;padding:10px 11px;border:1px solid #47708b;border-radius:11px;background:#122842}
.v35-filterbar .v35-label{font-size:10px;font-weight:900;letter-spacing:1px;color:#fbe2ad;margin-right:7px}
.v35-filterbar button{cursor:pointer;border:1px solid #6285a0;border-radius:999px;color:#deecf7;background:#25405b;font:800 11px system-ui,sans-serif;padding:7px 13px;min-width:70px;transition:.12s}
.v35-filterbar button[aria-pressed=true]{color:#183752;background:#ffdaa1;border-color:#ffdaa1}
.v35-filterbar .v35-count{font:800 10px system-ui,sans-serif;color:#d0e0ee;margin-left:auto}
.v33-arcade .v33-game-grid{max-height:520px;overflow-y:auto;scrollbar-color:#537b98 #18324b;scrollbar-width:thin;padding-bottom:19px}
.v33-arcade .v33-game-grid .v33-game-button{min-height:118px;padding:10px 8px;gap:3px}
.v33-arcade .v33-game-grid .v33-game-emoji{font-size:26px;height:29px}
.v33-arcade .v33-game-grid .v33-game-button strong{font-size:11px}
.v33-arcade .v33-game-grid .v33-game-button small{font-size:9px}
.v33-arcade .v33-game-grid .v33-game-button em{font-size:9px}
.v35-play-panel{padding-bottom:0}.v35-play-panel[hidden],.v33-play-panel[hidden],.v33-game-button[hidden]{display:none!important}
.v35-rules{font-size:12px;line-height:1.55;margin:0 15px 13px;padding:12px;border-radius:8px;background:#e4eff5;color:#365873}
.v35-panel-kicker{font-size:11px;letter-spacing:.7px;color:#c08934;background:#ffe9c3;display:inline-block;border-radius:14px;padding:5px 9px;font-weight:900;margin:0 15px 13px}
.v35-board-head{display:flex;gap:10px;justify-content:center;flex-wrap:wrap;align-items:center;margin:5px 0 8px;font-size:12px;font-weight:800}
.v35-board-head span{background:#e1edf4;border-radius:8px;padding:6px 10px;color:#26506a}
.v35-option-row{display:flex;justify-content:center;gap:8px;flex-wrap:wrap;margin:12px auto 0;max-width:590px;width:100%}
.v35-option-row button{border-radius:10px;border:1px solid #9eb4c3;background:white;color:#1d476a;font-size:12px;font-weight:800;padding:11px 12px;min-height:43px;cursor:pointer;flex:1 1 128px;max-width:270px}
.v35-option-row button:hover{background:#e4eff6}
.v35-challenge-note{max-width:590px;font-size:12px;color:#476981;text-align:center;line-height:1.5;margin:4px auto}
.v35-region-board .v33-cell{border-radius:0}.v35-region-board .v33-cell.v35-region-alt{box-shadow:inset 0 0 0 2px #5d5b8977}
.v35-region-board .v33-cell.v35-region-bad{background:#ffb2aa!important}
.v35-puzzle-board .v33-cell.v35-hazard{background:#ef9e9e!important}
.v35-puzzle-board .v33-cell.v35-goal{background:#a6ecc1!important;box-shadow:inset 0 0 0 3px #227f54}
.v35-puzzle-board .v33-cell.v35-hint{box-shadow:inset 0 0 0 4px #f4bc53!important}
.v35-puzzle-board .v33-cell.v35-step{background:#bce2ec!important}
.v35-board-legend{font-size:11px;color:#506c7c;text-align:center;line-height:1.5;margin:0 8px}
.v35-wait{font-size:13px;color:#406b83;text-align:center;margin:10px auto}
.v35-checkpoint{width:100%;text-align:center;background:#e6f1f4;border:1px solid #b5cbd7;border-radius:11px;padding:10px;max-width:560px;font-size:12px;font-weight:800;color:#28536b}
.v35-guide{max-width:550px;background:#e8f4e7;border:1px solid #bdd7bc;padding:10px 13px;border-radius:9px;font-size:12px;color:#365e4b;line-height:1.5}
@media(max-width:720px){.v35-filterbar{margin:0 10px 12px}.v33-arcade .v33-game-grid{max-height:420px}.v33-arcade .v33-game-grid .v33-game-button{min-height:118px}.v35-filterbar button{min-width:60px}}
@media(max-width:390px){.v35-filterbar{gap:5px}.v35-filterbar button{min-width:54px;padding:6px 9px;font-size:10px}.v35-filterbar .v35-label{width:100%}.v35-filterbar .v35-count{display:none}.v33-arcade .v33-game-grid .v33-game-button{min-height:118px}}


/* V37: child-friendly choice tabs and readable 6-game pages */
.v37-friendly-line{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:5px;padding:13px 17px 8px;background:#fff6e8;color:#15517b}
.v37-friendly-line strong{font-family:system-ui,sans-serif;font-size:15px;font-weight:900;color:#0e5485}
.v37-friendly-line span{font-size:12px;color:#315d79}
.v33-arcade .v35-filterbar.v37-kid-tabs{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;margin:0 16px 13px;padding:10px;border-radius:13px;border:1px solid #b9ddeb;background:#e7f4fb;align-items:stretch}
.v33-arcade .v37-kid-tabs button{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:3px;min-width:0;min-height:56px;max-width:none;margin:0;padding:7px 4px;border-radius:11px;white-space:normal;text-align:center;font-weight:800;box-shadow:0 2px 0 rgba(30,82,110,.1)}
.v37-kid-tabs button span{font-size:20px;line-height:1.2}
.v37-kid-tabs button b{font-weight:850;font-size:11px;line-height:1.2}
.v33-arcade .v37-kid-tabs button[aria-pressed="true"]{background:#ffd57f;border:2px solid #c98e21;color:#16486c}
.v37-kid-tabs .v35-count{grid-column:1/-1;text-align:center;margin:0;font-size:11px;font-weight:750}
.v33-arcade .v33-game-grid .v33-game-button em{font-size:10px;padding:4px 8px}
.v33-arcade .v33-game-grid .v33-game-button.v37-words em{background:#f1e2ff;color:#623b87}
.v33-arcade .v33-game-grid .v33-game-button.v37-quiz em{background:#d8f1dc;color:#1b703a}
.v33-arcade .v33-game-grid .v33-game-button.v37-hard em{background:#ffdecf;color:#8e3930}
.v33-arcade .v33-game-grid .v33-game-button{justify-content:center}
.v33-arcade .v33-game-grid .v33-game-button small{line-height:1.35}
@media(max-width:680px){.v33-arcade .v35-filterbar.v37-kid-tabs{grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin:0 11px 10px}.v37-friendly-line{padding:10px 13px}.v37-friendly-line span{font-size:11px}.v33-arcade .v33-game-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:380px){.v33-arcade .v35-filterbar.v37-kid-tabs{grid-template-columns:repeat(2,minmax(0,1fr))}.v33-arcade .v37-kid-tabs button{min-height:49px}.v37-friendly-line strong{font-size:14px}.v33-arcade .v33-game-grid .v33-game-button{min-height:112px}.v33-arcade .v33-game-grid .v33-game-button strong{font-size:11px}}


/* V44: compact, no-internal-scroll maze, checkmate and impossible-tour boards. */
.v42-tile.v44-wall{background:#2d425a!important;color:#d2d8e2!important;cursor:not-allowed!important}
.v42-tile.v44-gate{background:#e4cf75!important;color:#243653!important;box-shadow:inset 0 0 0 2px #c88c1e!important}
.v42-tile.v44-seal{background:#d2bee8!important;color:#472d70!important;box-shadow:inset 0 0 0 2px #8b62b7!important}
.v44-mate-board .v42-tile{font-size:clamp(18px,4vw,35px)!important;line-height:1!important}
@media(max-width:430px){.v42-stage-pill{min-width:29px;min-height:29px;font-size:11px}.v44-mate-board .v42-tile{font-size:clamp(18px,5vw,26px)!important}}


/* Great Plains Chess bright royal-blue, gold, ivory and scenic-green palette. */
:root{--night:#075AA1;--night2:#07518D;--midnight:#06385F;--text:#fff8e6;--muted:#dceaf5;--gold:#f2b63f;--cream:#fff5dc;--mint:#98d36e;--pink:#efb2a5;--board-light:#fff0ce;--board-dark:#89bbd0;--board-edge:#d4a34f;--shadow:0 15px 36px rgba(4,48,86,.22)}
body{background:radial-gradient(ellipse 44% 30% at 20% 12%,rgba(255,244,183,.24),transparent 80%),radial-gradient(ellipse 44% 50% at 93% 70%,rgba(95,177,76,.2),transparent 70%),linear-gradient(125deg,#064d83,#0977ba 52%,#07548a);}
.site-header .brand-mark{background:linear-gradient(150deg,#076bba,#074778);border-color:#f9cf67}
.site-header .brand strong,.hero h1{color:#fff6d8}
.hero p,.brand small{color:#f7e7cc}
.game-layout>.panel,.panel.sidebar{background:linear-gradient(150deg,#08599c,#084777);border:1px solid rgba(255,209,98,.5)}
.panel.arena{background:linear-gradient(170deg,#086ca7,#07558e)}
.sidebar .mode-btn{background:rgba(255,249,234,.11);border-color:#a4d2e1}
.sidebar .mode-btn.active{background:#f9cf70;color:#0a436e;border-color:#fff4ca}
.sidebar .mode-btn.active .mode-name,.sidebar .mode-btn.active .mode-details{color:#08365e}
.legendary-card{background:linear-gradient(150deg,#1379ba,#06406b)!important;border:2px solid #f2b63f!important;box-shadow:0 9px 22px rgba(0,37,70,.27)!important}
.board-stage{background:linear-gradient(142deg,#f5d288,#0b77af 45%,#085078);border:2px solid #ffc95f;box-shadow:0 12px 0 #05365e,0 23px 30px rgba(0,28,61,.35)}
.board{border-color:#15446b}.tile.light{background:var(--board-light)}.tile.dark{background:var(--board-dark)}
.v33-arcade{border:2px solid #f6c75f;background:#fff6e8;box-shadow:0 20px 44px rgba(5,36,71,.22)}
.v33-hero{background:linear-gradient(120deg,#065a9c 0%,#147bb5 49%,#137aa0 100%);border-bottom:4px solid #f2b63f}
.v33-hero-icon{background:rgba(255,238,180,.25);border-color:#f4c45a}
.v33-hero h2{color:#fff5d7}.v33-hero p{color:#f6eacb}
.v33-chooser-heading{background:#fff6e8;color:#124c79}.v33-chooser-heading strong{color:#07558e}.v33-chooser-heading span{color:#29587e}
.v35-filterbar{background:#e6f3f8;border-color:#b4d5e5;color:#0a4d81;margin-bottom:10px}
.v35-filterbar .v35-label,.v35-filterbar .v35-count{color:#0b5286}
.v35-filterbar button{color:#0b4e80;background:#fffaf0;border:1px solid #aac8d7}
.v35-filterbar button[aria-pressed=true]{color:#113d62;background:#ffd57f;border:1px solid #dda335}
.v33-arcade .v33-game-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;padding:0 18px 12px;max-height:none!important;height:auto!important;overflow:visible!important;scrollbar-width:none!important}
.v33-arcade .v33-game-grid .v33-game-button{min-height:103px;max-height:none;padding:11px 9px;gap:4px;background:linear-gradient(150deg,#f8fdff,#dff1fc);border:1px solid #9ac5dd;color:#0d527e;box-shadow:0 3px 0 #c2dfe9;border-radius:14px}
.v33-arcade .v33-game-grid .v33-game-button strong{color:#094b80;font-size:12px}
.v33-arcade .v33-game-grid .v33-game-button small{color:#3d6886;font-size:10px}
.v33-arcade .v33-game-grid .v33-game-button em{background:#fee4a5;color:#654718}
.v33-arcade .v33-game-grid .v33-game-button:hover{background:#fff6d9;border-color:#e9af3d}
.v33-arcade .v33-game-grid .v33-game-button.is-active{background:#ffe5ac;border:2px solid #ce8a20;box-shadow:0 3px 0 #bf8f3c}
.v36-pagination{display:flex;align-items:center;justify-content:center;gap:20px;margin:1px 18px 17px;padding:10px;border:1px solid #bed9e8;background:#eaf6ff;border-radius:12px;color:#0a538a;font-size:12px;font-weight:900}
.v36-pagination button{padding:9px 17px;background:#0b65a6;border:1px solid #07558a;color:#fff5dc;border-radius:10px;font-size:12px;font-weight:800}
.v36-pagination button:disabled{opacity:.36}
.v33-arcade .v33-play-panel{background:#fff9ed;color:#124e75;border:1px solid #e9bd62}
.v33-arcade .v33-play-toolbar{background:#e3f2f8;color:#0e497a}
.v33-arcade .v33-instructions{color:#1a587d}
.v36-play-panel{padding-bottom:12px}.v36-play-panel[hidden]{display:none!important}
.v36-game-area{width:100%;max-width:780px;margin:13px auto 16px;display:flex;flex-direction:column;align-items:center;gap:12px;padding:0 15px}
.v36-hint{width:100%;padding:13px 16px;background:#e6f2f9;color:#215678;border:1px solid #c8e0eb;border-radius:11px;line-height:1.5;font-size:13px;text-align:center;margin:0}
.v36-board{display:grid;grid-template-columns:repeat(var(--v36-n),minmax(0,1fr));width:min(100%,445px);aspect-ratio:1/1;border:3px solid #175780;background:#f9eccd;border-radius:8px;overflow:hidden;box-shadow:0 6px 0 #b38a48}
.v36-cell{position:relative;display:grid;place-items:center;border:0;border-radius:0;padding:0;aspect-ratio:1;min-width:0;min-height:0;color:#0c354c;background:#fdf0d4}
.v36-cell.light{background:#fff0cd}.v36-cell.dark{background:#8fbdd0}.v36-cell.selected{box-shadow:inset 0 0 0 4px #dc7d1f;background:#f8d174}
.v36-cell.marked{box-shadow:inset 0 0 0 3px #509b36}.v36-cell.locked{box-shadow:inset 0 0 0 4px #f8bf49;background:#fde3aa}.v36-cell .v36-glyph{font-size:clamp(20px,4.2vw,39px);line-height:1;text-shadow:1px 1px 1px #597e96}
.v36-cell .v36-pin{position:absolute;right:1px;bottom:1px;font-size:8px;font-weight:900}
.v36-answers,.v36-pieces,.v36-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:center;width:100%;margin:4px 0}
.v36-option,.v36-check{border:1px solid #4085b4;padding:10px 13px;border-radius:9px;color:#0b4776;background:#e7f2f8;font-weight:850;font-size:13px;min-height:39px}
.v36-option:hover,.v36-check:hover{border-color:#d9a131;background:#ffe8b2}
.v36-option.is-chosen{background:#f9d17a;border-color:#be861b;color:#06395e}
.v36-check{background:#0c6cab;color:#fff2d9;border-color:#095388;padding:12px 18px}
.v36-note{font-size:12px;color:#285d7b;background:#e8f3fa;border-radius:8px;padding:9px 12px;width:100%;text-align:center}
.v36-editor-bar{display:flex;justify-content:center;align-items:center;width:100%}.v36-editor-bar label{font-weight:900;font-size:12px}.v36-editor-bar select{padding:8px 12px;border-radius:8px;border:1px solid #96bed1;background:#fff;color:#17486b}
.v36-compare{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;width:100%;align-items:start}
.v36-compare>div{min-width:0;text-align:center}.v36-compare strong{display:block;color:#07558d;margin-bottom:7px;letter-spacing:1.1px;font-size:12px}.v36-compare .v36-board{width:100%;box-shadow:0 3px 0 #b38a48}
.v36-compare .v36-cell .v36-glyph{font-size:clamp(11px,3vw,28px)}
.v36-crossword{display:grid;grid-template-columns:repeat(var(--cw-cols),minmax(0,1fr));gap:2px;width:min(100%,490px);background:#15527c;border:3px solid #15527c;border-radius:5px}
.v36-cross-cell{position:relative;background:#fff;aspect-ratio:1;min-width:0}.v36-cross-cell input{width:100%;height:100%;border:0;text-align:center;padding:0;background:transparent;font-size:clamp(9px,2vw,18px);text-transform:uppercase;color:#0d456e;font-weight:900}
.v36-cross-cell small{position:absolute;top:1px;left:2px;font-size:8px;color:#667f93;pointer-events:none}.v36-black-square{background:#184564;aspect-ratio:1}
.v36-clues{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px;width:100%;font-size:11px;line-height:1.4;color:#265474}
.v36-clues section{background:#e7f2f8;border-radius:9px;padding:10px}.v36-clues strong{color:#0c5489;display:block;margin-bottom:6px;font-size:12px}.v36-clues p{margin:4px 0}
.v36-bottom{font-size:11px;color:#1f597e;text-align:center;padding:9px 15px 5px}
@media(max-width:770px){.v33-arcade .v33-game-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;padding:0 12px 10px}.v33-arcade .v33-game-grid .v33-game-button{min-height:105px}.v36-pagination{gap:9px;margin:0 12px 12px;padding:8px}.v36-pagination button{padding:8px 11px}.v36-game-area{padding:0 9px}.v36-clues{grid-template-columns:1fr}.v36-cell .v36-glyph{font-size:clamp(18px,7vw,33px)}.v36-compare .v36-cell .v36-glyph{font-size:clamp(9px,3.8vw,18px)}}
@media(max-width:400px){.v36-pagination{gap:6px;font-size:10px}.v36-pagination button{padding:8px;font-size:10px}.v36-compare{gap:6px}.v33-arcade .v33-game-grid .v33-game-button strong{font-size:11px}}



.v38-play-panel{background:linear-gradient(160deg,#fff9e9,#e7f4fa);color:#173f65;border:3px solid #f2b63f;border-radius:18px;padding:clamp(12px,2vw,20px)}
.v38-play-panel .v33-play-toolbar{background:#075AA1;border-radius:13px;padding:10px;color:#fff9e9}
.v38-play-panel .v33-active-heading strong,.v38-play-panel .v33-active-heading small{color:#fff9e9}
.v38-play-panel select,.v38-play-panel button{touch-action:manipulation}.v38-play-panel .v33-toolbar-buttons label{color:#fff8e6!important}
.v38-hello{display:flex;gap:12px;align-items:center;background:#fff2c2;color:#19446d;border-radius:13px;padding:10px 14px;margin:12px 0;font-size:14px}
.v38-hello>span{font-size:38px;flex:0 0 auto;color:#075AA1}.v38-hello p{margin:0}.v38-hello strong{color:#075AA1}
.v38-play-panel .v35-rules,.v38-hint,.v38-helper{font-size:14px;line-height:1.5;color:#1a4165}
.v38-hint{margin:10px 0}.v38-helper{font-weight:700;margin:11px 0;text-align:center}
.v38-game-area{min-height:180px;overflow:visible;display:flex;flex-direction:column;align-items:center;gap:8px;padding:10px 3px}
.v38-board{display:grid;width:min(100%,520px);grid-template-columns:repeat(var(--v38-n),minmax(0,1fr));gap:2px;background:#174f85;border:4px solid #f2b63f;border-radius:8px;padding:3px;margin:6px auto;box-shadow:0 8px 20px #0b437829}
.v38-cell{min-width:0;width:100%;aspect-ratio:1 / 1;position:relative;display:flex;align-items:center;justify-content:center;padding:0;border:0;border-radius:2px;overflow:hidden;cursor:pointer;color:#142f49}
.v38-cell.light{background:#fff1d4}.v38-cell.dark{background:#80b6cc}.v38-cell.is-rock{background:#60798d;color:#fff}.v38-cell.is-selected{outline:4px solid #f7bc2f;outline-offset:-4px}
.v38-cell.is-highlighted{box-shadow:inset 0 0 0 3px #f2b63f}.v38-cell.is-done{box-shadow:inset 0 0 0 3px #54a660}
.v38-cell:hover{filter:brightness(1.06)}.v38-cell:focus-visible,.v38-choice:focus-visible{outline:3px solid #e89212;outline-offset:1px}
.v38-glyph{font-size:clamp(15px,4vw,34px);font-family:'Segoe UI Symbol',Arial,sans-serif;line-height:1;white-space:nowrap}
.v38-marker{position:absolute;bottom:2px;right:2px;min-width:18px;height:18px;padding:0 2px;border-radius:12px;background:#ffbe31;color:#1a2d4b;font:800 11px/18px Arial;text-align:center}
.v38-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;width:min(100%,650px);margin:10px 0}
.v38-choice,.v38-play-panel .v38-choice{min-width:0;min-height:50px;background:#e1f0fb;border:2px solid #a3c5dc;border-radius:12px;color:#124674;padding:10px;font-size:14px;font-weight:750;cursor:pointer;white-space:normal;overflow-wrap:anywhere}
.v38-choice:hover{background:#f7e8b9;border-color:#dbae45}.v38-choices.v38-trades{grid-template-columns:1fr}
.v38-bingo,.v38-ttt{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;width:min(100%,430px);margin:auto}
.v38-bingo-tile,.v38-ttt-tile{min-width:0;aspect-ratio:1;background:#e6f3fa;border:2px solid #5492bb;border-radius:12px;color:#164875;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:5px;padding:5px;cursor:pointer;font-size:16px}
.v38-bingo-tile span,.v38-ttt-tile{font-size:clamp(25px,7vw,44px)}.v38-bingo-tile strong{font-size:12px}.v38-bingo-tile.is-done{background:#b8e3be;border-color:#397c49}
.v38-jigsaw-preview{display:grid;grid-template-columns:repeat(var(--v38-n),1fr);gap:3px;width:min(100%,310px);background:#f4e3b3;border-radius:8px;padding:6px;color:#134975}
.v38-jigsaw-preview span{display:flex;gap:2px;align-items:center;justify-content:center;font-size:17px}.v38-jigsaw-preview small{font-size:9px;font-weight:bold}
.v38-words{display:flex;gap:7px;flex-wrap:wrap;justify-content:center}.v38-words span{background:#e2f0fb;border:1px solid #aed0e4;border-radius:8px;padding:5px;font-size:12px;font-weight:750}.v38-words span.found{background:#bee7c4;text-decoration:line-through}
.v38-pairs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;width:min(100%,590px)}.v38-pair-card{min-width:0;min-height:84px;background:#e0f1fa;border:2px solid #9ac2db;border-radius:10px;padding:6px;color:#14466f;overflow-wrap:anywhere;font-size:14px;font-weight:700}.v38-pair-card.matched{background:#c5e8c9;border-color:#398052}
.v38-palette{display:flex;flex-wrap:wrap;justify-content:center;gap:6px}.v38-palette button{font-size:23px;min-height:46px;min-width:48px}.v38-palette button:last-child{font-size:13px}
.v38-win{font-size:24px;font-weight:800;background:#caecd0;border:2px solid #4b965d;color:#195b37;border-radius:14px;padding:25px;text-align:center}#v38Message{color:#154d7a!important;font-weight:750}#v38Message[data-result="win"]{background:#d0f0cf!important;color:#206438!important}
@media(max-width:600px){.v38-board{width:min(100%,360px);gap:1px;border-width:3px;padding:2px}.v38-glyph{font-size:clamp(15px,6vw,25px)}.v38-play-panel .v33-play-toolbar{padding:9px}.v38-pairs{gap:4px}.v38-pair-card{min-height:68px;font-size:11px}.v38-marker{font-size:9px;min-width:14px;height:15px;line-height:15px}.v38-cell.is-selected{outline-width:2px}.v38-bingo-tile strong{font-size:10px}.v38-choice{font-size:12px}}


/* Great Plains Chess V39 — child-friendly enhancements; retain V38 colors/layout. */
.v39-firststeps{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:13px;align-items:center;padding:13px 17px;margin:10px 17px 14px;background:linear-gradient(108deg,#e4f5fd,#fff4da);border:2px solid #edc16b;border-radius:17px;color:#164568;box-shadow:0 4px 0 #173d6220}
.v39-buddy-icon{font-size:31px;display:grid;place-items:center;width:52px;height:52px;background:#0866a5;color:#fff1c3;border-radius:14px;border:3px solid #f9c759}
.v39-firststeps strong{display:block;font-size:16px;font-weight:900;color:#094d82}.v39-firststeps p{font-size:12px;margin:3px 0 0;line-height:1.45;color:#285b7e}
.v39-start-buttons{display:flex;align-items:stretch;gap:7px;flex-direction:column;min-width:176px}.v39-start-buttons button{min-height:42px;border-radius:11px;padding:8px 11px;font-size:12px;font-weight:900;border:1px solid #b9cdd7;background:#f7fdff;color:#064a75;box-shadow:0 2px 0 #7eacba;line-height:1.2;white-space:normal}.v39-start-buttons #v39EasyStart{background:#fbd16d;color:#55340a;border-color:#d3a339;box-shadow:0 3px 0 #dba747}.v39-start-buttons button:hover{filter:brightness(1.04);transform:translateY(-1px)}.v39-start-buttons button:focus-visible{outline:3px solid #164d8a;outline-offset:2px}
.v39-progress-tip{padding:0 19px 10px;display:flex;flex-wrap:wrap;gap:8px 16px;font-size:11px;color:#bedbf0}.v39-progress-tip strong{color:#ffe7ac}
.v39-coach{margin:0 0 10px;background:#f1f9fd;border:1px solid #afcfe1;border-radius:13px;color:#16466b;overflow:hidden}.v39-coach-top{display:flex;align-items:center;gap:10px;padding:9px 11px}.v39-coach-face{flex:0 0 36px;width:36px;height:36px;border-radius:11px;background:#0a65a0;display:grid;place-items:center;font-size:27px;color:#ffe29c}.v39-coach-top>div{flex:1;min-width:0}.v39-coach-top strong{display:block;font-size:12px;color:#075288}.v39-coach-top span:not(.v39-coach-face){display:block;font-size:11px;line-height:1.35;color:#315e7c;margin-top:2px}.v39-help-button{background:#fbd77a;color:#143e61;border:1px solid #d49b32;border-radius:11px;padding:10px 13px;font-size:12px;font-weight:900;min-height:40px;white-space:nowrap}.v39-help-button[aria-expanded=true]{background:#e2f3fc;border-color:#7eabc4}.v39-help-button:focus-visible,.v39-clue-button:focus-visible{outline:3px solid #076a98;outline-offset:2px}
.v39-coach-body{padding:11px 16px 14px;border-top:1px solid #bbdbe8;background:#fffdf6}.v39-help-title{font-size:14px;font-weight:900;color:#075587;margin:0 0 9px}.v39-steps{padding-left:25px;margin:0 0 12px;font-size:12px;line-height:1.65;color:#245679}.v39-steps li{padding-left:3px;margin:5px 0}.v39-steps li::marker{color:#b4720c;font-weight:900}.v39-clue-button{min-height:40px;border:1px solid #d7a14c;border-radius:10px;background:#ffe1a0;color:#543609;padding:8px 14px;font-weight:900;font-size:12px}.v39-clue-text{font-size:12px;line-height:1.55;margin:10px 0 0;padding:9px;border-radius:9px;background:#e8f8ec;border:1px solid #acd8bb;color:#14503a}.v39-hint-square{outline:4px solid #ffac19!important;outline-offset:-5px!important;box-shadow:inset 0 0 0 2px #fff5d0,0 0 10px #ffda4b!important;position:relative;z-index:4}
.v33-arcade .v33-game-grid .v33-game-button{min-height:112px!important}.v33-arcade .v33-game-grid .v33-game-button:focus-visible{outline:3px solid #ffc75f;outline-offset:2px}.v33-arcade .v33-game-grid .v33-game-button strong{font-weight:900}
@media(max-width:790px){.v39-firststeps{grid-template-columns:auto minmax(0,1fr);margin:10px 12px 14px;gap:10px}.v39-start-buttons{grid-column:1/-1;flex-direction:row;min-width:0}.v39-start-buttons button{flex:1}.v39-progress-tip{padding:0 13px 10px}}
@media(max-width:430px){.v39-firststeps{padding:11px;grid-template-columns:39px minmax(0,1fr);gap:8px;margin:8px 10px 12px}.v39-buddy-icon{width:38px;height:38px;font-size:26px;border-radius:10px}.v39-firststeps strong{font-size:14px}.v39-firststeps p{font-size:11px}.v39-start-buttons{gap:6px;flex-wrap:wrap}.v39-start-buttons button{min-width:110px;font-size:11px;min-height:43px}.v39-coach-top{gap:7px;padding:8px}.v39-coach-face{width:30px;height:30px;flex-basis:30px;font-size:23px}.v39-coach-top strong{font-size:11px}.v39-coach-top span:not(.v39-coach-face){font-size:10px}.v39-help-button{padding:8px;font-size:11px}.v39-coach-body{padding:10px}.v39-progress-tip{font-size:10px}}



/* Great Plains Chess V40 — 20 cheerful, touch-friendly mini-games */
.v40-play-panel{background:linear-gradient(145deg,#fffaf0,#eaf6ff);border:3px solid #efbc52;color:#143c61;overflow:visible}
.v40-play-panel .v33-play-toolbar{background:linear-gradient(112deg,#075895,#2079ac);color:#fff8e5;padding:11px;border-radius:11px}
.v40-play-panel .v33-active-heading strong,.v40-play-panel .v33-active-heading small{color:#fff7df}
.v40-play-panel .v33-toolbar-buttons label{color:#fff8e6!important}
.v40-play-panel .v35-rules{color:#17476c;font-size:14px;line-height:1.5}
.v40-welcome{margin:11px 0 9px;display:flex;align-items:center;gap:9px;padding:11px 14px;background:#fff0c6;border:1px solid #edc36b;border-radius:13px;font-size:13px;line-height:1.4;color:#184769}
.v40-welcome b{font-weight:850;color:#075895}.v40-welcome>span{font-size:31px;line-height:1}
.v40-prompt{color:#16486c;font-size:14px;font-weight:700;line-height:1.5;margin:11px 0 5px;text-align:center;max-width:720px}
.v40-board{width:min(100%,530px);display:grid;grid-template-columns:repeat(var(--v40-n),minmax(0,1fr));margin:10px auto;background:#1f75a4;border:4px solid #e6b248;border-radius:10px;padding:4px;gap:2px;box-shadow:0 9px 20px #1b538535}
.v40-cell{width:100%;min-width:0;aspect-ratio:1/1;position:relative;display:flex;justify-content:center;align-items:center;padding:0;border:0;border-radius:3px;cursor:pointer;touch-action:manipulation}
.v40-cell.light{background:#fff0d2}.v40-cell.dark{background:#84c0d9}.v40-cell.is-wall{background:#607c8a;color:#fff}.v40-cell.is-danger{background:#bc7fd3!important}.v40-cell.is-goal{box-shadow:inset 0 0 0 4px #e9b145}.v40-cell.is-selected{outline:4px solid #ffa719;outline-offset:-4px}.v40-cell.is-collected{box-shadow:inset 0 0 0 4px #3ba45f}
.v40-cell:hover:not(:disabled){filter:brightness(1.08)}.v40-cell:focus-visible,.v40-choice:focus-visible{outline:3px solid #e98600;outline-offset:2px;z-index:4}
.v40-piece{font-size:clamp(15px,4vw,38px);line-height:1;font-family:'Segoe UI Symbol','DejaVu Sans',Arial,sans-serif;color:#18466b}.v40-marker{position:absolute;right:2px;bottom:2px;min-width:19px;min-height:19px;padding:1px 3px;border-radius:13px;background:#ffc542;color:#143452;text-align:center;font:900 11px/17px Arial,sans-serif;box-shadow:0 1px 2px #87652450}
.v40-helper{font-size:13px;font-weight:800;text-align:center;color:#1b4e71;margin:8px 0}.v40-small{font-size:11px;color:#286283;margin:6px 0;text-align:center}
.v40-game-area{min-height:170px;max-width:100%;width:100%;display:flex;align-items:center;flex-direction:column;padding:9px 2px;gap:9px;overflow:visible}
.v40-choices{width:min(100%,590px);display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:10px 0}.v40-controls{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;margin:5px 0}
.v40-choice{min-height:46px;min-width:100px;padding:9px 12px;border:2px solid #a5c6db;border-radius:12px;background:#e3f2fd;color:#0c4f82;font-size:13px;font-weight:800;white-space:normal;overflow-wrap:anywhere;cursor:pointer;touch-action:manipulation}.v40-choice:hover{background:#ffe6ac;border-color:#e7b552}
.v40-floor{background:#e5f2fd;color:#0a5188;font-size:14px;font-weight:900;border:1px solid #bad7ec;border-radius:12px;padding:10px;text-align:center;width:min(100%,540px)}.v40-floor-dots{font-size:15px;color:#d38b1b;margin-left:7px;letter-spacing:4px}
.v40-transcript{max-width:610px;font-size:15px;line-height:1.8;background:#fff0cc;color:#18466a;padding:12px;border-radius:12px;border:1px solid #e4bd6c;text-align:center;font-weight:800}
.v40-collection{margin:13px 0 2px;background:#edf8ff;border:1px solid #acd1e8;border-radius:13px;color:#0d456d;padding:9px 12px;font-size:12px}.v40-collection summary{cursor:pointer;font-weight:850}.v40-collection p{margin:10px 0 4px;line-height:1.55}
.v40-celebrate{font-size:clamp(15px,2vw,20px);font-weight:950;color:#ae7117;text-align:center;background:linear-gradient(100deg,#fff6c8,#e5f9ec,#fff6c8);padding:14px;border-radius:13px;border:2px solid #e4b449;margin:10px 0;animation:v40Pop .55s ease-out}
@keyframes v40Pop{0%{transform:scale(.92);opacity:.3}70%{transform:scale(1.035);opacity:1}100%{transform:scale(1)}}
@media(prefers-reduced-motion:reduce){.v40-celebrate{animation:none}}
@media(max-width:530px){.v40-board{width:100%;padding:2px;gap:1px}.v40-choices{gap:7px}.v40-choice{font-size:12px;padding:8px;min-width:0}.v40-marker{font-size:10px;min-width:15px;min-height:15px;line-height:14px}.v40-piece{font-size:clamp(13px,5.6vw,30px)}.v40-welcome{padding:8px}.v40-floor-dots{letter-spacing:1px}}
.v40-practice{background:#eef8e9;border:1px solid #acd1ad;padding:9px 12px;border-radius:12px;margin:10px 0;color:#1a6546}.v40-practice summary{font-size:13px;font-weight:900;cursor:pointer}.v40-practice .v40-board{width:min(100%,275px);margin:6px auto}.v40-practice-note{font-size:12px;text-align:center;padding:7px;color:#146449;font-weight:800;line-height:1.5}



/* V41: simple, collapsed Solitaire Chess tools. No Puzzle Arcade menu. */
.v41-tools{margin:16px 0 0!important;max-width:100%;background:rgba(10,25,47,.72)!important;border:1px solid rgba(240,198,105,.35)!important;}
.v41-tools>summary{font-size:14px!important;line-height:1.4;min-height:54px;flex-wrap:wrap;}
.v41-tools>summary small{font-size:11px!important;}
.v41-tools .v30-quick-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;}
.v41-tools .v30-quick-actions button{min-width:0;white-space:normal;overflow-wrap:anywhere;}
.v41-tool-feedback{display:none;margin:8px 4px 0;color:#f6dfaa;font-size:12px;line-height:1.5;}
@media(max-width:520px){.v41-tools .v30-quick-actions{grid-template-columns:1fr;} .v41-tools>summary{justify-content:flex-start}}
