/* ==========================================================================
   Сближение++ · «Маскарад» — pages (everything except the table)
   ========================================================================== */

:root {
  --nav-h: 68px;
  --tabbar-h: 0px;
  --browser-bottom: 0px;
  --page-x: clamp(16px, 4vw, 44px);
  --wide: min(1680px, calc(100vw - 48px));
  --hair: linear-gradient(90deg, transparent, var(--line-2), transparent);
  --ok-ink: #7be0ae;
  --shadow-3: 0 30px 80px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(217, 183, 122, 0.08);
  --veil: rgba(7, 6, 10, 0.72);
  --img-ink: #f5ede1;
}
html[data-theme="light"] {
  --ok-ink: #1f8a57;
  --shadow-3: 0 30px 70px rgba(60, 36, 20, 0.18), 0 0 0 1px rgba(92, 60, 30, 0.08);
  --veil: rgba(244, 237, 226, 0.7);
}
html.theme-swap *, html.theme-swap *::before, html.theme-swap *::after {
  transition: background-color 360ms ease, color 360ms ease, border-color 360ms ease, box-shadow 360ms ease !important;
}

body { min-height: 100vh; display: flex; flex-direction: column; overflow-x: hidden; }
body > main { flex: 1 0 auto; }
h1 em, h2 em, h3 em { font-style: italic; font-weight: 500; }
a:where(:not(.btn)) { transition: color var(--dur-1) var(--ease); }
.link { color: var(--gold); font-weight: 600; }
.link:hover { color: var(--gold-2); }
html[data-theme="light"] .link:hover { color: var(--cran); }
.ico { width: 20px; height: 20px; flex: none; }
.skip-link { position: fixed; left: 12px; top: -60px; z-index: 3000; padding: 10px 16px; border-radius: var(--r-sm); background: var(--surface-solid); color: var(--ink); box-shadow: var(--shadow-2); }
.skip-link:focus { top: 12px; }
.num { font-variant-numeric: lining-nums tabular-nums; }
h1, h2, h3, .display { font-variant-numeric: lining-nums; }
.btn .ico { width: 18px; height: 18px; }
.btn-lg .ico { width: 20px; height: 20px; }
.btn-danger-solid { --btn-bg: linear-gradient(135deg, #ff6b80, #c42a3e); box-shadow: 0 8px 24px rgba(196, 42, 62, 0.35); }
.btn-block { width: 100%; }
.btn.is-busy { pointer-events: none; opacity: 0.7; }
.btn.is-busy::after { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.text-btn { background: none; border: 0; padding: 0; color: var(--gold); font-weight: 700; cursor: pointer; }
.text-btn:hover { color: var(--gold-2); }
.text-btn.danger { color: var(--danger); }

/* ---------- topbar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 200;
  height: calc(var(--nav-h) + env(safe-area-inset-top));
  padding-top: env(safe-area-inset-top);
  background:
    linear-gradient(#07060a, #07060a) top / 100% env(safe-area-inset-top) no-repeat,
    color-mix(in srgb, var(--bg) 70%, transparent);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid var(--line-soft);
  transition: background var(--dur-3) var(--ease), border-color var(--dur-3) var(--ease), box-shadow var(--dur-3) var(--ease);
}
.topbar.is-scrolled { box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25); border-bottom-color: var(--line); }
.page-home .topbar:not(.is-scrolled) {
  background:
    linear-gradient(#07060a, #07060a) top / 100% env(safe-area-inset-top) no-repeat,
    linear-gradient(180deg, rgba(7, 6, 10, 0.72), transparent);
  border-bottom-color: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
html[data-theme="light"] .page-home .topbar:not(.is-scrolled) { background: linear-gradient(180deg, rgba(7, 6, 10, 0.55), transparent); }
html[data-theme="light"] .page-home .topbar:not(.is-scrolled) :is(.navlink, .icon-btn, .avatar-btn, .nav-login) { color: #f5ede1; }
html[data-theme="light"] .page-home .topbar:not(.is-scrolled) .spark-chip { color: #f1d9a6; background: rgba(0, 0, 0, 0.3); }
.topbar-in {
  height: 100%;
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0 var(--page-x);
  display: flex;
  align-items: center;
  gap: 28px;
}
.brand { display: inline-flex; align-items: center; flex: none; }
.brand img { height: 34px; width: auto; filter: drop-shadow(0 2px 10px rgba(217, 183, 122, 0.18)); }
html[data-theme="light"] .brand img { filter: brightness(0.78) saturate(1.3) drop-shadow(0 1px 0 rgba(255, 255, 255, 0.6)); }
html[data-theme="light"] .page-home .topbar:not(.is-scrolled) .brand img { filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.4)); }
.navlinks { display: flex; align-items: center; gap: 2px; flex: 1; min-width: 0; }
.navlink {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 40px;
  padding: 0 14px;
  border-radius: var(--r-pill);
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.navlink:hover { color: var(--ink); background: var(--line-soft); }
.navlink.is-on { color: var(--ink); }
.navlink.is-on::after { content: ""; position: absolute; left: 50%; bottom: 3px; width: 18px; height: 2px; margin-left: -9px; border-radius: 2px; background: var(--grad-gold); box-shadow: 0 0 10px rgba(217, 183, 122, 0.7); }
.navlink-play { color: var(--gold-2); margin-right: 6px; box-shadow: 0 0 0 1px var(--line-2) inset; background: linear-gradient(180deg, rgba(217, 183, 122, 0.12), rgba(217, 183, 122, 0.03)); }
.navlink-play .ico { width: 14px; height: 14px; }
.navlink-play:hover { color: var(--gold-2); background: rgba(217, 183, 122, 0.16); box-shadow: 0 0 0 1px var(--gold) inset, 0 6px 24px rgba(217, 183, 122, 0.2); }
html[data-theme="light"] .navlink-play { color: var(--cran-2); }
.navlink-badge, .tab-badge {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--grad-cran);
  color: #fff;
  font-size: 10.5px;
  font-weight: 800;
  box-shadow: 0 0 12px rgba(229, 72, 107, 0.6);
}
.nav-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.spark-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 14px 0 11px;
  border-radius: var(--r-pill);
  background: linear-gradient(180deg, rgba(217, 183, 122, 0.16), rgba(217, 183, 122, 0.05));
  box-shadow: 0 0 0 1px rgba(217, 183, 122, 0.32) inset;
  color: var(--gold-2);
  font-weight: 800;
  font-size: 13.5px;
  font-variant-numeric: tabular-nums;
}
.spark-chip .ico { width: 15px; height: 15px; color: var(--gold); filter: drop-shadow(0 0 6px rgba(243, 184, 87, 0.8)); }
.spark-chip:hover { box-shadow: 0 0 0 1px var(--gold) inset, 0 6px 20px rgba(217, 183, 122, 0.2); }
.spark-chip.is-bump { animation: bump 600ms var(--ease-spring); }
html[data-theme="light"] .spark-chip { color: var(--gold-deep); }
@keyframes bump { 30% { transform: scale(1.12); } }
.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
  transition: background var(--dur-1) var(--ease), color var(--dur-1) var(--ease), transform var(--dur-2) var(--ease);
}
.icon-btn:hover { background: var(--line-soft); color: var(--ink); }
.theme-toggle .ico { width: 19px; height: 19px; }
.theme-toggle .theme-moon { display: none; }
html[data-theme="light"] .theme-toggle .theme-sun { display: none; }
html[data-theme="light"] .theme-toggle .theme-moon { display: inline; }
.theme-toggle:active { transform: rotate(-30deg) scale(0.92); }

.menu { position: relative; }
.avatar-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 10px 0 5px;
  border: 0;
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--ink);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}
.avatar-btn:hover, .menu.is-open .avatar-btn { background: var(--line-soft); }
.avatar-name { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar-caret { width: 16px; height: 16px; color: var(--muted); transition: transform var(--dur-2) var(--ease); }
.menu.is-open .avatar-caret { transform: rotate(180deg); }
.menu-pop {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: 260px;
  padding: 8px;
  border-radius: var(--r-lg);
  background: var(--surface-solid);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-3);
  transform-origin: top right;
  animation: pop-in 220ms var(--ease) both;
}
.menu-pop a, .menu-pop button {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--r-sm);
  background: none;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}
.menu-pop a:hover, .menu-pop button:hover, .menu-pop a:focus-visible { background: var(--line-soft); color: var(--ink); }
.menu-pop .ico { width: 18px; height: 18px; color: var(--gold); }
.menu-head { padding: 10px 12px 12px; margin-bottom: 6px; border-bottom: 1px solid var(--line-soft); }
.menu-head b { display: flex; align-items: center; gap: 6px; font-size: 15px; }
.menu-head small { color: var(--muted); font-size: 12.5px; }
.menu-form { margin: 6px 0 0; padding-top: 6px; border-top: 1px solid var(--line-soft); }
.menu-form button { color: var(--muted); }
@keyframes pop-in { from { opacity: 0; transform: translateY(-6px) scale(0.97); } to { opacity: 1; transform: none; } }

.staff {
  display: inline-block;
  width: 20px;
  height: 20px;
  flex: none;
  vertical-align: -3px;
  background: var(--gold);
  filter: drop-shadow(0 0 8px rgba(217, 183, 122, 0.55));
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 2.5 20 5.7v6c0 4.9-3.4 8.4-8 9.8-4.6-1.4-8-4.9-8-9.8v-6z M10.6 15.4l6-6-1.4-1.4-4.6 4.6-2.2-2.2-1.4 1.4z' fill-rule='evenodd'/></svg>") center / contain no-repeat;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 2.5 20 5.7v6c0 4.9-3.4 8.4-8 9.8-4.6-1.4-8-4.9-8-9.8v-6z M10.6 15.4l6-6-1.4-1.4-4.6 4.6-2.2-2.2-1.4 1.4z' fill-rule='evenodd'/></svg>") center / contain no-repeat;
}
.staff-root {
  width: 22px;
  height: 22px;
  background: var(--gold-2);
  filter: drop-shadow(0 0 10px rgba(241, 217, 166, 0.7));
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M3 8.4 7.4 11.2 12 4l4.6 7.2L21 8.4V20H3z'/></svg>") center / contain no-repeat;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M3 8.4 7.4 11.2 12 4l4.6 7.2L21 8.4V20H3z'/></svg>") center / contain no-repeat;
}
.staff-admin { background: var(--gold); filter: drop-shadow(0 0 8px rgba(217, 183, 122, 0.65)); }
.staff-mod { background: var(--ok); filter: drop-shadow(0 0 8px rgba(95, 207, 152, 0.45)); }
.pf-name .staff { width: 28px; height: 28px; vertical-align: 0; }
.pf-name .staff-root { width: 30px; height: 30px; }
.menu-head .staff { width: 16px; height: 16px; }

/* ---------- mobile tab bar ---------- */

.tabbar { display: none; }
@media (max-width: 900px) {
  :root { --nav-h: 60px; --tabbar-h: 68px; }
  .navlinks, .avatar-name, .avatar-caret, .nav-login { display: none; }
  .topbar-in { gap: 12px; }
  .brand img { height: 28px; }
  .nav-right { gap: 6px; }
  .spark-chip { height: 34px; padding: 0 11px 0 9px; }
  .avatar-btn { padding: 0 3px; height: 40px; }
  body:not(.theme-room) { padding-bottom: calc(var(--tabbar-h) + var(--browser-bottom) + env(safe-area-inset-bottom)); }
  body:not(.theme-room) .footer { margin-bottom: 8px; }
  body:not(.theme-room) .tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: var(--browser-bottom);
    z-index: 210;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
    align-items: end;
    height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
    padding: 0 6px env(safe-area-inset-bottom);
    background: var(--bg);
    border-top: 1px solid var(--line);
  }
  .tab {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    height: var(--tabbar-h);
    color: var(--muted);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.02em;
  }
  .tab .ico { width: 22px; height: 22px; }
  .tab.is-on { color: var(--ink); }
  .tab.is-on .ico { color: var(--gold); filter: drop-shadow(0 0 8px rgba(217, 183, 122, 0.55)); }
  .tab-play { color: var(--gold-2); }
  .tab-play-disc {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--grad-gold);
    color: #1b1206;
    box-shadow: 0 6px 16px rgba(217, 183, 122, 0.35);
  }
  .tab-play-disc .ico { width: 14px; height: 14px; margin-left: 1px; }
  .tab-badge { position: absolute; top: 8px; left: 50%; margin-left: 6px; min-width: 16px; height: 16px; font-size: 9.5px; }
}
@media (max-width: 420px) {
  .nav-register { padding: 0 12px; }
}

/* ---------- toasts ---------- */

.toasts {
  position: fixed;
  top: calc(var(--nav-h) + 14px);
  right: 18px;
  z-index: 1500;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(420px, calc(100vw - 28px));
  pointer-events: none;
}
.toast-card {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 14px 14px 16px;
  border-radius: var(--r-md);
  background: var(--surface-solid);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-3);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
  position: relative;
  overflow: hidden;
  animation: toast-in 420ms var(--ease) both;
}
.toast-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--gold); }
.toast-card.is-error::before { background: var(--danger); }
.toast-card.is-ok::before { background: var(--ok); }
.toast-card > .ico { width: 18px; height: 18px; margin-top: 1px; color: var(--gold); }
.toast-card.is-error > .ico { color: var(--danger); }
.toast-card.is-ok > .ico { color: var(--ok); }
.toast-card > span { flex: 1; }
.toast-x { border: 0; background: none; color: var(--muted); font-size: 20px; line-height: 1; cursor: pointer; padding: 0 2px; }
.toast-x:hover { color: var(--ink); }
.toast-card.is-leaving { animation: toast-out 300ms var(--ease) both; }
@keyframes toast-in { from { opacity: 0; transform: translateX(24px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateX(24px); } }
@media (max-width: 900px) {
  .toasts { top: auto; bottom: calc(var(--tabbar-h) + 14px + var(--browser-bottom) + env(safe-area-inset-bottom)); left: 14px; right: 14px; width: auto; }
}

/* ---------- footer ---------- */

.footer { position: relative; margin-top: 40px; }
.footer::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: var(--hair); }
.footer-in {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 32px var(--page-x) 40px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px 36px;
}
.footer-brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--display); font-size: 20px; font-weight: 600; color: var(--ink); }
.footer-links { display: flex; gap: 22px; font-size: 13.5px; font-weight: 600; color: var(--muted); }
.footer-links a:hover { color: var(--ink); }
.footer-note { flex-basis: 100%; max-width: 70ch; color: var(--faint); font-size: 12.5px; }
html[data-theme="light"] .footer-note { color: var(--muted); }

