/* Тема — атрибут <html data-theme="dark|light">; все цвета задаются переменными ниже. */
:root, [data-theme="dark"] {
  color-scheme: dark;
  --bg: #060c1b;
  --glow-1: rgba(42, 116, 255, .22);
  --glow-2: rgba(111, 214, 255, .08);
  --surface: #0f1b36;
  --surface-end: #0c1730;
  --surface-2: #142449;
  --row: rgba(20, 36, 73, .7);
  --input: #0a1430;
  --panel: #111a30;
  --line: rgba(110, 160, 255, .16);
  --line2: rgba(110, 160, 255, .28);
  --text: #e9f0ff;
  --text-2: #c3d0ec;
  --muted: #93a4c7;
  --label: #c9d6f2;
  --blue: #1f74ff;
  --blue-d: #1556e0;
  --sky: #5aaeff;
  --link: #5aaeff;
  --link-h: #8fd2ff;
  --time: #6fd6ff;
  --cyan: #6fd6ff;
  --orange: #ff7a1a;
  --orange2: #ffa443;
  --orange-text: #ffa443;
  --green: #31d09a;
  --red: #ff5a76;
  --gold: #ffc94a;
  --violet: #b58cff;
  --shadow: 0 18px 50px -20px rgba(0, 20, 80, .7);
  --header-bg: rgba(6, 12, 27, .82);
  --day-head: #0d1938;
  --axis: #0b1630;
  --stripe: rgba(110, 160, 255, .03);
  --empty-label: #3b4d78;
  --reviews-bg: linear-gradient(180deg, #08204f, #071635);
  --review-bg: rgba(20, 50, 120, .45);
  --review-line: rgba(90, 174, 255, .28);
  --tag-bg: rgba(147, 164, 199, .12);
  --tag-text: #b9c7e4;
  --cover-bg: linear-gradient(135deg, #1c3d8f, #0d1f4d);
  --plogo-bg: linear-gradient(135deg, #18306a, #0e1d42);
  --footer-bg: #050a17;
  --hover: rgba(90, 174, 255, .08);
  --slot-a: .32;
  --ok-text: #9ff0cf;
  --err-text: #ffb3c0;
}
[data-theme="light"] {
  color-scheme: light;
  --bg: #f3f7ff;
  --glow-1: rgba(0, 106, 238, .10);
  --glow-2: rgba(248, 116, 24, .06);
  --surface: #ffffff;
  --surface-end: #fbfcff;
  --surface-2: #eaf2ff;
  --row: #f2f7ff;
  --input: #ffffff;
  --panel: #ffffff;
  --line: rgba(0, 70, 170, .12);
  --line2: rgba(0, 70, 170, .24);
  --text: #0b1b3d;
  --text-2: #2c3d61;
  --muted: #5b6c8f;
  --label: #23365c;
  --blue: #006aee;
  --blue-d: #0052c4;
  --sky: #1a7dff;
  --link: #0062e0;
  --link-h: #0047a8;
  --time: #0058c9;
  --cyan: #3ab5ff;
  --orange: #f87418;
  --orange2: #ff8a2b;
  --orange-text: #d45d00;
  --green: #0f9e6c;
  --red: #dc3150;
  --gold: #f0a000;
  --violet: #7d4fe0;
  --shadow: 0 16px 40px -24px rgba(0, 60, 160, .4);
  --header-bg: rgba(255, 255, 255, .88);
  --day-head: #f4f8ff;
  --axis: #f8fbff;
  --stripe: rgba(0, 80, 200, .035);
  --empty-label: rgba(0, 70, 170, .32);
  --reviews-bg: linear-gradient(180deg, #e6f0ff, #dbe8ff);
  --review-bg: #ffffff;
  --review-line: rgba(0, 106, 238, .2);
  --tag-bg: rgba(0, 80, 200, .07);
  --tag-text: #2a4475;
  --cover-bg: linear-gradient(135deg, #3b92ff, #0052c4);
  --plogo-bg: linear-gradient(135deg, #e8f1ff, #d3e3ff);
  --footer-bg: #0a2f86;
  --hover: rgba(0, 106, 238, .07);
  --slot-a: .14;
  --ok-text: #0b7a53;
  --err-text: #b42340;
}
/* Подвал в светлой теме — синий, со своими цветами */
[data-theme="light"] .site-footer {
  --text: #ffffff; --text-2: #dbe7ff; --muted: #bcd0f5; --line: rgba(255, 255, 255, .18); --line2: rgba(255, 255, 255, .32);
  --link: #ffd2ad; --link-h: #fff; --sky: #ffd2ad; --hover: rgba(255, 255, 255, .1);
}

:root {
  --r: 16px;
  --head: 'Unbounded', 'Arial Black', system-ui, sans-serif;
  --body: 'Manrope', 'Segoe UI', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--body); font-size: 16px; line-height: 1.55; color: var(--text);
  background: var(--bg);
  background-image: radial-gradient(1200px 600px at 85% -10%, var(--glow-1), transparent 60%), radial-gradient(900px 500px at -10% 30%, var(--glow-2), transparent 60%);
  background-attachment: fixed;
  min-height: 100vh; display: flex; flex-direction: column;
  overflow-x: hidden;
  transition: background-color .3s, color .3s;
}
main { flex: 1; min-width: 0; }
a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-h); }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--head); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; overflow-wrap: break-word; }
h1 { font-size: clamp(28px, 4.6vw, 54px); font-weight: 800; }
h2 { font-size: clamp(22px, 3vw, 36px); font-weight: 700; }
h3 { font-size: 18px; font-weight: 700; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.container { width: min(1200px, 100% - 40px); margin: 0 auto; }
.hl { color: var(--orange-text); }
.sky { color: var(--link); }
.hidden { display: none !important; }

/* Кнопки, чипы, бейджи */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer;
  padding: 11px 20px; border-radius: 12px; border: 1px solid transparent; font: 700 15px var(--body);
  color: #fff; background: var(--surface-2); transition: transform .15s, box-shadow .2s, background .2s; text-align: center;
}
.btn:hover { transform: translateY(-1px); color: #fff; }
.btn:active { transform: translateY(0); }
.btn-primary { background: linear-gradient(135deg, var(--sky), var(--blue)); box-shadow: 0 10px 30px -12px rgba(0, 106, 238, .8); }
.btn-accent { background: linear-gradient(135deg, var(--orange2), var(--orange)); box-shadow: 0 10px 30px -12px rgba(248, 116, 24, .8); }
.btn-ghost { background: transparent; border-color: var(--line2); color: var(--text); }
.btn-ghost:hover { background: var(--hover); color: var(--text); }
.btn-danger { background: rgba(255, 90, 118, .12); color: var(--red); border-color: rgba(255, 90, 118, .3); }
.btn-danger:hover { color: #fff; background: var(--red); }
.btn-sm { padding: 7px 12px; font-size: 13px; border-radius: 10px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.icon-btn { background: none; border: 0; color: inherit; cursor: pointer; padding: 6px; border-radius: 8px; font: inherit; }
.edit-link { display: inline-block; margin-top: 14px; font-size: 14px; font-weight: 700; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; font-size: 14px; font-weight: 600;
  background: var(--surface); border: 1px solid var(--line); color: var(--text); cursor: pointer; transition: .15s; white-space: nowrap; font-family: var(--body);
}
.chip:hover { border-color: var(--line2); color: var(--text); }
.chip.active { background: var(--blue); border-color: var(--blue); color: #fff; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; margin-bottom: 14px;
  font: 700 12px var(--body); letter-spacing: .08em; text-transform: uppercase;
  color: var(--link); background: rgba(42, 116, 255, .1); border: 1px solid rgba(90, 174, 255, .3);
}
.eyebrow.orange { color: var(--orange-text); background: rgba(248, 116, 24, .1); border-color: rgba(248, 116, 24, .3); }
.eyebrow.green { color: var(--green); background: rgba(49, 208, 154, .1); border-color: rgba(49, 208, 154, .3); }
.badge { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; background: rgba(42, 116, 255, .13); color: var(--link); white-space: nowrap; }
.badge.orange { background: rgba(248, 116, 24, .14); color: var(--orange-text); }
.badge.green { background: rgba(49, 208, 154, .14); color: var(--green); }
.badge.red { background: rgba(255, 90, 118, .14); color: var(--red); }
.badge.gray { background: var(--tag-bg); color: var(--muted); }

.card { background: linear-gradient(180deg, var(--surface), var(--surface-end)); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; box-shadow: var(--shadow); min-width: 0; }
.grid { display: grid; gap: 20px; }
.grid > * { min-width: 0; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 960px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* Шапка */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--header-bg); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; gap: 20px; height: 70px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); min-width: 0; flex-shrink: 1; }
.brand:hover { color: var(--text); }
.brand img { width: 46px; height: 46px; object-fit: contain; flex: none; }
.brand > div { min-width: 0; }
.brand b { font: 800 20px var(--head); display: block; line-height: 1.1; white-space: nowrap; }
.brand span { font-size: 12px; color: var(--muted); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { padding: 8px 14px; border-radius: 10px; color: var(--muted); font-weight: 700; font-size: 15px; }
.nav a:hover { color: var(--text); background: var(--hover); }
.nav a.active { color: var(--text); background: rgba(42, 116, 255, .18); }
.nav-auth { display: none; }
.header-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.theme-btn { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line2); display: grid; place-items: center; font-size: 18px; color: var(--text); }
.theme-btn:hover { background: var(--hover); }
[data-theme="dark"] .theme-btn .i-moon, [data-theme="light"] .theme-btn .i-sun { display: none; }
.user-menu { position: relative; }
.user-menu > button { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px 4px 4px; color: var(--text); cursor: pointer; font: 700 14px var(--body); }
.user-menu .dropdown { position: absolute; right: 0; top: calc(100% + 8px); min-width: 230px; background: var(--panel); border: 1px solid var(--line2); border-radius: 14px; padding: 6px; box-shadow: var(--shadow); display: none; }
.user-menu.open .dropdown { display: block; }
.dropdown a, .dropdown button { display: block; width: 100%; text-align: left; padding: 9px 12px; border-radius: 10px; color: var(--text); background: none; border: 0; font: 600 14px var(--body); cursor: pointer; }
.dropdown a:hover, .dropdown button:hover { background: var(--hover); }
.avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; background: linear-gradient(135deg, var(--blue), var(--cyan)); display: inline-grid; place-items: center; font-weight: 800; color: #fff; font-size: 14px; flex: none; }
.avatar.lg { width: 96px; height: 96px; font-size: 36px; }
.avatar.md { width: 44px; height: 44px; font-size: 18px; }
.avatar.club-ava { background: var(--surface-2); object-fit: contain; padding: 3px; }
.burger { display: none; width: 40px; height: 40px; font-size: 20px; border: 1px solid var(--line2); border-radius: 12px; color: var(--text); }
@media (max-width: 1020px) {
  .burger { display: grid; place-items: center; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 70px; flex-direction: column; background: var(--panel); padding: 12px 16px 18px; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); max-height: calc(100vh - 70px); overflow-y: auto; }
  .nav.open { display: flex; }
  .nav a { padding: 12px 14px; font-size: 16px; }
  .header-actions { margin-left: auto; }
  .user-menu .btn-text { display: none; }
  .user-menu > button { padding: 3px; }
}
@media (max-width: 640px) {
  .header-row { height: 62px; gap: 10px; }
  .nav { top: 62px; }
  .brand { gap: 9px; }
  .brand img { width: 38px; height: 38px; }
  .brand b { font-size: 18px; }
  .brand span { display: none; }
  .auth-btn { display: none; }
  .nav-auth { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; padding-top: 14px; border-top: 1px solid var(--line); }
  .nav-auth .btn { padding: 12px; }
  .nav-auth .btn-ghost { color: var(--text); }
}

/* Флеш и формы */
.flash { margin: 18px auto 0; padding: 14px 18px; border-radius: 12px; font-weight: 600; display: flex; justify-content: space-between; gap: 12px; }
.flash.ok { background: rgba(49, 208, 154, .12); border: 1px solid rgba(49, 208, 154, .35); color: var(--ok-text); }
.flash.error { background: rgba(255, 90, 118, .1); border: 1px solid rgba(255, 90, 118, .35); color: var(--err-text); }
label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 6px; color: var(--label); }
.field { margin-bottom: 16px; }
input[type=text], input[type=password], input[type=number], input[type=date], input[type=time], input[type=search], input[type=url], input[type=email], input[type=file], select, textarea {
  width: 100%; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--line2); background: var(--input); color: var(--text);
  font: 500 16px var(--body); outline: none; transition: border .15s, box-shadow .15s; max-width: 100%;
}
input[type=file] { padding: 8px 10px; font-size: 14px; }
input:focus, select:focus, textarea:focus { border-color: var(--sky); box-shadow: 0 0 0 3px rgba(90, 174, 255, .2); }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .8; }
textarea { min-height: 110px; resize: vertical; }
input[type=checkbox], input[type=radio] { accent-color: var(--blue); width: 18px; height: 18px; vertical-align: middle; flex: none; }
.check { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; cursor: pointer; margin: 0; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.row > .grow { flex: 1; min-width: 160px; }
.errors { background: rgba(255, 90, 118, .1); border: 1px solid rgba(255, 90, 118, .3); border-radius: 12px; padding: 12px 18px; margin-bottom: 18px; color: var(--err-text); }
.errors ul { margin: 0; padding-left: 18px; }
.auth-wrap { max-width: 460px; margin: 48px auto; }
.auth-wrap .card { padding: 32px; }
.auth-logo { width: 84px; margin: 0 auto 10px; }

/* Секции */
.section { padding: 64px 0; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px 20px; flex-wrap: wrap; margin-bottom: 28px; }
.section-head > div:first-child { min-width: 0; }
.section-head p { margin: 0; max-width: 640px; }
.page-head { padding: 44px 0 12px; }

/* Главная: hero (синий в обеих темах) */
.hero { position: relative; padding: 54px 0 64px; }
.hero-box {
  position: relative; border-radius: 28px; padding: 56px; overflow: hidden; color: #fff;
  background: radial-gradient(800px 400px at 100% 0, rgba(111, 214, 255, .35), transparent 60%), linear-gradient(135deg, #1a6ff5 0%, #0058d6 55%, #0a3596 100%);
  box-shadow: 0 40px 80px -40px rgba(0, 90, 230, .8); display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: center;
}
.hero-box > * { min-width: 0; position: relative; z-index: 1; }
.hero-box::after { content: ''; position: absolute; inset: 0; background: url('/img/trail-bg.svg') no-repeat right -60px bottom -40px / 520px; opacity: .22; pointer-events: none; z-index: 0; }
.hero h1 { color: #fff; }
.hero h1 .hl { color: #ffae5e; }
.hero-lead { font-size: 18px; color: #e3edff; max-width: 560px; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 26px; }
.hero-badges span { padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, .16); font-size: 13px; font-weight: 700; color: #fff; }
.hero .btn-light { background: #fff; color: #0052c4; }
.hero .btn-light:hover { color: #0052c4; }
.btn-on-blue { border-color: rgba(255, 255, 255, .45) !important; color: #fff !important; }
.btn-on-blue:hover { background: rgba(255, 255, 255, .12) !important; }
.eyebrow.on-blue { color: #fff; background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .3); }
.edit-link.on-blue { color: #ffd2ad; }
.hero-logo { display: grid; place-items: center; }
.hero-logo img { width: min(330px, 100%); filter: drop-shadow(0 30px 40px rgba(0, 10, 60, .45)); animation: float 6s ease-in-out infinite; }
.hero-next { display: block; margin-top: 18px; background: rgba(5, 18, 60, .4); border: 1px solid rgba(255, 255, 255, .22); border-radius: 16px; padding: 14px 18px; color: #fff; width: min(340px, 100%); }
.hero-next:hover { color: #fff; background: rgba(5, 18, 60, .55); }
@keyframes float { 50% { transform: translateY(-12px) rotate(-2deg); } }
@media (max-width: 860px) {
  .hero { padding: 24px 0 40px; }
  .hero-box { grid-template-columns: 1fr; padding: 32px 26px; gap: 8px; border-radius: 22px; }
  .hero-box::after { display: none; }
  .hero-logo { display: contents; }
  .hero-logo img { order: -1; justify-self: center; width: 150px; animation: none; position: relative; z-index: 1; }
  .hero-next { order: 2; width: 100%; position: relative; z-index: 1; }
}
@media (max-width: 640px) {
  .hero-box { padding: 24px 18px; }
  .hero-logo img { width: 116px; }
  .hero h1 { font-size: 27px; }
  .hero-lead { font-size: 15.5px; }
  .hero-badges { margin: 14px 0 20px; }
  .hero .row .btn { flex: 1 1 100%; }
}

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat { padding: 22px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); min-width: 0; }
.stat b { display: block; font: 800 32px var(--head); color: var(--link); white-space: nowrap; }
.stat span { color: var(--muted); font-weight: 600; font-size: 14px; }
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, 1fr); gap: 10px; } .stat { padding: 16px; } .stat b { font-size: 22px; } .stat span { font-size: 13px; } }

/* мини-карточки событий */
.event-card { display: flex; flex-direction: column; gap: 10px; }
.event-card .date { display: flex; gap: 14px; align-items: center; }
.event-card .date > div:last-child { min-width: 0; }
.date-box { width: 58px; height: 62px; border-radius: 14px; background: linear-gradient(135deg, var(--sky), var(--blue-d)); display: grid; place-items: center; text-align: center; line-height: 1.05; flex: none; }
.date-box b { font: 800 22px var(--head); display: block; color: #fff; }
.date-box span { font-size: 11px; text-transform: uppercase; font-weight: 800; color: #dbe8ff; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--muted); font-size: 14px; }
.progress { height: 8px; border-radius: 99px; background: var(--tag-bg); overflow: hidden; }
.progress i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--green), var(--cyan)); transition: width .8s cubic-bezier(.2, .8, .2, 1); }

/* отзывы */
.reviews { background: var(--reviews-bg); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.review { background: var(--review-bg); border: 1px solid var(--review-line); border-radius: 18px; padding: 22px; display: flex; flex-direction: column; gap: 14px; box-shadow: var(--shadow); }
.review blockquote { margin: 0; font-size: 15.5px; color: var(--text-2); flex: 1; }
.stars { color: var(--orange2); letter-spacing: 2px; font-size: 17px; }
.who { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.who small { display: block; color: var(--muted); font-weight: 500; }
.rating-input { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 4px; }
.rating-input input { display: none; }
.rating-input label { font-size: 30px; color: var(--line2); cursor: pointer; margin: 0; }
.rating-input input:checked ~ label, .rating-input label:hover, .rating-input label:hover ~ label { color: var(--orange2); }
.scroller { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(300px, 1fr); gap: 18px; overflow-x: auto; padding-bottom: 12px; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
.scroller > * { scroll-snap-align: start; }
@media (max-width: 640px) { .scroller { grid-auto-columns: 86%; gap: 12px; } }

/* партнёры */
.partners { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
.partner { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 22px 14px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); text-align: center; color: var(--text); font-weight: 700; transition: .2s; }
.partner:hover { border-color: var(--line2); transform: translateY(-2px); color: var(--text); }
.partner .plogo { width: 72px; height: 72px; border-radius: 18px; display: grid; place-items: center; background: var(--plogo-bg); font: 800 24px var(--head); color: var(--link); overflow: hidden; }
.partner .plogo img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
@media (max-width: 640px) { .partners { grid-template-columns: repeat(2, 1fr); gap: 10px; } .partner { padding: 16px 10px; font-size: 14px; } }

/* площадки и контакты */
.contacts-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; }
.contacts-grid > * { min-width: 0; }
@media (max-width: 900px) { .contacts-grid { grid-template-columns: 1fr; } }
.tabs { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.tab { padding: 10px 16px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); color: var(--text); font-weight: 700; cursor: pointer; font-family: var(--body); font-size: 14px; text-align: left; }
.tab.active { background: var(--orange); border-color: var(--orange); color: #fff; }
.map { width: 100%; height: 300px; border: 0; border-radius: 14px; margin-top: 14px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-size: 15px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.venue-label { color: var(--orange-text); font-weight: 800; text-transform: uppercase; letter-spacing: .06em; font-size: 13px; }

/* Подвал */
.site-footer { border-top: 1px solid var(--line); background: var(--footer-bg); padding: 48px 0 24px; margin-top: 40px; color: var(--text); }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 28px; }
.footer-grid h4 { font: 700 13px var(--body); text-transform: uppercase; letter-spacing: .08em; color: var(--sky); margin: 0 0 14px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: 14px; }
.footer-grid li { color: var(--muted); }
.footer-grid li b { color: var(--text); }
.footer-bottom { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 36px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.site-footer .brand span { display: block; white-space: normal; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; gap: 24px; } .site-footer { padding-top: 36px; } }

/* Расписание */
.week-nav { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.week-nav .range { font: 700 18px var(--head); min-width: 220px; text-align: center; }
.arrow { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line2); color: var(--text); font-size: 20px; flex: none; }
.arrow:hover { background: var(--blue); color: #fff; border-color: var(--blue); }
.week-wrap { display: flex; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); }
.time-axis { flex: none; width: 56px; border-right: 1px solid var(--line); background: var(--axis); }
.time-axis .spacer { height: 64px; border-bottom: 1px solid var(--line); }
.time-axis .cell { position: relative; font-size: 12px; color: var(--muted); text-align: right; padding-right: 8px; }
.time-axis .cell span { position: relative; top: -9px; }
.week { display: flex; flex: 1; min-width: 0; }
.day { flex: 1 1 0; min-width: 0; border-right: 1px solid var(--line); transition: flex .5s cubic-bezier(.2, .8, .2, 1); display: flex; flex-direction: column; }
.day:last-child { border-right: 0; }
.day.busy { flex: 7 1 0; }
.day.empty { flex: 0 0 52px; background: repeating-linear-gradient(135deg, transparent 0 10px, var(--stripe) 10px 20px); }
.day.empty:hover { flex: 0 0 80px; }
.day-head { height: 64px; padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--day-head); display: flex; flex-direction: column; justify-content: center; }
.day-head b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.day-head small { color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.day.empty .day-head { align-items: center; padding: 10px 4px; }
.day.empty .day-head b { font-size: 13px; color: var(--muted); }
.day.today .day-head { background: linear-gradient(180deg, rgba(248, 116, 24, .22), rgba(248, 116, 24, .06)); }
.day.today .day-head b { color: var(--orange-text); }
.day.past { opacity: .6; }
.day-body { position: relative; flex: 1; }
.day-body.grid-lines { background-image: linear-gradient(to bottom, var(--line) 1px, transparent 1px); }
.empty-label { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; writing-mode: vertical-rl; transform: rotate(180deg); color: var(--empty-label); font-weight: 700; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; }
.slot {
  --c: 42, 116, 255; --edge: var(--sky);
  position: absolute; left: 8px; right: 8px; border-radius: 14px; padding: 12px 14px; overflow: hidden;
  background: linear-gradient(160deg, rgba(var(--c), var(--slot-a)), rgba(var(--c), calc(var(--slot-a) / 2)));
  border: 1px solid rgba(var(--c), .45); border-left: 4px solid var(--edge);
  display: flex; flex-direction: column; gap: 6px; transition: box-shadow .2s;
}
.slot:hover { box-shadow: 0 10px 30px -12px rgba(var(--c), .8); z-index: 2; }
.slot.k-rpg { --c: 160, 100, 255; --edge: var(--violet); }
.slot.k-tournament { --c: 248, 116, 24; --edge: var(--orange2); }
.slot.k-party { --c: 255, 90, 118; --edge: var(--red); }
.slot.k-fest { --c: 49, 208, 154; --edge: var(--green); }
.slot-time { font-size: 12.5px; font-weight: 800; color: var(--time); }
.slot-title { font: 700 15px var(--head); color: var(--text); line-height: 1.25; }
.slot-title a { color: inherit; }
.slot-items { list-style: none; padding: 0; margin: 2px 0; display: grid; gap: 4px; font-size: 13.5px; }
.slot-items li { display: flex; gap: 8px; }
.slot-items time { color: var(--time); font-weight: 800; min-width: 42px; }
.slot-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.price-badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 800; white-space: nowrap;
  background: rgba(248, 116, 24, .15); color: var(--orange-text); border: 1px solid rgba(248, 116, 24, .35); }
/* платный пункт программы */
.slot-items li.paid-item { padding: 6px 8px; margin: 2px -8px; border-radius: 10px; background: rgba(248, 116, 24, .1); border: 1px dashed rgba(248, 116, 24, .45); }
.it-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.it-title { font-weight: 700; }
.it-meta { font-size: 12px; color: var(--orange-text); font-weight: 700; }
.item-btn { align-self: flex-start; border: 0; cursor: pointer; padding: 6px 12px; border-radius: 9px; font: 800 12.5px var(--body); color: #fff;
  background: linear-gradient(135deg, var(--orange2), var(--orange)); box-shadow: 0 6px 18px -8px rgba(248, 116, 24, .8); white-space: nowrap; }
.item-btn:hover { filter: brightness(1.07); }
.item-btn.ok { background: rgba(49, 208, 154, .16); color: var(--green); box-shadow: none; border: 1px solid rgba(49, 208, 154, .45); }
.item-btn.wait { background: rgba(248, 116, 24, .14); color: var(--orange-text); box-shadow: none; border: 1px solid rgba(248, 116, 24, .4); }
.item-btn.muted-btn { background: var(--tag-bg); color: var(--muted); box-shadow: none; cursor: default; }
.step.tour { border-color: rgba(248, 116, 24, .45); background: rgba(248, 116, 24, .06); }
.tour-body { flex: 1; min-width: 0; }
.tour-body .post-text, .tour-details { font-size: 14.5px; }
.tour-body .post-text p, .tour-details p { margin: 0 0 .6em; }
.min-bar { display: grid; gap: 4px; margin-top: 6px; max-width: 320px; }
.tour-modal { width: min(520px, 100%); }
.paid-ok { background: rgba(49, 208, 154, .14); color: var(--green); border-color: rgba(49, 208, 154, .45); cursor: default; white-space: normal; }
.paid-ok:hover { transform: none; color: var(--green); }
.pay-wait { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; color: var(--orange-text); font-weight: 700; }
.pay-wait .btn { flex: 1; }
.pay-info { margin: 18px 0 4px; padding: 14px 18px; border-radius: 14px; background: rgba(248, 116, 24, .08); border: 1px solid rgba(248, 116, 24, .3); }
.pay-info ol { margin: 8px 0 6px; padding-left: 20px; color: var(--text-2); }
.legend { display: flex; flex-wrap: wrap; gap: 8px 14px; font-size: 13px; color: var(--muted); margin-top: 14px; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-right: 6px; vertical-align: -1px; }
@media (max-width: 760px) {
  .week-nav { width: 100%; flex-wrap: nowrap; }
  .week-nav .range { flex: 1; min-width: 0; font-size: 15px; }
  .week-nav .btn { display: none; }
  .week-wrap { flex-direction: column; border-radius: 16px; }
  .time-axis { display: none; }
  .week { flex-direction: column; }
  .day, .day.busy, .day.empty, .day.empty:hover { flex: none; border-right: 0; border-bottom: 1px solid var(--line); }
  .day:last-child { border-bottom: 0; }
  .day.past.empty { display: none; }
  .day-head { height: auto; padding: 12px 14px; flex-direction: row; align-items: baseline; gap: 8px; justify-content: flex-start; }
  .day.empty .day-head { padding: 9px 14px; justify-content: flex-start; }
  .day.empty .day-head::after { content: 'нет встреч'; margin-left: auto; font-size: 12px; color: var(--empty-label); font-weight: 700; }
  .day.empty .day-body { display: none; }
  .day-body { height: auto !important; padding: 10px; display: grid; gap: 10px; background: none !important; }
  .slot { position: static; height: auto !important; }
  .slot-foot > div { min-width: 0 !important; flex: 1 1 100%; }
}
.mobile-actions { display: none; }
@media (max-width: 760px) { .mobile-actions { display: flex; gap: 8px; margin-top: 12px; } }

/* Игры */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar .search { flex: 1; min-width: 200px; position: relative; }
.toolbar .search input { padding-left: 42px; }
.toolbar .search::before { content: '⌕'; position: absolute; left: 15px; top: 50%; transform: translateY(-52%); color: var(--muted); font-size: 20px; }
.filter-count { background: var(--orange); color: #fff; border-radius: 99px; padding: 0 7px; font-size: 12px; min-width: 20px; }
.filter-panel {
  position: fixed; z-index: 80; top: 90px; right: max(20px, calc((100vw - 1200px) / 2)); width: 380px; max-height: calc(100vh - 110px);
  display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line2); border-radius: 18px; box-shadow: 0 30px 80px rgba(0, 0, 0, .35);
  transform: translateY(-10px) scale(.98); opacity: 0; pointer-events: none; transition: .2s; color: var(--text);
}
.filter-panel.open { transform: none; opacity: 1; pointer-events: auto; }
.filter-panel header { padding: 16px 18px; border-bottom: 1px solid var(--line); font: 800 15px var(--body); text-transform: uppercase; letter-spacing: .06em; display: flex; justify-content: space-between; align-items: center; }
.filter-body { padding: 16px 18px; overflow-y: auto; display: grid; gap: 14px; -webkit-overflow-scrolling: touch; }
.filter-body h5 { margin: 0 0 6px; font-size: 14px; color: var(--label); }
.filter-foot { display: flex; gap: 8px; padding: 14px 18px; border-top: 1px solid var(--line); }
.filter-foot .btn-search { flex: 1; background: linear-gradient(135deg, #3fd38a, #1fae69); }
.filter-backdrop { position: fixed; inset: 0; z-index: 70; background: rgba(0, 10, 30, .4); display: none; }
.filter-backdrop.open { display: block; }
@media (max-width: 640px) {
  .filter-panel { left: 0; right: 0; top: auto; bottom: 0; width: auto; max-height: 86vh; border-radius: 20px 20px 0 0; transform: translateY(30px); }
  .filter-foot { padding-bottom: max(14px, env(safe-area-inset-bottom)); }
}
.ms { position: relative; }
.ms-btn { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line2); background: var(--input); color: var(--muted); font: 500 14px var(--body); cursor: pointer; text-align: left; }
.ms-btn.has { color: var(--text); }
.ms-btn::after { content: '+'; font-size: 18px; color: var(--muted); }
.ms-pop { display: none; margin-top: 6px; background: var(--input); border: 1px solid var(--line2); border-radius: 12px; padding: 8px; max-height: 220px; overflow-y: auto; }
.ms.open .ms-pop { display: block; }
.ms-pop label { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 8px; font-weight: 500; margin: 0; cursor: pointer; color: var(--text); }
.ms-pop label:hover { background: var(--hover); }
.ms-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.ms-tags span { font-size: 12px; background: rgba(42, 116, 255, .18); color: var(--text); border-radius: 6px; padding: 2px 8px; cursor: pointer; }
.ms-tags span::after { content: ' ×'; }
.scroll-row { flex-wrap: wrap; }
@media (max-width: 640px) {
  .scroll-row { flex-wrap: nowrap; overflow-x: auto; margin: 0 -14px; padding: 0 14px 6px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .scroll-row::-webkit-scrollbar { display: none; }
}

.games-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
.game { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; transition: transform .2s, box-shadow .2s, border-color .2s; min-width: 0; }
.game:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line2); }
.game.flash-pick { animation: pick 1.6s ease; border-color: var(--orange); }
@keyframes pick { 0%, 100% { box-shadow: none; } 30%, 70% { box-shadow: 0 0 0 4px var(--orange), 0 20px 50px -10px rgba(248, 116, 24, .6); } }
.game-cover { position: relative; aspect-ratio: 16 / 10; background: var(--cover-bg); display: grid; place-items: center; overflow: hidden; }
.game-cover img { width: 100%; height: 100%; object-fit: cover; }
.game-cover .ph { font: 800 44px var(--head); color: rgba(255, 255, 255, .9); text-shadow: 0 6px 20px rgba(0, 0, 0, .3); }
.fav-btn { position: absolute; top: 10px; left: 10px; width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer; background: rgba(6, 12, 27, .6); backdrop-filter: blur(6px); color: #fff; font-size: 19px; display: grid; place-items: center; transition: transform .15s; }
.fav-btn:hover { transform: scale(1.1); }
.fav-btn.on { color: var(--gold); }
.cx-badge { position: absolute; top: 12px; right: 12px; backdrop-filter: blur(6px); }
[data-theme="light"] .cx-badge { background: rgba(255, 255, 255, .92); }
.game-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.game-body h3 { margin: 0; font-size: 17px; }
.game-body .orig { color: var(--muted); font-size: 13px; margin-top: -6px; }
.game-body p { margin: 0; color: var(--text-2); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tags { display: flex; flex-wrap: wrap; gap: 5px; }
.tags span { font-size: 11.5px; padding: 3px 8px; border-radius: 6px; background: var(--tag-bg); color: var(--tag-text); }
.played-btn { margin-top: auto; }
.played-btn.on { background: rgba(49, 208, 154, .14); border-color: rgba(49, 208, 154, .5); color: var(--green); }
.empty-state { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty-state .big { font-size: 46px; margin-bottom: 8px; }
@media (max-width: 640px) {
  .games-grid { grid-template-columns: 1fr; gap: 14px; }
  .game-cover { aspect-ratio: 16 / 7; }
  .game-body { padding: 14px 16px 16px; }
  .game-body p { -webkit-line-clamp: 2; }
  .toolbar .search { flex-basis: 100%; }
  .toolbar > .btn { flex: 1; }
}

/* Сборы */
.fund-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 20px; align-items: start; }
.fund-grid > * { min-width: 0; }
@media (max-width: 900px) { .fund-grid { grid-template-columns: 1fr; } }
.fund-main h2 { font-size: clamp(21px, 2.6vw, 30px); }
.money-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin: 20px 0 10px; flex-wrap: wrap; }
.money-row .got b { font: 800 clamp(30px, 4vw, 44px) var(--head); background: linear-gradient(90deg, var(--orange2), var(--orange)); -webkit-background-clip: text; background-clip: text; color: transparent; white-space: nowrap; }
.money-row small { display: block; color: var(--muted); font-weight: 600; font-size: 13px; }
.money-row .goal { text-align: right; font: 700 20px var(--head); white-space: nowrap; }
.bigbar { height: 16px; border-radius: 99px; background: var(--tag-bg); overflow: hidden; position: relative; }
.bigbar i { position: absolute; inset: 0 auto 0 0; border-radius: inherit; background: linear-gradient(90deg, var(--blue), var(--cyan) 60%, var(--orange2)); transition: width 1.2s cubic-bezier(.2, .8, .2, 1); box-shadow: 0 0 20px rgba(111, 214, 255, .5); }
.bigbar i::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .35), transparent); animation: shine 2.4s infinite; }
@keyframes shine { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.bar-caption { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; margin-top: 8px; color: var(--muted); }
.bar-caption b { color: var(--green); }
.live-dot { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--green); white-space: nowrap; }
.live-dot::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; animation: pulse 1.8s infinite; }
.live-dot.off { color: var(--muted); }
.live-dot.off::before { animation: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(49, 208, 154, .6); } 100% { box-shadow: 0 0 0 10px rgba(49, 208, 154, 0); } }
.donors { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; max-height: 520px; overflow-y: auto; }
.donors li { display: flex; justify-content: space-between; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--row); border: 1px solid var(--line); }
.donors li > div { min-width: 0; }
.donors li.new { animation: donorIn 1.8s ease; }
@keyframes donorIn { 0% { transform: translateX(30px); opacity: 0; background: rgba(248, 116, 24, .35); } 20% { transform: none; opacity: 1; } }
.donors b { display: block; font-size: 14.5px; }
.donors small { color: var(--muted); font-size: 12.5px; }
.donors .amt { color: var(--orange-text); font-weight: 800; white-space: nowrap; }
.amount-pick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 12px; }
.amount-pick button { padding: 10px 4px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line2); color: var(--text); font: 700 14px var(--body); cursor: pointer; }
.amount-pick button.active { background: var(--orange); border-color: var(--orange); color: #fff; }
@media (max-width: 640px) {
  .fund-main .row:first-child { flex-direction: column; align-items: flex-start; gap: 8px; }
  .money-row .goal { font-size: 16px; }
  .card { padding: 18px; }
}

/* тропа сбора */
.trail-card { padding: 26px; }
.trail-wrap { position: relative; width: 100%; max-width: 980px; margin: 0 auto; }
.trail-svg { width: 100%; height: auto; display: block; overflow: visible; }
.trail-bg { fill: none; stroke: var(--tag-bg); stroke-linecap: round; }
.trail-edge { fill: none; stroke: var(--line2); stroke-linecap: round; stroke-dasharray: 2 14; }
.trail-fill { fill: none; stroke: url(#trailGrad); stroke-linecap: round; transition: stroke-dashoffset 1.6s cubic-bezier(.2, .8, .2, 1); filter: drop-shadow(0 0 10px rgba(111, 214, 255, .45)); }
.ms-node circle.ring { fill: var(--surface); stroke: var(--muted); stroke-width: 3; transition: .4s; }
.ms-node.done circle.ring { fill: var(--orange); stroke: #ffd1a8; }
.ms-node text.check { fill: #fff; font-weight: 800; font-size: 15px; opacity: 0; transition: .4s; }
.ms-node.done text.check { opacity: 1; }
.ms-label { position: absolute; width: min(340px, 38%); transform: translateY(-50%); transition: .4s; display: flex; align-items: center; gap: 14px; }
.ms-label.left { flex-direction: row-reverse; text-align: right; }
.ms-text { min-width: 0; }
.ms-label .sum { font: 800 22px var(--head); color: var(--muted); transition: .4s; white-space: nowrap; }
.ms-label .ttl { font-size: 14.5px; color: var(--text-2); line-height: 1.35; }
.ms-label.done .sum { color: var(--orange-text); }
.ms-label.done .ttl { color: var(--text); }
.ms-img { flex: none; width: 120px; height: 120px; border-radius: 16px; overflow: hidden; border: 3px solid var(--surface); box-shadow: 0 10px 30px -10px rgba(0, 20, 80, .6); transform: rotate(-3deg); transition: transform .3s; background: var(--surface-2); }
.ms-label.left .ms-img { transform: rotate(3deg); }
.ms-img:hover { transform: rotate(0) scale(1.05); }
.ms-img img { width: 100%; height: 100%; object-fit: cover; }
.ms-label:not(.done) .ms-img { filter: grayscale(.55) brightness(.9); }
.walker { transition: transform 1.6s cubic-bezier(.2, .8, .2, 1); }
.walker-dot { fill: #fff; stroke: var(--blue); stroke-width: 4; }
.walker-pulse { fill: rgba(111, 214, 255, .4); animation: wpulse 2s infinite; transform-origin: center; transform-box: fill-box; }
@keyframes wpulse { 0% { transform: scale(.6); opacity: 1; } 100% { transform: scale(2.4); opacity: 0; } }
.ms-img { cursor: zoom-in; }
/* тропа на телефоне: вехи-карточки */
.trail-wrap.mobile .ms-label { width: auto; text-align: left; flex-direction: column; align-items: stretch; gap: 0;
  background: var(--surface); border: 1px solid var(--line2); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); }
.trail-wrap.mobile .ms-label::before { content: ''; position: absolute; left: -12px; top: 50%; width: 12px; height: 2px; background: var(--line2); }
.trail-wrap.mobile .ms-label.done { border-color: rgba(248, 116, 24, .55); }
.trail-wrap.mobile .ms-label.done::before { background: var(--orange); }
.trail-wrap.mobile .ms-img { width: 100%; height: auto; aspect-ratio: 16 / 10; border: 0; border-radius: 0; transform: none; box-shadow: none; }
.trail-wrap.mobile .ms-img:hover { transform: none; }
.trail-wrap.mobile .ms-text { padding: 10px 12px 12px; }
.trail-wrap.mobile .ms-label .sum { font-size: 18px; }
.trail-wrap.mobile .ms-label .ttl { font-size: 13.5px; }
.trail-wrap.mobile .ms-label.done .sum::after { content: ' ✓'; color: var(--green); font-size: 15px; }
@media (max-width: 640px) { .trail-card { padding: 18px 14px; } }

.toast-stack { position: fixed; z-index: 100; right: 20px; bottom: 20px; display: grid; gap: 10px; }
.toast { background: linear-gradient(135deg, #1b5fe0, #0f3a9c); color: #fff; border: 1px solid rgba(111, 214, 255, .5); padding: 14px 18px; border-radius: 14px; box-shadow: var(--shadow); font-weight: 700; animation: toastIn .4s ease; max-width: 340px; }
.toast b { color: #ffc28a; }
@keyframes toastIn { from { transform: translateY(20px); opacity: 0; } }
@media (max-width: 640px) { .toast-stack { left: 12px; right: 12px; bottom: 12px; } .toast { max-width: none; } }

.closed-list { display: grid; gap: 10px; }
.closed-item { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 18px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); flex-wrap: wrap; }

.modal-bg { position: fixed; inset: 0; z-index: 90; background: rgba(2, 6, 18, .6); backdrop-filter: blur(4px); display: none; align-items: center; justify-content: center; padding: 20px; }
.modal-bg.open { display: flex; }
.modal { width: min(460px, 100%); background: var(--panel); border: 1px solid var(--line2); border-radius: 20px; padding: 26px; box-shadow: var(--shadow); max-height: 90vh; overflow: auto; color: var(--text); }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.modal-head h3 { margin: 0; }
@media (max-width: 640px) {
  .modal-bg { padding: 0; align-items: flex-end; }
  .modal { border-radius: 20px 20px 0 0; padding: 22px 18px max(22px, env(safe-area-inset-bottom)); }
}

/* Галерея */
.photos { columns: 3 280px; column-gap: 16px; }
.photo { break-inside: avoid; margin-bottom: 16px; border-radius: 14px; overflow: hidden; position: relative; cursor: zoom-in; background: var(--surface); border: 1px solid var(--line); }
.photo img { width: 100%; transition: transform .4s; }
.photo:hover img { transform: scale(1.04); }
.photo figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 30px 14px 12px; background: linear-gradient(transparent, rgba(0, 0, 0, .8)); color: #fff; font-size: 13.5px; font-weight: 600; opacity: 0; transition: .3s; }
.photo:hover figcaption { opacity: 1; }
.photo form { position: absolute; top: 8px; right: 8px; }
@media (max-width: 640px) { .photos { columns: 2; column-gap: 8px; } .photo { margin-bottom: 8px; border-radius: 10px; } .photo figcaption { display: none; } }
.lightbox { position: fixed; inset: 0; z-index: 120; background: rgba(0, 0, 0, .92); display: none; align-items: center; justify-content: center; flex-direction: column; gap: 14px; padding: 20px; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 100%; max-height: 82vh; border-radius: 10px; }
.lightbox .cap { color: #ddd; text-align: center; }
.lightbox .nav-l, .lightbox .nav-r, .lightbox .close { position: absolute; background: rgba(255, 255, 255, .12); border: 0; color: #fff; width: 48px; height: 48px; border-radius: 50%; font-size: 24px; cursor: pointer; }
.lightbox .nav-l { left: 14px; top: 50%; } .lightbox .nav-r { right: 14px; top: 50%; } .lightbox .close { right: 14px; top: 14px; }
.photo-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.photo-strip img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 14px; }
@media (max-width: 640px) { .photo-strip { grid-template-columns: repeat(2, 1fr); gap: 8px; } .photo-strip a:nth-child(3) { display: none; } }

/* Новичкам */
.newbie-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 28px; }
.newbie-grid > * { min-width: 0; }
@media (max-width: 860px) { .newbie-grid { grid-template-columns: 1fr; } }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 10px; overflow: hidden; }
.faq summary { cursor: pointer; padding: 16px 20px; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '⌄'; color: var(--link); transition: .2s; }
.faq details[open] summary::after { transform: rotate(180deg); }
.faq details[open] { border-color: var(--line2); }
.faq .answer { padding: 0 20px 18px; color: var(--text-2); }
.steps { display: grid; gap: 12px; }
.step { display: flex; gap: 14px; padding: 16px; border-radius: 14px; background: var(--row); border: 1px solid var(--line); }
.step .n { min-width: 36px; height: 36px; border-radius: 18px; padding: 0 8px; background: rgba(248, 116, 24, .16); color: var(--orange-text); display: grid; place-items: center; font-weight: 800; flex: none; }
.step b { display: block; margin-bottom: 2px; }
.step span { color: var(--muted); font-size: 14px; }

/* Блог */
.feed { max-width: 760px; margin: 0 auto; display: grid; gap: 24px; }
.feed > * { min-width: 0; }
.post-card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); }
.post-head { display: flex; align-items: center; gap: 12px; padding: 18px 22px 12px; }
.post-head b { display: block; }
.post-head small { color: var(--muted); }
.post-cover { width: 100%; max-height: 560px; object-fit: cover; }
.post-body { padding: 16px 22px; }
.post-body h2 { font-size: 22px; }
.post-text { color: var(--text-2); font-size: 16px; overflow-wrap: break-word; }
.post-text.clamp { max-height: 9.5em; overflow: hidden; position: relative; }
.post-text.clamp::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 3em; background: linear-gradient(transparent, var(--surface)); }
.more-btn { background: none; border: 0; color: var(--link); font: 700 14px var(--body); cursor: pointer; padding: 0; margin-bottom: 8px; }
.post-foot { display: flex; gap: 18px; padding: 12px 22px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; font-weight: 700; align-items: center; }
.comments { padding: 6px 22px 18px; display: grid; gap: 12px; }
.comment { display: flex; gap: 10px; }
.comment .bubble { background: var(--row); border-radius: 14px; padding: 10px 14px; flex: 1; min-width: 0; }
.comment .bubble b { font-size: 14px; }
.comment .bubble small { color: var(--muted); margin-left: 6px; }
.comment .bubble p { margin: 4px 0 0; font-size: 15px; white-space: pre-wrap; overflow-wrap: break-word; }
.comment-form { display: flex; gap: 10px; align-items: flex-start; }
.comment-form textarea { min-height: 46px; }
@media (max-width: 640px) {
  .feed { gap: 16px; }
  .post-card { border-radius: 16px; }
  .post-head, .post-body, .post-foot, .comments { padding-left: 16px; padding-right: 16px; }
  .comment-form > .avatar { display: none; }
}

/* Профиль */
.profile-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 24px; }
.profile-grid > * { min-width: 0; }
@media (max-width: 860px) { .profile-grid { grid-template-columns: 1fr; } }

/* Админка */
.admin-layout { display: grid; grid-template-columns: 230px 1fr; gap: 28px; padding: 32px 0; align-items: start; }
.admin-layout > * { min-width: 0; }
.admin-side { position: sticky; top: 94px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 10px; }
.admin-side a { display: flex; justify-content: space-between; padding: 10px 14px; border-radius: 10px; color: var(--muted); font-weight: 700; font-size: 14.5px; }
.admin-side a:hover { color: var(--text); background: var(--hover); }
.admin-side a.active { background: rgba(42, 116, 255, .18); color: var(--text); }
.admin-side hr { border: 0; border-top: 1px solid var(--line); margin: 8px 6px; }
.admin-side .lbl { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); opacity: .75; padding: 8px 14px 4px; font-weight: 800; }
@media (max-width: 860px) {
  .admin-layout { grid-template-columns: 1fr; gap: 18px; padding: 18px 0; }
  .admin-side { position: static; display: flex; overflow-x: auto; gap: 4px; padding: 6px; scrollbar-width: none; }
  .admin-side a { white-space: nowrap; padding: 8px 12px; }
  .admin-side hr, .admin-side .lbl { display: none; }
}
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.t { width: 100%; border-collapse: collapse; font-size: 14.5px; }
table.t th { text-align: left; color: var(--muted); font-size: 12.5px; text-transform: uppercase; letter-spacing: .06em; padding: 10px 12px; border-bottom: 1px solid var(--line2); white-space: nowrap; }
table.t td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t tr.banned td { opacity: .55; }
.inline { display: inline-flex; gap: 6px; align-items: center; margin: 0; }
.inline select, .inline input { width: auto; padding: 7px 10px; font-size: 13.5px; }
.rows-editor .r { display: grid; grid-template-columns: 120px 1fr auto; gap: 8px; margin-bottom: 8px; }
.item-row { border: 1px solid var(--line); border-radius: 14px; padding: 10px; margin-bottom: 10px; background: var(--row); }
.item-row.is-paid { border-color: rgba(248, 116, 24, .5); background: rgba(248, 116, 24, .06); }
.item-main { display: grid; grid-template-columns: 120px 1fr auto auto; gap: 8px; align-items: center; }
.item-paid { display: none; margin-top: 10px; }
.item-row.is-paid .item-paid { display: block; }
@media (max-width: 640px) { .item-main { grid-template-columns: 100px 1fr; } .item-main .btn { grid-column: span 1; } }
.ms-row { display: grid; grid-template-columns: 64px 110px 1fr 230px auto; gap: 10px; align-items: center; margin-bottom: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--row); }
.ms-thumb { width: 64px; height: 64px; border-radius: 12px; overflow: hidden; background: var(--surface-2); display: grid; place-items: center; color: var(--muted); font-size: 12px; }
.ms-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ms-file { display: grid; gap: 4px; }
@media (max-width: 760px) {
  .ms-row { grid-template-columns: 64px 1fr auto; }
  .ms-row > input[name=ms_title], .ms-row > .ms-file { grid-column: 1 / -1; }
}
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px 14px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--input); }
.checks label { font-weight: 500; display: flex; gap: 8px; align-items: center; margin: 0; cursor: pointer; color: var(--text); }
.thumb { width: 54px; height: 40px; object-fit: cover; border-radius: 8px; background: var(--surface-2); }
.tile { display: block; padding: 22px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); color: var(--text); transition: .2s; }
.tile:hover { border-color: var(--sky); color: var(--text); transform: translateY(-2px); }
.tile b { font: 800 30px var(--head); display: block; color: var(--link); }
.code { font-family: Consolas, monospace; background: var(--input); border: 1px solid var(--line); padding: 2px 8px; border-radius: 6px; font-size: 13.5px; word-break: break-all; }

/* Общая мобильная подгонка */
@media (max-width: 640px) {
  body { font-size: 15.5px; }
  .container { width: calc(100% - 28px); }
  .section { padding: 44px 0; }
  .page-head { padding: 26px 0 8px; }
  .section-head { margin-bottom: 20px; align-items: flex-start; }
  .section-head > .btn, .section-head > .row { width: 100%; }
  .section-head > .row > .btn { flex: 1; }
  .auth-wrap { margin: 24px auto; }
  .auth-wrap .card { padding: 22px 18px; }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv dd { margin-bottom: 8px; }
  .map { height: 240px; }
  .flash { margin-top: 12px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
