/* Signed-in surfaces: login, audition, admin.
   Tokens come from site.css — this only adds the app chrome on top. */

.centre {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(24px, 5vh, 64px) clamp(20px, 5vw, 72px) clamp(40px, 6vh, 80px);
}

.panel {
  position: relative;
  z-index: 1;
  max-width: 560px;
  background: var(--band1);
  border-radius: calc(2 * var(--radius-lg));
  padding: clamp(28px, 5vh, 48px) clamp(24px, 4vw, 48px);
}
.panel-title { font-family: var(--font-heading); font-weight: 400; font-size: clamp(28px, 3.4vw, 40px); line-height: 1.14; margin: 0; }
.panel-body { font-size: 16px; line-height: 27px; margin: 18px 0 0; color: var(--mut); max-width: 46ch; }

.stack { display: flex; flex-direction: column; gap: 12px; margin-top: 26px; max-width: 420px; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 14px; }

.fineprint { font-size: 13px; line-height: 1.55; margin: 22px 0 0; color: var(--mut); max-width: 48ch; }

.who { font-size: 14px; color: var(--mut); }

.btn-quiet {
  background: transparent;
  color: var(--mut);
  border: 1.5px solid var(--field-border);
  padding: 7px 18px;
  min-height: 36px;
  font-size: 14px;
}
.btn-quiet:hover { color: var(--ink); border-color: var(--ink); }

.btn-danger { background: transparent; color: var(--kick); border: 1.5px solid currentColor; padding: 5px 14px; min-height: 32px; font-size: 13px; }
.btn-danger:hover { background: var(--kick); color: var(--bg); }

.btn-small { padding: 6px 16px; min-height: 34px; font-size: 14px; }

/* ---------- alerts ---------- */

.alert {
  display: none;
  margin: 22px 0 0;
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.5;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--kick);
}
body.rejected #rejected { display: block; }

.notice {
  margin: 0 0 24px;
  padding: 16px 20px;
  border-radius: 14px;
  background: var(--patch);
  font-size: 14.5px;
  line-height: 1.55;
}
.notice h3 { font-family: var(--font-body); font-size: 14px; font-weight: 700; margin: 0 0 8px; }
.notice .mono { display: block; word-break: break-all; margin: 8px 0; padding: 10px 12px; border-radius: 8px; background: var(--bg); }

/* ---------- chips ---------- */

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font-size: 12.5px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent-2) 20%, transparent);
  color: var(--accent-2-800);
  white-space: nowrap;
}
.chip-quiet { background: transparent; border: 1px dashed var(--field-border); color: var(--mut); font-weight: 500; }

.status { font-size: 11.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.status.live     { background: color-mix(in srgb, #2E7D4F 22%, transparent); color: #1E5C39; }
.status.pending  { background: color-mix(in srgb, #C9A227 26%, transparent); color: #7A5E0B; }
.status.disabled { background: color-mix(in srgb, #8E8E93 25%, transparent); color: #636366; }
.status.expired,
.status.revoked  { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--kick); }

:root[data-theme="dark"] .status.live     { color: #8FD9AE; }
:root[data-theme="dark"] .status.pending  { color: #E8CE7A; }
:root[data-theme="dark"] .status.disabled { color: #AEAEB2; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .status.live     { color: #8FD9AE; }
  :root:not([data-theme="light"]) .status.pending  { color: #E8CE7A; }
  :root:not([data-theme="light"]) .status.disabled { color: #AEAEB2; }
}

.field-group { margin-top: 26px; }
.field-label { display: block; font-size: 12px; letter-spacing: .09em; text-transform: uppercase; font-weight: 700; color: var(--mut); margin-bottom: 10px; }

/* ---------- admin tabs & components ---------- */

.admin-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1.5px solid var(--field-border);
  margin: 24px 0 32px;
  overflow-x: auto;
}
.admin-tab {
  font: inherit;
  font-size: 14.5px;
  font-weight: 600;
  padding: 10px 20px;
  border: 0;
  background: transparent;
  color: var(--mut);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1.5px;
  transition: all .15s ease;
  white-space: nowrap;
}
.admin-tab:hover { color: var(--ink); }
.admin-tab.is-active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.tab-pane { display: none; }
.tab-pane.is-active { display: block; }

.geo-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--ink) 6%, transparent);
  color: var(--ink);
  white-space: nowrap;
}
.geo-isp { font-size: 11px; color: var(--mut); max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- CMS visual editor ---------- */
.cms-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.cms-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.cms-section {
  background: var(--band1);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 28px;
  border: 1px solid var(--field-border);
  box-shadow: var(--shadow-sm);
}
.cms-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid color-mix(in srgb, var(--field-border) 60%, transparent);
}
.cms-sub-box {
  background: var(--bg);
  border-radius: 12px;
  padding: 20px;
  margin-top: 18px;
  border: 1px solid var(--field-border);
}
.cms-item-card {
  background: var(--band1);
  border-radius: 10px;
  padding: 18px;
  margin-top: 16px;
  border: 1px solid var(--field-border);
}

/* Roomy CMS Inputs, Selects & Textareas */
.cms-form-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  align-items: flex-start;
}
.cms-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 140px;
}
.cms-field label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .03em;
  color: var(--mut);
  text-transform: uppercase;
}

.cms-input, .cms-select, .cms-textarea {
  font: inherit;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  border: 1.5px solid var(--field-border);
  border-radius: 8px;
  padding: 8px 12px;
  box-sizing: border-box;
  width: 100%;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.cms-input:hover, .cms-select:hover, .cms-textarea:hover {
  border-color: var(--accent);
}
.cms-input:focus, .cms-select:focus, .cms-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent);
}
.cms-textarea {
  min-height: 64px;
  resize: vertical;
  font-family: inherit;
}
.cms-input-sm {
  padding: 6px 10px;
  font-size: 13.5px;
}

.sprite-select-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}
.sprite-thumb {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--band1);
  border: 1px solid var(--field-border);
  object-fit: cover;
  flex: none;
}

