/* Visual language from the original albums.gage.cool. Layout lives in the existing styles. */
:root {
  --bg: #05050f;
  --panel: #080d17;
  --text: #e0e0f0;
  --muted: #a0a0b8;
  --accent: #20e3b2;
  --line: rgba(224, 230, 255, .11);
  --font: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-heading: Georgia, 'Times New Roman', serif;
  --font-mono: ui-monospace, 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
  --glass-surface: linear-gradient(145deg, rgba(255,255,255,.035), rgba(255,255,255,.004) 36%, rgba(4,8,18,.24)), rgba(4,8,18,.72);
  --glass-shadow: inset 0 1px 0 rgba(255,255,255,.04), 0 25px 50px -12px rgba(0,0,0,.42);
}
html { background: #010207; }
body { background: transparent; color: var(--text); }
::selection { background: #20e3b24d; }
#aurora-background {
  position: fixed;
  inset: 0 0 auto;
  z-index: 0;
  width: 100%;
  height: var(--app-stable-viewport-height, 100lvh);
  overflow: hidden;
  pointer-events: none;
  background: linear-gradient(180deg, #010207 0%, #030715 55%, #06101f 100%);
}
#app { position: relative; z-index: 1; }
#modal-root { position: relative; z-index: 50; }
.topbar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 13px;
  background: linear-gradient(180deg, rgba(1,3,10,.76), rgba(1,3,10,.3) 70%, transparent);
}
.topbar .logo-button {
  width: 44px;
  height: 44px;
  border-radius: 9px;
  overflow: hidden;
  font-family: var(--font);
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -.035em;
  color: rgba(245,247,255,.94);
}
.menu-logo { display: block; width: 44px; height: 44px; object-fit: contain; }
.logo-suffix { color: rgba(191,222,226,.74); font-weight: 400; }
.topbar h1 {
  font-family: var(--font);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: .1em;
  text-transform: uppercase;
  border-left: 1px solid rgba(224,230,255,.18);
  padding-left: 13px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: rgba(224,230,255,.6);
}
.topbar .stack-tools { position: static; gap: 0; margin-left: auto; }
.topbar .stack-tools .icon-btn { width: 36px; height: 44px; }
.topbar .popover, .topbar .searchbar { top: calc(100% + 6px); right: var(--stack-margin); max-width: calc(100vw - 32px); }
.edit-list { padding-top: calc(var(--stack-header-height) + 12px); }
/* Reveal the sky beneath the header instead of showing album art through its text.
   The mask follows the same scroll offset as the bar and vanishes with it. */
:root { --header-visible-height: max(0px, calc(var(--stack-header-height) - var(--header-offset, 0px))); }
.workspace .stack-stage, .workspace .edit-list {
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, transparent var(--header-visible-height), #000 calc(var(--header-visible-height) * 1.35));
  mask-image: linear-gradient(to bottom, transparent 0, transparent var(--header-visible-height), #000 calc(var(--header-visible-height) * 1.35));
}
@media(max-width:360px) { .topbar { gap: 10px; } }
.album-title {
  font-family: var(--font-heading);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(18px, 1.5vw, 22px);
  letter-spacing: 0;
  color: rgba(238,240,255,.82);
}
.focused .album-title { color: #f5f6ff; }
.album-credit, .album-year { color: rgba(224,230,255,.55); }
.album-credit { font-size: 12px; letter-spacing: .035em; }
.stack-tools .icon-btn { color: rgba(224,230,255,.5); }
.icon-btn { color: rgba(224,230,255,.6); }
.icon-btn:hover, .quiet-link:hover { color: #f5f6ff; background: rgba(255,255,255,.045); }
.icon-btn.active { color: var(--accent); background: rgba(32,227,178,.06); }
.stack-row .album-card {
  box-shadow: 0 1px 0 #dfe8ff50, 1px 3px 0 #101422, 0 10px 18px -8px #000c;
}
.screen-shade, .modal-overlay {
  background: rgba(1,3,10,.32);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.menu-panel, .details-panel, .modal, .popover, .searchbar, .assistant-box {
  background: var(--glass-surface);
  border-color: rgba(255,255,255,.09);
  box-shadow: var(--glass-shadow);
  -webkit-backdrop-filter: blur(5px) saturate(135%);
  backdrop-filter: blur(5px) saturate(135%);
  background-clip: padding-box;
}
.menu-panel {
  border-radius: 0 28px 28px 0;
  background-color: rgba(3,8,20,.72);
}
.details-panel { border-radius: 28px 0 0 0; }
.modal { border-radius: 28px; }
.popover, .searchbar { border-radius: 20px; }
.assistant-box { border-radius: 24px; }
.details-panel h2, .modal-heading h2, .empty-state h2 {
  font-family: var(--font-heading);
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.12;
  color: #f3f3ff;
}
.details-panel h2 { font-size: 34px; }
.modal-heading h2 { font-size: 29px; }
.section-heading h3, .album-tracks summary > span, .popover h3 {
  font-family: var(--font-heading);
  font-style: italic;
  font-weight: 400;
  font-size: 19px;
  color: rgba(236,239,255,.8);
  letter-spacing: 0;
}
.details-panel .artist {
  font-family: var(--font);
  text-transform: uppercase;
  letter-spacing: .13em;
  font-size: 12px;
  line-height: 1.8;
  color: rgba(224,230,255,.65);
}
.artist .year, .album-genres, .rank-credit {
  font-family: var(--font-mono);
  color: rgba(224,230,255,.48);
  font-size: 12px;
  letter-spacing: .035em;
}
.album-genres { gap: 6px 12px; }
.menu-panel .menu-items button {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 28px;
  letter-spacing: 0;
}
.menu-panel button[aria-current="page"] { color: var(--accent); }
.menu-panel .menu-links button {
  font-family: var(--font);
  font-size: 14px;
  color: rgba(224,230,255,.61);
}
.menu-bottom { border-color: var(--line); }
.avatar { background: rgba(32,227,178,.07); color: var(--accent); border: 1px solid rgba(32,227,178,.17); }
.menu-bottom strong { color: rgba(235,239,255,.8); }
.quiet-link, .field label, .filter-options legend { color: rgba(224,230,255,.6); }
.quiet-link { font-size: 13px; }
.section-line, .track-row, .album-log li, .edit-row, .result-row, .assistant-head, .assistant-input {
  border-color: var(--line);
}
.log-entry-meta, .album-tracks summary small, .section-heading small,
.track-progress span, .track-row .duration {
  color: rgba(224,230,255,.5);
  font-family: var(--font-mono);
}
.album-log p, .muted { color: rgba(235,239,255,.8); }
.micro { color: rgba(224,230,255,.52); }
.result-row small, .tour-gesture { color: rgba(224,230,255,.55); }
.assistant-input input { color: var(--text); }
.assistant-input .listening { color: #05050f; background: var(--accent); }
.tour-dots i { background: rgba(255,255,255,.2); }
.tour-dots i.on { background: var(--accent); }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 1px solid rgba(224,230,255,.65);
  outline-offset: 4px;
}
.track-row { color: rgba(235,239,255,.78); font-size: 14px; font-weight: 400; }
.track-row span:first-child { color: rgba(224,230,255,.38); }
.track-row.playing, .track-row.playing span:first-child { color: var(--accent); }
.current-track-title { font-family: var(--font); font-size: 15px; font-weight: 400; color: rgba(239,241,255,.85); }
.album-playback-controls .icon-btn {
  width: 44px;
  border-radius: 0;
  border-bottom: 1px solid rgba(255,255,255,.13);
  color: rgba(235,239,255,.6);
}
.album-playback-controls .record-play {
  border-top: 1px solid rgba(255,255,255,.18);
  border-bottom-color: rgba(255,255,255,.18);
  color: rgba(245,247,255,.95);
}
.album-playback-controls .icon-btn:hover {
  border-color: rgba(255,255,255,.4);
  color: #fff;
  background: transparent;
}
.album-playback-controls .active { color: var(--accent); }
.category-chip {
  background: rgba(255,255,255,.02);
  border-color: rgba(255,255,255,.12);
  border-radius: 7px;
  color: rgba(235,239,255,.62);
  font-size: 13px;
}
.category-chip.selected {
  color: var(--accent);
  background: rgba(32,227,178,.075);
  border-color: rgba(32,227,178,.25);
}
.field input, .field select, .field textarea, .input {
  background-color: rgba(255,255,255,.018);
  border-color: rgba(255,255,255,.13);
  border-radius: 9px;
  color: rgba(235,239,255,.88);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.025);
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: rgba(255,255,255,.35);
  background-color: rgba(255,255,255,.035);
}
select option { background: #080d17; color: var(--text); }
.pill {
  color: var(--accent);
  background: rgba(32,227,178,.1);
  border: 1px solid rgba(32,227,178,.22);
  border-radius: 9px;
  font-weight: 400;
}
.pill:hover { background: rgba(32,227,178,.17); }
.pill.secondary {
  background: rgba(255,255,255,.025);
  border-color: rgba(255,255,255,.14);
  color: rgba(235,239,255,.75);
}
.player {
  background: linear-gradient(160deg, rgba(255,255,255,.075), rgba(255,255,255,.008) 48%), rgba(3,6,14,.16);
  border-color: rgba(225,247,255,.16);
  box-shadow: 0 14px 38px rgba(0,0,0,.28), inset 0 1px rgba(255,255,255,.1), inset 0 -1px rgba(255,255,255,.025);
  -webkit-backdrop-filter: blur(14px) saturate(165%);
  backdrop-filter: blur(14px) saturate(165%);
}
.player-meta strong { font-family: var(--font-heading); font-style: italic; font-size: 18px; font-weight: 400; color: #f1f3ff; }
.player-meta span { color: rgba(224,230,255,.55); }
.player-meta .track-name { color: rgba(224,230,255,.75); }
.player-controls .play-toggle {
  color: rgba(245,247,255,.85);
  border: 1px solid rgba(255,255,255,.17);
  border-radius: 50%;
  background: rgba(255,255,255,.025);
}
.player-controls .play-toggle:hover { border-color: rgba(255,255,255,.4); color: #fff; }
.tonearm, .tonearm:after { border-color: #b0bcc8; }
.tonearm:after { background: #b0bcc8; }
.edit-row strong { font-family: var(--font); font-weight: 400; color: rgba(239,241,255,.88); }
.edit-row small, .edit-row .row-note { color: rgba(224,230,255,.5); }
.edit-row .rank-input {
  color: var(--accent);
  font-family: var(--font-mono);
  border-color: rgba(255,255,255,.13);
  background: rgba(0,0,0,.12);
  appearance: textfield;
}
.rank-input::-webkit-inner-spin-button { appearance: none; }
.edit-row.being-dragged { background: rgba(4,8,18,.92); border-radius: 12px; }
.edit-row .grab-handle { color: rgba(224,230,255,.44); }
.assistant-launch {
  color: rgba(235,239,255,.7);
  background: rgba(4,8,18,.38);
  border-color: rgba(255,255,255,.14);
  box-shadow: 0 8px 25px rgba(0,0,0,.25);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
}
.assistant-launch:after { border-color: rgba(255,255,255,.07); }
.chat-message { color: rgba(235,239,255,.8); }
.chat-message.user { background: rgba(32,227,178,.08); color: var(--text); }
.chat-example { border-color: rgba(255,255,255,.12); color: rgba(224,230,255,.65); }
.notice { border-color: rgba(255,255,255,.13); background: rgba(255,255,255,.025); color: rgba(224,230,255,.65); }
.lyric-line { color: rgba(224,230,255,.48); }
.lyric-line.active { color: var(--accent); }
.lyrics-status, .lyrics-source { color: rgba(224,230,255,.5); }
#toast {
  background: rgba(6,19,23,.95);
  border: 1px solid rgba(32,227,178,.2);
  color: var(--text);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,.3);
}
* { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.17) transparent; }
@supports not (backdrop-filter: blur(5px)) {
  .menu-panel, .details-panel, .modal, .popover, .searchbar, .assistant-box { background: rgba(4,8,18,.94); }
}
@media(max-width:767px) {
  #aurora-background { height: calc(var(--app-stable-viewport-height, 100lvh) + 240px); }
  .topbar .logo-button { font-size: 16px; }
  .topbar h1 { font-size: 10px; letter-spacing: .08em; }
  .details-panel { border-radius: 24px 0 0 0; }
  .details-panel h2 { font-size: 29px; }
  .album-title { font-size: 19px; }
  .player-meta strong { font-size: 17px; }
  /* A full-width glass pane looks onto the sky, without a second layer of album text. */
  body:has(.album-details, .menu-panel) .workspace { visibility: hidden; }
  body:has(.modal-overlay) #app { visibility: hidden; }
  .menu-panel, .details-panel { background-color: rgba(4,8,18,.54); }
}
:root { --form-error: #e8a3ad; }
.form-error { color: var(--form-error); font-size: 13px; line-height: 1.5; }
.admin-request p { overflow-wrap: anywhere; }
