/* Playroom - stylesheet
 *
 * Design rules (AGENTS.md): dark "home theater", big glossy thumbnails, one
 * warm accent, smooth motion. Built for two parents on phones: 16px minimum
 * body text, 44px minimum tap targets, one-handed layouts.
 */

/* ---------- tokens ---------- */
:root {
  --bg: #0f0d11;
  --bg-2: #15121a;
  --surface: #1b1721;
  --surface-2: #26202e;
  --surface-3: #322a3b;
  --line: rgba(255, 255, 255, 0.07);
  --line-strong: rgba(255, 255, 255, 0.14);
  --text: #f6f2ee;
  --text-2: #b8afb9;
  --text-3: #7f7683;
  --accent: #ff6b4a;
  --accent-2: #ff9a5c;
  --accent-ink: #2a0d06;
  --danger: #ff5c7a;
  --ok: #7ee0a6;
  --radius: 20px;
  --radius-s: 14px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.45), 0 2px 6px rgba(0, 0, 0, 0.35);
  --shadow-glow: 0 8px 28px rgba(255, 107, 74, 0.35);
  --font: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- base ---------- */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { height: 100%; background: var(--bg); }
body {
  margin: 0; min-height: 100%;
  font-family: var(--font); font-size: 17px; line-height: 1.4; color: var(--text);
  background:
    radial-gradient(60vw 40vh at 8% -5%, rgba(255, 107, 74, 0.16), transparent 70%),
    radial-gradient(50vw 40vh at 100% 100%, rgba(63, 169, 245, 0.07), transparent 70%),
    var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overscroll-behavior-y: none;
}
[hidden] { display: none !important; }
h1, h2, h3, h4, p { margin: 0; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, textarea { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
a { color: var(--accent-2); }
::selection { background: rgba(255, 107, 74, 0.4); }

body.no-scroll { overflow: hidden; }

/* ---------- logo ---------- */
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -0.01em; }
.logo__mark {
  width: 30px; height: 30px; border-radius: 9px; position: relative; flex: none;
  background: linear-gradient(135deg, #1c1721, #2a2230); box-shadow: inset 0 0 0 1px var(--line-strong);
}
.logo__mark::after {
  content: ''; position: absolute; left: 11px; top: 8px; width: 0; height: 0;
  border-left: 11px solid var(--accent); border-top: 7px solid transparent; border-bottom: 7px solid transparent;
  filter: drop-shadow(0 0 6px rgba(255, 107, 74, 0.7));
}
.logo--big .logo__mark { width: 72px; height: 72px; border-radius: 22px; }
.logo--big .logo__mark::after { left: 27px; top: 19px; border-left-width: 26px; border-top-width: 17px; border-bottom-width: 17px; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 8px;
  padding: calc(10px + var(--safe-t)) 14px 10px;
  background: rgba(15, 13, 17, 0.72); backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.topbar__title { flex: 1; min-width: 0; font-size: 22px; font-weight: 700; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar__title .emoji { margin-right: 8px; }
.topbar__spacer { flex: 1; }

.icon-btn {
  width: 44px; height: 44px; border-radius: 14px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-2); background: transparent; transition: background 0.15s, color 0.15s, transform 0.15s;
}
.icon-btn:active { transform: scale(0.92); background: var(--surface-2); color: var(--text); }
.icon-btn svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn--solid { background: var(--surface-2); color: var(--text); }

/* ---------- views ---------- */
.view { padding: 8px 16px calc(110px + var(--safe-b)); max-width: 1100px; margin: 0 auto; animation: view-in 0.32s var(--ease); }
@keyframes view-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.section { margin-top: 22px; }
.section__head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.section__title { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
.section__link { color: var(--accent-2); font-weight: 600; font-size: 16px; min-height: 44px; display: inline-flex; align-items: center; }

/* hero header on list views */
.hero { display: flex; flex-direction: column; gap: 14px; padding: 6px 0 4px; }
.hero__title { font-size: 34px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; display: flex; align-items: center; gap: 12px; }
.hero__title .emoji { font-size: 34px; }
.hero__sub { color: var(--text-2); font-size: 17px; }
.hero__actions { display: flex; gap: 10px; }
.hero__actions .btn { flex: 1; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 20px; border-radius: 16px; font-weight: 600; font-size: 17px;
  background: var(--surface-2); color: var(--text); border: 1px solid var(--line);
  transition: transform 0.15s var(--ease), background 0.15s, box-shadow 0.2s;
}
.btn:active { transform: scale(0.97); }
.btn svg { width: 22px; height: 22px; fill: currentColor; flex: none; }
.btn--primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: var(--accent-ink); border-color: transparent; box-shadow: var(--shadow-glow); }
.btn--ghost { background: transparent; border-color: var(--line-strong); }
.btn--danger { background: rgba(255, 92, 122, 0.14); color: var(--danger); border-color: rgba(255, 92, 122, 0.3); }
.btn--big { min-height: 56px; font-size: 18px; border-radius: 18px; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: 0.55; pointer-events: none; }

/* floating add button */
.fab {
  position: fixed; right: 18px; bottom: calc(22px + var(--safe-b)); z-index: 15;
  width: 62px; height: 62px; border-radius: 22px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: var(--accent-ink);
  box-shadow: var(--shadow-glow), var(--shadow); display: flex; align-items: center; justify-content: center;
  transition: transform 0.2s var(--ease);
}
.fab:active { transform: scale(0.92); }
.fab svg { width: 30px; height: 30px; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; fill: none; }

/* ---------- list cards ---------- */
.list-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 560px) { .list-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .list-grid { grid-template-columns: repeat(3, 1fr); } }

.list-card {
  --accent-list: var(--accent);
  position: relative; display: grid; grid-template-columns: 112px 1fr auto; align-items: center; gap: 14px;
  padding: 12px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line);
  box-shadow: var(--shadow); overflow: hidden; cursor: pointer; transition: transform 0.18s var(--ease), border-color 0.2s;
}
.list-card::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(120px 80px at 0% 100%, color-mix(in srgb, var(--accent-list) 22%, transparent), transparent 70%);
}
.list-card:active { transform: scale(0.98); }
.list-card--all { --accent-list: #3fa9f5; }
.list-card--new { --accent-list: #a3e635; background: transparent; border-style: dashed; border-color: var(--line-strong); box-shadow: none; }
.list-card--new .list-card__meta h3 { color: var(--text-2); }

.mosaic {
  width: 112px; height: 84px; border-radius: 14px; overflow: hidden; position: relative;
  display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 2px; background: var(--surface-2);
}
.mosaic img { width: 100%; height: 100%; object-fit: cover; }
.mosaic--1 { grid-template-columns: 1fr; grid-template-rows: 1fr; }
.mosaic--2 { grid-template-rows: 1fr; }
.mosaic--empty { display: flex; align-items: center; justify-content: center; font-size: 34px; background: linear-gradient(135deg, var(--surface-2), var(--surface-3)); }
.mosaic__badge {
  position: absolute; left: 6px; top: 6px; font-size: 22px; line-height: 1; padding: 4px; border-radius: 8px;
  background: rgba(0, 0, 0, 0.45); backdrop-filter: blur(6px);
}
.list-card__meta { min-width: 0; }
.list-card__meta h3 { font-size: 21px; font-weight: 700; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-card__meta p { color: var(--text-2); font-size: 16px; margin-top: 2px; }
.list-card__side { display: flex; flex-direction: column; gap: 6px; align-items: center; }
.play-pill {
  width: 48px; height: 48px; border-radius: 16px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--accent-list), color-mix(in srgb, var(--accent-list) 60%, white)); color: #1a0e08;
  box-shadow: 0 6px 18px color-mix(in srgb, var(--accent-list) 45%, transparent); transition: transform 0.15s;
}
.play-pill:active { transform: scale(0.9); }
.play-pill svg { width: 22px; height: 22px; fill: currentColor; margin-left: 2px; }

/* ---------- video rows (playlist style) ---------- */
.video-list { display: flex; flex-direction: column; gap: 6px; }
@media (min-width: 760px) { .video-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 18px; } }
.video-row {
  display: grid; grid-template-columns: 136px minmax(0, 1fr) 44px; gap: 12px; align-items: center;
  padding: 8px; margin: 0 -8px; border-radius: 18px; cursor: pointer; min-width: 0;
  animation: view-in 0.35s var(--ease) both; transition: background 0.15s;
}
.video-row:active { background: var(--surface); }
.video-row:active .thumb { transform: scale(0.97); }
.video-row__text { min-width: 0; }
.video-row__title { font-size: 16px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.video-row__channel { font-size: 14px; color: var(--text-3); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.video-row__lists { display: flex; flex-wrap: wrap; gap: 4px 8px; margin-top: 5px; font-size: 14px; color: var(--text-2); font-weight: 500; }
.video-row__lists span { white-space: nowrap; }
.video-row__lists .none { color: var(--accent-2); }
.video-row__more { color: var(--text-3); }

.thumb {
  position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius-s); overflow: hidden;
  background: var(--surface-2); box-shadow: var(--shadow); transition: transform 0.18s var(--ease); min-width: 0;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0, 0, 0, 0.35), transparent 45%); }
