:root{--paper:#f5f3ec;--ink:#21372e;--forest:#244e3f;--muted:#59685e;--line:#d9ded4;--light:#e8e4d5;--dark:#779582;--gold:#e8cd76}*{box-sizing:border-box}body{margin:0;background:var(--paper);color:var(--ink);font-family:Inter,ui-sans-serif,system-ui,sans-serif;font-size:14px;line-height:1.5}button,input,select{font:inherit}button,a,input,select{-webkit-tap-highlight-color:transparent}button{cursor:pointer;min-height:44px;border:1px solid var(--line);border-radius:8px;background:transparent;color:var(--ink);padding:10px 15px;font-weight:600}button:hover{background:#e8ece4}button:disabled{cursor:default;opacity:.5}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #bd8431;outline-offset:3px}::selection{background:var(--gold);color:var(--ink)}[hidden]{display:none!important}.header{max-width:1280px;margin:auto;padding:24px 44px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line)}.brand{display:flex;align-items:center;gap:8px;color:var(--ink);text-decoration:none;font:700 24px Georgia,serif;line-height:1}.brand img{filter:drop-shadow(0 2px 1px #0002)}.brand-small{display:block;font:600 9px system-ui;letter-spacing:.22em;margin-top:6px}.header-note{color:var(--muted);font-size:12px}.text-button{border:0;font-size:12px;padding:8px 4px;min-height:40px}.intro{display:flex;justify-content:space-between;align-items:center;margin:34px 0 28px}h1{font:400 clamp(32px,3.7vw,48px)/1.05 Georgia,serif;letter-spacing:-.025em;margin:0}h1 br{display:none}h1 em{font-weight:400;color:#54705a}.intro p{color:var(--muted);margin:12px 0 0;font-size:13px}main{max-width:1120px;margin:auto;padding:0 36px}.layout{display:grid;grid-template-columns:minmax(0,1.65fr) minmax(300px,1fr);gap:44px}.play-area{min-width:0}.player-row{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 14px}.board-wrap+.player-row{margin:16px 0 0}.player-identity{display:flex;align-items:center;gap:12px;min-width:0}.player-identity strong{display:block;max-width:220px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px}.player-identity span{display:block;font-size:11px;color:var(--muted);margin-top:3px}.avatar{width:38px;height:38px;border-radius:9px;display:grid;place-items:center;background:#e0e5da;color:var(--forest);font:20px Georgia;flex-shrink:0}.avatar.own{background:var(--forest);color:white}.clock{font-size:25px;font-weight:600;font-variant-numeric:tabular-nums;background:#e8e9e0;border-radius:7px;padding:5px 14px;letter-spacing:.02em}.clock.active{background:var(--forest);color:#fff}.clock.low{color:#a53123;background:#f9e3d6}.board-wrap{border-radius:5px;overflow:hidden;box-shadow:0 8px 24px #21372e12}.board{display:grid;grid-template-columns:repeat(8,1fr);aspect-ratio:1}.square{border:0;border-radius:0;padding:0;min-height:0;aspect-ratio:1;position:relative;display:grid;place-items:center;background:var(--light);touch-action:manipulation}.square.dark{background:var(--dark)}.square:hover{background:#d3d5ad}.square.dark:hover{background:#6f9275}.square img{width:87%;height:87%;object-fit:contain;position:relative;z-index:1;pointer-events:none;filter:drop-shadow(0 2px 1px #0002)}.square.selected{background:var(--gold)}.square.last{background:#d8d493}.square.dark.last{background:#a2ae6a}.square.legal:after{content:'';position:absolute;width:24%;height:24%;background:#21372e55;border-radius:50%;z-index:2;pointer-events:none}.square.legal:has(img):after{width:85%;height:85%;border:5px solid #21372e66;background:transparent}.square.check{background:#d47862}.coordinate{position:absolute;z-index:2;font-size:10px;font-weight:700;line-height:1;color:#35513e}.coordinate.rank{top:4px;left:4px}.coordinate.file{bottom:3px;right:4px}.dark .coordinate{color:#f9faf3}.board-caption{display:flex;justify-content:space-between;align-items:center;color:var(--muted);font-size:11px;margin:7px 0 0}.panel{background:#fffdf7;border:1px solid var(--line);border-radius:12px;padding:27px}h2{font:400 28px Georgia,serif;margin:0 0 10px;letter-spacing:-.025em}h3{font-size:13px;margin:0}.muted{color:var(--muted);font-size:12px;margin:0 0 24px;line-height:1.7}label,legend{display:block;font-weight:600;font-size:12px;margin:16px 0 8px}input:not([type=radio]),select{width:100%;min-height:45px;padding:10px 12px;border:1px solid #ccd3c7;border-radius:7px;color:var(--ink);background:#fffefb;caret-color:var(--forest)}input::placeholder{color:#68746a}fieldset{border:0;padding:0;margin:0}legend{padding:0;margin:17px 0 10px}.tabs{display:flex;border-bottom:1px solid var(--line);margin-top:22px}.tabs button{flex:1;border:0;border-radius:0;font-size:12px;color:var(--muted)}.tabs [aria-selected=true]{color:var(--forest);box-shadow:inset 0 -2px var(--forest)}.choices{display:flex;gap:8px}.choices label{position:relative;flex:1;margin:0;cursor:pointer}.choices input{position:absolute;opacity:0}.choices span{display:block;padding:10px 3px;text-align:center;border:1px solid var(--line);border-radius:7px;font-weight:500;white-space:nowrap}.choices input:checked+span{background:#e5eddf;border-color:var(--forest);color:var(--forest)}.choices input:focus-visible+span{outline:3px solid #bd8431}.primary{background:var(--forest);color:white;border-color:var(--forest)}.primary:hover{background:#173c2e;color:white}.full{width:100%}form>.primary{margin-top:23px;display:flex;justify-content:space-between}.small-note{border-top:1px solid var(--line);margin-top:25px;padding-top:19px;font-size:11px;color:var(--muted);line-height:1.8}.howto{padding:25px 3px}.howto h3{font:400 19px Georgia,serif}.howto p{font-size:12px;line-height:1.8;color:var(--muted);margin:10px 0 20px}.howto>div{display:flex;gap:16px;font-size:10px;color:var(--forest);flex-wrap:wrap}.room-label{text-align:right}.room-label>span{display:block;font-size:9px;letter-spacing:.12em;color:var(--muted)}.room-label strong{display:block;font-size:25px;letter-spacing:.1em}.panel-heading{display:flex;justify-content:space-between;align-items:center}.live-dot{width:8px;height:8px;background:#678a55;border-radius:50%}.history-heading{display:flex;justify-content:space-between;border-bottom:1px solid var(--line);padding-bottom:10px;margin-top:27px}.history-heading>span{font-size:9px;color:var(--muted)}.history{max-height:228px;min-height:130px;overflow:auto;scrollbar-color:#b3c3ae transparent;scrollbar-width:thin}.move-row{display:grid;grid-template-columns:36px 1fr 1fr;padding:7px 10px;font-variant-numeric:tabular-nums}.move-row:nth-child(even){background:#f0f2e9}.move-row span:first-child{color:var(--muted);font-size:12px}.history>p{padding:25px 10px}.captured{border-top:1px solid var(--line);padding:15px 0}.captured>span{font-size:10px;color:var(--muted)}.captured>div{display:flex;flex-wrap:wrap;min-height:24px}.captured img{width:23px;height:23px}.action-row{display:flex;gap:8px;flex-wrap:wrap}.action-row button{flex:1;font-size:12px}.danger{color:#a23c31}.message{position:fixed;bottom:20px;left:50%;transform:translateX(-50%);background:#21372e;color:white;border-radius:9px;padding:15px 22px;max-width:calc(100vw - 32px);width:max-content;z-index:10;box-shadow:0 4px 20px #0002}footer{max-width:1120px;margin:40px auto 0;padding:25px 36px;border-top:1px solid var(--line);display:flex;justify-content:space-between;gap:15px;color:var(--muted);font-size:10px}footer a{color:var(--muted);text-underline-offset:4px}dialog{border:0;border-radius:14px;padding:30px;background:var(--paper);color:var(--ink);max-width:calc(100vw - 32px)}dialog::backdrop{background:#14251c99}#promotion-choices img{width:44px;height:44px}#promotion-choices button{padding:8px}#game-status{min-height:40px;margin-bottom:15px}@media(min-width:1100px){.intro{margin-top:42px}}@media(max-width:800px){.header{padding:18px 24px}.header-note{display:none}main{padding:0 20px}.layout{gap:24px;grid-template-columns:minmax(0,1.3fr) minmax(260px,1fr)}.panel{padding:20px}.intro h1{font-size:34px}.intro p{max-width:250px}.choices{gap:4px}.choices span{font-size:11px}.player-identity strong{max-width:145px}.clock{font-size:21px;padding:5px 10px}}@media(max-width:650px){.header{padding:16px 20px}.brand{font-size:22px}.intro{margin:27px 0 24px;gap:14px}.intro h1{font-size:36px}h1 br{display:block}.intro p{font-size:12px;max-width:230px}.layout{grid-template-columns:1fr;gap:25px}main{padding:0 16px}.panel{padding:24px}.play-area{max-width:560px;width:100%;margin:auto}.player-row{margin-bottom:10px}.board-wrap+.player-row{margin-top:12px}.clock{font-size:24px}.player-identity strong{max-width:220px}.room-label strong{font-size:17px}.room-label>span{font-size:8px}.room-label .text-button{font-size:10px}.choices span{font-size:12px}.howto{padding:24px 8px}footer{margin-top:10px;padding:24px 20px;flex-wrap:wrap}footer span:nth-child(2){display:none}}@media(prefers-reduced-motion:no-preference){.primary{transition:background .15s}.panel{animation:arrive .35s ease-out}@keyframes arrive{from{opacity:.6;transform:translateY(5px)}to{opacity:1;transform:none}}}
@media(min-width:900px) and (max-height:850px){.header{padding-top:16px;padding-bottom:16px}.intro{margin:22px 0}.intro h1{font-size:38px}.play-area{max-width:calc(100svh - 270px);width:100%;margin:auto}.layout{grid-template-columns:minmax(0,1fr) 355px;gap:30px}.panel{padding:22px}.howto{padding-top:18px}.howto p{margin-bottom:12px}}
