:root {
  color-scheme: dark;
  --ink: #070908;
  --panel: #111512;
  --panel-soft: #171b17;
  --teal: #102523;
  --verdigris: #427c70;
  --moss: #263b27;
  --brass: #9b6a32;
  --copper: #b76a3d;
  --linen: #d8ceb9;
  --cyan: #33c9ce;
  --violet: #8057ff;
  --orchid: #d447b3;
  --danger: #d56f59;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--ink);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--linen);
  background:
    radial-gradient(circle at 75% 10%, rgba(66, 124, 112, 0.09), transparent 31rem),
    linear-gradient(135deg, #070908, #0c0f0d 48%, #070908);
  font-family: Georgia, "Times New Roman", serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

a {
  color: inherit;
}

.archive-noise {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    repeating-linear-gradient(0deg, transparent 0 6px, rgba(216, 206, 185, 0.012) 7px),
    repeating-linear-gradient(90deg, transparent 0 83px, rgba(155, 106, 50, 0.025) 84px);
  pointer-events: none;
}

.archive-header {
  display: flex;
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.3rem 0;
  border-bottom: 1px solid rgba(155, 106, 50, 0.28);
  align-items: center;
  justify-content: space-between;
}

.archive-header__artist {
  font-size: 1.05rem;
  letter-spacing: 0.14em;
  text-decoration: none;
  text-transform: uppercase;
}

.archive-header p {
  display: flex;
  margin: 0;
  color: rgba(216, 206, 185, 0.48);
  font-family: "Courier New", monospace;
  font-size: 0.62rem;
  gap: 1.2rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.archive-shell {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(2.5rem, 7vw, 6rem) 0 6rem;
}

.archive-kicker {
  margin: 0 0 0.8rem;
  color: var(--verdigris);
  font-family: "Courier New", monospace;
  font-size: 0.66rem;
  letter-spacing: 0.19em;
  text-transform: uppercase;
}

.login-card,
.database-warning {
  width: min(100%, 530px);
  margin: 6vh auto 0;
  padding: clamp(2rem, 6vw, 4.4rem);
  border: 1px solid rgba(155, 106, 50, 0.36);
  background:
    linear-gradient(130deg, rgba(21, 24, 22, 0.98), rgba(10, 14, 12, 0.98));
  box-shadow:
    0 30px 100px rgba(0, 0, 0, 0.44),
    inset 0 0 45px rgba(66, 124, 112, 0.04);
}

.book-stage {
  width: min(1180px, 100%);
  margin: -1.5rem auto 0;
  perspective: 1800px;
}

.book-gate {
  position: relative;
  width: 100%;
  aspect-ratio: 1.777 / 1;
  overflow: hidden;
  background:
    url("images/third-pocket-login-ledger.webp") center / contain no-repeat;
  filter: drop-shadow(0 42px 70px rgba(0, 0, 0, 0.65));
  opacity: 0;
  transform: rotateX(7deg) translateY(28px) scale(0.93);
  transform-style: preserve-3d;
  animation: ledger-arrives 1200ms cubic-bezier(0.16, 1, 0.3, 1) 180ms forwards;
}

.book-gate__cover {
  position: absolute;
  inset: 6% 5%;
  z-index: 4;
  display: grid;
  border: 2px solid rgba(155, 106, 50, 0.72);
  border-radius: 2.5%;
  place-items: center;
  color: rgba(201, 164, 102, 0.72);
  background:
    radial-gradient(circle at 50% 42%, rgba(66, 124, 112, 0.18), transparent 19%),
    repeating-linear-gradient(110deg, rgba(255, 255, 255, 0.018) 0 2px, transparent 2px 7px),
    linear-gradient(125deg, #100d0a, #25170f 48%, #080705);
  box-shadow:
    inset 0 0 0 12px rgba(0, 0, 0, 0.24),
    inset 0 0 80px rgba(0, 0, 0, 0.72);
  transform-origin: left center;
  animation: leather-cover-opens 1500ms cubic-bezier(0.65, 0, 0.35, 1) 650ms forwards;
}

.book-gate__cover span {
  display: grid;
  width: clamp(72px, 10vw, 120px);
  aspect-ratio: 1;
  border: 1px solid rgba(183, 106, 61, 0.7);
  border-radius: 50%;
  place-items: center;
  font-family: "Courier New", monospace;
  font-size: clamp(1rem, 2vw, 1.5rem);
  letter-spacing: 0.5em;
  text-indent: 0.5em;
  box-shadow:
    0 0 0 9px rgba(155, 106, 50, 0.08),
    0 0 36px rgba(51, 201, 206, 0.1);
}

.book-gate__pages {
  position: absolute;
  inset: 15% 14.5% 17% 14%;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 13%;
  color: #342719;
}

.book-gate__left-page,
.book-gate__right-page {
  min-width: 0;
}

.book-gate__left-page {
  padding: 1.4rem 0.6rem 1rem 1.4rem;
  transform: rotate(-1.15deg);
}

.book-gate__right-page {
  padding: 0.8rem 1.1rem 0.5rem 0.5rem;
  transform: rotate(0.8deg);
}

.book-gate__catalogue,
.book-gate__restriction,
.book-gate__folio {
  font-family: "Courier New", monospace;
  text-transform: uppercase;
}

.book-gate__catalogue {
  margin: 0;
  color: #5f3b26;
  font-size: clamp(0.7rem, 1.1vw, 0.9rem);
  font-weight: 700;
  letter-spacing: 0.2em;
}

.book-gate__folio {
  margin: 0.55rem 0 0;
  color: rgba(63, 43, 27, 0.6);
  font-size: clamp(0.5rem, 0.72vw, 0.65rem);
  letter-spacing: 0.1em;
}

.book-gate__left-page h1 {
  max-width: 11ch;
  margin: clamp(1rem, 2.8vw, 2.6rem) 0 0;
  font-family: "Segoe Print", "Bradley Hand", "Comic Sans MS", cursive;
  font-size: clamp(1.35rem, 2.65vw, 2.45rem);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.18;
}

.book-gate__marginalia {
  max-width: 23ch;
  margin: clamp(0.8rem, 1.8vw, 1.5rem) 0 0 8%;
  color: rgba(59, 37, 22, 0.72);
  font-family: "Segoe Print", "Bradley Hand", "Comic Sans MS", cursive;
  font-size: clamp(0.63rem, 1vw, 0.88rem);
  font-style: italic;
  line-height: 1.5;
  transform: rotate(-2deg);
}

.book-gate__restriction {
  margin: 0 0 clamp(0.8rem, 1.5vw, 1.25rem);
  color: rgba(73, 42, 26, 0.7);
  font-size: clamp(0.5rem, 0.75vw, 0.66rem);
  letter-spacing: 0.16em;
}

.archive-form--ledger {
  display: block;
}

.archive-form--ledger label {
  margin: 0 0 0.35rem;
  color: rgba(58, 37, 23, 0.72);
  font-family: "Segoe Print", "Bradley Hand", "Comic Sans MS", cursive;
  font-size: clamp(0.72rem, 1.1vw, 0.95rem);
  font-style: italic;
  letter-spacing: 0;
  text-transform: none;
}

.archive-form--ledger .ink-entry {
  position: relative;
}

.archive-form--ledger .ink-entry input {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 58px;
  padding: 0.35rem 0.2rem 0.5rem;
  border: 0;
  color: #2d2441;
  background: transparent;
  box-shadow: none;
  caret-color: #8057ff;
  font-family: "Segoe Print", "Bradley Hand", "Comic Sans MS", cursive;
  font-size: clamp(1.05rem, 2vw, 1.55rem);
  font-style: italic;
  letter-spacing: 0.08em;
  transform: rotate(-1.2deg);
}

.archive-form--ledger .ink-entry input:focus {
  border: 0;
  box-shadow: none;
}

.ink-entry__line {
  position: absolute;
  right: 0;
  bottom: 8px;
  left: 0;
  height: 2px;
  background:
    linear-gradient(90deg, rgba(59, 37, 22, 0.26), rgba(59, 37, 22, 0.62) 45%, rgba(59, 37, 22, 0.2));
  transform: rotate(-0.8deg);
}

.ink-reveal {
  margin: 0.1rem 0 0.9rem;
  padding: 0;
  border: 0;
  color: rgba(66, 48, 75, 0.65);
  background: transparent;
  cursor: pointer;
  font-family: "Segoe Print", "Bradley Hand", "Comic Sans MS", cursive;
  font-size: clamp(0.56rem, 0.82vw, 0.72rem);
  font-style: italic;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.book-submit {
  position: relative;
  display: grid;
  width: clamp(128px, 14vw, 175px);
  min-height: clamp(42px, 4.5vw, 52px);
  margin: 0.2rem auto 0;
  padding: 0.5rem 0.8rem;
  border: 1px solid #674029;
  border-radius: 50%;
  place-items: center;
  color: #ead8b8;
  background:
    radial-gradient(circle at 36% 31%, #6e3930, #3a1717 62%, #210d0d);
  box-shadow:
    0 4px 8px rgba(28, 11, 9, 0.4),
    inset 0 0 0 4px rgba(196, 116, 70, 0.16);
  cursor: pointer;
  font-family: Georgia, serif;
  font-size: clamp(0.58rem, 0.85vw, 0.73rem);
  letter-spacing: 0.06em;
  line-height: 1.2;
  text-align: center;
  transform: rotate(1.5deg);
}

.book-submit:hover {
  border-color: #865a34;
  filter: brightness(1.12);
}

.book-gate__warning {
  margin: clamp(0.7rem, 1.5vw, 1.2rem) 0 0;
  color: rgba(60, 39, 25, 0.58);
  font-family: "Courier New", monospace;
  font-size: clamp(0.45rem, 0.65vw, 0.56rem);
  letter-spacing: 0.05em;
  text-align: center;
  text-transform: uppercase;
}

.book-notice {
  margin: -0.3rem 0 0.7rem;
  padding: 0.45rem 0.55rem;
  border-left: 2px solid #88523c;
  color: #713b2e;
  background: rgba(142, 80, 55, 0.08);
  font-family: "Segoe Print", "Bradley Hand", "Comic Sans MS", cursive;
  font-size: clamp(0.58rem, 0.85vw, 0.75rem);
  line-height: 1.35;
  transform: rotate(-0.7deg);
}

@keyframes ledger-arrives {
  to {
    opacity: 1;
    transform: rotateX(0) translateY(0) scale(1);
  }
}

@keyframes leather-cover-opens {
  0% {
    opacity: 1;
    transform: rotateY(0);
  }
  70% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: rotateY(-112deg);
    visibility: hidden;
  }
}

.login-card h1,
.database-warning h2 {
  margin: 0;
  font-size: clamp(2.4rem, 7vw, 4.2rem);
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 0.95;
}

.login-card__copy,
.database-warning > p:last-child {
  margin: 1.4rem 0 2.2rem;
  color: rgba(216, 206, 185, 0.62);
  line-height: 1.65;
}

.archive-form,
.upload-form {
  display: grid;
  gap: 1.1rem;
}

.archive-form label,
.field label {
  display: block;
  margin-bottom: 0.46rem;
  color: rgba(216, 206, 185, 0.58);
  font-family: "Courier New", monospace;
  font-size: 0.67rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.field label span {
  color: rgba(216, 206, 185, 0.3);
}

.archive-form input,
.field input[type="text"],
.field input[type="file"] {
  width: 100%;
  border: 1px solid rgba(155, 106, 50, 0.3);
  border-radius: 0;
  outline: none;
  color: var(--linen);
  background: rgba(7, 9, 8, 0.76);
}

.archive-form input,
.field input[type="text"] {
  min-height: 48px;
  padding: 0 0.9rem;
}

.field input[type="file"] {
  padding: 0.72rem;
  font-family: "Courier New", monospace;
  font-size: 0.7rem;
}

.archive-form input:focus,
.field input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 2px rgba(51, 201, 206, 0.1);
}

.archive-form button,
.upload-form > button {
  min-height: 48px;
  padding: 0 1.2rem;
  border: 1px solid var(--brass);
  color: #ece2d0;
  background: linear-gradient(120deg, #39261a, #1b201b);
  cursor: pointer;
  letter-spacing: 0.08em;
}

.archive-form button:hover,
.upload-form > button:hover {
  border-color: var(--copper);
  background: linear-gradient(120deg, #4b2d1e, #202b24);
}

.archive-form button:disabled,
.upload-form > button:disabled {
  cursor: wait;
  opacity: 0.58;
}

.archive-intro {
  display: flex;
  margin-bottom: 3rem;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
}

.archive-intro h1 {
  margin: 0;
  font-size: clamp(3.1rem, 8vw, 7rem);
  font-weight: 400;
  letter-spacing: -0.06em;
  line-height: 0.82;
}

.archive-intro > div > p:last-child {
  max-width: 44rem;
  margin: 2rem 0 0;
  color: rgba(216, 206, 185, 0.62);
  line-height: 1.65;
}

.logout-form button {
  padding: 0.65rem 0.9rem;
  border: 1px solid rgba(155, 106, 50, 0.3);
  color: rgba(216, 206, 185, 0.64);
  background: transparent;
  cursor: pointer;
  font-family: "Courier New", monospace;
  font-size: 0.64rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.notice {
  margin: 0 0 1.5rem;
  padding: 0.9rem 1rem;
  border-left: 2px solid var(--verdigris);
  color: rgba(216, 206, 185, 0.76);
  background: rgba(66, 124, 112, 0.09);
  line-height: 1.5;
}

.notice--error {
  border-color: var(--danger);
  background: rgba(213, 111, 89, 0.08);
}

.upload-drawer {
  display: grid;
  margin: 0 0 2rem;
  padding: clamp(1.4rem, 4vw, 2.2rem);
  border: 1px solid rgba(155, 106, 50, 0.24);
  grid-template-columns: minmax(190px, 0.55fr) 1.45fr;
  gap: 2rem;
  background: rgba(15, 19, 16, 0.76);
}

.upload-drawer h2,
.ledger h2 {
  margin: 0;
  font-size: clamp(1.7rem, 3.5vw, 2.7rem);
  font-weight: 400;
  letter-spacing: -0.03em;
}

.upload-form {
  grid-template-columns: 0.85fr 1fr 1fr auto;
  align-items: end;
}

.file-selection {
  margin: 0.45rem 0 0;
  color: rgba(216, 206, 185, 0.38);
  font-family: "Courier New", monospace;
  font-size: 0.62rem;
}

.ledger {
  border: 1px solid rgba(155, 106, 50, 0.24);
  background: rgba(10, 13, 11, 0.86);
}

.ledger__header {
  display: flex;
  padding: 1.5rem clamp(1rem, 3vw, 2rem);
  border-bottom: 1px solid rgba(155, 106, 50, 0.22);
  align-items: end;
  justify-content: space-between;
}

.ledger__header > p {
  color: rgba(216, 206, 185, 0.36);
  font-family: "Courier New", monospace;
  font-size: 0.64rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.track-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.track-row {
  display: grid;
  min-height: 112px;
  padding: 1.1rem clamp(1rem, 3vw, 2rem);
  border-bottom: 1px solid rgba(155, 106, 50, 0.14);
  grid-template-columns: 72px 68px minmax(170px, 1fr) minmax(210px, 0.7fr) auto;
  align-items: center;
  gap: 1.3rem;
  transition: background 160ms ease;
}

.track-record {
  border-bottom: 1px solid rgba(155, 106, 50, 0.14);
}

.track-record .track-row {
  border-bottom: 0;
}

.track-row__artwork {
  display: grid;
  width: 72px;
  aspect-ratio: 1;
  border: 1px solid rgba(155, 106, 50, 0.22);
  overflow: hidden;
  place-items: center;
  color: rgba(216, 206, 185, 0.28);
  background:
    linear-gradient(135deg, rgba(66, 124, 112, 0.12), transparent),
    #090c0a;
  font-family: "Courier New", monospace;
  font-size: 0.54rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.track-row__artwork img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.track-row__titleline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.prep-status {
  padding: 0.22rem 0.38rem;
  border: 1px solid rgba(155, 106, 50, 0.24);
  color: rgba(216, 206, 185, 0.42);
  font-family: "Courier New", monospace;
  font-size: 0.5rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.prep-status--in_progress {
  border-color: rgba(51, 201, 206, 0.32);
  color: rgba(51, 201, 206, 0.72);
}

.prep-status--ready {
  border-color: rgba(66, 124, 112, 0.7);
  color: #9cc6b8;
  background: rgba(66, 124, 112, 0.1);
}

.track-row:hover {
  background:
    linear-gradient(90deg, rgba(66, 124, 112, 0.05), transparent 42%),
    rgba(255, 255, 255, 0.008);
}

.track-row__number {
  color: var(--copper);
  font-family: "Courier New", monospace;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
}

.track-row__identity h3 {
  margin: 0;
  font-size: 1.16rem;
  font-weight: 400;
}

.track-row__identity p {
  margin: 0.38rem 0 0;
  color: rgba(216, 206, 185, 0.38);
  font-family: "Courier New", monospace;
  font-size: 0.58rem;
}

.track-row__audio {
  width: 100%;
  height: 34px;
  filter: sepia(0.25) saturate(0.65) invert(0.88);
  opacity: 0.7;
}

.track-row__actions {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.track-row__actions form {
  margin: 0;
}

.track-row__actions a,
.track-row__actions button {
  padding: 0.55rem 0.68rem;
  border: 1px solid rgba(155, 106, 50, 0.3);
  color: rgba(216, 206, 185, 0.68);
  background: transparent;
  cursor: pointer;
  font-family: "Courier New", monospace;
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
}

.track-row__actions a:hover,
.track-row__actions button:hover {
  border-color: var(--cyan);
  color: var(--linen);
}

.track-row__actions .track-row__delete:hover {
  border-color: var(--danger);
  color: #efb6aa;
}

.track-row__actions .public-playlist-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.public-playlist-toggle > span {
  width: 7px;
  height: 7px;
  border: 1px solid rgba(216, 206, 185, 0.3);
  border-radius: 50%;
  background: rgba(216, 206, 185, 0.08);
  box-shadow: 0 0 0 transparent;
}

.track-row__actions .public-playlist-toggle.is-public {
  border-color: rgba(51, 201, 206, 0.52);
  color: rgba(157, 230, 221, 0.9);
  background: rgba(16, 37, 35, 0.42);
}

.public-playlist-toggle.is-public > span {
  border-color: rgba(51, 201, 206, 0.86);
  background: var(--cyan);
  box-shadow: 0 0 9px rgba(51, 201, 206, 0.58);
}

.metadata-editor {
  padding: clamp(1.2rem, 4vw, 2rem);
  border-top: 1px solid rgba(51, 201, 206, 0.16);
  background:
    linear-gradient(135deg, rgba(16, 37, 35, 0.1), transparent 38%),
    rgba(7, 9, 8, 0.72);
}

.metadata-editor[hidden] {
  display: none;
}

.metadata-editor__heading {
  display: flex;
  margin-bottom: 1.6rem;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
}

.metadata-editor__heading h3 {
  margin: 0;
  font-size: clamp(1.45rem, 3vw, 2.2rem);
  font-weight: 400;
}

.metadata-editor__heading > p {
  max-width: 32rem;
  margin: 0;
  color: rgba(216, 206, 185, 0.42);
  font-size: 0.78rem;
  line-height: 1.55;
}

.metadata-editor__layout {
  display: grid;
  grid-template-columns: minmax(190px, 0.42fr) minmax(0, 1.58fr);
  align-items: start;
  gap: clamp(1.2rem, 3vw, 2.4rem);
}

.artwork-editor {
  min-width: 0;
}

.artwork-editor__preview {
  display: grid;
  width: 100%;
  aspect-ratio: 1;
  margin-bottom: 1rem;
  border: 1px solid rgba(155, 106, 50, 0.3);
  place-items: center;
  overflow: hidden;
  color: rgba(216, 206, 185, 0.3);
  background:
    radial-gradient(circle at 50% 42%, rgba(51, 201, 206, 0.09), transparent 34%),
    #090c0a;
  font-family: "Courier New", monospace;
  font-size: 0.64rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.artwork-editor__preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.artwork-editor__facts {
  color: rgba(216, 206, 185, 0.34);
  font-family: "Courier New", monospace;
  font-size: 0.57rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.check-field {
  display: flex;
  margin-top: 0.9rem;
  align-items: center;
  gap: 0.55rem;
  color: rgba(216, 206, 185, 0.58);
  font-size: 0.72rem;
}

.check-field input {
  accent-color: var(--copper);
}

.metadata-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.metadata-fields .field--wide {
  grid-column: 1 / -1;
}

.metadata-editor .field input[type="text"],
.metadata-editor .field input[type="date"],
.metadata-editor .field select,
.metadata-editor .field textarea {
  width: 100%;
  min-height: 44px;
  padding: 0.7rem 0.8rem;
  border: 1px solid rgba(155, 106, 50, 0.3);
  border-radius: 0;
  outline: none;
  color: var(--linen);
  background: rgba(7, 9, 8, 0.76);
}

.metadata-editor .field textarea {
  min-height: 80px;
  line-height: 1.5;
  resize: vertical;
}

.metadata-editor .field small {
  display: block;
  margin-top: 0.45rem;
  color: rgba(216, 206, 185, 0.42);
  font-size: 0.7rem;
  line-height: 1.5;
}

.metadata-editor .field input:focus,
.metadata-editor .field select:focus,
.metadata-editor .field textarea:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 2px rgba(51, 201, 206, 0.1);
}

.metadata-editor__actions {
  display: flex;
  margin-top: 1.4rem;
  justify-content: flex-end;
  gap: 0.75rem;
}

.metadata-editor__actions button {
  min-height: 44px;
  padding: 0 1rem;
  border: 1px solid var(--brass);
  color: var(--linen);
  background: linear-gradient(120deg, #39261a, #1b201b);
  cursor: pointer;
}

.metadata-editor__actions .button-secondary {
  border-color: rgba(155, 106, 50, 0.26);
  color: rgba(216, 206, 185, 0.62);
  background: transparent;
}

.empty-ledger {
  display: grid;
  min-height: 220px;
  color: rgba(216, 206, 185, 0.34);
  place-items: center;
  align-content: center;
  gap: 0.6rem;
  text-align: center;
}

.empty-ledger span {
  color: var(--verdigris);
  font-size: 2rem;
}

.copy-status {
  position: fixed;
  right: 1.2rem;
  bottom: 1.2rem;
  z-index: 10;
  padding: 0.8rem 1rem;
  border: 1px solid rgba(51, 201, 206, 0.35);
  color: var(--linen);
  background: rgba(7, 9, 8, 0.96);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.copy-status.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.listening-site {
  display: grid;
  min-height: 100svh;
  place-items: center;
}

.listening-shell {
  width: min(94vw, 1320px);
  padding: 3rem 0;
}

.listening-layout {
  display: grid;
  grid-template-columns: minmax(180px, 220px) minmax(0, 720px) minmax(180px, 220px);
  align-items: stretch;
  justify-content: center;
  gap: clamp(0.8rem, 1.8vw, 1.5rem);
}

.metadata-rail {
  position: relative;
  display: flex;
  min-width: 0;
  border: 1px solid rgba(155, 106, 50, 0.34);
  flex-direction: column;
  overflow: hidden;
  background:
    linear-gradient(160deg, rgba(13, 17, 14, 0.96), rgba(5, 7, 6, 0.98));
  box-shadow:
    inset 0 0 35px rgba(66, 124, 112, 0.04),
    0 30px 80px rgba(0, 0, 0, 0.28);
}

.metadata-rail::before {
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(155, 106, 50, 0.1);
  content: "";
  pointer-events: none;
}

.metadata-cell {
  position: relative;
  margin: 0;
  padding: 0.8rem 0.9rem;
  border-bottom: 1px solid rgba(155, 106, 50, 0.18);
  overflow: hidden;
  transition: transform 90ms steps(1, end), filter 90ms steps(1, end);
}

.metadata-cell::after {
  position: absolute;
  top: 0;
  bottom: 0;
  left: -100%;
  width: 100%;
  background:
    linear-gradient(
      90deg,
      transparent,
      rgba(51, 201, 206, 0.14),
      rgba(212, 71, 179, 0.18),
      rgba(235, 204, 69, 0.12),
      transparent
    );
  content: "";
  opacity: 0;
  pointer-events: none;
}

.metadata-cell dt,
.metadata-cell > span,
.metadata-advisory > span {
  display: block;
  margin: 0 0 0.35rem;
  color: rgba(51, 201, 206, 0.58);
  font-family: "Courier New", monospace;
  font-size: 0.53rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.metadata-cell dd {
  margin: 0;
  color: rgba(216, 206, 185, 0.76);
  font-family: "Courier New", monospace;
  font-size: 0.66rem;
  line-height: 1.38;
  overflow-wrap: anywhere;
  text-transform: uppercase;
}

.metadata-cell--title,
.metadata-cell--status {
  padding-block: 1.25rem;
}

.metadata-cell--title strong,
.metadata-cell--status strong {
  display: block;
  color: #d5c9b4;
  font-family: "Courier New", monospace;
  font-size: clamp(0.82rem, 1.2vw, 1.05rem);
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.metadata-cell--status strong {
  color: #d447b3;
  text-shadow: 1px 0 rgba(51, 201, 206, 0.48);
}

.metadata-stack {
  margin: 0;
}

.metadata-pulse {
  display: flex;
  min-height: 88px;
  margin-top: auto;
  padding: 1rem;
  border-top: 1px solid rgba(155, 106, 50, 0.18);
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.metadata-pulse span {
  width: 3px;
  height: 24%;
  background: linear-gradient(180deg, var(--cyan), var(--orchid));
  opacity: 0.46;
}

.metadata-pulse span:nth-child(2),
.metadata-pulse span:nth-child(6) {
  height: 58%;
}

.metadata-pulse span:nth-child(3) {
  height: 82%;
}

.metadata-pulse span:nth-child(4) {
  height: 35%;
}

.metadata-pulse span:nth-child(5) {
  height: 68%;
}

.metadata-advisory {
  margin: auto 0.9rem 0.9rem;
  padding: 0.85rem;
  border: 1px solid rgba(212, 71, 179, 0.24);
  color: rgba(216, 206, 185, 0.48);
  background: rgba(212, 71, 179, 0.035);
}

.metadata-advisory p {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.5;
}

.metadata-cell.is-meta-unstable {
  filter: saturate(1.5) contrast(1.25);
  transform: translateX(5px) skewX(-1.5deg);
  text-shadow:
    -2px 0 rgba(224, 48, 70, 0.58),
    2px 0 rgba(73, 226, 129, 0.54),
    0 1px rgba(246, 210, 66, 0.44);
}

.metadata-cell.is-meta-unstable::after {
  left: 0;
  opacity: 1;
}

.is-metadata-surging .listening-card {
  box-shadow:
    -3px 0 rgba(224, 48, 70, 0.12),
    3px 0 rgba(73, 226, 129, 0.1),
    0 38px 120px rgba(0, 0, 0, 0.56);
}

.listening-card {
  position: relative;
  padding: clamp(2rem, 8vw, 5rem);
  border: 1px solid rgba(155, 106, 50, 0.34);
  overflow: hidden;
  background:
    radial-gradient(circle at 78% 20%, rgba(128, 87, 255, 0.1), transparent 28%),
    linear-gradient(145deg, rgba(20, 25, 21, 0.98), rgba(8, 10, 9, 0.98));
  box-shadow: 0 38px 120px rgba(0, 0, 0, 0.56);
}

.listening-card::before {
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(155, 106, 50, 0.12);
  content: "";
  pointer-events: none;
}

.listening-card__index {
  color: var(--copper);
  font-family: "Courier New", monospace;
  font-size: 0.62rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.listening-card h1 {
  max-width: 11ch;
  margin: 1.5rem 0 0.4rem;
  font-size: clamp(3rem, 10vw, 6.5rem);
  font-weight: 400;
  letter-spacing: -0.06em;
  line-height: 0.86;
}

.listening-card__artist {
  color: rgba(216, 206, 185, 0.56);
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.listening-card__specimen {
  position: relative;
  width: 100%;
  height: 62px;
  margin: 2.2rem 0;
  border-top: 1px solid rgba(155, 106, 50, 0.18);
  border-bottom: 1px solid rgba(155, 106, 50, 0.18);
  background:
    linear-gradient(90deg, transparent 5%, rgba(51, 201, 206, 0.08), transparent 45%),
    repeating-linear-gradient(90deg, transparent 0 17px, rgba(128, 87, 255, 0.08) 18px 19px);
}

.listening-card__specimen span {
  position: absolute;
  top: 23px;
  left: 18%;
  width: 8px;
  height: 8px;
  background: var(--cyan);
  box-shadow:
    21px -7px var(--violet),
    48px 8px var(--orchid),
    86px -4px var(--copper);
  opacity: 0.55;
}

.listening-card audio {
  width: 100%;
  filter: sepia(0.25) saturate(0.7) invert(0.88);
}

.listening-card__note {
  margin: 1.7rem 0 0;
  color: rgba(216, 206, 185, 0.46);
  font-size: 0.82rem;
  line-height: 1.6;
}

.listening-card--missing h1 {
  max-width: 15ch;
  font-size: clamp(2.7rem, 8vw, 5rem);
}

.listening-home {
  display: inline-block;
  margin-top: 1.4rem;
  color: rgba(216, 206, 185, 0.48);
  font-family: "Courier New", monospace;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-decoration: none;
  text-transform: uppercase;
}

code {
  color: var(--cyan);
}

.archive-site--login {
  color: #eadfc9;
  background:
    radial-gradient(circle at 50% 26%, rgba(107, 70, 40, 0.2), transparent 38rem),
    linear-gradient(135deg, #080604, #17100b 48%, #070504);
}

.archive-site--login .archive-noise {
  background:
    repeating-linear-gradient(104deg, transparent 0 3px, rgba(194, 151, 94, 0.016) 3px 4px),
    radial-gradient(circle at 50% 20%, rgba(127, 82, 44, 0.08), transparent 42rem);
}

.archive-site--login .archive-header {
  border-color: rgba(174, 127, 66, 0.34);
}

.archive-site--login .archive-header__artist {
  color: rgba(234, 223, 201, 0.74);
}

.archive-site--login .archive-header p {
  color: rgba(209, 174, 124, 0.55);
}

.invitation-stage {
  width: min(1180px, 100%);
  margin: -2rem auto 0;
  perspective: 1800px;
}

.invitation-gate {
  position: relative;
  width: 100%;
  aspect-ratio: 1680 / 941;
  overflow: hidden;
  background: url("images/third-pocket-invitation-v2.jpg") center / contain no-repeat;
  filter: drop-shadow(0 38px 76px rgba(0, 0, 0, 0.68));
  opacity: 0;
  transform: rotateX(5deg) translateY(22px) scale(0.96);
  animation: invitation-arrives 1050ms cubic-bezier(0.16, 1, 0.3, 1) 120ms forwards;
}

.invitation-gate::after {
  position: absolute;
  inset: 13% 16%;
  background: linear-gradient(
    103deg,
    transparent 34%,
    rgba(255, 241, 204, 0.08) 47%,
    rgba(255, 255, 255, 0.26) 50%,
    rgba(198, 145, 75, 0.09) 53%,
    transparent 66%
  );
  content: "";
  opacity: 0;
  pointer-events: none;
  transform: translateX(-75%);
  animation: invitation-sheen 1200ms ease-out 800ms both;
}

.invitation-gate__card {
  position: absolute;
  inset: 20% 21.2% 19.2% 21.1%;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: clamp(1.5rem, 4vw, 3.8rem);
  padding: clamp(0.4rem, 1.2vw, 1rem);
  align-items: center;
  color: #342418;
}

.invitation-gate__address,
.invitation-gate__credential {
  min-width: 0;
}

.invitation-gate__address {
  padding-right: clamp(0.5rem, 1vw, 1rem);
  border-right: 1px solid rgba(87, 57, 34, 0.18);
}

.invitation-gate__house,
.invitation-gate__restriction,
.invitation-gate__folio {
  font-family: "Courier New", monospace;
  text-transform: uppercase;
}

.invitation-gate__house {
  margin: 0;
  color: #5c331f;
  font-size: clamp(0.68rem, 1vw, 0.84rem);
  font-weight: 700;
  letter-spacing: 0.2em;
}

.invitation-gate__folio {
  margin: 0.5rem 0 0;
  color: rgba(73, 47, 29, 0.6);
  font-size: clamp(0.47rem, 0.65vw, 0.59rem);
  letter-spacing: 0.12em;
}

.invitation-gate__address h1 {
  max-width: 15ch;
  margin: clamp(0.8rem, 1.8vw, 1.5rem) 0 0;
  font-size: clamp(1.45rem, 2.3vw, 2.15rem);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 1.05;
}

.invitation-gate__marginalia {
  max-width: 44ch;
  margin: clamp(0.7rem, 1.2vw, 1rem) 0 0;
  color: rgba(62, 41, 26, 0.7);
  font-size: clamp(0.61rem, 0.82vw, 0.76rem);
  font-style: italic;
  line-height: 1.48;
}

.invitation-gate__restriction {
  margin: 0 0 clamp(0.8rem, 1.4vw, 1.15rem);
  color: rgba(73, 42, 26, 0.68);
  font-size: clamp(0.48rem, 0.66vw, 0.59rem);
  letter-spacing: 0.15em;
  line-height: 1.35;
}

.archive-form--invitation {
  display: block;
}

.archive-form--invitation label {
  margin: 0 0 0.2rem;
  color: rgba(57, 38, 25, 0.7);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(0.57rem, 0.72vw, 0.66rem);
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: none;
}

.archive-form--invitation .ink-entry {
  position: relative;
}

.archive-form--invitation .ink-entry input {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 54px;
  padding: 0.25rem 0.15rem 0.45rem;
  border: 0;
  color: #281c17;
  background: transparent;
  box-shadow: none;
  caret-color: #5e2e22;
  font-family: "Segoe Print", "Bradley Hand", "Comic Sans MS", cursive;
  font-size: clamp(1rem, 1.65vw, 1.35rem);
  font-style: italic;
  letter-spacing: 0.07em;
  transform: rotate(-1deg);
}

.archive-form--invitation .ink-entry input:focus {
  border: 0;
  box-shadow: none;
  outline: 0;
}

.archive-form--invitation .ink-entry input:focus + .ink-entry__line {
  background: linear-gradient(90deg, rgba(75, 41, 28, 0.35), #70452d 48%, rgba(75, 41, 28, 0.32));
  box-shadow: 0 2px 7px rgba(92, 51, 31, 0.13);
}

.archive-form--invitation .ink-reveal {
  display: inline;
  width: auto;
  min-height: 0;
  margin: 0.05rem 0 0.85rem;
  padding: 0;
  border: 0;
  color: rgba(75, 49, 31, 0.58);
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(0.52rem, 0.65vw, 0.6rem);
  font-style: italic;
  letter-spacing: 0.04em;
  text-transform: none;
  transform: none;
}

.archive-form--invitation .ink-reveal:hover {
  color: #5d3924;
  background: transparent;
  transform: none;
}

.invitation-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  text-decoration: none;
  text-align: center;
  position: relative;
  width: 100%;
  min-height: 43px;
  padding: 0.7rem 1rem;
  border: 1px solid #6b482b;
  border-radius: 2px;
  color: #f0dfbe;
  background:
    linear-gradient(180deg, rgba(190, 145, 82, 0.17), transparent 48%),
    linear-gradient(120deg, #4a2f1d, #24160e 58%, #3b2618);
  box-shadow:
    0 5px 12px rgba(45, 27, 17, 0.24),
    inset 0 0 0 2px rgba(209, 165, 102, 0.08);
  cursor: pointer;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(0.58rem, 0.74vw, 0.67rem);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: border-color 180ms ease, filter 180ms ease, transform 180ms ease;
}

.invitation-submit:hover {
  border-color: #a9783f;
  filter: brightness(1.12);
  transform: translateY(-1px);
}

.invitation-submit:focus-visible {
  outline: 1px solid #b78b4e;
  outline-offset: 4px;
}

.invitation-gate__warning {
  margin: clamp(0.65rem, 1vw, 0.9rem) 0 0;
  color: rgba(66, 43, 27, 0.54);
  font-family: "Courier New", monospace;
  font-size: clamp(0.43rem, 0.54vw, 0.5rem);
  letter-spacing: 0.035em;
  line-height: 1.4;
  text-align: center;
  text-transform: uppercase;
}

.archive-site--login .book-notice {
  color: #693b2d;
  background: rgba(122, 64, 42, 0.07);
}

@keyframes invitation-arrives {
  to {
    opacity: 1;
    transform: rotateX(0) translateY(0) scale(1);
  }
}

@keyframes invitation-sheen {
  0%,
  12% {
    opacity: 0;
    transform: translateX(-75%);
  }
  28% {
    opacity: 0.78;
  }
  64% {
    opacity: 0.24;
  }
  100% {
    opacity: 0;
    transform: translateX(76%);
  }
}

/* Let the desktop invitation artwork span the full browser width. */
@media (min-width: 901px) {
  .archive-site--login .archive-shell {
    width: 100%;
    margin: 0;
    padding: 0;
  }

  .archive-site--login .invitation-stage {
    width: 100%;
    margin: 0;
  }

  .archive-site--login .invitation-gate {
    background-size: cover;
  }
}

@media (max-width: 900px) {
  .upload-drawer,
  .upload-form {
    grid-template-columns: 1fr;
  }

  .track-row {
    grid-template-columns: 72px 68px minmax(0, 1fr);
  }

  .track-row__audio {
    grid-column: 3;
  }

  .track-row__actions {
    grid-column: 2 / -1;
  }

  .metadata-editor__layout {
    grid-template-columns: minmax(180px, 0.55fr) minmax(0, 1.45fr);
  }

  .invitation-stage {
    margin-top: -0.5rem;
  }

  .invitation-gate {
    min-height: 860px;
    aspect-ratio: auto;
    border: 1px solid rgba(168, 120, 64, 0.4);
    background: url("images/third-pocket-invitation-v2.jpg") center / auto 100% no-repeat;
  }

  .invitation-gate__card {
    position: absolute;
    inset: 19% clamp(2rem, 12vw, 6.5rem);
    grid-template-columns: 1fr;
    width: auto;
    min-height: 0;
    margin: 0;
    padding: clamp(1.25rem, 4vw, 2.25rem);
    gap: 1.35rem;
    align-content: center;
    background: transparent;
    box-shadow: none;
  }

  .invitation-gate__address {
    padding: 0 0 1.6rem;
    border-right: 0;
    border-bottom: 1px solid rgba(87, 57, 34, 0.18);
  }

  .invitation-gate__address h1 {
    max-width: 18ch;
  }

  .listening-layout {
    grid-template-columns: 1fr 1fr;
  }

  .listening-card {
    grid-column: 1 / -1;
    grid-row: 1;
  }
}

@media (max-width: 620px) {
  .archive-header p span:last-child,
  .track-row__number {
    display: none;
  }

  .archive-intro {
    display: block;
  }

  .logout-form {
    margin-top: 1.6rem;
  }

  .track-row {
    grid-template-columns: 1fr;
    gap: 0.9rem;
  }

  .track-row__artwork {
    width: min(45vw, 160px);
  }

  .track-row__audio {
    grid-column: auto;
  }

  .track-row__actions {
    grid-column: auto;
    justify-content: flex-start;
  }

  .metadata-editor__heading {
    display: block;
  }

  .metadata-editor__heading > p {
    margin-top: 0.8rem;
  }

  .metadata-editor__layout,
  .metadata-fields {
    grid-template-columns: 1fr;
  }

  .metadata-fields .field--wide {
    grid-column: auto;
  }

  .artwork-editor__preview {
    width: min(100%, 320px);
  }

  .metadata-editor__actions {
    justify-content: stretch;
  }

  .metadata-editor__actions button {
    flex: 1;
  }

  .archive-shell {
    width: min(100% - 2rem, 1180px);
  }

  .invitation-stage {
    margin-top: -0.5rem;
  }

  .invitation-gate {
    min-height: 900px;
  }

  .invitation-gate__card {
    inset: 18.5% 5%;
    width: auto;
    min-height: 0;
    margin: 0;
    padding: 1.2rem 1rem;
    gap: 1.1rem;
  }

  .invitation-gate__address {
    padding-bottom: 1rem;
  }

  .invitation-gate__address h1 {
    font-size: clamp(1.45rem, 7.2vw, 1.9rem);
  }

  .invitation-gate__marginalia {
    font-size: 0.65rem;
    line-height: 1.42;
  }

  .listening-shell {
    width: min(100% - 1.5rem, 1320px);
  }

  .listening-layout {
    grid-template-columns: 1fr;
  }

  .metadata-rail,
  .listening-card {
    grid-column: 1;
  }

  .metadata-rail--left {
    grid-row: 2;
  }

  .metadata-rail--right {
    grid-row: 3;
  }
}

@media (max-width: 620px), (max-width: 900px) and (max-height: 620px) {
  body.archive-site--login {
    width: 100%;
    height: 100svh;
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
    overscroll-behavior: none;
  }

  .archive-site--login .archive-header {
    width: calc(100% - 1.5rem);
    height: 56px;
    padding: 0.7rem 0;
  }

  .archive-site--login .archive-header__artist {
    font-size: 0.86rem;
  }

  .archive-site--login .archive-header p {
    font-size: 0.5rem;
    gap: 0.65rem;
    letter-spacing: 0.09em;
  }

  .archive-site--login .archive-shell {
    display: grid;
    width: 100%;
    height: calc(100svh - 56px);
    height: calc(100dvh - 56px);
    margin: 0;
    padding: 0;
    overflow: hidden;
  }

  .archive-site--login .invitation-stage {
    width: 100%;
    height: 100%;
    margin: 0;
  }

  .archive-site--login .invitation-gate {
    width: 100%;
    height: 100%;
    min-height: 0;
    border: 0;
    aspect-ratio: auto;
    background-position: center;
    background-size: auto 100%;
    filter: none;
  }

  .archive-site--login .invitation-gate__card {
    inset: clamp(0.65rem, 2.8dvh, 1.35rem) clamp(0.85rem, 5vw, 1.5rem);
    width: auto;
    min-height: 0;
    margin: 0;
    padding: clamp(0.8rem, 2.3dvh, 1.1rem);
    gap: clamp(0.55rem, 1.8dvh, 0.9rem);
    align-content: center;
    overflow: hidden;
    border: 1px solid rgba(105, 70, 42, 0.22);
    background:
      linear-gradient(145deg, rgba(239, 226, 198, 0.93), rgba(220, 196, 156, 0.91));
    box-shadow:
      0 18px 50px rgba(34, 20, 12, 0.35),
      inset 0 0 36px rgba(105, 65, 35, 0.08);
  }

  .archive-site--login .invitation-gate__address {
    padding: 0 0 clamp(0.55rem, 1.6dvh, 0.8rem);
  }

  .archive-site--login .invitation-gate__house {
    font-size: clamp(0.58rem, 2.8vw, 0.7rem);
  }

  .archive-site--login .invitation-gate__folio {
    margin-top: 0.32rem;
    font-size: clamp(0.43rem, 2vw, 0.52rem);
  }

  .archive-site--login .invitation-gate__address h1 {
    max-width: 20ch;
    margin-top: clamp(0.42rem, 1.4dvh, 0.68rem);
    font-size: clamp(1.22rem, 6vw, 1.65rem);
    line-height: 1;
  }

  .archive-site--login .invitation-gate__marginalia {
    margin-top: clamp(0.38rem, 1.2dvh, 0.58rem);
    font-size: clamp(0.56rem, 2.5vw, 0.64rem);
    line-height: 1.32;
  }

  .archive-site--login .invitation-gate__restriction {
    margin-bottom: clamp(0.42rem, 1.3dvh, 0.62rem);
    font-size: clamp(0.44rem, 2vw, 0.53rem);
  }

  .archive-site--login .archive-form--invitation .ink-entry input {
    min-height: 42px;
    padding-block: 0.15rem 0.3rem;
    font-size: clamp(0.95rem, 4.4vw, 1.15rem);
  }

  .archive-site--login .archive-form--invitation .ink-reveal {
    margin-bottom: clamp(0.38rem, 1.2dvh, 0.55rem);
  }

  .archive-site--login .invitation-submit {
    min-height: 39px;
    padding: 0.55rem 0.75rem;
  }

  .archive-site--login .invitation-gate__warning {
    margin-top: clamp(0.4rem, 1.3dvh, 0.6rem);
    font-size: 0.4rem;
    line-height: 1.25;
  }

  .archive-site--login .book-notice {
    margin-bottom: 0.45rem;
    padding: 0.35rem 0.45rem;
    font-size: 0.48rem;
  }

  .archive-site--login .invitation-gate__card:focus-within {
    gap: 0.45rem;
  }

  .archive-site--login .invitation-gate__card:focus-within .invitation-gate__folio,
  .archive-site--login .invitation-gate__card:focus-within .invitation-gate__marginalia,
  .archive-site--login .invitation-gate__card:focus-within .invitation-gate__warning {
    display: none;
  }

  .archive-site--login .invitation-gate__card:focus-within .invitation-gate__address {
    padding-bottom: 0.4rem;
  }
}

@media (max-width: 620px) and (max-height: 560px) {
  .archive-site--login .archive-header {
    height: 44px;
    padding-block: 0.45rem;
  }

  .archive-site--login .archive-header p,
  .archive-site--login .invitation-gate__folio,
  .archive-site--login .invitation-gate__marginalia,
  .archive-site--login .invitation-gate__warning {
    display: none;
  }

  .archive-site--login .archive-shell {
    height: calc(100svh - 44px);
    height: calc(100dvh - 44px);
  }

  .archive-site--login .invitation-gate__card {
    inset: 0.35rem 0.7rem;
    padding: 0.65rem 0.8rem;
    gap: 0.45rem;
  }

  .archive-site--login .invitation-gate__address {
    padding-bottom: 0.4rem;
  }

  .archive-site--login .invitation-gate__address h1 {
    margin-top: 0.3rem;
    font-size: 1.12rem;
  }
}

@media (min-width: 621px) and (max-width: 900px) and (max-height: 620px) {
  .archive-site--login .invitation-gate__card {
    inset: 0.55rem clamp(1rem, 8vw, 4rem);
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    padding: 0.75rem 1rem;
    gap: 1rem;
  }

  .archive-site--login .invitation-gate__address {
    padding: 0 1rem 0 0;
    border-right: 1px solid rgba(87, 57, 34, 0.18);
    border-bottom: 0;
  }

  .archive-site--login .invitation-gate__marginalia,
  .archive-site--login .invitation-gate__warning {
    display: none;
  }

  .archive-site--login .invitation-gate__address h1 {
    font-size: clamp(1.2rem, 3vw, 1.55rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }

  .invitation-gate {
    animation-duration: 1ms !important;
  }
}

/* Let the illustrated invitation remain the only login surface. */
.archive-site--login .invitation-gate__card,
.archive-site--login .invitation-gate__card:focus-within {
  border: 0;
  background: transparent;
  box-shadow: none;
  filter: none;
}

/* ThirdPocket.Studio label office */
.archive-site:not(.archive-site--login) {
  --ink: #100906;
  --panel: #26150f;
  --panel-soft: #321d14;
  --teal: #284d46;
  --verdigris: #50867b;
  --moss: #304b3d;
  --brass: #b1874f;
  --copper: #c88955;
  --linen: #dfd0b1;
  --cyan: #72aa9d;
  color: var(--linen);
  background:
    radial-gradient(circle at 76% 8%, rgba(177, 135, 79, 0.09), transparent 34rem),
    linear-gradient(rgba(16, 9, 6, 0.9), rgba(9, 5, 3, 0.97)),
    repeating-linear-gradient(
      90deg,
      transparent 0 71px,
      rgba(177, 135, 79, 0.045) 71px 72px
    );
}

.archive-site:not(.archive-site--login) .archive-noise {
  background:
    repeating-linear-gradient(0deg, transparent 0 6px, rgba(223, 208, 177, 0.012) 7px),
    repeating-linear-gradient(90deg, transparent 0 71px, rgba(177, 135, 79, 0.025) 72px);
}

.archive-site:not(.archive-site--login) .archive-header,
.archive-site:not(.archive-site--login) .archive-shell {
  width: min(1220px, calc(100% - 2rem));
}

.archive-site:not(.archive-site--login) .archive-header {
  padding: 1rem 0;
  border-color: rgba(214, 184, 121, 0.32);
}

.archive-site:not(.archive-site--login) .archive-header__artist {
  color: #f0dfbd;
}

.archive-site:not(.archive-site--login) .archive-header p {
  color: rgba(177, 135, 79, 0.68);
}

.archive-site:not(.archive-site--login) .archive-shell {
  padding: clamp(2.8rem, 6vw, 5.5rem) 0 7rem;
}

.archive-site:not(.archive-site--login) .archive-kicker {
  color: var(--brass);
}

.archive-site:not(.archive-site--login) .archive-intro {
  margin-bottom: clamp(2rem, 5vw, 4rem);
  padding: clamp(2rem, 5vw, 4.5rem);
  border-top: 1px solid rgba(214, 184, 121, 0.45);
  border-bottom: 1px solid rgba(214, 184, 121, 0.22);
  background:
    radial-gradient(circle at 7% 9%, rgba(177, 135, 79, 0.09), transparent 25rem),
    linear-gradient(120deg, rgba(42, 21, 13, 0.8), rgba(12, 7, 5, 0.93));
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.36);
}

.archive-site:not(.archive-site--login) .archive-intro h1 {
  max-width: 8ch;
  color: #f0dfbd;
  font-size: clamp(3.25rem, 8vw, 7.5rem);
  line-height: 0.84;
  text-wrap: balance;
}

.archive-site:not(.archive-site--login) .archive-intro > div > p:last-child {
  max-width: 38rem;
  color: rgba(223, 208, 177, 0.7);
}

.archive-site:not(.archive-site--login) .logout-form button,
.archive-site:not(.archive-site--login) .track-row__actions a,
.archive-site:not(.archive-site--login) .track-row__actions button {
  border-color: rgba(177, 135, 79, 0.48);
  color: var(--brass-bright, #d6b879);
}

.archive-site:not(.archive-site--login) .logout-form button:hover,
.archive-site:not(.archive-site--login) .track-row__actions a:hover,
.archive-site:not(.archive-site--login) .track-row__actions button:hover,
.archive-site:not(.archive-site--login) .track-row__actions a:focus-visible,
.archive-site:not(.archive-site--login) .track-row__actions button:focus-visible {
  border-color: var(--verdigris);
  color: #fff0cf;
  outline: 0;
  box-shadow:
    inset 3px 0 rgba(80, 134, 123, 0.42),
    inset -3px 0 rgba(214, 184, 121, 0.3);
}

.archive-site:not(.archive-site--login) .notice {
  border-color: var(--verdigris);
  color: rgba(223, 208, 177, 0.82);
  background: rgba(80, 134, 123, 0.1);
}

.archive-site:not(.archive-site--login) .upload-drawer {
  position: relative;
  margin-bottom: 2.5rem;
  border-color: rgba(214, 184, 121, 0.3);
  background:
    linear-gradient(115deg, rgba(74, 43, 28, 0.36), transparent 42%),
    rgba(20, 11, 7, 0.9);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.archive-site:not(.archive-site--login) .upload-drawer::after {
  position: absolute;
  right: 0.85rem;
  bottom: 0.85rem;
  width: 30px;
  height: 30px;
  border-right: 1px solid rgba(214, 184, 121, 0.34);
  border-bottom: 1px solid rgba(214, 184, 121, 0.34);
  content: "";
  pointer-events: none;
}

.archive-site:not(.archive-site--login) .upload-drawer h2,
.archive-site:not(.archive-site--login) .ledger h2 {
  color: #f0dfbd;
}

.archive-site:not(.archive-site--login) .field input[type="file"],
.archive-site:not(.archive-site--login) .upload-form input[type="text"] {
  border-color: rgba(177, 135, 79, 0.35);
  color: var(--linen);
  background: rgba(16, 9, 6, 0.78);
}

.archive-site:not(.archive-site--login) .upload-form > button,
.archive-site:not(.archive-site--login) .metadata-editor__actions button {
  border-color: rgba(214, 184, 121, 0.62);
  color: #f3dfba;
  background:
    linear-gradient(120deg, rgba(98, 56, 34, 0.9), rgba(38, 21, 15, 0.96));
  font-family: "Courier New", monospace;
  font-size: 0.64rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.archive-site:not(.archive-site--login) .upload-form > button:hover,
.archive-site:not(.archive-site--login) .metadata-editor__actions button:hover {
  border-color: var(--verdigris);
  background:
    linear-gradient(120deg, rgba(80, 134, 123, 0.42), rgba(38, 21, 15, 0.96));
}

.archive-site:not(.archive-site--login) .ledger {
  border: 0;
  background: transparent;
}

.archive-site:not(.archive-site--login) .ledger__header {
  padding: 0 0 1.25rem;
  border-color: rgba(177, 135, 79, 0.3);
}

.archive-site:not(.archive-site--login) .ledger__header > p {
  color: rgba(177, 135, 79, 0.62);
}

.archive-site:not(.archive-site--login) .track-list {
  display: grid;
  padding-top: 1.5rem;
  gap: 2rem;
}

.archive-site:not(.archive-site--login) .track-record {
  position: relative;
  border: 1px solid rgba(177, 135, 79, 0.32);
  background:
    radial-gradient(circle at 4% 2%, rgba(177, 135, 79, 0.08), transparent 28rem),
    linear-gradient(135deg, rgba(50, 29, 20, 0.97), rgba(18, 10, 7, 0.98));
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.34);
}

.archive-site:not(.archive-site--login) .track-record::before,
.archive-site:not(.archive-site--login) .track-record::after {
  position: absolute;
  z-index: 2;
  width: 32px;
  height: 32px;
  border-color: rgba(214, 184, 121, 0.38);
  content: "";
  pointer-events: none;
}

.archive-site:not(.archive-site--login) .track-record::before {
  top: 0.75rem;
  left: 0.75rem;
  border-top: 1px solid;
  border-left: 1px solid;
}

.archive-site:not(.archive-site--login) .track-record::after {
  right: 0.75rem;
  bottom: 0.75rem;
  border-right: 1px solid;
  border-bottom: 1px solid;
}

.archive-site:not(.archive-site--login) .track-row {
  min-height: 104px;
  padding: 1rem clamp(1.25rem, 3vw, 2.4rem);
  border-bottom: 1px solid rgba(177, 135, 79, 0.2);
  grid-template-columns: 72px 68px minmax(170px, 1fr) minmax(190px, 0.62fr) auto;
  background: rgba(10, 6, 4, 0.32);
}

.archive-site:not(.archive-site--login) .track-row:hover {
  background:
    linear-gradient(90deg, rgba(80, 134, 123, 0.06), transparent 42%),
    rgba(10, 6, 4, 0.36);
}

.archive-site:not(.archive-site--login) .track-row__artwork {
  border-color: rgba(177, 135, 79, 0.38);
  background:
    linear-gradient(135deg, rgba(80, 134, 123, 0.14), transparent),
    #100906;
}

.archive-site:not(.archive-site--login) .track-row__artwork img,
.archive-site:not(.archive-site--login) .artwork-editor__preview img {
  filter: sepia(0.1) saturate(0.86) contrast(1.04);
}

.archive-site:not(.archive-site--login) .track-row__number {
  color: var(--brass);
}

.archive-site:not(.archive-site--login) .track-row__identity h3 {
  color: #f0dfbd;
}

.archive-site:not(.archive-site--login) .record-publication-state {
  display: inline-flex;
  min-height: 31px;
  padding: 0.45rem 0.62rem;
  border: 1px solid rgba(177, 135, 79, 0.3);
  align-items: center;
  gap: 0.46rem;
  color: rgba(223, 208, 177, 0.5);
  font-family: "Courier New", monospace;
  font-size: 0.56rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.archive-site:not(.archive-site--login) .record-publication-state > span {
  width: 7px;
  height: 7px;
  border: 1px solid currentColor;
  border-radius: 50%;
  background: transparent;
}

.archive-site:not(.archive-site--login) .record-publication-state.is-public {
  border-color: rgba(80, 134, 123, 0.72);
  color: #a9d4c7;
  background: rgba(80, 134, 123, 0.11);
}

.archive-site:not(.archive-site--login) .record-publication-state.is-public > span {
  background: var(--verdigris);
  box-shadow: 0 0 9px rgba(80, 134, 123, 0.62);
}

.archive-site:not(.archive-site--login) .metadata-editor {
  padding: clamp(1.5rem, 4vw, 3rem);
  border-top: 0;
  background:
    repeating-linear-gradient(90deg, transparent 0 71px, rgba(177, 135, 79, 0.018) 71px 72px),
    rgba(16, 9, 6, 0.32);
}

.archive-site:not(.archive-site--login) .metadata-editor__heading {
  padding-bottom: 1.35rem;
  border-bottom: 1px solid rgba(177, 135, 79, 0.2);
  align-items: center;
}

.archive-site:not(.archive-site--login) .metadata-editor__heading h3 {
  color: #f0dfbd;
  font-size: clamp(1.8rem, 3.6vw, 3rem);
}

.archive-site:not(.archive-site--login) .record-publish-control {
  width: min(100%, 330px);
  padding: 0.85rem 1rem;
  border: 1px solid rgba(177, 135, 79, 0.28);
  background: rgba(38, 21, 15, 0.64);
}

.archive-site:not(.archive-site--login) .record-publish-control label {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: #ead7b4;
  cursor: pointer;
  font-size: 0.84rem;
}

.archive-site:not(.archive-site--login) .record-publish-control input {
  width: 1.1rem;
  height: 1.1rem;
  flex: 0 0 auto;
  accent-color: var(--verdigris);
}

.archive-site:not(.archive-site--login) .record-publish-control small {
  display: block;
  margin: 0.45rem 0 0 1.8rem;
  color: rgba(223, 208, 177, 0.44);
  font-size: 0.66rem;
  line-height: 1.45;
}

.archive-site:not(.archive-site--login) .metadata-editor__layout {
  grid-template-columns: minmax(180px, 0.32fr) minmax(0, 1.68fr);
}

.archive-site:not(.archive-site--login) .artwork-editor {
  position: sticky;
  top: 1rem;
}

.archive-site:not(.archive-site--login) .artwork-editor__preview {
  border-color: rgba(177, 135, 79, 0.38);
  background:
    radial-gradient(circle at 50% 42%, rgba(80, 134, 123, 0.12), transparent 34%),
    #100906;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.24);
}

.archive-site:not(.archive-site--login) .label-manager-fields {
  display: block;
}

.archive-site:not(.archive-site--login) .manager-section {
  min-width: 0;
  margin: 0 0 0.9rem;
  padding: 0;
  border: 1px solid rgba(177, 135, 79, 0.25);
  background: rgba(38, 21, 15, 0.46);
}

.archive-site:not(.archive-site--login) fieldset.manager-section {
  padding: 0 1rem 1rem;
}

.archive-site:not(.archive-site--login) .manager-section > legend,
.archive-site:not(.archive-site--login) .manager-section > summary {
  width: 100%;
  padding: 0.85rem 1rem;
  color: var(--brass);
  font-family: "Courier New", monospace;
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.archive-site:not(.archive-site--login) .manager-section > legend {
  width: auto;
}

.archive-site:not(.archive-site--login) .manager-section > summary {
  border-bottom: 1px solid transparent;
  cursor: pointer;
  list-style-position: inside;
}

.archive-site:not(.archive-site--login) .manager-section[open] > summary {
  border-bottom-color: rgba(177, 135, 79, 0.18);
}

.archive-site:not(.archive-site--login) .manager-section > summary:hover,
.archive-site:not(.archive-site--login) .manager-section > summary:focus-visible {
  color: #e2c993;
  outline: none;
  background: rgba(177, 135, 79, 0.05);
}

.archive-site:not(.archive-site--login) .manager-grid {
  display: grid;
  padding: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.archive-site:not(.archive-site--login) fieldset.manager-section .manager-grid {
  padding: 0;
}

.archive-site:not(.archive-site--login) .manager-grid .field--wide {
  grid-column: 1 / -1;
}

.archive-site:not(.archive-site--login) .metadata-editor .field input[type="text"],
.archive-site:not(.archive-site--login) .metadata-editor .field input[type="number"],
.archive-site:not(.archive-site--login) .metadata-editor .field input[type="date"],
.archive-site:not(.archive-site--login) .metadata-editor .field select,
.archive-site:not(.archive-site--login) .metadata-editor .field textarea {
  border-color: rgba(177, 135, 79, 0.32);
  color: var(--linen);
  background: rgba(16, 9, 6, 0.78);
}

.archive-site:not(.archive-site--login) .metadata-editor .field input:focus,
.archive-site:not(.archive-site--login) .metadata-editor .field select:focus,
.archive-site:not(.archive-site--login) .metadata-editor .field textarea:focus {
  border-color: var(--verdigris);
  box-shadow: 0 0 0 2px rgba(80, 134, 123, 0.12);
}

.archive-site:not(.archive-site--login) .metadata-editor__actions {
  position: sticky;
  z-index: 3;
  bottom: 0;
  min-height: 66px;
  margin: 1.2rem -1rem -1rem;
  padding: 0.7rem 1rem;
  border-top: 1px solid rgba(177, 135, 79, 0.26);
  align-items: center;
  background: rgba(16, 9, 6, 0.94);
  backdrop-filter: blur(10px);
}

.archive-site:not(.archive-site--login) .record-save-state {
  margin-right: auto;
  color: rgba(223, 208, 177, 0.42);
  font-family: "Courier New", monospace;
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.archive-site:not(.archive-site--login) .metadata-editor.is-dirty .record-save-state {
  color: #d6b879;
}

.archive-site:not(.archive-site--login) .metadata-editor__actions button {
  min-width: 170px;
}

@media (max-width: 1060px) {
  .archive-site:not(.archive-site--login) .track-row {
    grid-template-columns: 72px 58px minmax(160px, 1fr) minmax(180px, 0.7fr);
  }

  .archive-site:not(.archive-site--login) .track-row__actions {
    grid-column: 3 / -1;
  }
}

@media (max-width: 780px) {
  .archive-site:not(.archive-site--login) .archive-intro {
    align-items: flex-start;
    flex-direction: column;
  }

  .archive-site:not(.archive-site--login) .upload-drawer,
  .archive-site:not(.archive-site--login) .metadata-editor__layout {
    grid-template-columns: 1fr;
  }

  .archive-site:not(.archive-site--login) .upload-form {
    grid-template-columns: 1fr 1fr;
  }

  .archive-site:not(.archive-site--login) .upload-form > button {
    grid-column: 1 / -1;
  }

  .archive-site:not(.archive-site--login) .artwork-editor {
    position: static;
    display: grid;
    grid-template-columns: minmax(120px, 190px) minmax(0, 1fr);
    align-items: start;
    gap: 1rem;
  }

  .archive-site:not(.archive-site--login) .artwork-editor__preview {
    grid-row: 1 / span 3;
  }
}

@media (max-width: 620px) {
  .archive-site:not(.archive-site--login) .archive-header,
  .archive-site:not(.archive-site--login) .archive-shell {
    width: min(100% - 1rem, 1220px);
  }

  .archive-site:not(.archive-site--login) .archive-intro,
  .archive-site:not(.archive-site--login) .metadata-editor {
    padding: 1.25rem;
  }

  .archive-site:not(.archive-site--login) .archive-intro h1 {
    font-size: clamp(3rem, 16vw, 5.2rem);
  }

  .archive-site:not(.archive-site--login) .track-row {
    padding: 1rem 1.25rem;
    grid-template-columns: 58px minmax(0, 1fr);
  }

  .archive-site:not(.archive-site--login) .track-row__artwork {
    width: 58px;
    grid-row: 1 / span 2;
  }

  .archive-site:not(.archive-site--login) .track-row__number,
  .archive-site:not(.archive-site--login) .track-row__identity,
  .archive-site:not(.archive-site--login) .track-row__audio,
  .archive-site:not(.archive-site--login) .track-row__actions {
    grid-column: 2;
  }

  .archive-site:not(.archive-site--login) .track-row__actions {
    gap: 0.45rem;
  }

  .archive-site:not(.archive-site--login) .metadata-editor__heading,
  .archive-site:not(.archive-site--login) .artwork-editor {
    display: grid;
    grid-template-columns: 1fr;
  }

  .archive-site:not(.archive-site--login) .record-publish-control {
    width: 100%;
  }

  .archive-site:not(.archive-site--login) .manager-grid {
    grid-template-columns: 1fr;
  }

  .archive-site:not(.archive-site--login) .manager-grid .field--wide {
    grid-column: auto;
  }

  .archive-site:not(.archive-site--login) .metadata-editor__actions {
    margin-inline: -0.5rem;
  }
}

/* Nested label-record accordions */
.archive-site:not(.archive-site--login) .track-editor-disclosure {
  border-top: 1px solid rgba(177, 135, 79, 0.2);
  background: rgba(10, 6, 4, 0.24);
}

.archive-site:not(.archive-site--login) .track-editor-disclosure:not([open]) > .metadata-editor,
.archive-site:not(.archive-site--login) .manager-section:not([open]) > .manager-grid {
  display: none;
}

.archive-site:not(.archive-site--login) .track-editor-disclosure__summary {
  display: flex;
  min-height: 58px;
  padding: 0.8rem clamp(1.25rem, 3vw, 2.4rem);
  align-items: center;
  gap: 1rem;
  color: #ead7b4;
  cursor: pointer;
  list-style: none;
  background:
    linear-gradient(90deg, rgba(80, 134, 123, 0.05), transparent 45%),
    rgba(16, 9, 6, 0.34);
}

.archive-site:not(.archive-site--login) .track-editor-disclosure__summary::-webkit-details-marker,
.archive-site:not(.archive-site--login) .manager-section > summary::-webkit-details-marker {
  display: none;
}

.archive-site:not(.archive-site--login) .track-editor-disclosure__summary > span:first-child {
  display: grid;
  min-width: 0;
  margin-right: auto;
  gap: 0.18rem;
}

.archive-site:not(.archive-site--login) .track-editor-disclosure__kicker,
.archive-site:not(.archive-site--login) .track-editor-disclosure__state {
  font-family: "Courier New", monospace;
  font-size: 0.55rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.archive-site:not(.archive-site--login) .track-editor-disclosure__kicker {
  color: rgba(177, 135, 79, 0.65);
}

.archive-site:not(.archive-site--login) .track-editor-disclosure__summary strong {
  font-size: 0.92rem;
  font-weight: 400;
  letter-spacing: 0.02em;
}

.archive-site:not(.archive-site--login) .track-editor-disclosure__state {
  color: rgba(223, 208, 177, 0.42);
}

.archive-site:not(.archive-site--login) .track-editor-disclosure__summary::after,
.archive-site:not(.archive-site--login) .manager-section > summary::after {
  display: grid;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(177, 135, 79, 0.34);
  flex: 0 0 auto;
  place-items: center;
  color: var(--brass);
  content: "+";
  font-family: "Courier New", monospace;
  font-size: 1rem;
  line-height: 1;
}

.archive-site:not(.archive-site--login) .track-editor-disclosure[open] > .track-editor-disclosure__summary {
  border-bottom: 1px solid rgba(177, 135, 79, 0.22);
  color: #f0dfbd;
  background:
    linear-gradient(90deg, rgba(80, 134, 123, 0.1), transparent 52%),
    rgba(16, 9, 6, 0.62);
}

.archive-site:not(.archive-site--login) .track-editor-disclosure[open] > .track-editor-disclosure__summary::after,
.archive-site:not(.archive-site--login) .manager-section[open] > summary::after {
  border-color: rgba(80, 134, 123, 0.64);
  color: #a9d4c7;
  content: "−";
}

.archive-site:not(.archive-site--login) .track-editor-disclosure__summary:hover,
.archive-site:not(.archive-site--login) .track-editor-disclosure__summary:focus-visible {
  color: #fff0cf;
  outline: none;
  box-shadow: inset 3px 0 rgba(80, 134, 123, 0.44);
}

.archive-site:not(.archive-site--login) .track-editor-disclosure.is-dirty {
  border-top-color: rgba(214, 184, 121, 0.52);
}

.archive-site:not(.archive-site--login) .track-editor-disclosure.is-dirty .track-editor-disclosure__state {
  color: #d6b879;
}

.archive-site:not(.archive-site--login) .track-editor-disclosure.is-dirty .track-editor-disclosure__state::before {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 0.45rem;
  border-radius: 50%;
  background: #d6b879;
  box-shadow: 0 0 8px rgba(214, 184, 121, 0.6);
  content: "";
  vertical-align: 0.05em;
}

.archive-site:not(.archive-site--login) .metadata-editor__layout--nested {
  display: block;
}

.archive-site:not(.archive-site--login) .metadata-editor__heading > p {
  max-width: 34rem;
  margin: 0;
  color: rgba(223, 208, 177, 0.48);
  font-size: 0.76rem;
  line-height: 1.55;
}

.archive-site:not(.archive-site--login) .manager-section > summary {
  display: flex;
  min-height: 52px;
  align-items: center;
  gap: 0.8rem;
  list-style: none;
}

.archive-site:not(.archive-site--login) .manager-section > summary::after {
  margin-left: auto;
}

.archive-site:not(.archive-site--login) .manager-grid--artwork .artwork-editor {
  position: static;
  display: grid;
  grid-template-columns: minmax(180px, 240px) minmax(0, 1fr);
  align-items: start;
  gap: 1rem;
}

.archive-site:not(.archive-site--login) .manager-grid--artwork .artwork-editor__preview {
  grid-row: 1 / span 3;
  margin-bottom: 0;
}

.archive-site:not(.archive-site--login) .manager-grid--artwork .artwork-editor__facts,
.archive-site:not(.archive-site--login) .manager-grid--artwork .check-field {
  margin-block: 0;
}

@media (max-width: 620px) {
  .archive-site:not(.archive-site--login) .track-editor-disclosure__summary {
    min-height: 64px;
    padding: 0.75rem 1rem;
  }

  .archive-site:not(.archive-site--login) .track-editor-disclosure__state {
    max-width: 9rem;
    text-align: right;
  }

  .archive-site:not(.archive-site--login) .metadata-editor__heading {
    gap: 0.75rem;
  }

  .archive-site:not(.archive-site--login) .metadata-editor__heading h3 {
    font-size: 1.8rem;
  }

  .archive-site:not(.archive-site--login) .metadata-editor__heading > p {
    margin-top: 0;
  }

  .archive-site:not(.archive-site--login) .manager-section {
    margin-bottom: 0.65rem;
  }

  .archive-site:not(.archive-site--login) .manager-section > summary {
    min-height: 58px;
    padding: 0.8rem 0.85rem;
    font-size: 0.58rem;
    line-height: 1.4;
  }

  .archive-site:not(.archive-site--login) .manager-grid {
    padding: 0.8rem;
    gap: 0.85rem;
  }

  .archive-site:not(.archive-site--login) .manager-grid--artwork .artwork-editor {
    display: grid;
    grid-template-columns: 1fr;
  }

  .archive-site:not(.archive-site--login) .manager-grid--artwork .artwork-editor__preview {
    width: min(100%, 280px);
    grid-row: auto;
  }

  .archive-site:not(.archive-site--login) .track-editor-disclosure[open] .metadata-editor {
    padding-bottom: calc(6.4rem + env(safe-area-inset-bottom));
  }

  .archive-site:not(.archive-site--login) .track-editor-disclosure[open] .metadata-editor__actions {
    position: fixed;
    right: 0.5rem;
    bottom: max(0.5rem, env(safe-area-inset-bottom));
    left: 0.5rem;
    z-index: 50;
    min-height: 62px;
    margin: 0;
    padding: 0.65rem;
    border: 1px solid rgba(177, 135, 79, 0.46);
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.55);
  }

  .archive-site:not(.archive-site--login) .metadata-editor__actions button {
    min-width: 0;
    flex: 0 1 auto;
  }
}
/* Universal ThirdPocket.Studio project registry */
.project-registry {
  margin-bottom: 1.4rem;
  padding: clamp(1rem, 2.5vw, 1.6rem);
  border: 1px solid rgba(199, 160, 102, 0.34);
  background:
    linear-gradient(145deg, rgba(199, 160, 102, 0.07), transparent 42%),
    rgba(19, 11, 8, 0.82);
}

.project-registry__header {
  display: flex;
  margin-bottom: 1rem;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
}

.project-registry__header h2 {
  margin: 0.15rem 0 0;
}

.project-registry__header > p {
  max-width: 34rem;
  margin: 0;
  color: var(--archive-muted, #a9967e);
  font-size: 0.75rem;
}

.project-registry__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 310px), 1fr));
  gap: 0.85rem;
}

.project-card {
  display: grid;
  padding: 0.9rem;
  border: 1px solid rgba(199, 160, 102, 0.25);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
  background: rgba(8, 5, 4, 0.34);
}

.project-card__sigil img {
  display: block;
  width: 88px;
  height: 88px;
  margin: 0.35rem 0;
  border: 1px solid rgba(205, 171, 105, 0.38);
  border-radius: 50%;
  object-fit: cover;
  background: #120c08;
}

.project-card--new {
  border-style: dashed;
}

.project-card header,
.project-card > button,
.project-card .field--wide {
  grid-column: 1 / -1;
}

.project-card header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem;
}

.project-card header p,
.project-card header span {
  margin: 0;
}

.project-card header span {
  color: var(--archive-muted, #a9967e);
  font-size: 0.65rem;
}

.project-card input,
.project-card select,
.upload-form select,
.metadata-editor select {
  width: 100%;
}

@media (max-width: 640px) {
  .project-registry__header {
    display: block;
  }

  .project-registry__header > p {
    margin-top: 0.55rem;
  }

  .project-card {
    grid-template-columns: 1fr;
  }

  .project-card > * {
    grid-column: 1;
  }
}

/* Label-office shell and catalogue workspace */
html {
  scroll-padding-top: 7.5rem;
}

.archive-header__brand {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 0.7rem;
  color: #f0dfbd;
  text-decoration: none;
}

.archive-header__brand img {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(214, 184, 121, 0.34);
  border-radius: 50%;
  object-fit: cover;
  filter: sepia(0.12) saturate(0.86);
}

.archive-header__brand span {
  display: grid;
  min-width: 0;
  gap: 0.12rem;
}

.archive-header__brand strong,
.archive-header__brand small {
  overflow: hidden;
  font-family: "Courier New", monospace;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.archive-header__brand strong {
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.13em;
}

.archive-header__brand small {
  color: rgba(177, 135, 79, 0.68);
  font-size: 0.52rem;
  letter-spacing: 0.16em;
}

.archive-header__utilities {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem;
}

.archive-header__utilities > a,
.logout-form--header button {
  min-height: 38px;
  padding: 0.65rem 0.78rem;
  border: 1px solid rgba(177, 135, 79, 0.28);
  color: rgba(223, 208, 177, 0.7);
  background: rgba(16, 9, 6, 0.38);
  font-family: "Courier New", monospace;
  font-size: 0.54rem;
  letter-spacing: 0.09em;
  line-height: 1;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
}

.archive-header__utilities > a:hover,
.archive-header__utilities > a:focus-visible,
.logout-form--header button:hover,
.logout-form--header button:focus-visible {
  border-color: var(--verdigris);
  color: #fff0cf;
  outline: none;
  background: rgba(80, 134, 123, 0.11);
}

.logout-form--header {
  margin: 0;
}

.logout-form--header button {
  cursor: pointer;
}

.archive-site:not(.archive-site--login) .archive-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: grid;
  width: 100%;
  min-height: 66px;
  margin: 0;
  padding: 0.55rem max(1rem, calc((100vw - 1220px) / 2));
  border-bottom: 1px solid rgba(214, 184, 121, 0.3);
  grid-template-columns: minmax(190px, auto) minmax(330px, 1fr) auto;
  align-items: center;
  gap: clamp(0.8rem, 2vw, 2rem);
  background:
    linear-gradient(90deg, rgba(64, 35, 23, 0.18), transparent 32%),
    rgba(11, 6, 4, 0.92);
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(14px);
}

.office-nav {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
}

.office-nav a {
  position: relative;
  min-height: 38px;
  padding: 0.72rem clamp(0.55rem, 1.2vw, 0.9rem);
  color: rgba(223, 208, 177, 0.58);
  font-family: "Courier New", monospace;
  font-size: 0.55rem;
  letter-spacing: 0.09em;
  line-height: 1;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
}

.office-nav a::after {
  position: absolute;
  right: 0.65rem;
  bottom: 0.28rem;
  left: 0.65rem;
  height: 1px;
  background: transparent;
  content: "";
}

.office-nav a:hover,
.office-nav a:focus-visible {
  color: #f0dfbd;
  outline: none;
}

.office-nav a:hover::after,
.office-nav a:focus-visible::after {
  background: rgba(80, 134, 123, 0.72);
}

.office-nav .office-nav__primary {
  border: 1px solid rgba(214, 184, 121, 0.4);
  color: #edd8ae;
  background: rgba(91, 52, 32, 0.32);
}

.archive-site:not(.archive-site--login) .archive-shell {
  padding-top: clamp(1.2rem, 3vw, 2.4rem);
}

.archive-site:not(.archive-site--login) [data-office-section] {
  scroll-margin-top: 7.5rem;
}

.archive-site:not(.archive-site--login) .archive-intro {
  display: grid;
  margin-bottom: clamp(1.25rem, 3vw, 2.2rem);
  padding: clamp(1.5rem, 4vw, 3rem);
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  align-items: stretch;
  gap: clamp(1.5rem, 4vw, 4rem);
}

.archive-site:not(.archive-site--login) .archive-intro h1 {
  max-width: 10ch;
  font-size: clamp(3rem, 6.5vw, 6rem);
  line-height: 0.86;
}

.archive-site:not(.archive-site--login) .archive-intro > div > p:last-child {
  max-width: 34rem;
  margin-top: 1.35rem;
}

.office-summary {
  display: grid;
  border: 1px solid rgba(177, 135, 79, 0.28);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-self: stretch;
  background: rgba(13, 7, 5, 0.48);
}

.office-summary > div {
  display: grid;
  min-width: 0;
  padding: clamp(0.9rem, 2vw, 1.35rem);
  border-right: 1px solid rgba(177, 135, 79, 0.18);
  align-content: center;
  gap: 0.3rem;
}

.office-summary > div:nth-child(3) {
  border-right: 0;
}

.office-summary strong {
  color: #f0dfbd;
  font-size: clamp(1.65rem, 3vw, 2.5rem);
  font-weight: 400;
  line-height: 1;
}

.office-summary span {
  color: rgba(177, 135, 79, 0.7);
  font-family: "Courier New", monospace;
  font-size: 0.52rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.office-summary > a {
  display: flex;
  min-height: 52px;
  padding: 0.9rem 1.15rem;
  border-top: 1px solid rgba(177, 135, 79, 0.28);
  grid-column: 1 / -1;
  align-items: center;
  justify-content: space-between;
  color: #efdcb6;
  background: linear-gradient(90deg, rgba(91, 52, 32, 0.52), rgba(80, 134, 123, 0.08));
  font-family: "Courier New", monospace;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-decoration: none;
  text-transform: uppercase;
}

.office-summary > a:hover,
.office-summary > a:focus-visible {
  color: #fff3d7;
  outline: 1px solid var(--verdigris);
  outline-offset: -1px;
  background: linear-gradient(90deg, rgba(104, 61, 37, 0.66), rgba(80, 134, 123, 0.17));
}

.archive-site:not(.archive-site--login) .upload-drawer {
  display: grid;
  margin-bottom: 1.2rem;
  padding: clamp(1.25rem, 3vw, 2.2rem);
  border-color: rgba(214, 184, 121, 0.48);
  grid-template-columns: minmax(230px, 0.62fr) minmax(0, 1.38fr);
  align-items: stretch;
  gap: clamp(1.5rem, 4vw, 3rem);
  background:
    radial-gradient(circle at 8% 12%, rgba(177, 135, 79, 0.12), transparent 26rem),
    linear-gradient(120deg, rgba(74, 43, 28, 0.48), rgba(15, 8, 6, 0.96));
  box-shadow: 0 28px 78px rgba(0, 0, 0, 0.34);
}

.upload-drawer__intro {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.archive-site:not(.archive-site--login) .upload-drawer h2 {
  max-width: 8ch;
  color: #f2dfba;
  font-size: clamp(2.3rem, 4.5vw, 4rem);
  line-height: 0.92;
}

.upload-drawer__intro > p:not(.archive-kicker) {
  max-width: 34rem;
  margin: 1.1rem 0 0;
  color: rgba(223, 208, 177, 0.68);
  font-size: 0.9rem;
  line-height: 1.65;
}

.upload-drawer__steps {
  display: grid;
  margin: auto 0 0;
  padding: 1.2rem 0 0;
  border-top: 1px solid rgba(177, 135, 79, 0.2);
  gap: 0.55rem;
  list-style: none;
}

.upload-drawer__steps li {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  color: rgba(223, 208, 177, 0.54);
  font-family: "Courier New", monospace;
  font-size: 0.58rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.upload-drawer__steps span {
  color: var(--brass);
}

.archive-site:not(.archive-site--login) .upload-form {
  display: grid;
  min-width: 0;
  padding: clamp(1rem, 2vw, 1.35rem);
  border: 1px solid rgba(177, 135, 79, 0.24);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 0.85rem;
  background: rgba(10, 6, 4, 0.5);
}

.archive-site:not(.archive-site--login) .upload-form input[type="text"],
.archive-site:not(.archive-site--login) .upload-form select,
.ledger-toolbar input[type="search"],
.ledger-toolbar select {
  width: 100%;
  min-height: 46px;
  padding: 0 0.82rem;
  border: 1px solid rgba(177, 135, 79, 0.36);
  border-radius: 0;
  outline: none;
  color: var(--linen);
  background: rgba(16, 9, 6, 0.82);
}

.archive-site:not(.archive-site--login) .upload-form input:focus,
.archive-site:not(.archive-site--login) .upload-form select:focus,
.ledger-toolbar input:focus,
.ledger-toolbar select:focus {
  border-color: var(--verdigris);
  box-shadow: 0 0 0 2px rgba(80, 134, 123, 0.13);
}

.upload-file-field {
  min-width: 0;
  padding: 0.95rem;
  border: 1px dashed rgba(177, 135, 79, 0.38);
  background: rgba(45, 25, 17, 0.34);
}

.upload-file-field--required {
  border-style: solid;
  border-color: rgba(80, 134, 123, 0.62);
  background: rgba(40, 77, 70, 0.1);
}

.upload-file-field__heading {
  display: flex;
  margin-bottom: 0.72rem;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.7rem;
}

.upload-file-field__heading label {
  margin: 0;
  color: #ead7b4;
}

.upload-file-field__heading span {
  color: rgba(223, 208, 177, 0.4);
  font-family: "Courier New", monospace;
  font-size: 0.5rem;
  letter-spacing: 0.04em;
  text-align: right;
  text-transform: uppercase;
}

.archive-site:not(.archive-site--login) .upload-file-field input[type="file"] {
  min-height: 46px;
  padding: 0.34rem;
  border-color: rgba(177, 135, 79, 0.28);
  color: rgba(223, 208, 177, 0.56);
  background: rgba(8, 5, 4, 0.62);
}

.upload-file-field input[type="file"]::file-selector-button {
  min-height: 36px;
  margin-right: 0.7rem;
  padding: 0.55rem 0.72rem;
  border: 1px solid rgba(214, 184, 121, 0.42);
  color: #ead7b4;
  background: rgba(91, 52, 32, 0.56);
  cursor: pointer;
  font-family: "Courier New", monospace;
  font-size: 0.56rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.archive-site:not(.archive-site--login) .upload-form > button {
  display: flex;
  min-height: 58px;
  padding: 0.8rem 1.1rem;
  grid-column: 1 / -1;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  text-align: left;
}

.upload-form > button span {
  font-size: 0.68rem;
}

.upload-form > button small {
  color: rgba(239, 220, 182, 0.52);
  font-size: 0.5rem;
  letter-spacing: 0.06em;
}

.archive-site:not(.archive-site--login) .project-registry {
  margin-bottom: 1.2rem;
  padding: 0;
  overflow: hidden;
}

.archive-site:not(.archive-site--login) .project-registry__header {
  display: flex;
  min-height: 88px;
  padding: 1rem clamp(1rem, 2.5vw, 1.6rem);
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
  cursor: pointer;
  list-style: none;
}

.project-registry__header::-webkit-details-marker {
  display: none;
}

.project-registry__header::after {
  display: grid;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(177, 135, 79, 0.4);
  flex: 0 0 auto;
  place-items: center;
  color: var(--brass);
  content: "+";
  font-family: "Courier New", monospace;
}

.project-registry[open] > .project-registry__header::after {
  border-color: rgba(80, 134, 123, 0.64);
  color: #a9d4c7;
  content: "−";
}

.project-registry__header:hover,
.project-registry__header:focus-visible {
  outline: none;
  background: rgba(177, 135, 79, 0.05);
  box-shadow: inset 3px 0 rgba(80, 134, 123, 0.42);
}

.project-registry__header h2 {
  color: #f0dfbd;
  font-size: clamp(1.6rem, 3vw, 2.35rem);
  font-weight: 400;
}

.project-registry__summary-copy {
  display: grid;
  margin-left: auto;
  gap: 0.2rem;
  color: rgba(223, 208, 177, 0.46);
  font-family: "Courier New", monospace;
  font-size: 0.54rem;
  letter-spacing: 0.08em;
  text-align: right;
  text-transform: uppercase;
}

.project-registry__summary-copy strong {
  color: var(--brass);
  font-size: 0.58rem;
  font-weight: 400;
}

.project-registry__note {
  margin: 0;
  padding: 0 1.6rem 1rem;
  color: rgba(223, 208, 177, 0.5);
  font-size: 0.76rem;
  line-height: 1.55;
}

.archive-site:not(.archive-site--login) .project-registry__grid {
  padding: 0 1rem 1rem;
}

.archive-site:not(.archive-site--login) .ledger {
  margin-top: 1.4rem;
}

.archive-site:not(.archive-site--login) .ledger__header {
  padding: 1.4rem 0;
}

.ledger__header > p strong {
  color: #dfc28a;
  font-size: 0.82rem;
  font-weight: 400;
}

.ledger-toolbar {
  display: grid;
  margin: 0 0 0.5rem;
  padding: 1rem;
  border: 1px solid rgba(177, 135, 79, 0.3);
  grid-template-columns: minmax(260px, 1.5fr) minmax(160px, 0.75fr) minmax(150px, 0.65fr) auto;
  align-items: end;
  gap: 0.75rem;
  background:
    linear-gradient(90deg, rgba(80, 134, 123, 0.05), transparent 38%),
    rgba(20, 11, 7, 0.82);
}

.ledger-toolbar .field label {
  margin-bottom: 0.38rem;
}

.ledger-toolbar button {
  min-height: 46px;
  padding: 0 0.85rem;
  border: 1px solid rgba(177, 135, 79, 0.34);
  color: rgba(223, 208, 177, 0.62);
  background: transparent;
  cursor: pointer;
  font-family: "Courier New", monospace;
  font-size: 0.55rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ledger-toolbar button:hover,
.ledger-toolbar button:focus-visible {
  border-color: var(--verdigris);
  color: #f0dfbd;
  outline: none;
}

.ledger-filter-empty {
  margin: 1rem 0 0;
  padding: 2rem;
  border: 1px dashed rgba(177, 135, 79, 0.32);
  color: rgba(223, 208, 177, 0.55);
  font-family: "Courier New", monospace;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
}

.track-record[hidden] {
  display: none !important;
}

.archive-site:not(.archive-site--login) .track-list {
  gap: 1rem;
}

.track-row__identity .track-row__project {
  margin-top: 0.38rem;
  color: rgba(200, 137, 85, 0.78);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.track-row__identity .track-row__file {
  margin-top: 0.25rem;
}

@media (max-width: 1080px) {
  .archive-site:not(.archive-site--login) .archive-header {
    grid-template-columns: minmax(180px, auto) 1fr auto;
    gap: 0.55rem;
  }

  .office-nav a {
    padding-inline: 0.52rem;
  }

  .archive-header__utilities > a span {
    display: none;
  }

  .ledger-toolbar {
    grid-template-columns: minmax(240px, 1.5fr) repeat(2, minmax(145px, 0.7fr));
  }

  .ledger-toolbar button {
    grid-column: 1 / -1;
    justify-self: end;
  }
}

@media (max-width: 900px) {
  html {
    scroll-padding-top: 8.5rem;
  }

  .archive-site:not(.archive-site--login) .archive-header {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
  }

  .office-nav {
    width: 100%;
    padding-top: 0.35rem;
    border-top: 1px solid rgba(177, 135, 79, 0.16);
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: flex-start;
    overflow-x: auto;
    scrollbar-width: thin;
  }

  .office-nav a {
    flex: 0 0 auto;
  }

  .archive-site:not(.archive-site--login) [data-office-section] {
    scroll-margin-top: 8.5rem;
  }

  .archive-site:not(.archive-site--login) .archive-intro,
  .archive-site:not(.archive-site--login) .upload-drawer {
    grid-template-columns: 1fr;
  }

  .archive-site:not(.archive-site--login) .archive-intro h1,
  .archive-site:not(.archive-site--login) .upload-drawer h2 {
    max-width: 12ch;
  }

  .upload-drawer__steps {
    margin-top: 1.25rem;
  }

  .ledger-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ledger-toolbar__search {
    grid-column: 1 / -1;
  }

  .ledger-toolbar button {
    grid-column: 1 / -1;
  }
}

@media (max-width: 620px) {
  html {
    scroll-padding-top: 8rem;
  }

  .archive-site:not(.archive-site--login) .archive-header {
    min-height: 0;
    padding: 0.45rem 0.5rem;
  }

  .archive-header__brand img {
    width: 38px;
    height: 38px;
  }

  .archive-header__brand strong {
    font-size: 0.62rem;
  }

  .archive-header__brand small {
    font-size: 0.46rem;
  }

  .archive-header__utilities > a,
  .logout-form--header button {
    min-height: 34px;
    padding: 0.55rem 0.58rem;
    font-size: 0.48rem;
  }

  .archive-header__utilities > a {
    max-width: 5.6rem;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .office-nav {
    gap: 0.1rem;
  }

  .office-nav a {
    min-height: 34px;
    padding: 0.62rem 0.58rem;
    font-size: 0.5rem;
  }

  .archive-site:not(.archive-site--login) [data-office-section] {
    scroll-margin-top: 8rem;
  }

  .archive-site:not(.archive-site--login) .archive-intro,
  .archive-site:not(.archive-site--login) .upload-drawer {
    padding: 1.1rem;
  }

  .archive-site:not(.archive-site--login) .archive-intro h1 {
    font-size: clamp(2.8rem, 15vw, 4.5rem);
  }

  .office-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .office-summary > div {
    padding: 0.8rem 0.65rem;
  }

  .office-summary strong {
    font-size: 1.6rem;
  }

  .office-summary span {
    font-size: 0.44rem;
  }

  .archive-site:not(.archive-site--login) .upload-form,
  .ledger-toolbar {
    grid-template-columns: 1fr;
  }

  .archive-site:not(.archive-site--login) .upload-form > *,
  .ledger-toolbar > * {
    grid-column: 1;
  }

  .upload-file-field__heading {
    display: grid;
    gap: 0.28rem;
  }

  .upload-file-field__heading span {
    text-align: left;
  }

  .archive-site:not(.archive-site--login) .upload-form > button {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 0.25rem;
  }

  .archive-site:not(.archive-site--login) .project-registry__header {
    display: grid;
    min-height: 94px;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .project-registry__summary-copy {
    display: none;
  }

  .project-registry__header::after {
    grid-column: 2;
    grid-row: 1;
  }

  .project-registry__note {
    padding-inline: 1rem;
  }

  .archive-site:not(.archive-site--login) .ledger__header {
    display: block;
  }

  .archive-site:not(.archive-site--login) .ledger__header > p {
    margin: 0.65rem 0 0;
  }

  .ledger-toolbar button {
    width: 100%;
  }

  .track-row__identity .track-row__project {
    margin-top: 0.32rem;
  }
}

body.is-timed-lyrics-open {
  overflow: hidden;
}

body.is-timeline-dragging,
body.is-timeline-dragging * {
  cursor: ew-resize !important;
  user-select: none !important;
}

.timed-lyrics-launcher {
  display: grid;
  padding: clamp(1rem, 2vw, 1.35rem);
  border: 1px solid rgba(51, 201, 206, 0.26);
  background:
    linear-gradient(100deg, rgba(51, 201, 206, 0.07), transparent 48%),
    rgba(3, 9, 8, 0.58);
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
}

.timed-lyrics-launcher > div:first-child {
  display: grid;
  gap: 0.25rem;
}

.timed-lyrics-launcher strong {
  color: #eadfc8;
  font-size: 1rem;
  font-weight: 400;
}

.timed-lyrics-launcher small {
  color: rgba(216, 206, 185, 0.54);
  font-family: "Courier New", monospace;
  font-size: 0.58rem;
  line-height: 1.5;
}

.timed-lyrics-launcher__actions,
.timed-lyrics-editor__header-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.timed-lyrics-launcher button {
  min-height: 42px;
  padding: 0.65rem 0.9rem;
  border: 1px solid rgba(51, 201, 206, 0.52);
  color: #b8f1ed;
  background: rgba(8, 29, 27, 0.78);
  cursor: pointer;
  font-family: "Courier New", monospace;
  font-size: 0.61rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.timed-lyrics-launcher button:hover,
.timed-lyrics-launcher button:focus-visible {
  border-color: #9ef4ed;
  color: #efffff;
  outline: 1px solid rgba(51, 201, 206, 0.3);
  outline-offset: 3px;
}

.timed-lyrics-dialog {
  width: min(96vw, 1600px);
  max-width: none;
  height: min(94vh, 1000px);
  max-height: none;
  margin: auto;
  padding: 0;
  border: 1px solid rgba(89, 211, 205, 0.48);
  color: var(--linen);
  background: #080d0b;
  box-shadow:
    0 38px 130px rgba(0, 0, 0, 0.82),
    0 0 0 1px rgba(155, 106, 50, 0.18),
    inset 0 0 80px rgba(51, 201, 206, 0.035);
  overflow: hidden;
}

.timed-lyrics-dialog[open] {
  animation: timed-lyrics-dialog-arrives 240ms cubic-bezier(0.2, 0.75, 0.25, 1) both;
}

.timed-lyrics-dialog::backdrop {
  background:
    radial-gradient(circle at 50% 42%, rgba(32, 83, 78, 0.2), transparent 44%),
    rgba(1, 4, 3, 0.86);
  backdrop-filter: blur(7px);
}

@keyframes timed-lyrics-dialog-arrives {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.timed-lyrics-dialog > .timed-lyrics-editor {
  width: 100%;
  height: 100%;
  max-height: 100%;
  border: 0;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  overflow: hidden;
}

.timed-lyrics-editor {
  display: grid;
  gap: 1rem;
  padding: clamp(1rem, 2.2vw, 1.6rem);
  border: 1px solid rgba(66, 124, 112, 0.42);
  background:
    linear-gradient(145deg, rgba(10, 19, 17, 0.96), rgba(15, 15, 12, 0.96)),
    repeating-linear-gradient(90deg, transparent 0 48px, rgba(51, 201, 206, 0.025) 49px);
  box-shadow: inset 0 0 34px rgba(51, 201, 206, 0.035);
}

.timed-lyrics-editor__header,
.timed-lyrics-editor__toolbar,
.timed-lyrics-editor__footer,
.timed-lyrics-transport,
.timed-lyrics-vtt-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.timed-lyrics-editor__header {
  justify-content: space-between;
}

.timed-lyrics-editor__header-actions {
  justify-content: flex-end;
}

.timed-lyrics-editor .timed-lyrics-close {
  border-color: rgba(216, 206, 185, 0.3);
  color: rgba(234, 223, 200, 0.7);
}

.timed-lyrics-editor__header h4 {
  margin: 0.2rem 0 0;
  color: #eadfc8;
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  font-weight: 400;
}

.timed-lyrics-editor__kicker,
.timed-lyrics-status,
.timed-lyrics-editor__hint,
.timed-lyrics-now span,
.timed-lyrics-cue-list time,
.timed-lyrics-editor__footer [role="status"] {
  font-family: "Courier New", monospace;
}

.timed-lyrics-editor__kicker {
  color: rgba(51, 201, 206, 0.7);
  font-size: 0.58rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.timed-lyrics-status {
  padding: 0.42rem 0.65rem;
  border: 1px solid rgba(216, 206, 185, 0.24);
  color: rgba(216, 206, 185, 0.7);
  font-size: 0.58rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.timed-lyrics-status--ready {
  border-color: rgba(51, 201, 206, 0.62);
  color: #8ce7df;
  box-shadow: 0 0 18px rgba(51, 201, 206, 0.1);
}

.timed-lyrics-status--draft {
  border-color: rgba(183, 106, 61, 0.54);
  color: #dca078;
}

.timed-lyrics-status--instrumental {
  border-color: rgba(128, 87, 255, 0.44);
  color: #b9a6ff;
}

.timed-lyrics-editor__toolbar {
  justify-content: space-between;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(216, 206, 185, 0.11);
}

.timed-lyrics-editor button {
  min-height: 36px;
  padding: 0.55rem 0.72rem;
  border: 1px solid rgba(155, 106, 50, 0.42);
  color: rgba(234, 223, 200, 0.82);
  background: rgba(7, 9, 8, 0.68);
  cursor: pointer;
  font-family: "Courier New", monospace;
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.timed-lyrics-editor button:hover,
.timed-lyrics-editor button:focus-visible,
.timed-lyrics-editor button[aria-selected="true"] {
  border-color: var(--cyan);
  color: #e9ffff;
  outline: none;
}

.timed-lyrics-editor button:disabled {
  cursor: not-allowed;
  opacity: 0.38;
}

.timed-lyrics-tabs {
  display: inline-flex;
  gap: 0.2rem;
}

.timed-lyrics-panel {
  display: grid;
  gap: 0.85rem;
}

.timed-lyrics-panel--guided {
  min-height: 0;
  overflow: hidden;
}

.timed-lyrics-panel[hidden] {
  display: none;
}

.timed-lyrics-workspace {
  display: grid;
  min-height: 0;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 390px);
  gap: 1rem;
}

.timed-lyrics-stage,
.timed-lyrics-lines {
  min-width: 0;
  min-height: 0;
}

.timed-lyrics-stage {
  display: grid;
  align-content: start;
  padding-right: 0.2rem;
  gap: 0.75rem;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.timed-lyrics-lines {
  display: grid;
  border: 1px solid rgba(216, 206, 185, 0.12);
  background: rgba(0, 0, 0, 0.2);
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

.timed-lyrics-lines > header {
  display: flex;
  min-height: 62px;
  padding: 0.72rem 0.8rem;
  border-bottom: 1px solid rgba(216, 206, 185, 0.12);
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.timed-lyrics-lines > header > div {
  display: grid;
  gap: 0.18rem;
}

.timed-lyrics-lines > header strong {
  color: #eadfc8;
  font-size: 0.88rem;
  font-weight: 400;
}

.timed-lyrics-lines > header small,
.timed-lyrics-lines > header > span {
  color: rgba(216, 206, 185, 0.5);
  font-family: "Courier New", monospace;
  font-size: 0.54rem;
  line-height: 1.35;
}

.timed-lyrics-lines > header > span {
  flex: 0 0 auto;
  color: rgba(51, 201, 206, 0.72);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.timed-lyrics-now {
  display: grid;
  min-height: 86px;
  padding: 0.8rem 1rem;
  border: 1px solid rgba(51, 201, 206, 0.18);
  background: rgba(0, 0, 0, 0.28);
  grid-template-columns: 7rem minmax(0, 1fr);
  align-items: center;
  gap: 1rem;
}

.timed-lyrics-now > div {
  display: grid;
  min-width: 0;
  align-content: center;
  gap: 0.3rem;
}

.timed-lyrics-now small {
  color: rgba(216, 206, 185, 0.42);
  font-family: "Courier New", monospace;
  font-size: 0.5rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.timed-lyrics-now span {
  color: var(--cyan);
  font-size: 0.72rem;
  letter-spacing: 0.07em;
}

.timed-lyrics-now output {
  display: block;
  color: #f0e5cf;
  font-size: clamp(1rem, 2.2vw, 1.45rem);
  line-height: 1.2;
}

.timed-lyrics-workspace-tools {
  display: flex;
  min-width: 0;
  padding: 0.55rem 0.65rem;
  border: 1px solid rgba(216, 206, 185, 0.13);
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  background: rgba(0, 0, 0, 0.22);
}

.timed-lyrics-zoom {
  display: grid;
  min-width: 0;
  flex: 1 1 auto;
  grid-template-columns: auto 36px minmax(110px, 1fr) 36px auto auto;
  align-items: center;
  gap: 0.38rem;
}

.timed-lyrics-zoom > strong {
  margin-right: 0.25rem;
  color: rgba(234, 223, 200, 0.7);
  font-family: "Courier New", monospace;
  font-size: 0.54rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.timed-lyrics-editor .timed-lyrics-zoom > button,
.timed-lyrics-editor .timed-lyrics-auto-scroll {
  min-height: 34px;
  padding: 0.42rem 0.55rem;
  border-color: rgba(51, 201, 206, 0.32);
}

.timed-lyrics-zoom > input[type="range"] {
  width: 100%;
  min-width: 70px;
  margin: 0;
  accent-color: var(--cyan);
  cursor: ew-resize;
}

.timed-lyrics-zoom > output {
  min-width: 3.25rem;
  color: var(--cyan);
  font-family: "Courier New", monospace;
  font-size: 0.62rem;
  text-align: center;
}

.timed-lyrics-editor .timed-lyrics-auto-scroll {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.38rem;
}

.timed-lyrics-auto-scroll > span {
  color: rgba(216, 206, 185, 0.52);
  font-size: 0.9rem;
}

.timed-lyrics-auto-scroll > strong {
  font-weight: 400;
}

.timed-lyrics-editor .timed-lyrics-auto-scroll.is-active {
  border-color: rgba(51, 201, 206, 0.72);
  color: #dffffb;
  background: rgba(28, 83, 78, 0.42);
  box-shadow: inset 2px 0 0 var(--cyan);
}

.timed-lyrics-timeline {
  border: 1px solid rgba(51, 201, 206, 0.2);
  background:
    linear-gradient(180deg, rgba(51, 201, 206, 0.035), transparent 42%),
    rgba(0, 0, 0, 0.3);
}

.timed-lyrics-timeline > header {
  display: flex;
  min-height: 58px;
  padding: 0.65rem 0.8rem;
  border-bottom: 1px solid rgba(216, 206, 185, 0.1);
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.timed-lyrics-timeline > header > div {
  display: grid;
  gap: 0.2rem;
}

.timed-lyrics-timeline > header strong {
  color: rgba(234, 223, 200, 0.86);
  font-size: 0.82rem;
  font-weight: 400;
}

.timed-lyrics-timeline > header small,
.timed-lyrics-timeline > header > span {
  color: rgba(216, 206, 185, 0.48);
  font-family: "Courier New", monospace;
  font-size: 0.53rem;
  line-height: 1.4;
}

.timed-lyrics-timeline > header > span {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.35rem;
  letter-spacing: 0.08em;
}

.timed-lyrics-timeline > header i {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: var(--cyan);
  box-shadow: 0 0 8px rgba(51, 201, 206, 0.5);
}

.timed-lyrics-timeline > header i.is-out {
  margin-left: 0.32rem;
  background: var(--copper);
  box-shadow: 0 0 8px rgba(183, 106, 61, 0.48);
}

.timed-lyrics-timeline__viewport {
  width: 100%;
  min-height: 204px;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scrollbar-color: rgba(51, 201, 206, 0.45) rgba(0, 0, 0, 0.35);
  scrollbar-width: thin;
}

.timed-lyrics-timeline__viewport:focus-visible {
  outline: 1px solid rgba(51, 201, 206, 0.6);
  outline-offset: -2px;
}

.timed-lyrics-timeline__track {
  position: relative;
  width: 100%;
  min-width: 100%;
  height: 190px;
  background:
    repeating-linear-gradient(
      90deg,
      transparent 0 89px,
      rgba(216, 206, 185, 0.025) 90px
    ),
    linear-gradient(180deg, rgba(255, 255, 255, 0.018), transparent);
}

.timed-lyrics-timeline__ruler {
  position: absolute;
  inset: 0 0 auto;
  height: 34px;
  border-bottom: 1px solid rgba(216, 206, 185, 0.09);
}

.timed-lyrics-timeline__tick {
  position: absolute;
  top: 0;
  height: 100%;
  padding: 0.35rem 0 0 0.35rem;
  border-left: 1px solid rgba(216, 206, 185, 0.16);
  color: rgba(216, 206, 185, 0.46);
  font-family: "Courier New", monospace;
  font-size: 0.5rem;
  transform: translateX(-1px);
}

.timed-lyrics-timeline__cues {
  position: absolute;
  inset: 34px 0 0;
}

.timed-lyrics-timeline__empty {
  position: absolute;
  inset: 0;
  display: grid;
  margin: 0;
  place-items: center;
  color: rgba(216, 206, 185, 0.42);
  font-family: "Courier New", monospace;
  font-size: 0.58rem;
  letter-spacing: 0.04em;
}

.timed-lyrics-timeline__cue {
  position: absolute;
  top: calc(28px + (var(--cue-lane) * 40px));
  z-index: 2;
  height: 30px;
}

.timed-lyrics-timeline__cue-body {
  position: absolute;
  inset: 0;
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 30px !important;
  padding: 0.35rem 0.48rem !important;
  border: 1px solid rgba(51, 201, 206, 0.42) !important;
  color: rgba(226, 244, 238, 0.82) !important;
  background:
    linear-gradient(90deg, rgba(51, 201, 206, 0.18), rgba(51, 201, 206, 0.06)) !important;
  box-shadow: inset 2px 0 0 rgba(51, 201, 206, 0.65);
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
  text-transform: none !important;
  white-space: nowrap;
}

.timed-lyrics-timeline__cue-body span {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.68rem;
  letter-spacing: 0;
}

.timed-lyrics-timeline__cue.is-selected {
  z-index: 5;
}

.timed-lyrics-timeline__cue.is-selected .timed-lyrics-timeline__cue-body {
  border-color: #9df2eb !important;
  color: #f4fffd !important;
  background:
    linear-gradient(90deg, rgba(51, 201, 206, 0.36), rgba(51, 201, 206, 0.12)) !important;
  box-shadow:
    inset 2px 0 0 #b8fff9,
    0 0 18px rgba(51, 201, 206, 0.16);
}

.timed-lyrics-timeline__cue.is-playing .timed-lyrics-timeline__cue-body {
  color: #fff8e8 !important;
  background:
    linear-gradient(90deg, rgba(155, 106, 50, 0.5), rgba(51, 201, 206, 0.16)) !important;
  box-shadow:
    inset 2px 0 0 #e1ba7e,
    0 0 20px rgba(155, 106, 50, 0.2);
}

.timed-lyrics-timeline__cue.is-incomplete {
  width: 1px !important;
}

.timed-lyrics-timeline__cue.is-incomplete .timed-lyrics-timeline__cue-body {
  display: none !important;
}

.timed-lyrics-editor .timed-lyrics-timeline__flag {
  position: absolute;
  top: -18px;
  z-index: 4;
  width: 32px;
  height: 66px;
  min-height: 0;
  padding: 0;
  border: 0;
  color: transparent;
  background: transparent;
  cursor: ew-resize;
  touch-action: none;
  overflow: visible;
}

.timed-lyrics-editor .timed-lyrics-timeline__flag.is-start {
  left: -16px;
}

.timed-lyrics-editor .timed-lyrics-timeline__flag.is-end {
  right: -16px;
}

.timed-lyrics-timeline__flag::before {
  position: absolute;
  top: 13px;
  bottom: 0;
  left: 15px;
  width: 1px;
  background: var(--cyan);
  box-shadow: 0 0 7px rgba(51, 201, 206, 0.48);
  content: "";
}

.timed-lyrics-timeline__flag::after {
  position: absolute;
  top: 0;
  left: 50%;
  min-width: 29px;
  padding: 0.12rem 0.16rem;
  color: #06100f;
  background: var(--cyan);
  content: "START";
  font-family: "Courier New", monospace;
  font-size: 0.36rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
  transform: translateX(-50%);
}

.timed-lyrics-timeline__flag.is-end::before {
  background: var(--copper);
  box-shadow: 0 0 7px rgba(183, 106, 61, 0.48);
}

.timed-lyrics-timeline__flag.is-end::after {
  color: #160b06;
  background: var(--copper);
  content: "STOP";
}

.timed-lyrics-timeline__flag:hover::after,
.timed-lyrics-timeline__flag:focus-visible::after,
.timed-lyrics-timeline__cue.is-dragging .timed-lyrics-timeline__flag::after {
  color: #001312;
  background: #b7fff9;
  box-shadow: 0 0 12px rgba(51, 201, 206, 0.64);
}

.timed-lyrics-timeline__flag.is-end:hover::after,
.timed-lyrics-timeline__flag.is-end:focus-visible::after,
.timed-lyrics-timeline__cue.is-dragging .timed-lyrics-timeline__flag.is-end::after {
  color: #1a0902;
  background: #eca77f;
  box-shadow: 0 0 12px rgba(183, 106, 61, 0.64);
}

.timed-lyrics-timeline__playhead {
  position: absolute;
  inset: 0 auto 0 0;
  z-index: 8;
  width: 1px;
  background: #efffff;
  box-shadow: 0 0 8px rgba(179, 255, 249, 0.86);
  pointer-events: none;
  transform: translateX(-1px);
}

.timed-lyrics-timeline__playhead::before {
  position: absolute;
  top: 0;
  left: -4px;
  border: 4px solid transparent;
  border-top-color: #efffff;
  content: "";
}

.timed-lyrics-playhead {
  display: grid;
  width: 100%;
  padding: 0.72rem 0.85rem 0.8rem;
  border: 1px solid rgba(51, 201, 206, 0.2);
  background:
    linear-gradient(90deg, rgba(51, 201, 206, 0.055), transparent 42%),
    rgba(0, 0, 0, 0.2);
  gap: 0.55rem;
}

.timed-lyrics-master-transport {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  padding: 0.8rem;
  border: 1px solid rgba(51, 201, 206, 0.42);
  background:
    linear-gradient(135deg, rgba(24, 70, 66, 0.24), transparent 58%),
    rgba(2, 8, 7, 0.94);
  box-shadow:
    inset 3px 0 0 rgba(51, 201, 206, 0.72),
    0 12px 28px rgba(0, 0, 0, 0.22);
  gap: 0.65rem;
}

.timed-lyrics-master-transport__buttons {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
}

.timed-lyrics-editor .timed-lyrics-transport-button {
  display: flex;
  min-height: 52px;
  padding: 0.65rem 0.8rem;
  border-color: rgba(51, 201, 206, 0.52);
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  color: #dcf5f1;
  background: rgba(12, 35, 33, 0.92);
  font-size: 0.72rem;
  letter-spacing: 0.055em;
}

.timed-lyrics-transport-button > span {
  color: #8fe8e1;
  font-family: Arial, sans-serif;
  font-size: 1.15rem;
  line-height: 1;
}

.timed-lyrics-transport-button > strong {
  font-weight: 700;
}

.timed-lyrics-editor .timed-lyrics-transport-button.is-primary {
  border-color: #8ff1e9;
  color: #031312;
  background: #62d9d1;
  box-shadow: 0 0 22px rgba(51, 201, 206, 0.2);
}

.timed-lyrics-transport-button.is-primary > span {
  color: #031312;
}

.timed-lyrics-editor .timed-lyrics-transport-button.is-preview {
  border-color: rgba(183, 106, 61, 0.58);
  color: #f0cfb6;
  background: rgba(57, 28, 17, 0.72);
}

.timed-lyrics-editor .timed-lyrics-transport-button.is-active {
  outline: 2px solid rgba(236, 255, 252, 0.88);
  outline-offset: -4px;
}

.timed-lyrics-editor .timed-lyrics-transport-button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.timed-lyrics-master-transport > p {
  margin: -0.05rem 0 0;
  color: rgba(216, 206, 185, 0.56);
  font-family: "Courier New", monospace;
  font-size: 0.56rem;
  line-height: 1.45;
}

.timed-lyrics-master-transport.is-vtt .timed-lyrics-hold {
  display: none;
}

.timed-lyrics-playhead__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: rgba(216, 206, 185, 0.58);
  font-family: "Courier New", monospace;
  font-size: 0.56rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.timed-lyrics-playhead__heading b {
  color: rgba(234, 223, 200, 0.78);
  font-weight: 400;
}

.timed-lyrics-playhead__heading > span {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  color: var(--cyan);
  letter-spacing: 0.04em;
}

.timed-lyrics-playhead__heading i {
  color: rgba(216, 206, 185, 0.3);
  font-style: normal;
}

.timed-lyrics-playhead input[type="range"] {
  width: 100%;
  height: 34px;
  margin: 0;
  padding: 0;
  appearance: none;
  background: transparent;
  cursor: ew-resize;
  touch-action: pan-y;
  --timed-progress: 0%;
}

.timed-lyrics-playhead input[type="range"]::-webkit-slider-runnable-track {
  height: 8px;
  border: 1px solid rgba(51, 201, 206, 0.22);
  background:
    linear-gradient(
      90deg,
      var(--cyan) 0 var(--timed-progress),
      rgba(216, 206, 185, 0.13) var(--timed-progress) 100%
    );
  box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.58);
}

.timed-lyrics-playhead input[type="range"]::-webkit-slider-thumb {
  width: 24px;
  height: 28px;
  margin-top: -11px;
  border: 1px solid #b4f1ec;
  border-radius: 0;
  appearance: none;
  background: #245e5c;
  box-shadow:
    0 0 0 2px rgba(4, 13, 12, 0.9),
    0 0 12px rgba(51, 201, 206, 0.45);
}

.timed-lyrics-playhead input[type="range"]::-moz-range-track {
  height: 8px;
  border: 1px solid rgba(51, 201, 206, 0.22);
  background: rgba(216, 206, 185, 0.13);
  box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.58);
}

.timed-lyrics-playhead input[type="range"]::-moz-range-progress {
  height: 8px;
  background: var(--cyan);
}

.timed-lyrics-playhead input[type="range"]::-moz-range-thumb {
  width: 24px;
  height: 28px;
  border: 1px solid #b4f1ec;
  border-radius: 0;
  background: #245e5c;
  box-shadow:
    0 0 0 2px rgba(4, 13, 12, 0.9),
    0 0 12px rgba(51, 201, 206, 0.45);
}

.timed-lyrics-playhead input[type="range"]:focus-visible {
  outline: 1px solid var(--cyan);
  outline-offset: 3px;
}

.timed-lyrics-playhead input[type="range"]:disabled {
  cursor: wait;
  opacity: 0.42;
}

.timed-lyrics-transport {
  justify-content: space-between;
  padding: 0.15rem 0;
}

.timed-lyrics-transport__group {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.timed-lyrics-transport__group--playback {
  padding-right: 0.55rem;
  border-right: 1px solid rgba(216, 206, 185, 0.12);
}

.timed-lyrics-transport--playback {
  justify-content: flex-start;
}

.timed-lyrics-transport--playback .timed-lyrics-transport__group--playback {
  padding-right: 0;
  border-right: 0;
}

.timed-lyrics-transport--correction {
  padding-top: 0.65rem;
  border-top: 1px solid rgba(216, 206, 185, 0.1);
}

.timed-lyrics-transport--correction > span {
  color: rgba(216, 206, 185, 0.48);
  font-family: "Courier New", monospace;
  font-size: 0.52rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.timed-lyrics-transport [data-timed-restart],
.timed-lyrics-transport [data-timed-play],
.timed-lyrics-transport [data-timed-pause] {
  border-color: rgba(51, 201, 206, 0.42);
}

.timed-lyrics-hold {
  display: grid;
  width: 100%;
  min-height: 86px !important;
  border-color: rgba(51, 201, 206, 0.68) !important;
  place-content: center;
  gap: 0.35rem;
  color: #eafffc !important;
  background:
    linear-gradient(90deg, rgba(51, 201, 206, 0.14), rgba(51, 201, 206, 0.035)) !important;
  box-shadow:
    inset 3px 0 0 rgba(51, 201, 206, 0.7),
    0 0 24px rgba(51, 201, 206, 0.07);
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  touch-action: none;
  user-select: none;
}

.timed-lyrics-master-transport .timed-lyrics-hold {
  min-height: 72px !important;
}

.timed-lyrics-hold > * {
  -webkit-user-select: none;
  pointer-events: none;
  user-select: none;
}

.timed-lyrics-hold span {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.08rem;
  letter-spacing: 0.03em;
  text-transform: none;
}

.timed-lyrics-hold small {
  color: rgba(216, 206, 185, 0.55);
  font-size: 0.54rem;
}

.timed-lyrics-hold.is-marking {
  border-color: #d9fffb !important;
  color: #efffff !important;
  background: rgba(31, 95, 91, 0.72) !important;
  box-shadow:
    inset 0 0 28px rgba(51, 201, 206, 0.2),
    0 0 18px rgba(51, 201, 206, 0.2);
}

.timed-lyrics-editor__hint,
.timed-lyrics-editor__instrumental-note {
  margin: 0;
  color: rgba(216, 206, 185, 0.56);
  font-size: 0.62rem;
  line-height: 1.55;
}

.timed-lyrics-editor__instrumental-note {
  padding: 1rem;
  border-left: 2px solid rgba(128, 87, 255, 0.5);
}

.timed-lyrics-cue-list {
  display: grid;
  max-height: 360px;
  margin: 0;
  padding: 0;
  border-top: 1px solid rgba(216, 206, 185, 0.12);
  list-style: none;
  overflow: auto;
}

.timed-lyrics-lines .timed-lyrics-cue-list {
  max-height: none;
  align-content: start;
  overscroll-behavior: contain;
}

.timed-lyrics-cue-list li {
  display: grid;
  border-bottom: 1px solid rgba(216, 206, 185, 0.08);
  grid-template-columns: minmax(10rem, auto) minmax(0, 1fr);
  align-items: stretch;
}

.timed-lyrics-cue-list button {
  display: block;
  width: auto;
  min-height: 46px;
  padding: 0.55rem 0.7rem;
  border: 0;
  border-left: 2px solid transparent;
  text-align: left;
  text-transform: none;
}

.timed-lyrics-cue-list input {
  width: 100%;
  min-width: 0;
  padding: 0.55rem 0.7rem;
  border: 0;
  border-left: 1px solid rgba(216, 206, 185, 0.08);
  color: rgba(234, 223, 200, 0.82);
  background: rgba(0, 0, 0, 0.12);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.84rem;
}

.timed-lyrics-cue-list input:focus {
  color: #fff8e8;
  background: rgba(51, 201, 206, 0.06);
  outline: 1px solid rgba(51, 201, 206, 0.38);
  outline-offset: -1px;
}

.timed-lyrics-cue-list li.is-selected button {
  border-left-color: var(--cyan);
  background: rgba(51, 201, 206, 0.08);
}

.timed-lyrics-cue-list time {
  color: rgba(51, 201, 206, 0.66);
  font-size: 0.56rem;
}

.timed-lyrics-cue-list p {
  margin: 0;
  color: rgba(234, 223, 200, 0.78);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.84rem;
  line-height: 1.3;
}

.timed-lyrics-panel[data-timed-panel="vtt"] label {
  color: rgba(234, 223, 200, 0.72);
  font-family: "Courier New", monospace;
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.timed-lyrics-panel[data-timed-panel="vtt"] textarea {
  width: 100%;
  min-height: 260px;
  padding: 0.85rem;
  border: 1px solid rgba(51, 201, 206, 0.22);
  color: #dce7dd;
  background: rgba(1, 6, 6, 0.78);
  font-family: "Courier New", monospace;
  font-size: 0.72rem;
  line-height: 1.55;
  resize: vertical;
}

.timed-lyrics-editor__footer {
  padding-top: 0.85rem;
  border-top: 1px solid rgba(216, 206, 185, 0.11);
}

.timed-lyrics-editor__footer .timed-lyrics-ready {
  border-color: rgba(51, 201, 206, 0.62);
  color: #a0ede7;
}

.timed-lyrics-editor__footer [role="status"] {
  flex: 1 1 16rem;
  color: rgba(216, 206, 185, 0.62);
  font-size: 0.6rem;
  line-height: 1.4;
}

.timed-lyrics-editor__footer [role="status"].is-error {
  color: #ee9b88;
}

@media (max-width: 1080px) {
  .timed-lyrics-dialog {
    overflow-y: auto;
  }

  .timed-lyrics-dialog > .timed-lyrics-editor {
    display: flex;
    height: auto;
    min-height: 100%;
    max-height: none;
    flex-direction: column;
    overflow: visible;
  }

  .timed-lyrics-panel--guided {
    flex: 0 0 auto;
    overflow: visible;
  }

  .timed-lyrics-workspace {
    display: flex;
    flex-direction: column;
    overflow: visible;
  }

  .timed-lyrics-stage {
    flex: 0 0 auto;
    overflow: visible;
  }

  .timed-lyrics-lines {
    height: min(42vh, 430px);
    min-height: 280px;
    max-height: 430px;
    flex: 0 0 auto;
  }
}

@media (max-width: 700px) {
  .timed-lyrics-launcher {
    grid-template-columns: 1fr;
  }

  .timed-lyrics-launcher__actions {
    align-items: stretch;
    flex-direction: column;
  }

  .timed-lyrics-dialog {
    width: 100vw;
    height: 100svh;
    border: 0;
  }

  .timed-lyrics-dialog > .timed-lyrics-editor {
    padding: 0.8rem;
  }

  .timed-lyrics-master-transport {
    padding: 0.65rem;
    box-shadow:
      inset 3px 0 0 rgba(51, 201, 206, 0.76),
      0 12px 24px rgba(0, 0, 0, 0.62);
  }

  .timed-lyrics-master-transport__buttons {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.4rem;
  }

  .timed-lyrics-editor .timed-lyrics-transport-button {
    min-height: 50px;
    padding: 0.55rem 0.25rem;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.68rem;
    letter-spacing: 0.035em;
  }

  .timed-lyrics-editor .timed-lyrics-transport-button.is-preview {
    grid-column: 1 / -1;
    min-height: 42px;
    flex-direction: row;
  }

  .timed-lyrics-playhead {
    padding: 0.6rem 0.65rem;
  }

  .timed-lyrics-playhead__heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.28rem;
  }

  .timed-lyrics-master-transport > p {
    display: none;
  }

  .timed-lyrics-master-transport .timed-lyrics-hold {
    min-height: 62px !important;
    padding: 0.5rem 0.6rem;
  }

  .timed-lyrics-master-transport .timed-lyrics-hold span {
    font-size: 0.96rem;
  }

  .timed-lyrics-master-transport .timed-lyrics-hold small {
    display: none;
  }

  .timed-lyrics-workspace-tools {
    display: grid;
    align-items: stretch;
  }

  .timed-lyrics-zoom {
    grid-template-columns: 36px minmax(70px, 1fr) 36px 3.25rem auto;
  }

  .timed-lyrics-zoom > strong {
    grid-column: 1 / -1;
  }

  .timed-lyrics-editor .timed-lyrics-auto-scroll {
    width: 100%;
    justify-content: center;
  }

  .timed-lyrics-lines {
    height: 340px;
    min-height: 260px;
  }

  .timed-lyrics-editor__header {
    align-items: flex-start;
  }

  .timed-lyrics-editor__header-actions {
    align-items: flex-end;
    flex-direction: column-reverse;
  }

  .timed-lyrics-timeline > header {
    align-items: flex-start;
    flex-direction: column;
  }

  .timed-lyrics-transport,
  .timed-lyrics-transport__group {
    align-items: stretch;
    flex-direction: column;
  }

  .timed-lyrics-transport__group--playback {
    padding-right: 0;
    padding-bottom: 0.55rem;
    border-right: 0;
    border-bottom: 1px solid rgba(216, 206, 185, 0.12);
  }

  .timed-lyrics-transport--playback .timed-lyrics-transport__group--playback {
    display: grid;
    width: 100%;
    padding: 0;
    border: 0;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .timed-lyrics-transport--playback button:nth-child(4) {
    grid-column: 1 / -1;
  }

  .timed-lyrics-transport--correction {
    display: grid;
    gap: 0.55rem;
  }

  .timed-lyrics-transport--correction .timed-lyrics-transport__group {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .timed-lyrics-transport--correction button:first-child {
    grid-column: 1 / -1;
  }

  .timed-lyrics-timeline.is-empty .timed-lyrics-timeline__viewport {
    min-height: 126px;
  }

  .timed-lyrics-timeline.is-empty .timed-lyrics-timeline__track {
    height: 112px;
  }

  .timed-lyrics-editor .timed-lyrics-timeline__flag {
    width: 44px;
  }

  .timed-lyrics-editor .timed-lyrics-timeline__flag.is-start {
    left: -22px;
  }

  .timed-lyrics-editor .timed-lyrics-timeline__flag.is-end {
    right: -22px;
  }

  .timed-lyrics-timeline__flag::before {
    left: 21px;
  }

  .timed-lyrics-now {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .timed-lyrics-editor__toolbar,
  .timed-lyrics-editor__footer {
    align-items: stretch;
    flex-direction: column;
  }

  .timed-lyrics-tabs,
  .timed-lyrics-tabs button,
  .timed-lyrics-editor__footer button {
    width: 100%;
  }

  .timed-lyrics-cue-list li {
    grid-template-columns: 1fr;
  }

  .timed-lyrics-cue-list input {
    border-top: 1px solid rgba(216, 206, 185, 0.08);
    border-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .timed-lyrics-dialog[open] {
    animation: none;
  }

  .timed-lyrics-timeline__playhead,
  .timed-lyrics-timeline__cue,
  .timed-lyrics-timeline__flag {
    transition: none;
  }
}
