/* ============================================================
   Tremer — app shell.  Light, high-contrast, fintech-clean
   (Toss Securities × Polymarket).  Korean-primary UI.
   ============================================================ */

:root {
  color-scheme: dark;
  /* Canvas / surfaces — neutral dark, 대비를 올려 가독성 확보 */
  --canvas: #0E1013;         /* page background */
  --surface: #191C22;        /* cards / sheets — canvas보다 확실히 밝게 */
  --surface-2: #20242C;      /* subtle inset */
  --surface-3: #2A2F39;      /* tertiary */

  /* Text — 더 밝게(안보임 개선) */
  --text: #F3F4F6;           /* near-white */
  --text-2: #B7BDC7;         /* secondary — 크게 상향 */
  --text-3: #838A97;         /* tertiary / hint */

  /* Lines / borders — 더 잘 보이게 */
  --line: #282D36;
  --line-2: #363C47;

  /* 상단 바 / 내비 배경 (테마별로 전환) */
  --bar-bg: rgba(14, 16, 19, 0.82);

  /* Trend signals (green up / red down) */
  --up: #2FD98B;             /* 상승 */
  --down: #FF5C6C;           /* 하락 */
  --up-soft: rgba(47, 217, 139, 0.14);
  --down-soft: rgba(255, 92, 108, 0.14);
  --gold: #E0A54B;

  /* Brand / interactive accent — refined violet (흰 글씨 대비 AA 확보한 톤) */
  --surge: #7A5AF0;
  --surge-ink: #FFFFFF;
  --surge-soft: rgba(122, 90, 240, 0.18);
  --surge-line: rgba(122, 90, 240, 0.48);
  --cool: #FF5C6C;
  --cool-soft: rgba(255, 92, 108, 0.14);
  --cool-line: rgba(255, 92, 108, 0.40);
  --info: #7A5AF0;

  /* Elevation — deep shadows for dark */
  --shadow: 0 12px 34px rgba(0, 0, 0, 0.55);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.45);
  --shadow-md: 0 6px 18px rgba(0, 0, 0, 0.50);

  /* Geometry (4/8pt) */
  --r-sm: 10px;
  --r: 14px;
  --r-lg: 18px;
  --r-pill: 999px;

  /* Chrome sizes */
  --rail-w: 216px;
  --header-h: 60px;
  --bottombar-h: 64px;
  --content-max: 720px;

  /* Type — common, widely-used sans (Pretendard). Numbers align via
     font-variant-numeric: tabular-nums, not a monospace family. */
  /* 일반적으로 쓰는 시스템 폰트 스택 — 항상 뜨고 가독성 좋음 (CDN 의존 제거) */
  --font: -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", Roboto,
    "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", "Helvetica Neue",
    Helvetica, Arial, sans-serif;
  --mono: var(--font);
}

/* ── 라이트 테마 (토글 시 data-theme="light") ─── */
:root[data-theme="light"] {
  color-scheme: light;
  --canvas: #F2F4F6;
  --surface: #FFFFFF;
  --surface-2: #F5F7F9;
  --surface-3: #EBEEF1;
  --text: #191F28;
  --text-2: #4E5968;
  --text-3: #6B7684;
  --line: #E7EAED;
  --line-2: #D6DBE0;
  --bar-bg: rgba(255, 255, 255, 0.85);
  --up: #10B981;
  --down: #F04452;
  --up-soft: rgba(16, 185, 129, 0.12);
  --down-soft: rgba(240, 68, 82, 0.10);
  --gold: #C68A1E;
  --surge: #7C3AED;          /* 라이트에서 흰 배경 대비 확보한 바이올렛 */
  --surge-ink: #FFFFFF;
  --surge-soft: rgba(124, 58, 237, 0.12);
  --surge-line: rgba(124, 58, 237, 0.40);
  --cool: #F04452;
  --cool-soft: rgba(240, 68, 82, 0.10);
  --cool-line: rgba(240, 68, 82, 0.35);
  --info: #7C3AED;
  --shadow: 0 8px 28px rgba(17, 24, 39, 0.10);
  --shadow-sm: 0 1px 3px rgba(17, 24, 39, 0.08);
  --shadow-md: 0 4px 14px rgba(17, 24, 39, 0.08);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--canvas);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "kern", "liga", "calt";
  text-rendering: optimizeLegibility;
  line-height: 1.55;
  font-size: 15px;
  word-break: keep-all;
  overflow-wrap: break-word;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }

/* ── Top accent hairline ─────────────────────────────────── */
.top-bar {
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--surge), var(--info), transparent);
  opacity: 0.9;
}

/* ============================================================
   APP FRAME
   ============================================================ */
.app-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 20px;
  background: var(--bar-bg);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.04em;
  color: var(--text);
}
.brand img { width: 26px; height: 26px; border-radius: 7px; display: block; }
.live {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-left: auto;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--surge);
}
.live .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--surge);
  box-shadow: 0 0 0 0 var(--surge-line);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(122,90,240,0.5); }
  70%  { box-shadow: 0 0 0 7px rgba(122,90,240,0); }
  100% { box-shadow: 0 0 0 0 rgba(122,90,240,0); }
}

/* Main column — mobile-first single feed, centered on desktop */
.app-main {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 8px 20px calc(var(--bottombar-h) + 40px);
}

/* ── Primary nav: right rail (PC) / bottom bar (mobile) ───── */
.app-nav {
  position: fixed;
  z-index: 45;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-3);
  cursor: pointer;
  border: 0;
  background: transparent;
  transition: color 0.16s ease, background 0.16s ease;
  -webkit-tap-highlight-color: transparent;
}
.nav-item .ni-icon { flex: 0 0 auto; width: 22px; height: 22px; }
.nav-item .ni-icon svg { width: 22px; height: 22px; display: block; stroke: currentColor; fill: none; stroke-width: 1.7; }
.nav-item .ni-label { font-size: 13.5px; font-weight: 600; letter-spacing: -0.01em; white-space: nowrap; }
.nav-item:hover { color: var(--text); }
.nav-item.is-active { color: var(--text); }
.nav-item.is-active .ni-icon svg { stroke: var(--surge); }

/* Bottom bar (mobile default) */
.app-nav {
  left: 0; right: 0; bottom: 0;
  height: var(--bottombar-h);
  display: flex;
  align-items: stretch;
  background: var(--bar-bg);
  -webkit-backdrop-filter: saturate(150%) blur(16px);
  backdrop-filter: saturate(150%) blur(16px);
  border-top: 1px solid var(--line);
  padding: 0 4px;
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.app-nav .nav-item {
  flex: 1 1 0;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  padding: 6px 2px;
}
.app-nav .nav-item .ni-label { font-size: 10.5px; font-weight: 600; }
.app-nav .nav-item.is-active {
  position: relative;
}
.app-nav .nav-item.is-active::before {
  content: "";
  position: absolute;
  top: 0; left: 50%; transform: translateX(-50%);
  width: 26px; height: 2px; border-radius: 2px;
  background: var(--surge);
}
.nav-divider { display: none; }

/* ============================================================
   TAB PANELS
   ============================================================ */
.tab-panel { display: none; animation: fadeUp 0.4s cubic-bezier(0.22,1,0.36,1); }
.tab-panel.is-active { display: block; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .tab-panel { animation: none; }
  .live .dot { animation: none; }
}

/* ── Section header ─────────────────────────────────────── */
.sec-head { padding: 22px 2px 14px; }
.sec-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono);
  font-size: 11px; font-weight: 600; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--text-3);
  margin-bottom: 8px;
}
.sec-eyebrow .tick { color: var(--surge); }
.sec-title {
  font-size: 26px; font-weight: 800; letter-spacing: -0.03em;
  color: var(--text); margin: 0; line-height: 1.15;
}
.sec-sub { margin: 8px 0 0; font-size: 14px; color: var(--text-2); line-height: 1.6; }

/* ── Segment tabs (horizontal scroll) ───────────────────── */
.segments {
  display: flex; gap: 7px;
  overflow-x: auto; scrollbar-width: none;
  padding: 4px 2px 16px;
  margin: 0 -2px;
}
.segments::-webkit-scrollbar { display: none; }
.segment {
  flex: 0 0 auto;
  padding: 8px 14px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text-2);
  font-size: 12.5px; font-weight: 600;
  white-space: nowrap; cursor: pointer;
  transition: all 0.16s ease;
}
.segment:hover { border-color: var(--line-2); color: var(--text); }
.segment.is-active {
  background: var(--surge);
  color: var(--surge-ink);
  border-color: var(--surge);
}

/* ============================================================
   MEME CARD (compact) — the core hook
   ============================================================ */
.meme-list { display: flex; flex-direction: column; gap: 8px; }
.meme-card {
  display: grid;
  grid-template-columns: 34px 52px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}
.meme-card:hover { border-color: var(--line-2); background: var(--surface-2); transform: translateY(-1px); }

/* rank */
.mc-rank { text-align: center; }
.mc-rank .r-num {
  font-family: var(--mono); font-size: 16px; font-weight: 700;
  color: var(--text); line-height: 1;
}
.mc-rank .r-move {
  display: inline-flex; align-items: center; gap: 1px;
  font-family: var(--mono); font-size: 10px; font-weight: 700; margin-top: 3px;
}
.r-move.up { color: var(--surge); }
.r-move.down { color: var(--cool); }
.r-move.flat { color: var(--text-3); }

/* thumb (emoji placeholder — no real assets yet) */
.mc-thumb {
  width: 52px; height: 52px; border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; line-height: 1;
  background: radial-gradient(120% 120% at 30% 20%, var(--surface-3), var(--surface));
  border: 1px solid var(--line);
  position: relative; overflow: hidden;
}

/* body */
.mc-body { min-width: 0; }
.mc-name {
  font-size: 14.5px; font-weight: 700; letter-spacing: -0.01em;
  color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mc-meta { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.mc-format {
  font-size: 10.5px; font-weight: 600; color: var(--text-3);
  border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px;
}
.platforms { display: inline-flex; gap: 4px; }
.plat {
  width: 16px; height: 16px; border-radius: 5px;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 9px; font-weight: 700;
  background: var(--surface-3); color: var(--text-2);
  border: 1px solid var(--line);
}

/* right cluster: sparkline + score + delta */
.mc-metric { display: flex; align-items: center; gap: 12px; }
.spark { width: 64px; height: 30px; display: block; }
.spark svg { width: 100%; height: 100%; overflow: visible; }
.spark .line { fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.spark.up .line { stroke: var(--surge); }
.spark.down .line { stroke: var(--cool); }
.spark .area { opacity: 0.14; }
.spark.up .area { fill: var(--surge); }
.spark.down .area { fill: var(--cool); }

.mc-figs { text-align: right; min-width: 70px; }
.mc-score { font-family: var(--mono); font-size: 15px; font-weight: 700; color: var(--text); line-height: 1; }
.delta-chip {
  display: inline-flex; align-items: center; gap: 3px;
  margin-top: 6px;
  font-family: var(--mono); font-size: 11px; font-weight: 700;
  padding: 2px 7px; border-radius: var(--r-pill);
}
.delta-chip.up { color: var(--surge); background: var(--surge-soft); }
.delta-chip.down { color: var(--cool); background: var(--cool-soft); }

/* ── Vote control (one-tap 뜰까/질까 + crowd ratio) ──────── */
.vote {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
  margin-top: 12px;
}
.vote-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 13px; font-weight: 700; cursor: pointer;
  transition: all 0.14s ease;
}
.vote-btn .vb-ico { font-family: var(--mono); font-weight: 800; }
.vote-btn.up:hover, .vote-btn.up.picked { border-color: var(--surge-line); color: var(--surge); background: var(--surge-soft); }
.vote-btn.down:hover, .vote-btn.down.picked { border-color: var(--cool-line); color: var(--cool); background: var(--cool-soft); }
.crowd {
  margin-top: 8px;
  display: flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 11px; color: var(--text-3);
}
.crowd-bar {
  flex: 1; height: 6px; border-radius: var(--r-pill);
  background: var(--cool-soft); overflow: hidden; position: relative;
}
.crowd-bar > span {
  position: absolute; left: 0; top: 0; bottom: 0;
  background: var(--surge); border-radius: var(--r-pill);
}
.crowd .c-up { color: var(--surge); }
.crowd .c-down { color: var(--cool); }

/* Detailed vote block used inside cards/panels */
.vote-block {
  margin-top: 12px; padding-top: 12px;
  border-top: 1px solid var(--line);
}

/* ============================================================
   PREDICTION
   ============================================================ */
.stat-row { display: flex; gap: 8px; margin: 4px 0 20px; }
.stat-chip {
  flex: 1;
  border: 1px solid var(--line); border-radius: var(--r);
  background: var(--surface); padding: 14px 16px;
}
.stat-chip .s-val { font-family: var(--mono); font-size: 22px; font-weight: 800; color: var(--text); line-height: 1; }
.stat-chip .s-val.surge { color: var(--surge); }
.stat-chip .s-lab { margin-top: 6px; font-size: 11.5px; color: var(--text-3); font-weight: 600; }

.pred-deck { display: flex; flex-direction: column; gap: 12px; }
.pred-card {
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--surface); padding: 18px; box-shadow: var(--shadow-sm);
}
.pred-top { display: flex; align-items: center; gap: 14px; }
.pred-top .mc-thumb { width: 56px; height: 56px; font-size: 28px; }
.pred-q { margin: 16px 0 0; font-size: 15px; font-weight: 700; color: var(--text); }

/* Forecaster leaderboard */
.lb { margin-top: 8px; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.lb-row {
  display: grid; grid-template-columns: 34px 1fr auto auto; gap: 12px; align-items: center;
  padding: 12px 14px; border-top: 1px solid var(--line); background: var(--surface);
}
.lb-row:first-child { border-top: 0; }
.lb-row .lb-rank { font-family: var(--mono); font-weight: 700; color: var(--text-2); text-align: center; }
.lb-row.top .lb-rank { color: var(--surge); }
.lb-user { display: flex; align-items: center; gap: 10px; min-width: 0; }
.lb-ava { width: 30px; height: 30px; border-radius: 50%; background: var(--surface-3); display: flex; align-items: center; justify-content: center; font-size: 15px; border: 1px solid var(--line); }
.lb-name { font-size: 13.5px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-acc { font-family: var(--mono); font-size: 13px; font-weight: 700; color: var(--surge); }
.lb-streak { font-family: var(--mono); font-size: 11px; color: var(--text-3); }

/* ============================================================
   DISCOVERY (rising radar + submissions)
   ============================================================ */
.radar-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.radar-card {
  border: 1px solid var(--line); border-radius: var(--r);
  background: var(--surface); padding: 14px; cursor: pointer;
  transition: border-color 0.16s ease, transform 0.16s ease;
}
.radar-card:hover { border-color: var(--surge-line); transform: translateY(-2px); }
.radar-card .rc-top { display: flex; align-items: center; gap: 10px; }
.radar-card .mc-thumb { width: 40px; height: 40px; font-size: 20px; }
.radar-card .rc-name { font-size: 13px; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.radar-card .rc-early {
  margin-top: 4px; font-family: var(--mono); font-size: 10.5px; font-weight: 700; color: var(--surge);
}
.radar-card .rc-spark { margin-top: 10px; }
.radar-card .spark { width: 100%; height: 34px; }

.submit-cta {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: 48px; margin: 16px 0 20px;
  border-radius: var(--r); border: 1px dashed var(--surge-line);
  background: var(--surge-soft); color: var(--surge);
  font-size: 14px; font-weight: 700; cursor: pointer;
}
.submit-feed { display: flex; flex-direction: column; gap: 8px; }
.submit-row {
  display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface);
}
.submit-row .mc-thumb { width: 40px; height: 40px; font-size: 20px; }
.sr-name { font-size: 13.5px; font-weight: 700; color: var(--text); }
.sr-by { display: flex; align-items: center; gap: 6px; margin-top: 3px; font-size: 11px; color: var(--text-3); }
.credit-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: 0.04em;
  color: var(--surge); background: var(--surge-soft);
  border-radius: var(--r-pill); padding: 2px 7px;
}
.sr-champ {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line); border-radius: var(--r-pill);
  padding: 7px 12px; font-size: 12px; font-weight: 700; color: var(--text-2);
  background: var(--surface-2); cursor: pointer; white-space: nowrap;
}
.sr-champ:hover { border-color: var(--surge-line); color: var(--surge); }

/* ============================================================
   BRACKET (밈 월드컵)
   ============================================================ */
.bracket-meta {
  display: flex; align-items: center; gap: 10px; margin: 4px 0 18px;
  font-family: var(--mono); font-size: 12px; color: var(--text-3);
}
.bracket-meta .round { color: var(--surge); font-weight: 700; }
.matchup { display: grid; grid-template-columns: 1fr 44px 1fr; gap: 0; align-items: stretch; }
.mu-side {
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--surface); padding: 18px 16px; text-align: center; cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}
.mu-side:hover { border-color: var(--surge-line); background: var(--surface-2); transform: translateY(-2px); }
.mu-side .mc-thumb { width: 84px; height: 84px; font-size: 44px; margin: 0 auto; border-radius: var(--r); }
.mu-side .mu-name { margin-top: 12px; font-size: 15px; font-weight: 800; color: var(--text); }
.mu-side .mu-pct { margin-top: 6px; font-family: var(--mono); font-size: 12px; color: var(--text-3); }
.vs {
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 13px; font-weight: 800; color: var(--text-3); letter-spacing: 0.06em;
}
.bracket-progress {
  display: flex; gap: 6px; justify-content: center; margin: 20px 0 4px;
}
.bp-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--surface-3); }
.bp-dot.done { background: var(--surge); }
.bp-dot.now { background: var(--text); }

