/* =====================================================================
   BoldOpinion.io — stylesheet
   Dark, colorful, glassy, mobile-first. CSS variables for theming.
   ===================================================================== */

:root {
  /* palette */
  --bg:        #0c0a1d;
  --bg-2:      #141029;
  --surface:   rgba(255,255,255,0.05);
  --surface-2: rgba(255,255,255,0.08);
  --stroke:    rgba(255,255,255,0.10);
  --text:      #f4f1ff;
  --text-dim:  #a39fc4;
  --text-mute: #6f6a93;

  /* neon accents */
  --c-purple: #a855f7;
  --c-pink:   #ec4899;
  --c-orange: #fb923c;
  --c-blue:   #38bdf8;
  --c-lime:   #a3e635;
  --c-yellow: #facc15;

  --up:   #22c55e;
  --down: #f43f5e;

  --grad-hot: linear-gradient(100deg, var(--c-orange), var(--c-pink) 55%, var(--c-purple));

  --radius:  20px;
  --radius-s: 12px;
  --shadow:  0 18px 50px -12px rgba(0,0,0,0.65);
  --maxw:    760px;

  --font-display: 'Bricolage Grotesque', system-ui, sans-serif;
  --font-body:    'Space Grotesk', system-ui, sans-serif;
}

/* light-ish theme variant */
body.light {
  --bg: #f3f0ff;
  --bg-2: #e9e4ff;
  --surface: rgba(20,16,41,0.04);
  --surface-2: rgba(20,16,41,0.07);
  --stroke: rgba(20,16,41,0.10);
  --text: #1a1430;
  --text-dim: #564f7a;
  --text-mute: #8b85ab;
  --shadow: 0 18px 50px -16px rgba(80,40,160,0.30);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: radial-gradient(1200px 800px at 80% -10%, #1c1340 0%, transparent 60%),
              radial-gradient(1000px 700px at -10% 10%, #2a103a 0%, transparent 55%),
              var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

/* floating background orbs */
.bg-orbs { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.orb { position: absolute; border-radius: 50%; filter: blur(70px); opacity: 0.35; }
.orb-1 { width: 380px; height: 380px; background: var(--c-purple); top: -80px; right: -60px; animation: drift 18s ease-in-out infinite; }
.orb-2 { width: 320px; height: 320px; background: var(--c-blue); bottom: 5%; left: -80px; animation: drift 22s ease-in-out infinite reverse; }
.orb-3 { width: 280px; height: 280px; background: var(--c-pink); top: 45%; right: 10%; animation: drift 26s ease-in-out infinite; }
@keyframes drift {
  0%,100% { transform: translate(0,0) scale(1); }
  50%     { transform: translate(30px,-40px) scale(1.12); }
}

/* =====================================================================
   HEADER
   ===================================================================== */
.site-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px;
  max-width: var(--maxw); margin: 0 auto;
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px);
  background: linear-gradient(to bottom, rgba(12,10,29,0.85), rgba(12,10,29,0.4));
  border-bottom: 1px solid var(--stroke);
}
body.light .site-header { background: linear-gradient(to bottom, rgba(243,240,255,0.9), rgba(243,240,255,0.5)); }

.brand { display: flex; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: 800; font-size: 1.35rem; }
.brand-flame { font-size: 1.3rem; filter: drop-shadow(0 0 8px rgba(251,146,60,0.6)); }
.brand-accent { background: var(--grad-hot); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.brand-tld { color: var(--text-mute); font-weight: 600; }

.header-nav { display: flex; gap: 8px; align-items: center; }
.btn-ghost {
  padding: 8px 14px; border-radius: 999px; font-size: 0.9rem; font-weight: 500;
  background: var(--surface); border: 1px solid var(--stroke);
  transition: transform .15s, background .2s;
}
.btn-ghost:hover { background: var(--surface-2); transform: translateY(-1px); }
.btn-ghost:active { transform: scale(.96); }

/* =====================================================================
   LAYOUT
   ===================================================================== */
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 16px 80px; }
.container.narrow { max-width: 640px; }

/* =====================================================================
   HERO + POST BOX
   ===================================================================== */
.hero { text-align: center; padding: 44px 0 24px; }
.hero-title {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(2.4rem, 8vw, 3.8rem); line-height: 1.02; letter-spacing: -0.02em;
}
.hero-grad { background: var(--grad-hot); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero-sub { color: var(--text-dim); max-width: 480px; margin: 16px auto 0; font-size: 1.02rem; }

.post-box {
  margin: 28px auto 0; max-width: 620px;
  background: var(--surface); border: 1px solid var(--stroke);
  border-radius: var(--radius); padding: 14px;
  box-shadow: var(--shadow);
  transition: border-color .25s, box-shadow .25s;
}
.post-box:focus-within { border-color: var(--c-purple); box-shadow: 0 0 0 4px rgba(168,85,247,0.18), var(--shadow); }
#opinionText {
  width: 100%; resize: none; background: transparent; border: none; outline: none;
  color: var(--text); font-size: 1.15rem; font-weight: 500; padding: 8px 6px;
  font-family: var(--font-body);
}
#opinionText::placeholder { color: var(--text-mute); }

.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.post-controls { display: flex; align-items: center; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
#opinionCat {
  background: var(--surface-2); color: var(--text); border: 1px solid var(--stroke);
  border-radius: 999px; padding: 8px 14px; font-size: 0.85rem; font-family: inherit; cursor: pointer;
}
#opinionCat option { background: var(--bg-2); color: var(--text); }
.char-count { color: var(--text-mute); font-size: 0.8rem; margin-left: auto; }
.char-count.warn { color: var(--c-orange); }

.btn-launch {
  background: var(--grad-hot); color: #fff; font-weight: 700; font-size: 0.95rem;
  padding: 11px 22px; border-radius: 999px;
  box-shadow: 0 8px 22px -6px rgba(236,72,153,0.55);
  transition: transform .15s, box-shadow .2s, filter .2s;
}
.btn-launch:hover { transform: translateY(-2px); filter: brightness(1.07); }
.btn-launch:active { transform: scale(.95); }
.btn-launch:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.stat-strip { display: flex; gap: 20px; justify-content: center; margin-top: 22px; color: var(--text-dim); font-size: 0.88rem; flex-wrap: wrap; }
.stat-strip strong { color: var(--text); font-family: var(--font-display); }

/* =====================================================================
   TAKE OF THE DAY
   ===================================================================== */
.totd {
  margin: 24px 0 8px; padding: 18px 20px;
  border-radius: var(--radius); position: relative; overflow: hidden;
  background: linear-gradient(120deg, rgba(250,204,21,0.14), rgba(251,146,60,0.10));
  border: 1px solid rgba(250,204,21,0.30);
}
.totd-label { font-size: 0.78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--c-yellow); }
.totd-text { display: block; font-family: var(--font-display); font-weight: 600; font-size: 1.25rem; margin: 6px 0; line-height: 1.25; }
.totd-text:hover { text-decoration: underline; text-decoration-color: var(--c-yellow); }
.totd-meta { color: var(--text-dim); font-size: 0.82rem; }

/* =====================================================================
   FILTER BAR + CATEGORY PILLS
   ===================================================================== */
.filter-bar {
  display: flex; gap: 8px; overflow-x: auto; padding: 16px 0 12px;
  position: sticky; top: 64px; z-index: 40;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
  background: linear-gradient(to bottom, var(--bg) 60%, transparent);
}
.filter-bar::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto; padding: 9px 15px; border-radius: 999px; font-size: 0.88rem; font-weight: 600;
  background: var(--surface); border: 1px solid var(--stroke); color: var(--text-dim);
  white-space: nowrap; transition: all .18s;
}
.chip:hover { color: var(--text); background: var(--surface-2); }
.chip.active { color: #fff; background: var(--grad-hot); border-color: transparent; box-shadow: 0 6px 16px -6px rgba(236,72,153,0.5); }

.cat-bar { display: flex; gap: 6px; overflow-x: auto; padding: 0 0 18px; scrollbar-width: none; }
.cat-bar::-webkit-scrollbar { display: none; }
.pill {
  flex: 0 0 auto; padding: 5px 12px; border-radius: 999px; font-size: 0.8rem; font-weight: 500;
  background: transparent; border: 1px solid var(--stroke); color: var(--text-mute); transition: all .18s;
}
.pill:hover { color: var(--text); border-color: var(--text-dim); }
.pill.active { color: var(--text); background: var(--surface-2); border-color: var(--text-dim); }

/* =====================================================================
   FEED + CARDS
   ===================================================================== */
.feed { display: flex; flex-direction: column; gap: 14px; }

.card {
  position: relative; background: var(--surface); border: 1px solid var(--stroke);
  border-radius: var(--radius); padding: 18px 18px 14px; overflow: hidden;
  backdrop-filter: blur(8px);
  transition: transform .2s, border-color .2s, box-shadow .2s;
  animation: cardIn .4s ease both;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
@keyframes cardIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* left accent bar by color index */
.card::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
}
.card.color-0::before { background: var(--c-purple); }
.card.color-1::before { background: var(--c-orange); }
.card.color-2::before { background: var(--c-blue); }
.card.color-3::before { background: var(--c-lime); }
.card.color-4::before { background: var(--c-pink); }
.card.color-5::before { background: var(--c-yellow); }

.card-top { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.card-cat {
  font-size: 0.72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--text-dim); background: var(--surface-2); padding: 3px 9px; border-radius: 999px;
}
.card-temp { font-size: 0.72rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; margin-left: auto; }
.temp-fresh   { color: var(--c-blue);   background: rgba(56,189,248,0.14); }
.temp-mild    { color: var(--c-lime);   background: rgba(163,230,53,0.14); }
.temp-spicy   { color: var(--c-orange); background: rgba(251,146,60,0.16); }
.temp-nuclear { color: var(--c-pink);   background: rgba(236,72,153,0.18); }
.temp-cold    { color: var(--c-blue);   background: rgba(56,189,248,0.12); }

.card-link { display: block; }
.card-text {
  font-family: var(--font-display); font-weight: 600; font-size: 1.18rem; line-height: 1.32;
  color: var(--text); letter-spacing: -0.01em; word-break: break-word;
}
.card-large .card-text { font-size: clamp(1.5rem, 5vw, 2.1rem); line-height: 1.22; }

/* heat meter */
.heat-meter { height: 6px; border-radius: 999px; background: var(--surface-2); margin: 14px 0 12px; overflow: hidden; }
.heat-fill { height: 100%; border-radius: 999px; background: var(--grad-hot); transition: width .5s cubic-bezier(.2,.8,.2,1); }

.card-bottom { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* vote cluster */
.vote-cluster { display: flex; align-items: center; gap: 4px; background: var(--surface-2); border-radius: 999px; padding: 4px; }
.vote-btn {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  font-size: 0.9rem; color: var(--text-dim); transition: transform .15s, color .2s, background .2s;
}
.vote-btn:hover { background: var(--surface); }
.vote-btn.up:hover, .vote-btn.up.active { color: var(--up); background: rgba(34,197,94,0.16); }
.vote-btn.down:hover, .vote-btn.down.active { color: var(--down); background: rgba(244,63,94,0.16); }
.vote-btn:active { transform: scale(1.3); }
.vote-btn.pop { animation: pop .35s ease; }
@keyframes pop { 0%{transform:scale(1);} 40%{transform:scale(1.45);} 100%{transform:scale(1);} }
.score { font-family: var(--font-display); font-weight: 700; font-size: 0.95rem; min-width: 42px; text-align: center; }

.card-meta { display: flex; align-items: center; gap: 6px; color: var(--text-mute); font-size: 0.8rem; }
.anon { color: var(--text-dim); font-weight: 500; }
.dot { opacity: .5; }

.card-actions { display: flex; gap: 4px; margin-left: auto; }
.icon-btn {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  color: var(--text-mute); font-size: 1rem; transition: all .18s;
}
.icon-btn:hover { color: var(--text); background: var(--surface-2); transform: translateY(-1px); }
.report-btn:hover { color: var(--down); }

/* =====================================================================
   FEED FOOT / LOAD MORE / EMPTY
   ===================================================================== */
.feed-foot { text-align: center; margin-top: 24px; }
.btn-more {
  padding: 12px 26px; border-radius: 999px; font-weight: 600;
  background: var(--surface); border: 1px solid var(--stroke); transition: all .2s;
}
.btn-more:hover { background: var(--surface-2); transform: translateY(-2px); }
.feed-end, .feed-empty { color: var(--text-mute); font-size: 0.9rem; padding: 10px; }

.empty-state { text-align: center; padding: 60px 20px; color: var(--text-dim); }
.empty-emoji { font-size: 3rem; margin-bottom: 12px; }
.empty-state .btn-launch { display: inline-block; margin-top: 18px; }

/* =====================================================================
   SINGLE OPINION PAGE
   ===================================================================== */
.back-link { display: inline-block; margin: 20px 0 14px; color: var(--text-dim); font-weight: 500; font-size: 0.9rem; }
.back-link:hover { color: var(--text); }
.verdict-banner {
  text-align: center; font-family: var(--font-display); font-weight: 800;
  font-size: 0.92rem; letter-spacing: .08em; text-transform: uppercase;
  background: var(--grad-hot); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  margin-bottom: 14px;
}
.card-large { box-shadow: var(--shadow); }

.share-row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin: 22px 0 36px; }
.btn-share-big {
  padding: 11px 18px; border-radius: 999px; font-weight: 600; font-size: 0.9rem;
  background: var(--surface); border: 1px solid var(--stroke); transition: all .2s;
}
.btn-share-big:hover { background: var(--surface-2); transform: translateY(-2px); }

.related-title { font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; margin: 8px 0 16px; }

/* =====================================================================
   REPORT MODAL
   ===================================================================== */
.modal {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center;
  background: rgba(5,4,12,0.7); backdrop-filter: blur(6px); padding: 20px;
  animation: fade .2s ease;
}
.modal[hidden] { display: none; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal-card {
  background: var(--bg-2); border: 1px solid var(--stroke); border-radius: var(--radius);
  padding: 24px; max-width: 380px; width: 100%; box-shadow: var(--shadow);
  animation: cardIn .25s ease;
}
.modal-card h3 { font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; }
.modal-sub { color: var(--text-dim); font-size: 0.88rem; margin: 6px 0 16px; }
#reportReason {
  width: 100%; background: var(--surface-2); color: var(--text); border: 1px solid var(--stroke);
  border-radius: var(--radius-s); padding: 11px 12px; font-family: inherit; font-size: 0.95rem;
}
#reportReason option { background: var(--bg-2); }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; }

/* =====================================================================
   TOAST
   ===================================================================== */
.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(120px);
  background: var(--bg-2); color: var(--text); border: 1px solid var(--stroke);
  padding: 13px 20px; border-radius: 999px; font-weight: 600; font-size: 0.9rem;
  box-shadow: var(--shadow); z-index: 200; opacity: 0; transition: transform .35s cubic-bezier(.2,.9,.2,1), opacity .35s;
  max-width: 90vw; text-align: center;
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.toast.success { border-color: var(--up); }
.toast.error { border-color: var(--down); }

/* =====================================================================
   FOOTER
   ===================================================================== */
.site-footer { max-width: var(--maxw); margin: 24px auto 0; padding: 24px 16px 30px; text-align: center; border-top: 1px solid var(--stroke); }
.footer-tag { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; color: var(--text); }
.footer-meta { margin: 14px 0; color: var(--text-dim); font-size: 0.88rem; }
.footer-meta a:hover { color: var(--text); text-decoration: underline; }
.footer-privacy { color: var(--text-mute); font-size: 0.8rem; max-width: 460px; margin: 0 auto 12px; line-height: 1.5; }
.footer-copy { color: var(--text-mute); font-size: 0.78rem; }

/* =====================================================================
   ADMIN
   ===================================================================== */
.admin-wrap { max-width: 920px; margin: 0 auto; padding: 24px 16px 80px; }
.admin-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; flex-wrap: wrap; gap: 12px; }
.admin-head h1 { font-family: var(--font-display); font-weight: 800; font-size: 1.6rem; }
.admin-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px,1fr)); gap: 12px; margin-bottom: 28px; }
.admin-stat { background: var(--surface); border: 1px solid var(--stroke); border-radius: var(--radius-s); padding: 16px; text-align: center; }
.admin-stat .num { font-family: var(--font-display); font-weight: 800; font-size: 1.8rem; display: block; }
.admin-stat .lbl { color: var(--text-dim); font-size: 0.8rem; }
.admin-section h2 { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; margin: 24px 0 12px; }
.admin-tabs { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.admin-row {
  display: flex; align-items: flex-start; gap: 12px; padding: 14px;
  background: var(--surface); border: 1px solid var(--stroke); border-radius: var(--radius-s); margin-bottom: 10px;
}
.admin-row .body { flex: 1; min-width: 0; }
.admin-row .txt { font-weight: 500; word-break: break-word; }
.admin-row .sub { color: var(--text-mute); font-size: 0.8rem; margin-top: 4px; }
.admin-row.is-hidden { opacity: .55; }
.badge { font-size: 0.72rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--text-dim); }
.badge.danger { background: rgba(244,63,94,0.16); color: var(--down); }
.admin-form-inline { display: inline; }
.btn-sm { padding: 7px 12px; border-radius: 999px; font-size: 0.8rem; font-weight: 600; background: var(--surface-2); border: 1px solid var(--stroke); transition: all .18s; }
.btn-sm:hover { background: var(--surface); }
.btn-sm.danger:hover { color: var(--down); border-color: var(--down); }
.btn-sm.good:hover { color: var(--up); border-color: var(--up); }

