/* YaYa — styles */
:root {
  --bg: #f6f4f0;
  --surface: #ffffff;
  --surface-2: #f1eee9;
  --ink: #15141b;
  --ink-2: #393843;
  --muted: #6e6c78;
  --line: #e7e3dc;
  --line-2: #d8d3ca;
  --love: #ef2d5e;
  --love-2: #ff7393;
  --love-ink: #c5164a;
  --love-soft: #ffe9ef;
  --love-line: #ffc7d5;
  --hate: #4a3df0;
  --hate-2: #8178ff;
  --hate-ink: #3a2ed4;
  --hate-soft: #ecebff;
  --hate-line: #cbc6ff;
  --hot: #e85d04;
  --hot-soft: #fff0e3;
  --on-accent: #ffffff;
  --shadow-sm: 0 1px 2px rgba(21, 20, 27, .06);
  --shadow: 0 1px 2px rgba(21, 20, 27, .05), 0 14px 34px -18px rgba(21, 20, 27, .22);
  --radius: 20px;
  --radius-sm: 12px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Unbounded', 'Inter', system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e0d13; --surface: #17161e; --surface-2: #211f2a; --ink: #f4f2f8; --ink-2: #d4d1dd; --muted: #9d99aa;
    --line: #2a2834; --line-2: #3b3847;
    --love: #ff4d78; --love-2: #ff86a2; --love-ink: #ff8fa9; --love-soft: rgba(255, 77, 120, .12); --love-line: rgba(255, 77, 120, .34);
    --hate: #7a6eff; --hate-2: #a59dff; --hate-ink: #b3acff; --hate-soft: rgba(122, 110, 255, .14); --hate-line: rgba(122, 110, 255, .38);
    --hot: #ff9248; --hot-soft: rgba(255, 146, 72, .13);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .35); --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 16px 36px -18px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0e0d13; --surface: #17161e; --surface-2: #211f2a; --ink: #f4f2f8; --ink-2: #d4d1dd; --muted: #9d99aa;
  --line: #2a2834; --line-2: #3b3847;
  --love: #ff4d78; --love-2: #ff86a2; --love-ink: #ff8fa9; --love-soft: rgba(255, 77, 120, .12); --love-line: rgba(255, 77, 120, .34);
  --hate: #7a6eff; --hate-2: #a59dff; --hate-ink: #b3acff; --hate-soft: rgba(122, 110, 255, .14); --hate-line: rgba(122, 110, 255, .38);
  --hot: #ff9248; --hot-soft: rgba(255, 146, 72, .13);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .35); --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 16px 36px -18px rgba(0, 0, 0, .7);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}
body::before {
  content: '';
  position: fixed;
  inset: 0 0 auto 0;
  height: 560px;
  background:
    radial-gradient(700px 380px at 8% -8%, var(--love-soft), transparent 70%),
    radial-gradient(700px 380px at 92% -8%, var(--hate-soft), transparent 70%);
  pointer-events: none;
  z-index: -1;
}
body.no-scroll { overflow: hidden; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
svg { display: block; }
h1, h2, h3 { margin: 0; }
p { margin: 0; }
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
main.wrap { flex: 1; padding-bottom: 56px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
:focus-visible { outline: 2px solid var(--hate); outline-offset: 2px; border-radius: 8px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 18px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; font-size: .95rem; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: transform .12s ease, background-color .15s ease, box-shadow .15s ease, opacity .15s;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .55; cursor: default; }
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { box-shadow: 0 6px 18px -8px var(--ink); }
.btn-ghost { background: var(--surface); border-color: var(--line-2); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-love { background: var(--love); color: var(--on-accent); }
.btn-love:hover { box-shadow: 0 8px 20px -8px var(--love); }
.btn-hate { background: var(--hate); color: var(--on-accent); }
.btn-hate:hover { box-shadow: 0 8px 20px -8px var(--hate); }
.btn-sm { height: 36px; padding: 0 14px; font-size: .88rem; }
.icon-btn {
  width: 42px; height: 42px; border-radius: 999px; border: 1px solid var(--line-2);
  background: var(--surface); display: inline-grid; place-items: center; cursor: pointer; flex: none;
  transition: border-color .15s, transform .12s;
}
.icon-btn svg { width: 19px; height: 19px; }
.icon-btn:hover { border-color: var(--ink); }
.icon-btn:active { transform: scale(.94); }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { display: flex; align-items: center; gap: 16px; min-height: 70px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; flex: none; }
.brand-mark { width: 34px; height: 34px; }
.bm-love { fill: var(--love); }
.bm-hate { fill: var(--hate); }
.brand-word { font-family: var(--display); font-weight: 700; font-size: 1.28rem; letter-spacing: -.02em; }
.brand-sm .brand-word { font-size: 1.05rem; }
.w-love { color: var(--love); }
.w-hate { color: var(--hate); }
.w-slash { color: var(--ink); margin: 0 .03em; }
.search {
  flex: 1; max-width: 440px; margin-left: auto;
  display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 16px;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: 999px;
  transition: border-color .15s, box-shadow .15s;
}
.search:focus-within { border-color: var(--hate); box-shadow: 0 0 0 4px var(--hate-soft); }
.search svg { width: 18px; height: 18px; color: var(--muted); flex: none; }
.search { min-width: 0; }
.search input { flex: 1; min-width: 0; width: 100%; border: 0; outline: 0; background: transparent; height: 100%; }
.search input::-webkit-search-cancel-button { cursor: pointer; }
.top-actions { display: flex; align-items: center; gap: 8px; }

/* ---------- hero ---------- */
.hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; padding: 56px 0 36px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; font-size: .78rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 18px;
}
.eyebrow::before { content: ''; width: 22px; height: 3px; border-radius: 3px; background: linear-gradient(90deg, var(--love) 50%, var(--hate) 50%); }
.hero h1 {
  font-family: var(--display); font-weight: 700; letter-spacing: -.03em;
  font-size: clamp(2rem, 4.4vw, 3.35rem); line-height: 1.1; text-wrap: balance;
}
.hl-love, .hl-hate { position: relative; white-space: nowrap; }
.hl-love { color: var(--love); }
.hl-hate { color: var(--hate); }
.lead { color: var(--ink-2); font-size: 1.08rem; margin-top: 18px; max-width: 560px; text-wrap: pretty; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 26px; color: var(--muted); font-size: .92rem; }
.hero-stats b { font-family: var(--display); color: var(--ink); font-size: 1.15rem; margin-right: 4px; }

.feature {
  display: block; text-decoration: none; position: relative; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: 26px; padding: 26px;
  box-shadow: var(--shadow); transition: transform .2s ease, box-shadow .2s ease;
}
.feature:hover { transform: translateY(-3px); }
.feature-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.feature-label { font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.feature h2 { font-family: var(--display); font-weight: 700; font-size: clamp(1.4rem, 2.6vw, 1.85rem); letter-spacing: -.02em; line-height: 1.15; }
.feature .note { color: var(--muted); font-size: .92rem; margin-top: 10px; }
.feature .meter { margin-top: 22px; }
.feature-pcts { display: flex; justify-content: space-between; margin-top: 10px; font-size: .92rem; }
.feature-pcts b { font-family: var(--display); font-size: 1.3rem; margin-right: 4px; }
.feature-quotes { display: grid; gap: 10px; margin-top: 18px; }
.quote { margin: 0; padding: 12px 14px; border-radius: 14px; font-size: .92rem; color: var(--ink-2); line-height: 1.45; }
.quote-love { background: var(--love-soft); border-left: 3px solid var(--love); }
.quote-hate { background: var(--hate-soft); border-left: 3px solid var(--hate); }
.feature-go { display: inline-flex; align-items: center; gap: 6px; margin-top: 18px; font-weight: 600; font-size: .95rem; }
.feature-go svg { width: 18px; height: 18px; transition: transform .2s; }
.feature:hover .feature-go svg { transform: translateX(4px); }

/* ---------- sections ---------- */
.block { margin-top: 40px; }
.block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.block-head h2 { font-family: var(--display); font-weight: 700; font-size: 1.3rem; letter-spacing: -.02em; display: inline-flex; align-items: center; gap: 10px; }
.block-head h2 svg { width: 22px; height: 22px; color: var(--hot); }

.rail {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(270px, 300px); gap: 14px;
  overflow-x: auto; padding: 4px 2px 14px; margin: 0 -2px; scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}
.rail > * { scroll-snap-align: start; }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px; scrollbar-width: none; max-width: 100%; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; height: 38px; padding: 0 15px; border-radius: 999px; border: 1px solid var(--line-2);
  background: var(--surface); cursor: pointer; font-size: .9rem; font-weight: 500; transition: all .15s;
}
.chip:hover { border-color: var(--ink); }
.chip.active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.seg { display: inline-flex; background: var(--surface-2); border-radius: 999px; padding: 4px; gap: 2px; flex: none; }
.seg button {
  border: 0; background: transparent; height: 32px; padding: 0 13px; border-radius: 999px;
  font-size: .86rem; font-weight: 600; color: var(--muted); cursor: pointer;
}
.seg button.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }

.browse-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; align-items: start; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.grid-4 { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }

/* ---------- topic card ---------- */
.card {
  display: flex; flex-direction: column; gap: 8px; text-decoration: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s;
  min-height: 196px;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--line-2); }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 22px; }