.share-card {
  margin-top: 22px; border: 1px solid var(--line); border-radius: var(--r-lg);
  background: linear-gradient(150% 120% at 20% 0%, var(--surface-2), var(--surface));
  padding: 20px; text-align: center; box-shadow: var(--shadow-sm);
}
.share-card .sc-lab { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-3); }
.share-card .sc-title { margin: 8px 0 14px; font-size: 17px; font-weight: 800; color: var(--text); }
.share-btn {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 0 20px; border-radius: var(--r-pill);
  background: var(--surge); color: var(--surge-ink);
  font-size: 13.5px; font-weight: 800; cursor: pointer; border: 0;
}

/* ============================================================
   MEME DETAIL sheet (opened from a card) — scaffold
   ============================================================ */
.sheet-scrim {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(0,0,0,0.6);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  opacity: 0; pointer-events: none; transition: opacity 0.24s ease;
}
.sheet-scrim.open { opacity: 1; pointer-events: auto; }
.sheet {
  position: fixed; z-index: 61; left: 50%; bottom: 0;
  width: 100%; max-width: 560px; transform: translate(-50%, 100%);
  max-height: 90vh; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  box-shadow: var(--shadow); transition: transform 0.3s cubic-bezier(0.22,1,0.36,1);
  padding: 8px 20px 32px;
}
.sheet.open { transform: translate(-50%, 0); }
.sheet-grip { width: 40px; height: 4px; border-radius: 2px; background: var(--line-2); margin: 8px auto 14px; }
.sheet-head { display: flex; align-items: center; gap: 14px; }
.sheet-head .mc-thumb { width: 64px; height: 64px; font-size: 32px; }
.sheet-title { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; }
.sheet-close {
  position: absolute; top: 16px; right: 16px;
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--text-2);
  font-size: 16px; cursor: pointer; line-height: 1;
}
/* video at the top of the meme detail sheet */
.sheet-video {
  position: relative; margin: 6px 0 16px;
  border-radius: var(--r); overflow: hidden; background: #000;
  aspect-ratio: 16 / 10; border: 1px solid var(--line);
}
.sheet-video video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sheet-video .sv-scrim { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 60%, rgba(0,0,0,0.7)); pointer-events: none; }
.sheet-video .sv-tag {
  position: absolute; left: 12px; bottom: 12px; z-index: 2;
  font-family: var(--mono); font-size: 11px; font-weight: 700; color: #fff;
  display: inline-flex; align-items: center; gap: 6px;
}
.sheet-video .sv-mute {
  position: absolute; right: 12px; bottom: 12px; z-index: 3;
  width: 36px; height: 36px; border-radius: 50%; cursor: pointer;
  background: rgba(0,0,0,0.45); border: 1px solid rgba(255,255,255,0.2); color: #fff;
  font-size: 15px; display: flex; align-items: center; justify-content: center;
}

.detail-graph {
  margin: 18px 0; padding: 14px; border: 1px solid var(--line);
  border-radius: var(--r); background: var(--surface-2);
}
.detail-graph svg { width: 100%; height: 120px; display: block; overflow: visible; }
.detail-graph .g-line { fill: none; stroke: var(--surge); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.detail-graph .g-area { fill: var(--surge); opacity: 0.10; }
.detail-graph .g-axis { stroke: var(--line); stroke-width: 1; }
.graph-cap { display: flex; justify-content: space-between; margin-top: 10px; font-family: var(--mono); font-size: 10.5px; color: var(--text-3); }

.prov-title, .block-title {
  font-size: 12px; font-weight: 700; letter-spacing: 0.04em;
  color: var(--text-2); margin: 20px 0 10px; text-transform: uppercase; font-family: var(--mono);
}
.prov-row { display: flex; flex-direction: column; gap: 8px; }
.prov-item {
  display: grid; grid-template-columns: 30px 1fr auto; gap: 12px; align-items: center;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface-2);
}
.prov-item .plat { width: 24px; height: 24px; border-radius: 7px; font-size: 11px; }
.prov-name { font-size: 13px; font-weight: 600; color: var(--text); }
.prov-ex { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.prov-vel { font-family: var(--mono); font-size: 12px; font-weight: 700; }
.prov-vel.up { color: var(--surge); } .prov-vel.down { color: var(--cool); }

/* Comment thread */
.thread { display: flex; flex-direction: column; gap: 12px; }
.cmt { display: grid; grid-template-columns: 32px 1fr; gap: 10px; }
.cmt .lb-ava { width: 32px; height: 32px; }
.cmt-body { }
.cmt-who { font-size: 12px; font-weight: 700; color: var(--text); }
.cmt-who .cmt-time { color: var(--text-3); font-weight: 500; margin-left: 6px; font-family: var(--mono); font-size: 10.5px; }
.cmt-text { font-size: 13.5px; color: var(--text-2); margin-top: 3px; line-height: 1.55; }
.cmt-actions { display: flex; gap: 14px; margin-top: 6px; font-size: 11.5px; color: var(--text-3); font-weight: 600; }
.cmt-actions span { cursor: pointer; }
.cmt-actions span:hover { color: var(--text); }

/* ============================================================
   ABOUT (Tremer란)
   ============================================================ */
.about-hero { padding: 40px 0 28px; text-align: center; }
.about-hero .eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: 0.18em;
  color: var(--text-3); text-transform: uppercase; margin-bottom: 18px;
  border: 1px solid var(--line); border-radius: var(--r-pill); padding: 6px 13px;
}
.about-hero .eyebrow .tick { color: var(--surge); }
.about-hero h1 {
  font-size: 34px; font-weight: 800; letter-spacing: -0.04em; line-height: 1.14;
  margin: 0 auto; max-width: 560px; color: var(--text);
}
.about-hero .metaphor {
  display: inline-block; margin-top: 16px;
  font-family: var(--mono); font-size: 13px; color: var(--surge);
  background: var(--surge-soft); border-radius: var(--r-pill); padding: 6px 14px;
}
.about-hero p.sub {
  font-size: 15px; color: var(--text-2); line-height: 1.7;
  max-width: 500px; margin: 18px auto 0;
}
.about-store { display: flex; gap: 10px; justify-content: center; margin-top: 26px; flex-wrap: wrap; }
.store-pill {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 18px; border-radius: 13px;
  background: var(--text); color: var(--canvas);
  border: 1px solid var(--line-2);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}
.store-pill:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.store-pill svg { width: 20px; height: 20px; fill: var(--canvas); }
.store-pill .st-lead { font-size: 9px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; opacity: 0.7; display: block; }
.store-pill .st-mark { font-size: 14px; font-weight: 800; letter-spacing: -0.01em; }

.about-block { padding: 34px 0; border-top: 1px solid var(--line); }
.about-block h2 {
  font-size: 21px; font-weight: 800; letter-spacing: -0.025em; margin: 0 0 8px; color: var(--text);
}
.about-block .lead { font-size: 14px; color: var(--text-2); line-height: 1.7; margin: 0 0 20px; }

.flywheel { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.fw-step {
  border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); padding: 16px;
}
.fw-step .fw-n {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--surge-line);
  color: var(--surge); font-family: var(--mono); font-size: 11px; font-weight: 700; margin-bottom: 10px;
}
.fw-step h4 { font-size: 14px; font-weight: 700; margin: 0 0 5px; color: var(--text); }
.fw-step p { font-size: 12.5px; color: var(--text-3); margin: 0; line-height: 1.55; }
.fw-loop {
  grid-column: 1 / -1; margin-top: 4px; padding: 14px;
  border: 1px dashed var(--surge-line); border-radius: var(--r-pill);
  text-align: center; font-size: 13px; font-weight: 600; color: var(--surge); background: var(--surge-soft);
}

.quad { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; border-radius: var(--r); }
.quad-cell {
  border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); padding: 16px; position: relative;
}
.quad-cell .q-dot { position: absolute; top: 16px; right: 16px; width: 8px; height: 8px; border-radius: 50%; }
.quad-cell.q1 .q-dot { background: var(--info); }
.quad-cell.q2 .q-dot { background: var(--surge); }
.quad-cell.q3 .q-dot { background: var(--text-3); }
.quad-cell.q4 .q-dot { background: var(--cool); }
.quad-cell .q-tag { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.1em; color: var(--text-3); text-transform: uppercase; }
.quad-cell h4 { font-size: 17px; font-weight: 800; margin: 8px 0 6px; color: var(--text); }
.quad-cell p { font-size: 12px; color: var(--text-3); margin: 0; line-height: 1.55; }

.price-strip { display: flex; flex-direction: column; gap: 8px; }
.price-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface);
}
.price-row.hot { border-color: var(--surge-line); }
.price-row .p-name { font-size: 13px; font-weight: 800; color: var(--text); }
.price-row .p-desc { font-size: 11.5px; color: var(--text-3); margin-top: 3px; }
.price-row .p-val { font-family: var(--mono); font-size: 16px; font-weight: 800; color: var(--text); white-space: nowrap; }
.price-row .p-val small { font-size: 11px; color: var(--text-3); font-weight: 600; }
.about-cta {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: 50px; margin-top: 16px;
  border-radius: var(--r); background: var(--surge); color: var(--surge-ink);
  font-size: 14.5px; font-weight: 800;
}

/* ── Footer ─────────────────────────────────────────────── */
.app-footer {
  border-top: 1px solid var(--line); margin-top: 20px; padding: 26px 0 8px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px;
  font-size: 12px; color: var(--text-3);
}
.app-footer a { color: var(--text-3); }
.app-footer a:hover { color: var(--text); }
.app-footer .foot-sep { flex: 1; }

/* ── Skeleton / empty ───────────────────────────────────── */
.skel {
  background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 37%, var(--surface) 63%);
  background-size: 400% 100%; animation: shimmer 1.4s ease infinite; border-radius: 6px;
}
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
.empty {
  text-align: center; padding: 48px 20px; color: var(--text-3);
  border: 1px dashed var(--line); border-radius: var(--r); background: var(--surface);
}
.empty .e-emoji { font-size: 32px; }
.empty .e-title { margin-top: 10px; font-size: 15px; font-weight: 700; color: var(--text-2); }
.empty .e-sub { margin-top: 4px; font-size: 13px; }

/* ============================================================
   MEME VIDEO FEED (World-style) — video plays in the feed
   ============================================================ */
