/* Totally Realistic Fishing Simulator — прототип v0.1. Одна тёмная тема: ночная вода, буйки, латунь. */
:root {
  color-scheme: dark;
  --ink: #0A2029;
  --ink2: #10303B;
  --ink3: #184250;
  --line: rgba(244, 248, 248, 0.14);
  --text: #F4F8F8;
  --muted: #9FB8BF;
  --buoy: #E8742A;
  --buoy2: #FF9A52;
  --gold: #E7B73C;
  --kelp: #8DBB5A;
  --red: #E0482B;
  --sea: #2D7C8E;
  --paper: #F2EBDD;
  --paper-ink: #2B2A26;
  --paper-line: #CDBFA5;
  --stamp: #C8412B;
  --f-display: 'Unbounded', 'Arial Black', system-ui, sans-serif;
  --f-body: 'Onest', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --f-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; background: var(--ink); color: var(--text); overflow: hidden; }
body { font: 14px/1.45 var(--f-body); -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; }
button:focus-visible { outline: 2px solid var(--buoy2); outline-offset: 2px; }
kbd { font-family: var(--f-mono); font-size: 0.9em; padding: 0 5px; border: 1px solid var(--line); border-radius: 4px; background: var(--ink2); }

#app { position: fixed; inset: 0; overflow: hidden; }
#sea { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: crosshair; background: var(--sea); }

