/* ============================================================
   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);
  /* 글자색 전용 톤 — 배경(--up/--down)은 밝아서 그대로 텍스트에 쓰면 라이트에서 대비가 모자란다.
     다크는 밝은 배경 위가 아니라 어두운 카드 위라 --up 그대로 충분하다. */
  --up-ink: #2FD98B;
  --down-ink: #FF5C6C;
  --gold: #E0A54B;

  /* Brand / interactive accent — electric blue (흰 글씨 대비 AA 확보한 톤) */
  --surge: #3B82F6;
  --surge-ink: #FFFFFF;
  --surge-soft: rgba(59, 130, 246, 0.18);
  --surge-line: rgba(59, 130, 246, 0.48);
  --cool: #FF5C6C;
  --cool-soft: rgba(255, 92, 108, 0.14);
  --cool-line: rgba(255, 92, 108, 0.40);
  --info: #60A5FA;

  /* 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);
  --up-ink: #047857;      /* 흰 카드 위 4.5:1 이상 확보 */
  --down-ink: #C1121F;
  --gold: #C68A1E;
  --surge: #2563EB;          /* 라이트에서 흰 배경 대비 확보한 일렉트릭 블루 */
  --surge-ink: #FFFFFF;
  --surge-soft: rgba(37, 99, 235, 0.12);
  --surge-line: rgba(37, 99, 235, 0.40);
  --cool: #F04452;
  --cool-soft: rgba(240, 68, 82, 0.10);
  --cool-line: rgba(240, 68, 82, 0.35);
  --info: #3B82F6;
  --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; }
/* 플렉스 아이템 기본 min-width:auto 때문에 워드마크가 안 줄고 헤더를 밀어 가로 스크롤이 생겼다
   (영문 라벨이 길어 EN에서 20px 넘침). 줄어들 수 있게 열어두고, 대신 말줄임으로 끊는다. */
.brand { min-width: 0; overflow: hidden; }
.brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.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(59,130,246,0.5); }
  70%  { box-shadow: 0 0 0 7px rgba(59,130,246,0); }
  100% { box-shadow: 0 0 0 0 rgba(59,130,246,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%);
  /* 상세를 거의 전체 화면으로(항상 상단 섹션 제목을 덮음) — 콘텐츠가 짧아도 뒤의
     '내 보유 밈' 등 섹션 제목이 위로 삐져나오지 않게. 살짝 남는 상단은 닫기용 여백. */
  min-height: 93vh; min-height: 93dvh; max-height: 96vh; max-height: 96dvh; overflow-y: auto;
  overscroll-behavior: contain; -webkit-overflow-scrolling: touch;   /* 시트 안에서만 스크롤(배경 스크롤 체이닝 방지) + iOS 관성 스크롤 */
  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: 44px; height: 5px; border-radius: 3px; background: var(--line-2); margin: 4px auto 14px;
  cursor: grab; padding: 8px 30px; background-clip: content-box; box-sizing: content-box; }
.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→sky 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; }
/* 주/일/6시간 전환: 프레임을 겹쳐 크로스페이드(선·텍스트가 부드럽게 바뀜). 데이터 점 개수가
   타임프레임마다 달라 위치 모핑은 불안정 → 페이드+살짝 드리프트로 자연스럽게. */
.tg-frame { position: absolute; inset: 0; opacity: 1; transform: translateY(0);
  transition: opacity .32s ease, transform .32s cubic-bezier(.4,0,.2,1); will-change: opacity, transform; }
.tg-frame.enter { opacity: 0; transform: translateY(10px); }
@media (prefers-reduced-motion: reduce) { .tg-frame { transition: none; } .tg-frame.enter { transform: none; } }
.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 minmax(0, 1fr); align-items: start; gap: 10px; }
.cmt-pin { align-self: center; font-size: 12px; }
.cmt:not(:has(.cmt-pin)) { grid-template-columns: 34px minmax(0, 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-b { min-width: 0; }   /* 그리드 자식이 콘텐츠보다 줄어들 수 있게 → 긴 단어/URL·태그가 화면 밖으로 안 삐져나감 */
.cmt-top { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.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); flex: 0 0 auto; }
.cmt-x { font-size: 13.5px; color: var(--text-2); margin-top: 3px; line-height: 1.55;
  overflow-wrap: anywhere; word-break: break-word; }
.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); }
/* ── 댓글 반응(좋아요·불·별로) ── */
/* ★ 탭영역 40px 확보 — 측정 결과 반응 버튼이 20×11px, 삭제가 23×18px로 한 줄에 7개가 몰려 있어
   👍를 누르려다 '삭제'를 누르는 오탭이 나기 쉬웠다(파괴적 동작이 가장 작은 타깃이었음).
   음수 마진으로 시각적 간격은 유지하면서 히트영역만 넓힌다. */
.cmt-rx { margin-top: 6px; border: 0; background: transparent; color: var(--text-3);
  font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; line-height: 1;
  min-height: 40px; display: inline-flex; align-items: center; padding: 0 7px; margin-left: -7px; margin-right: -7px;
  transition: color .12s ease, transform .08s ease; }
.cmt-rx:hover { color: var(--text-2); }
.cmt-rx:active { transform: scale(1.15); }
.cmt-rx .rc { font-variant-numeric: tabular-nums; }
.cmt-rx.like.on { color: var(--surge); }
.cmt-rx.fire.on { color: #ff7a1a; }
.cmt-rx.disgust.on { color: #79c257; }
.cmt-rx.up { font-size: 11px; }
.cmt-rx.down { font-size: 11px; }
.cmt-rx.up.on { color: var(--up); }
.cmt-rx.down.on { color: var(--down); }
/* 반응 누를 때 재미 효과: 오뚜기 흔들림 + 이모지 파티클 */
.cmt-rx.rx-pop { animation: rxPop .42s cubic-bezier(.36,1.6,.5,1); }
@keyframes rxPop { 0%{transform:scale(1) rotate(0)} 22%{transform:scale(1.34) rotate(-13deg)} 48%{transform:scale(1.14) rotate(11deg)} 74%{transform:scale(1.2) rotate(-6deg)} 100%{transform:scale(1) rotate(0)} }
.rx-particle { position: fixed; z-index: 200; pointer-events: none; font-size: 18px; line-height: 1; will-change: transform, opacity;
  transform: translate(-50%,-50%); animation-name: rxFloat; animation-timing-function: cubic-bezier(.3,.7,.35,1); animation-fill-mode: forwards; }
@keyframes rxFloat { 0%{opacity:0; transform: translate(-50%,-50%) scale(.5) rotate(0)} 16%{opacity:1}
  100%{opacity:0; transform: translate(calc(-50% + var(--dx)), calc(-50% - 68px)) scale(1.15) rotate(var(--rot))} }
/* 회원 닉네임 클릭 → 공개 프로필 */
.cmt-who-link { cursor: pointer; }
.cmt-who-link:hover { text-decoration: underline; text-underline-offset: 2px; }
.up-modal { max-width: 440px; }
.up-head { display: flex; align-items: center; gap: 12px; margin: 2px 0 16px; }
.up-ava { width: 48px; height: 48px; border-radius: 50%; background: var(--surface-3); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 800; color: var(--text-2); flex: 0 0 auto; overflow: hidden; }
.up-ava img { width: 100%; height: 100%; object-fit: cover; }
.up-id { min-width: 0; }
.up-name { font-size: 17px; font-weight: 800; color: var(--text); word-break: keep-all; }
.up-bio { font-size: 13px; color: var(--text-2); line-height: 1.45; margin-top: 3px; word-break: keep-all; overflow-wrap: anywhere; }
.up-tags { margin-top: 5px; }
.up-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 0 16px; }
.up-stats:empty { display: none; }
.up-stat { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; min-width: 0; }
.up-sl { display: block; font-size: 11px; color: var(--text-3); font-weight: 700; margin-bottom: 3px; }
.up-sv { font-size: 16px; font-weight: 800; color: var(--text); font-family: var(--mono); letter-spacing: -.01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.up-sv b { font-size: 12px; color: var(--text-3); font-weight: 700; }
.up-ss { font-size: 11px; color: var(--text-3); font-weight: 600; font-family: var(--mono); }
.up-retry { grid-column: 1 / -1; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text-2);
  font: inherit; font-size: 12px; font-weight: 700; border-radius: var(--r-sm); padding: 10px; cursor: pointer; }
.up-retry:disabled { opacity: .5; cursor: default; }
.up-hold-h, .up-pred-h { font-size: 12.5px; font-weight: 800; color: var(--text-2); margin-bottom: 8px; letter-spacing: -.01em; }
.up-holds { display: flex; flex-direction: column; gap: 6px; max-height: 46vh; overflow-y: auto;
  padding-right: 6px; scrollbar-gutter: stable; }
.up-hold { display: grid; grid-template-columns: minmax(0,1fr) auto auto; align-items: center; gap: 10px;
  width: 100%; text-align: left; border: 1px solid var(--line); background: var(--surface-2); border-radius: 10px;
  padding: 10px 12px; font: inherit; cursor: pointer; transition: border-color .12s ease, background .12s ease; }
.up-hold:hover { border-color: var(--line-2); background: var(--surface-3); }
.up-hw { font-size: 14px; font-weight: 700; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-hv { font-size: 12px; color: var(--text-3); font-family: var(--mono); }
.up-hold .chg, .up-pred .chg { font-size: 13px; min-width: 54px; text-align: right; }
/* ── 지금 예측 중(남의 프로필) — 밈 / 방향 / 확신 ×n / 건 금액 / 지금 몇 % ── */
.up-preds { display: flex; flex-direction: column; gap: 6px; max-height: 34vh; overflow-y: auto; margin-bottom: 16px;
  /* 스크롤바가 오른쪽 %(예: +0.0%)를 덮어 잘렸다 → 스크롤바 폭만큼 여백 확보 */
  padding-right: 6px; scrollbar-gutter: stable; }
/* 2줄 고정: 1줄 = 밈 이름 / 방향 / 지금 %,  2줄 = 확신 ×n / 건 금액.
   한 줄에 다 넣으면 모달 폭이 좁아 밈 이름이 '아주…'로 잘린다(뷰포트가 아니라 모달 폭이 기준이라
   미디어쿼리로는 못 잡는다). 이름에 항상 한 줄을 통째로 준다. */
.up-pred { display: grid; grid-template-columns: minmax(0,1fr) auto auto; align-items: center; gap: 4px 8px;
  width: 100%; text-align: left; border: 1px solid var(--line); background: var(--surface-2); border-radius: 10px;
  padding: 10px 12px; font: inherit; cursor: pointer; transition: border-color .12s ease, background .12s ease; }
.up-pred:hover { border-color: var(--line-2); background: var(--surface-3); }
.up-pw { grid-area: 1 / 1; font-size: 14px; font-weight: 700; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-ps { grid-area: 1 / 2; font-size: 11.5px; font-weight: 800; white-space: nowrap; }
.up-ps.up { color: var(--up-ink); } .up-ps.down { color: var(--down-ink); }
.up-pred .chg { grid-area: 1 / 3; }
.up-px { grid-area: 2 / 1; font-size: 11px; font-weight: 700; color: var(--text-3); font-family: var(--mono); white-space: nowrap; }
.up-pv { grid-area: 2 / 2 / 3 / 4; font-size: 12px; color: var(--text-3); font-family: var(--mono);
  white-space: nowrap; text-align: right; }
.up-empty, .up-load { text-align: center; color: var(--text-3); font-size: 13px; padding: 20px 0; }
/* ── 내 댓글 수정·삭제 ── */
.cmt-foot { display: flex; align-items: center; gap: 13px; flex-wrap: wrap; }
.cmt-foot .cmt-like { margin-top: 6px; }
.cmt-edit, .cmt-del { margin-top: 6px; border: 0; background: transparent; color: var(--text-3);
  font: inherit; font-size: 11.5px; font-weight: 600; cursor: pointer;
  min-height: 40px; display: inline-flex; align-items: center; padding: 0 7px; margin-left: -7px; margin-right: -7px; }
.cmt-edit:hover { color: var(--text-2); }
.cmt-del:hover { color: var(--surge); }
.cmt-edit-box { display: flex; gap: 6px; align-items: center; margin-top: 6px; padding: 6px 8px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.cmt-edit-box input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--text); font: inherit; outline: none; }
.cmt-edit-box button { border: 0; background: transparent; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; padding: 2px 6px; color: var(--surge); }
.cmt-edit-box .cancel { color: var(--text-3); }
/* ── 답글 스레드 ── */
.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 minmax(0, 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; }
/* (구) 카드형 랭킹 디자인 CSS 제거 — .rk-card/.rk-pos/.rk-info 는 더 이상 렌더되지 않고,
   여기 .rk-row{display:grid} 가 현재 flex 레이아웃과 계속 충돌했다. */

/* 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);
  display: flex; align-items: center; gap: 8px; }
.dt-disc b { color: var(--text-2); }
/* 권리침해 신고 — 눈에 띄되 시선을 빼앗지 않게. 탭 타깃은 40px 확보(음수 마진으로 레이아웃 영향 0). */
.dt-report { margin-left: auto; padding: 11px 4px; margin-top: -11px; margin-bottom: -11px;
  min-height: 40px; background: none; border: 0; cursor: pointer;
  font-size: 11.5px; color: var(--text-3); text-decoration: underline; text-underline-offset: 2px; }
.dt-report:hover { color: var(--cool); }

/* ── 신고 시트 ─────────────────────────────────────────────── */
.rp-modal { max-width: 400px; }
.rp-sub { margin: 2px 0 14px; font-size: 13px; color: var(--text-3); word-break: keep-all; }
.rp-reasons { display: flex; flex-direction: column; gap: 7px; margin-bottom: 12px; }
.rp-reason { padding: 12px 14px; text-align: left; border: 1px solid var(--line-2);
  border-radius: var(--r-sm); background: var(--surface); color: var(--text-2);
  font-size: 13.5px; font-weight: 600; cursor: pointer; min-height: 44px; word-break: keep-all; }
.rp-reason:hover { border-color: var(--text-3); color: var(--text); }
.rp-reason.on { border-color: var(--cool-line); color: var(--text); background: var(--cool-soft); }
.rp-detail, .rp-contact { width: 100%; box-sizing: border-box; margin-bottom: 9px; padding: 11px 12px;
  border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--surface);
  color: var(--text); font: inherit; font-size: 13.5px; resize: vertical; }
.rp-detail:focus, .rp-contact:focus { outline: none; border-color: var(--surge); }
.rp-go { width: 100%; margin-top: 4px; padding: 14px; min-height: 48px; border: 0;
  border-radius: var(--r-sm); background: var(--surge); color: var(--surge-ink);
  font-size: 15px; font-weight: 800; cursor: pointer; }
.rp-go:disabled { background: var(--line-2); color: var(--text-3); cursor: default; }
.rp-note { margin-top: 11px; font-size: 11px; line-height: 1.55; color: var(--text-3); word-break: keep-all; }
.rp-note a { color: var(--text-3); text-decoration: underline; text-underline-offset: 2px; }

/* 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;
  animation: scrimIn .2s ease; }
@keyframes scrimIn { from { opacity: 0; } to { opacity: 1; } }
.modal { width: 100%; max-width: 380px; max-height: calc(100dvh - 40px); overflow-y: auto; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 24px; position: relative; box-shadow: var(--shadow); animation: modalIn .22s cubic-bezier(.22,1,.36,1); }
@keyframes modalIn { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
.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; word-break: keep-all; }
.modal-x { position: absolute; top: 14px; right: 14px; width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--text-2); cursor: pointer; font-size: 14px; z-index: 1; }
/* 반응형: 모바일은 하단 시트로, 데스크톱은 가운데 카드로 */
@media (max-width: 560px) {
  .modal-scrim { align-items: flex-end; padding: 0; }
  .modal { max-width: none; max-height: 90dvh; border-radius: var(--r-lg) var(--r-lg) 0 0;
    padding: 26px 20px calc(22px + env(safe-area-inset-bottom, 0px)); animation: sheetUp .3s cubic-bezier(.22,1,.36,1); }
  .modal::before { content: ''; position: absolute; top: 9px; left: 50%; transform: translateX(-50%); width: 38px; height: 4px; border-radius: 2px; background: var(--line-2); }
}
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { .modal-scrim, .modal { animation: none; } }

/* OAuth — 각 SNS 공식 로고 + 브랜드 컬러 버튼 */
.oauth { display: flex; flex-direction: column; gap: 9px; }
.oauth-btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; border: 1px solid transparent;
  border-radius: var(--r-sm); padding: 12px 14px; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer;
  transition: box-shadow .15s ease, transform .06s ease; }