.meme-feed { display: flex; flex-direction: column; gap: 16px; }
.mvcard {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: #000;
  cursor: pointer;
  aspect-ratio: 4 / 5;
  max-height: 560px;
}
.mvcard .mv {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  background: var(--surface);
}
.mvcard .mv-scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(0,0,0,0.55) 0%, transparent 22%, transparent 55%, rgba(0,0,0,0.82) 100%);
  pointer-events: none;
}
.mv-top {
  position: absolute; top: 12px; left: 12px; right: 12px;
  display: flex; align-items: center; gap: 8px; z-index: 2;
}
.mv-rank {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 15px; font-weight: 800; color: #fff;
  background: rgba(0,0,0,0.35); border: 1px solid rgba(255,255,255,0.14);
  padding: 4px 10px; border-radius: var(--r-pill);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.mv-rank .r-move { font-size: 10px; }
.mv-live {
  margin-left: auto; display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: 0.1em;
  color: var(--surge); background: rgba(0,0,0,0.35); border: 1px solid var(--surge-line);
  padding: 4px 9px; border-radius: var(--r-pill);
}
.mv-live .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--surge); animation: pulse 2s infinite; }
.mv-mutebtn {
  position: absolute; top: 12px; right: 12px; z-index: 3;
}
.mv-bottom {
  position: absolute; left: 14px; right: 66px; bottom: 14px; z-index: 2;
}
.mv-name {
  font-size: 17px; font-weight: 800; letter-spacing: -0.02em; color: #fff;
  display: flex; align-items: center; gap: 8px; text-shadow: 0 1px 8px rgba(0,0,0,0.5);
}
.mv-name .mc-format { color: #fff; border-color: rgba(255,255,255,0.3); background: rgba(0,0,0,0.25); }
.mv-figs { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.mv-figs .mc-score { font-size: 17px; color: #fff; }
.mv-figs .spark { width: 60px; height: 26px; }
.mv-platforms { display: inline-flex; gap: 4px; margin-top: 10px; }
.mv-platforms .plat { background: rgba(0,0,0,0.4); border-color: rgba(255,255,255,0.18); color: #fff; }

/* Right action rail (TikTok-style) */
.mv-rail {
  position: absolute; right: 10px; bottom: 16px; z-index: 3;
  display: flex; flex-direction: column; gap: 12px; align-items: center;
}
.rail-btn {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  border: 0; background: transparent; cursor: pointer;
  color: #fff; font-family: var(--mono); font-size: 11px; font-weight: 700;
}
.rail-ic {
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.4); border: 1px solid rgba(255,255,255,0.18);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  font-size: 17px; transition: transform 0.14s ease, background 0.14s ease, color 0.14s ease, border-color 0.14s ease;
}
.rail-btn:active .rail-ic { transform: scale(0.88); }
.rail-btn.up.picked .rail-ic { background: var(--surge); color: var(--surge-ink); border-color: var(--surge); }
.rail-btn.down.picked .rail-ic { background: var(--cool); color: #fff; border-color: var(--cool); }
.rail-btn .rail-n { text-shadow: 0 1px 6px rgba(0,0,0,0.6); }
.rail-btn.up .rail-n { color: var(--surge); }
.rail-btn.down .rail-n { color: var(--cool); }

/* mini crowd bar under the name on the card */
.mv-crowd {
  display: flex; align-items: center; gap: 8px; margin-top: 10px;
  font-family: var(--mono); font-size: 10.5px;
}
.mv-crowd .crowd-bar { height: 5px; background: rgba(255,90,74,0.45); }
.mv-crowd .c-up { color: var(--surge); } .mv-crowd .c-down { color: #ff9d92; }

/* ============================================================
   PREDICTION — animated poll (no points, ratio reveal)
   ============================================================ */
.poll { margin-top: 14px; }
.poll-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.poll-btn {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 50px; border-radius: var(--r-sm);
  border: 1px solid var(--line); background: var(--surface-2);
  color: var(--text-2); font-size: 14px; font-weight: 800; cursor: pointer;
  transition: all 0.16s ease;
}
.poll-btn .pb-ic { font-family: var(--mono); }
.poll-btn.up:hover { border-color: var(--surge-line); color: var(--surge); }
.poll-btn.down:hover { border-color: var(--cool-line); color: var(--cool); }
.poll.voted .poll-btn { cursor: default; opacity: 0.55; }
.poll.voted .poll-btn.picked { opacity: 1; }
.poll.voted .poll-btn.up.picked { border-color: var(--surge); color: var(--surge); background: var(--surge-soft); }
.poll.voted .poll-btn.down.picked { border-color: var(--cool); color: var(--cool); background: var(--cool-soft); }

.poll-result {
  margin-top: 12px; max-height: 0; overflow: hidden; opacity: 0;
  transition: max-height 0.4s cubic-bezier(.22,1,.36,1), opacity 0.3s ease, margin-top 0.4s ease;
}
.poll.voted .poll-result { max-height: 220px; opacity: 1; }
.poll-track {
  position: relative; height: 40px; border-radius: var(--r-sm);
  background: var(--cool-soft); overflow: hidden; border: 1px solid var(--line);
  display: flex; align-items: center;
}
.poll-fill {
  position: absolute; left: 0; top: 0; bottom: 0; width: 50%;
  background: var(--surge-soft); border-right: 2px solid var(--surge);
  transition: width 0.8s cubic-bezier(0.22,1,0.36,1);
}
.poll-track .pt-up, .poll-track .pt-down {
  position: relative; z-index: 2; padding: 0 14px;
  font-family: var(--mono); font-weight: 800; font-size: 14px;
  display: flex; align-items: center; gap: 6px;
}
.poll-track .pt-up { color: var(--surge); }
.poll-track .pt-down { color: var(--cool); margin-left: auto; }
.poll-note { margin-top: 8px; font-size: 12px; color: var(--text-3); font-family: var(--mono); }
.poll-note b { color: var(--text-2); }

/* ============================================================
   COMMUNITY — composer, posts, comment threads (Toss-style)
   ============================================================ */
.community { margin-top: 26px; }
.community > .prov-title { margin-top: 0; }

/* comment composer */
.cbox {
  display: flex; gap: 8px; align-items: center;
  padding: 8px; border: 1px solid var(--line); border-radius: var(--r);
  background: var(--surface); margin-bottom: 14px;
}
.cbox .lb-ava { width: 30px; height: 30px; flex: 0 0 auto; }
.cbox input {
  flex: 1; min-width: 0; border: 0; background: transparent; color: var(--text);
  font: inherit; font-size: 13.5px; padding: 8px 4px; outline: none;
}
.cbox input::placeholder { color: var(--text-3); }
.cbox button {
  flex: 0 0 auto; border: 0; border-radius: var(--r-pill);
  background: var(--surge); color: var(--surge-ink);
  font-size: 12.5px; font-weight: 800; padding: 9px 15px; cursor: pointer;
  transition: opacity 0.14s ease;
}
.cbox button:disabled { opacity: 0.4; cursor: default; }

.cmt-actions .liked { color: var(--surge); }

/* UGC upload composer (Discovery) */
.composer {
  border: 1px solid var(--surge-line); border-radius: var(--r-lg);
  background: linear-gradient(160% 120% at 0% 0%, var(--surge-soft), var(--surface));
  padding: 16px; margin-bottom: 18px;
}
.composer h3 {
  font-size: 15px; font-weight: 800; color: var(--text); margin: 0 0 4px;
  display: flex; align-items: center; gap: 8px;
}
.composer .cp-sub { font-size: 12px; color: var(--text-2); margin: 0 0 14px; }
.composer .cp-drop {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 88px; border: 1px dashed var(--line-2); border-radius: var(--r);
  background: rgba(0,0,0,0.2); color: var(--text-3); font-size: 13px; font-weight: 600;
  cursor: pointer; margin-bottom: 10px; text-align: center; padding: 12px;
}
.composer .cp-drop.has { color: var(--surge); border-color: var(--surge-line); }
.composer .cp-row { display: flex; gap: 8px; }
.composer input.cp-name {
  flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--surface); color: var(--text); font: inherit; font-size: 13.5px;
  padding: 12px 14px; outline: none;
}
.composer input.cp-name:focus { border-color: var(--surge-line); }
.composer .cp-post {
  flex: 0 0 auto; border: 0; border-radius: var(--r-sm);
  background: var(--surge); color: var(--surge-ink); font-size: 13.5px; font-weight: 800;
  padding: 0 20px; cursor: pointer;
}
.composer .cp-post:disabled { opacity: 0.4; cursor: default; }

/* community post (UGC feed item) */
.post {
  border: 1px solid var(--line); border-radius: var(--r); background: var(--surface);
  padding: 14px; margin-bottom: 10px;
}
.post-head { display: flex; align-items: center; gap: 10px; }
.post-head .lb-ava { width: 34px; height: 34px; }
.post-who { font-size: 13px; font-weight: 700; color: var(--text); }
.post-when { font-size: 11px; color: var(--text-3); font-family: var(--mono); margin-top: 1px; }
.post-early {
  margin-left: auto; font-family: var(--mono); font-size: 11px; font-weight: 700;
  color: var(--surge); background: var(--surge-soft); border-radius: var(--r-pill); padding: 3px 9px;
}
.post-media {
  display: flex; align-items: center; gap: 12px; margin: 12px 0;
  padding: 12px; border-radius: var(--r-sm); background: var(--surface-2); border: 1px solid var(--line);
}
.post-media .mc-thumb { width: 46px; height: 46px; font-size: 24px; }
.post-title { font-size: 14px; font-weight: 700; color: var(--text); }
.post-cap { font-size: 12.5px; color: var(--text-2); margin-top: 2px; }
.post-actions {
  display: flex; align-items: center; gap: 18px; padding-top: 4px;
  font-size: 12.5px; font-weight: 600; color: var(--text-3);
}
.post-actions button {
  border: 0; background: transparent; color: inherit; font: inherit; font-weight: 600;
  cursor: pointer; display: inline-flex; align-items: center; gap: 5px;
}
.post-actions button:hover { color: var(--text); }
.post-actions .champ.on { color: var(--surge); }
.post-thread { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); display: none; }
.post-thread.open { display: block; }

/* ============================================================
   RESPONSIVE — PC: right vertical rail
   ============================================================ */
@media (min-width: 960px) {
  :root { --content-max: 680px; }

  /* Reserve the right edge for the fixed vertical rail; content
     centers within the remaining column. */
  body { padding-right: var(--rail-w); }
  .app-main { padding-bottom: 64px; }

  .app-nav {
    top: 0; right: 0; bottom: 0; left: auto;
    width: var(--rail-w); height: 100vh;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 4px;
    padding: calc(var(--header-h) + 20px) 14px 20px;
    border-top: 0; border-left: 1px solid var(--line);
    background: var(--surface);
  }
  .app-nav .rail-label {
    font-family: var(--mono); font-size: 10px; letter-spacing: 0.18em;
    text-transform: uppercase; color: var(--text-3);
    padding: 4px 12px 10px;
  }
  .app-nav .nav-item {
    flex: 0 0 auto;
    flex-direction: row;
    justify-content: flex-start;
    gap: 12px;
    padding: 12px 14px;
    border-radius: var(--r-sm);
  }
  .app-nav .nav-item .ni-label { font-size: 13.5px; }
  .app-nav .nav-item:hover { background: var(--surface); }
  .app-nav .nav-item.is-active { background: var(--surface-2); }
  .app-nav .nav-item.is-active::before {
    top: 50%; left: 0; transform: translateY(-50%);
    width: 3px; height: 20px; border-radius: 3px;
  }
  .nav-divider {
    display: block; height: 1px; background: var(--line);
    margin: 12px 14px;
  }
  .app-nav .rail-foot {
    margin-top: auto; padding: 12px 14px 0;
    display: flex; flex-wrap: wrap; gap: 6px 12px;
    font-size: 11px; color: var(--text-3);
  }
  .app-nav .rail-foot a { color: var(--text-3); }
  .app-nav .rail-foot a:hover { color: var(--text); }

  /* wider comfortable layouts on desktop */
  .radar-grid { grid-template-columns: repeat(3, 1fr); }
  .flywheel { grid-template-columns: repeat(4, 1fr); }
  .about-hero h1 { font-size: 40px; max-width: 620px; }

  /* video cards a touch shorter on desktop so they don't dominate */
  .mvcard { aspect-ratio: 16 / 12; max-height: 460px; }
}

/* Hide rail-only chrome on mobile */
@media (max-width: 959px) {
  .app-nav .rail-label, .app-nav .rail-foot { display: none; }
}

/* Phones — give the meme name room; velocity stays via the delta chip.
   The full sparkline / trend graph lives in the detail sheet. */
@media (max-width: 560px) {
  .meme-card .mc-metric .spark { display: none; }
  .meme-card .mc-metric { gap: 0; }
  .mc-figs { min-width: 62px; }
}

/* Small phones */
@media (max-width: 380px) {
  .app-nav .nav-item .ni-label { font-size: 9.5px; }
  .meme-card { grid-template-columns: 30px 46px 1fr auto; gap: 9px; padding: 11px; }
}

/* ════════════════════════════════════════════════════════════
   APP-FAITHFUL COMPONENTS (World ranking · trend graph · comments)
   Appended; overrides the earlier prototype blocks.
   ════════════════════════════════════════════════════════════ */

/* header: drop the LIVE ticker — keep it minimal */
.app-header .live { display: none; }

/* section headers — tighter, less text */
.sec-head { padding: 20px 2px 12px; }
.sec-sub { display: none; }              /* remove verbose descriptions */
.sec-title { font-size: 23px; }
.sec-eyebrow { margin-bottom: 6px; }

/* ── embed wrapper (platform iframe, cover-cropped) ───────── */
.embed { position: relative; width: 100%; height: 100%; overflow: hidden;
  background: #0e1116 center/cover no-repeat; }
.embed-if { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 100%; height: 100%; min-height: 100%; border: 0; }
/* cover a vertical tile: make the iframe taller-than-wide fill by width */
.rk-video .embed-if, .rk-embed-mount .embed-if { width: 178%; height: 100%; }

/* ── 밈 ranking card (video left, info right) — World style ── */
#meme-feed.meme-feed { gap: 10px; }
.rk-card {
  display: grid; grid-template-columns: 104px 1fr; gap: 14px;
  height: 156px; padding: 0; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--r);
  background: var(--surface); cursor: pointer;
  transition: border-color .16s ease, background .16s ease, transform .16s ease;
}
.rk-card:hover, .rk-card:focus-visible { border-color: var(--line-2); background: var(--surface-2); transform: translateY(-1px); outline: none; }
.rk-video { position: relative; width: 104px; height: 156px; background: #0e1116; overflow: hidden; }
.rk-embed-mount { position: absolute; inset: 0; background: #0e1116 center/cover no-repeat; }
.rk-info { display: flex; flex-direction: column; justify-content: center; gap: 7px; padding: 12px 14px 12px 0; min-width: 0; }
.rk-line1 { display: flex; align-items: center; gap: 9px; min-width: 0; }
.rk-badge { flex: 0 0 auto; font-size: 19px; line-height: 1; display: inline-flex; }
.rk-badge .rk-n {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 24px; height: 24px; padding: 0 5px; border-radius: 7px;
  border: 1px solid var(--line-2); font-size: 12px; font-weight: 800; color: var(--text-2);
}
.rk-name { font-size: 16px; font-weight: 800; letter-spacing: -0.02em; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rk-line2 { display: flex; align-items: center; gap: 10px; }
.rk-flag { display: inline-flex; align-items: center; }
/* real SVG country flags (월드컵·상세 공용) */
.cflag { display: inline-block; width: 22px; height: auto; border-radius: 2px; vertical-align: middle;
  box-shadow: 0 0 0 1px rgba(255,255,255,.10) inset, 0 1px 2px rgba(0,0,0,.5); }
.rk-flag .cflag { width: 22px; }
.chg { font-family: var(--mono); font-weight: 800; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.rk-line2 .chg { font-size: 26px; }
.chg.up { color: var(--up); } .chg.down { color: var(--down); } .chg.flat { color: var(--text-3); }
/* v2 유행 상태 배지(떡상/급등/떡락/유지) — outline pill, 상태색. flex baseline 컨테이너에서도 세로 중앙. */
.st-badge { display: inline-flex; align-items: center; gap: 3px; align-self: center; font-family: var(--font); font-size: 12px; font-weight: 800; line-height: 1; padding: 3px 9px; border-radius: 999px; letter-spacing: -0.01em; white-space: nowrap; border: 1.5px solid currentColor; }
.st-badge.st-up { color: var(--up); } .st-badge.st-down { color: var(--down); } .st-badge.st-hold { color: var(--text-3); }
.rk-fav { margin-left: auto; border: 0; background: transparent; cursor: pointer;
  font-size: 20px; color: var(--text-3); line-height: 1; padding: 4px; }
.rk-fav.on { color: var(--gold); }
.rk-line3 { display: flex; align-items: center; gap: 10px; }
.rk-score { font-family: var(--mono); font-size: 15px; font-weight: 700; color: var(--text-2); }
.rk-plat { font-size: 10.5px; font-weight: 700; color: var(--text-3); border: 1px solid var(--line);
  border-radius: 6px; padding: 2px 7px; }

/* ── detail sheet: video + trend graph + comments ─────────── */
#sheet-body .dt-head { padding: 4px 2px 12px; }
.dt-title { font-size: 21px; font-weight: 800; letter-spacing: -0.02em; color: var(--text);
  display: flex; align-items: center; gap: 8px; }
.dt-figs { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
/* 상세도 퍼센트를 크게, 점수는 작고 옅게 */
.dt-score { font-family: var(--mono); font-size: 14px; font-weight: 700; color: var(--text-3); order: 2; }
.dt-figs { display: flex; align-items: baseline; gap: 8px; }
.dt-figs .chg { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; order: 1; }
/* 밈별 공유 버튼(상세 헤더) — 컴팩트 아이콘 버튼, 톤 통일 */
.dt-share { order: 3; align-self: center; margin-left: 4px; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; padding: 0; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text-2);
  cursor: pointer; transition: color .15s ease, border-color .15s ease, background .15s ease, transform .1s ease; }
.dt-share svg { width: 17px; height: 17px; }
.dt-share:hover { border-color: var(--surge); color: var(--surge); background: var(--surge-soft); }
.dt-share:active { transform: scale(.94); }
.dt-plat { margin-left: auto; font-size: 11px; font-weight: 700; color: var(--text-3);
  border: 1px solid var(--line); border-radius: 6px; padding: 3px 9px; }
.dt-video { position: relative; width: 100%; aspect-ratio: 9 / 12; max-height: 62vh;
  border-radius: var(--r); overflow: hidden; background: #000; border: 1px solid var(--line); }
.dt-video .embed { border-radius: var(--r); }

/* trend graph — ported spec (blue→purple line, ripple, no fill) */
.dt-graph { margin: 18px 0 6px; padding: 14px; border: 1px solid var(--line);
  border-radius: var(--r); background: var(--surface); }
.dt-graph-h { display: flex; justify-content: space-between; align-items: baseline;
  font-size: 12px; font-weight: 700; color: var(--text-2); margin-bottom: 10px; }
.dt-graph-h .num { font-family: var(--mono); font-size: 18px; font-weight: 800; color: var(--text); }
.tg-wrap { position: relative; height: 200px; overflow: hidden; }
.tg { width: 100%; height: 100%; display: block; overflow: visible; }
.tg-grid { stroke: var(--line); stroke-width: 1.4; }
.tg-line { fill: none; stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.tg-line { stroke-width: 2.5; }
.tg-dot { }
.tg-ripple { opacity: .35; animation: tgpulse 7s ease-out infinite; transform-origin: center; }
@keyframes tgpulse { 0% { r: 7px; opacity: .5; } 100% { r: 26px; opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .tg-ripple { animation: none; } }
.tg-axis { display: flex; justify-content: space-between; margin-top: 8px;
  font-family: var(--mono); font-size: 10.5px; color: var(--text-3); }
/* 최고/최저 지점 = 채운 작은 점(동그라미 아님) */
.tg-mk { stroke: none; }
.tg-mk.hi { fill: var(--up); } .tg-mk.lo { fill: var(--down); }
/* 그래프 '내부' 값 라벨(숫자+날짜) 오버레이 — 별도 칸 없이 그래프 위에 얹음 */
.tg-labels { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.tgl { position: absolute; display: inline-flex; align-items: baseline; gap: 4px; white-space: nowrap;
  padding: 1px 6px; border-radius: 7px; line-height: 1.25;
  background: var(--surface); border: 1px solid var(--line); box-shadow: 0 1px 3px rgba(0,0,0,.18); }
.tgl b { font-size: 12px; font-weight: 800; }
.tgl i { font-size: 10px; font-style: normal; color: var(--text-3); }
.tgl.hi b { color: var(--up); } .tgl.lo b { color: var(--down); } .tgl.cur b { color: var(--surge); }
/* 그래프 타임프레임(주/일/6시간) 필 버튼 — dt-graph-h 안, 제목과 점수 사이 */
.tg-tf { display: inline-flex; gap: 4px; margin: 0 auto; }
.tg-tf button { font-family: var(--mono); font-size: 10.5px; font-weight: 700;
  padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line);
  background: transparent; color: var(--text-3); cursor: pointer; }
.tg-tf button.on { background: var(--surface); color: var(--text); border-color: var(--text-3); }

/* ── comments (meme_comments style) ───────────────────────── */
.community { margin-top: 22px; }
.cm-h { font-family: var(--mono); font-size: 12px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--text-2); margin-bottom: 12px; }
.cm-h .cm-n, .cm-n { color: var(--surge); }
.cbox { display: flex; gap: 8px; align-items: center; padding: 7px;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); margin-bottom: 14px; }
.cbox input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--text);
  font: inherit; font-size: 13.5px; padding: 8px 4px; outline: none; }
.cbox input::placeholder { color: var(--text-3); }
.cbox button { flex: 0 0 auto; border: 0; border-radius: var(--r-pill); background: var(--surge);
  color: var(--surge-ink); font-size: 12.5px; font-weight: 800; padding: 9px 16px; cursor: pointer; }
.cbox button:disabled { opacity: .4; cursor: default; }
.thread { display: flex; flex-direction: column; gap: 14px; }
.cmt { display: grid; grid-template-columns: auto 34px 1fr; align-items: start; gap: 10px; }
.cmt-pin { align-self: center; font-size: 12px; }
.cmt:not(:has(.cmt-pin)) { grid-template-columns: 34px 1fr; }
.cmt-ava { width: 34px; height: 34px; border-radius: 50%; background: var(--surface-3);
  display: flex; align-items: center; justify-content: center; font-size: 17px; border: 1px solid var(--line); flex: 0 0 auto; }
.cmt-top { display: flex; align-items: baseline; gap: 8px; }
.cmt-top b { font-size: 13px; font-weight: 700; color: var(--text); }
.cmt-t { font-size: 10.5px; color: var(--text-3); font-family: var(--mono); }
.cmt-x { font-size: 13.5px; color: var(--text-2); margin-top: 3px; line-height: 1.55; }
.cmt-like { margin-top: 6px; border: 0; background: transparent; color: var(--text-3);
  font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; padding: 0; }
.cmt-like.on { color: var(--surge); }
/* ── 답글 스레드 ── */
.cmt-wrap { display: flex; flex-direction: column; gap: 10px; }
.cmt-reply-btn { align-self: flex-start; margin-left: 44px; border: 0; background: transparent;
  color: var(--text-3); font: inherit; font-size: 11.5px; font-weight: 700; cursor: pointer; padding: 2px 0; }
.cmt-reply-btn:hover { color: var(--text-2); }
.creplies { display: flex; flex-direction: column; gap: 12px; margin-left: 44px;
  padding-left: 12px; border-left: 2px solid var(--line); }
.creplies:empty { display: none; }
.cmt.cmt-reply { grid-template-columns: 28px 1fr; }
.cmt.cmt-reply .cmt-ava { width: 28px; height: 28px; font-size: 14px; }
.reply-box { margin-left: 44px; }

/* ── 예측 poll (kept) + leaderboard tabs ──────────────────── */
.lb-tabs { display: flex; gap: 6px; margin: 4px 0 14px; overflow-x: auto; scrollbar-width: none; }
.lb-tabs::-webkit-scrollbar { display: none; }
.lb-tab { flex: 0 0 auto; padding: 8px 14px; border-radius: var(--r-pill); border: 1px solid var(--line);
  background: var(--surface); color: var(--text-2); font-size: 12.5px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.lb-tab.is-active { background: var(--surge); color: var(--surge-ink); border-color: var(--surge); }
.poll-btn.up:hover, .poll.voted .poll-btn.up.picked { border-color: var(--up); color: var(--up); background: var(--up-soft); }
.poll-btn.down:hover, .poll.voted .poll-btn.down.picked { border-color: var(--down); color: var(--down); background: var(--down-soft); }
.poll-track { background: var(--down-soft); }
.poll-fill { background: var(--up-soft); border-right-color: var(--up); }
.poll-track .pt-up { color: var(--up); } .poll-track .pt-down { color: var(--down); }

/* ── 발굴 composer + posts ────────────────────────────────── */
.composer { border: 1px solid var(--surge-line); border-radius: var(--r-lg);
  background: linear-gradient(160% 120% at 0% 0%, var(--surge-soft), var(--surface)); padding: 16px; margin-bottom: 18px; }
.composer h3 { font-size: 15px; font-weight: 800; color: var(--text); margin: 0 0 12px; }
.cp-drop { display: flex; align-items: center; justify-content: center; min-height: 72px;
  border: 1px dashed var(--line-2); border-radius: var(--r); background: rgba(0,0,0,.2);
  color: var(--text-3); font-size: 13px; font-weight: 600; cursor: pointer; margin-bottom: 10px; text-align: center; padding: 10px; }
.cp-drop.has { color: var(--surge); border-color: var(--surge-line); }
.cp-row { display: flex; gap: 8px; }
.cp-name { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--surface); color: var(--text); font: inherit; font-size: 13.5px; padding: 12px 14px; outline: none; }
.cp-name:focus { border-color: var(--surge-line); }
.cp-post { flex: 0 0 auto; border: 0; border-radius: var(--r-sm); background: var(--surge);
  color: var(--surge-ink); font-size: 13.5px; font-weight: 800; padding: 0 20px; cursor: pointer; }
.cp-post:disabled { opacity: .4; cursor: default; }
.post { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); padding: 14px; margin-bottom: 10px; }
.post-h { display: flex; align-items: center; gap: 10px; }
.post-by { font-size: 13px; font-weight: 700; color: var(--text); }
.post-when { font-size: 11px; color: var(--text-3); font-family: var(--mono); margin-top: 1px; }
.post-early { margin-left: auto; font-family: var(--mono); font-size: 11px; font-weight: 700;
  color: var(--up); background: var(--up-soft); border-radius: var(--r-pill); padding: 3px 9px; }
.post-m { display: flex; align-items: center; gap: 12px; margin: 12px 0; padding: 12px;
  border-radius: var(--r-sm); background: var(--surface-2); border: 1px solid var(--line); }
.post-emoji { width: 46px; height: 46px; border-radius: var(--r-sm); background: var(--surface-3);
  display: flex; align-items: center; justify-content: center; font-size: 24px; border: 1px solid var(--line); flex: 0 0 auto; }
.post-t { font-size: 14px; font-weight: 700; color: var(--text); }
.post-c { font-size: 12.5px; color: var(--text-2); margin-top: 2px; }
.post-a { display: flex; gap: 16px; }
.post-a button { border: 0; background: transparent; color: var(--text-3); font: inherit;
  font-size: 12.5px; font-weight: 600; cursor: pointer; }
.post-a button b { color: var(--text-2); }
.post-a .champ.on { color: var(--surge); }
.post-thread { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); display: none; }
.post-thread.open { display: block; }

/* ── 월드컵 winner/loser states ───────────────────────────── */
.mu-side.win { border-color: var(--surge); background: var(--surge-soft); }
.mu-side.lose { opacity: .4; }
#bracket-next { display: none; margin-top: 20px; }
#bracket-next.show { display: block; }

/* ── responsive ───────────────────────────────────────────── */
@media (min-width: 960px) {
  .rk-card { height: 150px; }
  .dt-video { aspect-ratio: 16 / 11; }
  .rk-video .embed-if, .rk-embed-mount .embed-if { width: 178%; }
  .dt-video .embed-if { width: 100%; height: 178%; }
}
@media (max-width: 560px) {
  .rk-card { grid-template-columns: 92px 1fr; height: 140px; }
  .rk-video { width: 92px; height: 140px; }
  .rk-name { font-size: 15px; }
  .rk-line2 .chg { font-size: 22px; }
  .tg-wrap { height: 170px; }
}

/* graceful video placeholder (until the platform embed paints).
   ⚠️ 배경은 '반투명 비네트'여야 한다: 마운트의 background-image(썸네일)는 이 ::after
   아래에 깔리므로, 불투명 배경을 쓰면 정상 로드된 썸네일을 완전히 가려 검은 타일이 된다
   (구버전 버그). 반투명으로 두면 썸네일이 그대로 보이고(빠른 체감 로딩), 썸네일이 없는
   카드(TikTok/IG 등)는 마운트 기본색 #0e1116 위에 살짝 어두워져 자연스러운 플레이스홀더가
   된다. ▶ 아이콘 대비도 유지. 실제 영상 iframe(z-index:1)이 뜨면 그 위를 덮는다. */
.rk-embed-mount::after, .dt-video .embed::after {
  content: "▶"; position: absolute; inset: 0; z-index: 0;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.62); font-size: 22px;
  background: radial-gradient(120% 120% at 50% 40%, rgba(0,0,0,0.04), rgba(0,0,0,0.34));
}
.rk-embed-mount iframe, .dt-video .embed iframe { position: relative; z-index: 1; }
.dt-video .embed::after { font-size: 34px; }

/* ════════════════════════════════════════════════════════════
   REAL-DATA UI (rank outside card · auth · modals · states)
   ════════════════════════════════════════════════════════════ */

/* header auth button */
.auth-btn {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--text);
  border-radius: var(--r-pill); padding: 6px 14px 6px 12px; cursor: pointer;
  font-size: 13px; font-weight: 700; -webkit-tap-highlight-color: transparent;
}
.auth-btn:hover { border-color: var(--text-3); }
.auth-btn img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; }
.auth-btn .ab-ava { width: 22px; height: 22px; border-radius: 50%; background: var(--surge); color: var(--surge-ink);
  display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; }

/* ranking: number OUTSIDE the card */
#meme-feed.meme-feed { gap: 8px; }
.rk-row { display: grid; grid-template-columns: 30px 1fr; gap: 12px; align-items: center; cursor: pointer; }
.rk-row:focus-visible { outline: none; }
.rk-row:focus-visible .rk-card { border-color: var(--surge-line); }
.rk-pos { text-align: center; font-family: var(--mono); font-weight: 800; font-size: 17px;
  color: var(--text-3); font-variant-numeric: tabular-nums; }
.rk-row:nth-child(1) .rk-pos { color: #FACC15; font-size: 20px; }
.rk-row:nth-child(2) .rk-pos { color: #C7CBD1; font-size: 19px; }
.rk-row:nth-child(3) .rk-pos { color: #E0A46B; font-size: 18px; }
.rk-row .rk-card { transform: none; }   /* lift handled on row hover */
.rk-row:hover .rk-card { border-color: var(--line-2); background: var(--surface-2); transform: translateY(-1px); }
.rk-info { padding: 12px 14px 12px 0; }

/* avatars can be images */
.cmt-ava img, .cmt-ava > img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.cmt-ava { overflow: hidden; }

/* thumbnail tiles (prediction / discovery / bracket) */
.pred-thumb, .post-vid, .mu-thumb {
  background: #0e1116 center/cover no-repeat; position: relative; overflow: hidden;
}
.pred-thumb::after, .post-vid::after, .mu-thumb::after {
  content: "▶"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.55); font-size: 16px;
  background: radial-gradient(120% 120% at 50% 40%, rgba(26,31,39,.5), rgba(11,13,16,.6));
}
.pred-thumb { width: 52px; height: 52px; border-radius: var(--r-sm); flex: 0 0 auto; cursor: pointer; border: 1px solid var(--line); }
.pred-cmt { margin-top: 12px; width: 100%; border: 1px solid var(--line); background: var(--surface-2);
  color: var(--text-2); border-radius: var(--r-sm); padding: 11px; font-size: 13px; font-weight: 700; cursor: pointer; }
.pred-cmt:hover { color: var(--text); border-color: var(--line-2); }
.pred-comm { margin-top: 12px; }

/* discovery post video tile + open button */
.post-m { cursor: pointer; }
.post-vid { width: 56px; height: 56px; border-radius: var(--r-sm); flex: 0 0 auto; border: 1px solid var(--line); }
.post-a .opendt { color: var(--text-3); }
.post-a .opendt:hover { color: var(--text); }

/* bracket thumbs */
.mu-thumb { width: 84px; height: 84px; border-radius: var(--r); margin: 0 auto; }
.mu-side .mu-thumb::after { font-size: 26px; }

/* detail discoverer line */
.dt-disc { margin: 4px 0 2px; font-size: 12.5px; color: var(--text-3); }
.dt-disc b { color: var(--text-2); }

/* comments load / empty */
.cm-load, .cm-empty { font-size: 13px; color: var(--text-3); padding: 14px 2px; }

/* empty state */
.empty { text-align: center; padding: 40px 20px; border: 1px dashed var(--line); border-radius: var(--r); background: var(--surface); }
.empty .e-emoji { font-size: 30px; }
.empty .e-title { margin-top: 8px; font-size: 15px; font-weight: 700; color: var(--text-2); }
.empty .e-sub { margin-top: 3px; font-size: 13px; color: var(--text-3); }

/* skeletons */
.skel-block { background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 37%, var(--surface) 63%);
  background-size: 400% 100%; animation: shimmer 1.4s ease infinite; border-radius: var(--r); }
.rk-skel { height: 156px; margin-bottom: 8px; }
@media (max-width:560px){ .rk-skel { height: 140px; } }

/* modals (login + onboarding) */
.modal-scrim { position: fixed; inset: 0; z-index: 70; background: rgba(0,0,0,.6);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal { width: 100%; max-width: 360px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 24px; position: relative; box-shadow: var(--shadow); }
.modal h3 { margin: 0 0 6px; font-size: 19px; font-weight: 800; color: var(--text); letter-spacing: -0.02em; }
.modal-sub { margin: 0 0 18px; font-size: 13px; color: var(--text-3); line-height: 1.55; }
.modal-x { position: absolute; top: 14px; right: 14px; width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--text-2); cursor: pointer; font-size: 14px; }
.oauth { display: flex; flex-direction: column; gap: 8px; }
.oauth button { border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text);
  border-radius: var(--r-sm); padding: 13px; font-size: 14px; font-weight: 700; cursor: pointer; }
.oauth button:hover { border-color: var(--text-3); }
.ob-l { display: block; font-size: 12px; font-weight: 700; color: var(--text-2); margin: 14px 0 6px; }
.ob-in { width: 100%; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text);
  border-radius: var(--r-sm); padding: 12px 14px; font: inherit; font-size: 14px; outline: none; }
