/* ============================================================
   Phòng Nhạc — landing page nghe nhạc (light theme)
   ============================================================ */

:root {
  --bg: #faf5ec;
  --bg-soft: #f3ecdd;
  --card: #fffdf8;
  --ink: #2c2418;
  --ink-soft: #6d6152;
  --line: rgba(60, 48, 32, 0.13);
  --terra: #c26a4a;      /* đất nung — accent chính */
  --terra-deep: #a5523a;
  --amber: #d99a3d;      /* hổ phách — accent phụ */
  --sage: #7d8b6f;       /* xô thơm — nhấn phụ */
  --shadow: 0 14px 34px rgba(74, 56, 36, 0.12);
  --shadow-sm: 0 6px 16px rgba(74, 56, 36, 0.1);
  --r: 16px;
  --serif: "Fraunces", Georgia, serif;
  --sans: "Be Vietnam Pro", system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }
section[id] { scroll-margin-top: 84px; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  overflow-x: hidden;
  /* texture giấy nhẹ */
  background-image: radial-gradient(rgba(60, 48, 32, 0.035) 1px, transparent 1px);
  background-size: 22px 22px;
}

::selection { background: rgba(194, 106, 74, 0.28); }

:focus-visible {
  outline: 2px solid var(--terra);
  outline-offset: 3px;
  border-radius: 4px;
}

.container { width: min(1080px, 92%); margin: 0 auto; }

/* ---------- Blob pastel nền ---------- */
.blob {
  position: fixed;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
  z-index: -1;
  pointer-events: none;
}
.blob-peach { width: 480px; height: 480px; background: #f6d3b8; top: -160px; right: -120px; }
.blob-lav   { width: 420px; height: 420px; background: #e3d9f2; bottom: -140px; left: -140px; }

/* ---------- Topbar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(250, 245, 236, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 13px 0;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: var(--ink);
}
.brand-disc {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, var(--bg) 0 3px, var(--terra) 3px 8px, #241c14 8px 100%);
  box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.15), 0 3px 8px rgba(74, 56, 36, 0.25);
}
.brand-name {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.22rem;
  letter-spacing: 0.2px;
}
.brand-name em { font-style: italic; color: var(--terra-deep); }

.nav-links { display: flex; gap: 26px; }
.nav-links a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.93rem;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--ink); }

/* ---------- Nút ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: var(--terra);
  color: #fff;
  box-shadow: 0 10px 24px rgba(194, 106, 74, 0.35);
}
.btn-primary:hover { background: var(--terra-deep); transform: translateY(-2px); }
.btn-dark {
  background: var(--ink);
  color: var(--bg);
  padding: 9px 18px;
  font-size: 0.88rem;
}
.btn-dark:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  gap: 48px;
  align-items: center;
  padding: 80px 0 70px;
}
.kicker {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.4px;
  color: var(--terra-deep);
  background: rgba(194, 106, 74, 0.12);
  border: 1px solid rgba(194, 106, 74, 0.3);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 20px;
}
.hero h1 {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 5.6vw, 4.1rem);
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 18px;
}
.hero h1 em {
  font-style: italic;
  color: var(--terra-deep);
}
.lead {
  color: var(--ink-soft);
  font-size: 1.06rem;
  max-width: 470px;
  margin-bottom: 28px;
}
.hero-actions { display: flex; gap: 13px; flex-wrap: wrap; margin-bottom: 26px; }
.hero-notes { list-style: none; display: flex; gap: 18px; flex-wrap: wrap; }
.hero-notes li { font-size: 0.87rem; color: var(--ink-soft); }

/* ---------- Turntable (bàn đĩa than CSS) ---------- */
.hero-visual { position: relative; text-align: center; }
.turntable {
  position: relative;
  width: min(400px, 88%);
  aspect-ratio: 10 / 8;
  margin: 0 auto;
  background: linear-gradient(160deg, #f7efe2, #efe4d0);
  border: 1px solid var(--line);
  border-radius: 26px;
  box-shadow: var(--shadow);
  overflow: visible;
}
.platter {
  position: absolute;
  left: 7%;
  top: 12%;
  width: 62%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, #e8dcc6 0 58%, #d9c9ac 58% 60%, #efe4d0 60%);
  box-shadow: inset 0 2px 10px rgba(74, 56, 36, 0.18);
  display: grid;
  place-items: center;
}
.vinyl {
  width: 92%;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    repeating-radial-gradient(circle at 50% 50%, #262019 0 1.6px, #1a1510 1.6px 3.2px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35), inset 0 0 26px rgba(0, 0, 0, 0.5);
  position: relative;
  animation: spin 6s linear infinite;
  animation-play-state: paused;
}
body.is-playing .vinyl { animation-play-state: running; }
@keyframes spin { to { transform: rotate(360deg); } }
.vinyl-label {
  position: absolute;
  inset: 33%;
  border-radius: 50%;
  background: radial-gradient(circle, var(--bg) 0 8%, var(--amber) 8% 55%, var(--terra) 55% 100%);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2);
}
.vinyl-label::after {
  content: "";
  position: absolute;
  inset: 44%;
  border-radius: 50%;
  background: var(--bg);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.4);
}
/* vệt sáng quay theo đĩa */
.vinyl::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0 40deg, rgba(255, 255, 255, 0.06) 55deg, transparent 75deg, transparent 200deg, rgba(255, 255, 255, 0.05) 215deg, transparent 235deg);
}