.oauth-btn:hover { box-shadow: 0 3px 12px rgba(0,0,0,.2); }
.oauth-btn:active { transform: scale(.99); }
.oauth-btn svg { width: 19px; height: 19px; flex: 0 0 auto; display: block; }
.ob-google  { background: #fff;     color: #3c4043; border-color: #dadce0; }
.ob-apple   { background: #000;     color: #fff;    border-color: rgba(255,255,255,.16); }
.ob-kakao   { background: #FEE500;  color: #191600; }
.ob-discord { background: #5865F2;  color: #fff; }
.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); }
/* 필수 온보딩 — '나이·성별 필수' 배지 + 100,000 T$ 강조 */
.ob-req { display: inline-block; margin-left: 2px; padding: 2px 8px; border-radius: var(--r-pill);
  background: var(--surge-soft); color: var(--surge); font-size: 11px; font-weight: 800; white-space: nowrap; }
.ob-must { color: var(--down); font-size: 10.5px; font-weight: 800; letter-spacing: -.01em; }
.ob-opt { color: var(--text-3); font-size: 10.5px; font-weight: 700; letter-spacing: -.01em; }
.modal-sub b { color: var(--surge); font-weight: 800; }
/* ── 나이 픽커: 위아래로 쓸어 고르는 휠 ──
   ① 숫자 입력창은 모바일에서 키패드가 화면 절반을 덮었다.
   ② 그 다음 시도인 '연령대 칩 + 가로 스트립' 은 버튼이 너무 많아 지저분하고 두 단계였다.
   → 가운데 밴드에 걸린 숫자가 선택값인 휠 하나. 스크롤 스냅으로 딱딱 걸린다.
   ⚠️ .ob-wheel-row 높이(40px)는 app.js 의 ROW_H 와 반드시 같아야 가운데 계산이 맞는다. */
.ob-wheel { position: relative; height: 160px; margin-top: 2px;
  border: 1px solid var(--line-2); border-radius: var(--r); background: var(--surface-2); overflow: hidden; }
/* 가운데 선택 밴드(장식) — 스크롤을 막지 않게 pointer-events 해제 */
.ob-wheel-band { position: absolute; left: 0; right: 0; top: 60px; height: 40px; pointer-events: none;
  border-top: 1px solid var(--surge-line); border-bottom: 1px solid var(--surge-line);
  background: var(--surge-soft); }
.ob-wheel-unit { position: absolute; right: 16px; top: 60px; height: 40px; line-height: 40px;
  pointer-events: none; font-size: 12.5px; font-weight: 700; color: var(--text-3); }
.ob-wheel-scroll { position: relative; height: 100%; overflow-y: auto; outline: none;
  scroll-snap-type: y mandatory; overscroll-behavior-y: contain; -webkit-overflow-scrolling: touch;
  /* 위아래 60px 여백 = (160 - 40) / 2 → 첫 값과 마지막 값도 가운데에 올 수 있다 */
  padding: 60px 0; scrollbar-width: none; }
.ob-wheel-scroll::-webkit-scrollbar { display: none; }
.ob-wheel-row { height: 40px; line-height: 40px; scroll-snap-align: center; text-align: center;
  font-size: 17px; font-weight: 700; color: var(--text-3); font-variant-numeric: tabular-nums;
  cursor: pointer; transition: color .12s ease, font-size .12s ease; }
.ob-wheel-row.on { color: var(--surge); font-size: 22px; font-weight: 900; }
.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; }
/* 수집 이유·비공개 안내(입력 저항 완화). 입력 자체는 정책상 필수 유지 */
.ob-why { margin: -8px 0 4px; padding: 9px 11px; border-radius: var(--r-sm);
  background: var(--surface-2); border: 1px solid var(--line); font-size: 12px; line-height: 1.5;
  color: var(--text-3); word-break: keep-all; }
.ob-why b { color: var(--text-2); font-weight: 700; }
/* 저장이 반복 실패할 때만 노출되는 탈출구(모달이 닫히지 않아 앱이 잠기는 것 방지) */
.ob-escape { display: block; width: 100%; margin-top: 10px; border: 0; background: transparent;
  color: var(--text-3); font: inherit; font-size: 12.5px; font-weight: 700; text-decoration: underline;
  cursor: pointer; padding: 8px; }
.ob-escape:hover { color: var(--text-2); }

/* toast */
/* ★ pointer-events:none 필수 — 예전엔 토스트가 하단 CTA(예: '베팅하기') 위에 정확히 겹쳐 2.6초간
   탭을 먹어버렸다(가입 유도 토스트가 정작 그 버튼을 막는 자기모순). 위치도 CTA 밴드 위로 올림. */
.toast { position: fixed; left: 50%; bottom: calc(var(--bottombar-h) + 76px); transform: translateX(-50%);
  pointer-events: none;
  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; }
/* 예측·발굴 카드 상단 상위 댓글 미리보기(버튼 없이 바로 노출) */
.cmt-preview { margin-top: 10px; padding-top: 9px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 5px; }
.cmt-preview:empty { display: none; }
.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; }
/* max-width 없으면 긴 밈 이름이 max-content로 늘어나 양쪽 화면 밖으로 삐져나가고 상대편 이름과 겹쳐 읽을 수 없었다 */
.wc-name { font-size: 17px; font-weight: 800; letter-spacing: -0.02em; color: var(--text);
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.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; }
/* 플랜이 하나뿐인 구독 — 3열 그리드에 두면 1/3 폭짜리 카드가 덩그러니 남는다 */
.ab-plans.one { grid-template-columns: minmax(0, 460px); justify-content: center; }
.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-country { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; margin: -1px 0 10px; }
.cp-c-lab { font-size: 11.5px; font-weight: 700; color: var(--text-3); white-space: nowrap; }
.cp-c-opts { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; min-width: 0; }
.cp-c-btn { 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: 6px 11px;
  cursor: pointer; white-space: nowrap; transition: border-color .14s ease, color .14s ease, background .14s ease; }