.cat { font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.card h3 { font-size: 1.08rem; font-weight: 700; line-height: 1.3; letter-spacing: -.01em; }
.card .desc {
  color: var(--muted); font-size: .9rem; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-bottom { margin-top: auto; padding-top: 8px; }
.card-foot { display: flex; justify-content: space-between; gap: 8px; margin-top: 9px; font-size: .8rem; }
.love-t { color: var(--love-ink); font-weight: 600; }
.hate-t { color: var(--hate-ink); font-weight: 600; }
.hot {
  display: inline-flex; align-items: center; gap: 4px; flex: none;
  color: var(--hot); background: var(--hot-soft); font-size: .72rem; font-weight: 700;
  padding: 3px 9px 3px 7px; border-radius: 999px;
}
.hot svg { width: 13px; height: 13px; }

/* ---------- meter ---------- */
.meter { display: flex; gap: 3px; height: 8px; }
.meter span { border-radius: 999px; min-width: 6px; transition: flex-basis .5s cubic-bezier(.2, .8, .2, 1); }
.m-love { background: linear-gradient(90deg, var(--love), var(--love-2)); }
.m-hate { background: linear-gradient(90deg, var(--hate-2), var(--hate)); }
.meter-empty span { background: var(--surface-2); }
.meter-big { height: 14px; gap: 4px; }

/* ---------- feed ---------- */
.feed {
  position: sticky; top: 92px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px;
}
.feed h3 { display: flex; align-items: center; gap: 8px; font-size: 1rem; margin-bottom: 6px; }
.feed h3 svg { width: 18px; height: 18px; color: var(--muted); }
.feed ul { list-style: none; margin: 0; padding: 0; }
.feed-item { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); text-decoration: none; }
.feed li:first-child .feed-item { border-top: 0; }
.feed-item p { font-size: .9rem; color: var(--ink-2); line-height: 1.45; }
.feed-item:hover p { color: var(--ink); }
.feed-meta { display: block; font-size: .78rem; color: var(--muted); margin-top: 4px; }
.feed-meta b { color: var(--ink); font-weight: 600; }
.dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 6px; flex: none; }
.dot-love { background: var(--love); box-shadow: 0 0 0 3px var(--love-soft); }
.dot-hate { background: var(--hate); box-shadow: 0 0 0 3px var(--hate-soft); }

