/* Bol · testonly v2 · modern, low-text mobile UI */
:root, html[data-theme="light"] {
  --bg: #faf6f0;
  --surface: #ffffff;
  --surface-2: #f2ece2;
  --ink: #1c1f24;
  --ink-2: #4a4f57;
  --muted: #7b808a;
  --line: rgba(28, 31, 36, 0.09);
  --accent: #db5b3c;
  --accent-ink: #ffffff;
  --accent-soft: rgba(219, 91, 60, 0.12);
  --green: #2f8f6b;
  --green-soft: rgba(47, 143, 107, 0.12);
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 6px 20px rgba(0,0,0,.06);
  --r: 16px;
  --r-sm: 10px;
  --shell-w: 100%;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Gurmukhi", "Raavi", sans-serif;
  --serif: Georgia, "Times New Roman", serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1216;
    --surface: #191d23;
    --surface-2: #232830;
    --ink: #eef0f3;
    --ink-2: #c3c8d0;
    --muted: #8a919c;
    --line: rgba(255, 255, 255, 0.08);
    --accent: #ff7a59;
    --accent-ink: #1a0d08;
    --accent-soft: rgba(255, 122, 89, 0.14);
    --green: #5fd3a5;
    --green-soft: rgba(95, 211, 165, 0.12);
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.35);
  }
}
html[data-theme="dark"] {
  --bg: #0f1216;
  --surface: #191d23;
  --surface-2: #232830;
  --ink: #eef0f3;
  --ink-2: #c3c8d0;
  --muted: #8a919c;
  --line: rgba(255, 255, 255, 0.08);
  --accent: #ff7a59;
  --accent-ink: #1a0d08;
  --accent-soft: rgba(255, 122, 89, 0.14);
  --green: #5fd3a5;
  --green-soft: rgba(95, 211, 165, 0.12);
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.35);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: hidden; }
body {
  margin: 0;
  max-width: 100%;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: var(--accent); }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 8px; top: 8px; z-index: 99; background: var(--surface); padding: 8px 12px; border-radius: 8px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Shell ---------- */
.phone-shell {
  width: 100%;
  max-width: var(--shell-w);
  margin: 0 auto;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}