.cms-sources-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  margin-top: 12px;
}
.cms-sources-table th, .cms-sources-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--field-border);
  text-align: left;
  vertical-align: middle;
}
.cms-sources-table th { font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: var(--mut); }

/* ---------- modal ---------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  z-index: 999;
  display: none;
  place-content: center;
  padding: 20px;
}
.modal-backdrop.is-open { display: grid; }
.modal-card {
  background: var(--bg);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  max-width: 580px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  max-height: 90vh;
  overflow-y: auto;
}
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.modal-head h3 { margin: 0; font-family: var(--font-heading); font-size: 22px; font-weight: 400; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }

.admin-head { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
.admin-head h1 { font-family: var(--font-heading); font-weight: 400; font-size: clamp(28px, 3.4vw, 40px); margin: 0; }
.admin-stat { font-size: 13.5px; color: var(--mut); }

.section { margin-top: clamp(32px, 5vh, 52px); }
.section > h2 {
  font-family: var(--font-body);
  font-size: 13px;
  letter-spacing: .09em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--kick);
  margin: 0 0 16px;
}

.tablewrap { overflow-x: auto; }
table.grid { border-collapse: collapse; width: 100%; font-size: 14px; }
table.grid th, table.grid td { text-align: left; padding: 11px 16px 11px 0; border-bottom: 1px solid var(--field-border); vertical-align: top; }
table.grid th { font-size: 11px; letter-spacing: .09em; text-transform: uppercase; font-weight: 700; color: var(--mut); white-space: nowrap; }
table.grid td:last-child, table.grid th:last-child { padding-right: 0; text-align: right; }
table.grid tbody tr:last-child td { border-bottom: 0; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.dim { color: var(--mut); }
.empty { padding: 20px 0; color: var(--mut); font-size: 14px; }

.form-card { background: var(--band1); border-radius: var(--radius-lg); padding: 22px 24px; max-width: 620px; }
.form-row { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.form-row > label { flex: 0 1 220px; min-width: 160px; font-size: 13px; font-weight: 600; color: var(--mut); display: flex; flex-direction: column; gap: 6px; }
.form-row .input, .form-row select { width: 100%; font-weight: 400; color: var(--ink); }
select.input { border-radius: 999px; background: transparent; }

.tickrow { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 4px 0 18px; }
.tick { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; cursor: pointer; }
.tick input { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }

.grantcell { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.grantcell .tick { font-size: 12.5px; }

.rowmsg { font-size: 13px; color: var(--kick); font-weight: 600; margin: 10px 0 0; min-height: 1.3em; }

/* ---------- audition: hero ---------- */

