:root {
  color-scheme: light;
  --paper: #f4f1e8;
  --ink: #172d1d;
  --muted: #545f50;
  --line: #c8cdbc;
  --tint: #e9eadd;
  --selected: #e1e5d6;
  --panel-detail: #c7d1bd;
  --panel-hover: #304935;
  --font: "Helvetica Neue", Helvetica, Arial, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 1rem/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}
button, input, select, a { font: inherit; }
button, select { cursor: pointer; }
button { border: 0; background: none; color: inherit; }
a { color: inherit; text-underline-offset: .2em; }
svg { display: block; width: 22px; height: 22px; }
.symbols, [hidden] { display: none !important; }
:where(button, a, select, input):focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}
.shell {
  max-width: 1300px;
  margin: 0 auto;
  padding: clamp(34px, 4.6vw, 74px) clamp(22px, 4.8vw, 68px) 72px;
}
.mast {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 12px 20px;
  border-bottom: 1px solid var(--ink);
  padding-bottom: clamp(21px, 2.7vw, 38px);
  margin-bottom: clamp(25px, 3.2vw, 46px);
}
h1 {
  margin: 0;
  font-size: clamp(3rem, 7.1vw, 6.6rem);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -.065em;
  word-break: keep-all;
}
.library-qr {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid var(--ink);
  border-radius: 6px;
  font-size: .94rem;
  white-space: nowrap;
}
.library-qr:hover, #dismiss:hover, .share-actions a:hover { background: var(--tint); }
.layout {
  display: grid;
  grid-template-columns: minmax(0, .96fr) minmax(0, 1.27fr);
  gap: clamp(28px, 4.6vw, 72px);
  align-items: start;
}
.player { min-width: 0; position: sticky; top: 24px; }
.surface {
  padding: clamp(24px, 2.7vw, 40px);
  background: var(--ink);
  color: var(--paper);
  border-radius: 8px;
}
.surface :focus-visible, .mini :focus-visible { outline-color: var(--paper); }
.track-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--panel-detail);
  font-size: .94rem;
}
.track-share, .transport button, #dismiss, .mini-control {
  display: grid;
  flex: none;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
}
.track-share { margin: -7px -7px -7px 0; }
.track-share:hover, .transport button:not(.primary):hover, .mini-control:hover { background: var(--panel-hover); }
.track-share svg { width: 20px; height: 20px; }
.surface h2 {
  margin: 26px 0 9px;
  font-size: clamp(2.1rem, 3.7vw, 3.7rem);
  font-weight: 520;
  letter-spacing: -.045em;
  line-height: 1.1;
  text-wrap: pretty;
  overflow-wrap: anywhere;
}
.credits { color: var(--panel-detail); font-size: 1rem; line-height: 1.5; overflow-wrap: anywhere; }
.scope { position: relative; height: clamp(86px, 8vw, 124px); margin: clamp(32px, 3.8vw, 60px) 0 6px; }
.scope canvas, .scope input { position: absolute; inset: 0; width: 100%; height: 100%; }
.scope input { opacity: 0; margin: 0; cursor: pointer; }
.scope:focus-within { outline: 2px solid var(--paper); outline-offset: 4px; }
.times { display: flex; justify-content: space-between; color: var(--panel-detail); font-size: .88rem; font-variant-numeric: tabular-nums; }
.transport { display: flex; align-items: center; justify-content: center; gap: clamp(15px, 2vw, 32px); margin: 22px 0 0; }
.transport button:disabled { opacity: .5; }
.transport .primary { width: 60px; height: 60px; color: var(--ink); background: var(--paper); }
.transport .primary:hover { background: #fff; }
.primary svg { width: 26px; height: 26px; }
#error { color: #753a20; line-height: 1.55; }

.library { min-width: 0; }
.tabs { display: flex; flex-wrap: wrap; align-items: stretch; gap: 3px clamp(16px, 2.5vw, 38px); border-bottom: 1px solid var(--line); }
.tabs button {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  min-height: 44px;
  padding: 5px 0 13px;
  font-size: clamp(1rem, 1.48vw, 1.3rem);
  font-weight: 500;
  letter-spacing: -.025em;
  color: var(--muted);
}
.tabs button[aria-pressed=true] { color: var(--ink); }
.tabs button[aria-pressed=true]::after { content: ""; position: absolute; inset: auto 0 -1px; height: 3px; background: var(--ink); }
.tabs button:hover { color: var(--ink); }
.tabs small { color: var(--muted); font-size: .83rem; letter-spacing: normal; font-variant-numeric: tabular-nums; }
#filter-wrap { padding-top: 18px; }
.filterbox { position: relative; display: inline-flex; max-width: 100%; }
.filterbox select {
  max-width: 100%;
  min-height: 44px;
  padding: 7px 40px 7px 14px;
  appearance: none;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid #909c86;
  border-radius: 6px;
}
.filterbox svg { position: absolute; right: 14px; top: 15px; width: 15px; height: 15px; pointer-events: none; }
.group-title { margin: 28px 0 3px; font-size: 1.16rem; font-weight: 600; line-height: 1.45; overflow-wrap: anywhere; }
.track {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  width: 100%;
  min-height: 78px;
  align-items: center;
  gap: 14px;
  padding: 14px 11px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
.track:hover { background: var(--tint); }
.track[aria-current=true] { background: var(--selected); }
.track:focus-visible { position: relative; z-index: 1; outline-offset: -2px; }
.row-icon {
  display: grid;
  place-items: center;
  width: 33px;
  height: 33px;
  border: 1px solid #8c9786;
  border-radius: 50%;
  color: var(--ink);
}
.row-icon svg { width: 15px; height: 15px; }
.track[aria-current=true] .row-icon { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.row-title { display: block; font-size: clamp(1.06rem, 1.48vw, 1.35rem); font-weight: 550; letter-spacing: -.018em; line-height: 1.35; overflow-wrap: anywhere; }
.row-note { display: block; margin-top: 3px; color: var(--muted); font-size: .89rem; line-height: 1.45; overflow-wrap: anywhere; }
.row-time { color: var(--muted); font-size: .89rem; font-variant-numeric: tabular-nums; }
.mini { display: none; }

dialog {
  width: min(370px, calc(100% - 32px));
  max-height: calc(100% - 32px);
  padding: 20px 24px 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
}
dialog::backdrop { background: rgb(12 28 16 / .66); }
.dialog-title, .share-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dialog-title h2 { margin: 0; font-size: 1.25rem; font-weight: 550; line-height: 1.4; letter-spacing: -.025em; overflow-wrap: anywhere; }
dialog img { display: block; width: min(88%, 220px); height: auto; margin: 15px auto; image-rendering: pixelated; }
.url { display: block; text-align: center; overflow-wrap: anywhere; color: var(--muted); font-size: .94rem; }
.share-actions { margin-top: 22px; }
.share-actions > * { flex: 1; display: grid; place-items: center; min-height: 44px; padding: 9px; border: 1px solid var(--ink); border-radius: 6px; text-decoration: none; }
.share-actions button { background: var(--ink); color: var(--paper); }
.share-actions button:hover { background: var(--panel-hover); }
#copy-msg { margin: 9px 0 0; text-align: center; font-size: .9rem; }
#copy-msg:empty { display: none; }

@media (max-width: 740px) {
  .shell { padding: 30px 20px 112px; }
  .mast { align-items: center; padding-bottom: 22px; margin-bottom: 23px; }
  h1 { font-size: clamp(2.5rem, 9.8vw, 4.4rem); }
  .layout { display: block; }
  .player { position: static; }
  .surface { padding: 21px 23px; }
  .surface h2 { margin-top: 17px; font-size: clamp(2.05rem, 7.7vw, 3.15rem); }
  .scope { height: 60px; margin-top: 22px; }
  .transport { gap: 22px; margin-top: 9px; }
  .transport .primary { width: 50px; height: 50px; }
  .primary svg { width: 23px; }
  .library { margin-top: 28px; }
  .tabs { column-gap: 20px; }
  .tabs button { font-size: clamp(.94rem, 3.75vw, 1.16rem); padding-bottom: 12px; }
  .track { min-height: 69px; padding: 12px 7px; gap: 9px; }
  .mini:not([hidden]) {
    position: fixed;
    inset: auto 0 0;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 8px max(16px, env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
    color: var(--paper);
    background: var(--ink);
  }
  #back-player { flex: 1; min-width: 0; min-height: 44px; padding: 4px 8px 4px 0; text-align: left; }
  #mini-title { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 1rem; font-weight: 550; }
  #mini-time { display: block; color: var(--panel-detail); font-size: .86rem; font-variant-numeric: tabular-nums; }
}
@media (max-width: 360px) {
  .shell { padding-inline: 15px; }
  .tabs { column-gap: 13px; }
  .library-qr { padding-inline: 10px; }
}
@media (max-height: 490px) and (min-width: 741px) {
  .player { position: static; }
}
@media (prefers-reduced-motion: no-preference) {
  button, .share-actions a { transition: background-color .14s ease; }
}
@media (forced-colors: active) {
  .scope canvas { visibility: hidden; }
  .scope input { opacity: 1; }
  .track[aria-current=true] .row-icon { outline: 2px solid Highlight; }
  .tabs button[aria-pressed=true] { text-decoration: underline; text-underline-offset: .24em; }
}
