/*
 * Player Admin (3.56.0). Each desk keeps its own look so you always know which one you are in: the website admin is light and
 * purple; Player Admin follows the player app (nb-shell v188, nyumbani-styles.css): a warm charcoal background, amber and orange
 * accents, rounded glassy cards. Phone first (designed at 390 px, works at 320 px), and on a laptop in one centred column.
 * No inline styles anywhere (the page's Content-Security-Policy has no 'unsafe-inline'); the few values a script sets (the
 * colour preview, a progress width) go through the CSSOM.
 */
:root {
  --bg: #141312;           /* the player's --nb-bg */
  --bg-2: #1e1b18;         /* --nb-bg-end: header and tab bar */
  --surface: #201b17;      /* --nb-surface-solid: cards */
  --surface-2: #2a231d;    /* fields, chips, quiet buttons */
  --surface-3: #352c24;
  --line: rgba(255, 160, 0, .22);
  --field-line: #7a6a5a;
  --text: #f5f0ea;         /* --nb-text */
  --dim: #b8aa9b;          /* a touch lighter than the player's --nb-text-dim, for 4.5:1 on every surface here */
  --gold: #ffa000;         /* --nb-gold */
  --gold-2: #ff8f00;       /* --nb-gold-2 */
  --gold-soft: rgba(255, 160, 0, .14);
  --on-gold: #1a1208;
  --focus: #ffc04d;
  --ok: #5fd99a;
  --ok-soft: rgba(20, 184, 102, .16);
  --bad: #ff8a7a;
  --bad-soft: rgba(217, 83, 30, .2);
  --hidden: #ffb08a;
  --display: 'Bricolage Grotesque', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --body: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --radius: 18px;
  --tabbar: 64px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background-color: var(--bg); color: var(--text); font: 16px/1.5 var(--body); overflow-wrap: break-word; }
img, svg, canvas { display: block; max-width: 100%; }
a { color: var(--gold); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 8px; }
h1, h2, h3 { font-family: var(--display); line-height: 1.2; margin: 0; }
h1 { font-size: 1.6rem; font-weight: 700; color: var(--gold); }
h2 { font-size: 1.15rem; font-weight: 700; margin-bottom: 10px; }
h3 { font-size: 1rem; font-weight: 700; margin: 14px 0 8px; color: var(--text); }
p { margin: 0 0 10px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 80; background: var(--gold); color: var(--on-gold); padding: 10px 14px; border-radius: 10px; font-weight: 700; }
.skip:focus { left: 8px; }
.muted, .opt, .hint, .meta, .summary, .count { color: var(--dim); }
.opt { font-weight: 400; font-size: .92em; }
.hint { font-size: .9rem; margin: 6px 0 0; }
.hint.warn { color: var(--gold); }
.count { font-size: .85rem; margin: 4px 0 0; text-align: right; }
.count.over { color: var(--bad); font-weight: 700; }
.err, .ferr { color: var(--bad); font-weight: 600; }
.ferr { font-size: .92rem; margin: 6px 0 0; }
.form-err { margin: 12px 0; }

/* ---------- boot, sign-in, no access ---------- */
.center { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; text-align: center; }
#boot { align-content: center; gap: 14px; }
.spin { width: 36px; height: 36px; border-radius: 50%; border: 4px solid var(--surface-3); border-top-color: var(--gold); animation: spin 1s linear infinite; margin: 0 auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.login-card { width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 24px 20px; text-align: left; box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .8); }
.login-card h1 { margin-bottom: 8px; }
.login-brand { display: flex; align-items: center; gap: 10px; font: 700 1rem var(--display); color: var(--dim); margin-bottom: 14px; }