/* Cần đàn */
.tonearm {
  position: absolute;
  right: 12%;
  top: 10%;
  width: 34%;
  height: 62%;
  transform-origin: 14% 18%;
  transform: rotate(-6deg);
  transition: transform 0.9s cubic-bezier(0.34, 1.3, 0.5, 1);
  pointer-events: none;
}
body.is-playing .tonearm { transform: rotate(24deg); }
.arm-pivot {
  position: absolute;
  left: 0;
  top: 0;
  width: 26%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #b8ab93, #8a7c63);
  box-shadow: 0 3px 8px rgba(74, 56, 36, 0.35);
}
.arm-bar {
  position: absolute;
  left: 11%;
  top: 15%;
  width: 9%;
  height: 72%;
  border-radius: 99px;
  background: linear-gradient(180deg, #b8ab93, #938468);
  box-shadow: 1px 2px 5px rgba(74, 56, 36, 0.3);
  transform: rotate(18deg);
}
.arm-head {
  position: absolute;
  left: 8%;
  bottom: 2%;
  width: 15%;
  height: 9%;
  border-radius: 4px 8px 8px 8px;
  background: #6d6152;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}
.tt-feet {
  position: absolute;
  left: 10%;
  right: 10%;
  bottom: -7px;
  display: flex;
  justify-content: space-between;
}
.tt-feet span {
  width: 46px;
  height: 10px;
  border-radius: 0 0 8px 8px;
  background: #d9c9ac;
  box-shadow: 0 3px 6px rgba(74, 56, 36, 0.2);
}

.float-note {
  position: absolute;
  font-size: 1.5rem;
  color: rgba(165, 82, 58, 0.4);
  animation: drift 6s ease-in-out infinite;
}
.fn-1 { top: -4%; right: 6%; }
.fn-2 { bottom: 10%; left: 0; font-size: 1.15rem; animation-delay: 1.6s; }
.fn-3 { top: 18%; left: 4%; font-size: 1rem; animation-delay: 3s; }
@keyframes drift { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-14px) rotate(5deg); } }