.hero { position: relative; background: var(--bg); overflow: visible; }
.hero-wrap {
  display: flex;
  gap: clamp(28px, 5vw, 68px);
  align-items: center;
  flex-wrap: wrap;
  padding-bottom: clamp(28px, 5vh, 56px);
}
.hero-copy { flex: 1 1 400px; min-width: 0; }
.hero-copy h1 {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: clamp(38px, 5.4vw, 66px);
  line-height: 1.06;
  margin: 0 0 0 -0.028em;
}
.hero-art { flex: 0 1 320px; min-width: 220px; position: relative; }
.disc-lg { border-radius: 50%; overflow: hidden; aspect-ratio: 1; box-shadow: var(--shadow-md); }
.disc-lg img { width: 100%; height: 100%; object-fit: cover; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--band1);
  border-radius: 999px;
  padding: 12px 22px;
  margin-top: 24px;
}
.pill span { font-size: 14.5px; font-weight: 600; }

/* ---------- audition: sections ---------- */

.cat-section { position: relative; }
.cat-section.band1 { background: var(--band1); }
.cat-section.band2 { background: var(--band2); }
.cat-section.plain { background: var(--bg); }
.cat-section .wrap { padding-top: clamp(20px, 3vh, 36px); }

.cat-title {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: clamp(28px, 3.4vw, 42px);
  line-height: 1.15;
  margin: 0;
  max-width: 22ch;
}
.cat-blurb-lead { font-size: 16px; line-height: 27px; max-width: 56ch; margin: 18px 0 0; color: var(--mut); }

.cat-sub { margin-top: clamp(28px, 4vh, 44px); }
.cat-subtitle {
  font-family: var(--font-body);
  font-size: 13px;
  letter-spacing: .09em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--kick);
  margin: 0 0 6px;
}
.cat-blurb { font-size: 14.5px; line-height: 23px; color: var(--mut); max-width: 58ch; margin: 0 0 18px; }

/* ---------- audition: the disc, for scenes with nothing to compare ---------- */

.disc-strip {
  display: flex;
  gap: clamp(20px, 4vw, 48px);
  flex-wrap: wrap;
  justify-content: flex-start;
}
.disc-card { flex: 0 1 240px; min-width: 200px; text-align: center; }
.disc-card:nth-child(even) { margin-top: clamp(0px, 3vh, 34px); }

.disc-stage { position: relative; width: clamp(180px, 20vw, 232px); aspect-ratio: 1; margin: 0 auto; cursor: pointer; }
.disc-art {
  position: absolute; inset: 14px;
  border-radius: 50%;
  background: var(--bg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: grid; place-items: center;
}
.disc-art img {
  width: 82%; height: 82%;
  object-fit: contain;
  /* The sprites are stickers with their own white outline, so they sit inside
     the disc rather than filling it — scaled to leave the outline visible. */
  filter: drop-shadow(0 3px 6px rgba(0,0,0,.14));
}
.disc-ring { position: absolute; inset: 0; transform: rotate(-90deg); pointer-events: none; }
.ring-track { fill: none; stroke: color-mix(in srgb, var(--ink) 13%, transparent); stroke-width: 5; }
.ring-prog {
  fill: none; stroke: var(--accent); stroke-width: 5; stroke-linecap: round;
  transition: stroke-dashoffset .1s linear;
}
@media (prefers-reduced-motion: reduce) { .ring-prog { transition: none; } }

.disc-card.is-pending .disc-art { opacity: .45; }
.disc-card.is-active .disc-art { box-shadow: var(--shadow-md); }

.disc-title { font-family: var(--font-heading); font-weight: 400; font-size: 20px; line-height: 1.2; margin: 18px 0 0; }
.disc-note { font-size: 14px; line-height: 22px; margin: 8px 0 4px; color: var(--mut); }
.disc-time { font-size: 13px; color: var(--mut); font-variant-numeric: tabular-nums; }

/* ---------- audition: the row, for anything with a toggle ---------- */

.row-card {
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 30px);
  background: var(--bg);
  border-radius: calc(1.5 * var(--radius-lg));
  padding: 18px 24px;
  margin-bottom: 14px;
  /* Narrower than before: without a waveform to draw, a full-width bar is
     just empty track. The card is sized by the sprite plus a comfortable
     measure for the controls. */
  max-width: 640px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .18s ease;
}
.cat-section.plain .row-card { background: var(--band1); box-shadow: none; }
.row-card.is-active { box-shadow: var(--shadow-md); }
.row-card.is-pending { background: transparent; border: 1px dashed var(--field-border); box-shadow: none; }
@media (prefers-reduced-motion: reduce) { .row-card { transition: none; } }

