@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@500;700&family=Manrope:wght@400;500;600;700;800&display=swap');

/* ---------- Тема: лише темна (02.12, «афіша зовні, Steam усередині»). Oswald - заголовки, Manrope - текст. ---------- */
:root {
  --bg: #0b0b0d;
  --surface: #141418;
  --surface2: #1c1c22;
  --line: #2a2a31;
  --text: #f1eee7;
  --muted: #9b978f;
  --faint: #6c6963;
  --accent: #e0353f;
  --accent-soft: #3a151a;
  --accent-text: #ffffff;
  --gold: #ffb547;
  --good: #5fcf8f;
  --good-soft: #13291d;
  --bad: #f0646a;
  --bad-soft: #3a151a;
  --warn: #ffb547;
  --warn-soft: #33260f;
  --info: #7aa6f0;
  --info-soft: #182338;
  --shadow: none;
  --pad: max(3vw, 16px);
  --head: Oswald, 'Arial Narrow', sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 Manrope, system-ui, sans-serif;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; font-weight: 700; }
h1, h2 { font-family: var(--head); text-transform: uppercase; letter-spacing: .005em; line-height: 1.1; }
h1 { font-size: clamp(28px, 3.4vw, 40px); }
h2 { font-size: 22px; display: flex; align-items: center; gap: 8px; }
h2 > svg.ico { display: none; }
h3 { font-size: 16px; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 12.5px; }
.ico { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -4px; }
.ico.sm { width: 15px; height: 15px; vertical-align: -3px; }
.ico.lg { width: 22px; height: 22px; }

/* ---------- Каркас: бокова панель + основне поле ---------- */
.app { display: grid; grid-template-columns: 272px 1fr; min-height: 100vh; }
.side {
  background: var(--surface);
  border-right: 1px solid var(--line);
  padding: 20px 16px;
  display: flex; flex-direction: column; gap: 18px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.main { padding: 26px 30px 60px; min-width: 0; }   /* на всю ширину від бокової панелі: блоки самі заповнюють місце */
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none !important; }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; background: var(--accent); color: var(--accent-text); display: grid; place-items: center; flex: none; }
.brand-mark .ico { stroke-width: 2; }
.brand-name { font-weight: 700; font-size: 15px; line-height: 1.2; }
.brand-sub { font-size: 12px; color: var(--muted); }
.side-bottom { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }
.side-label { font-size: 11px; font-weight: 600; color: var(--faint); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px; }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav button, .nav a {
  display: flex; align-items: center; gap: 10px; width: 100%;
  background: none; border: 0; color: var(--muted); font: inherit; font-weight: 500;
  padding: 9px 10px; border-radius: 9px; cursor: pointer; text-align: left;
}
.nav a { text-decoration: none !important; }
.nav button:hover, .nav a:hover { background: var(--surface2); color: var(--text); }
.nav button.on, .nav a.on { background: var(--accent-soft); color: var(--accent); }
.nav .cnt { margin-left: auto; background: var(--accent); color: var(--accent-text); border-radius: 999px; font-size: 11px; font-weight: 600; padding: 1px 7px; }

.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.section { margin-top: 26px; }
.section > h2 { margin-bottom: 12px; color: var(--text); }
.section > h2 .ico { color: var(--muted); }

/* ---------- Картки ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px; box-shadow: var(--shadow); }
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.cols { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; align-items: stretch; }
/* картки в два стовпчики однакової висоти; довгі списки гортаються всередині, а не розтягують сторінку */
.cols > .card { display: flex; flex-direction: column; min-width: 0; }
.cols > .card > .empty { flex: 1; display: grid; place-items: center; }
.list-scroll { max-height: 360px; overflow-y: auto; margin-right: -8px; padding-right: 8px; scrollbar-width: thin; }
.linkish { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; font-size: 13px; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; box-shadow: none; }
.linkish:hover { background: none; opacity: .8; }
.stack > * + * { margin-top: 10px; }

/* Плитки-показники */
.tiles { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; box-shadow: var(--shadow); }
.tile-top { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12.5px; font-weight: 500; }
.tile-ico { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--surface2); color: var(--muted); }
.tile-ico.accent { background: var(--accent-soft); color: var(--accent); }
.tile-ico.good { background: var(--good-soft); color: var(--good); }
.tile-ico.bad { background: var(--bad-soft); color: var(--bad); }
.tile-ico.warn { background: var(--warn-soft); color: var(--warn); }
.tile-val { font-size: 28px; font-weight: 700; letter-spacing: -.02em; margin-top: 8px; line-height: 1.1; }
.tile-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }

