/* Общий игровой слой экосистемы (из Terrace Wars, style.css): те же компоненты во всех играх. Правки — только в app.css. */
/* Terrace Wars — game layer on top of the design system (ds.css is loaded first; tokens live there).
   This file keeps the game's own screens (fights, match day, city…) and maps their older class names
   onto the DS look. New screens should use DS components directly — see docs/DESIGN_SYSTEM.md. */
:root {
  /* aliases used by the game screens → DS tokens */
  --ink: var(--text); --ink-2: var(--text-2); --line-2: var(--border-strong);
  --brand: var(--red); --club-ink: #ffffff; --club-soft: rgba(215, 44, 53, .16);
  --hp: #e5484d; --energy: #e8a23a; --xp: #4c8fe0; --token: #a066f0; --ok: var(--green); --bad: var(--danger);
  --radius: var(--r-lg);
  --shadow-lg: 0 30px 80px rgba(0, 0, 0, .7);
  --display: var(--font-display); --font: var(--font-body);
  --tint-ok: rgba(88, 184, 136, .14); --tint-bad: rgba(240, 91, 97, .14); --tint-warn: rgba(232, 162, 58, .14); --tint-info: rgba(76, 143, 224, .16); --tint-gold: rgba(226, 181, 94, .14);
}
html, body { margin: 0; min-height: 100%; }
a:hover { color: #fff; }
h1, h2, h3, h4 { margin: 0 0 10px; }
h3 { font-size: var(--fs-md); color: var(--text); }
.panel-head h2, .panel-head h3 { margin: 0; }
.hidden { display: none !important; }
.ic { flex-shrink: 0; vertical-align: -3px; }
.crest { flex-shrink: 0; vertical-align: middle; filter: drop-shadow(0 1px 2px rgba(0,0,0,.5)); }
.row { flex-wrap: wrap; gap: 10px; }
.col { gap: 10px; }

/* ---- controls (DS buttons) ---- */
button, .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 0 14px;
  font: 500 13px/1 var(--font-display); text-transform: uppercase; letter-spacing: .05em; color: var(--text);
  background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: var(--r-sm);
  cursor: pointer; white-space: nowrap; transition: background var(--fast), border-color var(--fast), box-shadow var(--fast);
}
button:hover:not(:disabled), .btn:hover { background: var(--surface-3); border-color: #66707c; color: #fff; }
button:active:not(:disabled) { transform: translateY(1px); }
button:disabled { cursor: not-allowed; color: #7d858f; background: #1a1f25; border-color: #2f363e; }
button.primary, .btn.primary { color: #fff; background: linear-gradient(180deg, #c3232c, #7d151c); border-color: #e0444b; }
button.primary:hover:not(:disabled), .btn.primary:hover { background: linear-gradient(180deg, #db2f39, #8f1820); border-color: #ff6b72; box-shadow: 0 0 16px var(--red-glow); color: #fff; }
button.primary:disabled { background: #2a1517; border-color: #4a2226; color: #9a7d80; }
button.dark, .btn.dark { color: #fff; background: rgba(215, 44, 53, .12); border-color: var(--red); }
button.dark:hover:not(:disabled), .btn.dark:hover { background: rgba(215, 44, 53, .26); box-shadow: 0 0 12px var(--red-glow); }
button.ghost, .btn.ghost { background: transparent; border-color: transparent; color: var(--text-2); }
button.ghost:hover:not(:disabled) { background: rgba(255,255,255,.05); border-color: transparent; color: #fff; }
button.danger { color: var(--danger); }
button.sm, .btn.sm { min-height: 28px; padding: 0 10px; font-size: 11.5px; }
button.lg, .btn.lg { min-height: 50px; padding: 0 24px; font-size: 17px; letter-spacing: .06em; }
input, select, textarea {
  font: 400 var(--fs-base)/1.2 var(--font-body); color: var(--text); background: var(--inset);
  border: 1px solid var(--border-strong); border-radius: var(--r-sm); padding: 9px 12px; outline: none; min-width: 0;
}
input:focus, select:focus, textarea:focus { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
select option { background: var(--surface); }
.chip { height: auto; min-height: 22px; padding: 2px 8px; font-size: 11.5px; white-space: nowrap; }
.chip.live { background: var(--red); color: #fff; border-color: var(--red); animation: pulse 1.4s infinite; }
.chip.club { background: color-mix(in srgb, var(--club) 26%, transparent); color: #fff; border-color: color-mix(in srgb, var(--club) 75%, transparent); }
.chip.soft { background: var(--surface-3); border-color: transparent; color: var(--text); }
.chip.ok { background: var(--tint-ok); color: var(--green); border-color: rgba(88,184,136,.4); }
.chip.npc { background: #20262d; color: #9aa7b6; border-color: transparent; }
.chip.tok { background: rgba(160,102,240,.14); color: #c4a2f7; border-color: transparent; }

/* ---- app shell (topbar + nav from the mockups) ---- */
.topbar { padding: 0 0 0 var(--s4); gap: 0; }
.topbar .brand { padding-right: var(--s4); }
.topbar .brand img { height: 42px; }
.topbar .nav a { padding: 0 15px; font-size: 14px; position: relative; }
.topbar .nav a .ic { display: none; }
.topbar .nav a .badge-n { background: var(--red); color: #fff; font: 600 10px/1 var(--font-body); padding: 3px 6px; border-radius: 9px; }
.topbar .nav .sep { width: 1px; background: #3a2025; margin: 14px 4px; flex-shrink: 0; }
.topbar .nav a.minor { color: var(--text-2); font-size: 13px; }
.topbar .tools { display: flex; align-items: center; gap: 4px; padding: 0 var(--s3); border-left: 1px solid #222830; }
.topbar .tools select { padding: 6px 8px; font-size: 13px; background: transparent; border-color: transparent; color: var(--text-2); }
.topbar .tools select:hover { border-color: var(--border); }
.statusbar { position: sticky; top: var(--topbar-h); z-index: 29; display: flex; align-items: center; gap: var(--s4); padding: 8px var(--s4);
  background: rgba(10, 12, 16, .92); backdrop-filter: blur(8px); border-bottom: 1px solid #1d2229; }
.hud { display: flex; align-items: center; gap: 14px; flex: 1; min-width: 0; flex-wrap: wrap; }
.who { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; min-width: 0; }
.who .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who .lv { color: var(--muted); font-weight: 400; }
a.who:hover .nm { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.bars { display: flex; gap: 10px; flex: 1; min-width: 220px; max-width: 560px; }
.hud .bar, .bar.big { height: 18px; flex: 1; min-width: 60px; border-radius: 3px; background: #1c2128; box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); }
.bar > i { background: linear-gradient(90deg, #a01b23, #f05c60); }
.bar.en > i { background: linear-gradient(90deg, #926523, #f5c15e); } .bar.xp > i { background: linear-gradient(90deg, #1f5aa6, #5aa6f2); }
.bar.club > i { background: linear-gradient(90deg, color-mix(in srgb, var(--club) 60%, #000), var(--club)); }
.bar > b { position: relative; display: flex; align-items: center; justify-content: center; gap: 3px; height: 100%; font: 600 11px/1 var(--font-body); color: #fff; text-shadow: 0 1px 2px #000; }
.cur { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; background: var(--inset); border: 1px solid var(--border); border-radius: var(--r-sm); font: 600 15px/1 var(--font-body); font-variant-numeric: tabular-nums; white-space: nowrap; }
.cur.coins .ic { color: var(--gold); } .cur.tok .ic { color: #c4a2f7; }
.bell { position: relative; display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: var(--r-sm); color: var(--text-2); }
.bell:hover { background: rgba(255,255,255,.05); color: #fff; }
.bell .dot { position: absolute; top: 3px; right: 1px; background: var(--red); color: #fff; font-size: 10px; font-weight: 600; border-radius: 9px; padding: 1px 5px; box-shadow: 0 0 6px var(--red); }

.layout { display: block; padding: var(--s4); max-width: 1600px; margin: 0 auto; }
main { min-width: 0; display: flex; flex-direction: column; gap: var(--s4); padding-bottom: 90px; }
nav.side { display: none; }
.more-sheet { position: fixed; inset: auto 0 60px 0; z-index: 31; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 12px;
  background: rgba(10, 12, 16, .98); border-top: 1px solid #5c1d22; box-shadow: 0 -12px 30px rgba(0,0,0,.6); }
.more-sheet a { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 4px; border-radius: var(--r-sm); background: var(--surface-2); font: 500 12px/1 var(--font-display); text-transform: uppercase; letter-spacing: .04em; color: var(--text-2); }
.more-sheet a.active { color: #fff; box-shadow: inset 0 0 0 1px var(--red); }
.bottom-nav a { position: relative; }
.bottom-nav .badge-n { position: absolute; top: 6px; right: calc(50% - 22px); background: var(--red); color: #fff; font: 600 9px/1 var(--font-body); padding: 2px 5px; border-radius: 8px; }
@media (max-width: 1023px) {
  .topbar { padding-right: 4px; }
  .topbar .brand { flex: 1; }
  .statusbar { flex-wrap: wrap; gap: 8px; padding: 8px 12px; }
  .layout { padding: 12px; }
}
@media (max-width: 640px) {
  .hud { gap: 6px 10px; }
  .hud .bars { order: 5; flex-basis: 100%; max-width: none; min-width: 0; }
  .cur { height: 28px; font-size: 13px; padding: 0 8px; }
  .topbar .tools select { max-width: 92px; }
}

.panel { padding: 18px; }
.panel.hero-panel { position: relative; overflow: hidden; }
.panel-head { align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.panel-head h2 { font-size: var(--fs-xl); }
.grid { display: grid; gap: 12px; }
.g2 { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
.g3 { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.g4 { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.card { background: linear-gradient(180deg, #181d24, #12161b); border: 1px solid var(--border); border-radius: var(--r-md); padding: 12px; display: flex; flex-direction: column; gap: 8px; transition: border-color var(--fast), box-shadow var(--fast); }
.card.click { cursor: pointer; } .card.click:hover { border-color: #66707c; }
.card.mine { border-color: var(--club); box-shadow: 0 0 0 1px var(--club), 0 0 18px color-mix(in srgb, var(--club) 30%, transparent); }
.card.locked { opacity: .5; }
.tabs { width: fit-content; max-width: 100%; flex-wrap: wrap; margin-bottom: 12px; }
.tabs > * { flex: 0 1 auto; min-height: 0; padding: 9px 14px; border-radius: 0; display: inline-flex; align-items: center; gap: 5px; }
.tabs > *:hover:not(:disabled) { border-color: transparent; border-left-color: var(--line); }
.tabs .on { color: #fff; background: linear-gradient(180deg, #b0222a, #7d151c); box-shadow: inset 0 0 0 1px #e0444b; }
table.list { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
table.list td, table.list th { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
table.list th { font: 500 12px/1 var(--font-display); text-transform: uppercase; color: var(--muted); letter-spacing: .06em; border-bottom-color: var(--border); }
table.list tr.me td { background: linear-gradient(90deg, rgba(215,44,53,.22), rgba(215,44,53,.05)); }
table.list tr:last-child td { border-bottom: 0; }
table.list tr:hover td { background: rgba(255,255,255,.02); }
.online-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--green); margin-right: 2px; box-shadow: 0 0 6px var(--green); }
.empty { padding: 18px; }

/* rarity */
.r-common { --rar: var(--r-common); } .r-uncommon { --rar: var(--r-uncommon); } .r-rare { --rar: var(--r-rare); } .r-epic { --rar: var(--r-epic); } .r-legendary { --rar: var(--r-legendary); }
.item { border-top: 2px solid var(--rar, var(--border)); }
.rar { color: var(--rar); font: 600 11px/1.2 var(--font-display); text-transform: uppercase; letter-spacing: .08em; }
.item-ico { width: 48px; height: 48px; display: grid; place-items: center; font-size: 24px; background: radial-gradient(circle at 50% 35%, #232a33, var(--inset) 70%); border-radius: var(--r-sm); border: 1px solid var(--border-strong); flex-shrink: 0; overflow: hidden; }
.item-ico img { width: 100%; height: 100%; object-fit: contain; }
img.iico { display: inline-block; width: 1.7em; height: 1.7em; object-fit: contain; vertical-align: middle; }
.item-ico img.iico { width: 100%; height: 100%; }
.bonus { display: flex; flex-wrap: wrap; gap: 4px; }
.bonus span { font-size: 12px; font-weight: 500; background: var(--tint-ok); color: var(--green); padding: 1px 7px; border-radius: 3px; }
.req { font-size: 12px; color: var(--muted); } .req.bad { color: var(--danger); font-weight: 600; }
.price { font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }

/* ---- character screen (stage + paper doll from the profile mockup) ---- */
.char-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr) 420px; gap: var(--s4); align-items: start; }
.char-layout > .col { gap: var(--s4); }
@media (max-width: 1399px) { .char-layout { grid-template-columns: minmax(0, 1fr) 400px; } .char-layout > .col.info { grid-column: 1 / -1; order: 3; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); align-items: start; } }
@media (max-width: 1023px) { .char-layout { grid-template-columns: 1fr; } }
.stage { min-height: 680px; grid-template-columns: 92px minmax(0, 1fr) 92px; background-color: #0e1115; }
.stage .figure { position: relative; min-width: 0; align-items: flex-end; padding-bottom: 48px; }
.stage .figure img { max-height: 600px; max-width: 100%; object-fit: contain; }
.stage .slot { padding: 6px 6px 18px; }
.stage .slot.empty .ph { color: #4a535e; display: grid; place-items: center; height: 100%; width: 100%; }
.stage .actions { position: absolute; left: 0; right: 0; bottom: 16px; display: flex; justify-content: center; gap: 8px; z-index: 2; }
.stage .club-tag { position: absolute; left: 50%; top: 14px; transform: translateX(-50%); z-index: 2; display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 8px; background: rgba(7,9,12,.75); border: 1px solid var(--border); border-radius: var(--r-sm); font: 500 15px/1 var(--font-display); text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
@media (max-width: 640px) { .stage { grid-template-columns: 60px minmax(0, 1fr) 60px; min-height: 500px; padding: 10px; gap: 6px; } .stage .figure img { max-height: 420px; } .stage .slot .slot-label { font-size: 9px; } .stage .club-tag { font-size: 12px; } }
.portrait { position: relative; width: 100%; aspect-ratio: 3 / 4; display: flex; align-items: flex-end; justify-content: center; overflow: hidden; border-radius: var(--r-sm); background: radial-gradient(circle at 50% 30%, #262d36, var(--inset) 72%) center/cover; }
.portrait img { height: 96%; width: auto; max-width: none; object-fit: contain; filter: drop-shadow(0 8px 12px rgba(0,0,0,.6)); }
.portrait.flip img { transform: scaleX(-1); }
.avatar { width: 100%; max-width: 200px; height: auto; margin: 0 auto; display: block; border: 0; background: none; }
.namecard { text-align: center; margin-top: 10px; }
.namecard h2 { display: inline-flex; align-items: center; gap: 8px; margin: 0; }
.idcard .name { font: 600 32px/1 var(--font-display); text-transform: none; }
.idcard .lvl { font: 500 18px/1 var(--font-display); text-transform: uppercase; } .idcard .lvl b { color: var(--red-ink); font-size: 24px; }
.stat { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 8px; padding: 9px 12px; margin-bottom: 6px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-sm); }
.stat .k b { font: 500 var(--fs-md)/1.1 var(--font-body); } .stat .k small { color: var(--muted); display: block; font-size: 12px; }
.stat .v { font: 600 20px/1 var(--font-display); min-width: 34px; text-align: right; font-variant-numeric: tabular-nums; color: var(--sc, var(--text)); }
.stat .plus { color: var(--green); font-weight: 600; font-size: 13px; }
.stat .k b::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 8px; background: var(--sc, var(--red)); vertical-align: 1px; box-shadow: 0 0 6px var(--sc, var(--red)); }
.mile { grid-column: 1 / -1; position: relative; height: 8px; background: #2a3038; border-radius: 2px; margin-top: 2px; }
.mile > i { position: absolute; inset: 0 auto 0 0; background: var(--sc, var(--red)); border-radius: 2px; box-shadow: 0 0 8px color-mix(in srgb, var(--sc, var(--red)) 50%, transparent); }
.mile > s { position: absolute; top: -3px; width: 2px; height: 14px; background: #4a535e; text-decoration: none; }
.mile > s.on { background: #fff; }
.derived { display: flex; flex-direction: column; }
.derived div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.derived div:last-child { border-bottom: 0; }
.derived small { color: var(--muted); font-size: var(--fs-base); }
.derived b { font: 500 var(--fs-base)/1.2 var(--font-body); font-variant-numeric: tabular-nums; }
.inventory .slot { padding: 6px; }
.inventory .slot .q { position: absolute; top: 3px; right: 5px; font: 600 11px/1 var(--font-body); color: var(--text-2); text-shadow: 0 1px 2px #000; }
.inventory .slot .lock { position: absolute; bottom: 3px; right: 5px; font-size: 11px; color: var(--danger); }
.inventory .slot .emo { font-size: 30px; line-height: 1; }
.item-detail .art { height: 150px; display: flex; align-items: center; justify-content: center; overflow: hidden; background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--rc, #333) 22%, #1d232a), transparent 70%); border-radius: var(--r-sm); margin-bottom: 10px; }
.item-detail .art img { max-height: 92%; max-width: 70%; filter: drop-shadow(0 8px 10px rgba(0,0,0,.6)); }
.item-detail .art .emo { font-size: 64px; }
.bg-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.bg-picker button { height: 72px; padding: 0; background: center/cover; border-radius: var(--r-sm); position: relative; overflow: hidden; align-items: flex-end; justify-content: flex-start; }
.bg-picker button span { background: rgba(7,9,12,.8); padding: 4px 6px; font-size: 10px; width: 100%; text-align: left; }
.bg-picker button.on { box-shadow: var(--glow); border-color: var(--red); }
.bg-picker button:disabled { filter: grayscale(1); opacity: .5; }

/* ---- fight ---- */
.arena-view { display: grid; grid-template-columns: 1fr 300px 1fr; gap: 18px; align-items: start; }
.fighter { text-align: center; }
.fighter .avatar { max-width: 180px; }
.fighter.hit .avatar { animation: shake .35s; }
.fighter .pow { position: absolute; }
@keyframes shake { 20%{transform:translateX(-6px)} 40%{transform:translateX(6px)} 60%{transform:translateX(-4px)} 80%{transform:translateX(3px)} }
.lanes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.lanes button { padding: 12px 6px; flex-direction: column; gap: 2px; font-size: 12px; }
.lanes .high { grid-column: 1 / -1; }
.lanes button.sel.atk { background: var(--tint-bad); border-color: var(--hp); color: #ff8a8f; }
.lanes button.sel.grd { background: var(--tint-info); border-color: var(--xp); color: #7fb0f0; }
.fight-log { max-height: 340px; overflow-y: auto; font-size: 13px; display: flex; flex-direction: column-reverse; gap: 6px; }
.fight-log .r { padding: 8px 10px; background: var(--surface-2); border-radius: 10px; }
.fight-log .r b { font-family: var(--display);  text-transform: uppercase; }
.dmg { color: var(--bad); font-weight: 600; } .crit { color: #ff9a5c; font-weight: 700; } .grd { color: #7fb0f0; } .ddg { color: #b99cf5; }
.timer { height: 6px; background: #2a3038; border-radius: 99px; overflow: hidden; } .timer > i { display: block; height: 100%; background: var(--club); transition: width .5s linear; }
.result { text-align: center; padding: 18px 8px; }
.result h1 { font-size: 46px; text-transform: uppercase; }
.pow-word { font-family: var(--display); font-weight: 700;  color: var(--club); font-size: 26px; transform: rotate(-6deg); display: inline-block; }

/* ---- match day ---- */
.fx { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; }
.fx .team { display: flex; align-items: center; gap: 8px; min-width: 0; font-weight: 600; }
.fx .team span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fx .team.away { flex-direction: row-reverse; text-align: right; }
.fx .mid { text-align: center; min-width: 66px; font-family: var(--display);  font-weight: 600; font-size: 20px; }
.duel { display: flex; height: 10px; border-radius: 99px; overflow: hidden; background: #2a3038; }
.duel > i { display: block; height: 100%; transition: width .5s; }
.scoreboard { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; text-align: center; }
.scoreboard .score { font-family: var(--display);  font-weight: 700; font-size: 64px; line-height: 1; }
.scoreboard h3 { color: var(--ink); margin-top: 8px; }
.timeline { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin-top: 14px; }
.timeline div { font-size: 11px; text-align: center; color: var(--muted); border-top: 4px solid var(--line); padding-top: 5px; text-transform: uppercase; font-weight: 600; letter-spacing: .03em; }
.timeline div.done { border-color: var(--ink-2); color: var(--ink-2); }
.timeline div.now { border-color: var(--club); color: var(--ink); }
.breakdown { display: grid; grid-template-columns: auto 1fr auto; gap: 6px 10px; align-items: center; font-size: 12.5px; }
.big-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.big-actions button { padding: 14px; flex-direction: column; gap: 3px; height: auto; white-space: normal; text-align: center; }
.big-actions button small { font-weight: 500; opacity: .75; }

.pop { position: fixed; left: 50%; top: 86px; transform: translateX(-50%); z-index: 90; background: #151a20; color: var(--text); border: 1px solid var(--border); border-left: 3px solid var(--green); padding: 11px 18px; border-radius: 12px; font-weight: 600; box-shadow: var(--shadow-lg); animation: popin .25s; max-width: 90vw; }
.pop.error { border-left-color: var(--danger); }
@keyframes popin { from { transform: translate(-50%, -10px); opacity: 0; } }

/* ---- create ---- */
.club-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 8px; max-height: 440px; overflow-y: auto; padding: 2px; }
.club-card { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 12px 6px; border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer; text-align: center; font-size: 12px; font-weight: 600; background: var(--surface); }
.club-card:hover { border-color: var(--line-2); box-shadow: var(--shadow); }
.club-card.on { border-color: var(--club); box-shadow: 0 0 0 3px var(--club-soft); }
.swatches { display: flex; gap: 6px; }
.swatches button { width: 30px; height: 30px; padding: 0; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line-2); }
.swatches button.on { box-shadow: 0 0 0 2px var(--ink); }
.steps { display: flex; gap: 6px; margin-bottom: 14px; }
.steps span { flex: 1; height: 4px; border-radius: 99px; background: var(--line); } .steps span.on { background: var(--club); }

/* ---- chat (floating) ---- */
.chat-fab { position: fixed; right: 20px; bottom: 20px; z-index: 40; width: 54px; height: 54px; border-radius: 50%; background: linear-gradient(180deg, #c3232c, #7d151c); color: #fff; border: 1px solid #e0444b; box-shadow: var(--shadow-lg); }
.chat-fab:hover:not(:disabled) { background: linear-gradient(180deg, #db2f39, #8f1820); box-shadow: 0 0 16px var(--red-glow); }
.chat { gap: 0; position: fixed; right: 20px; bottom: 86px; z-index: 40; width: 380px; max-width: calc(100vw - 32px); height: min(520px, calc(100vh - 140px)); background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; overflow: hidden; }
.chat .head { display: flex; gap: 6px; align-items: center; padding: 10px; border-bottom: 1px solid var(--line); }
.chat .head .tabs { margin: 0; }
.chat .msgs { flex: 1; overflow-y: auto; padding: 10px 12px; font-size: 13px; display: flex; flex-direction: column; gap: 6px; }
.chat .msg { line-height: 1.4; word-wrap: break-word; }
.chat .msg .t { color: var(--muted); font-size: 11px; margin-left: 4px; }
.chat .msg .n { font-weight: 700; display: inline-flex; align-items: center; gap: 4px; }
.chat form { display: flex; gap: 6px; padding: 10px; border-top: 1px solid var(--line); }
.chat form input { flex: 1; }

.dev { border-color: #5b3fa0; background: rgba(160,102,240,.05); }

/* ======================= LANDING ======================= */
.landing { background: transparent; }
.lnav { position: absolute; top: 0; left: 0; right: 0; z-index: 5; display: flex; align-items: center; gap: 12px; padding: 18px 28px; }
.lnav .logo { font-size: 26px; }
.lnav select { min-width: 112px; }
.lhero { position: relative; height: min(860px, 100svh); min-height: 600px; overflow: hidden; background: #07090c; }
.lhero canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.lhero .veil { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(7,9,12,.96) 0%, rgba(7,9,12,.86) 32%, rgba(7,9,12,0) 62%), linear-gradient(0deg, rgba(7,9,12,.75) 0%, rgba(7,9,12,0) 28%); pointer-events: none; }
.hero-copy { position: absolute; left: 0; top: 0; bottom: 0; display: flex; flex-direction: column; justify-content: center; padding: 90px 28px 60px; max-width: 640px; gap: 18px; z-index: 2; }
.kicker { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--ink-2); }
.kicker i { width: 28px; height: 3px; background: var(--club); display: inline-block; }
.mega { font-family: var(--display);  font-weight: 700; font-size: clamp(64px, 11vw, 148px); line-height: .82; letter-spacing: -.01em; margin: 0; text-transform: uppercase; }
.mega em { font-style: normal; color: var(--club); display: block; }
.hero-copy p { font-size: 18px; color: var(--ink-2); max-width: 470px; margin: 0; }
.now-showing { position: absolute; right: 28px; bottom: 26px; z-index: 3; display: flex; align-items: center; gap: 10px; background: rgba(7,9,12,.9); border: 1px solid var(--line); padding: 8px 14px 8px 8px; border-radius: 999px; box-shadow: var(--shadow); font-weight: 600; backdrop-filter: blur(6px); }
.stats-strip { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface); }
.stats-strip div { padding: 22px 28px; border-right: 1px solid var(--line); }
.stats-strip div:last-child { border-right: 0; }
.stats-strip b { display: block; font-family: var(--display);  font-weight: 700; font-size: 44px; line-height: 1; }
.stats-strip span { color: var(--muted); font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.lsec { max-width: 1240px; margin: 0 auto; padding: 72px 28px; }
.lsec h2.big { font-family: var(--display);  font-weight: 700; font-size: clamp(40px, 6vw, 72px); line-height: .9; text-transform: uppercase; margin-bottom: 14px; }
.lsec .lead { font-size: 17px; color: var(--ink-2); max-width: 620px; }
.ticker { display: flex; gap: 12px; overflow-x: auto; padding: 18px 28px 22px; scroll-snap-type: x mandatory; background: var(--bg); }
.ticker .card { min-width: 270px; scroll-snap-align: start; }
.steps3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 30px; }
.step { background: var(--surface-2); border: 1px solid var(--line); border-radius: 18px; padding: 22px; position: relative; overflow: hidden; min-height: 250px; }
.step .num { font-family: var(--display);  font-weight: 700; font-size: 90px; line-height: .8; color: var(--club); opacity: .14; position: absolute; right: 14px; top: 10px; }
.step h3 { color: var(--ink); font-size: 20px; text-transform: none; letter-spacing: 0; }
.step p { color: var(--ink-2); margin: 6px 0 0; }
.lanes-demo { display: grid; grid-template-columns: repeat(3, 44px); gap: 5px; margin-top: 16px; }
.lanes-demo span { height: 30px; border-radius: 8px; background: var(--surface); border: 1.5px solid var(--line-2); font-size: 10px; font-weight: 700; display: grid; place-items: center; }
.lanes-demo span:first-child { grid-column: 1 / -1; }
.lanes-demo .a { background: var(--tint-bad); border-color: var(--hp); } .lanes-demo .g { background: var(--tint-info); border-color: var(--xp); }
.stat5 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 28px; }
.stat5 div { border: 1px solid var(--line); border-radius: 16px; padding: 18px; background: var(--surface); }
.stat5 b { font-family: var(--display);  font-weight: 700; font-size: 34px; display: block; color: var(--club); }
.stat5 h4 { font-size: 18px; margin: 6px 0 4px; }
.stat5 p { color: var(--muted); margin: 0; font-size: 13px; }
.crest-wall { overflow: hidden; padding: 10px 0; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.crest-row { display: flex; gap: 14px; width: max-content; animation: marquee 80s linear infinite; }
.crest-row.rev { animation-duration: 95s; }   /* both rows run right → left, at different speeds */
.crest-row .cw { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px 6px 8px; font-weight: 600; white-space: nowrap; }
@keyframes marquee { to { transform: translateX(-50%); } }
.platforms { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 28px; }
.platforms div { border-radius: var(--r-lg); padding: 24px; background: var(--surface-2); border: 1px solid var(--border); color: #fff; }
.platforms div:nth-child(2) { background: #229ed9; } .platforms div:nth-child(3) { background: #1f6b46; color: #fff; }
.platforms h4 { font-size: 26px; margin: 10px 0 6px; }
.platforms p { margin: 0; opacity: .85; }
.cta-band { background: linear-gradient(90deg, #4a1016, #12161b); color: #fff; border-top: 1px solid #5c1d22; }
.cta-band .lsec { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.cta-band h2.big { color: #fff; margin: 0; flex: 1; }
.lfoot { padding: 28px; color: var(--muted); font-size: 12.5px; text-align: center; border-top: 1px solid var(--line); }
.modal-back { position: fixed; inset: 0; z-index: 80; background: rgba(4,5,7,.72); display: grid; place-items: center; padding: 16px; animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.modal { background: var(--surface); border-radius: 20px; width: 420px; max-width: 100%; padding: 24px; box-shadow: var(--shadow-lg); position: relative; }
.modal .x { position: absolute; right: 12px; top: 12px; }
.form { display: flex; flex-direction: column; gap: 10px; }
.err { color: var(--bad); min-height: 18px; font-size: 13px; }

@media (max-width: 1000px) {
  .layout { flex-direction: column; align-items: stretch; padding: 12px 16px; }
  nav.side { position: static; width: 100%; flex-direction: row; overflow-x: auto; padding: 6px; scrollbar-width: none; }
  nav.side::-webkit-scrollbar { display: none; }
  nav.side a { padding: 7px 10px; white-space: nowrap; }
  nav.side a.on { box-shadow: inset 0 -3px 0 var(--club); }
  .arena-view { grid-template-columns: 1fr 1fr; }
  .arena-view .controls { grid-column: 1 / -1; order: 3; }
  .steps3, .platforms { grid-template-columns: 1fr; }
  .stat5 { grid-template-columns: repeat(2, 1fr); }
  .stats-strip { grid-template-columns: repeat(2, 1fr); }
  .stats-strip div:nth-child(2) { border-right: 0; }
  .stats-strip div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}
@media (max-width: 640px) {
  .topbar-in { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; padding: 8px 16px; }
  .topbar-in .hud { grid-column: 1 / -1; order: 3; gap: 6px 12px; }
  .hud .bars { order: 5; flex-basis: 100%; max-width: none; min-width: 0; }
  .logo { font-size: 19px; }
  .panel { padding: 14px; }
  .g2 { grid-template-columns: 1fr; }
  .doll { grid-template-columns: 64px 1fr 64px; gap: 6px; }
  .slot { width: 64px; height: 56px; }
  .scoreboard .score { font-size: 42px; }
  .lhero { min-height: 640px; }
  .lhero .veil { background: linear-gradient(0deg, rgba(7,9,12,.97) 0%, rgba(7,9,12,.9) 50%, rgba(7,9,12,.2) 80%); }
  .hero-copy { justify-content: flex-end; padding: 80px 16px 90px; }
  .lnav { padding: 14px 16px; }
  .now-showing { left: 16px; right: auto; bottom: 18px; }
  .lsec { padding: 52px 16px; }
  .stat5 { grid-template-columns: 1fr; }
  .stats-strip div { padding: 16px; }
  .stats-strip b { font-size: 34px; }
  .chat { right: 8px; left: 8px; width: auto; bottom: 80px; }
  .chat-fab { right: 16px; bottom: 16px; }
  .timeline div { font-size: 9px; }
}


/* crafted quality & ranked divisions */
.chip.q-fine { background: var(--tint-info); color: #7fb0f0; border-color: transparent; }
.chip.q-exc { background: var(--tint-gold); color: var(--gold); border-color: transparent; }
.chip.div-bronze { background: rgba(192,128,79,.18); color: #e0a77c; border-color: transparent; }
.chip.div-silver { background: rgba(180,188,198,.14); color: #c9d0d8; border-color: transparent; }
.chip.div-gold { background: var(--tint-gold); color: var(--gold); border-color: transparent; }
.chip.div-platinum { background: rgba(77,208,190,.14); color: #7fe0d2; border-color: transparent; }
.chip.div-elite { background: rgba(160,102,240,.16); color: #c4a2f7; border-color: transparent; }
.chip.div-legend { background: #000; color: #ffd84d; box-shadow: inset 0 0 0 1px #8a6d1c; border-color: transparent; }
label.row input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--club); }

.card > .bar, .panel > .bar, .col > .bar { flex: none; display: block; height: 18px; }

/* abilities, stamina, team fights */
.bar.st { height: 12px; } .bar.st > i { background: #22b8a6; } .bar.st > b { font-size: 9.5px; }
.abilities { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 6px; }
.ab-btn { flex-direction: column; gap: 1px; padding: 8px 6px; font-size: 12px; white-space: normal; text-align: center; }
.ab-btn small { font-weight: 500; opacity: .7; font-size: 11px; }
.ab-btn.sel { background: var(--tint-gold); border-color: var(--gold); color: #fff; }
.fight-log .ab { color: var(--gold); font-weight: 600; }
.squad-view { display: grid; grid-template-columns: 1fr 320px 1fr; gap: 16px; align-items: start; }
.mini { display: flex; gap: 8px; align-items: center; padding: 8px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); margin-bottom: 8px; position: relative; transition: border-color .12s, box-shadow .12s; }
.mini[data-act] { cursor: pointer; } .mini[data-act]:hover { border-color: var(--line-2); box-shadow: var(--shadow); }
.mini.me { background: var(--club-soft); }
.mini.targeted { border-color: var(--hp); box-shadow: 0 0 0 3px var(--tint-bad); }
.mini.covered { border-color: var(--xp); box-shadow: 0 0 0 3px var(--tint-info); }
.mini.ko { opacity: .45; filter: grayscale(1); }
.mini.hit .avatar { animation: shake .35s; }
.mini .pick { position: absolute; top: 6px; right: 8px; font-size: 16px; }
.mini .who .nm { max-width: 110px; }
@media (max-width: 1000px) { .squad-view { grid-template-columns: 1fr 1fr; } .squad-view .controls { grid-column: 1 / -1; order: 3; } }
@media (max-width: 640px) { .squad-view { grid-template-columns: 1fr; } .squad-view .controls { order: 0; } }

/* talents */
.talents { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.tree { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 6px; }
.tree-head { display: flex; align-items: center; gap: 6px; font-family: var(--display);  text-transform: uppercase; }
.tnode { display: flex; gap: 8px; align-items: center; background: var(--surface); border: 1.5px solid var(--line); border-radius: 10px; padding: 8px; }
.tnode.has { border-color: var(--club); box-shadow: 0 0 0 2px var(--club-soft); }
.tnode.locked { opacity: .5; }
@media (max-width: 1000px) { .talents { grid-template-columns: 1fr; } }
.profile-panel .talents { grid-template-columns: 1fr; }

/* ---- moderation, seasons, club change (v0.6) ---- */
.chat .msg { position: relative; }
.chat .msg .msg-more { position: absolute; right: 0; top: -2px; border: 0; background: transparent; color: var(--muted); padding: 0 6px; font-size: 16px; line-height: 1; opacity: 0; cursor: pointer; }
.chat .msg:hover .msg-more, .chat .msg .msg-more:focus { opacity: 1; }
@media (hover: none) { .chat .msg .msg-more { opacity: .6; } }
.chat .msg.hidden-msg { opacity: .55; }
.msg-menu { margin-top: 6px; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); display: flex; flex-direction: column; gap: 4px; }
.row.wrap { flex-wrap: wrap; }
.chip.mod { background: #3a4150; color: #fff; border-color: transparent; font-size: 10px; padding: 1px 6px; }
.chip.warn { background: var(--tint-warn); color: var(--warning); border-color: transparent; }
.warn-panel { border-color: #6b4a1e; background: #1a160f; }
.sanction + .sanction { border-top: 1px dashed var(--line); margin-top: 10px; padding-top: 10px; }
.report-card .ctx { margin-top: 8px; padding: 8px 10px; border-radius: 8px; background: var(--surface-2); font-size: 13px; display: flex; flex-direction: column; gap: 2px; }
.report-card .ctx .hl { background: var(--tint-warn); border-radius: 6px; padding: 2px 6px; margin: 0 -6px; }
.report-sel { max-width: 200px; }
textarea { font: inherit; padding: 8px 10px; border: 1px solid var(--line-2); border-radius: 10px; resize: vertical; width: 100%; box-sizing: border-box; }
.season-hero .big { font: 600 32px/1 var(--font-display); letter-spacing: .01em; color: var(--ink); }
.season-clock { text-align: right; }
.past-season + .past-season { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 8px; }
.cc-box { margin-top: 12px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
code { font-size: 12px; background: var(--surface-3); padding: 1px 5px; border-radius: 5px; }

/* ---- Stand Battle 10v10 (v0.7) ---- */
.stand-view { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 18px; align-items: start; }
@media (max-width: 980px) { .stand-view { grid-template-columns: 1fr; } }
.stand-view .field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.stand-view .side-head { display: flex; align-items: center; gap: 10px; }
.stand-view .side-head > div:first-child { flex: 1; }
.st-row { display: grid; grid-template-columns: 62px 1fr; gap: 8px; align-items: center; padding: 4px 0; }
.st-lbl { font: 700 11px/1 var(--display, sans-serif); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.st-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.sc { border: 1px solid var(--line); border-radius: 10px; padding: 5px 7px; background: var(--surface); font-size: 12px; min-width: 0; transition: transform .15s, box-shadow .15s; }
.sc[data-act] { cursor: pointer; }
.sc[data-act]:hover { border-color: var(--club); box-shadow: 0 2px 10px rgba(0,0,0,.4); }
.sc .sc-top { display: flex; align-items: center; gap: 4px; white-space: nowrap; overflow: hidden; }
.sc .sc-top .nm { overflow: hidden; text-overflow: ellipsis; font-weight: 600; flex: 1; min-width: 0; }
.sc .sc-top .lv { color: var(--muted); font-size: 10px; }
.sc .cap { color: var(--club); font-size: 12px; }
.sc .bar.thin { height: 5px; margin: 4px 0 3px; }
.sc .bar.thin b { display: none; }
.sc .sc-meta { display: flex; gap: 5px; font-size: 10px; color: var(--muted); align-items: center; min-height: 13px; }
.sc .sc-meta .rv { margin-left: auto; color: var(--ink); font-weight: 600; }
.sc .sc-meta .ok { color: var(--ok); font-weight: 700; }
.sc .sc-meta .ex { color: var(--warning); font-weight: 600; }
.sc.me { border-color: var(--club); box-shadow: inset 0 0 0 1px var(--club); }
.sc.targeted { border-color: var(--bad); box-shadow: inset 0 0 0 1px var(--bad); background: var(--tint-bad); }
.sc.covered { border-color: var(--ok); box-shadow: inset 0 0 0 1px var(--ok); }
.sc.focus { background: var(--tint-warn); }
.sc.far { opacity: .45; }
.sc.ko { opacity: .3; filter: grayscale(1); }
.sc.hit { animation: shake .35s; }
.midline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 10px; margin: 4px 0; border-radius: 10px;
  background: repeating-linear-gradient(90deg, var(--club-soft) 0 14px, transparent 14px 28px); border: 1px dashed var(--line-2); }
.captain-box { border: 1px solid var(--club); border-radius: 12px; padding: 10px; margin-bottom: 12px; background: var(--club-soft); }
.captain-box h3 { margin: 0 0 8px; }
.captain-box .calls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.captain-box .calls button { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 6px 8px; text-align: left; white-space: normal; height: auto; min-width: 0; }
.captain-box .calls button small { font-size: 10px; color: var(--muted); font-weight: 400; white-space: normal; line-height: 1.2; }
.captain-box .calls button.sel { border-color: var(--club); background: var(--surface); box-shadow: inset 0 0 0 1px var(--club); }
.fight-log .call { color: var(--club); font-weight: 600; }
.stand-lobby .lobby-sides { gap: 10px; }
.stand-lobby .big-n { font: 800 26px/1 var(--display, sans-serif);  }
@media (max-width: 600px) {
  .st-row { grid-template-columns: 1fr; gap: 3px; }
  .st-cards { gap: 4px; }
  .sc { padding: 4px 5px; font-size: 11px; }
  .sc .sc-top svg, .sc .sc-top .lv { display: none; }
  .sc.ko { display: none; }
  .midline { font-size: 11px; }
}

/* ---- Fan City, crew wars, crew base (v0.9) ---- */
.city-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; margin-bottom: 16px; }
.district { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px; overflow: hidden; }
.district::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 5px; background: var(--club, var(--line-2)); }
.district.mine { border-color: var(--club); box-shadow: 0 0 0 2px var(--club-soft, #eee); }
.district.at-war { background: repeating-linear-gradient(135deg, var(--surface) 0 18px, rgba(240,91,97,.08) 18px 36px); }
.district .d-head { display: flex; gap: 10px; align-items: center; }
.district .d-ic { font-size: 28px; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: var(--club-soft, var(--surface-3)); }
.district .d-owner { margin: 10px 0 4px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.war-badge { display: inline-block; margin-top: 8px; font-size: 12px; padding: 4px 8px; border-radius: 8px; background: var(--tint-bad); color: var(--bad); font-weight: 600; }
.war-sides { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: center; margin: 10px 0; }
.war-sides .right { text-align: right; } .war-sides .right .who { justify-content: flex-end; }
.war-sides .vs { font-size: 28px; }
.war-sides .big-n { font: 800 34px/1 var(--display, sans-serif);  }
.war-total { height: 12px; margin-bottom: 8px; }
.war-total i { background: var(--club); }
.war-score td { vertical-align: middle; } .war-score td .bar { min-width: 90px; margin-bottom: 2px; }
.card.bld { gap: 6px; } .bld-ic { font-size: 22px; } .card.bld .lvl { font-family: var(--display, sans-serif); }
.pips { display: flex; gap: 4px; } .pips i { flex: 1; height: 5px; border-radius: 3px; background: var(--line); } .pips i.on { background: var(--club); }
.trophy-3 { border-color: #c9a15a; } .trophy-4 { border-color: #c9a15a; box-shadow: 0 0 0 2px rgba(226,181,94,.3); } .trophy-5 { border-color: #b8860b; box-shadow: 0 0 0 3px rgba(226,181,94,.3), 0 6px 20px rgba(184,134,11,.18); }
@media (max-width: 600px) { .war-sides .big-n { font-size: 26px; } .city-grid { grid-template-columns: 1fr; } }

/* realtime indicator (v0.10) */
.rt-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); margin-left: -4px; flex-shrink: 0; transition: background .3s; }
.rt-dot.on { background: var(--ok); box-shadow: 0 0 0 3px rgba(22,163,74,.15); }

/* ---- match-day sectors (v0.11) ---- */
.card.project { gap: 8px; }
.proj-bar { position: relative; height: 12px; border-radius: 6px; background: var(--line); overflow: visible; }
.proj-bar i { position: absolute; inset: 0 auto 0 0; border-radius: 6px; background: var(--club); transition: width .4s; }
.proj-bar s { position: absolute; top: -3px; width: 2px; height: 18px; margin-left: -1px; background: var(--line-2); text-decoration: none; }
.proj-bar s.on { background: var(--club-ink, #fff); box-shadow: 0 0 0 1px var(--club); }
.quiz .q { font-size: 18px; margin: 4px 0 12px; text-transform: none; letter-spacing: 0; }
.quiz-opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.quiz-opts button { min-height: 48px; white-space: normal; text-align: left; justify-content: flex-start; }
.quiz-opts button.right { background: var(--tint-ok); border-color: var(--ok); color: var(--ok); }
.quiz-opts button.wrong { background: var(--tint-bad); border-color: var(--bad); color: var(--bad); }
.recap-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.recap-grid > div { background: var(--surface-2); border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; }
.recap-grid small { color: var(--muted); font-size: 11px; } .recap-grid b { font: 800 20px/1.1 var(--display, sans-serif);  }
.souvenir { color: var(--club); font-weight: 600; margin-top: 2px; }
@media (max-width: 600px) { .quiz-opts { grid-template-columns: 1fr; } }

/* ---- appearance pickers (creation, "change appearance") ---- */
.fig-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; margin-top: 8px; }
.fig-picker button { height: 128px; padding: 6px 4px 0; flex-direction: column; justify-content: flex-end; gap: 4px; overflow: hidden; background: radial-gradient(circle at 50% 30%, #262d36, var(--inset) 72%); white-space: normal; }
.fig-picker button img { height: 92px; width: auto; max-width: none; object-fit: contain; }
.fig-picker button span { font-size: 10.5px; line-height: 1.1; padding-bottom: 6px; text-align: center; }
.fig-picker button .ic { margin: auto 0; color: var(--text-2); }
.fig-picker button.on { border-color: var(--red); box-shadow: var(--glow); }
.slot .ph { font-size: 26px; opacity: .35; filter: grayscale(1); }
.slot .emo { font-size: 30px; }
#preview .portrait { aspect-ratio: 3 / 4.2; }
.slot img.iico { width: 100%; height: 100%; }
.slot.has-label img.iico { height: 74%; margin-top: -12%; }
.art img.iico, .item-detail .art img.iico { width: auto; height: auto; max-width: 88%; max-height: 88%; }

/* ---- shop (mockup) ---- */
.shop-hero { min-height: 190px; padding: 24px 28px; }
.shop-hero .hero-title { font-size: clamp(32px, 3.6vw, 56px); }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.shop-grid .item-card { cursor: pointer; }
.shop-grid .item-card .art { height: 150px; }
.shop-grid .item-card .foot button { min-height: 32px; width: 40px; padding: 0; }
.shop .menu > button { min-height: 0; justify-content: flex-start; text-transform: none; font: 400 var(--fs-md)/1.2 var(--font-body); letter-spacing: 0; }
.shop .item-detail .rarity { margin-top: 2px; }
.reward-grid .slot .ph { font-size: 22px; opacity: .3; filter: grayscale(1); }
@media (max-width: 1023px) {
  .chat-fab { bottom: 76px; }
  .chat { bottom: 140px; }
  main { padding-bottom: 120px; }
}
.arena-view > *, .squad-view > * { min-width: 0; }
@media (max-width: 1000px) { .arena-view { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; } }
@media (max-width: 640px) { .fighter .portrait { max-width: 150px !important; } .fighter .small { font-size: 11px; } .fighter .who .nm { max-width: 110px; } }
.llogo { height: 52px; width: auto; filter: drop-shadow(0 2px 8px rgba(0,0,0,.7)); }

/* ---- arena (mockup) ---- */
.arena .mode-card { min-height: 84px; padding: 10px 14px; }
.arena .mode-card .thumb { width: 38%; margin: -10px 0 -10px -14px; }
.arena .mode-card h4 { font-size: 22px; } .arena .mode-card p { margin: 0; }
.faceoff { position: relative; isolation: isolate; overflow: hidden; display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; min-height: 520px; padding: 20px 20px 96px;
  border: 1px solid #4a3a3e; border-radius: var(--r-lg); background: #111 center/cover; }
.faceoff::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(7,9,12,.92), rgba(7,9,12,.1) 55%, rgba(7,9,12,.45)); }
.fo-side { display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0; }
.fo-side img { height: clamp(240px, 28vw, 400px); width: auto; max-width: none; filter: drop-shadow(0 16px 22px rgba(0,0,0,.8)); }   /* sized by height only: a wider drawing must not come out smaller */
.fo-side.rival img { transform: scaleX(-1); }
.fo-name { display: flex; align-items: center; gap: 8px; padding: 5px 12px; background: rgba(7,9,12,.75); border: 1px solid var(--border); border-radius: var(--r-sm); font: 500 16px/1 var(--font-display); text-transform: uppercase; }
.fo-mid { align-self: center; text-align: center; max-width: 220px; color: var(--text-2); }
.vs-word { font: 700 72px/1 var(--font-display); color: #fff; text-shadow: 0 0 24px var(--red-glow), 0 4px 18px #000; margin-bottom: 8px; }
.arena-cta { position: absolute; left: 0; right: 0; bottom: 22px; display: flex; justify-content: center; align-items: center; gap: 12px; flex-wrap: wrap; padding: 0 16px; }
.arena-cta .find { min-width: 300px; min-height: 60px; font-size: 22px; box-shadow: 0 0 28px var(--red-glow); }
.arena-cta.stand { position: absolute; bottom: 14px; left: 14px; right: 14px; display: block; padding: 12px; background: rgba(7,9,12,.85); border: 1px solid var(--border); border-radius: var(--r-md); }
.kv.two { display: grid; grid-template-columns: 1fr 1fr; column-gap: 24px; }
.div-badge { position: relative; width: var(--s); height: var(--s); flex-shrink: 0; display: grid; place-items: center; color: var(--dc, var(--gold)); filter: drop-shadow(0 0 12px color-mix(in srgb, var(--dc, var(--gold)) 45%, transparent)); }
.div-badge .ic { position: absolute; inset: 0; margin: auto; fill: color-mix(in srgb, var(--dc, var(--gold)) 22%, #0b0e12); stroke-width: 1.6; }
.div-badge b { position: relative; font: 700 calc(var(--s) * .34)/1 var(--font-display); color: var(--dc, var(--gold)); }
.div-bronze { --dc: #c0804f; } .div-silver { --dc: #b4bcc6; } .div-gold { --dc: #e2b55e; } .div-platinum { --dc: #4dd0be; } .div-elite { --dc: #a066f0; } .div-legend { --dc: #ff6b72; }
.rank-name { font: 600 26px/1.1 var(--font-display); text-transform: uppercase; color: var(--dc, var(--gold)); }
.div-text-bronze { --dc: #c0804f; } .div-text-silver { --dc: #b4bcc6; } .div-text-gold { --dc: #e2b55e; } .div-text-platinum { --dc: #4dd0be; } .div-text-elite { --dc: #a066f0; } .div-text-legend { --dc: #ff6b72; }
.season-card { position: relative; isolation: isolate; min-height: 140px; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 10px; padding: 14px; border-radius: var(--r-sm); background: center/cover; text-align: center; overflow: hidden; }
.season-card::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(7,9,12,.9), rgba(7,9,12,.2)); }
.season-card p { margin: 0; color: var(--text); }
.lb .lb-name:hover { color: #fff; text-decoration: underline; }
@media (max-width: 767px) { .faceoff { min-height: 420px; padding-bottom: 110px; } .fo-side img { height: auto; max-height: 260px; max-width: 100%; } .vs-word { font-size: 44px; } .fo-mid .small { display: none; } .arena-cta .find { min-width: 0; width: 100%; } }

/* ---- rankings (mockup) ---- */
.rank-hero { min-height: 200px; padding: 24px 28px; }
.rank-hero .hero-title { font-size: clamp(32px, 3.6vw, 58px); }
.rank-table td, .rank-table th { white-space: nowrap; }
.rank-table td:nth-child(2) { max-width: 200px; overflow: hidden; text-overflow: ellipsis; }
.rank-table tr.gap td { text-align: center; color: var(--faint); padding: 2px; }
.panel.flush { overflow-x: auto; }
.statbox { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; text-align: center; }
.statbox > div { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 2px; background: var(--surface-2); border-radius: var(--r-sm); }
.statbox .ic { color: var(--text-2); } .statbox b { font: 600 20px/1 var(--font-display); } .statbox small { color: var(--muted); font-size: 11px; }
.rankings .menu > a { font-size: var(--fs-base); }

/* ---- match day (mockup) ---- */
.md-hero { position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; gap: 16px; padding: 22px 24px 18px; min-height: 460px; justify-content: space-between;
  border: 1px solid #4a3a3e; border-radius: var(--r-lg); background: #111 center/cover; }
.md-hero::before { content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, color-mix(in srgb, var(--home) 30%, transparent), transparent 40%, transparent 60%, color-mix(in srgb, var(--away) 30%, transparent)), linear-gradient(0deg, rgba(7,9,12,.95), rgba(7,9,12,.35) 50%, rgba(7,9,12,.7)); }
.md-hero.compact { min-height: 0; color: inherit; }
.md-hero .md-top { display: flex; justify-content: center; gap: 10px; align-items: center; color: var(--text-2); text-transform: uppercase; letter-spacing: .08em; }
.md-hero .vs .side { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.md-hero .vs .side .crest { filter: drop-shadow(0 6px 18px rgba(0,0,0,.7)); }
.md-hero .club-name { font-size: clamp(22px, 2.6vw, 38px); text-shadow: 0 3px 12px #000; }
.md-hero .timeline { margin-top: 0; }
.md-hero .fanpower .title { margin-bottom: 2px; }
.mine-side { border-color: color-mix(in srgb, var(--club) 70%, var(--border)); }
.big-n { font: 600 28px/1 var(--font-display); }
.fx-list { display: flex; flex-direction: column; gap: 6px; }
.fx-row { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface-2); }
.fx-row:hover { border-color: #66707c; }
.fx-row.active { border-color: var(--red); box-shadow: var(--glow); background: linear-gradient(90deg, rgba(215,44,53,.18), transparent); }
.fx-row .grow > div:first-child { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.act-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.act-row:last-of-type { border-bottom: 0; }
.act-row .act-ic { width: 40px; height: 40px; display: grid; place-items: center; font-size: 20px; background: var(--inset); border: 1px solid var(--border); border-radius: var(--r-sm); flex-shrink: 0; }
.act-row b { font: 500 var(--fs-md)/1.2 var(--font-body); }
.act-row button { min-width: 84px; }
@media (max-width: 767px) { .md-hero { padding: 16px 12px; min-height: 0; } .md-hero .vs .crest { width: 64px; height: 64px; } .md-hero .vs-word { font-size: 40px; } }
@media (max-width: 1023px) { .matchday > .col:nth-child(2), .arena > .col:nth-child(2) { order: -1; } }
@media (max-width: 640px) { .table td, .table th { padding: 8px 6px; } .hide-sm { display: none; } }
@media (max-width: 1023px) { .layout-3.matchday > .col:first-child { order: 1; } }

/* ---- streets & Fan City map (mockup) ---- */
.city-map { min-height: 560px; aspect-ratio: 16 / 10; }
.city-map::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 45%, transparent 30%, rgba(7,9,12,.75)), linear-gradient(0deg, rgba(7,9,12,.55), rgba(7,9,12,.15)); }
.city-map .pin { z-index: 1; }
.city-map .pin .pin-ic { border-color: color-mix(in srgb, var(--pc, #5a636d) 80%, #000); }
.city-map .pin.own .pin-ic { box-shadow: 0 0 0 2px var(--green), 0 6px 16px rgba(0,0,0,.6); }
.city-map .pin.war .pin-ic { background: #5a1016; animation: pulse 1.4s infinite; }
.city-map .pin.active::after { content: ''; position: absolute; left: 50%; top: 50%; width: 220px; height: 140px; transform: translate(-50%, -20%); z-index: -1; border-radius: 50%;
  background: radial-gradient(ellipse, rgba(215,44,53,.45), transparent 70%); pointer-events: none; }
.city-map .pin-label small { color: var(--text-2); }
.map-legend { position: absolute; left: 12px; right: 12px; bottom: 10px; z-index: 1; padding: 6px 10px; background: rgba(7,9,12,.8); border: 1px solid var(--border); border-radius: var(--r-sm); color: var(--text-2); }
.citymap .mode-card.area { min-height: 72px; }
.citymap .mode-card.area h4 { font-size: 19px; }
.dist-card .dist-art { position: relative; isolation: isolate; min-height: 190px; display: flex; flex-direction: column; justify-content: flex-end; padding: 14px 16px; background: center/cover; }
.dist-card .dist-art::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(7,9,12,.95), rgba(7,9,12,.1) 70%); }
.dist-card .dist-art h2 { font-size: 30px; }
.act-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.act-grid > a { display: grid; grid-template-columns: 30px 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface-2); }
.act-grid > a .ic { grid-row: 1 / 3; color: var(--text-2); }
.act-grid > a b { font: 500 16px/1.1 var(--font-body); } .act-grid > a small { color: var(--muted); font-size: 12px; }
.act-grid > a:hover { border-color: #66707c; }
.act-grid > a.active { border-color: var(--red); background: linear-gradient(90deg, rgba(215,44,53,.22), rgba(215,44,53,.05)); box-shadow: var(--glow); }
.act-grid > a.active .ic { color: var(--red-ink); }
.foe-list { display: flex; flex-direction: column; }
.foe { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.foe:last-child { border-bottom: 0; }
.foe .portrait { width: 48px; flex-shrink: 0; aspect-ratio: 1; }
.foe .portrait img { height: 160%; margin-top: 30%; }
.foe.locked { opacity: .5; }
.reward-grid .rw { font: 600 20px/1 var(--font-display); color: var(--red-ink); }
.dtask { gap: 6px; } .dtask.done { border-color: var(--green); }
@media (max-width: 767px) { .city-map { min-height: 380px; aspect-ratio: auto; } .city-map .pin-ic { width: 36px; height: 36px; } .city-map .pin-label { font-size: 11px; padding: 4px 6px; } .city-map .pin-label small { display: none; } }
@media (max-width: 1023px) { .citymap > .col:nth-child(2) { order: -1; } }

/* ---- side jobs (mockup) ---- */
.job-hero { min-height: 300px; }
.job-hero .hero-title { font-size: clamp(32px, 3.6vw, 56px); }
.job-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 8px; }
.job-card .jc-head { font-size: 13px; }
.job-card { display: flex; flex-direction: column; gap: 6px; padding: 8px; border: 1px solid var(--border); border-radius: var(--r-md); background: linear-gradient(180deg, #181d24, #101419); cursor: pointer; }
.job-card:hover { border-color: #66707c; }
.job-card.active { border-color: var(--red); box-shadow: var(--glow); }
.job-card.locked { opacity: .5; }
.job-card .jc-head { font: 500 15px/1.1 var(--font-display); text-transform: uppercase; text-align: center; min-height: 2.2em; display: grid; place-items: center; }
.job-card .jc-art { height: 86px; border-radius: var(--r-sm); background: center/cover; display: flex; align-items: flex-end; justify-content: flex-end; padding: 4px; }
.job-card .jc-d { text-align: center; min-height: 3.2em; }
.jc-thumb { width: 64px; height: 64px; flex-shrink: 0; border-radius: var(--r-sm); background: center/cover; border: 1px solid var(--border); }
.prof-row { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.prof-row:last-child { border-bottom: 0; }
.prof-row .act-ic { width: 44px; height: 44px; display: grid; place-items: center; font-size: 22px; background: var(--inset); border: 1px solid var(--border); border-radius: var(--r-sm); flex-shrink: 0; }
.loc-card { position: relative; isolation: isolate; display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; min-height: 130px; padding: 12px; border-radius: var(--r-sm); background: center/cover; overflow: hidden; border: 1px solid var(--border); }
.loc-card::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(7,9,12,.92), rgba(7,9,12,.2)); }
.loc-card b { font: 600 20px/1 var(--font-display); text-transform: uppercase; } .loc-card small { color: var(--text-2); } .loc-card .chip { align-self: flex-start; }
@media (max-width: 1023px) { .jobs > .col:nth-child(2) { order: -1; } }

/* ---- my club (mockup) ---- */
.club-hero { min-height: 260px; }
.club-hero .hero-title { font-size: clamp(36px, 4vw, 64px); }
.club-fans { max-height: 520px; overflow-y: auto; }
.crew-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.crew-tile { position: relative; isolation: isolate; min-height: 96px; display: flex; flex-direction: column; justify-content: flex-end; padding: 10px; border-radius: var(--r-sm); background: center/cover; border: 1px solid var(--border); overflow: hidden; }
.crew-tile::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(7,9,12,.92), rgba(7,9,12,.25)); }
.crew-tile:hover { border-color: #66707c; } .crew-tile small { color: var(--text-2); }
.next-match { position: relative; isolation: isolate; display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: var(--r-sm); background: center/cover; overflow: hidden; border: 1px solid var(--border); }
.next-match::before { content: ''; position: absolute; inset: 0; z-index: -1; background: rgba(7,9,12,.7); }
.next-match:hover { border-color: var(--red); }
.vs-small { font: 700 34px/1 var(--font-display); }
.activity > div > span:first-child { width: 22px; text-align: center; }
@media (max-width: 1023px) { .clubbase > .col:nth-child(2) { order: -1; } }

/* ---- landing & login (mockup "Football is more than a game") ---- */
.lhero2 { position: relative; isolation: isolate; min-height: 100svh; display: flex; flex-direction: column; padding: 18px 40px 22px; background: #07090c center/cover; }
.lhero2::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(7,9,12,.92) 0%, rgba(7,9,12,.6) 45%, rgba(7,9,12,.35) 70%, rgba(7,9,12,.75)), linear-gradient(0deg, rgba(7,9,12,.95), transparent 35%); }
.lhero2 .lnav { position: static; padding: 0; gap: 18px; }
.lnav-links { display: flex; gap: 26px; margin-left: 24px; }
.lnav-links a { font: 500 16px/1 var(--font-display); text-transform: uppercase; letter-spacing: .04em; color: #dfe4ea; }
.lnav-links a:hover { color: #fff; }
.lhero2 .lnav select { background: transparent; border-color: transparent; color: var(--text-2); }
.lh-grid { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) 440px; gap: 40px; align-items: center; padding: 30px 0; }
.lh-title { font: 700 clamp(46px, 7vw, 120px)/.9 var(--font-display); text-transform: uppercase; letter-spacing: -.01em; transform: skewX(-8deg); transform-origin: left bottom; text-shadow: 0 6px 24px rgba(0,0,0,.8); max-width: 900px; }
.lh-title em { font-style: normal; color: var(--red); }
.lh-sub { font: 500 clamp(17px, 1.5vw, 22px)/1.4 var(--font-display); text-transform: uppercase; color: var(--text-2); max-width: 560px; margin: 26px 0 30px; }
.lh-feats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; max-width: 760px; }
.lh-feats > div { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 0 6px; border-left: 1px solid rgba(255,255,255,.08); }
.lh-feats > div:first-child { border-left: 0; }
.lh-feats .ic { color: var(--red); } .lh-feats b { font: 600 14px/1.1 var(--font-display); text-transform: uppercase; } .lh-feats small { color: var(--muted); font-size: 12.5px; }
.auth-card { background: rgba(14,17,22,.94); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 22px 26px 24px; box-shadow: 0 30px 80px rgba(0,0,0,.7); backdrop-filter: blur(6px); }
.auth-card .tabs.underline { width: 100%; display: grid; grid-template-columns: 1fr 1fr; }
.auth-card .tabs.underline > * { justify-content: center; font-size: 20px; }
.auth-card .tabs.underline > .active { color: #fff; }
.auth-card .field { width: 100%; }
.auth-card .field .ic { position: absolute; left: 14px; color: var(--muted); }
.auth-card .field .input { padding-left: 44px; }
.auth-card .pw-eye { position: absolute; right: 6px; min-height: 30px; }
.auth-card a.red { color: var(--red-ink); }
.lh-foot { display: flex; align-items: center; gap: 12px; color: var(--muted); font: 500 13px/1 var(--font-display); letter-spacing: .3em; text-transform: uppercase; }
.lh-foot .small { letter-spacing: .04em; display: inline-flex; gap: 6px; align-items: center; }
.lstadium { position: relative; height: 420px; margin: 0 28px 24px; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--border); }
.lstadium canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
@media (max-width: 1023px) {
  .lhero2 { padding: 14px 16px; }
  .lnav-links { display: none; }
  .lh-grid { grid-template-columns: 1fr; gap: 24px; }
  .lh-feats { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 18px; }
  .lh-foot { letter-spacing: .12em; flex-wrap: wrap; }
  .lstadium { margin: 0 12px 20px; height: 280px; }
}

/* ---- events (mockup) ---- */
.ev-hero { min-height: 340px; color: inherit; }
.ev-hero .hero-title { font-size: clamp(34px, 4vw, 64px); }
.ev-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.ev-card { position: relative; isolation: isolate; min-height: 130px; display: flex; flex-direction: column; justify-content: flex-end; gap: 3px; padding: 10px; border-radius: var(--r-sm); background: center/cover; border: 1px solid var(--border); overflow: hidden; }
.ev-card::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(7,9,12,.95), rgba(7,9,12,.3)); }
.ev-card .chip { align-self: flex-start; margin-bottom: auto; }
.ev-card:hover { border-color: var(--red); } .ev-card small { color: var(--text-2); }
.up-list { display: flex; flex-direction: column; gap: 6px; }
.up-row { display: flex; align-items: center; gap: 10px; padding: 6px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface-2); }
.up-row:hover { border-color: #66707c; }
.up-thumb { width: 72px; height: 48px; flex-shrink: 0; border-radius: 3px; background: center/cover; }
.calendar > div { cursor: pointer; }
.calendar > div.has { box-shadow: inset 0 -2px 0 var(--red); }
@media (max-width: 1023px) { .events > .col:nth-child(2) { order: -1; } }
@media (max-width: 1023px) { .citymap > .col:first-child, .jobs > .col:first-child { order: 1; } }

/* ==== v0.14 ==== */
/* hero strip (bigger: name, level, HP / energy / XP, money) */
.statusbar { padding: 10px var(--s4); }
.hud { gap: 18px; flex-wrap: nowrap; }
.hud-me { display: flex; align-items: center; gap: 12px; min-width: 0; flex-shrink: 0; }
.hud-ava { width: 56px; height: 56px; flex-shrink: 0; border-radius: var(--r-sm); overflow: hidden; border: 1px solid var(--border-strong); background: radial-gradient(circle at 50% 30%, #262d36, var(--inset) 72%); }
.hud-ava img { width: 100%; height: 260%; object-fit: cover; object-position: 50% 0; }
.hud-id { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.hud-id .nm { font: 600 22px/1 var(--font-display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
.hud-sub { display: flex; align-items: center; gap: 8px; }
.hud-sub .lvl { font: 500 15px/1 var(--font-display); text-transform: uppercase; color: var(--text-2); } .hud-sub .lvl b { color: var(--red-ink); font-size: 18px; }
.hud .bars { flex: 1; max-width: 760px; gap: 14px; }
.hud-bar { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.hud-bar .hb-l { font: 500 12px/1 var(--font-display); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); display: flex; align-items: center; gap: 5px; }
.hud .bar { height: 24px; }
.hud .bar > b { font-size: 13px; }
.hud-cur { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.hud-cur .cur { height: 40px; font-size: 18px; padding: 0 12px; }
@media (max-width: 1100px) {
  .hud { flex-wrap: wrap; gap: 10px 14px; }
  .hud .bars { order: 5; flex-basis: 100%; max-width: none; }
}
@media (max-width: 640px) {
  .statusbar { padding: 8px 12px; }
  .hud-ava { width: 44px; height: 44px; }
  .hud-id .nm { font-size: 18px; max-width: 140px; }
  .hud-cur { margin-left: auto; }
  .hud-cur .cur { height: 34px; font-size: 15px; padding: 0 8px; }
  .hud .bars { gap: 8px; }
  .hud-bar .hb-l { font-size: 10.5px; }
  .hud .bar { height: 20px; } .hud .bar > b { font-size: 11px; }
}
/* top nav: main items + "More"; switch to the bottom bar before items get clipped */
.nav-more { position: relative; display: flex; }
.nav-more-btn { height: 100%; min-height: 0; border: 0; border-left: 1px solid #222830; border-radius: 0; background: transparent; padding: 0 16px; font: 500 14px/1 var(--font-display); color: #dfe4ea; }
.nav-more-btn.active { color: #fff; box-shadow: inset 0 -2px 0 var(--red); }
.nav-drop { position: absolute; right: 0; top: 100%; z-index: 40; min-width: 220px; display: flex; flex-direction: column; padding: 6px; background: #0d1014; border: 1px solid #3a2025; border-radius: 0 0 var(--r-sm) var(--r-sm); box-shadow: 0 16px 30px rgba(0,0,0,.6); }
.topbar .nav .nav-drop a { border-left: 0; padding: 12px 14px; border-radius: var(--r-sm); }
.topbar .nav .nav-drop a .ic { display: inline-block; }
.topbar .nav { overflow: visible; }
/* 1024–1560: the bar can't hold every item — a "Menu" button opens all of them; phones keep the bottom bar */
.menu-btn { display: none; gap: 8px; min-height: 40px; background: transparent; border-color: var(--border); }
.full-menu { position: fixed; top: var(--topbar-h); left: 0; right: 0; z-index: 35; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 6px; padding: 12px var(--s4);
  background: rgba(10, 12, 16, .98); border-bottom: 1px solid #5c1d22; box-shadow: 0 16px 30px rgba(0,0,0,.6); }
.full-menu a { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: var(--r-sm); background: var(--surface-2); font: 500 14px/1 var(--font-display); text-transform: uppercase; letter-spacing: .04em; color: var(--text-2); }
.full-menu a:hover, .full-menu a.active { color: #fff; box-shadow: inset 0 0 0 1px var(--red); }
@media (max-width: 1560px) {
  .topbar .nav { display: none; }
  .topbar .tools { margin-left: auto; }
  .menu-btn { display: inline-flex; }
}
@media (max-width: 1023px) {
  .menu-btn, .full-menu { display: none !important; }
  .bottom-nav { display: flex; }
  .chat-fab { bottom: 76px; } .chat { bottom: 140px; } main { padding-bottom: 120px; }
}
/* item popup */
.item-modal { width: min(680px, calc(100vw - 24px)); max-height: calc(100vh - 32px); overflow-y: auto; padding: 22px; position: relative; }
.item-modal .dlg-x { position: absolute; right: 10px; top: 10px; z-index: 2; }
.item-info { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 20px; }
.item-info > * { min-width: 0; }
.ii-art { position: relative; aspect-ratio: 1; display: flex; align-items: center; justify-content: center; border-radius: var(--r-md); border: 1px solid color-mix(in srgb, var(--rc, #555) 60%, #000);
  background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--rc, #333) 30%, #1d232a), var(--inset) 72%); }
.ii-art img.iico { width: 82%; height: 82%; filter: drop-shadow(0 10px 14px rgba(0,0,0,.6)); }
.ii-art .emo { font-size: 90px; }
.ii-art .rarity { position: absolute; left: 8px; top: 8px; }
.ii-name { text-transform: none; font-size: 24px; margin: 0 30px 4px 0; }
.ii-desc { color: var(--text-2); margin: 10px 0; }
.item-info h4 { margin: 12px 0 6px; }
.bonus-table { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 4px 14px; }   /* as many columns as fit: the market sell panel is half width */
.bonus-table > div { display: grid; grid-template-columns: minmax(0, 1fr) auto 46px; gap: 8px; padding: 5px 8px; border-radius: 3px; background: var(--surface-2); font-size: 14px; min-width: 0; }
.bonus-table > div > span { min-width: 0; overflow-wrap: anywhere; }
.bonus-table > div b { color: var(--green); font-variant-numeric: tabular-nums; }
.bonus-table > div i { font-style: normal; text-align: right; color: var(--muted); font-size: 12px; }
.bonus-table > div i.up { color: var(--green); } .bonus-table > div i.down { color: var(--danger); }
.bonus-table > div.special { background: var(--tint-gold); } .bonus-table > div.special span { color: var(--gold); }
.ii-passive { display: flex; flex-direction: column; gap: 3px; margin-top: 10px; padding: 10px 12px; border: 1px solid rgba(226,181,94,.45); border-radius: var(--r-sm); background: var(--tint-gold); }
.ii-passive b { color: var(--gold); font: 600 15px/1.2 var(--font-display); text-transform: uppercase; display: flex; gap: 6px; align-items: center; } .ii-passive span { font-size: 13.5px; color: var(--text-2); }
.ii-price { margin-top: 10px; }
.ii-actions { margin-top: 16px; justify-content: flex-end; }
@media (max-width: 640px) {
  .item-modal { padding: 16px; }
  .item-info { grid-template-columns: 1fr; gap: 12px; }
  .ii-art { max-width: 180px; margin: 0 auto; width: 100%; }
  .bonus-table { grid-template-columns: 1fr; }
  .ii-actions { position: sticky; bottom: -16px; background: #13171c; padding: 10px 0 4px; margin-bottom: -4px; }
  .ii-actions button { flex: 1; }
}
/* parameters */
.derived small .q { font-style: normal; display: inline-grid; place-items: center; width: 14px; height: 14px; border-radius: 50%; border: 1px solid var(--border-strong); font-size: 9px; color: var(--muted); margin-left: 2px; }
.derived > div[title] { cursor: help; }
.sec-head { margin: 14px 0 4px; font-size: var(--fs-sm); color: var(--muted); }
.injury { display: flex; flex-direction: column; gap: 2px; padding: 8px 12px; margin-bottom: 10px; border: 1px solid rgba(240,91,97,.5); border-radius: var(--r-sm); background: var(--tint-bad); }
.injury b { color: var(--danger); font: 600 15px/1.2 var(--font-display); text-transform: uppercase; } .injury span { font-size: 13px; color: var(--text-2); }
/* street opponents: show heads, not boots */
.foe .portrait { width: 56px; height: 56px; aspect-ratio: auto; align-items: flex-start; }
.foe .portrait img { height: 300%; width: auto; max-width: none; margin-top: 0; object-fit: cover; object-position: 50% 0; transform: translateY(-4%); }
/* stats: 6 attributes */
.s-int .ic { color: var(--stat-int); }

/* workshop */
.workshop .menu > button { min-height: 0; justify-content: flex-start; text-transform: none; font: 400 var(--fs-md)/1.2 var(--font-body); letter-spacing: 0; }
.workshop .menu .pi { width: 22px; text-align: center; }
.prof-big { width: 64px; height: 64px; flex-shrink: 0; display: grid; place-items: center; font-size: 34px; border-radius: var(--r-md); background: var(--inset); border: 1px solid var(--border); }
.filters { gap: 8px; }
.filters select { width: auto; }
.recipe-list { display: flex; flex-direction: column; }
.recipe { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.recipe:last-child { border-bottom: 0; }
.recipe.locked { opacity: .55; }
.recipe .ri-art { width: 64px; height: 64px; flex-shrink: 0; padding: 4px; min-height: 0; }
.recipe .ri-art .emo { font-size: 30px; }
.recipe .ri-ing { gap: 4px; margin-top: 6px; }
.recipe .ri-ing .chip { font-size: 11px; }
.ri-btns { display: flex; gap: 6px; flex-shrink: 0; }
.link-btn { background: none; border: 0; padding: 0; min-height: 0; text-transform: none; letter-spacing: 0; font: inherit; color: var(--text); text-align: left; }
.link-btn:hover:not(:disabled) { background: none; color: #fff; text-decoration: underline; }
.res-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 6px; }
.res-cell { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-sm); text-align: center; }
.res-cell .emo { font-size: 22px; } .res-cell b { font: 600 18px/1 var(--font-display); } .res-cell small { font-size: 11px; color: var(--muted); line-height: 1.1; }
.res-cell.zero { opacity: .45; }
@media (max-width: 640px) {
  .recipe { flex-wrap: wrap; padding: 10px; }
  .recipe .grow { flex-basis: calc(100% - 80px); }
  .ri-btns { width: 100%; justify-content: flex-end; }
  .prof-big { width: 48px; height: 48px; font-size: 26px; }
}
/* market: sell with a preview */
.sell-pick { max-height: 240px; overflow-y: auto; padding: 2px; }
.sell-preview { margin: 12px 0; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--inset); }
.sell-preview .item-info { grid-template-columns: 120px minmax(0, 1fr); gap: 14px; }
.sell-preview .ii-name { font-size: 19px; }
.sell-form { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; align-items: start; }
.sell-form label { display: flex; flex-direction: column; gap: 4px; }
.sell-form label > span { font: 500 13px/1 var(--font-display); text-transform: uppercase; letter-spacing: .05em; color: var(--text-2); }
.sell-form label small { color: var(--muted); font-size: 12px; }
.sell-sum { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; background: var(--surface-2); border-radius: var(--r-sm); }
.sell-sum > div { display: flex; justify-content: space-between; font-size: 14px; } .sell-sum .net { border-top: 1px solid var(--line); padding-top: 6px; margin-top: 2px; font-size: 16px; }
.sell-form > button { grid-column: 1 / -1; }
@media (max-width: 640px) { .sell-preview .item-info { grid-template-columns: 1fr; } .sell-form { grid-template-columns: 1fr; } }

/* crews */
.emblem { flex-shrink: 0; vertical-align: middle; filter: drop-shadow(0 2px 4px rgba(0,0,0,.5)); }
.emblem.big { filter: drop-shadow(0 8px 18px rgba(0,0,0,.7)); }
.crew-hero { min-height: 200px; }
.crew-list { display: flex; flex-direction: column; gap: 6px; }
.crew-row { display: flex; align-items: center; gap: 10px; padding: 8px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface-2); }
.crew-row:hover { border-color: #66707c; }
.req-list { display: flex; gap: 6px; flex-wrap: wrap; }
.fld { display: flex; flex-direction: column; gap: 4px; } .fld > span { font: 500 12px/1 var(--font-display); text-transform: uppercase; letter-spacing: .05em; color: var(--text-2); }
.em-editor { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 16px; align-items: start; }
.em-preview { display: grid; place-items: center; padding: 10px; border-radius: var(--r-md); background: radial-gradient(circle, #262d36, var(--inset) 75%); border: 1px solid var(--border); }
.em-opts { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.em-row > span { display: block; font: 500 12px/1 var(--font-display); text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 6px; }
.em-choices { display: flex; flex-wrap: wrap; gap: 4px; }
.em-choices button { width: 42px; height: 42px; min-height: 0; padding: 0; background: var(--inset); }
.em-choices button.on { border-color: var(--red); box-shadow: var(--glow); }
.em-row input[type=color] { width: 48px; height: 36px; padding: 2px; }
.why-list { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 8px; color: var(--text-2); }
.roles-table { display: flex; flex-direction: column; }
.role-row { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 2px 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.role-row:last-child { border-bottom: 0; }
.role-row .perm-chips { grid-column: 2; display: flex; flex-wrap: wrap; gap: 4px; }
.role-row .perm-chips .chip { font-size: 10.5px; min-height: 18px; padding: 1px 6px; }
.crew-head { display: flex; gap: 20px; align-items: center; background: linear-gradient(110deg, color-mix(in srgb, var(--c1) 35%, #12161b), #12161b 55%); }
.crew-head h1 { margin: 2px 0; font-size: 34px; text-transform: none; }
.crew-motto { margin: 2px 0 0; color: var(--text-2); font-style: italic; }
.crew-head-actions { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.crew-tabs { margin: 0; }
.perk-list { display: flex; flex-direction: column; gap: 6px; }
.perk-list > div { display: grid; grid-template-columns: 28px minmax(0, 1fr); column-gap: 8px; padding: 8px; background: var(--surface-2); border-radius: var(--r-sm); }
.perk-list > div span { grid-row: 1 / 3; font-size: 20px; } .perk-list small { color: var(--muted); }
.post-form { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.posts { display: flex; flex-direction: column; gap: 8px; }
.post { padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface-2); }
.post.pinned { border-color: rgba(226,181,94,.5); background: var(--tint-gold); }
.post-text { margin-top: 4px; white-space: normal; overflow-wrap: anywhere; }
@media (max-width: 767px) {
  .crew-head { flex-direction: column; text-align: center; align-items: center; }
  .crew-head .row { justify-content: center; }
  .crew-head-actions { align-items: stretch; width: 100%; }
  .em-editor { grid-template-columns: 1fr; }
  .em-preview { max-width: 160px; margin: 0 auto; }
  .role-row { grid-template-columns: 1fr; } .role-row .perm-chips { grid-column: 1; }
}

/* public character page */
.pub { max-width: 1280px; margin: 0 auto; padding: 18px 16px 40px; }
.pub-top { display: flex; justify-content: center; padding: 6px 0 18px; }
.pub-top img { height: 64px; width: auto; filter: drop-shadow(0 4px 12px rgba(0,0,0,.7)); }
.pub-hero { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 16px; align-items: start; margin-bottom: 16px; }
.pub-id { padding: 18px; background: linear-gradient(135deg, rgba(20,25,31,.96), rgba(13,16,21,.96)); border: 1px solid var(--border); border-radius: var(--r-lg); }
.pub-name { font-size: 34px; text-transform: none; margin: 0 0 4px; }
.pub-id .lvl { font: 500 18px/1 var(--font-display); text-transform: uppercase; } .pub-id .lvl b { color: var(--red-ink); font-size: 22px; }
.pub .stage { min-height: 600px; }
.pub .stage .slot[title] { cursor: zoom-in; }
.pub-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.pub-bio, .pub-ach, .pub-grid > .fan-stats, .pub-more { grid-column: 1 / -1; }   /* full width: nothing to pair them with */
.pub-profs { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 8px; }
.pub-profs .prof-row { padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface-2); }
.pub-profs .prof-row:last-child { border-bottom: 1px solid var(--line); }
.bio-text { white-space: normal; overflow-wrap: anywhere; color: var(--text-2); font-size: var(--fs-md); line-height: 1.55; }
.pub-foot { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 26px; }
.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.ach { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 8px; text-align: center; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface-2); opacity: .38; filter: grayscale(1); }
.ach b { font: 600 14px/1.1 var(--font-display); text-transform: uppercase; } .ach small { color: var(--muted); font-size: 11.5px; }
.ach.done { opacity: 1; filter: none; }
.ach.done.t1 .ic { color: var(--bronze); } .ach.done.t2 .ic { color: var(--silver); } .ach.done.t3 .ic { color: var(--gold); }
.ach.done.t3 { border-color: rgba(226,181,94,.5); box-shadow: inset 0 0 18px rgba(226,181,94,.12); }
.char-layout .ach-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); max-height: 300px; overflow-y: auto; }
@media (max-width: 1023px) { .pub-hero, .pub-grid { grid-template-columns: 1fr; } .pub .stage { min-height: 480px; } }
@media (max-width: 640px) { .pub { padding: 12px 10px 30px; } .pub-top img { height: 48px; } .pub-name { font-size: 26px; } .ach-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* market rows */
.mk-list { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.mk-row { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface-2); }
.mk-row.me { box-shadow: inset 3px 0 0 var(--red); }
.mk-row .mk-art { width: 56px; height: 56px; padding: 4px; min-height: 0; }
.mk-row .mk-art .emo { font-size: 26px; }
.mk-main { min-width: 0; } .mk-main b { overflow-wrap: anywhere; }
.mk-price { display: flex; flex-direction: column; align-items: flex-end; } .mk-price small { color: var(--muted); font-size: 11px; }
.mk-buy { display: flex; gap: 6px; } .mk-buy .input { width: 70px; min-height: 38px; padding: 0 8px; }
.mk-row.small-row { grid-template-columns: 40px minmax(0, 1fr) auto; }
.mk-ic { width: 40px; height: 40px; display: grid; place-items: center; font-size: 22px; } .mk-ic img.iico { width: 100%; height: 100%; }
@media (max-width: 640px) {
  .mk-row { grid-template-columns: 52px minmax(0, 1fr) auto; }
  .mk-row .mk-buy { grid-column: 1 / -1; } .mk-buy .input { flex: 0 0 80px; } .mk-buy button { flex: 1; }
}
/* touch: comfortable tap targets on phones (Telegram / APK) */
@media (max-width: 767px), (pointer: coarse) {
  button, .btn { min-height: 40px; }
  button.sm, .btn.sm { min-height: 36px; padding: 0 12px; font-size: 12.5px; }
  .tabs > * { min-height: 40px; }
  input:not([type=checkbox]):not([type=radio]):not([type=range]), select { min-height: 42px; font-size: 16px; }   /* checkboxes keep their own size */        /* 16px stops iOS zooming into inputs */
  textarea { font-size: 16px; }
  .em-choices button { width: 44px; height: 44px; }
  .slot { min-width: 44px; }
}
.show-more { width: 100%; margin-top: 10px; }

.build-prof .panel { height: 100%; }
.build-ic { width: 44px; height: 44px; display: grid; place-items: center; flex-shrink: 0; background: var(--inset); border: 1px solid var(--border); border-radius: var(--r-sm); color: var(--red-ink); }
@media (max-width: 1399px) and (min-width: 1024px) { .char-layout .build-prof { grid-template-columns: 1fr; } }

/* ---- v0.15: inventory screen ---- */
.inv-layout { display: grid; grid-template-columns: minmax(340px, 460px) 1fr; gap: var(--s4); align-items: start; }
.inv-layout > .col { display: flex; flex-direction: column; gap: var(--s4); min-width: 0; }
.inv-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.inv-card { display: flex; align-items: center; gap: 10px; padding: 8px; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface-2); min-width: 0; }
.inv-card .slot { width: 56px; height: 56px; flex-shrink: 0; position: relative; cursor: pointer; }
.inv-card .slot .q { position: absolute; top: 3px; right: 5px; font: 600 11px/1 var(--font-body); color: var(--text-2); text-shadow: 0 1px 2px #000; }
.inv-card .slot .emo { font-size: 28px; line-height: 1; }
.inv-card .grow { min-width: 0; cursor: pointer; }
.inv-card .nm { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inv-card .bad { color: var(--danger); }
.inv-card button { flex-shrink: 0; }
.inv-peek { grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); }
@media (max-width: 1023px) { .inv-layout { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .inv-list { grid-template-columns: 1fr; } .inv-card .slot { width: 48px; height: 48px; } }

/* ---- v0.15: settings ---- */
.settings { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s4); align-items: start; }
.set-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.set-row > .grow { flex: 1 1 240px; min-width: 0; }   /* on a phone a wide control drops under its text instead of squeezing it */
.set-row > select { flex: 1 1 200px; max-width: 100%; }
.set-row:last-child { border-bottom: 0; }
.set-row b { display: block; } .set-row small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.set-row select { min-height: 40px; }
.switch { position: relative; width: 46px; height: 26px; flex-shrink: 0; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.switch i { position: absolute; inset: 0; border-radius: 999px; background: var(--inset); border: 1px solid var(--border); transition: background .15s; pointer-events: none; }
.switch i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--text-2); transition: transform .15s, background .15s; }
.switch input:checked + i { background: var(--red); border-color: var(--red); }
.switch input:checked + i::after { transform: translateX(20px); background: #fff; }
.switch input:focus-visible + i { outline: 2px solid var(--red); outline-offset: 2px; }
.set-link { display: flex; gap: 8px; align-items: center; margin-top: 10px; }
.set-link .input { flex: 1; min-width: 0; }
.set-pw { display: grid; gap: 10px; max-width: 420px; }
.fld { display: grid; gap: 4px; } .fld > span { font-size: 12.5px; color: var(--muted); }
.tal-val { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 3px; color: var(--text-2); }
.tal-val b { color: var(--text); }
.pub-note { max-width: 980px; margin: 0 auto 10px; padding: 10px 14px; border-radius: var(--r-sm); background: var(--surface-2); border: 1px solid var(--border); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pub-acts { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 22px; }
body.no-chat .chat-fab, body.no-chat .chat { display: none !important; }
body.reduce-motion *, body.reduce-motion *::before, body.reduce-motion *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
@media (max-width: 1023px) { .settings { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .set-link { flex-wrap: wrap; } .set-link .input { flex-basis: 100%; } }
.settings .sec-head { margin: 16px 0 10px; }
/* phones / tablets: figure → backpack → parameters */
@media (max-width: 1023px) { .inv-layout { display: flex; flex-direction: column; } .inv-layout > .col { display: contents; } .inv-params { order: 2; } }

/* ---- v0.16: fight narration ---- */
.fight-log { max-height: 520px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; font-size: 14px; padding-right: 4px; }
.fight-log .fr { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 10px 12px; }
.fight-log .fr.latest { border-color: var(--red); box-shadow: 0 0 0 1px rgba(214, 40, 57, .25), 0 8px 24px rgba(0, 0, 0, .35); animation: frIn .45s ease-out; }
@keyframes frIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.fight-log .fr-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.fight-log .fr-head > b { font: 600 13px/1 var(--font-display); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.fight-log .fr-hp { position: relative; display: inline-flex; align-items: center; min-width: 120px; height: 20px; padding: 0 8px; border-radius: 999px; background: var(--inset); overflow: hidden; font-size: 11.5px; }
.fight-log .fr-hp i { position: absolute; inset: 0 auto 0 0; background: rgba(46, 160, 90, .35); }
.fight-log .fr-hp.them i { background: rgba(214, 40, 57, .35); }
.fight-log .fr-hp span { position: relative; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 160px; }
.fight-log .fr-body { display: flex; flex-direction: column; gap: 4px; }
.fl { display: grid; grid-template-columns: 22px 1fr auto; gap: 8px; align-items: start; padding: 5px 8px; border-radius: 8px; border-left: 3px solid transparent; line-height: 1.4; }
.fl.us { border-left-color: var(--success, #2ea05a); background: rgba(46, 160, 90, .06); }
.fl.them { border-left-color: var(--red); background: rgba(214, 40, 57, .06); }
.fl .fi { text-align: center; }
.fl .ft b { color: var(--text); font-weight: 600; }
.fl .ft i { color: var(--gold); font-style: normal; }
.fl .fd { font: 600 14px/1.3 var(--font-display); color: var(--danger, #ff5a5f); white-space: nowrap; }
.fl .fd.heavy { color: #fff; background: var(--red); padding: 0 6px; border-radius: 6px; }
.fl-crit .ft, .fl-crit_guard .ft, .fl-gb .ft { color: #ffd2d5; font-weight: 600; }
.fl-crit .ft { text-transform: none; }
.fl-guard .ft { color: var(--text-2); }
.fl-dodge .ft { color: #b9d3ff; font-style: italic; }
.fl-ab .ft, .fl-sw .ft { color: var(--gold); }
.fl-call .ft { color: var(--club); }
.fl-ko { background: rgba(0, 0, 0, .35) !important; }
.fl-ko .ft { font-weight: 700; text-transform: uppercase; letter-spacing: .02em; }
.fl-more { display: block; color: var(--muted); font-size: 12.5px; padding: 2px 8px; }
.fight-log .fr-start, .fight-log .fr-end { padding: 8px 12px; }
.fight-log .fr-start .fl, .fight-log .fr-end .fl { border: 0; background: none; }
.fight-log .fr-start { color: var(--text-2); font-style: italic; }
.fight-log .fr-end { font: 600 16px/1.3 var(--font-display); text-transform: uppercase; }
.fight-log .fr-end.won { border-color: var(--success, #2ea05a); background: linear-gradient(90deg, rgba(46, 160, 90, .22), transparent); }
.fight-log .fr-end.lost { border-color: var(--red); background: linear-gradient(90deg, rgba(214, 40, 57, .22), transparent); }
.fl-legend { display: flex; gap: 12px; font-size: 12px; } .fl-legend .us { color: var(--success, #2ea05a); } .fl-legend .them { color: var(--red); }
.fl-balance { margin-top: 8px; text-align: right; font-size: 11px; opacity: .6; }
@media (max-width: 640px) { .fight-log { max-height: 440px; font-size: 13.5px; } .fl { grid-template-columns: 18px 1fr auto; gap: 6px; padding: 5px 6px; } .fight-log .fr-hp { min-width: 0; flex: 1; } }

/* ---- v0.16: landing marquees (matches + clubs run on their own; hover / touch pauses) ---- */
.ticker { display: block; overflow: hidden; padding: 18px 0 22px; scroll-snap-type: none; mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.ticker-track { display: flex; gap: 12px; width: max-content; animation: marquee var(--dur, 60s) linear infinite; }
.ticker-dup { display: contents; }
.ticker .card { min-width: 270px; flex: 0 0 270px; }
.ticker:hover .ticker-track, .ticker:active .ticker-track, .crest-wall:hover .crest-row, .crest-wall:active .crest-row { animation-play-state: paused; }
body.reduce-motion .ticker { overflow-x: auto; } body.reduce-motion .ticker-dup { display: none; }

/* ---- v0.16: custom scrollbars everywhere ---- */
* { scrollbar-width: thin; scrollbar-color: #5c1d22 transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: linear-gradient(180deg, #7a1f27, #4a1418); border-radius: 999px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: var(--red); background-clip: padding-box; }
::-webkit-scrollbar-corner { background: transparent; }
html { scrollbar-color: #5c1d22 #0b0d11; }

/* ---- v0.16: legal — consent boxes, age gate, cookie notice, documents ---- */
.consent-box { display: grid; gap: 8px; text-align: left; }
.check { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; font-size: 13.5px; line-height: 1.4; color: var(--text-2); cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--red); cursor: pointer; }
.check a { color: var(--text); text-decoration: underline; text-underline-offset: 2px; }
.age-gate { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 16px; background: rgba(5, 6, 9, .55); backdrop-filter: blur(1.5px); }
.age-card { width: min(460px, 100%); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md, 14px); padding: 26px 22px; text-align: center; box-shadow: 0 30px 80px rgba(0, 0, 0, .7); display: grid; gap: 12px; justify-items: center; }
.age-card img { height: 54px; width: auto; }
.age-card h2 { margin: 0; font: 600 26px/1.1 var(--font-display); text-transform: uppercase; }
.age-card p { margin: 0; color: var(--text-2); }
.age-card .small a { margin: 0 6px; color: var(--muted); }
.age-badge { width: 74px; height: 74px; border-radius: 50%; display: grid; place-items: center; font: 700 26px/1 var(--font-display); color: #fff; background: var(--red); box-shadow: 0 0 0 6px rgba(214, 40, 57, .25); }
.cookie-bar { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 900; max-width: 760px; margin: 0 auto; display: flex; align-items: center; gap: 14px; padding: 14px 16px;
  background: rgba(16, 18, 24, .97); border: 1px solid var(--border); border-radius: var(--r-sm); box-shadow: 0 18px 50px rgba(0, 0, 0, .6); }
.cookie-bar p { margin: 0; flex: 1; font-size: 13.5px; color: var(--text-2); } .cookie-bar a { color: var(--text); text-decoration: underline; }
.cookie-bar .ck-ic { font-size: 24px; } .cookie-bar button { flex-shrink: 0; min-width: 84px; }
.legal-links { display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: center; margin-bottom: 10px; }
.legal-links.left { justify-content: flex-start; margin: 0 0 6px; }
.legal-links a { color: var(--text-2); text-decoration: underline; text-underline-offset: 2px; font-size: 13px; }
.lfoot p { margin: 6px 0 0; } .lfoot a { color: var(--text-2); }
.legal .legal-tabs { max-width: 900px; margin: 0 auto 14px; display: flex; flex-wrap: wrap; justify-content: center; }
.legal .legal-tabs a { padding: 10px 14px; }
.legal-doc { max-width: 900px; margin: 0 auto; padding: 24px 28px; line-height: 1.6; color: var(--text-2); }
.legal-doc h1 { font: 600 34px/1.1 var(--font-display); text-transform: uppercase; color: var(--text); margin: 0 0 14px; }
.legal-doc h2 { font: 600 20px/1.2 var(--font-display); text-transform: uppercase; color: var(--text); margin: 22px 0 6px; }
.legal-doc ul { padding-left: 20px; margin: 6px 0; } .legal-doc li { margin: 4px 0; }
.legal-doc a { color: var(--text); }
.legal-note { padding: 10px 12px; border-radius: var(--r-sm); background: var(--surface-2); border: 1px solid var(--border); }
.consent-card { max-width: 520px; margin: 20px auto; display: grid; gap: 12px; }
.consent-card h2 { margin: 0; font: 600 26px/1.1 var(--font-display); text-transform: uppercase; }
.danger-zone { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.danger-zone summary { cursor: pointer; color: var(--danger, #ff5a5f); font-weight: 600; padding: 6px 0; }
button.danger { background: #8e1620; border-color: #b51d29; color: #fff; }
@media (max-width: 640px) { .cookie-bar { flex-wrap: wrap; bottom: 72px; left: 10px; right: 10px; } .cookie-bar p { flex-basis: calc(100% - 40px); } .cookie-bar button { width: 100%; } .legal-doc { padding: 18px 16px; } .legal-doc h1 { font-size: 26px; } }
/* narrow phones: the landing top row must never push the page sideways */
.landing { overflow-x: clip; }
@media (max-width: 420px) { .lnav { flex-wrap: wrap; row-gap: 8px; } .lnav select { max-width: 120px; } .lnav .llogo { height: 40px; width: auto; } }

/* ---- v0.17: report = reason + button ---- */
.report-box { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.report-box select { min-height: 36px; }
#cBox { margin: 4px 0 2px; }
#app > .ssr { max-width: 900px; margin: 40px auto; padding: 0 16px; color: var(--text-2); }

/* ---- v0.18: notifications popup ---- */
.bell-wrap { position: relative; display: inline-flex; }
.notif-pop { position: absolute; top: calc(100% + 10px); right: -8px; z-index: 60; width: 360px; max-height: min(70vh, 520px); display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-sm); box-shadow: 0 18px 50px rgba(0, 0, 0, .65); overflow: hidden; }
.notif-pop.hidden { display: none; }
.np-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line); font: 600 15px/1 var(--font-display); text-transform: uppercase; letter-spacing: .04em; }
.np-sub { padding: 8px 14px 0; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.np-list { list-style: none; margin: 0; padding: 6px; overflow-y: auto; flex: 1; }
.np-list li { display: grid; gap: 3px; padding: 9px 10px; border-radius: 8px; font-size: 13.5px; line-height: 1.4; color: var(--text-2); }
.np-list li + li { border-top: 1px solid var(--line); }
.np-list li.new { background: rgba(214, 40, 57, .08); color: var(--text); box-shadow: inset 3px 0 0 var(--red); }
.np-list time { font-size: 11.5px; color: var(--muted); }
.np-empty { padding: 22px 14px; text-align: center; color: var(--muted); font-size: 13.5px; }
.np-all { margin: 8px; justify-content: center; text-align: center; }
@media (max-width: 640px) { .notif-pop { position: fixed; top: var(--topbar-h, 60px); left: 8px; right: 8px; width: auto; max-height: calc(100vh - 160px); } }

.cookie-bar .ck-btns { display: flex; gap: 8px; flex-shrink: 0; }
@media (max-width: 640px) { .cookie-bar .ck-btns { width: 100%; } .cookie-bar .ck-btns button { flex: 1; } }

/* ---- v0.19: auth extras, feedback ---- */
.forgot { display: block; margin-top: 2px; text-decoration: underline; text-underline-offset: 2px; }
.forgot.hidden { display: none; }
.warn-text { color: var(--warning, #f5b041); }
.fb-layout { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: var(--s4); align-items: start; }
.fb-kinds { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.fb-kinds button { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 6px; min-height: 64px; font: 600 13px/1.1 var(--font-display); text-transform: uppercase; }
.fb-kinds button span { font-size: 22px; }
.fb-kinds button.on { border-color: var(--red); box-shadow: inset 0 0 0 1px var(--red); color: #fff; }
.fb-item { padding: 12px 0; border-bottom: 1px solid var(--line); }
.fb-item:last-child { border-bottom: 0; }
.fb-text { margin: 6px 0 0; white-space: pre-wrap; color: var(--text-2); font-size: 14px; }
.fb-reply { margin-top: 8px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--surface-2); border-left: 3px solid var(--club); }
.fb-reply p { margin: 4px 0 0; font-size: 14px; }
.fb-item .ua { margin-top: 4px; font-size: 11px; word-break: break-all; }
.chip.fb-new { background: rgba(214, 40, 57, .18); color: #ffb3ba; } .chip.fb-progress { background: rgba(245, 176, 65, .18); color: #ffd58a; }
.chip.fb-done { background: rgba(46, 160, 90, .2); color: #9fe0b7; } .chip.fb-declined { opacity: .7; }
@media (max-width: 1023px) { .fb-layout { grid-template-columns: 1fr; } }
@media (max-width: 420px) { .fb-kinds { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---- v0.19: apps (Telegram bot, Android) ---- */
.apps-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 18px; }
.app-card { display: flex; gap: 16px; padding: 20px; border-radius: var(--r-md, 14px); border: 1px solid var(--border); background: var(--surface); }
.app-card.tg { background: linear-gradient(135deg, rgba(42, 171, 238, .16), transparent 60%), var(--surface); }
.app-card.android { background: linear-gradient(135deg, rgba(61, 220, 132, .12), transparent 60%), var(--surface); }
.app-card .app-ic { width: 56px; height: 56px; border-radius: 14px; display: grid; place-items: center; flex-shrink: 0; background: var(--inset); color: #fff; }
.app-card.tg .app-ic { background: #2aabee; } .app-card.android .app-ic { background: #2f9e5b; }
.app-card h4 { margin: 0 0 6px; font: 600 22px/1.1 var(--font-display); text-transform: uppercase; }
.app-card p { margin: 0 0 8px; color: var(--text-2); }
.app-feats { margin: 0 0 14px; padding-left: 18px; color: var(--text-2); font-size: 14px; }
.app-feats li { margin: 3px 0; }
.app-card .btn, .app-card button { display: inline-flex; align-items: center; gap: 8px; }
.apps-grid.compact { grid-template-columns: 1fr; gap: 10px; margin-top: 0; }
.apps-grid.compact .app-card { padding: 14px; } .apps-grid.compact .app-feats { display: none; }
.apps-steps { margin: 0; padding-left: 20px; color: var(--text-2); } .apps-steps li { margin: 6px 0; }
@media (max-width: 760px) { .apps-grid { grid-template-columns: 1fr; } .app-card { padding: 16px; } }

/* ---- v0.20: designer icons & section backgrounds ---- */
.iico { object-fit: contain; }
.ach-img { width: 64px; height: 64px; object-fit: contain; filter: drop-shadow(0 4px 8px rgba(0,0,0,.5)); }
.ach:not(.done) .ach-img { filter: grayscale(1); }
.prof-img { width: 30px; height: 30px; object-fit: contain; vertical-align: middle; }
.prof-big .prof-img { width: 72px; height: 72px; }
.menu .pi .prof-img { width: 24px; height: 24px; }
.dist-img { width: 22px; height: 22px; object-fit: contain; vertical-align: middle; }
h1 .dist-img { width: 44px; height: 44px; }
.pin-ic.art { width: 64px; height: 64px; padding: 0; background: none !important; border: 0 !important; box-shadow: none !important; position: relative; }
.pin-img { width: 64px; height: 64px; object-fit: contain; filter: drop-shadow(0 6px 10px rgba(0,0,0,.7)); transition: transform .15s; }
.pin.active .pin-img, .pin:hover .pin-img { transform: scale(1.12); }
.pin.own .pin-img { filter: drop-shadow(0 0 10px var(--pc, var(--club))); }
.pin-war { position: absolute; right: -4px; top: -4px; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: var(--red); color: #fff; }
.cat-img { width: 26px; height: 26px; object-fit: contain; }
.jc-art { position: relative; }
.jc-art .job-img { position: absolute; left: 50%; top: 50%; width: 72%; height: 86%; transform: translate(-50%, -50%); object-fit: contain; filter: drop-shadow(0 8px 14px rgba(0,0,0,.7)); }
.jc-thumb { display: grid; place-items: center; background: var(--inset); }
.jc-thumb .job-thumb { width: 100%; height: 100%; object-fit: contain; }
.loot-cell span { display: inline-flex; width: 24px; height: 24px; margin-right: 2px; } .loot-cell .iico { width: 24px; height: 24px; }
body.has-section-bg::before { content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(7, 9, 12, .5), rgba(7, 9, 12, .8) 55%, rgba(7, 9, 12, .94)), var(--section-bg) center top / cover no-repeat; }
.chip .iico, .kv .v .iico { width: 20px; height: 20px; vertical-align: middle; }
.emo .iico { width: 100%; height: 100%; max-width: 56px; max-height: 56px; object-fit: contain; }
.res-cell .emo { display: inline-flex; width: 36px; height: 36px; }
.jc-art .chip { position: relative; z-index: 2; }

/* ---- v0.20: social sign-in ---- */
.social-auth { margin-top: 14px; }
.social-auth .or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.social-auth .or::before, .social-auth .or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.social-btns { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; margin-top: 10px; }
.btn.social { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; font-weight: 600; text-transform: none; }
.btn.social.google { background: #fff; color: #1f1f1f; border-color: #fff; }
.btn.social.telegram { background: #2aabee; color: #fff; border-color: #2aabee; }

/* ---- v0.21: staff kit «Судья» ---- */
.staff-badge { position: absolute; left: 8px; bottom: 8px; padding: 3px 8px; border-radius: 6px; background: #f5c400; color: #111; font: 700 11px/1.2 var(--font-display); text-transform: uppercase; letter-spacing: .04em; }

/* ---- v0.22: one search at a time, search options, damage summary ---- */
.hud-search { display: flex; align-items: center; gap: 4px; padding: 4px 4px 4px 10px; border-radius: 999px; background: rgba(214, 40, 57, .15); border: 1px solid rgba(214, 40, 57, .5); font-size: 13px; white-space: nowrap; }
.hud-search a { display: inline-flex; align-items: center; gap: 6px; color: var(--text); text-decoration: none; }
.hud-search .live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); animation: pulse 1.2s infinite; }
.hud-search button { min-height: 28px; padding: 0 8px; }
.search-opts { display: grid; gap: 8px; margin-bottom: 10px; }
.so-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.so-row > .small:first-child { min-width: 120px; }
.arena-cta.col { flex-direction: column; align-items: stretch; }
.dmg-summary .dmg-hero { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.dmg-hero > div { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 10px 12px; }
.dmg-hero small { display: block; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.dmg-hero b { font: 700 26px/1.1 var(--font-display); }
.dmg-table tr.me td { background: rgba(214, 40, 57, .12); }
.dmg-table tr.team-row td { font: 600 13px/1 var(--font-display); text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding-top: 14px; }
.dmg-table tr.us td:first-child { box-shadow: inset 3px 0 0 var(--success, #2ea05a); } .dmg-table tr.them td:first-child { box-shadow: inset 3px 0 0 var(--red); }
.table-wrap { overflow-x: auto; }
@media (max-width: 640px) { .dmg-summary .dmg-hero { grid-template-columns: repeat(2, minmax(0, 1fr)); } .hud-search { font-size: 12px; } }
.arena-cta .search-opts { position: relative; z-index: 3; margin-bottom: 8px; padding: 10px 12px; border-radius: var(--r-sm); background: rgba(8, 10, 14, .9); border: 1px solid var(--border); backdrop-filter: blur(4px); }
.arena-cta.col { z-index: 3; }
.arena-cta.col { width: min(640px, calc(100% - 24px)); margin-left: auto; margin-right: auto; }
.arena-cta.col .search-opts { width: 100%; box-sizing: border-box; }
.arena-cta.col .so-row { flex-wrap: nowrap; } .arena-cta.col .so-row > .small:first-child { min-width: 130px; }
@media (max-width: 640px) { .arena-cta.col .so-row { flex-wrap: wrap; } }

/* ---- v0.23: section scenes really visible (on the body itself — a ::before was painted under the page background) ---- */
body.has-section-bg::before { content: none; }
body.has-section-bg { background: linear-gradient(180deg, rgba(7, 9, 12, .55), rgba(7, 9, 12, .82) 50%, rgba(7, 9, 12, .95)), var(--section-bg) center top / cover no-repeat fixed, var(--bg); }
.craft-hero, .market-hero { min-height: 170px; margin-bottom: var(--s4); }
.market-hero { margin-bottom: var(--s4); }
/* inventory: doll | backpack | parameters */
.inv-layout { grid-template-columns: minmax(340px, 440px) minmax(0, 1fr); grid-template-areas: "doll bag" "doll side"; }
.inv-layout > .col:first-child { grid-area: doll; } .inv-layout > .inv-bag { grid-area: bag; } .inv-layout > .inv-side { grid-area: side; }
.inv-side .derived { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 18px; }
@media (min-width: 1500px) { .inv-layout { grid-template-columns: minmax(340px, 420px) minmax(0, 1fr) 340px; grid-template-areas: "doll bag side"; } .inv-side .derived { grid-template-columns: 1fr; } }
@media (max-width: 1023px) { .inv-layout { grid-template-columns: 1fr; grid-template-areas: "doll" "bag" "side"; } .inv-side .derived { grid-template-columns: 1fr; } }
/* tokens */
.cur.tok { cursor: pointer; border: 0; background: transparent; font: inherit; color: inherit; }
.tok-how { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.tok-how li { display: grid; grid-template-columns: 22px 1fr; gap: 8px; align-items: start; color: var(--text-2); font-size: 14px; }
.tok-how li .ic { color: #b48cff; margin-top: 2px; }
.tok-panel { margin-bottom: var(--s4); }

/* ---- v0.24: shop buy button, women-only items ---- */
.item-card .buy-btn { min-width: 92px; font-weight: 700; }
.chip.female-only { align-self: flex-start; background: rgba(233, 84, 160, .15); color: #ff9fd0; border-color: rgba(233, 84, 160, .4); }
.staff-badge.female { background: #e954a0; color: #fff; }

/* ---- v0.26: invite a friend, admin players tab ---- */
.invite .lead { font-size: 16px; }
.ref-steps { margin: 6px 0 14px; padding-left: 20px; line-height: 1.7; }
.ref-steps li::marker { color: var(--club); font-weight: 700; }
.mu-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.mu-stat { background: var(--surface-2, rgba(255,255,255,.03)); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.mu-stat b { display: block; font-family: var(--display); font-size: 26px; }
.mu-stat span { font-size: 12px; color: var(--muted); }
.mu-days { display: grid; grid-template-columns: repeat(14, 1fr); gap: 4px; height: 110px; align-items: end; }
.mu-days div { height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 2px; }
.mu-days i { width: 100%; min-height: 2px; background: var(--club); border-radius: 4px 4px 0 0; }
.mu-days span { font-size: 10px; color: var(--muted); }
.mu-grps { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-top: 14px; }
.mu-grp h4 { margin: 0 0 6px; font-size: 13px; color: var(--muted); text-transform: uppercase; }
.mu-grp .row { font-size: 13px; padding: 2px 0; border-bottom: 1px solid rgba(255,255,255,.04); }
.table-scroll { overflow-x: auto; margin-top: 10px; }
.mu-table { min-width: 980px; font-size: 13px; }
.mu-table th { text-align: left; font-size: 11px; color: var(--muted); text-transform: uppercase; padding: 6px 8px; white-space: nowrap; }
.mu-table td { padding: 6px 8px; white-space: nowrap; }

/* ---- v0.26: the real match panel ---- */
.rm-score { display: flex; align-items: center; justify-content: center; gap: 14px; font-family: var(--display); font-size: 20px; }
.rm-score b { font-size: 38px; font-stretch: 75%; min-width: 90px; text-align: center; }
.rm-score span { flex: 1; text-align: center; }
.rm-state { text-align: center; margin: 2px 0 8px; }
.live-dot::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: currentColor; margin-right: 6px; animation: rmBlink 1s infinite; }
@keyframes rmBlink { 50% { opacity: .2; } }
.rm-events { display: grid; gap: 4px; margin: 6px 0; }
.rm-ev { display: flex; gap: 8px; align-items: center; font-size: 13px; width: 50%; }
.rm-ev.away { margin-left: 50%; justify-content: flex-start; }
.rm-ev.home { flex-direction: row-reverse; text-align: right; }
.rm-ev .min { color: var(--muted); min-width: 34px; font-variant-numeric: tabular-nums; }
.rm-info { text-align: center; margin: 6px 0; }
.rm-tv { font-size: 13px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: center; margin: 4px 0 10px; }
.rm-stats { display: grid; gap: 6px; margin: 10px 0; }
.rm-stat { display: grid; grid-template-columns: 50px 1fr 50px; align-items: center; font-size: 13px; text-align: center; }
.rm-stat span { color: var(--muted); }
.rm-bar { grid-column: 1 / -1; display: flex; height: 5px; border-radius: 3px; overflow: hidden; background: rgba(255,255,255,.06); }
.rm-bar i:first-child { background: var(--club); } .rm-bar i:last-child { background: #8a909b; }
.rm-teams { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.rm-team h4 { margin: 0 0 6px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.rm-xi { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.rm-xi li { display: flex; gap: 8px; padding: 3px 0; border-bottom: 1px solid rgba(255,255,255,.04); }
.rm-xi .n { width: 22px; color: var(--muted); text-align: right; } .rm-xi .pos { color: var(--muted); font-size: 11px; }
.rm-xi li.out .grow::after { content: ' ↓'; color: #e5484d; } .rm-xi li.in .grow::after { content: ' ↑'; color: #3fb950; }
@media (max-width: 640px) { .rm-teams { grid-template-columns: 1fr; } .rm-ev { width: 100%; } .rm-ev.away { margin-left: 0; } .rm-ev.home { flex-direction: row; text-align: left; } }
@media (min-width: 900px) { .layout-2.invite { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); } }
.invite .fld { display: block; margin-top: 12px; }
.invite .set-link { display: flex; gap: 8px; } .invite .set-link input { flex: 1; min-width: 0; }

/* ---- v0.28: art icons, street tiers, crew rooms ------------------------------------------------ */
.fl .fi .fl-img { width: 22px; height: 22px; object-fit: contain; display: block; margin: 0 auto; }
.fb-img { width: 26px; height: 26px; object-fit: contain; vertical-align: middle; }
.fb-kinds button .fb-img { width: 40px; height: 40px; }
.reward-grid .rw .ui-img, .reward-grid .ui-img { width: 40px; height: 40px; object-fit: contain; }
.fstats { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; margin-top: 6px; }
.fstats span { padding: 2px 7px; border-radius: 999px; background: var(--inset); font-size: 11.5px; color: var(--text-2); white-space: nowrap; }
.fstats b { color: var(--text); font-weight: 600; }
.city-map .pin.locked { opacity: .55; filter: grayscale(.7); }
.foe .foe-d { font-size: 11.5px; margin: 1px 0 2px; }
.who .crew-badge { display: inline-flex; margin-left: -3px; }
.who .crew-badge .emblem { display: block; }
.card.bld.clickable { cursor: pointer; transition: transform .12s, border-color .12s; }
.card.bld.clickable:hover { transform: translateY(-2px); border-color: var(--red); }
.card.bld .bld-art { display: flex; justify-content: center; margin: -4px 0 4px; }
.card.bld .bld-img { width: 100%; max-width: 190px; aspect-ratio: 1; object-fit: contain; }
.card.bld .bld-enter { color: var(--red-ink, var(--red)); font-weight: 600; }
.room-top { display: flex; gap: 18px; align-items: center; margin-top: 8px; }
.room-top .room-img { width: 200px; max-width: 40%; aspect-ratio: 1; object-fit: contain; flex-shrink: 0; }
.order-form textarea { resize: vertical; }
.orders { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
@media (max-width: 640px) { .room-top { flex-direction: column; text-align: center; } .room-top .room-img { max-width: 60%; } }

/* ---- v0.29 ------------------------------------------------------------------------------------- */
.mode-card.area.locked { opacity: .45; filter: grayscale(1); cursor: not-allowed; pointer-events: none; }
.city-map .pin[aria-disabled="true"] { cursor: not-allowed; }
.mk-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0; }
.mk-filters .input[type=search] { flex: 1 1 220px; min-width: 0; }
.mk-filters select { max-width: 180px; }
.ii-made { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: -2px 0 8px; color: var(--text-2); }
.chip.q-leg { background: linear-gradient(90deg, #ff9f1c, #ffd166); color: #1a1000; border-color: #ffb347; }
.dist-job { padding: 6px 0; border-bottom: 1px solid var(--line); gap: 10px; color: inherit; }
.dist-job:last-child { border-bottom: 0; }
.crew-desc .post-text { white-space: normal; line-height: 1.5; }

/* v0.30 visual pass */
@media (max-width: 1023px) { .inv-layout > .col > .inv-params, .inv-params { align-self: stretch; width: 100%; max-width: none; } }
@media (max-width: 767px) {
  .shop-cats .panel-head { display: none; }
  .shop-cats .menu { display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 6px; padding-bottom: 4px; scrollbar-width: thin; }
  .shop-cats .menu button { flex: 0 0 auto; white-space: nowrap; width: auto; }
}
.lb-row .lb-name .nm { white-space: normal; overflow-wrap: anywhere; line-height: 1.2; }

/* ---- v0.31: combat statuses, sets, bound gear, craft queue, derby, season tickets, tifos, squads, texts ---- */
.chip.q-rare { background: rgba(76, 143, 224, .16); color: #8fbaf2; border-color: transparent; }
.sc .sc-meta .ex.ob { color: #8fbaf2; } .sc .sc-meta .ex.pr { color: var(--danger); } .sc .sc-meta .ex.in { color: var(--green); }
.ii-passive.set { border-color: rgba(88, 184, 136, .45); background: var(--tint-ok); } .ii-passive.set b { color: var(--green); }
.ii-passive.bound { border-color: var(--border-strong); background: var(--surface-3); } .ii-passive.bound b { color: var(--text); }
.craft-queue .cq-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-top: 1px solid var(--border); }
.craft-queue .cq-row:first-of-type { border-top: 0; } .craft-queue .cq-row .emo { font-size: 18px; width: 24px; text-align: center; }
.chip.derby { background: linear-gradient(90deg, rgba(215, 44, 53, .28), rgba(232, 162, 58, .22)); color: #ffd0a0; border-color: rgba(232, 162, 58, .5); white-space: nowrap; }
.season-shop .stok { color: #c4a2f7; font: 600 18px/1 var(--font-display); }
.stok-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.stok-item { display: flex; align-items: center; gap: 10px; padding: 8px; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface-2); }
.stok-item .slot { width: 44px; height: 44px; flex: none; }
.tifo-wall { display: flex; flex-wrap: wrap; gap: 8px; }
.tifo-strip { --c1: #c8102e; --c2: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 140px; max-width: 100%; padding: 8px 16px;
  background: var(--c1); color: var(--c2); border-radius: 3px; box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--c2) 35%, transparent), 0 2px 8px rgba(0, 0, 0, .4);
  font: 700 17px/1.15 var(--font-display); text-transform: uppercase; letter-spacing: .03em; text-align: center; overflow-wrap: anywhere; }
.tifo-strip.tifo { min-height: 64px; flex: 1 1 100%; font-size: 22px; background: repeating-linear-gradient(90deg, var(--c1) 0 28px, color-mix(in srgb, var(--c1) 82%, #000) 28px 56px); }
.tifo-strip small { font: 500 11px/1 var(--font-body); text-transform: none; letter-spacing: 0; opacity: .75; margin-top: 4px; }
.tifo-dlg { width: min(560px, calc(100vw - 32px)); }
.tifo-dlg .tifo-list { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; max-height: 40vh; overflow: auto; }
.tifo-dlg .tl-row { flex-wrap: wrap; gap: 8px; } .tifo-dlg input[type=color] { width: 40px; height: 28px; padding: 0; border: 0; background: none; vertical-align: middle; }
.dz-sel { display: block; margin-top: 4px; max-width: 100%; }
.party .pt-seats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.party .pt-seat { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface-2); text-align: center; min-width: 0; }
.party .pt-seat b { max-width: 100%; overflow-wrap: anywhere; } .party .pt-seat.empty { border-style: dashed; justify-content: center; color: var(--text-3); }
.party .pt-seat button { position: absolute; top: 2px; right: 2px; padding: 2px 6px; }
.party .pt-inv { padding: 8px 10px; margin-bottom: 8px; border-radius: var(--r-sm); background: var(--tint-info); gap: 8px; }
.party form.row { margin-top: 10px; }
.tx-list { display: flex; flex-direction: column; }
.tx-row { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border-top: 1px solid var(--border); }
.tx-row:first-child { border-top: 0; } .tx-row.changed { background: var(--tint-warn); }
.tx-row code { font-size: 12px; color: var(--text-2); overflow-wrap: anywhere; } .tx-row textarea { width: 100%; resize: vertical; }
.tifo-mod .tifo-wall { margin: 10px 0; }
@media (max-width: 560px) { .party .pt-seats { grid-template-columns: 1fr; } .stok-grid { grid-template-columns: 1fr; } }
/* paper doll: the figure is sized by the stage HEIGHT (not the narrow middle column) and may pass behind the slot columns */
.stage .slots { position: relative; z-index: 1; }
.stage .figure { position: absolute; inset: 8px 0 52px; z-index: 0; display: flex; align-items: flex-end; justify-content: center; padding: 0; pointer-events: none; }
.stage .figure img { height: 100%; max-height: none; max-width: none; width: auto; object-fit: contain; }
.stage .figure > *:not(img) { max-height: 100%; }
.stage > .slots:first-child { grid-column: 1; grid-row: 1; } .stage > .slots:not(:first-child) { grid-column: 3; grid-row: 1; }
.stage { width: 100%; box-sizing: border-box; align-self: stretch; }
/* set pieces inside the item card */
.set-pieces { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.set-piece { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; width: 58px; padding: 4px 2px 3px; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface-2); cursor: pointer; opacity: .75; }
.set-piece img { width: 38px; height: 38px; object-fit: contain; } .set-piece small { font-size: 9.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.set-piece.worn { opacity: 1; border-color: var(--green); } .set-piece.this { opacity: 1; box-shadow: inset 0 0 0 1px var(--gold); }
.set-piece i { position: absolute; top: 1px; right: 3px; font-style: normal; font-size: 11px; color: var(--green); }
.set-piece:hover { opacity: 1; border-color: var(--border-strong); }
.prof-rank { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.set-tiers { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 2px; font-size: 13px; color: var(--text-3); }
.set-tiers li.on { color: var(--green); } .set-tiers li.on::before { content: '✓ '; }
.tx-find input[name=q] { flex: 1 1 200px; min-width: 160px; }
/* match day: popup & arena banner */
.md-pop { width: min(440px, calc(100vw - 32px)); text-align: center; }
.md-pop-head { display: flex; justify-content: center; gap: 8px; align-items: center; }
.md-pop-vs { display: flex; justify-content: center; align-items: center; gap: 18px; margin: 12px 0 4px; }
.md-pop-vs b { font: 700 30px/1 var(--font-display); }
.md-pop h3 { margin: 6px 0; } .md-pop p { margin: 6px 0; }
.md-pop-list { text-align: left; margin: 8px 0 14px; padding-left: 18px; color: var(--text-2); }
.md-pop-list li { margin: 3px 0; }
.md-arena { display: flex; align-items: center; gap: 10px; border-color: var(--red); background: linear-gradient(90deg, rgba(215,44,53,.16), transparent); color: inherit; text-decoration: none; }

/* ---- chat: badges, toasts, settings, docking (float / bottom / right) ---- */
.chat-fab { position: fixed; } .chat-fab .fab-n { position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: #fff; color: var(--red); font: 700 11px/20px var(--font-body); }
body.chat-unread .chat-fab { animation: fabping 2s infinite; }
@keyframes fabping { 0%, 100% { box-shadow: var(--shadow-lg), 0 0 0 0 rgba(215,44,53,.6); } 50% { box-shadow: var(--shadow-lg), 0 0 0 10px rgba(215,44,53,0); } }
.chat .head .tabs button { position: relative; }
.chat .tab-n { margin-left: 5px; padding: 1px 6px; border-radius: 9px; background: var(--red); color: #fff; font: 600 10px/1.4 var(--font-body); }
.chat .head #chatMin { display: none; }
.chat-toasts { position: fixed; left: 16px; bottom: 16px; z-index: 60; display: flex; flex-direction: column; gap: 8px; width: min(340px, calc(100vw - 32px)); }
.chat-toast { display: flex; flex-direction: column; gap: 2px; text-align: left; padding: 10px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--red); box-shadow: var(--shadow-lg); color: var(--text); cursor: pointer; animation: slidein .2s ease-out; }
.chat-toast b { font-size: 12px; color: var(--text-2); } .chat-toast span { font-size: 13.5px; overflow-wrap: anywhere; }
.chat-toast.watch { border-left-color: #8fbaf2; } .chat-toast.mention { border-left-color: var(--gold); }
@keyframes slidein { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
.chat-set { width: min(480px, calc(100vw - 32px)); } .chat-set h4 { margin: 14px 0 6px; }
.chat-set .cs-grid { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: center; margin-bottom: 8px; }
.chat-set .cs-watch { display: flex; flex-wrap: wrap; gap: 6px; }
/* docked: always open, can be collapsed to its header */
body.chat-dock-bottom .chat-fab, body.chat-dock-right .chat-fab { display: none; }
body.chat-dock-bottom .chat .head #chatMin, body.chat-dock-right .chat .head #chatMin { display: inline-flex; }
body.chat-dock-bottom .chat .head #chatClose, body.chat-dock-right .chat .head #chatClose { display: none; }
body.chat-min .chat .head .chev { display: inline-block; transform: rotate(180deg); }
body.chat-dock-bottom .chat { left: 0; right: 0; bottom: 0; width: auto; max-width: none; height: 34vh; min-height: 220px; border-radius: 14px 14px 0 0; border-bottom: 0; z-index: 35; }
body.chat-dock-bottom { padding-bottom: max(34vh, 220px); }
body.chat-dock-bottom.chat-min .chat { height: auto; min-height: 0; }
body.chat-dock-bottom.chat-min .chat .msgs, body.chat-dock-bottom.chat-min .chat #chatForm, body.chat-dock-right.chat-min .chat .msgs, body.chat-dock-right.chat-min .chat #chatForm { display: none; }
body.chat-dock-bottom.chat-min { padding-bottom: 52px; }
body.chat-dock-right .chat { top: 0; right: 0; bottom: 0; width: 340px; height: auto; max-width: none; border-radius: 0; border-top: 0; border-right: 0; border-bottom: 0; z-index: 35; }
body.chat-dock-right { padding-right: 340px; }
body.chat-dock-right.chat-min { padding-right: 0; }
body.chat-dock-right.chat-min .chat { top: auto; bottom: 16px; right: 16px; width: 300px; border-radius: 12px; border: 1px solid var(--line); }
@media (max-width: 1023px) {
  body.chat-dock-bottom .chat { bottom: 60px; height: 38vh; }
  body.chat-dock-bottom { padding-bottom: calc(38vh + 60px); }
  body.chat-dock-bottom.chat-min { padding-bottom: 112px; }
  /* no room for a side panel on phones: the right dock behaves like the bottom one */
  body.chat-dock-right .chat { top: auto; left: 0; right: 0; bottom: 60px; width: auto; height: 38vh; border-radius: 14px 14px 0 0; border: 1px solid var(--line); }
  body.chat-dock-right { padding-right: 0; padding-bottom: calc(38vh + 60px); }
  body.chat-dock-right.chat-min .chat { left: 0; right: 0; width: auto; bottom: 60px; height: auto; }
  body.chat-dock-right.chat-min { padding-bottom: 112px; }
  .chat-toasts { bottom: 76px; }
}
/* chat rooms: separate pills that wrap onto new lines when the panel is narrow (right dock, phones);
   the collapsed bar keeps one line and scrolls sideways (thin scrollbar + mouse wheel, see app.js) */
.chat .head { align-items: flex-start; }
.chat .head .tabs { flex: 1 1 auto; min-width: 0; flex-wrap: wrap; gap: 4px; border: 0; background: none; border-radius: 0; overflow: visible; }
.chat .head .tabs > button { flex: none; white-space: nowrap; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--inset); }
.chat .head .tabs > button:first-child { border-left: 1px solid var(--border); }
.chat .head .tabs > button.on { border-color: #e0444b; }
.chat .head > .grow { display: none; }
.chat .head > button { flex: none; }
body.chat-dock-bottom.chat-min .chat .head { align-items: center; }
body.chat-dock-bottom.chat-min .chat .head .tabs { flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; padding-bottom: 2px; }
body.chat-dock-bottom.chat-min .chat .head .tabs::-webkit-scrollbar { height: 4px; } body.chat-dock-bottom.chat-min .chat .head .tabs::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 2px; }
.chat-toast, .chat-toast b, .chat-toast span { text-transform: none; letter-spacing: 0; font-family: var(--font-body); } .chat-toast b { font-weight: 600; }

/* arena: fans of your level — rows that fit the panel at any width */
.fan-list { display: flex; flex-direction: column; }
.fan-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 8px; padding: 8px 0; border-top: 1px solid var(--border); }
.fan-row:first-child { border-top: 0; }
.fan-row .fan-who { min-width: 0; overflow-wrap: anywhere; }
.fan-row .fan-btns { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
@media (max-width: 480px) { .fan-row { grid-template-columns: minmax(0, 1fr) auto; } .fan-row .fan-rt { display: none; } }
.invite-wait { display: flex; align-items: center; gap: 8px; padding: 8px 10px; margin-bottom: 8px; border-radius: var(--r-sm); background: var(--tint-info); }
.duel-pop { width: min(400px, calc(100vw - 32px)); text-align: center; }
.fh-dlg { width: min(560px, calc(100vw - 32px)); }
.fh-list { display: flex; flex-direction: column; max-height: 60vh; overflow-y: auto; }
.fh-row { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-top: 1px solid var(--border); flex-wrap: wrap; }
.fh-row:first-child { border-top: 0; }
/* fight log: statuses highlighted */
.fl.fl-status { font-weight: 500; }
.fl.fl-status.st-offBalance { background: rgba(76, 143, 224, .14); } .fl.fl-status.st-pressured { background: rgba(232, 162, 58, .14); }
.fl.fl-status.st-inspired { background: rgba(88, 184, 136, .14); } .fl.fl-status.st-exposed { background: rgba(226, 181, 94, .14); }

.busy-note { border-color: rgba(232, 162, 58, .5); background: var(--tint-warn); font-size: 14px; }
.busy-note a { color: var(--gold); margin-left: 6px; }

.pop img { width: 20px; height: 20px; vertical-align: -5px; object-fit: contain; }

/* chat: emoji */
.chat .emo-btn { flex: none; width: 40px; padding: 0; font-size: 20px; line-height: 1; }
.emo-pop { position: absolute; left: 8px; right: 8px; bottom: 60px; z-index: 5; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm, 8px); box-shadow: 0 10px 30px rgba(0, 0, 0, .45); display: flex; flex-direction: column; max-height: min(300px, 55vh); }
.emo-tabs { display: flex; gap: 2px; padding: 6px; border-bottom: 1px solid var(--line); flex: none; }
.emo-tab { flex: 1; min-width: 0; padding: 4px 0; font-size: 18px; background: transparent; border: 0; border-radius: 6px; opacity: .55; }
.emo-tab.on, .emo-tab:hover { opacity: 1; background: rgba(255, 255, 255, .07); }
.emo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(36px, 1fr)); padding: 6px; overflow-y: auto; }
.emo { font-size: 22px; line-height: 1; padding: 6px 0; background: transparent; border: 0; border-radius: 6px; cursor: pointer; font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; text-transform: none; }
.emo:hover { background: rgba(255, 255, 255, .09); transform: scale(1.15); }
.emo-empty { grid-column: 1 / -1; padding: 10px; text-align: center; }
.mt.emo-big { font-size: 30px; line-height: 1.25; }

/* fixture rows in narrow lists: names wrap, chips get their own line */
.fx-row { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 10px; }
.fx-row .fx-crests { display: flex; gap: 4px; padding-top: 2px; }
.fx-row .fx-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fx-row .fx-names { font-weight: 500; overflow-wrap: anywhere; line-height: 1.25; }
.fx-row .fx-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.fx-row .fx-chips:empty { display: none; }

/* events: two columns, the list right under the hero, categories as tabs above it */
.layout-2.events2 { grid-template-columns: minmax(0, 1fr) 340px; }
@media (max-width: 1023px) { .layout-2.events2 { grid-template-columns: 1fr; } }
.events2 .ev-hero { min-height: 250px; }
.ev-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.ev-tabs button { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); color: var(--text-2); font-size: 13px; }
.ev-tabs button.on { background: rgba(215, 44, 53, .18); border-color: var(--red); color: var(--text); }
.ev-tabs .n { min-width: 20px; padding: 0 6px; border-radius: 999px; background: rgba(255, 255, 255, .08); font-size: 12px; text-align: center; }
.ev-tabs button.on .n { background: var(--red); color: #fff; }
.events2 .ev-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.events2 .ev-card { min-height: 170px; }
.ev-card .ev-top { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: auto; }
.ev-card .ev-top .chip { margin-bottom: 0; }
.ev-card .ev-crests { display: flex; gap: 4px; margin: 6px 0 2px; }
.ev-card .ev-when { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.ev-list .empty { display: flex; flex-direction: column; align-items: center; gap: 10px; }

/* Fan City: the crews' war room */
.layout-2.city2 { grid-template-columns: minmax(0, 1fr) 340px; }
@media (max-width: 1023px) { .layout-2.city2 { grid-template-columns: 1fr; } }
.city-hero { min-height: 200px; }
.city-hero .city-stats { margin-top: 10px; }
.kv-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin-top: 12px; }
.kv-strip > div { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface-2); }
.kv-strip span { font-size: 12px; color: var(--text-2); } .kv-strip b { font-size: 16px; }
.perk-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.dgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.dcard { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); overflow: hidden; scroll-margin: 90px; }
.dcard.mine { border-color: rgba(88, 184, 136, .7); } .dcard.rival { border-color: rgba(215, 44, 53, .55); } .dcard.friend { border-color: rgba(76, 143, 224, .5); }
.dcard.sel { box-shadow: 0 0 0 2px var(--red), var(--glow); }
.dc-art { position: relative; isolation: isolate; min-height: 96px; padding: 10px 12px; display: flex; flex-direction: column; justify-content: flex-end; background: center/cover; }
.dc-art::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(7, 9, 12, .92), rgba(7, 9, 12, .2)); }
.dc-art h4 { margin: 0; font-size: 20px; } .dc-perk { font-size: 13px; color: var(--gold); }
.dc-body { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px 12px; flex: 1; }
.dc-owner { display: flex; align-items: center; gap: 6px; min-width: 0; overflow-wrap: anywhere; }
.dc-st, .dc-war { font-size: 13px; padding: 6px 8px; border-radius: var(--r-sm); background: var(--surface-2); }
.dc-st.free { color: var(--green); } .dc-st.open { color: var(--gold); } .dc-st.prot { color: var(--text-2); }
.dc-war { background: rgba(215, 44, 53, .12); } .dc-war.live { border: 1px solid rgba(215, 44, 53, .5); }
.war-bar { height: 6px; margin: 6px 0 2px; border-radius: 3px; background: rgba(76, 143, 224, .5); overflow: hidden; }
.war-bar i { display: block; height: 100%; background: var(--red); }
.dc-act { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-top: auto; padding-top: 4px; }

/* inventory: filter by body part */
.slot-filter { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.slot-filter button { display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); color: var(--text-2); font-size: 12px; text-transform: none; letter-spacing: 0; }
.slot-filter button.on { border-color: var(--red); background: rgba(215, 44, 53, .18); color: var(--text); }
.slot-filter .si { display: inline-flex; width: 24px; height: 24px; align-items: center; justify-content: center; } .slot-filter .si svg { width: 18px; height: 18px; } .slot-filter .si img { width: 24px; height: 24px; object-fit: contain; }
.slot-filter button { padding: 3px 10px 3px 5px; }
.slot-filter .n { padding: 0 5px; border-radius: 999px; background: rgba(255, 255, 255, .08); font-size: 11px; }
@media (max-width: 600px) { .ev-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -4px 12px; padding: 0 4px 2px; } .ev-tabs button { flex: none; } }

/* CJK hero: break only at the spaces between phrases, never inside a word (ゲー/ム) */
html:lang(ja) .lh-title, html:lang(zh) .lh-title { word-break: keep-all; overflow-wrap: anywhere; }

.en-cost { font-size: .75em; opacity: .85; margin-left: 4px; font-weight: 600; }

/* phones: the columns dissolve and blocks follow MOBILE_ORDER (app.js, style --m) */
@media (max-width: 1023px) {
  .layout-3, .layout-2, .char-layout { display: flex; flex-direction: column; align-items: stretch; gap: 12px; }
  .layout-3 > .col, .layout-2 > .col, .char-layout > .col, .char-layout > .col.info { display: contents; }
  .layout-3 > .col > *, .layout-2 > .col > *, .char-layout > .col > * { order: var(--m, 50); min-width: 0; }
  /* arena modes: a compact strip instead of five tall cards */
  .arena .mode-card p { display: none; }
  .arena .mode-card { padding: 6px; gap: 8px; min-height: 0; }
  .arena .mode-card .thumb { width: 40px; height: 40px; flex: 0 0 40px; }
  .arena .mode-card h4 { font-size: 14px; }
  .arena .panel .stack:has(> .mode-card) { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
}
.cta-hint { margin: 0; padding: 0 8px; text-align: center; }
.hw-list { max-height: 420px; overflow-y: auto; }
.slot .pp { position: absolute; left: 3px; top: 2px; font-size: 11px; line-height: 1; }
.q-add { color: var(--ok, #38c172); font-weight: 600; }
.ii-props { margin-top: 10px; padding: 8px 10px; border: 1px solid rgba(240, 192, 64, .35); border-radius: var(--r-sm); background: rgba(240, 192, 64, .06); }
.ii-props h4 { margin: 0 0 6px; color: var(--gold, #f0c040); }

/* landing: blocks below the first screen are laid out only when scrolled to (120+ crests in the marquees) */
.landing > .lsec, .landing > section#clubs, .landing > .cta-band, .landing > .lfoot { content-visibility: auto; contain-intrinsic-size: auto 720px; }
/* phones: the hero's lighter background (960 px, 147 KB instead of 341 KB) */
@media (max-width: 767px) { .landing .lhero2 { background-image: url(/assets/bg/landing-m.webp) !important; } }

/* crew base rooms (v0.44.1): what every level gives, Workshop benches, a note on unique gear */
.bld-levels { list-style: none; margin: 10px 0 8px; padding: 0; display: grid; gap: 3px; }
.bld-levels li { display: flex; gap: 8px; align-items: baseline; font-size: 13px; color: var(--muted); }
.bld-levels li b { display: inline-grid; place-items: center; min-width: 20px; height: 20px; border-radius: 50%; background: var(--surface-2); font-size: 12px; }
.bld-levels li.done { color: var(--text-2); }
.bld-levels li.cur { color: var(--text); }
.bld-levels li.cur b { background: var(--red); color: #fff; }
.benches { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 10px; }
.bench { padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-2); display: grid; gap: 6px; }
.bench.locked { opacity: .55; }
.bench.master { border-color: var(--gold); }
.bench-top { display: flex; align-items: center; gap: 8px; }
.bench-top .pi img, .bench-top .pi svg { width: 26px; height: 26px; }
.bench-masters { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.room-note { margin: 14px 0 0; }
.item-card .art[data-act], .item-card .name[data-act] { cursor: pointer; }

/* fan statistics (v0.44.7): tiles — the number big, the label under it; as many columns as fit */
.st-grid { display: flex; flex-wrap: wrap; gap: 8px; }   /* flex, not grid: the last row stretches, no lonely tile with a hole beside it */
.st-tile { flex: 1 1 112px; display: flex; flex-direction: column; justify-content: space-between; gap: 4px; min-width: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface-2); }
.st-tile b { font-family: var(--font-display); font-size: 22px; line-height: 1.1; font-weight: 600; font-variant-numeric: tabular-nums; }
.st-tile b small { font-size: 13px; color: var(--muted); font-weight: 400; }
.st-tile span { font-size: 12px; line-height: 1.25; color: var(--muted); overflow-wrap: anywhere; }
.st-tile.ok b { color: var(--green); }
.fan-stats .sec-head { margin: 16px 0 8px; }

/* bars that carry their numbers: tall enough for the text (v0.44.9 — the fight's HP bar was 6 px under 11 px digits) */
.bar:has(> b) { height: 18px; border-radius: 4px; background: #1c2128; box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); }
.bar > b { font-variant-numeric: tabular-nums; }
.bar.fhp { height: 22px; }
.bar.fhp > b { font-size: 13px; letter-spacing: .02em; }
.bar.fst { height: 16px; }
.bar.fst > b { font-size: 11px; }

/* fan page (v0.44.9): daily tasks fold once claimed; achievements full width under the talents */
details.daily-panel > summary { list-style: none; cursor: pointer; }
details.daily-panel > summary::-webkit-details-marker { display: none; }
details.daily-panel:not([open]) > summary { margin-bottom: 0; }
details.daily-panel > summary::after { content: '▾'; margin-left: 8px; color: var(--muted); transition: transform var(--fast); }
details.daily-panel:not([open]) > summary::after { transform: rotate(-90deg); }
.char-ach { margin-top: var(--s4); }
.char-ach .ach-grid { max-height: none; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }

/* fights on phones (v0.44.10): the site header scrolls away; a sticky strip keeps both names and bars in view */
.fight-strip { display: none; }
.fx-name, .fs-side .fx-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fx-name .who { max-width: 100%; } .fx-name .who .nm, .fx-name .who b { overflow: hidden; text-overflow: ellipsis; }
.fx-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 767px) {
  body.in-fight .topbar, body.in-fight .statusbar { position: static; }
  .fight-strip { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; position: sticky; top: 0; z-index: 26; margin: 0 0 10px;
    padding: 8px 10px; background: rgba(10, 12, 16, .96); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: 0 8px 18px rgba(0,0,0,.5); }
  .fight-strip .fs-side { min-width: 0; display: grid; gap: 4px; }
  .fight-strip .fs-side.hit { animation: shake .35s; }
  .fight-strip .fx-name { font-size: 13px; }
  .arena-view .fighter .fx-info { display: none; }
  body.in-fight #chatFab { display: none; }   /* it sat right on the lane buttons */
}

/* market (v0.44.11): buy / sell / my lots tabs; the sell tab lists the whole bag with qty, price and one click to list */
.mk-tabs { margin: 4px 0 12px; }
.mk-tabs .count { font-size: 11px; opacity: .75; }
.mk-found { margin: 8px 0 4px; }
.sell-list { display: grid; gap: 4px; margin-top: 10px; }
.sl-head, .sl-row { display: grid; grid-template-columns: 26px minmax(0, 1fr) 84px 104px 96px 116px; gap: 10px; align-items: center; }
.sl-head > span { line-height: 1.2; } .sl-row > [data-act=sone] { width: 100%; }
.sl-head { padding: 0 10px 4px; }
.sl-row { padding: 6px 10px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface-2); }
.sl-row.on { border-color: var(--red); }
.sl-item { display: flex; align-items: center; justify-content: flex-start; gap: 10px; min-width: 0; height: auto; min-height: 0; padding: 0; background: none; border: 0; box-shadow: none; color: inherit; text-align: left; cursor: pointer; font: inherit; text-transform: none; letter-spacing: normal; }
.sl-item:hover { background: none; }
.sl-name b { font-family: var(--font-body); font-weight: 600; font-size: 14px; }
.sl-row .check input, .sl-head .check input { width: 18px; height: 18px; }
.sl-item .slot { width: 44px; height: 44px; flex-shrink: 0; }
.sl-name { display: flex; flex-direction: column; min-width: 0; }
.sl-name b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sl-name small { font-size: 11.5px; }
.sl-row .input { min-height: 34px; padding: 4px 8px; }
.sl-net { font-variant-numeric: tabular-nums; white-space: nowrap; font-size: 13px; }
.sl-bar { position: sticky; bottom: 0; display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 10px 12px; background: rgba(13, 16, 20, .96); border: 1px solid var(--line); border-radius: var(--r-md); z-index: 5; }
@media (max-width: 767px) {
  .sl-head { display: none; }
  .sl-row > label { grid-area: c; } .sl-row > .sl-item { grid-area: i; } .sl-row > [data-act=sqty] { grid-area: q; } .sl-row > [data-act=sprice] { grid-area: p; }
  .sl-row > .sl-net { grid-area: n; justify-self: end; } .sl-row > [data-act=sone] { grid-area: b; }
  .sl-row { grid-template-columns: 22px 1fr 1fr auto; grid-template-areas: 'c i i n' 'c q p b'; row-gap: 6px; column-gap: 8px; padding: 8px; }
  .sl-item .slot { width: 38px; height: 38px; }
  .sl-row > [data-act=sone] { padding: 0 10px; }
  .sl-bar { bottom: calc(var(--bottomnav-h, 64px) + 8px); flex-wrap: wrap; }
}

/* phones, tighter (v0.44.11): smaller type and paddings so a screen holds more, a one-row HUD head, menus as chip strips */
@media (max-width: 640px) {
  :root { --fs-md: 15px; --fs-lg: 17px; --fs-xl: 22px; --fs-2xl: 27px; --fs-hero: 36px; }
  .panel { padding: 14px 12px; }
  .panel-head { margin-bottom: 8px; }
  .hero { min-height: 150px; padding: 16px 14px; gap: 6px; }
  .hero p { font-size: 13.5px; line-height: 1.35; }
  .topbar .brand img { height: 36px; }
  /* HUD: avatar · name · coins on one row, the three bars under it */
  .statusbar { padding: 6px 10px; }
  .hud { gap: 6px 8px; }
  .hud-me { flex: 1 1 auto; min-width: 0; }
  .hud-ava { width: 38px; height: 38px; }
  .hud-id .nm { font-size: 16px; max-width: 120px; }
  .hud-sub .lvl { font-size: 13px; } .hud-sub .lvl b { font-size: 15px; }
  .hud-cur { gap: 5px; }
  .hud-cur .cur { height: 30px; font-size: 13.5px; padding: 0 7px; }
  .hud-cur .pts { padding: 3px 7px; } .hud-cur .pts-w { display: none; }
  .hud .bar { height: 18px; } .hud-bar .hb-l { font-size: 9.5px; gap: 3px; }
  /* long vertical menus (shop categories, professions) become one scrollable row of chips */
  .shop .menu, .workshop .menu { display: flex; flex-direction: row; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .shop .menu::-webkit-scrollbar, .workshop .menu::-webkit-scrollbar { display: none; }
  .shop .menu > button, .workshop .menu > button { flex: 0 0 auto; width: auto; min-height: 38px; padding: 6px 12px; white-space: nowrap; font-size: 14px; }
  .shop .menu > button .grow, .workshop .menu > button .grow { flex: 0 0 auto; }
  .tabs > * { padding: 8px 12px; font-size: 13px; }
  .empty { padding: 18px 12px; }
  /* shop: two cards a row, smaller art */
  .shop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .shop-grid .item-card { padding: 10px; }
  .shop-grid .item-card .art { height: 96px; }
  .shop-grid .item-card .name { font-size: 14px; }
  .shop-grid .item-card .buy-btn { min-width: 0; width: 100%; }
  .shop-grid .item-card .foot { flex-wrap: wrap; gap: 6px; }
  .shop-grid .item-card .foot .buy-btn { flex: 1 1 100%; width: 100%; padding: 0 8px; }   /* v0.50.2: the 40px icon width squeezed «Купить» */
}

/* crews (v0.44.12): building / district art in the perks; the outsider's view of a crew */
.perk-list > div { grid-template-columns: 40px minmax(0, 1fr); align-items: center; }
.perk-ic { display: grid; place-items: center; width: 40px; height: 40px; grid-row: 1 / 3; font-size: 22px; }
.perk-img { width: 40px; height: 40px; object-fit: contain; }
.crew-out { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s4); align-items: start; margin-top: var(--s4); }
.crew-out .crew-desc { grid-column: 1 / -1; }
.cm-list { display: grid; gap: 6px; }
.cm-row { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: var(--r-sm); background: var(--surface-2); color: inherit; }
.cm-row:hover { box-shadow: inset 0 0 0 1px var(--red); }
.crew-roster { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 4px 12px; }
.crew-roster > div { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); min-width: 0; }
@media (max-width: 767px) { .crew-out { grid-template-columns: 1fr; gap: 12px; } }

/* "a new release is out" card (v0.44.12) */
.upd-pop { position: fixed; right: 16px; bottom: 16px; z-index: 60; display: flex; align-items: center; gap: 10px; max-width: min(420px, calc(100vw - 32px));
  padding: 12px 14px; background: #12161b; border: 1px solid var(--red); border-radius: var(--r-md); box-shadow: 0 14px 34px rgba(0,0,0,.6); animation: updIn .3s ease-out; }
.upd-pop b { display: block; } .upd-pop small { display: block; color: var(--muted); margin-top: 2px; }
@keyframes updIn { from { transform: translateY(20px); opacity: 0; } }
@media (max-width: 767px) { .upd-pop { left: 12px; right: 12px; bottom: calc(var(--bottomnav-h, 64px) + 12px); max-width: none; } }

/* the hidden attribute always wins over a component display rule (.tabs, .row …) */
[hidden] { display: none !important; }

/* market on phones (v0.44.13): one scrollable row of categories, filters in a tight 2-column grid, the batch bar stacked */
@media (max-width: 640px) {
  #mkBody .tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; width: 100%; }
  #mkBody .tabs::-webkit-scrollbar { display: none; }
  #mkBody .tabs > * { flex: 0 0 auto; white-space: nowrap; padding: 7px 11px; font-size: 12.5px; min-height: 34px; }
  .mk-tabs > * { padding: 7px 12px; font-size: 13px; min-height: 36px; }
  .mk-filters { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 8px 0; }
  .mk-filters .input[type=search], #sQ { grid-column: 1 / -1; max-width: none !important; width: 100%; min-height: 38px; }
  .mk-filters select { max-width: none; width: 100%; min-height: 36px; padding: 0 8px; font-size: 13px; }
  .mk-filters .check { font-size: 12.5px; }
  #mkBody > .row { flex-wrap: wrap; gap: 6px; }
  .sl-bar { flex-direction: column; align-items: stretch; gap: 6px; padding: 8px 10px; }
  .sl-bar .grow { font-size: 12px; text-align: center; }
  .sl-bar button { width: 100%; }
}

/* phones, second pass (v0.44.14) */
@media (max-width: 640px) {
  /* fan page: the ID card repeats the HUD — a compact one */
  .idcard { padding: 12px; }
  .idcard .name { font-size: 24px; } .idcard .lvl { font-size: 15px; } .idcard .lvl b { font-size: 19px; }
  .idcard .crest-box { width: 52px; height: 52px; }
  /* notifications: the date above the text, the text full width */
  .log-list tr { display: grid; gap: 2px; padding: 8px 0; border-bottom: 1px solid var(--line); }
  .log-list td { padding: 0 !important; border: 0 !important; }
  .log-list td:first-child { font-size: 11.5px; }
  /* rankings: club column hidden, the table can scroll sideways instead of being cut */
  .panel.flush:has(.rank-table) { overflow-x: auto; }
  .rank-table th:nth-child(3), .rank-table td:nth-child(3) { display: none; }
  .rank-table td, .rank-table th { padding: 7px 6px; font-size: 13px; }
  .rank-table td:nth-child(2) { max-width: 140px; }
  /* events and match day: two compact event cards a row */
  .ev-grid, .events2 .ev-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .ev-card, .events2 .ev-card { min-height: 118px; padding: 8px; font-size: 12.5px; }
  .ev-card b { font-size: 14px; }
  /* any wrapped tab grid (league filters …) becomes one scrollable row */
  #main .tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
  #main .tabs::-webkit-scrollbar { display: none; }
  #main .tabs > * { flex: 0 0 auto; white-space: nowrap; }
  /* crew base: two smaller building cards a row */
  .grid.g3:has(> .card.bld) { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .card.bld { padding: 10px; font-size: 12.5px; }
  .card.bld .bld-img { max-width: 110px; }
  .crew-head .emblem.big { width: 72px; height: 72px; }
  .crew-head h1 { font-size: 24px; }
  /* workshop resources: five small cells a row */
  .res-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
  .res-cell { padding: 5px 2px; } .res-cell .emo { width: 28px; height: 28px; } .res-cell b { font-size: 15px; } .res-cell small { font-size: 9.5px; }
}
@media (max-width: 640px) { .card.bld button.sm { white-space: normal; height: auto; min-height: 34px; padding: 4px 6px; font-size: 11px; line-height: 1.2; width: 100%; } }

/* team fights on phones (v0.44.15): both squads pinned on top, rivals tappable as targets */
.team-strip { display: none; }
@media (max-width: 767px) {
  .team-strip { display: grid; gap: 4px; position: sticky; top: 0; z-index: 26; margin-bottom: 8px; padding: 6px; background: rgba(10, 12, 16, .96); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: 0 8px 18px rgba(0,0,0,.5); }
  .ts-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; overflow-x: auto; scrollbar-width: none; }
  .ts-chip { min-width: 64px; padding: 4px 5px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface-2); }
  .ts-chip > b { display: block; font-size: 10.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 2px; }
  .ts-chip .bar.fhp { height: 14px; } .ts-chip .bar.fhp > b { font-size: 10px; }
  .ts-chip.me { border-color: var(--green); }
  .ts-chip.rival[data-act] { cursor: pointer; }
  .ts-chip.targeted { border-color: var(--red); box-shadow: inset 0 0 0 1px var(--red); }
  .ts-chip.ko { opacity: .4; }
  .ts-chip.hit { animation: shake .35s; }
}
@media (max-width: 767px) {
  .squad-view .controls { order: -1; }                       /* the strip shows everyone's health: the moves come first */
  .squad-view .mini { padding: 6px 8px; gap: 8px; }
  .squad-view .mini .portrait { width: 38px !important; }
  .squad-view .mini .small.muted { display: none; }
}

/* rankings (v0.44.18): your rank in every mode; the season's current leaders */
.rank-modes { display: grid; gap: 6px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.rm-row { display: flex; align-items: center; gap: 10px; color: inherit; padding: 4px 0; }
.rm-row small { display: block; font-size: 12px; }
.rm-row .num { font-weight: 600; }
.season-leaders h4 { margin: 0 0 6px; }
.season-leaders .lb-row.me { background: var(--surface-2); border-radius: var(--r-sm); }
@media (max-width: 767px) { .season-leaders { grid-template-columns: 1fr; } }

/* season (v0.44.19): progress per mode */
.season-me .sm-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.season-me .sm-row:last-child { border-bottom: 0; }
.season-me .sm-rew { min-width: 90px; text-align: right; }
.season-me .sm-row > b.grow { flex: 1 1 140px; min-width: 0; }
@media (max-width: 640px) {
  .season-me .sm-row > b.grow { flex-basis: 100%; }
  .season-me .sm-rew { min-width: 0; margin-left: auto; }
  .season-leaders .lb-row:nth-child(n+6) { display: none; }   /* phones: the top 5, "View all" has the rest */
}

/* '?' help on tap (v0.44.20) */
i.q { cursor: help; }
@media (pointer: coarse) { i.q { display: inline-grid; place-items: center; min-width: 22px; min-height: 22px; margin: -4px 0; } }
.help-tip { position: absolute; z-index: 80; padding: 10px 12px; background: #1b2028; border: 1px solid var(--border-strong); border-radius: var(--r-md); box-shadow: 0 10px 26px rgba(0,0,0,.6);
  font-size: 13px; line-height: 1.4; color: var(--text); animation: updIn .15s ease-out; }

/* arena on phones (v0.44.20): lobby / search settings go under the two figures instead of covering them */
@media (max-width: 767px) {
  .faceoff:has(.arena-cta.stand), .faceoff:has(.arena-cta.col) { min-height: 0; padding-bottom: 12px; }
  .faceoff .arena-cta.stand, .faceoff .arena-cta.col { position: static; grid-column: 1 / -1; width: 100%; margin: 12px 0 0; }
  .faceoff:has(.arena-cta.stand) .fo-side img, .faceoff:has(.arena-cta.col) .fo-side img { max-height: 210px; }
}
.up-mark { display: flex; align-items: center; justify-content: center; gap: 2px; width: 52px; height: 40px; flex-shrink: 0; border-radius: var(--r-sm); background: var(--surface-2); }
.up-mark .perk-img { width: 34px; height: 34px; }
.fight-injury { margin: 8px auto; max-width: 360px; padding: 8px 12px; border: 1px solid var(--bad); border-radius: 10px; background: rgba(229, 72, 77, .1); color: var(--text); }
.mile-box { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.mile-box > summary { cursor: pointer; font: 600 14px/1.3 var(--display); text-transform: uppercase; letter-spacing: .04em; list-style-position: inside; }
.mile-box > p { margin: 6px 0 8px; }
.mile-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; padding: 7px 10px; margin-top: 6px; border: 1px solid var(--line); border-radius: 8px; }
.mile-row span { grid-column: 1 / -1; font-size: 13px; color: var(--text-2); } .mile-row small { grid-row: 1; grid-column: 2; color: var(--muted); white-space: nowrap; }
.mile-row.on { border-color: color-mix(in srgb, var(--ok) 45%, var(--line)); } .mile-row:not(.on) { opacity: .75; }
.dc-st { display: flex; align-items: center; gap: 6px; } .dc-ic { width: 18px; height: 18px; object-fit: contain; flex: none; }
.so-check { display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; margin-top: 2px; } .so-check input { width: 18px; height: 18px; accent-color: var(--club); }
.panel.flash { animation: flashPanel 1.6s ease; } @keyframes flashPanel { 0%, 60% { box-shadow: 0 0 0 2px var(--club), var(--glow); } 100% { box-shadow: none; } }
.stat .v { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.1; } .stat .v-split { font-family: inherit; font-size: 11px; font-weight: 500; line-height: 1.3; color: var(--muted); white-space: nowrap; letter-spacing: 0; margin-top: 2px; }
.fight-drop { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px 6px; } .fight-drop .iico { width: 26px; height: 26px; object-fit: contain; vertical-align: middle; }

/* ---- crew Forge (v0.47) ---- */
.plus-tag, .tile-plus { display: inline-block; font: 700 12px/1 var(--display); letter-spacing: .02em; padding: 3px 6px; border-radius: 6px; vertical-align: middle; color: #fff; background: #3b4250; border: 1px solid #5a6373; }
.plus-tag { margin-left: 6px; font-size: 13px; }
.plus-tag.p5, .tile-plus.p5 { background: #1f4f9a; border-color: #4f8ff0; }
.plus-tag.p8, .tile-plus.p8 { background: #5b2a9a; border-color: #a06cf0; }
.plus-tag.p10, .tile-plus.p10 { background: linear-gradient(135deg, #8a5a12, #f5c15e); border-color: #ffd98a; color: #1a1205; box-shadow: 0 0 10px rgba(255, 170, 40, .7); }
.slot { position: relative; } .slot .tile-plus { position: absolute; left: 3px; top: 3px; font-size: 10.5px; padding: 2px 4px; z-index: 2; }
.ii-plus h4 { color: var(--gold); }
.forge { position: relative; border-radius: var(--r-md, 14px); padding: 14px; margin: -4px; background: linear-gradient(rgba(8, 9, 12, .78), rgba(8, 9, 12, .9)), url(/assets/bg/workshop-m.webp) center/cover; min-height: 360px; }
.fg-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; } .fg-head .chip .iico { width: 16px; height: 16px; }
.fg-caps { font: 600 15px/1.2 var(--display); text-transform: uppercase; letter-spacing: .04em; }
.fg-tabs button { display: inline-flex; align-items: center; gap: 6px; }
.fg-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 14px; margin-top: 10px; }
.fg-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 6px; align-content: start; max-height: 460px; overflow: auto; padding: 2px; }
.fg-list .fg-item { width: auto; height: auto; min-width: 0; aspect-ratio: 1; padding: 4px; cursor: pointer; } .fg-item .iico { width: 100%; height: 100%; object-fit: contain; }
.fg-item.selected { outline: 2px solid var(--gold); outline-offset: 1px; }
.fg-worn { position: absolute; right: 3px; bottom: 2px; font-size: 11px; color: var(--ok); } .fg-lock { position: absolute; right: 3px; top: 2px; font-size: 12px; }
.fg-anvil { background: rgba(14, 16, 21, .82); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 14px; }
.fg-piece { display: flex; gap: 12px; align-items: center; } .fg-piece > .iico { width: 72px; height: 72px; object-fit: contain; flex: none; }
.fg-step { display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 20px; margin: 14px 0 8px; } .fg-step .tile-plus { font-size: 18px; padding: 5px 9px; }
.fg-odds { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.fg-odds > div { background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; text-align: center; }
.fg-odds small { display: block; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; } .fg-odds b { font: 700 22px/1.2 var(--display); }
.fg-odds b.green { color: var(--ok); } .fg-odds b.gold { color: var(--gold); } .fg-odds b.danger { color: var(--bad); }
.fg-cost { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; margin-bottom: 8px; } .fg-cost .iico { width: 20px; height: 20px; vertical-align: middle; }
.fg-charm { display: flex; align-items: center; gap: 8px; margin: 6px 0; }
.fg-btns { gap: 8px; align-items: center; margin-top: 10px; } .fg-btns .primary.lg { display: inline-flex; align-items: center; gap: 8px; }
.fg-tip { width: 90px; display: inline-block; margin-left: 4px; }
.fg-max { text-align: center; font: 600 18px/1.3 var(--display); color: var(--gold); padding: 24px 0; }
.fg-order { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: rgba(14, 16, 21, .82); margin-bottom: 6px; }
.fg-order > .iico { width: 44px; height: 44px; object-fit: contain; } .fg-order.mine { border-color: color-mix(in srgb, var(--gold) 50%, var(--line)); }
.fg-box { background: rgba(14, 16, 21, .82); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 14px; display: grid; gap: 8px; justify-items: start; }
.fg-box h4 { margin: 0; } .fg-box .row .iico { width: 20px; height: 20px; vertical-align: middle; }
.fg-legends { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.fg-legends > div { display: grid; grid-template-columns: 40px 1fr; grid-template-rows: auto auto; gap: 0 8px; align-items: center; background: rgba(14, 16, 21, .82); border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; position: relative; }
.fg-legends .iico { width: 40px; height: 40px; grid-row: span 2; } .fg-legends .tile-plus { position: absolute; left: 4px; top: 4px; font-size: 10px; } .fg-legends small { color: var(--muted); }
.forge .table .iico { width: 24px; height: 24px; vertical-align: middle; }
@keyframes fgOk { 0% { box-shadow: 0 0 0 0 rgba(255, 190, 60, .9); } 100% { box-shadow: 0 0 0 26px rgba(255, 190, 60, 0); } }
@keyframes fgFail { 0%, 100% { transform: none; } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.forge.fg-hit-ok .fg-anvil { animation: fgOk .9s ease-out; } .forge.fg-hit-fail .fg-anvil { animation: fgFail .35s ease 2; }
@media (max-width: 760px) { .fg-grid { grid-template-columns: 1fr; } .fg-list { max-height: 210px; grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); } .fg-btns { flex-wrap: wrap; } }

/* v0.48 crew Gym — training cards in the gear colour code; crew kit crafting in the Workshop */
.gym { display: flex; flex-direction: column; gap: 10px; }
.gy-head { display: flex; gap: 12px; align-items: center; }
.gy-cap { display: flex; flex-direction: column; align-items: center; padding: 6px 12px; border-radius: 12px; background: var(--panel-2, rgba(127,127,127,.1)); min-width: 86px; }
.gy-cap b { font: 700 22px/1.1 var(--display); color: var(--gold); }
.gy-cap small { font-size: 11px; color: var(--muted); }
.gy-now { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); }
.gy-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 0 var(--c); animation: gyPulse 1.6s infinite; }
@keyframes gyPulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--c) 60%, transparent); } 100% { box-shadow: 0 0 0 10px transparent; } }
.gy-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 720px) { .gy-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.gy-card { display: flex; flex-direction: column; gap: 6px; padding: 10px; border-radius: 12px; border: 1px solid var(--line); border-top: 3px solid var(--c); background: linear-gradient(180deg, color-mix(in srgb, var(--c) 10%, transparent), transparent 60%); }
.gy-card.on { border-color: var(--c); box-shadow: 0 0 0 1px var(--c) inset; }
.gy-card.done { opacity: .8; }
.gy-top { display: flex; align-items: baseline; gap: 6px; }
.gy-val { font: 700 20px/1 var(--display); color: var(--c); }
.gy-pts { display: flex; gap: 3px; }
.gy-pts i { flex: 1; height: 6px; border-radius: 3px; background: color-mix(in srgb, var(--c) 18%, transparent); }
.gy-pts i.got { background: var(--c); }
.gy-pts i.shut { background: repeating-linear-gradient(45deg, rgba(127,127,127,.25) 0 3px, transparent 3px 6px); }
.gy-bar i { background: var(--c) !important; }
.gy-card button { margin-top: auto; }
.kc-head { display: flex; gap: 12px; align-items: center; }
.kc-head img { border-radius: 12px; object-fit: cover; }
.room-top > * { min-width: 0; }
.bld-levels { grid-template-columns: minmax(0, 1fr); }
.bld-levels li span { min-width: 0; overflow-wrap: anywhere; text-align: left; }
@media (max-width: 640px) { .room-top > .grow { align-self: stretch; width: 100%; max-width: 100%; } }
#main .tabs.kc-tabs { display: flex; flex-wrap: wrap; width: auto; max-width: 100%; }
#main .tabs.kc-tabs > button { flex: 1 1 0; min-width: 0; white-space: normal; justify-content: center; text-align: center; }
#main .bld-levels li, #main .bld-levels li span { white-space: normal; max-width: 100%; }
#main .bld-levels li.cur { display: flex; height: auto; padding: 5px 8px; font: 600 13px/1.35 var(--font-body); }

/* v0.49 crew daily life — Clubhouse roll call, Tactics Room order of the day */
.roll, .order-box { padding: 12px; margin-bottom: 14px; border-radius: 12px; border: 1px solid var(--line); background: linear-gradient(180deg, rgba(224, 168, 0, .07), transparent 70%); }
.roll-head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 10px; }
.roll-streak { display: flex; flex-direction: column; align-items: center; min-width: 86px; padding: 6px 10px; border-radius: 12px; background: var(--surface-2, rgba(127,127,127,.12)); }
.roll-streak b { font: 700 22px/1.1 var(--display); }
.roll-streak.hot b { color: #ff8a3d; }
.roll-streak small { font-size: 11px; }
.roll-bar { height: 22px; }
.roll-bar.full > i { background: linear-gradient(90deg, #1f7a45, #3ccf7a); }
.roll-box, .roll-who, .roll-ms { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; }
.order-on { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--gold, #e0a800); background: rgba(224, 168, 0, .1); }
.order-ic { font-size: 28px; line-height: 1; }
.order-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 760px) { .order-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.order-opt { display: flex; flex-direction: column; align-items: center; gap: 4px; height: auto; padding: 10px 8px; white-space: normal; text-align: center; }
.order-opt small { font: 400 11px/1.3 var(--font-body); color: var(--muted); text-transform: none; letter-spacing: 0; }
.order-img { object-fit: contain; flex-shrink: 0; filter: drop-shadow(0 2px 6px rgba(0,0,0,.5)); } .order-opt:hover .order-img { transform: scale(1.06); transition: transform .15s; }

/* v0.50 Trophy Wall and the crew match banner */
.tw-head, .cb-head { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.tw-total { padding: 6px 12px; border-radius: 12px; background: rgba(224, 168, 0, .1); border: 1px solid rgba(224, 168, 0, .4); display: flex; flex-direction: column; max-width: 50%; }
.tw-total small { font-size: 11px; color: var(--muted); }
.tw-total b { font-size: 13px; color: var(--gold, #e0a800); }
.tw-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 760px) { .tw-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tw-slot { min-height: 170px; border-radius: 12px; border: 1px dashed var(--line); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--muted); background: linear-gradient(180deg, rgba(90, 60, 30, .18), rgba(0, 0, 0, .1)); }
.tw-slot > span { font-size: 26px; opacity: .6; }
.tw-slot.on { border: 1px solid rgba(224, 168, 0, .55); box-shadow: inset 0 -18px 30px rgba(224, 168, 0, .08); }
.tw-slot.shut { opacity: .45; }
.tw-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 3px; padding: 8px; }
.tw-card img { object-fit: contain; filter: drop-shadow(0 3px 8px rgba(0,0,0,.6)); }
.tw-card b { font-size: 13px; line-height: 1.2; }
.tw-card small { font-size: 11px; line-height: 1.3; }
.tw-shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.tw-shelf .tw-card { border: 1px solid var(--line); border-radius: 12px; }
.tw-shelf.locked .tw-card { opacity: .65; }
.tw-shelf.locked img { filter: grayscale(.8) brightness(.8); }
.cb { padding: 12px; margin-bottom: 14px; border-radius: 12px; border: 1px solid var(--line); background: linear-gradient(180deg, rgba(176, 34, 42, .12), transparent 70%); }
.cb.raised { border-color: #3ccf7a; }
.cb-head img { border-radius: 12px; object-fit: contain; }
.cb-fx { display: inline-block; font-weight: 600; margin-bottom: 8px; }
.cb-up { padding: 8px 12px; border-radius: 10px; background: rgba(60, 207, 122, .12); border: 1px solid #3ccf7a; margin-bottom: 8px; font-weight: 600; }
.cb-form { display: flex; flex-direction: column; gap: 8px; }
.cb-row { display: grid; grid-template-columns: 140px minmax(0, 1fr) 80px auto; gap: 8px; align-items: center; }
.cb-row .bar { height: 20px; }
.cb-row input { width: 80px; }
.cb-form > button { align-self: flex-start; }
@media (max-width: 640px) { .cb-row { grid-template-columns: 1fr 70px; } .cb-row .bar { grid-column: 1 / -1; order: 3; } .cb-row small { display: none; } }
.cb.raised .bar > i { background: linear-gradient(90deg, #1f7a45, #3ccf7a); }
/* the raised crew banner: big, waving, gold */
.cb-up { display: flex; align-items: center; gap: 18px; padding: 14px 18px; margin: 4px 0 12px; border-radius: 14px; border: 1px solid rgba(224, 168, 0, .7);
  background: radial-gradient(circle at 18% 50%, rgba(224, 168, 0, .28), transparent 55%), linear-gradient(135deg, rgba(60, 207, 122, .14), rgba(0, 0, 0, .25)); box-shadow: 0 0 24px rgba(224, 168, 0, .18); }
.cb-flag { width: 150px; height: 150px; object-fit: contain; flex-shrink: 0; transform-origin: 12% 90%; animation: cbWave 3.2s ease-in-out infinite; filter: drop-shadow(0 6px 14px rgba(0,0,0,.6)) drop-shadow(0 0 18px rgba(224,168,0,.35)); }
@keyframes cbWave { 0%, 100% { transform: rotate(-2deg) skewY(0deg); } 50% { transform: rotate(2deg) skewY(-2deg); } }
@media (prefers-reduced-motion: reduce) { .cb-flag { animation: none; } }
.cb-up-t { font: 700 26px/1.1 var(--display); text-transform: uppercase; letter-spacing: .02em; }
.cb-up-pct { font: 800 56px/1 var(--display); color: var(--gold, #e0a800); text-shadow: 0 2px 12px rgba(224, 168, 0, .45); margin: 4px 0; }
.cb-up-s { font-size: 14px; color: var(--text-2, #ccc); }
@media (max-width: 640px) { .cb-up { flex-direction: column; text-align: center; gap: 6px; } .cb-flag { width: 120px; height: 120px; } .cb-up-t { font-size: 22px; } .cb-up-pct { font-size: 48px; } }
.cb-at { display: flex; flex-wrap: wrap; gap: 10px; }
.cb-at-one { display: flex; align-items: center; gap: 10px; padding: 6px 14px 6px 6px; border-radius: 12px; border: 1px solid rgba(224, 168, 0, .5); background: rgba(224, 168, 0, .08); color: inherit; }
.cb-at-one img { object-fit: contain; }
.cb-at-one span { display: flex; flex-direction: column; }
.cb-at-one small { color: var(--gold, #e0a800); font-weight: 600; }

/* v0.51 favourite player picker */
.fav-row { align-items: flex-start; }
.fav-pick { display: flex; flex-direction: column; gap: 6px; min-width: 0; width: min(360px, 100%); }
.fav-cur { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.fav-res { display: flex; flex-direction: column; gap: 4px; max-height: 260px; overflow-y: auto; }
.fav-res:empty { display: none; }
.fav-opt { display: flex; flex-direction: column; align-items: flex-start; gap: 0; height: auto; padding: 6px 10px; text-align: left; white-space: normal; text-transform: none; letter-spacing: 0; font: 500 14px/1.3 var(--font-body); }
.fav-opt small { color: var(--muted); font-size: 12px; }
.fav-chip { white-space: nowrap; }
@media (max-width: 640px) { .fav-row { flex-direction: column; } .fav-pick { width: 100%; } }
/* v0.52 follow your idol */
.idol-offer { border: 1px solid var(--gold, #e0a800); background: linear-gradient(135deg, rgba(224,168,0,.14), transparent 70%); margin-bottom: 12px; }
.idol-offer-t { font: 600 16px/1.35 var(--font-body); }
.idol-offer .row { gap: 8px; margin-top: 8px; flex-wrap: wrap; }
/* v0.55 fans' player of the season */
.vote-list { display: flex; flex-direction: column; gap: 6px; }
.vote-row { align-items: center; gap: 10px; padding: 6px 8px; border: 1px solid var(--line, rgba(255,255,255,.08)); border-radius: 8px; flex-wrap: nowrap; }
.vote-row.on { border-color: rgba(88,184,136,.5); background: var(--tint-ok); }
.vote-row .grow .small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vote-row .grow b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* v0.56 detailed gear filter (shop «Все вещи», market) */
.gf { margin: 8px 0 12px; border: 1px solid var(--border, rgba(255,255,255,.1)); border-radius: 10px; background: var(--surface-2, rgba(255,255,255,.03)); }
.gf > summary { cursor: pointer; padding: 10px 12px; font-weight: 700; list-style: none; display: flex; align-items: center; gap: 6px; }
.gf > summary::-webkit-details-marker { display: none; }
.gf > summary::after { content: '▾'; margin-left: auto; opacity: .6; }
.gf[open] > summary::after { content: '▴'; }
.gf-grid { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 0 12px 8px; }
.gf-grid select { max-width: 220px; }
.gf-range { display: flex; align-items: center; gap: 4px; }
.gf-range .input, .gf-row .input { width: 70px; }
.gf-stats { padding: 4px 12px 10px; border-top: 1px dashed var(--border, rgba(255,255,255,.1)); display: flex; flex-direction: column; gap: 6px; }
.gf-row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.gf-row select { flex: 1 1 160px; max-width: 240px; }
.shop-all-bar { gap: 8px; margin-bottom: 4px; }
.shop-all-bar select { max-width: 220px; }
.set-tag { color: #c4a2f7; margin-top: 2px; }
/* «Для тебя» sections */
.fy-sec + .fy-sec { margin-top: 18px; }
.fy-h { margin: 14px 0 2px; font-family: var(--font-display); text-transform: uppercase; letter-spacing: .02em; }
.fy-d { margin: 0 0 8px; }
/* token shop: exchange + packs */
.tok-x-ic { width: 26px; height: 26px; vertical-align: -7px; }
.tok-x .row { gap: 8px; flex-wrap: wrap; }
.pack-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.pack-card { display: flex; flex-direction: column; gap: 6px; padding: 10px; border: 1px solid var(--border, rgba(255,255,255,.1)); border-radius: 10px; background: var(--surface-2, rgba(255,255,255,.03)); }
.pack-card.pass { border-color: rgba(160,102,240,.55); background: rgba(160,102,240,.08); }
.pack-card .grow { flex: 1; }
.pack-art { display: flex; justify-content: center; gap: 2px; height: 64px; align-items: center; }
.pack-art span .iico, .pack-art span img { width: 44px; height: 44px; }
.pack-art span { font-size: 32px; }
.pack-art.one img { width: 64px; height: 64px; }
/* quick bookmarks: a slim tab at the right edge (middle), the list slides out */
.bm-dock { position: fixed; right: 0; top: 50%; transform: translateY(-50%); z-index: 35; display: flex; align-items: center; }
.bm-dock.hidden { display: none; }
.bm-tab { width: 30px; height: 64px; padding: 0; border-radius: 10px 0 0 10px; border: 1px solid var(--border-strong, rgba(255,255,255,.2)); border-right: 0;
  background: linear-gradient(180deg, #c3232c, #7d151c); color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-lg); }
.bm-list { display: none; flex-direction: column; gap: 2px; padding: 8px; min-width: 210px; max-width: 70vw; max-height: 80vh; overflow: auto;
  background: var(--surface, #14171c); border: 1px solid var(--border-strong, rgba(255,255,255,.2)); border-right: 0; border-radius: 12px 0 0 12px; box-shadow: var(--shadow-lg); }
.bm-dock.open .bm-list { display: flex; animation: bmIn .18s ease-out; }
@media (hover: hover) { .bm-dock:hover .bm-list, .bm-dock:focus-within .bm-list { display: flex; } }
@keyframes bmIn { from { transform: translateX(16px); opacity: 0; } to { transform: none; opacity: 1; } }
.bm-head { text-transform: uppercase; letter-spacing: .06em; opacity: .7; padding: 2px 6px 6px; }
.bm-list a, .bm-list button { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 8px; color: inherit; text-decoration: none; background: none; border: 0; text-align: left; min-height: 40px; }
.bm-list a:hover, .bm-list a.on, .bm-list button:hover { background: rgba(255,255,255,.07); }
.bm-list a.on { box-shadow: inset 3px 0 0 var(--red, #d72c35); }
.bm-list img { width: 22px; height: 22px; object-fit: contain; }
.bm-list .bm-add, .bm-list .bm-edit { opacity: .8; }
.bm-set { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.bm-set .fld { display: flex; align-items: center; gap: 8px; }
.bm-set .fld span { width: 16px; opacity: .6; }
.bm-set select { flex: 1; min-width: 0; }
@media (max-width: 720px) { .bm-dock { top: 42%; } .bm-tab { width: 26px; height: 54px; } }
.tok-x .panel-head h3 { display: flex; align-items: center; gap: 8px; } .tok-x-ic { vertical-align: 0; }
.bm-list button { text-transform: none; font: inherit; letter-spacing: 0; font-weight: 400; cursor: pointer; }
.bm-set label.fld { flex-direction: row; }
/* v0.56.1 job cards: grouped by district, roomy cards (2–3 a row on desktop, one wide row-card on a phone) */
.job-groups { display: flex; flex-direction: column; gap: 18px; }
.jg-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 8px; }
.jg-head a { font: 600 18px/1.1 var(--font-display); text-transform: uppercase; color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.jg-head a:hover { color: var(--red); }
.job-groups .job-grid { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.job-groups .job-card { padding: 0; gap: 0; overflow: hidden; }
.job-groups .job-card .jc-art { height: 132px; border-radius: 0; padding: 8px; }
.job-groups .jc-body { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px 12px; flex: 1; }
.job-groups .job-card .jc-head { font: 600 17px/1.15 var(--font-display); text-align: left; min-height: 0; display: block; }
.job-groups .job-card .jc-d { text-align: left; min-height: 0; flex: 1; line-height: 1.4; }
.jc-stats { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 14px; }
.jc-loot { display: inline-flex; gap: 2px; margin-left: auto; }
.jc-loot .iico, .jc-loot img { width: 22px; height: 22px; }
.job-groups .job-card button { width: 100%; min-height: 36px; }
@media (max-width: 640px) {
  .job-groups .job-grid { grid-template-columns: 1fr; gap: 10px; }
  .job-groups .job-card { flex-direction: row; }
  .job-groups .job-card .jc-art { width: 112px; height: auto; min-height: 150px; flex-shrink: 0; }
  .job-groups .jc-art .job-img { width: 86%; height: 70%; }
  .job-groups .jc-body { padding: 10px; gap: 6px; }
  .job-groups .job-card .jc-head { font-size: 16px; }
}
/* v0.57 updated documents bar */
.legal-bar { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 60; width: min(720px, calc(100vw - 24px)); display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 12px 14px; border-radius: 12px; background: var(--surface, #14171c); border: 1px solid var(--border-strong, rgba(255,255,255,.2)); box-shadow: var(--shadow-lg); }
.legal-bar .grow { display: flex; flex-direction: column; gap: 2px; min-width: 220px; }
@media (max-width: 720px) { .legal-bar { bottom: 74px; } }

/* v0.61 live events from the team (bonus weekends …) and the promo code field */
.live-ribbon { max-width: 1280px; margin: 10px auto 0; padding: 0 var(--s4); display: grid; gap: 6px; }
.live-ev { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 9px 14px; border-radius: 12px; border: 1px solid rgba(240,180,60,.45);
  background: linear-gradient(90deg, rgba(240,180,60,.16), rgba(215,44,53,.10)); }
.live-ev .live-d { flex-basis: 100%; color: var(--text-2); }
.chip.gold { background: var(--tint-gold); color: var(--gold); border-color: transparent; }
.promo-form input { text-transform: uppercase; letter-spacing: .06em; }