.login-box { max-width: 360px; margin: 80px auto; background: var(--surface); border: 1px solid var(--stroke); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.login-box h1 { font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; text-align: center; margin-bottom: 6px; }
.login-box p { text-align: center; color: var(--text-dim); font-size: 0.88rem; margin-bottom: 20px; }
.login-box input { width: 100%; background: var(--surface-2); color: var(--text); border: 1px solid var(--stroke); border-radius: var(--radius-s); padding: 12px 14px; font-family: inherit; font-size: 1rem; margin-bottom: 14px; }
.login-box .btn-launch { width: 100%; }
.login-err { background: rgba(244,63,94,0.14); border: 1px solid var(--down); color: var(--down); padding: 10px; border-radius: var(--radius-s); font-size: 0.85rem; text-align: center; margin-bottom: 14px; }

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
@media (max-width: 480px) {
  .hero { padding: 30px 0 18px; }
  .card-actions { margin-left: auto; }
  .card-meta { width: 100%; order: 3; margin-top: 2px; }
  .filter-bar { top: 60px; }
  .btn-launch { flex: 1; }
  .post-controls { gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* =====================================================================
   2026 POLISH PASS — brighter, stranger, more shareable
   ===================================================================== */
:root {
  --ring: rgba(255,255,255,0.16);
  --surface-hot: rgba(255,255,255,0.075);
}

.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;
}

.home-shell { max-width: 900px; }

.hero-upgraded {
  position: relative;
  padding-top: clamp(38px, 8vw, 80px);
}
.hero-upgraded::before {
  content: '';
  position: absolute;
  inset: 16px 4% auto;
  height: 330px;
  background:
    radial-gradient(circle at 20% 20%, rgba(250,204,21,.18), transparent 34%),
    radial-gradient(circle at 80% 20%, rgba(56,189,248,.18), transparent 32%),
    radial-gradient(circle at 50% 80%, rgba(236,72,153,.18), transparent 35%);
  filter: blur(18px);
  border-radius: 44px;
  z-index: -1;
}
.hero-kicker {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 13px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--stroke);
  color: var(--text-dim); font-size: .78rem; font-weight: 800;
  letter-spacing: .14em; text-transform: uppercase; margin-bottom: 18px;
}
.live-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--c-lime);
  box-shadow: 0 0 0 6px rgba(163,230,53,.14), 0 0 22px rgba(163,230,53,.7);
}
.hero-upgraded .hero-title { font-size: clamp(2.65rem, 9vw, 5.6rem); }
.hero-upgraded .hero-sub { max-width: 660px; font-size: clamp(1rem, 2.6vw, 1.18rem); }