.ob-in:focus { border-color: var(--surge-line); }
.ob-gender { display: flex; gap: 8px; }
.ob-gender button { flex: 1; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text-2);
  border-radius: var(--r-sm); padding: 12px; font-size: 13.5px; font-weight: 700; cursor: pointer; }
.ob-gender button.on { border-color: var(--surge); color: var(--surge); background: var(--surge-soft); }
.ob-save { width: 100%; margin-top: 20px; border: 0; border-radius: var(--r-sm); background: var(--surge);
  color: var(--surge-ink); padding: 14px; font-size: 14.5px; font-weight: 800; cursor: pointer; }
.ob-save:disabled { opacity: .4; cursor: default; }

/* toast */
.toast { position: fixed; left: 50%; bottom: calc(var(--bottombar-h) + 18px); transform: translateX(-50%);
  z-index: 80; background: var(--text); color: var(--canvas); font-size: 13px; font-weight: 700;
  padding: 11px 18px; border-radius: var(--r-pill); box-shadow: var(--shadow); max-width: 90vw; text-align: center;
  animation: toastin .28s ease; }
.toast.out { opacity: 0; transition: opacity .3s ease; }
@keyframes toastin { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }
@media (min-width: 960px) { .toast { bottom: 28px; } }

/* ════════════════════════════════════════════════════════════
   BIG MEME CARDS (media-top, grid) · carousel · per-platform embed
   Appended last → overrides earlier feed styles.
   ════════════════════════════════════════════════════════════ */