.thumb__play {
  position: absolute; right: 6px; bottom: 6px; z-index: 1; width: 30px; height: 30px; border-radius: 9px;
  background: rgba(0, 0, 0, 0.55); backdrop-filter: blur(6px); display: flex; align-items: center; justify-content: center; color: #fff;
}
.thumb__play svg { width: 14px; height: 14px; fill: currentColor; margin-left: 2px; }

/* "not in a list yet" nudge */
.nudge {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--radius); margin-top: 14px;
  background: linear-gradient(135deg, rgba(255, 107, 74, 0.18), rgba(255, 154, 92, 0.08)); border: 1px solid rgba(255, 154, 92, 0.35);
  cursor: pointer; transition: transform 0.15s;
}
.nudge:active { transform: scale(0.98); }
.nudge__icon { font-size: 26px; }
.nudge__text { flex: 1; min-width: 0; }
.nudge__text b { display: block; font-size: 17px; }
.nudge__text span { color: var(--text-2); font-size: 15px; }
.nudge svg { width: 22px; height: 22px; stroke: var(--accent-2); fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.section--warm .section__title { color: var(--accent-2); }

/* skeletons while loading */
.skel { background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 50%, var(--surface) 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: var(--radius-s); }
@keyframes shimmer { to { background-position: -200% 0; } }
.skel--thumb { aspect-ratio: 16 / 9; }
.skel--line { height: 16px; margin-top: 10px; width: 80%; }
.skel--card { height: 108px; border-radius: var(--radius); }

/* ---------- empty state ---------- */
.empty { text-align: center; padding: 48px 20px; color: var(--text-2); }
.empty__art { font-size: 56px; margin-bottom: 12px; filter: drop-shadow(0 8px 20px rgba(255, 107, 74, 0.25)); }
.empty h3 { color: var(--text); font-size: 22px; margin-bottom: 8px; }
.empty p { max-width: 34ch; margin: 0 auto 18px; }

/* ---------- banners & toast ---------- */
.banner { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: var(--radius-s); background: rgba(255, 154, 92, 0.12); border: 1px solid rgba(255, 154, 92, 0.3); color: var(--accent-2); font-weight: 500; margin-top: 10px; }
.toast {
  position: fixed; left: 50%; bottom: calc(96px + var(--safe-b)); transform: translateX(-50%); z-index: 60;
  max-width: min(92vw, 440px); padding: 13px 18px; border-radius: 16px; font-weight: 600; font-size: 16px;
  background: var(--surface-3); border: 1px solid var(--line-strong); box-shadow: var(--shadow); color: var(--text);
  animation: toast-in 0.3s var(--ease);
}
.toast--ok { border-color: rgba(126, 224, 166, 0.45); }
.toast--err { border-color: rgba(255, 92, 122, 0.5); color: #ffd3dc; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ---------- PIN gate ---------- */
.gate { min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.gate__card { width: 100%; max-width: 380px; text-align: center; animation: view-in 0.5s var(--ease); }
.gate__card .logo { margin-bottom: 18px; }
.gate__title { font-size: 40px; font-weight: 700; letter-spacing: -0.03em; }
.gate__sub { color: var(--text-2); margin: 8px 0 26px; }
.gate__form { display: flex; flex-direction: column; gap: 12px; }
.pin-input {
  width: 100%; height: 64px; border-radius: 18px; text-align: center; font-size: 30px; letter-spacing: 0.35em; font-weight: 700;
  background: var(--surface); border: 1px solid var(--line-strong); color: var(--text); outline: none; transition: border-color 0.2s, box-shadow 0.2s;
}
.pin-input::placeholder { letter-spacing: 0.05em; font-size: 18px; font-weight: 500; color: var(--text-3); }
.pin-input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(255, 107, 74, 0.2); }
.gate__msg { min-height: 24px; margin-top: 14px; color: var(--danger); font-weight: 500; }
.shake { animation: shake 0.4s; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }

/* ---------- bottom sheets ---------- */
.sheet-backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(6, 4, 8, 0.6); backdrop-filter: blur(4px); animation: fade-in 0.2s; }
@keyframes fade-in { from { opacity: 0; } }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 41; max-height: 88vh; max-height: 88dvh; overflow-y: auto;
  margin: 0 auto; max-width: 560px; padding: 10px 18px calc(22px + var(--safe-b));
  background: var(--surface); border-radius: 26px 26px 0 0; border: 1px solid var(--line-strong); border-bottom: 0;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5); animation: sheet-in 0.32s var(--ease);
}
@media (min-width: 600px) { .sheet { bottom: 24px; border-radius: 26px; border-bottom: 1px solid var(--line-strong); } }
@keyframes sheet-in { from { transform: translateY(40px); opacity: 0; } }
.sheet--closing { animation: sheet-out 0.2s ease-in forwards; }
@keyframes sheet-out { to { transform: translateY(40px); opacity: 0; } }
.sheet__handle { width: 44px; height: 5px; border-radius: 3px; background: var(--line-strong); margin: 4px auto 14px; }
.sheet__title { font-size: 21px; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 4px; }
.sheet__sub { color: var(--text-2); margin-bottom: 14px; }
.sheet__head { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.sheet__head .thumb { width: 104px; flex: none; box-shadow: none; }
.sheet__hint { color: var(--text-3); font-size: 15px; margin-top: 10px; min-height: 20px; }
.sheet__head .thumb::after { display: none; }
.sheet__head h3 { font-size: 17px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sheet__head p { color: var(--text-3); font-size: 15px; margin-top: 2px; }
.sheet__actions { display: flex; gap: 10px; margin-top: 18px; }
.sheet__actions .btn { flex: 1; }

.menu { display: flex; flex-direction: column; gap: 4px; }
.menu-item {
  display: flex; align-items: center; gap: 14px; min-height: 54px; padding: 0 12px; border-radius: 14px; text-align: left; font-size: 17px; font-weight: 500; width: 100%;
  transition: background 0.15s;
}
.menu-item:active { background: var(--surface-2); }
.menu-item svg { width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; color: var(--text-2); }
.menu-item--danger { color: var(--danger); }
.menu-item--danger svg { color: var(--danger); }
.menu-item__hint { margin-left: auto; color: var(--text-3); font-size: 15px; }

/* chips (list picker) */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  --c: var(--accent);
  display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 16px; border-radius: 16px; font-weight: 600; font-size: 17px;
  background: var(--surface-2); border: 1.5px solid var(--line-strong); color: var(--text-2); transition: all 0.15s var(--ease);
}
.chip .emoji { font-size: 20px; }
.chip:active { transform: scale(0.96); }
.chip--on { background: color-mix(in srgb, var(--c) 22%, var(--surface-2)); border-color: var(--c); color: var(--text); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 25%, transparent); }
.chip__check { width: 20px; height: 20px; border-radius: 50%; border: 2px solid currentColor; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; opacity: 0.6; }
.chip--on .chip__check { background: var(--c); border-color: var(--c); color: #1a0e08; opacity: 1; }

/* forms */
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.field label { font-size: 15px; font-weight: 600; color: var(--text-2); }
.input {
  width: 100%; min-height: 52px; padding: 0 16px; border-radius: 16px; background: var(--bg-2); border: 1px solid var(--line-strong); color: var(--text); font-size: 18px; outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(255, 107, 74, 0.18); }
textarea.input { padding: 12px 16px; min-height: 90px; resize: vertical; }
.emoji-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; }
.emoji-grid button { height: 44px; border-radius: 12px; font-size: 24px; background: var(--bg-2); border: 1.5px solid transparent; transition: all 0.12s; }
.emoji-grid button.on { border-color: var(--accent); background: rgba(255, 107, 74, 0.16); transform: scale(1.06); }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatches button { width: 44px; height: 44px; border-radius: 14px; border: 3px solid transparent; transition: transform 0.12s, border-color 0.12s; }
.swatches button.on { border-color: #fff; transform: scale(1.08); }

/* link preview inside the add sheet */
.preview { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: 16px; background: var(--bg-2); border: 1px solid var(--line); margin-bottom: 16px; min-height: 80px; }
.preview .thumb { width: 112px; flex: none; box-shadow: none; }
.preview .thumb::after { display: none; }
.preview h3 { font-size: 16px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.preview p { color: var(--text-3); font-size: 15px; margin-top: 2px; }
.preview--pending { color: var(--text-3); justify-content: center; }

/* ---------- player ---------- */
.player { position: fixed; inset: 0; z-index: 30; background: var(--bg); display: flex; flex-direction: column; animation: player-in 0.35s var(--ease); }
@keyframes player-in { from { transform: translateY(100%); } }
.player--closing { animation: player-out 0.25s ease-in forwards; }
@keyframes player-out { to { transform: translateY(100%); opacity: 0.6; } }
.player__bar { display: flex; align-items: center; gap: 8px; padding: calc(6px + var(--safe-t)) 10px 6px; }
.player__bar .topbar__title { font-size: 17px; font-weight: 600; color: var(--text-2); text-align: center; }
.player__stage { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; flex: none; }
.player__stage iframe, .player__stage > div { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player__stage-msg {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 20px; text-align: center;
  background: linear-gradient(135deg, #1a1420, #0f0d11); color: var(--text-2);
}
.player__body { flex: 1; overflow-y: auto; padding: 16px 16px calc(24px + var(--safe-b)); }
.player__title { font-size: 21px; font-weight: 700; line-height: 1.25; letter-spacing: -0.01em; }
.player__meta { color: var(--text-2); margin-top: 4px; font-size: 16px; }
.player__controls { display: flex; align-items: center; gap: 8px; margin: 16px 0 8px; }
.player__controls .btn { flex: 1; }
.toggle { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 600; color: var(--text-2); }
.toggle__track { width: 50px; height: 30px; border-radius: 15px; background: var(--surface-3); position: relative; transition: background 0.2s; flex: none; }
.toggle__track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform 0.2s var(--ease); }
.toggle--on .toggle__track { background: var(--accent); }
.toggle--on .toggle__track::after { transform: translateX(20px); }
.toggle--on { color: var(--text); }

.queue { margin-top: 18px; display: flex; flex-direction: column; gap: 8px; }
.queue-item { display: grid; grid-template-columns: 30px 120px 1fr; gap: 12px; align-items: center; padding: 8px; border-radius: 16px; cursor: pointer; transition: background 0.15s; }
.queue-item:active { background: var(--surface-2); }
.queue-item .thumb { box-shadow: none; }
.queue-item .thumb::after { display: none; }
.queue-item__n { color: var(--text-3); font-weight: 600; text-align: center; }
.queue-item__t { font-size: 16px; font-weight: 500; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.queue-item--current { background: var(--surface); border: 1px solid var(--line-strong); }
.queue-item--current .queue-item__n { color: var(--accent); }
.queue-item--current .queue-item__t { color: var(--text); font-weight: 600; }
.queue-item--played .queue-item__t { color: var(--text-3); }

/* landscape phone: the video fills the screen */
@media (orientation: landscape) and (max-height: 500px) {
  .player__bar { position: absolute; top: 0; left: 0; right: 0; z-index: 2; background: linear-gradient(rgba(0, 0, 0, 0.6), transparent); }
  .player__stage { aspect-ratio: auto; height: 100vh; height: 100dvh; }
  .player__body { display: none; }
}

/* ---------- settings ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.card + .card { margin-top: 14px; }
.card h3 { font-size: 19px; font-weight: 700; margin-bottom: 6px; }
.card p { color: var(--text-2); }
.card .btn { margin-top: 12px; }
.steps { padding-left: 22px; margin: 12px 0 0; display: flex; flex-direction: column; gap: 10px; color: var(--text); }
.steps li::marker { color: var(--accent-2); font-weight: 700; }
.steps b { font-weight: 600; }
.copy-row { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.copy-row code { flex: 1; min-width: 0; font-size: 14px; padding: 10px 12px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); white-space: pre-wrap; word-break: break-all; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.copy-row .btn { min-height: 44px; padding: 0 14px; font-size: 15px; }
.footer-note { text-align: center; color: var(--text-3); font-size: 14px; margin-top: 28px; }