.cp-c-btn:hover { border-color: var(--surge-line); }
.cp-c-btn.on { border-color: var(--surge); color: var(--surge); background: var(--surge-soft); }
.cp-c-other { flex: 1 1 110px; min-width: 92px; border: 1px solid var(--line); border-radius: var(--r-pill);
  background: var(--surface); color: var(--text); font: inherit; font-size: 12.5px; padding: 6px 12px; outline: none;
  transition: border-color .14s ease; }
.cp-c-other::placeholder { color: var(--text-3); }
.cp-c-other:focus { border-color: var(--surge-line); }
.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; overflow-x: clip; }   /* 카드 내용이 가로로 삐져나와도 뷰포트 확대·가로스크롤 안 생기게(모바일 배율 깨짐 방지) */
.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;
  overflow: hidden; max-width: 100%;   /* 썸네일/영상·긴 글이 카드 밖으로 못 나가게(가로 오버플로 원천 차단) */
}
.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; overflow-wrap: anywhere; }
.rd-desc { font-size: 13.5px; color: var(--text-2); line-height: 1.62; margin-top: 6px; word-break: keep-all; overflow-wrap: anywhere;
  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); }
/* ── 발굴 카드 편입 도장 — 오른쪽 열 썸네일 아래(원래 비어 있던 자리)에 비스듬히 찍는다 ──
   '내가 올린 밈이 진짜 채택됐나'가 발굴자의 최대 관심사다.
   ⚠️ 회전각 -8도까지만. 더 기울이면 92px 열을 넘어 .rd 의 overflow:hidden 에 잘린다. */
.rd-side { display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0; }
.rd-stamp { transform: rotate(-8deg); max-width: 100%; padding: 4px 8px; border-radius: 5px;
  font-size: 11px; font-weight: 900; letter-spacing: .02em; white-space: nowrap; text-align: center;
  /* 고무도장 느낌: 이중 테두리 + 잉크가 덜 먹은 듯한 반투명 */
  border: 2px solid currentColor; box-shadow: inset 0 0 0 1px rgba(255,255,255,.14); opacity: .92; }
.rd-stamp.on { color: var(--up); background: var(--up-soft); }
.rd-stamp.pending { color: var(--text-3); background: var(--surface-2); border-style: dashed; opacity: .75; }

/* ── 발굴 카드 반응(👍 밀어주기 · 🔥 · 🤮) — 댓글을 열지 않고 카드에서 바로 ── */
.rd-react { display: flex; align-items: center; gap: 6px; margin-top: 12px; flex-wrap: wrap; }
.rdr { 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; }
.rdr b { color: var(--text); font-variant-numeric: tabular-nums; }
.rdr b:empty { display: none; }                       /* 0이면 숫자 칸 자체를 없앤다(‘0’ 이 붙으면 죽어 보인다) */
.rdr-e { padding: 7px 11px; }                         /* 이모지 전용 버튼은 조금 좁게 */
.rdr:hover { border-color: var(--line-2); color: var(--text); }
.rdr:active { transform: scale(.97); }
.rdr.on { border-color: var(--up); color: var(--up); background: var(--up-soft); }
.rdr.on b { color: var(--up); }
.rdr[data-r="disgust"].on { border-color: var(--down); color: var(--down); background: var(--down-soft); }
.rdr[data-r="disgust"].on b { color: var(--down); }
.rdr.rx-pop { animation: rxPop .42s cubic-bezier(.36,1.6,.5,1); }   /* 댓글 반응과 같은 눌림 효과 */
@media (max-width: 380px) { .rd-react .rdr-l { display: none; } }   /* 아주 좁으면 '밀어주기' 글자만 접는다 */
.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 {
  flex: 0 0 auto; height: 28px; padding: 0 10px; border-radius: var(--r-pill);
  border: 1px solid var(--line-2); background: var(--surface); color: var(--text-3);
  font: inherit; font-size: 11.5px; font-weight: 700; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .14s ease, color .14s ease;
}
.pf-prof-row { display: flex; gap: 6px; align-items: stretch; }
.pf-prof-row .pf-logout { flex: 1 1 auto; justify-content: center; }
/* 비회원(프로필 카드 없음) — 섹션 맨 위에 오른쪽 정렬 한 줄 */
.pf-lang-row { display: flex; justify-content: flex-end; margin: 0 0 10px; }
.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 표시 — 좌하단(좌상단은 영상번호 caro-count와 겹쳐 모바일서 충돌 → 이동). 첫 탭 unmute 전까지 노출 */
.tt-mute {
  position: absolute; bottom: 12px; 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, .cp-c-other { 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); }

/* 월드컵: 영상 위 투명 '선택' 히트영역 — 영상(iframe 포함) 어디를 눌러도 그 밈이 선택됨.
   z-index 2 → 영상 iframe(z0) 위 · guard(z3)/출처버튼 아래 → 출처 버튼은 그대로 클릭 가능. */
.wc-media .wc-hit { position: absolute; inset: 0; z-index: 2; cursor: pointer; }

/* 예측 카드에서도 퍼센트를 크게, 점수는 작고 옅게 */
.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); }

/* 잔액 읽기 실패 — '못 읽었다'를 못 읽었다고 말하는 자리.
   여기에 시작 자본(100,000)을 그리면 부자 유저가 전재산을 잃은 걸로 본다(2026-07-28). */
.pf-readfail { padding: 40px 20px; text-align: center; }
.pf-rf-emoji { font-size: 34px; line-height: 1; margin-bottom: 12px; }
.pf-rf-t { font-size: 16px; font-weight: 800; color: var(--text-1); margin-bottom: 6px; }
.pf-rf-s { font-size: 13px; color: var(--text-3); line-height: 1.6; margin-bottom: 18px; }
.pf-rf-retry { padding: 11px 22px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--accent); color: #fff; font-size: 14px; font-weight: 800; font-family: inherit; }
.pf-rf-retry:active { transform: scale(.97); }
/* 잔액 미확정 — 0 이 아니라 '아직 모른다'. 숫자처럼 안 읽히게 흐리게 둔다. */
.pw-n.pw-unknown { color: var(--text-3); opacity: .55; }

/* 총 자산 요약 카드 */
.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; }
/* 총자산 분해 — 쓸 수 있는 트렌드 달러 / 보유 밈 가치 (한눈에 들어오게 2분할, 매수 여력 강조) */
.pf-breakdown { margin-top: 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pf-bd { min-width: 0; display: flex; flex-direction: column; gap: 5px; padding: 11px 12px;
  border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); }