/* feed grid: 1-up mobile, 2-up tablet+, 3-up wide */
#meme-feed.meme-feed { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 560px) { #meme-feed.meme-feed { grid-template-columns: repeat(2, 1fr); gap: 14px; } }
@media (min-width: 1180px) { #meme-feed.meme-feed { grid-template-columns: repeat(3, 1fr); } }

/* media-top meme card */
.mk { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface);
  overflow: hidden; cursor: pointer; box-shadow: var(--shadow-sm);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease; }
.mk:hover, .mk:focus-visible { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--line-2); outline: none; }
.mk-media { position: relative; aspect-ratio: 4 / 5; background: #0e1116; overflow: hidden; }
.mk-media .rk-embed-mount { position: absolute; inset: 0; background: #0e1116 center/cover no-repeat; }
/* rank chip now lives OUTSIDE the video — in the info row next to the name */
.mk-line { display: flex; align-items: center; gap: 9px; min-width: 0; }
.mk-rank { flex: 0 0 auto;
  min-width: 24px; height: 24px; padding: 0 7px; border-radius: 7px;
  background: var(--surface-3); color: var(--text-2); font-weight: 800; font-size: 13px;
  display: inline-flex; align-items: center; justify-content: center;
  font-variant-numeric: tabular-nums; border: 1px solid var(--line-2); }
#meme-feed .mk:nth-child(1) .mk-rank { background: #F5B23D; color: #1A1205; border-color: transparent; }
#meme-feed .mk:nth-child(2) .mk-rank { background: #AEB8C4; color: #12161C; border-color: transparent; }
#meme-feed .mk:nth-child(3) .mk-rank { background: #D08A4E; color: #1A1205; border-color: transparent; }
.mk-info { padding: 12px 14px 14px; }
.mk-name { font-size: 15.5px; font-weight: 800; letter-spacing: -0.02em; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
/* 퍼센트(변화율)가 주인공 — 아주 크게. 점수는 흐린 작은 글씨로 분리(거의 안 보이게) */
.mk-figs { display: flex; align-items: baseline; gap: 8px; margin-top: 8px; }
/* 떡상 순위: 트렌드 점수를 크게(주지표), 전날대비 %는 작게(위치·크기 스왑 2026-07-16) */
.mk-score { font-family: var(--mono); font-size: 30px; line-height: 1; font-weight: 800; letter-spacing: -0.02em; color: var(--text); font-variant-numeric: tabular-nums; }
.mk-figs .chg { font-size: 14px; line-height: 1; font-weight: 700; letter-spacing: -0.01em; }
/* 각 영상 밑 상위 댓글 미리보기 (커뮤니티 느낌) */
.mk-comments { margin-top: 11px; padding-top: 10px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 5px; }
.mkc { font-size: 12px; line-height: 1.45; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mkc-who { font-weight: 700; color: var(--text); }
.mkc-who.anon { color: var(--text-3); font-weight: 600; }
.mkc-empty { font-size: 11.5px; color: var(--text-3); }
.mkc-more { font-size: 11.5px; font-weight: 700; color: var(--surge); margin-top: 1px; }
.mk-skel { aspect-ratio: 4 / 5; border-radius: var(--r); }
@media (max-width: 559px) {
  .mk-media { aspect-ratio: 16 / 12; }
  .mk-skel { aspect-ratio: 16 / 12; }
}

/* per-platform embed cover — keep each platform's video looking right */
.embed-if { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); border: 0; }
.rk-embed-mount[data-plat="youtube"] .embed-if, .embed.p-youtube .embed-if { width: 178%; height: 100%; }
.rk-embed-mount[data-plat="tiktok"]  .embed-if, .embed.p-tiktok  .embed-if { width: 100%; height: 100%; }
.rk-embed-mount[data-plat="instagram"] .embed-if, .embed.p-instagram .embed-if { width: 100%; height: 138%; top: 44%; }

/* detail video carousel */
.dt-caro { position: relative; margin: 6px 0 16px; }
.dt-caro .dt-video { position: relative; width: 100%; aspect-ratio: 9 / 12; max-height: 60vh;
  border-radius: var(--r); overflow: hidden; background: #000; border: 1px solid var(--line); }
.caro-nav { position: absolute; top: calc(50% - 22px); transform: translateY(-50%); z-index: 4;
  width: 40px; height: 40px; border-radius: 50%; cursor: pointer;
  background: rgba(10,12,16,.46); color: #fff; font-size: 24px; line-height: 1;
  border: 1px solid rgba(255,255,255,.14); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center; transition: background .16s ease; }
.caro-nav:hover { background: rgba(10,12,16,.72); }
.caro-nav.prev { left: 8px; } .caro-nav.next { right: 8px; }
.caro-count { position: absolute; top: 10px; left: 10px; z-index: 4;
  font-family: var(--mono); font-size: 11px; font-weight: 700; color: #fff; letter-spacing: .03em;
  background: rgba(10,12,16,.5); padding: 4px 10px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.14); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
/* 캐러셀 인디케이터 — 확장형 pill 도트: 활성=바이올렛 길쭉 pill, 비활성=작은 점.
   (전체 톤과 동일한 --surge/--line-2 토큰, 부드러운 확장 트랜지션으로 프리미엄 느낌) */
.caro-dots { display: flex; gap: 5px; justify-content: center; align-items: center; margin-top: 12px; flex-wrap: wrap; }
.caro-dot { width: 6px; height: 6px; border-radius: 999px; padding: 0; border: 0; background: var(--line-2);
  cursor: pointer; transition: width .28s cubic-bezier(.4,0,.2,1), background .2s ease; }
.caro-dot:hover { background: var(--text-3); }
.caro-dot.on { width: 22px; background: var(--surge); }
.caro-dot.on:hover { background: var(--surge); }

/* light-theme fixes for a few dark-assuming bits */
.tg-grid { stroke: var(--line); }
.dt-video, .embed { background: #0e1116; }

/* ════════════════════════════════════════════════════════════
   떡상 월드컵 — 큰 세로 영상 VS (screenshot layout)
   ════════════════════════════════════════════════════════════ */
.wc-top { display: flex; justify-content: center; padding: 6px 0 4px; }
.wc-round { font-family: var(--mono); font-size: 12px; font-weight: 800; color: var(--text-2);
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; }
.wc-q { text-align: center; font-size: 26px; font-weight: 800; letter-spacing: -0.03em;
  color: var(--text); margin: 14px 0 22px; }
.wc-q b { color: var(--surge); }
.wc-arena { position: relative; display: flex; align-items: flex-start; justify-content: center; gap: 12px; }
.wc-side { flex: 1 1 0; min-width: 0; max-width: 320px; border: 0; background: transparent; padding: 0; text-align: center;
  transition: flex-basis .55s cubic-bezier(.22,1,.36,1), max-width .55s cubic-bezier(.22,1,.36,1), transform .5s cubic-bezier(.34,1.4,.5,1), opacity .45s ease, margin .5s ease; }
.wc-head { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-bottom: 12px; }
.wc-flag { display: inline-flex; align-items: center; font-size: 26px; line-height: 1; }
.wc-name { font-size: 17px; font-weight: 800; letter-spacing: -0.02em; color: var(--text); }
.wc-media { position: relative; aspect-ratio: 9 / 16; border-radius: var(--r-lg); cursor: pointer;
  overflow: hidden; background: #0e1116; border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  transition: box-shadow .4s ease, transform .5s cubic-bezier(.34,1.4,.5,1); }
.wc-media .rk-embed-mount { position: absolute; inset: 0; background: #0e1116 center/cover no-repeat; }
/* 선택 확정: 승자는 가운데로 확대, 패자는 접히며 사라짐 */
.wc-arena.decided .wc-side.lose { flex: 0 1 0; max-width: 0; opacity: 0; transform: scale(.82); margin: 0; overflow: hidden; pointer-events: none; }
.wc-arena.decided .wc-versus.gone { opacity: 0; }
.wc-arena.decided .wc-side.win { max-width: 340px; transform: scale(1.06); }
.wc-arena.decided .wc-side.win .wc-media { border: 3px solid var(--surge); box-shadow: 0 0 0 4px var(--surge-soft), 0 24px 60px rgba(0,0,0,.5); }
.wc-side.win .wc-name { color: var(--surge); }
.wc-versus { position: absolute; left: 50%; top: 62%; transform: translate(-50%, -50%); z-index: 3;
  width: 46px; height: 46px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line);
  box-shadow: var(--shadow); display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 14px; font-weight: 800; color: var(--text-2); }
.wc-done { grid-column: 1 / -1; text-align: center; padding: 40px 20px; font-size: 15px; font-weight: 700; color: var(--text-2); }
/* ── 월드컵 v2: 하루 5강 · 선택 집계 애니메이션 · 대진 댓글(PC 2컬럼/모바일 스택) ── */
.wc-stage { display: block; }
.wc-main { max-width: 620px; margin: 0 auto; }
/* 선택 후 승/패 하이라이트(접힘 없음): 고른 쪽 링, 다른 쪽 흐리게 */
.wc-side.win .wc-media { border: 2px solid var(--surge); box-shadow: 0 0 0 4px var(--surge-soft), var(--shadow-sm); }
.wc-side.win .wc-name { color: var(--surge); }
.wc-side.lose { opacity: .5; }
/* 집계 결과 바(예측 poll과 동일 톤) */
.wc-result { margin: 20px auto 0; max-width: 560px; }
.wc-bar { height: 16px; border-radius: 999px; overflow: hidden; background: var(--down-soft); }
.wc-bar .wc-fill-a { height: 100%; width: 0; background: var(--up); border-right: 2px solid var(--surface); transition: width .8s cubic-bezier(.22,1,.36,1); }
.wc-rlabels { display: flex; justify-content: space-between; align-items: baseline; margin-top: 8px; font-size: 13px; font-weight: 700; }
.wc-la { color: var(--up); } .wc-lb { color: var(--down); }
.wc-la b, .wc-lb b { font-family: var(--mono); font-size: 15px; }
.wc-total { font-size: 11.5px; font-weight: 600; color: var(--text-3); font-family: var(--mono); }
/* 다음 강 버튼 — 선택 전 비활성, 선택 후 바이올렛 활성 */
.wc-next { display: block; width: 100%; max-width: 560px; margin: 20px auto 0; padding: 14px;
  border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); color: var(--text-3);
  font-size: 15px; font-weight: 800; cursor: pointer; transition: background .16s ease, color .16s ease, border-color .16s ease; }
.wc-next:not(:disabled) { background: var(--surge); color: var(--surge-ink); border-color: var(--surge); }
.wc-next:not(:disabled):hover { filter: brightness(1.05); }
.wc-next:disabled { cursor: default; }
/* 대진 댓글 컬럼 */
.wc-comm { margin: 26px auto 0; max-width: 620px; }
@media (min-width: 720px) { .wc-q { font-size: 30px; } }
@media (min-width: 900px) {
  .wc-stage { display: grid; grid-template-columns: minmax(0,1fr) 360px; gap: 30px; align-items: start; max-width: 1060px; margin: 0 auto; }
  .wc-main { max-width: none; margin: 0; }
  .wc-comm { margin: 0; max-width: none; position: sticky; top: 16px; }
}

/* ════════════════════════════════════════════════════════════
   Tremer란 — full marketing content (light editorial), scrollable
   ════════════════════════════════════════════════════════════ */
.about-lead { font-size: 15px; color: var(--text-2); line-height: 1.75; max-width: 520px; margin: 18px auto 0; word-break: keep-all; }
.about-block { padding: 34px 0; border-top: 1px solid var(--line); }
.about-block > h2 { font-size: 22px; font-weight: 800; letter-spacing: -0.03em; color: var(--text); margin: 0 0 10px; }
.about-block .lead { font-size: 14.5px; color: var(--text-2); line-height: 1.7; margin: 0 0 22px; word-break: keep-all; }
.ab-kicker { font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--surge); margin-bottom: 8px; }
.ab-sub { font-size: 14px; font-weight: 800; color: var(--text); margin: 28px 0 12px; }

/* app features + steps */
.ab-features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.ab-features article { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); padding: 18px; }
.ab-num { font-family: var(--mono); font-size: 11px; font-weight: 800; letter-spacing: .1em; color: var(--text-3); margin-bottom: 10px; }
.ab-features h4 { font-size: 15px; font-weight: 800; color: var(--text); margin: 0 0 6px; }
.ab-features p { font-size: 13px; color: var(--text-2); margin: 0; line-height: 1.6; }
.ab-steps { list-style: none; padding: 0; margin: 16px 0 0; border-top: 1px solid var(--line); }
.ab-steps li { display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: baseline; padding: 20px 2px; border-bottom: 1px solid var(--line); }
.ab-step-n { font-family: var(--mono); font-size: 24px; font-weight: 800; color: var(--text-3); }
.ab-steps h4 { font-size: 15px; font-weight: 800; color: var(--text); margin: 0 0 5px; }
.ab-steps p { font-size: 13.5px; color: var(--text-2); margin: 0; }

/* moat callout */
.ab-moat { display: flex; gap: 16px; align-items: flex-start; margin-top: 22px; padding: 22px;
  border: 1.5px solid var(--text); border-radius: var(--r-lg); background: var(--surface); }
.ab-moat-mark { font-size: 22px; color: var(--surge); }
.ab-moat p { margin: 0; font-size: 16px; font-weight: 700; line-height: 1.5; color: var(--text); word-break: keep-all; }
.ab-moat p span { display: block; margin-top: 6px; font-size: 13px; font-weight: 500; color: var(--text-2); }

/* comparison table */
.ab-compare { margin-top: 22px; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.abc-row { display: grid; grid-template-columns: 0.85fr 1fr 1fr; border-top: 1px solid var(--line); }
.abc-row:first-child { border-top: 0; }
.abc-row > div { padding: 14px 14px; font-size: 13px; color: var(--text-2); line-height: 1.5; word-break: keep-all; }
.abc-k { font-weight: 700; color: var(--text-3); font-size: 12px; display: flex; align-items: center; }
.abc-t { color: var(--text); font-weight: 700; background: var(--surge-soft); }
.abc-head > div { font-weight: 800; font-size: 12px; color: var(--text-2); }
.abc-head .abc-t { color: var(--surge); }
@media (max-width: 559px) {
  .abc-row { grid-template-columns: 1fr; }
  .abc-row > div { border-top: 1px solid var(--line); }
  .abc-row > div:first-child { border-top: 0; background: var(--surface-2); font-weight: 700; }
  .abc-head { display: none; }
  .abc-row .abc-t::before { content: "Tremer · "; color: var(--surge); font-weight: 800; }
}

/* deliverables + use cases */
.ab-deliv { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.ab-deliv article { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); padding: 16px; }
.ab-deliv h4 { font-size: 14px; font-weight: 800; color: var(--text); margin: 0 0 6px; }
.ab-deliv p { font-size: 12.5px; color: var(--text-2); margin: 0; line-height: 1.55; }
.ab-uses { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.ab-use { display: grid; grid-template-columns: 140px 1fr; gap: 18px; align-items: baseline; padding: 18px 2px; border-bottom: 1px solid var(--line); }
.ab-role { font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: .06em; color: var(--text-3); text-transform: uppercase; }
.ab-use h4 { font-size: 14.5px; font-weight: 800; color: var(--text); margin: 0 0 5px; line-height: 1.4; }
.ab-use p { font-size: 13px; color: var(--text-2); margin: 0; line-height: 1.55; }

/* pricing tiers */
.ab-plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.ab-plan { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); padding: 22px; }
.ab-plan.hot { border-color: var(--surge); box-shadow: var(--shadow-md); }
.abp-name { font-size: 12px; font-weight: 800; letter-spacing: .06em; color: var(--text-2); text-transform: uppercase; margin-bottom: 8px; }
.abp-price { font-size: 24px; font-weight: 800; letter-spacing: -0.03em; color: var(--text); margin-bottom: 2px; }
.abp-price small { font-size: 12px; font-weight: 600; color: var(--text-3); margin-left: 3px; }
.abp-desc { font-size: 12.5px; color: var(--text-2); margin: 4px 0 16px; min-height: 34px; }
.ab-plan ul { list-style: none; padding: 0; margin: 0 0 18px; display: flex; flex-direction: column; gap: 9px; }
.ab-plan li { font-size: 12.5px; color: var(--text-2); padding-left: 16px; position: relative; }
.ab-plan li::before { content: ""; position: absolute; left: 2px; top: 8px; width: 6px; height: 6px; border-radius: 50%; background: var(--surge); }
.abp-cta { margin-top: auto; text-align: center; border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 11px; font-size: 13px; font-weight: 800; color: var(--text); }
.abp-cta.primary { background: var(--surge); color: #fff; border-color: var(--surge); }

/* faq */
.ab-faq { border-top: 1px solid var(--line); }
.ab-faq details { border-bottom: 1px solid var(--line); padding: 16px 2px; }
.ab-faq summary { cursor: pointer; font-size: 14px; font-weight: 700; color: var(--text); list-style: none; position: relative; padding-right: 24px; }
.ab-faq summary::-webkit-details-marker { display: none; }
.ab-faq summary::after { content: "+"; position: absolute; right: 2px; top: -2px; font-size: 18px; color: var(--text-3); }
.ab-faq details[open] summary::after { content: "−"; }
.ab-faq details p { margin: 10px 0 0; font-size: 13px; color: var(--text-2); line-height: 1.65; }

/* responsive */
@media (max-width: 559px) {
  .ab-features, .ab-deliv, .ab-plans { grid-template-columns: 1fr; }
  .ab-use { grid-template-columns: 1fr; gap: 6px; }
}

/* ════════════════════════════════════════════════════════════
   FINAL PASS — colored poll · Reddit 발굴 · anon comments ·
   clickable meme names · PC full-screen detail (Toss/Polymarket)
   Appended last → authoritative over earlier blocks.
   ════════════════════════════════════════════════════════════ */

/* ── 예측: 색을 처음부터 (초록 더 뜬다 / 빨강 그만 뜬다) + 세련된 클릭 ── */
.poll-btn { transition: transform .14s ease, border-color .14s ease, background .14s ease, box-shadow .14s ease, color .14s ease; }
.poll-btn.up   { border-color: rgba(47,217,139,.38); color: var(--up);   background: var(--up-soft); }
.poll-btn.down { border-color: rgba(255,92,108,.38); color: var(--down); background: var(--down-soft); }
.poll-btn .pb-ic { font-weight: 900; }
.poll-btn.up .pb-ic   { color: var(--up); }
.poll-btn.down .pb-ic { color: var(--down); }
.poll-btn.up:hover   { border-color: var(--up);   box-shadow: 0 6px 16px rgba(47,217,139,.24); transform: translateY(-1px); }
.poll-btn.down:hover { border-color: var(--down); box-shadow: 0 6px 16px rgba(255,92,108,.24); transform: translateY(-1px); }
.poll-btn:active { transform: scale(.96); }
.poll.voted .poll-btn { opacity: .45; cursor: default; box-shadow: none; transform: none; }
.poll.voted .poll-btn.picked { opacity: 1; animation: pollPop .44s cubic-bezier(.22,1.5,.4,1); }
.poll.voted .poll-btn.up.picked   { border-color: var(--up);   color: var(--up);   background: var(--up-soft);   box-shadow: 0 0 0 3px rgba(47,217,139,.22); }
.poll.voted .poll-btn.down.picked { border-color: var(--down); color: var(--down); background: var(--down-soft); box-shadow: 0 0 0 3px rgba(255,92,108,.22); }
@keyframes pollPop { 0% { transform: scale(1); } 42% { transform: scale(1.055); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .poll.voted .poll-btn.picked { animation: none; } }

/* ── clickable meme names (예측·발굴 등에서 이름 → 상세) ── */
.mk-link { cursor: pointer; transition: color .14s ease; }
.mk-link:hover { color: var(--surge); text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 2px; }

/* ── 발굴 composer (링크 / 이름 / 설명 세로 스택, 통짜 버튼) ── */
.composer .cp-in,
.composer input.cp-in,
.composer textarea.cp-in {
  display: block; width: 100%; flex: none;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--surface); color: var(--text); font: inherit; font-size: 14px;
  padding: 13px 14px; margin-bottom: 9px; outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.composer .cp-in::placeholder { color: var(--text-3); }
.composer .cp-in:focus { border-color: var(--surge-line); box-shadow: 0 0 0 3px var(--surge-soft); }
.composer .cp-link { font-weight: 600; }
.composer textarea.cp-desc { resize: vertical; min-height: 48px; line-height: 1.55; }
.composer .cp-post {
  display: block; width: 100%; flex: none; border: 0; border-radius: var(--r-sm);
  background: var(--surge); color: var(--surge-ink); font-size: 14px; font-weight: 800;
  padding: 13px; margin-top: 3px; cursor: pointer;
  transition: opacity .14s ease, transform .12s ease;
}
.composer .cp-post:not(:disabled):hover { opacity: .93; }
.composer .cp-post:not(:disabled):active { transform: scale(.99); }
.composer .cp-post:disabled { opacity: .4; cursor: default; }

/* ── 발굴 카드 — Reddit 스타일 커뮤니티 카드 ── */
#disc-feed { display: flex; flex-direction: column; gap: 10px; }
.rd {
  display: grid; grid-template-columns: 1fr 92px; gap: 14px; align-items: start;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--surface);
  padding: 14px 16px; transition: border-color .15s ease, box-shadow .15s ease;
}
.rd:hover { border-color: var(--line-2); box-shadow: var(--shadow-sm); }
.rd-main { min-width: 0; }
.rd-meta { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--text-3); margin-bottom: 8px; flex-wrap: wrap; }
.rd-ava { width: 22px; height: 22px; border-radius: 50%; background: var(--surface-3); border: 1px solid var(--line);
  display: inline-flex; align-items: center; justify-content: center; font-size: 12px; overflow: hidden; flex: 0 0 auto; }
.rd-ava img { width: 100%; height: 100%; object-fit: cover; }
.rd-by { font-weight: 700; color: var(--text-2); }
.rd-dot { color: var(--text-3); }
.rd-chg { margin-left: auto; }
.rd-chg .chg { font-size: 13px; }
.rd-title { font-size: 17px; font-weight: 800; letter-spacing: -0.02em; color: var(--text); line-height: 1.3; word-break: keep-all; }
.rd-desc { font-size: 13.5px; color: var(--text-2); line-height: 1.62; margin-top: 6px; word-break: keep-all;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.rd-actions { display: flex; align-items: center; gap: 8px; margin-top: 13px; flex-wrap: wrap; }
.rd-up, .rd-act {
  border: 1px solid var(--line); background: var(--surface-2); color: var(--text-2);
  font: inherit; font-size: 12.5px; font-weight: 700; border-radius: var(--r-pill); padding: 7px 13px;
  cursor: pointer; display: inline-flex; align-items: center; gap: 5px; transition: all .14s ease;
}
.rd-up b { color: var(--text); font-variant-numeric: tabular-nums; }
.rd-up:hover, .rd-act:hover { border-color: var(--line-2); color: var(--text); }
.rd-up:active, .rd-act:active { transform: scale(.97); }
.rd-up.on { border-color: var(--up); color: var(--up); background: var(--up-soft); }
.rd-up.on b { color: var(--up); }
.rd-thumb {
  position: relative; width: 92px; height: 92px; border-radius: var(--r-sm);
  background: #0e1116 center/cover no-repeat; overflow: hidden; cursor: pointer;
  border: 1px solid var(--line); flex: 0 0 auto;
}
.rd-play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 20px; background: rgba(0,0,0,.22); transition: background .14s ease; }
.rd-thumb:hover .rd-play { background: rgba(0,0,0,.4); }
.rd-comm { grid-column: 1 / -1; margin-top: 6px; padding-top: 14px; border-top: 1px solid var(--line); }
@media (max-width: 559px) {
  .rd { grid-template-columns: 1fr 72px; gap: 12px; padding: 13px 14px; }
  .rd-thumb { width: 72px; height: 72px; }
  .rd-title { font-size: 15.5px; }
}

/* ── 비회원(익명) 댓글 표기 ── */
.cmt-ava.anon { background: var(--surface-3); color: var(--text-3); font-size: 15px; }
.cmt-top b.who-anon { color: var(--text-3); font-weight: 700; }

/* ════════════════════════════════════════════════════════════
   PC 전체화면 상세 — 여백 없이 전체 화면에서 영상 | 그래프+커뮤니티
   (토스증권 / 폴리마켓 레이아웃). 모바일은 그대로 바텀시트.
   ════════════════════════════════════════════════════════════ */
.dt-stage { display: block; }
.dt-aside { display: block; }

@media (min-width: 960px) {
  .sheet {
    left: 0; right: 0; top: 0; bottom: 0;
    width: 100%; max-width: none; height: 100vh; max-height: 100vh;
    transform: translateY(100%);
    border: 0; border-radius: 0; padding: 0;
    display: flex; flex-direction: column; overflow: hidden;
  }
  .sheet.open { transform: translateY(0); }
  .sheet-grip { display: none; }
  .sheet-close {
    top: 16px; right: 20px; width: 40px; height: 40px; font-size: 18px; z-index: 6;
    background: var(--surface-2); box-shadow: var(--shadow-sm);
  }

  #sheet-body { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
  #sheet-body .dt-head {
    flex: 0 0 auto; padding: 18px 72px 18px 32px;
    border-bottom: 1px solid var(--line); background: var(--surface);
    display: flex; align-items: center; justify-content: space-between; gap: 24px;
  }
  #sheet-body .dt-head .dt-figs { margin-top: 0; flex: 0 0 auto; }

  .dt-stage {
    flex: 1 1 auto; min-height: 0; display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  }
  .dt-stage .dt-caro {
    margin: 0; height: 100%; min-height: 0; background: #0b0e13;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
    padding: 24px; border-right: 1px solid var(--line); overflow: hidden;
  }
  .dt-stage .dt-caro .dt-video {
    width: min(100%, 440px); height: auto; max-height: 100%; aspect-ratio: 9 / 12;  /* 원본 규격 복원 */
    margin: 0; box-shadow: var(--shadow);
  }
  /* PC/모바일 동일한 플랫폼별 규격을 쓰도록 PC 전용 크롭 오버라이드는 제거
     (per-platform 규격은 아래 공통 .embed.p-* 규칙 하나로 통일) */
  .dt-caro .caro-dots { margin-top: 0; }

  .dt-aside {
    height: 100%; min-height: 0; overflow-y: auto;
    padding: 22px 28px 44px; background: var(--surface);
  }
  .dt-aside .dt-graph { margin-top: 0; }
  .dt-aside .dt-disc { margin-top: 14px; }
  .dt-aside .community { margin-top: 22px; }

  /* the login/onboarding modals must sit above the full-screen sheet */
  .modal-scrim { z-index: 72; }
}

/* ── PC 가로 배치 — 넓은 셸에서 한 번에 많은 밈이 보이도록 ── */
@media (min-width: 960px) {
  :root { --content-max: 1120px; }             /* 좁던 680 → 폭을 실제로 사용 */

  /* 떡상 순위: 폭에 맞춰 열을 자동으로 채움(넓을수록 더 많은 밈) */
  #meme-feed.meme-feed { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }

  /* 예측: 2열 그리드로 가로 활용 */
  .pred-deck { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
  #tab-prediction { max-width: 960px; margin: 0 auto; }

  /* 발굴(레딧): 읽기 좋은 가운데 정렬 컬럼 */
  #tab-discovery { max-width: 780px; margin: 0 auto; }

  /* Tremer란: 장문 마케팅은 가독성 위해 폭 제한 */
  #tab-about { max-width: 820px; margin: 0 auto; }
}
@media (min-width: 1280px) {
  :root { --content-max: 1200px; }
}

/* ── 테마 토글 버튼 (헤더 오른쪽) ─── */
.lang-btn {
  margin-left: auto; flex: 0 0 auto; height: 36px; padding: 0 12px; border-radius: var(--r-pill);
  border: 1px solid var(--line-2); background: var(--surface); color: var(--text-2);
  font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer;
  display: inline-flex; align-items: center; transition: background .14s ease, color .14s ease;
}
.lang-btn:hover { background: var(--surface-2); color: var(--text); }
.theme-btn {
  flex: 0 0 auto; width: 36px; height: 36px; border-radius: var(--r-pill);
  border: 1px solid var(--line-2); background: var(--surface); color: var(--text);
  font-size: 15px; line-height: 1; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .14s ease, transform .12s ease;
}
.theme-btn:hover { background: var(--surface-2); }
.theme-btn:active { transform: scale(.94); }

/* ── 모바일 하단 내비에서는 'Tremer란' 숨김 (PC 레일에는 유지) ─── */
@media (max-width: 959px) {
  .app-nav .nav-item[data-tab="about"] { display: none; }
}

/* ════════════════════════════════════════════════════════════
   영상 가드 · 출처 로고 버튼 · 밈 설명 · amber 대비 보정
   ════════════════════════════════════════════════════════════ */
/* 영상 위 투명 오버레이 — 플랫폼 자체 버튼을 덮어 터치 차단 */
.vid-guard { position: absolute; inset: 0; z-index: 3; cursor: pointer; }
.vid-guard.paused::after {
  content: "▶"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 42px; color: rgba(255,255,255,.92); text-shadow: 0 2px 10px rgba(0,0,0,.55);
}
/* 오른쪽 위 출처(원본 플랫폼) 로고 버튼 */
.vid-src {
  position: absolute; top: 9px; right: 9px; z-index: 4;
  width: 30px; height: 30px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.5); color: #fff; border: 1px solid rgba(255,255,255,.2);
  -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px);
  transition: background .14s ease, transform .12s ease;
}
.vid-src:hover { background: rgba(0,0,0,.72); }
.vid-src:active { transform: scale(.94); }
.vid-src svg { width: 17px; height: 17px; display: block; }
/* TikTok muted 표시(좌상단) — 첫 탭 unmute 전까지 노출. 앱 volume_off 미러 */
.tt-mute {
  position: absolute; top: 9px; left: 9px; z-index: 4;
  width: 30px; height: 30px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.5); color: #fff; border: 1px solid rgba(255,255,255,.2);
  -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px);
  pointer-events: none;
}
.tt-mute svg { width: 18px; height: 18px; display: block; }

