/* The editor. Mobile is one pane at a time; from 900px the panes sit side by side. */

body { overflow-x: hidden; }

/* Album art, blown up and blurred, lights the room so the glass has something to bend. */
.ambient { position: fixed; inset: -20%; z-index: -1; pointer-events: none; opacity: 0; transition: opacity 0.9s var(--ease-out); }
.ambient.on { opacity: 0.42; }
.ambient img { width: 100%; height: 100%; object-fit: cover; filter: blur(90px) saturate(1.4); transform: scale(1.1); }
.ambient::after { content: ""; position: absolute; inset: 0; background: radial-gradient(70% 60% at 50% 40%, transparent, var(--ink-0) 85%); }

/* ---------- top bar ---------- */
.topbar {
  position: fixed; z-index: 30; top: calc(var(--s3) + env(safe-area-inset-top)); left: 50%; translate: -50% 0;
  width: min(1200px, calc(100% - 2 * var(--s3))); display: flex; align-items: center; gap: var(--s3);
  padding: 5px 5px 5px var(--s4); border-radius: 999px;
}
.top-actions { margin-left: auto; display: flex; gap: var(--s2); }
.local-chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 var(--s3); border-radius: 99px; white-space: nowrap;
  border: 0; background: transparent; color: var(--paper-2); font-size: var(--t-xs); font-weight: 600; cursor: help;
}
.local-chip svg { width: 14px; height: 14px; color: var(--accent); }
.local-chip:hover { color: var(--paper); }
.tip {
  position: absolute; top: calc(100% + 8px); left: 120px; width: min(320px, calc(100vw - 32px)); padding: var(--s3) var(--s4);
  background: var(--ink-2); border-radius: 14px; font-size: var(--t-sm); color: var(--paper-2); box-shadow: 0 12px 30px rgba(0,0,0,.5);
  opacity: 0; scale: 0.95; transform-origin: top left; pointer-events: none;
  transition: opacity var(--dur-exit) ease-in, scale var(--dur-exit) ease-in;
}
.local-chip:hover + .tip, .local-chip:focus-visible + .tip, .tip.show { opacity: 1; scale: 1; transition-duration: var(--dur-base); transition-timing-function: var(--ease-out); }

.tint-menu {
  position: absolute; right: 120px; top: calc(100% + 8px); padding: var(--s2); border-radius: 18px; min-width: 230px;
  background: rgba(30, 27, 24, 0.97); transform-origin: top right;
  opacity: 1; scale: 1; transition: opacity var(--dur-base) var(--ease-out), scale var(--dur-base) var(--ease-out), display var(--dur-base) allow-discrete;
}
.tint-menu[hidden] { opacity: 0; scale: 0.95; transition-duration: var(--dur-exit); transition-timing-function: ease-in; }
@starting-style { .tint-menu { opacity: 0; scale: 0.95; } }
.tint-menu .menu-links > * { animation: row-in var(--dur-base) var(--ease-out) backwards; }
.tint-menu .menu-links > :nth-child(2) { animation-delay: 30ms; }
.tint-menu .menu-links > :nth-child(3) { animation-delay: 60ms; }
.tint-menu .menu-links > :nth-child(4) { animation-delay: 90ms; }
@keyframes row-in { from { opacity: 0; translate: 0 4px; } }
.menu-links { display: grid; }
.menu-links a { display: flex; align-items: center; min-height: 44px; padding: 0 var(--s2); border-radius: 10px; color: var(--paper); text-decoration: none; font-size: var(--t-sm); }
.menu-links a:hover { background: rgba(243,236,226,.08); }

/* ---------- upload screen (the app opens here) ---------- */
.welcome { min-height: 100dvh; display: grid; padding: calc(84px + env(safe-area-inset-top)) max(var(--s4), env(safe-area-inset-right)) calc(var(--s5) + env(safe-area-inset-bottom)) max(var(--s4), env(safe-area-inset-left)); }
.dropzone {
  width: min(680px, 100%); margin: 0 auto; display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 0 var(--s6) var(--s7); border-radius: 32px; border: 1.5px dashed var(--line-strong); overflow: hidden;
  transition: border-color .25s, background-color .25s;
}
body.dragging .dropzone { border-color: var(--accent); background: var(--accent-soft); }
.welcome h1 { font-size: var(--t-2xl); letter-spacing: -0.03em; font-weight: 700; margin-top: var(--s5); }
.lede { margin-top: var(--s3); font-size: var(--t-md); line-height: 1.55; color: var(--paper-2); max-width: 42ch; }
.welcome-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s3); margin-top: var(--s6); }
.mobile-link { display: none; }
.formats { margin-top: var(--s4); font-size: var(--t-xs); color: var(--paper-3); }
.install-hint { margin-top: var(--s5); }
.hang { position: relative; width: 100%; height: 270px; flex: none; }
.pendulum { position: absolute; left: 50%; top: 0; width: 158px; translate: -50% 0; transform-origin: 50% 0; display: grid; justify-items: center; }
.pendulum .string { width: 1.5px; height: 64px; background: linear-gradient(transparent, var(--paper-3) 30%, var(--paper-2)); margin-bottom: -26px; position: relative; z-index: 1; }
.tag-big {
  position: relative; width: 100%; aspect-ratio: 0.72; background: var(--accent); color: var(--accent-ink); border-radius: 14px;
  clip-path: polygon(22% 0, 78% 0, 100% 16%, 100% 100%, 0 100%, 0 16%);
  box-shadow: 0 30px 60px -20px rgba(0,0,0,.6); transition: background-color .4s;
}
.tag-big .eyelet { position: absolute; left: 50%; top: 7%; width: 13%; aspect-ratio: 1; translate: -50% 0; border-radius: 50%; background: var(--ink-0); box-shadow: 0 0 0 4px color-mix(in oklab, var(--accent), black 14%); }
.tag-lines { position: absolute; left: 12%; right: 12%; bottom: 11%; display: grid; gap: 6px; font-family: var(--font-mono); font-size: 0.66rem; text-align: left; }
.tag-lines b { font-weight: 500; padding-bottom: 4px; border-bottom: 1px solid color-mix(in oklab, var(--accent-ink) 25%, transparent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tag-lines b:first-child { font: 700 1.1rem/1.1 var(--font-display); letter-spacing: -0.02em; }
body.dragging .tag-big { background: color-mix(in oklab, var(--accent), white 18%); }

.dropveil {
  position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; pointer-events: none; opacity: 0;
  background: color-mix(in oklab, var(--ink-0) 70%, transparent); transition: opacity .2s;
}
.dropveil p { font: 650 var(--t-2xl)/1 var(--font-display); color: var(--accent); padding: var(--s5) var(--s6); border: 2px dashed var(--accent); border-radius: 28px; }
body.dragging:not([data-view="welcome"]) .dropveil { opacity: 1; }

/* ---------- workspace ---------- */
.workspace { display: grid; grid-template-columns: 280px minmax(0, 1fr) 360px; height: 100dvh; padding-top: calc(76px + env(safe-area-inset-top)); }
.workspace > * { overflow-y: auto; overscroll-behavior: contain; padding: var(--s5) var(--s5) var(--s7); }
.shelf { border-right: 1px solid var(--line); }
.inspector { border-left: 1px solid var(--line); }
.pane-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); margin-bottom: var(--s4); min-height: 36px; }
.pane-head h2 { font-size: var(--t-lg); }
.pane-actions { display: flex; align-items: center; gap: var(--s2); }
.shelf > .pane-head { flex-wrap: wrap; }
.shelf > .pane-head .pane-actions { flex: 1 1 100%; justify-content: flex-end; flex-wrap: wrap; }
.back { display: none; }
.engine { font-size: var(--t-sm); color: var(--paper-2); margin-bottom: var(--s3); }
.engine progress { display: block; width: 100%; height: 3px; margin-top: var(--s2); appearance: none; border: 0; border-radius: 3px; background: var(--ink-3); overflow: hidden; }
.engine progress::-webkit-progress-bar { background: var(--ink-3); }
.engine progress::-webkit-progress-value { background: var(--accent); transition: width .2s; }
.engine progress::-moz-progress-bar { background: var(--accent); }