.post-box-upgraded {
  max-width: 740px;
  padding: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,.095), rgba(255,255,255,.045));
  border-color: var(--ring);
  position: relative;
}
.post-box-upgraded::after {
  content: '';
  position: absolute; inset: -1px; border-radius: inherit; pointer-events: none;
  background: linear-gradient(120deg, rgba(250,204,21,.45), rgba(236,72,153,0), rgba(56,189,248,.38));
  opacity: .28;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  padding: 1px;
  mask-composite: exclude;
  -webkit-mask-composite: xor;
}
.post-box-upgraded textarea { min-height: 98px; }

.prompt-shelf {
  display: flex; gap: 8px; overflow-x: auto; padding: 8px 2px 2px;
  scrollbar-width: none;
}
.prompt-shelf::-webkit-scrollbar { display:none; }
.prompt-chip {
  flex: 0 0 auto;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(255,255,255,.055);
  border: 1px solid var(--stroke);
  color: var(--text-dim);
  font-size: .78rem;
  transition: transform .18s, color .18s, border-color .18s, background .18s;
}
.prompt-chip:hover, .prompt-chip.picked {
  transform: translateY(-1px);
  color: var(--text);
  border-color: rgba(250,204,21,.35);
  background: rgba(250,204,21,.10);
}

.stat-strip-upgraded span {
  padding: 8px 12px; border-radius: 999px;
  background: rgba(255,255,255,.04); border: 1px solid var(--stroke);
}