/* Poppy alternates sides down the page so the column does not read as a
   uniform list. */
.row-card.is-flipped { flex-direction: row-reverse; }

.row-artwrap {
  flex: none;
  width: clamp(96px, 13vw, 148px);
  display: grid;
  place-items: center;
}
.row-artwrap img {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,.18));
}
.row-card.is-pending .row-artwrap img { opacity: .45; }

.row-body { flex: 1 1 auto; min-width: 0; }
.row-title { font-family: var(--font-heading); font-weight: 400; font-size: 21px; line-height: 1.2; }
.row-note { font-size: 13.5px; color: var(--mut); margin-top: 4px; }
.row-time { font-size: 13px; color: var(--mut); font-variant-numeric: tabular-nums; white-space: nowrap; margin-left: auto; }

.row-controls { display: flex; align-items: center; gap: 12px; margin-top: 16px; flex-wrap: wrap; }

.item-prov { font-size: 12.5px; color: var(--mut); margin-top: 8px; }
.item-caveat {
  font-size: 12.5px;
  line-height: 1.5;
  margin-top: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--kern-y) 22%, transparent);
  color: var(--ink);
}

@media (max-width: 560px) {
  /* Stacked on a phone; alternating sides has nothing to alternate against. */
  .row-card, .row-card.is-flipped { flex-direction: column; align-items: flex-start; }
  .row-artwrap { width: 120px; }
}

/* ---------- shared controls ---------- */

.play {
  flex: none;
  width: 42px; height: 42px;
  border: 0; border-radius: 50%;
  background: var(--btn-bg); color: var(--btn-ink);
  cursor: pointer;
  display: grid; place-content: center;
  transition: background-color .15s ease, transform .15s ease;
}
.play:hover:not(:disabled) { background: var(--btn-bg-hover); }
.play:disabled { opacity: .4; cursor: default; }
.play::before {
  content: "";
  width: 0; height: 0;
  margin-left: 3px;
  border-left: 12px solid currentColor;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
}
.play.is-playing::before {
  margin-left: 0;
  width: 12px; height: 14px;
  border: 0;
  background: currentColor;
  -webkit-mask: linear-gradient(#000 0 0) 0/4px 100% no-repeat, linear-gradient(#000 0 0) 100%/4px 100% no-repeat;
  mask: linear-gradient(#000 0 0) 0/4px 100% no-repeat, linear-gradient(#000 0 0) 100%/4px 100% no-repeat;
}
.play-disc {
  position: absolute; right: 2px; bottom: 2px;
  width: 52px; height: 52px;
  border: 3px solid var(--bg);
  box-shadow: var(--shadow-sm);
}
.play-disc:hover:not(:disabled) { transform: scale(1.06); }
@media (prefers-reduced-motion: reduce) { .play { transition: none; } .play-disc:hover { transform: none; } }

.seg { display: inline-flex; background: color-mix(in srgb, var(--ink) 8%, transparent); border-radius: 999px; padding: 3px; gap: 2px; }
.seg-opt {
  font: inherit; font-size: 13px; font-weight: 600;
  border: 0; background: transparent; color: var(--mut);
  padding: 6px 16px; border-radius: 999px; cursor: pointer; white-space: nowrap;
  transition: background-color .12s ease, color .12s ease;
}
.seg-opt:hover { color: var(--ink); }
.seg-opt[aria-pressed="true"] { background: var(--accent); color: #fff; }
:root[data-theme="dark"] .seg-opt[aria-pressed="true"] { color: #17151C; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .seg-opt[aria-pressed="true"] { color: #17151C; }
}
@media (prefers-reduced-motion: reduce) { .seg-opt { transition: none; } }

.item-status { font-size: 13px; color: var(--mut); }
.item-status.is-error { color: var(--kick); font-weight: 600; }

.scrub {
  margin-top: 14px; height: 8px; border-radius: 999px; max-width: 380px;
  background: color-mix(in srgb, var(--ink) 12%, transparent);
  cursor: pointer; overflow: hidden; touch-action: none;
}
.scrub-fill { height: 100%; width: 0; background: var(--accent); border-radius: 999px; }

.closing .wrap { padding-top: 0; }
