:root {
  --bg: #1a1a2e;
  --surface: #232342;
  --surface-hover: #2a2a50;
  --accent: #7C5CBF;
  --accent-light: #9b7fd4;
  --text: #e8e8f0;
  --text-secondary: #a0a0b8;
  --text-muted: #6a6a85;
  --success: #4caf50;
  --border: #3a3a5c;
  --bonus: #ff9800;
  /* Dawn Studio signature gradient (strategy/DESIGN.md) */
  --dawn-gradient: linear-gradient(135deg, #FF8C7A 0%, #FFB78A 38%, #D49DFF 100%);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 16px;
}

/* --- Code Input Screen --- */
.code-screen {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 80vh;
  text-align: center;
}
.code-screen::before {
  content: "";
  position: absolute;
  top: 8%;
  left: 50%;
  width: 520px;
  height: 340px;
  transform: translateX(-50%);
  background: radial-gradient(
    ellipse at center,
    rgba(212, 157, 255, 0.14) 0%,
    rgba(255, 140, 122, 0.07) 40%,
    transparent 70%
  );
  pointer-events: none;
  z-index: 0;
}
.code-screen > * {
  position: relative;
  z-index: 1;
}
.code-screen .code-icon {
  width: 92px;
  height: 92px;
  margin: -6px 0 -6px;
  filter: drop-shadow(0 10px 28px rgba(212, 157, 255, 0.26));
}

.code-screen .logo {
  display: inline-block;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: var(--dawn-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  margin-bottom: 8px;
}

.code-screen .subtitle {
  color: var(--text-secondary);
  margin-bottom: 32px;
  font-size: 14px;
}

.code-input-group {
  display: flex;
  gap: 8px;
  width: 100%;
  max-width: 400px;
}

.code-input-group input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 16px;
  outline: none;
  transition: border-color 0.2s;
}

.code-input-group input:focus {
  border-color: var(--accent);
}

.code-input-group button {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  background: var(--dawn-gradient);
  color: #1A0E1F;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: filter 0.2s;
  white-space: nowrap;
}

.code-input-group button:hover {
  filter: brightness(1.05);
}

.code-input-group button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.error-msg {
  color: #ef5350;
  margin-top: 12px;
  font-size: 14px;
}

/* --- Dashboard --- */
.dashboard {
  display: none;
}

.dashboard.visible {
  display: block;
}

.creator-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

/* Language switcher lifted onto the creator-name row (authoring console) */
.creator-header .lang-switch { margin-left: auto; flex: 0 0 auto; align-self: flex-start; }

.creator-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--surface);
  object-fit: cover;
}

.creator-info h1 {
  font-size: 22px;
  font-weight: 700;
}

.creator-info .rate-badge {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 10px;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
}

/* --- Rules collapsible --- */
.rules-details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 16px;
  overflow: hidden;
}

.rules-details summary {
  padding: 12px 16px;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  user-select: none;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.rules-details summary::-webkit-details-marker {
  display: none;
}

.rules-details summary::before {
  content: "▶";
  font-size: 10px;
  transition: transform 0.2s;
  color: var(--text-muted);
}

.rules-details[open] summary::before {
  transform: rotate(90deg);
}

.rules-details summary:hover {
  background: var(--surface-hover);
}

.rules-body {
  padding: 0 16px 14px 16px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.8;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.rules-body b {
  color: var(--text);
}

.rules-body .rules-meta {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
  font-size: 12px;
  color: var(--text-muted);
}

/* --- Plan Card --- */
.plan-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 16px;
}

.plan-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.plan-head .plan-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.plan-head .plan-name {
  font-size: 12px;
  color: var(--accent-light);
  background: rgba(124, 92, 191, 0.15);
  padding: 3px 10px;
  border-radius: 999px;
  font-weight: 600;
}

.plan-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-bottom: 8px;
}

.plan-table th {
  text-align: left;
  padding: 6px 8px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 500;
  border-bottom: 1px solid var(--border);
}

.plan-table td {
  padding: 8px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}

.plan-table tr:last-child td {
  border-bottom: none;
}

.plan-table tr.current-tier td {
  background: rgba(124, 92, 191, 0.08);
  color: var(--text);
  font-weight: 600;
}

.plan-table .current-mark {
  color: var(--accent-light);
  font-size: 11px;
  font-weight: 500;
}

.plan-progress {
  font-size: 12px;
  color: var(--text-secondary);
  padding: 8px 0 4px 0;
}

.plan-progress b {
  color: var(--accent-light);
}

.plan-bonus {
  font-size: 11px;
  color: var(--text-muted);
  padding-top: 4px;
  border-top: 1px dashed var(--border);
  margin-top: 4px;
}

/* --- Payout Headline --- */
.payout-card {
  background: linear-gradient(135deg, var(--surface) 0%, var(--surface-hover) 100%);
  border-radius: 16px;
  padding: 20px 24px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
}

