:root {
  color-scheme: dark;
  --bg: #111617;
  --panel: #1a2222;
  --hover: #222d2b;
  --line: #2a3433;
  --text: #f0f5f2;
  --muted: #a6b3ae;
  --mint: #a7f1ce;
  font-family: "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif;
  font-size: 16px;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); min-width: 280px; }
button, input { font: inherit; }
button { cursor: pointer; border: 0; color: inherit; }
button:disabled { opacity: .4; cursor: default; }
a { color: var(--mint); }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--mint); outline-offset: 4px; }
[data-icon] { display: inline-grid; place-items: center; flex: 0 0 auto; }
svg { width: 1.25rem; height: 1.25rem; }
.skip { position: fixed; top: 8px; left: 8px; transform: translateY(-200%); z-index: 10; padding: 8px; background: var(--bg); }
.skip:focus { transform: none; }
.app { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: calc(100dvh - 92px); }
.sidebar { display: flex; flex-direction: column; position: sticky; top: 0; height: calc(100dvh - 92px); padding: 26px 16px 16px; background: #13191a; border-right: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 11px; padding: 0; color: var(--text); background: transparent; text-align: left; font-size: 1.24rem; font-weight: 760; width: fit-content; }
.sidebar > .brand { margin: 0 0 37px 10px; }
.brand-icon { width: 42px; height: 42px; color: #102822; background: var(--mint); border-radius: 14px; }
.brand-icon svg { width: 25px; height: 25px; }
.brand small { display: block; color: var(--muted); font-size: .68rem; letter-spacing: .15em; line-height: 1.35; }
.nav-group { display: grid; gap: 6px; }
.nav { min-height: 46px; width: 100%; display: flex; align-items: center; gap: 12px; padding: 0 12px; border-radius: 10px; background: transparent; text-align: left; color: var(--muted); font-size: .94rem; }
.nav:hover, .nav.active { background: var(--hover); color: var(--mint); }
.sidebar-bottom { margin-top: auto; }
.signal { padding: 15px 10px; margin-bottom: 9px; display: flex; align-items: center; gap: 10px; color: var(--mint); font-size: .86rem; }
.signal small { display: block; margin-top: 3px; font-size: .73rem; color: var(--muted); }
.main { width: 100%; max-width: 1450px; margin: auto; margin-top: 0; padding: 24px clamp(20px, 3.9vw, 60px) 122px; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 24px; }
.mobile-brand, .mobile-nav { display: none; }
.search { display: flex; width: min(100%, 486px); min-width: 0; align-items: center; gap: 4px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.search:focus-within { border-color: var(--mint); }
.search input { min-height: 44px; width: 100%; min-width: 0; background: transparent; border: 0; padding: 0 10px 0 0; color: var(--text); outline: none; }
.search input::placeholder { color: var(--muted); }
.search-icon { display: inline-grid; place-items: center; width: 36px; flex: 0 0 36px; color: var(--muted); cursor: text; }
.search-submit { flex: 0 0 auto; white-space: nowrap; background: #25382f; color: var(--mint); font-weight: 700; border-radius: 8px; font-size: .84rem; min-height: 36px; padding: 0 9px; margin: 4px 4px 4px 0; }
.search-submit:hover { background: #314c3e; }
.search { position: relative; }
.search-history { position: absolute; z-index: 6; inset: calc(100% + 5px) 0 auto; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 25px #0006; padding: 6px; max-height: min(50vh, 390px); overflow-y: auto; }
.search-history-title { color: var(--muted); font-size: .88rem; padding: 7px 10px; }
.search-history-item { display: flex; width: 100%; align-items: center; gap: 9px; min-height: 42px; background: transparent; border-radius: 7px; text-align: left; padding: 7px 10px; overflow-wrap: anywhere; }
.search-history-item:hover, .search-history-item:focus-visible { background: var(--hover); }
.search-history-item [data-icon] { color: var(--muted); }
.icon-button { display: inline-grid; place-items: center; border-radius: 9px; background: transparent; color: var(--muted); width: 38px; height: 38px; padding: 0; flex: 0 0 auto; }
.icon-button:hover:not(:disabled) { color: var(--mint); background: var(--hover); }
.data-button { display: flex; align-items: center; justify-content: center; gap: 7px; background: var(--panel); color: var(--muted); padding: 0 13px; min-height: 42px; white-space: nowrap; border-radius: 11px; border: 1px solid var(--line); font-size: .9rem; }
.data-button[aria-pressed="true"] { color: var(--mint); background: #20332d; border-color: #354a40; }
.hero { min-height: 285px; isolation: isolate; display: flex; align-items: center; position: relative; overflow: hidden; background: #b9e7c7; color: #122824; border-radius: 21px; }
.hero-copy { z-index: 1; padding: 31px clamp(24px, 4vw, 51px); }
.hero-kicker { display: flex; align-items: center; gap: 6px; font-weight: 680; font-size: .83rem; letter-spacing: .05em; }
.hero-kicker svg { width: 16px; height: 16px; }
h1, h2, p { margin: 0; }
.hero h1 { font-size: clamp(2.15rem, 4.4vw, 4.25rem); line-height: 1.13; letter-spacing: -.06em; margin: 10px 0 12px; }
.hero-copy p { color: #2a4c40; line-height: 1.55; }
.primary { display: inline-flex; align-items: center; justify-content: center; gap: 9px; background: #18392e; color: #edf9f2; min-height: 44px; padding: 0 17px; border-radius: 10px; margin-top: 21px; font-weight: 680; }
.primary:hover { background: #265041; }
.hero-decoration { z-index: -1; position: absolute; right: 0; top: 0; width: 51%; height: 100%; overflow: hidden; pointer-events: none; }
.hero-decoration::before { content: ""; position: absolute; width: 86%; aspect-ratio: 1; right: -9%; top: 12%; background: #a3cba2; border-radius: 50%; }
.hero-decoration::after { content: ""; position: absolute; width: 55%; aspect-ratio: 1; top: -32%; right: 15%; border-radius: 50%; border: 1px solid #6a9b80; box-shadow: 0 0 0 14px #bce7c800, 0 0 0 15px #78a890, 0 0 0 28px #bce7c800, 0 0 0 29px #86b59a; }
.hero-record { position: absolute; width: min(74%, 340px); aspect-ratio: 1; top: 2%; right: 11%; z-index: 1; border-radius: 50%; background: radial-gradient(circle, #18392e 0 2%, #e8c378 2.5% 16%, #294238 16.5% 20%, transparent 20.5%), conic-gradient(from 16deg, #182b26, #486252 19%, #20342a 24%, #1e3028 55%, #61796a 71%, #22332b 77%, #182b26), #253932; box-shadow: 18px 25px 30px #2c483a52; }
.hero-record::after { content: ""; position: absolute; inset: 6%; border-radius: inherit; opacity: .53; background: repeating-radial-gradient(circle, transparent 0 6px, #bed6c226 7px 8px); mask-image: radial-gradient(circle, transparent 0 25%, #000 26%); }
.section { margin-top: 32px; }
.heading { display: flex; align-items: end; justify-content: space-between; flex-wrap: wrap; gap: 9px; margin-bottom: 13px; }
.heading h1, .heading h2 { line-height: 1.25; font-size: clamp(1.45rem, 2.8vw, 2rem); }
.heading p { margin-top: 5px; color: var(--muted); font-size: .93rem; line-height: 1.5; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0 16px; }
.chip { display: inline-flex; align-items: center; justify-content: center; gap: 5px; text-decoration: none; background: var(--panel); color: var(--muted); min-height: 38px; padding: 0 13px; border: 1px solid var(--line); border-radius: 9px; font-size: .9rem; }
.chip:hover, .chip.active { color: var(--mint); border-color: #456155; background: #22362e; }
.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.card { min-width: 0; background: var(--panel); padding: 9px; border-radius: 13px; border: 1px solid var(--line); }
.card:hover, .card.current { border-color: #567565; }
.card-main { display: block; width: 100%; text-align: left; padding: 0 0 5px; background: transparent; border-radius: 9px; }
.card-main strong, .card-main small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-left: 3px; }
.card-main strong { margin-top: 9px; font-size: .94rem; }
.card-main small { margin-top: 4px; color: var(--muted); font-size: .82rem; }
.art { --cover: #498879; --record: #172f29; --label: #b7e3c9; position: relative; display: block; background: var(--cover); overflow: hidden; isolation: isolate; border-radius: 9px; }
.card .art { aspect-ratio: 1.75; }
.art::before { content: ""; position: absolute; width: 65%; aspect-ratio: 1; right: 6%; top: 0%; border-radius: 50%; background: radial-gradient(circle, var(--record) 0 2%, var(--label) 3% 17%, transparent 18%), repeating-radial-gradient(circle, transparent 0 8%, #f2fff12b 8.5% 9.5%), conic-gradient(from 65deg, var(--record), #657263, var(--record) 40%, #5a655b 70%, var(--record)); box-shadow: 4px 7px 16px #17191355; }
.art::after { content: ""; z-index: -1; position: absolute; width: 56%; aspect-ratio: 1; top: -28%; left: -8%; border-radius: 50%; box-shadow: 0 0 0 1px #efffec66, 0 0 0 13px #efffec00, 0 0 0 14px #efffec66, 0 0 0 26px #efffec00, 0 0 0 27px #efffec66; }
.art.gold { --cover: #9d723e; --record: #33281c; --label: #f6cd82; }
.art.lilac { --cover: #725f94; --record: #271e37; --label: #d9c8f2; }
.art.coral { --cover: #a06966; --record: #392425; --label: #f2c69f; }
.art.sky { --cover: #537998; --record: #172a37; --label: #aed6f2; }
.art.oat { --cover: #778661; --record: #283526; --label: #e4dec0; }
.cover-play { position: absolute; left: 9px; bottom: 9px; border-radius: 50%; width: 35px; height: 35px; background: #101b17da; display: grid; place-items: center; }
.cover-play svg { width: 16px; height: 16px; color: var(--text); }
.collection .card-main { text-decoration: none; color: var(--text); }
.provider-label { position: absolute; top: 8px; left: 8px; border-radius: 5px; padding: 4px 6px; color: var(--text); font-size: .74rem; background: #121b19df; }
.provider-note { color: var(--muted); font-size: .88rem; line-height: 1.55; }
.youtube-player { background: var(--panel); border: 1px solid var(--line); padding: 14px; border-radius: 13px; }
.youtube-player h2 { font-size: 1.06rem; }
.youtube-frame { display: block; width: 100%; aspect-ratio: 16 / 9; min-height: 200px; border: 0; background: #080b0b; }
.youtube-settings { margin-top: 20px; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.youtube-settings label, .youtube-settings p { flex-basis: 100%; }
.youtube-settings input { min-width: 0; width: min(100%, 360px); border: 1px solid var(--line); border-radius: 9px; background: var(--panel); color: var(--text); padding: 9px 10px; }
.release-row { border: 1px solid var(--line); border-radius: 11px; padding: 10px 12px; margin-bottom: 8px; background: var(--panel); }
.release-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.release-head small { display: block; margin-top: 4px; color: var(--muted); }
.release-controls { display: flex; align-items: center; gap: 4px; }
.release-play { margin: 9px 0; }
.track-list { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.track-row { display: flex; align-items: center; min-height: 59px; border-bottom: 1px solid var(--line); padding: 5px 6px; gap: 8px; }
.track-row:hover, .track-row.current { background: var(--panel); }
.row-play { display: flex; text-align: left; background: transparent; min-width: 0; align-items: center; flex: 1; min-height: 44px; padding: 0 5px; gap: 12px; }
.row-play > span:last-child { min-width: 0; }
.row-play strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 640; }
.row-play small { display: block; color: var(--muted); margin-top: 4px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.row-art { width: 40px; height: 40px; }
.row-art > [data-icon] { position: absolute; inset: 0; display: grid; place-items: center; background: #11191752; color: var(--text); }
.row-art > [data-icon] svg { width: 20px; height: 20px; }
.row-tag { flex: 0 0 auto; font-size: .82rem; color: var(--muted); }
.source-link { padding: 9px; font-size: .82rem; color: var(--mint); }
.empty, .settings-note { color: var(--muted); padding: 20px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; line-height: 1.65; }
.empty a { color: var(--mint); }
.setting { display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.setting p { color: var(--muted); margin-top: 5px; line-height: 1.5; }
.setting .chip { flex: 0 0 auto; }
.settings-note { margin-top: 20px; }
.player { position: fixed; z-index: 5; inset: auto 0 0; min-height: 92px; display: grid; grid-template-columns: minmax(0,1fr) minmax(200px,460px) minmax(0,1fr); gap: 15px; align-items: center; padding: 10px 24px max(10px, env(safe-area-inset-bottom)); background: #171e1e; border-top: 1px solid var(--line); }
.playing { display: flex; min-width: 0; gap: 12px; align-items: center; }
.playing-art { width: 52px; height: 52px; flex: 0 0 auto; }
.playing-copy { min-width: 0; }
.playing-copy strong, .playing-copy span, .playing-copy a { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.playing-copy span, .playing-copy a { margin-top: 4px; font-size: .79rem; }
.playing-copy span { color: var(--muted); }
.transport { min-width: 0; }
.controls { display: flex; justify-content: center; align-items: center; gap: 10px; }
.play-main { display: grid; place-items: center; padding: 0; background: var(--mint); color: #102820; width: 43px; height: 43px; border-radius: 50%; flex: 0 0 auto; }
.play-main:hover:not(:disabled) { background: #cdfae5; }
.timeline { display: flex; align-items: center; gap: 9px; min-width: 0; font-size: .76rem; font-variant-numeric: tabular-nums; color: var(--muted); }
input[type="range"] { width: 100%; min-width: 0; accent-color: var(--mint); margin: 4px 0; }
.volume { display: flex; align-items: center; justify-self: end; width: min(120px, 100%); gap: 8px; color: var(--muted); }
.toast { position: fixed; z-index: 8; bottom: 105px; right: 18px; max-width: calc(100% - 36px); background: #263a30; color: #e9f8f0; padding: 11px 16px; border: 1px solid #486355; border-radius: 10px; font-size: .91rem; }
@media (max-width: 980px) {
  .app { grid-template-columns: 172px minmax(0,1fr); }
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .app { display: block; }
  .sidebar { display: none; }
  .main { padding: 16px 15px 172px; }
  .topbar { gap: 7px; margin-bottom: 16px; }
  .mobile-brand { display: flex; }
  .mobile-brand > span:last-child { display: none; }
  .mobile-brand .brand-icon { width: 37px; height: 37px; border-radius: 10px; }
  .data-button { gap: 4px; padding: 0 7px; min-height: 40px; font-size: .78rem; }
  .data-button svg { width: 16px; height: 16px; }
  .search input { min-height: 40px; }
  .search-icon { width: 25px; flex-basis: 25px; }
  .search-icon svg { width: 17px; height: 17px; }
  .search-submit { min-height: 34px; font-size: .76rem; padding: 0 6px; }
  .hero { min-height: 241px; border-radius: 15px; }
  .hero-copy { padding: 21px; }
  .hero-copy p { max-width: 13rem; font-size: .91rem; }
  .hero h1 { font-size: clamp(1.8rem, 7.2vw, 2.9rem); }
  .hero-decoration { width: 53%; opacity: .75; }
  .hero-record { width: 102%; top: 24%; right: -22%; }
  .hero-decoration::before { top: 28%; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .section { margin-top: 24px; }
  .row-tag { display: none; }
  .player { inset: auto 0 calc(55px + env(safe-area-inset-bottom)) 0; grid-template-columns: minmax(0,1fr) minmax(125px, 39%); gap: 6px; padding: 6px 12px; min-height: 71px; }
  .playing { gap: 8px; }
  .playing-art { width: 39px; height: 39px; }
  .playing-copy strong { font-size: .92rem; }
  .controls { gap: 1px; }
  .controls .icon-button { width: 33px; height: 33px; }
  .play-main { width: 34px; height: 34px; }
  .timeline { gap: 4px; }
  .volume { display: none; }
  .mobile-nav { position: fixed; z-index: 5; bottom: 0; inset-inline: 0; display: grid; grid-template-columns: repeat(4, 1fr); height: calc(55px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); border-top: 1px solid var(--line); background: #13191a; }
  .mobile-nav .nav { justify-content: center; flex-direction: column; gap: 2px; padding: 4px; text-align: center; font-size: .74rem; border-radius: 0; }
  .toast { bottom: calc(137px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: no-preference) {
  button, .card { transition: background-color .15s, border-color .15s, color .15s; }
}
@media (max-width: 440px) {
  .topbar { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
  .topbar .search { grid-column: 1 / -1; grid-row: 2; }
  .mobile-brand > span:last-child { display: inline; }
}

.youtube-remember input { width: auto; }