.pf-bd-k { font-size: 11.5px; font-weight: 700; color: var(--text-3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pf-bd-v { font-family: var(--mono); font-size: 15.5px; font-weight: 800; color: var(--text); letter-spacing: -.02em;
  white-space: nowrap; }
/* 초협소(≤360px): 2열 고정이라 금액이 '100,000…'처럼 잘리던 것 → 1열로 펼쳐 전체 표시.
   총자산도 숫자 중간에서 줄바꿈되지 않게 nowrap. */
@media (max-width: 360px) {
  .pf-breakdown { grid-template-columns: 1fr; }
  .pf-total { white-space: nowrap; font-size: 32px; }
}
.pf-bd-u { font-size: 11px; font-weight: 700; color: var(--text-3); margin-left: 1px; }
/* 남은 트렌드 달러(매수 여력) — 블루 강조로 즉시 인지 */
.pf-bd-spend { background: var(--surge-soft); border-color: var(--surge-line, var(--line-2)); }
.pf-bd-spend .pf-bd-k,
.pf-bd-spend .pf-bd-v,
.pf-bd-spend .pf-bd-u { color: var(--surge); }
/* 예측에 걸린 T$ — 총자산에 포함(사라진 게 아니라 묶여 있음). 앰버 전폭 행. */
.pf-predrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px;
  padding: 9px 13px; border-radius: var(--r-sm); background: rgba(230,169,74,.12); border: 1px solid rgba(230,169,74,.32); }
.pf-predrow-k { font-size: 12px; font-weight: 800; color: var(--gold, #e0a54b); }
.pf-predrow-v { font-family: var(--mono); font-size: 15px; font-weight: 800; color: var(--gold, #e0a54b); }
.pf-predrow-u { font-size: 11px; font-weight: 700; opacity: .82; }
/* 법적 고지: 본문엔 한 줄만 두고 전문은 별도 페이지(/terms#tdollar)에서 새 탭으로 */
.pf-legal { display: block; margin-top: 12px; font-size: 11px; color: var(--text-3);
  text-decoration: underline; text-underline-offset: 2px; }
.pf-legal:hover { color: var(--text-2); }
.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;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.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: 15px; min-width: 58px; 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-share { flex: 0 0 auto; width: 30px; height: 30px; padding: 0; border: 1px solid var(--line); border-radius: 50%;
  background: transparent; color: var(--text-3); cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  transition: border-color .14s ease, color .14s ease, background .14s ease; }
.pf-share svg { width: 15px; height: 15px; }
.pf-share:hover { border-color: var(--surge); color: var(--surge); background: var(--surge-soft); }
.pf-share:active { transform: scale(.94); }
/* ── 프로필 카드(보유 탭 상단) + 피드백 버튼 ── */
.pf-profile { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.pf-ava { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 50%; overflow: hidden; display: flex; align-items: center; justify-content: center;
  background: var(--surface-2); border: 1px solid var(--line-2); font-size: 20px; font-weight: 800; color: var(--text-2); }
.pf-ava img { width: 100%; height: 100%; object-fit: cover; }
.pf-prof-main { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.pf-prof-name { font-size: 15.5px; font-weight: 800; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pf-bio { font-size: 12.5px; color: var(--text-2); line-height: 1.4; margin: 1px 0 2px; word-break: keep-all; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pf-bio-empty { color: var(--text-3); cursor: pointer; font-weight: 600; }
.pf-bio-empty:hover { color: var(--surge); }
.pf-prof-edit { align-self: flex-start; border: 0; background: transparent; color: var(--text-3); font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; padding: 0; }
.pf-prof-edit:hover { color: var(--accent, var(--surge)); }
.pf-feedback { flex: 0 0 auto; border: 1px solid var(--surge-line, var(--line-2)); background: var(--surge-soft); color: var(--surge);
  font: inherit; font-size: 12px; font-weight: 800; border-radius: var(--r-pill); padding: 8px 12px; cursor: pointer; white-space: nowrap;
  transition: filter .14s ease; }
.pf-feedback:hover { filter: brightness(1.08); }
.pf-feedback:active { transform: scale(.97); }
/* 프로필 카드 우측 액션(피드백 위 · 로그아웃 아래) — 로그아웃은 한쪽 코너 버튼 */
.pf-prof-actions { flex: 0 0 auto; display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
.pf-logout { border: 1px solid var(--line-2); background: transparent; color: var(--text-3);
  font: inherit; font-size: 11.5px; font-weight: 700; border-radius: var(--r-pill); padding: 7px 12px;
  cursor: pointer; white-space: nowrap; transition: border-color .14s ease, color .14s ease, transform .1s ease; }
.pf-logout:hover { border-color: var(--down); color: var(--down); }
.pf-logout:active { transform: scale(.97); }
/* 프로필 편집 모달 아바타 행 */
.pe-avarow { display: flex; align-items: center; gap: 14px; margin: 4px 0 16px; }
.pe-ava { flex: 0 0 auto; width: 60px; height: 60px; border-radius: 50%; overflow: hidden; display: flex; align-items: center; justify-content: center;
  background: var(--surface-2); border: 1px solid var(--line-2); font-size: 28px; }
.pe-ava img { width: 100%; height: 100%; object-fit: cover; }
.pe-avpick { border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text-2); font-size: 13px; font-weight: 700;
  border-radius: var(--r-pill); padding: 9px 14px; cursor: pointer; }
.pe-avpick:hover { border-color: var(--surge); color: var(--surge); }
@media (max-width: 560px) { .pf-feedback { font-size: 11.5px; padding: 8px 10px; } }
/* 좁은 폰: 보유 카드가 값·공유·팔기 때문에 이름/평단이 세로로 깨지던 것 → 위(이름·평단) / 아래(값·액션) 2줄로 쌓기 */
@media (max-width: 560px) {
  .pf-hold, .pf-pred { flex-direction: column; align-items: stretch; gap: 10px; }
  .pf-h-name { white-space: normal; }
  /* 값이 크면(예: 578,601) 값+% +버튼3개가 한 줄을 넘겨 삐져나오던 것 → 줄바꿈 허용(넘치면 버튼이 아래줄로) */
  .pf-h-right { justify-content: flex-end; flex-wrap: wrap; gap: 8px 10px; }
  .pf-h-val { flex: 0 1 auto; min-width: 0; }
}

/* 매수 패널 */
.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: center; justify-content: space-between; gap: 8px 10px; margin: 22px 0 10px; flex-wrap: wrap; }
.pf-mkt-head .pf-h3 { margin: 0; }
/* 밈 마켓 헤더의 '쓸 수 있는 트렌드 달러' 칩 — 매수 화면에서 남은 여력을 한눈에 */
.pf-cash { display: inline-flex; align-items: baseline; gap: 6px; white-space: nowrap;
  background: var(--surge-soft); border: 1px solid var(--surge-line, var(--line-2)); border-radius: var(--r-pill); padding: 6px 12px; }
.pf-cash-k { font-size: 11px; font-weight: 800; color: var(--surge); letter-spacing: -.01em; }
.pf-cash b { font-family: var(--mono); font-size: 14px; font-weight: 800; color: var(--surge); }
.pf-cash-u { font-family: var(--mono); font-size: 10.5px; font-weight: 700; color: var(--surge); opacity: .85; }

/* 밈 마켓 리스트 — 한눈에 보이는 행 + 인라인 퀵바이 */
.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; }
}

/* ── 퀵바이 시트(빠른 보유): 슬라이더·프리셋·최대치로 개수 타이핑 없이 바로 ── */
.pf-add { flex: 0 0 auto; border: 1px solid var(--surge-line); background: var(--surge-soft); color: var(--surge);
  border-radius: var(--r-pill); padding: 0 12px; height: 34px; font-size: 12px; font-weight: 800; cursor: pointer; white-space: nowrap; }
.pf-add:hover { filter: brightness(1.05); border-color: var(--surge); }
.pf-add:disabled { opacity: .5; cursor: default; }
.bs-held { font-size: 12px; font-weight: 800; color: var(--surge); margin: -2px 0 10px; }
/* 돈 중심 매수: 큰 −/＋ 버튼 + T$ 직접입력 */
.bs-sub { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--text-2); margin: -2px 0 12px; }
.bs-sub b { color: var(--text); font-family: var(--mono); font-weight: 800; }
.bs-stepwrap { display: flex; align-items: stretch; gap: 10px; margin-bottom: 12px; }
.bs-step-big { flex: 0 0 auto; width: 62px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--surface-2);
  color: var(--text); font-size: 30px; font-weight: 700; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.bs-step-big:hover { border-color: var(--surge); color: var(--surge); }
.bs-step-big:active { transform: scale(.96); }
.bs-amtbox { flex: 1 1 auto; min-width: 0; display: flex; align-items: baseline; justify-content: center; gap: 6px;
  border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--surface); padding: 0 10px; }
.bs-amtbox:focus-within { border-color: var(--surge); }
.bs-amt { flex: 0 1 auto; min-width: 0; width: 100%; height: 62px; border: 0; background: transparent; color: var(--text);
  text-align: center; font: inherit; font-size: 26px; font-weight: 800; }
.bs-amt:focus { outline: none; }
.bs-amt-u { flex: 0 0 auto; font-size: 14px; font-weight: 800; color: var(--text-3); }
.bs-units-v, .bs-left-v { font-family: var(--mono); color: var(--text); }
.bs-price { font-family: var(--mono); font-size: 14px; font-weight: 800; color: var(--text); margin: -2px 0 12px; }
.bs-price .t-unit { font-size: .8em; opacity: .7; }
.bs-cash { display: flex; align-items: baseline; gap: 6px; font-size: 13px; color: var(--text-2); margin-bottom: 10px; }
.bs-cash-v { font-family: var(--mono); font-weight: 800; color: var(--text); }
.bs-max { display: block; width: 100%; text-align: center; border: 1px dashed var(--surge-line); background: var(--surge-soft);
  color: var(--surge); border-radius: var(--r-sm); padding: 9px; font-size: 13px; font-weight: 700; margin-bottom: 14px; cursor: pointer; }
.bs-max b { font-family: var(--mono); font-weight: 800; }
.bs-max:hover { border-style: solid; }
.bs-slider { -webkit-appearance: none; appearance: none; width: 100%; height: 8px; border-radius: 5px;
  background: var(--surface-3); outline: none; margin: 2px 0 14px; cursor: pointer; touch-action: none; }
.bs-slider::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 28px; height: 28px; border-radius: 50%;
  background: var(--surge); border: 4px solid var(--surface); box-shadow: 0 1px 5px rgba(0,0,0,.4); cursor: pointer; }
.bs-slider::-moz-range-thumb { width: 28px; height: 28px; border-radius: 50%; background: var(--surge);
  border: 4px solid var(--surface); box-shadow: 0 1px 5px rgba(0,0,0,.4); cursor: pointer; }
.bs-slider:focus-visible { box-shadow: 0 0 0 3px var(--surge-soft); }
.bs-chips { display: flex; gap: 7px; margin-bottom: 14px; }
.bs-chips .pb-preset { flex: 1; }
.bs-maxchip { color: var(--surge); font-weight: 800; }
.bs-amtrow { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.bs-dec, .bs-inc { flex: 0 0 auto; width: 46px; height: 46px; border: 1px solid var(--line-2); border-radius: var(--r-sm);
  background: var(--surface-2); color: var(--text); font-size: 20px; font-weight: 700; line-height: 1; cursor: pointer; }
.bs-dec:hover, .bs-inc:hover { border-color: var(--surge); color: var(--surge); }
.bs-qty { flex: 1; min-width: 0; height: 46px; border: 1px solid var(--line-2); border-radius: var(--r-sm);
  background: var(--surface); color: var(--text); text-align: center; font: inherit; font-size: 17px; font-weight: 800; }
.bs-qty:focus { outline: none; border-color: var(--surge); }
.bs-qty-u { flex: 0 0 auto; font-size: 13px; color: var(--text-3); font-weight: 700; }
.bs-readout { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--text-2); margin-bottom: 16px; }
.bs-readout b { font-family: var(--mono); color: var(--text); font-weight: 800; }
.bs-go { width: 100%; border: 0; border-radius: var(--r-pill); background: var(--surge); color: var(--surge-ink);
  padding: 15px; font-size: 15px; font-weight: 800; cursor: pointer; }
.bs-go:hover:not(:disabled) { filter: brightness(1.06); }
.bs-go:disabled { opacity: .5; cursor: default; }
.bs-go.over { background: var(--surface-3); color: var(--text-3); }
/* 매도 시트: 파란 매수와 구분되게 초록(받는 돈) — 어두운 글씨로 대비 확보 */
.bs-go-sell { background: var(--up); color: #04231a; }
.bs-slider-sell::-webkit-slider-thumb { background: var(--up); }
.bs-slider-sell::-moz-range-thumb { background: var(--up); }

/* ── 예측 정산 결과 팝업(재방문 시 요약 알림) ── */
.sp-net { font-family: var(--mono); font-size: 24px; font-weight: 800; letter-spacing: -0.02em; margin: 2px 0 14px; }
.sp-net.up { color: var(--up); }
.sp-net.down { color: var(--down); }
.sp-list { max-height: 260px; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; margin-bottom: 16px; }
.sp-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 13px; }
.sp-row:first-child { border-top: 0; }
.sp-nm { font-weight: 700; color: var(--text); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-won { color: var(--up); font-weight: 800; font-family: var(--mono); white-space: nowrap; }
.sp-lost { color: var(--down); font-weight: 800; font-family: var(--mono); white-space: nowrap; }
.sp-refund { color: var(--text-3); font-weight: 700; white-space: nowrap; }
.sp-ok { width: 100%; border: 0; border-radius: var(--r-pill); background: var(--surge); color: var(--surge-ink); padding: 14px; font-size: 15px; font-weight: 800; cursor: pointer; }
.sp-ok:hover { filter: brightness(1.06); }

/* ── 상단 🔍 검색 버튼 + 밈 검색 오버레이(결과에서 상세·보유·예측 바로) ── */
.search-btn { margin-left: auto; 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; }
.search-btn:hover { background: var(--surface-2); }
.search-btn:active { transform: scale(.94); }
/* ── 🔔 알림 버튼 (PC는 푸시가 없어 여기서 놓친 걸 본다) ── */
.notif-btn { position: relative; 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; }
.notif-btn[hidden] { display: none; }
.notif-btn:hover { background: var(--surface-2); }
.notif-btn:active { transform: scale(.94); }
.notif-dot { position: absolute; top: -3px; right: -3px; min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 999px; background: var(--down); color: #fff; font-size: 10px; font-weight: 800; line-height: 16px;
  font-family: var(--mono); text-align: center; box-shadow: 0 0 0 2px var(--bg); }
.notif-dot[hidden] { display: none; }
/* 알림 목록 */
.nt-modal { max-width: 460px; }
.nt-h { font-size: 16px; font-weight: 800; margin: 0 0 12px; }
.nt-list { display: flex; flex-direction: column; gap: 6px; max-height: 60vh; overflow-y: auto; }
.nt-i { display: grid; grid-template-columns: auto minmax(0,1fr); align-items: start; gap: 10px; width: 100%;
  text-align: left; border: 1px solid var(--line); background: var(--surface-2); border-radius: 10px;
  padding: 11px 12px; font: inherit; cursor: pointer; transition: border-color .12s ease, background .12s ease; }
.nt-i:hover { border-color: var(--line-2); background: var(--surface-3); }
.nt-i.new { border-color: var(--surge-line); background: var(--surge-soft); }
.nt-ico { font-size: 16px; line-height: 1.3; }
.nt-b { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.nt-t { font-size: 13.5px; font-weight: 700; color: var(--text); word-break: keep-all; }
.nt-t b.up { color: var(--up-ink); } .nt-t b.down { color: var(--down-ink); }
.nt-x { font-size: 12.5px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nt-m { font-size: 11px; color: var(--text-3); font-weight: 600; }
/* 알림에서 넘어온 댓글 잠깐 강조 — 어느 댓글 얘기인지 바로 보이게 */
.cmt-hl { animation: cmtHl 2.4s ease-out; border-radius: var(--r-sm); }
@keyframes cmtHl { 0%, 60% { background: var(--surge-soft); box-shadow: 0 0 0 2px var(--surge-line); } 100% { background: transparent; box-shadow: none; } }
@media (prefers-reduced-motion: reduce) { .cmt-hl { animation: none; background: var(--surge-soft); } }
.nt-empty { text-align: center; color: var(--text-3); font-size: 13px; line-height: 1.6; padding: 26px 0; }
/* ── ! 위험 안내 ── */
.risk-i { flex: 0 0 auto; width: 17px; height: 17px; margin-left: 5px; border-radius: 999px;
  border: 1px solid var(--text-3); background: transparent; color: var(--text-3);
  font-size: 11px; font-weight: 900; line-height: 1; cursor: pointer; padding: 0;
  display: inline-flex; align-items: center; justify-content: center; vertical-align: middle;
  transition: color .12s ease, border-color .12s ease; }
.risk-i:hover { color: var(--text); border-color: var(--text); }
.pf-legal-row { display: flex; align-items: center; justify-content: center; gap: 2px; }
/* ⚠️ 위험 안내 시트와 '랭킹' 목록이 .rk-* 접두사를 같이 쓴다. 여기 규칙이 전역이면
   .rk-list 의 max-height:56vh + overflow-y:auto 가 랭킹 목록으로 새서 목록이 잘리고
   내부 스크롤바가 생긴다(실제로 그랬다). 전부 .rk-modal 하위로 스코프한다. */
.rk-modal { max-width: 420px; }
.rk-modal .rk-h { font-size: 17px; font-weight: 800; margin: 0 0 14px; }
.rk-modal .rk-list { display: flex; flex-direction: column; gap: 12px; max-height: 56vh; overflow-y: auto; }
.rk-modal .rk-i { display: grid; grid-template-columns: auto minmax(0,1fr); gap: 10px; align-items: center; }
.rk-modal .rk-i > b { font-size: 14px; font-weight: 700; color: var(--text); line-height: 1.5; word-break: keep-all; }
.rk-modal .rk-ico { font-size: 17px; line-height: 1.3; }
.rk-modal .rk-b { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.rk-modal .rk-b b { font-size: 13.5px; font-weight: 800; color: var(--text); word-break: keep-all; }
.rk-modal .rk-b span { font-size: 12.5px; color: var(--text-2); line-height: 1.55; word-break: keep-all; }
.rk-modal .rk-more { display: block; text-align: center; margin: 14px 0 10px; font-size: 12px; color: var(--text-3); }
.rk-modal .rk-ok { width: 100%; height: 44px; border: 0; border-radius: var(--r); background: var(--surge); color: var(--surge-ink);
  font: inherit; font-size: 15px; font-weight: 800; cursor: pointer; }
.rk-modal .rk-ok:active { transform: scale(.98); }
.modal-scrim.search-scrim { align-items: flex-start; padding: 0; }
.search-panel { width: 100%; max-width: 560px; margin: 8vh auto 0; max-height: 84vh; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.search-top { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.search-ic { font-size: 15px; opacity: .7; flex: 0 0 auto; }
.search-in { flex: 1; min-width: 0; height: 40px; border: 0; background: transparent; color: var(--text); font: inherit; font-size: 16px; font-weight: 600; outline: none; }
.search-in::placeholder { color: var(--text-3); font-weight: 500; }
.search-x { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text-2); font-size: 15px; cursor: pointer; }
.search-x:hover { color: var(--text); }
.search-hint { padding: 8px 16px; font-size: 12px; color: var(--text-3); border-bottom: 1px solid var(--line); }
.search-results { flex: 1; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 2px 0 6px; }
.search-empty { padding: 40px 20px; text-align: center; }
.se-emoji { font-size: 34px; opacity: .45; margin-bottom: 10px; }
.se-msg { font-size: 15px; font-weight: 800; color: var(--text); margin-bottom: 4px; word-break: break-all; }
.se-sub { font-size: 13px; color: var(--text-3); margin-bottom: 18px; line-height: 1.6; word-break: keep-all; }
.se-sub b { color: var(--gold, #e0a54b); font-weight: 900; font-size: 1.1em; }
.se-disc { border: 0; border-radius: var(--r-pill); background: var(--surge); color: var(--surge-ink); padding: 13px 22px; font-size: 14px; font-weight: 800; cursor: pointer; }
.se-disc:hover { filter: brightness(1.06); }
.se-disc:active { transform: scale(.97); }
/* 검색 하단 상시 발굴 유도 바 — 결과가 나와도 '찾던 그 밈'이 아닐 때가 많다(스크롤 없이 항상 보이게 패널 바닥에 고정). */
.search-foot { flex: 0 0 auto; display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  border-top: 1px solid var(--line); background: var(--surface-2); }
.search-foot[hidden] { display: none; }
.search-foot .sf-tx { flex: 1 1 auto; min-width: 0; font-size: 12.5px; font-weight: 700; color: var(--text-2); line-height: 1.35; word-break: keep-all; }
.search-foot .sf-tx b { color: var(--gold, #e0a54b); font-weight: 900; font-size: 1.14em; }
.search-foot .sf-b { flex: 0 0 auto; border: 0; border-radius: var(--r-pill); background: var(--surge); color: var(--surge-ink);
  padding: 9px 15px; font: inherit; font-size: 12.5px; font-weight: 800; cursor: pointer; white-space: nowrap; }
.search-foot .sf-b:hover { filter: brightness(1.06); }
.search-foot .sf-b:active { transform: scale(.97); }
.search-row { display: flex; align-items: center; justify-content: space-between; gap: 10px 12px; padding: 11px 16px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.search-row:first-child { border-top: 0; }
.search-meme { min-width: 0; display: flex; flex-direction: column; gap: 3px; flex: 1 1 auto; }
.search-nm { font-size: 14px; font-weight: 800; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.search-fig { display: flex; align-items: baseline; gap: 8px; }
.search-fig .num { font-family: var(--mono); font-size: 12.5px; font-weight: 800; color: var(--text-2); }
.search-fig .chg { font-size: 12px; }
.search-acts { flex: 0 0 auto; display: flex; gap: 6px; }
.search-act { border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text-2); border-radius: var(--r-pill); padding: 8px 12px; min-height: 40px; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; cursor: pointer; white-space: nowrap; }
.search-act:hover { border-color: var(--surge); color: var(--surge); }
.sa-buy { color: var(--surge); border-color: var(--surge-line); }
@media (max-width: 559px) {
  .search-panel { margin-top: 0; max-width: none; max-height: 100dvh; height: 100dvh; border-radius: 0; }
  .search-acts { width: 100%; }
  .search-act { flex: 1; text-align: center; }
}
/* 초협소(≤360px): 헤더에 🔍까지 4버튼이 안 들어가 넘침 → 브랜드 워드마크 숨김(로고 아이콘은 유지) + 간격 축소 */
@media (max-width: 360px) {
  .app-header { gap: 5px; }
  .app-header .brand span { display: none; }
  .search-btn, .theme-btn, .notif-btn { width: 32px; height: 32px; font-size: 14px; }
}
/* 🔔이 붙으면 버튼이 하나 늘어 390~430px 폰에서도 헤더가 넘친다(측정: 390px에서 +52px).
   회원일 때만 붙는 버튼이라 body.has-notif 로 그때만 압축한다 — 비회원 헤더는 그대로. */
@media (max-width: 460px) {
  body.has-notif .app-header { gap: 6px; padding: 0 14px; }
  body.has-notif .app-header .brand span { display: none; }
  body.has-notif .search-btn,
  body.has-notif .theme-btn,
  body.has-notif .notif-btn { width: 32px; height: 32px; font-size: 14px; }
  body.has-notif .lang-btn { height: 32px; padding: 0 9px; font-size: 12px; }
  body.has-notif .auth-btn { padding: 5px 10px 5px 8px; max-width: 120px; overflow: hidden; }
  body.has-notif .auth-btn span:not(.ab-ava) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* ════════════════════════════════════════════════════════════
   보유자 태그(토스식) · 태그 설명 팝오버 · 포트폴리오 거래내역
   ════════════════════════════════════════════════════════════ */
/* 댓글 이름 옆 보유자 태그 칩 */
.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-top5 { border-color: var(--gold); background: rgba(224,165,75,.13); color: var(--gold); }
.htag-top25 { border-color: #59C1F0; background: rgba(89,193,240,.11); color: #59C1F0; }
.htag-k300 { border-color: var(--up); background: var(--up-soft); color: var(--up); }
.htag-k50 { border-color: var(--up); background: var(--up-soft); color: var(--up); }
/* 댓글 활동/평판 */
.htag-hotcmt { border-color: #FF7A1A; background: rgba(255,122,26,.14); color: #FF7A1A; }
.htag-talker { border-color: #59C1F0; background: rgba(89,193,240,.12); color: #59C1F0; }
.htag-toxic { border-color: #79c257; background: rgba(121,194,87,.16); color: #79c257; }
/* 다 녹았다 — 파산 톤 */
.htag-rekt { border-color: var(--down); background: var(--down-soft); color: var(--down); }
/* '이 밈' 컨텍스트 — 보유자/큰손 + 지금 이 밈에 걸어둔 예측 */
.htag-bighold { border-color: var(--surge); background: var(--surge-soft); color: var(--surge); }
.htag-holder { border-color: var(--up); background: var(--up-soft); color: var(--up); }
.htag-betup { border-color: var(--up-ink); background: var(--up-soft); color: var(--up-ink); }
.htag-betdown { border-color: var(--down-ink); background: var(--down-soft); color: var(--down-ink); }
.htag-lev { border-color: var(--gold); background: rgba(224,165,75,.14); color: var(--gold); }
/* 전체 순위 태그 — 1·2·3 은 금·은·동, 4~10 은 브랜드 톤 */
.htag-rank1 { border-color: #FACC15; background: rgba(250,204,21,.18); color: #FACC15; }
.htag-rank2 { border-color: #C7CBD1; background: rgba(199,203,209,.18); color: #C7CBD1; }
.htag-rank3 { border-color: #E0A46B; background: rgba(224,164,107,.18); color: #E0A46B; }
.htag-rank10 { border-color: var(--surge-line); background: var(--surge-soft); color: var(--surge); }

/* 태그 설명 팝오버 */
.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; max-height: 340px; overflow-y: auto;
  overscroll-behavior: contain; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }   /* 내역 길어지면 이 안에서 스크롤 */
.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.sell { color: var(--up); }                 /* 판매 = 현금 유입(초록) */
.pf-trade-amt.buy { color: var(--text-2); font-weight: 700; }   /* 보유(매수) = 자산 전환, 손실 아님 → 중립색(빨강 X) */
.pf-trade-at { flex: 0 0 auto; font-size: 11px; color: var(--text-3); min-width: 66px; text-align: right; white-space: nowrap; }
@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$ 베팅 · 내 베팅 스트립 · 예측 태그
   ════════════════════════════════════════════════════════════ */
/* ── 예측 '내 트렌드 달러' 잔액바 — sticky, 모바일·PC 공통, 섹션 최상단 ── */
.pred-wallet { grid-column: 1 / -1; position: sticky; top: var(--header-h, 60px); z-index: 6;
  display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 16px;
  border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-sm);
  background: color-mix(in srgb, var(--surface) 88%, transparent); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.pred-wallet .pw-label { font-size: 11px; font-weight: 700; color: var(--text-3); letter-spacing: .02em; }
.pred-wallet .pw-v { display: inline-flex; align-items: baseline; }
.pred-wallet .pw-n { font-family: var(--mono); font-size: 20px; font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.pred-wallet .pw-u { font-size: 13px; font-weight: 700; color: var(--text-3); }
.pred-wallet .pw-nudge { border: 0; background: var(--surge); color: var(--surge-ink); font: inherit; font-size: 13px; font-weight: 800; padding: 8px 14px; border-radius: var(--r-pill); cursor: pointer; }
.pw-v.pw-flash .pw-n { animation: pwFlash .5s ease; }
@keyframes pwFlash { 0%,100% { color: var(--text); } 30% { color: var(--down); } }

/* ── 섹션 보상 안내 배너(모든 섹션 공통) — 컴팩트 1줄 pill(디자인 안 깨지게) ── */
.rw-banner { grid-column: 1 / -1; display: flex; align-items: center; gap: 7px; margin: 0 0 2px; padding: 7px 12px;
  border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--surface-2);
  font-size: 12px; font-weight: 700; color: var(--text-2); }
.rw-banner .rw-ic { flex: 0 0 auto; font-size: 13px; }
.rw-banner .rw-tx { min-width: 0; overflow: hidden; line-height: 1.35; word-break: keep-all;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }   /* 최대 2줄(짧은 문구는 1줄, 긴 문구는 금액까지 다 보이게) */
.rw-banner .rw-big { font-size: 1.32em; font-weight: 900; color: var(--gold, #e6a94a); letter-spacing: -.01em; }   /* 발굴 5만 등 큰 보상 부각 */
.rw-banner.guest { cursor: pointer; color: var(--surge); background: var(--surge-soft); border-color: var(--surge-line); transition: border-color .14s ease; }
.rw-banner.guest:hover { border-color: var(--surge); }
/* 발굴 배너만 '훅 한 줄 + 보상 한 줄' → pill 대신 카드형으로 풀고 클램프를 해제한다(뒤쪽 '발굴자 랭킹'이 잘리면 안 됨). */
.rw-banner.rw-k-discovery { align-items: flex-start; border-radius: var(--r); padding: 10px 13px; margin-bottom: 10px; }
.rw-banner.rw-k-discovery .rw-ic { font-size: 15px; line-height: 1.4; }
.rw-banner.rw-k-discovery .rw-tx { display: block; overflow: visible; -webkit-line-clamp: none; }
.rw-banner .rw-hook { display: block; margin-bottom: 2px; font-size: 13px; font-weight: 900; color: var(--text); word-break: keep-all; }
.rw-banner.guest .rw-hook { color: var(--surge); }
/* 상세 '예측하기'로 넘어온 해당 밈 카드 강조 */
.pred-card.pred-hl { animation: predHl 2.3s ease; }
@keyframes predHl { 0%,100% { box-shadow: var(--shadow-sm); } 12%,58% { box-shadow: 0 0 0 2px var(--surge), 0 0 0 6px var(--surge-soft); } }

/* ── 파리뮤추얼 베팅: 직접입력 + 슬라이더 + % 프리셋 + 배당 패널 ── */
@property --fill { syntax: '<percentage>'; inherits: false; initial-value: 0%; }
.pred-bet { margin-top: 12px; padding: 14px; border: 1px solid var(--surge-line); border-radius: var(--r); background: var(--surge-soft); }
.pred-bet.pb-in { animation: pbReveal .26s cubic-bezier(.22,1,.36,1); }
@keyframes pbReveal { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.pb-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
/* 프리셋(10/25/50%)의 기준 잔액. 비회원엔 '체험'임을 명시해 미끼처럼 느껴지지 않게 */
.pb-bal { font-size: 12px; color: var(--text-3); margin-bottom: 8px; }
.pb-bal-v { font-family: var(--mono); font-weight: 800; color: var(--text-2); }
.pb-bal-k { font-size: 11px; }
.pb-demo .pb-bal { color: var(--surge); }
.pb-demo .pb-bal-v { color: var(--surge); }
.pb-side-pill { font-size: 12px; font-weight: 800; padding: 3px 11px; border-radius: var(--r-pill); }
.pb-side-pill.up { color: var(--up); background: var(--up-soft); }
.pb-side-pill.down { color: var(--down); background: var(--down-soft); }
.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); }
/* ── 스테이크 슬라이더 — 0에서 출발(docs/RANKINGS.md C2) ─────────────
   0 = 무료 예측이 기본 상태다. 오른쪽으로 밀수록 T$가 올라간다.
   무료일 때 강조색을 쓰지 않아 '돈을 걸어야 한다'는 압박을 주지 않는다. */
.pb-stakebar { margin: 10px 0 2px; }
.pb-stake-lab { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
/* 오른쪽으로 밀수록 숫자가 커진다(--k = 0~1). 손끝으로 '크게 건다'가 느껴지게.
   transform 만 애니메이트해서 레이아웃이 흔들리지 않는다. */
.pb-stake-v { font-size: 17px; font-weight: 800; color: var(--surge); font-variant-numeric: tabular-nums;
  display: inline-block; transform-origin: left center;
  transform: scale(calc(1 + 0.42 * var(--k, 0)));
  transition: transform .1s cubic-bezier(.2,.9,.3,1.2), color .12s ease; }
@media (prefers-reduced-motion: reduce) { .pb-stake-v { transition: none; transform: none; } }
.pb-free .pb-stake-v { color: var(--text-2); }          /* 무료 상태는 중립 톤 */
/* 전재산을 걸면 눈에 띄어야 하지만 '빨강'은 쓰지 않는다 — 이 앱에서 빨강은 '그만뜬다(하락)'
   신호라 금액·CTA가 빨개지면 방향을 반대로 고른 것처럼 읽힌다. 색 대신 테두리로 강조. */
.ps-modal.allin .pb-stake-v { box-shadow: 0 0 0 2px var(--surge-line); border-radius: 8px; padding: 1px 8px; }
.pb-stake-hint { font-size: 11px; color: var(--text-3); }
.pb-free .pb-stake-hint { color: var(--surge); }        /* 무료일 때만 '밀면 걸 수 있어요' 를 살짝 강조 */
.pb-slide { -webkit-appearance: none; appearance: none; width: 100%; height: 34px;
  background: transparent; cursor: pointer; display: block; margin: 0; }
.pb-slide::-webkit-slider-runnable-track { height: 8px; border-radius: 999px;
  background: var(--line-2); border: none; }
.pb-slide::-moz-range-track { height: 8px; border-radius: 999px; background: var(--line-2); border: none; }
.pb-slide::-webkit-slider-thumb { -webkit-appearance: none; appearance: none;
  width: 28px; height: 28px; margin-top: -10px; border-radius: 50%;
  background: var(--surge); border: 3px solid var(--surface); box-shadow: var(--shadow-sm); }
.pb-slide::-moz-range-thumb { width: 28px; height: 28px; border-radius: 50%;
  background: var(--surge); border: 3px solid var(--surface); box-shadow: var(--shadow-sm); }
.pb-free .pb-slide::-webkit-slider-thumb { background: var(--text-3); }
.pb-free .pb-slide::-moz-range-thumb { background: var(--text-3); }
.pb-slide:focus-visible { outline: 2px solid var(--surge); outline-offset: 4px; border-radius: 999px; }
/* 무료 예측 완료 배지는 금액 배지와 톤을 구분 */
.pb-placed-free { color: var(--text-2); }

.pb-amt-row { display: flex; align-items: baseline; justify-content: center; gap: 6px; padding: 6px 0 2px; }
.pb-amt { width: 60%; max-width: 220px; text-align: right; font-family: var(--mono); font-size: 30px; font-weight: 800; letter-spacing: -0.02em;
  color: var(--text); font-variant-numeric: tabular-nums; border: 0; border-bottom: 2px solid var(--line-2); background: transparent; outline: none; padding: 2px; }
.pb-amt:focus { border-bottom-color: var(--surge); }
.pb-amt-u { font-size: 15px; font-weight: 700; color: var(--text-3); }
/* 금액 빠른 선택 칩(10/25/50/올인) — 슬라이더 대체, 폴리마켓식 간결 */
.pb-chips { display: flex; gap: 6px; margin-top: 12px; }
.pb-preset { flex: 1; padding: 9px 4px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--surface);
  color: var(--text-2); font: inherit; font-size: 12.5px; font-weight: 800; cursor: pointer; transition: border-color .12s ease, background .12s ease, color .12s ease, transform .08s ease; }
.pb-preset:hover { border-color: var(--surge); color: var(--text); }
.pb-preset:active { transform: scale(.95); }
.pb-preset.pb-allin { color: var(--surge); }
/* 예상 수령 — 한 줄로 간결 */
.pb-win { margin-top: 13px; text-align: center; font-size: 13px; font-weight: 700; color: var(--text-2); }
.pb-win.bump { animation: pbBump .34s ease; }
@keyframes pbBump { 0%,100% { transform: scale(1); } 40% { transform: scale(1.04); } }
.pb-win-v { font-size: 21px; font-weight: 800; color: var(--up); font-family: var(--mono); letter-spacing: -0.01em; }
.pb-mult { color: var(--up); font-weight: 800; font-family: var(--mono); font-size: 13px; }
.pb-go { margin-top: 13px; 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, background .18s ease, transform .08s ease; }
.pb-go:hover:not(:disabled) { filter: brightness(1.06); }
.pb-go:active:not(:disabled) { transform: scale(.985); }
.pb-go:disabled { opacity: .5; cursor: default; }
.pred-bet.allin .pb-go { background: var(--down); color: #fff; }
.pb-hint { margin-top: 9px; font-size: 11px; line-height: 1.5; color: var(--text-3); text-align: center; }
.pb-placed { padding: 12px 8px; text-align: center; font-size: 13px; font-weight: 800; color: var(--surge); line-height: 1.55;
  animation: pbPop .4s cubic-bezier(.34,1.56,.64,1); }
@keyframes pbPop { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: scale(1); } }
@media (prefers-reduced-motion: reduce) {
  .pred-bet.pb-in, .pb-win.bump, .pb-placed, .pw-v.pw-flash .pw-n { animation: none !important; transition: none !important; }
}
.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; display: flex; align-items: center; gap: 6px; }
.pm-n { font-family: var(--mono); font-size: 11px; font-weight: 800; color: var(--text-3); }
.pm-open-n { font-size: 11px; font-weight: 800; color: var(--surge); background: var(--surge-soft); border-radius: var(--r-pill); padding: 1px 8px; }
.pm-list { max-height: 300px; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.pm-row { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 12.5px; flex-wrap: wrap; }
.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: 40%; }
.pm-stake { white-space: nowrap; }
.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); }
/* ── 예측 정산 카운트다운 칩 — 예측 카드 배지·내 예측 목록·보유 탭 공통 ── */
.cd-chip { font-size: 11.5px; font-weight: 800; color: var(--text-3); white-space: nowrap; }
.cd-chip.cd-soon { color: #d98a1f; }               /* 1시간 이내 = 임박 강조 */
.pm-cd { margin-left: auto; }                       /* 내 예측 목록에선 우측 정렬 */
.pb-placed .cd-chip { color: inherit; }             /* 카드 배지 안에선 배지 텍스트색 따라감 */
.pb-placed .cd-chip.cd-soon { color: #ffcf7a; }     /* 배지(어두운 보라) 위 임박은 밝은 앰버 */
/* ── 진행 중인 예측(보유 탭) — 보유 카드와 동일 레이아웃 ── */
.pf-preds { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.pf-pred { 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; }
/* 내 보유 · 예측 내역 — 위아래로 쌓는다.
   🔴 2열로 나눴다가 되돌렸다: 본문 컨테이너가 ~620px 고정이라 2열이면 각 300px 인데,
      보유 행은 오른쪽에 [평가액][%][공유][담기][팔기] 5개가 붙어 안 줄어든다 →
      밈 이름 칼럼이 0px 로 짜부라져 이름이 통째로 사라졌다(폭별 측정으로 확인).
      좌우 배치는 '공간 있으면'이 조건이었고, 이 폭에는 공간이 없다. */
.pf-cols { display: block; }
.pf-col { min-width: 0; }
/* 행이 좁아져도 이름이 사라지지 않게 — 오른쪽 묶음은 줄바꿈, 이름은 최소폭 확보 */
.pf-hold, .pf-pos { flex-wrap: wrap; }
.pf-hold .pf-h-main, .pf-pos .pf-h-main { flex: 1 1 150px; min-width: 130px; }
.pf-hold .pf-h-right, .pf-pos .pf-h-right { flex-wrap: wrap; justify-content: flex-end; }

/* ═══ 모바일 보유 카드 규격 재정비 (2026-07-28 실측) ═══════════════════
   🔴 위 `flex: 1 1 150px` 은 **가로 배치 전제**로 쓴 값인데, 좁은 폰에서는
      앞쪽 @media(max-width:560px) 가 `.pf-hold` 를 flex-direction: column 으로
      바꿔 놓는다. column 에서 flex-basis 는 너비가 아니라 **높이**라서
      이름 칸이 내용 40px 짜리인데 150px 로 부풀었다 —
      화면에서 이름과 숫자 사이에 뻥 뚫린 그 빈칸이 정확히 이것이다.
      (412px 실측: .pf-h-main 높이 150px · 카드 225px)
   두 규칙이 같은 폭에서 동시에 걸리는 게 원인이므로, 세로로 쌓는 구간에서는
   basis 를 되돌린다. 순서상 위 규칙보다 뒤에 와야 이긴다. */
@media (max-width: 560px) {
  .pf-hold .pf-h-main, .pf-pos .pf-h-main { flex: 0 0 auto; min-width: 0; width: 100%; }
  /* 값·수익률은 왼쪽, 버튼 셋은 오른쪽 — 한 줄에 고정한다.
     예전엔 5개가 그냥 flex-end 로 몰려 있어 폭이 모자라면 '팔기'만 다음 줄로
     떨어져 담기와 층이 어긋나 보였다(스크린샷). */
  .pf-hold .pf-h-right, .pf-pos .pf-h-right {
    width: 100%; flex-wrap: nowrap; justify-content: flex-start; align-items: center; gap: 8px; }
  .pf-h-right .pf-share { margin-left: auto; }   /* 여기서부터 오른쪽 묶음 */
  .pf-h-val { font-size: 14px; }
  .pf-h-right .chg { font-size: 14px; min-width: 0; }
  .pf-add, .pf-sell { padding: 7px 11px; font-size: 12px; }
}
/* 아주 좁은 폰(360px 급)에서도 다섯 개가 한 줄에 들어가게 한 단계 더 줄인다.
   360px 기준 안쪽 폭 296px — 아래 크기로 292px 라 딱 들어간다(실측). */
@media (max-width: 400px) {
  .pf-h-val { font-size: 13px; }
  .pf-h-right .chg { font-size: 13px; }
  .pf-h-right .pf-share { width: 28px; height: 28px; }
  .pf-add, .pf-sell { padding: 6px 9px; font-size: 11.5px; }
  .pf-hold .pf-h-right, .pf-pos .pf-h-right { gap: 6px; }
}

/* 거래 내역 — 금액 길이에 따라 행 높이가 63px/88px 로 들쭉날쭉했다.
   flex-wrap 이라 '금액이 들어갈 자리가 있으면 한 줄, 없으면 두 줄'이 되어
   같은 목록 안에서 행 높이가 제각각이었다(실측). 격자로 못 박아 항상 2줄.
      [판매] [밈 이름........] [금액]
             [수량 · 점수]     [날짜]                                    */
@media (max-width: 560px) {
  .pf-trade { display: grid; grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center; column-gap: 8px; row-gap: 2px; }
  .pf-trade-side { grid-column: 1; grid-row: 1 / span 2; align-self: center; }
  .pf-trade-nm   { grid-column: 2; grid-row: 1; max-width: none; }
  .pf-trade-amt  { grid-column: 3; grid-row: 1; margin-left: 0; text-align: right; white-space: nowrap; }
  .pf-trade-u    { grid-column: 2; grid-row: 2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .pf-trade-at   { grid-column: 3; grid-row: 2; width: auto; text-align: right; min-width: 0; }
}
/* 예측 내역 — 결과 · 밈 · 방향×확신 · 손익 */
.pf-phist { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; max-height: 420px; overflow-y: auto; }
.pf-ph { display: grid; grid-template-columns: auto minmax(0,1fr) auto auto; align-items: center; gap: 8px;
  border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); padding: 10px 12px; }
.pf-ph-res { font-size: 10.5px; font-weight: 800; padding: 2px 7px; border-radius: var(--r-pill); white-space: nowrap; }
.pf-ph-res.win { color: var(--up-ink); background: var(--up-soft); }
.pf-ph-res.lose { color: var(--down-ink); background: var(--down-soft); }
.pf-ph-res.flat { color: var(--text-3); background: var(--surface-2); }
.pf-ph-nm { font-size: 13px; font-weight: 700; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-ph-meta { font-size: 11px; color: var(--text-3); white-space: nowrap; }
.pf-ph-net { font-size: 12.5px; font-weight: 800; white-space: nowrap; }
.pf-ph-net.buy { color: var(--up-ink); } .pf-ph-net.sell { color: var(--down-ink); }
@media (max-width: 420px) {
  .pf-ph { grid-template-columns: auto minmax(0,1fr) auto; row-gap: 3px; }
  .pf-ph-meta { grid-column: 2 / span 2; }
}
/* 예측 시트 잔액 라벨(💰 이모지 대신 글씨) */
.ps-bal-lab, .bs-bal-lab { font-style: normal; font-size: 11px; color: var(--text-3); font-weight: 700; }
/* 🎯 예측 중 — 걸어둔 T$가 지금 얼마인지 + 여기서 바로 종료 */
.pf-poss { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.pf-pos { 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-pos .pf-h-right { flex: 0 0 auto; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.pf-close { border: 1px solid var(--line-2); background: transparent; color: var(--text-2);
  font: inherit; font-size: 12px; font-weight: 700; border-radius: var(--r-pill); padding: 7px 13px;
  cursor: pointer; white-space: nowrap; transition: border-color .14s ease, color .14s ease, transform .1s ease; }
.pf-close:hover { border-color: var(--surge); color: var(--surge); }
.pf-close:active { transform: scale(.97); }
.pf-close:disabled { opacity: .5; cursor: default; }
.pf-pside { display: inline-block; font-size: 11px; font-weight: 800; padding: 1px 7px; border-radius: var(--r-pill); }
.pf-pside.up { color: var(--up); background: var(--up-soft); }
.pf-pside.down { color: var(--down); background: var(--down-soft); }
.pf-pred .pf-cd { flex: 0 0 auto; }

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

/* ── 피드 카드 우측 예측 알약 (예측 섹션 통합) ─────────────────────────
   카드 전체가 '상세 열기'라서 이 버튼은 stopPropagation 으로 분리한다(app.js).
   ★ 삼각형만 두면 무슨 뜻인지 모른다 → '더뜬다 / 그만뜬다' 글씨를 넣고, 대신 높이를
     32px 알약으로 줄여 카드를 안 잡아먹게 한다(가로로 넓어 실제 탭 면적은 충분).
   ★ 잉크는 흰색이 아니라 앱 블랙 — --up(#2FD98B)은 밝은 초록이라 흰 글씨를 올리면
     대비가 1.84:1 로 떨어져 안 읽힌다(실측). 어두운 잉크면 초록 10.4:1 · 빨강 6.4:1. */
.mk { position: relative; }
.mk-pred { position: absolute; right: 12px; bottom: 12px; display: flex; flex-direction: column; gap: 6px; z-index: 2; }
/*   ★ 솔리드 채움 → 테두리 + 아주 연한 배경. 카드마다 두 개씩 꽉 찬 색이 깔리면
     피드 전체가 신호등처럼 시끄러워지고 정작 영상·점수가 안 보인다.
     색 정체성(초록=상승/빨강=하락)은 테두리와 글자색으로 충분히 전달된다.
     누르는 순간에만 솔리드로 채워 '선택했다'는 피드백을 강하게 준다. */
.mkp { display: flex; align-items: center; justify-content: center; gap: 4px;
  min-height: 32px; padding: 0 10px; border-radius: 999px; cursor: pointer;
  font-size: 12px; font-weight: 700; letter-spacing: -0.01em; line-height: 1;
  white-space: nowrap; background: var(--surface); border: 1.5px solid var(--line-2);
  transition: transform .12s ease, background .12s ease, color .12s ease; }
.mkp i { font-style: normal; font-size: 9px; }
.mkp.up   { color: var(--up-ink);   border-color: var(--up);   background: var(--up-soft); }
.mkp.down { color: var(--down-ink); border-color: var(--down); background: var(--down-soft); }
.mkp.up:hover   { background: var(--up);   color: #0E1013; }
.mkp.down:hover { background: var(--down); color: #0E1013; }
.mkp:active { transform: scale(.94); }
.mkp.up:active   { background: var(--up);   color: #0E1013; }
.mkp.down:active { background: var(--down); color: #0E1013; }
.mkp:focus-visible { outline: 3px solid var(--text); outline-offset: 2px; }
/* 내가 이미 예측 중인 밈 — 그 방향만 남기고 반대쪽은 흐리게(중복은 서버가 already_open 으로 막는다) */
.mk-pred.mine .mkp { opacity: .3; }
.mk-pred.mine .mkp.on { opacity: 1; }
/* 알약이 이름·점수 위로 겹치지 않게 정보 영역 오른쪽을 비워둔다(절대배치라 자동 회피가 안 됨) */
.mk-info { padding-right: 104px; }
@media (max-width: 360px) {
  .mk-pred { right: 8px; bottom: 8px; gap: 5px; }
  .mkp { min-height: 30px; padding: 0 8px; font-size: 11px; }
  .mk-info { padding-right: 92px; }
}

/* ── 상세 화면 예측 (가로 2버튼) ─────────────────────────────────────
   피드 알약과 같은 색 언어. 상세에선 공간이 있으니 조금 크게. */
.dt-pred { display: flex; gap: 8px; margin-top: 8px; }
.dtp { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 46px; border-radius: var(--r-sm); cursor: pointer;
  font-size: 14px; font-weight: 700; letter-spacing: -0.01em;
  background: var(--surface); border: 1.5px solid var(--line-2); }
.dtp i { font-style: normal; font-size: 11px; }
.dtp.up   { color: var(--up-ink);   border-color: var(--up);   background: var(--up-soft); }
.dtp.down { color: var(--down-ink); border-color: var(--down); background: var(--down-soft); }
.dtp.up:hover, .dtp.up:active     { background: var(--up);   color: #0E1013; }
.dtp.down:hover, .dtp.down:active { background: var(--down); color: #0E1013; }
.dtp:active { transform: scale(.97); }

/* ── 예측 시트 ───────────────────────────────────────────────────── */
/* 예측 시트는 내용이 길어 잘릴 수 있다 — 밈 화면처럼 위아래로 스크롤되게.
   .modal 이 이미 max-height+overflow-y 를 갖지만 iOS 는 관성 스크롤을 따로 켜야 하고,
   시트 끝에서 배경이 같이 밀리는 것도 막아야 한다(overscroll-behavior). */
.ps-modal { max-width: 420px; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
/* 슬라이더 위에서는 세로 스크롤을 막아야 값 조절과 스크롤이 안 싸운다 */
.ps-modal .pb-slide { touch-action: pan-x; }
/* 보유 시트도 예측 시트와 완전히 같은 규격으로 — 예전엔 .modal 기본값만 받아
   iOS 관성 스크롤이 안 먹고, 시트 끝에서 배경 페이지가 같이 밀렸다. */
.bs-modal { max-width: 420px; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.bs-modal .pb-slide { touch-action: pan-x; }
.ps-sub { margin: 2px 0 14px; font-size: 12.5px; color: var(--text-3); word-break: keep-all; }
.ps-sides { display: flex; gap: 8px; margin-bottom: 16px; }
/* 카드는 '고르는 곳'이라 세로로 쌓아 아이콘·제목·설명을 다 보여준다.
   기본은 은은하게(테두리), 고르면 그 색으로 꽉 채워 확실히 구분된다. */
.ps-side { flex: 1; padding: 13px 8px 11px; min-height: 78px; cursor: pointer;
  border: 1.5px solid var(--line-2); border-radius: var(--r); background: var(--surface);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  word-break: keep-all; transition: background .14s ease, border-color .14s ease, color .14s ease; }
.ps-side i { font-style: normal; font-size: 13px; line-height: 1; }
.ps-side b { font-size: 14.5px; font-weight: 800; letter-spacing: -0.01em; }
.ps-side small { font-size: 10.5px; opacity: .75; }
.ps-side.up   { color: var(--up-ink);   border-color: color-mix(in srgb, var(--up) 45%, transparent); }
.ps-side.down { color: var(--down-ink); border-color: color-mix(in srgb, var(--down) 45%, transparent); }
.ps-side.up.on   { background: var(--up);   border-color: var(--up);   color: #0E1013; }
.ps-side.down.on { background: var(--down); border-color: var(--down); color: #0E1013; }
.ps-side.on small { opacity: .8; }
.ps-side.pop { animation: psPop .26s cubic-bezier(.34,1.56,.64,1); }
@keyframes psPop { 0% { transform: scale(1); } 45% { transform: scale(1.06); } 100% { transform: scale(1); } }
.ps-lev { margin-bottom: 4px; }
.ps-lev-lab { font-size: 12px; color: var(--text-3); margin-bottom: 6px; }
.ps-lev-lab b { color: var(--text); font-size: 13.5px; }
.ps-lev-liq { color: var(--cool); }
.ps-lev-chips { display: flex; gap: 6px; }
.ps-lev-b { flex: 1; padding: 10px 4px; min-height: 40px; cursor: pointer; font-size: 14px; font-weight: 800;
  border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--surface); color: var(--text-3);
  font-variant-numeric: tabular-nums; }
.ps-lev-b.on { border-color: var(--surge-line); color: var(--surge); background: var(--surge-soft); }
.ps-readout { display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
  margin: 10px 0 2px; font-size: 12px; color: var(--text-3); }
.ps-liq { color: var(--cool); }
.ps-go { width: 100%; margin-top: 10px; padding: 15px; min-height: 50px; border: 0; border-radius: var(--r-sm);
  background: var(--surge); color: var(--surge-ink); font-size: 15px; font-weight: 800; cursor: pointer; }
.ps-go:disabled { background: var(--line-2); color: var(--text-3); cursor: default; }

/* ── 랭킹 섹션 ───────────────────────────────────────────────────── */
.rk-head { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin: 12px 0 10px; flex-wrap: wrap; }
.rk-desc { font-size: 12px; color: var(--text-3); word-break: keep-all; }
.rk-list { display: flex; flex-direction: column; gap: 6px; }
.rk-row { display: flex; align-items: center; gap: 10px; padding: 12px 14px; min-height: 56px;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); cursor: pointer; }
.rk-row.top { border-color: var(--surge-line); }
.rk-no { width: 24px; text-align: center; font-size: 14px; font-weight: 800; color: var(--text-3); }
.rk-row.top .rk-no { color: var(--surge); }
/* ── 1·2·3 = 메달 + 금·은·동 테두리, 4~10 = TOP10 등급, 11위 이하 = 기본 톤 ──
   순위 클래스는 실제 rk 값으로 붙인다(nth-child 로 하면 목록이 잘릴 때 '몇 번째 행'과
   '몇 위'가 어긋난다). 1위는 이름까지 키워 시상대 느낌을 준다. */
.rk-row .rk-medal { font-size: 19px; line-height: 1; }
.rk-row.rk-m1 { border-color: #FACC15; background: linear-gradient(180deg, rgba(250,204,21,.12), var(--surface) 72%); }
.rk-row.rk-m2 { border-color: #C7CBD1; background: linear-gradient(180deg, rgba(199,203,209,.12), var(--surface) 72%); }
.rk-row.rk-m3 { border-color: #E0A46B; background: linear-gradient(180deg, rgba(224,164,107,.12), var(--surface) 72%); }
.rk-row.rk-m1 { min-height: 64px; }
.rk-m1 .rk-who b { font-size: 15.5px; }
.rk-m1 .rk-ava { width: 36px; height: 36px; flex-basis: 36px; }
.rk-m1 .rk-val { font-size: 15px; }
/* 4~10위: 메달은 아니지만 11위 이하와는 확실히 구분된다 */
.rk-row.rk-t10 { border-color: var(--surge-line); }
.rk-row.rk-t10 .rk-no { color: var(--surge); }
.rk-ava { width: 30px; height: 30px; flex: 0 0 30px; border-radius: 50%; overflow: hidden;
  background: var(--surface-2); display: flex; align-items: center; justify-content: center; font-size: 15px; }
.rk-ava img { width: 100%; height: 100%; object-fit: cover; }
.rk-who { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rk-who b { font-size: 13.5px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rk-who small { font-size: 11px; color: var(--text-3); }
/* 1~3위 칭호 — 이름 아래 한 줄. 순위 숫자만으론 '뭘 잘하는 사람인지'가 안 남는다.
   금·은·동 톤을 그대로 이어받아 메달과 같은 등급으로 읽히게 한다. */
.rk-title { align-self: flex-start; max-width: 100%; margin: 1px 0; padding: 2px 8px;
  border-radius: var(--r-pill); font-size: 10.5px; font-weight: 900; letter-spacing: -.01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rk-title.rk-t1 { color: #7a5600; background: linear-gradient(100deg, #f7d774, #e6a94a); }
.rk-title.rk-t2 { color: #4a4f57; background: linear-gradient(100deg, #e3e6ea, #c7cbd1); }
.rk-title.rk-t3 { color: #5a3512; background: linear-gradient(100deg, #e8bb8a, #d09150); }
.rk-val { font-size: 13.5px; font-weight: 800; color: var(--text); white-space: nowrap; }

/* 비회원 체험 잔액 — '내 돈'으로 착각하지 않게 잔액 옆에 라벨 */
.ps-bal-k { font-style: normal; font-size: 10.5px; font-weight: 700; color: var(--text-3);
  border: 1px solid var(--line-2); border-radius: 999px; padding: 1px 6px; margin-left: 4px; }
.ps-demo .ps-bal-v { color: var(--text-3); }

/* 사업자 정보(전자상거래법 제10조 표시의무). 눈에 띄지 않되 읽을 수는 있게. */
.ab-bizinfo { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line);
  font-size: 11.5px; line-height: 1.85; color: var(--text-3); }
.ab-bizinfo b { color: var(--text-2); font-weight: 700; }
.ab-bizinfo a { color: var(--text-2); }