.payout-card.highlight {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent) inset, 0 4px 16px rgba(124, 92, 191, 0.2);
}

.payout-card .payout-label {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 4px;
  letter-spacing: 0.5px;
}

.payout-card .payout-amount {
  font-size: 36px;
  font-weight: 700;
  color: var(--accent-light);
  margin-bottom: 8px;
  line-height: 1.1;
}

.payout-card .payout-meta {
  font-size: 13px;
  color: var(--text-secondary);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

/* --- Stats Cards --- */
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 20px;
}

.stat-card {
  background: var(--surface);
  border-radius: 12px;
  padding: 12px 8px;
  text-align: center;
}

.stat-card .label {
  font-size: 11px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.stat-card .value {
  font-size: 18px;
  font-weight: 700;
}

.stat-card .value.accent {
  color: var(--accent-light);
}

/* --- Tabs --- */
.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.tab-btn {
  flex: 1;
  padding: 10px 12px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}

.tab-btn:hover {
  color: var(--text);
  background: var(--surface);
}

.tab-btn.active {
  color: var(--accent-light);
  border-bottom-color: var(--accent);
  font-weight: 600;
}

.tab-content {
  margin-bottom: 24px;
}

.tab-pane {
  display: none;
}

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

/* --- Show more / hidden extra --- */
.hidden-extra {
  display: none;
}

.expanded .hidden-extra {
  display: block;
}

.expanded .event-item.hidden-extra {
  display: flex;
}

.show-more-btn {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 10px;
  background: transparent;
  border: 1px dashed var(--border);
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s;
}

.show-more-btn:hover {
  background: var(--surface);
  color: var(--text);
  border-color: var(--accent);
  border-style: solid;
}

/* --- Settlement Cards --- */
.settlement-card {
  background: var(--surface);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 10px;
  border: 1px solid var(--border);
}

.settlement-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.settlement-period {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.settlement-amount {
  font-size: 24px;
  font-weight: 700;
  color: var(--accent-light);
  margin-bottom: 4px;
}

.settlement-meta {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-top: 2px;
}

.dispute-btn {
  margin-top: 12px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.dispute-btn:hover {
  background: var(--surface-hover);
  color: var(--text);
  border-color: var(--accent);
}

/* --- Status Pills --- */
.status-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.status-pending {
  background: rgba(255, 152, 0, 0.18);
  color: var(--bonus);
}

.status-confirmed {
  background: rgba(124, 92, 191, 0.22);
  color: var(--accent-light);
}

.status-paid {
  background: rgba(76, 175, 80, 0.2);
  color: var(--success);
}

.status-held {
  background: rgba(160, 160, 184, 0.15);
  color: var(--text-secondary);
}

/* --- Event List --- */
.event-list {
  list-style: none;
}

.event-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.event-item .event-date {
  color: var(--text-muted);
  font-size: 12px;
  min-width: 90px;
}

.event-item .event-type {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
}

.event-item .event-type.purchase {
  background: rgba(124, 92, 191, 0.2);
  color: var(--accent-light);
}

.event-item .event-type.letter {
  background: rgba(255, 140, 122, 0.18);
  color: #ffb59f;
}

.event-item .event-pack {
  flex: 1;
  color: var(--text);
}

.event-item .event-vcoins {
  color: var(--text-secondary);
  font-weight: 500;
}

.event-item .referral-badge {
  font-size: 11px;
  color: var(--bonus);
}

/* --- Footer --- */
.footer {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
}

.footer a {
  color: var(--accent-light);
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

/* --- Empty State --- */
.empty-state {
  text-align: center;
  padding: 40px 0;
  color: var(--text-muted);
}

/* --- Loading --- */
.loading {
  display: none;
  text-align: center;
  padding: 20px;
  color: var(--text-secondary);
}

.loading.visible {
  display: block;
}

.spinner {
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 8px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* inline spinner for in-progress notices (建立中 / 簽署中 / 上傳中 …) */
.mini-spinner {
  display: inline-block;
  width: 13px;
  height: 13px;
  border: 2px solid rgba(255, 255, 255, 0.22);
  border-top-color: var(--accent-light, #9b7fd4);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: -2px;
  margin-right: 7px;
}
.auth-notice.busy { color: var(--text-secondary); }

/* --- Responsive --- */
@media (max-width: 480px) {
  .stats-row {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }

  .stat-card .value {
    font-size: 16px;
  }

  .payout-card .payout-amount {
    font-size: 30px;
  }

  .code-input-group {
    flex-direction: column;
  }
}

/* ===== Creator self-service authoring + admin review ===== */
.auth-banner,
.authoring {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  margin: 16px 0;
}
.auth-banner-text {
  color: var(--text);
  font-size: 14px;
  margin-bottom: 12px;
  font-weight: 600;
}
.auth-guide {
  margin: 0 0 14px;
  padding-left: 20px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
}
.auth-guide li { margin-bottom: 4px; }
.auth-guide b { color: var(--text); }
.auth-hint {
  color: var(--text-muted);
  font-size: 12px;
  margin-top: 10px;
}
.auth-pw-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}
.auth-pw-form input {
  flex: 1;
  min-width: 140px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: 10px 12px;
  font-size: 14px;
}
.auth-switch-row {
  margin: 2px 0 12px;
}
.auth-switch {
  background: none;
  border: none;
  color: var(--accent, #7C5CBF);
  font-size: 13px;
  padding: 2px 0;
  cursor: pointer;
  text-decoration: underline;
}
.auth-switch:hover { opacity: 0.8; }
.auth-back {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 13px;
  padding: 0 0 8px;
  cursor: pointer;
}
.auth-back:hover { color: var(--text); }
.auth-alt {
  font-size: 12px;
  color: var(--text-muted);
  margin: 4px 0 6px;
}
.auth-login-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.auth-btn {
  padding: 9px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-hover);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
}
.auth-btn:hover { background: var(--accent); }
.auth-btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.auth-btn.primary:hover { background: var(--accent-light); }
.auth-btn.ghost { background: transparent; }
.auth-btn.danger { background: #c0392b; border-color: #c0392b; color: #fff; }
.auth-btn.small { padding: 6px 10px; font-size: 13px; }
.auth-btn.wide { width: 100%; margin-top: 12px; }
.auth-notice { margin-top: 10px; font-size: 13px; padding: 8px 10px; border-radius: 6px; }
.auth-notice.ok { background: rgba(76, 175, 80, 0.15); color: #8fd694; }
.auth-notice.err { background: rgba(239, 83, 80, 0.15); color: #ef9a9a; }
.muted { color: var(--text-muted); font-size: 12px; font-weight: 400; }

.authoring-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  margin-bottom: 12px;
}
.sub-list { background: var(--bg); border-radius: 8px; padding: 10px; margin-bottom: 12px; }
.sub-list-head { font-size: 12px; color: var(--text-secondary); margin-bottom: 6px; }
.sub-row { display: flex; gap: 8px; font-size: 13px; padding: 3px 0; align-items: center; flex-wrap: wrap; }
.sub-reason { color: #ef9a9a; flex-basis: 100%; }
.sub-type { background: var(--surface-hover); border-radius: 4px; padding: 1px 8px; font-size: 12px; }
.sub-target { color: var(--text-muted); flex: 1; }
.sub-status.ok { color: var(--success); }
.sub-status.err { color: #ef9a9a; }
.sub-status.pending { color: var(--bonus); }

.pack-edit {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 8px;
  overflow: hidden;
}
.pack-head {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  background: var(--surface-hover);
  border: none;
  color: var(--text);
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}
.pack-head:hover { background: var(--surface); }
.main-badge {
  margin-left: 8px; padding: 1px 7px; border-radius: 9999px; font-size: 11px;
  font-weight: 600; background: rgba(124, 92, 191, 0.18); color: var(--accent-light);
  vertical-align: middle; white-space: nowrap;
}
.section-head-actions { display: flex; gap: 8px; align-items: center; flex: 0 0 auto; }

/* Reorder modal */
.modal-overlay {
  position: fixed; inset: 0; z-index: 100; background: rgba(0, 0, 0, 0.55);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 20px; width: 100%; max-width: 420px; max-height: 80vh; overflow-y: auto;
}
.modal h3 { margin: 0 0 6px; }
.modal .order-rows { margin: 14px 0; display: flex; flex-direction: column; gap: 8px; }
.modal .order-row { display: flex; align-items: center; gap: 12px; }
.modal .order-pos { width: 56px; flex: 0 0 auto; text-align: center; }
.modal .order-name { color: var(--text); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.modal .order-err { color: #ff6b7a; font-size: 13px; margin: 4px 0 0; }
.modal .modal-actions { margin-top: 16px; justify-content: flex-end; }
.pack-head-meta { color: var(--text-muted); font-size: 12px; font-weight: 400; white-space: nowrap; }
.pack-fields {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px 14px;
}
/* The class rule above beats the UA [hidden] rule, so collapse needs this. */
.pack-fields[hidden] { display: none; }
/* Caret rotates open when the pack is expanded (sibling of .pack-fields). */
.pack-head .caret { transition: transform 0.15s ease; display: inline-block; }
.pack-edit:has(.pack-fields:not([hidden])) .pack-head .caret { transform: rotate(180deg); }
.color-row { display: flex; gap: 6px; align-items: center; }
.color-row input[type="color"] {
  width: 38px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  cursor: pointer;
}
.color-row input[type="text"] { flex: 1; }
.pack-edit-title { font-weight: 700; margin-bottom: 4px; }
.newpack-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pack-edit label,
.newpack label,
.media-form label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: var(--text-secondary);
}
.pack-edit input[type="text"],
.pack-edit input:not([type]),
.pack-edit textarea,
.pack-edit select,
.newpack input:not([type]),
.newpack textarea,
.newpack select,
.media-form input:not([type]) {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  padding: 8px 10px;
  font-size: 14px;
  font-family: inherit;
}
.row2 { display: flex; gap: 12px; flex-wrap: wrap; }
.row2 label { flex: 1; min-width: 120px; }
.chk { flex-direction: row !important; align-items: center; gap: 6px; }
.pack-edit-actions { display: flex; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.media-form { border-top: 1px dashed var(--border); margin-top: 10px; padding-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.media-note { font-size: 12px; color: var(--bonus); }
.newpack { background: var(--bg); border: 1px solid var(--accent); border-radius: 10px; padding: 14px; margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }

/* Admin */
.admin-panel { background: var(--surface); border: 1px solid var(--accent); border-radius: 12px; padding: 16px; margin-bottom: 16px; }
.admin-head { display: flex; justify-content: space-between; align-items: center; font-weight: 700; margin-bottom: 12px; }
.admin-group { margin-bottom: 16px; }
.admin-group-head { font-size: 13px; padding: 6px 0; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.admin-row { background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 10px; margin-bottom: 8px; }
.admin-row-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.admin-row-head .muted { flex: 0 0 auto; }
.admin-row-head .seq { font-weight: 700; color: var(--accent-light); }
.row-gist { flex: 1 1 auto; font-size: 13px; }
.row-time { font-size: 11px; }
.admin-detail { margin-top: 10px; }
.audio-change { font-size: 13px; margin: 6px 0; display: flex; flex-direction: column; gap: 2px; }
.detail-head { font-weight: 700; margin-bottom: 8px; }
.media-previews-head { font-size: 12px; margin-bottom: 2px; }
.media-previews .media-item { display: flex; flex-direction: column; gap: 3px; }
.diff-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-bottom: 8px; }
.diff-table th, .diff-table td { border: 1px solid var(--border); padding: 4px 8px; text-align: left; vertical-align: top; }
.diff-table .from { color: #ef9a9a; }
.diff-table .to { color: #8fd694; }
.payload-summary { font-size: 13px; display: flex; flex-direction: column; gap: 3px; margin-bottom: 8px; }
.media-previews { display: flex; flex-wrap: wrap; gap: 12px; margin: 8px 0; }
.media-item { display: flex; flex-direction: column; gap: 4px; }
.media-item audio { width: 220px; }
.img-preview { max-width: 160px; max-height: 120px; border-radius: 6px; border: 1px solid var(--border); }
.admin-actions { display: flex; gap: 8px; margin-top: 10px; }
.admin-result { font-size: 13px; margin-top: 6px; color: var(--text-secondary); }

/* Creator management console (dedicated page) */
.console { max-width: 720px; margin: 0 auto; padding: 0 0 32px; }
.console-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  font-weight: 700;
  border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
}
.console-head-actions { display: flex; gap: 8px; }
.view-tabs {
  display: inline-flex;
  gap: 4px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 3px;
}
.view-tab {
  background: none;
  border: none;
  color: var(--text-secondary);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 7px;
  cursor: pointer;
}
.view-tab.active { background: var(--accent); color: #fff; }
.view-tab:not(.active):hover { color: var(--text); }
.view-switch-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 16px 0;
}
.view-switch-right { display: flex; gap: 6px; flex-shrink: 0; }
.console-intro {
  background: linear-gradient(135deg, rgba(124, 92, 191, 0.16), rgba(212, 157, 255, 0.10));
  border: 1px solid var(--accent);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 14px;
}
.console-intro-head { font-weight: 700; margin-bottom: 8px; }
.console-intro-list {
  margin: 0 0 10px;
  padding-left: 18px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
}
.console-intro-list b { color: var(--text); }
.console-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}
.console-section h3 { font-size: 15px; margin-bottom: 12px; font-weight: 700; }
.console-section > form { display: flex; flex-direction: column; gap: 8px; }
.console-section label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: var(--text-secondary);
}
.console-section input:not([type="color"]):not([type="file"]):not([type="checkbox"]),
.console-section textarea,
.console-section select {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  padding: 8px 10px;
  font-size: 14px;
  font-family: inherit;
}
/* 🎁 gift section */
.field-label { display: block; font-size: 12px; color: var(--text-secondary); margin: 10px 0 4px; }
.gift-input { width: 100%; box-sizing: border-box; }
.gift-uid-row { display: flex; gap: 8px; align-items: stretch; }
.gift-uid-row .gift-input { flex: 1; }
.gift-uid-row [data-gift-verify] { flex: 0 0 auto; white-space: nowrap; }
.gift-result { margin: 10px 0; padding: 8px 10px; border-radius: 6px; font-size: 13px; line-height: 1.5; }
.gift-result.ok { background: rgba(124, 92, 191, 0.12); color: var(--text); border: 1px solid var(--border); }
.gift-result.error { background: rgba(255, 140, 122, 0.12); color: #FF8C7A; border: 1px solid rgba(255, 140, 122, 0.4); }
[data-gift-section] [data-gift-send] { margin-top: 4px; }

.profile-avatar { display: flex; gap: 12px; align-items: center; }
.profile-avatar-img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border);
  flex: 0 0 auto;
}
.profile-avatar-img.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--text-muted);
  background: var(--bg);
}
.avatar-pick { flex: 1; }
.pack-avatar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 4px; }
.pack-avatar-img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border);
  flex: 0 0 auto;
}
.pack-avatar-img.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--text-muted);
  background: var(--bg);
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.section-head h3 { margin-bottom: 0; }
.section-toggle {
  width: 100%;
  background: none;
  border: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  padding: 0;
}
.section-toggle .caret {
  display: inline-block;
  color: var(--text-muted);
  transition: transform 0.15s ease;
}
.console-section:has(.profile-fields:not([hidden])) .section-toggle .caret {
  transform: rotate(180deg);
}
.profile-fields[hidden] { display: none; }
.two-btn { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.save-hint { margin-top: 4px; font-size: 11px; }
.char-hint { display: block; margin-top: 3px; font-size: 11px; color: var(--text-muted); }
.char-hint .cc { font-variant-numeric: tabular-nums; }
.char-hint.over { color: var(--bonus); }
.char-hint.over .cc { font-weight: 600; }
.clip-name-col { display: flex; flex-direction: column; gap: 3px; flex: 1 1 200px; min-width: 150px; }
.clip-name-col .clip-name { width: 100%; box-sizing: border-box; }
.clip-name-col .char-hint { margin-top: 0; }
.draft-badge {
  font-size: 11px;
  font-weight: 400;
  color: var(--bonus);
  background: rgba(255, 152, 0, 0.14);
  border-radius: 4px;
  padding: 1px 6px;
  margin-left: 6px;
}
.media-clips { display: flex; flex-direction: column; gap: 6px; margin-bottom: 6px; }
.clips-head { font-size: 12px; color: var(--text-secondary); }
.clip-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.clip-label { font-size: 13px; min-width: 96px; }
.clip-row audio { height: 32px; max-width: 240px; }
.clip-preview {
  flex-basis: 100%;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  font-size: 12px;
  color: var(--text-secondary);
  padding: 2px 0 2px 2px;
}
.clip-preview .main-pick { display: inline-flex; align-items: center; gap: 4px; padding-top: 4px; }
.preview-seg { display: flex; flex-direction: column; gap: 6px; }
.seg-line { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.seg-lbl { min-width: 28px; color: var(--text-muted); }
.seg-line .preview-slider { width: 140px; }
.preview-secnum {
  width: 72px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.preview-unit { color: var(--text-muted); }
.preview-save-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
  font-size: 12px;
}
.style-rows { display: flex; flex-direction: column; gap: 6px; }
.style-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.style-preview { height: 30px; max-width: 200px; }
.style-row-name {
  flex: 1;
  font-size: 12px;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.style-pick {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  padding: 6px 8px;
  font-size: 13px;
}

/* ===== 早安信 console (letters.js) ===== */

/* Block 1 — master toggle row */
.ml-master-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 10px;
}
.ml-master-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.ml-master-info {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ml-master-label {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}
.ml-master-state {
  font-size: 12px;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 999px;
}
.ml-master-state.on {
  background: rgba(76, 175, 80, 0.18);
  color: #8fd694;
}
.ml-master-state.off {
  background: rgba(160, 160, 184, 0.15);
  color: var(--text-secondary);
}
.ml-master-hint {
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-muted);
}
/* CSS-only toggle switch */
.ml-switch-wrap {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  flex-shrink: 0;
}
.ml-switch-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.ml-switch-track {
  display: inline-block;
  position: relative;
  width: 44px;
  height: 24px;
  background: var(--border);
  border-radius: 12px;
  transition: background 0.2s;
}
.ml-switch-input:checked + .ml-switch-track {
  background: var(--accent);
}
.ml-switch-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: left 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.ml-switch-input:checked + .ml-switch-track .ml-switch-thumb {
  left: 23px;
}

/* Block 2 — collapsible settings */
.ml-settings-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 10px;
  overflow: hidden;
}
.ml-settings-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: none;
  border: none;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
}
.ml-settings-toggle:hover {
  background: var(--surface-hover);
}
.ml-caret {
  font-size: 12px;
  color: var(--text-muted);
  flex-shrink: 0;
}
.ml-settings-content {
  position: relative;
  padding: 0 16px 14px 16px;
  border-top: 1px solid var(--border);
}
.ml-settings-content[hidden] {
  display: none;
}
/* 早安信怎麼運作 help block (reuses .ml-settings-toggle / .ml-caret) */
.ml-help-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 10px;
  overflow: hidden;
}
.ml-help-content {
  padding: 0 16px 12px 16px;
  border-top: 1px solid var(--border);
}
.ml-help-content[hidden] {
  display: none;
}
.ml-help-list {
  margin: 10px 0 0 0;
  padding-left: 18px;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.65;
}
.ml-help-list li {
  margin-bottom: 7px;
}
.ml-help-list b {
  color: var(--text);
  font-weight: 600;
}
/* Semi-transparent overlay when disabled */
.ml-settings-overlay {
  position: absolute;
  inset: 0;
  background: rgba(180, 180, 210, 0.06);
  border-radius: 0 0 12px 12px;
  pointer-events: auto;
  z-index: 1;
}
.ml-settings-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
  margin-bottom: 4px;
}
.ml-settings-form label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: var(--text-secondary);
}
.ml-settings-form input[type="number"],
.ml-settings-form input[type="email"] {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  padding: 8px 10px;
  font-size: 14px;
  font-family: inherit;
  width: 120px;
}
.ml-settings-form input[type="email"] {
  width: 100%;
  max-width: 320px;
}
.ml-settings-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}
/* Quota meter */
.ml-quota {
  margin: 10px 0 14px;
}
.ml-quota-label {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 5px;
}
.ml-quota-track {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}
.ml-quota-bar {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
  transition: width 0.3s;
}
.ml-quota-bar.warn { background: var(--bonus); }
.ml-quota-bar.full { background: #ff6b7a; }
/* Inbox title */
.ml-inbox-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 10px;
}
/* Letter cards */
.ml-letter {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 12px;
  transition: opacity 0.3s;
}
.ml-letter-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.ml-fan {
  font-weight: 600;
  color: var(--text);
  font-size: 13px;
}
.ml-count {
  font-size: 12px;
  color: var(--bonus);
  white-space: nowrap;
}
.ml-count.urgent { color: #ff6b7a; }
.ml-price {
  margin-bottom: 6px;
}
.ml-text {
  margin: 8px 0 12px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}
.ml-reply-text {
  width: 100%;
  min-height: 64px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  padding: 8px 10px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
}
.ml-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.ml-notice { margin-top: 6px; display: inline-block; }

/* ── Inbox v2: date switcher · summary · collapsible cards ───────────── */
.ml-date-switch {
  display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 10px;
  -webkit-overflow-scrolling: touch;
}
.ml-date-chip {
  position: relative; flex: 0 0 auto; cursor: pointer;
  padding: 7px 14px; border-radius: 999px;
  background: var(--surface); color: var(--text-secondary);
  border: 1px solid var(--border); font-size: 13px; white-space: nowrap;
}
.ml-date-chip.selected {
  background: linear-gradient(135deg, #FF8C7A, #D49DFF);
  color: #1a0e1f; border-color: transparent; font-weight: 600;
}
.ml-date-badge {
  display: inline-block; min-width: 16px; height: 16px; line-height: 16px;
  margin-left: 6px; padding: 0 4px; border-radius: 999px;
  background: #ff5a4d; color: #fff; font-size: 11px; font-weight: 700; text-align: center;
}
.ml-date-chip.selected .ml-date-badge { background: rgba(26,14,31,.32); color: #1a0e1f; }

.ml-summary {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 10px 14px; margin-bottom: 10px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border);
}
.ml-summary-date { font-weight: 600; color: var(--text); }
.ml-summary-pending { color: #ffb27a; font-size: 14px; }
.ml-summary-pending b { color: #ff8c7a; font-size: 16px; }
.ml-summary-clear { color: #7ed0a0; font-size: 14px; }
.ml-summary-total { margin-left: auto; font-size: 12px; }

.ml-sec-label {
  font-size: 12px; font-weight: 700; letter-spacing: .04em;
  margin: 14px 2px 8px; text-transform: none;
}
.ml-sec-pending { color: #ff8c7a; }
.ml-sec-done { color: var(--text-muted); }

/* card */
.ml-letter {
  border-radius: 12px; margin-bottom: 8px; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border);
}
.ml-pending { border-left: 3px solid #ff8c7a; }
.ml-replied { opacity: .72; }
.ml-refunded { opacity: .55; }

.ml-card-head {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 11px 13px; background: none; border: 0; cursor: pointer;
  color: var(--text); text-align: left; font-size: 14px;
}
.ml-status-dot {
  flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%;
  background: var(--text-muted);
}
.ml-pending .ml-status-dot { background: #ff8c7a; box-shadow: 0 0 6px rgba(255,140,122,.6); }
.ml-replied .ml-status-dot { background: #7ed0a0; }
.ml-card-head .ml-fan { font-weight: 600; color: var(--text); flex: 0 0 auto; }
.ml-card-head .ml-uid { flex: 0 0 auto; font-size: 11px; color: var(--text-muted); }
.ml-status-chip {
  flex: 0 0 auto; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px;
}
.ml-status-chip.pending { background: rgba(255,140,122,.16); color: #ff8c7a; }
.ml-status-chip.done { background: rgba(126,208,160,.16); color: #7ed0a0; }
.ml-status-chip.refunded { background: rgba(160,160,184,.15); color: var(--text-secondary); }
.ml-card-head .ml-snip {
  flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 13px;
}
.ml-card-head .ml-count { flex: 0 0 auto; }
.ml-card-head .ml-caret { flex: 0 0 auto; color: var(--text-muted); font-size: 12px; }

.ml-card-body { padding: 0 13px 13px; }
.ml-meta { font-size: 12px; margin-bottom: 6px; }
.ml-card-body .ml-text {
  font-size: 15px; color: var(--text); line-height: 1.55; margin-bottom: 10px;
}

/* history */
.ml-history {
  border-top: 1px dashed var(--border); border-bottom: 1px dashed var(--border);
  padding: 8px 0; margin: 4px 0 10px;
}
.ml-history-title { font-size: 12px; color: var(--text-secondary); margin-bottom: 6px; }
.ml-hist-row {
  display: flex; gap: 8px; font-size: 12.5px; line-height: 1.5; padding: 2px 0;
}
.ml-hist-date { flex: 0 0 auto; color: var(--text-muted); min-width: 36px; }
.ml-hist-q { flex: 1 1 auto; color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ml-hist-a { flex: 0 0 auto; color: var(--accent-light); max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* shown reply (replied cards) */
.ml-reply-shown {
  background: rgba(124,92,191,.08); border: 1px solid var(--border);
  border-radius: 10px; padding: 10px 12px;
}
.ml-reply-label { font-size: 12px; color: var(--text-secondary); margin-bottom: 5px; }
.ml-reply-body { font-size: 14px; color: var(--text); line-height: 1.55; }

/* ── Public self-onboarding (我要上架) ───────────────────────────────── */
.onboard-cta {
  margin-top: 18px;
  font-size: 13px;
  color: var(--muted, #9a93ad);
  text-align: center;
}
.onboard-cta a {
  color: var(--accent, #d49dff);
  text-decoration: none;
  font-weight: 600;
}
.onboard-cta a:hover { text-decoration: underline; }

/* 建立創作者檔案 / 一頁註冊 — clean vertical stack (labels block, inputs full-width) */
.onboard-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 10px;
  text-align: left;
}
.onboard-form .field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 13px;
  color: var(--muted, #9a93ad);
}
.onboard-form .field input {
  width: 100%;
  box-sizing: border-box;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: 10px 12px;
  font-size: 14px;
}
.onboard-form .slug-hint {
  font-size: 12px;
  margin: -4px 0 0;
}
/* 英文代號 / 推薦碼 set-once box in 基本資料 */
.handle-box {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  margin: 0 0 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.handle-box.locked {
  background: rgba(124, 92, 191, 0.08);
}
.handle-box .handle-title {
  font-size: 13px;
  font-weight: 600;
}
.handle-box input {
  background: var(--surface, rgba(255, 255, 255, 0.04));
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: 10px 12px;
  font-size: 14px;
}
.handle-box .handle-hint {
  font-size: 12px;
}
.handle-box .handle-code {
  font-size: 15px;
  letter-spacing: 0.02em;
}
.handle-box [data-handle-save] {
  align-self: flex-start;
}
.onboard-form .onboard-sep {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 2px 0;
}
.onboard-form .onboard-submit {
  margin-top: 8px;
  width: 100%;
  padding: 12px;
  font-size: 15px;
  font-weight: 700;
  border: 0;
  background: var(--dawn-gradient, linear-gradient(135deg, #FF8C7A 0%, #FFB78A 38%, #D49DFF 100%));
  color: #1A0E1F;
  box-shadow: 0 6px 20px rgba(212, 157, 255, 0.22);
}
.onboard-form .onboard-submit:hover {
  filter: brightness(1.05);
}

/* Standalone 我要上架 page (join.html) — Dawn Studio 門面 */
.join-page {
  position: relative;
  max-width: 468px;
  margin: 5vh auto 0;
  padding: 0 16px 56px;
  text-align: left;
}
/* soft dawn glow in the top-left (depth, not decoration) */
.join-page::before {
  content: "";
  position: absolute;
  top: -60px;
  left: -40px;
  width: 420px;
  height: 300px;
  background: radial-gradient(
    ellipse at center,
    rgba(212, 157, 255, 0.13) 0%,
    rgba(255, 140, 122, 0.07) 42%,
    transparent 70%
  );
  pointer-events: none;
  z-index: 0;
}
/* top-left brand lockup (icon + wordmark) */
.join-topbar {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 22px;
}
.join-mark {
  width: 40px;
  height: 40px;
  filter: drop-shadow(0 4px 12px rgba(212, 157, 255, 0.3));
}
.join-lang {
  margin-left: auto;
}
/* zh/EN/日 language switcher */
.lang-switch {
  display: inline-flex;
  gap: 2px;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.lang-switch .lang-opt {
  background: transparent;
  border: 0;
  color: var(--text-secondary);
  font-size: 12px;
  padding: 5px 9px;
  cursor: pointer;
}
.lang-switch .lang-opt.active {
  background: var(--dawn-gradient);
  color: #1a1320;
  font-weight: 700;
}
.auth-help {
  margin-top: 12px;
  font-size: 12px;
  line-height: 1.5;
}
.contract-lang-note {
  font-size: 12px;
  line-height: 1.5;
  margin: 8px 0;
}
.join-wordmark {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: var(--dawn-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.join-hero {
  position: relative;
  z-index: 1;
  margin-bottom: 22px;
}
.join-headline {
  font-size: 30px;
  line-height: 1.28;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}
.join-sub {
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-secondary);
  margin: 0;
  max-width: 30em;
}
.join-card {
  position: relative;
  z-index: 1;
  margin-top: 22px;
  padding: 22px;
  background: var(--surface, #1c1730);
  border: 1px solid var(--border);
  border-radius: 14px;
  text-align: left;
}
.join-card .auth-banner-text {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 14px;
}
.join-done-lead { font-size: 14px; margin: 4px 0 10px; }
.join-code-box {
  font-family: var(--mono, ui-monospace, Menlo, monospace);
  font-size: 13px;
  word-break: break-all;
  background: var(--bg, #14101f);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--accent, #d49dff);
}
.join-done-hint { font-size: 12px; margin: 10px 0 16px; }

/* 上線三步 checklist (creator console new-pack wizard) */
.golive-checklist {
  margin: 12px 0;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}
.golive-title { font-weight: 700; margin-bottom: 8px; }
/* pre-build 一次性簽約 gate */
.contract-gate {
  margin-top: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}
.contract-gate-sub { font-size: 13px; margin: 2px 0 10px; }

/* 身分驗證 banner(帳號層級,一次性,非每包步驟)*/
.id-banner {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 12px 0;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-secondary);
}
.id-banner b { color: var(--text); }
.mini-spinner-static { font-size: 16px; line-height: 1.3; }

/* 草稿語音包收合後的「繼續編輯」chip(+ ✕ 刪除)*/
.draft-chip-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
  margin-top: 10px;
}
.draft-chip {
  flex: 1;
  text-align: left;
  padding: 12px 14px;
  border: 1px dashed var(--accent, #7C5CBF);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
}
.draft-chip:hover { background: var(--surface-hover); }
.draft-chip b { color: var(--accent-light, #9b7fd4); }
.draft-dismiss {
  flex: 0 0 auto;
  width: 42px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
}
.draft-dismiss:hover { color: var(--error, #FF6B7A); border-color: var(--error, #FF6B7A); }

/* 收款與稅務資料 表單 */
.payout-form { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.payout-form > label,
.payout-form .row2 > label {
  display: flex; flex-direction: column; gap: 4px;
  font-size: 13px; color: var(--text-secondary);
}
.payout-form input,
.payout-form select {
  width: 100%; box-sizing: border-box;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; color: var(--text); padding: 9px 11px; font-size: 14px;
}
.payout-form .row2 { display: flex; gap: 10px; }
.payout-form .row2 > label { flex: 1; }
/* admin 解密檢視 */
.payout-card-admin {
  margin: 8px 0; padding: 10px;
  border: 1px solid var(--border); border-radius: 8px;
  background: var(--bg, #14101f);
}
.payout-table { width: 100%; border-collapse: collapse; margin-top: 6px; font-size: 13px; }
.payout-table td { padding: 4px 6px; border-bottom: 1px solid var(--border); }
.payout-table td:first-child { color: var(--text-muted); width: 38%; }
.contract-gate .golive-agree { display: block; margin: 10px 0; font-size: 13px; }
.contract-gate .golive-agree input { margin-right: 6px; }
.golive-step { padding: 6px 0; border-top: 1px solid var(--border); }
.golive-step:first-of-type { border-top: 0; }
.golive-step-h { font-weight: 600; }
.golive-step-b { font-size: 13px; color: var(--muted, #9a93ad); margin-top: 3px; }
.golive-contract summary { cursor: pointer; color: var(--accent, #d49dff); margin-top: 4px; }
.golive-terms {
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 240px;
  overflow-y: auto;
  background: var(--bg, #14101f);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px;
  font-size: 12px;
  line-height: 1.6;
  margin: 8px 0;
}
.golive-agree { display: block; margin: 8px 0; font-size: 13px; }
.golive-agree input { margin-right: 6px; }

/* Admin: 上線三關 status panel in submission detail */
.golive-admin {
  margin: 10px 0;
  padding: 10px;
  border: 1px dashed var(--border);
  border-radius: 8px;
}
.golive-admin-head { font-weight: 600; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.golive-admin-meta { font-size: 12px; margin-top: 6px; }
.golive-admin-meta a { color: var(--accent, #d49dff); }
.golive-admin-hint { font-size: 12px; margin-top: 6px; }
.golive-admin-actions { margin-top: 8px; }
