/* Grandma's Jukebox — warm, nostalgic, easy to read */
:root {
  --bg: #f4ebdc;
  --bg2: #efe3cf;
  --surface: #fffaf1;
  --surface2: #f8efe0;
  --ink: #2a1c13;
  --ink2: #5d4838;
  --muted: #8a7462;
  --line: #e2d3bb;
  --accent: #9b3a22;       /* oxblood */
  --accent-ink: #fff8ee;
  --brass: #b58631;
  --brass-soft: #ecd9ad;
  --wood1: #7a4a2a; --wood2: #5a341c; --wood3: #9a6438;
  --shadow: 0 2px 6px rgba(70, 40, 15, .08), 0 10px 30px rgba(70, 40, 15, .10);
  --radius: 18px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  --nav-w: 270px;
  --player-h: 168px;
  --base: 20px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #1b1410; --bg2: #221912; --surface: #2a1f18; --surface2: #33261d;
  --ink: #f5e9d6; --ink2: #d8c4a8; --muted: #a99178; --line: #44352a;
  --accent: #e3a24a; --accent-ink: #20150d; --brass: #e0b35e; --brass-soft: #4a3a22;
  --wood1: #4a2c18; --wood2: #2f1b0e; --wood3: #6a4224;
  --shadow: 0 2px 6px rgba(0,0,0,.3), 0 10px 30px rgba(0,0,0,.35);
  color-scheme: dark;
}
:root[data-size="xl"] { --base: 23px; }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
html { font-size: var(--base); }
body {
  background: var(--bg); color: var(--ink); font-family: var(--sans);
  -webkit-font-smoothing: antialiased; overflow: hidden; overscroll-behavior: none;
  -webkit-text-size-adjust: 100%; touch-action: manipulation;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; touch-action: manipulation; -webkit-user-select: none; user-select: none; }
svg { width: 1.2em; height: 1.2em; flex: none; }
img { display: block; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; margin: 0; letter-spacing: -.01em; }
input, select { font: inherit; }

/* ---------- layout ---------- */
.app {
  height: 100%; display: grid;
  grid-template-columns: var(--nav-w) 1fr;
  grid-template-rows: 1fr auto;
  grid-template-areas: "nav main" "player player";
}
.nav { grid-area: nav; background: var(--bg2); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: calc(env(safe-area-inset-top) + 18px) 14px 14px calc(env(safe-area-inset-left) + 14px); overflow-y: auto; }
.main { grid-area: main; overflow-y: auto; -webkit-overflow-scrolling: touch; outline: none; position: relative; }
.player { grid-area: player; }