.app-main {
  flex: 1;
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior-y: contain;
  scrollbar-width: thin;
  padding: 0 16px 18px;
}
.app-view { min-width: 0; animation: fadeUp .18s ease-out; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

@media (min-width: 601px) {
  body.frame-phone {
    --shell-w: 430px;
    background: var(--surface-2);
    height: 100vh;
    height: 100dvh;
    padding: 12px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
  }
  body.frame-phone .phone-shell {
    height: calc(100vh - 24px);
    height: calc(100dvh - 24px);
    border-radius: 26px;
    box-shadow: var(--shadow), 0 0 0 1px var(--line);
    overflow: hidden;
  }
  body.frame-full { --shell-w: 760px; }
}
.frame-toggle {
  display: none;
  position: fixed; right: 16px; bottom: 16px; z-index: 50;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
  padding: 8px 12px; border-radius: 999px; font-size: 12px; font-weight: 600; color: var(--ink-2);
}
@media (min-width: 601px) { .frame-toggle { display: block; } }

/* ---------- Top bar ---------- */
.top-bar {
  flex: 0 0 auto;
  z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px;
  padding-top: max(10px, env(safe-area-inset-top));
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand-btn { display: flex; align-items: center; gap: 8px; }
.record-icon {
  width: 24px; height: 24px; border-radius: 50%;
  background: radial-gradient(circle, var(--bg) 0 3px, var(--ink) 3.5px 6px, var(--accent) 6.5px);
}
.brand-text { font-size: 16px; letter-spacing: .04em; }
.brand-text span { color: var(--muted); font-weight: 500; }
.top-nav { display: none; align-items: center; gap: 4px; background: var(--surface-2); padding: 4px; border-radius: 999px; }
.tnav-item {
  padding: 6px 16px; border-radius: 999px; font-size: 13.5px; font-weight: 700; color: var(--muted);
  transition: background .15s, color .15s;
}
.tnav-item.active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.top-actions { display: flex; align-items: center; gap: 8px; }
.mode-switch-pill {
  padding: 6px 11px; border-radius: 999px; background: var(--surface); box-shadow: var(--shadow);
  font-size: 12px; font-weight: 700; color: var(--ink-2); text-decoration: none; white-space: nowrap;
}
.mode-switch-pill:hover { color: var(--accent); }
.icon-btn {
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; font-size: 17px;
  background: var(--surface); box-shadow: var(--shadow);
  transition: transform .15s;
}
.icon-btn:active { transform: scale(.92); }

/* ---------- Bottom nav ---------- */
.bottom-nav {
  flex: 0 0 auto;
  z-index: 20;
  display: grid; grid-template-columns: repeat(4, 1fr);
  padding: 4px 8px;
  padding-bottom: max(4px, env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
}
.bnav-item {
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  padding: 5px 0; border-radius: 12px;
  font-size: 11px; font-weight: 600; color: var(--muted);
}
.bnav-icon { font-size: 18px; line-height: 1.1; }
.bnav-item.active { color: var(--accent); }
.bnav-item.active .bnav-icon { transform: translateY(-1px); }

/* ---------- Common ---------- */
.accent-text { color: var(--accent); }
.muted-small { font-size: 12px; color: var(--muted); }
.block { margin-top: 13px; }
.block-head { display: flex; align-items: baseline; justify-content: space-between; }
.block-title { font-size: 15.5px; font-weight: 750; letter-spacing: -.01em; margin-bottom: 6px; }
.text-btn { color: var(--accent); font-weight: 650; font-size: 13.5px; }
.h-row {
  display: flex; gap: 10px; overflow-x: auto;
  scroll-snap-type: x mandatory;
  margin: 0 -16px; padding: 2px 16px 4px;
  scrollbar-width: none;
}
.h-row::-webkit-scrollbar { display: none; }
.h-row > * { scroll-snap-align: start; flex: 0 0 auto; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 12px 18px; border-radius: 999px; font-weight: 650; font-size: 15px;
  text-decoration: none; transition: transform .12s;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-ghost { background: var(--surface-2); color: var(--ink); }
.btn-block { width: 100%; }
.btn-row { display: flex; gap: 8px; }
.btn-row .btn { flex: 1; }

.search-pill {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border-radius: 999px;
  padding: 0 14px; height: 42px;
  box-shadow: var(--shadow);
  color: var(--muted); font-size: 17px;
  flex: 1;
}
.search-pill input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: transparent;
  font: 16px var(--font); color: var(--ink);
}
.search-pill input::-webkit-search-cancel-button { display: none; }
.clear-btn { color: var(--muted); font-size: 14px; padding: 6px; }

.chip-row {
  display: flex; gap: 8px; overflow-x: auto;
  margin: 0 -16px; padding: 2px 16px;
  scrollbar-width: none;
}
.chip-row::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line);
  font-size: 13.5px; font-weight: 600; color: var(--ink-2);
  white-space: nowrap;
}
.chip.active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--accent)); }

/* ---------- Home ---------- */
.hero { padding: 8px 0 0; }
.hero h1 { font-size: 25px; line-height: 1.08; font-weight: 800; letter-spacing: -.02em; }
.hero-sub { color: var(--muted); font-size: 12.5px; margin: 2px 0 9px; font-weight: 500; }

.tip-card {
  margin-top: 8px; display: flex; gap: 8px; align-items: center;
  background: var(--accent-soft); border-radius: var(--r-sm); padding: 7px 11px;
  font-size: 12.5px; line-height: 1.3; color: var(--ink);
}
.tip-card .tip-ico { font-size: 16px; }
.tip-card p { flex: 1; }
.tip-card button { color: var(--muted); font-size: 14px; padding: 2px 4px; }