/* ---------- Section chung ---------- */
.section { padding: 60px 0; }
.section-head { text-align: center; margin-bottom: 34px; }
.section-head h2 {
  font-family: var(--serif);
  font-size: clamp(1.75rem, 3.6vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.3px;
}
.section-head p { color: var(--ink-soft); margin-top: 8px; font-size: 0.97rem; }
.section-head code {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.84em;
}

.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Bộ lọc: tìm kiếm + chips tâm trạng ---------- */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 26px;
}
.search {
  flex: 1 1 280px;
  max-width: 380px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 10px 18px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.search:focus-within {
  border-color: var(--terra);
  box-shadow: 0 0 0 3px rgba(194, 106, 74, 0.15);
}
.search svg { width: 17px; height: 17px; color: var(--ink-soft); flex: none; }
.search input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  font: inherit;
  font-size: 0.93rem;
  color: var(--ink);
}
.search input::placeholder { color: #a3957f; }

.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  font: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--card);
  color: var(--ink-soft);
  cursor: pointer;
  transition: all 0.18s;
}
.chip:hover { border-color: var(--terra); color: var(--terra-deep); transform: translateY(-1px); }
.chip.on {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}

/* ---------- Danh sách bản nhạc ---------- */
.tracks { list-style: none; display: grid; gap: 10px; }
.track {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 13px 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  cursor: pointer;
  transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s, background 0.18s;
}
.track:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
  border-color: rgba(194, 106, 74, 0.4);
}
.track.active {
  background: linear-gradient(90deg, rgba(194, 106, 74, 0.1), rgba(217, 154, 61, 0.07));
  border-color: rgba(194, 106, 74, 0.55);
}

.t-num {
  width: 30px;
  text-align: center;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.02rem;
  color: #b3a58d;
  flex: none;
  transition: visibility 0s;
}
/* visibility thay vì display:none để không nhảy layout */
.track.active .t-num { visibility: hidden; }

