/* ---------- tokens ---------- */
:root {
  --bg: #f6f5f2;
  --surface: #ffffff;
  --surface-2: #faf9f7;
  --ink: #17161c;
  --muted: #686772;
  --line: #e7e5df;
  --accent: #5b45f0;
  --accent-ink: #ffffff;
  --accent-soft: #edeaff;
  --gold: #e8a900;
  --gold-soft: #fff6d8;
  --ok: #138a4b;
  --danger: #d23b3b;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(20, 18, 40, 0.05), 0 8px 24px -12px rgba(20, 18, 40, 0.14);
  --shadow-lg: 0 24px 60px -24px rgba(30, 20, 90, 0.35);
  --nav-h: 64px;
  --font: ui-sans-serif, -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, Roboto, 'Helvetica Neue', Arial, sans-serif;
  color-scheme: light;
}
:root[data-theme='dark'] {
  --bg: #0e0e12;
  --surface: #17171d;
  --surface-2: #1c1c24;
  --ink: #f3f2f8;
  --muted: #a3a2b0;
  --line: #2b2b35;
  --accent: #8b7cff;
  --accent-ink: #0e0e12;
  --accent-soft: #25214a;
  --gold: #ffc933;
  --gold-soft: #2f2808;
  --ok: #3dd68c;
  --danger: #ff7070;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px -12px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 24px 60px -24px rgba(0, 0, 0, 0.8);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font: 16px/1.55 var(--font);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
img, video, iframe { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 0.5em; font-weight: 750; }
h1 { font-size: clamp(2.1rem, 5.5vw, 3.6rem); letter-spacing: -0.035em; }
h2 { font-size: clamp(1.55rem, 3.4vw, 2.2rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.tiny { font-size: 0.78rem; }
.center { text-align: center; }
.hide { display: none !important; }
.i { flex: none; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 60%, transparent); outline-offset: 2px; border-radius: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

.container { width: min(1120px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(720px, 100% - 32px); margin-inline: auto; }
.row { display: flex; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.end { justify-content: flex-end; }
.gap { gap: 12px; }
.gap-s { gap: 6px; }
.col { display: flex; flex-direction: column; }
.grow { flex: 1; min-width: 0; }
.stack > * + * { margin-top: 16px; }
.mt { margin-top: 20px; } .mt-l { margin-top: 40px; } .mb0 { margin-bottom: 0; }

/* ---------- buttons & fields ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 650; font-size: 0.95rem; line-height: 1;
  padding: 12px 18px; border-radius: 12px; border: 1px solid transparent;
  background: var(--accent); color: var(--accent-ink); cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease, opacity 0.12s;
  text-decoration: none !important; white-space: nowrap; min-height: 44px;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 18px -8px color-mix(in srgb, var(--accent) 70%, transparent); }
.btn:active { transform: translateY(0); }
.btn[disabled] { opacity: 0.55; pointer-events: none; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { background: var(--surface-2); box-shadow: none; }
.btn.soft { background: var(--accent-soft); color: var(--accent); }
.btn.danger { background: var(--danger); color: #fff; }
.btn.sm { padding: 8px 12px; font-size: 0.85rem; min-height: 36px; border-radius: 10px; }
.btn.lg { padding: 16px 26px; font-size: 1.05rem; border-radius: 14px; }
.btn.block { width: 100%; }
.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px;
  border: 1px solid transparent; background: transparent; color: var(--muted); cursor: pointer;
}
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn.liked { color: #e0334d; }

label.field { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 14px; color: var(--ink); }
.field > span.hint { display: block; font-weight: 400; color: var(--muted); font-size: 0.8rem; margin-top: 4px; }
input[type='text'], input[type='email'], input[type='password'], input[type='url'], input[type='number'], input[type='search'], select, textarea {
  display: block; width: 100%; font: inherit; font-size: 1rem; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 11px 14px;
  margin-top: 6px; min-height: 44px; transition: border-color 0.12s, box-shadow 0.12s;
}
textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
input[type='file'] { margin-top: 6px; font: inherit; font-size: 0.9rem; width: 100%; }
input[type='checkbox'] { width: 18px; height: 18px; accent-color: var(--accent); margin: 0; }
.check { display: flex; align-items: center; gap: 10px; font-size: 0.92rem; font-weight: 500; margin-bottom: 14px; }
.form-error { color: var(--danger); font-size: 0.88rem; min-height: 1.2em; margin: 4px 0 10px; }

/* ---------- surfaces ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card.pad { padding: 20px; }
.card.flat { box-shadow: none; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px;
  font-size: 0.82rem; font-weight: 600; background: var(--surface); border: 1px solid var(--line); color: var(--muted); cursor: pointer; white-space: nowrap;
}
.chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.01em; background: var(--accent-soft); color: var(--accent); }
.badge.gold { background: var(--gold-soft); color: color-mix(in srgb, var(--gold) 70%, var(--ink)); }
.badge.ok { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); }
.badge.off { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.divider { height: 1px; background: var(--line); border: 0; margin: 20px 0; }

.avatar { --s: 36px; width: var(--s); height: var(--s); border-radius: 50%; overflow: hidden; display: inline-grid; place-items: center; flex: none; font-size: calc(var(--s) * 0.38); font-weight: 700; color: #fff; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar span { width: 100%; height: 100%; display: grid; place-items: center; }
.avatar.staff { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--gold); }

/* ---------- top nav ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40; height: var(--nav-h);
  background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar .container { height: 100%; display: flex; align-items: center; gap: 20px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; letter-spacing: -0.02em; color: var(--ink); text-decoration: none !important; }
.logo-mark { width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg, var(--accent), #ff7ab6); display: grid; place-items: center; color: #fff; font-size: 0.95rem; font-weight: 800; }
.navlinks { display: flex; gap: 4px; margin-left: 8px; }
.navlinks a { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 12px; font-weight: 600; font-size: 0.95rem; color: var(--muted); text-decoration: none; }
.navlinks a:hover { background: var(--surface-2); color: var(--ink); }
.navlinks a.on { background: var(--ink); color: var(--bg); }
.topbar .spacer { flex: 1; }
.menu-wrap { position: relative; }
.menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 6px; z-index: 50; }
.menu a, .menu button { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 10px 12px; border-radius: 10px; font: inherit; font-size: 0.92rem; font-weight: 550; color: var(--ink); background: none; border: 0; cursor: pointer; text-decoration: none; }
.menu a:hover, .menu button:hover { background: var(--surface-2); text-decoration: none; }
.menu .who { padding: 10px 12px 8px; }

.bottombar { display: none; }
@media (max-width: 760px) {
  .navlinks { display: none; }
  .bottombar {
    display: grid; grid-template-columns: repeat(var(--n, 3), 1fr); position: fixed; inset: auto 0 0 0; z-index: 40;
    background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(14px);
    border-top: 1px solid var(--line); padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
  }
  .bottombar a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; font-size: 0.7rem; font-weight: 650; color: var(--muted); text-decoration: none; border-radius: 12px; }
  .bottombar a.on { color: var(--accent); }
  body.has-bottom { padding-bottom: 76px; }
}

/* ---------- demo banner & toasts ---------- */
.demo-banner { background: var(--ink); color: var(--bg); font-size: 0.82rem; padding: 8px 16px; display: flex; gap: 12px; justify-content: center; align-items: center; flex-wrap: wrap; text-align: center; }
.demo-banner button { font: inherit; font-size: 0.78rem; font-weight: 700; background: transparent; color: inherit; border: 1px solid color-mix(in srgb, var(--bg) 40%, transparent); border-radius: 8px; padding: 3px 10px; cursor: pointer; }
#toasts { position: fixed; z-index: 100; left: 50%; transform: translateX(-50%); bottom: 90px; display: grid; gap: 8px; width: min(92vw, 420px); pointer-events: none; }
.toast { background: var(--ink); color: var(--bg); padding: 12px 16px; border-radius: 12px; font-size: 0.92rem; font-weight: 550; box-shadow: var(--shadow-lg); animation: up 0.25s ease both; }
.toast.err { background: var(--danger); color: #fff; }
.toast.out { opacity: 0; transition: opacity 0.35s; }
@keyframes up { from { opacity: 0; transform: translateY(10px); } }

/* ---------- modal ---------- */
.modal-wrap { position: fixed; inset: 0; z-index: 90; background: rgba(10, 8, 24, 0.55); backdrop-filter: blur(3px); display: grid; place-items: center; padding: 16px; overflow: auto; animation: fade 0.15s ease; }
.modal { position: relative; width: min(460px, 100%); background: var(--surface); border-radius: 20px; padding: 26px; box-shadow: var(--shadow-lg); border: 1px solid var(--line); max-height: calc(100vh - 32px); overflow: auto; }
.modal.wide { width: min(640px, 100%); }
.modal-x { position: absolute; right: 12px; top: 12px; width: 36px; height: 36px; border-radius: 10px; border: 0; background: transparent; color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.modal-x:hover { background: var(--surface-2); }
@keyframes fade { from { opacity: 0; } }

/* ---------- video ---------- */
.video { position: relative; aspect-ratio: 16/9; width: 100%; background: #0b0b10; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.video iframe, .video video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.video-empty { display: grid; place-items: center; color: #9b9aa8; text-align: center; align-content: center; gap: 4px; }
.video-empty span { width: 54px; height: 54px; border-radius: 50%; background: rgba(255, 255, 255, 0.08); display: grid; place-items: center; margin: 0 auto 8px; }
.video-empty p { margin: 0; font-size: 0.9rem; }

/* ---------- landing ---------- */
.pub-header { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.pub-header .container { height: var(--nav-h); display: flex; align-items: center; gap: 12px; }
.hero { padding: clamp(40px, 8vw, 96px) 0 clamp(28px, 5vw, 56px); text-align: center; position: relative; overflow: hidden; }
.hero::before { content: ''; position: absolute; inset: -20% -10% auto; height: 520px; z-index: -1; background: radial-gradient(60% 60% at 50% 0%, color-mix(in srgb, var(--accent) 20%, transparent), transparent 70%); }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; font-size: 0.82rem; font-weight: 650; margin-bottom: 22px; box-shadow: var(--shadow); }
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 25%, transparent); }
.hero p.lead { font-size: clamp(1.05rem, 2.2vw, 1.28rem); color: var(--muted); max-width: 640px; margin: 0 auto 28px; }
.hero-media { margin-top: clamp(28px, 5vw, 48px); border-radius: 22px; padding: 10px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg); }
.hero-media .video, .hero-media img { border-radius: 14px; box-shadow: none; }
.hero-media img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.proof { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 28px; margin-top: 22px; color: var(--muted); font-size: 0.92rem; font-weight: 550; }
.proof b { color: var(--ink); }
section.block { padding: clamp(36px, 6vw, 72px) 0; }
section.block { scroll-margin-top: 72px; }
.sec-head { max-width: 640px; margin: 0 auto 36px; text-align: center; }
.sec-head p { color: var(--muted); }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, 1fr); } .g3 { grid-template-columns: repeat(3, 1fr); } .g4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .g3, .g4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .g2, .g3, .g4 { grid-template-columns: 1fr; } }
.benefit { padding: 22px; }
.benefit .ico { width: 44px; height: 44px; border-radius: 13px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; margin-bottom: 14px; }
.benefit h3 { margin-bottom: 6px; } .benefit p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.gallery img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 14px; border: 1px solid var(--line); }
@media (max-width: 600px) { .gallery { grid-template-columns: 1fr; } }
.stars { color: var(--gold); display: inline-flex; gap: 2px; }
.stars .off { color: var(--line); }
.review { padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.review p { margin: 0; font-size: 1rem; }
.pricing { max-width: 440px; margin: 0 auto; padding: 32px; text-align: center; position: relative; border: 2px solid var(--accent); }
.price { font-size: 3.4rem; font-weight: 800; letter-spacing: -0.04em; line-height: 1; }
.price small { font-size: 1rem; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.ticks { list-style: none; padding: 0; margin: 22px 0; text-align: left; display: grid; gap: 10px; }
.ticks li { display: flex; gap: 10px; align-items: flex-start; font-weight: 550; }
.ticks .i { color: var(--ok); margin-top: 2px; }
details.faq { border-bottom: 1px solid var(--line); padding: 16px 0; }
details.faq summary { cursor: pointer; font-weight: 650; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
details.faq summary::after { content: '+'; font-size: 1.3rem; line-height: 1; color: var(--muted); }
details.faq[open] summary::after { content: '–'; }
details.faq p { margin: 10px 0 0; color: var(--muted); }
.course-teaser { overflow: hidden; }
.course-teaser img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.course-teaser .pad { padding: 16px 18px 18px; }
footer.site { border-top: 1px solid var(--line); padding: 36px 0 48px; color: var(--muted); font-size: 0.9rem; }

/* ---------- auth ---------- */
.auth-wrap { min-height: calc(100vh - var(--nav-h)); display: grid; place-items: center; padding: 28px 16px; }
.auth-card { width: min(440px, 100%); padding: 32px; }
.demo-who { display: grid; gap: 8px; margin-top: 18px; padding-top: 18px; border-top: 1px dashed var(--line); }

/* ---------- app pages ---------- */
.page { padding: 28px 0 56px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 0; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
@media (max-width: 960px) { .layout { grid-template-columns: minmax(0, 1fr); } .side { display: none; } }
.side .card { margin-bottom: 16px; }
.cats { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; margin-bottom: 14px; }
.cats::-webkit-scrollbar { display: none; }
.composer { padding: 14px 16px; display: flex; gap: 12px; align-items: center; cursor: text; margin-bottom: 16px; }
.composer .fake { flex: 1; color: var(--muted); background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 11px 18px; }
.post { padding: 18px 20px; margin-bottom: 14px; display: block; color: inherit; text-decoration: none !important; transition: border-color 0.12s, transform 0.12s; }
a.post:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); transform: translateY(-1px); }
.post.staff { border-color: color-mix(in srgb, var(--gold) 65%, var(--line)); background: linear-gradient(180deg, var(--gold-soft), var(--surface) 70%); }
.post.pinned::before { content: ''; }
.post-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.post-meta .name { font-weight: 700; font-size: 0.95rem; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.post h3 { margin: 0 0 6px; font-size: 1.12rem; }
.post .excerpt { color: var(--muted); margin: 0 0 12px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post-foot { display: flex; align-items: center; gap: 18px; color: var(--muted); font-size: 0.88rem; font-weight: 600; }
.post-foot .stat { display: inline-flex; align-items: center; gap: 6px; }
.post-body { font-size: 1.05rem; line-height: 1.65; overflow-wrap: anywhere; }
.comment { display: flex; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); }
.comment .bubble { flex: 1; min-width: 0; }
.comment .by { font-weight: 700; font-size: 0.9rem; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.comment p { margin: 2px 0 0; overflow-wrap: anywhere; }
.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty .i { margin: 0 auto 10px; opacity: 0.6; }

/* paywall */
.lock-card { text-align: center; padding: 40px 24px; max-width: 520px; margin: 40px auto; }
.lock-ico { width: 60px; height: 60px; border-radius: 18px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; margin: 0 auto 18px; }

/* classroom */
.course-card { overflow: hidden; display: flex; flex-direction: column; color: inherit; text-decoration: none !important; transition: transform 0.12s, border-color 0.12s; }
a.course-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.course-card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.course-card .pad { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.course-card h3 { margin: 0; }
.progress { height: 7px; border-radius: 99px; background: var(--line); overflow: hidden; }
.progress > i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), #ff7ab6); border-radius: 99px; }
.lesson-layout { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 24px; align-items: start; }
@media (max-width: 960px) { .lesson-layout { grid-template-columns: minmax(0, 1fr); } .lesson-layout .outline { order: 2; } }
.outline { position: sticky; top: calc(var(--nav-h) + 16px); max-height: calc(100vh - var(--nav-h) - 32px); overflow: auto; padding: 8px; }
@media (max-width: 960px) { .outline { position: static; max-height: none; } }
.outline h4 { font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin: 14px 10px 6px; font-weight: 700; }
.outline a { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; color: var(--ink); font-weight: 550; font-size: 0.93rem; text-decoration: none; }
.outline a:hover { background: var(--surface-2); }
.outline a.on { background: var(--accent-soft); color: var(--accent); }
.dot-state { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; flex: none; color: #fff; }
.dot-state.done { background: var(--ok); border-color: var(--ok); }
.dot-state.lock { border: 0; color: var(--muted); }
.file { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); text-decoration: none !important; }
.file:hover { border-color: var(--accent); }
.file .ico { width: 38px; height: 38px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }

/* showcase */
.masonry { columns: 3 260px; column-gap: 16px; }
.tile { break-inside: avoid; margin-bottom: 16px; display: block; overflow: hidden; color: inherit; text-decoration: none !important; }
a.tile:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.tile .media { background: #0b0b10; position: relative; }
.tile .media img, .tile .media video { width: 100%; height: auto; display: block; }
.tile .media .vid-ico { position: absolute; inset: auto 10px 10px auto; background: rgba(0, 0, 0, 0.6); color: #fff; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; }
.tile .file-ph { aspect-ratio: 4/3; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.tile .pad { padding: 12px 14px 14px; }
.tile h3 { font-size: 1rem; margin: 0 0 8px; }
.show-media img, .show-media video { width: 100%; max-height: 72vh; object-fit: contain; background: #0b0b10; border-radius: var(--radius); }

/* admin */
.tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 20px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { padding: 9px 16px; border-radius: 12px; font-weight: 650; font-size: 0.92rem; color: var(--muted); white-space: nowrap; text-decoration: none; border: 1px solid transparent; }
.tabs a:hover { background: var(--surface-2); color: var(--ink); }
.tabs a.on { background: var(--ink); color: var(--bg); }
.stat-card { padding: 18px; }
.stat-card .n { font-size: 2rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.stat-card .l { color: var(--muted); font-size: 0.85rem; font-weight: 600; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.tbl th { text-align: left; font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.scroll-x { overflow-x: auto; }
.item-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.item-row + .item-row { margin-top: 8px; }
.item-row .t { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mod-box { border: 1px solid var(--line); border-radius: 14px; padding: 14px; background: var(--surface-2); margin-bottom: 14px; }
.thumb { width: 72px; height: 48px; border-radius: 10px; object-fit: cover; background: var(--line); }
.kv { display: grid; grid-template-columns: 1fr auto; gap: 6px 14px; }
.price-input { display: flex; gap: 10px; align-items: stretch; }
.price-input > * { flex: 1; }
.note { padding: 14px 16px; border-radius: 12px; background: var(--accent-soft); color: var(--ink); font-size: 0.9rem; }
.note.warn { background: var(--gold-soft); }

@media (max-width: 760px) {
  .page { padding-top: 18px; }
  .hide-m { display: none !important; }
  .modal { padding: 22px 18px; }
  .demo-banner { font-size: 0.74rem; padding: 6px 10px; gap: 6px 10px; }
  .demo-banner button { font-size: 0.72rem; padding: 2px 8px; }
  #toasts { bottom: 96px; }
}
