/* PREMIUM · Piringan Hitam — label rekaman retro (Lokananta 60–70an), vinil, kayu */
:root {
  --teal: #1f5f5b;
  --teal-d: #123e3b;
  --mustard: #e8b33a;
  --cream: #f3e6c8;
  --cream-2: #e9d8b0;
  --red: #a8321f;
  --ink: #26231e;
  --soft: #cfe0d6;
  --wood-1: #8a5a34;
  --wood-2: #6b4426;
  --wood-3: #4f3019;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --display: "Shrikhand", Georgia, serif;
  --mono: "DM Mono", ui-monospace, monospace;
  --body: "Familjen Grotesk", system-ui, sans-serif;
  --s: 1;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--body); color: var(--cream); overflow: hidden; background: var(--teal);
  background-image: repeating-linear-gradient(0deg, rgba(0, 0, 0, .06) 0 2px, transparent 2px 6px); }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
button:focus-visible, a:focus-visible, [tabindex]:focus-visible { outline: 3px solid var(--mustard); outline-offset: 3px; }
[hidden] { display: none !important; }

.stage { position: relative; height: 100dvh; max-width: 440px; margin: 0 auto; }
.scene { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center;
  padding: max(26px, env(safe-area-inset-top)) 18px max(22px, env(safe-area-inset-bottom));
  opacity: 0; visibility: hidden; transform: scale(.97); transition: opacity .7s var(--ease), transform .7s var(--ease), visibility 0s .7s; }
.scene.active { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }

.kick { margin: 18px 0 0; font-size: 16px; color: var(--soft); }
.display { margin: 8px 0 0; font-family: var(--display); font-weight: 400; font-size: clamp(34px, 10vw, 42px); line-height: 1.02; color: var(--mustard); text-align: center; text-shadow: 3px 3px 0 var(--teal-d); }

