: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); }
/* 上架顯示:語音包卡最上層的明顯開關(取代原本藏在展開區的小勾選) */
.pack-publish-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 12px;
  margin-bottom: 12px;
  background: rgba(124, 92, 191, 0.12);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.publish-toggle {
  display: inline-flex;
  flex-direction: row !important; /* 壓過 .console-section label 的 column,讓框與字同列 */
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  flex: 0 0 auto;
}
.publish-toggle input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
  margin: 0;
}
.publish-note { font-size: 12px; color: var(--text-muted); flex: 1 1 200px; min-width: 160px; }
/* 存檔提醒:自成一行,和上面的欄位對齊 */
.publish-savehint { flex: 1 1 100%; font-size: 12px; color: var(--accent-light); }
/* 未上架(未勾選)→ 琥珀色警示,強調此鬧鐘語音會被隱藏 */
.pack-publish-bar.off { background: rgba(255, 140, 122, 0.12); }
.pack-publish-bar.off .publish-note { color: #E9A08A; }
.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;
  padding: 10px 12px; border-radius: 10px;
  background: var(--bg); border: 1px solid var(--border);
  cursor: grab; user-select: none; -webkit-user-select: none;
  touch-action: none; /* pointer-drag 需要,否則行動裝置會變成捲動 */
}
.modal .order-row { position: relative; will-change: transform; }
.modal .order-row.dragging {
  cursor: grabbing; border-color: var(--accent);
  background: var(--surface-hover);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
  z-index: 2;
}
.modal .drag-handle { color: var(--text-muted); font-size: 15px; flex: none; letter-spacing: 1px; }
.modal .order-num {
  width: 22px; height: 22px; flex: none; border-radius: 50%;
  background: var(--surface-hover); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; color: var(--text-secondary); font-variant-numeric: tabular-nums;
}
.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);
}
/* Styled button in place of the raw native file input (whose "選擇檔案 / 未選擇任何
   檔案" chrome is browser-locale, not app-i18n). The label text is translated; the
   chosen image shows in the adjacent preview, so no filename text is needed. */
.avatar-pick {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  background: var(--surface-hover);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 13px;
  color: var(--text);
  white-space: nowrap;
  flex: 0 0 auto;
}
.avatar-pick:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.avatar-pick input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  opacity: 0;
}
.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,
.console-section:has(.promo-fields:not([hidden])) .section-toggle .caret {
  transform: rotate(180deg);
}
.profile-fields[hidden], .promo-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; }
.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-manager { display: flex; flex-direction: column; gap: 10px; }
.clip-list { display: flex; flex-direction: column; gap: 8px; }
/* Each clip is a self-contained card: name input on top, one aligned control
   line (choose-file button · filename · player) with 刪除 pinned right, and the
   store-preview block (edit flow) stacked full-width below. */
.clip-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}
.clip-label { font-size: 13px; min-width: 96px; }
.clip-file-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
/* Styled label stands in for the raw native file input (which is hidden). */
.clip-replace {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  background: var(--surface-hover);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 13px;
  color: var(--text);
  white-space: nowrap;
}
.clip-replace:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.clip-replace input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  opacity: 0;
}
.clip-file {
  font-size: 12px;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.clip-new-tag { font-size: 12px; }
.clip-del { margin-left: auto; }
.clip-row audio { height: 32px; max-width: 220px; }
.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); }
/* mm:ss 文字輸入(如 0:12),置中、等寬數字 */
.preview-timeinput {
  width: 72px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}
.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);
}
/* 勾選框要和文字同一行(蓋掉上面 label 的 column 預設) */
.ml-settings-form .ml-format-check {
  flex-direction: row;
  align-items: center;
  gap: 8px;
}
.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-chip.review {
  border-style: solid;
  border-color: var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}