/* Баланс у боковій панелі */
.balance { border-radius: 14px; padding: 16px; background: var(--surface2); }
.bal-row { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.bal-pay { margin-top: 12px; width: 100%; }
.me-head { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.me-head h1 { margin: 0; }
.me-head-text { flex: 1; min-width: 200px; }
.me-head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.avatar.lg { width: 56px; height: 56px; font-size: 20px; }
.me-edit { max-width: 560px; margin-bottom: 20px; }
.balance .num { font-size: 36px; font-weight: 700; letter-spacing: -.03em; line-height: 1; }
.balance .lbl { font-weight: 600; margin-top: 6px; }
.balance .hint { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.balance.pos { background: var(--good-soft); } .balance.pos .num { color: var(--good); }
.balance.neg { background: var(--bad-soft); } .balance.neg .num { color: var(--bad); }
.meter { height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; margin-top: 12px; }
.meter > i { display: block; height: 100%; border-radius: 99px; background: currentColor; }

.kv { display: flex; flex-direction: column; gap: 8px; }
.kv-row { display: flex; align-items: center; gap: 10px; }
.kv-row .ico { color: var(--muted); }
.kv-row b { margin-left: auto; font-weight: 600; }

/* Ігри */
.game { display: flex; gap: 14px; align-items: flex-start; }
.date-chip { flex: none; width: 54px; border-radius: 11px; background: var(--accent-soft); color: var(--accent); text-align: center; padding: 6px 0 7px; }
.date-chip .d { font-size: 21px; font-weight: 700; line-height: 1.1; }
.date-chip .m { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.date-chip.past { background: var(--surface2); color: var(--muted); }
.game-info { min-width: 0; flex: 1; }
.game-title { font-weight: 600; font-size: 15px; }
.game-meta { color: var(--muted); font-size: 12.5px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 2px; }
.game-text { margin-top: 8px; font-size: 13.5px; }
.who { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.chip { background: var(--surface2); border-radius: 999px; padding: 2px 9px; font-size: 12px; color: var(--text); }
.list-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.list-row:last-child { border-bottom: 0; }

.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.b-planned { background: var(--info-soft); color: var(--info); }
.b-done { background: var(--good-soft); color: var(--good); }
.b-cancel { background: var(--bad-soft); color: var(--bad); }
.b-moved, .b-pending { background: var(--warn-soft); color: var(--warn); }

/* Міні-діаграма активності */
.bars { display: flex; align-items: flex-end; gap: 8px; height: 120px; padding-top: 18px; }
.bar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; position: relative; cursor: default; }
.bar i { display: block; width: 100%; max-width: 34px; background: var(--accent); border-radius: 4px 4px 0 0; min-height: 2px; }
.bar i.zero { background: var(--line); }
.bar span { font-size: 11px; color: var(--muted); margin-top: 6px; }
.bar em { font-style: normal; font-size: 11.5px; font-weight: 600; color: var(--muted); margin-bottom: 4px; line-height: 1; }
.bar:hover em { color: var(--text); }
.bar:hover i { filter: brightness(1.12); }
.bars-base { height: 1px; background: var(--line); }

/* Кнопки й форми */
button, .btn {
  font: inherit; font-weight: 600; cursor: pointer;
  background: var(--accent); color: var(--accent-text); border: 1px solid transparent; border-radius: 9px;
  padding: 8px 14px; display: inline-flex; align-items: center; gap: 6px; text-decoration: none !important;
}
button:hover, .btn:hover { filter: brightness(1.08); }
button.ghost, .btn.ghost { background: var(--surface); border-color: var(--line); color: var(--text); }
button.ghost:hover { background: var(--surface2); filter: none; }
button.ok { background: var(--good); }
button.no { background: var(--bad); }
button.sm, .btn.sm { padding: 5px 10px; font-size: 12.5px; border-radius: 8px; }
button.icon-only { padding: 6px; }
button:disabled { opacity: .5; cursor: default; }
.theme-btn { width: 100%; justify-content: center; }

input, select, textarea {
  font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; width: 100%;
}
textarea { min-height: 76px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
label { display: block; font-size: 12.5px; color: var(--muted); margin: 12px 0 4px; font-weight: 500; }
label.check { display: flex; align-items: center; gap: 8px; color: var(--text); font-size: 13.5px; margin: 3px 0; cursor: pointer; font-weight: 400; }
label.check input { width: auto; accent-color: var(--accent); }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.row > * { flex: 1 1 150px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }

/* Абонементи */
.pkgs { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.pkg { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 13px 14px; cursor: pointer; text-align: left; color: var(--text); font-weight: 400; display: block; box-shadow: var(--shadow); }
.pkg:hover { border-color: var(--accent); filter: none; }
.pkg.sel { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.pkg.dim { opacity: .55; }
.pkg .n { font-weight: 600; font-size: 13px; }
.pkg .p { font-size: 20px; font-weight: 700; margin-top: 4px; letter-spacing: -.02em; }
.pkg .per { font-size: 12px; color: var(--muted); display: flex; justify-content: space-between; gap: 6px; }
.pkg .off { color: var(--good); font-weight: 600; }
.pkg.debt { border-color: var(--bad); }
.pkg.debt .p { color: var(--bad); }

.note { border-radius: 12px; padding: 12px 14px; display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; }
.note.warn { background: var(--warn-soft); color: var(--warn); }
.note.err { background: var(--bad-soft); color: var(--bad); }
.note.info { background: var(--info-soft); color: var(--info); }
.note .ico { margin-top: 1px; }

/* Таблиці */
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
th { font-size: 11.5px; color: var(--faint); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
td.num, th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pos { color: var(--good); } .neg { color: var(--bad); }
.card.flush { padding: 4px 6px; }

.seg { display: inline-flex; background: var(--surface2); border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { background: none; color: var(--muted); border: 0; padding: 6px 12px; border-radius: 8px; font-weight: 500; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }

.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 700; flex: none; }
.who-am-i { display: flex; align-items: center; gap: 10px; }

.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 2px 12px; background: var(--surface2); border-radius: 10px; padding: 8px 12px; }
.linkbox { display: flex; gap: 6px; align-items: center; }
.linkbox code { background: var(--surface2); padding: 3px 8px; border-radius: 6px; font-size: 12px; color: var(--muted); }

/* Шкала боргу */
.debt-bar { height: 6px; background: var(--surface2); border-radius: 99px; flex: 1; min-width: 60px; overflow: hidden; }
.debt-bar i { display: block; height: 100%; background: var(--bad); border-radius: 99px; }

.modal-bg { position: fixed; inset: 0; background: rgba(10, 8, 8, .5); display: flex; align-items: flex-start; justify-content: center; padding: 40px 14px; overflow-y: auto; z-index: 10; }
.modal { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 20px; width: 100%; max-width: 620px; }

#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); background: var(--good); color: #fff; padding: 10px 18px; border-radius: 10px; opacity: 0; transition: .2s; pointer-events: none; z-index: 20; font-weight: 500; }
#toast.show { opacity: 1; transform: translateX(-50%); }
#toast.err { background: var(--bad); }

.empty { color: var(--muted); padding: 22px; text-align: center; border: 1px dashed var(--line); border-radius: 14px; font-size: 13.5px; }

/* ---------- Мобільні ---------- */
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .side { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .side-bottom { margin-top: 0; }
  .main { padding: 20px 16px 50px; }
  .cols { grid-template-columns: 1fr; }
  .nav { flex-direction: row; flex-wrap: wrap; }
  .nav button, .nav a { width: auto; }
}

/* Обкладинки кампаній */
.cover { display: block; width: calc(100% + 32px); margin: -16px -16px 14px; aspect-ratio: 16 / 8; object-fit: cover; border-radius: 13px 13px 0 0; background: var(--surface2); }
.camp-card { overflow: hidden; display: flex; flex-direction: column; }
.camp-desc { font-size: 13.5px; color: var(--muted); margin-top: 8px; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.camp-card.open .camp-desc { -webkit-line-clamp: unset; }
.more-link { background: none; border: 0; padding: 0; margin-top: 6px; color: var(--accent); font-weight: 500; font-size: 13px; }
.more-link:hover { filter: none; text-decoration: underline; }
.thumb { width: 54px; height: 54px; border-radius: 11px; object-fit: cover; flex: none; }

/* Заглушка обкладинки (коли картинки немає) */
.cover.ph, .slot-bg.ph { display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 6px; color: rgba(255,255,255,.85); font-weight: 600; font-size: 13px; text-align: center; padding: 10px; }
.cover.ph .ico { width: 34px; height: 34px; stroke-width: 1.4; opacity: .8; }

/* Календар розкладу */
.cal-week { margin-bottom: 18px; }
.cal-label { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin: 0 0 8px 2px; }
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.day { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 8px; min-height: 168px; display: flex; flex-direction: column; gap: 6px; box-shadow: var(--shadow); }
.day.past { opacity: .5; }
.day.today { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.day-head { display: flex; align-items: baseline; justify-content: space-between; font-size: 12px; color: var(--muted); font-weight: 600; padding: 0 2px; }
.day-head b { font-size: 17px; color: var(--text); }
.day.today .day-head b { color: var(--accent); }
.day-free { flex: 1; display: grid; place-items: center; color: var(--faint); font-size: 12px; border: 1px dashed var(--line); border-radius: 9px; }
.slot { position: relative; border-radius: 10px; overflow: hidden; flex: 1; min-height: 128px; display: flex; align-items: flex-end; color: #fff; text-decoration: none !important; }
.slot-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.slot::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.1) 0%, rgba(0,0,0,.55) 40%, rgba(0,0,0,.9) 100%); }
.slot-text { text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.slot-text { position: relative; z-index: 1; padding: 8px 9px; width: 100%; }
.slot-time { font-size: 18px; font-weight: 700; line-height: 1; }
.slot-name { font-size: 12.5px; font-weight: 600; margin-top: 4px; line-height: 1.25; }
.slot-sys { font-size: 11px; opacity: .75; margin-top: 2px; line-height: 1.2; }
.slot-badge { position: absolute; top: 6px; left: 6px; z-index: 1; }
.slot.cancelled .slot-text { text-decoration: line-through; opacity: .7; }
.slot.done::before { content: '✓'; position: absolute; top: 6px; right: 8px; z-index: 1; font-weight: 700; }

@media (max-width: 900px) {
  .week { grid-template-columns: 1fr; }
  .day { min-height: 0; flex-direction: row; align-items: stretch; }
  .day-head { flex-direction: column; justify-content: flex-start; width: 46px; flex: none; }
  .day.empty { display: none; }
  .slot { min-height: 92px; }
}

/* Однаковий текст у всіх картках календаря: час на одній висоті, назва — рівно 2 рядки, система — 1 рядок */
.slot-name { height: 2.5em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.slot-sys { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; height: 1.2em; }

/* Картки «Мої кампанії» */
.mini-camps { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }   /* auto-fit: кілька плиток розтягуються на всю ширину, без порожнього хвоста */
.mini-camp { display: flex; gap: 12px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 8px; color: var(--text); text-decoration: none !important; box-shadow: var(--shadow); transition: border-color .15s; }
.mini-camp:hover { border-color: var(--accent); }
.mini-camp .thumb, .mini-camp .ph-thumb { width: 64px; height: 64px; border-radius: 9px; object-fit: cover; flex: none; }
.mini-camp .n { font-weight: 600; line-height: 1.25; }
.mini-camp .s { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-camp.done { opacity: .7; }
a.camp-card.mine { color: inherit; text-decoration: none !important; transition: border-color .15s; }
a.camp-card.mine:hover { border-color: var(--accent); }
.camp-card.done { opacity: .6; } .camp-card.done:hover { opacity: .9; }
a.slot { cursor: pointer; }
a.slot:hover .slot-bg { transform: scale(1.04); }
.slot-bg { transition: transform .25s; }
.title-link { color: inherit; text-decoration: none; }
.title-link:hover { color: var(--accent); text-decoration: none; }
.camp-card > a:first-child { display: block; } a.game-title { display: block; }

/* ---------- досягнення ---------- */
.ach { display: flex; gap: 12px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.ach-ico { flex: none; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 22px; background: var(--accent-soft); }
.ach-t { font-weight: 700; line-height: 1.25; }
.ach-n { font-size: 12px; color: var(--muted); margin-top: 1px; }
.ach-bar { height: 6px; border-radius: 3px; background: var(--line); margin: 8px 0 5px; overflow: hidden; }
.ach-bar i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.ach-s { font-size: 12px; color: var(--faint); }
.ach.locked .ach-ico { filter: grayscale(1); opacity: .45; background: var(--surface2); }
.ach.locked .ach-t { color: var(--muted); }
.side-ach { margin: 4px 0 14px; }
.ach-badges { display: grid; grid-template-columns: repeat(auto-fill, 40px); gap: 8px 7px; }
.ach-badge { position: relative; aspect-ratio: 1; padding: 0; border-radius: 11px; background: var(--accent-soft); border: 1px solid transparent; display: grid; place-items: center; cursor: pointer; }
.ach-badge:hover { border-color: var(--accent); }
.ach-badge .e { font-size: 20px; line-height: 1; }
.ach-badge .l { position: absolute; right: -4px; bottom: -4px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; }
.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px; }
.ach-card { display: flex; gap: 12px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 12px; }
.ach-card.focus { border-color: var(--accent); }
.ach-card.locked { opacity: .55; }
.ach-card.locked .ach-ico { filter: grayscale(1); background: var(--surface2); }
.ach-card .ach-ico { width: 38px; height: 38px; font-size: 19px; }
.ach-card .ach-bar { height: 3px; margin: 7px 0 4px; }
/* плашки досягнень у боковій панелі + рідкість */
.ach-pill { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 7px 10px; margin-bottom: 6px; border-radius: 11px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; color: var(--text); font-weight: 400; }
.ach-pill .e { font-size: 18px; flex: none; width: 24px; text-align: center; }
.ach-pill .t { min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.ach-pill b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ach-pill small { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.r-legend { border-color: #d4a72c !important; background: linear-gradient(135deg, rgba(232, 185, 50, .22), rgba(232, 185, 50, .06)) !important; box-shadow: 0 0 0 1px rgba(212, 167, 44, .25), 0 2px 10px rgba(212, 167, 44, .18); }

.r-legend b, .r-legend .ach-t { color: #f0c64a; }
.r-epic { border-color: rgba(139, 92, 246, .55) !important; background: rgba(139, 92, 246, .09) !important; }
.r-rare { border-color: rgba(59, 130, 246, .5) !important; background: rgba(59, 130, 246, .07) !important; }
.ach-rar { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; padding: 1px 6px; border-radius: 6px; vertical-align: 2px; }
.r-legend .ach-rar { background: rgba(212, 167, 44, .2); }
.r-legend .ach-rar { color: #f0c64a; }
.r-epic .ach-rar { background: rgba(139, 92, 246, .16); color: #7c4ddb; }
.r-rare .ach-rar { background: rgba(59, 130, 246, .14); color: #2f6fd6; }
.r-epic .ach-rar { color: #b39dfa; }
.r-rare .ach-rar { color: #8ab4fb; }
.r-legend .ach-ico, .r-legend .e { filter: drop-shadow(0 0 4px rgba(232, 185, 50, .6)); }
/* оплата: вибір способу й крок за кроком для переказу */
.way-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.way-tabs button { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface2); color: var(--text); font-weight: 400; box-shadow: none; }
.way-tabs button span { font-size: 12px; color: var(--muted); }
.way-tabs button.on { border-color: var(--accent); background: var(--accent-soft); }
.steps { margin: 14px 0 0; padding-left: 20px; display: grid; gap: 12px; }
.steps li::marker { font-weight: 700; color: var(--accent); }
.req { margin-top: 8px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.req-row { display: flex; align-items: center; gap: 10px; justify-content: space-between; padding: 8px 12px; border-top: 1px solid var(--line); }
.req-row:first-child { border-top: 0; }
.req-val { font-weight: 600; word-break: break-all; }
button.big { padding: 12px 20px; font-size: 15px; }
@media (max-width: 640px) { .way-tabs { grid-template-columns: 1fr; } }
.sys-ph .mono { font-size: 54px; font-weight: 800; letter-spacing: .02em; color: rgba(255,255,255,.9); text-shadow: 0 4px 20px rgba(0,0,0,.25); }
/* арт системи: широкий арт на всю картку */
.sys-art { position: relative; overflow: hidden; }
.sys-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sys-links { display: grid; grid-template-columns: auto 1fr; gap: 8px; margin-top: 12px; }
.sys-links .btn { justify-content: center; white-space: nowrap; }
.sys-links .off { opacity: .4; pointer-events: none; filter: grayscale(1); }
.sys-title { min-height: 2.6em; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sys-desc { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.sys-camps { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.sys-camp { display: flex; justify-content: space-between; gap: 10px; padding: 4px 6px; margin: 0 -6px; border-radius: 6px; font-size: 13px; color: var(--muted); text-decoration: none; }
.sys-camp:hover { background: var(--surface2); color: var(--text); }
.sys-camp.on { color: var(--text); font-weight: 500; }
.sys-camp .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sys-camp .yr { flex: none; font-size: 12px; opacity: .8; }
.sys-card .sys-camps:not(.all) { min-height: calc(4 * 27px + 24px); }
.sys-card .more-link { align-self: flex-start; margin-top: 4px; }

/* Таблиця лідерів */
.lb-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.lb-groups { margin-bottom: 12px; }
.lb-sys { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.lb-sys span { color: var(--muted); font-size: 14px; }
.lb-sys select { width: auto; min-width: 240px; max-width: 100%; font-weight: 600; }
.lb-hint { margin: -4px 0 12px; }
.lb-more { width: 100%; margin-top: 6px; }
.lb { padding: 6px 10px; }
.lb-row { display: grid; grid-template-columns: 34px 30px minmax(90px, 1fr) minmax(60px, 2fr) 104px; align-items: center; gap: 10px; padding: 8px 6px; border-bottom: 1px solid var(--line); }
.lb-row:last-child { border-bottom: 0; }
.lb-row.me { background: var(--accent-soft); border-radius: 8px; }
.lb-row.off { opacity: .55; }
.lb-place { text-align: center; font-weight: 600; color: var(--muted); }
.lb-name { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-bar { height: 6px; background: var(--surface2); border-radius: 99px; overflow: hidden; }
.lb-bar i { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.lb-val { text-align: right; font-variant-numeric: tabular-nums; font-size: 13px; color: var(--muted); white-space: nowrap; }
.avatar.sm { width: 28px; height: 28px; font-size: 11px; }
@media (max-width: 640px) { .lb-row { grid-template-columns: 28px minmax(80px, 1fr) 96px; } .lb-row .avatar, .lb-bar { display: none; } }

/* Опис досягнення з рівнями */
.ach-card { cursor: pointer; }
.ach-levels { display: flex; flex-direction: column; gap: 4px; }
.ach-lv { display: grid; grid-template-columns: 26px 1fr auto; gap: 10px; align-items: center; padding: 7px 10px; border-radius: 8px; color: var(--muted); }
.ach-lv .mk { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; background: var(--surface2); }
.ach-lv.got { color: var(--text); }
.ach-lv.got .mk { background: var(--accent); color: var(--accent-text); }
.ach-lv.upcoming { background: var(--accent-soft); color: var(--text); }
.ach-tabs { margin-top: 4px; flex-wrap: wrap; }
.ach-items { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 12px; }
.ach-items span { padding: 4px 10px; border-radius: 999px; border: 1px dashed var(--line); color: var(--muted); font-size: 13px; }
.ach-items span.got { border: 1px solid var(--accent); color: var(--text); background: var(--accent-soft); }

/* Загальна статистика майстра на сторінці систем */
.gm-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin: 4px 0 22px; }
.gm-stat { padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.gm-stat b { font-size: 26px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.gm-stat span { color: var(--muted); font-size: 13px; }

/* Мобільна шапка: логотип + навігація, решта бокової панелі — під кнопкою «Меню» (29.11) */
.menu-toggle { display: none; }
@media (max-width: 900px) {
  .side { padding-bottom: 12px; gap: 10px; }
  .side .menu-toggle { display: inline-flex; align-self: flex-start; }
  .side:not(.open) > :not(.brand):not(.nav):not(.menu-toggle):not(.keep-m):not(.side-label) { display: none; }
  .side:not(.open) > .side-label { display: none; }
  .side .site-nav { gap: 4px; }
  .side .site-nav a { padding: 7px 10px; font-size: 13.5px; }
  .home-head h1, .home-head .muted { display: none; }
  .home-head { margin-bottom: 0; }
}
/* Плавні переходи між сторінками (браузери, що вміють) */
@view-transition { navigation: auto; }

/* «Про майстра» на головній */
.about { margin-bottom: 18px; display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 16px 28px; align-items: center; }
@media (max-width: 1100px) { .about { grid-template-columns: 1fr; } }
.about-text { font-size: 15px; line-height: 1.6; }
.about-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.about-stats > * { display: flex; flex-direction: column; padding: 10px 12px; background: var(--surface2); border-radius: 10px; color: inherit; text-decoration: none; }
.about-stats b { font-size: 21px; font-variant-numeric: tabular-nums; }
.about-stats span { font-size: 12.5px; color: var(--muted); }
.about-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 14px; }
.review .stars { color: #e9b949; letter-spacing: 2px; margin-bottom: 6px; }

/* Компактна колонка (таблиця лідерів, профіль гравця) */
.narrow { }
a.lb-row { color: inherit; text-decoration: none; }
a.lb-row:hover { background: var(--surface2); border-radius: 8px; }
.lb-gap { text-align: center; color: var(--muted); padding: 2px 0; letter-spacing: 3px; }
.ach-pills { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }

/* Списки й текст - вузька колонка зліва (~800px), справа корисна бокова колонка; на вужчих екранах - одна колонка (29.11) */
.split { display: grid; grid-template-columns: minmax(0, 820px) minmax(260px, 1fr); gap: 24px; align-items: start; }
.split > * { min-width: 0; }
.split > .aside-col > .section:first-child, .split > .main-col > .section:first-child { margin-top: 0; }
@media (max-width: 1200px) { .split { grid-template-columns: 1fr; } }
.places { padding: 0; }
.side-card { padding: 14px; }
.side-card-h { margin: 2px 6px 10px; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.split.even { align-items: stretch; }
.split.even > .aside-col { display: flex; flex-direction: column; }
.split.even > .aside-col > .side-card { flex: 1; display: flex; flex-direction: column; }
.place-row.off { opacity: .55; }
.split.even > .main-col { display: flex; flex-direction: column; }
.split.even > .main-col > .lb { flex: 1; display: flex; flex-direction: column; }
.split.even .lb-more { margin-top: auto; }
.split:not(.even) > .aside-col { position: sticky; top: 16px; }
.podiums { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px 20px; padding: 0 6px; }
@media (max-width: 1200px) { .split > .aside-col { position: static; } }
.place-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; padding: 8px; border-radius: 8px; cursor: pointer; background: none; border: 0; width: 100%; text-align: left; color: inherit; font: inherit; }
.place-row:hover, .place-row.on { background: var(--surface2); }
.place-row .pl { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.podium { padding: 12px 14px; }
.podiums .podium { padding: 0; }
.podium h3 { margin: 0 0 6px; font-size: 13px; color: var(--muted); font-weight: 600; display: flex; gap: 6px; align-items: center; }
.podium a { display: flex; justify-content: space-between; gap: 8px; padding: 3px 0; color: inherit; text-decoration: none; font-size: 13.5px; }
.podium a:hover { color: var(--accent); }

/* Кабінет: статистика-досягнення (значок + 2 рядки + тонка полоска) */
.stat-achs { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.stat-ach { display: flex; gap: 12px; align-items: center; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; color: inherit; font: inherit; cursor: pointer; }
.stat-ach:hover { border-color: var(--accent); filter: none; }
.sa-ico { font-size: 24px; width: 42px; height: 42px; display: grid; place-items: center; background: var(--surface2); border-radius: 10px; flex: none; }
.sa-w { min-width: 0; flex: 1; }
.sa-n { font-size: 18px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sa-n span { font-size: 14px; font-weight: 400; color: var(--muted); }
.sa-t { font-size: 13px; color: var(--muted); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sa-bar { height: 3px; background: var(--line); border-radius: 2px; margin-top: 7px; overflow: hidden; }
.sa-bar i { display: block; height: 100%; background: var(--accent); }
.stat-achs-foot { display: flex; gap: 14px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.note.good { background: var(--good-soft); color: var(--good); }
.note.good a { color: inherit; text-decoration: underline; }
/* 02.12: разова знижка за підключення Telegram-бота */
.tg-gift { display: flex; gap: 10px; align-items: center; margin-top: 12px; padding: 10px 12px; border-radius: 12px;
  background: var(--good-soft); color: var(--good); text-decoration: none; border: 1px dashed currentColor; line-height: 1.3; }
.tg-gift:hover { filter: brightness(1.05); }
.tg-gift .g { font-size: 24px; }
.tg-gift b { font-size: 15px; }
.tg-gift .small { color: var(--muted); }
.bonus-tag { display: inline-block; margin-top: 6px; padding: 2px 8px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
  background: var(--good-soft); color: var(--good); }
.side-debt { border-radius: 12px; padding: 12px 14px; background: var(--bad-soft); }
.side-debt .t { font-weight: 600; color: var(--bad); }
.side-debt .s { font-size: 12.5px; color: var(--muted); margin: 2px 0 10px; }
.side-debt button { width: 100%; }
.side-prepaid { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); padding: 0 4px; }
.side-prepaid b { color: var(--good); margin-left: auto; }
.details-stat > summary { cursor: pointer; list-style: none; padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.details-stat > summary::-webkit-details-marker { display: none; }
.details-stat > summary::after { content: '▾'; float: right; color: var(--muted); }
.details-stat[open] > summary { margin-bottom: 14px; }
.details-stat[open] > summary::after { content: '▴'; }
.kv-inline { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-bottom: 14px; color: var(--muted); font-size: 14px; }
.kv-inline span { display: inline-flex; gap: 6px; align-items: center; } .kv-inline b { color: var(--text); }
@media (max-width: 600px) { .stat-achs { grid-template-columns: 1fr 1fr; gap: 8px; } .stat-ach:last-child:nth-child(odd) { grid-column: span 2; } .stat-ach { padding: 10px; gap: 10px; } .sa-ico { width: 34px; height: 34px; font-size: 20px; } .sa-n { font-size: 16px; } }
}

/* Аватарки й портрети (завантажені картинки) */
.avatar { overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.char-ph { display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 24px; text-shadow: 0 1px 3px rgba(0,0,0,.4); }
.img-pick { display: flex; gap: 12px; align-items: center; margin: 6px 0 4px; }
.img-pick .prev { width: 64px; height: 64px; border-radius: 50%; overflow: hidden; flex: none; }
.img-pick .prev.sq { border-radius: 10px; }
.img-pick .prev img, .img-pick .prev > div { width: 100%; height: 100%; object-fit: cover; }
.img-pick .cover-prev { width: 200px; aspect-ratio: 16/9; border-radius: 10px; overflow: hidden; background: var(--surface2); flex: none; }
.img-pick .cover-prev img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar img, .char-thumb { border-radius: inherit; }
/* Сторінка кампанії: факти під обкладинкою й гравці */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin: 14px 0 10px; }
.fact { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; min-width: 0; }
.fact .l { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.fact .v { font-size: 16px; font-weight: 700; margin-top: 4px; }
.fact .s { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.players-row { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; margin-bottom: 18px; }
.players-row > .l { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-right: 4px; }
.players-row .pl { display: inline-flex; gap: 7px; align-items: center; color: var(--text); text-decoration: none !important; font-size: 14px; }
a.pl:hover span { color: var(--accent); }
.char-mini .thumb, .char-mini .ph-thumb { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; font-size: 18px; }
.char-mini { flex: none; }
@media (max-width: 600px) { .facts { grid-template-columns: 1fr 1fr; } }

/* Адмінка (02.12): вкладки групами, посилання на сайт - внизу одним рядком */
.adm-nav .adm-group { margin: 12px 0 4px 10px; }
.side-links { font-size: 12.5px; color: var(--muted); margin-bottom: 8px; line-height: 1.7; }
.side-links a { color: var(--muted); }
.side-links a:hover { color: var(--accent); }
@media (max-width: 900px) {
  .side:not(.open) .adm-nav .adm-group { display: none; }
  .adm-nav .adm-group { width: 100%; margin: 6px 0 0; }
}

/* =====================================================================
   02.12 Редизайн: «афіша зовні, Steam усередині». Лише темна тема.
   Верхнє меню замість бокової панелі (бокова лишилась тільки в адмінці - вкладки).
   ===================================================================== */
a:hover { text-decoration: none; }
.app { display: block; min-height: 100vh; }
.main { padding: 8px var(--pad) 64px; }
.page-head { margin: 22px 0 18px; }
.section { margin-top: 40px; }
.section > h2 { margin-bottom: 14px; }
.head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 44px 0 14px; flex-wrap: wrap; }
.head h2 { margin: 0; }
.head a, .head .linkish { color: var(--muted); font-size: 14px; white-space: nowrap; text-decoration: none; font-weight: 600; }
.head a:hover, .head .linkish:hover { color: var(--text); }
.head .sub { color: var(--muted); font-size: 14px; font-weight: 500; font-family: Manrope, sans-serif; text-transform: none; }

/* кнопки - «пігулки» */
button, .btn { border-radius: 999px; font-weight: 700; padding: 9px 18px; }
button.sm, .btn.sm { border-radius: 999px; padding: 6px 13px; }
button.big, .btn.big { padding: 12px 22px; font-size: 15px; font-weight: 800; }
button.ghost, .btn.ghost { background: #ffffff12; border-color: transparent; color: var(--text); }
button.ghost:hover, .btn.ghost:hover { background: #ffffff1f; }
.seg { border-radius: 999px; } .seg button { border-radius: 999px; }
.way-tabs button { border-radius: 12px; } .pkg { border-radius: 12px; } .place-row { border-radius: 8px; } .ach-pill { border-radius: 11px; }
.linkish, .more-link { padding: 0; border-radius: 0; }
input, select, textarea { background: var(--surface2); border-color: var(--line); border-radius: 10px; }
.card { border-radius: 14px; }
.chip { background: #ffffff14; }
.badge { font-weight: 700; }
.star { color: var(--gold); font-weight: 800; white-space: nowrap; }
.empty { border-color: var(--line); color: var(--muted); }

/* ---------- верхнє меню ---------- */
.topbar { display: flex; align-items: center; gap: clamp(12px, 2.4vw, 30px); padding: 14px var(--pad); flex-wrap: wrap; border-bottom: 1px solid #ffffff0d; }
.logo { display: flex; flex-direction: column; gap: 3px; font: 700 26px/1 var(--head); text-transform: uppercase; white-space: nowrap; color: var(--text); letter-spacing: .03em; }
.logo .lg-pre { font: 500 10px/1 var(--head); letter-spacing: .42em; color: var(--muted); padding-left: 2px; }
.logo .lg-name { display: flex; align-items: center; }
.logo i { display: inline-grid; place-items: center; width: 1.08em; height: 1.08em; margin-right: .06em; border-radius: .14em; background: var(--accent); color: #fff; font-style: normal; transform: rotate(-8deg); line-height: 1; padding-top: .04em; }
.links { display: flex; gap: clamp(12px, 2vw, 26px); font-weight: 700; font-size: 15px; overflow-x: auto; scrollbar-width: none; }
.links a { color: var(--muted); white-space: nowrap; padding: 4px 0; transition: color .2s; }
.links a:hover { color: var(--text); }
/* вибраний розділ - червоний текст, без лінії й світіння (Дарій 02.12 обрав; лінія ламає композицію, світіння - жах) */
.links a.on { color: #ff5a63; }
.links .sm-only { display: none; }
@media (max-width: 700px) { .links .sm-only { display: inline; } }
.tb-me, .tb-login { margin-left: auto; }
/* Розділи меню стоять на одній лінії з «ДАРІЯ» в логотипі (Дарій, 02.12), а не по центру */
@media (min-width: 701px) { .topbar { align-items: flex-end; } .topbar .links { margin-bottom: -7px; } .topbar .lang-sw, .topbar .tb-me, .topbar .tb-login { align-self: center; } }
.tb-me { display: flex; align-items: center; gap: 8px; color: var(--text); }
/* перемикач мови UA · EN · RU (02.12) */
.lang-sw { margin-left: auto; display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 2px; gap: 2px; }
.lang-sw button { background: none; border: 0; color: var(--muted); font: 700 12px/1 var(--body, inherit); letter-spacing: .04em; padding: 6px 8px; border-radius: 999px; min-height: 0; box-shadow: none; cursor: pointer; }
.lang-sw button:hover { color: var(--text); background: none; }
.lang-sw button.on { background: var(--surface2); color: var(--text); }
.lang-sw + .tb-me, .lang-sw + .tb-login, .tb-tg + .tb-me, .tb-tg + .tb-login { margin-left: 0; }
/* значок Telegram Дарія в меню (02.12) */
.tb-tg { display: inline-flex; align-self: center; flex: none; }
.tb-tg .tg-ic { width: 30px; height: 30px; display: block; }
.tb-tg:hover .tg-ic { filter: brightness(1.12); }
.tg-ask { display: inline-flex; align-items: center; gap: 8px; color: var(--text); font-weight: 600; }
.tg-ask .tg-ic { width: 22px; height: 22px; flex: none; }
.tg-ask:hover { color: #29a9eb; }
@media (max-width: 700px) { .tb-tg .tg-ic { width: 26px; height: 26px; } }
@media (max-width: 700px) { .lang-sw button { padding: 5px 6px; font-size: 11px; } }
.lvl { display: inline-grid; place-items: center; min-width: 32px; height: 32px; padding: 0 6px; border-radius: 999px; border: 2px solid var(--accent); font: 700 15px var(--head); color: var(--text); }
.avatar.tb { width: 34px; height: 34px; font-size: 13px; }
@media (max-width: 700px) {
  .topbar { gap: 10px 14px; padding-bottom: 10px; }
  .links { order: 3; width: 100%; gap: 16px; -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); mask-image: linear-gradient(90deg, #000 88%, transparent); padding-right: 24px; }
  .links .lg { display: none; }
  .logo { font-size: 22px; }
}

/* ---------- афіша на головній ---------- */
.hero { position: relative; min-height: clamp(380px, 44vw, 560px); display: flex; align-items: flex-end; overflow: hidden; margin: 0 calc(-1 * var(--pad)); padding: 0 var(--pad); background: var(--surface); }
.hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 60% 35%; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, #0b0b0df5 0%, #0b0b0dc0 38%, #0b0b0d00 72%), linear-gradient(0deg, #0b0b0d 0%, #0b0b0d00 40%); }
.hero .cap { position: relative; z-index: 1; padding-block: clamp(24px, 4vw, 48px); max-width: 680px; }
.hero .ttl { font: 700 clamp(42px, 6.4vw, 84px)/1.08 var(--head); text-transform: uppercase; margin: 12px 0 10px; letter-spacing: -.01em; }
.hero .when { font: 500 clamp(21px, 2.6vw, 32px)/1.2 var(--head); }
.hero .meta { color: #d4d0c7; margin: 6px 0 20px; font-size: 16px; }
.hero .acts { display: flex; gap: 10px; flex-wrap: wrap; }
.hero .acts .btn, .hero .acts button { padding: 12px 22px; font-size: 15px; font-weight: 800; }
.hchip { display: inline-block; font-size: 13px; font-weight: 800; padding: 4px 11px; border-radius: 999px; background: var(--gold); color: #1a1000; }
.hchip.red { background: var(--accent); color: #fff; }
@media (max-width: 640px) { .hero { min-height: 500px; } .hero::after { background: linear-gradient(0deg, #0b0b0d 12%, #0b0b0dd0 55%, #0b0b0d30 100%); } }

/* розклад: 7 днів, у кожному - обкладинка 16:9 */
.sched-week + .sched-week { margin-top: 18px; }
.sched-label { font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin: 0 0 8px 2px; }
.sched { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.sday { background: var(--surface); border-radius: 10px; overflow: hidden; border: 1px solid var(--line); display: flex; flex-direction: column; }
.sday .d { display: flex; justify-content: space-between; padding: 8px 10px; font-weight: 800; font-size: 14px; }
.sday .d span:last-child { color: var(--muted); font-weight: 600; }
.sday.off { background: transparent; border-style: dashed; }
.sday.off .n { color: var(--faint); font-weight: 600; }
.sday.today { border-color: var(--accent); }
.sday.today .d span:first-child { color: var(--accent); }
.sday.past { opacity: .45; }
.sg { display: block; color: var(--text); border-top: 1px solid var(--line); }
.sg:first-of-type { border-top: 0; }
.sg .im { position: relative; aspect-ratio: 16/9; overflow: hidden; }
.sg .im img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s; }
.sg:hover .im img { transform: scale(1.05); }
.sg .im .badge { position: absolute; top: 6px; left: 6px; }
.sg .im .ph { width: 100%; height: 100%; display: grid; place-items: center; font: 700 18px var(--head); text-transform: uppercase; color: #ffffffcc; padding: 6px; text-align: center; }
.sday .n { padding: 8px 10px 10px; font-weight: 700; font-size: 14px; line-height: 1.25; }
.sday .n small { display: block; color: var(--muted); font-weight: 600; margin-top: 2px; }
.sg.cancelled .n b { text-decoration: line-through; opacity: .7; }
@media (max-width: 900px) {
  .sched { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(150px, 42vw); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; margin-right: calc(-1 * var(--pad)); }
  .sday { scroll-snap-align: start; }
  .sday.past { display: none; }
}

/* картки-афіші кампаній */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px 16px; }
.poster { display: block; color: var(--text); min-width: 0; }
.poster .im { position: relative; aspect-ratio: 16/9; border-radius: 10px; overflow: hidden; display: flex; align-items: flex-end; padding: 14px; }
.poster .im img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.poster:hover .im img { transform: scale(1.04); }
.poster .im::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, #0b0b0de6 0%, #0b0b0d80 38%, #0b0b0d00 68%); }
.poster .im b { position: relative; z-index: 1; font: 700 26px/1.14 var(--head); text-transform: uppercase; text-shadow: 0 2px 10px #0008; }
.poster .im .chip { position: absolute; z-index: 1; top: 10px; left: 10px; background: #0b0b0dcc; color: #e9e5dc; font-weight: 700; font-size: 12.5px; padding: 3px 10px; backdrop-filter: blur(4px); }
.poster .im .chip.gold { background: var(--gold); color: #1a1000; }
.poster .m { display: flex; justify-content: space-between; gap: 10px; margin-top: 9px; font-size: 14.5px; }
.poster .m span:first-child { color: #cfcbc2; min-width: 0; }
.poster .m > span:last-child:not(:first-child) { flex: none; white-space: nowrap; }
.poster.done { opacity: .55; } .poster.done:hover { opacity: .9; }

/* «Про майстра» */
.about { margin: 0; display: grid; grid-template-columns: minmax(0, 260px) minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(16px, 3vw, 36px); align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: clamp(16px, 2.4vw, 28px); }
.about .photo { aspect-ratio: 4/5; border-radius: 10px; overflow: hidden; background: radial-gradient(ellipse at 50% 45%, #5a1a20 0, #2a1013 45%, #141418 78%); display: flex; align-items: flex-end; justify-content: center; }
.about .photo img { width: 150%; max-width: none; display: block; }
.about h3 { font: 700 30px/1 var(--head); text-transform: uppercase; margin: 0 0 10px; }
.about-text { color: #d4d0c7; font-size: 15.5px; line-height: 1.6; }
.about-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 16px; }
.nums { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.nums > * { border-left: 2px solid var(--accent); padding-left: 12px; color: var(--text); display: block; }
.big { font: 500 40px/1 var(--head); }
.nums small { color: var(--muted); font-size: 14px; }
@media (max-width: 980px) { .about { grid-template-columns: minmax(0, 180px) minmax(0, 1fr); } .about .nums { grid-column: 1 / -1; grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 560px) { .about { grid-template-columns: minmax(0, 1fr); } .about .photo { max-width: 220px; } .about .nums { grid-template-columns: repeat(2, minmax(0, 1fr)); } .big { font-size: 34px; } }

/* відгуки */
.quotes { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.q { background: var(--surface); border-radius: 12px; padding: 16px; border: 1px solid var(--line); }
.q p { margin: 8px 0 10px; font-size: 15.5px; }
.q .w { display: flex; gap: 10px; align-items: center; font-size: 14px; color: var(--muted); }

/* майстер на фото в порожніх місцях і помилках */
.empty.face { display: flex; align-items: center; gap: 18px; text-align: left; padding: 14px 20px 0; border-style: solid; background: var(--surface); justify-content: center; }
.empty.face .master { width: 150px; flex: none; align-self: flex-end; display: block; }
.empty.face > div { padding-bottom: 14px; max-width: 46ch; font-size: 15px; }
.empty.face.err { margin-top: 30px; }
.empty.face a { color: var(--accent); font-weight: 700; }
.modal .master.sly { width: 120px; float: right; margin: -6px -6px 0 10px; }

/* ---------- профіль (кабінет і публічний) як у Steam ---------- */
.prof { position: relative; overflow: hidden; border-radius: 14px; margin-top: 20px; background: var(--surface); }
.prof-bg { position: absolute; inset: 0 0 0 35%; background-size: cover; background-position: center; }
.prof-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--surface) 0%, #141418cc 25%, #14141800 70%); }
.prof-bg.color { inset: 0; background: linear-gradient(120deg, var(--bc), color-mix(in srgb, var(--bc) 30%, var(--surface)) 55%, var(--surface)); }
.prof-bg.color::after { display: none; }
.prof .in { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: clamp(14px, 2.4vw, 28px); align-items: center; padding: clamp(16px, 2.6vw, 30px); }
.prof .lvbig { background: #0b0b0dcc; border-radius: 12px; padding: 10px; }
.prof .ava { width: clamp(76px, 9vw, 112px); height: clamp(76px, 9vw, 112px); border-radius: 14px; font: 700 40px var(--head); background: linear-gradient(135deg, #c9a35c, #5a3a12); color: #fff; }
.prof .nm { font: 700 clamp(30px, 3.6vw, 44px)/1.1 var(--head); text-transform: uppercase; }
.prof .st { color: #d4d0c7; margin: 6px 0 12px; }
.prof .acts { display: flex; gap: 8px; flex-wrap: wrap; }
.lvbig { text-align: center; }
.lvbig .ring { width: 92px; height: 92px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto; background: conic-gradient(var(--lc, var(--accent)) 0 var(--p), #ffffff1a 0); }
.lvbig .ring span { width: 78px; height: 78px; border-radius: 50%; background: #141418; display: grid; place-items: center; font: 700 34px var(--head); }
.lvbig small { display: block; color: #d4d0c7; font-size: 13px; margin-top: 6px; max-width: 140px; }
@media (max-width: 640px) { .prof-bg { inset: 0; } .prof-bg::after { background: linear-gradient(0deg, var(--surface) 45%, #14141899); } .prof .in { grid-template-columns: auto minmax(0, 1fr); } .lvbig { grid-column: 1 / -1; display: flex; gap: 14px; align-items: center; text-align: left; } .lvbig .ring { margin: 0; } .lvbig small { max-width: none; } }

.debtbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; background: #3a121a; border: 1px solid #6b1f28; border-radius: 12px; padding: 12px 16px; margin-top: 16px; }
.okbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 14px; color: var(--muted); font-size: 14px; }
.okbar b { color: var(--good); }
.tg-gift { margin-top: 0; border-radius: 12px; }
/* 02.12 ревʼю: знижка за бота - помітна картка з кнопкою, а не тонка плашка */
.tg-offer { flex: 1 1 100%; display: flex; gap: 14px; align-items: center; flex-wrap: wrap; padding: 14px 18px; border-radius: 12px;
  background: linear-gradient(90deg, #12301f, #15241b); border: 1px solid #2f7a4c; color: var(--text); }
.tg-offer .g { font-size: 30px; line-height: 1; }
.tg-offer .t { flex: 1 1 260px; display: grid; gap: 2px; }
.tg-offer .t b { font-size: 17px; color: #5fe09a; }
.tg-offer .t span { color: #c9d6cd; font-size: 13.5px; }
.tg-offer .btn { background: #2fb36a; border-color: #2fb36a; color: #fff; }
.tg-offer .btn:hover { background: #38c477; }
.quiet-link { display: inline-flex; align-items: center; gap: 6px; padding: 6px 4px; color: #d4d0c7; font-size: 13.5px; font-weight: 600; text-decoration: none; }
.quiet-link:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.soft-empty { padding: 18px; border: 1px dashed var(--line); border-radius: 12px; color: var(--muted); }
.plan-list { display: grid; gap: 16px; margin-top: 12px; }
.plan-acts { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 10px; }
.key-hint { display: flex; align-items: center; gap: 6px; margin-top: 28px; }

.statrow { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; margin-top: 18px; }
/* 02.12: ряд цифр і блоки під ним (.cab) - одна сітка на 5 колонок з однаковим проміжком, щоб краї й щілини збігались */
@media (max-width: 1000px) { .statrow { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; } }
.statbox { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; color: var(--text); text-align: left; display: block; font-weight: 400; cursor: pointer; }
.statbox:hover { border-color: #ffffff30; filter: none; }
.statbox small { display: block; color: var(--muted); font-size: 14px; margin-top: 4px; }
.statbox .sb-t { font-size: 13px; font-weight: 700; margin-top: 8px; color: #d4d0c7; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-bar { height: 3px; background: #ffffff14; border-radius: 2px; margin-top: 6px; overflow: hidden; }
.sb-bar i { display: block; height: 100%; background: var(--accent); }
@media (max-width: 640px) { .statrow { grid-template-columns: repeat(2, minmax(0, 1fr)); } .statbox:last-child:nth-child(odd) { grid-column: span 2; } }

.cab { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; align-items: start; margin-top: 20px; }
.cab > div { display: grid; gap: 16px; min-width: 0; grid-column: span 3; }
.cab > div + div { grid-column: span 2; }
@media (max-width: 1000px) { .cab { grid-template-columns: minmax(0, 1fr); } .cab > div, .cab > div + div { grid-column: auto; } }
.box { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px; min-width: 0; }
.box > h2 { font-size: 19px; margin-bottom: 4px; justify-content: space-between; }
.box > h2 .linkish, .box > h2 a { font: 600 13.5px Manrope, sans-serif; text-transform: none; color: var(--muted); text-decoration: none; }
.box > h2 .linkish:hover, .box > h2 a:hover { color: var(--text); }
.box .sub { color: var(--muted); font-size: 14px; }

/* «Мої кампанії» рядками (як «останні ігри» у Steam) */
.gm { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); color: var(--text); }
.gm:last-child { border: 0; padding-bottom: 0; }
.gm .th { width: 100%; aspect-ratio: 16/9; border-radius: 8px; overflow: hidden; }
.gm .th img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gm b { font-size: 17px; }
.gm .h { color: var(--muted); font-size: 14px; }
.gm .r { text-align: right; font: 500 24px/1 var(--head); white-space: nowrap; }
.gm .r small { display: block; font: 600 13px Manrope, sans-serif; color: var(--muted); margin-top: 3px; }
.gm.done { opacity: .55; } .gm:hover { opacity: 1; } .gm:hover b { color: var(--accent); }
@media (max-width: 560px) { .gm { grid-template-columns: 96px minmax(0, 1fr); } .gm .r { grid-column: 2; text-align: left; font-size: 18px; } .gm .r small { display: inline; margin-left: 6px; } }

/* «Мої наступні ігри» */
.next { display: grid; grid-template-columns: 70px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line); }
.next:last-child { border: 0; }
.next .dt { font: 500 22px/1 var(--head); }
.next .dt small { display: block; font: 600 13px Manrope, sans-serif; color: var(--muted); margin-top: 3px; }
.next .ttl { font-weight: 700; color: var(--text); }
.next .pay-r { text-align: right; }
.paid { color: var(--good); font-weight: 700; font-size: 14px; white-space: nowrap; }
@media (max-width: 560px) { .next { grid-template-columns: 60px minmax(0, 1fr); } .next .pay-r { grid-column: 2; text-align: left; } }

/* вітрина досягнень */
.show { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
/* вітрина - значки: форма й метал за рідкістю (легендарне - шестикутник, епічне - пʼятикутник, рідкісне - квадрат, звичайне - коло) */
.sc { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 0; width: 100%; text-align: center; padding: 6px 4px; border: 0; background: none; color: var(--text); font-weight: 400; cursor: pointer; min-width: 0; border-radius: 12px; }
.sc:hover { filter: none; background: #ffffff08; }
.sc:hover svg { transform: translateY(-2px); }
.sc svg { width: min(104px, 100%); height: auto; display: block; margin: 0 auto; transition: transform .15s; }
.sc .t { display: block; font-weight: 800; font-size: 13.5px; line-height: 1.2; margin-top: 8px; overflow-wrap: anywhere; }
.sc .s { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.sc .s i { font-style: normal; color: var(--rc); }
.sc.legend { --rc: #ffcf6a; } .sc.epic { --rc: #c4a6ff; } .sc.rare { --rc: #8cc6ff; } .sc.common { --rc: #b9b6ae; }
.almost { margin-top: 18px; }
.almost > b { font-size: 15px; }
.al { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; padding: 8px 0; font-size: 14px; width: 100%; background: none; border: 0; color: var(--text); text-align: left; font-weight: 500; cursor: pointer; }
.al:hover { filter: none; color: var(--gold); }
.al .bar { grid-column: 1 / -1; height: 6px; border-radius: 9px; background: #ffffff14; display: block; flex: none; }
.al .bar i { display: block; height: 100%; max-width: none; min-height: 0; border-radius: 9px; background: var(--gold); }
.heat { display: grid; grid-template-columns: repeat(26, minmax(0, 1fr)); gap: 3px; margin-top: 12px; }
.heat i { aspect-ratio: 1; border-radius: 2px; background: #ffffff10; }
.heat i.on { background: #e0353fb0; } .heat i.on2 { background: var(--accent); }
.pick-mk { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; font-weight: 800; flex: none; }
.ach-card.focus .pick-mk { background: var(--accent); border-color: var(--accent); }

/* персонажі - картки з портретом */
.chars { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.mini-camp { border-radius: 12px; }
.mini-camp:hover { border-color: #ffffff30; }

/* сторінка кампанії: широка обкладинка як на афіші */
.hero.camp { min-height: clamp(320px, 36vw, 480px); }
.hero.camp .ttl { font-size: clamp(36px, 5.4vw, 72px); }
.hero .badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.facts { margin: 18px 0 12px; }
.fact, .players-row { background: var(--surface); }
.fact .v { font: 500 22px/1.15 var(--head); }

/* таблиця лідерів і системи */
.lb-tabs button.on { background: var(--text); color: var(--bg); }
.lb-row.me { background: var(--accent-soft); }
.gm-stat b { font: 500 34px/1 var(--head); }
.sys-title { font: 700 22px/1.1 var(--head); text-transform: uppercase; min-height: 2.2em; }
.sys-card .cover { aspect-ratio: 16/9; }
.cover { border-radius: 13px 13px 0 0; }

/* адмінка: верхнє меню + власні вкладки збоку */
.app.adm { display: grid; grid-template-columns: 250px minmax(0, 1fr); }
.app.adm .side { height: calc(100vh - 63px); top: 0; background: var(--bg); border-right-color: var(--line); }
.app.adm .main { padding-top: 0; }
.nav button.on, .nav a.on { background: #ffffff10; color: var(--text); box-shadow: inset 3px 0 0 var(--accent); border-radius: 0 9px 9px 0; }
.nav button, .nav a { border-radius: 9px; font-weight: 600; }
@media (max-width: 900px) { .app.adm { grid-template-columns: minmax(0, 1fr); } .app.adm .side { height: auto; } }

/* вікна */
.modal { border-radius: 16px; background: var(--surface); }
.modal-bg { background: rgba(5, 5, 7, .72); backdrop-filter: blur(3px); }
.nums.prices { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.nums.prices .big { font-size: 32px; }
.next .linkish { color: var(--muted); font-size: 13.5px; }
h2 .small, h2 .muted { font-family: Manrope, sans-serif; text-transform: none; letter-spacing: 0; }
button.ok { color: #06210f; } button.no { color: #fff; }
@media (max-width: 700px) { .links a { font-size: 14px; } }
/* 02.12 правка: фото майстра цілим (без обрізаної голови) і без червоного підсвічування позаду; низ плавно зникає */
.about .photo { aspect-ratio: auto; background: none; border-radius: 0; overflow: visible; align-self: end; margin-bottom: calc(-1 * clamp(16px, 2.4vw, 28px)); }
.about .photo img { width: 100%; max-width: 100%; -webkit-mask-image: linear-gradient(180deg, #000 78%, transparent); mask-image: linear-gradient(180deg, #000 78%, transparent); }
/* заголовки «пірамідою»: верхній рядок коротший за нижній (розставляє pyramid() у common.js) */
.poster .im b { width: 100%; }
.sday .n b { display: block; }
.hero .cap { width: 100%; }
/* 02.12 правка 2: тепле сіре «студійне» тло під фото майстра - під колір дымки на краях волосся, щоб її не було видно */
:root { --studio: linear-gradient(180deg, #9a8f88 0%, #7a716b 55%, #4f4946 100%); }
.master { background: var(--studio); border-radius: 12px; }
.about .photo { background: var(--studio); border-radius: 12px; overflow: hidden; margin-bottom: 0; align-self: center; padding-top: 14px; }
.about .photo img { -webkit-mask-image: none; mask-image: none; background: none; border-radius: 0; }
.empty.face { padding: 14px 20px; }
.empty.face .master { align-self: center; padding-top: 8px; }
.empty.face > div { padding-bottom: 0; }
.modal .master.sly { padding-top: 6px; margin: 0 0 8px 12px; }
/* 02.12 правка 3: майстер у порожніх місцях і помилках - без рамок, фото велике, поруч великий заголовок */
.face { display: flex; align-items: center; gap: clamp(18px, 3vw, 40px); margin: 28px 0; }
.face .master { width: clamp(150px, 20vw, 260px); flex: none; padding-top: 12px; display: block; }
.face-t { max-width: 52ch; font-size: 16px; color: #d4d0c7; }
.face-h { font: 700 clamp(28px, 3.6vw, 44px)/1.12 var(--head); text-transform: uppercase; color: var(--text); margin-bottom: 10px; }
.face-a { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.face a:not(.btn) { color: var(--accent); font-weight: 700; }
.main > .face:first-child { margin-top: clamp(28px, 6vw, 80px); }
@media (max-width: 560px) { .face { flex-direction: column; align-items: flex-start; } .face .master { width: 200px; } }
.section .face .master { width: 130px; } .section .face { margin: 10px 0; }

/* 02.12 ревʼю: на телефоні завершені кампанії - по 2 в ряд, не 8 великих карток підряд */
@media (max-width: 640px) {
  .cards.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .cards.compact .poster .im b { font-size: 16px; left: 10px; right: 10px; bottom: 8px; }
  .cards.compact .poster .im .chip { font-size: 11px; padding: 2px 7px; top: 6px; left: 6px; }
  .cards.compact .poster .m { font-size: 12.5px; margin-top: 6px; }
}
/* 02.12 ревʼю: оплати в адмінці на телефоні - картками, кнопки «Зарахувати / Відхилити» завжди на екрані */
@media (max-width: 700px) {
  table.paytbl, table.paytbl tbody { display: block; }
  table.paytbl tr:first-child { display: none; }
  table.paytbl tr { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
  table.paytbl td { display: block; padding: 0; border: 0; text-align: left; }
  table.paytbl td:nth-child(2) { font-weight: 700; order: -1; flex: 1 1 auto; }
  table.paytbl td:nth-child(1) { order: -1; color: var(--muted); font-size: 13px; }
  table.paytbl td:nth-child(5) { flex: 1 1 100%; }
  table.paytbl td:last-child { flex: 1 1 100%; display: flex; gap: 8px; margin-top: 6px; }
  table.paytbl td:last-child .ok, table.paytbl td:last-child .no { flex: 1; justify-content: center; }
}

/* одна гра до оцінки - одним широким рядком, без порожнього місця праворуч */
.rate-one .card { display: grid; grid-template-columns: minmax(180px, 1fr) auto minmax(200px, 2fr) auto; gap: 6px 18px; align-items: center; }
.rate-one .card > div[style*="font-size:28px"] { margin: 0 !important; grid-row: 1 / 3; grid-column: 2; }
.rate-one .card input { grid-row: 1 / 3; grid-column: 3; }
.rate-one .card .actions { grid-row: 1 / 3; grid-column: 4; margin: 0; }
@media (max-width: 800px) { .rate-one .card { display: block; } .rate-one .card > div[style*="font-size:28px"] { margin: 10px 0 6px !important; } .rate-one .card .actions { margin-top: 10px; } }
.cab-chars:empty { display: none; } .cab-chars > .section { margin-top: 0; }
/* Адмінка → Ігри → «🏆 Досягнення» */
.ach-adm { display: flex; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.ach-mark { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.ach-adm .ach-ico { width: 36px; height: 36px; font-size: 18px; flex: none; }

/* ---------- «Твої переваги» в кабінеті (02.12) ---------- */
.perks { margin-top: 22px; }
.perks h2 { margin: 0 0 12px; }
.perk-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 12px; }
.perk { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.perk.main { border-color: #5a4422; background: linear-gradient(160deg, #2a2116, var(--surface) 65%); }
.perk-hd { display: flex; gap: 10px; align-items: center; font-size: 16px; line-height: 1.25; }
.perk-ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--surface2); color: var(--gold); }
.perk-ico.g { background: linear-gradient(140deg, var(--gold), #c86b14); color: #1a1205; }
.perk-big { font-family: var(--head); font-size: 32px; line-height: 1; }
.perk-big small { font-family: Manrope, sans-serif; font-size: 15px; color: var(--muted); }
.perk-big.good { color: var(--good); }
.perk-cmp { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 6px 10px; align-items: center; font-size: 14px; }
.perk-cmp b { white-space: nowrap; }
.perk-bar { height: 10px; border-radius: 99px; background: var(--surface2); overflow: hidden; }
.perk-bar i { display: block; height: 100%; border-radius: 99px; background: var(--muted); }
.perk-bar.a i { background: var(--gold); }
.perk-meter { height: 10px; border-radius: 99px; background: #5a4422; overflow: hidden; }
.perk-meter i { display: block; height: 100%; background: var(--gold); }
.perk-btn { align-self: flex-start; margin-top: auto; }
.perk-list { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.perk-list li { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; border-bottom: 1px solid var(--line); }
.perk-list li:last-child { border: 0; }
.perk-list b { white-space: nowrap; }
.perk-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.perk-pill { font-size: 13px; font-weight: 700; padding: 5px 10px; border-radius: 99px; background: var(--surface2); color: var(--muted); }
.perk-pill.on { background: var(--good-soft); color: var(--good); }

/* Однакові посилання (02.12): імена гравців, назви кампаній і систем - тим самим кольором, що й текст, червоні при наведенні */
.pl { display: inline-flex; gap: 7px; align-items: center; vertical-align: middle; }
a.pl, a.lnk, a.chip { color: inherit; text-decoration: none !important; }
a.lnk:hover, a.chip:hover, a.pl:hover span { color: var(--accent); }
a.lnk { border-bottom: 1px dashed transparent; }
a.lnk:hover { border-bottom-color: currentColor; }
.sys-card.hl { outline: 2px solid var(--accent); outline-offset: 2px; transition: outline-color 1.5s; }
.sys-card { scroll-margin-top: 80px; }

/* «Приведи друга» - тихий рядок унизу кабінету (не маячить, на відміну від картки бота) */
.ref-row { display: flex; gap: 10px 14px; align-items: center; flex-wrap: wrap; margin-top: 28px; padding: 12px 16px; border: 1px dashed var(--line, #333); border-radius: 12px; font-size: 13.5px; color: var(--muted, #aaa); }
.ref-row .t { flex: 1 1 260px; }
.ref-row .t b { color: var(--text, #eee); font-weight: 600; }
.ref-hi { align-items: center; margin-bottom: 18px; }
.ref-hi > div { flex: 1; }

/* фон шапки профілю - вибір у «Змінити профіль» */
.bn-pick { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 4px; }
.bn-pick button { height: 44px; border-radius: 8px; border: 2px solid transparent; padding: 0; cursor: pointer; flex: none; }
.bn-pick button.on { border-color: var(--text); box-shadow: 0 0 0 2px var(--bg) inset; }
.bn-pick .bn-col { width: 44px; }
.bn-pick .bn-img { width: 78px; background-size: cover; background-position: center; }
.bn-pick .bn-auto, .bn-pick .bn-up { padding: 0 12px; background: var(--surface2); color: var(--text); font-size: 13px; font-weight: 700; line-height: 1.1; display: inline-flex; flex-direction: column; justify-content: center; align-items: flex-start; border-color: var(--line); }
.bn-pick .bn-up { flex-direction: row; gap: 6px; align-items: center; border-style: dashed; }
.bn-pick .bn-auto.on { border-color: var(--text); }
.bn-pick small { font-size: 11px; font-weight: 500; color: var(--muted); }
/* кубки за 1-3 місце */
svg.cup { display: inline-block; vertical-align: middle; flex: none; }
.place-row .pl { display: inline-grid; grid-template-columns: 26px auto; gap: 6px; align-items: center; justify-items: center; }
.place-row .pl > .small { justify-self: start; min-width: 3.6em; }
.podium a > span:first-child { display: inline-flex; align-items: center; gap: 6px; }
.lb-place { display: grid; place-items: center; }
.bn-pos { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px 12px; align-items: center; margin-top: 10px; max-width: 560px; }
.bn-pos .small { grid-column: 1 / -1; color: var(--muted); }
.bn-pos span { font-size: 13px; color: var(--muted); white-space: nowrap; }
.bn-pos input[type=range] { width: 100%; accent-color: var(--accent); padding: 0; }
.prof.bn-drag { cursor: grab; touch-action: none; outline: 2px dashed #ffffff40; outline-offset: -2px; }
.prof.bn-drag:active { cursor: grabbing; }

/* 🎁 подарунок: кому оплатити ігри */
.gift-pick { margin-bottom: 12px; }
.gift-people { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; max-height: 260px; overflow-y: auto; }
.gift-p { display: inline-flex; align-items: center; gap: 8px; background: var(--panel-2, rgba(255,255,255,.05)); border: 1px solid var(--line); color: var(--text); border-radius: 999px; padding: 4px 12px 4px 4px; font-weight: 600; cursor: pointer; }
.gift-p:hover { border-color: var(--accent); }
.gift-ava { width: 28px; height: 28px; border-radius: 50%; font-size: 12px; flex: 0 0 auto; }
.gift-to { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; padding: 10px 14px; border: 1px dashed var(--good); border-radius: 12px; }
.gift-to > span { color: var(--muted); }
.gift-got { margin-top: 16px; }
.scale-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 8px 24px; }

/* «Про майстра» рівно (02.12, Дарій: «криво»): фото зліва на всю висоту, праворуч текст → цифри в ряд → канали в ряд */
.about { grid-template-columns: minmax(0, 250px) minmax(0, 1fr); align-items: stretch; }
.about .photo { position: relative; align-self: stretch; min-height: 300px; padding-top: 0; }
.about .photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 12%; }
.about-main { display: flex; flex-direction: column; justify-content: center; gap: 22px; min-width: 0; }
.about-main h3 { margin: 0 0 -12px; }
.about .about-nums { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-column: auto; }
.chan { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 0; padding-top: 18px; border-top: 1px solid var(--line); }
.chan a { display: flex; align-items: center; gap: 10px; padding-left: 2px; color: #d4d0c7; min-width: 0; }
.chan a:hover b { color: #fff; text-decoration: underline; }
.chan span { min-width: 0; }
.chan .ch-ic { width: 22px; height: 22px; flex: none; }
.chan b { display: block; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chan small { display: none; }
@media (max-width: 980px) { .about .about-nums, .chan { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .chan { grid-template-columns: minmax(0, 1fr); gap: 12px; } .about { grid-template-columns: minmax(0, 1fr); } .about .photo { min-height: 0; max-width: 220px; } .about .photo img { position: static; height: auto; } }

/* «Про майстра» + відгуки поруч на широкому екрані (02.12): без порожніх смуг і без розтягнутого тексту */
.about-row { display: grid; grid-template-columns: minmax(0, 1fr); column-gap: 28px; }
@media (min-width: 1700px) {
  .about-row:not(.solo) { grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); align-items: stretch; }
  .about-row:not(.solo) > div { display: flex; flex-direction: column; }
  .about-row:not(.solo) .about { flex: 1; }
  .about-row:not(.solo) .quotes { grid-template-columns: minmax(0, 1fr); flex: 1; grid-auto-rows: 1fr; }
  .about-row:not(.solo) .chan { margin-top: 0; display: flex; flex-wrap: wrap; gap: 10px 32px; }
  .about-row:not(.solo) .about-main { justify-content: center; }
  .about-row:not(.solo) .about .about-nums { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ціни карткою: ліворуч ціни, праворуч запис і Telegram (02.12) */
.price-box { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px 48px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: clamp(16px, 2.4vw, 28px); }
.price-box .nums.prices { display: flex; flex-wrap: wrap; gap: 20px clamp(28px, 4vw, 64px); }
.price-cta { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; max-width: 360px; }
@media (max-width: 640px) { .price-box .nums.prices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; } .price-cta { max-width: none; width: 100%; } .price-cta button { width: 100%; justify-content: center; } }

/* Відгуки: «змінено» і мої відгуки в кабінеті (03.12) */
.edited { font-size: 12px; color: var(--faint); font-style: italic; margin-left: 6px; white-space: nowrap; }
.rv-row { padding: 12px 0; border-top: 1px solid var(--line); }
.rv-row:first-of-type { border-top: 0; }
.rv-row .rv-h { display: flex; gap: 8px; align-items: baseline; justify-content: space-between; }
.rv-row .rv-t { margin-top: 4px; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.rv-row textarea { min-height: 70px; margin-top: 6px; }
.rv-row.hl { animation: rvhl 2s ease; }
@keyframes rvhl { from { background: rgba(224, 53, 63, .15); } to { background: transparent; } }
.ach-when { font-weight: 400; margin-top: 2px; }
