/* ==========================================================================
   FONGYI INVEST — VIBE-inspired dark dashboard
   Pure black OLED surface · neon magenta accent · tabbed app frame
   ========================================================================== */

:root {
  --bg: #000000;
  --surface: #141414;
  --surface-2: #1c1c1e;
  --surface-3: #262628;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --text: #ffffff;
  --muted: #8e8e93;
  --muted-2: #6b6b70;
  --accent: #ff0050;
  --accent-soft: rgba(255, 0, 80, 0.14);
  --up: #ff0050;
  --down: #4e8cff;
  --flat: #8e8e93;

  --r-lg: 18px;
  --r-md: 14px;
  --r-sm: 10px;
  --r-xs: 8px;

  --pad: 20px;
  --tab-h: 62px;
  --mini-h: 58px;

  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
    "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(680px 380px at 85% -8%, rgba(255, 0, 80, 0.13), transparent 70%),
    radial-gradient(520px 320px at 0% 12%, rgba(120, 40, 255, 0.10), transparent 72%);
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
svg { display: block; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- app frame ---------- */

.app {
  position: relative;
  z-index: 1;
  max-width: 520px;
  margin: 0 auto;
  min-height: 100dvh;
  padding-bottom: calc(var(--tab-h) + var(--mini-h) + 34px + env(safe-area-inset-bottom));
}

@media (min-width: 560px) {
  body { background: #050505; }
  .app {
    border-left: 1px solid var(--line);
    border-right: 1px solid var(--line);
    background: var(--bg);
    min-height: 100dvh;
  }
}

/* ---------- header ---------- */

.hdr {
  position: sticky;
  top: 0;
  z-index: 30;
  padding: 14px var(--pad) 10px;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.96) 62%, rgba(0, 0, 0, 0.72) 100%);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
}

.hdr-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.brand-mark {
  display: inline-flex;
  align-items: flex-end;
  gap: 2.5px;
  height: 21px;
}

.brand-mark i {
  display: block;
  width: 3.5px;
  border-radius: 2px;
  background: var(--accent);
  transform: skewX(-8deg);
}
.brand-mark i:nth-child(1) { height: 13px; opacity: 0.75; }
.brand-mark i:nth-child(2) { height: 21px; }
.brand-mark i:nth-child(3) { height: 16px; opacity: 0.9; }

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
  white-space: nowrap;
}
.brand-text b {
  font-size: 17.5px;
  font-weight: 800;
  letter-spacing: -0.04em;
}
.brand-text i {
  margin-top: 3px;
  font-style: normal;
  font-size: 7.5px;
  font-weight: 800;
  letter-spacing: 0.26em;
  color: var(--accent);
}

.hdr-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.badge-burgundy {
  display: inline-flex;
  align-items: center;
  height: 27px;
  padding: 0 11px;
  border-radius: 999px;
  background: #3a0a1d;
  border: 1px solid rgba(255, 0, 80, 0.22);
  color: #ff7a9e;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: -0.02em;
  white-space: nowrap;
  flex-shrink: 0;
}

.icon-btn.bell { position: relative; }

.reddot {
  position: absolute;
  top: 6px;
  right: 7px;
  width: 6.5px;
  height: 6.5px;
  border-radius: 50%;
  background: var(--accent);
  border: 1.5px solid #0a0a0a;
  animation: pulse 2.4s ease-in-out infinite;
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(140deg, #4b2a3a, #1b1013 70%);
  border: 1px solid var(--line-strong);
  font-size: 12px;
  font-weight: 800;
  color: #ffb3c8;
  flex-shrink: 0;
  letter-spacing: -0.02em;
}

@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(255, 0, 80, 0.55); }
  50% { opacity: 0.55; box-shadow: 0 0 0 5px rgba(255, 0, 80, 0); }
}

.icon-btn {
  width: 33px;
  height: 33px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: #d0d0d5;
  transition: background 0.18s ease, color 0.18s ease, transform 0.3s ease;
}
.icon-btn svg { width: 17px; height: 17px; }
.icon-btn:active { transform: scale(0.94); }
.icon-btn.spin svg { animation: spin 0.6s linear; }
@keyframes spin { to { transform: rotate(360deg); } }

.hdr-sub {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 9px;
  font-size: 11.5px;
  color: var(--muted-2);
  letter-spacing: -0.005em;
}