.t-art {
  width: 52px;
  height: 52px;
  flex: none;
  border-radius: 12px;
  overflow: hidden;
  display: grid;
  place-items: center;
  font-size: 1.25rem;
  color: #fffdf8;
  background: linear-gradient(140deg, var(--amber), var(--terra));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25), 0 4px 10px rgba(194, 106, 74, 0.25);
}
.track:nth-child(3n+2) .t-art { background: linear-gradient(140deg, #b5c4a4, var(--sage)); }
.track:nth-child(3n)   .t-art { background: linear-gradient(140deg, #e8d3ea, #b08bb8); }
.t-art img { width: 100%; height: 100%; object-fit: cover; }

.t-meta { flex: 1; min-width: 0; }
.t-meta strong {
  display: block;
  font-family: var(--serif);
  font-size: 1.08rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.track.active .t-meta strong { color: var(--terra-deep); }
.t-meta span { color: var(--ink-soft); font-size: 0.85rem; }

.t-tag {
  flex: none;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--sage);
  background: rgba(125, 139, 111, 0.12);
  border: 1px solid rgba(125, 139, 111, 0.3);
  padding: 4px 12px;
  border-radius: 999px;
}

/* equalizer nhỏ khi đang phát */
.t-eq { display: none; gap: 3px; align-items: flex-end; height: 18px; flex: none; }
.track.active .t-eq { display: flex; }
.t-eq i {
  width: 3px;
  height: 100%;
  border-radius: 2px;
  background: var(--terra);
  transform-origin: bottom;
  transform: scaleY(0.3);
  animation: bounce 1s ease-in-out infinite;
}
.t-eq i:nth-child(2) { animation-delay: 0.25s; }
.t-eq i:nth-child(3) { animation-delay: 0.5s; }
body:not(.is-playing) .t-eq i { animation-play-state: paused; transform: scaleY(0.3); }
@keyframes bounce { 0%, 100% { transform: scaleY(0.25); } 50% { transform: scaleY(1); } }

.t-play {
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1.5px solid var(--line);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s, background 0.2s, border-color 0.2s;
}
.track:hover .t-play,
.track.active .t-play { opacity: 1; }
.t-play:hover { background: var(--terra); border-color: var(--terra); color: #fff; }
.t-play svg { width: 15px; height: 15px; }
.t-play:focus-visible { opacity: 1; }

.list-empty {
  text-align: center;
  color: var(--ink-soft);
  padding: 34px 20px;
  border: 1.5px dashed var(--line);
  border-radius: var(--r);
}

/* nút thu gọn / xem tất cả danh sách */
.list-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 14px;
  padding: 12px 20px;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink-soft);
  background: transparent;
  border: 1.5px dashed var(--line);
  border-radius: var(--r);
  cursor: pointer;
  transition: all 0.18s;
}
.list-toggle:hover {
  color: var(--terra-deep);
  border-color: var(--terra);
  background: rgba(194, 106, 74, 0.05);
}
.list-toggle svg { width: 16px; height: 16px; transition: transform 0.25s; }
.list-toggle.open svg { transform: rotate(180deg); }

/* ---------- About ---------- */
.about {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 20px;
  align-items: stretch;
}
.about-quote {
  position: relative;
  background: var(--ink);
  color: #f4ecdf;
  border-radius: 22px;
  padding: 44px 42px 38px;
  overflow: hidden;
}
.about-quote::after {
  content: "♪";
  position: absolute;
  right: -18px;
  bottom: -30px;
  font-size: 9rem;
  font-family: var(--serif);
  opacity: 0.08;
}
.q-mark {
  font-family: var(--serif);
  font-size: 4rem;
  line-height: 0.5;
  color: var(--amber);
  display: block;
  margin-bottom: 18px;
}
.about-quote blockquote {
  font-family: var(--serif);
  font-size: clamp(1.2rem, 2.4vw, 1.55rem);
  font-style: italic;
  line-height: 1.45;
  font-weight: 500;
}
.q-sign {
  display: block;
  margin-top: 20px;
  font-size: 0.86rem;
  color: rgba(244, 236, 223, 0.6);
  font-style: normal;
}
.about-facts { display: grid; gap: 14px; }
.fact {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 18px 22px;
  display: flex;
  align-items: center;
  gap: 18px;
  transition: transform 0.18s, box-shadow 0.18s;
}
.fact:hover { transform: translateX(4px); box-shadow: var(--shadow-sm); }
.fact strong {
  font-family: var(--serif);
  font-size: 2rem;
  color: var(--terra-deep);
  min-width: 44px;
  text-align: center;
}
.fact span { color: var(--ink-soft); font-size: 0.9rem; }

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--line);
  background: var(--bg-soft);
  padding: 40px 0 46px;
  text-align: center;
  margin-top: 40px;
}
.footer-inner p { color: var(--ink-soft); font-size: 0.92rem; max-width: 480px; margin: 8px auto 0; }
.fine { font-size: 0.8rem !important; color: #a3957f !important; }

/* ============================================================
   PLAYER BAR — dính đáy màn hình
   ============================================================ */
.playerbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 80;
  background: rgba(255, 253, 248, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
  box-shadow: 0 -10px 34px rgba(74, 56, 36, 0.1);
  transform: translateY(110%);
  transition: transform 0.45s cubic-bezier(0.32, 1.2, 0.4, 1);
}
.playerbar.show { transform: none; }

.pb-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) auto minmax(0, 1.3fr) auto;
  gap: 20px;
  align-items: center;
  padding: 12px 0;
}