.chaos-deck {
  display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(220px, .8fr);
  gap: 14px; margin: 10px 0 26px;
}
.totd-upgraded {
  margin: 0;
  min-height: 164px;
  display: flex; flex-direction: column; justify-content: center;
  background:
    linear-gradient(135deg, rgba(250,204,21,.16), rgba(236,72,153,.11)),
    radial-gradient(circle at 15% 15%, rgba(255,255,255,.15), transparent 26%);
}
.totd-upgraded::after {
  content: 'HOT';
  position: absolute; right: -16px; bottom: -28px;
  font-family: var(--font-display); font-weight: 800; font-size: 5.6rem;
  color: rgba(255,255,255,.045); transform: rotate(-10deg);
}
.micro-panel, .discovery-card, .duel-zone {
  position: relative; overflow: hidden;
  background: var(--surface); border: 1px solid var(--stroke);
  border-radius: var(--radius); box-shadow: 0 14px 40px -24px rgba(0,0,0,.8);
}
.micro-panel {
  padding: 20px;
  display: flex; flex-direction: column; justify-content: center;
  background: linear-gradient(160deg, rgba(56,189,248,.12), rgba(168,85,247,.10));
}
.micro-title { color: var(--text-mute); font-size: .76rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.weather-glyph { font-size: 2.4rem; margin: 8px 0; filter: drop-shadow(0 0 16px rgba(251,146,60,.55)); }
.micro-panel p { color: var(--text-dim); font-size: .94rem; }
.micro-link { margin-top: 12px; color: var(--text); font-weight: 800; font-size: .88rem; }

.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.section-heading h2 { font-family: var(--font-display); font-size: 1.55rem; line-height: 1; }
.section-heading span { color: var(--text-dim); font-size: .9rem; max-width: 360px; text-align: right; }
.section-heading.small { align-items: start; flex-direction: column; gap: 2px; }
.eyebrow { color: var(--c-yellow); font-size: .72rem; font-weight: 900; letter-spacing: .16em; text-transform: uppercase; }

.duel-zone { padding: 18px; margin: 24px 0; }
.duel-grid {
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: center;
}
.versus-pill {
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 900;
  background: var(--grad-hot); color: white;
  box-shadow: 0 10px 26px -12px rgba(236,72,153,.8);
}
.card-compact { min-height: 100%; }
.card-compact .card-text { font-size: 1rem; }
.card-compact .card-meta { display: none; }
.card-compact .card-actions { margin-left: 0; }

.discovery-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 24px 0;
}
.discovery-card { padding: 18px; }
.channel-list, .rising-list { display: flex; flex-direction: column; gap: 8px; }
.channel-row, .rising-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 12px; border-radius: 14px;
  background: rgba(255,255,255,.045); border: 1px solid var(--stroke);
  color: var(--text-dim); transition: transform .18s, background .18s, color .18s;
}
.channel-row:hover, .rising-row:hover { transform: translateX(3px); background: var(--surface-2); color: var(--text); }
.channel-row strong, .rising-row b { color: var(--text); font-family: var(--font-display); }
.rising-row span { min-width: 0; }

