:root {
  color-scheme: dark;
  font-family: "Roboto", system-ui, sans-serif;
  --page:#111912; --panel:#1c271e; --surface:#28372a; --ink:#172414;
  --text:#f0f4e9; --muted:#afbead; --lime:#d4ee9b; --line:#344433;
}
* { box-sizing:border-box; }
[hidden] { display:none !important; }
body { margin:0; background:var(--page); color:var(--text); }
button, input { font:inherit; }
button, a { -webkit-tap-highlight-color:transparent; }
button, .button {
  border:0; border-radius:14px; padding:0 15px; color:var(--text);
  background:var(--surface); min-height:46px; font-weight:650; cursor:pointer; text-decoration:none;
}
button:hover, .button:hover { filter:brightness(1.12); }
a { color:inherit; }
:focus-visible { outline:2px solid var(--lime); outline-offset:3px; }
.primary { background:var(--lime); color:var(--ink); }
.shell { max-width:720px; margin:auto; min-height:100vh; min-height:100dvh; display:flex; flex-direction:column; }
.top { height:68px; padding:0 21px; display:flex; align-items:center; justify-content:space-between; }
.brand { display:flex; gap:11px; align-items:center; font-size:24px; font-weight:750; text-decoration:none; letter-spacing:-.04em; }
.brand img { border-radius:12px; }
main { width:100%; padding:0 20px 20px; flex:1; outline:none; }
.hero {
  --tint:var(--lime); --hero-a:#2d492f; --hero-b:#223027;
  background:linear-gradient(130deg,var(--hero-a),var(--hero-b)); border:1px solid #fff1;
  overflow:hidden; position:relative; border-radius:25px; padding:24px 92px 23px 20px; margin:4px 0 16px;
}
.hero.podcasts { --tint:#ffc6aa; --hero-a:#4b352b; --hero-b:#2f2923; }
.hero.musique { --tint:#fac4d1; --hero-a:#49303d; --hero-b:#32262d; }
.hero h1 { position:relative; margin:0; font-size:clamp(1.8rem,7vw,2.65rem); letter-spacing:-.055em; line-height:1.04; overflow-wrap:anywhere; }
.hero p { position:relative; color:var(--tint); margin:9px 0 0; font-size:.9rem; line-height:1.4; }
.hero-art { position:absolute; right:8px; top:50%; width:94px; height:94px; transform:translateY(-50%) rotate(-10deg); color:var(--tint); opacity:.22; }
.hero-art svg { width:100%; height:100%; }
svg { width:22px; height:22px; display:block; }
.search { display:flex; align-items:center; gap:6px; background:var(--panel); border:1px solid var(--line); border-radius:16px; padding:4px 4px 4px 12px; }
.search > svg { width:20px; color:var(--muted); flex:none; }
.search input { min-width:0; flex:1; color:var(--text); background:none; border:0; outline:none; padding:9px 4px; }
.search:focus-within { border-color:var(--lime); }
input::placeholder { color:var(--muted); opacity:1; }
.search button { min-width:44px; min-height:42px; padding:0 11px; }
h2 { font-size:1.13rem; letter-spacing:-.02em; margin:23px 0 10px; }
.list { display:grid; gap:7px; }
.item { display:flex; align-items:center; gap:4px; min-width:0; min-height:65px; background:var(--panel); border-radius:15px; padding:5px; }
.entry { display:flex; align-items:center; gap:11px; background:none; color:inherit; flex:1; min-width:0; text-align:left; text-decoration:none; border-radius:11px; padding:4px; min-height:48px; cursor:pointer; }
.entry-text, .playing-text { display:grid; gap:3px; min-width:0; flex:1; }
.entry strong, .playing strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:.96rem; font-weight:700; }
.entry small, .playing span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:.77rem; font-weight:500; color:var(--muted); }
.badge { width:40px; height:40px; display:grid; place-items:center; border-radius:12px; flex:none; color:var(--lime); background:#35492e; }
.badge.podcasts { background:#4d372d; color:#ffc6aa; }
.badge.musique { background:#4a303b; color:#fac4d1; }
.icon-button { display:grid; place-items:center; width:44px; min-height:44px; padding:0; flex:none; }
.icon-button.add { font-size:1.65rem; line-height:1; }
.favorite { background:none; color:var(--muted); }
.favorite[aria-pressed="true"] { color:var(--lime); }
.favorite[aria-pressed="true"] svg { fill:currentColor; }
.play { color:var(--lime); }
.note { color:var(--muted); background:var(--panel); border-radius:14px; font-size:.9rem; padding:13px 15px; line-height:1.5; margin:0; }
.inline { display:inline-flex; align-items:center; gap:8px; margin:3px 0 8px; }
.dock { position:sticky; bottom:0; z-index:2; background:var(--page); padding:4px 12px max(6px,env(safe-area-inset-bottom)); border-top:1px solid var(--line); }
nav { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:4px; margin:3px 0; }
nav a { text-decoration:none; font-size:.75rem; font-weight:700; min-height:52px; display:grid; justify-items:center; align-content:center; gap:3px; border-radius:16px; color:var(--muted); }
nav a[aria-current] { background:var(--panel); color:var(--lime); }
.player { padding:5px; border-radius:15px; background:var(--surface); }
.playing, .progress { display:flex; align-items:center; gap:6px; }
.playing-text { margin-left:3px; }
.progress { padding:0 7px; color:var(--muted); font-size:.74rem; }
.progress input { min-width:0; flex:1; height:29px; accent-color:var(--lime); }
dialog { border:1px solid var(--line); border-radius:22px; background:var(--panel); color:var(--text); max-width:min(430px,calc(100% - 26px)); width:100%; padding:19px; }
dialog::backdrop { background:#08110ad0; }
dialog h2 { margin:0 0 15px; }
dialog label { display:grid; gap:6px; margin:12px 0; font-size:.86rem; color:var(--muted); }
dialog input { width:100%; min-height:46px; border:1px solid var(--line); border-radius:12px; padding:8px 11px; background:var(--page); color:var(--text); }
.actions { display:flex; justify-content:flex-end; gap:7px; }
.error { color:#ffb9b4; font-size:.85rem; }
@media(min-width:700px) { .hero { padding:31px 120px 28px 24px; } .hero-art { right:26px; width:103px; height:103px; } }

.top-actions { display:flex; align-items:center; gap:8px; }
.theme-switch { display:flex; align-items:center; gap:5px; padding:0 10px; min-height:44px; background:var(--panel); color:var(--muted); font-size:.8rem; }
.theme-switch svg { width:15px; height:15px; }
.theme-switch[aria-pressed="true"] { background:#36191a; color:#ff8b82; box-shadow:inset 0 0 0 1px #803630; }
.rock-logo { display:none; }

:root[data-theme="acdc"] {
  --page:#120e0e; --panel:#201719; --surface:#302123; --ink:#190b0b;
  --text:#fff4ee; --muted:#cbb6b2; --lime:#ff7a70; --line:#503336;
}
[data-theme="acdc"] .brand img { display:none; }
[data-theme="acdc"] .rock-logo {
  display:grid; place-items:center; width:36px; height:36px; border-radius:10px;
  background:linear-gradient(145deg,#ff8f7f,#e24b42); color:#210c0c;
}
[data-theme="acdc"] .rock-logo svg { width:23px; height:23px; }
[data-theme="acdc"] .hero {
  --tint:#ffc5b6;
  min-height:154px;
  isolation:isolate;
  background:
    linear-gradient(90deg,#251215 10%,#351719 48%,#3517194d 76%,#120e0e18),
    url("/cover-highway-to-hell.jpg") right center / auto 100% no-repeat,
    #351719;
  border-color:#713539;
  box-shadow:inset 0 1px 0 #ff938a24;
}
[data-theme="acdc"] .hero::before {
  content:""; position:absolute; z-index:-1; inset:0; pointer-events:none;
  background:repeating-linear-gradient(128deg,transparent 0 17px,#ffa18c0c 18px 19px,transparent 20px 30px);
  mask-image:linear-gradient(to right,#000,transparent 62%);
}
[data-theme="acdc"] .hero h1 { font-weight:860; letter-spacing:-.058em; }
[data-theme="acdc"] .hero-art { display:none; }
[data-theme="acdc"] .badge { background:#442426; color:#ffa297; }
[data-theme="acdc"] .badge.podcasts { background:#4a2c24; color:#ffb994; }
[data-theme="acdc"] .badge.musique { background:#4b2433; color:#ffa0b0; }
[data-theme="acdc"] .player { box-shadow:inset 0 0 0 1px #653b3d; }
[data-theme="acdc"] nav a[aria-current] { box-shadow:inset 0 -2px 0 #e65b50; }

.youtube-player { margin:4px 0 17px; padding:9px; border-radius:17px; background:var(--panel); }
.youtube-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:0 0 8px 5px; }
.youtube-heading h2 { margin:0; min-width:0; overflow-wrap:anywhere; }
.youtube-frame { display:block; width:100%; min-height:200px; aspect-ratio:16 / 9; border:0; background:#000; }
.youtube-fallback { display:flex; justify-content:flex-end; padding-top:6px; }
.youtube-fallback .button { font-size:.83rem; margin:0; }
.youtube-fallback svg { width:18px; height:18px; }

.pwa-actions { display:flex; justify-content:flex-end; }
.pwa-actions button { margin:0 0 8px; }
.collection-tools { margin-top:18px; color:var(--muted); font-size:.85rem; }
.collection-tools summary { min-height:44px; padding:12px 0; cursor:pointer; }
.collection-actions { display:flex; gap:8px; }
.collection-tools p:empty { display:none; }

[data-theme="acdc"] body { isolation:isolate; }
[data-theme="acdc"] body::before {
  content:""; position:fixed; inset:0; z-index:-1; pointer-events:none;
  background:
    linear-gradient(180deg,#120e0ecc 0%,#120e0edb 47%,#120e0e 91%),
    url("/cover-highway-to-hell.jpg") center 25% / min(100vw,780px) auto no-repeat;
}
@media(min-width:700px) {
  [data-theme="acdc"] .hero { min-height:181px; }
}
