/* Cosplaygram — минималистичный интерфейс, телефон в первую очередь.
   Цвета, шрифт заголовков и узор приходят из темы выбранного персонажа (themes.js).
   Макет: шапка · лента-сетка · нижняя панель на телефоне · листы (sheets) вместо модалок на телефоне. */
:root {
  --bg: #0D0E1C; --surface: #16182D; --surface-2: #1F2240; --line: #2B2F50;
  --ink: #F1EEF8; --muted: #A4A3C3; --accent: #F2B33D; --on-accent: #1B1404; --accent-soft: rgba(242,179,61,.16); --accent-2: #8C9BFF;
  --pattern: repeating-linear-gradient(135deg, rgba(242,179,61,.18) 0 1.5px, transparent 1.5px 11px);
  --font-display: "Yeseva One", Georgia, serif;
  --font-body: "Geologica", "Segoe UI", system-ui, -apple-system, sans-serif;
  --danger: #F0506E;
  --shadow: 0 20px 50px rgba(0,0,0,.5);
  --r: 14px; --r-lg: 20px; --max: 1120px;
  --header: 60px; --bottombar: 64px;
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { margin: 0; }
html { scroll-padding-top: calc(var(--header) + 12px); }
body { background: var(--bg); color: var(--ink); font: 400 15px/1.55 var(--font-body); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; transition: background-color .25s; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
h1, h2, h3 { margin: 0; line-height: 1.15; text-wrap: balance; }
h1 { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.7rem, 4.5vw, 2.4rem); letter-spacing: -.01em; }
h2 { font-size: 1.05rem; font-weight: 600; }
h3 { font-size: 1rem; font-weight: 600; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.num { font-variant-numeric: tabular-nums; }
.display { font-family: var(--font-display); font-weight: 500; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- шапка ---------- */
.header {
  position: sticky; top: 0; z-index: 30;
  padding-top: env(safe-area-inset-top, 0px);
  background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(16px) saturate(1.3); -webkit-backdrop-filter: blur(16px) saturate(1.3);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
}
.header-in {
  max-width: var(--max); margin: 0 auto; height: var(--header); display: flex; align-items: center; gap: 22px;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.logo { display: flex; align-items: center; gap: 9px; font-family: var(--font-display); font-size: 1.25rem; font-weight: 500; flex: none; }
.logo-mark { width: 28px; height: 28px; }
.topnav { display: flex; gap: 2px; flex: 1; min-width: 0; }
.topnav a { padding: 8px 10px; border-radius: 10px; color: var(--muted); font-weight: 500; white-space: nowrap; transition: color .15s; }
.topnav a.active { color: var(--ink); box-shadow: inset 0 -2px 0 var(--accent); border-radius: 0; }
.header-actions { display: flex; align-items: center; gap: 4px; margin-left: auto; flex: none; }

.iconbtn {
  position: relative; border: 0; background: none; width: 44px; height: 44px; border-radius: 12px; flex: none;
  display: inline-grid; place-items: center; color: var(--ink); transition: background .15s;
}
.iconbtn svg { width: 22px; height: 22px; }
.badge {
  position: absolute; top: 6px; right: 5px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px;
  background: var(--danger); color: #fff; font-size: .66rem; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--bg);
}
.plus { background: var(--accent); color: var(--on-accent); width: 40px; height: 40px; border-radius: 12px; margin: 0 4px; }
.me-btn { border: 0; background: none; padding: 4px; border-radius: 14px; display: grid; place-items: center; }
.me-btn .ava { box-shadow: 0 0 0 2px var(--bg), 0 0 0 3.5px var(--accent); }

.bottombar { display: none; }
@media (max-width: 860px) {
  :root { --header: 56px; }
  .topnav, .desk-only { display: none !important; }
  .header-in { gap: 10px; }
  .bottombar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; z-index: 30; left: 0; right: 0; bottom: 0;
    padding: 4px max(6px, env(safe-area-inset-right, 0px)) calc(4px + env(safe-area-inset-bottom, 0px)) max(6px, env(safe-area-inset-left, 0px));
    background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  }
  .bottombar a, .bottombar button {
    position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 52px;
    border: 0; background: none; font-size: .66rem; font-weight: 500; color: var(--muted); border-radius: 12px;
  }
  .bottombar svg { width: 24px; height: 24px; }
  .bottombar .active { color: var(--ink); }
  .bottombar .active svg { color: var(--accent); }
  .bottombar .create span.pl { width: 46px; height: 34px; border-radius: 12px; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; }
  .bottombar .badge { top: 3px; right: calc(50% - 22px); }
}
@media (min-width: 861px) { .mob-only { display: none !important; } }
@media (hover: hover) {
  .topnav a:hover { color: var(--ink); }
  .iconbtn:hover { background: var(--surface-2); }
  .plus:hover { filter: brightness(1.08); background: var(--accent); }
}

/* ---------- страница ---------- */
.main {
  max-width: var(--max); margin: 0 auto; outline: none; min-height: 60vh;
  padding: 22px max(16px, env(safe-area-inset-right, 0px)) 80px max(16px, env(safe-area-inset-left, 0px));
}
@media (max-width: 860px) { .main { padding-top: 14px; padding-bottom: calc(var(--bottombar) + 40px + env(safe-area-inset-bottom, 0px)); } }
.narrow { max-width: 720px; margin-inline: auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head p { margin-top: 6px; max-width: 60ch; }
.section { margin-bottom: 30px; }
.section-title { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.link { color: var(--accent); font-weight: 500; font-size: .9rem; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row > * { flex: 1 1 180px; min-width: 0; }
.hr { height: 1px; background: var(--line); border: 0; margin: 4px 0; }
.box { background: var(--surface); border-radius: var(--r-lg); }
.pad { padding: 18px; }

/* ---------- кнопки и поля ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 12px;
  border: 0; background: var(--surface-2); color: var(--ink); font-weight: 500; font-size: .94rem; white-space: nowrap;
  transition: filter .15s, transform .1s, background .15s;
}
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--accent); color: var(--on-accent); font-weight: 600; }
.btn.ghost { background: none; }
.btn.danger { color: var(--danger); }
.btn.sm { min-height: 36px; padding: 0 13px; font-size: .86rem; border-radius: 10px; }
.btn.lg { min-height: 52px; padding: 0 26px; font-size: 1rem; border-radius: 14px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; cursor: default; }
.btn svg { width: 18px; height: 18px; }
.btn.on { background: var(--accent-soft); color: var(--accent); }
@media (hover: hover) { .btn:hover { filter: brightness(1.12); } .btn.ghost:hover { background: var(--surface-2); filter: none; } }

.form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label, .label { font-size: .84rem; font-weight: 500; color: var(--muted); }
.input {
  width: 100%; min-height: 46px; padding: 11px 14px; border-radius: 12px; border: 1px solid transparent; background: var(--surface-2); outline: none;
  font-size: 16px; transition: border-color .15s, background .15s; appearance: none;
}
.input::placeholder { color: color-mix(in srgb, var(--muted) 75%, transparent); }
.input:focus { border-color: var(--accent); background: var(--surface); }
textarea.input { resize: vertical; min-height: 96px; line-height: 1.45; }
select.input { background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
.pw { position: relative; }
.pw .input { padding-right: 52px; }
.pw button { position: absolute; right: 2px; top: 1px; }
.error { color: var(--danger); font-size: .9rem; font-weight: 500; }
.hint { font-size: .84rem; color: var(--muted); }

.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; -webkit-overflow-scrolling: touch; }
.chips::-webkit-scrollbar { display: none; }
.chips.wrap { flex-wrap: wrap; overflow: visible; }
.chip {
  flex: none; display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: 999px; border: 0;
  background: var(--surface); color: var(--muted); font-size: .88rem; font-weight: 500; white-space: nowrap; transition: background .15s, color .15s;
}
.chip.on { background: var(--ink); color: var(--bg); }
.chip.tag { min-height: 28px; padding: 0 10px; font-size: .8rem; background: var(--surface-2); }
@media (hover: hover) { .chip:not(.on):hover { color: var(--ink); } }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 7px; font-size: .72rem; font-weight: 600; background: var(--surface-2); color: var(--muted); }
.pill.accent { background: var(--accent); color: var(--on-accent); }
.pill.dark { background: rgba(0,0,0,.55); color: #fff; backdrop-filter: blur(6px); }

/* ---------- аватары ---------- */
.ava {
  --s: 36px; width: var(--s); height: var(--s); flex: none; border-radius: 50%; overflow: hidden; display: grid; place-items: center;
  background: var(--a, var(--accent)); color: var(--o, var(--on-accent)); font-family: var(--font-display); font-size: calc(var(--s) * .44); line-height: 1;
}
.ava img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.who .t { min-width: 0; line-height: 1.25; }
.who .t b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who .t span { display: block; font-size: .8rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- выбор персонажа ---------- */
.char-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
@media (max-width: 520px) { .char-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .char .art { aspect-ratio: 1 / 1; } .char .meta { padding: 8px 10px 10px; } .char .nm { font-size: .95rem; } }
.char {
  position: relative; text-align: left; border: 0; padding: 0; border-radius: 18px; overflow: hidden; background: var(--surface); color: var(--ink);
  box-shadow: 0 0 0 1px var(--line); transition: transform .15s, box-shadow .15s;
}
.char .art { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: var(--pattern), var(--bg); display: flex; align-items: flex-end; justify-content: space-between; padding: 10px 12px; }
.char .art b { font-family: var(--font-display); font-weight: 600; font-size: 2.8rem; line-height: .9; color: var(--accent); }
.char .sw { display: flex; gap: 4px; }
.char .sw i { width: 12px; height: 12px; border-radius: 50%; box-shadow: 0 0 0 1.5px var(--surface); }
.char .meta { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 2px; }
.char .nm { font-family: var(--font-display); font-weight: 600; font-size: 1.02rem; line-height: 1.15; }
.char .fr { font-size: .76rem; color: var(--muted); line-height: 1.3; }
.char .art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; }
.char.has-photo .art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 55%, rgba(0,0,0,.7)); }
.char .art .cr { position: absolute; z-index: 1; left: 8px; right: 8px; bottom: 6px; font-size: .6rem; line-height: 1.25; color: rgba(255,255,255,.85); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.char.has-photo .sw { position: absolute; z-index: 1; top: 8px; left: 8px; }
.char .art b { position: relative; z-index: 1; }
.char .sw { position: relative; z-index: 1; }
.char .ok { position: absolute; z-index: 2; top: 8px; right: 8px; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: var(--on-accent); display: none; place-items: center; }
.char .ok svg { width: 16px; height: 16px; }
.char.on { box-shadow: 0 0 0 2.5px var(--accent); transform: translateY(-2px); }
.char.on .ok { display: grid; }
@media (hover: hover) { .char:hover { transform: translateY(-2px); } }

.picker { width: min(980px, 100%); }
.picker .head { padding: 22px 22px 8px; display: flex; flex-direction: column; gap: 6px; }
.picker .tabs { padding: 8px 22px 12px; }
.picker .body { padding: 4px 22px 22px; overflow-y: auto; }
.picker .foot {
  position: sticky; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 22px calc(14px + env(safe-area-inset-bottom, 0px));
  background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(12px); border-top: 1px solid var(--line);
}
.picker .foot .t { min-width: 0; }
.picker .foot .t b { display: block; font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- стартовый экран ---------- */
.land { max-width: 980px; margin: 0 auto; display: flex; flex-direction: column; gap: 22px; }
.land h1 { font-size: clamp(2.2rem, 7vw, 3.8rem); line-height: 1.02; }
.land .lead { color: var(--muted); font-size: 1.06rem; max-width: 52ch; margin-top: 12px; }
.land-cta {
  position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; gap: 12px; justify-content: space-between; flex-wrap: wrap;
  padding: 14px 16px; border-radius: 18px; background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(14px);
  box-shadow: 0 0 0 1px var(--line), var(--shadow); margin-bottom: 8px;
}
.land-cta .t { min-width: 0; flex: 1 1 200px; }
.land-cta .t b { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; }
.land-cta .acts { display: flex; gap: 8px; flex: 1 1 260px; justify-content: flex-end; }
.land-cta .acts .btn { flex: 1 1 0; max-width: 220px; }
@media (max-width: 860px) { .land-cta { bottom: calc(env(safe-area-inset-bottom, 0px) + 10px); } }
.strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.strip figure { margin: 0; border-radius: 16px; overflow: hidden; aspect-ratio: 4 / 5; background: var(--surface); position: relative; }
.strip img { width: 100%; height: 100%; object-fit: cover; }
.strip figcaption { position: absolute; left: 8px; bottom: 8px; right: 8px; font-size: .74rem; color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,.7); }
@media (max-width: 600px) { .strip { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.perks { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 18px; padding-top: 6px; }
.perks div { display: flex; flex-direction: column; gap: 2px; }
.perks b { font-weight: 600; }
.perks span { color: var(--muted); font-size: .9rem; }

/* ---------- лента ---------- */
.wip { display: flex; gap: 14px; overflow-x: auto; scrollbar-width: none; margin-bottom: 22px; padding: 2px 2px 4px; }
.wip::-webkit-scrollbar { display: none; }
.wip-item { flex: none; width: 70px; display: flex; flex-direction: column; align-items: center; gap: 6px; border: 0; background: none; padding: 0; color: var(--ink); }
.wip-item .ring { width: 66px; height: 66px; border-radius: 50%; padding: 3px; background: conic-gradient(var(--accent), var(--accent-2), var(--accent)); }
.wip-item.seen .ring { background: var(--line); }
.wip-item .ring img, .wip-item .ring .add { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 3px solid var(--bg); background: var(--surface); }
.wip-item .ring .add { display: grid; place-items: center; color: var(--accent); }
.wip-item .ring .add svg { width: 24px; height: 24px; }
.wip-item.add .ring { background: none; border: 2px dashed var(--line); padding: 1px; }
.wip-item span.n { font-size: .72rem; max-width: 70px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }

.spot { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 22px; align-items: center; margin-bottom: 26px; }
.spot .pic { border: 0; padding: 0; background: var(--surface); border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 4 / 5; }
.spot .pic img { width: 100%; height: 100%; object-fit: cover; }
.spot .body { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.spot .kick { color: var(--accent); font-weight: 500; font-size: .9rem; }
.spot .kick svg { width: 17px; height: 17px; vertical-align: -3px; margin-right: 6px; }
.spot h1 { font-size: clamp(1.6rem, 4vw, 2.5rem); }
.spot .facts { display: flex; gap: 22px; color: var(--muted); font-size: .86rem; flex-wrap: wrap; }
.spot .facts b { color: var(--ink); font-family: var(--font-display); font-size: 1.3rem; font-weight: 500; margin-right: 4px; }
.spot .acts { display: flex; gap: 8px; flex-wrap: wrap; }
.spot .rest { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: .82rem; flex-wrap: wrap; }
.spot .rest button { border: 0; padding: 0; background: none; width: 36px; height: 44px; border-radius: 8px; overflow: hidden; }
.spot .rest img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 600px) {
  .spot { grid-template-columns: 112px minmax(0, 1fr); gap: 14px; align-items: start; }
  .spot .quote, .spot .rest, .spot .kick .mo { display: none; }
  .spot .acts .btn { min-height: 38px; padding: 0 12px; font-size: .86rem; }
}

.next-ev { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r); background: var(--surface); margin-bottom: 18px; }
.next-ev .d { font-family: var(--font-display); color: var(--accent); font-size: 1.05rem; white-space: nowrap; }
.next-ev .t { min-width: 0; flex: 1; }
.next-ev .t b { display: block; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.next-ev .t span { font-size: .8rem; color: var(--muted); }

.filters { position: sticky; top: calc(var(--header) + env(safe-area-inset-top, 0px)); z-index: 10; background: var(--bg); padding: 10px 0; margin-bottom: 8px; }

.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px 16px; }
@media (max-width: 900px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 10px; } }
.card { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.card-img { position: relative; display: block; width: 100%; border: 0; padding: 0; border-radius: var(--r-lg); overflow: hidden; background: var(--surface); aspect-ratio: 4 / 5; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s cubic-bezier(.2,.7,.2,1); }
.card-img .tl { position: absolute; top: 10px; left: 10px; display: flex; gap: 5px; }
.card-img .tr { position: absolute; top: 10px; right: 10px; }
@media (hover: hover) { .card-img:hover img { transform: scale(1.03); } }
.card-t { font-weight: 600; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-m { display: flex; align-items: center; gap: 6px; min-width: 0; }
.card-m .au { display: flex; align-items: center; gap: 7px; min-width: 0; flex: 1; font-size: .84rem; color: var(--muted); }
.card-m .au span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.like { display: inline-flex; align-items: center; gap: 5px; border: 0; background: none; padding: 0 6px; min-height: 36px; border-radius: 10px; color: var(--muted); font-size: .86rem; font-weight: 500; }
.like svg { width: 20px; height: 20px; transition: transform .2s; }
.like.on { color: var(--danger); }
.like.on svg { fill: var(--danger); }
.like.pop svg { animation: pop .35s ease; }
.save.on { color: var(--accent); }
.save.on svg { fill: var(--accent); }
@keyframes pop { 50% { transform: scale(1.35); } }
@media (max-width: 520px) { .card-t { font-size: .92rem; } .card-m .au .ava { display: none; } }

.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.tile { position: relative; border: 0; padding: 0; border-radius: 10px; overflow: hidden; background: var(--surface); aspect-ratio: 4 / 5; }
.tile img { width: 100%; height: 100%; object-fit: cover; }
.tile .tr { position: absolute; top: 6px; right: 6px; }
@media (min-width: 700px) { .tiles { gap: 12px; } .tile { border-radius: 14px; } }

.more { display: flex; justify-content: center; padding: 22px 0; }

/* ---------- листы и окна ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 50; background: rgba(4, 5, 12, .62); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  display: grid; place-items: center; overflow: auto; overscroll-behavior: contain;
  padding: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
  animation: fade .16s ease;
}
@keyframes fade { from { opacity: 0; } }
.sheet { width: min(520px, 100%); max-height: calc(100dvh - 32px); background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow); display: flex; flex-direction: column; overflow: hidden; animation: rise .22s cubic-bezier(.2,.7,.2,1); }
.sheet.wide { width: min(980px, 100%); }
.sheet .sh-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 14px 6px 20px; }
.sheet .sh-head h2 { font-family: var(--font-display); font-weight: 500; font-size: 1.4rem; }
.sheet .sh-body { padding: 10px 20px 20px; overflow-y: auto; overscroll-behavior: contain; }
@keyframes rise { from { transform: translateY(16px); opacity: 0; } }
.grab { display: none; }
@media (max-width: 860px) {
  .overlay { place-items: end center; padding: 0; padding-top: max(24px, env(safe-area-inset-top, 0px)); }
  .sheet, .sheet.wide { width: 100%; max-height: calc(100dvh - max(24px, env(safe-area-inset-top, 0px))); border-radius: 22px 22px 0 0; animation: up .26s cubic-bezier(.2,.7,.2,1); }
  .sheet .sh-body { padding-bottom: calc(22px + env(safe-area-inset-bottom, 0px)); }
  .grab { display: block; width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 8px auto 0; flex: none; }
}
@keyframes up { from { transform: translateY(100%); } }

/* просмотр публикации */
.detail { width: min(1060px, 100%); max-height: calc(100dvh - 32px); background: var(--surface); border-radius: var(--r-lg); overflow: hidden; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); box-shadow: var(--shadow); animation: rise .22s cubic-bezier(.2,.7,.2,1); }
.detail .side { display: flex; flex-direction: column; min-height: 0; }
.detail .top { display: flex; align-items: center; gap: 6px; padding: 12px 10px 4px 18px; }
.detail .scroll { flex: 1; overflow-y: auto; padding: 6px 18px 18px; display: flex; flex-direction: column; gap: 14px; overscroll-behavior: contain; }
.detail .title { font-family: var(--font-display); font-weight: 500; font-size: 1.7rem; line-height: 1.12; }
.detail .bar { display: flex; align-items: center; gap: 2px; padding: 4px 10px; border-top: 1px solid var(--line); }
.detail .bar .grow { flex: 1; }
.cform { display: flex; gap: 8px; padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); background: var(--surface); }
.cform .input { min-height: 44px; }
@media (max-width: 860px) {
  .overlay.full { padding: 0; place-items: stretch; }
  .detail { width: 100%; max-height: none; height: 100dvh; border-radius: 0; grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); overflow: hidden; }
  .detail .side { overflow: hidden; }
  .detail .carousel { max-height: 52dvh; }
  .detail .top { padding-top: calc(8px + env(safe-area-inset-top, 0px)); }
}
.page-detail .detail { box-shadow: none; animation: none; max-height: none; height: auto; }
@media (max-width: 860px) { .page-detail .detail { height: auto; } .page-detail .detail .carousel { max-height: none; } }

.carousel { position: relative; background: #05060C; overflow: hidden; touch-action: pan-y; user-select: none; }
.carousel .track { display: flex; height: 100%; transition: transform .35s cubic-bezier(.2,.7,.2,1); }
.carousel .slide { flex: 0 0 100%; position: relative; display: grid; place-items: center; }
.carousel .slide img { width: 100%; height: 100%; max-height: calc(100dvh - 32px); object-fit: contain; pointer-events: none; }
.carousel .step { position: absolute; left: 12px; right: 12px; bottom: 12px; padding: 11px 14px; border-radius: 12px; background: rgba(6,7,16,.78); backdrop-filter: blur(8px); color: #fff; font-size: .92rem; }
.carousel .step b { display: block; color: var(--accent); font-family: var(--font-display); font-weight: 500; }
.carousel .nav { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255,255,255,.9); color: #111; font-size: 1.25rem; display: grid; place-items: center; }
.carousel .prev { left: 10px; } .carousel .next { right: 10px; }
.carousel .dots { position: absolute; left: 0; right: 0; bottom: 8px; display: flex; justify-content: center; gap: 5px; pointer-events: none; }
.carousel .dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.45); }
.carousel .dots i.on { background: #fff; }
.carousel.has-step .dots { top: 10px; bottom: auto; }
.carousel .heart { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; opacity: 0; }
.carousel .heart svg { width: 96px; height: 96px; fill: #fff; stroke: none; filter: drop-shadow(0 6px 20px rgba(0,0,0,.4)); }
.carousel .heart.go { animation: heart .8s ease; }
@keyframes heart { 15% { opacity: 1; transform: scale(1.15); } 30% { transform: scale(1); } 75% { opacity: 1; } 100% { opacity: 0; } }
@media (max-width: 860px) { .carousel .nav { display: none; } .carousel .slide img { max-height: 52dvh; } }

.comment { display: flex; gap: 10px; align-items: flex-start; }
.comment .t { min-width: 0; flex: 1; overflow-wrap: anywhere; font-size: .94rem; }
.comment .t b { font-weight: 600; margin-right: 6px; }
.comment .iconbtn { width: 34px; height: 34px; color: var(--muted); }

/* меню профиля */
.menu {
  position: fixed; z-index: 60; top: calc(var(--header) + env(safe-area-inset-top, 0px) + 6px); right: max(12px, calc((100vw - var(--max)) / 2 + 12px));
  width: 280px; max-height: calc(100dvh - var(--header) - 24px); overflow-y: auto; background: var(--surface); border-radius: var(--r-lg); box-shadow: 0 0 0 1px var(--line), var(--shadow); padding: 8px; animation: rise .16s ease;
}
.menu .mh { display: flex; gap: 12px; align-items: center; padding: 10px 10px 12px; }
.menu .mh b { display: block; font-weight: 600; }
.menu .mh div span { display: block; font-size: .8rem; color: var(--muted); }
.menu a, .menu button.mi { display: flex; width: 100%; gap: 12px; align-items: center; min-height: 44px; padding: 0 12px; border: 0; background: none; border-radius: 10px; text-align: left; font-weight: 400; color: var(--ink); }
.menu svg { width: 20px; height: 20px; color: var(--muted); flex: none; }
.menu .sep { height: 1px; background: var(--line); margin: 6px 8px; }
.menu .mi .r { margin-left: auto; color: var(--muted); font-size: .8rem; }
@media (hover: hover) { .menu a:hover, .menu button.mi:hover { background: var(--surface-2); } }
@media (max-width: 860px) {
  .menu { top: auto; bottom: 0; left: 0; right: 0; width: 100%; max-height: 86dvh; border-radius: 22px 22px 0 0; padding: 6px 10px calc(14px + env(safe-area-inset-bottom, 0px)); animation: up .24s cubic-bezier(.2,.7,.2,1); }
  .menu-scrim { position: fixed; inset: 0; z-index: 55; background: rgba(4,5,12,.55); }
}

/* ---------- профиль ---------- */
.cover { position: relative; height: 150px; border-radius: var(--r-lg); background: var(--pattern), var(--bg); overflow: hidden; }
.cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(120deg, transparent 40%, color-mix(in srgb, var(--accent) 40%, transparent)); }
.cover .ch { position: absolute; z-index: 1; right: 16px; top: 14px; text-align: right; color: var(--ink); }
.cover .ch b { display: block; font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; }
.cover .ch span { font-size: .78rem; color: var(--muted); }
.prof { display: flex; gap: 16px; align-items: flex-start; padding: 0 8px; margin-top: -44px; position: relative; z-index: 2; flex-wrap: wrap; }
.prof > .ava { box-shadow: 0 0 0 5px var(--bg); }
.prof .nm { flex: 1 1 180px; min-width: 0; padding-top: 50px; }
.prof .nm h1 { font-size: clamp(1.5rem, 4vw, 2rem); overflow-wrap: anywhere; }
.prof-acts { display: flex; gap: 8px; flex-wrap: wrap; padding: 14px 8px 0; }
.prof-acts .btn { flex: 1 1 auto; }
.prof-acts .btn.ic { flex: 0 0 44px; padding: 0; }
@media (min-width: 700px) { .prof-acts .btn { flex: 0 0 auto; } }
.prof-info { padding: 14px 8px 0; display: flex; flex-direction: column; gap: 8px; }
.stats { display: flex; gap: 6px 20px; flex-wrap: wrap; font-size: .9rem; color: var(--muted); }
.stats b { color: var(--ink); font-weight: 600; margin-right: 4px; }
.tabs-line { display: flex; gap: 22px; border-bottom: 1px solid var(--line); margin: 22px 0 14px; overflow-x: auto; scrollbar-width: none; }
.tabs-line button, .tabs-line a { border: 0; background: none; padding: 12px 0; font-weight: 500; color: var(--muted); white-space: nowrap; box-shadow: inset 0 -2px 0 transparent; }
.tabs-line .on { color: var(--ink); box-shadow: inset 0 -2px 0 var(--accent); }

/* ---------- списки ---------- */
.list > * + * { border-top: 1px solid var(--line); }
.item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 4px; width: 100%; border-left: 0; border-right: 0; border-bottom: 0; background: none; text-align: left; }
.item:first-child { border-top: 0; }
.item h3 { overflow-wrap: anywhere; font-weight: 500; }
.item .meta { font-size: .82rem; color: var(--muted); margin-top: 2px; }
.cat { font-size: .78rem; font-weight: 500; color: var(--accent); }
.count-b { text-align: center; min-width: 44px; line-height: 1.1; color: var(--muted); font-size: .72rem; }
.count-b b { display: block; color: var(--ink); font-size: 1.05rem; font-weight: 600; }
.unread { position: relative; }
.unread::before { content: ""; position: absolute; left: -10px; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: var(--accent); }
.date { align-self: start; width: 56px; text-align: center; line-height: 1; padding: 8px 0; border-radius: 14px; background: var(--surface); }
.date b { display: block; font-family: var(--font-display); font-weight: 500; font-size: 1.5rem; }
.date span { font-size: .72rem; color: var(--muted); }
.ev { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 14px; padding: 16px 0; }
.ev + .ev { border-top: 1px solid var(--line); }
.ev .acts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.etype { font-size: .78rem; font-weight: 500; color: var(--accent); }
.reply { display: flex; gap: 12px; padding: 14px 0; }
.reply + .reply { border-top: 1px solid var(--line); }
.reply p { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 3px; }
.thumb { width: 44px; height: 54px; border-radius: 8px; object-fit: cover; }

/* ---------- сообщения и чат ---------- */
.msgr { display: grid; grid-template-columns: 300px minmax(0, 1fr); height: calc(100dvh - var(--header) - 60px); min-height: 420px; background: var(--surface); border-radius: var(--r-lg); overflow: hidden; }
.msgr .convs { border-right: 1px solid var(--line); overflow-y: auto; }
.conv { display: flex; gap: 12px; align-items: center; padding: 12px 16px; width: 100%; border: 0; background: none; text-align: left; color: var(--ink); }
.conv.on { background: var(--surface-2); }
.conv .t { min-width: 0; flex: 1; line-height: 1.3; }
.conv .t b { display: flex; justify-content: space-between; gap: 8px; font-weight: 600; }
.conv .t b span { font-weight: 400; color: var(--muted); font-size: .76rem; }
.conv .t p { color: var(--muted); font-size: .86rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv .dotn { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--accent); color: var(--on-accent); font-size: .72rem; font-weight: 700; display: grid; place-items: center; }
.thread { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.thread .th-head { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--line); min-height: 60px; }
.msgs { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 6px; overscroll-behavior: contain; }
.msg { display: flex; gap: 8px; align-items: flex-end; max-width: 82%; }
.bubble { background: var(--surface-2); padding: 8px 12px; border-radius: 18px 18px 18px 6px; overflow-wrap: anywhere; white-space: pre-wrap; }
.bubble .w { display: block; font-size: .74rem; font-weight: 600; color: var(--muted); }
.bubble time { display: block; font-size: .68rem; opacity: .6; margin-top: 2px; text-align: right; }
.msg.mine { align-self: flex-end; flex-direction: row-reverse; }
.msg.mine .bubble { background: var(--accent); color: var(--on-accent); border-radius: 18px 18px 6px 18px; }
.msg.mine .w { display: none; }
.day { align-self: center; font-size: .74rem; color: var(--muted); padding: 8px 0; }
.composer { display: flex; gap: 8px; align-items: flex-end; padding: 10px 12px; border-top: 1px solid var(--line); background: var(--surface); }
.composer textarea { min-height: 44px; max-height: 140px; resize: none; }
.composer .btn { flex: none; }
.chat .rooms { padding: 10px; overflow-y: auto; border-right: 1px solid var(--line); }
.room { display: block; padding: 10px 12px; border-radius: 10px; color: var(--muted); font-weight: 500; }
.room.on { background: var(--accent-soft); color: var(--accent); }
.room-pick { margin: 8px 0; font-size: .9rem; padding-top: 8px; padding-bottom: 8px; }
@media (max-width: 860px) {
  .msgr { grid-template-columns: 1fr; height: calc(100dvh - var(--header) - var(--bottombar) - 28px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)); border-radius: 16px; }
  .msgr.in-thread .convs { display: none; }
  .msgr:not(.in-thread) .thread { display: none; }
  .msgr .convs { border-right: 0; }
  .chat { grid-template-rows: auto minmax(0, 1fr); }
  .chat .rooms { display: flex; gap: 6px; border-right: 0; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
  .room { white-space: nowrap; flex: none; }
  .room-pick { margin: 0; width: auto; flex: none; min-height: 0; }
}

/* ---------- создание ---------- */
.drop { border: 2px dashed var(--line); border-radius: var(--r); min-height: 120px; padding: 18px; text-align: center; color: var(--muted); display: flex; flex-direction: column; gap: 6px; align-items: center; justify-content: center; cursor: pointer; transition: border-color .15s, color .15s; }
.drop svg { width: 28px; height: 28px; color: var(--accent); }
.drop.over { border-color: var(--accent); color: var(--accent); }
.shots { display: flex; flex-direction: column; gap: 10px; }
.shot { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.shot img { width: 64px; height: 80px; object-fit: cover; border-radius: 10px; }
.shot .ctrls { display: flex; }
.shot .ctrls .iconbtn { width: 36px; height: 36px; color: var(--muted); }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; background: var(--surface-2); border-radius: 14px; }
.seg button { border: 0; background: none; min-height: 38px; padding: 0 8px; border-radius: 10px; font-weight: 500; font-size: .88rem; color: var(--muted); }
.seg .on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.15); }

/* ---------- истории ---------- */
.story { position: relative; width: min(420px, 100%); aspect-ratio: 9 / 16; max-height: calc(100dvh - 32px); border-radius: var(--r-lg); overflow: hidden; background: #000; }
.story img { width: 100%; height: 100%; object-fit: cover; }
.story .bars { position: absolute; top: calc(10px + env(safe-area-inset-top, 0px)); left: 10px; right: 10px; display: flex; gap: 4px; }
.story .bar { flex: 1; height: 3px; border-radius: 3px; background: rgba(255,255,255,.35); overflow: hidden; }
.story .bar i { display: block; height: 100%; width: 0; background: #fff; }
.story .sh { position: absolute; top: calc(22px + env(safe-area-inset-top, 0px)); left: 12px; right: 56px; display: flex; gap: 10px; align-items: center; color: #fff; text-shadow: 0 1px 4px rgba(0,0,0,.6); }
.story .txt { position: absolute; bottom: calc(28px + env(safe-area-inset-bottom, 0px)); left: 18px; right: 18px; color: #fff; font-family: var(--font-display); font-size: 1.35rem; text-align: center; text-shadow: 0 2px 10px rgba(0,0,0,.7); }
.story .zone { position: absolute; top: 0; bottom: 0; width: 40%; border: 0; background: none; }
.story .zone.l { left: 0; } .story .zone.r { right: 0; }
.story .x { position: absolute; top: calc(14px + env(safe-area-inset-top, 0px)); right: 8px; color: #fff; }
@media (max-width: 860px) { .story { width: 100%; height: 100dvh; max-height: none; aspect-ratio: auto; border-radius: 0; } }

/* ---------- прочее ---------- */
.empty { text-align: center; padding: 48px 16px; color: var(--muted); display: flex; flex-direction: column; gap: 10px; align-items: center; }
.empty h2 { color: var(--ink); font-family: var(--font-display); font-weight: 500; font-size: 1.35rem; }
.skel { border-radius: var(--r-lg); background: linear-gradient(90deg, var(--surface), var(--surface-2), var(--surface)); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.toast {
  pointer-events: none;
  position: fixed; left: 50%; transform: translateX(-50%); z-index: 80; bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 14px; font-weight: 500; box-shadow: var(--shadow); max-width: calc(100% - 32px); text-align: center;
}
@media (max-width: 860px) { .toast { bottom: calc(var(--bottombar) + 14px + env(safe-area-inset-bottom, 0px)); } }
.tiles-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin-bottom: 18px; }
.tiles-stats div { padding: 14px 16px; background: var(--surface); border-radius: var(--r); }
.tiles-stats b { display: block; font-family: var(--font-display); font-weight: 500; font-size: 1.8rem; }
.cur-char { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 16px; align-items: center; }
.cur-char .char { pointer-events: none; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- язык ---------- */
.lang-btn { width: auto; padding: 0 8px; gap: 4px; }
.lang-code { font-size: .72rem; font-weight: 700; letter-spacing: .04em; }
.lang-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px; max-height: 58vh; overflow-y: auto; }
.lang-item { display: flex; align-items: center; gap: 8px; text-align: start; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); color: var(--ink); border: 1px solid transparent; }
.lang-item b { font-weight: 600; }
.lang-item span { color: var(--muted); font-size: .82rem; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lang-item svg { width: 18px; height: 18px; color: var(--accent); flex: none; }
.lang-item.on { border-color: var(--accent); background: var(--accent-soft); }
.lang-item[hidden] { display: none; }
@media (max-width: 520px) { .lang-code { display: none; } .lang-btn { padding: 0; width: 40px; } .lang-list { grid-template-columns: 1fr; } }
/* панель Google Переводчика прячем: язык выбирается в самом сайте */
body > .skiptranslate, iframe.skiptranslate, .goog-te-banner-frame, #goog-gt-tt, .goog-te-balloon-frame, .goog-tooltip, .VIpgJd-ZVi9od-ORHb-OEVmcd, .VIpgJd-ZVi9od-aZ2wEe-wOHMyf { display: none !important; }
body { top: 0 !important; }
.goog-text-highlight, font[style] { background: none !important; box-shadow: none !important; }

/* ---------- галочки и роли ---------- */
.vmark { display: inline-flex; width: 1.05em; height: 1.05em; margin-inline-start: .25em; vertical-align: -.12em; color: #3897F0; flex: none; }
.vmark svg { width: 100%; height: 100%; }
.pill.role-dev { background: var(--accent); color: var(--on-accent); }
.pill.role-admin { background: var(--accent-soft); color: var(--accent); }
/* ---------- профиль: соцсети и достижения ---------- */
.socials { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 2px; }
.socials .btn svg { width: 15px; height: 15px; }
.ach { margin: 18px 0 6px; padding: 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.ach-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.ach-h h2 { display: flex; align-items: center; gap: 8px; font-size: 1.1rem; }
.ach-h h2 svg { width: 20px; height: 20px; color: var(--accent); }
.ach-list { display: flex; flex-direction: column; gap: 8px; }
.ach-item { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); }
.ach-item .ai { font-size: 1.3rem; line-height: 1.2; flex: none; }
.ach-item .at { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ach-item .at > span { color: var(--muted); font-size: .88rem; }
.ach-item .ok-v { display: inline-flex; align-items: center; gap: 4px; color: var(--accent) !important; font-size: .8rem !important; }
.ach-item .ok-v svg { width: 14px; height: 14px; }
.soc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.socials-f { border: 0; padding: 0; margin: 0; min-width: 0; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 500; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
/* ---------- мероприятия: крупные и итоги ---------- */
.ev.major { background: linear-gradient(90deg, var(--accent-soft), transparent 70%); border-radius: 14px; padding-inline: 10px; }
.pill.major-pill { background: var(--accent); color: var(--on-accent); font-weight: 600; }
.res-nom { margin-bottom: 14px; }
.res-nom h3 { font-size: 1rem; margin-bottom: 6px; }
.res-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); margin-bottom: 6px; }
.res-row .pl { flex: none; min-width: 74px; font-weight: 600; color: var(--accent); font-size: .88rem; }
.res-row .nm { flex: 1; min-width: 0; overflow-wrap: anywhere; }
/* ---------- админ-панель ---------- */
.adm-u { align-items: flex-start; }
.adm-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.input.sm { min-height: 34px; padding: 4px 10px; font-size: .88rem; width: auto; }

/* ---------- заказы, услуги, отзывы ---------- */
.stars { display: inline-flex; gap: 1px; vertical-align: -2px; }
.stars span { width: 14px; height: 14px; color: var(--line); display: inline-flex; }
.stars span.on { color: #F5B83D; }
.stars svg { width: 100%; height: 100%; }
.review { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); }
.review p { margin: 0; overflow-wrap: anywhere; }
.ord { padding: 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); margin-bottom: 12px; display: flex; flex-direction: column; gap: 8px; }
.ord-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ord h3 { font-size: 1.05rem; }
.ord .acts { display: flex; flex-wrap: wrap; gap: 6px; }
.pill.st-new { background: var(--accent); color: var(--on-accent); }
.pill.st-accepted { background: var(--accent-soft); color: var(--accent); }
.pill.st-done { background: rgba(60, 170, 100, .18); color: #3CAA64; }
.rate { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 4px; }
.rate input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rate span { width: 30px; height: 30px; display: inline-flex; color: var(--line); cursor: pointer; }
.rate span svg { width: 100%; height: 100%; }
.rate label:has(input:checked) span, .rate label:has(input:checked) ~ label span, .rate label:hover span, .rate label:hover ~ label span { color: #F5B83D; }
.chip svg { width: 15px; height: 15px; }
/* ---------- гости ---------- */
.guest-bar { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(14px + env(safe-area-inset-bottom, 0px)); z-index: 30; display: flex; align-items: center; gap: 12px;
  padding: 10px 10px 10px 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); width: min(560px, calc(100% - 24px)); }
.guest-bar span { flex: 1; min-width: 0; font-size: .9rem; color: var(--muted); }
.guest-bar b { color: var(--ink); }
body:has(.guest-bar) .main { padding-bottom: 96px; }

/* ===== вход через Google и Telegram ===== */
.social { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 18px; }
.soc-btn { width: 100%; min-height: 44px; display: flex; justify-content: center; align-items: center; }
.soc-btn iframe { max-width: 100%; }
.or { display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 4px; color: var(--muted); font-size: .85rem; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line); }

/* ===== фото при регистрации ===== */
.ph-pick { display: flex; gap: 14px; align-items: center; }
.ph-ava { width: 76px; height: 76px; flex: none; border-radius: 50%; overflow: hidden; cursor: pointer; display: flex; align-items: center; justify-content: center; background: var(--surface-2); color: var(--muted); border: 1.5px dashed var(--line); }
.ph-ava img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.ph-ava svg { width: 26px; height: 26px; }

/* ===== рекомендации подписок ===== */
.sugg { margin: 0 0 22px; }
.sugg-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.sugg-h h2 { font-size: 1.05rem; }
.sugg-row { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.sugg-row::-webkit-scrollbar { display: none; }
.sugg-card { flex: 0 0 152px; scroll-snap-align: start; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 10px 12px; text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.sugg-card > a { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%; min-width: 0; color: inherit; text-decoration: none; }
.sugg-card b { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .92rem; }
.sugg-card .meta { font-size: .76rem; line-height: 1.3; }
.sugg-card .btn { width: 100%; }
.sugg-item > a { color: inherit; text-decoration: none; }
[data-fol].on { background: var(--surface-2); color: var(--ink); }