.feed-head { margin-top: 30px; }

.card {
  background:
    linear-gradient(180deg, rgba(255,255,255,.082), rgba(255,255,255,.038)),
    var(--surface);
  border-color: rgba(255,255,255,.12);
}
.card-glow {
  position:absolute; inset: auto -20% -55% auto; width: 260px; height: 150px;
  background: radial-gradient(circle, rgba(236,72,153,.18), transparent 62%);
  pointer-events:none; transform: rotate(-15deg);
}
.card.color-0 .card-glow { background: radial-gradient(circle, rgba(168,85,247,.20), transparent 62%); }
.card.color-1 .card-glow { background: radial-gradient(circle, rgba(251,146,60,.18), transparent 62%); }
.card.color-2 .card-glow { background: radial-gradient(circle, rgba(56,189,248,.18), transparent 62%); }
.card.color-3 .card-glow { background: radial-gradient(circle, rgba(163,230,53,.16), transparent 62%); }
.card.color-5 .card-glow { background: radial-gradient(circle, rgba(250,204,21,.18), transparent 62%); }
.card:hover { border-color: rgba(255,255,255,.20); }
.heat-copy {
  display: flex; align-items: center; flex-wrap: wrap; gap: 9px;
  color: var(--text-mute); font-size: .76rem; margin: -5px 0 12px;
}
.heat-copy strong { color: var(--text); }
.mini-verdict {
  margin-left: auto; color: var(--text-dim); font-weight: 800;
  letter-spacing: .04em; text-transform: uppercase; font-size: .68rem;
}
.vote-cluster { border: 1px solid rgba(255,255,255,.08); }
.score { min-width: 50px; }