/* ---------- vinil (dipakai di sampul & turntable) ---------- */
.grooves { position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle, transparent 30%, rgba(255, 255, 255, .05) 30.6%, transparent 31.2%, transparent 62%, rgba(255, 255, 255, .05) 62.5%, transparent 63%),
    repeating-radial-gradient(circle, #121212 0 1.4px, #1e1e1e 1.4px 2.8px); }
.label { position: absolute; left: 50%; top: 50%; width: 39%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; background: var(--red);
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: var(--cream); padding: 8px;
  box-shadow: inset 0 0 0 3px rgba(0, 0, 0, .15); transition: background .4s; }
.label b { font-family: var(--display); font-weight: 400; font-size: 15px; line-height: 1; color: var(--cream); margin-bottom: 14px; }
.label span { font-family: var(--display); font-size: 12px; line-height: 1.1; }
.label small { font-family: var(--mono); font-size: 10px; margin-top: 3px; opacity: .9; }
.label i { position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; margin: -4px; border-radius: 50%; background: #0c0c0c; }
.vinyl.side-b .label { background: var(--mustard); color: var(--teal-d); }
.vinyl.side-b .label b { color: var(--teal-d); }

/* ---------- 1. sampul ---------- */
#sleeveScene { justify-content: center; }
#sleeveScene .kick { margin-top: 0; }
.sleeve-wrap { position: relative; width: min(290px, 72vw); aspect-ratio: 1; margin: calc(min(290px, 72vw) * .3 + 26px) 0 0; }
.sleeve { position: absolute; inset: 0; z-index: 2; overflow: hidden; border-radius: 4px; background: var(--teal-d); box-shadow: 0 24px 40px rgba(0, 0, 0, .4), inset 0 0 0 1px rgba(255, 255, 255, .08); }
.sleeve img { width: 100%; height: 100%; object-fit: cover; display: block; filter: grayscale(1) contrast(1.1) brightness(1.25); }
.cover-tone { position: absolute; inset: 0; background: linear-gradient(160deg, #e8b33a, #c4472f 55%, #1f5f5b); mix-blend-mode: color; }
.cover-tone::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 45%, rgba(18, 62, 59, .75)); }
.cover-text { position: absolute; left: 16px; right: 16px; bottom: 14px; display: flex; flex-direction: column; color: var(--cream); }
.cover-text .cat { font-family: var(--mono); font-size: 12px; opacity: .85; }
.cover-text b { font-family: var(--display); font-weight: 400; font-size: 46px; line-height: 1; text-shadow: 3px 3px 0 rgba(0, 0, 0, .35); }
.cover-text .artist { font-size: 16px; font-weight: 700; }
.disc-out { position: absolute; z-index: 1; top: -30%; left: 3%; width: 94%; aspect-ratio: 1; border-radius: 50%; background: #151515; cursor: grab; touch-action: none;
  box-shadow: 0 12px 24px rgba(0, 0, 0, .45); transition: transform .5s var(--spring); }
.disc-out.drag { transition: none; cursor: grabbing; }
.disc-out.gone { transform: translateY(-160%) rotate(260deg) scale(.8) !important; opacity: 0; transition: transform .7s var(--ease), opacity .7s; }
.disc-out:not(.drag):not(.gone) { animation: peek 2.4s ease-in-out infinite; }
@keyframes peek { 50% { transform: translateY(-6%) rotate(-8deg); } }
.hint { margin: 34px 0 0; display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; }
.arrow { width: 2px; height: 26px; background: var(--cream); position: relative; animation: nudge 1.3s ease-in-out infinite; }
.arrow::after { content: ""; position: absolute; left: -4px; top: -1px; width: 9px; height: 9px; border-top: 2px solid var(--cream); border-left: 2px solid var(--cream); transform: rotate(45deg); }
@keyframes nudge { 50% { transform: translateY(-7px); } }

/* ---------- 2. turntable ---------- */
.deck, .sleeve-wrap, .disc-out { user-select: none; -webkit-user-select: none; -webkit-user-drag: none; -webkit-touch-callout: none; }
#deckScene { padding-top: calc(max(26px, env(safe-area-inset-top)) + 34px); }
.deck-wrap { width: calc(339px * var(--s)); height: calc(330px * var(--s)); flex-shrink: 0; margin-top: 8px; }
.deck { position: relative; width: 339px; height: 330px; transform: scale(var(--s)); transform-origin: top left; border-radius: 18px;
  background: linear-gradient(135deg, var(--wood-1), var(--wood-2) 60%, var(--wood-3));
  box-shadow: 0 18px 30px rgba(0, 0, 0, .35), inset 0 2px 0 rgba(255, 255, 255, .15); }
.deck::before { content: ""; position: absolute; inset: 0; border-radius: inherit; opacity: .25; pointer-events: none;
  background: repeating-linear-gradient(100deg, rgba(0, 0, 0, .25) 0 1px, transparent 1px 7px); }
.platter { position: absolute; left: 22px; top: 26px; width: 278px; height: 278px; border-radius: 50%; background: radial-gradient(circle, #2a2a2a, #161616); box-shadow: 0 8px 16px rgba(0, 0, 0, .5), inset 0 0 0 2px #333; }
.vinyl { position: absolute; inset: 6px; border-radius: 50%; touch-action: none; cursor: grab; transform-style: preserve-3d; }
.vinyl.flip { animation: flip .9s var(--ease); }
@keyframes flip { 50% { transform: rotateY(90deg) scale(.96); } }
.shine { position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  background: conic-gradient(from 30deg, transparent 0 40deg, rgba(255, 255, 255, .09) 55deg, transparent 70deg 210deg, rgba(255, 255, 255, .07) 225deg, transparent 240deg); }
.arm { position: absolute; left: 299px; top: 44px; width: 0; height: 0; transform: rotate(0deg); z-index: 3; touch-action: none; cursor: grab; }
.arm .rod { position: absolute; left: -3px; top: 0; width: 6px; height: 200px; border-radius: 3px; background: linear-gradient(90deg, #a9a9a9, #f1f1f1, #8d8d8d); box-shadow: 2px 3px 4px rgba(0, 0, 0, .35); }
.arm .headshell { position: absolute; left: -12px; top: 194px; width: 24px; height: 38px; border-radius: 5px; background: linear-gradient(90deg, #333, #1d1d1d); transform: rotate(-14deg); transform-origin: top center; box-shadow: 2px 4px 6px rgba(0, 0, 0, .4); }
.arm .pivot { position: absolute; left: -21px; top: -21px; width: 42px; height: 42px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #e6e6e6, #8a8a8a); box-shadow: 0 4px 8px rgba(0, 0, 0, .45); }
.arm::before { content: ""; position: absolute; left: -24px; top: -24px; width: 48px; height: 260px; } /* area sentuh lebih besar */
.arm.drag { cursor: grabbing; }
.rpm { position: absolute; left: 16px; bottom: 12px; display: flex; gap: 6px; z-index: 4; }
.rpm button { min-width: 44px; height: 30px; padding: 0 10px; border-radius: 15px; background: rgba(0, 0, 0, .28); color: var(--cream); font-family: var(--mono); font-size: 13px; }
.rpm button[aria-pressed="true"] { background: var(--cream); color: var(--wood-3); }
.led { position: absolute; right: 18px; bottom: 20px; width: 9px; height: 9px; border-radius: 50%; background: #3b2a1d; box-shadow: inset 0 1px 2px rgba(0, 0, 0, .6); }
.led.on { background: #ff6b4a; box-shadow: 0 0 10px #ff6b4a; }

/* ---------- panel ---------- */
.panel { width: 100%; flex: 1; min-height: 0; display: flex; flex-direction: column; margin-top: 18px; }
.now { position: relative; display: flex; gap: 14px; align-items: center; }
/* penanda foto bisa diperbesar: ikon kaca pembesar + gelembung petunjuk sampai pernah diketuk */
.thumb .zoom { position: absolute; right: 3px; bottom: 3px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(243, 230, 200, .94); color: var(--teal-d); box-shadow: 0 1px 4px rgba(0, 0, 0, .35); pointer-events: none; }
.thumb.nudge { animation: nudge 1.4s ease-out 3; }
@keyframes nudge { 0% { box-shadow: 0 4px 0 rgba(0, 0, 0, .2), 0 0 0 0 rgba(232, 179, 58, .75); } 100% { box-shadow: 0 4px 0 rgba(0, 0, 0, .2), 0 0 0 14px rgba(232, 179, 58, 0); } }
.thumb-tip { position: absolute; left: -4px; bottom: calc(100% + 12px); z-index: 4; padding: 8px 12px; border-radius: 10px; background: var(--cream); color: var(--ink);
  font: 700 14px/1.2 var(--body); white-space: nowrap; box-shadow: 0 6px 16px rgba(0, 0, 0, .3); pointer-events: none; animation: tipIn .35s var(--spring); }
.thumb-tip::after { content: ""; position: absolute; left: 30px; top: 100%; border: 7px solid transparent; border-top-color: var(--cream); }
@keyframes tipIn { from { opacity: 0; transform: translateY(6px) scale(.96); } }
.thumb { position: relative; width: 64px; height: 64px; border-radius: 10px; overflow: hidden; flex: none; background: var(--teal-d); box-shadow: 0 4px 0 rgba(0, 0, 0, .2); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: opacity .4s; }
.meta { flex: 1; min-width: 0; }
.trk { font-family: var(--mono); font-size: 13px; color: var(--soft); }
.meta b { display: block; font-size: 19px; line-height: 1.2; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prog { height: 4px; border-radius: 4px; background: rgba(243, 230, 200, .2); margin-top: 8px; overflow: hidden; }
.prog i { display: block; height: 100%; width: 0; background: var(--mustard); }
.time { display: block; margin-top: 4px; font-family: var(--mono); font-size: 13px; color: var(--soft); }
/* lirik: kalimat sekarang + garis progres + kalimat berikutnya (samar), seperti lirik di aplikasi musik */
.lyric { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; margin: 10px 0; min-height: 96px; }
.lyric .cur { margin: 0; font-family: var(--display); font-weight: 400; font-size: clamp(22px, 6.6vw, 27px); line-height: 1.2; color: var(--cream); transition: opacity .35s, transform .35s var(--ease); }
.lyric .lbar { width: 92px; height: 3px; margin-top: 12px; border-radius: 3px; background: rgba(243, 230, 200, .18); overflow: hidden; }
.lyric .lbar i { display: block; height: 100%; width: 0; background: var(--mustard); }
.lyric .nxt { margin: 12px 0 0; min-height: 1.25em; font-family: var(--display); font-size: clamp(16px, 4.6vw, 19px); line-height: 1.25; color: var(--cream); opacity: .38; transition: opacity .35s, transform .35s var(--ease); }
.lyric.out .cur { opacity: 0; transform: translateY(-10px); }
.lyric.out .nxt { opacity: 0; transform: translateY(-14px); }
.lyric.idle .cur { font-family: var(--body); font-size: 18px; color: var(--soft); }
.lyric.idle .lbar, .lyric.idle .nxt { visibility: hidden; }
.actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.chip { min-height: 46px; padding: 0 18px; border-radius: 999px; border: 1.5px solid rgba(243, 230, 200, .45); font-weight: 700; font-size: 15px; }
.chip.hot { background: var(--mustard); border-color: var(--mustard); color: var(--teal-d); animation: pop .5s var(--spring) both; }
@keyframes pop { from { opacity: 0; transform: scale(.7); } }

/* ---------- daftar lagu ---------- */
.sheet { position: absolute; inset: 0; z-index: 20; background: rgba(10, 30, 28, .55); display: flex; align-items: flex-end; animation: fade .25s; }
.sheet-card { width: 100%; background: var(--cream); color: var(--ink); border-radius: 22px 22px 0 0; padding: 18px 20px max(22px, env(safe-area-inset-bottom)); animation: up .35s var(--ease); }
.sheet-head { display: flex; justify-content: space-between; align-items: center; }
.sheet-head h2 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 26px; color: var(--red); }
.x { min-height: 44px; padding: 0 12px; font-weight: 700; color: var(--teal-d); }
.tracks { list-style: none; margin: 10px 0 0; padding: 0; }
.tracks button { width: 100%; display: flex; gap: 14px; align-items: baseline; padding: 14px 0; border-bottom: 1px solid rgba(38, 35, 30, .15); text-align: left; font-size: 17px; }
.tracks em { font-style: normal; font-family: var(--mono); font-size: 13px; color: #6b5a3c; width: 24px; }
.tracks span { flex: 1; }
.tracks time { font-family: var(--mono); font-size: 13px; color: #6b5a3c; }
.tracks .on { color: var(--red); font-weight: 700; }
.tracks button[disabled] { opacity: .5; cursor: default; }
@keyframes up { from { transform: translateY(100%); } }
@keyframes fade { from { opacity: 0; } }

/* ---------- foto ---------- */
.modal { position: absolute; inset: 0; z-index: 30; background: rgba(10, 30, 28, .86); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; animation: fade .25s; }
.modal figure { margin: 0; background: var(--cream); padding: 12px 12px 0; transform: rotate(-2deg); box-shadow: 0 20px 40px rgba(0, 0, 0, .4); animation: pop .45s var(--spring); }
.modal img { display: block; width: min(300px, 78vw); aspect-ratio: 1; object-fit: cover; }
.modal figcaption { padding: 12px 4px 16px; color: var(--ink); font-family: var(--display); font-size: 20px; text-align: center; }
.modal-hint { margin: 0; font-size: 14px; color: var(--soft); }

/* ---------- catatan sampul ---------- */
.liner { position: absolute; inset: 0; z-index: 25; background: rgba(10, 30, 28, .7); display: flex; align-items: center; justify-content: center; padding: 22px 16px; animation: fade .4s; overflow-y: auto; }
.liner-paper { position: relative; width: 100%; max-width: 380px; margin: auto; background: var(--cream); color: var(--ink); border-radius: 4px; padding: 26px 24px 24px;
  box-shadow: 0 24px 50px rgba(0, 0, 0, .45); animation: up .6s var(--ease);
  background-image: repeating-linear-gradient(0deg, rgba(0, 0, 0, .025) 0 1px, transparent 1px 4px); }
.liner-paper .cat { font-family: var(--mono); font-size: 13px; color: #6b5a3c; }
.liner-paper h2 { margin: 6px 0 12px; font-family: var(--display); font-weight: 400; font-size: 32px; line-height: 1; color: var(--red); }
.liner-paper p { margin: 0 0 14px; font-size: 17px; line-height: 1.6; }
.liner-paper .sig { font-family: var(--display); font-size: 26px; color: var(--teal-d); margin: 6px 0 0; }
.liner-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 0 22px; border-radius: 999px; background: var(--teal-d); color: var(--cream); font-weight: 700; text-decoration: none; font-size: 16px; }
.btn.ghost { background: transparent; color: var(--teal-d); box-shadow: inset 0 0 0 2px var(--teal-d); }

.os-music { position: fixed; z-index: 50; top: max(12px, env(safe-area-inset-top)); right: 12px; width: 44px; height: 44px; border-radius: 50%;
  background: rgba(18, 62, 59, .7); color: var(--mustard); display: grid; place-items: center; border: 1px solid rgba(243, 230, 200, .3); }
.os-music.on svg { animation: spin 4s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-height: 720px) {
  .display { font-size: 30px; }
  .sleeve-wrap { width: min(230px, 60vw); margin-top: calc(min(230px, 60vw) * .3 + 18px); }
  .hint { margin-top: 22px; }
  .lyric { min-height: 70px; }
  .lyric .cur { font-size: 21px; }
  .lyric .nxt { font-size: 15px; margin-top: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .2s !important; }
}