/* ---------- page primitives ---------- */

.page { width: 100%; max-width: var(--wide); margin: 0 auto; padding: clamp(28px, 5vw, 56px) var(--page-x) clamp(48px, 7vw, 96px); }
.page-narrow { max-width: 760px; }
.page-mid { max-width: var(--wide); }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px 32px; margin-bottom: clamp(24px, 4vw, 44px); }
.page-head h1 { margin-top: 10px; }
.page-head .lede { margin-top: 14px; }
.page-head-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.page-head-actions .btn,
.spk-hero-actions .btn,
.page-head-actions .spark-hold,
.spk-hero-actions .spark-hold {
  min-height: 44px;
  height: 44px;
  padding: 0 20px;
  box-sizing: border-box;
}
.spark-hold {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: var(--r-pill);
  background:
    radial-gradient(120% 140% at 12% 0%, rgba(243, 184, 87, 0.38), transparent 52%),
    linear-gradient(180deg, rgba(217, 183, 122, 0.2), rgba(217, 183, 122, 0.06));
  box-shadow: 0 0 0 1px rgba(243, 184, 87, 0.5) inset, 0 10px 28px rgba(217, 183, 122, 0.18);
  color: var(--gold-2);
  font-weight: 800;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  pointer-events: none;
  user-select: none;
}
.spark-hold .ico {
  width: 16px;
  height: 16px;
  flex: none;
  display: block;
  color: var(--gold);
  filter: drop-shadow(0 0 8px rgba(243, 184, 87, 0.85));
}
.spark-hold b {
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
  display: block;
  margin: 0;
  transform: none;
}
.spark-hold small {
  display: block;
  margin: 0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1;
  color: var(--gold);
  opacity: 0.88;
}
.spk-hero-actions .spark-hold {
  background:
    radial-gradient(120% 140% at 12% 0%, rgba(243, 184, 87, 0.42), transparent 55%),
    rgba(10, 8, 12, 0.42);
  box-shadow: 0 0 0 1px rgba(243, 184, 87, 0.55) inset, 0 12px 32px rgba(0, 0, 0, 0.28);
  color: #f3d9a0;
}
.lede { max-width: 62ch; color: var(--ink-2); font-size: clamp(15.5px, 1.3vw, 17.5px); line-height: 1.6; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; }
.eyebrow.with-line::before { content: ""; width: 26px; height: 1px; background: currentColor; opacity: 0.7; }
.section { margin-top: clamp(44px, 7vw, 88px); }
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; margin-bottom: 22px; }
.section-head h2 { margin-top: 8px; }
.section-head .count { font-family: var(--sans); font-size: 14px; font-weight: 700; color: var(--muted); margin-left: 10px; letter-spacing: 0; }
.more-link { display: inline-flex; align-items: center; gap: 6px; color: var(--gold); font-weight: 700; font-size: 14px; }
.more-link .ico { width: 16px; height: 16px; transition: transform var(--dur-2) var(--ease); }
.more-link:hover .ico { transform: translateX(3px); }
html[data-theme="light"] .more-link { color: var(--cran-2); }