.share-card-preview {
  position: relative; overflow: hidden;
  margin: 18px 0 8px; padding: 24px;
  border-radius: 28px;
  background:
    radial-gradient(circle at 20% 20%, rgba(250,204,21,.18), transparent 30%),
    radial-gradient(circle at 90% 20%, rgba(56,189,248,.18), transparent 28%),
    linear-gradient(135deg, rgba(168,85,247,.18), rgba(236,72,153,.12));
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: var(--shadow);
}
.share-card-brand { font-weight: 900; letter-spacing: .08em; text-transform: uppercase; font-size: .78rem; color: var(--c-yellow); }
.share-card-preview p { font-family: var(--font-display); font-size: clamp(1.25rem, 4vw, 1.9rem); font-weight: 800; line-height: 1.15; margin: 12px 0 18px; }
.share-card-stats { display:flex; flex-wrap:wrap; gap: 8px; }
.share-card-stats span { padding: 6px 10px; border-radius:999px; background: rgba(0,0,0,.18); border:1px solid rgba(255,255,255,.12); font-size:.78rem; color:var(--text-dim); }

.upgraded-empty {
  background: rgba(255,255,255,.035); border: 1px dashed var(--stroke); border-radius: var(--radius);
}

.site-footer { max-width: 900px; }
.footer-meta a { padding: 3px 5px; }

@media (max-width: 760px) {
  .chaos-deck, .discovery-grid { grid-template-columns: 1fr; }
  .duel-grid { grid-template-columns: 1fr; }
  .versus-pill { margin: -2px auto; transform: rotate(5deg); }
  .section-heading { align-items: start; flex-direction: column; }
  .section-heading span { text-align: left; }
  .mini-verdict { margin-left: 0; width: 100%; }
}

@media (max-width: 480px) {
  .site-header { padding-inline: 12px; }
  .brand { font-size: 1.08rem; }
  .header-nav .btn-ghost { padding: 8px 10px; font-size: .82rem; }
  .post-box-upgraded { padding: 12px; }
  .post-controls #opinionCat { max-width: 44%; }
  .char-count { margin-left: 0; }
  .card-bottom { gap: 8px; }
  .share-card-preview { padding: 18px; border-radius: 22px; }
}

.static-page { padding-top: 12px; }
.static-card {
  background: var(--surface); border: 1px solid var(--stroke); border-radius: var(--radius);
  padding: 22px; color: var(--text-dim);
}
.static-card h2 { font-family: var(--font-display); color: var(--text); margin: 18px 0 6px; }
.static-card h2:first-child { margin-top: 0; }
.site-header { max-width: 900px; }

/* =====================================================================
   APP SHELL + BOTTOM NAV  (added in the app-tabs redesign)
   ===================================================================== */

/* Clearance so fixed bottom nav never covers content */
body.has-bottom-nav { padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)); }
.app-main { padding-top: 8px; padding-bottom: 24px; }
/* The fixed nav handles bottom clearance, so the big container pad is redundant here */
.app-main.container { padding-bottom: 24px; }

.bottom-nav {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 80;
  display: flex;
  align-items: stretch;
  justify-content: space-around;
  gap: 2px;
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px));
  max-width: var(--maxw);
  margin: 0 auto;
  background: linear-gradient(to top, rgba(12,10,29,0.97), rgba(12,10,29,0.86));
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid var(--stroke);
  border-radius: 22px 22px 0 0;
  box-shadow: 0 -12px 34px -18px rgba(0,0,0,0.8);
}
body.light .bottom-nav {
  background: linear-gradient(to top, rgba(243,240,255,0.98), rgba(243,240,255,0.9));
}