/* ---------- topic page ---------- */
.crumbs { padding-top: 26px; }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); text-decoration: none; font-weight: 500; font-size: .92rem; }
.back svg { width: 18px; height: 18px; }
.back:hover { color: var(--ink); }
.topic-head { padding: 22px 0 8px; max-width: 880px; }
.topic-tags { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.cat-chip {
  font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; text-decoration: none;
  color: var(--ink-2); background: var(--surface); border: 1px solid var(--line-2); padding: 4px 11px; border-radius: 999px;
}
.cat-chip:hover { border-color: var(--ink); }
.topic-head h1 { font-family: var(--display); font-weight: 700; font-size: clamp(1.9rem, 4.6vw, 3.2rem); letter-spacing: -.03em; line-height: 1.08; text-wrap: balance; }
.topic-head .lead { margin-top: 14px; }
.trend-note {
  display: flex; gap: 12px; align-items: flex-start; margin-top: 20px; padding: 14px 16px;
  background: var(--hot-soft); border-radius: 16px; font-size: .93rem; color: var(--ink-2);
}
.trend-note > svg { width: 20px; height: 20px; color: var(--hot); flex: none; margin-top: 1px; }
.trend-note b { color: var(--ink); }
.src { color: var(--muted); white-space: nowrap; }
.src a { color: var(--muted); }

.scoreboard { margin-top: 28px; }
.score-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.score { display: flex; flex-direction: column; }
.score.right { text-align: right; align-items: flex-end; }
.score-pct { font-family: var(--display); font-weight: 700; font-size: clamp(2rem, 5vw, 2.8rem); line-height: 1; letter-spacing: -.03em; }
.score-lbl { font-size: .88rem; font-weight: 500; margin-top: 6px; color: var(--muted); }

.side-tabs { display: none; }
.columns { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 30px; align-items: start; }
.col { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; overflow: hidden; }
.col-head { display: flex; align-items: center; gap: 10px; padding: 16px 18px; flex-wrap: wrap; }
.col-love .col-head { background: var(--love-soft); border-bottom: 1px solid var(--love-line); }
.col-hate .col-head { background: var(--hate-soft); border-bottom: 1px solid var(--hate-line); }
.col-icon { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: var(--on-accent); flex: none; }
.col-icon svg { width: 19px; height: 19px; }
.col-love .col-icon { background: var(--love); }
.col-hate .col-icon { background: var(--hate); }
.col-head h2 { font-family: var(--display); font-weight: 700; font-size: 1.15rem; letter-spacing: -.02em; }
.col-love h2 { color: var(--love-ink); }
.col-hate h2 { color: var(--hate-ink); }
.count { font-size: .8rem; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: var(--surface); }
.col-love .count { color: var(--love-ink); }
.col-hate .count { color: var(--hate-ink); }
.mini-seg { margin-left: auto; display: inline-flex; gap: 2px; background: var(--surface); border-radius: 999px; padding: 3px; }
.mini-seg button { border: 0; background: transparent; font-size: .78rem; font-weight: 600; color: var(--muted); padding: 5px 10px; border-radius: 999px; cursor: pointer; }
.col-love .mini-seg button.active { background: var(--love); color: var(--on-accent); }
.col-hate .mini-seg button.active { background: var(--hate); color: var(--on-accent); }

.composer { padding: 16px 18px; border-bottom: 1px solid var(--line); }
.composer textarea {
  width: 100%; min-height: 88px; resize: vertical; padding: 12px 14px; border-radius: 14px;
  border: 1px solid var(--line-2); background: var(--bg); line-height: 1.5; outline: 0; transition: border-color .15s, box-shadow .15s;
}
.col-love textarea:focus { border-color: var(--love); box-shadow: 0 0 0 4px var(--love-soft); }
.col-hate textarea:focus { border-color: var(--hate); box-shadow: 0 0 0 4px var(--hate-soft); }
.composer-row { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.composer-row input {
  flex: 1; min-width: 0; height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-2);
  background: var(--bg); outline: 0;
}
.composer-row input:focus { border-color: var(--ink); }
.chars { font-size: .75rem; color: var(--muted); font-variant-numeric: tabular-nums; flex: none; }

.ops { list-style: none; margin: 0; padding: 4px 18px 10px; }
.op { padding: 16px 0; border-bottom: 1px solid var(--line); }
.op:last-child { border-bottom: 0; }
.op p { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink-2); line-height: 1.55; }
.op-new { animation: pop .45s cubic-bezier(.2, .8, .2, 1); }
@keyframes pop { from { opacity: 0; transform: translateY(-8px) scale(.98); } }
.op-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; font-size: .8rem; color: var(--muted); }
.author { font-weight: 600; color: var(--ink); }
.badge { font-size: .68rem; font-weight: 600; background: var(--surface-2); color: var(--muted); padding: 2px 8px; border-radius: 999px; cursor: help; }
.agree {
  margin-left: auto; display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px;
  border-radius: 999px; border: 1px solid var(--line-2); background: transparent; cursor: pointer; font-size: .78rem; font-weight: 600; color: var(--muted);
  transition: all .15s;
}
.agree svg { width: 15px; height: 15px; }
.agree:hover { color: var(--ink); border-color: var(--ink); }
.agree b:empty { display: none; }
.col-love .agree.liked { background: var(--love-soft); color: var(--love-ink); border-color: var(--love-line); }
.col-hate .agree.liked { background: var(--hate-soft); color: var(--hate-ink); border-color: var(--hate-line); }
.agree.bump svg { animation: bump .35s ease; }
@keyframes bump { 50% { transform: scale(1.35) rotate(-10deg); } }