.mood-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.mood-tile {
  min-width: 0;
  min-height: 52px;
  border-radius: 12px;
  background: linear-gradient(150deg, var(--c) 0%, color-mix(in srgb, var(--c) 72%, #1c1f24) 100%);
  color: #1a1a1a;
  display: flex; align-items: center; gap: 9px;
  padding: 7px 10px; text-align: left;
  transition: transform .15s;
}
.mood-tile:active { transform: scale(.96); }
.mood-emoji { font-size: 20px; flex: 0 0 auto; }
.mood-label { display: block; font-weight: 750; font-size: 13px; line-height: 1.15; color: #111; }
.mood-count { display: block; font-size: 11px; font-weight: 600; opacity: .72; color: #111; margin-top: 1px; }

/* Song thumb card (rows + grid) */
.song-card { display: block; width: 126px; min-width: 0; text-align: left; }
.song-card .thumb {
  display: block;
  position: relative; aspect-ratio: 16 / 10; border-radius: 10px; overflow: hidden;
  background: linear-gradient(140deg, var(--c, var(--accent)), color-mix(in srgb, var(--c, var(--accent)) 50%, #1c1f24));
  box-shadow: var(--shadow);
}
.song-card .thumb img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.02); }
.song-card .thumb .ph {
  position: absolute; inset: 0; display: grid; place-items: center;
  font: 800 28px var(--font); color: rgba(0,0,0,.45);
}
.song-card .play-dot {
  position: absolute; right: 6px; bottom: 6px; width: 24px; height: 24px; border-radius: 50%;
  background: rgba(0,0,0,.55); color: #fff; display: grid; place-items: center; font-size: 10px;
}
.song-card .badge {
  position: absolute; left: 6px; top: 6px; padding: 2px 6px; border-radius: 999px;
  background: var(--accent); color: #fff; font-size: 9.5px; font-weight: 800; letter-spacing: .04em;
}
.song-card .t { display: block; margin-top: 5px; font-weight: 700; font-size: 13px; line-height: 1.2;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.song-card .a { display: block; font-size: 11.5px; color: var(--muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.song-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 12px; }
.song-grid .song-card { width: 100%; }
body.frame-full .song-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* Pattern story cards */
.story-card {
  width: 196px; min-height: 92px; border-radius: 12px; padding: 10px 12px;
  text-align: left; display: flex; flex-direction: column; justify-content: space-between; gap: 6px;
  background: var(--surface); box-shadow: var(--shadow);
  border-top: 3px solid var(--c, var(--accent));
}
.story-card .n { font-size: 10.5px; font-weight: 800; color: var(--c, var(--accent)); letter-spacing: .06em; }
.story-card .s { font-size: 14px; font-weight: 750; line-height: 1.22; }
.story-card .go { font-size: 11.5px; font-weight: 650; color: var(--muted); }

/* ---------- Explore ---------- */
.explore-bar {
  position: sticky; top: 0; z-index: 10;
  background: var(--bg); margin: 0 -16px; padding: 8px 16px 10px;
  display: flex; flex-direction: column; gap: 10px;
}
.explore-search-row { display: flex; gap: 8px; }
.filter-btn {
  position: relative; width: 48px; height: 48px; border-radius: 50%;
  background: var(--surface); box-shadow: var(--shadow); font-size: 19px; color: var(--ink-2);
}
.filter-count {
  position: absolute; top: -2px; right: -2px; min-width: 18px; height: 18px; border-radius: 9px;
  background: var(--accent); color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center;
}
.explore-status { display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-size: 13px; color: var(--muted); font-weight: 600; min-height: 20px; }
.active-filter {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 12.5px;
  max-width: 70%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.year-head { font-size: 15px; font-weight: 800; margin: 18px 0 10px; color: var(--ink-2); }
.year-head:first-child { margin-top: 4px; }

.empty {
  text-align: center; padding: 40px 12px; display: flex; flex-direction: column; gap: 12px; align-items: center;
}
.empty .big { font-size: 40px; }
.empty h3 { font-size: 18px; }
.empty p { color: var(--muted); font-size: 14px; }

/* Stance rows */
.stance-row { background: var(--surface); border-radius: var(--r-sm); padding: 12px; margin-bottom: 8px; box-shadow: var(--shadow); }
.stance-row .top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.stance-row .name { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; }
.stance-row .cnt { font-size: 12px; color: var(--muted); font-weight: 600; }
.stance-bar { display: flex; gap: 6px; flex-wrap: wrap; }
.stance-bar button { padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.st-A { background: rgba(219,91,60,.14); color: var(--accent); }
.st-N { background: var(--surface-2); color: var(--ink-2); }
.st-C { background: var(--green-soft); color: var(--green); }

/* ---------- Bottom sheet ---------- */
.sheet-backdrop { position: absolute; inset: 0; z-index: 40; background: rgba(0,0,0,.4); animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.bottom-sheet {
  position: absolute; z-index: 41; bottom: 0; left: 0; right: 0;
  max-height: 82%; overflow-y: auto;
  background: var(--surface); border-radius: 22px 22px 0 0;
  padding: 0 18px max(18px, env(safe-area-inset-bottom));
  animation: slideUp .2s ease-out;
}
@keyframes slideUp { from { transform: translateY(30px); opacity: 0; } }
.sheet-handle { display: flex; justify-content: center; padding: 10px 0 6px; cursor: pointer; }
.sheet-handle span { width: 40px; height: 5px; border-radius: 3px; background: var(--line); background: var(--muted); opacity: .4; }
.sheet-content h3 { font-size: 18px; font-weight: 800; margin: 4px 0 14px; }
.f-group { margin-bottom: 18px; }
.f-label { font-size: 12px; font-weight: 800; letter-spacing: .06em; color: var(--muted); margin-bottom: 8px; text-transform: uppercase; }
.f-opts { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Song page ---------- */
.watch-top { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 12px; }
.round-btn {
  width: 40px; height: 40px; border-radius: 50%; background: var(--surface); box-shadow: var(--shadow);
  display: grid; place-items: center; font-size: 17px;
}
.round-btn:disabled { opacity: .35; }
.round-btn.on { color: var(--accent); }
.watch-top .grp { display: flex; gap: 8px; }

.video-wrap {
  position: relative; aspect-ratio: 16 / 9; border-radius: var(--r); overflow: hidden;
  background: #000; box-shadow: var(--shadow); margin: 0 -4px;
}
.video-wrap iframe, .video-wrap .poster { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-wrap .poster { object-fit: cover; }
.video-play {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: linear-gradient(transparent 40%, rgba(0,0,0,.5));
}
.video-play span {
  width: 64px; height: 64px; border-radius: 50%; background: rgba(255,255,255,.92); color: #111;
  display: grid; place-items: center; font-size: 22px; padding-left: 4px; box-shadow: 0 6px 20px rgba(0,0,0,.35);
}
.video-none {
  aspect-ratio: 16 / 9; border-radius: var(--r); display: grid; place-items: center; text-align: center;
  background: linear-gradient(140deg, var(--c), color-mix(in srgb, var(--c) 50%, #1c1f24));
  color: rgba(0,0,0,.6); font-weight: 700; padding: 16px;
}

.song-head { margin: 16px 0 14px; }
.song-head h1 { font-size: 26px; font-weight: 800; line-height: 1.1; letter-spacing: -.01em; }
.song-head .sub { color: var(--muted); font-size: 14.5px; margin-top: 4px; font-weight: 500; }
.song-head .sub .fam { color: var(--c); font-weight: 700; }

.seg-tabs {
  position: sticky; top: 0; z-index: 10;
  display: flex; gap: 4px; padding: 4px; border-radius: 999px;
  background: var(--surface-2); margin-bottom: 16px;
}
.seg-tab {
  flex: 1; padding: 9px 4px; border-radius: 999px; font-size: 13.5px; font-weight: 700; color: var(--muted);
  transition: background .15s, color .15s;
}
.seg-tab.active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.tab-panel { animation: fadeUp .16s ease-out; }

/* Vibe */
.vibe-quote {
  font: 600 22px/1.3 var(--serif); letter-spacing: -.005em; margin-bottom: 16px;
}
.vibe-quote::before { content: "“"; color: var(--accent); }
.vibe-quote::after { content: "”"; color: var(--accent); }
.callout {
  border-radius: var(--r); padding: 14px 16px; margin-bottom: 12px; font-size: 15px;
}
.callout .lbl { display: block; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 4px; }
.callout.catch { background: var(--accent-soft); }
.callout.catch .lbl { color: var(--accent); }
.callout.think { background: var(--green-soft); }
.callout.think .lbl { color: var(--green); }
.more-btn { color: var(--accent); font-weight: 700; font-size: 14px; padding: 4px 0; }
.more-text { color: var(--ink-2); font-size: 15px; margin-top: 8px; }

/* Lyrics */
.script-seg { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.stanza { margin-bottom: 22px; }
.stanza-title { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.lyric { margin: 0 0 10px; white-space: pre-wrap; font-family: var(--font); }
.lyric.gurmukhi { font-size: 19px; line-height: 1.6; color: var(--ink); }
.lyric.romanized { font-size: 15.5px; line-height: 1.55; color: var(--ink); font-weight: 500; }
.lyric.english { font-size: 14.5px; line-height: 1.55; color: var(--muted); font-style: italic; }
.source-line { font-size: 12.5px; color: var(--muted); }

/* Context swipe cards */
.ctx-row { margin: 0 -16px; padding: 2px 16px 10px; }
.ctx-card {
  width: 84%; max-width: 340px; border-radius: var(--r); padding: 16px;
  background: var(--surface); box-shadow: var(--shadow); text-align: left;
  display: flex; flex-direction: column; gap: 8px; align-self: flex-start;
}
.ctx-card .n { font-size: 12px; font-weight: 800; color: var(--accent); }
.ctx-card strong { font-size: 16px; line-height: 1.3; }
.ctx-card p { font-size: 14.5px; color: var(--ink-2); display: none; }
.ctx-card .hint { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.ctx-card.open p { display: block; }
.ctx-card.open .hint { display: none; }
.swipe-hint { font-size: 12.5px; color: var(--muted); margin-bottom: 10px; }

/* Accordions (Deep Dive, About) */
.acc {
  background: var(--surface); border-radius: var(--r); margin-bottom: 10px; box-shadow: var(--shadow); overflow: hidden;
}
.acc summary {
  list-style: none; cursor: pointer; padding: 15px 16px; display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 15px;
}
.acc summary::-webkit-details-marker { display: none; }
.acc summary .ico { font-size: 18px; }
.acc summary .ttl { flex: 1; }
.acc summary::after { content: "+"; font-size: 20px; color: var(--muted); transition: transform .2s; }
.acc[open] summary::after { transform: rotate(45deg); }
.acc-body { padding: 0 16px 16px; font-size: 14.5px; color: var(--ink-2); display: flex; flex-direction: column; gap: 10px; }
.acc-body .item { background: var(--surface-2); border-radius: var(--r-sm); padding: 12px; }
.acc-body .item strong { display: block; color: var(--ink); font-size: 14px; margin-bottom: 4px; }
.acc-body .sub { font-size: 13px; color: var(--muted); }
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; }

/* Related */
.related { margin-top: 26px; }

/* ---------- Library ---------- */
.page-head { padding: 16px 0 14px; }
.page-head h1 { font-size: 28px; font-weight: 800; letter-spacing: -.01em; }
.page-head p { color: var(--muted); font-size: 14px; margin-top: 4px; }

/* ---------- About ---------- */
.guide-body { display: flex; flex-direction: column; }
.acc-body .flip { background: var(--green-soft); border-radius: var(--r-sm); padding: 12px; color: var(--ink); }
.acc-body .flip b { color: var(--green); }
.about-foot { margin-top: 24px; display: flex; flex-direction: column; gap: 8px; align-items: center; text-align: center; font-size: 13px; color: var(--muted); }

/* ---------- Modal ---------- */
.proto-modal {
  width: min(94vw, 420px); max-height: 88vh; border: 0; border-radius: 22px; padding: 0;
  background: var(--surface); color: var(--ink); box-shadow: 0 20px 60px rgba(0,0,0,.35);
}
.proto-modal::backdrop { background: rgba(0,0,0,.5); backdrop-filter: blur(3px); }
.proto-modal[open] { animation: pop .18s ease-out; }
@keyframes pop { from { transform: scale(.96); opacity: 0; } }
.modal-close {
  position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; border-radius: 50%;
  background: var(--surface-2); font-size: 14px; z-index: 2;
}
.modal-body { padding: 22px 18px 18px; overflow-y: auto; max-height: 88vh; display: flex; flex-direction: column; gap: 12px; }
.modal-body h2 { font-size: 22px; font-weight: 800; line-height: 1.2; padding-right: 36px; }
.modal-body .kicker { font-size: 12px; font-weight: 800; letter-spacing: .06em; color: var(--accent); text-transform: uppercase; }
.modal-body p { font-size: 15px; color: var(--ink-2); }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 700; }
.field input {
  padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2);
  font: 16px var(--font); color: var(--ink);
}
.ok-msg { color: var(--green); font-weight: 700; font-size: 14px; }
.modal-list { display: flex; flex-direction: column; gap: 8px; max-height: 50vh; overflow-y: auto; }
.mini-row { display: flex; gap: 10px; align-items: center; text-align: left; padding: 6px; border-radius: 12px; }
.mini-row:active { background: var(--surface-2); }
.mini-row .thumb { width: 72px; flex: 0 0 72px; aspect-ratio: 16/10; border-radius: 8px; overflow: hidden;
  background: linear-gradient(140deg, var(--c, var(--accent)), color-mix(in srgb, var(--c, var(--accent)) 50%, #1c1f24)); }
.mini-row .thumb img { width: 100%; height: 100%; object-fit: cover; }
.mini-row .t { font-weight: 700; font-size: 14px; display: block; }
.mini-row .a { font-size: 12.5px; color: var(--muted); display: block; }

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

/* ---------- Responsive Desktop View (>= 768px, unless Phone Preview is active) ---------- */
@media (min-width: 768px) {
  body:not(.frame-phone) {
    --shell-w: 1120px;
    height: auto;
    min-height: 100dvh;
    overflow-y: auto;
  }
  body:not(.frame-phone) .phone-shell {
    height: auto;
    min-height: 100dvh;
    overflow: visible;
  }
  body:not(.frame-phone) .top-bar {
    position: sticky;
    top: 0;
    padding: 14px 28px;
  }
  body:not(.frame-phone) .top-nav {
    display: flex;
  }
  body:not(.frame-phone) .bottom-nav {
    display: none;
  }
  body:not(.frame-phone) .app-main {
    overflow: visible;
    padding: 8px 28px 48px;
  }
  body:not(.frame-phone) .hero {
    padding: 18px 0 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
  }
  body:not(.frame-phone) .hero h1 {
    font-size: 34px;
  }
  body:not(.frame-phone) .hero-sub {
    margin: 4px 0 0;
    font-size: 14px;
  }
  body:not(.frame-phone) .hero .search-pill {
    flex: 0 1 420px;
    height: 46px;
  }
  body:not(.frame-phone) .block {
    margin-top: 24px;
  }
  body:not(.frame-phone) .block-title {
    font-size: 18px;
    margin-bottom: 10px;
  }
  body:not(.frame-phone) .mood-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
  }
  body:not(.frame-phone) .mood-tile {
    min-height: 72px;
    padding: 12px 16px;
  }
  body:not(.frame-phone) .mood-emoji { font-size: 26px; }
  body:not(.frame-phone) .mood-label { font-size: 15px; }
  body:not(.frame-phone) .mood-count { font-size: 12.5px; }
  body:not(.frame-phone) .h-row {
    margin: 0;
    padding: 2px 0 8px;
    gap: 14px;
  }
  body:not(.frame-phone) .song-card {
    width: 184px;
  }
  body:not(.frame-phone) #home-patterns {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    overflow: visible;
  }
  body:not(.frame-phone) .story-card {
    width: 100%;
    min-height: 124px;
    padding: 14px 16px;
  }
  body:not(.frame-phone) .song-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px 16px;
  }
  body:not(.frame-phone) .explore-bar {
    top: 65px;
    margin: 0;
    padding: 10px 0 12px;
  }
  body:not(.frame-phone) .chip-row {
    margin: 0;
    padding: 2px 0;
  }
  body:not(.frame-phone) .watch-layout {
    display: grid;
    grid-template-columns: minmax(340px, 45%) minmax(0, 1fr);
    gap: 28px;
    align-items: start;
  }
  body:not(.frame-phone) .watch-left {
    position: sticky;
    top: 80px;
  }
  body:not(.frame-phone) .watch-right .seg-tabs {
    top: 65px;
  }
  body:not(.frame-phone) .bottom-sheet {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: 480px;
    border-radius: 22px;
    bottom: 24px;
  }
}