/* 상세 밈 설명 */
.dt-desc {
  font-size: 14px; line-height: 1.65; color: var(--text-2);
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r);
  padding: 14px 16px; margin-bottom: 16px; word-break: keep-all;
  /* 넓은 화면에서 읽기 폭 제한 — 가독성 + 2줄 클램프 오버플로 보장(모든 밈에 '더보기' 노출) */
  max-width: 560px;
}
/* 밈 설명 더보기/접기 (상세) — 기본 3줄 클램프, 넘칠 때만 버튼 노출 */
.dt-desc-wrap { margin-bottom: 16px; }
.dt-desc-wrap .dt-desc { margin-bottom: 0; }
.dt-desc.clamp { display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dt-more { display: inline-block; margin-top: 6px; padding: 2px 0; background: none; border: 0;
  color: var(--surge); font-size: 13px; font-weight: 700; cursor: pointer; }
.dt-more:hover { text-decoration: underline; }

/* amber 강조색 위에는 밝은 흰 글씨 대신 어두운 잉크로(대비 확보) */
.abp-cta.primary { color: var(--surge-ink); }

/* ════════════════════════════════════════════════════════════
   감사(audit) 반영 — 빈상태/탭타깃/iOS줌/접근성
   ════════════════════════════════════════════════════════════ */
/* U4 — 빈 상태·로딩 자리표시자가 그리드 전체 폭을 차지 */
#meme-feed > .empty, #pred-deck > .empty,
#meme-feed > .pred-skel, #disc-feed > .empty { grid-column: 1 / -1; }

/* S5 — iOS Safari 입력 포커스 시 자동 확대 방지(≥16px) */
.cbox input, .composer .cp-in, .cp-name, .ob-in { font-size: 16px; }

/* A11 — 탭 타깃 최소 크기 */
.caro-dot { position: relative; }
.caro-dot::after { content: ""; position: absolute; inset: -16px; }   /* 히트 영역 확대(시각은 7px 유지) */
.cmt-like { min-height: 32px; padding: 6px 4px; align-items: center; }
.modal-x { width: 40px; height: 40px; }
.vid-src { width: 34px; height: 34px; }

/* A10 — 스크린리더 전용 텍스트 */
.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; }