.surface {
  position: relative;
  background: var(--grad-surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-1);
}
.surface-pad { padding: clamp(18px, 2.4vw, 28px); }
.surface-glass { backdrop-filter: blur(var(--glass-blur)) saturate(1.2); -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.2); }
.gold-edge::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(160deg, rgba(241, 217, 166, 0.55), transparent 30%, transparent 70%, rgba(217, 183, 122, 0.35));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
}
.empty-state {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: clamp(28px, 5vw, 48px) 24px;
  text-align: center;
  color: var(--ink-2);
}
.empty-state img { width: min(220px, 60%); aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r-md); opacity: 0.9; mask: radial-gradient(closest-side, #000 60%, transparent); -webkit-mask: radial-gradient(closest-side, #000 60%, transparent); }
.empty-state h3 { font-size: 24px; }
.empty-state p { max-width: 46ch; color: var(--muted); }
.empty-inline { padding: 18px; border-radius: var(--r-md); border: 1px dashed var(--line-2); color: var(--muted); text-align: center; font-size: 14px; }

.js [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity 800ms var(--ease), transform 800ms var(--ease); }
.js [data-reveal].is-in { opacity: 1; transform: none; }
.stagger > * { animation: rise-in 700ms var(--ease) both; }
.stagger > *:nth-child(2) { animation-delay: 60ms; }
.stagger > *:nth-child(3) { animation-delay: 120ms; }
.stagger > *:nth-child(4) { animation-delay: 180ms; }
.stagger > *:nth-child(5) { animation-delay: 240ms; }
.stagger > *:nth-child(6) { animation-delay: 300ms; }
.stagger > *:nth-child(n + 7) { animation-delay: 340ms; }

/* chips extra */
.chip .ico { width: 14px; height: 14px; }
.chip-ok { color: var(--ok-ink); background: rgba(95, 207, 152, 0.12); box-shadow: 0 0 0 1px rgba(95, 207, 152, 0.4) inset; }
.chip-dark { color: #f5ede1; background: rgba(7, 6, 10, 0.55); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14) inset; backdrop-filter: blur(8px); }
.chip-adult { color: #fff; background: linear-gradient(135deg, rgba(229, 72, 107, 0.85), rgba(110, 16, 48, 0.9)); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18) inset; }
html[data-theme="light"] .chip-cran { color: var(--cran-2); background: rgba(184, 40, 76, 0.1); }
html[data-theme="light"] .chip-gold { color: var(--gold-deep); background: rgba(156, 116, 56, 0.12); }

/* ---------- forms ---------- */

.form-stack { display: grid; gap: 18px; }
.field-wrap { display: grid; gap: 7px; }
.field-wrap > .label { margin: 0; }
.field-hint { font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.check-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--r-md);
  background: var(--field);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: border-color var(--dur-2) var(--ease), background var(--dur-2) var(--ease);
}
.check-row:hover { border-color: var(--line-2); }
.check-row:has(input:checked) { border-color: rgba(229, 72, 107, 0.5); background: linear-gradient(180deg, rgba(229, 72, 107, 0.08), transparent), var(--field); }
.check-row input { margin-top: 1px; }
.check-row b { display: block; font-size: 14.5px; font-weight: 700; color: var(--ink); }
.check-row small { display: block; margin-top: 2px; font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.pretty-native { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; }
.pretty-wrap { position: relative; }
.pretty-btn {
  width: 100%;
  min-height: 46px;
  padding: 10px 40px 10px 14px;
  border: 1px solid rgba(217, 183, 122, 0.22);
  border-radius: var(--r-sm);
  background:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' fill='none' stroke='%23d9b77a' stroke-width='1.6'/></svg>") no-repeat right 14px center,
    linear-gradient(180deg, rgba(217, 183, 122, 0.08), transparent 70%),
    var(--surface-solid);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  font-weight: 600;
}
.pretty-wrap.open .pretty-btn, .pretty-btn:focus-visible { border-color: var(--gold); outline: none; box-shadow: 0 0 0 4px rgba(217, 183, 122, 0.14); }
.pretty-list {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 50;
  display: none;
  margin: 0;
  padding: 6px;
  list-style: none;
  border-radius: var(--r-md);
  background: var(--surface-solid);
  border: 1px solid rgba(217, 183, 122, 0.28);
  box-shadow: var(--shadow-3), 0 18px 40px rgba(0, 0, 0, 0.45);
  max-height: 280px;
  overflow: auto;
}
.pretty-wrap.open .pretty-list { display: block; animation: pop-in 180ms var(--ease) both; }
.pretty-list li { padding: 10px 12px; border-radius: 10px; cursor: pointer; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.pretty-list li:hover { background: rgba(217, 183, 122, 0.1); color: var(--ink); }
.pretty-list li.on {
  color: #1b1206;
  background: var(--grad-gold);
}

.segmented { display: inline-flex; padding: 4px; gap: 4px; border-radius: var(--r-pill); background: var(--field); box-shadow: 0 0 0 1px var(--line) inset; flex-wrap: wrap; }
.segmented label { position: relative; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 16px; border-radius: var(--r-pill); font-size: 13.5px; font-weight: 700; color: var(--ink-2); cursor: pointer; transition: background var(--dur-2) var(--ease), color var(--dur-2) var(--ease); white-space: nowrap; }
.segmented span:hover { color: var(--ink); }
.segmented input:checked + span { background: var(--grad-gold); color: #1b1206; box-shadow: 0 4px 16px rgba(217, 183, 122, 0.3); }
.segmented input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }

.dropzone {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 22px 18px;
  border-radius: var(--r-md);
  border: 1.5px dashed var(--line-2);
  background: var(--field);
  text-align: center;
  color: var(--ink-2);
  font-size: 13.5px;
  cursor: pointer;
  transition: border-color var(--dur-2) var(--ease), background var(--dur-2) var(--ease);
}
.dropzone:hover, .dropzone.is-over { border-color: var(--gold); background: linear-gradient(180deg, rgba(217, 183, 122, 0.08), transparent), var(--field); }
.dropzone .ico { width: 26px; height: 26px; color: var(--gold); }
.dropzone b { color: var(--ink); font-size: 14px; }
.dropzone small { color: var(--muted); font-size: 12px; }
.dropzone input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.dropzone .file-name { color: var(--gold-2); font-weight: 700; }
.dropzone .preview { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px var(--gold); }

/* ---------- dialogs ---------- */

dialog.dialog {
  width: min(460px, calc(100vw - 28px));
  padding: 0;
  border: 0;
  border-radius: var(--r-xl);
  background: transparent;
  color: var(--ink);
  overflow: visible;
}
dialog.dialog::backdrop { background: rgba(4, 3, 6, 0.66); backdrop-filter: blur(6px); animation: fade-in 220ms ease both; }
dialog.dialog[open] { animation: dialog-in 320ms var(--ease) both; }
dialog.dialog.is-closing { animation: dialog-out 180ms ease both; }
.dialog-box { display: grid; gap: 14px; padding: 28px; border-radius: var(--r-xl); background: var(--surface-solid); border: 1px solid var(--line-2); box-shadow: var(--shadow-3); }
.dialog-title { font-size: 30px; }
.dialog-text { color: var(--ink-2); white-space: pre-line; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; flex-wrap: wrap; }
@keyframes fade-in { from { opacity: 0; } }
@keyframes dialog-in { from { opacity: 0; transform: translateY(14px) scale(0.97); } }
@keyframes dialog-out { to { opacity: 0; transform: translateY(8px) scale(0.98); } }

/* ---------- portraits ---------- */

.face { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; background: var(--surface-2); }
.faces { display: flex; align-items: center; }
.faces > * { margin-left: -9px; }
.faces > *:first-child { margin-left: 0; }
.faces img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px var(--surface-solid); background: var(--surface-2); }
.faces .more { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--surface-hi); box-shadow: 0 0 0 2px var(--surface-solid); font-size: 11px; font-weight: 800; color: var(--ink-2); }
.faces .seat-empty {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--surface-solid);
  background:
    radial-gradient(circle at 50% 38%, var(--surface-hi) 0 36%, transparent 37%),
    linear-gradient(180deg, var(--chip) 0%, var(--surface-2) 100%);
  position: relative;
}
.faces .seat-empty::after {
  content: "";
  position: absolute;
  inset: 7px 8px 6px;
  background: currentColor;
  color: var(--faint);
  opacity: 0.55;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><circle cx='12' cy='8' r='3.4' fill='black'/><path d='M4.5 19c1.2-3.4 3.8-5 7.5-5s6.3 1.6 7.5 5' fill='black'/></svg>") center / contain no-repeat;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><circle cx='12' cy='8' r='3.4' fill='black'/><path d='M4.5 19c1.2-3.4 3.8-5 7.5-5s6.3 1.6 7.5 5' fill='black'/></svg>") center / contain no-repeat;
}
.row-gap { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.small { font-size: 13px; }

/* ==========================================================================
   HOME
   ========================================================================== */

.home { overflow-x: clip; }
.hero {
  position: relative;
  isolation: isolate;
  min-height: min(92vh, 900px);
  margin-top: calc(-1 * var(--nav-h));
  padding: calc(var(--nav-h) + clamp(60px, 12vh, 140px)) var(--page-x) clamp(90px, 14vh, 150px);
  display: flex;
  align-items: center;
  color: #f5ede1;
  overflow: hidden;
}
.hero-media { position: absolute; inset: 0; z-index: -1; background: #07060a; }
.hero-media img, .hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 70% 30%; max-width: none; }
.hero-still { animation: hero-drift 28s ease-in-out infinite alternate; transform-origin: 70% 40%; }
.hero-video { opacity: 0; transition: opacity 1.2s ease; }
.hero-video.is-playing { opacity: 1; }
.hero-scrim {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 90% at 78% 40%, transparent 30%, rgba(7, 6, 10, 0.55) 75%),
    linear-gradient(90deg, rgba(7, 6, 10, 0.94) 0%, rgba(7, 6, 10, 0.78) 32%, rgba(7, 6, 10, 0.25) 62%, rgba(7, 6, 10, 0.1) 100%),
    linear-gradient(180deg, rgba(7, 6, 10, 0.5) 0%, transparent 22%, transparent 64%, var(--bg) 100%);
}
.hero-candle {
  position: absolute;
  left: -10%;
  bottom: -30%;
  width: 70%;
  height: 90%;
  background: radial-gradient(closest-side, rgba(196, 42, 82, 0.28), transparent);
  filter: blur(20px);
  animation: candle 7s ease-in-out infinite alternate;
}
@keyframes hero-drift { from { transform: scale(1.04); } to { transform: scale(1.12) translate(-1.5%, 1%); } }
@keyframes candle { 0% { opacity: 0.7; } 50% { opacity: 1; } 100% { opacity: 0.8; transform: translateX(3%); } }
.hero-in { position: relative; width: 100%; max-width: var(--wide); margin: 0 auto; }
.hero .eyebrow { color: #e7c98d; }
.hero-title {
  margin-top: 22px;
  font-size: clamp(50px, 7vw, 104px);
  font-weight: 600;
  line-height: 0.95;
  letter-spacing: -0.02em;
  text-shadow: 0 6px 40px rgba(0, 0, 0, 0.5);
}
.hero-title em { font-weight: 500; padding-right: 0.06em; }
.hero-lede { max-width: 52ch; margin-top: 26px; font-size: clamp(16px, 1.35vw, 18.5px); line-height: 1.6; color: rgba(245, 237, 225, 0.84); }
.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 36px; }
.hero-cta .btn-gold { box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset, 0 12px 40px rgba(217, 183, 122, 0.4); }
.hero .btn-ghost { --btn-bg: rgba(20, 16, 22, 0.45); --btn-ink: #f5ede1; box-shadow: 0 0 0 1px rgba(241, 217, 166, 0.35) inset; }
.hero .btn-quiet { --btn-ink: rgba(245, 237, 225, 0.85); }
.hero .btn-quiet:hover { background: rgba(255, 255, 255, 0.08); --btn-ink: #fff; }
.hero-live { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 38px; font-size: 14px; color: rgba(245, 237, 225, 0.72); }
.hero-live b { font-size: 17px; color: #fff; font-weight: 800; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #5fcf98; box-shadow: 0 0 0 0 rgba(95, 207, 152, 0.6); animation: live 2s ease-out infinite; }
.live-sep { width: 1px; height: 16px; background: rgba(255, 255, 255, 0.2); }
@keyframes live { 0% { box-shadow: 0 0 0 0 rgba(95, 207, 152, 0.55); } 100% { box-shadow: 0 0 0 10px rgba(95, 207, 152, 0); } }
.hero-scroll { position: absolute; left: 50%; bottom: 26px; width: 26px; height: 42px; margin-left: -13px; border-radius: 14px; box-shadow: 0 0 0 1.5px rgba(245, 237, 225, 0.35) inset; }
.hero:has(+ .drops:not([hidden])) .hero-scroll { opacity: 0; pointer-events: none; }
.hero-scroll span { position: absolute; left: 50%; top: 9px; width: 3px; height: 8px; margin-left: -1.5px; border-radius: 2px; background: #e7c98d; animation: scroll-cue 2s var(--ease) infinite; }
@keyframes scroll-cue { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

.join-dialog { width: min(420px, calc(100vw - 28px)); }
.join-card {
  display: grid;
  gap: 14px;
  padding: 26px 24px 22px;
}
.join-title { font-family: var(--display); font-size: 26px; font-weight: 600; line-height: 1; }
.join-hint { color: var(--muted); font-size: 13px; margin-top: -6px; }
.code-input { font-family: var(--mono); letter-spacing: 0.24em; text-transform: uppercase; font-weight: 600; }

/* drops ticker */
.drops {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0;
  max-width: var(--wide);
  margin: -34px auto 0;
  padding: 0 var(--page-x);
}
.drops-label {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 58px;
  padding: 0 18px 0 16px;
  border-radius: var(--r-md) 0 0 var(--r-md);
  background: var(--grad-gold);
  color: #1b1206;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.drops-label .ico { width: 16px; height: 16px; }
.drops-viewport {
  flex: 1;
  min-width: 0;
  height: 58px;
  overflow: hidden;
  border-radius: 0 var(--r-md) var(--r-md) 0;
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-left: 0;
  box-shadow: var(--shadow-2);
  -webkit-mask: linear-gradient(90deg, #000 0, #000 72%, transparent);
  mask: linear-gradient(90deg, #000 0, #000 72%, transparent);
}
.drops-track { display: flex; align-items: center; gap: 8px; height: 100%; width: max-content; padding: 0 8px; animation: drops var(--drops-dur, 60s) linear infinite; }
.drops-track.is-static { animation: none; transform: none; }
.drops-viewport:hover .drops-track { animation-play-state: paused; }
@keyframes drops { to { transform: translateX(var(--drops-shift, -50%)); } }
.drop {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  max-width: 240px;
  padding: 0 16px 0 6px;
  border-radius: 12px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--rar) 16%, transparent), transparent 80%);
  box-shadow: inset 2px 0 0 var(--rar);
  white-space: nowrap;
}
.drop:hover { background: linear-gradient(90deg, color-mix(in srgb, var(--rar) 26%, transparent), transparent); }
.drop .thumb {
  flex: none;
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  border-radius: 10px;
}
.drop .thumb--missing {
  background:
    radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--rar, #d9b77a) 35%, transparent), transparent 70%),
    #141018;
}
.drop-text { display: grid; align-content: center; min-width: 0; line-height: 1.15; }
.drop-text small, .drop-text b, .drop-text em {
  overflow: hidden;
  text-overflow: ellipsis;
}
.drop-text small { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.drop-text b { font-size: 13.5px; color: var(--rar); font-weight: 800; }
.drop-title {
  font-family: var(--display);
  font-size: 17px;
  font-style: italic;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.05;
  color: var(--gold-2);
  text-transform: none;
}
.drop-mark {
  flex: none;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  font-size: 14px;
  color: var(--gold-2);
  background: radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--rar, #d9b77a) 28%, transparent), #141018);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--rar, #d9b77a) 35%, transparent) inset;
}
.drop .thumb--title .thumb-title,
.drop .thumb--bubble .thumb-bubble,
.drop .thumb--effect .thumb-effect {
  min-height: 0;
  font-size: 10px;
  padding: 3px 4px;
  line-height: 1.1;
}
html[data-theme="light"] .drop-text b { filter: brightness(0.7) saturate(1.3); }

/* hall sits where finds were — overlaps the hero */
.home-hall {
  position: relative;
  z-index: 3;
  max-width: var(--wide);
  margin: -56px auto 0;
  padding: 0 var(--page-x);
}
.home-hall.has-drops { margin-top: 18px; }
.home-lounge {
  display: grid;
  gap: 28px;
  max-width: var(--wide);
  margin: 28px auto 0;
  padding: 0 var(--page-x);
}
.home > .section { max-width: var(--wide); margin-left: auto; margin-right: auto; padding: 0 var(--page-x); }
.section-actions { display: flex; gap: 10px; }

.tcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; }
.tcard {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--surface-solid);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-1);
  transition: transform var(--dur-3) var(--ease), box-shadow var(--dur-3) var(--ease), border-color var(--dur-3) var(--ease);
}
.tcard:hover { transform: translateY(-4px); border-color: var(--line-2); box-shadow: var(--shadow-3), 0 0 0 1px rgba(217, 183, 122, 0.25); }
.tcard.is-demo { border-color: rgba(217, 183, 122, 0.35); }
.tcard-cover { position: relative; display: block; aspect-ratio: 16 / 8.2; overflow: hidden; background: #110d12; }
.tcard-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.tcard:hover .tcard-cover img { transform: scale(1.06); }
.tcard-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(7, 6, 10, 0.45) 0%, transparent 40%, rgba(7, 6, 10, 0.2) 70%, var(--surface-solid) 100%); }
.tcard-top { position: absolute; z-index: 1; left: 12px; right: 12px; top: 12px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tcard-phase { display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 11px; border-radius: 999px; background: rgba(7, 6, 10, 0.6); backdrop-filter: blur(8px); color: #f5ede1; font-size: 12px; font-weight: 700; }
.tcard-phase i { width: 7px; height: 7px; border-radius: 50%; background: #5fcf98; box-shadow: 0 0 8px #5fcf98; }
.tcard-phase.is-live i { background: #ff5d7d; box-shadow: 0 0 8px #ff5d7d; animation: live-red 1.6s ease-in-out infinite; }
.tcard-phase.is-soon i { background: #f3b857; box-shadow: 0 0 8px #f3b857; }
.tcard-phase.is-ended i { background: #8f8374; box-shadow: none; }
@keyframes live-red { 50% { opacity: 0.4; } }
.tcard-demo { position: absolute; z-index: 1; left: 12px; bottom: 10px; font-size: 11px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; color: #e7c98d; }
.tcard-body { display: grid; gap: 10px; padding: 4px 18px 16px; }
.tcard-title { font-family: var(--display); font-size: 26px; font-weight: 600; line-height: 1.05; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tcard-host { font-size: 13px; color: var(--muted); margin-top: -4px; }
.tcard-host b { color: var(--ink-2); font-weight: 700; }
.tcard-feats { display: flex; flex-wrap: wrap; gap: 6px; min-height: 26px; }
.feat { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; border-radius: 999px; background: var(--line-soft); color: var(--ink-2); font-size: 12px; font-weight: 600; }
.feat .ico { width: 13px; height: 13px; color: var(--gold); }
.tcard-foot { display: flex; align-items: center; gap: 12px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.tcard-seats { font-size: 13px; color: var(--muted); display: grid; line-height: 1.15; }
.tcard-seats b { font-size: 16px; color: var(--ink); }
.tcard-seats small { font-size: 11.5px; }
.tcard-go { margin-left: auto; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--line-soft); color: var(--gold); transition: background var(--dur-2) var(--ease), transform var(--dur-2) var(--ease), color var(--dur-2) var(--ease); }
.tcard-go .ico { width: 18px; height: 18px; }
.tcard:hover .tcard-go { background: var(--grad-gold); color: #1b1206; transform: translateX(2px); }

.tcard-new {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  min-height: 260px;
  padding: 28px;
  border-radius: var(--r-lg);
  border: 1.5px dashed var(--line-2);
  background: radial-gradient(80% 80% at 50% 0%, rgba(217, 183, 122, 0.08), transparent 70%);
  color: var(--ink-2);
  font-size: 14px;
  transition: border-color var(--dur-3) var(--ease), background var(--dur-3) var(--ease), transform var(--dur-3) var(--ease);
}
.tcard-new:hover { border-color: var(--gold); transform: translateY(-4px); background: radial-gradient(80% 80% at 50% 0%, rgba(217, 183, 122, 0.16), transparent 70%); }
.tcard-new b { font-family: var(--display); font-size: 28px; font-weight: 600; color: var(--ink); line-height: 1; }
.tcard-new-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: rgba(217, 183, 122, 0.12); box-shadow: 0 0 0 1px var(--line-2) inset; color: var(--gold); margin-bottom: 6px; }
.tcard-new .more-link { margin-top: 6px; }
.tables-empty { display: grid; grid-template-columns: 200px 1fr; gap: 28px; align-items: center; padding: 22px; overflow: hidden; }
.tables-empty img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--r-md); }
.tables-empty h3 { font-size: 28px; }
.tables-empty p { color: var(--ink-2); margin: 8px 0 18px; max-width: 46ch; }

/* hall */
.hall {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: min(420px, 52vh);
  min-height: 320px;
  margin-top: 0;
  border-radius: var(--r-lg);
  background: var(--grad-surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-1);
  backdrop-filter: blur(var(--glass-blur));
  overflow: hidden;
}
.hall-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 16px 12px 20px; border-bottom: 1px solid var(--line-soft); }
.hall-head h3 { font-size: 24px; display: flex; align-items: center; gap: 10px; }
.hall-head h3::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.hall-head small { color: var(--muted); font-size: 12.5px; }
.hall-close { display: none; }
.hall-log { flex: 1; overflow-y: auto; padding: 14px 14px 8px; display: flex; flex-direction: column; gap: 4px; overscroll-behavior: contain; }
.hall-log .empty { margin: auto; max-width: 30ch; text-align: center; color: var(--muted); font-size: 13.5px; }
.hall-log .bubble { display: grid; grid-template-columns: 30px 1fr; gap: 10px; padding: 7px 8px; border-radius: 12px; }
.hall-log .bubble:hover { background: var(--line-soft); }
.hall-log .bubble > img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; margin-top: 2px; box-shadow: 0 0 0 1px var(--line-2); }
.hall-log .who { display: flex; align-items: baseline; gap: 8px; font-size: 13px; font-weight: 800; color: var(--gold-2); }
html[data-theme="light"] .hall-log .who { color: var(--cran-2); }
.hall-log .who a:hover { text-decoration: underline; }
.hall-log .when { font-size: 11px; font-weight: 600; color: var(--faint); }
.hall-log .said { display: block; font-size: 14px; color: var(--ink); line-height: 1.45; overflow-wrap: anywhere; }
.hall-log .bubble.is-system {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  grid-template-columns: none;
  margin: 4px 0;
  padding: 8px 12px 8px 14px;
  background: var(--line-soft);
  box-shadow: 0 0 0 1px rgba(217, 183, 122, 0.28) inset;
  text-align: left;
  border-radius: 10px;
}
.hall-log .bubble.is-system:hover { background: rgba(217, 183, 122, 0.08); }
.hall-sys { display: flex; align-items: center; gap: 12px; width: 100%; max-width: none; margin: 0; }
.hall-sys-seal {
  flex: none;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
}
.hall-sys .said { flex: 1; min-width: 0; }
.hall-sys .hall-tools { margin-left: auto; flex: none; }
.hall-log .bubble.is-system .said { color: var(--ink-2); font-size: 13.5px; }
.hall-tools { display: inline-flex; gap: 8px; margin-left: 6px; }
.hall-tools button { border: 0; background: none; padding: 0; color: var(--muted); font-size: 11.5px; font-weight: 700; cursor: pointer; }
.hall-tools button:hover { color: var(--danger); }
.hall-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line-soft); }
.hall-form input { min-height: 44px; border-radius: var(--r-pill); padding-left: 18px; }
.hall-send { flex: none; width: 44px; height: 44px; background: var(--grad-cran); color: #fff; }
.hall-send:hover { background: var(--grad-cran); color: #fff; filter: brightness(1.1); }
.hall-send:disabled { opacity: 0.4; cursor: not-allowed; }
.hall-login { position: absolute; right: 70px; bottom: 23px; font-size: 13px; font-weight: 700; color: var(--gold); }
.hall-fab { display: none; }

/* steps */
.section-head.centered { justify-content: center; text-align: center; }
.steps-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: step; }
.step { padding: 30px 28px 32px; overflow: hidden; }
.step::before { content: ""; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%; background: radial-gradient(closest-side, rgba(217, 183, 122, 0.14), transparent); }
.step-num { display: block; font-family: var(--display); font-size: 58px; font-weight: 500; font-style: italic; line-height: 1; background: var(--grad-gold); -webkit-background-clip: text; background-clip: text; color: transparent; }
.step h3 { margin-top: 18px; font-size: 28px; }
.step p { margin-top: 10px; color: var(--ink-2); }

/* pack rail */
.pack-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(210px, 1fr);
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 12px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}
.rail-pack {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  border-radius: var(--r-lg);
  overflow: hidden;
  scroll-snap-align: start;
  background: #110d12;
  box-shadow: var(--shadow-1), 0 0 0 1px var(--line) inset;
  transition: transform var(--dur-3) var(--ease), box-shadow var(--dur-3) var(--ease);
}
.rail-pack:hover { transform: translateY(-5px); box-shadow: var(--shadow-3); }
.rail-pack img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.rail-pack:hover img { transform: scale(1.06); }
.rail-pack-shade { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(7, 6, 10, 0.92)); }
.rail-pack-text { position: absolute; left: 16px; right: 16px; bottom: 16px; display: grid; gap: 4px; color: #f5ede1; }
.rail-pack-text small { font-size: 11.5px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: #e7c98d; }
.rail-pack-text b { font-family: var(--display); font-size: 26px; font-weight: 600; line-height: 1.05; }
.rail-pack.is-locked img { filter: blur(16px) saturate(0.7) brightness(0.6); transform: scale(1.15); }
.rail-pack-veil { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 6px; padding: 20px; text-align: center; color: #f5ede1; }
.rail-pack-veil .ico { width: 26px; height: 26px; color: #e7c98d; }
.rail-pack-veil b { font-family: var(--display); font-size: 40px; line-height: 1; }
.rail-pack-veil small { font-size: 12px; color: rgba(245, 237, 225, 0.75); max-width: 18ch; }
.rail-pack.is-locked .rail-pack-text { display: none; }

/* vault teaser */
.vault-card { display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: 24px; padding: clamp(28px, 5vw, 64px); overflow: hidden; background: radial-gradient(90% 120% at 100% 50%, rgba(142, 27, 58, 0.35), transparent 60%), var(--grad-surface); }
.vault-copy h2 { font-size: clamp(34px, 3.8vw, 54px); margin: 12px 0 16px; max-width: 14ch; }
.vault-copy .lede { margin-bottom: 26px; }
.vault-art { position: relative; height: 340px; }
.vault-glow { position: absolute; left: 50%; top: 55%; width: 380px; height: 380px; transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(closest-side, rgba(243, 184, 87, 0.35), transparent); filter: blur(10px); animation: candle 5s ease-in-out infinite alternate; }
.vault-art img { position: absolute; border-radius: 14px; box-shadow: 0 24px 50px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(241, 217, 166, 0.35); }
.vault-card-a, .vault-card-b, .vault-card-c { width: 150px; aspect-ratio: 5 / 7; object-fit: cover; left: 50%; top: 50%; transition: transform 700ms var(--ease); }
.vault-card-a { transform: translate(-125%, -58%) rotate(-14deg); }
.vault-card-b { transform: translate(-50%, -66%) rotate(0deg); z-index: 1; }
.vault-card-c { transform: translate(25%, -58%) rotate(14deg); }
.vault-card:hover .vault-card-a { transform: translate(-140%, -62%) rotate(-18deg); }
.vault-card:hover .vault-card-c { transform: translate(40%, -62%) rotate(18deg); }
.vault-card:hover .vault-card-b { transform: translate(-50%, -72%); }
.vault-case { width: 190px; left: 50%; bottom: -6px; transform: translateX(-50%); z-index: 2; border-radius: 22px !important; box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6) !important; animation: float 6s ease-in-out infinite; }
@keyframes float { 50% { transform: translate(-50%, -8px); } }

@media (max-width: 1100px) {
  .home-hall { margin: 0; height: 0; min-height: 0; padding: 0; overflow: visible; }
  .hall {
    position: fixed;
    z-index: 260;
    top: auto;
    left: 12px;
    right: 12px;
    bottom: calc(var(--tabbar-h) + 12px + var(--browser-bottom) + env(safe-area-inset-bottom));
    height: min(72vh, 620px);
    margin: 0;
    background: var(--surface-solid);
    box-shadow: var(--shadow-3);
    transform: translateY(calc(100% + 120px));
    visibility: hidden;
    transition: transform 420ms var(--ease), visibility 0s linear 420ms;
  }
  body.hall-open .hall { transform: none; visibility: visible; transition: transform 420ms var(--ease); }
  .hall-close { display: inline-grid; }
  @media (min-width: 700px) { .hall { left: auto; width: 400px; } }
  .hall-fab {
    position: fixed;
    z-index: 250;
    right: 16px;
    bottom: calc(var(--tabbar-h) + 16px + var(--browser-bottom) + env(safe-area-inset-bottom));
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 48px;
    padding: 0 18px 0 14px;
    border: 0;
    border-radius: 999px;
    background: var(--surface-solid);
    color: var(--ink);
    font-weight: 800;
    font-size: 14px;
    box-shadow: var(--shadow-3), 0 0 0 1px var(--line-2) inset;
    cursor: pointer;
  }
  .hall-fab .ico { color: var(--gold); }
  .hall-fab b { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--grad-cran); color: #fff; font-size: 11px; display: grid; place-items: center; }
  body.hall-open .hall-fab { opacity: 0; pointer-events: none; }
}
@media (max-width: 900px) {
  .hero { min-height: auto; padding-top: calc(var(--nav-h) + env(safe-area-inset-top) + 56px); padding-bottom: 110px; align-items: flex-end; }
  .home .section-head,
  .home .section-head.centered { justify-content: center; text-align: center; }
  .home .section-head > div { width: 100%; }
  .home .section-actions,
  .home .section-head .more-link { margin-inline: auto; }
  .step { text-align: center; }
  .step p { margin-inline: auto; max-width: 36ch; }
  .hero-media img, .hero-video { object-position: 64% 20%; }
  .hero-scrim { background: linear-gradient(180deg, rgba(7, 6, 10, 0.55) 0%, rgba(7, 6, 10, 0.35) 28%, rgba(7, 6, 10, 0.86) 62%, var(--bg) 100%); }
  .hero-scroll { display: none; }
  .steps-list { grid-template-columns: 1fr; }
  .vault-card { grid-template-columns: 1fr; }
  .vault-art { height: 280px; order: -1; }
  .tables-empty { grid-template-columns: 1fr; }
  .tables-empty img { aspect-ratio: 16 / 9; }
}
@media (max-width: 560px) {
  .hero-title { font-size: clamp(44px, 13vw, 60px); }
  .hero .eyebrow { letter-spacing: 0.14em; font-size: 10.5px; }
  .hero-cta { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .hero-cta .btn-gold { grid-column: 1 / -1; }
  .hero-cta .btn-lg { min-height: 52px; padding: 0 12px; font-size: 14.5px; }
  .join-pop { position: static; }
  .join-pop > summary { width: 100%; box-shadow: 0 0 0 1px rgba(241, 217, 166, 0.2) inset; }
  .join-card { left: 0; right: 0; width: auto; }
  .drops-label span { display: none; }
  .drops-label { padding: 0 14px; }
  .tcards { grid-template-columns: 1fr; }
  .vault-card-a, .vault-card-b, .vault-card-c { width: 118px; }
  .vault-case { width: 150px; }
}
/* ==========================================================================
   AUTH
   ========================================================================== */

.auth { display: grid; grid-template-columns: 1.1fr 1fr; min-height: calc(100vh - var(--nav-h)); }
.auth ~ .footer { display: none; }
.auth-art { position: relative; overflow: hidden; background: #07060a; }
.auth-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; animation: hero-drift 30s ease-in-out infinite alternate; }
.auth-art-shade { position: absolute; inset: 0; background: linear-gradient(90deg, transparent 50%, var(--bg) 100%), linear-gradient(0deg, rgba(7, 6, 10, 0.9) 0%, transparent 50%); }
.auth-quote { position: absolute; left: clamp(28px, 5vw, 64px); right: 22%; bottom: clamp(32px, 7vh, 72px); color: #f5ede1; }
.auth-quote .eyebrow { color: #e7c98d; }
.auth-quote blockquote { margin: 16px 0 12px; font-family: var(--display); font-size: clamp(26px, 2.6vw, 38px); font-style: italic; font-weight: 500; line-height: 1.15; }
.auth-quote span { color: rgba(245, 237, 225, 0.7); font-size: 14px; }
.auth-panel { display: grid; place-items: center; padding: clamp(32px, 6vw, 72px) var(--page-x); }
.auth-box { width: min(420px, 100%); }
.auth-box h1 { margin-top: 12px; font-size: clamp(44px, 4.4vw, 60px); }
.auth-lede { margin: 14px 0 30px; color: var(--ink-2); }
.pass-wrap { position: relative; display: block; }
.pass-wrap input { padding-right: 52px; }
.pass-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.pass-eye:hover, .pass-eye.is-on { color: var(--gold); }
.pass-meter { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 2px; }
.pass-meter i { height: 3px; border-radius: 3px; background: var(--line); transition: background var(--dur-2) var(--ease); }
.pass-meter[data-score="0"] i:nth-child(1) { background: var(--danger); }
.pass-meter[data-score="1"] i:nth-child(-n + 1) { background: var(--warn); }
.pass-meter[data-score="2"] i:nth-child(-n + 2) { background: var(--gold); }
.pass-meter[data-score="3"] i { background: var(--ok); }
.auth-form .btn-lg { margin-top: 6px; }
.auth-switch { margin-top: 22px; color: var(--muted); font-size: 14.5px; }
.auth-fine { margin-top: 12px; color: var(--faint); font-size: 12.5px; }
html[data-theme="light"] .auth-fine { color: var(--muted); }
@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; min-height: 0; }
  .auth-art { height: 260px; }
  .auth-art-shade { background: linear-gradient(180deg, transparent 30%, var(--bg) 100%); }
  .auth-quote { display: none; }
  .auth-panel { margin-top: -60px; position: relative; place-items: start center; }
}

/* ==========================================================================
   NEW TABLE WIZARD
   ========================================================================== */

.wizard { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px 36px; align-items: start; }
.stepper { grid-column: 1 / -1; display: none; list-style: none; margin: 0; padding: 0; gap: 8px; }
.wizard.is-wizard .stepper { display: flex; }
.stepper li { flex: 1; }
.stepper-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  height: 54px;
  padding: 0 18px;
  border: 0;
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--line) inset;
  color: var(--muted);
  font-weight: 700;
  font-size: 14.5px;
  cursor: pointer;
  overflow: hidden;
  transition: color var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease);
}
.stepper-btn span { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; box-shadow: 0 0 0 1px var(--line-2) inset; font-size: 12.5px; transition: background var(--dur-2) var(--ease), color var(--dur-2) var(--ease); }
.stepper-btn::after { content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 0; background: var(--grad-gold); transition: width var(--dur-3) var(--ease); }
.stepper-btn:hover { color: var(--ink); }
.stepper-btn.is-on { color: var(--ink); box-shadow: 0 0 0 1px var(--line-2) inset; }
.stepper-btn.is-on::after { width: 100%; }
.stepper-btn.is-on span { background: var(--grad-gold); color: #1b1206; box-shadow: none; }
.stepper-btn.is-done span { background: rgba(217, 183, 122, 0.16); color: var(--gold); }
.wizard-main { min-width: 0; }
.wizard.is-wizard .wstep { display: none; }
.wizard.is-wizard .wstep.is-on { display: block; animation: rise-in 520ms var(--ease) both; }
.wstep + .wstep { margin-top: 40px; }
.wizard.is-wizard .wstep + .wstep { margin-top: 0; }
.wstep-head { display: flex; gap: 18px; align-items: flex-start; margin-bottom: 24px; }
.wstep-num { font-family: var(--display); font-size: 44px; font-style: italic; line-height: 0.9; background: var(--grad-gold); -webkit-background-clip: text; background-clip: text; color: transparent; }
.wstep-head h2 { font-size: clamp(30px, 3vw, 40px); }
.wstep-head p { margin-top: 6px; color: var(--muted); max-width: 60ch; }
.wstep-head h2:focus { outline: none; }
.wstep-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--line-soft); }
.wizard:not(.is-wizard) .wstep-nav { display: none; }
.title-field { max-width: 460px; margin-bottom: 22px; }

.modes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.mode-card {
  position: relative;
  display: block;
  aspect-ratio: 4 / 5;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: #110d12;
  cursor: pointer;
  box-shadow: 0 0 0 1px var(--line) inset, var(--shadow-1);
  transition: transform var(--dur-3) var(--ease), box-shadow var(--dur-3) var(--ease);
  isolation: isolate;
}
.mode-card input { position: absolute; opacity: 0; pointer-events: none; }
.mode-art { position: absolute; inset: 0; z-index: -1; }
.mode-art img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease), filter var(--dur-3) var(--ease); filter: saturate(0.85) brightness(0.85); }
.mode-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(7, 6, 10, 0.1) 20%, rgba(7, 6, 10, 0.92) 100%); }
.mode-card:hover { transform: translateY(-3px); }
.mode-card:hover .mode-art img { transform: scale(1.06); filter: saturate(1) brightness(0.95); }
.mode-card:has(input:checked) { box-shadow: 0 0 0 2px var(--gold) inset, 0 16px 40px rgba(217, 183, 122, 0.22); }
.mode-card:has(input:checked) .mode-art img { filter: saturate(1.05) brightness(1); }
.mode-card:has(input:focus-visible) { outline: 2px solid var(--gold); outline-offset: 3px; }
.mode-text { position: absolute; left: 14px; right: 14px; bottom: 14px; display: grid; gap: 4px; color: #f5ede1; }
.mode-text b { font-family: var(--display); font-size: 25px; font-weight: 600; line-height: 1; }
.mode-text small { font-size: 12px; line-height: 1.35; color: rgba(245, 237, 225, 0.72); }
.mode-heat { display: flex; gap: 3px; margin-bottom: 6px; }
.mode-heat i { width: 12px; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, 0.18); }
.mode-heat i.on { background: linear-gradient(90deg, #f3b857, #e5486b); box-shadow: 0 0 6px rgba(229, 72, 107, 0.5); }
.mode-check { position: absolute; top: 12px; right: 12px; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--grad-gold); color: #1b1206; transform: scale(0); transition: transform var(--dur-2) var(--ease-spring); }
.mode-check .ico { width: 15px; height: 15px; stroke-width: 2.4; }
.mode-card:has(input:checked) .mode-check { transform: scale(1); }
.mode-card.is-adult::before { content: "18+"; position: absolute; top: 12px; left: 12px; z-index: 1; padding: 3px 8px; border-radius: 999px; background: rgba(184, 40, 76, 0.85); color: #fff; font-size: 10.5px; font-weight: 800; letter-spacing: 0.06em; }
.mode-card.is-locked { cursor: not-allowed; }
.mode-card.is-locked:hover { transform: none; }
.mode-card.is-locked .mode-art img { filter: blur(10px) grayscale(0.6) brightness(0.45); transform: scale(1.15); }
.mode-lock { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 8px; padding: 18px; padding-bottom: 50%; text-align: center; font-size: 12px; font-weight: 600; color: rgba(245, 237, 225, 0.85); line-height: 1.35; }
.mode-lock .ico { width: 22px; height: 22px; color: #e7c98d; }
.modes-note { display: flex; align-items: center; gap: 10px; margin-top: 14px; color: var(--muted); font-size: 13.5px; }
.modes-note .ico { color: var(--gold); width: 18px; height: 18px; }
.adult { margin-top: 18px; }
.is-shake { animation: shake 420ms ease; border-color: var(--danger) !important; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

.rule-block { margin: 0 0 26px; padding: 0; border: 0; min-width: 0; }
.rule-title { display: block; margin: 0 0 12px; padding: 0; font-size: 12px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); }
html[data-theme="light"] .rule-title { color: var(--gold-deep); }
.rule-title .muted { letter-spacing: 0.04em; text-transform: none; font-weight: 600; }
.rule-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.rule-block .field-hint { margin-top: 8px; }
.choice-cards, .access-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.access-cards { grid-template-columns: repeat(3, 1fr); }
.choice-card {
  position: relative;
  display: grid;
  gap: 6px;
  padding: 18px 18px 18px;
  border-radius: var(--r-md);
  background: var(--field);
  box-shadow: 0 0 0 1px var(--line) inset;
  cursor: pointer;
  transition: box-shadow var(--dur-2) var(--ease), background var(--dur-2) var(--ease), transform var(--dur-2) var(--ease);
}
.choice-card:hover { box-shadow: 0 0 0 1px var(--line-2) inset; transform: translateY(-1px); }
.choice-card input { position: absolute; top: 16px; right: 16px; }
.choice-card b { font-size: 15.5px; color: var(--ink); }
.choice-card small { font-size: 13px; color: var(--muted); line-height: 1.45; }
.choice-glyph { display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 6px; border-radius: 12px; background: rgba(217, 183, 122, 0.1); color: var(--gold); box-shadow: 0 0 0 1px var(--line) inset; }
.choice-card:has(input:checked) { box-shadow: 0 0 0 1.5px var(--gold) inset, 0 10px 30px rgba(217, 183, 122, 0.12); background: linear-gradient(180deg, rgba(217, 183, 122, 0.08), transparent), var(--field); }
.choice-card:has(input:checked) .choice-glyph { background: var(--grad-gold); color: #1b1206; }
.access-fallback { display: grid; gap: 10px; }
.js .access-fallback { display: none; }
.access-cards.js-only { display: none; }
.js .access-cards.js-only { display: grid; }
.door { margin-top: 12px; max-width: 420px; }
.switch-list { display: grid; gap: 10px; }
.switch-row { align-items: center; }
.switch-row .switch { flex: none; }

.seg-js { display: flex; width: 100%; }
.seg-js .seg-btn { flex: 1; height: 42px; padding: 0 14px; border: 0; border-radius: 999px; background: transparent; color: var(--ink-2); font-size: 13.5px; font-weight: 700; cursor: pointer; white-space: nowrap; transition: background var(--dur-2) var(--ease), color var(--dur-2) var(--ease); }
.seg-js .seg-btn:hover { color: var(--ink); background: var(--line-soft); }
.seg-js .seg-btn.is-on { background: var(--grad-gold); color: #1b1206; box-shadow: 0 4px 16px rgba(217, 183, 122, 0.28); }
.stepper-ctl { display: inline-flex; align-items: center; gap: 4px; padding: 4px; border-radius: 999px; background: var(--field); box-shadow: 0 0 0 1px var(--line) inset; }
.stepper-ctl .icon-btn { width: 42px; height: 42px; font-size: 22px; font-weight: 500; color: var(--gold); }
.stepper-ctl .icon-btn:disabled { opacity: 0.35; cursor: default; }
.stepper-val { min-width: 64px; text-align: center; font-family: var(--display); font-size: 30px; font-weight: 600; line-height: 1; }

.decks { margin-top: 6px; }
.decks-hint { margin: -4px 0 10px !important; }
.deck-tools { display: flex; gap: 18px; margin-bottom: 12px; font-size: 13px; }
.deck-group { display: grid; gap: 10px; margin-top: 16px; }
.deck-group:first-of-type { margin-top: 4px; }
.deck-group-title {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-2);
}
.deck-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.deck {
  display: grid;
  grid-template-columns: auto 52px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 10px 16px 10px 14px;
  border-radius: var(--r-md);
  background: var(--field);
  box-shadow: 0 0 0 1px var(--line) inset;
  cursor: pointer;
  transition: box-shadow var(--dur-2) var(--ease), background var(--dur-2) var(--ease);
}
.deck:hover { box-shadow: 0 0 0 1px var(--line-2) inset; }
.deck:has(input:checked) { box-shadow: 0 0 0 1.5px rgba(229, 72, 107, 0.55) inset; background: linear-gradient(90deg, rgba(229, 72, 107, 0.08), transparent 60%), var(--field); }
.deck img { width: 52px; height: 52px; border-radius: 12px; object-fit: cover; }
.deck-text { min-width: 0; display: grid; }
.deck-text b { font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.deck-text small { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.deck-count { font-size: 12px; color: var(--muted); text-align: right; line-height: 1.1; }
.deck-count b { display: block; font-size: 17px; color: var(--ink); }
.deck.is-locked { opacity: 0.45; cursor: not-allowed; }
.deck.is-locked img { filter: blur(4px); }

.summary { position: sticky; top: calc(var(--nav-h) + 20px); }
.wizard:not(.is-wizard) .summary { top: calc(var(--nav-h) + 20px); }
.summary-card { border-radius: var(--r-xl); overflow: hidden; background: var(--surface-solid); border: 1px solid var(--line); box-shadow: var(--shadow-3); padding-bottom: 22px; }
.summary-cover { position: relative; aspect-ratio: 16 / 10; overflow: hidden; }
.summary-cover img { width: 100%; height: 100%; object-fit: cover; transition: opacity 180ms ease, transform 600ms var(--ease); }
.summary-cover img.is-swap { opacity: 0; transform: scale(1.04); }
.summary-cover > span { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 30%, var(--surface-solid) 100%); }
.summary-title { position: absolute; left: 22px; right: 22px; bottom: 6px; display: grid; gap: 2px; }
.summary-title small { font-size: 11.5px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); }
.summary-title b { font-family: var(--display); font-size: 30px; font-weight: 600; line-height: 1.05; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.summary-list { margin: 12px 22px 20px; display: grid; }
.summary-list div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); font-size: 13.5px; }
.summary-list dt { color: var(--muted); }
.summary-list dd { margin: 0; text-align: right; font-weight: 700; color: var(--ink); }
.summary-card .btn { width: calc(100% - 44px); margin: 0 22px; }
.summary-note { margin: 12px 22px 0; font-size: 12.5px; color: var(--muted); text-align: center; }

@media (max-width: 1100px) {
  .modes { grid-template-columns: repeat(3, 1fr); }
  .deck-list { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .wizard { grid-template-columns: 1fr; }
  .summary { position: sticky; top: auto; bottom: calc(var(--tabbar-h) + var(--browser-bottom) + env(safe-area-inset-bottom)); z-index: 30; margin: 0 calc(-1 * var(--page-x)); }
  .summary-card { border-radius: var(--r-lg) var(--r-lg) 0 0; padding: 12px var(--page-x); display: flex; align-items: center; gap: 12px; box-shadow: 0 -20px 50px rgba(0, 0, 0, 0.4); }
  .summary-cover { width: 54px; height: 54px; aspect-ratio: 1; border-radius: 12px; flex: none; }
  .summary-cover > span, .summary-list, .summary-note { display: none; }
  .summary-title { display: none; }
  .summary-card .btn { width: auto; flex: 1; margin: 0; min-height: 50px; }
  .stepper-btn { height: 46px; padding: 0 10px; gap: 8px; font-size: 13px; justify-content: center; }
  .modes { grid-template-columns: 1fr 1fr; gap: 10px; }
  .mode-card { aspect-ratio: 3 / 4; }
  .mode-text b { font-size: 21px; }
  .mode-text small { display: none; }
  .choice-cards, .access-cards, .rule-grid { grid-template-columns: 1fr; }
  .seg-js { flex-wrap: wrap; border-radius: var(--r-md); }
  .seg-js .seg-btn { flex: 1 0 auto; }
}
/* ==========================================================================
   PACKS
   ========================================================================== */

.back-link { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 18px; color: var(--muted); font-size: 13.5px; font-weight: 700; }
.back-link .ico { width: 16px; height: 16px; }
.back-link:hover { color: var(--ink); }
.section-tight { margin-top: 26px; }
.filter-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.fchip { height: 36px; padding: 0 16px; border: 0; border-radius: 999px; background: var(--surface-2); box-shadow: 0 0 0 1px var(--line) inset; color: var(--ink-2); font-size: 13.5px; font-weight: 700; cursor: pointer; transition: all var(--dur-2) var(--ease); }
.fchip:hover { color: var(--ink); box-shadow: 0 0 0 1px var(--line-2) inset; }
.fchip.is-on { background: var(--ink); color: var(--bg); box-shadow: none; }
.pcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.pcard {
  display: flex;
  flex-direction: column;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--surface-solid);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-1);
  transition: transform var(--dur-3) var(--ease), box-shadow var(--dur-3) var(--ease), border-color var(--dur-3) var(--ease);
}
.pcard:hover { transform: translateY(-4px); box-shadow: var(--shadow-3); border-color: var(--line-2); }
.pcard-cover { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: #110d12; }
.pcard-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.pcard:hover .pcard-cover img { transform: scale(1.06); }
.pcard-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(7, 6, 10, 0.35), transparent 35%, transparent 70%, rgba(7, 6, 10, 0.35)); }
.pcard-top { position: absolute; z-index: 1; top: 12px; left: 12px; right: 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.pcard-body { display: grid; gap: 6px; padding: 16px 18px 18px; }
.pcard-title { font-family: var(--display); font-size: 26px; font-weight: 600; line-height: 1.05; }
.pcard-desc { color: var(--muted); font-size: 13.5px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pcard-meta { display: flex; align-items: center; gap: 8px; margin-top: 6px; color: var(--muted); font-size: 12.5px; font-weight: 600; }
.pcard-meta b { color: var(--ink); }
.dot-sep { width: 3px; height: 3px; border-radius: 50%; background: var(--faint); }
.pcard.is-locked .pcard-cover img { filter: blur(18px) saturate(0.6) brightness(0.55); transform: scale(1.2); }
.pcard-veil { position: absolute; inset: 0; z-index: 2; display: grid; place-content: center; justify-items: center; gap: 6px; padding: 18px; text-align: center; color: #f5ede1; }
.pcard-veil .ico { width: 24px; height: 24px; color: #e7c98d; }
.pcard-veil b { font-family: var(--display); font-size: 42px; line-height: 1; }
.pcard-veil small { max-width: 24ch; font-size: 12.5px; color: rgba(245, 237, 225, 0.8); }

.pack-hero { position: relative; isolation: isolate; overflow: hidden; margin-top: calc(-1 * var(--nav-h)); padding-top: var(--nav-h); }
.pack-hero-bg { position: absolute; inset: 0; z-index: -1; }
.pack-hero-bg img { width: 100%; height: 100%; object-fit: cover; filter: blur(40px) saturate(1.2) brightness(0.55); transform: scale(1.3); }
.pack-hero-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(7, 6, 10, 0.3), var(--bg) 96%); }
html[data-theme="light"] .pack-hero-bg img { filter: blur(40px) saturate(1.1) brightness(1.05); opacity: 0.55; }
.pack-hero-in { max-width: var(--wide); margin: 0 auto; padding: clamp(28px, 5vw, 56px) var(--page-x) 10px; }
.pack-hero-grid { display: grid; grid-template-columns: 340px 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.pack-cover-lg { position: relative; aspect-ratio: 3 / 4; border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--shadow-3), 0 0 0 1px rgba(241, 217, 166, 0.25); transform: rotate(-2deg); transition: transform 700ms var(--ease); }
.pack-cover-lg:hover { transform: rotate(0) scale(1.01); }
.pack-cover-lg img { width: 100%; height: 100%; object-fit: cover; }
.pack-hero.is-locked .pack-cover-lg img, .pack-hero.is-locked .pack-hero-bg img { filter: blur(24px) brightness(0.5); transform: scale(1.2); }
.pack-info h1 { margin: 12px 0 16px; font-size: clamp(44px, 5.2vw, 76px); }
.pack-stats { display: flex; gap: 12px; margin: 26px 0; flex-wrap: wrap; }
.pack-stats div { display: grid; min-width: 112px; padding: 14px 18px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); backdrop-filter: blur(10px); }
.pack-stats b { font-family: var(--display); font-size: 34px; font-weight: 600; line-height: 1; }
.pack-stats span { font-size: 12px; color: var(--muted); font-weight: 600; margin-top: 4px; }
.pack-author { color: var(--muted); font-size: 14px; }
.pack-delete { margin-top: 22px; }
.pack-delete .text-btn, .qcard-delete .text-btn { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.pack-delete .ico, .qcard-delete .ico { width: 16px; height: 16px; }
.pack-body { padding-top: clamp(28px, 4vw, 48px); }

.card-composer { padding: clamp(20px, 3vw, 32px); margin-bottom: 44px; }
.composer-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 20px; margin-bottom: 20px; }
.composer-head h2 { font-size: 34px; }
.composer-form { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 22px; }
.composer-form .kind-toggle, .composer-text, .composer-foot { grid-column: 1 / -1; }
.composer-media { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.composer-foot { display: flex; justify-content: flex-end; }
.kind-toggle { display: inline-flex; gap: 6px; padding: 4px; border-radius: 999px; background: var(--field); box-shadow: 0 0 0 1px var(--line) inset; justify-self: start; width: max-content; }
.kind-opt { position: relative; }
.kind-opt input { position: absolute; opacity: 0; pointer-events: none; }
.kind-opt span { display: inline-flex; align-items: center; height: 38px; padding: 0 20px; border-radius: 999px; font-weight: 800; font-size: 13.5px; color: var(--ink-2); cursor: pointer; transition: all var(--dur-2) var(--ease); }
.kind-opt.is-truth input:checked + span { background: var(--grad-gold); color: #1b1206; }
.kind-opt.is-dare input:checked + span { background: var(--grad-cran); color: #fff; }
.kind-opt input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }
.dropzone-sm { padding: 14px; }

.qcols { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }
.qcol-head { display: flex; align-items: baseline; justify-content: center; gap: 12px; margin-bottom: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--line); text-align: center; }
.qcol-head h2 { font-size: 36px; }
.qcol-head .num { font-weight: 800; color: var(--muted); }
.qcol.is-truth .qcol-head h2 { color: var(--gold-2); }
.qcol.is-dare .qcol-head h2 { color: var(--cran); }
html[data-theme="light"] .qcol.is-truth .qcol-head h2 { color: var(--gold-deep); }
.qcol { display: grid; gap: 10px; }
.qcol.is-folded .qcard:nth-of-type(n + 13) { display: none; }
.qcol-more { justify-self: center; margin-top: 8px; }
.qcol:not(.is-folded) .qcol-more { display: none; }
.qcard {
  position: relative;
  display: grid;
  gap: 12px;
  padding: 18px 20px 18px 58px;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--line-soft);
  transition: border-color var(--dur-2) var(--ease), transform var(--dur-2) var(--ease);
}
.qcard::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 2px; border-radius: 2px; }
.qcol.is-truth .qcard::before { background: var(--grad-gold); }
.qcol.is-dare .qcard::before { background: var(--grad-cran); }
.qcard:hover { border-color: var(--line-2); }
.qcard-n { position: absolute; left: 18px; top: 17px; font-family: var(--display); font-style: italic; font-size: 20px; color: var(--faint); }
html[data-theme="light"] .qcard-n { color: var(--muted); }
.qcard-text { font-size: 15.5px; line-height: 1.55; color: var(--ink); }
.qcard-media { width: 100%; max-height: 260px; border-radius: var(--r-sm); object-fit: cover; }
.qcard-yt { aspect-ratio: 16 / 9; height: auto; max-height: none; border: 0; }
audio.qcard-media { height: 40px; }
.qcard-edit summary { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--gold); cursor: pointer; list-style: none; }
.qcard-edit summary::-webkit-details-marker { display: none; }
.qcard-edit summary .ico { width: 15px; height: 15px; }
.qcard-edit[open] summary { margin-bottom: 14px; }
.qcard-delete { margin-top: 12px; }

.pack-form { gap: 22px; }
.pack-form .modes { grid-template-columns: repeat(4, 1fr); }
.pack-form .mode-card { aspect-ratio: 1; }
.form-foot { justify-content: flex-end; }

@media (max-width: 900px) {
  .pack-hero-grid { grid-template-columns: 1fr; }
  .pack-cover-lg { width: min(260px, 70%); aspect-ratio: 4 / 5; }
  .qcols, .composer-form, .composer-media { grid-template-columns: 1fr; }
  .pack-form .modes { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .pcards { grid-template-columns: 1fr; }
  .pack-stats div { min-width: 0; flex: 1; }
}
/* ==========================================================================
   PROFILE
   ========================================================================== */

.pf-banner { position: relative; height: clamp(220px, 28vw, 340px); margin-top: calc(-1 * var(--nav-h)); overflow: hidden; background: radial-gradient(90% 120% at 30% 0%, rgba(122, 20, 48, 0.55), transparent 60%), radial-gradient(60% 90% at 90% 20%, rgba(217, 183, 122, 0.18), transparent 60%), var(--bg-2); }
.pf-banner-img { width: 100%; height: 100%; object-fit: cover; object-position: center 40%; }
.pf-banner-scrim { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(7, 6, 10, 0.55) 0%, transparent 35%, transparent 55%, var(--bg) 100%); }
html[data-theme="light"] .pf-banner-img { opacity: 0.9; }
.pf-shell { position: relative; margin-top: -92px; }
.pf-head { display: grid; grid-template-columns: auto 1fr auto; align-items: end; gap: 28px; overflow: visible; }
.pf-portrait { box-shadow: 0 0 0 6px var(--bg), var(--shadow-3); }
.pf-portrait.cos-frame { margin-right: 12px; box-shadow: 0 0 0 4px var(--bg), var(--shadow-3); }
.pf-id { display: grid; justify-items: start; gap: 0; padding-bottom: 6px; min-width: 0; }
.pf-name { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 12px; margin: 6px 0 12px; font-size: clamp(28px, 3.6vw, 56px); line-height: 1.05; overflow: visible; overflow-wrap: anywhere; word-break: break-word; max-width: 100%; }
.pf-line {
  display: flex;
  flex-flow: row nowrap;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  min-width: 0;
}
.pf-id .cos-title {
  flex: 0 0 auto;
  max-width: none;
  font-size: clamp(16px, 1.6vw, 22px);
  padding: 6px 14px 7px 12px;
  white-space: nowrap;
  text-align: left;
}
.pf-title-empty {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px 6px;
  border-radius: 999px;
  font-family: var(--display);
  font-style: italic;
  font-size: 15px;
  color: var(--muted);
  box-shadow: 0 0 0 1px var(--line-2) inset;
}
.pf-title-empty:hover { color: var(--gold); box-shadow: 0 0 0 1px rgba(217, 183, 122, 0.5) inset; }
.pf-card {
  display: grid;
  gap: 10px;
  padding: 16px 16px 14px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  overflow: visible;
}
.pf-card .eyebrow { margin: 0; }
.pf-card .more-link { justify-self: start; }
.pf-motto {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  width: 100%;
  min-height: 52px;
  padding: 10px 16px;
  border-radius: var(--r-sm);
  font-family: var(--display);
  font-style: italic;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.25;
  color: var(--gold-2);
  background: rgba(7, 6, 10, 0.45);
}
.pf-motto.has-plaque {
  position: relative;
  height: 56px;
  min-height: 56px;
  padding: 0 13%;
  border-radius: 0;
  background: transparent var(--plaque) center / 100% 100% no-repeat;
  color: var(--gold-2);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.85);
}
.pf-motto.is-empty .pf-motto-text { opacity: 0.4; }
.pf-motto-text {
  position: relative;
  z-index: 1;
  max-width: 100%;
  overflow: hidden;
  text-align: center;
  white-space: nowrap;
  text-overflow: ellipsis;
  line-height: 1.2;
}
.pf-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; padding-bottom: 8px; }
.pf-actions .btn.is-on { --btn-ink: var(--danger); }
.pf-blocked { display: flex; align-items: center; gap: 10px; margin-top: 18px; padding: 12px 16px; border-radius: var(--r-md); background: rgba(220, 80, 90, 0.1); color: var(--ink-2); font-size: 14px; }
.pf-blocked .ico { width: 18px; height: 18px; color: var(--danger); }
.pf-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-top: 64px; }
.stat-tile { position: relative; display: grid; justify-items: center; align-content: center; align-items: center; gap: 4px; min-height: 148px; padding: 22px 20px 28px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); overflow: hidden; color: inherit; text-decoration: none; text-align: center; }
a.stat-tile { cursor: pointer; transition: border-color var(--dur-2) var(--ease), transform var(--dur-2) var(--ease); }
a.stat-tile:hover { border-color: rgba(217, 183, 122, 0.5); transform: translateY(-1px); }
.stat-tile > span:first-child { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.stat-tile b { font-family: var(--display); font-size: 44px; font-weight: 600; line-height: 1.05; }
.stat-tile b i { font-style: normal; font-size: 22px; color: var(--muted); }
.stat-tile small { font-size: 12.5px; color: var(--muted); }
.stat-tile.is-gold { background: linear-gradient(160deg, rgba(217, 183, 122, 0.16), transparent 70%), var(--surface); border-color: rgba(217, 183, 122, 0.3); }
.stat-tile.is-gold b { background: var(--grad-gold); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat-tile.is-signs { background: linear-gradient(160deg, rgba(178, 107, 255, 0.12), transparent 70%), var(--surface); }
.meter { display: block; width: 100%; height: 4px; margin: 0; border-radius: 4px; background: var(--line); overflow: hidden; }
.stat-tile .meter { position: absolute; left: 20px; right: 20px; bottom: 16px; width: calc(100% - 40px); }
.meter > span { display: block; height: 100%; border-radius: inherit; background: var(--grad-gold); }
.pf-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 36px; margin-top: 44px; align-items: start; }
.pf-section + .pf-section { margin-top: 44px; }
.pf-side { display: grid; gap: 18px; }
.pf-side .pf-section { margin-top: 10px; }
.pf-settings h2 { font-size: 28px; margin-bottom: 14px; }
.pf-ok { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--ink-2); }
.pf-ok .ico { flex: none; width: 20px; height: 20px; color: var(--ok); }
.avatar-drop { padding: 22px 16px; }
.avatar-drop-face { position: relative; display: grid; place-items: center; width: 72px; height: 72px; margin-bottom: 4px; border-radius: 50%; background: var(--surface-2); box-shadow: 0 0 0 1px var(--line-2) inset; overflow: hidden; }
.avatar-drop-face img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.avatar-drop-face .ico { width: 26px; height: 26px; color: var(--gold); }
.showcase { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; align-items: stretch; }
.showcase .icard { height: 100%; padding: 7px 7px 8px; gap: 5px; align-content: start; cursor: default; }
.showcase .icard-name {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 0;
  font-size: 12.5px;
}
.showcase .icard-rar { font-size: 10px; letter-spacing: 0.06em; }
.showcase .icard-art { border-radius: 8px; }
.showcase .icard--plaque .icard-art,
.showcase .icard:has(.thumb--plaque) .icard-art {
  aspect-ratio: 1;
  background: transparent;
}
.showcase .icard--plaque .thumb--plaque img {
  object-fit: contain;
  padding: 18% 6%;
}
.showcase .icard-art .thumb-title { min-height: 0; font-size: 13px; font-style: italic; padding: 6px; }
.showcase .thumb--effect .thumb-effect { width: 40px; height: 40px; }
.showcase .thumb--bubble .thumb-bubble { font-size: 12px; padding: 6px 8px; }
.matches { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.match { display: grid; grid-template-columns: 58px 1fr auto 64px; align-items: center; gap: 16px; padding: 14px 18px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line-soft); }
.match-place { display: grid; justify-items: center; font-family: var(--display); font-size: 30px; font-weight: 600; line-height: 1; color: var(--ink-2); }
.match-place small { font-family: var(--sans); font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.match.is-win .match-place { color: var(--gold); }
.match-main { display: grid; gap: 3px; min-width: 0; }
.match-main b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.match-main small { color: var(--muted); font-size: 12.5px; }
.match-score { font-weight: 700; }
.match-score small { color: var(--muted); font-weight: 600; }
.match-delta { justify-self: end; padding: 4px 10px; border-radius: 999px; font-weight: 800; font-size: 13.5px; background: var(--line-soft); color: var(--muted); }
.match-delta.is-up { background: rgba(95, 207, 152, 0.14); color: var(--ok); }
.match-delta.is-down { background: rgba(220, 80, 90, 0.12); color: var(--danger); }
.mini-packs { display: grid; gap: 8px; }
.mini-pack { display: flex; align-items: center; gap: 14px; padding: 8px; padding-right: 14px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line-soft); transition: border-color var(--dur-2) var(--ease); }
.mini-pack:hover { border-color: var(--line-2); }
.mini-pack img { width: 54px; height: 54px; flex: none; border-radius: var(--r-sm); object-fit: cover; }
.mini-pack span { display: grid; gap: 2px; min-width: 0; }
.mini-pack b { font-family: var(--display); font-size: 20px; font-weight: 600; line-height: 1.1; }
.mini-pack small { font-size: 12.5px; color: var(--muted); }