.draft-chip.review .caret { margin-left: auto; color: var(--text-muted); transition: transform 0.15s ease; }
.draft-chip-row.review:has(+ .review-detail:not([hidden])) .caret { transform: rotate(180deg); }
.review-detail {
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 10px 10px;
  padding: 10px 14px;
  margin: -6px 0 0;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.review-detail-row { display: flex; gap: 10px; font-size: 13px; }
.review-detail-row .rd-k { color: var(--text-muted); flex: 0 0 84px; }
.review-detail-row .rd-v { color: var(--text); flex: 1; word-break: break-word; }
/* 審核中 badge:藍色系,和草稿(琥珀)一眼分辨 */
.draft-badge.review { color: #7fb0ff; background: rgba(90, 150, 255, 0.16); }
/* 已退回 badge:紅色系;退回原因小字 */
.draft-badge.rejected { color: #ff9a9a; background: rgba(255, 90, 90, 0.16); }
.reject-hint { color: #ff9a9a; margin-top: 4px; }
.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; }

/* ── 早安信圖文指引 modal(iframe 載 deck)────────────────────────────── */
.ml-guide-cta { margin: 10px 0 2px; }
.ml-guide-modal { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; }
.ml-guide-modal[hidden] { display: none; }
.ml-guide-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.62); }
.ml-guide-dialog {
  position: relative; width: min(940px, 94vw); height: min(88vh, 940px);
  background: #14101F; border: 1px solid var(--border); border-radius: 14px;
  overflow: hidden; box-shadow: 0 30px 90px -20px rgba(0, 0, 0, 0.75);
}
.ml-guide-frame { width: 100%; height: 100%; border: 0; display: block; background: #14101F; }
.ml-guide-x {
  position: absolute; top: 8px; right: 10px; z-index: 2; width: 34px; height: 34px;
  border-radius: 9999px; border: 0; background: rgba(20, 16, 31, 0.7); color: #F5F2EF;
  font-size: 15px; line-height: 1; cursor: pointer;
}
.ml-guide-x:hover { background: rgba(20, 16, 31, 0.95); }

/* ══ App live preview (authoring console) — Warm Dawn tokens mirror
   lib/features/store/warm_dawn.dart ══ */
:root {
  --apv-night-0: #3A2247; --apv-night-1: #2C1A3B;
  --apv-night-2: #231431; --apv-night-3: #1B0F22;
  --apv-coral: #FF8C7A; --apv-apricot: #FFB78A; --apv-lilac: #D49DFF;
  --apv-glow: #FFD79A;
  --apv-ink: #FFF5EC; --apv-body-c: #EBD6CC; --apv-muted: #C4A9B4;
  /* VwakeTheme (lib/core/theme.dart) — the purchase sheet's plum chrome */
  --apv-plum-surface: #241830; --apv-plum-elev: #342247; --apv-text-sec: #B7A7BC;
}

.apv-fab, .apv-panel, .apv-backdrop { display: none; }
body.apv-active .apv-fab { display: block; }

.apv-fab {
  position: fixed; right: 18px; bottom: 18px; z-index: 60;
  border: none; border-radius: 999px; padding: 12px 20px; cursor: pointer;
  font-family: inherit; font-size: 14px; font-weight: 600; color: #1A0E1F;
  background: var(--dawn-gradient);
  box-shadow: 0 8px 24px rgba(255, 140, 122, 0.35);
}
.apv-backdrop { position: fixed; inset: 0; z-index: 61; background: rgba(10, 8, 20, 0.6); }
body.apv-open .apv-backdrop { display: block; }
body.apv-open .apv-fab { display: none; }

.apv-panel {
  position: fixed; z-index: 62; width: 344px; max-height: calc(100vh - 24px);
  overflow-y: auto; background: var(--surface); border: 1px solid var(--accent);
  box-shadow: 0 0 0 1px rgba(124, 92, 191, 0.2), 0 16px 48px rgba(0, 0, 0, 0.5);
  border-radius: 14px; padding: 14px;
  left: 50%; transform: translateX(-50%); bottom: 12px;
}
body.apv-open .apv-panel { display: block; }

@media (min-width: 1460px) {
  body.apv-active .apv-fab, .apv-backdrop { display: none !important; }
  body.apv-active .apv-panel {
    display: block; left: auto; transform: none;
    right: 24px; top: 24px; bottom: auto;
  }
  .apv-panel .apv-close { display: none; }
}

.apv-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 10px; }
.apv-ttl { font-size: 14px; font-weight: 700; }
.apv-sub { font-size: 11px; color: var(--text-muted); flex: 1; }
.apv-close {
  border: none; background: none; color: var(--text-muted);
  font-size: 14px; cursor: pointer; padding: 2px 6px;
}
.apv-tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.apv-tabs button {
  flex: 1; border: 1px solid var(--border); background: var(--bg);
  color: var(--text-secondary); border-radius: 8px; padding: 7px 4px;
  font-size: 12px; cursor: pointer; font-family: inherit;
}
.apv-tabs button.active { border-color: var(--accent); color: var(--text); background: var(--surface-hover); }

.apv-empty { font-size: 13px; color: var(--text-muted); padding: 28px 12px; text-align: center; line-height: 1.7; }

/* phone frame — 312×612 含 6px 邊框,內容區剛好 300×600(= 375pt × 0.8,
   scale 才不會被邊框吃掉 12px 而右裁) */
.apv-phone {
  width: 312px; height: 612px; margin: 0 auto; border-radius: 36px;
  border: 6px solid #0d0d18; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  overflow: hidden; position: relative;
  background: linear-gradient(180deg, var(--apv-night-0) 0%, var(--apv-night-1) 26%, var(--apv-night-2) 56%, var(--apv-night-3) 100%);
}
.apv-sun {
  position: absolute; top: -84px; right: -48px; width: 220px; height: 220px;
  border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(255, 232, 196, 0.8) 0%, rgba(255, 201, 150, 0.5) 36%, rgba(255, 160, 122, 0.14) 60%, transparent 74%);
}
/* Content laid out at real device width (375pt) then scaled to the 300px
   frame, so text wrapping/truncation matches what the app actually shows. */
