:root{--bg: #f6f1e7;--surface: #fffdf8;--text: #24302a;--muted: #68756d;--accent: #1f7a5c;--accent-text: #ffffff;--border: #ddd5c4;--error: #b3352b;--mistake: #b85c00;--inaccuracy: #8a6d00;--bubble: #e4f2ea;--square-dark: #6f9c86;--square-light: #f0e9d6;--square-last: rgba(235, 190, 70, .55);--square-selected: rgba(31, 122, 92, .55);--square-target: rgba(20, 60, 45, .45);--square-peek: rgba(70, 120, 200, .45);--square-peek-target: rgba(40, 80, 170, .6);--mark-hanging: #d3342a;--mark-attacked: #ec8a1e;--mark-free: #17a05d;--mark-good: rgba(23, 160, 93, .6);--mark-bad: rgba(211, 52, 42, .6);color-scheme:light dark;font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif}@media (prefers-color-scheme: dark){:root{--bg: #17201c;--surface: #212c27;--text: #edf1ec;--muted: #a3b0a8;--accent: #45b78f;--accent-text: #0f1a15;--border: #38463f;--error: #ff8f84;--mistake: #ffb066;--inaccuracy: #e6cc5c;--bubble: #2d4238;--square-dark: #5b8571;--square-light: #d9d2bf}}*{box-sizing:border-box}html,body,#root{height:100%}body{margin:0;background:var(--bg);color:var(--text);overscroll-behavior:none}h1,h2,p{margin:0}h2{font-size:1.15rem}a{color:inherit}button,.button,input{font:inherit}button,.button{min-height:44px;padding:8px 16px;border:1px solid var(--border);border-radius:12px;background:var(--surface);color:var(--text);cursor:pointer;text-decoration:none;display:inline-flex;align-items:center;justify-content:center}button:disabled{opacity:.6;cursor:default}button:focus-visible,a:focus-visible,input:focus-visible{outline:3px solid var(--accent);outline-offset:2px}.primary{background:var(--accent);border-color:var(--accent);color:var(--accent-text);font-weight:600}.danger{border-color:var(--error);color:var(--error);font-weight:600}.link{border:0;background:none;color:var(--muted);text-decoration:underline;padding:8px}.muted{color:var(--muted);font-size:.92rem}.error{color:var(--error);font-size:.92rem}.card{background:var(--surface);border:1px solid var(--border);border-radius:18px;padding:20px}.stack{display:flex;flex-direction:column;gap:14px}label{display:flex;flex-direction:column;gap:6px;font-size:.95rem}input:not([type=range]){min-height:44px;padding:8px 12px;border-radius:10px;border:1px solid var(--border);background:var(--bg);color:var(--text);font-size:16px}input[type=range]{accent-color:var(--accent);width:100%;height:32px}.auth{min-height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;padding:24px 16px;text-align:center}.auth form{width:min(100%,380px);margin-top:16px;text-align:left}.logo{font-size:3.4rem;line-height:1;color:var(--accent)}.topbar{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:4px 16px;height:52px}.brand{font-weight:700;text-decoration:none}.brand span{color:var(--accent);font-size:1.3rem}.user{display:flex;align-items:center;gap:4px;min-width:0}.username{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.home{max-width:560px;margin:0 auto;padding:8px 16px 32px;display:flex;flex-direction:column;gap:16px}.segmented{display:grid;grid-template-columns:repeat(3,1fr);gap:6px}.segmented .selected{border-color:var(--accent);box-shadow:inset 0 0 0 1px var(--accent);font-weight:600}.row{justify-content:space-between;gap:12px;width:100%;text-align:left}.game-loading{padding:32px 16px;text-align:center}.game{display:grid;gap:16px;padding:0 16px 16px;justify-content:center;grid-template-columns:minmax(0,min(100%,calc(100dvh - 240px)))}.board-wrap{position:relative;width:100%;aspect-ratio:1;touch-action:none;border-radius:10px;overflow:hidden;align-self:start}.promotion{position:absolute;top:0;right:0;bottom:0;left:0;z-index:20;display:flex;flex-direction:column;gap:8px;align-items:stretch;justify-content:center;padding:15%;background:#0f1a15b3}.promotion .link{color:#fff}.opponent{display:flex;align-items:center;gap:12px}.avatar{flex:none;width:52px;height:52px;display:grid;place-items:center;border-radius:50%;background:var(--accent);color:var(--accent-text);font-size:1.9rem}.avatar.thinking{animation:bob 1s ease-in-out infinite}@keyframes bob{50%{transform:translateY(-4px)}}@media (prefers-reduced-motion: reduce){.avatar.thinking{animation:none}}.bubble{position:relative;padding:10px 14px;border-radius:14px;background:var(--bubble)}.bubble:before{content:"";position:absolute;left:-7px;top:50%;width:14px;height:14px;background:var(--bubble);transform:translateY(-50%) rotate(45deg)}.result{font-weight:700;font-size:1.05rem}.moves{margin:0;padding:0 0 0 2.2em;max-height:120px;overflow-y:auto;font-variant-numeric:tabular-nums}.moves li span{display:inline-block;min-width:4.5em}.actions{display:flex;flex-wrap:wrap;gap:8px}.actions>*{flex:1 1 auto}.summary{display:grid;grid-template-columns:repeat(5,1fr);gap:4px;margin:0;text-align:center;font-size:.72rem}.summary dt{color:var(--muted)}.summary dd{margin:0;font-size:1.1rem;font-weight:700}.summary .blunder dd,.move.blunder{color:var(--error)}.summary .mistake dd,.move.mistake{color:var(--mistake)}.summary .inaccuracy dd,.move.inaccuracy{color:var(--inaccuracy)}.moves .move{min-height:36px;min-width:4.5em;padding:2px 6px;border:0;background:none;justify-content:flex-start}.moves .move.blunder,.moves .move.mistake,.moves .move.inaccuracy{font-weight:700}.moves .move[aria-current=true]{background:var(--bubble);border-radius:8px}.review-nav{display:flex;align-items:center;justify-content:space-between;gap:8px}.review-nav button{min-width:64px}.line{display:flex;flex-direction:column;gap:4px;margin:0;padding:0 0 0 1.6em}.line button{width:100%;min-height:36px;padding:2px 10px;justify-content:flex-start;text-align:left}.line button[aria-current=true]{border-color:var(--accent);box-shadow:inset 0 0 0 1px var(--accent);font-weight:600}.line .own{font-weight:600}.motif{margin:0;font-size:.92rem}.motif strong{display:block}.side h3{margin:0;font-size:1rem}.progress{height:10px;border-radius:5px;background:var(--border);overflow:hidden}.progress div{height:100%;background:var(--accent)}.lesson{justify-content:space-between;gap:12px;text-align:left}.lesson span{display:flex;flex-direction:column;gap:2px;font-weight:500}.lesson small{font-weight:400}.lesson>small{flex:none}.lesson.current{border-color:var(--accent);box-shadow:inset 0 0 0 1px var(--accent)}.check{flex-direction:row;align-items:center;gap:10px}.check input{width:22px;height:22px;min-height:0;flex:none;accent-color:var(--accent)}.kinds{display:grid;grid-template-columns:repeat(3,1fr);gap:6px}.kinds button{min-height:40px;padding:4px 6px;font-size:.85rem}.kinds .selected{border-color:var(--accent);box-shadow:inset 0 0 0 1px var(--accent);font-weight:600}.warning{padding:12px;border:2px solid var(--error);border-radius:12px}.legend{font-size:.82rem}.legend .hanging{color:var(--mark-hanging);font-weight:700}.legend .attacked{color:var(--mark-attacked);font-weight:700}.legend .free{color:var(--mark-free);font-weight:700}.choices{display:flex;flex-direction:column;gap:6px}.choices .right{border-color:var(--mark-free);box-shadow:inset 0 0 0 1px var(--mark-free);font-weight:600}.choices .wrong{border-color:var(--mark-hanging);box-shadow:inset 0 0 0 1px var(--mark-hanging)}.poker{display:grid;gap:16px;padding:0 16px 16px;max-width:1180px;margin:0 auto}.table{display:flex;flex-direction:column;gap:10px;min-width:0}.seats{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:8px}.seat{border:1px solid var(--border);border-radius:12px;padding:8px 10px;background:var(--surface);display:flex;flex-direction:column;gap:4px}.seat.current{border-color:var(--accent);box-shadow:inset 0 0 0 1px var(--accent)}.seat.winner{border-color:var(--mark-free);box-shadow:inset 0 0 0 2px var(--mark-free)}.seat.folded{opacity:.55}.seat-head{display:flex;justify-content:space-between;align-items:center}.button-chip{width:22px;height:22px;border-radius:50%;display:grid;place-items:center;background:var(--text);color:var(--bg);font-size:.72rem;font-weight:700}.seat-cards{display:flex;gap:4px;min-height:58px;align-items:center}.seat-info{font-size:.8rem}.seat-action{font-size:.85rem;min-height:1.2em;font-weight:600}.felt{background:#1f6b4f;color:#f5f2e6;border-radius:18px;padding:18px 12px;display:flex;flex-direction:column;align-items:center;gap:10px}.felt .muted{color:#cfe3d8}.board{display:flex;flex-wrap:wrap;justify-content:center;gap:6px;min-height:64px;align-items:center}.pot{font-weight:600;text-align:center}.card-face{width:44px;height:58px;border-radius:7px;background:#fffdf8;color:#1c1c1c;border:1px solid #b9b2a2;display:inline-flex;flex-direction:column;align-items:center;justify-content:center;font-weight:700;font-size:1.1rem;line-height:1.05}.card-face small{font-size:1.15rem}.card-face.red{color:#c0271e}.card-face.back{background:repeating-linear-gradient(45deg,#2f5f8f,#2f5f8f 5px,#4a7cad 5px,#4a7cad 10px)}.poker-actions{display:grid;grid-template-columns:repeat(2,1fr);gap:6px}.hint{padding:10px 12px;border-radius:12px;background:var(--bubble);font-size:.92rem}.poker-log{margin:0;padding:0;list-style:none;font-size:.82rem;color:var(--muted)}.decisions{margin:0;padding:0;list-style:none;display:flex;flex-direction:column;gap:10px;font-size:.9rem}.decisions li{border-left:4px solid var(--border);padding-left:8px}.decisions .blunder{border-color:var(--error)}.decisions .mistake{border-color:var(--mistake)}.decisions .inaccuracy{border-color:var(--inaccuracy)}.decisions .best{border-color:var(--mark-free)}.hole{display:inline-flex;gap:3px;vertical-align:middle}.hole .card-face{width:30px;height:40px;font-size:.8rem}.hole .card-face small{font-size:.8rem}@media (min-width: 900px){.poker{grid-template-columns:minmax(0,1fr) 340px;align-items:start}}.tiles{display:grid;grid-template-columns:1fr 1fr;gap:8px}.elo{display:grid;grid-template-columns:1fr 1fr;gap:8px;text-align:center}.elo strong{display:block;font-size:1.8rem;color:var(--accent)}.stats{width:100%;border-collapse:collapse;font-size:.92rem}.stats th,.stats td{padding:6px 4px;text-align:right;border-bottom:1px solid var(--border)}.stats th:first-child,.stats td:first-child{text-align:left}.stats th{color:var(--muted);font-weight:500}.stats .weakest td{color:var(--error);font-weight:700}@media (min-aspect-ratio: 1/1){.game{grid-template-columns:minmax(0,calc(100dvh - 68px)) minmax(240px,340px);align-items:start}.moves{max-height:calc(100dvh - 440px);min-height:48px}}
