*{box-sizing:border-box}:root{--fs-xs: .78rem;--fs-sm: .92rem;--fs-md: 1.05rem;--fs-lg: 1.2rem;--fs-xl: 1.4rem}:root[data-font-size=sm]{--fs-xs: .72rem;--fs-sm: .84rem;--fs-md: .96rem;--fs-lg: 1.08rem;--fs-xl: 1.25rem}:root[data-font-size=lg]{--fs-xs: .88rem;--fs-sm: 1.02rem;--fs-md: 1.2rem;--fs-lg: 1.4rem;--fs-xl: 1.65rem}html,body,#root{margin:0;padding:0;height:100%}body{font-family:Maitree,IBM Plex Sans Thai,Sarabun,system-ui,-apple-system,sans-serif;background:#1f1b16;color:#f5efe6;font-size:var(--fs-md);line-height:1.45}.theme-toggle{display:inline-flex;align-items:center;gap:.35rem;min-height:2.15rem;padding:.35rem .65rem;background:#3b2f24;border:1px solid #6b4f33;color:#f5efe6;border-radius:.45rem;font:inherit;font-size:var(--fs-sm);cursor:pointer;transition:background .12s ease,border-color .12s ease}.theme-toggle:hover{background:#50412f;border-color:#7b6042}.theme-toggle:focus-visible{outline:2px solid #d8a058;outline-offset:1px}.theme-toggle__icon{width:1rem;text-align:center;font-size:1rem;line-height:1}.theme-toggle__label{font-weight:700}.app{min-height:100%;display:flex;flex-direction:column;align-items:center;padding:1.5rem 1rem;gap:1.25rem}.app__header h1{margin:0;font-size:1.6rem;letter-spacing:.02em}.app__main{display:flex;justify-content:center;width:100%}.play-area{display:flex;flex-wrap:wrap;gap:1.25rem;justify-content:center;align-items:flex-start}.turn-indicator{margin:0;font-size:var(--fs-md);letter-spacing:.05em;color:#f0e2c0}.turn-indicator--review{color:#ffd84d}.board{display:flex;flex-direction:column;border:3px solid #5a4530;background:#5a4530;box-shadow:0 8px 24px #0006;max-width:100%}.board__rank{display:flex}.square{width:clamp(36px,calc((100vw - 1.75rem)/8),64px);height:clamp(36px,calc((100vw - 1.75rem)/8),64px);display:flex;align-items:center;justify-content:center;border:0;padding:0;margin:0;cursor:pointer;font-size:1.4rem;background:#d8b884;position:relative;touch-action:manipulation;-webkit-tap-highlight-color:rgba(255,216,77,.4);user-select:none;-webkit-user-select:none}.board__rank>.square{border-right:1px solid #7a5c3c;border-bottom:1px solid #7a5c3c}.board__rank>.square:last-child{border-right:0}.board__rank:last-child>.square{border-bottom:0}.square--selected{outline:3px solid #ffd84d;outline-offset:-3px;z-index:1}.square--last-from{background:#d6a346}.square--last-to{background:#f1c768;box-shadow:inset 0 0 0 3px #8c5818b3}.square--legal:after{content:"";position:absolute;width:32%;height:32%;border-radius:50%;background:#1432148c;pointer-events:none;z-index:0}.square--legal-capture{box-shadow:inset 0 0 0 4px #be3232b3}.piece-img{width:86%;height:86%;object-fit:contain;pointer-events:none;-webkit-user-select:none;user-select:none;position:relative;z-index:1;filter:drop-shadow(0 1px 1.5px rgba(0,0,0,.5)) drop-shadow(0 0 .6px rgba(0,0,0,.45))}.piece-img[data-piece-color=black],.mini-board__piece[data-piece-color=black]{filter:invert(.18) drop-shadow(0 1px 1.5px rgba(0,0,0,.42)) drop-shadow(0 0 .6px rgba(0,0,0,.38))}.side-panel{display:flex;flex-direction:column;gap:.6rem;width:clamp(220px,30vw,300px);max-height:clamp(360px,72vw,552px)}.replay{display:flex;align-items:center;gap:.3rem;flex-wrap:wrap;background:#2b2218;border:1px solid #5a4530;border-radius:6px;padding:.4rem .5rem}.replay__btn{background:#3b2f24;border:1px solid #6b4f33;color:#f5efe6;padding:.3rem .55rem;border-radius:4px;font:inherit;cursor:pointer;min-width:2.2rem;transition:background .12s ease}.replay__btn:hover:not(:disabled){background:#50412f}.replay__btn:disabled{opacity:.35;cursor:not-allowed}.replay__btn--live{background:#c08a3e;border-color:#c08a3e;color:#1c1208;font-weight:600;margin-left:auto}.replay__btn--live:hover:not(:disabled){background:#d8a058}.replay__counter{color:#d6c7a8;font-variant-numeric:tabular-nums;font-size:var(--fs-sm);padding:0 .35rem}.move-list{flex:1;min-height:200px;overflow-y:auto;background:#2b2218;border:1px solid #5a4530;border-radius:6px;padding:.5rem .6rem}.move-list__empty{margin:0;color:#b8a98e;font-style:italic}.move-list__rows{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:.15rem}.move-list__row{display:grid;grid-template-columns:2.2rem 1fr 1fr;gap:.25rem;align-items:center}.move-list__num{color:#b8a98e;font-variant-numeric:tabular-nums;font-size:var(--fs-sm)}.move-list__cell{font-size:var(--fs-sm);text-align:left;padding:.2rem .4rem;border-radius:3px;color:#f5efe6;background:transparent;border:0;font:inherit}.move-list__cell--btn{cursor:pointer}.move-list__cell--btn:hover{background:#3b2f24}.move-list__cell--active{background:#c08a3e;color:#1c1208;font-weight:600}.move-list__cell--empty{color:#6b5a44}.controls{display:flex;flex-wrap:wrap;gap:.5rem;justify-content:center}.controls__btn{background:#3b2f24;border:1px solid #6b4f33;color:#f5efe6;padding:.55rem 1rem;border-radius:6px;font:inherit;cursor:pointer;transition:background .12s ease}.controls__btn:hover:not(:disabled){background:#50412f}.controls__btn:disabled{opacity:.45;cursor:not-allowed}.modal{position:fixed;top:0;right:0;bottom:0;left:0;display:flex;align-items:center;justify-content:center;background:#0009;z-index:10;padding:1rem}.modal__panel{background:#2b2218;color:#f5efe6;border:2px solid #6b4f33;border-radius:10px;padding:1.5rem 2rem;min-width:min(240px,100%);max-width:min(92vw,560px);max-height:calc(100vh - 2rem);overflow-y:auto;text-align:center;box-shadow:0 12px 40px #00000080}.modal__title{margin:0 0 .4rem;font-size:1.4rem}.modal__subtitle{margin:0 0 1.25rem;color:#d6c7a8}.modal__btn-row{display:flex;gap:.5rem;justify-content:center}.modal__btn{background:#c08a3e;border:0;color:#1c1208;padding:.6rem 1.4rem;border-radius:6px;font:inherit;font-weight:600;cursor:pointer}.modal__btn:hover{background:#d8a058}.modal__btn--secondary{background:#5a4530;color:#f5efe6}.modal__btn--secondary:hover{background:#6f5640}.modal__btn--danger{background:#a73228;color:#fdf3ec}.modal__btn--danger:hover{background:#c44b3e}.modal__btn--emphasized{box-shadow:0 0 #d8a05899;animation:emphasize-pulse 1.6s ease-in-out infinite}.modal__panel--small{max-width:min(92vw,360px);padding:1.25rem 1.4rem}.connecting-overlay{position:fixed;top:0;right:0;bottom:0;left:0;display:flex;align-items:center;justify-content:center;background:#000000b3;z-index:20;padding:1rem}.connecting-overlay__panel{background:#2b2218;color:#f5efe6;border:2px solid #6b4f33;border-radius:10px;padding:1.75rem 2rem;min-width:min(280px,100%);max-width:min(92vw,420px);text-align:center;box-shadow:0 12px 40px #0000008c;display:flex;flex-direction:column;align-items:center;gap:.75rem}.connecting-overlay__spinner{width:44px;height:44px;border:4px solid rgba(245,239,230,.18);border-top-color:#c08a3e;border-radius:50%;animation:connecting-overlay-spin .9s linear infinite}@keyframes connecting-overlay-spin{to{transform:rotate(360deg)}}.connecting-overlay__title{margin:0;font-size:1.15rem;font-weight:600}.connecting-overlay__subtitle{margin:0;color:#d6c7a8;font-size:var(--fs-sm);line-height:1.45}.connecting-overlay__exit{margin-top:.5rem;background:#5a4530;border:0;color:#f5efe6;padding:.55rem 1.2rem;border-radius:6px;font:inherit;cursor:pointer}.connecting-overlay__exit:hover{background:#6f5640}.symmetry-badge{display:inline-block;padding:.45rem .85rem;border-radius:6px;font-size:var(--fs-sm);color:#f5efe6;font-weight:600;align-self:center;border:1px solid transparent}.symmetry-badge--rotate{background:#3a6ea5;border-color:#4d83ba}.symmetry-badge--reflect{background:#8a5a44;border-color:#a3705a}.counting-badge{display:inline-block;padding:.4rem .75rem;border-radius:6px;font-size:.85rem;font-weight:600;color:#f5efe6;align-self:center;border:1px solid transparent;font-variant-numeric:tabular-nums}.counting-badge--neutral{background:#3e5d3a;border-color:#547753}.counting-badge--warn{background:#a08230;border-color:#c0a04a;color:#1c1208}.counting-badge--critical{background:#b5462c;border-color:#d36344;animation:counting-pulse 1.1s ease-in-out infinite}@keyframes counting-pulse{0%,to{opacity:1}50%{opacity:.72}}.board-area{display:flex;flex-direction:column;gap:.5rem;align-items:stretch}.clock{display:flex;justify-content:space-between;align-items:baseline;padding:.4rem .85rem;border-radius:6px;background:#2b2218;border:1px solid #5a4530;font-variant-numeric:tabular-nums;color:#d6c7a8;transition:border-color .12s ease,background .12s ease}.clock--active{border-color:#c08a3e;background:#3b2f24;color:#f5efe6}.clock--warn .clock__time{color:#f4c64d}.clock--critical .clock__time{color:#ff8870}.clock--critical-pulse .clock__time{color:#ff8870;animation:clock-pulse .6s ease-in-out infinite}@keyframes clock-pulse{0%,to{opacity:1}50%{opacity:.55}}.clock__label{font-size:.95rem;letter-spacing:.05em}.clock__time{font-size:1.4rem;font-weight:600}.new-game-modal{text-align:left;min-width:min(360px,100%)}.new-game-modal__section-title{margin:.75rem 0 .35rem;color:#d6c7a8;font-size:.95rem;letter-spacing:.04em}.new-game-modal__tc-categories{display:flex;flex-wrap:wrap;gap:.35rem;margin-bottom:.5rem}.new-game-modal__tc-cat{background:#3b2f24;border:1px solid #6b4f33;color:#f5efe6;padding:.45rem .75rem;border-radius:6px;font:inherit;cursor:pointer;transition:background .12s ease,border-color .12s ease}.new-game-modal__tc-cat:hover{background:#50412f}.new-game-modal__tc-cat--active{background:#c08a3e;color:#1c1208;border-color:#c08a3e;font-weight:600}.new-game-modal__tc-presets{display:flex;flex-wrap:wrap;gap:.3rem;margin-bottom:.5rem}.new-game-modal__tc-preset{background:#2b2218;border:1px solid #5a4530;color:#f5efe6;padding:.35rem .7rem;border-radius:4px;font:inherit;cursor:pointer}.new-game-modal__tc-preset:hover{background:#3b2f24}.new-game-modal__tc-preset--active{background:#c08a3e;color:#1c1208;border-color:#c08a3e;font-weight:600}.new-game-modal__tc-custom{display:flex;flex-wrap:wrap;gap:.75rem;margin:.25rem 0 .5rem}.new-game-modal__tc-field{display:flex;flex-direction:column;gap:.2rem;font-size:.85rem;color:#d6c7a8}.new-game-modal__tc-field input{background:#1c1208;color:#f5efe6;border:1px solid #6b4f33;border-radius:4px;padding:.35rem .5rem;font:inherit;width:6rem}.new-game-modal__players{display:flex;flex-direction:column;gap:.4rem;margin-bottom:.25rem}.new-game-modal__player-row{display:flex;flex-wrap:wrap;align-items:center;gap:.5rem}.new-game-modal__player-label{min-width:4.5rem;color:#d6c7a8;font-size:.9rem}.new-game-modal__player-kinds,.new-game-modal__player-levels{display:flex;flex-wrap:wrap;gap:.3rem}.new-game-modal__actions{margin-top:.75rem}.new-game-modal__options{display:flex;flex-direction:column;gap:.5rem;margin:.25rem 0 .5rem}.new-game-modal__option{display:flex;flex-direction:column;align-items:flex-start;gap:.2rem;padding:.75rem 1rem;background:#3b2f24;color:#f5efe6;border:2px solid #6b4f33;border-radius:6px;font:inherit;cursor:pointer;text-align:left;transition:background .12s ease,border-color .12s ease}.new-game-modal__option:hover{background:#50412f}.new-game-modal__option--default{border-color:#c08a3e;box-shadow:0 0 0 2px #c08a3e2e}.new-game-modal__option:focus-visible{outline:2px solid #d8a058;outline-offset:1px}.new-game-modal__option-label{font-weight:700;font-size:1.05rem}.new-game-modal__option-hint{font-size:.85rem;color:#d6c7a8}.app__footer{margin-top:.75rem;font-size:.8rem;color:#b8a98e}.app__footer a{color:#d8c08a}@media (max-width: 720px){.app{padding:.75rem .4rem;gap:.85rem}.app__header{gap:.5rem .65rem;row-gap:.5rem}.app__header h1{font-size:1.25rem}.app__back{padding:.4rem .65rem;font-size:var(--fs-sm)}.play-area{flex-direction:column;align-items:center;gap:.75rem}.side-panel{width:min(100%,480px);max-height:none}.move-list{max-height:200px}.turn-indicator{font-size:var(--fs-sm)}.controls{gap:.4rem}.controls__btn{padding:.5rem .75rem;min-height:2.5rem}.modal{padding:.5rem}.modal__panel{padding:1.1rem}.new-game-modal__tc-cat,.new-game-modal__tc-preset{padding:.55rem .7rem}}@media (max-width: 420px){.app__header h1{font-size:1.1rem}.game-invite-btn{padding:.4rem .6rem}}.landing{min-height:100%;display:flex;flex-direction:column;padding:1.25rem 1.25rem 1rem;gap:1rem;max-width:1440px;width:100%;margin:0 auto}.landing__header{display:flex;align-items:center;gap:1rem;flex-wrap:wrap}.landing__header h1{margin:0;font-size:1.5rem;letter-spacing:.02em;flex:0 0 auto}.landing__title-sub{font-size:.7em;font-weight:400;letter-spacing:.05em;opacity:.7;margin-left:.15rem}.landing__online-count{font-size:var(--fs-sm);color:#d6c7a8;padding:.2rem .65rem;background:#ffffff0f;border-radius:999px;display:inline-flex;align-items:center;gap:.4rem;margin-left:auto}.landing__online-count--off{background:#d8585824;color:#f1b4b4}.landing__conn-dot{width:.55rem;height:.55rem;border-radius:999px;background:#888;display:inline-block;box-shadow:0 0 0 1px #00000040 inset}.landing__conn-dot--on{background:#4ade80;box-shadow:0 0 6px #4ade808c}.landing__conn-dot--off{background:#ef4444;animation:conn-pulse 1.5s ease-in-out infinite}@keyframes conn-pulse{0%,to{opacity:.55}50%{opacity:1}}.landing__cta{margin-left:auto;padding:.6rem 1.1rem;background:#c08a3e;color:#1f1b16;border:none;border-radius:.5rem;font-weight:700;cursor:pointer;font-size:var(--fs-md)}.landing__cta:hover:not(:disabled){background:#d8a058}.landing__cta:disabled{background:#50412f;color:#b8a98e;cursor:not-allowed}.landing__actions{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:.75rem}.landing__action{display:flex;align-items:center;gap:.75rem;padding:.85rem 1rem;background:#2b2218;border:1px solid #5a4530;color:#f5efe6;border-radius:.65rem;cursor:pointer;font:inherit;text-align:left;transition:background .12s ease,border-color .12s ease,transform 80ms ease}.landing__action:hover:not(:disabled){background:#3b2f24;border-color:#8a6840;transform:translateY(-1px)}.landing__action:focus-visible{outline:2px solid #c08a3e;outline-offset:2px}.landing__action:disabled{opacity:.55;cursor:not-allowed}.landing__action>[aria-hidden]{font-size:1.5rem;flex:0 0 auto}.landing__action-text{display:flex;flex-direction:column;gap:.15rem;min-width:0}.landing__action-title{font-weight:700;font-size:var(--fs-md);line-height:1.2}.landing__action-sub{font-size:var(--fs-sm);color:#b8a98e;line-height:1.25}.landing__action--primary{background:#c08a3e;border-color:#c08a3e;color:#1f1b16}.landing__action--primary .landing__action-sub{color:#1f1b16c7}.landing__action--primary:hover:not(:disabled){background:#d8a058;border-color:#d8a058}.landing__action--active{background:#3b2f24;border-color:#c08a3e}.landing__join-form{display:grid;grid-template-columns:minmax(180px,1fr) minmax(120px,180px) auto;gap:.5rem;padding:.65rem .75rem;background:#c08a3e0f;border:1px solid rgba(192,138,62,.35);border-radius:.5rem;align-items:center}.landing__join-input,.landing__join-name{padding:.55rem .75rem;background:#1a140e;border:1px solid #5a4530;color:#f5efe6;border-radius:.4rem;font:inherit;min-width:0}.landing__join-input:focus,.landing__join-name:focus{outline:2px solid #c08a3e;outline-offset:0;border-color:#c08a3e}.landing__join-input[aria-invalid=true]{border-color:#d77777}.landing__join-submit{padding:.55rem 1rem;background:#c08a3e;color:#1f1b16;border:none;border-radius:.4rem;font-weight:700;cursor:pointer;font:inherit;white-space:nowrap}.landing__join-submit:hover:not(:disabled){background:#d8a058}.landing__join-submit:disabled{opacity:.5;cursor:not-allowed}.landing__join-error{grid-column:1 / -1;margin:0;color:#f1b4b4;font-size:var(--fs-sm)}.landing__section-hint{font-size:var(--fs-sm);color:#b8a98e;font-weight:400;margin-left:.5rem}.landing__main{display:grid;grid-template-columns:minmax(0,1fr) 380px;gap:1.5rem;flex:0 0 auto;align-items:start}.landing__left{display:flex;flex-direction:column;gap:1rem;min-width:0}.landing__games,.landing__ranking{flex:0 0 auto}.landing__chat-col{display:flex;flex-direction:column;position:sticky;top:1rem;align-self:start;height:calc(100vh - 5rem);min-height:360px}.landing__chat-col>.chat{flex:1 1 auto;min-height:0}.landing__section-title{margin:0 0 .75rem;font-size:var(--fs-lg);color:#f0e2c0}.landing__empty{margin:0;padding:2.5rem 1.25rem;background:#ffffff08;border:1px dashed #50412f;border-radius:.75rem;text-align:center;color:#d6c7a8}.landing__grid{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1rem}@media (max-width: 900px){.landing__grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media (max-width: 600px){.landing__grid{grid-template-columns:minmax(0,1fr)}}@media (max-width: 720px){.landing{padding:.85rem .65rem;gap:.75rem}.landing__header{gap:.5rem .65rem}.landing__header h1{font-size:1.25rem}.landing__cta{padding:.55rem .9rem;font-size:var(--fs-sm)}.landing__online-count{font-size:var(--fs-xs);padding:.18rem .55rem}.landing__actions{grid-template-columns:1fr}.landing__action{padding:.7rem .85rem}.landing__action>[aria-hidden]{font-size:1.25rem}.landing__join-form{grid-template-columns:1fr}.landing__join-submit{width:100%}.landing__section-hint{display:block;margin-left:0;margin-top:.25rem}}.landing__card-wrap{display:contents}.landing__card{display:flex;flex-direction:column;align-items:center;gap:.5rem;padding:.75rem;background:#ffffff0a;border:1px solid #3a2f23;border-radius:.6rem;cursor:pointer;color:inherit;font:inherit;text-align:left;width:100%;transition:background .12s ease,border-color .12s ease}.landing__card-meta{width:100%}.landing__card:hover{background:#ffffff12;border-color:#5a4a32}.landing__card:focus-visible{outline:2px solid #d8a058;outline-offset:1px}.landing__card--ended{opacity:.6}.landing__card-meta{display:flex;flex-direction:column;gap:.25rem;font-size:var(--fs-sm)}.landing__card-names{display:flex;gap:.4rem;align-items:center;color:#f0e2c0;font-size:var(--fs-md)}.landing__card-vs{color:#b8a98e}.landing__card-status{display:flex;gap:.5rem;justify-content:space-between;color:#d6c7a8;font-size:var(--fs-sm)}.landing__card-spec{color:#d8a058}.landing__see-more{margin-top:.85rem;padding:.5rem 1rem;background:transparent;border:1px solid #50412f;border-radius:.5rem;color:#f5efe6;cursor:pointer;font-size:.9rem}.landing__see-more:hover{background:#ffffff0d}.landing__chat{position:sticky;top:1rem;align-self:stretch;display:flex;flex-direction:column;min-height:0}.landing__sidebar{display:flex;flex-direction:column;gap:.75rem;min-height:0;align-self:stretch}.landing__sidebar>.chat{flex:1 1 auto;min-height:0}.landing__card--empty{opacity:.55;border-style:dashed}.landing__card--empty:hover{opacity:.85}.landing__card-names--empty{justify-content:center}.landing__card-cta-mini{font-weight:700;color:#d8a058}.landing__card-room{font-weight:700;font-size:var(--fs-md);color:#f0e2c0;letter-spacing:.01em;display:flex;align-items:baseline;justify-content:space-between;gap:.4rem}.landing__card-tc{font-weight:600;font-size:var(--fs-sm);color:#a89a7a;letter-spacing:0;padding:.05rem .45rem;border:1px solid #3a2f23;border-radius:999px;background:#0000002e}.landing__card--waiting{outline:2px solid rgba(192,138,62,.5);outline-offset:-2px;box-shadow:0 0 0 2px #c08a3e1f}.landing__card-waiting-badge{font-weight:700;color:#f0c074;letter-spacing:.01em}:root[data-theme=light] .landing__card-tc{color:#6f5841;border-color:#d6c2a5;background:#b8792f14}:root[data-theme=light] .landing__card--waiting{outline-color:#b8792f8c;box-shadow:0 0 0 2px #b8792f26}:root[data-theme=light] .landing__card-waiting-badge{color:#986323}.app__room-name{font-weight:700;color:#c08a3e;padding:.2rem .6rem;background:#c08a3e1f;border:1px solid rgba(192,138,62,.35);border-radius:999px;font-size:var(--fs-sm)}.ranking{background:#ffffff0a;border:1px solid #3a2f23;border-radius:.75rem;padding:.6rem .75rem;display:flex;flex-direction:column;gap:.4rem;flex:0 0 auto}.ranking__header{display:flex;align-items:baseline;justify-content:space-between;gap:.5rem}.ranking__title{font-weight:700;color:#f0e2c0;font-size:var(--fs-md)}.ranking__hint{font-size:var(--fs-xs);color:#b8a98e}.ranking__empty{margin:0;font-size:var(--fs-sm);color:#b8a98e}.ranking__list{margin:0;padding:0;list-style:none;display:flex;flex-direction:column;gap:.25rem}.ranking__row{display:grid;grid-template-columns:1.7rem 1fr auto;gap:.4rem;align-items:center;font-size:var(--fs-sm);padding:.2rem .15rem}.ranking__rank{text-align:center;font-size:var(--fs-md);line-height:1}.ranking__name{color:#f0e2c0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ranking__score{display:inline-flex;gap:.35rem;font-size:var(--fs-xs);color:#b8a98e}.ranking__score-w{color:#6ab86a}.ranking__score-l{color:#d97778}.ranking__score-d{color:#b8a98e}.landing__footer{margin-top:1rem;font-size:.8rem;color:#b8a98e}.landing__footer a{color:#d8c08a}.mini-board{display:flex;flex-direction:column;border:1px solid #3a2f23;background:#d8c08a}.mini-board--error{background:#50412f}.mini-board__rank{display:flex}.mini-board__cell{display:flex;align-items:center;justify-content:center;border-right:1px solid #7a5c3c;border-bottom:1px solid #7a5c3c}.mini-board__rank>.mini-board__cell:last-child{border-right:0}.mini-board__rank:last-child>.mini-board__cell{border-bottom:0}.mini-board__piece{width:90%;height:90%;object-fit:contain;pointer-events:none;filter:drop-shadow(0 1px 1.5px rgba(0,0,0,.55)) drop-shadow(0 0 .6px rgba(0,0,0,.45))}.chat{display:flex;flex-direction:column;background:#ffffff0a;border:1px solid #3a2f23;border-radius:.75rem;overflow:hidden;min-height:0}.chat--full{height:100%;min-height:0}.chat--compact{height:280px}.chat__header{display:flex;align-items:center;justify-content:space-between;padding:.6rem .85rem;border-bottom:1px solid #3a2f23;background:#00000026}.chat__title{font-weight:700;color:#f0e2c0;font-size:var(--fs-md)}.chat__online{font-size:var(--fs-sm);color:#d6c7a8}.chat__list{flex:1 1 auto;overflow-y:auto;padding:.6rem .85rem;display:flex;flex-direction:column;gap:.4rem;font-size:var(--fs-md);line-height:1.45;min-height:0}.chat__empty{margin:auto;color:#b8a98e}.chat__msg{display:flex;gap:.4rem;flex-wrap:wrap;padding:.4rem .6rem;border-left:3px solid currentColor;background:#ffffff08;border-radius:0 .35rem .35rem 0;line-height:1.45}.chat__name{color:inherit;font-weight:700}.chat__name:after{content:":";color:#b8a98e;margin-left:1px}.chat__rank-icon{margin-right:2px}.chat__text{flex:1 1 auto;word-break:break-word;color:inherit}.chat__quick{display:flex;flex-wrap:wrap;gap:.35rem;padding:.45rem .7rem;border-top:1px solid #3a2f23;background:#00000012}.chat__quick-btn{flex:0 1 auto;padding:.35rem .7rem;background:#3b2f24;color:#f0e2c0;border:1px solid #6b4f33;border-radius:1rem;font:inherit;font-size:var(--fs-sm);line-height:1.1;cursor:pointer;min-height:2rem;touch-action:manipulation;-webkit-tap-highlight-color:rgba(255,216,77,.4)}.chat__quick-btn:hover{background:#50412f;border-color:#7b6042}.chat__quick-btn:active{background:#6f5640}.chat__quick-btn:disabled{opacity:.4;cursor:not-allowed}.chat__input-form,.chat__name-form{display:flex;gap:.4rem;padding:.6rem .7rem;border-top:1px solid #3a2f23;background:#0000001a}.chat__name-form{flex-direction:column;align-items:stretch;gap:.55rem;padding:.75rem .8rem .8rem;border-left:3px solid #c08a3e;background:#00000038}.chat__name-hint{margin:0;font-size:var(--fs-sm);color:#a89a7a;line-height:1.35}.chat__name-label{display:flex;flex-direction:column;font-size:var(--fs-sm);color:#d6c7a8;gap:.3rem}.chat__name-label-text{font-weight:600;letter-spacing:.01em}.chat__input,.chat__name-input{flex:1 1 auto;padding:.5rem .7rem;background:#00000040;border:1px solid #3a2f23;border-radius:.4rem;color:#f5efe6;font:inherit;font-size:var(--fs-md)}.chat__name-input{border-color:#5a4830;background:#00000052}.chat__input:focus,.chat__name-input:focus{outline:2px solid #d8a058;outline-offset:0}.chat__name-input:focus{border-color:#c08a3e}.chat__input-form button{padding:.5rem .95rem;background:#c08a3e;color:#1f1b16;border:none;border-radius:.4rem;font-weight:700;cursor:pointer;font-size:var(--fs-sm)}.chat__input-form button:disabled{background:#50412f;color:#b8a98e;cursor:not-allowed}.chat__name-submit{align-self:flex-end;padding:.45rem .95rem;background:transparent;color:#d6c7a8;border:1px solid #c08a3e;border-radius:.4rem;font-weight:600;font-size:var(--fs-sm);font-family:inherit;cursor:pointer;transition:background .12s ease,color .12s ease}.chat__name-submit:hover:not(:disabled){background:#c08a3e2e;color:#f5efe6}.chat__name-submit:focus-visible{outline:2px solid #d8a058;outline-offset:1px}.chat__name-submit:disabled{border-color:#50412f;color:#7a6c54;cursor:not-allowed}.chat__error{margin:0;padding:.4rem .85rem;background:#dc3c3c26;color:#ff9c9c;font-size:var(--fs-sm)}.app__back{margin-right:auto;padding:.45rem .8rem;background:transparent;border:1px solid #50412f;color:#f5efe6;border-radius:.4rem;cursor:pointer;font-size:var(--fs-sm)}.app__back:hover{background:#ffffff0d}.app__header{display:flex;align-items:center;flex-wrap:wrap;gap:.85rem;width:100%;max-width:720px}@media (max-width: 960px){.landing__main{grid-template-columns:1fr}.landing__chat,.landing__chat-col{position:static}.chat--full{height:360px}}.app--online{padding-top:1rem}.new-game-modal__mode-row{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:.6rem}.new-game-modal__text-input{width:100%;padding:.55rem .7rem;background:#00000040;border:1px solid #3a2f23;border-radius:.5rem;color:#f5efe6;font:inherit;font-size:.95rem}.new-game-modal__text-input:focus{outline:2px solid #d8a058;outline-offset:0}.new-game-modal__error{margin:.35rem 0 0;color:#ff9c9c;font-size:.85rem}.online-bar{width:100%;max-width:720px;margin:0 auto;display:flex;flex-direction:column;gap:.4rem;padding:.55rem .75rem;background:#ffffff0a;border:1px solid #3a2f23;border-radius:.5rem}.online-bar--disconnected{background:#dc3c3c1f;border-color:#dc3c3c73}.online-bar__left,.online-bar__right{display:flex;align-items:center;flex-wrap:wrap;gap:.5rem}.online-bar__left{font-size:var(--fs-md)}.online-bar__right{justify-content:flex-end;margin-left:auto}.online-bar__dot{width:.6rem;height:.6rem;border-radius:50%;flex:0 0 auto}.online-bar__dot--open{background:#4ec07c;box-shadow:0 0 0 3px #4ec07c2e}.online-bar__dot--offline{background:#f77}.online-bar__role{font-weight:700;color:#f0e2c0}.online-bar__opponent{color:#d6c7a8}.online-bar__opponent--waiting{color:#d8a058}.online-bar__opponent-status{margin-left:.3rem;color:#ff9c9c;font-size:var(--fs-xs)}.online-bar__spec{color:#d8a058;font-size:var(--fs-sm)}.online-bar__btn{padding:.45rem .8rem;background:#c08a3e;color:#1f1b16;border:none;border-radius:.35rem;font-weight:700;cursor:pointer;font-size:var(--fs-sm)}.online-bar__btn:hover{background:#d8a058}.online-bar__btn--secondary{background:transparent;border:1px solid #50412f;color:#f5efe6;font-weight:500}.online-bar__btn--secondary:hover{background:#ffffff0d}.online-bar__status{margin:0;font-size:var(--fs-xs);color:#ff9c9c}.app__online-error{width:100%;max-width:720px;margin:0 auto;padding:.6rem .85rem;background:#dc3c3c26;border:1px solid rgba(220,60,60,.45);color:#ffb3b3;border-radius:.5rem;display:flex;align-items:center;justify-content:space-between;gap:.75rem}.app__online-error button{padding:.3rem .65rem;background:transparent;border:1px solid rgba(220,60,60,.55);color:#ffb3b3;border-radius:.35rem;font-size:.85rem;cursor:pointer}.side-panel__chat{margin-top:.6rem}.side-panel--spectator{width:clamp(260px,32vw,360px);max-height:none}.side-panel--spectator .side-panel__chat--full{margin-top:.6rem;flex:1 1 auto;min-height:0;display:flex}.side-panel--spectator .side-panel__chat--full .chat{flex:1 1 auto;min-height:0;height:clamp(380px,65vh,640px)}.side-panel__flip-btn{align-self:flex-start}.side-panel__top-actions{display:flex;flex-wrap:wrap;gap:.5rem;align-items:center}.side-panel__history-toggle{align-self:flex-start;padding:.4rem .75rem;font-size:.9rem;display:inline-flex;align-items:center;gap:.25rem}.side-panel__history-count{font-variant-numeric:tabular-nums;opacity:.75;font-size:.85em}.side-panel__history{display:flex;flex-direction:column;gap:.6rem;flex:1 1 auto;min-height:0}.side-panel--spectator .side-panel__history{flex:0 0 auto}.side-panel--spectator .side-panel__history .move-list{min-height:0;max-height:clamp(180px,30vh,260px)}.side-panel--chat-only{max-height:clamp(360px,72vw,640px)}.side-panel--chat-only .side-panel__chat{flex:1 1 auto;display:flex;min-height:0}.side-panel--chat-only .side-panel__chat .chat-tabs{flex:1 1 auto;display:flex;flex-direction:column;min-height:0}.side-panel--chat-only .side-panel__chat .chat,.side-panel--chat-only .side-panel__chat .chat--compact{flex:1 1 auto;min-height:0;height:auto}@media (max-width: 720px){.online-bar{padding:.55rem .65rem}}.spectator-prompt{width:100%;max-width:720px;margin:0 auto;padding:.6rem .85rem;background:#d8a0581f;border:1px solid rgba(216,160,88,.4);color:#f5efe6;border-radius:.5rem;display:flex;flex-wrap:wrap;align-items:center;gap:.65rem;justify-content:space-between}.spectator-prompt--full{background:#ffffff0a;border-color:#3a2f23;color:#d6c7a8;justify-content:center}.spectator-prompt__label{font-weight:700;color:#f0e2c0}.spectator-prompt__actions{display:flex;gap:.5rem;flex-wrap:wrap}.spectator-prompt__btn{padding:.4rem .75rem;background:#c08a3e;color:#1f1b16;border:none;border-radius:.4rem;font-weight:700;cursor:pointer;font-size:.85rem}.spectator-prompt__btn:hover{background:#d8a058}:root[data-theme=light] body{background:#f7f1e7;color:#261a12}:root[data-theme=light] .turn-indicator,:root[data-theme=light] .landing__section-title,:root[data-theme=light] .chat__title,:root[data-theme=light] .online-bar__role,:root[data-theme=light] .spectator-prompt__label,:root[data-theme=light] .landing__card-names{color:#3a2416}:root[data-theme=light] .turn-indicator--review{color:#8a5f00}:root[data-theme=light] .theme-toggle,:root[data-theme=light] .replay,:root[data-theme=light] .move-list,:root[data-theme=light] .clock,:root[data-theme=light] .chat,:root[data-theme=light] .online-bar,:root[data-theme=light] .modal__panel,:root[data-theme=light] .connecting-overlay__panel,:root[data-theme=light] .new-game-modal__option,:root[data-theme=light] .new-game-modal__tc-cat,:root[data-theme=light] .new-game-modal__tc-preset,:root[data-theme=light] .landing__card{background:#fffaf2;border-color:#d6c2a5;color:#261a12}:root[data-theme=light] .connecting-overlay__subtitle{color:#5a4530}:root[data-theme=light] .connecting-overlay__spinner{border-color:#261a1226;border-top-color:#c08a3e}:root[data-theme=light] .theme-toggle:hover,:root[data-theme=light] .replay__btn:hover:not(:disabled),:root[data-theme=light] .controls__btn:hover:not(:disabled),:root[data-theme=light] .new-game-modal__option:hover,:root[data-theme=light] .new-game-modal__tc-cat:hover,:root[data-theme=light] .new-game-modal__tc-preset:hover,:root[data-theme=light] .landing__card:hover,:root[data-theme=light] .landing__see-more:hover,:root[data-theme=light] .app__back:hover,:root[data-theme=light] .online-bar__btn--secondary:hover{background:#f0e2cf}:root[data-theme=light] .replay__btn,:root[data-theme=light] .controls__btn,:root[data-theme=light] .app__back,:root[data-theme=light] .landing__see-more,:root[data-theme=light] .online-bar__btn--secondary{background:#fffaf2;border-color:#d6c2a5;color:#261a12}:root[data-theme=light] .landing__action{background:#fffaf2;border-color:#d6c2a5;color:#261a12}:root[data-theme=light] .landing__action:hover:not(:disabled){background:#f0e2cf;border-color:#b89066}:root[data-theme=light] .landing__action-sub{color:#6d5839}:root[data-theme=light] .landing__action--primary{background:#b8792f;border-color:#b8792f;color:#fffaf2}:root[data-theme=light] .landing__action--primary .landing__action-sub{color:#fffaf2d9}:root[data-theme=light] .landing__action--primary:hover:not(:disabled){background:#9a6320;border-color:#9a6320}:root[data-theme=light] .landing__action--active{background:#f7eedb;border-color:#b8792f}:root[data-theme=light] .landing__join-form{background:#b8792f14;border-color:#b8792f4d}:root[data-theme=light] .landing__join-input,:root[data-theme=light] .landing__join-name{background:#fffaf2;border-color:#d6c2a5;color:#261a12}:root[data-theme=light] .landing__join-input:focus,:root[data-theme=light] .landing__join-name:focus{outline-color:#b8792f;border-color:#b8792f}:root[data-theme=light] .landing__join-submit{background:#b8792f;color:#fffaf2}:root[data-theme=light] .landing__join-submit:hover:not(:disabled){background:#9a6320}:root[data-theme=light] .landing__join-error{color:#b04444}:root[data-theme=light] .landing__section-hint{color:#6d5839}:root[data-theme=light] .landing__online-count--off{background:#b044441f;color:#8a2929}:root[data-theme=light] .landing__card-room{color:#261a12}:root[data-theme=light] .app__room-name{color:#8a5520;background:#b8792f1a;border-color:#b8792f66}:root[data-theme=light] .replay__btn--live,:root[data-theme=light] .modal__btn,:root[data-theme=light] .landing__cta,:root[data-theme=light] .chat__input-form button,:root[data-theme=light] .online-bar__btn,:root[data-theme=light] .spectator-prompt__btn,:root[data-theme=light] .new-game-modal__tc-cat--active,:root[data-theme=light] .new-game-modal__tc-preset--active,:root[data-theme=light] .move-list__cell--active{background:#b8792f;border-color:#b8792f;color:#fffaf2}:root[data-theme=light] .replay__btn--live:hover:not(:disabled),:root[data-theme=light] .modal__btn:hover,:root[data-theme=light] .landing__cta:hover,:root[data-theme=light] .chat__input-form button:hover:not(:disabled),:root[data-theme=light] .online-bar__btn:hover,:root[data-theme=light] .spectator-prompt__btn:hover{background:#986323}:root[data-theme=light] .chat__name-hint{color:#6f5841}:root[data-theme=light] .chat__name-submit{color:#6f5841;border-color:#b8792f}:root[data-theme=light] .chat__name-submit:hover:not(:disabled){background:#b8792f1f;color:#261a12}:root[data-theme=light] .chat__name-submit:disabled{border-color:#d6c2a5;color:#b8a185}:root[data-theme=light] .modal__btn--secondary{background:#ead8c1;color:#261a12}:root[data-theme=light] .replay__counter,:root[data-theme=light] .move-list__num,:root[data-theme=light] .move-list__empty,:root[data-theme=light] .modal__subtitle,:root[data-theme=light] .new-game-modal__section-title,:root[data-theme=light] .new-game-modal__option-hint,:root[data-theme=light] .new-game-modal__player-label,:root[data-theme=light] .new-game-modal__tc-field,:root[data-theme=light] .landing__online-count,:root[data-theme=light] .landing__card-vs,:root[data-theme=light] .landing__card-status,:root[data-theme=light] .chat__online,:root[data-theme=light] .chat__empty,:root[data-theme=light] .chat__name-label,:root[data-theme=light] .online-bar__opponent,:root[data-theme=light] .landing__footer,:root[data-theme=light] .app__footer{color:#6f5841}:root[data-theme=light] .move-list__cell{color:#261a12}:root[data-theme=light] .move-list__cell--btn:hover{background:#f0e2cf}:root[data-theme=light] .move-list__cell--empty{color:#b8a185}:root[data-theme=light] .board{border-color:#8e6a42;background:#8e6a42;box-shadow:0 8px 24px #4028142e}:root[data-theme=light] .square{background:#e6c995}:root[data-theme=light] .board__rank>.square{border-color:#9b764c}:root[data-theme=light] .square--last-from{background:#dba84c}:root[data-theme=light] .square--last-to{background:#f4cb6b;box-shadow:inset 0 0 0 3px #744610b3}:root[data-theme=light] .clock--active{background:#f0e2cf;border-color:#b8792f;color:#261a12}:root[data-theme=light] .clock--warn .clock__time{color:#916500}:root[data-theme=light] .clock--critical .clock__time,:root[data-theme=light] .clock--critical-pulse .clock__time{color:#b43b2c}:root[data-theme=light] .new-game-modal__tc-field input,:root[data-theme=light] .new-game-modal__text-input,:root[data-theme=light] .chat__input,:root[data-theme=light] .chat__name-input{background:#fffdf8;border-color:#d6c2a5;color:#261a12}:root[data-theme=light] .landing__online-count,:root[data-theme=light] .landing__empty,:root[data-theme=light] .chat__header,:root[data-theme=light] .chat__input-form,:root[data-theme=light] .chat__name-form{background:#b8792f14}:root[data-theme=light] .landing__empty{border-color:#d6c2a5}:root[data-theme=light] .chat__header,:root[data-theme=light] .chat__input-form,:root[data-theme=light] .chat__name-form{border-color:#d6c2a5}:root[data-theme=light] .landing__card-spec,:root[data-theme=light] .online-bar__opponent--waiting,:root[data-theme=light] .online-bar__spec{color:#9b641f}:root[data-theme=light] .chat__msg{background:#00000006}:root[data-theme=light] .ranking{background:#fffaf2;border-color:#d6c2a5}:root[data-theme=light] .ranking__title{color:#3a2416}:root[data-theme=light] .ranking__hint,:root[data-theme=light] .ranking__empty,:root[data-theme=light] .ranking__score,:root[data-theme=light] .ranking__score-d{color:#6f5841}:root[data-theme=light] .ranking__name{color:#261a12}:root[data-theme=light] .ranking__score-w{color:#2e7a2e}:root[data-theme=light] .ranking__score-l{color:#a73228}:root[data-theme=light] .landing__card-cta-mini{color:#b8792f}:root[data-theme=light] .chat__name:after{color:#6f5841}:root[data-theme=light] .online-bar--disconnected,:root[data-theme=light] .app__online-error{background:#be3a2a1a;border-color:#be3a2a61;color:#8f281f}:root[data-theme=light] .online-bar__opponent-status,:root[data-theme=light] .online-bar__status,:root[data-theme=light] .new-game-modal__error,:root[data-theme=light] .chat__error{color:#a73228}:root[data-theme=light] .chat__error{background:#be3a2a1a}:root[data-theme=light] .spectator-prompt{background:#b8792f1a;border-color:#b8792f59;color:#261a12}:root[data-theme=light] .spectator-prompt--full{background:#fffaf2;border-color:#d6c2a5;color:#6f5841}:root[data-theme=light] .mini-board{border-color:#caa673;background:#efd59c}:root[data-theme=light] .mini-board__cell{border-color:#9b764c}:root[data-theme=light] .mini-board--error{background:#ead8c1}:root[data-theme=light] .landing__footer a,:root[data-theme=light] .app__footer a{color:#7b511d}.settings-bar__select-wrap{position:relative;cursor:pointer}.settings-bar__select-label{pointer-events:none}.settings-bar__select{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%;opacity:0;cursor:pointer;font:inherit;color:inherit;background:transparent;border:0;padding:0}.settings-bar__select:focus-visible+.settings-bar__select-label,.settings-bar__select-wrap:focus-within{outline:2px solid #ffd84d;outline-offset:2px}:root[data-focus-mode=on] .app__footer,:root[data-focus-mode=on] .side-panel,:root[data-focus-mode=on] .spectator-prompt,:root[data-focus-mode=on] .online-bar{display:none!important}:root[data-focus-mode=on] .square{width:clamp(48px,11vw,84px);height:clamp(48px,11vw,84px)}:root[data-focus-mode=on] .play-area{width:100%}.mobile-tabs{display:none;gap:.4rem;width:100%;max-width:520px;margin:0 auto .25rem}.mobile-tabs__btn{flex:1 1 0;padding:.55rem .75rem;background:#3b2f24;border:1px solid #6b4f33;color:#f5efe6;font:inherit;font-size:var(--fs-md);font-weight:600;border-radius:.45rem;cursor:pointer;transition:background .12s ease,border-color .12s ease}.mobile-tabs__btn--active{background:#c08a3e;color:#1f1b16;border-color:#c08a3e}.mobile-tabs__btn:focus-visible{outline:2px solid #d8a058;outline-offset:1px}@media (min-width: 601px){.mobile-tabs{display:none!important}}@media (max-width: 600px){.mobile-tabs{display:flex}.play-area--mobile-tab.is-tab-board .side-panel,.play-area--mobile-tab.is-tab-board .side-panel__chat,.play-area--mobile-tab.is-tab-chat .board-area{display:none}.play-area--mobile-tab.is-tab-chat .side-panel{width:100%;max-width:520px;max-height:none;flex:1 1 auto}.play-area--mobile-tab.is-tab-chat .move-list,.play-area--mobile-tab.is-tab-chat .replay,.play-area--mobile-tab.is-tab-chat .side-panel__history,.play-area--mobile-tab.is-tab-chat .side-panel__history-toggle{display:none}.play-area--mobile-tab.is-tab-chat .side-panel__chat{margin-top:0}.play-area--mobile-tab.is-tab-chat .side-panel__chat .chat{height:60vh}}.counting-badge{font-size:var(--fs-md);padding:.5rem .95rem;border-radius:999px;box-shadow:0 1px #0000002e}.counting-badge--critical{font-size:var(--fs-lg)}.controls__btn--emphasized{background:#c08a3e;color:#1f1b16;border-color:#d8a058;font-weight:700;box-shadow:0 0 #d8a05899;animation:emphasize-pulse 1.6s ease-in-out infinite}.controls__btn--emphasized:hover:not(:disabled){background:#d8a058}@keyframes emphasize-pulse{0%,to{box-shadow:0 0 #d8a0588c}50%{box-shadow:0 0 0 6px #d8a05800}}.settings-bar{display:inline-flex;align-items:center;flex-wrap:wrap;gap:.4rem}.settings-bar__group{display:inline-flex;align-items:center;gap:.15rem;padding:.15rem;background:#2b2218;border:1px solid #50412f;border-radius:.45rem}.settings-bar__btn{display:inline-flex;align-items:center;justify-content:center;gap:.3rem;min-height:2rem;min-width:2rem;padding:.3rem .55rem;background:transparent;border:1px solid transparent;color:#f5efe6;font:inherit;font-size:var(--fs-sm);border-radius:.35rem;cursor:pointer;transition:background .12s ease,border-color .12s ease}.settings-bar__btn:hover{background:#3b2f24}.settings-bar__btn:focus-visible{outline:2px solid #d8a058;outline-offset:1px}.settings-bar__btn--active{background:#c08a3e;color:#1f1b16;border-color:#c08a3e;font-weight:700}.settings-bar__btn--active:hover{background:#d8a058}.settings-bar__fs-sm{font-size:.72rem}.settings-bar__fs-md{font-size:.95rem}.settings-bar__fs-lg{font-size:1.2rem}.settings-bar__icon{font-size:1rem;line-height:1}.lang-toggle{display:inline-flex;gap:.15rem;padding:.15rem;background:#2b2218;border:1px solid #50412f;border-radius:.45rem}.lang-toggle__btn{min-width:2.1rem;padding:.25rem .45rem;background:transparent;border:1px solid transparent;color:#f5efe6;font:inherit;font-size:var(--fs-sm);font-weight:600;border-radius:.3rem;cursor:pointer;letter-spacing:.04em;transition:background .12s ease,color .12s ease}.lang-toggle__btn:hover{background:#3b2f24}.lang-toggle__btn:focus-visible{outline:2px solid #d8a058;outline-offset:1px}.lang-toggle__btn--active{background:#c08a3e;color:#1f1b16}.lang-toggle__btn--active:hover{background:#d8a058}:root[data-theme=light] .lang-toggle{background:#fffaf2;border-color:#d6c2a5}:root[data-theme=light] .lang-toggle__btn{color:#261a12}:root[data-theme=light] .lang-toggle__btn:hover{background:#f0e2cf}:root[data-theme=light] .lang-toggle__btn--active,:root[data-theme=light] .lang-toggle__btn--active:hover{background:#b8792f;color:#fffaf2}.game-invite-btn{display:inline-flex;align-items:center;gap:.35rem;padding:.45rem .8rem;background:#c08a3e;color:#1f1b16;border:none;border-radius:.4rem;font:inherit;font-size:var(--fs-sm);font-weight:700;cursor:pointer}.game-invite-btn:hover{background:#d8a058}.game-invite-btn:focus-visible{outline:2px solid #d8a058;outline-offset:1px}.app__header,.landing__header{row-gap:.5rem}:root[data-theme=light] .settings-bar__group{background:#fffaf2;border-color:#d6c2a5}:root[data-theme=light] .settings-bar__btn{color:#261a12}:root[data-theme=light] .settings-bar__btn:hover{background:#f0e2cf}:root[data-theme=light] .settings-bar__btn--active,:root[data-theme=light] .settings-bar__btn--active:hover,:root[data-theme=light] .mobile-tabs__btn--active,:root[data-theme=light] .game-invite-btn,:root[data-theme=light] .controls__btn--emphasized{background:#b8792f;color:#fffaf2;border-color:#b8792f}:root[data-theme=light] .mobile-tabs__btn{background:#fffaf2;border-color:#d6c2a5;color:#261a12}:root[data-theme=light] .mobile-tabs__btn:hover{background:#f0e2cf}:root[data-theme=light] .game-invite-btn:hover,:root[data-theme=light] .controls__btn--emphasized:hover:not(:disabled){background:#986323}:root[data-theme=light] .counting-badge--neutral{background:#d8c08a;border-color:#b8902f;color:#261a12}.help-modal{text-align:left;width:min(640px,92vw);max-height:84vh;display:flex;flex-direction:column;padding:1.25rem 1.5rem}.help-modal__header{display:flex;align-items:center;justify-content:space-between;gap:.5rem;margin-bottom:.5rem}.help-modal__header .modal__title{margin:0;font-size:var(--fs-xl)}.help-modal__close{background:transparent;border:1px solid #50412f;color:#f5efe6;width:2.2rem;height:2.2rem;border-radius:.4rem;font:inherit;font-size:var(--fs-md);cursor:pointer}.help-modal__close:hover{background:#ffffff0d}.help-modal__body{flex:1 1 auto;overflow-y:auto;display:flex;flex-direction:column;gap:.4rem;padding:.25rem 0}.help-modal__section{border:1px solid #50412f;border-radius:.5rem;background:#ffffff08;overflow:hidden}.help-modal__section-btn{width:100%;display:flex;align-items:center;justify-content:space-between;gap:.5rem;padding:.65rem .9rem;background:transparent;border:0;color:inherit;font:inherit;font-size:var(--fs-md);font-weight:700;cursor:pointer;text-align:left}.help-modal__section-btn:hover{background:#ffffff0a}.help-modal__section-btn--open{background:#c08a3e1f}.help-modal__section-body{padding:.5rem 1rem .85rem;font-size:var(--fs-md);line-height:1.6;color:#e8d9b6}.help-modal__section-body p,.help-modal__section-body ul,.help-modal__section-body ol{margin:.35rem 0}.help-modal__section-body ul,.help-modal__section-body ol{padding-left:1.2rem}.help-modal__section-body li{margin:.2rem 0}.help-modal__section-body b{color:#f0e2c0}.help-modal__footer{display:flex;justify-content:flex-end;margin-top:.6rem}.help-btn{display:inline-flex;align-items:center;gap:.35rem;padding:.4rem .75rem;background:transparent;border:1px solid #50412f;color:#f5efe6;font:inherit;font-size:var(--fs-sm);font-weight:600;border-radius:.4rem;cursor:pointer;transition:background .12s ease,border-color .12s ease}.help-btn:hover{background:#ffffff0d;border-color:#7b6042}.help-btn:focus-visible{outline:2px solid #d8a058;outline-offset:1px}:root[data-theme=light] .help-modal__section{border-color:#d6c2a5;background:#b8792f0a}:root[data-theme=light] .help-modal__section-btn:hover{background:#b8792f14}:root[data-theme=light] .help-modal__section-btn--open{background:#b8792f2e}:root[data-theme=light] .help-modal__section-body{color:#3a2416}:root[data-theme=light] .help-modal__section-body b{color:#261a12}:root[data-theme=light] .help-modal__close,:root[data-theme=light] .help-btn{background:#fffaf2;border-color:#d6c2a5;color:#261a12}:root[data-theme=light] .help-modal__close:hover,:root[data-theme=light] .help-btn:hover{background:#f0e2cf}.toast-stack{position:fixed;top:1rem;right:1rem;display:flex;flex-direction:column;gap:.5rem;z-index:30;max-width:90vw;pointer-events:none}.toast{pointer-events:auto;padding:.7rem 1rem;border-radius:8px;font-size:var(--fs-sm);font-weight:500;background:#2b2218;color:#f5efe6;border:1px solid #6b4f33;box-shadow:0 4px 16px #00000059;max-width:320px;animation:toast-in .18s ease-out;cursor:pointer}.toast--warn{background:#5a4a1f;border-color:#a07c33;color:#fff3d6}.toast--error{background:#5c1f1f;border-color:#a83a3a;color:#ffd6d6}@keyframes toast-in{0%{transform:translateY(-8px);opacity:0}to{transform:translateY(0);opacity:1}}.hidden-tab-banner{position:sticky;top:0;z-index:5;background:#6b3a08;color:#ffeac7;text-align:center;padding:.4rem .6rem;font-size:var(--fs-sm);font-weight:600;border-bottom:1px solid #8a4d10}.clock--active{box-shadow:0 0 0 2px #c08a3e,0 0 16px #c08a3e73;border-color:#c08a3e!important;transition:box-shadow .2s ease}.reaction-bar{display:flex;gap:.35rem;justify-content:center;margin:.25rem 0 0;flex-wrap:wrap}.reaction-bar__btn{background:#2b2218;color:#f5efe6;border:1px solid #6b4f33;border-radius:999px;padding:.35rem .7rem;font:inherit;font-size:1.05rem;cursor:pointer;min-width:2.6rem;transition:transform .1s ease,background .1s ease}.reaction-bar__btn:hover:not(:disabled){background:#3a2d1e;transform:translateY(-1px)}.reaction-bar__btn:disabled{opacity:.5;cursor:not-allowed}.chat-tabs{display:flex;flex-direction:column;min-height:0}.chat-tabs__bar{display:flex;gap:.25rem;margin-bottom:.4rem}.chat-tabs__btn{flex:1;background:#2b2218;color:#d6c7a8;border:1px solid #6b4f33;border-radius:6px;padding:.35rem .7rem;font:inherit;font-size:var(--fs-sm);cursor:pointer}.chat-tabs__btn--active{background:#5a4530;color:#f5efe6;border-color:#c08a3e}.room-chat__msg--reaction .chat__text{font-size:1.5rem;line-height:1.1}.counting-badge--ready{background:#6b3a08;color:#ffeac7;border:1px solid #c08a3e;padding:.4rem .7rem;border-radius:6px;font-weight:600;font-size:var(--fs-sm);animation:counting-pulse 2s ease-in-out infinite}.counting-badge--prominent{animation:counting-pulse 1.4s ease-in-out infinite}@keyframes counting-pulse{0%,to{box-shadow:0 0 #c08a3e80}50%{box-shadow:0 0 0 6px #c08a3e00}}.audio-controls{display:flex;gap:.35rem;justify-content:center;margin-top:.25rem}.audio-controls__btn{background:#2b2218;color:#d6c7a8;border:1px solid #6b4f33;border-radius:6px;padding:.3rem .6rem;font-size:1rem;cursor:pointer}.audio-controls__btn--on{background:#5a4530;color:#f5efe6;border-color:#c08a3e}.new-game-modal__symmetry-preview{background:#2b221873;border:1px dashed #6b4f33;border-radius:6px;padding:.6rem .8rem;margin:.4rem 0 .8rem;font-size:var(--fs-sm);font-family:ui-monospace,Menlo,monospace;white-space:pre;color:#d6c7a8;text-align:left;max-width:100%;overflow-x:auto}.modal__subtitle--accent{color:#ffd680;font-weight:600}:root[data-theme=light] .toast{background:#fffaf2;color:#261a12;border-color:#d6c2a5}:root[data-theme=light] .toast--warn{background:#fff1d4;color:#5a3d08;border-color:#c08a3e}:root[data-theme=light] .toast--error{background:#ffd6d6;color:#5c1f1f;border-color:#c44b3e}:root[data-theme=light] .reaction-bar__btn,:root[data-theme=light] .chat-tabs__btn,:root[data-theme=light] .audio-controls__btn{background:#fffaf2;color:#261a12;border-color:#d6c2a5}:root[data-theme=light] .reaction-bar__btn:hover:not(:disabled),:root[data-theme=light] .audio-controls__btn:hover{background:#f0e2cf}:root[data-theme=light] .chat-tabs__btn--active,:root[data-theme=light] .audio-controls__btn--on{background:#c08a3e;color:#261a12;border-color:#a36f28}:root[data-theme=light] .hidden-tab-banner{background:#fff1d4;color:#5a3d08;border-bottom-color:#c08a3e}:root[data-theme=light] .new-game-modal__symmetry-preview{background:#d6c2a54d;border-color:#c8aa7d;color:#3a2416}:root[data-theme=light] .modal__subtitle--accent{color:#8a5a08}.engine-thinking{display:inline-flex;align-items:center;gap:.4rem;align-self:center;margin:.25rem 0;padding:.25rem .7rem;border-radius:999px;font-size:.85rem;font-weight:500;background:#c08a3e2e;color:#e9c98a;border:1px solid rgba(192,138,62,.45)}.engine-thinking__dot{display:inline-block;width:8px;height:8px;border-radius:50%;background:#e9c98a;animation:engine-thinking-pulse 1.1s ease-in-out infinite}@keyframes engine-thinking-pulse{0%,to{opacity:.35;transform:scale(.85)}50%{opacity:1;transform:scale(1.1)}}:root[data-theme=light] .engine-thinking{background:#c08a3e2e;color:#6a4413;border-color:#c08a3e8c}:root[data-theme=light] .engine-thinking__dot{background:#8a5a08}.landing__vs-cpu{display:flex;flex-direction:column;gap:.4rem}.landing__levels{display:flex;gap:.3rem;padding:0 .1rem}.landing__level{flex:1 1 auto;min-width:0;padding:.4rem .45rem;border:1px solid #5a4530;background:#2b2218;color:#d4c5a8;border-radius:.45rem;cursor:pointer;font:inherit;font-size:var(--fs-sm);font-weight:600;text-align:center;transition:background .12s ease,border-color .12s ease,color .12s ease}.landing__level:hover{background:#3b2f24;border-color:#8a6840}.landing__level:focus-visible{outline:2px solid #c08a3e;outline-offset:2px}.landing__level--active{background:#c08a3e;border-color:#c08a3e;color:#1f1b16}.landing__level--active:hover{background:#d8a058;border-color:#d8a058}:root[data-theme=light] .landing__level{background:#f4e8d0;border-color:#c8aa7d;color:#3a2416}:root[data-theme=light] .landing__level:hover{background:#e9d6b3;border-color:#a88454}:root[data-theme=light] .landing__level--active{background:#c08a3e;border-color:#c08a3e;color:#1f1b16}
