.game-layout{display:grid;grid-template-areas:"top" "play" "bottom";gap:1rem;width:100%;margin:1.25rem auto 2rem;touch-action:manipulation}.game-top,.game-play,.game-bottom{width:100%;max-width:560px;min-width:0;margin-block:0;margin-inline:auto}.game-top{grid-area:top;display:flex;flex-direction:column;gap:.75rem}.game-play{grid-area:play;display:flex;flex-direction:column;gap:.35rem}.game-bottom{grid-area:bottom;display:flex;flex-direction:column;gap:.75rem}.game-top>section,.game-play>section,.game-bottom>section{margin-block:0}@media(min-width:900px){.game-layout{grid-template-columns:minmax(0,1.1fr) minmax(0,.9fr);grid-template-areas:"play top" "play bottom";gap:1.5rem 2rem;align-items:start}.game-top,.game-bottom{max-width:none;margin-inline:0}.game-play{max-width:560px;margin-inline:0}}.game-layout.game-layout--single{grid-template-columns:minmax(0,1fr);grid-template-areas:"top" "play" "bottom";gap:1rem}.game-layout.game-layout--single .game-top,.game-layout.game-layout--single .game-play,.game-layout.game-layout--single .game-bottom{max-width:560px;margin-inline:auto}@media(min-width:900px){.game-layout.game-layout--single{max-width:800px;margin-inline:auto}.game-layout.game-layout--single .game-top,.game-layout.game-layout--single .game-play,.game-layout.game-layout--single .game-bottom{max-width:none}}.game-sound-controls{display:flex;gap:.4rem;width:100%}.game-mute{flex:1 1 0;display:inline-flex;align-items:center;justify-content:center;gap:.35rem;min-width:0;margin:0;padding-block:.5rem;font-size:clamp(.76rem,3vw,.86rem)}.game-mute.is-muted{color:var(--pico-muted-color, var(--muted-color))}.game-tabs{display:flex;gap:.4rem;width:100%}.game-tab{flex:1 1 0;min-width:0;margin:0;padding-block:.55rem;font-size:clamp(.78rem,3.2vw,.92rem);font-weight:700;border-radius:var(--pico-border-radius, var(--border-radius, .25rem));background:#f1f5f9;border:1px solid #cbd5e1;color:#1f2937;box-shadow:none}.game-tab.is-active{background:var(--pico-primary-background, var(--primary, #1095c1));border-color:var(--pico-primary-background, var(--primary, #1095c1));color:#fff}:root{--chc-ink: #2b2118;--chc-cream: #f4e6c8;--chc-cream-deep: #e8d2a8;--chc-wood: #8a5a36;--chc-wood-dark: #5c3a22;--chc-panel: #fffaf0;--chc-line: #cbb38c;--chc-brand: #f83800;--chc-brand-dark: #c62d00;--chc-muted: #6b5a44;--chc-green: #1f7a4d}[x-cloak]{display:none!important}.chc-page{display:grid;grid-template-columns:minmax(0,1fr);gap:1rem;width:100%;margin:1.25rem auto 2rem}.chc-main{min-width:0}.chc-aside{display:flex;flex-direction:column;gap:.75rem;min-width:0}.chc-game{display:flex;flex-direction:column;gap:.75rem}.chc-game .game-top,.chc-game .game-play,.chc-me{width:100%;max-width:560px;margin-inline:auto}.chc-me{display:block}.chc-seat{display:flex;align-items:center;justify-content:space-between;gap:.6rem;min-height:44px;min-width:0}.chc-lobby,.chc-waiting{width:100%;max-width:560px;margin:0 auto}.chc-card{width:100%;padding:clamp(1rem,4.5vw,1.6rem);color:var(--chc-ink);background:radial-gradient(circle at 100% 0,rgba(248,56,0,.08),transparent 42%),var(--chc-panel);border:1px solid var(--chc-line);border-radius:.75rem;box-shadow:0 8px 22px #462e1624}.chc-kicker{margin:0 0 .35rem;font-size:.68rem;font-weight:800;letter-spacing:.16em;color:var(--chc-brand)}.chc-lobby-card h2,.chc-waiting-card h2{margin:0 0 .5rem;font-size:clamp(1.35rem,6vw,1.9rem);line-height:1.25;color:var(--chc-ink)}.chc-lead,.chc-hint{margin:0;font-size:clamp(.8rem,3.1vw,.9rem);line-height:1.7;color:var(--chc-muted)}.chc-time-control{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.5rem;margin:1rem 0}.chc-time-control div{padding:.55rem .7rem;text-align:center;background:#8a5a3614;border:1px solid var(--chc-line);border-radius:.5rem}.chc-time-control dt{font-size:.7rem;color:var(--chc-muted)}.chc-time-control dd{margin:.1rem 0 0;font-size:1.25rem;font-weight:800;font-variant-numeric:tabular-nums;color:var(--chc-ink)}.chc-primary{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.15rem;width:100%;min-height:58px;margin:.25rem 0 0;padding:.7rem 1rem;font-size:clamp(1rem,4vw,1.12rem);font-weight:800;color:#fff;background:var(--chc-brand);border:1px solid var(--chc-brand-dark);border-radius:.55rem;box-shadow:0 4px 0 var(--chc-brand-dark)}.chc-primary:hover,.chc-primary:focus{background:var(--chc-brand-dark);border-color:var(--chc-brand-dark);color:#fff}.chc-primary small{font-size:.7rem;font-weight:600;opacity:.9}.chc-primary:disabled{opacity:.55;cursor:wait}.chc-wide{width:100%;min-height:48px}.chc-status{margin:.65rem 0 0;padding:.5rem .65rem;font-size:clamp(.8rem,3.1vw,.9rem);font-weight:700;line-height:1.55;color:var(--chc-muted);background:#8a5a3612;border:1px solid var(--chc-line);border-radius:.45rem;overflow-wrap:anywhere}.chc-status:empty{display:none}.chc-status.is-error{color:#9a2410;background:#f838001a;border-color:var(--chc-brand)}.chc-status.is-check{color:var(--chc-brand-dark);background:#f838001f;border-color:var(--chc-brand)}.chc-status.is-result{color:var(--chc-green);background:#1f7a4d1a;border-color:var(--chc-green)}.chc-waiting-card{text-align:center}.chc-waiting-time{margin:.3rem 0 .5rem;font-size:clamp(2.4rem,12vw,3.4rem);font-weight:800;font-variant-numeric:tabular-nums;line-height:1;color:var(--chc-brand)}.chc-waiting-card .chc-status{margin-bottom:.85rem}.chc-waiting-games{display:inline-flex;align-items:center;justify-content:center;margin-bottom:.5rem;padding:.55rem 1rem;border-radius:var(--pico-border-radius);background:var(--chc-brand);color:#fff;font-weight:800;text-decoration:none;box-shadow:0 6px 16px #f8380038}.chc-waiting-games:hover,.chc-waiting-games:focus-visible{background:var(--chc-brand-dark);color:#fff;text-decoration:none}.chc-player{display:flex;align-items:center;gap:.5rem;min-width:0}.chc-player--me{margin-top:0}.chc-avatar{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;width:34px;height:34px;font-size:.85rem;font-weight:800;border-radius:50%;border:2px solid var(--chc-ink)}.chc-avatar--w{color:var(--chc-ink);background:#fffdf6}.chc-avatar--b{color:#fffdf6;background:var(--chc-ink);border-color:#fffdf6;box-shadow:0 0 0 1px var(--chc-ink)}.chc-player-label{flex:0 0 auto;font-size:.7rem;font-weight:700;letter-spacing:.08em;color:var(--chc-muted)}.chc-player-id{overflow:hidden;min-width:0;font-size:clamp(.88rem,3.4vw,1rem);font-variant-numeric:tabular-nums;text-overflow:ellipsis;white-space:nowrap;color:var(--chc-ink)}.chc-disconnected{flex:0 0 auto;margin-left:.15rem;padding:.15rem .45rem;font-size:.65rem;font-weight:800;color:#fff;background:var(--chc-brand);border-radius:999px}.chc-clock{flex:0 0 auto;display:flex;align-items:center;justify-content:center;width:auto;min-width:4.8rem;padding:.25rem .6rem;background:#8a5a361a;border:2px solid var(--chc-line);border-radius:.5rem}.chc-clock span{font-size:clamp(1.35rem,6.2vw,1.75rem);font-weight:800;font-variant-numeric:tabular-nums;line-height:1.15;color:var(--chc-ink)}.chc-clock.is-active{border-color:var(--chc-brand);background:#f838001a;box-shadow:0 0 0 2px #f8380024}.chc-clock.is-local span{color:var(--chc-muted)}.chc-clock--me span{color:var(--chc-brand-dark)}.chc-warning{display:flex;flex-wrap:wrap;align-items:center;gap:.45rem;margin:0;padding:.45rem .65rem;font-size:clamp(.74rem,2.9vw,.84rem);font-weight:700;color:#9a2410;background:#f838001a;border:1px solid var(--chc-brand);border-radius:.45rem}.chc-claim{min-height:40px;margin:0 0 0 auto;padding:.3rem .7rem;font-size:.78rem;font-weight:800;color:#fff;background:var(--chc-brand);border:1px solid var(--chc-brand-dark);border-radius:.4rem}.chc-game-status{margin-top:0}.chc-board-shell{position:relative;width:100%;max-width:560px;margin-inline:auto}.chc-board-frame{display:flex;gap:.2rem;align-items:stretch;transform-origin:center center;will-change:transform}.chc-ranks{display:flex;flex:0 0 .95rem;flex-direction:column;justify-content:space-around;padding-block:2px;font-size:clamp(.5rem,2vw,.62rem);font-weight:700;line-height:1;color:var(--chc-muted);font-variant-numeric:tabular-nums}.chc-ranks span{display:flex;flex:1 1 0;align-items:center;justify-content:center}.chc-board-area{flex:1 1 auto;min-width:0}.chc-files{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));padding-top:.15rem;font-size:clamp(.5rem,2vw,.62rem);font-weight:700;line-height:1;color:var(--chc-muted);text-align:center}.chc-board{display:flex;flex-direction:column;width:100%;aspect-ratio:1 / 1;overflow:hidden;background:var(--chc-wood);border:2px solid var(--chc-wood-dark);border-radius:.35rem;box-shadow:0 6px 18px #3c261233;touch-action:manipulation}.chc-row{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));flex:1 1 0;min-height:0}.chc-cell{min-width:0;min-height:0}.chc-square{position:relative;display:block;width:100%;height:100%;min-width:0;min-height:0;margin:0;padding:0;overflow:hidden;border:0;border-radius:0;box-shadow:none;cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent}.chc-square.is-light{background:var(--chc-cream)}.chc-square.is-dark{background:var(--chc-wood)}.chc-square:focus-visible{outline:3px solid #1d6fd1;outline-offset:-3px;z-index:3}.chc-square:before{content:"";position:absolute;inset:0;z-index:1;pointer-events:none;background:#f8380000;transition:background .12s ease}.chc-square.is-last-from:before,.chc-square.is-last-to:before{background:#f8380038}.chc-square.is-selected:before{background:#f8380052}.chc-square:after{content:"";position:absolute;inset:2px;z-index:4;pointer-events:none;border:3px solid var(--chc-brand);border-radius:.2rem;opacity:0}.chc-square.is-check:after{animation:chc-check-pulse .6s ease-in-out 2}.chc-piece{--chc-piece-fill: #fffdf6;--chc-piece-stroke: #2b2118;--chc-piece-accent: #2b2118;position:absolute;top:7%;left:7%;z-index:3;width:86%;height:86%;pointer-events:none;filter:drop-shadow(0 1px 1px rgba(40,24,10,.28))}.chc-piece--w{--chc-piece-fill: #fffdf6;--chc-piece-stroke: #2b2118;--chc-piece-accent: #2b2118}.chc-piece--b{--chc-piece-fill: #2b2118;--chc-piece-stroke: #f8f0dd;--chc-piece-accent: #f8f0dd}.chc-piece.is-moved{will-change:transform,opacity;animation:chc-move .18s cubic-bezier(.2,.8,.2,1) both}.chc-piece.is-hidden{display:none}.chc-piece.is-capture{animation:chc-move .18s cubic-bezier(.2,.8,.2,1) both,chc-capture .15s ease-out both}.chc-legal-dot,.chc-legal-ring{position:absolute;z-index:2;pointer-events:none}.chc-legal-dot{top:50%;left:50%;width:22%;height:22%;background:#f838009e;border-radius:50%;transform:translate(-50%,-50%)}.chc-legal-ring{top:50%;left:50%;width:82%;height:82%;border:3px solid rgba(248,56,0,.66);border-radius:50%;transform:translate(-50%,-50%)}.chc-board-overlay{position:absolute;inset:0;z-index:10;display:flex;align-items:center;justify-content:center;padding:.75rem;background:#2b211894;border-radius:.35rem;backdrop-filter:blur(1.5px)}.chc-draw-banner{position:absolute;top:.4rem;right:.4rem;left:1.15rem;z-index:20;padding:.55rem .65rem;color:var(--chc-ink);background:#fffaf0f7;border:2px solid var(--chc-brand);border-radius:.5rem;box-shadow:0 6px 18px #3c26123d}.chc-draw-banner p{margin:0;font-size:clamp(.76rem,3vw,.86rem);font-weight:700;line-height:1.5}.chc-draw-banner-actions{display:flex;gap:.4rem;margin-top:.45rem}.chc-draw-banner-actions button{flex:1 1 0;min-height:42px;margin:0;padding-block:.3rem;font-size:.8rem}.chc-draw-banner--mine{border-color:var(--chc-line);background:#fffaf0f0}.chc-confetti{position:absolute;inset:0;z-index:1;overflow:hidden;pointer-events:none;border-radius:.35rem}.chc-confetti-piece{position:absolute;top:-20px;left:var(--x, 50%);display:block;border-radius:2px;opacity:0;animation:chc-confetti-fall var(--duration, 2.2s) linear var(--delay, 0s) forwards;will-change:transform,opacity}@keyframes chc-confetti-fall{0%{transform:translateZ(0) rotate(0);opacity:0}12%{opacity:1}85%{opacity:1}to{transform:translate3d(var(--drift, 0px),var(--fall, 600px),0) rotate(var(--spin, 360deg));opacity:0}}.chc-confetti-piece.is-static{top:45%;animation:chc-confetti-fade 1.4s ease forwards}@keyframes chc-confetti-fade{0%{opacity:0;transform:scale(.6)}25%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.9)}}.chc-countdown{flex-direction:column;gap:.2rem;color:#fff;text-align:center;background:#2b211873}.chc-countdown-number{font-size:clamp(3.4rem,18vw,5.2rem);font-weight:800;line-height:1;text-shadow:0 3px 0 rgba(0,0,0,.25)}.chc-countdown-label{font-size:.8rem;font-weight:700;letter-spacing:.08em}.chc-modal{width:100%;max-width:420px;max-height:100%;overflow-y:auto;padding:clamp(.95rem,4vw,1.35rem);color:var(--chc-ink);background:var(--chc-panel);border:1px solid var(--chc-line);border-radius:.7rem;box-shadow:0 12px 30px #1e120852}.chc-modal h2{margin:0 0 .35rem;font-size:clamp(1.2rem,5vw,1.5rem);line-height:1.3;color:var(--chc-ink)}.chc-modal p{margin:0 0 .6rem;font-size:clamp(.8rem,3.1vw,.9rem);line-height:1.65;color:var(--chc-muted)}.chc-result-overlay{position:fixed;inset:0;z-index:150;padding:1rem;border-radius:0}.chc-result-overlay .chc-confetti{border-radius:0}.chc-result{position:relative;z-index:2;max-height:calc(100dvh - 2rem);text-align:center}.chc-result h2{font-size:clamp(1.7rem,8vw,2.3rem);color:var(--chc-brand)}.chc-result-reason{font-weight:800;color:var(--chc-ink)!important}.chc-result-message{margin:0 0 .35rem!important;font-size:clamp(.9rem,3.6vw,1.05rem)!important;font-weight:800;color:var(--chc-ink)!important}.chc-result-detail{font-variant-numeric:tabular-nums}.chc-result-close{position:absolute;top:.35rem;right:.35rem;width:40px;height:40px;margin:0;padding:0;font-size:1.4rem;line-height:1;color:var(--chc-muted);background:transparent;border:0;box-shadow:none}.chc-result-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:.45rem;row-gap:.85rem;margin-top:.9rem}.chc-result-actions button{min-height:46px;margin:0}.chc-result-actions .chc-primary:first-child{grid-column:1 / -1}.chc-promotion-buttons{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.45rem;margin:.7rem 0}.chc-promotion-buttons button{display:flex;align-items:center;justify-content:center;gap:.35rem;min-height:56px;margin:0;padding:.3rem .5rem;font-size:.76rem;font-weight:700;color:var(--chc-ink);background:var(--chc-cream);border:1px solid var(--chc-line)}.chc-promotion-buttons .chc-piece{position:static;width:34px;height:34px;filter:none}.chc-modal-actions{display:grid;gap:.45rem;margin-top:.7rem}.chc-modal-actions button{min-height:46px;margin:0}.chc-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.45rem}.chc-actions button{width:100%;min-height:44px;margin:0;padding-block:.45rem;font-size:clamp(.76rem,3vw,.86rem);font-weight:700}.chc-actions button:disabled{opacity:.45;cursor:not-allowed}.chc-actions [data-testid=show-result]{grid-column:1 / -1}.chc-moves-wrap{padding:.55rem .7rem;background:#8a5a360f;border:1px solid var(--chc-line);border-radius:.45rem}.chc-moves-wrap summary{font-size:.8rem;font-weight:800;color:var(--chc-ink);cursor:pointer}.chc-moves-wrap summary span{margin-left:.3rem;font-size:.72rem;font-weight:600;color:var(--chc-muted)}.chc-moves{display:grid;gap:.1rem;max-height:170px;margin:.5rem 0 0;padding:0;overflow-y:auto;font-size:.8rem;font-variant-numeric:tabular-nums;list-style:none}.chc-moves li{display:grid;grid-template-columns:2.2rem minmax(0,1fr) minmax(0,1fr);gap:.3rem;padding:.1rem .25rem;border-radius:.2rem}.chc-moves li:nth-child(odd){background:#8a5a3612}.chc-move-no{color:var(--chc-muted)}.chc-move-san{font-weight:700;color:var(--chc-ink)}.chc-moves-empty{margin:.45rem 0 0;font-size:.76rem;color:var(--chc-muted)}.chc-instructions{margin-top:.25rem;padding:.75rem .85rem;background:#fffaf0c7;border:1px solid var(--chc-line);border-radius:.55rem}.chc-instructions h2{margin:0 0 .45rem;font-size:.95rem;color:var(--chc-ink)}.chc-instructions ul{margin:0;padding:0;font-size:clamp(.72rem,2.8vw,.82rem);line-height:1.7;color:var(--chc-muted);list-style:none}.chc-instructions li{position:relative;margin:0;padding:0 0 0 1.1em}.chc-instructions li:before{content:"\30fb";position:absolute;left:0}.chc-instructions a{color:var(--chc-brand-dark);text-decoration:underline}.chc-note{margin:.55rem 0 0;font-size:.92em;line-height:1.65;color:var(--chc-muted)}.chc-notice-overlay{position:fixed;inset:0;z-index:200;display:flex;align-items:center;justify-content:center;padding:1rem;background:#1e140a8c}.chc-reconnect{position:fixed;bottom:1rem;left:50%;z-index:210;display:flex;align-items:center;gap:.45rem;padding:.55rem .9rem;font-size:.8rem;font-weight:800;color:#fff;background:var(--chc-ink);border-radius:999px;box-shadow:0 6px 18px #00000040;transform:translate(-50%)}.chc-reconnect-dot{width:9px;height:9px;background:var(--chc-brand);border-radius:50%;animation:chc-blink .9s ease-in-out infinite}.chc-toast{position:fixed;bottom:3.8rem;left:50%;z-index:220;width:min(92vw,420px);padding:.6rem .8rem;font-size:.8rem;font-weight:700;color:#fff;text-align:center;background:var(--chc-ink);border-radius:.5rem;box-shadow:0 6px 18px #0000003d;transform:translate(-50%)}.chc-toast.is-error{background:var(--chc-brand-dark)}.chc-visually-hidden{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}.chc-sprite{position:absolute;width:0;height:0;overflow:hidden}@keyframes chc-move{0%{transform:translate(var(--chc-dx, 0),var(--chc-dy, 0))}to{transform:translate(0)}}@keyframes chc-capture{0%{opacity:.35}to{opacity:1}}@keyframes chc-check-pulse{0%,to{opacity:0}45%{opacity:1}}@keyframes chc-blink{0%,to{opacity:.35}50%{opacity:1}}@media(prefers-reduced-motion:reduce){.chc-piece,.chc-square:after,.chc-reconnect-dot{animation:none!important}.chc-square:before{transition:none}.chc-board-frame{transition:none!important}}@media(min-width:900px){.chc-page{grid-template-columns:minmax(0,1.05fr) minmax(300px,.95fr);gap:1.5rem 2rem;margin-top:1.5rem;align-items:start}.chc-lobby,.chc-waiting{margin-top:0}.chc-clock span{font-size:2.2rem}.chc-actions{grid-template-columns:repeat(2,minmax(0,1fr))}.chc-actions [data-testid=show-result]{grid-column:1 / -1}.chc-result-actions{grid-template-columns:repeat(2,minmax(0,1fr))}.chc-result-actions .chc-primary:first-child{grid-column:1 / -1}}
