:root{color:#1f2937;font-synthesis:none;text-rendering:optimizelegibility;background:#f3efe5;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif}*{box-sizing:border-box}body{min-width:320px;min-height:100vh;margin:0}button,input{font:inherit}main{background:radial-gradient(circle at 0 0,#f6ad5547,#0000 35%),radial-gradient(circle at 100% 100%,#48bb7838,#0000 35%);place-items:center;min-height:100vh;padding:24px;display:grid}.card{-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);background:#ffffffd1;border:1px solid #1f29371a;border-radius:28px;width:min(680px,100%);padding:clamp(32px,8vw,72px);box-shadow:0 24px 70px #4f432d24}.eyebrow{color:#b45309;letter-spacing:.14em;text-transform:uppercase;margin:0 0 14px;font-size:.78rem;font-weight:800}h1{color:#19231d;margin:0;font-family:Georgia,Times New Roman,serif;font-size:clamp(2.3rem,7vw,4.4rem);font-weight:500;line-height:.98}.description{color:#5d655f;margin:28px 0;font-size:1.05rem;line-height:1.65}.status{color:#566058;background:#eef0ec;border-radius:999px;align-items:center;gap:10px;margin-bottom:22px;padding:10px 14px;font-size:.92rem;font-weight:700;display:inline-flex}.status span{background:currentColor;border-radius:50%;width:9px;height:9px}.status.ready{color:#166534;background:#dcfce7}.status.error{color:#991b1b;background:#fee2e2}.login-form{gap:18px;display:grid}.login-form label{color:#39423c;gap:8px;font-size:.9rem;font-weight:750;display:grid}.login-form input{color:#19231d;background:#fff;border:1px solid #c9cec8;border-radius:12px;outline:none;width:100%;min-height:50px;padding:12px 14px;transition:border-color .12s,box-shadow .12s}.login-form input:focus{border-color:#b45309;box-shadow:0 0 0 3px #b4530921}button{color:#fff;cursor:pointer;background:#1f6b43;border:0;border-radius:12px;min-height:50px;padding:12px 18px;font-weight:800;transition:background .12s,transform .12s}button:hover:not(:disabled){background:#185535;transform:translateY(-1px)}button:disabled{cursor:wait;opacity:.65}.form-error{color:#991b1b;margin:-4px 0 0;font-size:.9rem;font-weight:650}.account-row{color:#5d655f;border-top:1px solid #e4e6e2;justify-content:space-between;align-items:center;gap:18px;padding-top:22px;font-weight:700;display:flex}.secondary-button{color:#28322b;background:#ecefe9;min-height:42px}.secondary-button:hover:not(:disabled){background:#dde2da}.centered-state{color:#5d655f;text-align:center;justify-items:center;gap:16px;padding:48px 0 24px;display:grid}.centered-state h1{font-size:clamp(2rem,6vw,3.5rem)}.centered-state p{margin:0}.spinner{border:3px solid #d8ddd6;border-top-color:#1f6b43;border-radius:50%;width:30px;height:30px;animation:.8s linear infinite spin}.lobby-header{justify-content:space-between;align-items:flex-start;gap:24px;display:flex}.lobby-header .status{margin-bottom:14px}.lobby-header .secondary-button{flex:none}.create-game-button{width:100%}.create-game-actions{grid-template-columns:1fr 1fr;gap:10px;display:grid}.lobby-error{margin-top:16px}.opponent-presence{color:#68716a;background:#f4f5f2;border:1px solid #dfe3dd;border-radius:12px;align-items:center;gap:10px;margin:-8px 0 22px;padding:12px 14px;font-size:.9rem;font-weight:700;display:flex}.presence-indicator{background:#9ca3af;border-radius:50%;flex:none;width:9px;height:9px}.opponent-presence.online{color:#23633a;background:#effaf2;border-color:#bbd9c3}.opponent-presence.online .presence-indicator{background:#16a34a;box-shadow:0 0 0 4px #16a34a1f}.presence-copy{flex:auto}.presence-actions{flex-wrap:wrap;flex:none;justify-content:flex-end;gap:4px;display:inline-flex}.presence-link{color:#166534;text-underline-offset:3px;background:0 0;min-height:auto;padding:4px 6px;font-size:.8rem;text-decoration:underline}.presence-link:hover:not(:disabled){background:#16653414;transform:none}.games-section{border-top:1px solid #e4e6e2;margin-top:36px;padding-top:28px}.section-heading-row{justify-content:space-between;align-items:center;gap:16px;margin-bottom:16px;display:flex}.section-heading-row h2{color:#253028;margin:0;font-family:Georgia,Times New Roman,serif;font-size:1.7rem;font-weight:500}.text-button{color:#556159;background:0 0;min-height:auto;padding:6px;font-size:.85rem}.text-button:hover:not(:disabled){color:#1f6b43;background:0 0;transform:none}.games-list{gap:14px;display:grid}.game-card{background:#f8f9f6cc;border:1px solid #dfe3dd;border-radius:16px;gap:16px;padding:20px;display:grid}.game-card h3{color:#253028;margin:2px 0 8px;font-size:1.15rem}.game-meta-row{justify-content:space-between;align-items:center;gap:12px;display:flex}.rematch-badge{color:#92400e;letter-spacing:.04em;text-transform:uppercase;background:#fef3c7;border-radius:999px;padding:5px 8px;font-size:.7rem;font-weight:850}.game-number{color:#8a918b;letter-spacing:.08em;text-transform:uppercase;margin:0;font-size:.75rem;font-weight:800}.game-status{color:#8a5a14;margin:0;font-size:.9rem;font-weight:700}.game-status.active{color:#166534}.game-status.finished{color:#6b7280}.game-card.finished{background:#f4f4f1b8}.players-list{flex-wrap:wrap;gap:8px;display:flex}.player{color:#8a918b;border:1px dashed #c6cbc5;border-radius:999px;flex-wrap:wrap;align-items:center;gap:6px;padding:7px 10px;font-size:.82rem;display:inline-flex}.player.connected{color:#166534;background:#dcfce7;border-color:#22c55e}.presence-dot{background:#16a34a;border-radius:50%;width:8px;height:8px}.player small{color:#3d7c50;width:100%;font-size:.68rem;font-weight:750}.series-score{color:#59625b;background:#eef0ec;border-radius:12px;gap:4px;padding:12px 14px;display:grid}.series-score>span{letter-spacing:.08em;text-transform:uppercase;font-size:.68rem;font-weight:850}.series-score strong{color:#28322b;font-size:.9rem}.series-score small{font-size:.75rem}.player.filled{color:#285b38;background:#eef8f0;border-style:solid;border-color:#c8ddce;font-weight:700}.coming-soon{color:#69716b;font-size:.84rem;font-style:italic}.board-screen{justify-items:center;display:grid}.board-game-meta{width:100%;margin-bottom:10px}.board-series-context{gap:10px;width:min(460px,100%);margin-top:22px;display:grid}.board-series-context .series-score{text-align:center}.board-players{justify-content:center}.game-toolbar{justify-content:space-between;align-items:center;gap:16px;width:100%;margin-bottom:34px;display:flex}.connection-status{color:#5d655f;font-size:.85rem;font-weight:700}.turn-status{color:#1f6b43;margin:22px 0 12px;font-size:1.15rem;font-weight:850}.symbol-hint{color:#69716b;margin-bottom:24px;font-size:.9rem}.tic-tac-toe-board{grid-template-columns:repeat(3,1fr);gap:8px;width:min(390px,100%);display:grid}.board-cell{aspect-ratio:1;color:#1f6b43;background:#f7faf7;border:2px solid #d6ddd5;border-radius:14px;min-height:0;padding:0;font-family:ui-rounded,Arial Rounded MT Bold,sans-serif;font-size:clamp(2.4rem,12vw,4.5rem)}.board-cell:hover:not(:disabled){background:#eaf5ed}.board-cell:disabled{cursor:default;opacity:1}.board-cell.cell-o{color:#b45309}.board-cell.winning-cell{background:#dcfce7;border-color:#22c55e;box-shadow:0 0 0 3px #22c55e2e}.result-panel{text-align:center;background:#effaf2;border:1px solid #bbd9c3;border-radius:18px;width:min(460px,100%);margin-top:30px;padding:24px}.result-panel.draw{background:#fff8e9;border-color:#ead3ac}.result-kicker{color:#617066;letter-spacing:.1em;text-transform:uppercase;margin:0 0 6px;font-size:.75rem;font-weight:850}.result-panel h2{color:#1e3828;margin:0;font-family:Georgia,Times New Roman,serif;font-size:2rem;font-weight:500}.result-panel p:not(.result-kicker){color:#5d655f;margin:10px 0 20px;line-height:1.5}.result-actions{grid-template-columns:1fr 1fr;gap:10px;display:grid}.game-result-backdrop{z-index:100;-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px);background:#121f1794;place-items:center;padding:20px;display:grid;position:fixed;inset:0}.game-result-modal{width:min(500px,100%);margin:0;padding:34px 28px 28px;animation:.18s ease-out result-modal-in;position:relative;box-shadow:0 24px 70px #121f1752}.modal-close{color:#34443a;background:#dfe7e1;border-radius:50%;width:38px;min-height:38px;padding:0;font-size:1.5rem;line-height:1;position:absolute;top:12px;right:12px}.modal-result-actions .view-board-button{grid-column:1/-1}.game-error{margin-top:20px}.battleship-layout{gap:24px;width:100%;margin-top:8px;display:grid}.battle-layout{gap:22px;width:100%;margin-top:8px;display:grid}.battle-status{color:#536058;text-align:center;background:#eef1ee;border-radius:14px;margin:0;padding:14px 18px;font-weight:800}.battle-status.my-turn{color:#166534;background:#dcfce7;box-shadow:inset 0 0 0 1px #bbdfc5}.battle-boards{gap:28px;display:grid}.battleship-board-wrap{background:#f7f9f7;border:1px solid #d4ddd6;border-radius:18px;gap:14px;padding:18px;display:grid}.battleship-board-wrap.target-board{background:#f5fbfd;border-color:#bed7df}.battleship-board-wrap.target-board.my-turn{background:#f0fcf4;border-color:#22a05a;box-shadow:0 0 0 5px #22a05a24,0 18px 40px #1f6c4321}.target-board.my-turn .battle-board-heading small{color:#17713f;font-weight:800}.battle-board-heading{text-align:center}.battle-board-heading h2{color:#24372a;margin:0 0 4px;font-family:Georgia,Times New Roman,serif;font-size:1.7rem;font-weight:500}.battle-board-heading small{color:#66716a}.fleet-panel{background:#f4f8f5;border:1px solid #d4ddd6;border-radius:18px;gap:14px;padding:18px;display:grid}.fleet-panel h2{color:#24372a;margin:0;font-family:Georgia,Times New Roman,serif;font-size:1.7rem;font-weight:500}.fleet-panel p:not(.result-kicker,.opponent-ready){color:#66716a;margin:8px 0 0;line-height:1.45}.fleet-list{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;display:grid}.fleet-ship{color:#34443a;text-align:left;background:#e7ece8;border:2px solid #0000;grid-template-columns:auto 1fr;align-items:center;gap:2px 10px;min-height:62px;padding:9px 10px;display:grid}.fleet-ship:hover:not(:disabled){background:#dbe6de}.fleet-ship.selected{background:#fff7e8;border-color:#b45309}.fleet-ship.placed{color:#166534;background:#dcfce7}.fleet-ship small{grid-column:2;font-size:.7rem}.ship-preview{grid-row:1/3;display:flex}.ship-preview i{background:#9aa8a0;border:1px solid #718078;width:10px;height:18px}.orientation-button{width:100%}.fleet-ready-status{color:#8a5a14;text-align:center;background:#fff6df;border-radius:12px;padding:12px 14px;font-weight:750}.fleet-ready-status.both-ready{color:#166534;background:#dcfce7}.opponent-ready{color:#526059;text-align:center;margin:0;font-size:.86rem}.placement-layout{gap:22px}.shipyard-panel{background:linear-gradient(145deg,#f7faf7,#eef4ef)}.shipyard{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;display:grid}.ship-type-row{grid-template-columns:minmax(0,1fr) 44px;gap:6px;transition:opacity .18s,filter .18s;display:grid}.ship-type-row.depleted{opacity:.34;filter:grayscale(.85)}.ship-dock-item{color:#34443a;text-align:left;touch-action:none;cursor:grab;background:#e7ece8;border:2px solid #0000;border-radius:15px;grid-template-columns:minmax(0,1fr) auto;place-items:center;gap:8px;min-width:0;min-height:76px;padding:9px 12px;display:grid}.ship-dock-item:hover:not(:disabled){background:#dce7df;transform:translateY(-1px)}.ship-dock-item:active:not(:disabled){cursor:grabbing}.ship-dock-item.selected{background:#fff7e8;border-color:#b45309;box-shadow:0 6px 18px #b453091f}.ship-count{color:#425047;white-space:nowrap;min-width:32px;font-size:1rem;font-weight:900}.ship-type-rotate{color:#46564c;background:#f8faf8;border:1px solid #cbd4ce;border-radius:50%;align-self:center;place-items:center;min-width:44px;min-height:44px;padding:0;font-size:1.35rem;line-height:1;display:grid;box-shadow:0 3px 9px #2a3a3014}.ship-type-rotate:hover:not(:disabled){color:#9a4d08;background:#fff7e8;border-color:#b45309;transform:rotate(18deg)}.ship-model{isolation:isolate;filter:drop-shadow(0 4px 4px #2334293d);transition:transform .18s,filter .18s;display:flex;position:relative}.ship-model.vertical{flex-direction:column}.ship-model i{background:radial-gradient(circle at 50% 42%,#c9d5ce 0 2px,#3f5548 2.5px 4px,#0000 4.5px),linear-gradient(90deg,#7f9286,#52665a 70%);border:1px solid #33483d;width:20px;height:24px;margin-left:-1px;display:block;position:relative;box-shadow:inset 0 2px 1px #ffffff38}.ship-model.vertical i{background:radial-gradient(circle at 46%,#c9d5ce 0 2px,#3f5548 2.5px 4px,#0000 4.5px),linear-gradient(#7f9286,#52665a 70%);width:24px;height:20px;margin-top:-1px;margin-left:0}.ship-model.horizontal i:first-child{border-radius:70% 3px 3px 70%}.ship-model.horizontal i:last-child{border-radius:3px 45% 45% 3px}.ship-model.vertical i:first-child{border-radius:70% 70% 3px 3px}.ship-model.vertical i:last-child{border-radius:3px 3px 45% 45%}.ship-model.horizontal i:only-child,.ship-model.vertical i:only-child{border-radius:50%;width:26px;height:26px}.placed-ship-toolbar{background:#fff8eb;border:1px solid #d9c29c;border-radius:999px;justify-self:center;align-items:center;gap:10px;min-height:52px;padding:6px 8px 6px 14px;animation:.16s ease-out ship-toolbar-in;display:flex;box-shadow:0 6px 18px #4c371614}.placed-ship-toolbar button{color:#754315;background:#f0e5d2;border-radius:50%;place-items:center;min-width:40px;min-height:40px;padding:0;font-size:1.25rem;display:grid}@keyframes ship-toolbar-in{0%{opacity:0;transform:translateY(-4px)scale(.97)}to{opacity:1;transform:translateY(0)scale(1)}}.selected-ship-controls{background:#fff8eb;border:1px solid #e7c998;border-radius:14px;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:8px;padding:12px;display:grid}.selected-ship-controls>div{gap:2px;min-width:0;display:grid}.selected-ship-controls span{color:#8a6731;letter-spacing:.07em;text-transform:uppercase;font-size:.68rem;font-weight:800}.selected-ship-controls strong{color:#473a25;font-size:.88rem}.selected-ship-controls button{min-height:44px;padding:9px 12px}.rotate-ship-button{color:#8b4e0e}.fleet-utility-actions{grid-template-columns:1fr 1fr;gap:8px;display:grid}.placement-board-wrap{background:linear-gradient(#f4fbfd,#edf7fa);border:2px solid #c7d7de;border-radius:20px;gap:14px;padding:18px;transition:border-color .14s,box-shadow .14s;display:grid}.placement-board-wrap.preview-valid{border-color:#22a05a;box-shadow:0 0 0 5px #22a05a1f}.placement-board-wrap.preview-invalid{border-color:#dc4545;box-shadow:0 0 0 5px #dc45451a}.placement-board-heading{text-align:center}.placement-board-heading h2{color:#24372a;margin:0 0 4px;font-family:Georgia,Times New Roman,serif;font-size:1.7rem;font-weight:500}.placement-board-heading small{color:#66716a}.placement-board .sea-cell.occupied{touch-action:none;cursor:grab}.placement-layout.dragging,.placement-layout.dragging *{cursor:grabbing!important}.dragged-ship-ghost{z-index:200;pointer-events:none;background:#ebf9fdf0;border:2px solid #2582a080;border-radius:14px;place-items:center;min-width:54px;min-height:54px;padding:10px;display:grid;position:fixed;transform:translate(-50%,-50%);box-shadow:0 12px 30px #1a455240}.dragged-ship-ghost .ship-model i{width:22px;height:22px}.battleship-board{grid-template-columns:30px repeat(10,minmax(0,1fr));justify-self:center;align-items:center;gap:3px;width:min(560px,100%);display:grid}.battleship-row{grid-column:1/-1;grid-template-columns:30px repeat(10,minmax(0,1fr));gap:3px;display:grid}.board-axis{color:#66716a;place-items:center;font-size:.72rem;font-weight:800;display:grid}.sea-cell{aspect-ratio:1;color:#39778b;background:#e9f7fb;border:1px solid #b9d3dc;border-radius:5px;place-items:center;min-height:0;padding:0;font-size:clamp(.85rem,3.5vw,1.5rem);font-weight:900;line-height:1;display:grid;position:relative}.sea-cell:hover:not(:disabled){background:#d4eff7;border-color:#2582a0;transform:none}.sea-cell.occupied{color:#fff;background:#68766e;border-color:#435249;box-shadow:inset 0 0 0 2px #aab5ae}.sea-cell.ship-segment:not(.ship-end):not(.ship-single):after{content:"";z-index:0;pointer-events:none;background:#68766e;position:absolute}.sea-cell.ship-horizontal:not(.ship-end):not(.ship-single):after{width:7px;top:4px;bottom:4px;right:-5px}.sea-cell.ship-vertical:not(.ship-end):not(.ship-single):after{height:7px;bottom:-5px;left:4px;right:4px}.sea-cell.ship-horizontal.ship-start{border-radius:14px 3px 3px 14px}.sea-cell.ship-horizontal.ship-end{border-radius:3px 14px 14px 3px}.sea-cell.ship-vertical.ship-start{border-radius:14px 14px 3px 3px}.sea-cell.ship-vertical.ship-end{border-radius:3px 3px 14px 14px}.sea-cell.ship-single{border-radius:50%}.sea-cell.selected-ship{border-color:#d97706;box-shadow:inset 0 0 0 2px #fbbf24,0 0 0 2px #d9770624}.sea-cell.placement-preview.valid{background:#4ade80;border-color:#15803d;box-shadow:inset 0 0 0 2px #ffffff85}.sea-cell.placement-preview.invalid{background:#f87171;border-color:#b91c1c;box-shadow:inset 0 0 0 2px #ffffff7a}.sea-cell.targetable{cursor:crosshair}.sea-cell.miss{color:#39778b;background:#dceff5;border-color:#9fc7d4}.sea-cell.excluded{color:#7f8c83;background-color:#eef1ef;background-image:repeating-linear-gradient(135deg,#0000 0 5px,#6373681c 5px 7px);border-color:#cbd2cd;font-size:clamp(.7rem,2.6vw,1.05rem)}.sea-cell.hit{color:#b91c1c;background:#fee2e2;border-color:#dc2626;box-shadow:inset 0 0 0 2px #dc262629}.sea-cell.sunk{color:#fff;background:#991b1b;border-color:#7f1d1d;box-shadow:inset 0 0 0 2px #fecaca}.sea-cell:disabled{cursor:default;opacity:1}.empty-state{color:#777f79;text-align:center;border:1px dashed #d5d9d3;border-radius:14px;margin:0;padding:24px}@keyframes spin{to{transform:rotate(360deg)}}@keyframes result-modal-in{0%{opacity:0;transform:translateY(12px)scale(.97)}to{opacity:1;transform:translateY(0)scale(1)}}@media (width>=900px){main:has(.placement-layout) .card{width:min(1080px,100%);padding:clamp(36px,5vw,64px)}.placement-layout{grid-template-columns:minmax(380px,.9fr) minmax(460px,1.1fr);align-items:start}.placement-board-wrap{position:sticky;top:24px}}@media (width<=520px){main{padding:12px}.card{border-radius:20px}.account-row,.lobby-header{flex-direction:column;align-items:stretch}.lobby-header .secondary-button{width:100%}.result-actions,.create-game-actions,.fleet-list{grid-template-columns:1fr}.shipyard{grid-template-columns:1fr;gap:8px;display:grid}.ship-type-row{grid-template-columns:minmax(0,1fr) 48px}.ship-dock-item{grid-template-columns:minmax(0,1fr) auto;min-height:66px;padding:7px 14px}.selected-ship-controls{grid-template-columns:1fr 1fr}.selected-ship-controls>div{text-align:center;grid-column:1/-1}.selected-ship-controls:not(:has(.return-ship-button)) .rotate-ship-button{grid-column:1/-1}.fleet-utility-actions{grid-template-columns:1fr 1fr}.placement-board-wrap{padding:12px 8px 14px}.placement-board-heading small{padding:0 8px;line-height:1.4;display:block}.opponent-presence{flex-wrap:wrap;align-items:flex-start}.presence-actions{justify-content:flex-start;width:100%;padding-left:19px}}