.shelf-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.shelf-item {
  width: 100%; display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: var(--s3);
  padding: 6px; border: 0; border-radius: var(--r-row); background: none; text-align: left; cursor: pointer;
  transition: background-color .15s;
}
.shelf-item:hover { background: rgba(243,236,226,.05); }
.shelf-item[aria-current="true"] { background: var(--accent-soft); }
.thumb { width: 48px; height: 48px; border-radius: var(--r-art); background: var(--ink-3); object-fit: cover; display: grid; place-items: center; color: var(--paper-3); }
.thumb svg { width: 20px; height: 20px; }
.shelf-item strong { display: block; font-weight: 600; font-size: var(--t-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shelf-item small { display: block; color: var(--paper-2); font-size: var(--t-xs); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--signal); margin-right: 6px; }
.dot.ok { background: var(--accent); }
.shelf-foot { margin-top: var(--s5); font-size: var(--t-xs); color: var(--paper-3); }
.shelf-item.busy small::after { content: " · reading…"; }

/* album */
.album-head { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: var(--s6); align-items: start; margin-bottom: var(--s7); }
.art-wrap { position: relative; }
.art {
  position: relative; width: 100%; aspect-ratio: 1; border: 0; padding: 0; cursor: pointer; border-radius: var(--r-art);
  background: var(--ink-2); overflow: hidden; box-shadow: 0 24px 50px -18px rgba(0,0,0,.7), 0 0 0 1px var(--line);
  view-transition-name: album-art;
}
.art img { width: 100%; height: 100%; object-fit: cover; }
.art-empty { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: var(--s2); color: var(--paper-2); font-size: var(--t-sm); font-weight: 600; }
.art-empty svg { width: 28px; height: 28px; }
.art img:not([hidden]) ~ .art-empty { display: none; }
.art:hover::after { content: "Change cover"; position: absolute; inset: auto 0 0; padding: var(--s3); background: linear-gradient(transparent, rgba(0,0,0,.7)); font-size: var(--t-sm); font-weight: 600; text-align: left; }
.art.dropping { outline: 2px dashed var(--accent); outline-offset: 4px; }

.check-tag {
  position: absolute; right: -14px; bottom: -18px; transform-origin: 14px 50%; rotate: -6deg;
  display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px 0 26px;
  background: var(--accent); color: var(--accent-ink); font-size: var(--t-xs); font-weight: 700; letter-spacing: 0.01em;
  clip-path: polygon(12px 0, 100% 0, 100% 100%, 12px 100%, 0 50%); border-radius: 0 6px 6px 0;
  box-shadow: 0 8px 20px rgba(0,0,0,.4); white-space: nowrap;
}
.check-tag .eyelet { position: absolute; left: 11px; top: 50%; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%; background: var(--ink-0); }
.check-tag.warn { background: var(--signal); color: #2a0a03; }
.check-tag { transition: opacity var(--dur-base) var(--ease-out), scale var(--dur-base) var(--ease-out); }
.check-tag.ready { opacity: 0; scale: 0.85; pointer-events: none; transition-duration: var(--dur-exit); transition-timing-function: ease-in; }

.album-title {
  width: 100%; border: 0; background: none; padding: 2px 0; font: 700 var(--t-2xl)/1.1 var(--font-display); letter-spacing: -0.03em;
  border-bottom: 1px solid transparent; transition: border-color .2s;
}
.album-title:hover { border-bottom-color: var(--line-strong); }
.album-title:focus { border-bottom-color: var(--accent); }
.album-title::placeholder { color: var(--paper-3); }
.field-row { display: flex; gap: var(--s3); align-items: end; margin-top: var(--s4); flex-wrap: wrap; }
.field-row > .field { flex: 1 1 140px; }
.field-row > .field.narrow { flex: 0 1 92px; }
.field { display: grid; gap: 6px; margin-top: var(--s4); }
.field-row .field { margin-top: 0; }
.field > span, .field > label, .artists legend, .join label { font-size: var(--t-xs); font-weight: 600; color: var(--paper-2); }
.field input, .field select, .field textarea, .artists input, .join input {
  width: 100%; min-height: 44px; padding: 10px 12px; border-radius: var(--r-field); border: 1px solid var(--line);
  background: rgba(243,236,226,.04); transition: border-color .15s, background-color .15s;
}
.field textarea { resize: vertical; line-height: 1.5; }
.field select { appearance: none; padding-right: 32px; background-image: linear-gradient(45deg, transparent 50%, var(--paper-2) 50%), linear-gradient(135deg, var(--paper-2) 50%, transparent 50%); background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.field select option { background: var(--ink-1); }
.field input:hover, .field textarea:hover, .artists input:hover { border-color: var(--line-strong); }
.field input:focus, .field textarea:focus, .field select:focus, .artists input:focus, .join input:focus { border-color: var(--accent); background: rgba(243,236,226,.06); outline: none; }
::placeholder { color: var(--paper-3); opacity: 1; }
.hint { margin-top: var(--s2); font-size: var(--t-xs); color: var(--paper-3); }

.switch { display: inline-flex; align-items: center; gap: var(--s3); min-height: 44px; cursor: pointer; font-size: var(--t-sm); }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .knob { flex: none; width: 42px; height: 26px; border-radius: 99px; background: var(--ink-3); position: relative; transition: background-color .25s; }
.switch .knob::after { content: ""; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--paper); transition: translate .25s var(--ease-io); box-shadow: 0 2px 4px rgba(0,0,0,.3); animation: knob-off .25s var(--ease-io); }
.switch input:checked + .knob::after { animation-name: knob-on; }
@keyframes knob-on { 50% { scale: 1.12 0.89; } }
@keyframes knob-off { 50% { scale: 1.12 0.89; } }
.switch input:checked + .knob { background: var(--accent); }
.switch input:checked + .knob::after { translate: 16px 0; }
.switch input:focus-visible + .knob { outline: 2px solid var(--accent); outline-offset: 2px; }
.switch.block { display: flex; align-items: flex-start; margin-top: var(--s4); }
.switch.block .knob { margin-top: 2px; }
.switch small, .seg small { display: block; color: var(--paper-2); font-size: var(--t-xs); font-weight: 400; margin-top: 2px; }

.issues { list-style: none; padding: 0; margin: var(--s4) 0 0; display: grid; gap: var(--s2); }
.issues li { display: flex; align-items: center; gap: var(--s3); font-size: var(--t-sm); color: var(--paper-2); }
.issues li svg { width: 18px; height: 18px; flex: none; color: var(--signal); }
.issues li.ok svg { color: var(--accent); }
.issues .btn { margin-left: auto; }

.tracks-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; column-gap: var(--s1); margin-bottom: var(--s2); }
.tracks-head h2 { font-size: var(--t-lg); }
/* Shuffle and repeat: two small toggles beside the "Tracks" heading. Play, skip and rewind live in the phone's own player. */
.play-modes { display: flex; align-items: center; margin-right: auto; margin-left: var(--s1); }
.mode-btn { position: relative; width: 40px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 50%; padding: 0; background: transparent; color: var(--paper-3); cursor: pointer; transition: color .15s, transform var(--dur-fast) var(--ease-out); }
.mode-btn:hover { color: var(--paper); }
.mode-btn:active { transform: scale(.9); }
.mode-btn svg { width: 20px; height: 20px; }
.mode-btn[aria-pressed="true"] { color: var(--accent); }
.mode-btn[aria-pressed="true"]::after { content: ""; position: absolute; bottom: 6px; left: 50%; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: currentColor; }
.mode-btn .one { display: none; position: absolute; top: 11px; right: 7px; font: 700 8px/1 var(--font-mono); }
.mode-btn[data-mode="one"] .one { display: block; }
.track[data-playing="true"] .track-main strong { color: var(--accent); }
@media (prefers-reduced-motion: reduce) { .mode-btn { transition: none; } }
.tracks { list-style: none; margin: 0; padding: 0; }
.track {
  display: grid; grid-template-columns: 28px 34px 30px minmax(0, 1fr) auto 34px; align-items: center; gap: var(--s2);
  min-height: 60px; padding: 0 var(--s2) 0 0; border-radius: var(--r-row); position: relative; touch-action: pan-y;
  transition: background-color .15s, transform var(--dur-fast) var(--ease-out);
}
.track + .track::before { content: ""; position: absolute; left: 104px; right: 8px; top: 0; border-top: 1px solid var(--line); }
.track:hover { background: rgba(243,236,226,.04); }
.track[aria-current="true"] { background: var(--accent-soft); }
.track[aria-current="true"] .dur, .track[aria-current="true"] .num { color: var(--paper-2); }
.track[aria-current="true"]::before, .track[aria-current="true"] + .track::before { display: none; }
.grip { width: 28px; height: 44px; display: grid; place-items: center; color: var(--paper-3); cursor: grab; border: 0; background: none; padding: 0; touch-action: none; }
.grip svg { width: 18px; height: 18px; }
.track-play { width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: var(--paper-2); padding: 0; cursor: pointer; position: relative; z-index: 5; transition: background-color .15s, color .15s, transform var(--dur-fast) var(--ease-out); }
.track-play[data-download]::before { content: ""; position: absolute; inset: -3px; border-radius: 50%; background: conic-gradient(#5aa8ff calc(var(--download, 0) * 1turn), rgba(90,168,255,.18) 0); -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 1px)); mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 1px)); pointer-events: none; }
.track-play:hover { color: var(--paper); background: rgba(243,236,226,.11); }
.track-play:active { transform: scale(.92); }
.track-play svg { width: 17px; height: 17px; }
.track[aria-current="true"] .track-play { color: var(--accent); background: var(--accent-soft); }
.track.lifted { z-index: 3; background: var(--ink-2); box-shadow: 0 14px 30px rgba(0,0,0,.5); cursor: grabbing; }
.num { font-family: var(--font-mono); font-size: var(--t-sm); color: var(--paper-3); text-align: right; font-variant-numeric: tabular-nums; }
.num.missing { color: var(--signal); }
.track-main { min-width: 0; border: 0; background: none; text-align: left; padding: 8px 0; cursor: pointer; }
.track-main strong { display: block; font-weight: 600; font-size: var(--t-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track-main small { display: block; font-size: var(--t-xs); color: var(--paper-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dur { font-family: var(--font-mono); font-size: var(--t-xs); color: var(--paper-3); font-variant-numeric: tabular-nums; }
.track-scrub-hit { position: absolute; z-index: 4; left: 34px; right: 8px; top: 0; bottom: 0; cursor: ew-resize; touch-action: none; pointer-events: none; }
.track[aria-current="true"] .track-scrub-hit { pointer-events: auto; }
.track-scrub-hit:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 99px; }
/* The triangle's visual mass sits left of its SVG box center, so it needs a small optical nudge. */
.track-play[data-icon="play"] svg { transform: translate(-1px, .5px); }
.track-export { width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: var(--paper-3); padding: 0; cursor: pointer; position: relative; z-index: 5; opacity: 0; transition: background-color .15s, color .15s, opacity .15s; }
.track:hover .track-export, .track-export:focus-visible { opacity: 1; }
.track-export:hover { color: var(--paper); background: rgba(243,236,226,.11); }
.track-export svg { width: 17px; height: 17px; }
.track.reading .track-main small::after { content: "Reading tags…"; }

/* inspector */
.insp-empty { color: var(--paper-3); font-size: var(--t-sm); padding-top: var(--s7); text-align: center; }
.inspector.has-track .insp-empty { display: none; }
.inspector:not(.has-track) .insp-view { display: none; }
.artists { border: 0; padding: 0; margin: var(--s5) 0 0; }
.artists legend { padding: 0; margin-bottom: 6px; }
.artists ol { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s2); counter-reset: a; }
.artists li { display: grid; grid-template-columns: 22px minmax(0, 1fr) 44px; align-items: center; gap: 4px; counter-increment: a; }
.artists li::before { content: counter(a); font-family: var(--font-mono); font-size: var(--t-xs); color: var(--paper-3); }
.artists li .btn { width: 44px; padding: 0; color: var(--paper-3); }
.artist-tools { display: flex; gap: var(--s2); flex-wrap: wrap; margin-top: var(--s2); padding-left: 26px; }
.preview { margin-top: var(--s3); padding-left: 26px; font-size: var(--t-xs); color: var(--paper-3); }
.preview strong { color: var(--paper); font-weight: 600; }
.row-link {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: var(--s3); margin-top: var(--s5);
  min-height: 60px; padding: var(--s3) var(--s4); border-radius: var(--r-row); border: 1px solid var(--line); background: rgba(243,236,226,.03);
  text-align: left; cursor: pointer; transition: background-color .15s, border-color .15s;
}
.row-link:hover { background: rgba(243,236,226,.07); border-color: var(--line-strong); }
.row-link strong { display: block; font-size: var(--t-sm); }
.row-link .muted { display: block; font-size: var(--t-xs); }
.row-link svg { width: 18px; height: 18px; color: var(--paper-3); flex: none; }
.insp-foot { display: flex; justify-content: space-between; margin-top: var(--s6); padding-top: var(--s4); border-top: 1px solid var(--line); }
.insp-view[hidden] { display: none !important; }

/* ---------- sheets ---------- */
.sheet { position: fixed; /* .glass sets relative, which would beat the modal dialog default */
  border: 0; padding: 0; color: var(--paper); border-radius: var(--r-sheet); width: min(520px, calc(100% - 32px)); max-height: min(88dvh, 860px);
  background: linear-gradient(180deg, rgba(40, 36, 32, 0.86), rgba(22, 20, 17, 0.9));
  opacity: 0; scale: 0.96; translate: 0 8px;
  transition: opacity .2s ease-in, scale .2s ease-in, translate .2s ease-in, overlay .2s allow-discrete, display .2s allow-discrete;
}
.sheet[open] { transition-duration: .26s; transition-timing-function: var(--ease-out); }
.sheet.wide { width: min(640px, calc(100% - 32px)); }
.sheet[open] { opacity: 1; scale: 1; translate: 0 0; }
@starting-style { .sheet[open] { opacity: 0; scale: 0.96; translate: 0 8px; } }
.sheet::backdrop { background: rgba(5, 4, 3, 0.55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); opacity: 0; transition: opacity .3s, overlay .3s allow-discrete, display .3s allow-discrete; }
.sheet[open]::backdrop { opacity: 1; }
@starting-style { .sheet[open]::backdrop { opacity: 0; } }
.sheet-inner { padding: var(--s5); overflow-y: auto; max-height: inherit; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--s4); }
.sheet-head h2 { font-size: var(--t-xl); }
.sheet-actions { display: flex; gap: var(--s2); justify-content: flex-end; flex-wrap: wrap; margin-top: var(--s5); }
.fineprint { margin-top: var(--s5); font-size: var(--t-xs); color: var(--paper-3); }

.cropper { position: relative; width: min(100%, 50dvh); margin: 0 auto; aspect-ratio: 1; overflow: hidden; border-radius: 8px; background: var(--ink-0); cursor: grab; touch-action: none; user-select: none; }
.cropper:active { cursor: grabbing; }
.cropper img { position: absolute; left: 0; top: 0; transform-origin: 0 0; max-width: none; pointer-events: none; }
.crop-grid { position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 0 1px rgba(255,255,255,.35);
  background: linear-gradient(90deg, transparent calc(33.33% - .5px), rgba(255,255,255,.22) 0, rgba(255,255,255,.22) calc(33.33% + .5px), transparent 0, transparent calc(66.66% - .5px), rgba(255,255,255,.22) 0, rgba(255,255,255,.22) calc(66.66% + .5px), transparent 0),
              linear-gradient(transparent calc(33.33% - .5px), rgba(255,255,255,.22) 0, rgba(255,255,255,.22) calc(33.33% + .5px), transparent 0, transparent calc(66.66% - .5px), rgba(255,255,255,.22) 0, rgba(255,255,255,.22) calc(66.66% + .5px), transparent 0);
  opacity: 0; transition: opacity .2s; }
.cropper:active .crop-grid, .cropper:focus-visible .crop-grid { opacity: 1; }
.zoom { display: flex; align-items: center; gap: var(--s3); margin-top: var(--s4); color: var(--paper-2); }
.zoom svg { width: 18px; height: 18px; flex: none; }
input[type="range"] { flex: 1; accent-color: var(--accent); height: 44px; }

.link-pair { display: grid; grid-template-columns: 176px minmax(0, 1fr); gap: var(--s5); align-items: start; }
.qr { background: #f3ece2; border-radius: 14px; padding: 10px; aspect-ratio: 1; }
.qr svg { width: 100%; height: 100%; }
.link-copy p { font-size: var(--t-sm); color: var(--paper-2); }
.code { margin: var(--s3) 0; font-size: 1.45rem; color: var(--paper); letter-spacing: 0.06em; }
.join { margin-top: var(--s5); display: grid; gap: 6px; }
.join-row { display: flex; gap: var(--s2); }
.join-row input { text-transform: uppercase; letter-spacing: 0.06em; }
.link-status { display: flex; align-items: center; gap: var(--s2); font-weight: 600; }
.link-status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--paper-3); }
.link-status.live::before { background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.drop-send {
  width: 100%; display: flex; gap: var(--s4); align-items: center; margin-top: var(--s4); padding: var(--s5); text-align: left;
  border-radius: 18px; border: 1.5px dashed var(--line-strong); background: rgba(243,236,226,.03); cursor: pointer; transition: border-color .2s, background-color .2s;
}
.drop-send:hover, .drop-send.over { border-color: var(--accent); background: var(--accent-soft); }
.drop-send svg { width: 26px; height: 26px; color: var(--accent); flex: none; rotate: 180deg; }
.drop-send strong { display: block; }
.drop-send .muted { display: block; font-size: var(--t-sm); }
.transfers, .export-list { list-style: none; padding: 0; margin: var(--s4) 0 0; display: grid; gap: var(--s2); }
.xfer { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px var(--s3); font-size: var(--t-sm); }
.xfer span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xfer .muted { font-size: var(--t-xs); }
.xfer .bar { grid-column: 1 / -1; height: 3px; border-radius: 3px; background: var(--ink-3); overflow: hidden; }
.xfer .bar i { display: block; height: 100%; width: calc(var(--p, 0) * 100%); background: var(--accent); transition: width .2s; }
.xfer.err .muted { color: var(--signal); }

.seg { border: 0; padding: 0; margin: 0 0 var(--s4); }
.seg legend { font-size: var(--t-xs); font-weight: 600; color: var(--paper-2); margin-bottom: 6px; padding: 0; }
.seg-row { display: grid; grid-template-columns: 1fr 1fr; }
.seg label { cursor: pointer; display: grid; }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg span { display: block; height: 100%; min-height: 44px; padding: 10px 14px; border: 1px solid var(--line); font-size: var(--t-sm); font-weight: 600; transition: background-color .15s, border-color .15s; }
.seg label:first-of-type span { border-radius: 12px 0 0 12px; }
.seg label:last-of-type span { border-radius: 0 12px 12px 0; margin-left: -1px; }
.seg input:checked + span { background: var(--accent-soft); border-color: var(--accent); position: relative; }
.seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.export-done { margin-top: var(--s5); display: grid; gap: var(--s4); justify-items: start; }
.export-done p { color: var(--paper-2); }

/* ---------- toasts ---------- */
.toasts { position: fixed; z-index: 70; left: 50%; bottom: calc(var(--s5) + env(safe-area-inset-bottom)); translate: -50% 0; display: grid; gap: var(--s2); width: min(440px, calc(100% - 24px)); pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: var(--s3); padding: 10px 10px 10px var(--s4); border-radius: 18px; font-size: var(--t-sm); background: var(--ink-2); box-shadow: 0 16px 40px rgba(0,0,0,.55), inset 0 0 0 1px var(--line); }
.toast p { flex: 1; }
.toast.err { box-shadow: 0 16px 40px rgba(0,0,0,.55), inset 0 0 0 1px var(--signal); }

/* ---------- dock (phones) ---------- */
.dock { display: none; }

/* ---------- small screens: one pane at a time ---------- */
@media (max-width: 1100px) {
  .workspace { grid-template-columns: 250px minmax(0, 1fr) 320px; }
  .album-head { grid-template-columns: 150px minmax(0, 1fr); gap: var(--s5); }
  .workspace > * { padding-left: var(--s4); padding-right: var(--s4); }
}
@media (max-width: 899px) {
  .top-actions .btn:not(.icon-only) span { display: none; }
  .top-actions .btn:not(.icon-only) { width: 44px; padding: 0; }
  /* Phones: no frame; the buttons sit low, where a thumb reaches. */
  .welcome { padding-top: calc(72px + env(safe-area-inset-top)); }
  .dropzone { border: 0; padding: 0; min-height: 100%; }
  .hang { height: 240px; }
  .welcome-actions { margin-top: auto; padding-top: var(--s6); width: 100%; }
  .welcome-actions .btn { flex: 1 1 100%; }
  .welcome-actions .mobile-link { display: inline-flex; }
  .drop-hint { display: none; }

  .workspace { display: block; height: auto; min-height: 100dvh; padding-top: calc(68px + env(safe-area-inset-top)); padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  .workspace > * { overflow: visible; padding: var(--s4) var(--s4) var(--s6); border: 0; }
  body:not([data-view="shelf"]) .shelf, body:not([data-view="album"]) .album, body:not([data-view="track"]):not([data-view="other"]) .inspector { display: none; }
  .back { display: inline-flex; align-items: center; gap: 2px; min-height: 44px; padding: 0 var(--s2) 0 0; margin: 0 0 var(--s2) -6px; border: 0; background: none; color: var(--accent); font-weight: 600; cursor: pointer; }
  .back svg { width: 22px; height: 22px; }
  .album-head { grid-template-columns: 1fr; gap: var(--s6); }
  .art-wrap { width: min(260px, 72%); margin: 0 auto; }
  .album-title { text-align: center; }
  .insp-empty { display: none; }
  .link-pair { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .qr { width: 200px; }
  .join-row input { min-width: 0; }

  .sheet { width: 100%; max-width: none; margin: auto 0 0; border-radius: var(--r-sheet) var(--r-sheet) 0 0; max-height: 92dvh; translate: 0 100%; scale: 1; opacity: 1; transition-duration: .24s; }
  .sheet[open] { transition-duration: .32s; }
  .sheet.wide { width: 100%; }
  .sheet[open] { translate: 0 0; }
  @starting-style { .sheet[open] { translate: 0 100%; opacity: 1; scale: 1; } }
  .sheet-inner { padding-bottom: calc(var(--s5) + env(safe-area-inset-bottom)); }
  .sheet-actions .btn { flex: 1 1 auto; }

  body:not([data-view="welcome"]) .dock {
    display: flex; position: fixed; z-index: 30; left: 50%; translate: -50% 0; bottom: calc(var(--s3) + env(safe-area-inset-bottom));
    gap: 4px; padding: 5px; border-radius: 999px;
  }
  .dock button { display: grid; justify-items: center; gap: 1px; min-width: 76px; min-height: 52px; padding: 6px 12px; border: 0; border-radius: 999px; background: none; font-size: 0.7rem; font-weight: 600; color: var(--paper); cursor: pointer; }
  .dock button svg { width: 22px; height: 22px; }
  .dock .dock-primary { background: var(--accent); color: var(--accent-ink); }
  .dock button:disabled { opacity: .4; }
  .top-actions [data-act="link"], .top-actions [data-act="export"] { display: none; } /* the page or the dock has them */
  .toasts { bottom: calc(84px + env(safe-area-inset-bottom)); }
  .tint-menu { right: 8px; }
  .tip { left: 8px; }
}
@media (max-width: 340px) {
  .local-chip span { display: none; }
}

/* In-app screen changes use the View Transitions API; this is the slide between panes on phones. */
::view-transition-old(pane) { animation: .22s var(--ease-io) both pane-out; }
::view-transition-new(pane) { animation: .38s var(--ease-out) both pane-in; }
@keyframes pane-out { to { opacity: 0; transform: translateX(calc(var(--dir, 1) * -24px)); filter: blur(4px); } }
@keyframes pane-in { from { opacity: 0; transform: translateX(calc(var(--dir, 1) * 36px)); filter: blur(4px); } }
::view-transition-group(album-art) { animation-duration: .5s; animation-timing-function: var(--ease-out); }

/* ---------- bottom sheets (phones): grab handle and drag to dismiss, as in Any Day Now ---------- */
.sheet-handle { display: none; }
@media (max-width: 899px) {
  .sheet-handle { display: block; position: sticky; top: 0; z-index: 1; height: 22px; margin: -14px 0 6px; cursor: grab; touch-action: none; }
  .sheet-handle::before { content: ""; position: absolute; left: 50%; top: 8px; width: 40px; height: 5px; margin-left: -20px; border-radius: 3px; background: var(--line-strong); }
  .sheet .sheet-head { touch-action: none; }
  .sheet { overscroll-behavior: contain; }
  .sheet.is-dragging { transition: none; user-select: none; }
}

/* ---------- new builds ---------- */
.hint-lg { font-size: var(--t-sm); color: var(--paper-2); }
.builds { list-style: none; padding: 0; margin: var(--s4) 0 var(--s3); display: grid; gap: var(--s3); }
.builds li { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 6px var(--s3); align-items: center; padding: var(--s3); border-radius: 14px; background: rgba(243,236,226,.04); }
.builds input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--accent); margin: 0; }
.builds .file { font-weight: 600; font-size: var(--t-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.builds .meta { grid-column: 2; font-size: var(--t-xs); color: var(--paper-3); }
.builds .field { grid-column: 2; margin: 0; }
.build-tag { font-family: var(--font-mono); font-size: 0.68rem; color: var(--accent); margin-left: 6px; }

/* ---------- install prompt ---------- */
.install-hint .btn { width: 100%; }
.steps-ol { list-style: none; counter-reset: s; padding: 0; margin: var(--s4) 0 0; display: grid; gap: var(--s3); }
.steps-ol li { counter-increment: s; position: relative; padding-left: 40px; min-height: 28px; font-size: var(--t-sm); color: var(--paper-2); }
.steps-ol li::before { content: counter(s); position: absolute; left: 0; top: -2px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font: 600 var(--t-sm)/1 var(--font-mono); }
.steps-ol b { color: var(--paper); font-weight: 600; }
.inline-icon { display: inline-block; width: 18px; height: 18px; vertical-align: -3px; color: var(--accent); }

/* Touch screens have no hover: the cover hint becomes a small badge, and rows get a press state. */
.art-edit { display: none; position: absolute; right: 8px; bottom: 8px; width: 34px; height: 34px; place-items: center; border-radius: 50%; background: rgba(11,10,9,.6); color: var(--paper); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.art-edit svg { width: 18px; height: 18px; }
@media (hover: none) {
  .art:hover::after { content: none; }
  .art img:not([hidden]) ~ .art-edit { display: grid; }
  .track-export { opacity: 1; }
  .track:active, .shelf-item:active, .row-link:active { background: rgba(243,236,226,.08); }
}

/* ---------- album tools ---------- */
.tracks-tools { display: flex; gap: var(--s2); flex-wrap: wrap; justify-content: flex-end; }
.album-tools { margin-top: var(--s4); }

/* ---------- playback: the selected row's highlight doubles as the progress bar ---------- */
.track[aria-current="true"] {
  background:
    linear-gradient(90deg, color-mix(in oklab, var(--accent) 30%, transparent) var(--play, 0%), transparent var(--play, 0%)),
    var(--accent-soft);
}

/* ---------- single: one song, so everything says "track" and there's no album-only UI ---------- */
body[data-single] .album-title,
body[data-single] .field:has([data-album="albumArtist"]),
body[data-single] .switch:has([data-album="compilation"]),
body[data-single] .tracks-head,
body[data-single] .play-modes,
body[data-single] .tracks,
body[data-single] .field:has([data-track="track"]),
body[data-single] .field:has([data-track="disc"]),
body[data-single] [data-act="artistsAll"],
body[data-single] #inspMain > .back { display: none; }
body[data-single] .album-head { margin-bottom: 0; }
@media (max-width: 899px) {
  /* On a phone the single's cover and its track fields share one screen. */
  body[data-single][data-view="album"] .inspector { display: block; padding-top: 0; }
  body[data-single][data-view="album"] .album { padding-bottom: 0; }
}
body[data-single] .album-head { grid-template-columns: minmax(0, 1fr); gap: var(--s6); }
body[data-single] .art-wrap { width: min(280px, 100%); }
body[data-single] [data-act="remove"] { display: none; } /* "Delete track" under the cover does this */
@media (max-width: 899px) {
  /* Phone single: cover, then the track's title and artists, then release details and Delete. */
  body[data-single][data-view="album"] .workspace { display: flex; flex-direction: column; padding-inline: var(--s4); }
  body[data-single][data-view="album"] :is(.album, .album-head, .album-fields) { display: contents; }
  body[data-single][data-view="album"] .album > .back { order: 0; align-self: flex-start; }
  body[data-single][data-view="album"] .art-wrap { order: 1; margin: var(--s2) auto var(--s5); }
  body[data-single][data-view="album"] .inspector { order: 2; padding: 0; }
  body[data-single][data-view="album"] .album-fields > * { order: 3; }
  body[data-single][data-view="album"] .album-tools { order: 4; margin-bottom: var(--s6); }
  body[data-single][data-view="album"] #inspMain .pane-head { display: none; }
}

/* ---------- share sheet ---------- */
.album-tools { display: flex; gap: var(--s2); flex-wrap: wrap; }
.share-ready { display: grid; grid-template-columns: 148px minmax(0, 1fr); gap: var(--s5); align-items: start; }
.share-buttons { display: flex; gap: var(--s2); flex-wrap: wrap; margin-top: var(--s3); }
#shareUrl { font-size: var(--t-xs); }
@media (max-width: 899px) {
  .share-ready { grid-template-columns: 1fr; justify-items: center; }
  .share-ready .qr { width: 168px; }
  .share-copy { width: 100%; }
  .share-buttons .btn { flex: 1 1 auto; }
}

/* ---------- account ---------- */
.menu-links button { display: flex; align-items: center; min-height: 44px; padding: 0 var(--s2); border: 0; border-radius: 10px; background: none; color: var(--accent); font-size: var(--t-sm); font-weight: 600; text-align: left; cursor: pointer; }
.menu-links button:hover { background: rgba(243,236,226,.08); }
.top-actions [data-act="account"] span { min-width: 4.5ch; }
.auth-benefits { list-style: none; padding: 0; margin: 0 0 var(--s5); display: grid; gap: var(--s2); font-size: var(--t-sm); color: var(--paper-2); }
.auth-benefits li { display: flex; gap: var(--s2); align-items: flex-start; }
.auth-benefits svg { width: 18px; height: 18px; flex: none; color: var(--accent); margin-top: 1px; }
.auth-provider { width: 100%; margin-top: var(--s2); }
.auth-provider svg { width: 18px; height: 18px; }
.auth-or { display: flex; align-items: center; gap: var(--s3); margin: var(--s4) 0 var(--s1); font-size: var(--t-xs); color: var(--paper-3); }
.auth-or::before, .auth-or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.auth-form { display: grid; gap: var(--s3); }
.auth-form .btn.big { width: 100%; }
.auth-form .btn.small { justify-self: center; }
.auth-code { font-size: 1.5rem; letter-spacing: .3em; text-align: center; }
.auth-msg { font-size: var(--t-sm); color: var(--signal); }
.sheet-body .hint { margin-top: var(--s4); }
.danger-zone { margin-top: var(--s5); padding-top: var(--s4); border-top: 1px solid var(--line); }
.danger-zone summary { cursor: pointer; font-size: var(--t-sm); font-weight: 600; color: var(--paper-2); min-height: 44px; display: flex; align-items: center; }
.danger-zone .btn { margin-top: var(--s3); }
.sync-card { display: flex; gap: var(--s3); margin-top: var(--s5); padding: var(--s4); border-radius: 16px; border: 1px solid var(--line); font-size: var(--t-sm); color: var(--paper-2); }
.sync-card strong { color: var(--paper); font-weight: 600; }
.sync-card [data-act="account"] { color: var(--accent); }
.sync-card > svg { width: 20px; height: 20px; flex: none; color: var(--paper-3); }
.sync-card p { color: var(--paper-2); font-size: var(--t-xs); margin-top: 2px; }
.sync-actions { display: flex; gap: var(--s2); margin-top: var(--s3); flex-wrap: wrap; }
.no-audio { font-family: var(--font-text); font-size: 0.7rem; font-weight: 600; color: var(--paper-2); padding: 3px 8px; border-radius: 99px; background: rgba(243,236,226,.07); white-space: nowrap; }
@media (max-width: 899px) { .top-actions [data-act="account"] { display: none; } }

/* ---------- press feedback on everything clickable (0.97 small, 0.98–0.99 large) ---------- */
.shelf-item, .row-link, .drop-send, .dock button, .local-chip, .swatches button, .menu-links a { transition: transform var(--dur-fast) var(--ease-out), background-color .15s, border-color .15s; }
.shelf-item:active, .row-link:active, .drop-send:active { transform: scale(0.98); }
.dock button:active:not(:disabled), .menu-links a:active, .local-chip:active { transform: scale(0.97); }
.track:has(.track-main:active) { transform: scale(0.99); }
.track { transition: background-color .15s, transform var(--dur-fast) var(--ease-out); }

/* ---------- phone: account as a round icon beside the ⋯ ---------- */
.account-icon { display: none; }
@media (max-width: 899px) {
  .top-actions .account-icon:not([hidden]) { display: inline-flex; }
  .account-icon.synced { color: var(--accent); }
}

/* ---------- phone: the upload screen fits one screen, no scrolling ---------- */
.hang { container-type: size; }
.tag-big { container-type: inline-size; }
.tag-lines { font-size: clamp(0.5rem, 6.6cqw, 0.66rem); }
.tag-lines b:first-child { font-size: clamp(0.85rem, 11cqw, 1.1rem); }
@media (max-width: 899px) {
  body[data-view="welcome"] { height: 100dvh; overflow: hidden; overscroll-behavior: none; }
  .welcome { height: 100dvh; min-height: 0; padding-bottom: calc(var(--s4) + env(safe-area-inset-bottom)); }
  .dropzone { height: 100%; min-height: 0; }
  /* the tag shrinks to whatever height is left, so the buttons never fall off the bottom */
  .hang { flex: 1 1 auto; height: auto; min-height: 96px; max-height: 240px; }
  .pendulum { width: min(158px, calc((100cqh - 40px) * 0.72)); }
  .welcome h1 { margin-top: var(--s3); }
  .welcome-actions { padding-top: var(--s4); }
}
@media (max-width: 899px) and (max-height: 700px) {
  .welcome h1 { font-size: var(--t-xl); }
  .lede { font-size: var(--t-sm); }
  .welcome-actions .btn.big { min-height: 48px; }
  .formats { margin-top: var(--s2); }
}

.sheet:focus, .sheet:focus-visible { outline: none; }

/* Cover picker: covers found in an import */
.cover-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(132px, 40%), 1fr)); gap: var(--s3); margin: var(--s4) 0; }
.cover-picks .pick { position: relative; display: grid; gap: 6px; cursor: pointer; font-size: var(--t-xs); color: var(--paper-3); min-width: 0; }
.cover-picks input { position: absolute; opacity: 0; inset: 0; margin: 0; }
.cover-picks img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; outline: 2px solid transparent; outline-offset: 3px; transition: outline-color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out); }
.cover-picks .pick:active img { transform: scale(.97); }
.cover-picks input:checked + img { outline-color: var(--accent); }
.cover-picks input:focus-visible + img { outline-color: var(--paper); }
.cover-picks input:checked ~ span { color: var(--paper); }
.cover-picks span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cover-picks:has(.pick:only-child) { grid-template-columns: minmax(0, 180px); }

/* Add from a link */
.link-form { display: flex; gap: var(--s2); width: min(100%, 420px); margin: var(--s4) auto 0; }
.link-form input { flex: 1; min-width: 0; height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid rgba(243,236,226,.12); background: rgba(243,236,226,.05); color: var(--paper); font: inherit; font-size: 16px; transition: border-color var(--dur-fast) var(--ease-out), background-color var(--dur-fast) var(--ease-out); }
.link-form input::placeholder { color: var(--paper-3); }
.link-form input:focus { outline: none; border-color: var(--accent); background: rgba(243,236,226,.08); }
.link-form .btn { flex: none; }
.sheet .link-form { width: 100%; margin: var(--s4) 0 var(--s3); }
.sheet .link-form input { height: 44px; }

/* Titles wrap onto more lines instead of being cut off mid-word (Enter still doesn't add a line). */
textarea.autosize { display: block; resize: none; overflow: hidden; field-sizing: content; }
.link-form input { text-overflow: ellipsis; }

/* Export: details folded under one line */
.how { margin-top: var(--s4); font-size: var(--t-sm); color: var(--paper-2); }
.how summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; gap: 6px; font-weight: 600; color: var(--paper-2); list-style: none; }
.how summary::-webkit-details-marker { display: none; }
.how summary::after { content: ""; width: 7px; height: 7px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; rotate: 45deg; translate: 0 -2px; transition: rotate var(--dur-fast) var(--ease-out); }
.how[open] summary::after { rotate: 225deg; translate: 0 2px; }
.how summary:hover { color: var(--paper); }
.how p { margin-top: var(--s2); }
.how strong { color: var(--paper); }

/* Track list: one Add button with a menu */
.add-wrap { position: relative; }
.add-menu { right: 0; top: calc(100% + 6px); z-index: 30; min-width: 280px; transform-origin: top right; }
.add-menu .menu-links button { gap: 10px; width: 100%; color: var(--paper); font-weight: 500; }
.add-menu .menu-links button:hover { background: rgba(243,236,226,.08); }
.add-menu svg { width: 18px; height: 18px; flex: none; color: var(--paper-3); }

/* Desktop upload screen: the box fits its content and sits in the middle */
@media (min-width: 900px) { .dropzone { align-self: center; } }

.welcome-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 var(--s4); margin: var(--s4) 0 0; font-size: var(--t-sm); }
.welcome-links a { color: var(--paper-3); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.welcome-links a:hover { color: var(--paper); text-decoration: underline; }

/* Collaborators: the note on a shared album, and the people tab in the Share sheet. */
.shared-note { display: flex; align-items: center; gap: var(--s3); margin: 0 0 var(--s4); padding: var(--s3) var(--s4); border-radius: var(--r-row); background: var(--accent-soft); color: var(--paper); }
.shared-note[hidden] { display: none; }
.shared-note svg { width: 22px; height: 22px; flex: none; color: var(--accent); }
.shared-note strong { display: block; font-weight: 600; font-size: var(--t-sm); }
.shared-note > span { flex: 1; min-width: 0; }
body[data-shared] .album-tools { display: none; }
.shared-note small { display: block; color: var(--paper-2); font-size: var(--t-xs); }
.tabs { display: flex; gap: var(--s1); padding: 3px; margin: 0 0 var(--s4); border-radius: 999px; background: rgba(243,236,226,.07); }
.tab { flex: 1; min-height: 40px; border: 0; border-radius: 999px; background: transparent; color: var(--paper-2); font-weight: 600; cursor: pointer; transition: background-color .15s, color .15s; }
.tab[aria-selected="true"] { background: rgba(243,236,226,.14); color: var(--paper); }
#sharePeoplePane .seg, #sharePeoplePane .field { margin-top: var(--s4); }
.people-h { margin: var(--s5) 0 var(--s1); font-size: var(--t-sm); color: var(--paper-2); font-weight: 600; }
.people { list-style: none; margin: 0; padding: 0; }
.people li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--s2); min-height: 56px; border-top: 1px solid var(--line); }
.people li:first-child { border-top: 0; }
.people strong { display: block; font-weight: 600; font-size: var(--t-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.people small { display: block; color: var(--paper-2); font-size: var(--t-xs); }
.people .btn { min-height: 40px; }
/* On an album you were invited to, whatever you can't change goes away. Listeners can't touch the fields at all (inert). */
body[data-shared] [data-act="share"], body[data-shared] [data-act="addMenu"], body[data-shared] [data-act="remove"], body[data-shared] [data-act="replaceAudio"],
body[data-shared] [data-act="trackExport"], body[data-shared] [data-act="export"], body[data-shared] .check-tag, body[data-shared] .issues { display: none; }
body[data-shared="view"] .grip, body[data-shared="view"] [data-act="renumber"] { display: none; }
body[data-shared="view"] .art-edit, body[data-shared="view"] .art-empty { display: none; }