/* A5 — 모션 최소화 선호 시 확대/전환 완화 */
@media (prefers-reduced-motion: reduce) {
  .wc-side, .wc-media, .poll-result, .poll-btn { transition: none !important; }
  .wc-arena.decided .wc-side.win { transform: none; }
}

/* U1 — 예측/발굴 로딩 스켈레톤 · 온보딩 '나중에' 버튼 */
.pred-skel { height: 200px; border-radius: var(--r); }
.rd-skel { height: 116px; border-radius: var(--r); }
.ob-skip { width: 100%; margin-top: 8px; background: transparent; border: 0; color: var(--text-3);
  font: inherit; font-size: 13px; cursor: pointer; padding: 9px; border-radius: var(--r-sm); }
.ob-skip:hover { color: var(--text-2); background: var(--surface-2); }

/* 댓글 없는 카드는 짧게 — 그리드에서 위 정렬(빈 카드가 늘어나지 않게) */
#meme-feed.meme-feed { align-items: start; }

/* 월드컵 각 영상 밑 '소리' 버튼 */
.wc-sound { margin-top: 10px; width: 100%; border: 1px solid var(--line-2); background: var(--surface-2);
  color: var(--text-2); font: inherit; font-size: 13px; font-weight: 700; border-radius: var(--r-pill);
  padding: 9px; cursor: pointer; transition: border-color .14s ease, color .14s ease, background .14s ease; }
.wc-sound:hover { border-color: var(--surge-line); color: var(--text); }
.wc-sound[aria-pressed="true"] { border-color: var(--surge); color: var(--surge); background: var(--surge-soft); }

/* 예측 카드에서도 퍼센트를 크게, 점수는 작고 옅게 */
.pred-card .mc-meta { display: flex; align-items: baseline; gap: 8px; }
.pred-card .mc-meta .chg { font-size: 21px; font-weight: 800; letter-spacing: -0.02em; }
.pred-card .mc-score { font-size: 12px; font-weight: 700; color: var(--text-3); opacity: .8; }

/* ════════════════════════════════════════════════════════════
   내 보유 밈 (포트폴리오) — 주식 느낌 · 총자산/보유목록/매수·매도
   ════════════════════════════════════════════════════════════ */
#pf-wrap { max-width: 620px; margin: 0 auto; }
.pf-empty { padding: 34px 18px; text-align: center; font-size: 14px; color: var(--text-3); }

/* 총 자산 요약 카드 */
.pf-summary {
  position: relative; border: 1px solid var(--line); border-radius: var(--r-lg);
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  padding: 22px 22px 20px; box-shadow: var(--shadow-sm); overflow: hidden;
}
.pf-summary::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--up); }
.pf-summary.down::before { background: var(--down); }
.pf-tl { font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--text-3); }
.pf-total { font-size: 38px; font-weight: 800; letter-spacing: -0.03em; color: var(--text); line-height: 1.05; margin-top: 6px; }
.pf-total .pf-cur { font-size: 16px; font-weight: 700; color: var(--text-3); letter-spacing: 0; }
.pf-pl { margin-top: 8px; font-family: var(--mono); font-size: 15px; font-weight: 800; }
.pf-summary.up .pf-pl { color: var(--up); }
.pf-summary.down .pf-pl { color: var(--down); }
.pf-sub { margin-top: 10px; font-size: 12.5px; color: var(--text-2); }
.pf-sub b { font-family: var(--mono); color: var(--text); font-weight: 700; }
.pf-guest { margin-top: 14px; padding: 10px 12px; border-radius: var(--r-sm);
  background: var(--surge-soft); border: 1px solid var(--surge-line);
  font-size: 12.5px; font-weight: 600; color: var(--text); word-break: keep-all; }