.empty { text-align: center; padding: 34px 10px; color: var(--muted); }
.empty svg { width: 34px; height: 34px; margin: 0 auto 10px; opacity: .35; }
.empty b { color: var(--ink); }

.empty-state { grid-column: 1 / -1; text-align: center; padding: 48px 16px; background: var(--surface); border: 1px dashed var(--line-2); border-radius: var(--radius); }
.empty-state h3 { font-size: 1.1rem; margin-bottom: 6px; }
.empty-state .btn { margin-top: 16px; }

/* ---------- loading / error ---------- */
.loading { display: grid; gap: 14px; padding: 56px 0; }
.sk { height: 18px; border-radius: 10px; background: linear-gradient(90deg, var(--surface-2) 25%, var(--line) 50%, var(--surface-2) 75%); background-size: 200% 100%; animation: sk 1.2s linear infinite; }
.sk-lg { height: 52px; max-width: 640px; }
.sk-md { max-width: 420px; }
.sk-card { height: 180px; border-radius: var(--radius); }
.sk-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; margin-top: 20px; }
@keyframes sk { to { background-position: -200% 0; } }
.error-box { text-align: center; padding: 80px 16px; }
.error-box h1 { font-family: var(--display); font-size: 1.8rem; margin-bottom: 10px; }
.error-box .btn { margin-top: 20px; }

