/* Шрифты лежат рядом с игрой (webapp/fonts, Inter и Oswald — свободная лицензия SIL OFL), а не на Google:
   из России Google Fonts бывает медленным или недоступен, а внешняя ссылка задерживала первый показ. */
@font-face { font-family: Inter; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(fonts/inter-cyrillic.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: Inter; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(fonts/inter-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Oswald; font-style: normal; font-weight: 500 600; font-display: swap;
  src: url(fonts/oswald-cyrillic.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: Oswald; font-style: normal; font-weight: 500 600; font-display: swap;
  src: url(fonts/oswald-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
:root {
  --bg: #0C171C; --surface: #13232A; --surface2: #101D22; --line: #26414B; --line2: #1E343C;
  --text: #E7EEF0; --muted: #93A9B0; --soft: #C9D6DA;
  --accent: #E9A43B; --accent-ink: #1A1206; --gold: #F5C46E;
  --water: #45B5C2; --water-soft: #7FD3DD; --green: #62C784; --green-soft: #8FE0A6; --red: #F0646A;
  --head: Oswald, "Arial Narrow", sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: Inter, system-ui, sans-serif; }
body { min-height: 100vh; }
button { font-family: inherit; color: inherit; cursor: pointer; }
button:disabled { opacity: 0.55; cursor: default; }
.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.loading, .fatal { padding: 48px 24px; text-align: center; color: var(--muted); font-size: 15px; line-height: 1.5; }
.fatal b { display: block; color: var(--text); font-family: var(--head); font-size: 24px; margin-bottom: 8px; }

/* ---------- общий экран: текст и кнопки, как в чате */
.screen { max-width: 520px; margin: 0 auto; padding: 14px 16px 24px; display: flex; flex-direction: column; gap: 12px; }
.text { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px; font-size: 15px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.buttons { display: flex; flex-direction: column; gap: 8px; }
.row { display: flex; gap: 8px; }
.row > .btn { flex: 1; }
.btn { min-height: 48px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface2); font-size: 15px; text-align: left; line-height: 1.3; }
.row > .btn { text-align: center; }
.btn.pager { text-align: center; color: var(--water-soft); font-size: 14px; }
.btn.back { background: transparent; border-color: var(--line2); color: var(--muted); }
.btn:active:not(:disabled) { transform: scale(0.98); background: var(--surface); }

/* ---------- сообщение после действия */
.msg { background: var(--surface2); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; font-size: 14px; line-height: 1.45; white-space: pre-wrap; color: var(--soft); }
.text a, .msg a { color: var(--accent); overflow-wrap: anywhere; }
#toast.ok { background: #1A2A22; border-color: #2F5A3F; color: var(--green-soft); }
#toast { position: fixed; left: 16px; right: 16px; bottom: 20px; background: #3A1E22; border: 1px solid var(--red); color: #FFD9DB; border-radius: 12px; padding: 12px 14px; font-size: 14px; z-index: 10; }

/* ---------- Сваи */
.hub { max-width: 520px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; }
.hero { position: relative; height: 290px; flex-shrink: 0; background: #1B2E38 center 40% / cover no-repeat; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(12,23,28,.7) 0%, rgba(12,23,28,0) 32%, rgba(12,23,28,0) 62%, var(--bg) 100%); }
.hero-top { position: absolute; z-index: 1; left: 0; right: 0; top: 0; padding: 16px; display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.title { font-family: var(--head); font-weight: 600; font-size: 30px; letter-spacing: 2px; line-height: 1; }
.subtitle { font-size: 12px; color: var(--soft); margin-top: 4px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; max-width: 62%; }
.chip { display: flex; align-items: center; gap: 6px; background: rgba(12,23,28,.82); border: 1px solid var(--line); border-radius: 999px; padding: 6px 10px; font-weight: 600; font-size: 14px; }
.chip .ic { width: 18px; height: 18px; }
.chip.coins { color: var(--gold); } .chip.hp { color: var(--green-soft); } .chip.hp.low { color: var(--red); }
.body { flex: 1; display: flex; flex-direction: column; gap: 12px; padding: 0 16px 20px; margin-top: -34px; position: relative; z-index: 1; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.label { font-size: 11px; color: var(--muted); font-weight: 600; letter-spacing: 1px; text-transform: uppercase; }
.h { font-family: var(--head); font-size: 19px; margin-top: 4px; }
.districts { display: flex; gap: 10px; }
.district { flex: 1; padding: 12px; }
.district.open { border-color: #2F5A3F; } .district.open .label { color: var(--green-soft); }
.district.closed { background: var(--surface2); border-color: #22363E; } .district.closed .h { color: var(--muted); }
.note { font-size: 12px; color: var(--muted); margin-top: 2px; }
.bars { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.bar-row { display: grid; grid-template-columns: minmax(84px, auto) 1fr 48px; align-items: center; gap: 10px; font-size: 13px; }
.bar { height: 6px; background: var(--bg); border-radius: 3px; overflow: hidden; }
.bar > i { display: block; height: 6px; background: var(--accent); border-radius: 3px; }
.bar-row .n { text-align: right; color: var(--muted); }
.bar-row.done .n { color: var(--green-soft); } .bar-row.done .bar > i { background: var(--green); }
.order { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.order .badge { width: 40px; height: 40px; border-radius: 10px; background: #2A1F12; display: flex; align-items: center; justify-content: center; font-size: 20px; }
.order .what { flex: 1; } .order .what .n { font-size: 12px; color: var(--muted); } .order .what b { display: block; font-size: 15px; margin-top: 2px; }
.order .reward { font-weight: 700; color: var(--gold); }
.order.ready { border-color: #2F5A3F; } .order.done { opacity: .6; }
.warn { border-color: var(--red); color: #FFD9DB; font-size: 14px; }
.wounds { display: flex; flex-direction: column; gap: 8px; }
.wounds .label { color: #FF9AA0; }
.wound-row b { display: block; font-size: 15px; color: var(--text, #fff); }
.wound-row .note { color: #FFD9DB; opacity: .8; }
.wounds .btn { border-color: var(--red); color: var(--text, #fff); }
.links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.link { min-height: 44px; border-radius: 12px; border: 1px solid var(--line2); background: var(--surface2); color: var(--soft); font-size: 13px; }
.go { margin-top: auto; display: flex; align-items: center; justify-content: center; gap: 10px; height: 60px; border-radius: 16px; background: var(--accent); color: var(--accent-ink); border: 0; font-family: var(--head); font-size: 24px; letter-spacing: 2px; }
.go .ic { width: 24px; height: 24px; stroke-width: 2.2; }
.go-note { text-align: center; font-size: 12px; color: var(--muted); margin-top: -4px; }
.nav { position: sticky; bottom: 0; z-index: 5; display: flex; justify-content: space-around; border-top: 1px solid var(--line2); background: #0F1D22; padding: 6px 4px calc(10px + env(safe-area-inset-bottom)); }
.tab { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11px; color: var(--muted); background: none; border: 0; padding: 6px 0; min-width: 64px; min-height: 48px; }
.district { position: relative; overflow: hidden; padding: 0; min-height: 96px; }
.district-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .45; }
.district.closed .district-img { opacity: .2; filter: grayscale(.8); }
.district-txt { position: relative; padding: 12px; background: linear-gradient(0deg, rgba(12,23,28,.85), rgba(12,23,28,.35)); height: 100%; }
.links .ic { width: 16px; height: 16px; vertical-align: -3px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.h { font-family: var(--head); font-size: 20px; }
.section { font-size: 11px; color: var(--muted); font-weight: 600; letter-spacing: 1px; text-transform: uppercase; margin-top: 4px; }
.page { max-width: 520px; margin: 0 auto; min-height: 100vh; }
.banner { position: relative; height: 190px; overflow: hidden; background: var(--surface2); }
.banner-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(12,23,28,0) 45%, var(--bg) 100%); }
.banner-title { position: absolute; z-index: 1; left: 16px; bottom: 10px; font-family: var(--head); font-size: 26px; }
.bar.fillbar > i { background: var(--water); }
.go.small { height: 52px; font-size: 18px; letter-spacing: 1px; width: 100%; }

/* ---------- рейд */
.raid { max-width: 520px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; }
.rhead { position: sticky; top: 0; z-index: 6; background: #0F1D22; border-bottom: 1px solid var(--line2); padding: 10px 14px 8px; }
.rhead-top { display: flex; justify-content: space-between; align-items: center; }
.rtime { display: flex; align-items: baseline; gap: 8px; }
.rtime b { font-family: var(--head); font-size: 26px; line-height: 1; font-weight: 500; }
.water { font-size: 13px; font-weight: 600; color: var(--water-soft); } .water.dry { color: var(--green-soft); }
.rstats { display: flex; gap: 10px; font-size: 13px; font-weight: 600; color: var(--soft); }
.stat { display: flex; align-items: center; gap: 4px; } .stat .ic { width: 15px; height: 15px; }
.stat.hp { color: var(--green-soft); } .stat.hp.low { color: var(--red); } .stat.ammo { color: var(--gold); }
.tide { margin-top: 8px; padding-bottom: 14px; }
.tide-line { position: relative; }
.tide-fill { height: 6px; background: #1E3A42; } .tide-fill > i { background: var(--accent); height: 6px; }
.tick { position: absolute; top: 8px; transform: translateX(-50%); font-size: 10px; color: var(--muted); }
.tick:last-child { transform: translateX(-100%); color: #F0868B; } .tick.past { color: var(--water-soft); }
.rnext { font-size: 12px; color: var(--water-soft); }
.scene { position: relative; height: 200px; overflow: hidden; background: var(--surface2); flex-shrink: 0; }
.scene-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.scene.wet::before { content: ""; position: absolute; inset: 0; background: rgba(40,110,130,.18); z-index: 1; }
.scene-cap { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; padding: 28px 14px 10px; background: linear-gradient(0deg, var(--bg) 8%, rgba(12,23,28,0)); }
.scene-name { font-family: var(--head); font-size: 24px; }
.rbody { flex: 1; display: flex; flex-direction: column; gap: 8px; padding: 6px 14px 16px; }
.log { display: flex; gap: 10px; background: var(--surface2); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; font-size: 14px; line-height: 1.45; }
.log-img { width: 72px; height: 54px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.log-text { white-space: pre-wrap; color: var(--soft); min-width: 0; overflow-wrap: anywhere; }
.drawer { background: #2A2312; border: 1px solid #B98A2E; border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.drawer .label { color: #E9C47A; }
.exit-line { font-size: 13px; color: var(--soft); line-height: 1.4; }
.act { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 54px; padding: 8px 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); text-align: left; }
.act-ic { width: 34px; height: 34px; border-radius: 10px; background: #2A1F12; color: var(--accent); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.act.move .act-ic { background: #12292E; color: var(--water-soft); }
.act-mid { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.act-name { font-size: 15px; } .act-marks { font-size: 12px; color: var(--muted); }
.act-min { font-size: 13px; color: var(--muted); white-space: nowrap; }
.moves { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.moves .act { padding: 8px 10px; gap: 8px; } .moves .act-ic { width: 28px; height: 28px; }
.done-line { font-size: 12px; color: var(--muted); }
.spot { display: flex; flex-direction: column; gap: 8px; }
.spot-img { width: 100%; height: 140px; object-fit: cover; border-radius: 10px; }
.spot-text { font-size: 14px; }
.log-text.clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.log.folded { position: relative; cursor: pointer; }
.log.folded::after { content: "ещё ▾"; position: absolute; right: 10px; bottom: 6px; font-size: 11px; color: var(--accent); background: var(--surface2); padding-left: 6px; }
.rbar { position: sticky; bottom: 0; z-index: 5; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); border-top: 1px solid var(--line2); background: #0F1D22; padding: 4px 2px calc(8px + env(safe-area-inset-bottom)); }
.rtab { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; background: none; border: 0; color: var(--muted); font-size: 10px; min-height: 48px; padding: 4px 0; }
.rtab .ic { width: 19px; height: 19px; }
.rtab .dot, .tab .dot { position: absolute; top: 0; right: 6px; min-width: 16px; height: 16px; border-radius: 8px; background: var(--accent); color: var(--accent-ink); font-size: 10px; font-weight: 700; line-height: 16px; padding: 0 4px; }

/* ---------- бой */
.fight { max-width: 520px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; }
.fight.hurt { animation: shake .35s; }
.fight.hurt::after { content: ""; position: fixed; inset: 0; background: rgba(240,100,106,.25); pointer-events: none; animation: flash .5s forwards; }
@keyframes shake { 0%,100% { transform: none; } 25% { transform: translateX(-6px); } 50% { transform: translateX(5px); } 75% { transform: translateX(-3px); } }
@keyframes flash { to { opacity: 0; } }
.fhead { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; background: #1C1214; border-bottom: 1px solid #3A2226; font-size: 13px; color: var(--soft); }
.ftitle { font-family: var(--head); font-size: 20px; letter-spacing: 2px; color: #F0868B; }
.ftitle.calm { color: var(--gold); }
.arena { position: relative; padding: 12px; min-height: 260px; overflow: hidden; }
.arena-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: brightness(.35) saturate(.7); }
.enemies { position: relative; display: flex; gap: 10px; justify-content: center; align-items: flex-end; }
.enemy { position: relative; display: flex; flex-direction: column; gap: 6px; align-items: center; }
.enemy.front { flex: 0 0 56%; } .enemy.back { flex: 1 1 0; min-width: 0; opacity: .85; }
.enemy.solo { width: 62%; margin: 0 auto; }
.enemy-pic { position: relative; width: 100%; aspect-ratio: 4 / 5; border-radius: 14px; overflow: hidden; border: 1px solid #2A3A40; background: #1A2428; }
.enemy.front .enemy-pic { border: 2px solid var(--accent); }
.enemy-img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; display: block; }
.enemy-pic.hit { animation: shake .3s; }
.dmg { position: absolute; right: 8px; top: 6px; font-family: var(--head); font-size: 28px; color: var(--gold); text-shadow: 0 2px 6px #000; animation: rise 1.2s forwards; }
@keyframes rise { from { transform: translateY(8px); opacity: 1; } to { transform: translateY(-14px); opacity: 0; } }
.intent { background: #5A1E24; border: 1px solid var(--red); color: #FFD9DB; border-radius: 999px; padding: 4px 10px; font-size: 13px; font-weight: 600; text-align: center; }
.enemy-info { width: 100%; }
.enemy-name { display: flex; justify-content: space-between; font-size: 13px; gap: 6px; min-width: 0; } .enemy-name span { color: var(--muted); }
.enemy-name b, .enemy-name span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.enemy.back .enemy-name { flex-direction: column; gap: 0; font-size: 12px; }   /* узкая карточка: имя над здоровьем */
.more-pic { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; }
.more-n { font-family: var(--head); font-size: 34px; color: #F0868B; } .more-who { font-size: 18px; text-align: center; padding: 0 4px; }
.enemy-name.center { justify-content: center; font-weight: 600; text-align: center; }
.hpbar { background: #2A1416; } .hpbar > i { background: var(--red); }
.finfo { padding: 8px 14px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; border-bottom: 1px solid var(--line2); }
.flog { color: var(--gold); white-space: pre-wrap; } .threat { color: #FFB4B8; font-weight: 600; }
.mebar { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 8px 14px; font-size: 12px; }
.mecell-top { display: flex; justify-content: space-between; color: var(--muted); margin-bottom: 4px; }
.mecell-top b { color: var(--text); }
.bar.hpme > i { background: var(--green); } .bar.armor > i { background: var(--water); } .bar.ammo > i { background: var(--accent); }
.factions { flex: 1; display: flex; flex-direction: column; gap: 8px; padding: 4px 14px 18px; justify-content: flex-end; }
.frow { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; }
.fbtn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 60px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); font-size: 13px; padding: 6px 4px; }
.fbtn b { font-family: var(--head); font-weight: 500; font-size: 20px; line-height: 1.1; }
.frow.atk .fbtn:first-child { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.frow.util .fbtn { min-height: 46px; background: var(--surface2); }
.frow.env .fbtn b { font-size: 15px; }

/* ---------- карта */
.map { width: 100%; height: auto; background: var(--surface2); border: 1px solid var(--line); border-radius: 14px; }
.map .edge { stroke: #3B5560; stroke-width: 3; } .map .edge.roof { stroke-dasharray: 6 6; stroke: #7FD3DD; stroke-width: 2; }
.map .edge.faint { opacity: .35; }
.map .node circle { fill: var(--surface); stroke: #4C7280; stroke-width: 2; }
.map .node text { fill: var(--soft); font-size: 14px; font-family: Inter, sans-serif; }
.map .node .mk { font-size: 14px; } .map .node .cnt { fill: var(--muted); font-size: 11px; }
.map .node.here circle { fill: var(--accent); stroke: var(--gold); } .map .node.here .cnt { fill: var(--accent-ink); }
.map .node.here text:not(.cnt):not(.mk) { fill: var(--gold); font-weight: 700; }
.map .node.flooded circle { fill: #1F5866; stroke: var(--water); }
.map .node.unknown circle { stroke-dasharray: 3 3; fill: transparent; } .map .node.unknown text { fill: var(--muted); }

/* ---------- стеш */
.stash-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 14px; }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.tile { position: relative; aspect-ratio: 1; border-radius: 10px; border: 1px solid var(--line); background: #15252B; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 4px; overflow: hidden; }
.tile.wide { grid-column: span 2; aspect-ratio: auto; }
.tile-emoji { font-size: 26px; line-height: 1; } .tile-name { font-size: 10px; color: var(--soft); text-align: center; line-height: 1.15; max-height: 2.3em; overflow: hidden; }
.tile-qty { position: absolute; right: 5px; top: 3px; font-size: 12px; font-weight: 700; }
.tile-pin { position: absolute; left: 4px; top: 2px; font-size: 11px; }
.tile-ins { position: absolute; left: 4px; bottom: 8px; font-size: 11px; } /* 🛡 застрахована у Лодочника */
.tile .dur { position: absolute; left: 6px; right: 6px; bottom: 4px; height: 3px; } .tile .dur > i { height: 3px; background: var(--green); }
.tile .dur.worn > i { background: var(--accent); }
.t-green { border-color: #3E7A50; background: #13291D; } .t-blue { border-color: #3A68A8; background: #14223A; }
.t-purple { border-color: #7D57B8; background: #22183A; } .t-gold { border-color: #B98A2E; background: #2A2312; }

.tile-icon { width: 70%; height: 62%; object-fit: contain; filter: drop-shadow(0 3px 4px rgba(0,0,0,.5)); }
.tile.wide .tile-icon { height: 70px; }
.badge-icon { width: 34px; height: 34px; object-fit: contain; }
.order .badge .tile-emoji { font-size: 20px; }

/* ---------- списки вещей (покупка, продажа, рюкзак, подбор) */
.irows { display: flex; flex-direction: column; gap: 8px; }
.irow { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; padding: 8px 12px 8px 8px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); text-align: left; }
.irow.locked { opacity: .5; }
.irow.focus { border-width: 2px; min-height: 88px; }
.irow-pic { position: relative; width: 52px; height: 52px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; border-radius: 10px; background: rgba(12,23,28,.5); }
.irow-pic .tile-emoji { font-size: 26px; }
.irow-icon { width: 46px; height: 46px; object-fit: contain; filter: drop-shadow(0 2px 3px rgba(0,0,0,.5)); }
.irow-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.irow-name { font-size: 15px; } .irow-sub { font-size: 12px; color: var(--muted); }
.irow-mid .bar { height: 4px; max-width: 140px; } .irow-mid .bar > i { height: 4px; background: var(--green); } .irow-mid .bar.worn > i { background: var(--accent); }
/* цвет ценности и в списках (рюкзак в рейде, на полу, продажа): .irow выше задаёт фон и рамку — перекрываем */
.irow.t-green { border-color: #3E7A50; background: #13291D; } .irow.t-blue { border-color: #3A68A8; background: #14223A; }
.irow.t-purple { border-color: #7D57B8; background: #22183A; } .irow.t-gold { border-color: #B98A2E; background: #2A2312; }
.irow.t-green, .irow.t-blue, .irow.t-purple, .irow.t-gold { border-left-width: 4px; }
.irow-price { display: flex; align-items: center; gap: 4px; color: var(--gold); font-weight: 700; white-space: nowrap; }
.irow-price .ic { width: 15px; height: 15px; }
.qcard { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); text-align: left; }
.qcard-img { width: 64px; height: 64px; object-fit: cover; object-position: center 25%; border-radius: 10px; flex-shrink: 0; }
.qcard.qready { border-color: #2F5A3F; background: #13291D; } .qcard.qdone, .qcard.qclosed { opacity: .55; }
.found { display: flex; flex-direction: column; gap: 6px; }
.found-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.tile.pop { opacity: 0; animation: pop .45s ease-out forwards; }
@keyframes pop { 0% { opacity: 0; transform: scale(.6) translateY(10px); } 70% { opacity: 1; transform: scale(1.06); } 100% { opacity: 1; transform: none; } }

/* ---------- карточки с картинками (торговцы, верстаки) */
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.pcard { position: relative; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); padding: 0; aspect-ratio: 4 / 3.4; text-align: left; }
.pcard-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.pcard.dim .pcard-img { filter: grayscale(.85) brightness(.55); }
.pcard-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 10px 8px; background: linear-gradient(0deg, rgba(12,23,28,.95), rgba(12,23,28,0)); display: flex; flex-direction: column; }
.pcard-cap b { font-family: var(--head); font-size: 17px; font-weight: 500; } .pcard-cap span { font-size: 11px; color: var(--soft); }

/* ---------- итог рейда */
.result { max-width: 520px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; }
.result-img { width: 100%; height: 52vh; object-fit: cover; display: block; }
.result-body { flex: 1; margin-top: -40px; position: relative; padding: 0 16px 20px; display: flex; flex-direction: column; gap: 12px; }
.result-title { font-family: var(--head); font-size: 40px; letter-spacing: 2px; text-shadow: 0 2px 10px #000; }
.result.escaped .result-title { color: var(--green-soft); } .result.died .result-title { color: var(--red); }
.result-text { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px; font-size: 14px; line-height: 1.5; white-space: pre-wrap; }

/* ---------- 🎁 посылка Лодочника на Сваях */
.card.parcel { text-align: left; display: flex; flex-direction: column; gap: 10px; border-color: var(--accent); background: linear-gradient(135deg, #2A1F12, var(--surface)); color: inherit; font: inherit; width: 100%; }
.parcel-head { display: flex; align-items: center; gap: 12px; }
.parcel-head > div { flex: 1; }
.parcel-gift { font-size: 30px; line-height: 1; animation: parcel-bob 2.4s ease-in-out infinite; }
.parcel-open { color: var(--accent); font-weight: 700; font-size: 13px; white-space: nowrap; }
.parcel-items { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.parcel-item { position: relative; width: 44px; height: 44px; border-radius: 10px; border-width: 1px; border-style: solid; display: flex; align-items: center; justify-content: center; }
:where(.parcel-item) { border-color: var(--line); background: var(--surface2); }   /* цвет ценности (.t-…) — поверх */
.parcel-item .tile-emoji { font-size: 22px; }
@keyframes parcel-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .parcel-gift { animation: none; } }

/* ---------- оформление «минимализм»: свои векторные иконки (design/mobile/mini/icons), плитки плоские */
body.mini .tile, body.mini .irow { background: var(--surface); }
body.mini .t-green { border-color: #3E7A50; } body.mini .t-blue { border-color: #3A68A8; }
body.mini .t-purple { border-color: #7D57B8; } body.mini .t-gold { border-color: #B98A2E; }
body.mini .scene-img, body.mini .banner-img, body.mini .pcard-img, body.mini .result-img, body.mini .district-img { background: var(--surface2); }

/* ---------- ошибка */
.bug-text { width: 100%; background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 12px; padding: 12px; font: inherit; font-size: 15px; resize: vertical; }
.tab .dot { position: absolute; top: 2px; right: 12px; min-width: 16px; height: 16px; border-radius: 8px; background: var(--green); color: #0C1A10; font-size: 10px; font-weight: 700; line-height: 16px; padding: 0 4px; }

/* «Что мне нужно»: группы по местам, вещи — плашками */
.bar-sub { font-size: 12px; color: var(--muted); margin-top: -4px; }
.ngroup { display: flex; flex-direction: column; gap: 10px; padding: 12px 14px; }
.ngroup.done { opacity: .7; } .ngroup.done .label { color: var(--green-soft); }
.nrow { display: flex; flex-direction: column; gap: 5px; }
.nrow + .nrow { border-top: 1px solid var(--line2); padding-top: 9px; }
.nrow-h { font-size: 13px; font-weight: 600; color: var(--soft); }
.nrow.here .nrow-h { color: var(--accent); }
.nchips { display: flex; flex-wrap: wrap; gap: 6px; }
.nchip { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 3px 10px 3px 4px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface2); font-size: 13px; line-height: 1.2; }
.nchip-icon { width: 24px; height: 24px; object-fit: contain; }
.nchip .tile-emoji { font-size: 16px; width: 24px; text-align: center; }
.why-row { font-size: 13px; color: var(--soft); margin-top: 6px; line-height: 1.35; }
.fatal .go { margin: 20px auto 0; width: 100%; max-width: 280px; }

/* «На полу»: что будет по нажатию — прямо на строке */
.irow-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex-shrink: 0; }
.irow-act { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: #1E4A30; color: #BDEBCB; white-space: nowrap; }
.irow-act.swap { background: #4A3A14; color: #F3D58A; }
.card.hint { font-size: 13px; line-height: 1.4; color: var(--soft); border-color: #5A4A1E; background: #1E1A10; }
.chip.full { border-color: var(--accent); color: var(--accent); }
.bar.fillbar.full > i { background: var(--accent); }

/* Снаряжение и сборы: плитки */
.loadout .card { display: flex; flex-direction: column; gap: 8px; padding: 12px; }
.gears { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.gear { display: flex; align-items: center; gap: 8px; min-height: 52px; padding: 6px 8px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface2); text-align: left; color: var(--text); }
.gear.empty { border-style: dashed; background: transparent; opacity: .55; }
.gear-pic { width: 36px; height: 36px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.gear-icon { width: 36px; height: 36px; object-fit: contain; }
.gear-pic .tile-emoji { font-size: 20px; }
.gear-mid { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.gear-slot { font-size: 10px; letter-spacing: .5px; text-transform: uppercase; color: var(--muted); }
.gear-name { font-size: 13px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.gear-mid .bar { height: 3px; } .gear-mid .bar > i { height: 3px; background: var(--green); } .gear-mid .bar.worn > i { background: var(--accent); }
button.nchip { color: var(--text); }
.nchip.dim { opacity: .5; border-style: dashed; background: transparent; }
.money-line { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.money-line b { font-family: var(--head); font-size: 22px; color: var(--gold); }
.wallet-row { display: flex; flex-wrap: wrap; gap: 6px; }
.wchip { min-height: 40px; min-width: 56px; padding: 6px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface2); color: var(--text); font-size: 14px; }
.go.risky { background: #C4572F; color: #fff; }
.loadout .go { margin-top: 4px; }

/* ---------- уровень и перки */
.level-card { text-align: left; display: flex; flex-direction: column; gap: 8px; }
.level-card.has-free { border-color: var(--accent); box-shadow: 0 0 16px rgba(233,164,59,.25); }
.level-top { display: flex; align-items: baseline; gap: 10px; }
.level-n { font-family: var(--head); font-size: 22px; letter-spacing: 1px; color: var(--gold); }
.level-free { margin-left: auto; font-weight: 700; color: var(--accent); }
.bar.xp > i { background: linear-gradient(90deg, var(--accent), var(--gold)); }
.perks-title { font-family: var(--head); font-size: 28px; letter-spacing: 2px; }
.branch-card { text-align: left; display: flex; flex-direction: column; gap: 6px; border-left: 4px solid var(--c);
  background: linear-gradient(135deg, color-mix(in srgb, var(--c) 22%, var(--surface)), var(--surface)); }
.branch-head { display: flex; align-items: center; gap: 10px; }
.branch-emo { font-size: 28px; }
.branch-name { font-family: var(--head); font-size: 22px; flex: 1; }
.branch-head .n { font-weight: 700; color: var(--c); }
.branch-bar { position: relative; } .branch-bar > i { background: var(--c); }
.branch-ticks i { position: absolute; top: -2px; width: 2px; height: 10px; background: var(--muted); opacity: .6; }
.final-card { border-color: var(--gold); color: var(--gold); font-weight: 600; }
.tier { display: flex; flex-direction: column; gap: 8px; padding-top: 10px; border-top: 1px dashed var(--line); }
.tier.closed { opacity: .55; }
.tier-lab { font-family: var(--head); font-size: 15px; letter-spacing: 1px; color: var(--muted); text-transform: uppercase; }
.perk-node { display: flex; align-items: center; gap: 10px; text-align: left; background: var(--surface); border: 1px solid var(--line);
  border-left: 4px solid var(--c); border-radius: 12px; padding: 8px 10px; position: relative; }
.perk-node.done { background: color-mix(in srgb, var(--c) 18%, var(--surface)); border-color: var(--c); }
.perk-node.locked { filter: grayscale(.7); }
.perk-node.can { box-shadow: 0 0 0 1px var(--c), 0 0 14px color-mix(in srgb, var(--c) 40%, transparent); }
.perk-ic { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-size: 22px; flex-shrink: 0;
  background: color-mix(in srgb, var(--c) 28%, var(--bg)); }
.perk-tx { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.perk-tx b { font-size: 15px; } .perk-tx span { font-size: 13px; color: var(--muted); }
.perk-dots { display: flex; gap: 4px; margin-top: 4px; }
.perk-dots i { width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--c); }
.perk-dots i.on { background: var(--c); }
.perk-plus { margin-left: auto; width: 28px; height: 28px; border-radius: 50%; background: var(--c); color: var(--bg);
  font-weight: 800; display: grid; place-items: center; flex-shrink: 0; }
.fork { border: 2px dashed color-mix(in srgb, var(--c) 70%, var(--bg)); border-radius: 14px; padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.fork.fin { border-style: solid; background: color-mix(in srgb, var(--c) 10%, var(--bg)); box-shadow: 0 0 20px color-mix(in srgb, var(--c) 30%, transparent); }
.fork-lab { font-size: 12px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--c); }
.bug-link { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 14px auto 8px; min-height: 44px; padding: 0 16px; background: none; border: 0; color: var(--muted); font-size: 12px; }
.bug-link .ic { width: 15px; height: 15px; }

/* ---------- Сваи: быстрые плитки под «В рейд» и мелкие ссылки внизу (03.12) */
.quick { display: grid; gap: 8px; margin-top: 4px; }
.quick-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 68px; padding: 10px 4px; border-radius: 14px; border: 1px solid var(--line2); background: var(--surface2); color: var(--text, #fff); font-size: 12.5px; line-height: 1.2; text-align: center; }
.quick-btn .ic { width: 22px; height: 22px; color: var(--accent); }
.quick-btn:active { background: var(--surface); }
.hub-foot { display: flex; align-items: center; justify-content: center; gap: 4px; flex-wrap: wrap; margin-top: 2px; }
.foot-link { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 8px; white-space: nowrap; background: none; border: 0; color: var(--muted); font-size: 12.5px; }
.foot-link .ic { width: 15px; height: 15px; }
.foot-sep { width: 3px; height: 3px; border-radius: 50%; background: var(--line2); }

/* ---------- удобный хаб (03.12): меню по тапу на вещь, фильтр стеша, «Отплываем» всегда под пальцем */
.sheet-wrap { position: fixed; inset: 0; z-index: 20; background: rgba(4, 10, 13, .62); display: flex; align-items: flex-end; justify-content: center; animation: fade .15s ease-out; }
.sheet { width: 100%; max-width: 520px; max-height: 82vh; overflow-y: auto; background: var(--surface); border: 1px solid var(--line); border-bottom: 0; border-radius: 18px 18px 0 0; padding: 14px 16px calc(16px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 12px; animation: sheetUp .18s ease-out; }
.sheet::before { content: ""; align-self: center; width: 40px; height: 4px; border-radius: 2px; background: var(--line); }
.sheet-head { display: flex; align-items: center; gap: 12px; }
.sheet .irow-name { font-size: 16px; }
.btn.ghost { color: var(--muted); }
@keyframes sheetUp { from { transform: translateY(40px); opacity: .4; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.stash-wrap { display: flex; flex-direction: column; gap: 10px; }
.filters { display: flex; gap: 6px; overflow-x: auto; margin: 0 -16px; padding: 0 16px 2px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.filters::-webkit-scrollbar { display: none; }
.filter { flex: none; min-height: 34px; padding: 4px 12px; border-radius: 17px; border: 1px solid var(--line); background: var(--surface2); color: var(--soft); font-size: 13px; white-space: nowrap; }
.filter.on { background: var(--water); border-color: var(--water); color: #06181C; font-weight: 600; }
.card .filters { margin: 0 -14px; padding: 0 14px 2px; }
.worn-strip .nchips { flex-wrap: nowrap; overflow-x: auto; margin: 0 -14px; padding: 0 14px 2px; scrollbar-width: none; }
.worn-strip .nchips::-webkit-scrollbar { display: none; }
.worn-strip .nchip { flex: none; }
.go.sticky { position: sticky; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 5; box-shadow: 0 8px 24px rgba(0, 0, 0, .55); }
.pick-line { display: flex; gap: 6px; align-items: stretch; }
.pick-line .irow { flex: 1; min-width: 0; }
.pick-one { flex: none; width: 64px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface2); color: var(--water-soft); font-size: 13px; }
.pick-one.salv { width: 78px; padding: 4px 6px; color: var(--text); font-size: 13px; line-height: 1.35; white-space: normal; }
.floor { display: flex; flex-direction: column; gap: 8px; }
.floor .irow { min-height: 56px; }
.nchip.add { border-style: dashed; border-color: var(--water); color: var(--water-soft); padding-left: 10px; }
.gear.empty { cursor: pointer; }
/* плашки итога — сверху экрана: не закрывают ни вещи в списках, ни «Отплываем» (просьба Михаила 03.12) */
#toast { top: calc(12px + env(safe-area-inset-top)); bottom: auto; z-index: 30; pointer-events: none; }

/* ---------- верстак (03.12): плитки разделов, карточки рецептов, красная ошибка при попытке */
.msg.bad { border-color: #8A3238; background: #2A1416; color: #FFB3B6; }
.msg.good { border-color: #3E7A50; background: #13291D; color: var(--green-soft); }
.msg.shake { animation: shake .35s ease-in-out; }
.buttons.slim .btn { min-height: 40px; font-size: 14px; text-align: center; }
.blvl { position: absolute; z-index: 1; right: 16px; bottom: 16px; display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--soft); }
.blvl-off { padding: 3px 10px; border-radius: 99px; background: rgba(12,23,28,.75); border: 1px solid var(--line); color: var(--muted); }
.blvl-pips { display: flex; gap: 4px; }
.blvl-pips i { width: 16px; height: 6px; border-radius: 3px; background: rgba(255,255,255,.18); }
.blvl-pips i.on { background: var(--accent); }
.bbuild { display: flex; flex-direction: column; gap: 10px; text-align: left; width: 100%; color: inherit; font: inherit; border-color: #5A4A1E; background: linear-gradient(135deg, #2A2312, var(--surface)); }
.bbuild.ready { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.bbuild-h { display: flex; align-items: center; gap: 8px; font-family: var(--head); font-size: 19px; color: var(--gold); }
.bbuild:active { transform: scale(0.98); }
.mats { display: flex; flex-wrap: wrap; gap: 5px; }
.mat { display: inline-flex; align-items: center; gap: 3px; padding: 2px 7px 2px 3px; border-radius: 8px; background: rgba(0,0,0,.28); font-size: 12px; font-weight: 600; color: var(--soft); font-variant-numeric: tabular-nums; }
.mat.short { color: #FF8F94; background: rgba(240,100,106,.12); }
.mat-icon { width: 22px; height: 22px; object-fit: contain; }
.mat .tile-emoji { font-size: 14px; width: 22px; text-align: center; }
.bbuild .mat { font-size: 14px; padding: 3px 9px 3px 4px; } .bbuild .mat-icon { width: 28px; height: 28px; }
.sheet .mats .mat { font-size: 14px; padding: 3px 9px 3px 4px; } .sheet .mats .mat-icon { width: 28px; height: 28px; }
.salvage-all[hidden] { display: none; }
.bcats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.bcats.odd .bcat:last-child { grid-column: span 2; }
.bcat { position: relative; display: flex; align-items: center; gap: 10px; min-height: 84px; padding: 10px 12px; border-radius: 14px; text-align: left; color: inherit; font: inherit;
  border: 1px solid #3B5A66; background: linear-gradient(160deg, #1B3640, #12232A); box-shadow: 0 2px 10px rgba(0,0,0,.35); }
.bcat:active { transform: scale(0.97); }
.bcat.dim { opacity: .55; }
.bcat-icon { width: 52px; height: 52px; object-fit: contain; flex-shrink: 0; filter: drop-shadow(0 3px 4px rgba(0,0,0,.5)); }
.bcat .tile-emoji { font-size: 34px; width: 52px; text-align: center; }
.bcat-cap { display: flex; flex-direction: column; min-width: 0; }
.bcat-cap b { font-family: var(--head); font-size: 18px; font-weight: 500; line-height: 1.15; }
.bcat-cap span { font-size: 12px; color: var(--muted); }
.bcat-can { display: inline-block; margin-left: 6px; font-style: normal; padding: 0 7px; border-radius: 99px; background: #1F4A2C; color: var(--green-soft); font-size: 11px; font-weight: 700; }
.rcards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.rcard { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 8px 8px 10px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); text-align: left; color: inherit; font: inherit; }
.rcard:active { transform: scale(0.97); }
.rcard.ok { border-color: #3E7A50; box-shadow: 0 0 0 1px #3E7A50 inset; }
.rcard.locked { opacity: .5; }
.rcard.nobench { opacity: .72; }
.rcard-pic { position: relative; height: 78px; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: radial-gradient(circle at 50% 45%, rgba(255,255,255,.07), rgba(0,0,0,.15)); }
.rcard-icon { max-width: 80%; height: 66px; object-fit: contain; filter: drop-shadow(0 3px 5px rgba(0,0,0,.55)); }
.rcard-pic .tile-emoji { font-size: 40px; }
.rcard-lock { position: absolute; left: 4px; bottom: 4px; padding: 1px 6px; border-radius: 6px; background: rgba(12,23,28,.85); font-size: 11px; color: var(--soft); }
.rcard-name { font-size: 14px; font-weight: 600; line-height: 1.2; }
.rcard-stat { font-size: 12px; color: var(--muted); margin-top: -4px; }
.rcard.t-green, .rcard.t-blue, .rcard.t-purple, .rcard.t-gold { background: var(--surface); }
.rcard.t-blue .rcard-pic { background: radial-gradient(circle at 50% 45%, #22406A, #14223A); }
.rcard.t-green .rcard-pic { background: radial-gradient(circle at 50% 45%, #24503A, #13291D); }
.rcard.t-purple .rcard-pic { background: radial-gradient(circle at 50% 45%, #3E2C66, #22183A); }
.rcard.t-gold .rcard-pic { background: radial-gradient(circle at 50% 45%, #4E3E1A, #2A2312); }
body.mini .rcard-pic, body.mini .bcat { background: var(--surface2); }
.sheet-wrap.still, .sheet-wrap.still .sheet { animation: none; }
/* фильтр стеша — переносится на вторую строку, а не уезжает вбок за рамку карточки (скриншот Михаила 03.12) */
.filters, .card .filters { flex-wrap: wrap; overflow: visible; margin: 0; padding: 0; }
.filter { min-height: 32px; padding: 4px 11px; }

/* ---------- 🎰 Казич (03.12): апгрейдер с колесом и слоты */
.cz-card { display: flex; align-items: center; gap: 12px; text-align: left; border-color: #6B4A1E; background: linear-gradient(120deg, #2A1F12 0%, var(--surface) 70%); }
.cz-card-art { flex-shrink: 0; display: flex; } .cz-card-txt { flex: 1; display: flex; flex-direction: column; }
.cz-card .label { color: var(--gold); } .cz-card-go { font-size: 28px; color: var(--gold); }
.casino { --cz-gold: #F5C46E; --cz-win: #62C784; --cz-lose: #F0646A; }
.cz-top { display: flex; align-items: center; gap: 10px; padding: 14px 16px 4px; }
.cz-back { width: 38px; height: 38px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface2); font-size: 24px; line-height: 1; }
.cz-title { flex: 1; font-family: var(--head); font-size: 26px; letter-spacing: 3px; color: var(--cz-gold); text-shadow: 0 0 14px rgba(245,196,110,.35); }
.cz-lead { color: var(--soft); font-size: 14px; line-height: 1.45; }
.cz-games { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cz-game { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px 10px 14px; border-radius: 16px; border: 1px solid #6B4A1E; background: radial-gradient(circle at 50% 20%, #33260F 0%, var(--surface) 75%); text-align: center; }
.cz-game:active { transform: scale(.98); }
.cz-game-name { font-family: var(--head); font-size: 20px; letter-spacing: 1px; }
.cz-game-art { height: 86px; display: flex; align-items: center; justify-content: center; }
.cz-game-art .wheel { width: 86px; height: 86px; }
.cz-mini-reels { gap: 4px; } .cz-mini-reels span { width: 34px; height: 50px; display: flex; align-items: center; justify-content: center; font-size: 24px; background: #F4EBD6; border-radius: 8px; box-shadow: inset 0 6px 8px rgba(0,0,0,.25), inset 0 -6px 8px rgba(0,0,0,.25); }
.cz-stats { font-size: 13px; color: var(--soft); white-space: pre-wrap; line-height: 1.5; }
.cz-fine { text-align: center; white-space: pre-line; }
.cz-go { margin-top: 2px; } .cz-go .ic { width: 22px; height: 22px; }
.cz-go:disabled { background: #3A3222; color: #8F8063; }

/* колесо */
.wheel { width: 100%; height: auto; display: block; overflow: visible; }
.wheel-rim { fill: #0A1316; stroke: #6B4A1E; stroke-width: 4; }
.wheel-track { fill: none; stroke: #23353C; stroke-width: 16; }
.wheel-arc { fill: none; stroke: var(--green, #62C784); stroke-width: 16; stroke-linecap: butt; filter: drop-shadow(0 0 6px rgba(98,199,132,.55)); }
.wheel-tick { stroke: #3B5560; stroke-width: 1.5; }
.needle { transform-origin: 100px 100px; transform-box: view-box; }
.needle.spinning { transition: transform 4.2s cubic-bezier(.15,.75,.18,1); }
.needle-body { fill: var(--cz-gold, #F5C46E); filter: drop-shadow(0 2px 4px rgba(0,0,0,.6)); }
.needle-hub { fill: #2A1F12; stroke: var(--cz-gold, #F5C46E); stroke-width: 3; }
.wheel.won .wheel-arc { stroke-width: 20; animation: pulse 0.6s ease-in-out 3; }
.wheel.lost .needle-body { fill: var(--cz-lose); }
@keyframes pulse { 50% { filter: drop-shadow(0 0 16px rgba(98,199,132,1)); } }

/* апгрейдер: ставка | колесо | цель */
.up-stage { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr) minmax(0, 1fr); gap: 8px; align-items: center; }
.up-box { min-height: 150px; border-radius: 16px; border: 2px dashed #4A6670; background: var(--surface2); display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 6px; padding: 8px 6px; }
.up-box.full { border-style: solid; border-color: #6B4A1E; background: var(--surface); }
.up-box:active { transform: scale(.97); }
.up-box-label { font-size: 10.5px; letter-spacing: 1.5px; color: var(--muted); font-weight: 700; }
.up-items { flex: 1; width: 100%; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px; align-content: center; }
.up-plus { font-size: 40px; color: #4A6670; line-height: 1; width: 100%; text-align: center; }
.up-hint { font-size: 11.5px; color: var(--muted); text-align: center; width: 100%; }
.up-chip { position: relative; width: 40px; height: 40px; border-radius: 9px; border: 1px solid var(--line); background: #15252B; display: flex; align-items: center; justify-content: center; }
.up-chip.big { width: 64px; height: 64px; border-radius: 12px; } .up-chip.big .tile-emoji { font-size: 32px; }
.up-chip .tile-emoji { font-size: 20px; } .up-icon { width: 85%; height: 85%; object-fit: contain; }
.up-chip.big .up-icon { width: 88%; height: 88%; }
.up-more { font-size: 12px; color: var(--muted); }
.up-name { width: 100%; text-align: center; font-size: 12px; line-height: 1.2; overflow-wrap: anywhere; }
.up-val { width: 100%; text-align: center; font-size: 12px; color: var(--gold); font-weight: 700; }
.up-wheel { position: relative; }
.up-wheel-pct { position: absolute; left: 0; right: 0; bottom: -2px; text-align: center; font-family: var(--head); font-size: 22px; color: var(--text); text-shadow: 0 2px 6px #000; }
.up-pct { font-family: var(--head); font-size: 17px; color: var(--green-soft); } .up-pct.mid { color: var(--gold); } .up-pct.low { color: var(--red); }
.irow.picked { outline: 2px solid var(--gold); outline-offset: -2px; }
.up-result, .slot-result { display: none; }
.up-result.win, .up-result.lose, .slot-result.win, .slot-result.lose { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 16px; animation: pop .35s ease-out; }
.up-result.win, .slot-result.win { background: #13291D; border: 1px solid #3E7A50; }
.up-result.lose, .slot-result.lose { background: #2A1518; border: 1px solid #7A3A40; }
.up-result-h, .slot-result-h { font-family: var(--head); font-size: 26px; letter-spacing: 3px; text-align: center; }
.win .up-result-h, .win .slot-result-h { color: var(--green-soft); } .lose .up-result-h, .lose .slot-result-h { color: #FF9AA0; }
.up-result-t { font-size: 13.5px; line-height: 1.45; white-space: pre-wrap; color: var(--soft); text-align: center; }
.slot-result.jackpot { background: radial-gradient(circle, #4A3A14, #2A2312); border-color: var(--gold); }
.slot-result.jackpot .slot-result-h { color: var(--gold); font-size: 34px; }
.slot-prize-coins { display: flex; align-items: center; justify-content: center; gap: 6px; font-family: var(--head); font-size: 30px; color: var(--gold); }
.slot-prize-coins .ic { width: 28px; height: 28px; }
@keyframes pop { from { transform: scale(.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* слоты: автомат с тремя барабанами */
.slot-machine { position: relative; padding: 18px 14px 16px; border-radius: 22px; background: linear-gradient(180deg, #5A2A1A 0%, #3A1A10 100%); border: 3px solid #B98A2E; box-shadow: 0 10px 24px rgba(0,0,0,.5), inset 0 2px 0 rgba(255,255,255,.12); }
.slot-lights { position: absolute; left: 14px; right: 14px; top: 5px; display: flex; justify-content: space-between; }
.slot-lights i { width: 8px; height: 8px; border-radius: 50%; background: #F5C46E; box-shadow: 0 0 8px #F5C46E; animation: blink 1.2s infinite; }
.slot-lights i:nth-child(even) { animation-delay: .6s; }
@keyframes blink { 50% { opacity: .25; box-shadow: none; } }
.slot-window { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 8px; border-radius: 14px; background: #1A0D08; box-shadow: inset 0 4px 12px rgba(0,0,0,.8); }
.reel { position: relative; height: 228px; overflow: hidden; border-radius: 10px; background: linear-gradient(180deg, #CFC3A8 0%, #FBF4E2 30%, #FBF4E2 70%, #CFC3A8 100%); box-shadow: inset 0 14px 14px -8px rgba(0,0,0,.45), inset 0 -14px 14px -8px rgba(0,0,0,.45); }
.reel-strip { will-change: transform; }
.reel-cell { height: 76px; display: flex; align-items: center; justify-content: center; font-size: 42px; }
.payline { position: absolute; left: 4px; right: 4px; top: 50%; height: 0; border-top: 2px solid rgba(240,100,106,.75); pointer-events: none; }
.slot-window.lit { animation: glow .5s ease-in-out 4; }
@keyframes glow { 50% { box-shadow: inset 0 4px 12px rgba(0,0,0,.8), 0 0 22px #F5C46E; } }
.paytable summary { cursor: pointer; font-weight: 600; font-size: 14px; color: var(--soft); }
.pay-row { display: grid; grid-template-columns: 92px 1fr auto; gap: 8px; align-items: center; padding: 7px 0; border-top: 1px solid var(--line2); font-size: 13px; }
.pay-row:first-of-type { margin-top: 10px; }
.pay-combo { font-size: 17px; letter-spacing: 1px; white-space: nowrap; min-width: 0; overflow: hidden; }
.pay-any { display: block; font-size: 11px; letter-spacing: 0; color: var(--muted); }
.pay-ch { color: var(--muted); font-size: 12px; }
@media (max-width: 360px) { .reel { height: 192px; } .reel-cell { height: 64px; font-size: 34px; } .up-box { min-height: 132px; } }

/* 🗺 карта города (04.12): большие кнопки районов прямо на карте, затопленные — синие и с таймером */
.city-change { margin: 2px 0 10px; }
.city-map { position: relative; width: 100%; aspect-ratio: 2 / 3; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: var(--surface2); margin-bottom: 12px; }
.city-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.city-node { position: absolute; transform: translate(-50%, -50%); min-width: 112px; max-width: 44%; min-height: 54px; padding: 8px 12px;
  display: flex; flex-direction: column; align-items: center; gap: 2px; border-radius: 14px; border: 2px solid var(--gold);
  background: rgba(12,23,28,.82); color: var(--text); font: inherit; text-align: center; box-shadow: 0 4px 14px rgba(0,0,0,.45); cursor: pointer; }
.city-node:active { transform: translate(-50%, -50%) scale(.96); }
.city-node .city-name { font-weight: 700; font-size: 15px; line-height: 1.2; }
.city-node .city-state { font-size: 12px; color: var(--green-soft); }
.city-node.always { border-color: var(--accent); }
.city-node.flooded { border-color: var(--water); background: rgba(20,60,72,.86); cursor: default; opacity: 1; }
.city-water { position: absolute; width: 58%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(40,120,140,.62), rgba(40,120,140,.38) 60%, rgba(40,120,140,0)); }
.city-node.flooded .city-name { color: var(--soft); } .city-node.flooded .city-state { color: #9ADDE6; }
.city-card { position: relative; display: flex; align-items: stretch; gap: 0; padding: 0; overflow: hidden; width: 100%; text-align: left; margin-bottom: 8px; }
.city-card-img { width: 96px; min-height: 76px; object-fit: cover; flex-shrink: 0; }
.city-card-txt { padding: 10px 12px; } .city-card .rare { color: var(--gold); margin-top: 2px; }
.city-card.flooded { opacity: .55; } .city-card.flooded .city-card-img { filter: grayscale(.7); }
body.mini .city-img, body.mini .city-card-img { background: var(--surface2); }
/* неприметная кнопка: взятка «Чайкам» на сборах */
.quiet-link { display: block; margin: 8px 0 0 auto; padding: 2px 0; background: none; border: 0; font-size: 11px; color: var(--muted); opacity: .7; text-align: right; }
