/* Submission Manager - Public CSS (scoped to .sm-wrap so it doesn't touch the theme) */
/* Montserrat comes from the OMGF stylesheet loaded by the plugin (no Google request). */

.sm-wrap {
  --sm-bg:         #242424; /* form */
  --sm-surface:    #2c2c2c; /* cards inside the form */
  --sm-surface2:   #333333; /* fields, thumbnails */
  --sm-border:     rgba(255,255,255,0.08);
  --sm-text:       #ffffff;
  --sm-muted:      #ffffff;
  --sm-muted2:     #ffffff;
  --sm-accent:     #00ff9a;
  --sm-accent-ink: #00ff9a; /* accent used as text (darker in light mode) */
  --sm-accent-dim: rgba(0,255,154,0.12);
  --sm-red:        #ff4d6d;
  --sm-red-dim:    rgba(255,77,109,0.12);
  --sm-green:      #00ff9a;
  --sm-font:       'Montserrat', sans-serif;

  max-width: 640px; margin: 0 auto; padding: 40px 28px;
  background: var(--sm-bg); color: var(--sm-text);
  font-family: var(--sm-font); font-size: 15px; line-height: 1.5;
  border-radius: 16px; text-align: left;
}
.sm-wrap *, .sm-wrap *::before, .sm-wrap *::after { box-sizing: border-box; }
.sm-wrap button, .sm-wrap input, .sm-wrap textarea { font-family: var(--sm-font); }
.sm-wrap [hidden] { display: none !important; }
.sm-hidden { display: none !important; }
.sm-muted { color: var(--sm-muted); }