.pb-meta { display: flex; align-items: center; gap: 12px; min-width: 0; }
.pb-art {
  width: 46px;
  height: 46px;
  flex: none;
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: #fffdf8;
  font-size: 1.1rem;
  background: linear-gradient(140deg, var(--amber), var(--terra));
  background-size: cover;
  background-position: center;
  box-shadow: 0 4px 10px rgba(194, 106, 74, 0.3);
}
.pb-text { min-width: 0; }
.pb-text strong {
  display: block;
  font-family: var(--serif);
  font-size: 0.98rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pb-text span {
  display: block;
  color: var(--ink-soft);
  font-size: 0.78rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pb-controls { display: flex; align-items: center; gap: 6px; }
.pbtn {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: none;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  transition: all 0.18s;
}
.pbtn svg { width: 18px; height: 18px; }
.pbtn:hover { color: var(--ink); background: var(--bg-soft); }
.pbtn.on { color: var(--terra-deep); background: rgba(194, 106, 74, 0.13); }
.pbtn[data-mode="2"]::after {
  content: "1";
  position: absolute;
  top: -2px;
  right: -2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--terra);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  display: grid;
  place-items: center;
}
.pb-main {
  width: 48px;
  height: 48px;
  background: var(--ink);
  color: var(--bg) !important;
  box-shadow: 0 6px 16px rgba(44, 36, 24, 0.35);
}
.pb-main:hover { background: #3d3222; transform: scale(1.06); }
.pb-main svg { width: 20px; height: 20px; }

/* ---- ICON ĐỒNG BỘ THEO STATE (điều khiển bằng class, KHÔNG dùng hidden —
     thuộc tính hidden không đáng tin trên phần tử SVG) ----
   idle/paused : hiện ▶ , ẩn ⏸
   is-playing  : hiện ⏸ , ẩn ▶
   is-loading  : ẩn cả hai, spinner (::after) thay thế */
.pb-main #iconPause { display: none; }
body.is-playing .pb-main #iconPause { display: block; }
body.is-playing .pb-main #iconPlay  { display: none; }
body.is-loading .pb-main svg        { display: none; }

/* trạng thái đang tải file: spinner trên nút play */
body.is-loading .pb-main::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border-radius: 50%;
  border: 2.5px solid rgba(250, 245, 236, 0.35);
  border-top-color: #faf5ec;
  animation: pb-spin 0.8s linear infinite;
}
@keyframes pb-spin { to { transform: rotate(360deg); } }

.pb-seek { display: flex; align-items: center; gap: 12px; min-width: 0; }
.time {
  font-size: 0.76rem;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
  min-width: 38px;
}
.pb-seek .time:last-child { text-align: right; }

.pb-vol { display: flex; align-items: center; gap: 8px; }
.pb-vol svg { width: 17px; height: 17px; color: var(--ink-soft); flex: none; }
.pb-vol input[type="range"] { width: 96px; }

/* Range slider chung */
input[type="range"] {
  --val: 0%;
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  height: 5px;
  border-radius: 99px;
  cursor: pointer;
  outline: none;
  background: linear-gradient(
    to right,
    var(--terra) 0%,
    var(--terra) var(--val),
    rgba(60, 48, 32, 0.16) var(--val)
  );
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--ink);
  border: 2.5px solid var(--card);
  box-shadow: 0 1px 5px rgba(44, 36, 24, 0.4);
  transition: transform 0.15s;
}
input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.25); }
input[type="range"]::-moz-range-thumb {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--ink);
  border: 2.5px solid var(--card);
  box-shadow: 0 1px 5px rgba(44, 36, 24, 0.4);
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 108px;
  transform: translate(-50%, 16px);
  opacity: 0;
  pointer-events: none;
  background: var(--ink);
  color: #f4ecdf;
  padding: 13px 22px;
  border-radius: 14px;
  box-shadow: 0 14px 40px rgba(44, 36, 24, 0.35);
  transition: opacity 0.3s, transform 0.3s;
  z-index: 99;
  max-width: min(92vw, 520px);
  text-align: center;
  font-size: 0.92rem;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast[data-type="error"] { background: #8c3b26; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .hero { grid-template-columns: 1fr; text-align: center; padding-top: 54px; gap: 36px; }
  .hero-copy { display: flex; flex-direction: column; align-items: center; }
  .lead { max-width: 540px; }
  .about { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  /* Player bar co lại: 2 hàng — meta | controls, seek full-width */
  .pb-inner {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "meta controls"
      "seek seek";
    gap: 8px 14px;
    padding: 10px 0 12px;
  }
  .pb-meta { grid-area: meta; }
  .pb-controls { grid-area: controls; }
  .pb-seek { grid-area: seek; }
  .pb-vol { display: none; }
  #btnShuffle, #btnRepeat { display: none; }

  .track { padding: 11px 14px; gap: 12px; }
  .t-tag { display: none; }
  .t-play { display: none; }
  .about-quote { padding: 32px 26px 30px; }
  .toast { bottom: 130px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}