.sepdot {
  width: 2.5px;
  height: 2.5px;
  border-radius: 50%;
  background: var(--muted-2);
}

/* ---------- view / sections ---------- */

.view { padding: 6px var(--pad) 8px; }

.view > section {
  margin-bottom: 30px;
  animation: rise 0.42s cubic-bezier(0.22, 0.8, 0.3, 1) both;
}
.view > section:nth-child(2) { animation-delay: 0.045s; }
.view > section:nth-child(3) { animation-delay: 0.09s; }
.view > section:nth-child(4) { animation-delay: 0.135s; }
.view > section:nth-child(5) { animation-delay: 0.18s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(9px); }
  to { opacity: 1; transform: none; }
}

.loading {
  padding: 80px 0;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

.sec-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.sec-head h2 {
  margin: 0;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.2;
}

.sec-head .more {
  font-size: 12.5px;
  color: var(--muted);
  font-weight: 600;
  padding: 4px 0;
}
.sec-head .more:active { color: #fff; }

.sec-sub {
  margin: -6px 0 14px;
  font-size: 12.5px;
  color: var(--muted-2);
  letter-spacing: -0.005em;
}

/* ---------- hero card ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: 20px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
}

.hero::after {
  content: "";
  position: absolute;
  right: -46px;
  bottom: -76px;
  width: 210px;
  height: 210px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, rgba(255, 0, 80, 0.34), rgba(255, 0, 80, 0) 66%);
  pointer-events: none;
}

.hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.cap {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: -0.005em;
}

.badge-pink {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: #ff5c8d;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.badge-pink::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.hero-num {
  display: flex;
  align-items: baseline;
  gap: 4px;
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.08;
  font-variant-numeric: tabular-nums;
}
.hero-num .unit {
  font-size: 17px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: -0.02em;
}

.hero-delta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-size: 13px;
  flex-wrap: wrap;
}

.delta {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.up { color: var(--up); }
.down { color: var(--down); }
.flat { color: var(--flat); }

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 18px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
}

.hero-grid div {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.hero-grid s {
  text-decoration: none;
  font-size: 11px;
  color: var(--muted-2);
  font-weight: 600;
}
.hero-grid b {
  font-size: 14.5px;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hero-note {
  position: relative;
  z-index: 1;
  margin: 13px 0 0;
  font-size: 11px;
  line-height: 1.5;
  color: var(--muted-2);
}

/* ---------- list rows (VIBE Top 100 style) ---------- */

.list { display: flex; flex-direction: column; }

.row {
  display: grid;
  grid-template-columns: 22px 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}
.row:last-child { border-bottom: 0; }

.row .rank {
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  text-align: center;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.tile {
  width: 46px;
  height: 46px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}
.tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 74% 18%, rgba(255, 255, 255, 0.3), transparent 58%);
}
.tile > span { position: relative; z-index: 1; }

.g-magenta { background: linear-gradient(140deg, #ff2d6e, #a6003f); }
.g-blue    { background: linear-gradient(140deg, #3d78ff, #0a2a8a); }
.g-purple  { background: linear-gradient(140deg, #8b2bff, #45009e); }
.g-teal    { background: linear-gradient(140deg, #00c2a8, #04564f); }
.g-orange  { background: linear-gradient(140deg, #ff7a00, #a13a00); }
.g-green   { background: linear-gradient(140deg, #2fbf4e, #0a5b22); }
.g-sky     { background: linear-gradient(140deg, #38bdf8, #0b5c8a); }
.g-brown   { background: linear-gradient(140deg, #a9714b, #452515); }
.g-gray    { background: linear-gradient(140deg, #9ca3af, #383d44); }
.g-lime    { background: linear-gradient(140deg, #a3e635, #3f6212); }
.g-indigo  { background: linear-gradient(140deg, #6366f1, #2c2a80); }

.row-body { min-width: 0; }

.row-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.row-sub {
  margin-top: 2px;
  font-size: 11.5px;
  color: var(--muted);
  letter-spacing: -0.005em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-variant-numeric: tabular-nums;
}

.row-value {
  text-align: right;
  flex-shrink: 0;
}
.row-price {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.025em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.row-pct {
  margin-top: 2px;
  font-size: 11.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.row-value .unknown {
  font-size: 11px;
  color: var(--muted-2);
  font-weight: 600;
  white-space: nowrap;
}

.mini-tag {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 5px;
  background: var(--surface-3);
  color: #cfcfd4;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: -0.01em;
  flex-shrink: 0;
}
.mini-tag.hot { background: rgba(255, 0, 80, 0.16); color: #ff5c8d; }

/* ---------- segmented toggle (PICK | MY) ---------- */

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 0;
  padding: 3px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  flex-shrink: 0;
}

.toggle button {
  padding: 6px 13px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #6f6f76;
  transition: background 0.16s ease, color 0.16s ease;
}

.toggle button[aria-selected="true"] {
  background: #fff;
  color: #000;
}

/* ---------- horizontal pill carousel ---------- */

.pillrow {
  display: flex;
  gap: 9px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  margin: 0 calc(var(--pad) * -1);
  padding: 2px var(--pad) 6px;
  scrollbar-width: none;
}
.pillrow::-webkit-scrollbar { display: none; }

.sq {
  flex: 0 0 auto;
  width: 74px;
  height: 76px;
  border-radius: 20px;
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  scroll-snap-align: start;
}
.sq b {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.sq span {
  font-size: 10px;
  color: var(--muted);
  font-weight: 700;
  margin-top: 3px;
}

.pill-card {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 196px;
  height: 76px;
  padding: 0 18px 0 12px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  scroll-snap-align: start;
  text-align: left;
  transition: transform 0.18s ease, border-color 0.18s ease;
}
.pill-card:active { transform: scale(0.985); border-color: var(--line-strong); }

.pc-art {
  position: relative;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
  flex-shrink: 0;
}
.pc-art::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 70% 20%, rgba(255, 255, 255, 0.34), transparent 60%);
}
.pc-art > span { position: relative; z-index: 1; }

.pc-live {
  position: absolute;
  left: -4px;
  bottom: -3px;
  z-index: 2;
  padding: 2px 5px;
  border-radius: 5px;
  background: var(--accent);
  color: #fff;
  font-size: 7.5px;
  font-weight: 800;
  letter-spacing: 0.03em;
  line-height: 1.2;
  border: 1.5px solid #141414;
}
.pc-live.hold { background: #3a3a3e; color: #b9b9c0; }

.pc-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  flex: 1;
}
.pc-title {
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: -0.03em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pc-sub {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-variant-numeric: tabular-nums;
}

/* ---------- vertical point cards ---------- */

.vrow {
  display: flex;
  gap: 11px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  margin: 0 calc(var(--pad) * -1);
  padding: 2px var(--pad) 6px;
  scrollbar-width: none;
}
.vrow::-webkit-scrollbar { display: none; }

.vcard {
  flex: 0 0 auto;
  width: 62%;
  min-width: 196px;
  max-width: 232px;
  min-height: 286px;
  padding: 15px 14px 14px;
  border-radius: 13px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-snap-align: start;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.vcard::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
}
.vcard::after {
  content: "";
  position: absolute;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  right: -56px;
  top: -50px;
  border: 14px solid rgba(255, 255, 255, 0.07);
  z-index: -1;
}

.vcard.sage::before { background: linear-gradient(165deg, #9bab92 0%, #7d9078 46%, #566a55 100%); }
.vcard.teal::before { background: linear-gradient(165deg, #3f6b66 0%, #27514e 48%, #133130 100%); }
.vcard.plum::before { background: linear-gradient(165deg, #5b4a63 0%, #3b2f43 48%, #1d1723 100%); }

.vc-kicker {
  font-size: 15.5px;
  font-weight: 800;
  letter-spacing: -0.035em;
  color: #fff;
}

.vc-art {
  position: relative;
  aspect-ratio: 1;
  width: 100%;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.16);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
}
.vc-art::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 22%, rgba(255, 255, 255, 0.22), transparent 55%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.06) 0 1px, transparent 1px 26px);
}
.vc-num {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 2px;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.vc-num small {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: -0.02em;
  opacity: 0.8;
}
.vc-stamp {
  position: relative;
  margin-top: 7px;
  padding: 3px 8px;
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.26);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.vc-stamp.down { color: #9dc0ff; }
.vc-stamp.brand { color: #ffb3c8; }

.vc-foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.vc-foot b {
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
}
.vc-foot span {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.74);
  letter-spacing: -0.01em;
}

/* ---------- pink banner ---------- */

.banner {
  position: relative;
  display: block;
  overflow: hidden;
  min-height: 118px;
  padding: 18px 17px;
  border-radius: 13px;
  background:
    radial-gradient(circle at 88% 18%, rgba(255, 255, 255, 0.22), transparent 58%),
    linear-gradient(112deg, #ff8ac0 0%, #ff3d86 46%, #ff0050 100%);
  color: #fff;
  isolation: isolate;
}
.banner::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.5;
  background-image: radial-gradient(rgba(255, 255, 255, 0.5) 0.6px, transparent 0.6px);
  background-size: 3.5px 3.5px;
  mask-image: linear-gradient(100deg, transparent 22%, #000 62%);
  -webkit-mask-image: linear-gradient(100deg, transparent 22%, #000 62%);
}

.bn-kicker {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.01em;
  opacity: 0.92;
  margin-bottom: 8px;
}
.bn-title {
  display: block;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.2;
  text-shadow: 0 1px 10px rgba(150, 0, 45, 0.18);
}
.bn-line {
  display: block;
  margin-top: 7px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: -0.015em;
  opacity: 0.95;
}
.bn-ghost {
  position: absolute;
  right: -6px;
  bottom: -6px;
  font-size: 44px;
  font-weight: 800;
  font-style: italic;
  letter-spacing: -0.05em;
  color: rgba(255, 255, 255, 0.26);
  transform: rotate(-4deg);
  pointer-events: none;
}

/* ---------- events ---------- */

.events {
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 4px 14px;
}

.ev {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.ev:last-child { border-bottom: 0; }

.ev-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 5px 0;
  border-radius: var(--r-xs);
  background: var(--surface-2);
}
.ev-date b {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.ev-date span {
  font-size: 9.5px;
  color: var(--muted);
  font-weight: 700;
}

.ev-body { min-width: 0; }
.ev-title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.025em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ev-time {
  margin-top: 2px;
  font-size: 11.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.pill {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 7px;
  background: var(--surface-3);
  color: #d2d2d7;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: -0.01em;
  white-space: nowrap;
  flex-shrink: 0;
}
.pill.pink { background: var(--accent-soft); color: #ff5c8d; }

/* ---------- chips ---------- */

.chips {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 2px 0 14px;
  margin: 0 calc(var(--pad) * -1);
  padding-left: var(--pad);
  padding-right: var(--pad);
  scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }

.chip {
  flex: 0 0 auto;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid transparent;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: -0.015em;
  transition: background 0.16s ease, color 0.16s ease;
}
.chip[aria-selected="true"] {
  background: #fff;
  color: #000;
  font-weight: 800;
}

/* ---------- gradient cards (VIBE 장르와 테마) ---------- */

.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 11px;
}

.gcard {
  position: relative;
  overflow: hidden;
  min-height: 140px;
  padding: 15px 14px 14px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  color: #fff;
  isolation: isolate;
}
.gcard::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.9;
}
.gcard::after {
  content: "";
  position: absolute;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  right: -40px;
  bottom: -52px;
  border: 16px solid rgba(255, 255, 255, 0.13);
  z-index: -1;
}

.gcard .kicker {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.02em;
  opacity: 0.72;
}
.gcard h3 {
  margin: 2px 0 0;
  font-size: 18.5px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.2;
}
.gcard p {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.48;
  color: rgba(255, 255, 255, 0.88);
  letter-spacing: -0.01em;
  word-break: keep-all;
}

.gcard.g-purple::before { background: linear-gradient(150deg, #8b2bff 0%, #5b10c9 52%, #2f0575 100%); }
.gcard.g-teal::before   { background: linear-gradient(150deg, #16d0b4 0%, #06a08c 54%, #045a52 100%); }
.gcard.g-green::before  { background: linear-gradient(150deg, #46d15f 0%, #1aa63c 55%, #0a5b22 100%); }
.gcard.g-orange::before { background: linear-gradient(150deg, #ff8a2b 0%, #ff3d3d 48%, #b8003c 100%); }
.gcard.g-magenta::before{ background: linear-gradient(150deg, #ff2d6e 0%, #d1004a 55%, #6d0026 100%); }
.gcard.g-sky::before    { background: linear-gradient(150deg, #4fc3f7 0%, #2b7fdc 52%, #123a86 100%); }
.gcard.g-indigo::before { background: linear-gradient(150deg, #7b7cff 0%, #4b45d6 52%, #221c72 100%); }

/* ---------- strategy rows ---------- */

.srow {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: start;
  gap: 11px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.srow:last-child { border-bottom: 0; }

.srow .num {
  width: 27px;
  height: 27px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: #ff5c8d;
  font-size: 12px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.srow h4 {
  margin: 0 0 3px;
  font-size: 14.5px;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.srow p {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
  letter-spacing: -0.005em;
  word-break: keep-all;
}

/* ---------- plan levels ---------- */

.plan {
  position: relative;
  padding: 4px 0 4px 20px;
}
.plan::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 12px;
  bottom: 14px;
  width: 1px;
  background: linear-gradient(to bottom, rgba(255, 0, 80, 0.5), var(--line));
}
.plan-item {
  position: relative;
  padding: 0 0 16px;
}
.plan-item:last-child { padding-bottom: 0; }
.plan-item::before {
  content: "";
  position: absolute;
  left: -19px;
  top: 6px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 0, 80, 0.14);
}
.plan-top {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 3px;
}
.plan-top b {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.plan-top .when {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.plan-item p {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
  word-break: keep-all;
}

/* ---------- roadmap card ---------- */

.rmap {
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: linear-gradient(165deg, #1a1a1d 0%, #101012 100%);
  padding: 18px;
}

.rmap-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}
.rmap-top h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.035em;
}

.rmap-targets {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 16px;
}
.rmap-targets .pill { height: 24px; font-size: 11px; }
.rmap-targets .pill:first-child { background: var(--accent-soft); color: #ff5c8d; }

.step {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 10px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
}
.step .sn {
  font-size: 12px;
  font-weight: 800;
  color: var(--accent);
  padding-top: 1px;
}
.step b {
  display: block;
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 2px;
}
.step p {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--muted);
  word-break: keep-all;
}

.rmap-foot {
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  line-height: 1.55;
  color: var(--muted-2);
  word-break: keep-all;
}
.rmap-foot b {
  display: block;
  margin-bottom: 5px;
  color: #cfcfd4;
  font-size: 11px;
  font-weight: 800;
}
.rmap-foot .pill { margin: 0 5px 5px 0; }

/* ---------- log timeline ---------- */

.logitem {
  position: relative;
  padding: 0 0 22px 18px;
  border-left: 1px solid var(--line);
  margin-left: 3px;
}
.logitem:last-child { padding-bottom: 4px; border-left-color: transparent; }
.logitem::before {
  content: "";
  position: absolute;
  left: -4px;
  top: 5px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 0, 80, 0.13);
}

.log-head {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.log-date {
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.log-time { font-size: 11px; color: var(--muted-2); font-weight: 600; }

.log-title {
  margin: 0 0 7px;
  font-size: 15.5px;
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.3;
}

.logitem ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.logitem li {
  position: relative;
  padding-left: 11px;
  font-size: 12.5px;
  line-height: 1.5;
  color: #c3c3c9;
  letter-spacing: -0.005em;
  word-break: keep-all;
}
.logitem li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--muted-2);
}

.log-next {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 11.5px;
  line-height: 1.5;
  color: #cfcfd4;
  word-break: keep-all;
}
.log-next b {
  color: #ff5c8d;
  font-weight: 800;
  margin-right: 5px;
}

/* ---------- settings-style rows ---------- */

.profile-card {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 16px;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--line);
  margin-bottom: 22px;
}
.profile-art {
  width: 50px;
  height: 50px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: linear-gradient(140deg, #ff2d6e, #7b00a8);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.04em;
  flex-shrink: 0;
}
.profile-body { min-width: 0; }
.profile-name {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.3;
  word-break: keep-all;
}
.profile-sub {
  margin-top: 3px;
  font-size: 11.5px;
  color: var(--muted);
}

.group {
  margin-bottom: 26px;
}
.group > h3 {
  margin: 0 0 6px;
  padding-left: 2px;
  font-size: 11.5px;
  font-weight: 800;
  color: var(--muted-2);
  letter-spacing: -0.005em;
}

.slist {
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--line);
  overflow: hidden;
}

.srow-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 15px;
  border-bottom: 1px solid var(--line);
}
.srow-item:last-child { border-bottom: 0; }

.srow-item .lbl {
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: -0.025em;
  min-width: 0;
  word-break: keep-all;
}
.srow-item .lbl small {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted-2);
  line-height: 1.45;
  letter-spacing: -0.005em;
  word-break: keep-all;
}

.srow-item .val {
  font-size: 13px;
  font-weight: 700;
  color: #e6e6ea;
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
  letter-spacing: -0.02em;
}
.srow-item .val.pink { color: #ff5c8d; }
.srow-item .val.up { color: var(--up); }
.srow-item .val.down { color: var(--down); }
.srow-item .val.dim { color: var(--muted); font-weight: 600; }

.note {
  margin: 18px 2px 0;
  font-size: 11px;
  line-height: 1.65;
  color: var(--muted-2);
  word-break: keep-all;
}
.note li { margin-bottom: 4px; }
.note ul { margin: 0; padding-left: 14px; }

/* ---------- dock: mini player + tab bar ---------- */

.dock {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  z-index: 40;
  width: 100%;
  max-width: 520px;
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, rgba(0, 0, 0, 0.98) 58%, rgba(0, 0, 0, 0));
  pointer-events: none;
}
.dock > * { pointer-events: auto; }

.mini {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  height: var(--mini-h);
  padding: 0 12px 0 9px;
  border-radius: 13px;
  background: rgba(28, 28, 30, 0.94);
  border: 1px solid var(--line-strong);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55);
  margin-bottom: 8px;
  text-align: left;
  transition: transform 0.18s ease;
}
.mini:active { transform: scale(0.99); }

.mini-art {
  width: 40px;
  height: 40px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: linear-gradient(140deg, #ff2d6e, #7b00a8 90%);
  font-size: 17px;
  font-weight: 800;
  flex-shrink: 0;
}

.mini-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}
.mini-title {
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: -0.03em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mini-sub {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-meter {
  width: 34px;
  height: 18px;
  flex-shrink: 0;
  display: flex;
  align-items: flex-end;
  gap: 2.5px;
}
.mini-meter i,
.mini-meter::before,
.mini-meter::after {
  content: "";
  display: block;
  width: 3px;
  border-radius: 2px;
  background: var(--accent);
  opacity: 0.85;
}
.mini-meter::before { height: 7px; }
.mini-meter i { height: 14px; animation: meter 1.6s ease-in-out infinite; }
.mini-meter::after { height: 10px; animation: meter 1.6s ease-in-out 0.35s infinite; }

@keyframes meter {
  0%, 100% { transform: scaleY(0.55); }
  50% { transform: scaleY(1); }
}

.tabbar {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: rgba(10, 10, 10, 0.92);
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 7px 2px 6px;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 3px 0 0;
  color: #6f6f76;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: -0.02em;
  position: relative;
  transition: color 0.16s ease;
  min-width: 0;
}
.tab svg { width: 22px; height: 22px; }
.tab span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.tab::after {
  content: "";
  position: absolute;
  top: -7px;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: transparent;
  transition: background 0.18s ease;
}
.tab[aria-current="page"] { color: var(--accent); }
.tab[aria-current="page"]::after { background: var(--accent); }

/* ---------- error ---------- */

.error {
  margin: 40px 0;
  padding: 18px;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 12.5px;
  line-height: 1.6;
  color: #d8d8dd;
  word-break: keep-all;
}
.error b { color: #ff5c8d; }

/* ---------- responsive tuning ---------- */

@media (max-width: 360px) {
  :root { --pad: 16px; }
  .hero-num { font-size: 31px; }
  .brand-word { font-size: 17px; }
  .row { grid-template-columns: 18px 42px minmax(0, 1fr) auto; gap: 9px; }
  .tile { width: 42px; height: 42px; font-size: 10.5px; }
  .row-price { font-size: 13px; }
  .gcard { min-height: 132px; padding: 13px 12px; }
  .gcard h3 { font-size: 17px; }
  .gcard p { font-size: 11px; }
  .tab { font-size: 9.5px; }
  .tab svg { width: 20px; height: 20px; }
}

@media (min-width: 420px) {
  .gcard { min-height: 150px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