/* 보유 목록 */
.pf-holds { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.pf-hold { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); padding: 14px 16px; }
.pf-h-main { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.pf-h-name { font-size: 15px; font-weight: 800; color: var(--text); letter-spacing: -0.01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pf-h-meta { font-family: var(--mono); font-size: 11.5px; color: var(--text-3); font-weight: 600; }
.pf-h-right { flex: 0 0 auto; display: flex; align-items: center; gap: 12px; }
.pf-h-val { font-family: var(--mono); font-size: 15px; font-weight: 800; color: var(--text); }
.pf-h-right .chg { font-size: 13px; min-width: 52px; text-align: right; }
.pf-sell { flex: 0 0 auto; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text-2);
  font: inherit; font-size: 12.5px; font-weight: 700; border-radius: var(--r-pill); padding: 7px 14px;
  cursor: pointer; transition: border-color .14s ease, color .14s ease, background .14s ease; }
.pf-sell:hover { border-color: var(--down); color: var(--down); background: var(--down-soft); }
.pf-sell:disabled { opacity: .5; cursor: default; }

/* 매수 패널 */
.pf-buy { margin-top: 18px; border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--surface); padding: 18px; }
.pf-buy h3 { font-size: 15px; font-weight: 800; color: var(--text); margin: 0 0 12px; letter-spacing: -0.01em; }
.pf-buy-row { display: flex; gap: 8px; }
.pf-buy-row #pf-sel { flex: 1 1 auto; min-width: 0; }
.pf-buy-row #pf-amt { flex: 0 0 88px; width: 88px; text-align: right; }
#pf-sel, #pf-amt { height: 44px; border: 1px solid var(--line-2); border-radius: var(--r-sm);
  background: var(--surface-2); color: var(--text); font: inherit; font-size: 14px; padding: 0 12px; }
#pf-sel:focus, #pf-amt:focus { outline: none; border-color: var(--surge); }
.pf-cost { margin-top: 12px; font-size: 13px; color: var(--text-2); }
.pf-cost b { font-family: var(--mono); color: var(--text); font-weight: 800; font-size: 15px; }
.pf-buy-btn { margin-top: 14px; width: 100%; padding: 13px; border: 0; border-radius: var(--r);
  background: var(--surge); color: var(--surge-ink); font: inherit; font-size: 15px; font-weight: 800;
  cursor: pointer; transition: filter .14s ease; }
.pf-buy-btn:hover:not(:disabled) { filter: brightness(1.06); }
.pf-buy-btn:disabled { opacity: .5; cursor: default; }

/* ════════════════════════════════════════════════════════════
   트렌드 점수 단위 · 상세 크로스-섹션 CTA · 포트폴리오 마켓(폴리마켓 착안)
   ════════════════════════════════════════════════════════════ */
/* 트렌드 점수 뒤 작은 'T' 단위 — '점수'로 인식되게 */
.t-unit { font-size: .60em; font-weight: 700; color: var(--text-3); margin-left: 2px; letter-spacing: 0; }

/* 상세: 트렌드 추이 ↔ 댓글 사이 '보유하기 / 예측하기' 유도 */
.dt-cta { display: flex; gap: 8px; margin: 2px 0 16px; }
.dt-cta-btn { flex: 1; padding: 12px 10px; border-radius: var(--r); border: 1px solid var(--line-2);
  background: var(--surface-2); color: var(--text); font: inherit; font-size: 13.5px; font-weight: 800;
  cursor: pointer; white-space: nowrap; transition: border-color .14s ease, background .14s ease, transform .1s ease; }
.dt-cta-btn:hover { border-color: var(--surge); background: var(--surge-soft); }
.dt-cta-btn:active { transform: scale(.98); }
.dt-cta-btn.hold:hover { border-color: var(--up); background: var(--up-soft); }

/* 포트폴리오 — 섹션 헤더 */
.pf-h3 { font-size: 14px; font-weight: 800; color: var(--text); margin: 20px 0 10px; letter-spacing: -.01em; }
.pf-mkt-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 22px 0 10px; }
.pf-mkt-head .pf-h3 { margin: 0; }
.pf-cash { font-family: var(--mono); font-size: 12px; font-weight: 700; color: var(--text-2); white-space: nowrap; }

/* 밈 마켓 리스트 — 한눈에 보이는 행 + 인라인 퀵바이 */
.pf-market { display: flex; flex-direction: column; gap: 6px; }
.pf-mkt { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); padding: 10px 12px;
  transition: border-color .14s ease, background .6s ease; }
.pf-mkt:hover { border-color: var(--line-2); }
.pf-mkt.pf-hl { border-color: var(--surge); background: var(--surge-soft); }
.pf-mkt-info { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.pf-mkt-name { font-size: 14px; font-weight: 800; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pf-mkt-fig { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.pf-mkt-price { font-family: var(--mono); font-size: 13px; font-weight: 800; color: var(--text); }
.pf-mkt-fig .chg { font-size: 12px; }
.pf-mkt-own { font-size: 11px; font-weight: 700; color: var(--surge); font-family: var(--mono); }
.pf-mkt-buy { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; }
.pf-step { display: inline-flex; align-items: center; border: 1px solid var(--line-2); border-radius: var(--r-pill); background: var(--surface-2); overflow: hidden; }
.pf-dec, .pf-inc { width: 30px; height: 34px; border: 0; background: transparent; color: var(--text-2); font-size: 17px; font-weight: 700; line-height: 1; cursor: pointer; }
.pf-dec:hover, .pf-inc:hover { color: var(--text); background: var(--surface-3); }
.pf-qty { width: 44px; height: 34px; border: 0; background: transparent; color: var(--text); text-align: center; font: inherit; font-size: 13px; font-weight: 700; -moz-appearance: textfield; }
.pf-qty::-webkit-outer-spin-button, .pf-qty::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pf-qty:focus { outline: none; }
.pf-mkt-btn { flex: 0 0 auto; border: 0; border-radius: var(--r-pill); background: var(--surge); color: var(--surge-ink);
  font: inherit; font-size: 12.5px; font-weight: 800; padding: 9px 14px; cursor: pointer; white-space: nowrap; transition: filter .14s ease; }
.pf-mkt-btn:hover:not(:disabled) { filter: brightness(1.06); }
.pf-mkt-btn:disabled { opacity: .5; cursor: default; }
.pf-mkt-btn.over { background: var(--surface-3); color: var(--text-3); }
.pf-mkt-cost { font-family: var(--mono); font-size: 11px; font-weight: 700; opacity: .85; margin-left: 2px; }

@media (max-width: 559px) {
  .pf-mkt { flex-direction: column; align-items: stretch; }
  .pf-mkt-buy { justify-content: space-between; }
  .pf-mkt-btn { flex: 1; text-align: center; }
}

/* ════════════════════════════════════════════════════════════
   보유자 태그(토스식) · 태그 설명 팝오버 · 포트폴리오 거래내역
   ════════════════════════════════════════════════════════════ */
/* 댓글 이름 옆 보유자 태그 칩 */
.cmt-tags { display: inline-flex; gap: 4px; flex-wrap: wrap; vertical-align: middle; }
.cmt-top { flex-wrap: wrap; }
.htag { border: 1px solid var(--surge-line); background: var(--surge-soft); color: var(--text);
  font: inherit; font-size: 10.5px; font-weight: 800; line-height: 1; padding: 3px 7px; border-radius: var(--r-pill);
  cursor: pointer; white-space: nowrap; transition: filter .12s ease, transform .1s ease; }
.htag:hover { filter: brightness(1.08); }
.htag:active { transform: scale(.96); }
/* 상위 티어는 톤 차등 — 소유·우월욕 자극 */
.htag-mil, .htag-whale { border-color: var(--gold); background: rgba(224,165,75,.16); color: var(--gold); }
.htag-k100 { border-color: #59C1F0; background: rgba(89,193,240,.14); color: #59C1F0; }
.htag-top10 { border-color: var(--gold); background: rgba(224,165,75,.12); color: var(--gold); }
.htag-eye, .htag-up { border-color: var(--up); background: var(--up-soft); color: var(--up); }
.htag-hodl { border-color: var(--down); background: var(--down-soft); color: var(--down); }
.htag-allin { border-color: var(--gold); background: rgba(224,165,75,.14); color: var(--gold); }
.htag-onepick { border-color: #FF8A5B; background: rgba(255,138,91,.14); color: #FF8A5B; }
.htag-collector { border-color: #59C1F0; background: rgba(89,193,240,.12); color: #59C1F0; }
.htag-trader { border-color: #FF5C6C; background: rgba(255,92,108,.12); color: #FF5C6C; }

/* 태그 설명 팝오버 */
.htag-pop { position: absolute; z-index: 90; max-width: 240px; padding: 10px 12px; border-radius: var(--r);
  background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 4px; }
.htag-pop b { font-size: 13px; font-weight: 800; color: var(--text); }
.htag-pop span { font-size: 12px; color: var(--text-2); line-height: 1.5; word-break: keep-all; }

/* 거래 내역 */
.pf-trades { display: flex; flex-direction: column; }
.pf-trade { display: flex; align-items: center; gap: 8px; padding: 9px 4px; border-bottom: 1px solid var(--line); font-size: 12.5px; }
.pf-trade:last-child { border-bottom: 0; }
.pf-trade-side { flex: 0 0 auto; font-size: 11px; font-weight: 800; padding: 2px 7px; border-radius: var(--r-pill); }
.pf-trade-side.buy { color: var(--up); background: var(--up-soft); }
.pf-trade-side.sell { color: var(--down); background: var(--down-soft); }
.pf-trade-nm { font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 30%; }
.pf-trade-u { font-family: var(--mono); font-size: 11px; color: var(--text-3); }
.pf-trade-amt { margin-left: auto; font-family: var(--mono); font-weight: 800; }
.pf-trade-amt.up { color: var(--up); } .pf-trade-amt.down { color: var(--down); }
.pf-trade-at { flex: 0 0 auto; font-size: 11px; color: var(--text-3); min-width: 42px; text-align: right; }
@media (max-width: 559px) {
  .pf-trade { flex-wrap: wrap; gap: 6px; }
  .pf-trade-at { width: 100%; text-align: left; min-width: 0; }
}

/* 전역 음량 조절 슬라이더(헤더 소리 버튼 팝오버) */
.vol-pop { position: absolute; z-index: 95; display: flex; align-items: center; gap: 10px;
  padding: 9px 14px; border-radius: var(--r-pill); background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--shadow); }
.vol-range { width: 120px; height: 4px; accent-color: var(--surge); cursor: pointer; }
.vol-val { font-family: var(--mono); font-size: 12px; font-weight: 700; color: var(--text-2); min-width: 36px; text-align: right; }

/* Tremer란 · 브랜드/광고 제휴 콜아웃 */
.ab-partner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  margin-top: 14px; padding: 18px 22px; border: 1px dashed var(--line-2); border-radius: var(--r-lg); background: var(--surface); }
.abpt-txt { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1 1 260px; }
.abpt-txt b { font-size: 15px; font-weight: 800; color: var(--text); }
.abpt-txt span { font-size: 13px; color: var(--text-2); line-height: 1.55; word-break: keep-all; }
.ab-partner .abp-cta { flex: 0 0 auto; margin-top: 0; }

/* ════════════════════════════════════════════════════════════
   예측 T$ 베팅 · 내 베팅 스트립 · 예측 태그
   ════════════════════════════════════════════════════════════ */
.pred-bet { margin-top: 10px; padding: 12px; border: 1px solid var(--surge-line); border-radius: var(--r); background: var(--surge-soft); }
.pb-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.pb-label { font-size: 12.5px; font-weight: 700; color: var(--text-2); }
.pb-label b { color: var(--text); }
.pb-pool { font-size: 11.5px; font-weight: 700; color: var(--text-3); font-family: var(--mono); white-space: nowrap; }
.pb-pool b { color: var(--text-2); }
.pb-amt-row { display: flex; align-items: baseline; justify-content: center; padding: 6px 0 10px; }
.pb-amt { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; color: var(--text); font-variant-numeric: tabular-nums; }
.pb-amt-u { font-size: 14px; font-weight: 700; color: var(--text-3); }
.pb-adds { display: flex; gap: 6px; }
.pb-add { flex: 1; padding: 8px 4px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--surface);
  color: var(--text); font: inherit; font-size: 12.5px; font-weight: 800; font-variant-numeric: tabular-nums; cursor: pointer;
  transition: border-color .12s ease, background .12s ease; }
.pb-add:hover { border-color: var(--surge); background: var(--surge-soft); }
.pb-add.pb-max { color: var(--surge); }
.pb-clr { flex: 0 0 auto; width: 34px; }
.pb-go { margin-top: 10px; width: 100%; padding: 12px; border: 0; border-radius: var(--r); background: var(--surge); color: var(--surge-ink);
  font: inherit; font-size: 14px; font-weight: 800; cursor: pointer; transition: filter .14s ease; }
.pb-go:hover:not(:disabled) { filter: brightness(1.06); }
.pb-go:disabled { opacity: .5; cursor: default; }
.pb-est { font-family: var(--mono); font-size: 11.5px; font-weight: 700; opacity: .9; margin-left: 2px; }
.pb-hint { margin-top: 8px; font-size: 11px; color: var(--text-3); }
.pb-placed { padding: 8px; text-align: center; font-size: 13px; font-weight: 800; color: var(--surge); }
.pred-share { flex: 0 0 auto; margin-left: auto; width: 30px; height: 30px; padding: 0; border: 0; background: transparent;
  color: var(--text-3); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--r-sm); transition: color .14s ease, background .14s ease; }
.pred-share:hover { color: var(--surge); background: var(--surge-soft); }
.pred-share svg { width: 16px; height: 16px; }

.pred-mine { grid-column: 1 / -1; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); padding: 14px 16px; margin-bottom: 4px; }
.pm-h { font-size: 13px; font-weight: 800; color: var(--text); margin-bottom: 8px; }
.pm-row { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 12.5px; }
.pm-row:first-of-type { border-top: 0; }
.pm-nm { font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 34%; }
.pm-side { flex: 0 0 auto; font-size: 11px; font-weight: 800; padding: 2px 7px; border-radius: var(--r-pill); }
.pm-side.up { color: var(--up); background: var(--up-soft); } .pm-side.down { color: var(--down); background: var(--down-soft); }
.pm-stake { font-family: var(--mono); color: var(--text-2); }
.pm-open { margin-left: auto; font-size: 11.5px; font-weight: 700; color: var(--text-3); }
.pm-won { margin-left: auto; font-size: 11.5px; font-weight: 800; color: var(--up); font-family: var(--mono); }
.pm-lost { margin-left: auto; font-size: 11.5px; font-weight: 800; color: var(--down); }

.htag-oracle, .htag-sniper { border-color: var(--surge); background: var(--surge-soft); color: var(--surge); }
.htag-gambler { border-color: var(--gold); background: rgba(224,165,75,.14); color: var(--gold); }