@media (max-width: 1100px) {
  .pf-grid { grid-template-columns: 1fr; }
  .pf-stats { grid-template-columns: repeat(3, 1fr); }
  .pf-side { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
  .pf-card, .pf-packs { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .pf-shell { margin-top: -70px; }
  .pf-head { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 14px; }
  .pf-portrait { --size: 124px !important; }
  .pf-portrait.cos-frame { margin: 0; }
  .pf-id { justify-items: center; }
  .pf-line { justify-content: center; flex-wrap: wrap; }
  .pf-id .cos-title { text-align: center; justify-content: center; }
  .pf-motto.has-plaque { height: 48px; min-height: 48px; }
  .pf-name { justify-content: center; }
  .pf-actions { justify-content: center; }
  .pf-stats { grid-template-columns: 1fr 1fr; }
  .pf-stats .stat-tile:first-child { grid-column: 1 / -1; }
  .showcase { grid-template-columns: repeat(2, 1fr); }
  .match { grid-template-columns: 46px 1fr auto; }
  .match-score { display: none; }
}
/* ==========================================================================
   RATING
   ========================================================================== */

.page-head-center { justify-content: center; text-align: center; }
.page-head-center .lede { margin-inline: auto; }
.page-head-center .eyebrow { justify-content: center; }
.podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; align-items: end; gap: 18px; max-width: 980px; margin: 40px auto 0; overflow: visible; }
.podium-seat { position: relative; display: grid; justify-items: center; align-content: end; gap: 8px; text-align: center; overflow: visible; transition: transform var(--dur-3) var(--ease); }
.podium-seat:hover { transform: translateY(-4px); }
.podium-face { position: relative; margin-bottom: 8px; padding: 8px 0 16px; overflow: visible; }
.podium-face:has(.cos-frame) { padding: 36px 28px 16px; }
.podium-face .cos-portrait { box-shadow: 0 0 0 4px var(--bg), var(--shadow-3); }
.podium-seat .cos-title { justify-content: center; max-width: min(100%, 220px); white-space: normal; text-align: center; }
.podium-medal { position: absolute; left: 50%; bottom: -12px; z-index: 3; display: grid; place-items: center; width: 34px; height: 34px; transform: translateX(-50%); border-radius: 50%; font-family: var(--display); font-size: 19px; font-weight: 700; color: #1b1206; box-shadow: 0 0 0 3px var(--bg), 0 6px 16px rgba(0, 0, 0, 0.4); }
.is-1 .podium-medal { background: var(--grad-gold); width: 40px; height: 40px; font-size: 22px; }
.is-2 .podium-medal { background: linear-gradient(135deg, #f1f3f6, #9aa1ad); }
.is-3 .podium-medal { background: linear-gradient(135deg, #f0c29c, #9c5a2e); }
.podium-name { display: inline-flex; align-items: center; gap: 8px; margin-top: 8px; font-family: var(--display); font-size: 26px; font-weight: 600; line-height: 1.1; }
.is-1 .podium-name { font-size: 32px; }
.podium-block { display: grid; gap: 4px; width: 100%; margin-top: 10px; padding: 22px 12px 26px; border-radius: var(--r-lg) var(--r-lg) 6px 6px; background: var(--surface); border: 1px solid var(--line); border-bottom: 0; }
.is-1 .podium-block { padding-block: 34px 44px; background: linear-gradient(180deg, rgba(217, 183, 122, 0.2), transparent 90%), var(--surface); border-color: rgba(217, 183, 122, 0.35); box-shadow: 0 -20px 60px -30px rgba(217, 183, 122, 0.6); }
.is-2 .podium-block { padding-block: 26px 30px; }
.podium-block b { font-family: var(--display); font-size: 44px; font-weight: 600; line-height: 1; }
.is-1 .podium-block b { font-size: 60px; background: var(--grad-gold); -webkit-background-clip: text; background-clip: text; color: transparent; }
.podium-block small { color: var(--muted); font-size: 12.5px; font-weight: 600; }
.podium-seat.is-me .podium-block { box-shadow: 0 0 0 2px var(--cran-2) inset; }

.ranks { max-width: 980px; margin: 0 auto; padding: 8px; border-radius: var(--r-lg); }
.ranks-head, .rank { display: grid; grid-template-columns: 64px minmax(0, 1fr) 90px 90px 110px; align-items: center; gap: 12px; padding: 0 16px; }
.ranks-head { height: 42px; font-size: 11px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.ranks-head span:nth-child(n + 3) { text-align: right; }
.ranks-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.rank { min-height: 62px; border-radius: var(--r-md); transition: background var(--dur-2) var(--ease); }
.rank:hover { background: var(--line-soft); }
.rank.is-me { background: linear-gradient(90deg, rgba(196, 42, 82, 0.2), transparent 80%); box-shadow: 0 0 0 1px rgba(196, 42, 82, 0.4) inset; }
.rank-place { font-family: var(--display); font-size: 24px; font-weight: 600; color: var(--muted); }
.rank-who { display: flex; align-items: center; gap: 14px; min-width: 0; padding-block: 6px; }
.rank-who .cos-frame { margin: 8px 4px; }
.rank-name { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; min-width: 0; }
.rank-name b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-name .cos-title { font-size: 12px; }
.rank-stat { text-align: right; color: var(--ink-2); font-weight: 600; }
.rank-score { text-align: right; font-family: var(--display); font-size: 26px; font-weight: 600; }
.rank-note { display: flex; align-items: center; gap: 12px; max-width: 980px; margin: 18px auto 0; padding: 16px 20px; font-size: 14px; color: var(--ink-2); }
.rank-note .ico { flex: none; width: 22px; height: 22px; color: var(--gold); }
.rating-page .podium + .ranks { margin-top: 0; }

@media (max-width: 760px) {
  .podium { gap: 8px; margin-top: 24px; }
  .podium .cos-portrait { --size: 72px !important; }
  .is-1 .podium .cos-portrait, .podium .is-1 .cos-portrait { --size: 92px !important; }
  .podium-face { padding: 8px 0 10px; }
  .podium-face:has(.cos-frame) { padding: 22px 12px 12px; }
  .podium-name, .is-1 .podium-name { font-size: 17px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
  .podium-block b { font-size: 30px; }
  .is-1 .podium-block b { font-size: 38px; }
  .podium-block small { font-size: 11px; }
  .podium-seat .cos-title { font-size: 11px; padding: 3px 8px 4px 7px; max-width: 100%; }
  .ranks-head, .rank { grid-template-columns: 38px minmax(0, 1fr) 70px; padding: 0 10px; }
  .ranks-head span:nth-child(3), .ranks-head span:nth-child(4), .rank-stat { display: none; }
}
/* @end */

.hall-role {
  display: inline-flex;
  align-items: center;
  margin-left: 2px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ok);
}
.hall-role-root { color: var(--gold-2); font-size: 13px; letter-spacing: 0; text-transform: none; }
.hall-role-admin { color: var(--gold); }
.hall-role-mod { color: var(--ok); }

/* ==========================================================================
   SPARKS / CASHIER
   ========================================================================== */
body.page-sparks .topbar:not(.is-scrolled) {
  background: linear-gradient(180deg, rgba(7, 6, 10, 0.62), transparent);
  border-bottom-color: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.page-sparks {
  max-width: none;
  padding-top: 0;
  padding-left: 0;
  padding-right: 0;
}
.spk-hero {
  position: relative;
  isolation: isolate;
  min-height: clamp(320px, 42vw, 460px);
  margin: calc(-1 * var(--nav-h)) 0 28px;
  padding-top: var(--nav-h);
  overflow: hidden;
  border: 0;
  border-radius: 0;
}
.spk-hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.spk-hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7, 6, 10, 0.15) 0%, rgba(7, 6, 10, 0.72) 72%, var(--bg) 100%);
}
.spk-hero-in {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: end;
  gap: 12px;
  min-height: inherit;
  max-width: var(--wide);
  margin: 0 auto;
  padding: clamp(28px, 4vw, 48px) var(--page-x) clamp(32px, 5vw, 56px);
}
.spk-hero-in h1 { margin: 0; }
.spk-hero-in .lede { margin: 0; max-width: 58ch; }
.spk-hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 6px; }
.page-sparks .spk-balance,
.page-sparks .spk-grid,
.page-sparks .spk-note {
  width: min(var(--wide), calc(100% - 2 * var(--page-x)));
  max-width: var(--wide);
  margin-left: auto;
  margin-right: auto;
}
.page-sparks .spk-balance {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px 28px;
  padding: 22px 26px;
  margin-bottom: 28px;
  border-radius: var(--r-lg);
  background: linear-gradient(135deg, rgba(217, 183, 122, 0.18), transparent 62%), var(--surface);
  border: 1px solid rgba(217, 183, 122, 0.32);
}
.page-sparks .spk-balance > div { display: grid; gap: 4px; min-width: 0; }
.page-sparks .spk-balance span {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.page-sparks .spk-balance b {
  font-family: var(--display);
  font-size: clamp(40px, 6vw, 64px);
  font-weight: 600;
  line-height: 1;
  background: var(--grad-gold);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.page-sparks .spk-balance small { color: var(--ink-2); font-size: 13.5px; max-width: 46ch; }
.spk-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.spk-card {
  position: relative;
  display: grid;
  grid-template-rows: 168px 1fr;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  overflow: hidden;
}
.spk-art {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #0c0a10;
}
.spk-card-in {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 16px 18px 18px;
}
.spk-tag {
  justify-self: start;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #1b1206;
  background: var(--grad-gold);
}
.spk-name {
  margin: 4px 0 0;
  font-family: var(--display);
  font-size: 28px;
  font-weight: 600;
  line-height: 1.1;
}
.spk-sparks {
  margin: 0;
  font-family: var(--display);
  font-size: 40px;
  font-weight: 600;
  line-height: 1;
  color: var(--gold);
}
.spk-sparks small {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
}
.spk-rub {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
}
.spk-body { margin: 0 0 8px; color: var(--ink-2); font-size: 14px; line-height: 1.45; max-width: 36ch; }
.spk-note { margin: 22px 0 0; max-width: 62ch; }
.spk-closed { width: min(440px, calc(100vw - 28px)); }
.spk-closed-pack {
  margin: 0;
  padding: 12px 14px;
  border-radius: var(--r-md);
  background: rgba(217, 183, 122, 0.08);
  box-shadow: 0 0 0 1px rgba(217, 183, 122, 0.28) inset;
  color: var(--gold-2);
  font-weight: 700;
}
@media (max-width: 900px) {
  .spk-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .spk-grid { grid-template-columns: 1fr; }
  .spk-hero-in { padding: 22px 18px 20px; }
}