.bn-item {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 7px 4px 5px;
  border-radius: 14px;
  color: var(--text-mute);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.2px;
  transition: color .18s, background .18s, transform .12s;
  position: relative;
  min-width: 0;
}
.bn-item:active { transform: scale(0.92); }
.bn-glyph { font-size: 1.28rem; line-height: 1; filter: grayscale(0.5) opacity(0.8); transition: filter .18s, transform .18s; }
.bn-label { line-height: 1; }

.bn-item:hover { color: var(--text-dim); }
.bn-item:hover .bn-glyph { filter: none; }

.bn-item.active { color: var(--text); }
.bn-item.active .bn-glyph { filter: none; transform: translateY(-1px); }
.bn-item.active::before {
  content: "";
  position: absolute;
  top: 0; left: 50%; transform: translateX(-50%);
  width: 26px; height: 3px; border-radius: 3px;
  background: var(--grad-hot);
  box-shadow: 0 0 10px rgba(251,146,60,0.6);
}

/* Raised center "Post" action */
.bn-center .bn-glyph {
  width: 46px; height: 46px;
  display: flex; align-items: center; justify-content: center;
  margin-top: -22px;
  border-radius: 50%;
  background: var(--grad-hot);
  color: #1a1430;
  font-size: 1.25rem;
  box-shadow: 0 10px 24px -6px rgba(236,72,153,0.6);
  filter: none;
  border: 3px solid var(--bg);
}
body.light .bn-center .bn-glyph { border-color: var(--bg); }
.bn-center.active::before { display: none; }
.bn-center .bn-label { margin-top: 2px; }
.bn-center:active .bn-glyph { transform: scale(0.9); }

/* =====================================================================
   SHARED PAGE INTRO (used on every tab)
   ===================================================================== */
.page-intro { padding: 18px 0 14px; }
.page-intro-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; }
.page-intro-title {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(1.7rem, 6vw, 2.3rem); line-height: 1.04; letter-spacing: -0.5px;
}
.page-intro-sub { color: var(--text-dim); margin-top: 4px; font-size: 0.96rem; }
.intro-cta {
  flex: none;
  padding: 10px 16px; border-radius: 999px; font-weight: 700; font-size: 0.9rem;
  background: var(--grad-hot); color: #1a1430;
  box-shadow: 0 10px 24px -10px rgba(236,72,153,0.6);
  transition: transform .14s;
}
.intro-cta:active { transform: scale(0.95); }

.stat-strip {
  display: flex; gap: 16px; flex-wrap: wrap;
  margin-top: 14px; padding: 12px 16px;
  background: var(--surface); border: 1px solid var(--stroke); border-radius: var(--radius-s);
  font-size: 0.86rem; color: var(--text-dim);
}
.stat-strip strong { color: var(--text); font-family: var(--font-display); }

/* Slimmed filter bar on the feed */
.filter-bar.slim { margin-top: 6px; }

/* =====================================================================
   POST PAGE
   ===================================================================== */
.post-page { max-width: 640px; }
.post-hero { text-align: center; padding: 18px 0 22px; }
.post-hero-title {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(1.6rem, 6.5vw, 2.4rem); line-height: 1.08; letter-spacing: -0.5px;
}
.post-hero-sub { color: var(--text-dim); margin-top: 10px; }
.post-box-focused { margin-top: 4px; }
.post-success { margin-top: 22px; animation: popIn .3s ease; }
@keyframes popIn { from { opacity: 0; transform: translateY(10px) scale(0.98); } to { opacity: 1; transform: none; } }
.post-success-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.post-success-badge {
  padding: 6px 12px; border-radius: 999px; font-weight: 700; font-size: 0.82rem;
  background: rgba(34,197,94,0.16); color: var(--up); border: 1px solid rgba(34,197,94,0.35);
}
.post-success-head h2 { font-family: var(--font-display); font-size: 1.3rem; }
.post-success-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.post-success-actions .btn-launch,
.post-success-actions .btn-ghost { flex: 1 1 auto; text-align: center; }

.post-guidelines {
  margin-top: 26px; padding: 18px 20px;
  background: var(--surface); border: 1px solid var(--stroke); border-radius: var(--radius);
}
.post-guidelines h3 { font-family: var(--font-display); font-size: 1.05rem; margin-bottom: 12px; }
.post-guidelines ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.post-guidelines li { display: flex; gap: 10px; align-items: flex-start; color: var(--text-dim); font-size: 0.92rem; }
.post-guidelines li span { flex: none; }
.post-guidelines-link { display: inline-block; margin-top: 14px; color: var(--c-blue); font-weight: 600; font-size: 0.9rem; }

/* =====================================================================
   TOP / LEADERBOARD PAGE
   ===================================================================== */
.window-bar {
  display: flex; gap: 8px; overflow-x: auto; -webkit-overflow-scrolling: touch;
  padding: 6px 0 12px; scrollbar-width: none;
}
.window-bar::-webkit-scrollbar { display: none; }
.win-chip { white-space: nowrap; }