.apv-scale {
  position: absolute; top: 0; left: 0; width: 375px; height: 750px;
  transform: scale(0.8); transform-origin: 0 0;
}
.apv-screen { position: absolute; inset: 0; overflow-y: auto; display: flex; flex-direction: column; }
.apv-screen::-webkit-scrollbar { display: none; }
.apv-orb {
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  color: #FFF7EF; font-weight: 500; flex: none; overflow: hidden;
}
.apv-orb-46 { width: 46px; height: 46px; font-size: 19px; }
.apv-orb-96 { width: 96px; height: 96px; font-size: 40px; }
.apv-orb-100 { width: 100px; height: 100px; font-size: 42px; }

/* store list — 看全部 VT (all_creators_screen + WarmPackRow) */
.apv-screen-store { padding: 8px 16px 18px; }
.apv-allvt-head {
  display: flex; align-items: center; gap: 8px; padding: 8px 4px 14px;
  font-size: 24px; font-weight: 600; color: var(--apv-ink); letter-spacing: -0.4px;
}
.apv-chevron { font-size: 26px; line-height: 1; color: var(--apv-ink); margin-top: -2px; }
.apv-row {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 13px 11px 12px; margin-bottom: 11px; border-radius: 17px;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 183, 138, 0.13);
}
.apv-dim { opacity: 0.35; }
.apv-row-info { flex: 1; min-width: 0; }
.apv-row-nm {
  font-size: 16px; font-weight: 600; color: var(--apv-ink); letter-spacing: -0.3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.apv-row-ds {
  font-size: 13px; color: var(--apv-muted); line-height: 1.35; margin-top: 3px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.apv-pack-pill {
  display: inline-block; margin-top: 5px; padding: 2.5px 8px;
  border: 1px solid rgba(255, 183, 138, 0.4); border-radius: 999px;
  font-size: 10.5px; font-weight: 600; color: var(--apv-apricot);
}
.apv-preview-circle {
  width: 33px; height: 33px; border-radius: 50%; flex: none;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 183, 138, 0.4);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: var(--apv-glow);
}
.apv-price {
  display: inline-flex; align-items: center; gap: 4px; flex: none;
  font-size: 15px; font-weight: 600; color: var(--apv-ink);
  font-variant-numeric: tabular-nums;
}
.apv-coin {
  width: 8px; height: 8px; border-radius: 2px; flex: none;
  background: var(--dawn-gradient); transform: rotate(45deg); display: inline-block;
}

/* pack sheet — ArtistPurchaseSheet: plum modal (VwakeTheme), rounded top,
   grab handle; NOT the warm night gradient. */
.apv-phone-sheet { background: #14101f; }
.apv-phone-sheet .apv-sun { display: none; }
.apv-screen-sheet { display: block; overflow: hidden; }
.apv-sheet-panel {
  position: absolute; left: 0; right: 0; bottom: 0; top: 58px;
  background: var(--apv-plum-surface);
  border-radius: 24px 24px 0 0;
  display: flex; flex-direction: column;
}
.apv-grab {
  width: 36px; height: 5px; border-radius: 3px; flex: none;
  background: rgba(255, 183, 138, 0.4); margin: 8px auto 0;
}
/* pack-switcher rail (multi-pack creators, _buildPackTabs) */
.apv-rail-wrap { flex: none; margin-top: 6px; border-bottom: 1px solid rgba(255, 183, 138, 0.2); }
.apv-rail-meta {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 8px 16px 0; font-size: 11px; color: var(--apv-text-sec);
}
.apv-rail-pos { color: #FFD2B0; font-variant-numeric: tabular-nums; }
.apv-rail {
  display: flex; overflow-x: auto; padding: 6px 16px 0; height: 38px;
  scrollbar-width: none;
}
.apv-rail::-webkit-scrollbar { display: none; }
.apv-rail-tab {
  flex: none; display: flex; align-items: center; margin-right: 8px;
  padding: 0 16px; max-width: 150px; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; font-size: 13px; color: var(--apv-ink);
  background: var(--apv-plum-elev); border-radius: 12px 12px 4px 4px;
  border: 0; cursor: pointer; font-family: inherit;
}
.apv-rail-tab.sel { background: var(--apv-coral); color: #1A0E1F; font-weight: 600; }

.apv-sheet-scroll {
  flex: 1; overflow-y: auto; padding: 16px 24px 12px;
  display: flex; flex-direction: column; align-items: center; text-align: center;
}
.apv-sheet-scroll::-webkit-scrollbar { display: none; }
.apv-sheet-name {
  font-size: 27px; font-weight: 600; color: var(--apv-ink);
  letter-spacing: -0.4px; margin-top: 18px; max-width: 100%; overflow-wrap: anywhere;
}
.apv-sheet-creator { font-size: 13px; font-weight: 500; color: var(--apv-text-sec); margin-top: 5px; }
.apv-sheet-desc { font-size: 16px; line-height: 1.4; color: var(--apv-text-sec); margin-top: 6px; }
.apv-socials { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 8px; margin-top: 16px; }
.apv-socials span {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 13px; color: var(--apv-lilac); padding: 8px 12px;
}
.apv-socials i { font-style: normal; font-size: 14px; }
.apv-about-head {
  width: 100%; text-align: left; margin-top: 24px;
  font-size: 19px; font-weight: 600; color: var(--apv-ink); letter-spacing: -0.3px;
}
.apv-styles-hint { font-size: 13px; font-weight: 400; color: var(--apv-text-sec); }
.apv-bio {
  width: 100%; text-align: left; margin-top: 8px;
  font-size: 16px; color: var(--apv-text-sec); line-height: 1.5; white-space: pre-wrap;
}
/* Placeholder bio (creator hasn't written one) — dimmed + italic so it reads as
   an example of the layout, not their real text. */
.apv-bio-sample { opacity: 0.5; font-style: italic; }
.apv-styles { width: 100%; margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.apv-style-row {
  display: flex; align-items: center; gap: 12px; text-align: left;
  background: var(--apv-plum-elev);
  border-radius: 14px; padding: 11px 12px;
}
.apv-play {
  width: 30px; height: 30px; border-radius: 50%; flex: none;
  background: var(--apv-plum-surface); color: var(--apv-coral);
  display: flex; align-items: center; justify-content: center; font-size: 12px;
}
.apv-style-nm { flex: 1; font-size: 16px; color: var(--apv-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.apv-buy-bar {
  flex: none; padding: 14px 24px 18px;
  background: var(--apv-plum-surface);
  border-top: 1px solid rgba(255, 183, 138, 0.14);
}
.apv-buy-btn {
  height: 50px; border-radius: 14px; background: var(--dawn-gradient);
  color: #1A0E1F; font-size: 16px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 18px rgba(255, 140, 122, 0.28);
}
.apv-cancel { text-align: center; font-size: 16px; color: var(--apv-text-sec); padding: 14px 0 2px; }

/* ring — WakeupScreen */
.apv-screen-ring { align-items: center; text-align: center; padding: 0 24px; }
.apv-ring-time {
  font-size: 72px; font-weight: 300; color: var(--apv-ink); letter-spacing: 4px;
  font-variant-numeric: tabular-nums; margin-top: 92px;
}
.apv-ring-cap { font-size: 18px; color: var(--apv-apricot); margin-top: 12px; }
.apv-ring-orb { margin-top: 24px; }
.apv-ring-orb .apv-orb { margin: 0 auto; }
.apv-ring-name { font-size: 22px; font-weight: 600; color: var(--apv-ink); margin-top: 12px; overflow-wrap: anywhere; }
.apv-ring-desc {
  font-size: 14px; color: var(--apv-text-sec); margin-top: 6px; max-width: 260px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.apv-dismiss {
  margin-top: auto; width: 200px; height: 56px; border-radius: 28px;
  background: var(--dawn-gradient); color: #1A0E1F; font-size: 18px; font-weight: 600;
  display: flex; align-items: center; justify-content: center; align-self: center;
  box-shadow: 0 8px 24px rgba(255, 140, 122, 0.32);
  animation: apv-pulse 1.6s ease-in-out infinite;
}
@keyframes apv-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.045); } }
@media (prefers-reduced-motion: reduce) { .apv-dismiss { animation: none; } }
.apv-snooze { font-size: 16px; color: var(--apv-lilac); margin: 18px 0 48px; }

.apv-hidden-overlay {
  position: absolute; inset: 0; z-index: 5;
  background: rgba(27, 15, 34, 0.85); backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center; text-align: center;
  padding: 24px; font-size: 13px; color: var(--apv-muted); line-height: 1.8;
}

/* ── 宣傳推廣分頁 (Promotion / materials.js) ── */
.promo-console { padding: 16px; }
.promo-root { display: flex; flex-direction: column; gap: 16px; }
.promo-tips {
  background: rgba(124, 92, 191, 0.08);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
}
.promo-tips-head { font-weight: 700; font-size: 14px; margin-bottom: 8px; color: var(--text); }
.promo-tips-list { margin: 0; padding-left: 18px; color: var(--text-secondary); font-size: 13px; line-height: 1.7; }
.promo-warn {
  background: rgba(255, 152, 0, 0.1);
  border: 1px solid rgba(255, 152, 0, 0.35);
  color: var(--bonus);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13px;
}
.promo-coderow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.promo-code-label { color: var(--text-secondary); font-size: 13px; }
.promo-code {
  font-family: var(--mono, ui-monospace, Menlo, monospace);
  font-size: 18px; font-weight: 700; letter-spacing: 2px;
  color: var(--accent-light);
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 8px; padding: 4px 12px;
}
.promo-langrow { display: flex; align-items: center; gap: 6px; }
.promo-lang-label { color: var(--text-muted); font-size: 12px; margin-right: 4px; }
.promo-langrow .lang-opt {
  background: transparent; border: 1px solid var(--border); color: var(--text-secondary);
  font-size: 12px; padding: 4px 12px; border-radius: 6px; cursor: pointer;
}
.promo-langrow .lang-opt.active { background: var(--dawn-gradient); color: #1a1320; font-weight: 700; border-color: transparent; }
.promo-grid { display: flex; gap: 16px; flex-wrap: wrap; }
.promo-asset { flex: 1 1 200px; max-width: 260px; display: flex; flex-direction: column; gap: 8px; }
.promo-asset-name { font-size: 13px; font-weight: 600; color: var(--text); }
.promo-canvas {
  width: 100%; height: auto; border-radius: 10px; background: #fff;
  border: 1px solid var(--border); display: block;
}
/* 透明底 overlay 預覽:棋盤格提示透明區 */
.promo-canvas.on-dark {
  background-color: #2a2a40;
  background-image:
    linear-gradient(45deg, #33334d 25%, transparent 25%),
    linear-gradient(-45deg, #33334d 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #33334d 75%),
    linear-gradient(-45deg, transparent 75%, #33334d 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
}
.promo-dl { align-self: flex-start; }
.promo-brand { border-top: 1px solid var(--border); padding-top: 14px; }
.promo-sec-head { font-size: 14px; font-weight: 700; margin-bottom: 10px; color: var(--text); }
.promo-brand-row { display: flex; gap: 16px; flex-wrap: wrap; }
.promo-brand-card {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 12px; width: 140px;
}
.promo-brand-img { width: 100%; height: 72px; object-fit: contain; border-radius: 6px; }
.promo-brand-name { font-size: 12px; color: var(--text-secondary); }