.brand { display: flex; align-items: center; gap: 12px; padding: 6px 8px 22px; }
.brand-record { width: 50px; height: 50px; border-radius: 50%; background:
  radial-gradient(circle, var(--accent) 0 18%, #111 19% 21%, transparent 22%),
  repeating-radial-gradient(circle, #1a1a1a 0 1px, #2c2c2c 1.5px 2.5px);
  box-shadow: 0 2px 6px rgba(0,0,0,.25); flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1; font-family: var(--serif); }
.brand-small { font-size: .8rem; color: var(--muted); font-style: italic; }
.brand-big { font-size: 1.55rem; font-weight: 700; color: var(--accent); letter-spacing: .01em; }

.nav-items { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.nav-btn { display: flex; align-items: center; gap: 14px; min-height: 60px; padding: 0 16px; border-radius: 14px; font-size: 1.05rem; font-weight: 600; color: var(--ink2); text-align: left; }
.nav-btn svg { width: 1.45em; height: 1.45em; }
.nav-btn.active { background: var(--surface); color: var(--accent); box-shadow: var(--shadow); }
.nav-btn:active { transform: scale(.98); }
.nav-settings { margin-top: auto; }

/* Portrait / narrow: navigation becomes a row of big tabs across the top */
@media (orientation: portrait), (max-width: 900px) {
  .app { grid-template-columns: 1fr; grid-template-rows: auto 1fr auto; grid-template-areas: "nav" "main" "player"; }
  .nav { border-right: 0; border-bottom: 1px solid var(--line); padding: calc(env(safe-area-inset-top) + 10px) 12px 10px; flex-direction: row; align-items: center; overflow: visible; }
  .brand { padding: 0 10px 0 4px; }
  .brand-record { width: 42px; height: 42px; }
  .brand-big { font-size: 1.25rem; }
  .nav-items { flex-direction: row; gap: 4px; flex: 1; justify-content: space-between; }
  .nav-btn { flex-direction: column; justify-content: center; gap: 4px; min-height: 70px; min-width: 0; flex: 1; padding: 6px 4px; font-size: .72rem; text-align: center; }
  .nav-btn span { white-space: nowrap; }
  .nav-settings { margin-top: 0; }
}
@media (orientation: portrait) and (max-width: 700px) { .brand { display: none; } }

/* ---------- views ---------- */
.view { padding: calc(env(safe-area-inset-top) + 26px) 34px 40px; max-width: 1400px; }
@media (orientation: portrait), (max-width: 900px) { .view { padding-top: 22px; padding-left: 24px; padding-right: 24px; } }
.view-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.view-head h1 { font-size: 2.1rem; }
.view-sub { color: var(--muted); font-size: .9rem; margin-top: 4px; }
.back { display: inline-flex; align-items: center; gap: 6px; min-height: 54px; padding: 0 16px 0 8px; margin: -6px 0 10px -8px; border-radius: 12px; color: var(--accent); font-size: 1.05rem; font-weight: 600; }
.back svg { width: 1.3em; height: 1.3em; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 58px; padding: 0 24px; border-radius: 999px; font-weight: 700; font-size: 1rem; background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 2px var(--line); }
.btn svg { width: 1.25em; height: 1.25em; }
.btn.primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 4px 14px rgba(155,58,34,.25); }
.btn.danger { color: #b3261e; box-shadow: inset 0 0 0 2px rgba(179,38,30,.35); }
:root[data-theme="dark"] .btn.danger { color: #ff8a7a; }
.btn:active { transform: scale(.97); }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn-plain { display: inline-flex; align-items: center; gap: 8px; min-height: 54px; padding: 0 14px; border-radius: 12px; font-weight: 600; color: var(--accent); }
.btn-plain.big { font-size: 1.05rem; }
.btn-plain svg { width: 1.35em; height: 1.35em; }

.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); }

/* song rows */
.list { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.row { display: flex; align-items: center; gap: 16px; min-height: 84px; padding: 10px 10px 10px 14px; border-bottom: 1px solid var(--line); content-visibility: auto; contain-intrinsic-size: auto 84px; }
.row:last-child { border-bottom: 0; }
.row-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 16px; text-align: left; min-height: 64px; }
.row-main:active { opacity: .7; }
.row .thumb { width: 64px; height: 64px; border-radius: 10px; }
.row-text { min-width: 0; flex: 1; }
.row-title { font-size: 1.05rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-sub { font-size: .85rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 3px; }
.row-dur { color: var(--muted); font-size: .85rem; font-variant-numeric: tabular-nums; flex: none; }
.row-num { width: 2em; text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; flex: none; font-size: .95rem; }
.icon-btn { width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); flex: none; }
.icon-btn svg { width: 1.45em; height: 1.45em; }
.icon-btn:active { background: var(--surface2); }
.icon-btn.fav-on { color: var(--accent); }
.row.playing .row-title { color: var(--accent); }
.eq { display: none; gap: 3px; align-items: flex-end; height: 18px; margin-right: 2px; }
.row.playing .eq { display: inline-flex; }
.eq i { width: 4px; background: var(--accent); border-radius: 2px; height: 30%; }
.is-playing .row.playing .eq i { animation: eq 0.9s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: -.3s !important; } .eq i:nth-child(3) { animation-delay: -.6s !important; }
@keyframes eq { 0%,100% { height: 25%; } 50% { height: 100%; } }

/* artwork */
.art-frame { position: relative; overflow: hidden; background: linear-gradient(135deg, var(--brass-soft), var(--surface2)); display: grid; place-items: center; flex: none; }
.art-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .25s; }
.art-frame img.loaded { opacity: 1; }
.art-frame .art-ph { width: 42%; height: 42%; color: var(--brass); opacity: .75; }
.art-frame.has-art .art-ph { display: none; }

/* album grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 26px 22px; }
.tile { text-align: left; display: block; min-width: 0; }
.tile .cover { width: 100%; aspect-ratio: 1; border-radius: 14px; box-shadow: var(--shadow); }
.tile:active .cover { transform: scale(.97); }
.tile-title { font-weight: 700; margin-top: 10px; font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-sub { color: var(--muted); font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.tile .cover.round { border-radius: 50%; }

/* album header */
.hero { display: flex; gap: 30px; align-items: flex-end; margin-bottom: 26px; flex-wrap: wrap; }
.hero .cover { width: 280px; height: 280px; border-radius: 18px; box-shadow: var(--shadow); }
.hero .cover.round { border-radius: 50%; }
.hero-text { flex: 1; min-width: 260px; }
.hero-kicker { text-transform: uppercase; letter-spacing: .12em; font-size: .72rem; font-weight: 700; color: var(--brass); }
.hero h1 { font-size: 2.2rem; margin: 6px 0 4px; line-height: 1.1; }
.hero-sub { color: var(--ink2); font-size: 1.05rem; margin-bottom: 18px; }
@media (orientation: portrait) { .hero .cover { width: 220px; height: 220px; } }

/* empty / welcome */
.empty { text-align: center; padding: 60px 30px; max-width: 640px; margin: 30px auto; }
.empty h2 { font-size: 1.8rem; margin-bottom: 12px; }
.empty p { color: var(--ink2); line-height: 1.5; margin: 0 auto 26px; }
.welcome-record { width: 170px; height: 170px; margin: 0 auto 26px; border-radius: 50%; background:
  radial-gradient(circle, var(--brass) 0 4%, var(--accent) 4.5% 26%, #111 27% 29%, transparent 30%),
  repeating-radial-gradient(circle, #161616 0 1.5px, #262626 2px 3.5px);
  box-shadow: 0 10px 30px rgba(0,0,0,.25); animation: spin 6s linear infinite; }

/* search */
.search-box { position: relative; margin-bottom: 24px; }
.search-box svg { position: absolute; left: 20px; top: 50%; transform: translateY(-50%); width: 1.4em; height: 1.4em; color: var(--muted); }
.search-box input { width: 100%; height: 70px; border-radius: 999px; border: 2px solid var(--line); background: var(--surface); color: var(--ink); padding: 0 24px 0 62px; font-size: 1.15rem; outline: none; -webkit-appearance: none; }
.search-box input:focus { border-color: var(--brass); }
.section-title { font-family: var(--serif); font-size: 1.35rem; margin: 26px 0 12px; }

/* settings */
.settings { display: grid; gap: 22px; max-width: 900px; }
.set-card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px; }
.set-card h2 { font-size: 1.4rem; margin-bottom: 8px; }
.set-card p { color: var(--ink2); line-height: 1.5; margin: 0 0 18px; }
.set-card .note { font-size: .85rem; color: var(--muted); margin: 14px 0 0; }
.seg { display: inline-flex; background: var(--surface2); border-radius: 999px; padding: 5px; gap: 4px; flex-wrap: wrap; }
.seg button { min-height: 52px; padding: 0 22px; border-radius: 999px; font-weight: 600; color: var(--ink2); }
.seg button.on { background: var(--surface); color: var(--accent); box-shadow: var(--shadow); }
.stat { display: flex; gap: 30px; flex-wrap: wrap; margin-bottom: 6px; }
.stat div { font-size: .85rem; color: var(--muted); }
.stat b { display: block; font-size: 1.5rem; color: var(--ink); font-family: var(--serif); }
.banner { display: flex; gap: 14px; align-items: center; background: var(--brass-soft); color: var(--ink); border-radius: 14px; padding: 14px 18px; margin-bottom: 18px; font-weight: 600; line-height: 1.4; }

/* ---------- bottom player bar ---------- */
.player {
  background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -6px 24px rgba(70,40,15,.08);
  padding: 8px calc(env(safe-area-inset-right) + 22px) calc(env(safe-area-inset-bottom) + 12px) calc(env(safe-area-inset-left) + 22px);
  z-index: 5;
}
.pb-progress { display: flex; align-items: center; gap: 14px; }
.pb-time { font-size: .78rem; color: var(--muted); font-variant-numeric: tabular-nums; width: 3.4em; text-align: center; }
.pb-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 18px; margin-top: 4px; }
.pb-now { display: flex; align-items: center; gap: 14px; text-align: left; min-width: 0; border-radius: 14px; padding: 4px; }
.pb-art { width: 78px; height: 78px; border-radius: 12px; box-shadow: var(--shadow); }
.pb-text { min-width: 0; }
.pb-title { font-weight: 700; font-size: 1.05rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pb-artist { color: var(--muted); font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 3px; }
.pb-controls { display: flex; align-items: center; gap: 14px; }
.pb-modes { display: flex; justify-content: flex-end; gap: 8px; }
.ctl { width: 66px; height: 66px; border-radius: 50%; display: grid; place-items: center; color: var(--ink); }
.ctl svg { width: 1.7em; height: 1.7em; }
.ctl:active { background: var(--surface2); transform: scale(.94); }
.ctl-play { width: 82px; height: 82px; background: var(--accent); color: var(--accent-ink); box-shadow: 0 6px 18px rgba(155,58,34,.3); }
.ctl-play svg { width: 2em; height: 2em; }
.ctl-play:active { background: var(--accent); }
.mode { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-width: 84px; min-height: 66px; padding: 4px 8px; border-radius: 14px; color: var(--muted); font-size: .72rem; font-weight: 700; }
.mode svg { width: 1.5em; height: 1.5em; }
.mode[aria-pressed="true"] { color: var(--accent); background: var(--surface2); }
@media (orientation: portrait), (max-width: 900px) {
  .pb-row { grid-template-columns: 1fr auto; }
  .pb-modes { display: none; }
  .pb-art { width: 70px; height: 70px; }
}

/* range sliders — big and grabbable */
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 44px; background: transparent; flex: 1; margin: 0; --pct: 0%; }
input[type=range]::-webkit-slider-runnable-track { height: 10px; border-radius: 6px; background: linear-gradient(to right, var(--accent) var(--pct), var(--line) var(--pct)); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 30px; height: 30px; margin-top: -10px; border-radius: 50%; background: var(--surface); border: 3px solid var(--accent); box-shadow: 0 2px 6px rgba(0,0,0,.2); }
input[type=range]::-moz-range-track { height: 10px; border-radius: 6px; background: var(--line); }
input[type=range]::-moz-range-progress { height: 10px; border-radius: 6px; background: var(--accent); }
input[type=range]::-moz-range-thumb { width: 26px; height: 26px; border-radius: 50%; background: var(--surface); border: 3px solid var(--accent); }

/* ---------- Now Playing: the record player ---------- */
.np { position: fixed; inset: 0; z-index: 20; background:
  radial-gradient(ellipse at 30% 20%, var(--surface) 0%, var(--bg) 60%, var(--bg2) 100%);
  transform: translateY(100%); transition: transform .38s cubic-bezier(.2,.8,.2,1); display: flex; flex-direction: column;
  padding: calc(env(safe-area-inset-top) + 10px) calc(env(safe-area-inset-right) + 24px) calc(env(safe-area-inset-bottom) + 20px) calc(env(safe-area-inset-left) + 24px); }
.np.open { transform: none; }
.np-top { display: flex; justify-content: space-between; }
.np-body { flex: 1; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 40px; align-items: center; min-height: 0; padding: 0 20px; }
@media (orientation: portrait), (max-width: 900px) {
  .np-body { grid-template-columns: 1fr; grid-template-rows: auto auto; gap: 22px; align-content: center; padding: 0; }
  .turntable { max-width: min(78vw, 52vh); }
}
.turntable { width: 100%; max-width: min(620px, 72vh); margin: 0 auto; aspect-ratio: 1 / .86; }
.plinth { position: relative; width: 100%; height: 100%; border-radius: 26px;
  background: linear-gradient(160deg, var(--wood3), var(--wood1) 45%, var(--wood2));
  box-shadow: inset 0 2px 0 rgba(255,255,255,.15), inset 0 -6px 14px rgba(0,0,0,.35), 0 20px 50px rgba(50,25,8,.35); }
.plinth::before { content: ""; position: absolute; inset: 0; border-radius: inherit; opacity: .25; background: repeating-linear-gradient(100deg, transparent 0 6px, rgba(0,0,0,.25) 7px 8px, transparent 9px 17px); }
.platter { position: absolute; left: 6%; top: 7%; width: 72%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, #bbb 0 60%, #8a8a8a 61% 64%, #cfcfcf 66% 100%); box-shadow: 0 6px 16px rgba(0,0,0,.45); display: grid; place-items: center; }
.record { position: relative; width: 96%; aspect-ratio: 1; border-radius: 50%; background: #121212; animation: spin 1.8s linear infinite; animation-play-state: paused; box-shadow: 0 0 0 1px #000; }
.playing .record { animation-play-state: running; }
.grooves { position: absolute; inset: 0; border-radius: 50%; background:
  conic-gradient(from 30deg, rgba(255,255,255,.0) 0deg, rgba(255,255,255,.12) 40deg, rgba(255,255,255,0) 80deg, rgba(255,255,255,0) 180deg, rgba(255,255,255,.1) 220deg, rgba(255,255,255,0) 260deg),
  repeating-radial-gradient(circle, #141414 0 1.2px, #1f1f1f 1.6px 2.8px); }
.record .label { position: absolute; left: 50%; top: 50%; width: 40%; height: 40%; transform: translate(-50%, -50%); border-radius: 50%; box-shadow: 0 0 0 4px #0a0a0a; }
.spindle { position: absolute; left: 50%; top: 50%; width: 3.2%; height: 3.2%; transform: translate(-50%,-50%); border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff, #999 60%, #555); }
@keyframes spin { to { transform: rotate(360deg); } }
.tonearm { position: absolute; right: 5%; top: 6%; width: 30%; height: 80%; transform-origin: 72% 12%; transform: rotate(-22deg); transition: transform 1s cubic-bezier(.4,.1,.2,1); pointer-events: none; }
.playing .tonearm { transform: rotate(4deg); }
.arm-base { position: absolute; right: 12%; top: 3%; width: 32%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #f4e1b0, var(--brass) 55%, #6b4d17); box-shadow: 0 4px 10px rgba(0,0,0,.4); }
.arm { position: absolute; right: 27%; top: 12%; width: 5%; height: 74%; border-radius: 4px; background: linear-gradient(90deg, #9c9c9c, #f2f2f2 45%, #8a8a8a); transform-origin: top center; transform: rotate(14deg); box-shadow: 2px 4px 8px rgba(0,0,0,.35); }
.arm-head { position: absolute; left: 32%; bottom: 7%; width: 17%; height: 11%; border-radius: 4px; background: linear-gradient(90deg, #222, #555); transform: rotate(14deg); box-shadow: 0 3px 6px rgba(0,0,0,.4); }
.plinth-badge { position: absolute; right: 6%; bottom: 7%; font-family: var(--serif); font-style: italic; font-weight: 700; color: #f2dfb3; font-size: 1.05rem; letter-spacing: .06em; text-shadow: 0 1px 1px rgba(0,0,0,.5); padding: 6px 14px; border-radius: 8px; background: linear-gradient(180deg, rgba(0,0,0,.18), rgba(0,0,0,.32)); box-shadow: inset 0 0 0 1px rgba(242,223,179,.4); }
.np-info { min-width: 0; text-align: center; }
.np-title { font-family: var(--serif); font-size: 2.2rem; font-weight: 700; line-height: 1.15; margin-bottom: 10px; overflow-wrap: anywhere; }
.np-artist, .np-album { display: block; margin: 0 auto; font-size: 1.2rem; color: var(--accent); font-weight: 600; min-height: 44px; padding: 0 10px; }
.np-album { color: var(--ink2); font-size: 1.02rem; font-weight: 500; }
.np-progress { margin: 22px 0 6px; }
.np-times { display: flex; justify-content: space-between; color: var(--muted); font-variant-numeric: tabular-nums; font-size: .9rem; }
.np-controls { display: flex; align-items: center; justify-content: center; gap: 28px; margin: 12px 0 18px; }
.ctl.big { width: 84px; height: 84px; } .ctl.big svg { width: 2.2em; height: 2.2em; }
.ctl.huge { width: 112px; height: 112px; } .ctl.huge svg { width: 2.7em; height: 2.7em; }
.np-modes { display: flex; justify-content: center; gap: 14px; }
.np-modes .mode { min-width: 104px; min-height: 76px; font-size: .8rem; }
.np-volume-hint { color: var(--muted); font-size: .8rem; margin-top: 18px; }
@media (orientation: portrait) and (max-height: 1100px) { .np-title { font-size: 1.8rem; } .ctl.huge { width: 96px; height: 96px; } }

/* ---------- sheets (dialogs) ---------- */
.sheet-wrap { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; pointer-events: none; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(30,18,10,.45); opacity: 0; transition: opacity .2s; }
.sheet { position: relative; width: min(640px, calc(100vw - 40px)); max-height: calc(100dvh - 80px); overflow-y: auto; background: var(--surface); border-radius: 26px; box-shadow: 0 30px 80px rgba(0,0,0,.35); padding: 28px; transform: translateY(30px) scale(.98); opacity: 0; transition: transform .22s, opacity .22s; }
.sheet-wrap.open { pointer-events: auto; }
.sheet-wrap.open .sheet-backdrop { opacity: 1; }
.sheet-wrap.open .sheet { transform: none; opacity: 1; }
.sheet h2 { font-size: 1.55rem; margin-bottom: 6px; }
.sheet p { color: var(--ink2); line-height: 1.5; margin: 6px 0 18px; }
.sheet-head { display: flex; gap: 16px; align-items: center; margin-bottom: 18px; }
.sheet-head .thumb { width: 76px; height: 76px; border-radius: 12px; }
.menu { display: flex; flex-direction: column; gap: 6px; }
.menu button { display: flex; align-items: center; gap: 16px; min-height: 64px; padding: 0 18px; border-radius: 14px; font-size: 1.05rem; font-weight: 600; text-align: left; background: var(--surface2); }
.menu button svg { width: 1.4em; height: 1.4em; color: var(--accent); }
.menu button.danger { color: #b3261e; } .menu button.danger svg { color: #b3261e; }
:root[data-theme="dark"] .menu button.danger, :root[data-theme="dark"] .menu button.danger svg { color: #ff8a7a; }
.menu button:active { transform: scale(.98); }
.sheet-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 22px; flex-wrap: wrap; }
.field { display: block; margin-bottom: 16px; }
.field span { display: block; font-weight: 700; font-size: .88rem; color: var(--ink2); margin-bottom: 6px; }
.field input { width: 100%; height: 62px; border-radius: 14px; border: 2px solid var(--line); background: var(--surface2); color: var(--ink); padding: 0 18px; font-size: 1.1rem; outline: none; -webkit-appearance: none; }
.field input:focus { border-color: var(--brass); }
.pick-list { max-height: 50dvh; overflow-y: auto; border-radius: 14px; border: 1px solid var(--line); margin-top: 8px; }
.pick { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 72px; padding: 6px 14px; border-bottom: 1px solid var(--line); text-align: left; }
.pick:last-child { border-bottom: 0; }
.pick .thumb { width: 52px; height: 52px; border-radius: 8px; }
.pick .check { width: 38px; height: 38px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; color: transparent; flex: none; }
.pick.on .check { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.progress { height: 14px; background: var(--line); border-radius: 8px; overflow: hidden; margin: 18px 0 6px; }
.progress i { display: block; height: 100%; background: var(--accent); width: 0; transition: width .2s; }

.toast { position: fixed; left: 50%; bottom: calc(var(--player-h) + env(safe-area-inset-bottom) + 20px); transform: translate(-50%, 20px); background: var(--ink); color: var(--bg); padding: 16px 26px; border-radius: 999px; font-weight: 600; font-size: 1rem; opacity: 0; transition: .25s; pointer-events: none; z-index: 60; max-width: calc(100vw - 40px); text-align: center; box-shadow: 0 10px 30px rgba(0,0,0,.3); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  .record, .welcome-record { animation: none !important; }
  .np, .tonearm, .sheet { transition: none; }
}

/* virtual lists & extras */
.vlist { position: relative; }
.vlist .row { height: var(--row-h); min-height: 0; content-visibility: visible; }
.thumb.round, .cover.round { border-radius: 50% !important; }
.link { background: none; text-align: center; }
select { -webkit-appearance: none; appearance: none; }
textarea:focus, select:focus { border-color: var(--brass) !important; }
.set-card .btn-plain { display: inline; }