/* ---------- header, account chip and menu ---------- */
.bar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 16px; padding-top: calc(10px + env(safe-area-inset-top, 0px)); background: var(--bg-2); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; color: var(--text); text-decoration: none; min-height: 44px; }
.brand-text { display: grid; min-width: 0; }
.brand-name { font: 800 1.15rem var(--display); color: var(--gold); white-space: nowrap; }
.brand-sub { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); white-space: nowrap; }
.menu { position: relative; }
.menu > summary { list-style: none; cursor: pointer; }
.menu > summary::-webkit-details-marker { display: none; }
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; max-width: 46vw; padding: 4px 12px 4px 4px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); color: var(--text); font-weight: 600; user-select: none; }
.chip-dot { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, var(--gold), var(--gold-2)); color: var(--on-gold); font: 800 .85rem var(--display); }
.chip-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.acct-panel { position: absolute; right: 0; top: calc(100% + 8px); z-index: 40; width: min(300px, calc(100vw - 32px)); display: grid; gap: 2px; padding: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 24px 50px -20px rgba(0, 0, 0, .9); }
.acct-who { margin: 4px 8px 8px; font-size: .92rem; color: var(--dim); }
.acct-who strong { color: var(--text); display: block; font-size: 1rem; }
.menu-item { display: flex; align-items: center; min-height: 44px; padding: 0 12px; border: 0; border-radius: 12px; background: none; color: var(--text); text-decoration: none; font-weight: 600; text-align: left; cursor: pointer; }
.menu-item:hover { background: var(--surface-2); }
.acct-credit { margin: 8px 8px 2px; padding-top: 8px; border-top: 1px solid var(--line); font-size: .8rem; color: var(--dim); }
.notice-bar { background: var(--gold-soft); border-bottom: 1px solid var(--line); padding: 8px 16px; }
.notice-bar p { margin: 0; max-width: 760px; margin-inline: auto; }

/* ---------- page column, views ---------- */
.wrap { max-width: 760px; margin: 0 auto; padding: 16px 16px calc(var(--tabbar) + 96px + env(safe-area-inset-bottom, 0px)); }
.view-head { margin: 4px 0 14px; }
.view-head .summary { margin: 4px 0 0; }
.back { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; color: var(--dim); text-decoration: none; font-weight: 600; }
.back::before { content: ""; width: 9px; height: 9px; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); }
.banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 14px; padding: 12px 14px; min-height: 52px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--gold); color: var(--text); text-decoration: none; font-weight: 600; }
.banner-go { flex: none; color: var(--gold); font-weight: 700; }
.alert { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin: 0 0 14px; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.alert p { margin: 0; }
.alert-bad { border-color: var(--bad); background: var(--bad-soft); }
.search input, #pickQ { width: 100%; min-height: 48px; padding: 10px 16px; border-radius: 999px; border: 1px solid var(--field-line); background: var(--surface-2); }
.search { margin-bottom: 10px; }

/* filter chips: one scrolling row */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; margin: 0 -2px 6px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip-btn { flex: none; min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-weight: 600; cursor: pointer; }
.chip-btn[aria-pressed="true"] { background: linear-gradient(180deg, var(--gold), var(--gold-2)); border-color: transparent; color: var(--on-gold); }

/* ---------- rows (songs, Wasanii, helpers) ---------- */
.rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.row { display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 8px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); min-width: 0; }
.row-main { flex: 1; display: flex; align-items: center; gap: 12px; min-width: 0; min-height: 52px; color: var(--text); text-decoration: none; border-radius: 12px; }
.row-text { display: grid; min-width: 0; }
.row-text strong { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-text .meta { font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-side { flex: none; display: grid; justify-items: end; gap: 4px; }
.price { font-size: .85rem; color: var(--dim); font-weight: 600; white-space: nowrap; }
.thumb { flex: none; width: 52px; height: 52px; border-radius: 12px; overflow: hidden; display: grid; place-items: center; background: linear-gradient(135deg, var(--surface-3), var(--surface-2)); color: var(--gold); font: 800 1rem var(--display); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.round { border-radius: 50%; }
.rows.compact .row { padding: 6px 10px; }
.rows.plain .row { display: block; padding: 14px; }
.empty { padding: 20px 14px; text-align: center; color: var(--dim); background: var(--surface); border-radius: 16px; border: 1px dashed var(--line); }

/* status: a pill-shaped select on the list, pills elsewhere */
.status-select { appearance: none; -webkit-appearance: none; min-height: 36px; min-width: 88px; padding: 0 28px 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2); font-weight: 700; font-size: .88rem; cursor: pointer; background-image: none; }
.status-wrap { position: relative; display: inline-block; }
.status-wrap::after { content: ""; position: absolute; right: 12px; top: 50%; width: 6px; height: 6px; margin-top: -5px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); pointer-events: none; color: var(--dim); }
.st-live { color: var(--ok); background-color: var(--ok-soft); border-color: rgba(95, 217, 154, .45); }
.st-draft { color: var(--text); }
.st-hidden { color: var(--hidden); background-color: var(--bad-soft); border-color: rgba(255, 176, 138, .4); }
.pill { display: inline-flex; align-items: center; min-height: 24px; padding: 2px 10px; border-radius: 999px; font-size: .8rem; font-weight: 700; background: var(--surface-2); border: 1px solid var(--line); color: var(--text); white-space: nowrap; vertical-align: middle; }
.pill-ok { color: var(--ok); background: var(--ok-soft); }
.pill-bad { color: var(--bad); background: var(--bad-soft); }
.pill-gold { color: var(--gold); background: var(--gold-soft); }
.pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }

/* the floating Add button, above the tab bar */
.fab { position: fixed; z-index: 25; right: max(16px, calc((100vw - 760px) / 2 + 16px)); bottom: calc(var(--tabbar) + 16px + env(safe-area-inset-bottom, 0px)); display: inline-flex; align-items: center; gap: 8px; min-height: 52px; padding: 0 20px; border-radius: 999px; background: linear-gradient(180deg, var(--gold), var(--gold-2)); color: var(--on-gold); font: 800 1rem var(--display); text-decoration: none; box-shadow: 0 14px 30px -12px rgba(255, 143, 0, .7); cursor: pointer; }
.fab span { font-size: 1.4rem; line-height: 1; }

/* ---------- forms ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 0 0 14px; scroll-margin-top: 130px; }
.panel-off { opacity: .85; border-style: dashed; }
.field { margin: 0 0 14px; min-width: 0; }
.field:last-child { margin-bottom: 0; }
fieldset.field { border: 0; padding: 0; margin-inline: 0; }
legend, .field > label { display: block; font-weight: 700; margin-bottom: 6px; padding: 0; }
input[type=text], input[type=password], input[type=number], input[type=search], input[type=datetime-local], select, textarea { width: 100%; min-height: 48px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--field-line); background: var(--surface-2); color: var(--text); }
textarea { resize: vertical; min-height: 120px; line-height: 1.5; }
select { appearance: auto; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; border-color: var(--gold); }
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--bad); }
.radio, .check { display: flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 600; cursor: pointer; min-width: 0; }
.radio input, .check input { width: 22px; height: 22px; accent-color: var(--gold); flex: none; margin: 0; }
.radio .opt { font-weight: 400; }
input[type=file] { width: 100%; min-height: 48px; padding: 8px; border-radius: 12px; border: 1px dashed var(--field-line); background: var(--surface-2); color: var(--dim); }
input[type=file]::file-selector-button { min-height: 36px; margin-right: 10px; padding: 0 14px; border-radius: 999px; border: 0; background: var(--gold); color: var(--on-gold); font-weight: 700; cursor: pointer; }
input[type=file].file-hidden { position: absolute; width: 1px; height: 1px; min-height: 0; padding: 0; border: 0; opacity: 0; overflow: hidden; clip: rect(0 0 0 0); pointer-events: none; }
.file-btn { cursor: pointer; }
input.file-hidden:focus-visible + .file-btn { outline: 3px solid var(--focus); outline-offset: 2px; }
input[type=range] { width: 100%; min-height: 44px; accent-color: var(--gold); }
input[type=color] { width: 48px; height: 48px; padding: 2px; border-radius: 12px; border: 1px solid var(--field-line); background: var(--surface-2); flex: none; cursor: pointer; }
.colour-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.colour-pair { display: flex; gap: 8px; align-items: center; min-width: 0; }
.colour-pair input[type=text] { min-width: 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; text-transform: uppercase; }
@media (max-width: 359px) { .colour-row { grid-template-columns: 1fr; } }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 18px; border-radius: 999px; border: 1px solid transparent; font-weight: 700; text-decoration: none; cursor: pointer; text-align: center; line-height: 1.2; }
.btn-primary { background: linear-gradient(180deg, var(--gold), var(--gold-2)); color: var(--on-gold); }
.btn-primary:hover { filter: brightness(1.06); }
.btn-quiet { background: var(--surface-2); border-color: var(--gold); color: var(--text); }
.btn-quiet:hover { background: var(--surface-3); }
.btn-danger { background: var(--bad-soft); border-color: var(--bad); color: var(--bad); }
.btn-sm { min-height: 44px; padding: 6px 14px; font-size: .92rem; }
.btn-wide { width: 100%; margin-top: 8px; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.btn-link { border: 0; background: none; padding: 0 2px; min-height: 24px; color: var(--gold); font-weight: 700; text-decoration: underline; cursor: pointer; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0 0; }
.icon-btn { flex: none; display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); cursor: pointer; font-weight: 800; }
.icon-btn[disabled] { opacity: .35; cursor: not-allowed; }
.save-bar { position: sticky; bottom: calc(var(--tabbar) + 8px + env(safe-area-inset-bottom, 0px)); z-index: 20; display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; padding: 10px; margin: 6px -4px 0; border-radius: 20px; background: rgba(30, 27, 24, .96); border: 1px solid var(--line); box-shadow: 0 -10px 30px -18px rgba(0, 0, 0, .9); }
.save-bar .btn-primary { flex: 1; }

/* ---------- jobs: encoding and uploads ---------- */
.job { margin: 10px 0 0; padding: 12px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.job p { margin: 0 0 8px; }
.job-title { font-weight: 700; }
.bar-track { height: 12px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); overflow: hidden; margin: 6px 0 8px; }
.bar-fill { height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, var(--gold-2), var(--gold)); transition: width .2s linear; }
.job-ok { border-color: rgba(95, 217, 154, .45); }
.job-bad { border-color: var(--bad); background: var(--bad-soft); }
audio { width: 100%; margin: 6px 0 8px; }
.cover-now { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.cover-now .thumb { width: 96px; height: 96px; border-radius: 16px; }

/* ---------- artist preview, colours ---------- */
.artist-card { display: grid; justify-items: center; gap: 4px; margin: 0 0 14px; padding: 18px 12px 16px; border-radius: 20px; text-align: center; background: linear-gradient(160deg, #8e44ad, #582a6b); color: #fff; }
.ac-avatar { width: 84px; height: 84px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: rgba(0, 0, 0, .25); font: 800 1.5rem var(--display); border: 3px solid rgba(255, 255, 255, .35); }
.ac-avatar img { width: 100%; height: 100%; object-fit: cover; }
.ac-name { font: 800 1.25rem var(--display); text-shadow: 0 1px 6px rgba(0, 0, 0, .5); }
.ac-persona { font-style: italic; color: #ffe2a8; text-shadow: 0 1px 6px rgba(0, 0, 0, .6); }
.pic-list { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 8px; }
.pic-item { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.pic-item .thumb { width: 56px; height: 56px; }
.pic-item .row-text { flex: 1; }
.pic-actions { display: flex; gap: 4px; flex: none; }

/* ---------- pictures ---------- */
.grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.pcard { display: grid; grid-template-rows: auto 1fr; border-radius: 16px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); min-width: 0; }
.pcard-open { display: grid; padding: 0; border: 0; background: none; color: var(--text); text-align: left; cursor: pointer; min-width: 0; }
.pcard-img { aspect-ratio: 1 / 1; background: var(--surface-2); display: grid; place-items: center; overflow: hidden; color: var(--dim); font-size: .75rem; padding: 0; }
.pcard-img img { width: 100%; height: 100%; object-fit: cover; }
.pcard-img .path { padding: 8px; word-break: break-all; }
.pcard-body { padding: 8px 10px 10px; display: grid; gap: 4px; min-width: 0; }
.pcard-body strong { font-size: .92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pcard-body .meta { font-size: .8rem; }
.used { font-size: .8rem; color: var(--dim); }
.more { text-align: center; margin: 14px 0; }
.pic-big { border-radius: 16px; overflow: hidden; background: var(--surface-2); margin: 0 0 12px; display: grid; place-items: center; min-height: 120px; }
.pic-big img { width: 100%; max-height: 50vh; object-fit: contain; }
.pick-grid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); margin: 10px 0; max-height: 55vh; overflow: auto; }
.pick-grid button { display: grid; width: 100%; padding: 0; border: 2px solid transparent; border-radius: 14px; overflow: hidden; background: var(--surface-2); color: var(--text); cursor: pointer; text-align: left; }
.pick-grid button:hover { border-color: var(--gold); }
.pick-grid .pcard-body { padding: 6px; }

/* ---------- layout: reorder lists, notice preview ---------- */
.reorder { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 6px; counter-reset: pos; }
.ro-item { display: grid; grid-template-columns: 36px 24px minmax(0, 1fr) auto; align-items: center; gap: 4px 8px; padding: 6px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); min-width: 0; touch-action: pan-y; }
@media (max-width: 479px) {
  /* On a phone the title gets the whole line; Move up, Move down and Remove sit under it. */
  .ro-item { grid-template-columns: 36px 24px minmax(0, 1fr); }
  .ro-actions { grid-column: 3; justify-content: flex-end; }
}
.ro-item.dragging { border-color: var(--gold); box-shadow: 0 10px 24px -12px rgba(255, 160, 0, .7); position: relative; z-index: 2; }
.ro-handle { flex: none; width: 36px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 10px; background: none; color: var(--dim); cursor: grab; touch-action: none; }
.ro-handle::before { content: ""; width: 14px; height: 12px; background: linear-gradient(currentColor 0 0) top / 100% 2px no-repeat, linear-gradient(currentColor 0 0) center / 100% 2px no-repeat, linear-gradient(currentColor 0 0) bottom / 100% 2px no-repeat; }
.ro-pos { flex: none; width: 24px; text-align: center; font-weight: 800; color: var(--gold); }
.ro-text { flex: 1; min-width: 0; display: grid; }
.ro-text strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ro-text .meta { font-size: .85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ro-actions { flex: none; display: flex; gap: 4px; }
.add-row { display: flex; gap: 8px; align-items: stretch; }
.add-row select, .add-row input { flex: 1; min-width: 0; }
.notice-preview { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; padding: 12px 14px; border-radius: 18px; background: var(--surface); border: 1px solid rgba(255, 160, 0, .5); border-left: 4px solid var(--gold); color: var(--text); font-weight: 600; min-height: 60px; }
.np-icon { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--gold-soft); position: relative; }
.np-icon::before { content: ""; position: absolute; left: 9px; top: 11px; width: 8px; height: 12px; background: var(--gold); clip-path: polygon(0 30%, 40% 30%, 100% 0, 100% 100%, 40% 70%, 0 70%); }
.np-text { flex: 1; min-width: 0; }
.np-x { flex: none; width: 14px; height: 14px; position: relative; opacity: .7; }
.np-x::before, .np-x::after { content: ""; position: absolute; left: 6px; top: -1px; width: 2px; height: 16px; background: var(--text); transform: rotate(45deg); }
.np-x::after { transform: rotate(-45deg); }
.notice-preview.empty-notice { opacity: .5; border-style: dashed; }

/* ---------- publish ---------- */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; margin: 0 0 12px; }
.stat { padding: 12px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.stat strong { display: block; font: 800 1.2rem var(--display); color: var(--gold); }
.stat span { font-size: .85rem; color: var(--dim); }
.change, .problem, .version { display: grid; gap: 2px; padding: 10px 12px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.problem.error { border-color: var(--bad); background: var(--bad-soft); }
.problem.warning { border-color: rgba(255, 160, 0, .55); }
.problem a, .change a { font-weight: 700; }
.list { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 8px; }
.copy-block { display: flex; gap: 8px; align-items: center; margin: 8px 0; padding: 8px 8px 8px 12px; border-radius: 14px; background: var(--bg); border: 1px solid var(--line); }
.copy-block code { flex: 1; min-width: 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85rem; word-break: break-all; color: var(--text); }
.qr { width: min(240px, 70vw); margin: 10px auto; padding: 10px; background: #fff; border-radius: 16px; }
.qr svg { width: 100%; height: auto; }
.steps { margin: 6px 0 10px; padding-left: 20px; }
.steps li { margin: 4px 0; }

/* ---------- helpers ---------- */
.switches { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 2px 12px; }
.check-text { min-width: 0; }
.artist-pick { margin: 0 0 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.artist-pick > summary { min-height: 48px; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; padding: 8px 14px; font-weight: 700; cursor: pointer; }
.pick-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0 12px; padding: 0 14px 10px; max-height: 280px; overflow: auto; }
.secret { margin: 0 0 14px; padding: 14px; border-radius: 16px; background: var(--gold-soft); border: 1px solid var(--gold); }
.secret code { display: inline-block; margin: 6px 0; padding: 6px 10px; border-radius: 10px; background: var(--bg); font: 700 1.1rem ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .04em; word-break: break-all; }
.team-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; justify-content: space-between; }
.team-perm { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }

/* ---------- Jump to (the dashboard's pattern; /assets/menu.js closes it) ---------- */
.jump { position: sticky; top: 74px; z-index: 22; display: block; text-align: right; margin: -6px 0 8px; pointer-events: none; }
.jump > summary { pointer-events: auto; display: inline-flex; }
.jump-btn { align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: 999px; background: var(--surface-3); border: 1px solid var(--gold); color: var(--text); font-weight: 700; font-size: .9rem; box-shadow: 0 8px 20px -10px rgba(0, 0, 0, .9); }
.jump-btn::after { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform .2s; }
.jump[open] .jump-btn::after { transform: translateY(2px) rotate(-135deg); }
.jump-panel { position: absolute; right: 0; top: calc(100% + 8px); display: grid; gap: 2px; width: max-content; min-width: 200px; max-width: calc(100vw - 32px); padding: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 24px 50px -20px rgba(0, 0, 0, .9); text-align: left; pointer-events: auto; }
.jump-panel button { display: flex; align-items: center; min-height: 44px; padding: 0 12px; border: 0; border-radius: 10px; background: none; color: var(--text); font-weight: 600; text-align: left; cursor: pointer; }
.jump-panel button:hover { background: var(--surface-2); }

/* ---------- the tab bar ---------- */
.tabbar { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; background: var(--bg-2); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom, 0px); }
.tabbar a { flex: 1; max-width: 152px; min-width: 0; min-height: var(--tabbar); display: grid; place-items: center; align-content: center; gap: 2px; padding: 6px 2px; color: var(--dim); text-decoration: none; font-size: .78rem; font-weight: 700; }
.tabbar svg { width: 24px; height: 24px; }
.tabbar a[aria-current="page"] { color: var(--gold); }
.tabbar a[aria-current="page"] svg { filter: drop-shadow(0 0 6px rgba(255, 160, 0, .5)); }
.tabbar span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }

/* ---------- dialogs ---------- */
dialog { width: 100%; max-width: 560px; max-height: 100dvh; height: auto; margin: auto auto 0; padding: 0; border: 1px solid var(--line); border-radius: 24px 24px 0 0; background: var(--surface); color: var(--text); overflow: auto; }
dialog::backdrop { background: rgba(0, 0, 0, .7); }
@media (min-width: 700px) { dialog { margin: auto; border-radius: 24px; max-height: 92vh; } }
.dlg-body { padding: 18px 16px calc(18px + env(safe-area-inset-bottom, 0px)); }
.dlg-actions { justify-content: flex-end; margin-top: 16px; }
.crop-stage { display: grid; place-items: center; margin: 8px 0 10px; border-radius: 16px; background: #0b0a09; overflow: hidden; touch-action: none; }
#cropCanvas { width: 100%; height: auto; cursor: grab; touch-action: none; }
.nudge { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; }

/* ---------- toasts ---------- */
#toasts { position: fixed; left: 12px; right: 12px; bottom: calc(var(--tabbar) + 14px + env(safe-area-inset-bottom, 0px)); z-index: 90; display: grid; gap: 8px; justify-items: center; pointer-events: none; }
.toast { width: 100%; max-width: 520px; padding: 12px 16px; border-radius: 14px; background: var(--surface-3); border: 1px solid var(--gold); color: var(--text); font-weight: 600; box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .9); }
.toast.error { border-color: var(--bad); background: #3a1a14; }

@media (min-width: 900px) {
  .wrap { padding-top: 24px; }
  h1 { font-size: 1.9rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