.leaderboard { display: flex; flex-direction: column; gap: 10px; transition: opacity .2s; }
.lb-row {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  background: var(--surface); border: 1px solid var(--stroke); border-radius: var(--radius-s);
  transition: transform .14s, border-color .2s;
}
.lb-row:hover { transform: translateY(-1px); border-color: var(--surface-2); }
.lb-rank {
  flex: none; width: 40px; text-align: center;
  font-family: var(--font-display); font-weight: 800; font-size: 1.05rem; color: var(--text-mute);
}
.lb-body { flex: 1 1 auto; min-width: 0; }
.lb-text { display: block; font-size: 1.02rem; line-height: 1.35; font-weight: 500; }
.lb-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; font-size: 0.78rem; color: var(--text-mute); }
.lb-cat { color: var(--text-dim); font-weight: 600; }
.lb-vote { flex: none; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.lb-vote .score { font-size: 0.82rem; }

/* Podium flair for the top 3 */
.lb-row.podium { border-width: 1px; }
.lb-row.rank-1 { background: linear-gradient(120deg, rgba(250,204,21,0.14), var(--surface) 60%); border-color: rgba(250,204,21,0.4); }
.lb-row.rank-2 { background: linear-gradient(120deg, rgba(203,213,225,0.12), var(--surface) 60%); border-color: rgba(203,213,225,0.34); }
.lb-row.rank-3 { background: linear-gradient(120deg, rgba(251,146,60,0.12), var(--surface) 60%); border-color: rgba(251,146,60,0.34); }
.lb-row.podium .lb-rank { font-size: 1.5rem; }

/* =====================================================================
   CHAOS PAGE
   ===================================================================== */
.chaos-block { margin-top: 22px; }
.chaos-block-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.chaos-block-head h2 { font-family: var(--font-display); font-size: 1.2rem; }
.chaos-block-sub { color: var(--text-dim); font-size: 0.9rem; margin-bottom: 14px; }
.chaos-random-slot { transition: opacity .2s; }
.chaos-random-slot .card { margin: 0; }

.duel-grid { display: grid; grid-template-columns: 1fr; gap: 12px; position: relative; transition: opacity .2s; }
.duel-grid .versus-pill {
  justify-self: center;
  width: 46px; height: 46px; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; font-family: var(--font-display); font-weight: 800; font-size: 0.9rem;
  background: var(--grad-hot); color: #1a1430; box-shadow: 0 8px 20px -8px rgba(236,72,153,0.6);
  margin: -2px 0;
}

/* =====================================================================
   MORE PAGE
   ===================================================================== */
.more-page { max-width: 640px; }
.more-menu { display: flex; flex-direction: column; gap: 10px; margin: 6px 0 24px; }
.more-item {
  display: flex; align-items: center; gap: 14px;
  padding: 15px 16px;
  background: var(--surface); border: 1px solid var(--stroke); border-radius: var(--radius-s);
  transition: transform .14s, border-color .2s, background .2s;
}
.more-item:hover { transform: translateY(-1px); background: var(--surface-2); border-color: var(--surface-2); }
.more-item:active { transform: scale(0.99); }
.more-glyph { flex: none; font-size: 1.5rem; width: 28px; text-align: center; }
.more-text { flex: 1 1 auto; display: flex; flex-direction: column; gap: 2px; }
.more-text strong { font-family: var(--font-display); font-size: 1.02rem; }
.more-text small { color: var(--text-mute); font-size: 0.82rem; }
.more-arrow { color: var(--text-mute); font-size: 1.1rem; }

.more-stats {
  display: flex; gap: 16px; flex-wrap: wrap; justify-content: center;
  margin-top: 20px; padding: 14px 16px;
  background: var(--surface); border: 1px solid var(--stroke); border-radius: var(--radius-s);
  font-size: 0.86rem; color: var(--text-dim);
}
.more-stats strong { color: var(--text); font-family: var(--font-display); }
.more-admin { text-align: center; margin-top: 22px; }
.more-admin a { color: var(--text-mute); font-size: 0.8rem; opacity: 0.7; }
.more-admin a:hover { opacity: 1; color: var(--text-dim); }

/* =====================================================================
   DESKTOP: intentional app-shell, not a stretched phone
   ===================================================================== */
@media (min-width: 880px) {
  body.has-bottom-nav { padding-bottom: 0; }
  .bottom-nav {
    top: 50%; bottom: auto; right: auto; left: 24px;
    transform: translateY(-50%);
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    width: 92px;
    max-width: none; margin: 0;
    padding: 14px 8px;
    border-radius: 22px;
    border: 1px solid var(--stroke);
    box-shadow: var(--shadow);
  }
  .bn-item { flex: none; padding: 10px 4px; font-size: 0.7rem; }
  .bn-item.active::before { top: 50%; left: 0; transform: translateY(-50%); width: 3px; height: 24px; }
  .bn-center .bn-glyph { margin-top: 0; }
  .bn-center.active::before { display: none; }

  /* give the app room beside the rail */
  .site-header, .app-main, .container { margin-left: auto; margin-right: auto; }
  .app-main { padding-left: 8px; padding-right: 8px; }
}

@media (min-width: 1180px) {
  .bottom-nav { left: calc(50% - var(--maxw)/2 - 116px); }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .post-success { animation: none; }
  .bn-item, .more-item, .lb-row, .intro-cta { transition: none; }
}