/* ---------- admin ---------- */
.op-del {
  height: 30px; padding: 0 11px; border-radius: 999px; border: 1px dashed var(--love-line); background: transparent;
  color: var(--love-ink); font-size: .78rem; font-weight: 600; cursor: pointer;
}
.op-del:hover { background: var(--love-soft); }
.hero-cta.center { justify-content: center; }
.admin-form { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 22px; }
.admin-form input {
  height: 42px; width: min(320px, 100%); padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-2);
  background: var(--surface); outline: 0;
}
.admin-form input:focus { border-color: var(--hate); box-shadow: 0 0 0 4px var(--hate-soft); }

/* ---------- modal ---------- */
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(12, 11, 18, .55); backdrop-filter: blur(4px); animation: fade .2s ease; }
.modal-box {
  position: relative; width: 100%; max-width: 520px; max-height: calc(100vh - 32px); overflow-y: auto;
  background: var(--surface); border-radius: 26px; padding: 26px; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .45);
  animation: rise .25s cubic-bezier(.2, .8, .2, 1);
}
.modal-box h2 { font-family: var(--display); font-weight: 700; font-size: 1.4rem; letter-spacing: -.02em; padding-right: 48px; }
.modal-box > p { margin-top: 6px; font-size: .93rem; }
.modal-x { position: absolute; top: 18px; right: 18px; }
.modal form { display: grid; gap: 14px; margin-top: 20px; }
.modal label { display: grid; gap: 6px; font-size: .88rem; font-weight: 600; }
.modal label .muted { font-weight: 400; }
.modal input, .modal select, .modal textarea {
  width: 100%; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--bg); outline: 0; font-weight: 400;
}
.modal input, .modal select { height: 46px; padding-top: 0; padding-bottom: 0; }
.modal input:focus, .modal select:focus, .modal textarea:focus { border-color: var(--hate); box-shadow: 0 0 0 4px var(--hate-soft); }
.modal textarea { resize: vertical; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; }
.form-error { color: var(--love-ink); font-size: .88rem; font-weight: 500; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(.98); } }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 60; transform: translate(-50%, 20px);
  background: var(--ink); color: var(--bg); padding: 11px 20px; border-radius: 999px; font-weight: 600; font-size: .92rem;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; max-width: calc(100vw - 32px); text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 28px 0 36px; color: var(--muted); font-size: .88rem; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer p { max-width: 560px; }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 28px; padding-top: 36px; }
  .browse-layout { grid-template-columns: 1fr; }
  .feed { position: static; }
}
@media (max-width: 760px) {
  .side-tabs {
    display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 26px; padding: 5px;
    background: var(--surface-2); border-radius: 999px; position: sticky; top: 124px; z-index: 5;
  }
  .side-tabs button {
    height: 42px; border: 0; border-radius: 999px; background: transparent; font-weight: 700; font-size: .92rem; cursor: pointer; color: var(--muted);
  }
  .side-tabs button span { font-weight: 600; opacity: .8; }
  .side-tabs .tab-love.active { background: var(--love); color: var(--on-accent); }
  .side-tabs .tab-hate.active { background: var(--hate); color: var(--on-accent); }
  .columns { grid-template-columns: 1fr; margin-top: 14px; }
  .columns[data-show="love"] .col-hate, .columns[data-show="hate"] .col-love { display: none; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .topbar-inner { flex-wrap: wrap; gap: 10px; padding-top: 10px; padding-bottom: 10px; min-height: 0; }
  .search { order: 3; flex-basis: 100%; max-width: none; height: 42px; }
  .top-actions { margin-left: auto; }
  .hide-sm { display: none; }
  .top-actions .btn-primary { width: 42px; padding: 0; }
  .brand-word { font-size: 1.15rem; }
  .brand-mark { width: 30px; height: 30px; }
  .hero { padding-top: 28px; }
  .lead { font-size: 1rem; }
  .feature { padding: 20px; border-radius: 22px; }
  .toolbar { flex-direction: column; align-items: stretch; }
  .seg { align-self: flex-start; max-width: 100%; overflow-x: auto; }
  .composer-row { flex-wrap: wrap; }
  .composer-row input { flex-basis: 100%; }
  .composer-row .btn { margin-left: auto; }
  .col-head { padding: 14px 16px; }
  .composer, .ops { padding-left: 16px; padding-right: 16px; }
  .modal { place-items: end center; padding: 0; }
  .modal-box { border-radius: 24px 24px 0 0; max-height: 92vh; padding: 22px 18px; }
  .score-row .btn span { display: none; }
}
@media (max-width: 400px) {
  .hero h1 { font-size: 1.75rem; }
  .hl-love, .hl-hate { white-space: normal; }
  .score-row { gap: 8px; }
  .score { min-width: 0; }
  .score-pct { font-size: 1.75rem; }
  .score-lbl { font-size: .76rem; }
  .brand-word { font-size: 1.05rem; }
  .top-actions { gap: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
