*{box-sizing:border-box}body{margin:0;background:radial-gradient(circle at 50% 0%,rgba(31,106,91,.16),transparent 34%),#111816;color:#dfe8e4;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif}#root{min-height:100dvh}button{font:inherit}.visually-hidden{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}.loading{display:grid;min-height:100vh;place-items:center}.lobby-shell{display:grid;min-height:100vh;place-items:center;padding:24px}.lobby-panel{display:grid;gap:18px;width:min(100%,420px);border:1px solid #2b3c36;border-radius:10px;background:#161f1cf5;padding:22px;box-shadow:0 24px 60px #0000004d}.lobby-error{border:1px solid #87433d;border-radius:6px;background:#3a1f1c;color:#ffd8d2;padding:10px}.primary-action,.join-form button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:42px;border:1px solid #44b89e;border-radius:7px;background:#163f36;color:#f4fbf7;cursor:pointer}.join-form{display:grid;gap:12px}.join-form h2{margin:0;font-size:15px}.join-form label{display:grid;gap:6px;color:#c3d1ca;font-size:12px}.join-form input,.join-form select{min-height:36px;border:1px solid #31443d;border-radius:6px;background:#0f1714;color:#dfe8e4;font:inherit;padding:0 10px}.join-form button:disabled{cursor:not-allowed;opacity:.5}.app-shell{display:grid;height:100dvh;min-height:0;padding:10px;overflow:hidden}.sidebar{display:flex;flex-direction:column;gap:14px}.title-block h1{margin:0;color:#f4fbf7;font-size:28px;letter-spacing:0}.title-block p,.panel p,.resolution-card p{margin:6px 0 0;color:#8fa29a}.toolbar,.action-list{display:flex;flex-wrap:wrap;gap:8px}.toolbar button,.action-list button{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:36px;border:1px solid #31443d;border-radius:6px;background:#18231f;color:#dfe8e4;cursor:pointer}.toolbar button{padding:0 10px}.toolbar button.active{border-color:#44b89e;background:#163f36}.action-list button,.activation-group{width:100%}.activation-group{display:grid;gap:8px}.action-list button{padding:0 10px}.action-list button:disabled{cursor:not-allowed;opacity:.5}.panel,.room-drawer,.log-drawer{border:1px solid #ccd2cb;border-color:#2b3c36;border-radius:8px;background:#161f1cf0;padding:14px;box-shadow:0 14px 30px #0000002e}.panel h2,.resolution-card h2{margin:0 0 10px;color:#f4fbf7;font-size:15px}.panel-heading-icon{display:inline-flex;align-items:center;gap:6px}.resolution-header{display:flex;align-items:center;justify-content:space-between;gap:10px}.resolution-header h2{margin:0}.resolution-header button{min-height:30px;border:1px solid #bd852f;border-radius:6px;background:#191a17;color:#f2d9a7;cursor:pointer;padding:0 10px}.resolution-header button.active{background:#583d16}.room-meta{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:8px}.room-meta span{border:1px solid #31443d;border-radius:999px;background:#101715;color:#c3d1ca;font-size:12px;padding:4px 8px}.room-meta span.danger{border-color:#87433d;background:#3a1f1c;color:#ffd8d2}.waiting-panel{gap:18px}.waiting-meta{justify-content:center}.waiting-invite{display:grid;gap:8px;color:#aebdb6;font-size:13px;font-weight:700}.join-url{width:100%;min-height:34px;border:1px solid #31443d;border-radius:6px;background:#0f1714;color:#dfe8e4;font:inherit;font-size:12px;padding:0 8px}.cell-detail{display:grid;gap:12px}.cell-detail-header,.tile-info-title{display:flex;align-items:center;justify-content:space-between;gap:10px}.cell-detail-header span,.tile-info-title span{color:#5d6662;color:#8fa29a;font-size:12px}.tile-info{display:grid;gap:8px}.info-label{color:#8fa29a;font-size:11px;font-weight:700}.tile-info.compact{border-top:1px solid #2f3f39;margin-top:4px;padding-top:8px}.tile-info ul,.effects-block ul{display:grid;gap:6px;margin:0;padding-left:18px}.tile-info li,.tile-info p,.effects-block li,.effects-block p{color:#3e4844;color:#c3d1ca;font-size:12px;line-height:1.45}.piece-inspection,.effects-block{display:grid;gap:8px}.board-area{--side-rail-width: 42px;--board-max-size: min(100%, 660px, calc(100dvh - 96px) , calc(100dvw - (var(--side-rail-width) * 2) - 34px));position:relative;display:grid;grid-template-areas:"header header header" "opponent board own" ". drawer .";grid-template-columns:var(--side-rail-width) var(--board-max-size) var(--side-rail-width);grid-template-rows:auto minmax(0,1fr) auto;justify-items:center;align-items:center;justify-content:center;align-content:stretch;gap:4px;min-width:0;min-height:0;height:100%;border:1px solid #24342f;border-radius:10px;background:linear-gradient(180deg,#ffffff0a,#fff0),#101715;padding:10px;box-shadow:inset 0 0 0 1px #ffffff08,0 24px 60px #0000004d;overflow:hidden}.game-header{grid-area:header;display:flex;align-items:center;justify-content:center;gap:12px;width:min(100%,760px)}.game-header p{margin:0;color:#c3d1ca;font-size:12px;font-weight:700}.game-header button{display:inline-flex;align-items:center;justify-content:center;width:38px;height:38px;border:1px solid #31443d;border-radius:6px;background:#18231f;color:#dfe8e4;cursor:pointer}.board-stage{grid-area:board;position:relative;display:grid;grid-template-rows:auto minmax(0,1fr);justify-items:center;align-items:center;gap:6px;width:var(--board-max-size);min-height:0}.end-turn-button{position:static;z-index:6;display:inline-flex;align-items:center;justify-content:center;gap:6px;width:auto;min-height:30px;border:1px solid #44b89e;border-radius:7px;background:#163f36;color:#f4fbf7;cursor:pointer;padding:0 10px;font-size:12px}.end-turn-button:disabled{cursor:not-allowed;opacity:.45}.end-turn-button.attention{border-color:#f0c85a;background:#4a3710;box-shadow:0 0 0 3px #f0c85a33,0 0 24px #f0c85a3d}.turn-waiting-badge{position:static;z-index:6;display:inline-flex;align-items:center;justify-content:center;width:auto;min-height:30px;border:1px solid #31443d;border-radius:7px;background:#18231f;color:#aebdb6;padding:0 10px;font-size:12px;text-align:center}.board-hint{position:absolute;left:8px;bottom:8px;z-index:6;max-width:min(320px,calc(100% - 16px));margin:0}.board{display:grid;width:var(--board-max-size);max-width:100%;max-height:100%;aspect-ratio:1;border:2px solid #3a5149;border-radius:8px;background:#31443d;gap:3px;padding:3px;overflow:visible}.cell{position:relative;display:grid;grid-template-rows:auto 1fr auto;min-width:0;min-height:0;border:0;border:1px solid rgba(255,255,255,.04);border-radius:5px;background:#27332f;color:#dfe8e4;cursor:pointer;padding:clamp(3px,.7dvh,6px);text-align:left;overflow:visible}.cell.inspected{z-index:30}.cell:nth-child(2n){background:#22302c}.cell.move-target{box-shadow:inset 0 0 0 4px #3d8fe8,0 0 22px #3d8fe847}.cell.swap-target{box-shadow:inset 0 0 0 4px #c9872f,0 0 22px #c9872f42}.cell.attack-target{box-shadow:inset 0 0 0 4px #db5148,0 0 22px #db51484d}.cell.repair-target{box-shadow:inset 0 0 0 4px #49b982,0 0 22px #49b9824d}.cell.tile-confidential{background:#283b49}.cell.tile-confidential.confidential-own{background:#1f4b42}.cell.tile-confidential.confidential-opponent{background:#51312e}.cell.tile-teleporter{background:#243e3d}.cell.tile-attackTerminal{background:#3a3025}.cell.tile-barrier{background:#243c34}.cell.tile-collapseFloor{background:#3b2b2b}.cell.tile-blastDevice{background:#432b23}.cell.ally .piece{background:#174f43}.cell.enemy .piece{background:#7f2d2d}.coord{font-size:clamp(8px,1.35dvh,11px);color:#91a49b}.tile{align-self:center;justify-self:center;display:grid;justify-items:center;gap:5px;color:#f3f8f5;font-size:clamp(9px,min(1.25vw,1.6dvh),15px);font-weight:700;text-align:center}.confidential-badge{border-radius:999px;background:#0a0e0db8;color:#f9f3e7;font-size:10px;padding:2px 6px}.avatar{align-self:end;justify-self:stretch;display:flex;align-items:flex-end;justify-content:space-between;gap:4px;min-width:0;border:1px solid transparent;border-radius:8px;cursor:pointer;padding:2px}.avatar.compact{flex:0 0 auto;align-self:center;justify-self:auto;cursor:inherit;padding:0}.avatar.selected{border-color:#44b89e;background:#44b89e1f}.avatar.attention{border-color:#f0c85a;background:#f0c85a24;box-shadow:0 0 0 2px #f0c85a2e,0 0 18px #f0c85a2e}.avatar.attack-target{border-color:#db5148;background:#db514824}.avatar-portrait{display:inline-flex;align-items:center;min-width:0}.piece{border:1px solid rgba(255,255,255,.22);border-radius:999px;color:#fff;padding:4px 7px;font-size:12px}.held-chip{overflow:hidden;max-width:72px;border:1px solid #786b58;border-radius:5px;background:#0b100ec2;color:#e9f0ed;font-size:10px;padding:3px 5px;text-overflow:ellipsis;white-space:nowrap}.piece-actions{position:absolute;z-index:8;right:5px;bottom:32px;display:grid;gap:5px;width:min(92px,calc(100% - 10px))}.cell-popover{position:absolute;left:calc(100% - 8px);top:8px;z-index:20;display:grid;gap:10px;width:min(260px,62vw);max-height:min(320px,66dvh);overflow:auto;border:1px solid #44b89e;border-radius:8px;background:#111816fa;color:#dfe8e4;padding:10px;box-shadow:0 18px 50px #0000006b}.cell:nth-child(5n) .cell-popover,.cell:nth-child(5n-1) .cell-popover{right:calc(100% - 8px);left:auto}.cell:nth-child(n+21) .cell-popover,.cell:nth-child(n+16):nth-child(-n+20) .cell-popover{top:auto;bottom:8px}.piece-actions button{display:inline-flex;align-items:center;justify-content:center;gap:5px;min-height:32px;border:1px solid #aeb8b2;border-radius:5px;background:#0e1412f5;color:#dfe8e4;cursor:pointer;font-size:12px;font-weight:700;padding:0 6px}.piece-actions button.active{border-color:#44b89e;background:#143d34}.piece-actions button:disabled{cursor:not-allowed;opacity:.45}.action-hint{border:1px solid #2f6d55;border-radius:6px;background:#142d25;padding:8px}.yard-panel{display:grid;gap:6px}.yard-row{display:grid;grid-template-columns:1fr;grid-template-rows:minmax(112px,auto) minmax(72px,auto);gap:6px;width:100%;height:var(--board-max-size);max-height:min(100%,var(--board-max-size));min-height:0;overflow:visible}.opponent-yards{grid-area:opponent;align-self:start;justify-self:end}.own-yards{grid-area:own;align-self:end;justify-self:start}.yard-row .yard-panel{grid-template-rows:auto minmax(0,1fr);min-width:0;min-height:0;border-color:#2b3c36;border-radius:999px;background:#101715db;box-shadow:inset 0 0 0 1px #ffffff08;padding:7px 4px;overflow:hidden}.yard-row .yard-panel h2{display:flex;justify-content:center;margin:0;font-size:0;line-height:1}.yard-row .yard-panel h2 svg{width:16px;height:16px;color:#aebdb6}.yard-row .yard-panel>p{display:none}.yard-list{display:grid;grid-template-columns:1fr;justify-items:center;align-content:start;gap:5px;min-height:0;overflow:visible}.yard-piece{display:inline-grid;place-items:center;min-width:0;width:34px;height:34px;border:1px solid #2f3f39;border-radius:999px;background:#17211eeb;color:#dfe8e4;padding:2px;text-align:center}.yard-piece:not(:disabled){cursor:pointer}.yard-piece:disabled{cursor:default;opacity:.78}.yard-piece.selected{border-color:#49b982;background:#143327}.yard-piece.attention{border-color:#f0c85a;background:#2b2719;box-shadow:0 0 0 2px #f0c85a29,0 0 18px #f0c85a29}.yard-piece-main{display:flex;align-items:center;justify-content:center;gap:0;min-width:0}.yard-piece-main strong,.yard-piece-main>span:last-child,.yard-piece-sub{display:none}.yard-piece-main strong,.yard-piece-main span,.yard-piece-sub{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.yard-piece-main strong{color:#f4fbf7}.yard-piece-main>span:last-child,.yard-piece-sub{color:#8fa29a;font-size:11px}.yard-piece.ally .piece{background:#174f43}.yard-piece.enemy .piece{background:#7f2d2d}.log-list{display:grid;gap:6px;max-height:min(180px,34dvh);overflow:auto}.log-item{border-bottom:1px solid #2f3f39;padding:5px 0;color:#9bada5;font-size:12px}.room-drawer,.log-drawer{padding:0}.drawer-row{grid-area:drawer;display:grid;grid-template-columns:40px 40px minmax(96px,1fr);gap:7px;width:min(100%,760px);min-height:0}.room-drawer summary,.log-drawer summary{display:flex;align-items:center;justify-content:center;width:38px;min-height:34px;border-radius:7px;color:#dfe8e4;cursor:pointer;font-size:13px;font-weight:700;list-style:none}.room-drawer summary::-webkit-details-marker,.log-drawer summary::-webkit-details-marker{display:none}.room-drawer[open],.log-drawer[open]{grid-column:1 / -1;max-height:min(190px,36dvh);overflow:auto;padding:9px}.room-drawer[open] summary,.log-drawer[open] summary{min-height:30px;margin-bottom:7px}.resign-button{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:34px;border:1px solid #5a2c2c;border-radius:7px;background:#281918;color:#f0d8d6;cursor:pointer;font-weight:700}.resign-button:disabled{cursor:not-allowed;opacity:.45}.resolution-overlay{position:absolute;top:0;right:0;bottom:0;left:0;z-index:10;display:grid;place-items:center;background:#090d0c61;padding:20px;pointer-events:none}.resolution-card{display:grid;gap:12px;width:min(100%,360px);border:1px solid #bd852f;border-radius:8px;background:#2b2417f0;padding:14px;box-shadow:0 24px 80px #0000006b;pointer-events:auto}.result-overlay{position:absolute;top:0;right:0;bottom:0;left:0;z-index:40;display:grid;place-items:center;background:#090d0c9e;padding:20px}.result-dialog{display:grid;gap:12px;width:min(100%,360px);border:1px solid #3a5149;border-radius:8px;background:#111816fa;padding:18px;text-align:center;box-shadow:0 28px 90px #0000007a}.result-dialog.win{border-color:#44b89e}.result-dialog.lose{border-color:#db5148}.result-dialog.draw{border-color:#bd852f}.result-eyebrow{color:#8fa29a;font-size:12px;font-weight:700}.result-dialog h2{margin:0;color:#f4fbf7;font-size:28px;letter-spacing:0}.result-dialog p{margin:0;color:#c3d1ca}.result-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.result-actions button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:40px;border:1px solid #31443d;border-radius:7px;background:#18231f;color:#dfe8e4;cursor:pointer}.result-actions .primary-action{border-color:#44b89e;background:#163f36}@media(max-width:960px){.app-shell{padding:7px}.board-area{--side-rail-width: 40px;--board-max-size: min(100%, calc(100dvh - 88px) , calc(100dvw - (var(--side-rail-width) * 2) - 30px));gap:4px;padding:8px}.end-turn-button,.turn-waiting-badge{min-height:28px}}@media(max-width:640px){.title-block h1{font-size:22px}.title-block p{font-size:12px}.board-area{--side-rail-width: 34px;--board-max-size: min(100%, calc(100dvh - 74px) , calc(100dvw - (var(--side-rail-width) * 2) - 24px));gap:3px;padding:6px}.game-header p{font-size:11px}.board-stage{gap:4px}.end-turn-button,.turn-waiting-badge{min-height:24px;padding:0 8px;font-size:11px}.yard-row{grid-template-columns:1fr;grid-template-rows:minmax(86px,auto) minmax(54px,auto);gap:5px;width:100%}.drawer-row{grid-template-columns:32px 32px minmax(76px,1fr);gap:4px;width:100%}.panel h2,.resolution-card h2{font-size:11px}.yard-row .yard-panel{gap:0;padding:5px 3px}.yard-row .yard-panel h2{justify-content:center;margin:0;font-size:0;line-height:1.1;text-align:center}.yard-row .yard-panel h2 svg{width:13px;height:13px}.yard-list{grid-template-columns:1fr;gap:3px}.yard-piece{width:28px;height:28px;gap:0;min-width:0;padding:1px}.yard-piece-main{justify-content:center;gap:0}.yard-piece-main strong,.yard-piece-sub{font-size:9px}.yard-piece-main strong,.yard-piece-main>span:last-child,.yard-piece-sub{display:none}.cell{padding:3px}.coord{font-size:8px}.tile{gap:2px;font-size:9px}.tile svg{width:14px;height:14px}.held-chip,.confidential-badge{display:none}.piece{padding:2px 4px;font-size:9px}.piece-actions{right:3px;bottom:24px;width:min(74px,calc(100% - 6px))}.piece-actions button{min-height:26px;font-size:10px;padding:0 4px}.room-drawer summary,.log-drawer summary{width:32px;min-height:30px}.resign-button{min-height:30px;font-size:11px}.cell-popover{left:50%;right:auto;top:calc(100% - 4px);bottom:auto;width:min(220px,86vw);max-height:min(220px,48dvh);transform:translate(-50%)}.cell:nth-child(5n) .cell-popover,.cell:nth-child(5n-1) .cell-popover{right:auto;left:50%}.cell:nth-child(n+21) .cell-popover,.cell:nth-child(n+16):nth-child(-n+20) .cell-popover{top:auto;bottom:calc(100% - 4px)}}@media(max-height:700px){.board-area{--board-max-size: min(100%, calc(100dvh - 70px) , calc(100dvw - (var(--side-rail-width) * 2) - 24px));gap:3px;padding:6px}.yard-row .yard-panel{padding:5px 3px}.yard-row .yard-panel h2{margin-bottom:2px;font-size:10px}.yard-list{gap:3px}.yard-piece{gap:0;padding:1px}.yard-piece-sub{display:none}.room-drawer summary,.log-drawer summary,.resign-button{min-height:30px}.cell-popover{max-height:min(220px,48dvh)}}@media(max-height:560px){.board-area{--board-max-size: min(100%, calc(100dvh - 62px) , calc(100dvw - (var(--side-rail-width) * 2) - 24px))}.game-header p,.end-turn-button,.turn-waiting-badge,.resign-button{font-size:10px}.tile{font-size:8px}.coord{font-size:7px}}
