/* ============================================================
   Trick or Drink referral engine skin (variant "tod")
   Used by public/variants/tod/{referral,login,dashboard}.html on the
   promoter-torh instance only. Mirrors the trickordrink.ca design
   system: Anton display, Manrope body, JetBrains Mono labels, ember
   red on near-black, skull texture hero. Self-contained: does NOT
   depend on styles.css. Bump ?v= in the page <link> when editing.
   ============================================================ */

:root {
  --bg: #08090f;
  --bg-2: #0c0e16;
  --card: #10131c;
  --card-2: #161922;
  --elev: #1b1f2a;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --line-3: rgba(255, 255, 255, 0.22);
  --ember: #df0133;
  --ember-bright: #ff3366;
  --ember-deep: #7a0a1f;
  --pumpkin: #ea580c;
  --amber: #f59e0b;
  --bone: #f5f5f4;
  --ink: #cbd2dd;
  --fog: #94a3b8;
  --fog-dim: #64748b;
  --green: #34d399;
  --red: #f87171;
  --yellow: #fbbf24;
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 32px;
  --display: 'Anton', 'Bebas Neue', Impact, 'Arial Narrow', sans-serif;
  --body: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --gradient: linear-gradient(135deg, #df0133 0%, #ff3366 55%, #ea580c 100%);
  --glow: 0 12px 30px -10px rgba(223, 1, 51, 0.7);
  --glow-soft: 0 0 0 1px rgba(223, 1, 51, 0.35), 0 8px 32px -8px rgba(223, 1, 51, 0.45);
  --shadow-card: 0 1px 0 rgba(255, 255, 255, 0.05) inset, 0 24px 48px -24px rgba(0, 0, 0, 0.6);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  color-scheme: dark;
}

/* ---------- reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--bone);
  font: 400 16px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  min-height: 100vh;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.015em;
  line-height: 1.02;
}
h1 { font-size: clamp(44px, 8vw, 84px); line-height: 0.98; }
h2 { font-size: clamp(30px, 4.6vw, 46px); }
h3 { font-size: clamp(20px, 2.6vw, 24px); }
p { margin: 0; }
.accent {
  color: var(--ember-bright);
  background: linear-gradient(90deg, #ff3344, #ff6b35);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.muted { color: var(--fog); }
.dim { color: var(--fog-dim); }
.small { font-size: 13px; }
.center { text-align: center; }
.mono { font-family: var(--mono); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; top: -100px; left: 8px; z-index: 1000;
  background: var(--ember); color: #fff; padding: 12px 16px;
  border-radius: 8px; font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 8px; outline: 2px solid #fff; outline-offset: 2px; }
button:focus-visible, a:focus-visible, input:focus-visible,
textarea:focus-visible, [tabindex]:focus-visible, summary:focus-visible {
  outline: 2px solid var(--ember-bright);
  outline-offset: 3px;
}
::selection { background: rgba(223, 1, 51, 0.45); color: #fff; }

/* ---------- layout ---------- */
.wrap { width: min(1120px, 100% - 40px); margin-inline: auto; min-width: 0; }
.wrap-narrow { width: min(640px, 100% - 40px); margin-inline: auto; min-width: 0; }
.wrap-mid { width: min(860px, 100% - 40px); margin-inline: auto; min-width: 0; }
@media (max-width: 599px) {
  .wrap, .wrap-narrow, .wrap-mid { width: calc(100% - 32px); }
}
.section { padding: 64px 0; }
.section-tight { padding: 40px 0; }
.stack { display: grid; gap: 16px; min-width: 0; }
.stack-sm { display: grid; gap: 8px; min-width: 0; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.between { justify-content: space-between; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 599px) { .grid-2 { grid-template-columns: minmax(0, 1fr); } }

/* ---------- topbar ---------- */
.top {
  position: sticky; top: 0; z-index: 60;
  background: rgba(8, 9, 15, 0.78);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.top-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; min-height: 64px; padding: 8px 0;
}
.top-logo { display: inline-flex; align-items: center; text-decoration: none; min-height: 44px; }
.top-logo img { height: 30px; width: auto; }
.top-nav { display: flex; align-items: center; gap: 8px; }
.top-link {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--fog); text-decoration: none;
  padding: 10px 12px; border-radius: 10px; min-height: 44px;
  display: inline-flex; align-items: center;
}
.top-link:hover { color: var(--bone); background: rgba(255, 255, 255, 0.05); }
@media (max-width: 599px) { .top-link.hide-sm { display: none; } }

/* ---------- eyebrow / pills / badges ---------- */
.eyebrow {
  font-family: var(--mono); font-size: 11px; font-weight: 500;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--fog);
}
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line-2);
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--bone); white-space: nowrap;
}
.pill::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--ember); box-shadow: 0 0 10px var(--ember); flex-shrink: 0;
}
.pill.pumpkin::before { background: var(--pumpkin); box-shadow: 0 0 10px var(--pumpkin); }
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px; border-radius: 999px;
  font: 700 12px/1.2 var(--body);
  background: rgba(255, 255, 255, 0.07); color: var(--ink);
  border: 1px solid var(--line);
}
.badge-ember { background: rgba(223, 1, 51, 0.16); color: #ffb3b9; border-color: rgba(223, 1, 51, 0.35); }
.badge-green { background: rgba(52, 211, 153, 0.14); color: var(--green); border-color: rgba(52, 211, 153, 0.3); }
.badge-yellow { background: rgba(251, 191, 36, 0.14); color: var(--yellow); border-color: rgba(251, 191, 36, 0.3); }
.badge-red { background: rgba(248, 113, 113, 0.14); color: var(--red); border-color: rgba(248, 113, 113, 0.3); }
.badge-grey { background: rgba(255, 255, 255, 0.06); color: var(--fog); }

/* ---------- buttons ---------- */
.btn {
  min-height: 52px;
  font-family: var(--display); font-weight: 400; font-size: 17px;
  letter-spacing: 0.08em; text-transform: uppercase;
  border-radius: 14px; padding: 0 24px; border: 0;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform 0.15s var(--ease), box-shadow 0.2s var(--ease), background 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn[disabled] { opacity: 0.6; cursor: not-allowed; }
.btn-primary {
  background: linear-gradient(135deg, #e11d2e, #ff3344);
  color: #fff;
  box-shadow: 0 12px 30px -10px rgba(223, 1, 51, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.btn-primary:hover { box-shadow: 0 16px 36px -10px rgba(223, 1, 51, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.22); }
.btn-ghost {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line-2); color: var(--bone);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.09); border-color: var(--line-3); }
.btn-soft {
  background: rgba(223, 1, 51, 0.14); color: #ffd9dc;
  border: 1px solid rgba(223, 1, 51, 0.35);
}
.btn-soft:hover { background: rgba(223, 1, 51, 0.22); }
.btn-sm { min-height: 44px; font-size: 14px; padding: 0 16px; border-radius: 12px; letter-spacing: 0.07em; }
.btn-lg { min-height: 60px; font-size: 20px; padding: 0 32px; }
.btn-block { width: 100%; }
.btn svg { width: 20px; height: 20px; fill: currentColor; flex-shrink: 0; }

/* ---------- cards ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 24px;
  box-shadow: var(--shadow-card);
  min-width: 0;
}
.card-2 { background: var(--card-2); }
.card-hot { border-color: rgba(223, 1, 51, 0.4); box-shadow: var(--glow-soft), var(--shadow-card); }
.card-flat { box-shadow: none; }
.card-pad-sm { padding: 18px; }
@media (max-width: 599px) { .card { padding: 18px; border-radius: 18px; } }

/* ---------- forms ---------- */
label { display: block; font: 700 13px/1.3 var(--body); color: var(--ink); margin: 0 0 8px; }
label .opt { font-weight: 500; color: var(--fog-dim); }
input:not([type='checkbox']):not([type='radio']), select, textarea {
  width: 100%; min-height: 52px;
  background: var(--bg-2); color: var(--bone);
  border: 1px solid var(--line-2); border-radius: 12px;
  padding: 12px 14px; font: 500 16px/1.4 var(--body);
  transition: border-color 0.15s, box-shadow 0.15s;
  -webkit-appearance: none; appearance: none;
}
textarea { min-height: 120px; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--fog-dim); }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--ember);
  box-shadow: 0 0 0 3px rgba(223, 1, 51, 0.22);
}
input[aria-invalid='true'] { border-color: var(--red); }
.field { min-width: 0; }
.field-hint { font-size: 12.5px; color: var(--fog-dim); margin-top: 6px; }
.check {
  display: flex; gap: 12px; align-items: flex-start;
  font: 500 14px/1.5 var(--body); color: var(--ink); cursor: pointer;
}
.check input {
  width: 20px; height: 20px; margin: 2px 0 0; flex-shrink: 0;
  accent-color: var(--ember);
}
.flash {
  padding: 12px 14px; border-radius: 12px; font-size: 14px; line-height: 1.5;
  border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.04); color: var(--ink);
}
.flash-success { background: rgba(52, 211, 153, 0.1); border-color: rgba(52, 211, 153, 0.3); color: #a7f3d0; }
.flash-warn { background: rgba(251, 191, 36, 0.1); border-color: rgba(251, 191, 36, 0.3); color: #fde68a; }
.flash-error { background: rgba(248, 113, 113, 0.1); border-color: rgba(248, 113, 113, 0.3); color: #fecaca; }
.flash-ember { background: rgba(223, 1, 51, 0.1); border-color: rgba(223, 1, 51, 0.35); color: #ffd9dc; }
.flash code { font-family: var(--mono); font-size: 13px; }

/* combobox (city picker) */
.combo { position: relative; min-width: 0; }
.combo-list {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px);
  max-height: 260px; overflow-y: auto; z-index: 40;
  background: var(--elev); border: 1px solid var(--line-2);
  border-radius: 12px; padding: 6px; margin: 0; list-style: none;
  box-shadow: 0 24px 48px -16px rgba(0, 0, 0, 0.7);
}
.combo-list[hidden] { display: none; }
.combo-opt {
  padding: 11px 12px; border-radius: 8px; cursor: pointer;
  font-size: 15px; color: var(--ink); min-height: 44px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.combo-opt[aria-selected='true'], .combo-opt:hover { background: rgba(223, 1, 51, 0.18); color: var(--bone); }
.combo-opt .k { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; color: var(--fog-dim); text-transform: uppercase; }
.combo-empty { padding: 12px; color: var(--fog); font-size: 14px; }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: 72px 0 56px;
  text-align: center;
  isolation: isolate;
}
.hero::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background-image:
    linear-gradient(180deg, rgba(8, 9, 15, 0.5) 0%, rgba(8, 9, 15, 0.82) 60%, #08090f 98%),
    radial-gradient(ellipse at 50% -10%, rgba(223, 1, 51, 0.32), transparent 55%),
    url('https://trickordrink.ca/assets/hero-skull-d.webp');
  background-size: auto, auto, cover;
  background-position: center, center, center 22%;
  background-repeat: no-repeat;
}
@media (max-width: 599px) {
  .hero { padding: 48px 0 40px; }
  .hero::before {
    background-image:
      linear-gradient(180deg, rgba(8, 9, 15, 0.5) 0%, rgba(8, 9, 15, 0.86) 60%, #08090f 98%),
      radial-gradient(ellipse at 50% -10%, rgba(223, 1, 51, 0.32), transparent 55%),
      url('https://trickordrink.ca/assets/hero-skull-m.webp');
  }
}
.hero-logo { width: min(300px, 70vw); margin: 0 auto 18px; filter: drop-shadow(0 12px 30px rgba(0, 0, 0, 0.6)); }
.hero-pills { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-bottom: 22px; }
.hero h1 { margin: 0 auto; max-width: 22ch; }
.hero .lead {
  font-size: clamp(16px, 2.1vw, 19px); color: var(--ink);
  max-width: 560px; margin: 20px auto 0; line-height: 1.6;
}
.hero .lead strong { color: var(--bone); }
.hero-cta { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 28px; }
.hero-proof {
  margin-top: 22px; font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--fog);
}
.hero-proof b { color: var(--bone); font-weight: 500; }

/* dashboard variant: left aligned, shorter */
.hero.hero-dash { text-align: left; padding: 40px 0 28px; }
.hero.hero-dash h1 { margin: 0; max-width: none; font-size: clamp(38px, 6.5vw, 64px); }
.hero.hero-dash .lead { margin: 14px 0 0; max-width: 620px; }

/* ---------- section headings ---------- */
.sec-head { display: grid; gap: 10px; margin-bottom: 24px; }
.sec-head.center { justify-items: center; text-align: center; }
.sec-head p { color: var(--fog); max-width: 560px; }
.sec-head h2 { max-width: 20ch; }

/* ---------- ladder (reward tiers) ---------- */
.ladder {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px; min-width: 0;
}
@media (max-width: 819px) { .ladder { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tier {
  position: relative; min-width: 0;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 20px 18px 18px;
  display: grid; gap: 8px; align-content: start;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.tier .t-n { font-family: var(--display); font-size: 46px; line-height: 0.95; color: var(--bone); }
.tier .t-n small { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; color: var(--fog); margin-left: 6px; text-transform: uppercase; }
.tier .t-name { font: 800 15px/1.2 var(--body); color: var(--bone); text-transform: uppercase; letter-spacing: 0.04em; }
.tier .t-desc { font-size: 13.5px; line-height: 1.5; color: var(--fog); }
.tier .t-state { position: absolute; top: 14px; right: 14px; }
.tier.current { border-color: rgba(223, 1, 51, 0.55); box-shadow: var(--glow-soft); background: linear-gradient(180deg, rgba(223, 1, 51, 0.08), transparent 60%), var(--card); }
.tier.done { border-color: rgba(52, 211, 153, 0.35); }
.tier.done .t-n { color: var(--green); }
.tier.locked .t-n { color: var(--ink); }
.tier .t-bar { height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.07); overflow: hidden; margin-top: 4px; }
.tier .t-bar i { display: block; height: 100%; background: var(--gradient); border-radius: 3px; transition: width 0.7s var(--ease); }

/* ---------- steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 719px) { .steps { grid-template-columns: minmax(0, 1fr); } }
.step { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); padding: 22px 20px; min-width: 0; }
.step .s-n { font-family: var(--mono); font-size: 11px; letter-spacing: 0.22em; color: var(--ember-bright); margin-bottom: 12px; }
.step h3 { margin-bottom: 8px; }
.step p { color: var(--fog); font-size: 14.5px; }

/* ---------- link box / code ---------- */
.linkbox {
  display: flex; align-items: center; gap: 10px; min-width: 0;
  background: var(--bg-2); border: 1px dashed var(--line-3);
  border-radius: 12px; padding: 12px 14px;
  font: 500 13px/1.45 var(--mono); color: var(--ink);
  overflow-wrap: anywhere; word-break: break-all;
}
.linkbox b { color: var(--bone); font-weight: 500; }
.code-big {
  font-family: var(--display); font-size: clamp(34px, 7vw, 56px);
  letter-spacing: 0.08em; color: var(--bone); line-height: 1;
}

/* ---------- share channels ---------- */
.share-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px; max-width: 480px; margin: 0 auto;
}
.share-ch {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 8px 2px; background: transparent; border: 0; cursor: pointer;
  text-decoration: none; min-width: 0; -webkit-tap-highlight-color: transparent;
  transition: transform 0.12s;
}
.share-ch:active { transform: scale(0.93); }
.share-ic {
  width: 56px; height: 56px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}
.share-ic svg { width: 28px; height: 28px; fill: #fff; }
.share-ic.wa { background: #25d366; }
.share-ic.sms { background: #34c759; }
.share-ic.ig { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fd5949 45%, #d6249f 60%, #285aeb 90%); }
.share-ic.mail { background: #3b82f6; }
.share-ic.copy { background: var(--elev); border: 1px solid var(--line-2); }
.share-lb { font: 700 12px/1.2 var(--body); color: var(--fog); }
@media (max-width: 360px) { .share-ic { width: 50px; height: 50px; } .share-ic svg { width: 24px; height: 24px; } }

/* ---------- stat tiles ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
@media (max-width: 599px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); padding: 16px; min-width: 0; display: grid; gap: 6px; align-content: start; }
.tile .t-l { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--fog); }
.tile .t-v { font-family: var(--display); font-size: 38px; line-height: 1; color: var(--bone); overflow-wrap: anywhere; }
.tile .t-v.sm { font-size: 24px; line-height: 1.15; }
.tile .t-s { font-size: 12.5px; color: var(--fog-dim); line-height: 1.4; }

/* ---------- event cards ---------- */
.ev-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 719px) { .ev-grid { grid-template-columns: minmax(0, 1fr); } }
.ev { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; min-width: 0; display: flex; flex-direction: column; }
.ev.ev-hot { border-color: rgba(223, 1, 51, 0.45); }
.ev-art { aspect-ratio: 2 / 1; background: var(--bg-2); position: relative; overflow: hidden; }
.ev-art img { width: 100%; height: 100%; object-fit: cover; }
.ev-art .ev-day { position: absolute; left: 12px; top: 12px; }
.ev-body { padding: 16px; display: grid; gap: 10px; min-width: 0; }
.ev-title { font: 800 15.5px/1.3 var(--body); color: var(--bone); }
.ev-meta { font-size: 13px; color: var(--fog); }
.ev-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.ev-actions .btn { flex: 1 1 auto; }

/* mini event chips (home city preview) */
.mini-ev { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.mini-ev a { text-decoration: none; min-width: 0; display: grid; gap: 6px; }
.mini-ev .m-art { aspect-ratio: 2 / 1; border-radius: 10px; overflow: hidden; background: var(--bg-2); border: 1px solid var(--line); }
.mini-ev .m-art img { width: 100%; height: 100%; object-fit: cover; }
.mini-ev .m-l { font: 700 12px/1.3 var(--body); color: var(--ink); }

/* ---------- progress ---------- */
.bar { height: 8px; border-radius: 4px; background: rgba(255, 255, 255, 0.07); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: var(--gradient); border-radius: 4px; transition: width 0.7s var(--ease); }

/* ---------- messages ---------- */
.thread-list { display: grid; gap: 8px; }
.thread {
  display: flex; gap: 12px; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-radius: 14px; cursor: pointer;
  background: var(--card-2); border: 1px solid var(--line); min-width: 0; text-align: left; width: 100%;
}
.thread:hover { border-color: var(--line-2); }
.thread .th-main { min-width: 0; flex: 1; }
.thread .th-sub { font: 700 15px/1.3 var(--body); color: var(--bone); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thread .th-meta { font-size: 12.5px; color: var(--fog-dim); margin-top: 2px; }
.unread-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ember-bright); box-shadow: 0 0 8px var(--ember); margin-right: 8px; vertical-align: middle; }
.bubbles { display: grid; gap: 10px; }
.bubble { max-width: 88%; padding: 12px 14px; border-radius: 16px; white-space: pre-wrap; line-height: 1.5; font-size: 15px; min-width: 0; overflow-wrap: anywhere; }
.bubble-admin { background: var(--card-2); border: 1px solid var(--line); border-top-left-radius: 6px; justify-self: start; }
.bubble-me { background: rgba(223, 1, 51, 0.16); border: 1px solid rgba(223, 1, 51, 0.3); border-top-right-radius: 6px; justify-self: end; }
.bubble .b-meta { font-size: 11.5px; color: var(--fog-dim); margin-bottom: 4px; display: flex; gap: 8px; justify-content: space-between; }
.bubble .b-meta b { color: var(--ink); font-weight: 700; }

/* ---------- misc components ---------- */
.notice {
  display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap;
  padding: 18px; border-radius: var(--r-md); border: 1px solid var(--line-2);
  background: var(--card-2);
}
.notice.sev-red { border-color: rgba(248, 113, 113, 0.4); background: rgba(248, 113, 113, 0.07); }
.notice.sev-yellow { border-color: rgba(251, 191, 36, 0.4); background: rgba(251, 191, 36, 0.07); }
.notice.sev-green { border-color: rgba(52, 211, 153, 0.4); background: rgba(52, 211, 153, 0.07); }
.notice .n-body { flex: 1 1 240px; min-width: 0; }
.notice .n-k { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.18em; text-transform: uppercase; margin-bottom: 4px; }
.sev-red .n-k { color: var(--red); } .sev-yellow .n-k { color: var(--yellow); } .sev-green .n-k { color: var(--green); }
.notice .n-h { font: 800 17px/1.3 var(--body); color: var(--bone); }
.notice .n-d { font-size: 14px; color: var(--ink); margin-top: 4px; line-height: 1.5; }
.notice .btn { align-self: center; }

.celebrate {
  position: relative; overflow: hidden; border: 0;
  background: var(--gradient); color: #fff; border-radius: var(--r-lg); padding: 28px;
  box-shadow: var(--glow);
}
.celebrate::after {
  content: ''; position: absolute; top: -60px; right: -60px; width: 240px; height: 240px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.22), transparent 70%); pointer-events: none;
}
.celebrate h2 { color: #fff; }
.celebrate .btn-white { background: #fff; color: #111; box-shadow: none; }
.celebrate .btn-outline { background: transparent; border: 1px solid rgba(255, 255, 255, 0.5); color: #fff; }

details.fold { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--card); }
details.fold > summary {
  list-style: none; cursor: pointer; padding: 18px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  font: 800 16px/1.3 var(--body); color: var(--bone); min-height: 56px;
}
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::after {
  content: ''; width: 10px; height: 10px; flex-shrink: 0;
  border-right: 2px solid var(--fog); border-bottom: 2px solid var(--fog);
  transform: rotate(45deg); transition: transform 0.2s; margin-right: 4px;
}
details.fold[open] > summary::after { transform: rotate(-135deg); }
details.fold > .fold-body { padding: 0 20px 20px; color: var(--ink); font-size: 15px; line-height: 1.6; }
details.fold > .fold-body p + p { margin-top: 8px; }

.list { margin: 0; padding-left: 20px; line-height: 1.7; color: var(--ink); }
.list li + li { margin-top: 4px; }
.rule { height: 1px; background: var(--line); border: 0; margin: 0; }
.kv { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; }
.kv + .kv { margin-top: 6px; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px);
  background: var(--elev); color: var(--bone); border: 1px solid var(--line-2);
  padding: 12px 18px; border-radius: 12px; font-size: 14px; font-weight: 600;
  opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s var(--ease); z-index: 100;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5); max-width: calc(100% - 32px);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.skeleton {
  position: relative; overflow: hidden; border-radius: 8px; background: rgba(255, 255, 255, 0.06);
  height: 14px; margin: 10px 0;
}
.skeleton::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
  animation: shimmer 1.4s infinite;
}
.skeleton.lg { height: 48px; border-radius: 14px; }
.skeleton.xl { height: 160px; border-radius: 18px; }
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

.state-empty { text-align: center; padding: 28px 16px; color: var(--fog); }
.state-empty .e-t { font: 800 17px/1.3 var(--body); color: var(--bone); margin-bottom: 6px; }
.state-error { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 16px; border-radius: 12px; border: 1px solid rgba(248, 113, 113, 0.35); background: rgba(248, 113, 113, 0.08); color: #fecaca; }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--line); padding: 48px 0 40px; text-align: center; color: var(--fog); font-size: 13px; }
.foot img { width: 150px; margin: 0 auto 12px; }
.foot-line { font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--fog); }
.foot-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; margin: 18px 0; }
.foot-links a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 13px; padding: 10px 4px; min-height: 44px; display: inline-flex; align-items: center; }
.foot-links a:hover { color: var(--bone); }
.foot-legal { max-width: 640px; margin: 0 auto; color: var(--fog-dim); font-size: 12px; line-height: 1.6; }

/* ---------- motion ---------- */
.reveal { animation: rise 0.6s var(--ease) both; }
.reveal-2 { animation-delay: 0.08s; }
.reveal-3 { animation-delay: 0.16s; }
.reveal-4 { animation-delay: 0.24s; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.pop { animation: pop 0.5s var(--ease); }
@keyframes pop { 0% { transform: scale(0.97); opacity: 0.6; } 60% { transform: scale(1.01); } 100% { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
