/* Токены платформы (--bg, --surface, --ink, --accent и др.) приходят из shared/theme.css; общий вид стартового экрана — из shared/start.css.
   Здесь «тетрадь в клетку»: бумага, синие клетки, фиолетово-синие чернила, красные пометки. */
:root {
  --paper: oklch(0.992 0.006 95); --grid: oklch(0.84 0.055 235); --grid-strong: oklch(0.7 0.1 250);
  --ink-b: oklch(0.42 0.17 280); --ship-fill: oklch(0.93 0.04 280); --ink-r: oklch(0.55 0.21 27); --torn: oklch(0.55 0.08 55);
  --ok: oklch(0.65 0.16 150 / .35); --no: oklch(0.6 0.2 27 / .35); --sel: oklch(0.65 0.17 250 / .3);
  --scrim: oklch(0.2 0.02 260 / .45); --focus: oklch(0.55 0.18 260);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: oklch(0.27 0.03 262); --grid: oklch(0.38 0.06 250); --grid-strong: oklch(0.55 0.11 250);
    --ink-b: oklch(0.78 0.12 285); --ship-fill: oklch(0.36 0.06 280); --ink-r: oklch(0.72 0.19 27); --torn: oklch(0.5 0.07 55);
    --focus: oklch(0.78 0.14 260);
  }
}
:root[data-theme="dark"] {
  --paper: oklch(0.27 0.03 262); --grid: oklch(0.38 0.06 250); --grid-strong: oklch(0.55 0.11 250);
  --ink-b: oklch(0.78 0.12 285); --ship-fill: oklch(0.36 0.06 280); --ink-r: oklch(0.72 0.19 27); --torn: oklch(0.5 0.07 55);
  --focus: oklch(0.78 0.14 260);
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; }
button { font-family: inherit; transition: background-color .2s ease, border-color .2s ease, color .2s ease, transform .15s ease, opacity .2s ease; }
button:not(:disabled):active { transform: scale(.97); }
button:focus-visible, a:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.noscript { margin: 0; padding: 12px 16px; background: var(--accent-soft); color: var(--ink); text-align: center; }
.app { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.screen { flex: 1; display: flex; flex-direction: column; min-height: 0; position: relative; }
.page { display: flex; flex-direction: column; gap: 12px; padding: 12px 16px 24px; width: 100%; max-width: 560px; margin: 0 auto; }
.muted { color: var(--muted); }

/* Кнопки */
.btn { min-height: 46px; padding: 0 16px; border-radius: 14px; border: 2px solid var(--line); background: var(--surface); color: var(--ink); font-size: 15px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; text-align: center; line-height: 1.15; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn:disabled { background: var(--line); color: var(--muted); border-color: var(--line); cursor: not-allowed; }
.btn.full { width: 100%; }
.row { display: flex; gap: 10px; }
.row .btn { flex: 1 1 0; min-width: 0; padding: 0 8px; }

/* Тетрадный лист с полем */
.sheet { position: relative; background: var(--paper); border: 1px solid var(--line); border-radius: 6px; padding: 8px 8px 14px; box-shadow: 0 2px 0 var(--line); }
.sheet::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--ink-r); opacity: .5; border-radius: 6px 6px 0 0; }
.sheet::after { content: ''; position: absolute; left: -1px; right: -1px; bottom: -6px; height: 7px; background: repeating-linear-gradient(135deg, var(--torn) 0 5px, transparent 5px 9px); opacity: .55; clip-path: polygon(0 0, 100% 0, 100% 40%, 96% 100%, 90% 30%, 84% 100%, 78% 35%, 70% 100%, 62% 30%, 55% 100%, 46% 40%, 38% 100%, 30% 35%, 22% 100%, 14% 40%, 8% 100%, 0 45%); }
.sheet .cap { font-size: 13px; font-weight: 700; color: var(--ink-b); margin: 2px 4px 4px; display: flex; justify-content: space-between; gap: 8px; }
.board { overflow: visible; display: block; width: 100%; height: auto; user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.board.small { max-width: 220px; margin: 0 auto; }
.who { width: 28px; height: 26px; flex: none; }
.who.me { fill: oklch(0.65 0.17 150); }
.who.foe { fill: var(--muted); }
.who.ai { fill: none; stroke: var(--muted); stroke-width: 2.5; stroke-linecap: round; }
.who.ai text { fill: var(--muted); stroke: none; font-size: 13px; font-weight: 800; }
.sheet .cap { align-items: center; justify-content: flex-start; gap: 8px; }
.board text { font-family: "Comic Sans MS", "Marker Felt", "Segoe Print", "Bradley Hand", cursive; fill: var(--ink-b); font-size: 54px; font-weight: 700; text-anchor: middle; dominant-baseline: central; }
.board .paper { fill: var(--paper); }
.board .gridline { stroke: var(--grid); stroke-width: 3; }
.board .frame { fill: none; stroke: var(--ink-b); stroke-width: 7; stroke-linejoin: round; }
.hull { fill: var(--ship-fill); stroke: var(--ink-b); stroke-width: 5; stroke-linejoin: round; stroke-linecap: round; }
.deck { fill: none; stroke: var(--ink-b); stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }
.deck.pf { fill: var(--paper); }
.deck.thin { stroke-width: 2; }
.shade { stroke: var(--ink-b); stroke-width: 4; stroke-linecap: round; opacity: .55; }
.gun { stroke: var(--ink-b); stroke-width: 5; stroke-linecap: round; fill: none; }
.ship.sunk .hull { stroke: var(--ink-r); fill: oklch(0.9 0.05 25 / .6); }
.ship.sunk .deck, .ship.sunk .gun, .ship.sunk .shade { stroke: var(--ink-r); }
.ship.ghost { opacity: .75; }
.ship.ghost.bad .hull { stroke: var(--ink-r); }
.hatch-line { stroke: var(--ink-b); stroke-width: 5; opacity: .75; }
.hatch-red { stroke: var(--ink-r); stroke-width: 6; }
.aim { fill: none; stroke: var(--ink-b); stroke-width: 9; stroke-linecap: round; }
.logo-dot { fill: var(--ink-b); }
.m-hit { stroke: var(--ink-r); stroke-width: 11; stroke-linecap: round; fill: none; }
.board .cellfx.ok { fill: var(--ok); }
.board .cellfx.no { fill: var(--no); }
.board .cellfx.sel { fill: var(--sel); stroke: var(--ink-b); stroke-width: 5; stroke-dasharray: 14 10; }
.board .hit-target { fill: transparent; cursor: pointer; }
.board.locked .hit-target { cursor: default; }
.pop { animation: pop .25s ease-out both; transform-box: fill-box; transform-origin: center; }
.late-hit { animation-delay: .62s; }
.late-miss { animation-delay: .95s; }
.ship.late { animation: fadein .35s ease-out .75s both; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { transform: scale(.2); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* Расстановка */
.tray { display: flex; gap: 8px; flex-wrap: wrap; }
.tray-ship { flex: 1 1 0; min-width: 72px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 4px; border-radius: 12px; border: 2px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; font-size: 13px; font-weight: 700; }
.tray-ship[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.tray-ship:disabled { opacity: .45; cursor: not-allowed; }
.tray-ship svg { width: 100%; max-width: 70px; height: 22px; }
.hint { font-size: 14px; color: var(--muted); line-height: 1.4; min-height: 20px; }
.hint.bad { color: var(--ink-r); font-weight: 700; }

/* Бой */
.status { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-weight: 700; font-size: 17px; }
.status .turn { padding: 4px 12px; border-radius: 999px; background: var(--accent-soft); border: 2px solid var(--line); }
.status .turn.mine { border-color: var(--accent); }
.lastshot { font-size: 14px; color: var(--muted); min-height: 20px; }
.leftrow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.leftrow .lw { white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; font-weight: 700; color: var(--ink); }
.leftrow svg { width: 40px; height: 14px; }
@media (max-width: 360px) { .leftrow { gap: 6px; } .leftrow svg { width: 30px; } }

/* Окна */
.scrim { position: fixed; inset: 0; background: var(--scrim); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 30; }
.modal { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 20px; width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 12px; }
.modal h2 { margin: 0; font-size: 20px; }
.modal p { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.4; }
.modal ol { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; line-height: 1.4; }
.modal.over { text-align: center; }
.modal.over.win h2 { color: var(--accent); }
.modal.over.lose h2 { color: var(--ink-r); }

@media (prefers-reduced-motion: reduce) { .pop { animation: none; } button { transition: none; } }

/* Логотип на стартовом экране: листок в клетку с корабликом */
.logo-ship { display: block; }
.logo-paper { fill: var(--paper); stroke: var(--ink-b); stroke-width: 3; }
.logo-grid { stroke: var(--grid); stroke-width: 2; fill: none; }
.logo-hit { stroke-width: 6; }

/* Два поля рядом на широком экране: ваше слева, соперника справа */
.page.wide { max-width: 560px; }
.boards { display: flex; flex-direction: column; gap: 14px; }
@media (min-width: 820px) {
  .page.wide { max-width: 980px; }
  .boards { gap: 16px; }
  .boards .sheet { flex: 1 1 0; min-width: 0; }
  .board.small { max-width: none; }
}

/* Длинное название «Морской бой» помещается компактнее */
.brand h1 { font-size: clamp(28px, 5.4vh, 38px); }

/* Анимация выстрела: ядро, взрыв, всплеск */
.fx .boom-fire { fill: oklch(0.72 0.19 50); }
.fx .boom-core { fill: oklch(0.94 0.14 95); }
.fx .spark { stroke: oklch(0.8 0.17 70); stroke-width: 7; stroke-linecap: round; }
.fx .smoke { fill: oklch(0.55 0.01 260); }
.fx .ripple { fill: none; stroke: var(--ink-b); }
.fx .drop { fill: oklch(0.7 0.12 235); }
.fx .bubble { fill: none; stroke: oklch(0.65 0.13 235); stroke-width: 4; }
@media (prefers-reduced-motion: reduce) { .fx { display: none; } .late-hit, .late-miss, .ship.late { animation: none; } }

/* Оружие: выбор перед боем, панель в бою, цели на поле, анимации */
.arsenal { display: flex; flex-direction: column; gap: 8px; background: var(--surface); border: 2px solid var(--line); border-radius: 16px; padding: 10px 12px; }
.arsenal .cap { display: flex; justify-content: space-between; font-weight: 700; font-size: 14px; margin: 0; }
.arsenal .cnt.ok { color: var(--accent); }
.arow { display: flex; align-items: center; gap: 10px; }
.ainfo { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; font-size: 13px; }
.ainfo b { font-size: 15px; }
.ainfo span { color: var(--muted); line-height: 1.3; }
.step { display: flex; align-items: center; gap: 8px; }
.stepbtn { width: 40px; height: 40px; border-radius: 12px; border: 2px solid var(--line); background: var(--surface); color: var(--ink); font-size: 20px; font-weight: 700; cursor: pointer; }
.stepbtn:disabled { opacity: .4; cursor: not-allowed; }
.num { min-width: 20px; text-align: center; font-weight: 800; font-size: 18px; }
.wbar { display: flex; gap: 8px; flex-wrap: wrap; }
.wbtn { flex: 1 1 0; min-width: 72px; min-height: 46px; padding: 4px 6px; border-radius: 12px; border: 2px solid var(--line); background: var(--surface); color: var(--ink); font-size: 14px; font-weight: 700; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; }
.wbtn small { font-size: 12px; color: var(--muted); font-weight: 600; }
.wbtn[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.wbtn:disabled { opacity: .4; cursor: not-allowed; }
.m-blip circle { fill: none; stroke: oklch(0.7 0.17 55); stroke-width: 8; }
.m-blip .dot { fill: oklch(0.7 0.17 55); stroke: none; }
.selarea { fill: oklch(0.65 0.17 250 / .12); stroke: var(--ink-b); stroke-width: 6; stroke-dasharray: 18 12; pointer-events: none; }
.selarea.bomber { stroke: var(--ink-r); fill: oklch(0.6 0.2 27 / .1); }
.selline { stroke: var(--ink-b); stroke-width: 6; stroke-dasharray: 16 12; opacity: .7; pointer-events: none; }
.selarrow { fill: none; stroke: var(--ink-b); stroke-width: 8; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.plane-body { fill: var(--ship-fill); stroke: var(--ink-b); stroke-width: 5; stroke-linejoin: round; }
.fx .torp { fill: oklch(0.45 0.05 265); stroke: var(--ink-b); stroke-width: 4; }
.fx .wake { stroke: oklch(0.7 0.1 270); stroke-width: 8; stroke-linecap: round; stroke-dasharray: 2 14; }
.fx .radar-ring { fill: none; stroke: oklch(0.72 0.15 160); stroke-width: 8; }
.fx .radar-arm { stroke: oklch(0.72 0.15 160); stroke-width: 10; stroke-linecap: round; }
.sub .hull { fill: var(--ship-fill); }

/* Макет по образцу «Морского боя 2»: красная линия полей, вымпел «Арсенал» с листом иконок, зелёная стрелка хода, красные скобки прицела */
.redline { height: 3px; background: var(--ink-r); opacity: .55; margin: 2px -16px 0; }
.topline { position: relative; display: flex; align-items: flex-start; gap: 10px; flex-wrap: wrap; margin-top: -2px; }
.pennantbtn { position: relative; border: 0; background: none; padding: 0; width: 112px; height: 62px; cursor: pointer; flex: none; color: var(--ink-b); }
.pennantbtn:disabled { opacity: .45; cursor: not-allowed; }
.pennantbtn svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.pennantbtn span { position: absolute; left: 0; right: 0; top: 10px; text-align: center; font-family: "Comic Sans MS", "Marker Felt", "Segoe Print", "Bradley Hand", cursive; font-weight: 800; font-size: 17px; color: var(--ink-b); }
.pen-body { fill: var(--paper); stroke: var(--ink-b); stroke-width: 5; stroke-linejoin: round; }
.pen-red { fill: var(--ink-r); opacity: .8; }
.pen-hatch { stroke: var(--paper); stroke-width: 4; stroke-linecap: round; opacity: .8; }
.topline .status { flex: 1 1 160px; min-width: 0; flex-wrap: wrap; padding-top: 8px; }
.wchip { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; min-height: 44px; padding: 2px 10px 2px 6px; border-radius: 12px; border: 2px solid var(--ink-r); background: var(--surface); color: var(--ink); font-weight: 700; font-size: 14px; cursor: pointer; }
.wchip .wicon { width: 34px; height: 30px; }
.wchip b { color: var(--ink-r); }
.asheet { position: absolute; left: 0; top: 100%; z-index: 25; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; width: min(460px, 100%); padding: 14px 12px 12px; background: var(--paper); border: 3px solid var(--ink-b); border-radius: 14px 14px 26px 26px; box-shadow: 0 10px 24px oklch(0.2 0.02 260 / .35); background-image: repeating-linear-gradient(0deg, transparent 0 29px, var(--grid) 29px 30px), repeating-linear-gradient(90deg, transparent 0 29px, var(--grid) 29px 30px); }
.aitem { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px 6px; border: 2px solid transparent; background: none; color: var(--ink-b); cursor: pointer; border-radius: 6px; }
.aitem .wicon { width: 100%; max-width: 110px; height: 62px; }
.aitem .x { font-family: "Comic Sans MS", "Marker Felt", "Segoe Print", cursive; font-weight: 800; font-size: 24px; color: var(--ink-b); }
.aitem .x { color: var(--ink-r); }
.aitem em { font-style: normal; font-size: 12px; font-weight: 700; color: var(--ink); }
.aitem:disabled { opacity: .35; cursor: not-allowed; }
.aitem.on { border-color: transparent; }
.aitem.on::before, .aitem.on::after { content: ''; position: absolute; width: 22px; height: 22px; border: 0 solid var(--ink-r); }
.aitem.on::before { left: 0; top: 0; border-width: 4px 0 0 4px; }
.aitem.on::after { right: 0; bottom: 0; border-width: 0 4px 4px 0; }
.wicon { display: block; }
.wicon .deck.thin { stroke-width: 2.5; }
.wicon .wi-green { fill: oklch(0.75 0.17 145 / .7); stroke: none; }
.wicon .wi-dot { fill: var(--ink-r); }
.aicon { width: 64px; flex: none; }
.aicon .wicon { width: 100%; height: 44px; }
.turnarrow { flex: none; display: flex; align-items: center; justify-content: center; align-self: center; width: 44px; height: 56px; transition: transform .3s ease; }
.turnarrow svg { width: 100%; height: 100%; }
.arrow-body { fill: oklch(0.75 0.17 145 / .75); stroke: oklch(0.38 0.1 150); stroke-width: 5; stroke-linejoin: round; }
.arrow-hatch { stroke: oklch(0.5 0.14 150); stroke-width: 4; stroke-linecap: round; opacity: .7; }
.turnarrow.mt { transform: rotate(-90deg); }
.turnarrow.ft { transform: rotate(90deg); }
.avs { width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px; color: var(--ink); flex: none; }
.brk { fill: none; stroke: var(--ink-r); stroke-width: 11; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.greencell { fill: oklch(0.75 0.17 145 / .45); stroke: oklch(0.5 0.14 150); stroke-width: 3; stroke-dasharray: 8 6; pointer-events: none; }
.plane.shadow .plane-body { fill: oklch(0.3 0.01 260); stroke: none; opacity: .22; }
.plane.shadow .deck { display: none; }
@media (min-width: 820px) {
  .boards .mine { order: 1; }
  .boards .turnarrow { order: 2; }
  .boards .foe { order: 3; }
  .turnarrow.mt { transform: rotate(0deg); }
  .turnarrow.ft { transform: rotate(180deg); }
  .boards { align-items: center; }
  .boards .sheet { align-self: flex-start; }
  .boards { flex-direction: row; }
}

/* Онлайн: вход, список столов, комната ожидания (вид как у «Ятзи») */
@keyframes pop-in { from { transform: scale(.82); opacity: .4; } to { transform: scale(1); opacity: 1; } }
.name-input { padding: 8px 16px; border-radius: 14px; border: 2px solid var(--line); background: var(--surface); color: var(--ink); font-size: 17px; min-height: 48px; font-family: inherit; }
.mode-btn.o-mode { width: 100%; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; min-width: 0; }
.name-input:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.o-page { display: flex; flex-direction: column; gap: 14px; max-width: 560px; width: 100%; margin: 0 auto; }
.o-box { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.o-box h3 { margin: 0; font-size: 16px; }
.o-center { text-align: center; align-items: center; }
.o-p { margin: 0; font-size: 16px; }
.o-err { color: var(--danger, #c0392b); font-weight: 700; font-size: 14px; margin: 0; }
.o-hint { font-size: 14px; color: var(--muted); text-align: center; }
.o-dashed { border: 2px dashed var(--line); border-radius: 20px; padding: 16px; text-align: center; color: var(--muted); font-size: 15px; }
.o-msg { border-radius: 20px; padding: 16px; background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.o-msg.bad { border: 1.5px solid var(--danger, #c0392b); }
.o-msg span { color: var(--muted); font-size: 14px; }
.o-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.o-row .who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.o-row .who small { color: var(--muted); font-size: 14px; }
.o-row.skel .av, .o-row.skel .ln { background: var(--line); display: block; }
.o-row.skel .ln { height: 12px; width: 50%; border-radius: 6px; flex: 1; max-width: 50%; }
.av { width: 36px; height: 36px; border-radius: 50%; flex: none; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; background: var(--accent-soft); color: var(--ink); }
.o-you { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 12px 0 6px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); font-size: 14px; font-weight: 700; white-space: nowrap; }
.o-you .av { width: 32px; height: 32px; }
.o-code-row { display: flex; gap: 8px; }
.o-code { flex: 1; min-width: 0; text-align: center; font-size: 24px; letter-spacing: .3em; text-transform: uppercase; }
.o-mode b { display: block; }
.o-mode small { display: block; margin-top: 2px; color: var(--muted); font-weight: 400; font-size: 14px; }
.o-bigcode { font-size: 46px; font-weight: 700; letter-spacing: 10px; padding-left: 10px; }
.o-mode-tag { font-size: 14px; color: var(--muted); }
.o-seats { display: flex; flex-direction: column; gap: 8px; }
.o-seat { display: flex; align-items: center; gap: 12px; padding: 8px 14px; min-height: 56px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.o-seat.empty { background: transparent; border: 2px dashed var(--line); color: var(--muted); animation: none; }
.o-seat .nm { flex: 1; min-width: 0; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.o-seat .tg { font-size: 14px; color: var(--muted); }
.o-banner { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 14px; font-size: 15px; font-weight: 700; background: var(--accent-soft); border: 1.5px solid var(--accent); }
.o-banner.bad { border-color: var(--danger, #c0392b); }
.o-banner span { flex: 1; min-width: 0; }
.o-ask { display: flex; align-items: baseline; gap: 10px; }
.o-ask b { font-size: 56px; line-height: 1; }
.o-ask span { color: var(--muted); }
.modal .reward { color: var(--ink); font-weight: 700; font-size: 16px; }

/* Расстановка: на телефоне одна колонка, на широком экране оружие слева от поля, корабли и «Готов» справа */
.place-grid { display: flex; flex-direction: column; gap: 12px; }
.pl-board, .pl-ships, .pl-arsenal, .pl-ready { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
@media (min-width: 900px) {
  .page.place { max-width: 1120px; }
  .place-grid { display: grid; grid-template-columns: minmax(300px, 1fr) minmax(0, 500px) 170px; justify-content: center; grid-template-rows: auto 1fr; gap: 16px 20px; align-items: start; }
  .pl-arsenal { grid-column: 1; grid-row: 1 / span 2; }
  .pl-board { grid-column: 2; grid-row: 1 / span 2; }
  .pl-ships { grid-column: 3; grid-row: 1; }
  .pl-ready { grid-column: 3; grid-row: 2; align-self: end; }
  /* Корабли списком, как топ рейтинга: строка — значок корабля и сколько осталось; кнопки компактно под списком */
  .pl-ships .tray { display: flex; flex-direction: column; gap: 4px; }
  .pl-ships .tray-ship { flex: none; flex-direction: row; justify-content: space-between; gap: 8px; min-width: 0; padding: 4px 10px; border-radius: 12px; }
  .pl-ships .tray-ship svg { width: 54px; max-width: none; height: 20px; }
  .pl-ships .tray-ship span { font-weight: 700; }
  .pl-ships .row { flex-wrap: wrap; gap: 6px; }
  .pl-ships .row .btn { min-height: 38px; font-size: 14px; }
  .pl-ships .row .btn:first-child { flex: 1 1 100%; }
}