/* ---------- приборы ---------- */
.hud { position: absolute; inset: 0; pointer-events: none; font-variant-numeric: tabular-nums; }
.hud button { pointer-events: auto; }
.panel { background: rgba(6, 24, 32, 0.66); border: 1px solid var(--line); border-radius: 12px; padding: 9px 11px; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
/* Как в Vampire Survivors: опыт — полосой во всю ширину сверху, оружие и оснастка — иконками в два ряда слева,
   прочность и трюм — короткими полосками с цифрами внутри (и ещё раз под самим кораблём, render.js), деньги — справа */
.xp-top { position: absolute; left: 0; right: 0; top: 0; display: flex; gap: 10px; padding: calc(4px + env(safe-area-inset-top, 0px)) calc(6px + env(safe-area-inset-right, 0px)) 0 calc(6px + env(safe-area-inset-left, 0px)); }
.xt { position: relative; flex: 1; height: 15px; border-radius: 5px; background: rgba(2, 14, 20, 0.8); box-shadow: inset 0 0 0 1px rgba(143, 227, 242, 0.28); overflow: hidden; }
.xt > i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: linear-gradient(90deg, #3E8FB0, #9BEAF7); transition: width 0.15s linear; }
.xt > b { position: absolute; right: 8px; top: 0; font: 800 10.5px/15px var(--f-mono); letter-spacing: 0.04em; color: #FFFFFF; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9); }
.xt.p2 > i { left: auto; right: 0; }
.xt.p2 > b { right: auto; left: 8px; }
.hud.coop .xt > i { background: var(--pc, #8FE3F2); }
.xt.up { animation: xtup 0.6s ease-out; }
@keyframes xtup { 0% { box-shadow: inset 0 0 0 1px #FFFFFF, 0 0 14px rgba(155, 234, 247, 0.9); } 100% { box-shadow: inset 0 0 0 1px rgba(143, 227, 242, 0.28); } }
.hud-l { position: absolute; left: calc(8px + env(safe-area-inset-left, 0px)); top: calc(25px + env(safe-area-inset-top, 0px)); width: 226px; display: grid; gap: 4px; }
.bar { height: 9px; background: rgba(2, 14, 20, 0.7); border-radius: 5px; overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); }
.bar > i { display: block; height: 100%; width: 0; background: var(--red); border-radius: 5px; transition: width 0.12s linear; }
.mt { display: grid; grid-template-columns: 13px minmax(0, 1fr); gap: 5px; align-items: center; }
.mt .ic { width: 13px; height: 13px; display: block; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.7)); }
.mt.hp .ic { color: #FF7A5C; }
.mt.hold .ic { color: #A9D774; }
.mt .bar { position: relative; height: 15px; border-radius: 5px; background: rgba(2, 14, 20, 0.8); }
.mt .bar > i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 5px; }
.mt .bar > b, .mt .bar > em { position: absolute; top: 0; font: 700 10px/15px var(--f-mono); font-style: normal; color: #FFFFFF; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.95), 0 0 3px rgba(0, 0, 0, 0.8); white-space: nowrap; }
.mt .bar > b { left: 6px; }
.mt .bar > em { right: 6px; color: #FFE39A; }
.mt.hp.low .bar > i { animation: blink 0.6s steps(2) infinite; }
.mt.hold .bar > i { background: var(--kelp); }
.mt.hold.full .bar > i { background: var(--buoy); }
.mt.hold.full .bar { box-shadow: inset 0 0 0 1px var(--buoy2), 0 0 8px rgba(255, 154, 82, 0.5); }

.hud-c { position: absolute; left: 50%; top: calc(22px + env(safe-area-inset-top, 0px)); transform: translateX(-50%); display: grid; justify-items: center; gap: 5px; width: min(360px, 34vw); }
.clock { display: flex; align-items: baseline; gap: 6px; font-family: var(--f-mono); text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5); }
.clock b { font-size: 26px; font-weight: 800; letter-spacing: 0.02em; }
.clock span { font-size: 12px; color: var(--muted); }
.sea-chip { margin: 0; padding: 3px 10px; border-radius: 99px; background: rgba(6, 24, 32, 0.66); border: 1px solid var(--line); font: 600 11.5px/1.4 var(--f-body); color: var(--text); white-space: nowrap; }
.boss { width: 100%; display: grid; gap: 4px; justify-items: center; margin-top: 2px; }
.boss span { font: 800 12px/1 var(--f-display); letter-spacing: 0.04em; color: #FFD2C4; text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6); }
.boss .bar { width: 100%; height: 10px; }
.boss .bar > i { background: linear-gradient(90deg, #E0482B, #FF7A4A); }

.hud-r { position: absolute; right: calc(12px + env(safe-area-inset-right, 0px)); top: calc(24px + env(safe-area-inset-top, 0px)); text-align: right; }
.money { font: 800 20px/1.1 var(--f-mono); color: var(--gold); text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9), 0 0 10px rgba(0, 0, 0, 0.45); }
.buffs { margin: 0; font: 600 11.5px/1.3 var(--f-body); }
.buffs:empty { display: none; }
.buffs { color: var(--buoy2); text-align: center; text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6); }

/* панели игроков: в одиночку — слева, в коопе вторая встаёт справа */
.ptag { display: none; margin: 0 0 1px; align-items: baseline; gap: 8px; }
.ptag b { font: 800 12px/1.2 var(--f-display); color: var(--pc, var(--text)); text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9); }
.ptag span { font: 600 10px/1.2 var(--f-mono); color: #D5E6EA; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9); }
.pp .pm { display: none; font-size: 15px; }
.hud.coop .ptag { display: flex; }
.hud.coop .pp .pm { display: block; }
.hud-l.p2 { left: auto; right: calc(8px + env(safe-area-inset-right, 0px)); justify-items: end; }
.hud-l.p2 .ptag { flex-direction: row-reverse; }
.hud-l.p2 .gear-mini { justify-items: end; }
.hud-l.p2 .slots, .hud-l.p2 .pas { justify-content: flex-end; }
.hud-l.p2 .mt { grid-template-columns: minmax(0, 1fr) 13px; }
.hud-l.p2 .mt .ic { order: 2; }
.hud-l.p2 .mt, .hud-l.p2 .pm { width: 100%; text-align: right; }

.gear-mini { display: grid; gap: 3px; justify-items: start; padding: 0; margin: 0 0 1px; border: 0; background: none; cursor: pointer; text-align: left; color: inherit; }
.gear-mini:hover .slot, .gear-mini:focus-visible .slot { border-color: rgba(255, 154, 82, 0.7); }
.slots { display: flex; gap: 3px; }
.slot { position: relative; width: min(33px, calc((226px - 3px * (var(--n, 6) - 1)) / var(--n, 6))); height: 37px; border-radius: 7px; background: rgba(2, 14, 20, 0.66); border: 1px solid rgba(143, 227, 242, 0.24); display: grid; justify-items: center; align-content: center; gap: 2px; box-sizing: border-box; overflow: hidden; }
.slot.empty { border-style: dashed; background: rgba(2, 14, 20, 0.25); }
.slot .pips { max-width: 100%; }
.slot .pips i { width: 4px; height: 4px; }
.slot.union, .slot.evo { border-color: var(--gold); box-shadow: 0 0 8px rgba(231, 183, 60, 0.35); }
.slot .star { font: 800 9px/1 var(--f-mono); color: var(--gold); }
.slot canvas { display: block; }
/* гнёзда веток (ADR 0024): родные — цветом класса, пустое родное — бледный значок семейства, «IV» — родные откроются на верфи */
.slot.nat { border-color: var(--cc, #8FE3F2); border-width: 1.5px; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--cc, #8FE3F2) 40%, transparent), 0 0 6px color-mix(in srgb, var(--cc, #8FE3F2) 35%, transparent); }
.slot.nat.empty { border-style: dashed; }
.slot.nat.empty canvas { opacity: 0.4; }
.slot.lock { opacity: 0.5; }
.slot.lock b { font: 800 10px/1 var(--f-mono); color: var(--muted); }
.nat-h { color: var(--cc, #8FE3F2); }
.br { display: grid; gap: 3px; margin-top: 2px; }
.br-fam { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.br-fam b { font: 700 12px/1.3 var(--f-body); color: #E6F1F3; margin-right: 2px; }
.br small { font: 500 11.5px/1.35 var(--f-body); color: var(--muted); }
.fam-chip { font: 700 10px/1 var(--f-mono); font-style: normal; text-transform: uppercase; letter-spacing: 0.04em; color: #8FE3F2; margin-left: 4px; }
.pips { display: inline-flex; gap: 2px; vertical-align: middle; }
.pips i { width: 5px; height: 5px; border-radius: 50%; background: rgba(244, 248, 248, 0.2); flex: none; }
.pips i.on { background: var(--gold); }
.pips i.nx { background: #FFE9A6; box-shadow: 0 0 0 1px #FFFFFF, 0 0 6px rgba(255, 214, 90, 0.9); animation: blink 0.9s ease-in-out infinite; }
.card .pips i, .loot-list .pips i, .gear-grid .pips i { width: 9px; height: 9px; }
.card .pips, .gear-grid .pips { gap: 3px; margin: 2px 0 4px; }
.loot-list .pips { display: flex; gap: 3px; margin: 3px 0; }
.shop li .nm .pips { margin-left: 6px; }
.ings { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 4px 0; font-size: 12.5px; }
.ing { display: inline-flex; align-items: center; gap: 5px; }
.ing canvas { border-radius: 50%; }
.ings .plus { font-style: normal; color: var(--muted); }
.steps em { font-style: normal; font-weight: 700; color: #F4F8F8; }
.pas { display: flex; flex-wrap: wrap; gap: 4px; max-width: 226px; }
.pas:empty { display: none; }
.pi { position: relative; display: block; width: 22px; height: 22px; border-radius: 6px; background: rgba(2, 14, 20, 0.5); }
.pi canvas { display: block; }
.pi b { position: absolute; right: -4px; bottom: -3px; padding: 0 3px; border-radius: 4px; background: var(--ink); border: 1px solid var(--line); font: 800 8.5px/1.3 var(--f-mono); color: var(--gold); }
.pi.it { box-shadow: 0 0 0 1.5px var(--rc); }
.pi.it canvas { border-radius: 6px; }
/* вещи с редкостью */
.itm { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; box-shadow: 0 0 0 2px var(--rc, var(--line)), 0 0 10px color-mix(in srgb, var(--rc, #000) 45%, transparent); flex: none; }
.itm canvas { border-radius: 6px; display: block; }
.itm.empty { box-shadow: 0 0 0 1px var(--line); border: 1px dashed var(--line); box-sizing: border-box; }
.itm-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.itm-row { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center; padding: 7px 10px; border-radius: 10px; background: var(--ink); border: 1px solid var(--line); border-left: 3px solid var(--rc, var(--line)); }
.itm-row.off { opacity: 0.55; }
/* вещи по слотам: плитки и раскрытый слот */
.slot-help { margin: 0 0 8px; font-size: 12.5px; }
.slot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); grid-auto-flow: row dense; gap: 6px; }
.slot-tile { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 9px; align-items: center; text-align: left; padding: 8px 10px; border-radius: 10px; background: var(--ink); border: 1px solid var(--line); border-left: 3px solid var(--rc, var(--line)); color: inherit; font: inherit; cursor: pointer; }
.slot-tile:hover { border-top-color: rgba(143, 227, 242, 0.45); border-right-color: rgba(143, 227, 242, 0.45); border-bottom-color: rgba(143, 227, 242, 0.45); }
.slot-tile[aria-expanded="true"] { background: var(--ink3); border-top-color: var(--buoy2); border-right-color: var(--buoy2); border-bottom-color: var(--buoy2); }
.slot-tile.off > span:nth-child(2) { opacity: 0.65; }
.slot-tile b { font-size: 13px; }
.slot-tile small { display: block; font-size: 12px; color: var(--muted); line-height: 1.35; }
.slot-n { display: inline-block; margin-left: 4px; padding: 0 6px; border-radius: 99px; background: var(--gold); color: #1E262B; font: 800 10px/1.5 var(--f-mono); font-style: normal; letter-spacing: 0; vertical-align: 1px; }
.slot-pick { grid-column: 1 / -1; margin: 2px 0 4px; padding: 10px; border-radius: 12px; border: 1px dashed rgba(255, 154, 82, 0.45); background: rgba(255, 154, 82, 0.05); }
.slot-pick[hidden] { display: none; }
.slot-h { margin: 0 0 8px; font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.slot-h b { color: var(--text); }
.slot-pick .muted { margin: 0; }
.itm-row.worn { background: rgba(141, 187, 90, 0.1); }
.worn-tag { font: 700 11px/1 var(--f-mono); color: var(--kelp); padding: 6px 4px; }
.shop .itm-list li.itm-row, .hub-body .itm-list li.itm-row, .gear-items .itm-list li.itm-row { grid-template-columns: 34px 1fr auto; grid-template-rows: auto; }
.shop .itm-list li.itm-row > span:nth-child(2) { grid-column: 2; }
.itm-row b, .itm-pick b { font-size: 13px; }
.itm-row small, .itm-pick small { display: block; font-size: 12px; color: var(--muted); line-height: 1.35; }
.itm-row button { border-radius: 8px; padding: 6px 9px; border: 1px solid rgba(231, 183, 60, 0.55); background: rgba(231, 183, 60, 0.12); color: var(--gold); font: 700 12px/1 var(--f-mono); cursor: pointer; }
.slot-nm { display: block; font: 700 10px/1.3 var(--f-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.rar { font: 700 10.5px/1 var(--f-mono); font-style: normal; letter-spacing: 0.04em; color: var(--rc); margin-left: 4px; }
.itm-btns { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; }
.itm-btns .ghost.small { margin-top: 0; }
.itm-btns [aria-pressed="true"] { border-color: var(--kelp); color: var(--kelp); }
.itm-pick { width: 100%; display: grid; grid-template-columns: 34px 1fr; gap: 10px; align-items: center; text-align: left; padding: 7px 10px; border-radius: 10px; background: var(--ink); border: 1px solid var(--line); cursor: pointer; }
.itm-pick[aria-pressed="true"] { border-color: var(--rc); box-shadow: 0 0 0 1px var(--rc) inset, 0 0 14px color-mix(in srgb, var(--rc) 35%, transparent); }
.keep { margin-top: 14px; }
.keep h3 { margin: 0 0 8px; font: 800 15px/1.2 var(--f-display); }
.gear-items h4, .shop h4 + .itm-list { margin-top: 0; }
.gear-items { margin-top: 14px; }
.gear-items h4 { margin: 0 0 8px; font: 700 11px/1 var(--f-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.loot-list li.item { border-left: 3px solid var(--rc); }
.loot-list .slot-nm { margin-bottom: 1px; }
/* заставка и эпилог */
.sheet.story { width: auto; max-width: 100%; }
.story-cv { display: block; margin: 0 auto; border-radius: 12px; box-shadow: 0 0 0 1px var(--line); max-width: 100%; }
.story-text { max-width: 760px; min-height: 3.2em; margin: 14px auto 0; font: 700 clamp(15px, 2.4vw, 19px)/1.45 var(--f-body); color: #F4F8F8; text-wrap: balance; }
.cap { position: absolute; left: 50%; bottom: calc(40px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); width: min(720px, calc(100% - 32px)); display: grid; justify-items: center; gap: 10px; text-align: center; z-index: 4; pointer-events: none; }
.cap p { margin: 0; padding: 12px 20px; border-radius: 14px; background: rgba(40, 18, 10, 0.55); font: 800 clamp(16px, 2.6vw, 24px)/1.35 var(--f-display); color: #FFF3E0; text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5); text-wrap: balance; }
.cap p:empty { display: none; }
.cap button { pointer-events: auto; }
.cap.show p { animation: rise 0.6s ease-out; }
.padfocus { outline: 3px solid var(--buoy2) !important; outline-offset: 2px; }
.chip { padding: 2px 8px; border-radius: 99px; background: rgba(6, 24, 32, 0.66); border: 1px solid var(--line); font: 600 11px/1.4 var(--f-body); color: var(--muted); }

.btn-dyn { position: absolute; right: calc(18px + env(safe-area-inset-right, 0px)); bottom: calc(18px + env(safe-area-inset-bottom, 0px)); width: 74px; height: 74px; border-radius: 50%; border: 3px solid #FFD2C4; background: radial-gradient(circle at 35% 30%, #F0654A, #B72E1C); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4); cursor: pointer; display: grid; place-items: center; align-content: center; gap: 0; }
.btn-dyn span { font: 800 14px/1 var(--f-mono); letter-spacing: 0.06em; color: #FFF6E8; }
.btn-dyn b { font: 800 18px/1.1 var(--f-mono); color: #FFFFFF; }
.btn-dyn:disabled { filter: grayscale(0.9) brightness(0.7); cursor: default; }
.btn-dyn:not(:disabled):active { transform: scale(0.95); }
.btn-round { position: absolute; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: rgba(6, 24, 32, 0.72); cursor: pointer; font: 700 13px/1 var(--f-mono); color: var(--text); }
.btn-round.pause { left: calc(58px + env(safe-area-inset-left, 0px)); bottom: calc(18px + env(safe-area-inset-bottom, 0px)); }
.btn-round.dbg { left: calc(12px + env(safe-area-inset-left, 0px)); bottom: calc(18px + env(safe-area-inset-bottom, 0px)); }
.btn-round.map { left: calc(104px + env(safe-area-inset-left, 0px)); bottom: calc(18px + env(safe-area-inset-bottom, 0px)); display: grid; place-items: center; }
.btn-round.music { left: calc(150px + env(safe-area-inset-left, 0px)); bottom: calc(18px + env(safe-area-inset-bottom, 0px)); font-size: 17px; }
.btn-round.viewb { left: calc(242px + env(safe-area-inset-left, 0px)); bottom: calc(18px + env(safe-area-inset-bottom, 0px)); display: grid; place-items: center; }
.btn-round.mark { left: calc(288px + env(safe-area-inset-left, 0px)); bottom: calc(18px + env(safe-area-inset-bottom, 0px)); font: 900 17px/1 var(--f-display); color: var(--gold); }
.btn-round.music.off { color: var(--muted); text-decoration: line-through; opacity: 0.7; }
.btn-round.sfxb { left: calc(196px + env(safe-area-inset-left, 0px)); bottom: calc(18px + env(safe-area-inset-bottom, 0px)); display: grid; place-items: center; }
.btn-round.sfxb .x { display: none; }
.btn-round.sfxb.off { color: var(--muted); opacity: 0.7; }
.btn-round.sfxb.off .x { display: inline; }
.btn-round.sfxb.off .wv { display: none; }
/* звук: ползунки и выключатели */
.snd { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.snd h3 { margin: 0 0 8px; font: 800 15px/1.2 var(--f-display); }
.snd-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 6px 18px; margin-bottom: 8px; }
.vol { display: grid; grid-template-columns: 116px minmax(0, 1fr) 34px; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.vol input { width: 100%; accent-color: var(--buoy); height: 22px; margin: 0; }
.vol input:focus-visible, .vol input.padfocus { outline: 2px solid var(--buoy2); outline-offset: 3px; border-radius: 4px; }
.vol b { font: 700 12px/1 var(--f-mono); color: var(--text); text-align: right; font-variant-numeric: tabular-nums; }
.snd .steer { margin-top: 4px; padding-top: 4px; border-top: 0; }
.snd-note { font-size: 12.5px; }
.btn-dyn.nuke { border-color: #F2C230; background: radial-gradient(circle at 35% 30%, #F2C230, #7A5A0A); }
.btn-dyn.nuke span { font-size: 22px; color: #1E262B; }
.btn-dyn.nuke b { color: #1E262B; }

/* ---------- объявления ---------- */
.notes { position: absolute; left: 50%; top: calc(118px + env(safe-area-inset-top, 0px)); transform: translateX(-50%); width: min(560px, calc(100% - 32px)); display: grid; gap: 6px; justify-items: center; pointer-events: none; }
.banner { position: relative; box-sizing: border-box; width: 100%; display: grid; gap: 3px; justify-items: center; text-align: center; padding: 12px 18px; border-radius: 14px; background: rgba(6, 24, 32, 0.84); border: 1px solid var(--line); pointer-events: none; }
.banner b { font: 800 clamp(15px, 2.4vw, 20px)/1.2 var(--f-display); letter-spacing: 0.01em; text-wrap: balance; }
.banner span { font: 500 13px/1.35 var(--f-body); color: var(--muted); text-wrap: balance; }
.banner.boss { border-color: rgba(224, 72, 43, 0.7); background: rgba(52, 14, 10, 0.86); }
.banner.boss b { color: #FFB29C; }
.banner.win b { color: var(--gold); }
.banner.sea b { color: #B8F0FF; }
.banner.show { animation: dropIn 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.2); }
/* короткие строки сверху: мелкие события (ревью 28.09.2026) — не больше трёх, гаснут сами */
.toasts { display: grid; gap: 4px; justify-items: center; max-width: 100%; }
.toast { margin: 0; display: inline-flex; align-items: center; gap: 6px; max-width: 100%; box-sizing: border-box; padding: 4px 12px; border-radius: 999px; background: rgba(6, 24, 32, 0.8); border: 1px solid var(--line); font: 600 12.5px/1.3 var(--f-body); color: var(--text); animation: rise 0.25s ease-out; transition: opacity 0.45s; }
.toast span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toast canvas { flex: none; }
.toast.out { opacity: 0; }
.toast.win { color: #FFE08A; }
.toast.boss { color: #FFB29C; }
.toast.sea { color: #B8F0FF; }
/* одна строка цели под часами */
.goal { margin: 0; font: 700 12px/1.3 var(--f-body); color: #E6F1F3; text-align: center; text-shadow: 0 1px 6px rgba(0, 0, 0, 0.75), 0 0 2px rgba(0, 0, 0, 0.9); text-wrap: balance; }
.goal:empty { display: none; }
.goal.hot { color: #FFD08A; }
/* «Лавка» у борта приёмки: окно приёмки по запросу */
.btn-shop { position: absolute; left: 50%; bottom: calc(70px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); display: inline-flex; align-items: center; gap: 8px; padding: 9px 18px; border-radius: 999px; border: 2px solid rgba(255, 224, 138, 0.8); background: rgba(224, 72, 43, 0.92); box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35); cursor: pointer; font: 800 15px/1 var(--f-display); color: #FFFFFF; }
.btn-shop kbd { font: 700 11px/1 var(--f-mono); padding: 2px 5px; border-radius: 4px; background: rgba(0, 0, 0, 0.3); color: #FFE08A; }
.btn-shop:active { transform: translateX(-50%) scale(0.96); }

/* ---------- окна ---------- */
.modal { position: absolute; inset: 0; z-index: 5; overflow-y: auto; background: rgba(3, 14, 20, 0.58); display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; padding: calc(16px + env(safe-area-inset-top, 0px)) 16px calc(16px + env(safe-area-inset-bottom, 0px)); }
.sheet { box-sizing: border-box; width: min(820px, 100%); background: linear-gradient(180deg, var(--ink2), var(--ink)); border: 1px solid var(--line); border-radius: 18px; padding: 22px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5); animation: rise 0.22s ease-out; }
.sheet.base { width: min(1100px, 100%); }
.sheet.start { width: min(720px, 100%); }
.sh-head { display: grid; gap: 4px; margin-bottom: 16px; }
.eyebrow { margin: 0; font: 700 11px/1.2 var(--f-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--buoy2); }
.pbadge { display: inline-block; margin-right: 8px; padding: 2px 8px; border-radius: 99px; background: var(--pc, var(--buoy)); color: #1B0E05; font: 800 10.5px/1.4 var(--f-mono); letter-spacing: 0.06em; }
.sh-head h2 { margin: 0; font: 800 clamp(22px, 3.6vw, 32px)/1.1 var(--f-display); text-wrap: balance; }
.sub { margin: 0; color: var(--muted); font-size: 13.5px; }
.sh-foot { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; margin-top: 18px; }
.primary, .ghost { border-radius: 10px; padding: 10px 18px; font-weight: 700; cursor: pointer; border: 1px solid transparent; }
.primary { background: var(--buoy); color: #1B0E05; border-color: #FFB27A; }
.primary:hover { background: var(--buoy2); }
.primary.big { padding: 13px 26px; font: 800 15px/1 var(--f-display); letter-spacing: 0.02em; }
.ghost { background: transparent; border-color: var(--line); color: var(--text); }
.ghost:hover:not(:disabled) { background: var(--ink3); }
.ghost:disabled, .primary:disabled { opacity: 0.45; cursor: default; }
.muted { color: var(--muted); font-size: 13px; margin: 8px 0 0; }

/* карточки уровня */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.cards.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card { position: relative; display: grid; justify-items: center; align-content: start; gap: 6px; text-align: center; padding: 18px 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--ink); cursor: pointer; transition: transform 0.12s, border-color 0.12s, background 0.12s; }
.card:hover, .card:focus-visible { transform: translateY(-3px); border-color: var(--buoy2); background: var(--ink3); }
.card .k { position: absolute; left: 10px; top: 8px; font: 700 11px/1 var(--f-mono); color: var(--muted); }
.card .nm { font: 800 15px/1.2 var(--f-display); letter-spacing: 0.01em; text-wrap: balance; }
.card .st { font: 600 11px/1 var(--f-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--gold); }
.card .tx { font-size: 13px; line-height: 1.4; color: var(--muted); text-wrap: pretty; }
.card .tag { position: absolute; right: 10px; top: 8px; padding: 2px 7px; border-radius: 99px; background: rgba(232, 116, 42, 0.18); color: var(--buoy2); font: 700 10px/1.4 var(--f-mono); letter-spacing: 0.06em; text-transform: uppercase; }
.card canvas { border-radius: 50%; }
.card canvas.shp { border-radius: 10px; }
.card.epic { border-color: var(--gold); background: linear-gradient(180deg, rgba(231, 183, 60, 0.16), var(--ink)); box-shadow: 0 0 24px rgba(231, 183, 60, 0.18); }
.card .tag.gold { background: rgba(231, 183, 60, 0.2); color: var(--gold); }
.card .tag.nat { background: rgba(141, 187, 90, 0.18); color: var(--kelp); }
.card.cat { border-color: rgba(143, 227, 242, 0.6); }

/* сундук */
.loot-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.loot-list li { display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--ink); border: 1px solid var(--line); }
.loot-list b { display: block; font-weight: 800; }
.loot-list small { display: block; color: var(--muted); font-size: 12.5px; }
.loot-list li.bp { border-color: rgba(231, 183, 60, 0.5); }
.loot-list li.evo { border-color: var(--gold); background: linear-gradient(180deg, rgba(231, 183, 60, 0.14), var(--ink)); }
.loot-list li.cat { border-color: rgba(143, 227, 242, 0.6); }
.bp-mark { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--gold); color: #1E262B; font: 800 18px/1 var(--f-display); }
.sheet.chest .sh-head h2 { color: var(--gold); }

/* приёмка */
.base-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.2fr) minmax(0, 1.2fr); gap: 14px; align-items: start; }
.base-grid h3 { margin: 0 0 10px; font: 800 15px/1.2 var(--f-display); letter-spacing: 0.02em; }
.base-grid h4 { margin: 14px 0 8px; font: 700 11px/1 var(--f-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.receipt { position: relative; background: var(--paper); color: var(--paper-ink); border-radius: 4px; padding: 16px 16px 66px; box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35); transform: rotate(-0.8deg); font-family: var(--f-mono); overflow: hidden; }
.receipt::after { content: ''; position: absolute; left: 0; right: 0; bottom: -6px; height: 12px; background: radial-gradient(circle at 6px 0, transparent 6px, var(--paper) 6.5px) 0 0 / 12px 12px repeat-x; transform: rotate(180deg); }
.r-org { margin: 0; font: 700 10.5px/1.3 var(--f-mono); letter-spacing: 0.06em; text-transform: uppercase; color: #6B6556; }
.receipt h3 { font: 800 16px/1.2 var(--f-mono); letter-spacing: 0; margin: 4px 0 10px; color: var(--paper-ink); }
.receipt dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 10px; margin: 0; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.receipt dt { color: #6B6556; }
.receipt dd { margin: 0; text-align: right; font-weight: 800; border-bottom: 1px dashed var(--paper-line); padding-bottom: 3px; }
.stamp { position: absolute; right: 14px; bottom: 16px; padding: 4px 10px; border: 3px solid var(--stamp); border-radius: 6px; color: var(--stamp); font: 900 15px/1 var(--f-display); letter-spacing: 0.08em; text-transform: uppercase; transform: rotate(-12deg); opacity: 0.82; }
.r-note { margin: 12px 0 0; font-size: 12px; color: #6B6556; }
.shop ul, .yard ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.shop li { display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; column-gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; background: var(--ink); border: 1px solid var(--line); }
.shop li:has(canvas) { grid-template-columns: 30px 1fr auto; }
.shop li canvas { grid-row: 1 / 3; }
.shop li .nm { font-weight: 700; font-size: 13px; }
.shop li .tx { grid-column: 1 / 2; font-size: 12px; color: var(--muted); }
.shop li:has(canvas) .tx { grid-column: 2 / 3; }
.shop li button { grid-row: 1 / 3; grid-column: -2 / -1; border-radius: 8px; padding: 7px 10px; border: 1px solid rgba(231, 183, 60, 0.55); background: rgba(231, 183, 60, 0.12); color: var(--gold); font: 700 12px/1 var(--f-mono); cursor: pointer; white-space: nowrap; }
.shop li button:hover:not(:disabled) { background: rgba(231, 183, 60, 0.24); }
/* мастерство флота на корабле X (ревью 28.09.2026) */
/* коллекция на причале и реплика друга на итогах (ADR 0024) */
.col-grid { list-style: none; margin: 0 0 10px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.cc { display: flex; align-items: center; gap: 8px; padding: 6px 9px; border-radius: 9px; background: var(--ink); border: 1px solid var(--line); min-height: 34px; }
.cc b { display: block; font: 700 12.5px/1.25 var(--f-body); }
.cc small { display: block; font: 500 11px/1.3 var(--f-body); color: var(--muted); }
.cc.off { opacity: 0.55; border-style: dashed; }
.cc.off canvas { filter: grayscale(1) brightness(0.7); }
.cc.boss:not(.off), .cc.union:not(.off), .cc.evo:not(.off) { border-color: rgba(231, 183, 60, 0.6); }
.col-st summary { font: 700 13px/1.3 var(--f-body); }
.talk { margin: 8px 0 0; padding: 8px 12px; border-left: 3px solid var(--buoy2); background: rgba(255, 154, 82, 0.08); border-radius: 0 8px 8px 0; font: 500 13.5px/1.4 var(--f-body); }
.talk b { color: var(--buoy2); }
.colnew { margin: 6px 0 0; font: 600 12.5px/1.3 var(--f-body); color: #8FE3F2; }
.fstar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 8px 0; padding: 10px 12px; border-radius: 10px; border: 1px solid rgba(231, 183, 60, 0.45); background: rgba(231, 183, 60, 0.08); }
.fstar p { margin: 0; display: grid; gap: 3px; }
.fstar b { display: flex; align-items: center; gap: 8px; font: 800 14px/1.2 var(--f-display); }
.fstar span { font: 500 12.5px/1.3 var(--f-body); color: var(--muted); }
.fstar b .stars { font-size: 13px; color: var(--gold); }
.fstar button { flex: none; border-radius: 8px; padding: 8px 12px; border: 1px solid rgba(231, 183, 60, 0.55); background: rgba(231, 183, 60, 0.14); color: var(--gold); font: 700 12.5px/1 var(--f-mono); cursor: pointer; white-space: nowrap; }
.fstar button:hover:not(:disabled) { background: rgba(231, 183, 60, 0.26); }
.fstar button:disabled { opacity: 0.45; cursor: default; }
.shop li button:disabled { opacity: 0.4; cursor: default; }
.shop li.muted { display: block; }
.shop.mods { margin-top: 14px; }
.shop li .ok { grid-row: 1 / 3; grid-column: -2 / -1; padding: 7px 4px; font: 700 12px/1 var(--f-mono); color: var(--kelp); }
.classes { display: grid; gap: 8px; }
.cls { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto auto; column-gap: 10px; row-gap: 2px; text-align: left; padding: 8px; border-radius: 12px; border: 1px solid var(--line); background: var(--ink); cursor: pointer; }
.cls canvas { grid-row: 1 / 4; border-radius: 8px; align-self: center; }
.cls .nm { font: 800 13px/1.25 var(--f-display); }
.cls .tx { font-size: 12px; color: var(--muted); line-height: 1.35; }
.cls .price { font: 800 13px/1.2 var(--f-mono); color: var(--gold); }
.cls:hover:not(:disabled) { border-color: var(--buoy2); background: var(--ink3); }
.cls:disabled { opacity: 0.55; cursor: default; }
.classes.one .cls { grid-template-columns: 1fr; }
.classes.grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.classes.grid .cls { grid-template-columns: 1fr; }
.classes.grid .cls canvas { grid-row: auto; justify-self: start; }
.classes.one .cls canvas { grid-row: auto; justify-self: center; max-width: 100%; }
.bp-line { margin: 0 0 8px; color: var(--gold); font-weight: 700; font-size: 13px; }

/* снаряжение */
.sheet.gear { width: min(1100px, 100%); }
.gear-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.gear-grid h3 { margin: 0 0 10px; font: 800 15px/1.2 var(--f-display); letter-spacing: 0.02em; }
.gear-grid ul + h3 { margin-top: 16px; }
.gear-grid .tx { margin: 0 0 8px; font-size: 13px; color: #DCE8EB; }
.gear-grid .sub { margin: -4px 0 10px; font-size: 12.5px; }
.gear-grid canvas { border-radius: 50%; }
.glines, .gpas, .gunions, .gmods { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.gl { display: grid; grid-template-columns: 40px 1fr; gap: 10px; padding: 10px; border-radius: 12px; background: var(--ink); border: 1px solid var(--line); }
.gl.union { border-color: var(--gold); }
.gl .nm { margin: 0 0 5px; font-weight: 800; }
.gl .nm em { margin-left: 6px; font: 700 10px/1 var(--f-mono); font-style: normal; letter-spacing: 0.06em; text-transform: uppercase; color: var(--gold); }
.gl .tx { margin: 0; font-size: 12.5px; }
.gl .tx.dim { margin-top: 4px; color: var(--muted); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; }
.steps li { display: grid; grid-template-columns: 14px 1fr; gap: 6px; font-size: 12px; line-height: 1.35; color: var(--muted); opacity: 0.55; }
.steps li.on { color: #DCE8EB; opacity: 1; }
.steps b { font: 700 11px/1.35 var(--f-mono); color: var(--gold); }
.steps li.evo { color: #FFE9A6; }
.gl.evo { border-color: var(--gold); }
.ptabs { margin-top: 8px; }
.ptabs button[aria-pressed="true"] { background: var(--pc, var(--buoy)); border-color: var(--pc, var(--buoy2)); }
.gpas li, .gunions li { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; background: var(--ink); border: 1px solid var(--line); }
.gpas b, .gunions b { display: block; font-size: 13px; }
.gpas small, .gunions small { display: block; font-size: 12px; line-height: 1.35; color: var(--muted); }
.gpas li.off, .gunions li.off, .gmods li.off { opacity: 0.45; }
.gunions li.ready { border-color: var(--buoy2); }
.gunions li.done { border-color: var(--gold); background: linear-gradient(180deg, rgba(231, 183, 60, 0.12), var(--ink)); }
.gmods li { font-size: 12.5px; color: #DCE8EB; }
.gl .nm small { margin-left: 4px; font: 600 11.5px/1 var(--f-body); color: var(--muted); }
.gl .lv { display: flex; align-items: center; gap: 8px; margin: 0 0 3px; }
.gl .lv .pips { margin: 0; }
.gl .lv .stars { font-size: 12px; }
.gl .nx { margin: 0; font-size: 12px; line-height: 1.35; color: var(--muted); }
.gl .nx.on { color: #FFE9A6; }
details.more { margin-top: 5px; }
details.more > summary { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; list-style: none; font: 700 10.5px/1.6 var(--f-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--buoy2); }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::before { content: '▸'; transition: transform 0.15s; }
details.more[open] > summary::before { transform: rotate(90deg); }
details.more > summary:focus-visible { outline: 2px solid var(--buoy2); outline-offset: 2px; border-radius: 4px; }
details.more > .steps, details.more > .gunions { margin-top: 6px; }
.gfree { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 10px 0 0; }
.gfree > span { flex-basis: 100%; font: 700 10.5px/1.2 var(--f-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.gfree canvas { opacity: 0.55; filter: grayscale(0.5); }
.gfree.bps canvas { opacity: 1; filter: none; }
.gfree.bps canvas.off { opacity: 0.3; filter: grayscale(1); }
.gfree.bps { margin-top: 14px; }
.gchips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.gchips li { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 4px; border-radius: 99px; background: var(--ink); border: 1px solid var(--line); font-size: 12.5px; }
.gnote { margin: 0; font-size: 12.5px; }
.gship { margin: -2px 0 14px; font-size: 13px; color: #DCE8EB; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.gship b { font-weight: 800; color: var(--text); }
.gship em { font-style: normal; color: var(--gold); font-weight: 700; }
.gship .ghost.small { margin-left: auto; }
.gunions small.st { color: var(--buoy2); font-weight: 700; }

/* причал */
.sheet.hub { width: min(1100px, 100%); }
.hub-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.tabs button { padding: 8px 14px; border-radius: 10px; border: 1px solid var(--line); background: transparent; cursor: pointer; font-weight: 700; font-size: 13.5px; }
.tabs button:hover { background: var(--ink3); }
.tabs button[aria-pressed="true"] { background: var(--buoy); color: #1B0E05; border-color: var(--buoy2); }
.prem-bal { margin: 0; font-size: 13.5px; color: var(--muted); }
.prem-bal b { font: 800 18px/1 var(--f-mono); color: var(--gold); margin-left: 4px; }
.hub-body h3 { margin: 16px 0 10px; font: 800 15px/1.2 var(--f-display); }
.hub-body h3:first-child { margin-top: 0; }
.hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(156px, 1fr)); gap: 10px; }
.hub-grid.ships { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.hc { display: grid; justify-items: center; align-content: start; gap: 5px; text-align: center; padding: 12px 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--ink); cursor: pointer; }
.hc:hover:not(:disabled) { border-color: var(--buoy2); background: var(--ink3); }
.hc:disabled { cursor: default; opacity: 0.55; }
.hc.sel { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold) inset; opacity: 1; }
.hc canvas { border-radius: 50%; }
.hc.ship canvas { border-radius: 8px; }
.hc .nm { font: 800 14px/1.2 var(--f-display); }
.hc .tx { font-size: 12.5px; line-height: 1.35; color: #DCE8EB; }
.hc .bio { font-size: 12px; line-height: 1.35; color: var(--muted); }
.hc .pr { font: 700 12px/1.3 var(--f-mono); color: var(--gold); }
.hc.sel .pr { color: var(--kelp); }
.hc .pips i { width: 9px; height: 9px; }
.hc .pips { gap: 3px; }
.seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.seg button { display: grid; gap: 2px; text-align: left; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--ink); cursor: pointer; }
.seg button b { font: 800 14px/1.2 var(--f-display); }
.seg button small { font-size: 12px; color: var(--muted); line-height: 1.35; }
.seg button:hover { background: var(--ink3); }
.seg button[aria-pressed="true"] { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold) inset; }
.cls-card { cursor: default; }
.cls-card .ghost.small { margin-top: 6px; }
.styles { display: grid; gap: 6px; width: 100%; margin-top: 4px; }
.sty { display: grid; gap: 1px; text-align: left; padding: 7px 9px; border-radius: 9px; border: 1px solid var(--line); cursor: pointer; }
.sty b { font-size: 12.5px; }
.sty small { font-size: 11.5px; line-height: 1.3; color: var(--muted); }
.sty:hover, .sty:focus-visible { background: var(--ink3); outline: none; }
.sty[aria-pressed="true"] { border-color: var(--kelp); background: rgba(141, 187, 90, 0.12); }
.kpi { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.kpi li { display: grid; grid-template-columns: 22px 1fr auto; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 10px; background: var(--ink); border: 1px solid var(--line); }
.kpi li b { display: block; font-size: 13.5px; }
.kpi li small { display: block; font-size: 12px; color: var(--muted); }
.kpi .ok { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line); font-weight: 800; color: #1B0E05; }
.kpi li.done { border-color: rgba(141, 187, 90, 0.6); }
.kpi li.done .ok { background: var(--kelp); border-color: var(--kelp); }
.kpi .pr { font: 700 12.5px/1 var(--f-mono); color: var(--gold); }

/* дерево флота */
.sheet.tree { width: min(1180px, 100%); }
.ghost.small { padding: 6px 12px; font-size: 12.5px; margin-top: 10px; }
.tree-wrap { overflow-x: auto; padding-bottom: 6px; }
.tree { display: grid; gap: 10px; min-width: 1060px; }
.trow { display: grid; grid-template-columns: 96px repeat(10, minmax(0, 1fr)); gap: 6px; align-items: stretch; }
.trow.cls > .tn:nth-child(2) { grid-column: 5; }
.trow .tl { align-self: center; font: 700 11px/1.2 var(--f-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.trow.other { opacity: 0.45; }
.tn { position: relative; display: grid; justify-items: center; gap: 2px; padding: 6px 4px 7px; border-radius: 10px; background: var(--ink); border: 1px solid var(--line); text-align: center; }
.tn canvas { border-radius: 6px; max-width: 100%; }
.tn b { font: 800 11px/1.2 var(--f-mono); color: var(--gold); }
.tn .nm { font-size: 11px; font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; hyphens: auto; }
.tn .pr { font: 600 10.5px/1.2 var(--f-mono); color: var(--muted); }
.tn.done { opacity: 0.6; }
.tn.cur { border-color: var(--buoy2); box-shadow: 0 0 0 1px var(--buoy2) inset; }
.tn.cur .pr { color: var(--buoy2); }
.tn.next { border-color: rgba(231, 183, 60, 0.7); }
.tn.next .pr { color: var(--gold); }
.tn + .tn::before { content: '→'; position: absolute; left: -9px; top: 22px; font-size: 11px; color: var(--muted); }
.trow.cls > .tn:nth-child(2)::before { content: '↳'; left: -12px; }

/* карта */
.sheet.map { width: auto; max-width: 100%; }
.map-cv { display: block; margin: 0 auto; border-radius: 12px; box-shadow: 0 0 0 1px var(--line); max-width: 100%; touch-action: none; cursor: grab; }
.map-cv:active { cursor: grabbing; }
/* карта: масштаб и список точек */
.map-grid { display: grid; gap: 14px; justify-content: center; }
.map-box { position: relative; justify-self: center; max-width: 100%; }
.map-zoom { position: absolute; top: 8px; right: 8px; display: grid; gap: 6px; }
.map-zoom button { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: rgba(6, 26, 36, 0.84); color: var(--text); font: 800 18px/1 var(--f-mono); cursor: pointer; }
.map-zoom button:hover { background: var(--ink3); }
.map-side h3 { margin: 0 0 8px; font: 800 15px/1.2 var(--f-display); }
.poi-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.poi-row { width: 100%; display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; gap: 10px; align-items: start; text-align: left; padding: 8px 10px; border-radius: 10px; background: var(--ink); border: 1px solid var(--line); color: inherit; font: inherit; cursor: pointer; }
.poi-row:hover { border-color: rgba(143, 227, 242, 0.45); }
.poi-row .pd { width: 10px; height: 10px; margin: 4px 0 0 2px; transform: rotate(45deg); background: var(--c); box-shadow: 0 0 0 1.5px #0A2029; }
.poi-row b { display: block; font-size: 13.5px; }
.poi-row em { display: block; font-style: normal; font-size: 12px; font-weight: 700; color: var(--gold); }
.poi-row small { display: block; margin-top: 2px; font-size: 12px; line-height: 1.35; color: var(--muted); }
.poi-row .dist { font: 700 12px/1.3 var(--f-mono); color: var(--muted); white-space: nowrap; }
.poi-row.done { opacity: 0.55; }
@media (min-width: 900px) {
  .map-grid { grid-template-columns: auto 330px; align-items: start; }
  .poi-list { max-height: min(540px, 62vh); overflow-y: auto; padding-right: 4px; }
}
.legend { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; margin: 12px 0 0; padding: 0; font-size: 12.5px; color: var(--muted); }
.legend li { display: flex; align-items: center; gap: 6px; }
.lg { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }
.lg.you { background: #FFFFFF; border-radius: 0; clip-path: polygon(0 0, 100% 50%, 0 100%); }
.lg.base { background: var(--buoy); box-shadow: 0 0 0 2px #FFFFFF inset; }
.lg.chest { background: var(--gold); border-radius: 2px; }
.lg.boss { background: var(--red); border-radius: 1px; transform: rotate(45deg) scale(0.85); }
.lg.pick { width: 6px; height: 6px; background: #F4F8F8; }
.lg.trophy { width: 14px; height: 8px; background: var(--gold); box-shadow: 0 0 0 1.5px #1E262B inset; }
.lg.poi { width: 10px; height: 10px; border-radius: 1px; background: #FFE9A6; transform: rotate(45deg) scale(0.8); }
.lg.view { width: 14px; height: 9px; border-radius: 1px; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.6) inset; }

/* старт, пауза, итоги */
.title { display: grid; gap: 6px; margin-bottom: 12px; }
.title h1 { margin: 0; font: 900 clamp(26px, 5.4vw, 46px)/1.02 var(--f-display); letter-spacing: -0.01em; text-wrap: balance; background: linear-gradient(180deg, #FFFFFF 0%, #CDEFF6 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.title .ru { margin: 0; font: 600 14px/1.3 var(--f-mono); color: var(--gold); letter-spacing: 0.02em; }
.lead { margin: 0 0 14px; max-width: 62ch; font-size: 15px; line-height: 1.55; color: #DCE8EB; }
.keys { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.keys-d, .snd-d { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--line); }
.keys-d > .keys { margin-top: 8px; }
.snd-d > .snd { margin-top: 8px; padding-top: 0; border-top: 0; }
/* водоёмы на причале */
.hub-grid.stages { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.hc.stage { justify-items: start; text-align: left; gap: 5px; }
.hc.stage canvas { width: 100% !important; height: auto !important; aspect-ratio: 168 / 58; border-radius: 8px; }
.hc.stage .chips { display: flex; flex-wrap: wrap; gap: 4px; }
.hc.stage .chips i { font: 700 10.5px/1.5 var(--f-mono); font-style: normal; padding: 0 6px; border-radius: 99px; background: var(--ink3); color: #DCE8EB; }
.hc.stage .boss-l { font-size: 12px; color: #FFB29C; font-weight: 700; }
.hc.stage .rec { font: 600 11.5px/1.4 var(--f-mono); color: #DCE8EB; }
.hc.stage .rec b { color: var(--gold); }
.hc.stage .rec.dim { color: var(--muted); font-family: var(--f-body); font-weight: 500; }
.hc.stage.locked { opacity: 0.55; }
.hc.stage.locked canvas { filter: grayscale(0.85) brightness(0.7); }
.opened { display: grid; gap: 2px; margin: 10px 0 0; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--gold); background: rgba(231, 183, 60, 0.1); }
.opened b { color: var(--gold); font-size: 15px; }
.opened span { font-size: 13px; color: #DCE8EB; }
.newrec { margin: 8px 0 0; font-weight: 700; color: var(--buoy2); }
.st-rec { margin: 0 0 10px; padding: 8px 12px; border-radius: 10px; background: var(--ink); border: 1px solid var(--line); }
.st-rec dt { font: 700 10.5px/1.4 var(--f-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.st-rec dd { margin: 2px 0 0; font-size: 13px; }
.pstat { list-style: none; margin: 0 0 4px; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.pstat li { display: grid; gap: 2px; padding: 9px 12px; border-radius: 10px; background: var(--ink); border: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.pstat b { font: 800 16px/1.2 var(--f-mono); color: var(--text); }
.keys li { display: grid; grid-template-columns: 96px 1fr; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 13.5px; }
.keys b { font: 700 11px/1.6 var(--f-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--buoy2); }
.keys span { color: #DCE8EB; }
.steer { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.steer span { font: 700 11px/1.2 var(--f-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-right: 6px; }
.steer button { padding: 7px 12px; border-radius: 8px; border: 1px solid var(--line); background: transparent; cursor: pointer; font-weight: 700; font-size: 13px; }
.steer button:hover { background: var(--ink3); }
.steer button[aria-pressed="true"] { background: var(--buoy); color: #1B0E05; border-color: var(--buoy2); }
.over-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 18px; }
.stats, .prem dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; font-variant-numeric: tabular-nums; }
.stats dt, .prem dt { color: var(--muted); }
.stats dd, .prem dd { margin: 0; text-align: right; font: 700 13px/1.45 var(--f-mono); }
.prem { background: var(--ink); border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.prem h3 { margin: 0 0 10px; font: 800 15px/1.2 var(--f-display); }
.prem .total { margin: 12px 0 0; font: 900 34px/1 var(--f-display); color: var(--gold); }
.prem .total small { font: 600 13px/1 var(--f-body); color: var(--muted); }
.sheet.over .sh-head h2 { color: var(--gold); }
.noms { margin-top: 14px; }
.noms h3 { margin: 0 0 8px; font: 800 15px/1.2 var(--f-display); }
.noms ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.noms li { display: grid; gap: 1px; padding: 8px 10px; border-radius: 10px; background: var(--ink); border: 1px solid var(--line); border-left: 4px solid var(--pc, var(--gold)); }
.noms b { font-size: 13px; }
.noms span { font: 600 12px/1.3 var(--f-mono); color: var(--muted); }

/* ---------- отладка ---------- */
.debug { position: absolute; z-index: 8; left: calc(12px + env(safe-area-inset-left, 0px)); bottom: calc(66px + env(safe-area-inset-bottom, 0px)); width: min(330px, calc(100% - 24px)); background: rgba(6, 20, 26, 0.94); border: 1px solid rgba(232, 116, 42, 0.5); border-radius: 12px; padding: 10px 12px 12px; font-size: 12px; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45); }
.debug header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.debug header b { font: 800 12px/1 var(--f-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--buoy2); }
.debug header button { width: 26px; height: 26px; border-radius: 6px; border: 1px solid var(--line); background: transparent; cursor: pointer; font-size: 16px; line-height: 1; }
.dbg-info { margin: 0 0 8px; font: 500 11px/1.35 var(--f-mono); color: var(--muted); }
.dbg-row { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin-top: 5px; }   /* на телефоне кнопки переносятся, а не уходят за край */
.dbg-row > span { flex: 0 0 72px; }
.dbg-row span { font: 700 10.5px/1 var(--f-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.dbg-row button { padding: 5px 7px; border-radius: 6px; border: 1px solid var(--line); background: var(--ink2); cursor: pointer; font: 600 11.5px/1 var(--f-body); white-space: nowrap; }
.dbg-row button:hover { background: var(--ink3); }
.dbg-row button.on { background: var(--buoy); color: #1B0E05; border-color: var(--buoy2); }

/* ---------- анимации ---------- */
@keyframes blink { 50% { opacity: 0.35; } }
@keyframes drop { from { transform: translate(-50%, -14px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }
@keyframes dropIn { from { transform: translateY(-14px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes rise { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .banner.show, .sheet, .toast { animation: none; }
  .card { transition: none; }
}

/* ---------- узкие экраны ---------- */
@media (max-width: 900px) {
  .base-grid { grid-template-columns: 1fr 1fr; }
  .gear-grid { grid-template-columns: 1fr 1fr; }
  .gear-grid section:first-child { grid-column: 1 / -1; }
  .receipt { grid-column: 1 / -1; transform: none; }
}
@media (max-width: 640px) {
  .panel { box-sizing: border-box; }
  .hud-l { left: calc(6px + env(safe-area-inset-left, 0px)); top: calc(24px + env(safe-area-inset-top, 0px)); width: min(214px, calc(100vw - 150px)); }
  .hud-r { right: calc(8px + env(safe-area-inset-right, 0px)); top: calc(23px + env(safe-area-inset-top, 0px)); }
  .money { font-size: 16px; }
  .hud-c { left: auto; right: calc(8px + env(safe-area-inset-right, 0px)); transform: none; top: calc(44px + env(safe-area-inset-top, 0px)); width: min(150px, 38vw); justify-items: end; gap: 3px; }
  .clock b { font-size: 20px; }
  .sea-chip { font-size: 10.5px; white-space: normal; text-align: right; }
  .buffs { text-align: right; }
  .slots { gap: 2px; }
  .slot { width: calc((min(214px, 100vw - 150px) - 10px) / var(--n, 6)); height: 33px; border-radius: 6px; }
  .slot canvas { width: 20px !important; height: 20px !important; }
  .pas { gap: 3px; max-width: min(214px, calc(100vw - 150px)); }
  .pips { gap: 1px; }
  .pips i { width: 3px; height: 3px; }
  .card .pips, .gear-grid .pips, .loot-list .pips { gap: 3px; }
  .card .pips i, .loot-list .pips i, .gear-grid .pips i { width: 8px; height: 8px; }
  .pi, .pi canvas { width: 19px !important; height: 19px !important; }
  .btn-dyn { width: 64px; height: 64px; right: calc(12px + env(safe-area-inset-right, 0px)); bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
  .btn-round.pause, .btn-round.dbg, .btn-round.map, .btn-round.music, .btn-round.sfxb, .btn-round.viewb, .btn-round.mark { bottom: calc(12px + env(safe-area-inset-bottom, 0px)); width: 36px; height: 36px; }   /* кнопки у нижнего края, в ряд до кнопки динамита */
  .btn-round.dbg { left: calc(8px + env(safe-area-inset-left, 0px)); }
  .btn-round.pause { left: calc(50px + env(safe-area-inset-left, 0px)); }
  .btn-round.map { left: calc(92px + env(safe-area-inset-left, 0px)); }
  .btn-round.music { left: calc(134px + env(safe-area-inset-left, 0px)); }
  .btn-round.sfxb { left: calc(176px + env(safe-area-inset-left, 0px)); }
  .btn-round.viewb { left: calc(218px + env(safe-area-inset-left, 0px)); }
  .btn-round.mark { left: calc(260px + env(safe-area-inset-left, 0px)); }
  .hud:not(.coop) .btn-round.mark { display: none; }
  .hud.net .btn-round.mark { display: grid; place-items: center; }      /* по сети метка нужна товарищам */
  .hud.coop .hud-l { width: calc(50vw - 12px); }
  .hud-l.p2 { right: calc(6px + env(safe-area-inset-right, 0px)); }
  .hud.coop .hud-c { top: auto; bottom: calc(62px + env(safe-area-inset-bottom, 0px)); left: calc(10px + env(safe-area-inset-left, 0px)); right: auto; transform: none; justify-items: start; width: auto; }
  .hud.coop .pp .gear-mini { display: none; }      /* вдвоём на телефоне — только главное; снаряжение в паузе */
  .hud.coop .pp { gap: 4px; }
  .ptag span { display: none; }
  .seg { grid-template-columns: 1fr; }
  .hub-grid.stages { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 74%; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; }   /* водоёмы — лентой, листаются пальцем */
  .hub-grid.stages .hc { scroll-snap-align: start; }
  .classes.grid { grid-template-columns: 1fr; }
  .notes { top: calc(134px + env(safe-area-inset-top, 0px)); width: calc(100% - 24px); gap: 4px; }   /* под приборами, выше корабля (ревью 28.09.2026: было 206 px и во всю ширину) */
  .banner { padding: 7px 12px; border-radius: 12px; gap: 2px; }
  .banner b { font-size: 15px; }
  .banner span { font-size: 11.5px; }
  .toast { font-size: 11.5px; padding: 3px 10px; }
  .goal { font-size: 10.5px; text-align: right; }
  .btn-shop { bottom: calc(60px + env(safe-area-inset-bottom, 0px)); padding: 8px 16px; font-size: 14px; }
  .btn-shop kbd { display: none; }
  .cards, .cards.two { grid-template-columns: 1fr; }
  .card { grid-template-columns: 56px 1fr; justify-items: start; text-align: left; column-gap: 12px; padding: 12px 12px 12px 14px; }
  .card canvas { grid-row: 1 / 6; }
  .card .k { display: none; }
  .base-grid, .over-grid, .gear-grid { grid-template-columns: 1fr; }
  .keys li { grid-template-columns: 1fr; gap: 2px; }
  .sheet { padding: 18px 16px; }
}

/* сундук как в Vampire Survivors: закрыт → дробь и барабан → находки по одной */
.chest-stage { position: relative; height: 172px; display: grid; place-items: center; margin: 4px 0 6px; overflow: hidden; }
.chest-svg { position: relative; z-index: 1; width: 176px; height: 143px; }
.chest-svg .ch-shadow { fill: rgba(0, 0, 0, 0.35); }
.chest-svg .ch-body { fill: var(--cw, #8A5A34); stroke: #3B2414; stroke-width: 2; }
.chest-svg .ch-rim { fill: rgba(0, 0, 0, 0.25); }
.chest-svg .ch-band { fill: var(--cb, #E7B73C); }
.chest-svg .ch-bandl { stroke: var(--cb, #E7B73C); stroke-width: 10; fill: none; }
.chest-svg .ch-lock { fill: var(--cb, #E7B73C); stroke: #3B2414; stroke-width: 2; }
.chest-svg .ch-hole { fill: #3B2414; }
.chest-svg.gold { --cw: #B8861F; --cb: #FFE08A; }
.chest-svg.wreck { --cw: #45594C; --cb: #8FD3E6; }
.chest-svg.camp { --cw: #6B4A3A; --cb: #B9C0C4; }
.chest-svg .ch-lid { transform-box: view-box; transform-origin: 80px 60px; transition: transform 0.35s cubic-bezier(0.3, 1.5, 0.5, 1); }
.chest-stage.open .chest-svg { animation: chestShake 0.45s ease-in-out 2; }
.chest-stage.open .ch-lid { transform: translateY(-16px) rotate(-14deg); }
.rays { position: absolute; width: 300px; height: 300px; border-radius: 50%; opacity: 0; transition: opacity 0.4s;
  background: repeating-conic-gradient(from 0deg, rgba(255, 224, 138, 0.42) 0deg 10deg, rgba(255, 224, 138, 0) 10deg 30deg);
  -webkit-mask: radial-gradient(circle, #000 20%, transparent 68%); mask: radial-gradient(circle, #000 20%, transparent 68%); }
.chest-stage.open .rays { opacity: 1; animation: chestSpin 7s linear infinite; }
.chest-stage.done .rays { opacity: 0.45; }
.reel { position: absolute; z-index: 2; top: 6px; width: 76px; height: 76px; border-radius: 14px; background: rgba(6, 24, 32, 0.92); border: 2px solid var(--gold); overflow: hidden; box-shadow: 0 0 26px rgba(231, 183, 60, 0.55); }
.reel .strip { display: flex; flex-direction: column; align-items: center; gap: 16px; padding-top: 6px; }
.reel .strip canvas { width: 60px; height: 60px; flex: none; }
.chest-count { text-align: center; margin: 0 0 8px; min-height: 16px; font: 700 12px/1.3 var(--f-mono); letter-spacing: 0.04em; color: var(--muted); }
.loot-list li.pop { animation: chestPop 0.36s cubic-bezier(0.3, 1.6, 0.5, 1); }
@keyframes reel { to { transform: translateY(calc(var(--n) * -76px)); } }
@keyframes chestShake { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-4deg); } 75% { transform: rotate(4deg); } }
@keyframes chestSpin { to { transform: rotate(360deg); } }
@keyframes chestPop { from { transform: scale(0.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .chest-stage.open .chest-svg, .chest-stage.open .rays, .loot-list li.pop { animation: none; } }

/* мастерство: звёзды сверх 5-й ступени */
.stars { display: inline-block; font: 700 13px/1 var(--f-body); letter-spacing: 1px; color: var(--gold); }
.stars i { font-style: normal; color: var(--buoy2); }
.stars u { text-decoration: none; color: var(--muted); opacity: 0.6; }

/* окна: кнопка внизу всегда на виду — футер прилипает к низу экрана, если окно длиннее */
.sheet .sh-foot { position: sticky; bottom: 0; z-index: 3; padding: 14px 0 4px; background: linear-gradient(180deg, rgba(10, 32, 41, 0), var(--ink) 32%); }
.base-left { display: grid; gap: 14px; align-content: start; }
.base-items h4 { margin-top: 0; }

/* удача: четвёртый вариант на уровне */
.cards.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card.lucky { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold) inset, 0 0 18px rgba(231, 183, 60, 0.3); }
.luck-tag { position: absolute; left: 50%; top: -9px; transform: translateX(-50%); padding: 1px 8px; border-radius: 99px; background: var(--gold); color: #1E262B; font: 800 10px/1.5 var(--f-mono); letter-spacing: 0.08em; text-transform: uppercase; }
@media (max-width: 900px) { .cards.four { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- сетевой кооп (ADR 0022): комната на причале, лента «море ждёт», окна гостя ---------- */
.netbox { margin: 14px 0 4px; padding: 14px 16px; border-radius: 14px; border: 1px solid rgba(111, 211, 245, 0.35); background: rgba(16, 48, 59, 0.7); }
.netbox h3 { margin: 0 0 10px !important; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.netbox h3 small { font: 500 12.5px/1.3 var(--f-body); color: var(--muted); }
.netbox code { font-family: var(--f-mono); font-size: 12.5px; padding: 1px 5px; border-radius: 4px; background: var(--ink); }
.net-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: 8px; }
.net-f { display: flex; align-items: center; gap: 10px; }
.net-f span, .net-or { font-size: 13px; color: var(--muted); }
.netbox input[type="text"] { box-sizing: border-box; height: 38px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--ink); color: var(--text); font: 600 15px/1 var(--f-body); }
.netbox input[type="text"]:focus-visible { outline: 2px solid var(--buoy2); outline-offset: 1px; }
.netbox #netName { width: 170px; }
.net-code-in { width: 96px; text-transform: uppercase; letter-spacing: 0.22em; font-family: var(--f-mono) !important; text-align: center; }
.net-code { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 0; }
.net-code b { font: 800 30px/1 var(--f-mono); letter-spacing: 0.18em; color: var(--gold); }
.net-code small { font-size: 13px; color: var(--muted); }
.net-link { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 10px 0 0; font-size: 13px; color: var(--muted); }
.net-link code { font-size: 13px !important; color: var(--text); user-select: all; -webkit-user-select: all; overflow-wrap: anywhere; }
.net-list { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; padding: 0; }
.net-list li { display: grid; gap: 1px; padding: 7px 12px 7px 10px; border-radius: 10px; background: var(--ink); border-left: 4px solid var(--pc); }
.net-list b { font: 800 13.5px/1.2 var(--f-display); }
.net-list small { font-size: 11.5px; color: var(--muted); }
.net-note { margin: 10px 0 0; font-size: 13px; color: #FFB29C; }
.net-pause { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; margin: 12px 0 0; font-size: 13px; }
.net-pause b { font: 800 16px/1 var(--f-mono); letter-spacing: 0.14em; color: var(--gold); }
.net-pause i { font-style: normal; font-weight: 700; padding: 2px 8px; border-radius: 8px; background: var(--ink); border-left: 3px solid var(--pc); }
.net-pause small { color: var(--muted); }
.net-wait { position: absolute; left: 50%; bottom: calc(84px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 6; max-width: calc(100% - 32px); margin: 0; padding: 7px 14px; border-radius: 999px; background: rgba(6, 24, 32, 0.88); border: 1px solid rgba(231, 183, 60, 0.55); font: 700 13px/1.3 var(--f-body); color: #FFE08A; text-align: center; pointer-events: none; }
.net-wait-over { margin: 0 auto 0 0; align-self: center; }
.sheet.net-busy { cursor: progress; }
.sheet.net-busy button { pointer-events: none; }
@media (max-width: 640px) {
  .netbox { padding: 12px; }
  .netbox #netName { width: 150px; }
  .net-wait { bottom: calc(66px + env(safe-area-inset-bottom, 0px)); font-size: 12px; }
}

/* ---------- руль пальцем: круг над правым нижним углом, динамит — в углу под ним (плейтест 27.09) ---------- */
@media (pointer: coarse) {
  .hud.stick-zone:not(.stick-left) .btn-dyn { width: 50px; height: 50px; border-width: 2px; right: calc(10px + env(safe-area-inset-right, 0px)); bottom: calc(10px + env(safe-area-inset-bottom, 0px)); }
  .hud.stick-zone:not(.stick-left) .btn-dyn span { font-size: 10px; }
  .hud.stick-zone:not(.stick-left) .btn-dyn b { font-size: 15px; }
}

/* Испытания (ADR 0026): карточки на причале, строка правила под часами, итог на экране итогов */
.hub-grid.chals { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.hc.chal { justify-items: start; text-align: left; gap: 5px; grid-template-columns: 40px 1fr; align-items: start; }
.hc.chal canvas { grid-row: span 4; }
.hc.chal .nm, .hc.chal .tx, .hc.chal .rw, .hc.chal .rec { grid-column: 2; }
.hc.chal .rw { font-size: 12px; color: #FFD08A; font-weight: 600; line-height: 1.35; }
.hc.chal .rec { font: 600 11.5px/1.4 var(--f-mono); color: #DCE8EB; }
.hc.chal .rec b { color: var(--gold); }
.hc.chal.locked { opacity: 0.55; }
.hc.chal.locked canvas { filter: grayscale(0.85) brightness(0.7); }
.chal-pick { margin: 10px 0 0; font-size: 13px; line-height: 1.45; color: #DCE8EB; }
.chal-pick b { color: #FFD08A; }
.chal-pick button { margin-left: 6px; vertical-align: middle; }
.chal-line { margin: 2px 0 0; font: 700 11.5px/1.3 var(--f-body); color: #FFD08A; text-align: center; text-shadow: 0 1px 6px rgba(0, 0, 0, 0.75), 0 0 2px rgba(0, 0, 0, 0.9); }
.chal-res { display: grid; gap: 2px; margin: 10px 0 0; padding: 10px 14px; border-radius: 12px; border: 1px solid rgba(255, 178, 156, 0.6); background: rgba(255, 154, 82, 0.08); }
.chal-res b { color: #FFB29C; font-size: 15px; }
.chal-res.ok { border-color: var(--gold); background: rgba(231, 183, 60, 0.1); }
.chal-res.ok b { color: var(--gold); }
.chal-res span { font-size: 13px; color: #DCE8EB; }

/* Угроза (ADR 0027): мало корпуса — красная кромка по краю экрана; пульс — если вспышки не выключены */
.low-hull { position: fixed; inset: 0; pointer-events: none; z-index: 3; box-shadow: inset 0 0 90px 24px rgba(214, 38, 26, 0.5); }
.low-hull.pulse { animation: lowhull 1s ease-in-out infinite; }
@keyframes lowhull { 0%, 100% { opacity: 0.55; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .low-hull.pulse { animation: none; } }
/* Почему не вышло — на итогах поражения */
.why { margin: 10px 0 4px; padding: 10px 12px; border-radius: 10px; background: rgba(214, 38, 26, 0.12); border: 1px solid rgba(255, 120, 100, 0.35); }
.why h3 { margin: 0 0 4px; font-size: 14px; color: #FFB29C; }
.why p { margin: 2px 0; }
.why .tip { margin-top: 6px; color: #CFF6FF; }