/* ─── HEADER ─── */
.sm-head { margin-bottom: 28px; }
/* Logo size/colour is set inline in templates/public-form.php */
.sm-wrap .sm-logo {
  display: block; width: 40px; height: auto; max-width: none;
  margin: 0 0 18px; padding: 0; border: 0; border-radius: 0;
  background: none; box-shadow: none;
}
.sm-wrap .sm-title {
  font-size: 34px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1;
  margin: 0 0 10px; color: var(--sm-text);
}
.sm-stats { font-size: 14px; color: var(--sm-muted); }
.sm-reply { font-size: 13px; color: var(--sm-green); margin-top: 6px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.sm-reply-check {
  display: inline-flex; width: 16px; height: 16px; border-radius: 50%;
  background: rgba(0,255,154,0.15); align-items: center; justify-content: center; font-size: 10px;
}

/* ─── TIERS ─── */
.sm-tiers { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.sm-wrap .sm-tier {
  display: flex; align-items: flex-start; gap: 14px; width: 100%;
  background: var(--sm-surface); border: 1px solid var(--sm-border); border-radius: 12px;
  padding: 18px; cursor: pointer; text-align: left; color: var(--sm-text);
  transition: border-color 0.15s, background 0.15s;
}
.sm-wrap .sm-tier:hover { border-color: rgba(0,255,154,0.3); background: var(--sm-surface); }
.sm-wrap .sm-tier.active { border-color: var(--sm-accent); background: var(--sm-accent-dim); }
.sm-tier-radio {
  flex-shrink: 0; width: 18px; height: 18px; margin-top: 2px; border-radius: 50%;
  border: 2px solid var(--sm-muted2); position: relative; transition: border-color 0.15s;
}
.sm-tier.active .sm-tier-radio { border-color: var(--sm-accent); }
.sm-tier.active .sm-tier-radio::after {
  content: ''; position: absolute; inset: 3px; border-radius: 50%; background: var(--sm-accent);
}
.sm-tier-body { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.sm-tier-title { font-size: 13px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.sm-tier-bullets { display: flex; flex-direction: column; gap: 4px; }
.sm-tier-bullet { font-size: 13px; color: var(--sm-muted); padding-left: 18px; position: relative; }
.sm-tier-bullet::before { content: '✓'; position: absolute; left: 0; color: var(--sm-accent-ink); font-size: 11px; }
.sm-tier-price { font-size: 22px; font-weight: 700; letter-spacing: -0.01em; }
.sm-tier.active .sm-tier-price { color: var(--sm-accent-ink); }

/* ─── BUTTONS ─── */
.sm-wrap .sm-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 13px; font-weight: 700; padding: 10px 18px; border-radius: 8px;
  border: none; cursor: pointer; transition: all 0.15s; text-decoration: none;
  letter-spacing: 0.01em; line-height: 1.2;
}
.sm-wrap .sm-btn-accent { background: var(--sm-accent); color: var(--sm-bg); }
.sm-wrap .sm-btn-accent:hover:not(:disabled) { background: #33ffae; transform: translateY(-1px); }
.sm-wrap .sm-btn-ghost { background: transparent; color: var(--sm-text); border: 1px solid var(--sm-border); }
.sm-wrap .sm-btn-ghost:hover { background: var(--sm-surface2); }
.sm-wrap .sm-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.sm-btn-block { width: 100%; }
.sm-wrap .sm-btn-lg { padding: 15px 22px; font-size: 14px; text-transform: uppercase; letter-spacing: 0.06em; }
.sm-wrap .sm-link-btn {
  background: none; border: none; padding: 8px 0; cursor: pointer;
  color: var(--sm-muted); font-size: 13px; text-align: left;
}
.sm-wrap .sm-link-btn:hover { color: var(--sm-text); }
.sm-wrap .sm-link-btn u, .sm-drop-text u { color: var(--sm-accent-ink); text-decoration: none; font-weight: 600; }
.sm-wrap .sm-link-inline {
  background: none; border: none; padding: 0; margin-left: 6px; cursor: pointer;
  color: var(--sm-accent-ink); font-size: 13px; font-weight: 600; text-decoration: underline;
}

/* ─── ABOUT / PLAYLISTS ─── */
/* !important: themes often force their own paragraph color (e.g. .entry-content p) */
.sm-wrap .sm-about { color: var(--sm-text) !important; font-size: 14px; margin: 24px 0; }
.sm-section-label {
  font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--sm-muted); font-weight: 700; margin-bottom: 10px;
}
.sm-playlists { margin-bottom: 24px; }
.sm-playlist {
  display: flex; align-items: center; gap: 12px; padding: 12px 0;
  border-bottom: 1px solid var(--sm-border);
}
.sm-playlist-icon {
  flex-shrink: 0; width: 40px; height: 40px; border-radius: 6px;
  background: var(--sm-surface2); display: flex; align-items: center; justify-content: center;
  color: var(--sm-accent-ink); font-size: 16px;
}
.sm-playlist-cover { object-fit: cover; display: block; padding: 0; margin: 0; }
.sm-playlist-info { display: flex; flex-direction: column; min-width: 0; }
.sm-wrap .sm-playlist-name { font-size: 14px; font-weight: 600; color: var(--sm-text); text-decoration: none; }
.sm-wrap a.sm-playlist-name:hover { color: var(--sm-accent-ink); }
.sm-playlist-meta { font-size: 12px; color: var(--sm-muted); }
.sm-wrap .sm-disclaimer, .sm-wrap .sm-fineprint { color: var(--sm-text) !important; }
.sm-disclaimer { font-size: 12px; margin: 0; }

/* ─── ALERT ─── */
.sm-alert {
  background: var(--sm-red-dim); border: 1px solid rgba(255,77,109,0.25); color: var(--sm-text);
  border-radius: 8px; padding: 12px 16px; font-size: 13px; margin-bottom: 24px;
}

/* ─── MODAL ─── */
.sm-modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.75);
  backdrop-filter: blur(6px); z-index: 100000;
  display: none; align-items: center; justify-content: center; padding: 20px;
}
.sm-modal-overlay.open { display: flex; }
/* Popup lives under <body> with the sm-wrap class - undo the page-card styles on it */
.sm-modal-overlay.sm-wrap {
  max-width: none; margin: 0; padding: 20px; border-radius: 0;
  background: rgba(0,0,0,0.75); z-index: 999999;
}
.sm-modal {
  background: var(--sm-bg); border: 1px solid var(--sm-border);
  border-radius: 14px; width: 100%; max-width: 520px; max-height: 90vh;
  overflow-y: auto; animation: sm-slideUp 0.2s ease; color: var(--sm-text);
}
@keyframes sm-slideUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
.sm-modal-header {
  padding: 18px 20px; border-bottom: 1px solid var(--sm-border);
  display: flex; align-items: center; gap: 10px;
  position: sticky; top: 0; background: var(--sm-bg); z-index: 1;
}
.sm-modal-title { flex: 1; font-size: 16px; font-weight: 700; }
.sm-wrap .sm-modal-close, .sm-wrap .sm-modal-back {
  width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
  border-radius: 6px; background: var(--sm-surface2); border: none; padding: 0;
  color: var(--sm-muted); cursor: pointer; font-size: 15px; transition: all 0.15s;
}
.sm-wrap .sm-modal-close:hover { background: var(--sm-red-dim); color: var(--sm-red); }
.sm-wrap .sm-modal-back:hover { color: var(--sm-text); }
.sm-modal-body { padding: 20px; }
.sm-step { display: none; }
.sm-step.active { display: block; }

/* ─── FORM ─── */
.sm-label {
  display: block; font-size: 11px; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--sm-muted); margin-bottom: 8px; font-weight: 600;
}
.sm-optional { text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--sm-muted2); }
.sm-field { margin-bottom: 16px; }
.sm-hint { display: block; font-size: 12px; color: var(--sm-muted2); margin-top: 6px; }
.sm-wrap input[type="text"], .sm-wrap input[type="email"], .sm-wrap input[type="url"], .sm-wrap input[type="date"], .sm-wrap textarea {
  width: 100%; background: var(--sm-surface2); border: 1px solid var(--sm-border);
  border-radius: 8px; padding: 12px 14px; color: var(--sm-text); font-size: 14px;
  outline: none; transition: border-color 0.15s; box-shadow: none; margin: 0;
}
.sm-wrap input::placeholder, .sm-wrap textarea::placeholder { color: var(--sm-muted2); }
.sm-wrap input:focus, .sm-wrap textarea:focus { border-color: rgba(0,255,154,0.5); }
.sm-wrap input.sm-invalid { border-color: var(--sm-red); }
.sm-wrap textarea { resize: vertical; min-height: 80px; }
.sm-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.sm-grid-2 .sm-field { margin-bottom: 0; }
.sm-wrap .sm-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }

/* Search */
.sm-search { display: flex; gap: 8px; margin: 0 0 12px; }
.sm-search input { flex: 1; min-width: 0; }
.sm-results { display: flex; flex-direction: column; gap: 6px; }
.sm-results:empty { display: none; }
.sm-results-msg { font-size: 13px; color: var(--sm-muted); padding: 8px 0; }
.sm-wrap .sm-result {
  display: flex; align-items: center; gap: 12px; width: 100%;
  background: var(--sm-surface2); border: 1px solid var(--sm-border); border-radius: 8px;
  padding: 8px; cursor: pointer; text-align: left; color: var(--sm-text); transition: border-color 0.15s;
}
.sm-wrap .sm-result:hover { border-color: var(--sm-accent); background: var(--sm-surface2); }
.sm-art {
  flex-shrink: 0; width: 48px; height: 48px; border-radius: 4px; object-fit: cover;
  background: var(--sm-surface); display: flex; align-items: center; justify-content: center; color: var(--sm-muted);
}
.sm-result-info { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.sm-result-track { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sm-result-artist { font-size: 12px; color: var(--sm-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Upload */
.sm-drop {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  border: 1.5px dashed var(--sm-border); border-radius: 10px; padding: 28px 16px;
  cursor: pointer; text-align: center; transition: border-color 0.15s, background 0.15s; margin: 0;
}
.sm-drop:hover, .sm-drop.drag { border-color: var(--sm-accent); background: var(--sm-accent-dim); }
.sm-drop.done { border-style: solid; border-color: var(--sm-green); }
.sm-drop-icon { font-size: 20px; color: var(--sm-accent-ink); }
.sm-drop-text { font-size: 14px; font-weight: 600; color: var(--sm-text); word-break: break-all; }
.sm-drop-hint { font-size: 12px; color: var(--sm-muted2); }
.sm-progress { width: 100%; height: 4px; background: var(--sm-surface2); border-radius: 2px; overflow: hidden; margin-top: 8px; }
.sm-progress-bar { display: block; height: 100%; width: 0; background: var(--sm-accent); transition: width 0.1s; }

/* Selected song */
.sm-selected {
  display: flex; align-items: center; gap: 12px; margin-bottom: 20px;
  background: var(--sm-accent-dim); border: 1px solid rgba(0,255,154,0.35);
  border-radius: 10px; padding: 10px;
}
.sm-selected .sm-art { width: 56px; height: 56px; }

/* Payment step */
.sm-summary {
  display: flex; align-items: center; gap: 12px;
  background: var(--sm-surface2); border: 1px solid var(--sm-border);
  border-radius: 10px; padding: 12px; margin-bottom: 14px;
}
.sm-summary-price { font-size: 20px; font-weight: 700; color: var(--sm-accent-ink); }
.sm-summary-tier { font-size: 11px; color: var(--sm-muted); text-transform: uppercase; letter-spacing: 0.04em; margin-top: 2px; }
.sm-response-to {
  font-size: 13px; color: var(--sm-muted); margin-bottom: 20px; padding: 10px 12px;
  border: 1px solid var(--sm-border); border-radius: 8px;
}
.sm-response-to strong { color: var(--sm-text); word-break: break-all; }
.sm-gateways { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.sm-wrap .sm-gateway {
  display: flex; align-items: center; gap: 12px; width: 100%;
  background: var(--sm-surface2); border: 1px solid var(--sm-border); border-radius: 8px;
  padding: 14px; cursor: pointer; color: var(--sm-text); font-size: 14px; font-weight: 600; text-align: left;
  transition: border-color 0.15s;
}
.sm-wrap .sm-gateway:hover { border-color: rgba(0,255,154,0.3); background: var(--sm-surface2); }
.sm-wrap .sm-gateway.active { border-color: var(--sm-accent); background: var(--sm-accent-dim); }
.sm-gateway .sm-tier-radio { margin-top: 0; }
.sm-gateway.active .sm-tier-radio { border-color: var(--sm-accent); }
.sm-gateway.active .sm-tier-radio::after { content: ''; position: absolute; inset: 3px; border-radius: 50%; background: var(--sm-accent); }
.sm-gateway-icons { margin-left: auto; font-size: 11px; color: var(--sm-muted); font-weight: 500; }
.sm-fineprint { font-size: 11px; color: var(--sm-muted2); text-align: center; margin: 12px 0 0; }

.sm-error {
  margin-top: 14px; background: var(--sm-red-dim); border: 1px solid rgba(255,77,109,0.25);
  color: var(--sm-text); border-radius: 8px; padding: 10px 14px; font-size: 13px;
}

/* ─── DONE ─── */
.sm-card { background: var(--sm-surface); border: 1px solid var(--sm-border); border-radius: 14px; padding: 36px 28px; }
.sm-done { text-align: center; }
.sm-done-icon {
  width: 56px; height: 56px; border-radius: 50%; margin: 0 auto 16px;
  background: var(--sm-accent-dim); color: var(--sm-accent-ink);
  display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 700;
}
.sm-wrap .sm-done-title { font-size: 24px; font-weight: 700; margin: 0 0 16px; color: var(--sm-text); }
.sm-done-art { width: 96px; height: 96px; border-radius: 8px; object-fit: cover; margin: 0 auto 12px; display: block; }
.sm-done-song { margin: 0 0 12px; }
.sm-done .sm-muted { font-size: 14px; margin: 0 0 24px; }

/* ─── SPINNER ─── */
.sm-spin {
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent;
  animation: sm-spin 0.7s linear infinite; display: inline-block;
}
@keyframes sm-spin { to { transform: rotate(360deg); } }

/* ─── RESPONSIVE ─── */
@media (max-width: 560px) {
  .sm-wrap { padding: 28px 16px; border-radius: 0; }
  .sm-wrap .sm-title { font-size: 28px; }
  /* Phones: popup pinned to the TOP (the keyboard opens from the bottom), scrolls inside. */
  .sm-modal-overlay, .sm-modal-overlay.sm-wrap { padding: 12px; align-items: flex-start; }
  .sm-modal { max-width: 100%; max-height: 100%; border-radius: 14px; animation: none; }
  .sm-grid-2 { grid-template-columns: 1fr; }
}

/* ─── STANDALONE PAGE (/submit/) ─── */
html:has(body.sm-page) { background: #181818; }
body.sm-page {
  margin: 0; min-height: 100vh; background: #181818; /* page */
  /* clip (not hidden): stops sideways wobble without turning <body> into its own scroll box */
  overflow-x: clip; -webkit-text-size-adjust: 100%;
}
.sm-page-main { padding: 48px 16px 64px; }
body.sm-page .sm-wrap:not(.sm-modal-overlay) { border: 1px solid rgba(255,255,255,0.06); }

/* No page scroll-lock (like SubmitHub) - see public.js */
.sm-modal-overlay { box-sizing: border-box; }
.sm-modal { overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }

@media (max-width: 560px) {
  /* iPhone zooms into any field with text under 16px - keep fields at 16px on phones */
  .sm-wrap input[type="text"], .sm-wrap input[type="email"], .sm-wrap input[type="url"], .sm-wrap input[type="date"], .sm-wrap textarea { font-size: 16px; }
  .sm-page-main { padding: 0; }
  body.sm-page .sm-wrap:not(.sm-modal-overlay) { border: 0; min-height: 100vh; }
}

/* ─── ON-PAGE FLOW (after a song is picked) ─── */
#smFlow .sm-selected { margin-bottom: 16px; }
#smFlow .sm-selected .sm-link-inline { margin-left: auto; padding: 8px 4px; text-decoration: none; }
.sm-order {
  background: var(--sm-surface); border: 1px solid var(--sm-border);
  border-radius: 12px; padding: 18px; margin-bottom: 24px;
}
.sm-order-title {
  font-size: 13px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--sm-accent-ink); margin-bottom: 10px;
}
.sm-order-total {
  display: flex; justify-content: space-between; align-items: baseline;
  border-top: 1px solid var(--sm-border); margin-top: 14px; padding-top: 12px;
  font-size: 15px; font-weight: 700;
}
.sm-order-total strong { font-size: 18px; color: var(--sm-text); }
.sm-wrap .sm-order-change { display: block; width: 100%; text-align: right; padding: 6px 0 0; font-size: 12px; text-decoration: underline; }
#smFlow .sm-fineprint { margin-top: 20px; }

/* ─── LATEST POSTS ─── */
.sm-latest { margin-bottom: 24px; }
.sm-latest-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.sm-wrap .sm-latest-item { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--sm-text); min-width: 0; }
.sm-latest-thumb {
  display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover;
  border-radius: 8px; background: var(--sm-surface2); transition: opacity 0.15s;
}
.sm-latest-thumb-empty { display: flex; align-items: center; justify-content: center; color: var(--sm-accent-ink); font-size: 20px; }
.sm-latest-item:hover .sm-latest-thumb { opacity: 0.85; }
.sm-latest-title {
  font-size: 13px; font-weight: 600; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.sm-wrap .sm-latest-item:hover .sm-latest-title { color: var(--sm-accent-ink); }
.sm-latest-date { font-size: 11px; color: var(--sm-muted); }
@media (max-width: 560px) {
  .sm-latest-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}

/* ─── TOP BAR + MODE BUTTON (standalone /submit/ page, same as Premiere / Coverage Manager) ─── */
.sm-share-topbar {
  position: sticky; top: 0; z-index: 10;
  background: rgba(24,24,24,0.88); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding: 14px 32px;
  display: flex; align-items: center; justify-content: space-between;
}
.sm-share-brand { display: flex; align-items: center; }
.sm-share-brand img { height: 28px; width: auto; object-fit: contain; filter: invert(1); display: block; }
body.sm-page .sm-logo { display: none !important; } /* logo lives in the top bar here */

.sm-theme-toggle {
  flex-shrink: 0;
  display: flex; align-items: center; gap: 8px;
  height: 36px; padding: 0 12px; margin: 0;
  border-radius: 9px; cursor: pointer;
  font-family: 'Montserrat', sans-serif; font-size: 12px; font-weight: 700; letter-spacing: 0.06em;
  background: #2e2e2e; border: 1px solid rgba(255,255,255,0.08); color: #ffffff;
  transition: background .15s, border-color .15s;
}
.sm-theme-ico { width: 24px !important; height: 24px !important; display: block; flex-shrink: 0; object-fit: contain; }
.sm-theme-toggle:hover { border-color: #00ff9a; }
.sm-theme-toggle:focus-visible { outline: 2px solid #00ff9a; outline-offset: 2px; }

@media (max-width: 560px) {
  .sm-share-topbar { padding: 12px 16px; }
  .sm-theme-toggle { height: 32px; padding: 0 10px; gap: 6px; font-size: 11px; }
  .sm-theme-ico { width: 20px !important; height: 20px !important; }
}

/* ═══ LIGHT MODE (MODE button, remembered per browser; dark is the default) ═══ */
:root[data-theme="light"] .sm-wrap {
  --sm-bg:         #ffffff;   /* form */
  --sm-surface:    #f5f5f5;   /* cards inside the form */
  --sm-surface2:   #eeeeee;   /* fields, thumbnails */
  --sm-border:     rgba(0,0,0,0.12);
  --sm-text:       #000000;
  --sm-muted:      #000000;
  --sm-muted2:     #000000;
  --sm-accent:     #00ff9a;   /* mint stays a FILL in light mode; text on it is black */
  --sm-accent-ink: #000000;
  --sm-accent-dim: rgba(0,255,154,0.28);
  --sm-red:        #d83a56;
  --sm-red-dim:    rgba(216,58,86,0.10);
  --sm-green:      #00ff9a;
}
html[data-theme="light"]:has(body.sm-page),
:root[data-theme="light"] body.sm-page { background: #EDECEC; }
:root[data-theme="light"] body.sm-page .sm-wrap:not(.sm-modal-overlay) { border-color: rgba(0,0,0,0.08); }
/* olive buttons with white text; the remaining hard-coded lime hovers/borders → olive */
:root[data-theme="light"] .sm-wrap .sm-btn-accent { color: #000000; }
:root[data-theme="light"] .sm-wrap .sm-btn-accent:hover:not(:disabled) { background: #33ffae; color: #000000; }
:root[data-theme="light"] .sm-wrap .sm-tier:hover,
:root[data-theme="light"] .sm-wrap .sm-gateway:hover { border-color: rgba(0,255,154,0.35); }
:root[data-theme="light"] .sm-wrap input:focus,
:root[data-theme="light"] .sm-wrap textarea:focus { border-color: rgba(0,255,154,0.5); }
:root[data-theme="light"] .sm-selected { border-color: rgba(0,255,154,0.35); }
:root[data-theme="light"] .sm-modal-overlay.sm-wrap { background: rgba(0,0,0,0.45); }
:root[data-theme="light"] .sm-share-topbar { background: rgba(255,255,255,0.85); border-bottom-color: rgba(0,0,0,0.08); }
:root[data-theme="light"] .sm-share-brand img { filter: none; }
:root[data-theme="light"] .sm-theme-toggle { background: #f5f5f5; border-color: rgba(0,0,0,0.12); color: #000000; }
:root[data-theme="light"] .sm-theme-toggle:hover { border-color: #000000; }
:root[data-theme="light"] .sm-theme-toggle:focus-visible { outline-color: #000000; }

/* Release date picker: calendar popup follows the theme */
.sm-wrap input[type="date"] {
  color-scheme: dark; min-height: 46px;
  /* iPhone (Safari) gives date fields their own width and centres the text: make the field fill its box like the others */
  -webkit-appearance: none; appearance: none; display: block; width: 100%; max-width: 100%; min-width: 0; text-align: left;
}
.sm-wrap input[type="date"]::-webkit-date-and-time-value { text-align: left; margin: 0; min-height: 1.4em; }
:root[data-theme="light"] .sm-wrap input[type="date"] { color-scheme: light; }

/* ═══ ARTIST PAGE (/submit/?sub=ID&k=KEY) ═══ */
.sm-done-actions { display: flex; flex-direction: column; gap: 10px; align-items: stretch; max-width: 360px; margin: 0 auto; }
.sm-artist .sm-artist-song { margin-bottom: 18px; }
.sm-artist-release { display: inline-block; margin-top: 6px; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; width: fit-content; }
.sm-artist-release.out    { background: rgba(0,255,154,0.12); color: var(--sm-green); }
.sm-artist-release.future { background: var(--sm-red-dim); color: var(--sm-red); }

.sm-artist-request {
  background: var(--sm-accent-dim); border: 1px solid var(--sm-accent); border-radius: 12px;
  padding: 16px 18px; margin-bottom: 18px;
}
.sm-artist-request-label { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--sm-accent-ink); margin-bottom: 6px; }
.sm-artist-request-text { font-size: 14px; line-height: 1.6; color: var(--sm-text); }
.sm-artist-request-hint { font-size: 12px; color: var(--sm-muted); margin-top: 8px; }

.sm-timeline { display: flex; flex-direction: column; margin: 0 0 22px; padding-left: 4px; }
.sm-tl-step { position: relative; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 0 0 18px 26px; }
.sm-tl-step:not(:last-child)::before { content: ''; position: absolute; left: 6px; top: 16px; bottom: 0; width: 2px; background: var(--sm-border); }
.sm-tl-dot { position: absolute; left: 0; top: 3px; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--sm-muted2); background: var(--sm-bg); }
.sm-tl-done .sm-tl-dot     { background: var(--sm-accent); border-color: var(--sm-accent); }
.sm-tl-current .sm-tl-dot  { border-color: var(--sm-accent); box-shadow: 0 0 0 4px var(--sm-accent-dim); }
.sm-tl-declined .sm-tl-dot { background: var(--sm-muted2); border-color: var(--sm-muted2); }
.sm-tl-title { font-size: 15px; font-weight: 700; color: var(--sm-text); }
.sm-tl-todo .sm-tl-title { color: var(--sm-muted); font-weight: 600; }
.sm-tl-text { font-size: 13px; color: var(--sm-muted); }

.sm-artist-block { margin: 0 0 22px; }
.sm-artist-feedback { background: var(--sm-surface); border: 1px solid var(--sm-border); border-radius: 10px; padding: 14px 16px; font-size: 14px; line-height: 1.7; color: var(--sm-text); }
.sm-wrap .sm-artist-link {
  display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; margin: 0 0 6px;
  background: var(--sm-surface); border: 1px solid var(--sm-border); border-radius: 10px;
  color: var(--sm-text); text-decoration: none; font-size: 14px; font-weight: 600;
}
.sm-wrap .sm-artist-link span { color: var(--sm-muted); }
.sm-wrap .sm-artist-link:hover { border-color: var(--sm-accent); }

.sm-artist-photo-row { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.sm-artist-photo {
  flex-shrink: 0; width: 96px; height: 96px; border-radius: 10px; overflow: hidden;
  background: var(--sm-surface2); border: 1px solid var(--sm-border);
  display: flex; align-items: center; justify-content: center; text-align: center; font-size: 11px; color: var(--sm-muted);
}
.sm-artist-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sm-wrap .sm-artist-photo a { color: var(--sm-accent-ink); font-weight: 700; text-decoration: none; }
.sm-artist-photo-help { font-size: 13px; line-height: 1.5; color: var(--sm-muted); }
.sm-artist-photo-help strong { color: var(--sm-green); }
.sm-artist-or { font-size: 12px; color: var(--sm-muted); margin: 12px 0 8px; }
.sm-artist-ok { margin-top: 12px; font-size: 14px; font-weight: 700; color: var(--sm-green); }

/* ─── CHAT (artist page) ─── */
.sm-chat-list {
  display: flex; flex-direction: column; gap: 10px; max-height: 420px; overflow-y: auto;
  padding: 14px; margin-bottom: 10px; background: var(--sm-surface); border: 1px solid var(--sm-border); border-radius: 12px;
  overscroll-behavior: contain;
}
.sm-chat-empty { font-size: 13px; color: var(--sm-muted); text-align: center; padding: 18px 8px; }
.sm-msg { max-width: 82%; padding: 10px 13px; border-radius: 14px; font-size: 14px; line-height: 1.5; word-wrap: break-word; }
.sm-msg.me   { align-self: flex-end; background: var(--sm-accent-dim); border: 1px solid rgba(0,255,154,0.35); border-bottom-right-radius: 4px; }
.sm-msg.them { align-self: flex-start; background: var(--sm-surface2); border: 1px solid var(--sm-border); border-bottom-left-radius: 4px; }
.sm-msg-text { color: var(--sm-text); }
.sm-msg-meta { font-size: 11px; color: var(--sm-muted); margin-top: 4px; }
.sm-msg.me .sm-msg-meta { text-align: right; }
.sm-chat-form { display: flex; gap: 8px; align-items: flex-end; }
.sm-wrap .sm-chat-form textarea { flex: 1; min-height: 48px; resize: vertical; }
.sm-chat-form .sm-btn { height: 48px; flex-shrink: 0; }
:root[data-theme="light"] .sm-msg.me { border-color: rgba(0,255,154,0.35); }

/* ─── CHAT: sender line above each message (logo + House Nest / artist email) ─── */
.sm-msg-wrap { display: flex; flex-direction: column; max-width: 82%; gap: 4px; }
.sm-msg-wrap.me   { align-self: flex-end; align-items: flex-end; }
.sm-msg-wrap.them { align-self: flex-start; align-items: flex-start; }
.sm-msg-wrap .sm-msg { max-width: 100%; }
.sm-msg-wrap.me .sm-msg   { background: var(--sm-accent-dim); border: 1px solid rgba(0,255,154,0.35); border-radius: 14px; border-top-right-radius: 4px; }
.sm-msg-wrap.them .sm-msg { background: var(--sm-surface2); border: 1px solid var(--sm-border); border-radius: 14px; border-top-left-radius: 4px; }
.sm-msg-head { display: flex; align-items: center; gap: 6px; font-size: 11px; line-height: 1.2; max-width: 100%; }
.sm-msg-logo { width: 18px !important; height: 18px !important; border-radius: 5px; object-fit: cover; display: block; flex-shrink: 0; }
.sm-msg-name { font-weight: 700; color: var(--sm-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sm-msg-time { color: var(--sm-muted); white-space: nowrap; }
.sm-msg-time::before { content: '·'; margin-right: 6px; }
:root[data-theme="light"] .sm-msg-wrap.me .sm-msg { border-color: rgba(0,255,154,0.35); }

/* ─── SHARED LINKS: platform icons (artist page) ─── */
.sm-artist-link-main { display: flex; align-items: center; gap: 10px; min-width: 0; }
.sm-wrap .sm-artist-link .sm-artist-link-icon {
  width: 20px; height: 20px; flex-shrink: 0; border-radius: 4px; object-fit: contain; display: block;
  color: inherit;
}
.sm-artist-link-emoji { font-size: 16px; line-height: 20px; text-align: center; }
.sm-wrap .sm-artist-link .sm-artist-link-main { color: var(--sm-text); }

/* ═══ BRAND OVERRIDES (revamp): white / black / #00ff9a only ═══ */
:root[data-theme="light"] .sm-theme-toggle:hover { border-color: #000000; }
:root[data-theme="light"] .sm-theme-toggle:focus-visible { outline-color: #000000; }
:root[data-theme="light"] .sm-wrap .sm-tier.active .sm-tier-radio, :root[data-theme="light"] .sm-wrap .sm-gateway.active .sm-tier-radio { border-color: #000000; }
:root[data-theme="light"] .sm-wrap .sm-tier.active .sm-tier-radio::after, :root[data-theme="light"] .sm-wrap .sm-gateway.active .sm-tier-radio::after { background: #000000; }

/* ═══ ICONS: white PNG in dark mode, black PNG in light mode ═══ */
.sm-ico { display: inline-flex; align-items: center; justify-content: center; line-height: 0; vertical-align: middle; }
.sm-ico img { display: block; max-width: none; }
.sm-ico-light { display: none !important; }
:root[data-theme="light"] .sm-ico-dark { display: none !important; }
:root[data-theme="light"] .sm-ico-light { display: block !important; }
#smChat .sm-section-label { display: flex; align-items: center; gap: 8px; }

/* light mode: green text becomes black (mint stays a fill) */
:root[data-theme="light"] .sm-reply,
:root[data-theme="light"] .sm-artist-release.out,
:root[data-theme="light"] .sm-artist-photo-help strong,
:root[data-theme="light"] .sm-artist-ok { color: #000000; }
:root[data-theme="light"] .sm-artist-release.out { background: #00ff9a; }
:root[data-theme="light"] .sm-reply-check { background: #00ff9a; color: #000000; }

.sm-link-arr { display: flex; align-items: center; flex-shrink: 0; line-height: 0; }
.sm-wrap .sm-artist-photo a { display: inline-flex; align-items: center; gap: 6px; }
.sm-artist-photo .sm-ico img { width: 14px; height: 14px; object-fit: contain; }

/* ═══ AI-GENERATED MUSIC STATEMENT (payment step) ═══ */
.sm-ai { margin: 0 0 18px; }
.sm-wrap .sm-check {
  position: relative; display: flex; align-items: flex-start; gap: 12px; cursor: pointer; margin: 0;
  font-size: 13px; line-height: 1.6; background: var(--sm-surface2); border: 1px solid var(--sm-border);
  border-radius: 10px; padding: 14px 16px; transition: border-color 0.15s, background 0.15s;
}
.sm-wrap .sm-check input { position: absolute; opacity: 0; pointer-events: none; }
.sm-box {
  flex-shrink: 0; width: 20px; height: 20px; margin-top: 1px; border-radius: 5px;
  border: 2px solid var(--sm-muted2); position: relative; transition: all 0.15s;
}
.sm-check input:checked + .sm-box { background: var(--sm-accent); border-color: var(--sm-accent); }
.sm-check input:checked + .sm-box::after {
  content: ''; position: absolute; left: 5px; top: 1px; width: 5px; height: 10px;
  border: solid #000000; border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.sm-check input:focus-visible + .sm-box { outline: 2px solid var(--sm-accent); outline-offset: 2px; }
.sm-wrap .sm-check-text p { margin: 0 0 6px; color: var(--sm-text) !important; font-size: 13px; }
.sm-wrap .sm-check-text ul { margin: 4px 0 0; padding-left: 18px; }
.sm-wrap .sm-check-text li { margin: 0 0 4px; color: var(--sm-text); }
.sm-ai-bad .sm-check { border-color: var(--sm-red); background: var(--sm-red-dim); }

/* ═══ COUNTRY + VAT NUMBER (payment step) ═══ */
.sm-tax { margin: 0 0 4px; }
.sm-tax .sm-label { margin-bottom: 8px; }
.sm-wrap select {
  width: 100%; min-height: 46px; background: var(--sm-surface2); border: 1px solid var(--sm-border);
  border-radius: 8px; padding: 12px 14px; color: var(--sm-text); font-size: 14px; font-family: inherit;
  outline: none; transition: border-color 0.15s; box-shadow: none; margin: 0; color-scheme: dark;
}
:root[data-theme="light"] .sm-wrap select { color-scheme: light; }
.sm-wrap select:focus { border-color: rgba(0,255,154,0.5); }
@media (max-width: 560px) { .sm-wrap select { font-size: 16px; } }
.sm-wrap .sm-check.sm-check-small { background: transparent; border: 0; padding: 0; margin: 10px 0 0; font-size: 12px; line-height: 1.5; gap: 10px; }
.sm-check-small .sm-box { width: 18px; height: 18px; }
.sm-check-small input:checked + .sm-box::after { left: 4px; top: 0; }
.sm-tax .sm-field.sm-self input[type="text"] { opacity: 0.45; }
.sm-tax .sm-field.sm-field-bad select, .sm-tax .sm-field.sm-field-bad input[type="text"] { border-color: var(--sm-red); }
