/* =========================================================
   ReaderRoute — app styles with 3 themes
   studio   : Clean Studio (light, green)          — default
   midnight : Midnight Pro (dark, violet + teal)
   paper    : Paper & Ink (warm editorial, top nav)
   ========================================================= */

:root, [data-theme="studio"] {
  --bg: #f3f5f2;
  --surface: #ffffff;
  --surface-2: #f7f8f6;
  --ink: #15201b;
  --muted: #69736e;
  --line: #e4e8e3;
  --accent: #1f7a5c;
  --accent-ink: #ffffff;
  --accent-soft: #e3f2ec;
  --accent-2: #f5b83d;
  --danger: #d1453b;
  --ok: #1f9d6b;
  --warn: #c98a12;
  --sidebar: #ffffff;
  --sidebar-ink: #3e4944;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(20, 32, 27, .04), 0 8px 24px rgba(20, 32, 27, .05);
  --font: "Plus Jakarta Sans", Inter, system-ui, sans-serif;
  --head: "Plus Jakarta Sans", Inter, system-ui, sans-serif;
  --head-weight: 800;
  --sidebar-w: 256px;
}
[data-theme="midnight"] {
  --bg: #0d0f15;
  --surface: #151923;
  --surface-2: #1b202c;
  --ink: #e9ebf3;
  --muted: #8d95aa;
  --line: #252b3a;
  --accent: #8b5cf6;
  --accent-ink: #ffffff;
  --accent-soft: rgba(139, 92, 246, .14);
  --accent-2: #2dd4bf;
  --danger: #f2626b;
  --ok: #34d399;
  --warn: #fbbf24;
  --sidebar: #0a0c11;
  --sidebar-ink: #a9b0c3;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 0 0 1px rgba(255, 255, 255, .02), 0 10px 30px rgba(0, 0, 0, .35);
  --font: Inter, "Plus Jakarta Sans", system-ui, sans-serif;
  --head: Inter, system-ui, sans-serif;
  --head-weight: 700;
  --sidebar-w: 240px;
}
[data-theme="paper"] {
  --bg: #f5efe3;
  --surface: #fffdf8;
  --surface-2: #faf5ea;
  --ink: #2a2119;
  --muted: #7b6e5f;
  --line: #e6dccb;
  --accent: #c2552d;
  --accent-ink: #ffffff;
  --accent-soft: #f7e3d8;
  --accent-2: #2f5d50;
  --danger: #b4372b;
  --ok: #2f7d55;
  --warn: #a8700f;
  --sidebar: #2a2119;
  --sidebar-ink: #e9dfcf;
  --radius: 6px;
  --radius-sm: 4px;
  --shadow: 0 1px 0 rgba(42, 33, 25, .06), 0 6px 18px rgba(42, 33, 25, .06);
  --font: "Plus Jakarta Sans", system-ui, sans-serif;
  --head: Fraunces, Georgia, serif;
  --head-weight: 600;
  --sidebar-w: 100%;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.55; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
h1, h2, h3, h4 { font-family: var(--head); font-weight: var(--head-weight); line-height: 1.2; margin: 0; letter-spacing: -.01em; }
h2 { font-size: 22px; }
h3 { font-size: 16px; }
h4 { font-size: 14px; }
p { margin: 0 0 10px; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .86em; background: var(--surface-2); border: 1px solid var(--line); padding: 1px 6px; border-radius: 6px; word-break: break-all; }
.pre { white-space: pre-wrap; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px; font-size: 13px; line-height: 1.55; font-family: ui-monospace, Menlo, Consolas, monospace; margin: 10px 0 0; max-height: 420px; overflow: auto; }
.pre.tiny { font-size: 11px; max-width: 420px; }
.ic { flex: none; vertical-align: -3px; }
.small { font-size: 13px; }
.muted { color: var(--muted); }
.center { text-align: center; }
.center-block { display: block; text-align: center; margin-top: 10px; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.grow { flex: 1; min-width: 0; }
.w-100 { width: 100%; }
.mt { margin-top: 14px; }
.ok-text { color: var(--ok); }
.err-text { color: var(--danger); }
.kicker { text-transform: uppercase; letter-spacing: .1em; font-size: 11px; font-weight: 700; color: var(--accent); margin-bottom: 6px; display: inline-block; }
.lead { font-size: 17px; color: var(--muted); }
.link { font-weight: 600; font-size: 13px; }
[hidden] { display: none !important; }

/* ---------------- Layout ---------------- */
.layout { display: flex; min-height: 100vh; }
.sidebar { width: var(--sidebar-w); flex: none; background: var(--sidebar); border-right: 1px solid var(--line); padding: 22px 14px; display: flex; flex-direction: column; gap: 18px; position: sticky; top: 0; height: 100vh; overflow-y: auto; z-index: 30; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 800; font-size: 18px; padding: 2px 10px; text-decoration: none !important; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; }
.brand-mark img { width: 34px; height: 34px; object-fit: contain; border-radius: 9px; }
.brand-name em { font-style: normal; font-size: 11px; font-weight: 700; background: var(--accent-soft); color: var(--accent); padding: 2px 8px; border-radius: 99px; margin-left: 4px; vertical-align: 2px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-label { font-size: 11px; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); font-weight: 700; padding: 14px 12px 6px; }
.nav-item { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 12px; color: var(--sidebar-ink); font-weight: 600; font-size: 14px; text-decoration: none !important; transition: background .15s, color .15s; }
.nav-item:hover { background: var(--surface-2); color: var(--ink); }
.nav-item.active { background: var(--accent); color: var(--accent-ink); box-shadow: 0 6px 16px color-mix(in srgb, var(--accent) 30%, transparent); }
.nav-item.locked { opacity: .72; }
.nav-lock { margin-left: auto; opacity: .7; }
.side-promo { margin-top: auto; background: linear-gradient(150deg, var(--accent), color-mix(in srgb, var(--accent) 60%, #000)); color: #fff; border-radius: var(--radius); padding: 16px; }
.side-promo p { font-size: 12.5px; opacity: .85; margin: 4px 0 12px; }
.side-promo-kicker { font-size: 10px; text-transform: uppercase; letter-spacing: .12em; opacity: .8; font-weight: 700; }
.side-promo-title { font-weight: 800; font-size: 15px; }
.side-promo .btn { background: #fff; color: var(--accent); }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 14px; padding: 18px 32px; position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); }
.page-title { font-size: 24px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); cursor: pointer; text-decoration: none !important; font-size: 20px; }
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }
.menu-toggle { display: none; }
.user-chip { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line); padding: 5px 14px 5px 5px; border-radius: 99px; }
.user-meta { display: flex; flex-direction: column; line-height: 1.2; }
.user-meta strong { font-size: 13px; }
.user-meta small { font-size: 11.5px; color: var(--muted); }
.avatar { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-weight: 800; font-size: 13px; flex: none; }
.avatar.sm { width: 28px; height: 28px; font-size: 12px; }
.avatar.lg { width: 56px; height: 56px; font-size: 22px; }
.ws-switch select { padding: 8px 12px; border-radius: 12px; }
.content { padding: 6px 32px 48px; display: flex; flex-direction: column; gap: 20px; max-width: 1360px; width: 100%; }

/* ---------------- Cards & blocks ---------------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); min-width: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head h3 { display: flex; align-items: center; gap: 8px; }
.card-title { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 18px 0 10px; font-family: var(--font); font-weight: 700; }
.card-title:first-child { margin-top: 0; }
.sub-head { margin: 18px 0 10px; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-family: var(--font); }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
.grid-2.grid-wide-left { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.grid-2.flat { gap: 28px; }
.stack { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.toolbar p { margin: 0; }
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: -6px; }

.hero-card { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 28px 30px; border-radius: var(--radius); color: var(--accent-ink); background: radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--accent-2) 55%, transparent) 0%, transparent 45%), linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 70%, #000)); box-shadow: var(--shadow); flex-wrap: wrap; }
.hero-card h2 { font-size: 26px; max-width: 620px; }
.hero-card .kicker { color: rgba(255, 255, 255, .8); }
.hero-card .muted { color: rgba(255, 255, 255, .8); margin: 8px 0 0; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-card .btn-primary { background: #fff; color: var(--accent); }
.hero-card .btn-ghost { background: rgba(255, 255, 255, .14); color: #fff; border-color: rgba(255, 255, 255, .3); }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; display: flex; flex-direction: column; gap: 4px; box-shadow: var(--shadow); }
.stat-label { font-size: 13px; color: var(--muted); font-weight: 600; }
.stat-value { font-size: 32px; font-weight: 800; letter-spacing: -.02em; font-family: var(--head); line-height: 1.1; }
.stat-value small { font-size: 16px; color: var(--muted); font-weight: 600; margin-left: 2px; }
.stat-trend { font-size: 12.5px; color: var(--muted); }
.stat-trend.up { color: var(--ok); }
.stat-trend.down { color: var(--danger); }
.stat-accent { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.stat-accent .stat-label, .stat-accent .stat-trend, .stat-accent .stat-trend.up, .stat-accent .stat-trend.down { color: rgba(255, 255, 255, .85); }

/* ---------------- Buttons ---------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 10px 16px; border-radius: 12px; border: 1px solid transparent; font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; text-decoration: none !important; line-height: 1.2; transition: transform .06s, background .15s, border-color .15s, box-shadow .15s; white-space: nowrap; color: var(--ink); background: transparent; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .6; cursor: wait; }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 6px 14px color-mix(in srgb, var(--accent) 28%, transparent); }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 88%, #000); }
.btn-ghost { background: var(--surface); border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-text { padding-left: 6px; padding-right: 6px; color: var(--muted); }
.btn-text:hover { color: var(--ink); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-success { background: var(--ok); color: #fff; }
.btn-locked { background: var(--surface-2); border: 1px dashed var(--line); color: var(--muted); }
.btn-locked:hover { border-color: var(--accent); color: var(--accent); }
.danger { color: var(--danger) !important; }
.btn-sm { padding: 7px 11px; font-size: 13px; border-radius: 10px; }
.btn-lg { padding: 14px 22px; font-size: 16px; border-radius: 14px; }
.btn-block { width: 100%; }
.copy-mini { background: transparent; border: 0; color: var(--muted); cursor: pointer; padding: 2px 4px; border-radius: 6px; }
.copy-mini:hover { color: var(--accent); background: var(--accent-soft); }

/* ---------------- Forms ---------------- */
input, select, textarea { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; width: 100%; transition: border-color .15s, box-shadow .15s; }
input[type="checkbox"], input[type="radio"] { width: auto; accent-color: var(--accent); }
input[type="color"] { padding: 4px; height: 42px; }
input[type="file"] { padding: 8px; background: var(--surface-2); }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.form { display: flex; flex-direction: column; gap: 14px; }
.form label, .label-text { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 13.5px; }
.form label small { font-weight: 500; color: var(--muted); }
.form-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px 16px; }
.form-grid.compact { gap: 10px 12px; }
.span-2 { grid-column: span 2; }
.form-actions, .inline-form { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.inline-form select, .inline-form input { width: auto; }
.inline { display: inline; }
.form-row-between { display: flex; justify-content: space-between; font-size: 13px; }
.check { flex-direction: row !important; align-items: center; gap: 8px !important; font-weight: 500 !important; }
.check-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.tier-check { padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.tier-check span { display: flex; flex-direction: column; }
.tier-check small { color: var(--muted); font-weight: 500; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.filters input, .filters select { width: auto; padding: 8px 12px; }

/* ---------------- Pills, chips, alerts ---------------- */
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 700; background: var(--accent); color: var(--accent-ink); white-space: nowrap; }
.pill-soft { background: var(--accent-soft); color: var(--accent); }
.pill-ok { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); }
.pill-warn { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; }
.chip span, .chip.static { display: inline-block; padding: 7px 13px; border-radius: 99px; border: 1px solid var(--line); font-size: 13px; font-weight: 600; background: var(--surface); }
.chip input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.alert { padding: 12px 16px; border-radius: var(--radius-sm); font-weight: 500; font-size: 14px; border: 1px solid; }
.alert-success { background: color-mix(in srgb, var(--ok) 10%, var(--surface)); border-color: color-mix(in srgb, var(--ok) 30%, transparent); color: var(--ok); }
.alert-error { background: color-mix(in srgb, var(--danger) 10%, var(--surface)); border-color: color-mix(in srgb, var(--danger) 30%, transparent); color: var(--danger); }
.alert-warning { background: color-mix(in srgb, var(--warn) 12%, var(--surface)); border-color: color-mix(in srgb, var(--warn) 30%, transparent); color: var(--warn); }
.alert-info { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 25%, transparent); color: var(--accent); }
.alert a { font-weight: 700; }
.tip { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; background: var(--accent-soft); color: var(--ink); border-radius: var(--radius-sm); font-size: 13.5px; margin-bottom: 14px; }
.tip .ic { color: var(--accent); margin-top: 2px; }
.tip-gift { background: color-mix(in srgb, var(--accent-2) 22%, var(--surface)); }
.insight { display: flex; gap: 10px; align-items: center; padding: 12px 16px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); font-weight: 600; font-size: 14px; margin-bottom: 14px; }
.insight .ic { color: var(--accent); }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 20px); background: var(--ink); color: var(--bg); padding: 12px 20px; border-radius: 12px; font-weight: 600; font-size: 14px; opacity: 0; pointer-events: none; transition: all .25s; z-index: 100; max-width: 90vw; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast-error { background: var(--danger); color: #fff; }

/* ---------------- Tables ---------------- */
.table-wrap { overflow-x: auto; margin: 0 -4px; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; padding: 10px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--surface-2); }
.table.small td, .table.small th { padding: 8px; font-size: 12.5px; }
.row-muted { opacity: .55; }

/* ---------------- Progress, steps, lists ---------------- */
.progress { height: 8px; background: var(--surface-2); border-radius: 99px; overflow: hidden; margin-bottom: 14px; }
.progress i, .mini-progress i { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.mini-progress { height: 6px; width: 120px; background: var(--surface-2); border-radius: 99px; overflow: hidden; margin-bottom: 4px; }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.steps li { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid var(--line); }
.steps li div { flex: 1; display: flex; flex-direction: column; }
.steps li small { color: var(--muted); font-size: 13px; }
.steps li.done { opacity: .6; }
.step-dot { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; flex: none; font-weight: 800; color: var(--warn); }
.steps li.done .step-dot { background: var(--ok); border-color: var(--ok); color: #fff; }
.task-list, .rank-list, .event-list, .simple-list, .plan-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.task-list li { display: flex; align-items: center; gap: 12px; padding: 10px 6px; border-bottom: 1px solid var(--line); }
.task-list li:last-child { border: 0; }
.task-list a { display: flex; flex-direction: column; color: var(--ink); min-width: 0; flex: 1; }
.task-list a small { color: var(--muted); }
.task-list li.is-done a strong { text-decoration: line-through; color: var(--muted); }
.check-btn { width: 26px; height: 26px; border-radius: 8px; border: 2px solid var(--line); background: var(--surface); color: transparent; cursor: pointer; display: grid; place-items: center; flex: none; padding: 0; }
.check-btn:hover { border-color: var(--ok); }
.is-done > .check-btn, .is-done .check-btn { background: var(--ok); border-color: var(--ok); color: #fff; }
.type-badge { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; flex: none; background: var(--accent-soft); color: var(--accent); }
.t-pin { background: #fde8ea; color: #d6334a; }
.t-carousel { background: #e8eefe; color: #3b5bdb; }
.t-video { background: #f3e8fe; color: #8b3fd9; }
.t-reply { background: #fff1df; color: #d9730d; }
.t-pitch { background: #e2f6ef; color: #1f8a63; }
[data-theme="midnight"] .t-pin { background: rgba(244, 63, 94, .15); color: #fb7185; }
[data-theme="midnight"] .t-carousel { background: rgba(99, 102, 241, .16); color: #a5b4fc; }
[data-theme="midnight"] .t-video { background: rgba(168, 85, 247, .16); color: #d8b4fe; }
[data-theme="midnight"] .t-reply { background: rgba(251, 146, 60, .15); color: #fdba74; }
[data-theme="midnight"] .t-pitch { background: rgba(45, 212, 191, .15); color: #5eead4; }
.rank-list li { display: flex; align-items: center; gap: 10px; padding: 8px 4px; border-bottom: 1px solid var(--line); }
.rank-list li:last-child { border: 0; }
.rank-list a { color: var(--ink); display: flex; flex-direction: column; }
.rank-list small { color: var(--muted); font-size: 12px; }
.rank { width: 22px; font-weight: 800; color: var(--muted); text-align: center; }
.event-list li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.event-list li:last-child { border: 0; }
.event-list strong { display: block; font-size: 13.5px; }
.event-list small { color: var(--muted); font-size: 12.5px; display: block; }
.event-list a { color: var(--ink); }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--muted); }
.dot.ok { background: var(--ok); }
.dot.bad { background: var(--danger); }
.dot.warn { background: var(--warn); }
.simple-list li { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); gap: 10px; }
.plan-list li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.plan-list li div { display: flex; flex-direction: column; }
.plan-list small { color: var(--muted); font-size: 12.5px; }
.plan-dot { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); flex: none; }
.plan-list li.has .plan-dot { background: var(--ok); color: #fff; }
.kv { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }

/* ---------------- Charts ---------------- */
.bars { display: flex; align-items: flex-end; gap: 6px; height: 150px; padding-top: 8px; }
.bar { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; }
.bar i { width: 100%; background: linear-gradient(180deg, var(--accent), color-mix(in srgb, var(--accent) 65%, var(--surface))); border-radius: 6px 6px 3px 3px; display: block; min-height: 3px; }
.bar span { font-size: 10.5px; color: var(--muted); }
.hbars { display: flex; flex-direction: column; gap: 10px; }
.hbar { display: grid; grid-template-columns: 150px minmax(0, 1fr) 40px; gap: 10px; align-items: center; font-size: 13.5px; }
.hbar div { height: 10px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.hbar i { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.hbar strong { text-align: right; }
.chart-box { position: relative; }
.ring { --p: 0; width: 64px; height: 64px; border-radius: 50%; background: conic-gradient(var(--accent) calc(var(--p) * 1%), var(--surface-2) 0); display: grid; place-items: center; }
.ring span { width: 48px; height: 48px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; font-weight: 800; font-size: 13px; }
.mini-stats { display: flex; gap: 18px; flex-wrap: wrap; font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 14px; margin-top: 16px; }
.mini-stats strong { color: var(--ink); }

/* ---------------- Occasions ---------------- */
.occasions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.occasion { display: flex; gap: 12px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.occasion div { display: flex; flex-direction: column; min-width: 0; }
.occasion small { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.occ-days { width: 52px; height: 52px; border-radius: 14px; background: var(--surface-2); display: flex; flex-direction: column; align-items: center; justify-content: center; font-weight: 800; font-size: 18px; flex: none; line-height: 1; }
.occ-days small { font-size: 10px; font-weight: 600; color: var(--muted); }
.occasion.hot { border-color: color-mix(in srgb, var(--accent-2) 70%, transparent); background: color-mix(in srgb, var(--accent-2) 10%, var(--surface)); }
.occasion.hot .occ-days { background: var(--accent-2); color: #2a1f05; }
.occasion.hot .occ-days small { color: #2a1f05; }

/* ---------------- Empty / locked / upsell ---------------- */
.empty { text-align: center; padding: 26px 10px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.empty-icon { width: 56px; height: 56px; border-radius: 18px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; margin-bottom: 6px; }
.empty p { color: var(--muted); max-width: 360px; }
.locked-card { display: flex; align-items: center; gap: 14px; padding: 16px; border: 1px dashed var(--line); border-radius: var(--radius-sm); background: var(--surface-2); }
.locked-card h3 { font-size: 15px; }
.locked-card p { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.locked-card div { flex: 1; }
.locked-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; flex: none; }
.upsell-inline { display: flex; align-items: center; gap: 16px; justify-content: space-between; padding: 16px 18px; border-radius: var(--radius-sm); background: var(--accent-soft); flex-wrap: wrap; }
.upsell-inline p { margin: 4px 0 0; }

/* ---------------- Books ---------------- */
.book-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.book-card { display: flex; gap: 16px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); text-decoration: none !important; box-shadow: var(--shadow); transition: transform .15s, border-color .15s; }
.book-card:hover { transform: translateY(-2px); border-color: var(--accent); }
.book-cover { width: 76px; height: 106px; border-radius: 6px; overflow: hidden; background: linear-gradient(135deg, var(--accent), var(--accent-2)); flex: none; display: grid; place-items: center; box-shadow: 4px 6px 14px rgba(0, 0, 0, .18); }
.book-cover img { width: 100%; height: 100%; object-fit: cover; }
.book-cover span { color: #fff; font-size: 30px; font-weight: 800; font-family: var(--head); }
.book-cover.big { width: 150px; height: 210px; margin: 6px auto 14px; }
.book-info { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.book-info h3 { font-size: 15px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.book-meta { display: flex; gap: 10px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.hint { font-size: 12px; color: var(--accent); font-weight: 600; display: flex; align-items: center; gap: 4px; }
.book-info .pill { align-self: flex-start; }
.persona-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.persona { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px; display: flex; flex-direction: column; gap: 8px; background: var(--surface-2); }
.persona label { display: flex; flex-direction: column; gap: 4px; font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.persona textarea { font-size: 13.5px; padding: 8px 10px; text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--ink); }
.persona-label { font-weight: 800; font-size: 15px; border: 0; background: transparent; padding: 4px 0; border-bottom: 1px dashed var(--line); border-radius: 0; }
.persona-label:focus { box-shadow: none; }
.persona-new { border-style: dashed; background: transparent; }
.persona-actions { display: flex; justify-content: space-between; }
.thumbs { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.thumb { position: relative; width: 90px; height: 120px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb-x { position: absolute; top: 4px; right: 4px; border: 0; background: rgba(0, 0, 0, .6); color: #fff; border-radius: 6px; padding: 3px; cursor: pointer; }
.danger-zone { border-color: color-mix(in srgb, var(--danger) 30%, var(--line)); }
.cover-card { text-align: center; }

/* ---------------- Packs ---------------- */
.pack-preview { display: flex; gap: 8px; flex-wrap: wrap; }
.pack-preview span { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; background: var(--surface-2); border-radius: 99px; font-size: 13px; font-weight: 600; }
.pack-head { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.pack-head p { margin: 4px 0 0; }
.pack-head-right { display: flex; align-items: center; gap: 12px; }
.tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; }
.tab { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; color: var(--muted); white-space: nowrap; }
.tab.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.tab-count { background: var(--surface-2); color: var(--ink); padding: 0 8px; border-radius: 99px; font-size: 12px; }
.tab.on .tab-count { background: rgba(255, 255, 255, .2); color: inherit; }
.tab-panel { display: flex; flex-direction: column; gap: 16px; }
.asset { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; transition: border-color .2s; }
.asset.is-posted { border-color: color-mix(in srgb, var(--ok) 45%, var(--line)); }
.asset.flash { animation: flash 1.6s ease; }
@keyframes flash { 0%, 40% { box-shadow: 0 0 0 4px var(--accent-soft), var(--shadow); border-color: var(--accent); } }
.asset-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.asset-head h4 { font-size: 15px; }
.date-input { width: auto; padding: 7px 10px; font-size: 13px; }
.asset-body { padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; }
.asset-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 20px; background: var(--surface-2); border-top: 1px solid var(--line); flex-wrap: wrap; }
.asset-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.tracked { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); min-width: 0; flex-wrap: wrap; }
.field { position: relative; padding-right: 26px; }
.field > span { display: block; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; margin-bottom: 3px; }
.field p { margin: 0; white-space: pre-wrap; }
.field .copy-mini { position: absolute; top: 0; right: 0; }
.field .hook { font-size: 18px; font-weight: 800; font-family: var(--head); }
.kw { display: flex; flex-wrap: wrap; gap: 6px; }
.kw i { font-style: normal; font-size: 12px; padding: 3px 9px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 99px; }
.pin-preview { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 20px; align-items: start; }
.pin-mock { aspect-ratio: 2/3; border-radius: 14px; background: linear-gradient(160deg, var(--accent-soft), var(--surface-2)); display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding: 14px 10px; text-align: center; gap: 4px; border: 1px solid var(--line); position: relative; overflow: hidden; }
.pin-mock img { position: absolute; top: 14%; width: 52%; box-shadow: 4px 8px 16px rgba(0, 0, 0, .25); transform: rotate(-4deg); }
.pin-mock strong { font-family: var(--head); font-size: 14px; line-height: 1.15; position: relative; background: var(--surface); padding: 6px 8px; border-radius: 8px; }
.pin-mock small { font-size: 11px; color: var(--muted); position: relative; }
.fields { display: flex; flex-direction: column; gap: 12px; }
.slides { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.slide { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px; background: var(--surface-2); position: relative; min-height: 110px; }
.slide strong { display: block; margin: 0 0 4px; font-size: 14px; }
.slide p { font-size: 13px; color: var(--muted); margin: 0; }
.slide-n { position: absolute; top: 8px; right: 10px; font-size: 11px; font-weight: 800; color: var(--accent); }
.scenes { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 10px; }
.scenes li strong { display: block; }
.scenes li p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.scene-visual { font-size: 12px; color: var(--accent); font-weight: 600; }
.disclosure { margin-top: 8px !important; font-style: italic; color: var(--muted); }

/* ---------------- Calendar ---------------- */
.week-nav { display: flex; align-items: center; gap: 10px; }
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
.day { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; min-height: 240px; display: flex; flex-direction: column; gap: 8px; box-shadow: var(--shadow); }
.day.today { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.day-head { display: flex; justify-content: space-between; align-items: baseline; padding: 2px 4px 6px; border-bottom: 1px solid var(--line); }
.day-head span { font-size: 12px; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.day-head strong { font-size: 20px; font-family: var(--head); }
.cal-item { display: flex; gap: 8px; align-items: flex-start; padding: 8px; border-radius: 10px; background: var(--surface-2); font-size: 12.5px; }
.cal-item a { color: var(--ink); display: flex; flex-direction: column; min-width: 0; }
.cal-item small { color: var(--muted); font-size: 11px; display: flex; gap: 4px; align-items: center; }
.cal-item span { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-weight: 600; }
.cal-item .check-btn { width: 20px; height: 20px; border-radius: 6px; }
.cal-item.is-done { opacity: .55; }
.cal-item.t-pin { border-left: 3px solid #d6334a; }
.cal-item.t-carousel { border-left: 3px solid #3b5bdb; }
.cal-item.t-video { border-left: 3px solid #8b3fd9; }
.cal-item.t-reply { border-left: 3px solid #d9730d; }
.cal-item.t-pitch { border-left: 3px solid #1f8a63; }
.cal-item[class*="t-"] { background: var(--surface-2); color: var(--ink); }

/* ---------------- Studio / Video ---------------- */
.studio { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 20px; align-items: start; }
.studio-side { position: sticky; top: 90px; }
.studio-stage { display: flex; flex-direction: column; gap: 12px; }
.stage-head { display: flex; justify-content: space-between; align-items: center; font-weight: 700; font-size: 13px; color: var(--muted); flex-wrap: wrap; gap: 8px; }
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 3px; gap: 2px; }
.seg button, .seg a { border: 0; background: transparent; padding: 6px 12px; border-radius: 9px; font: inherit; font-size: 12.5px; font-weight: 700; color: var(--muted); cursor: pointer; text-decoration: none !important; }
.seg .on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .1); }
.canvas-wrap { background: repeating-conic-gradient(var(--surface-2) 0% 25%, var(--surface) 0% 50%) 50% / 24px 24px; border-radius: var(--radius-sm); padding: 20px; display: grid; place-items: center; border: 1px solid var(--line); }
.canvas-wrap canvas { max-width: 100%; max-height: 72vh; width: auto; height: auto; box-shadow: 0 16px 40px rgba(0, 0, 0, .18); border-radius: 6px; background: #fff; }
.canvas-wrap.phone canvas { border-radius: 22px; max-height: 70vh; }
.tpl-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.tpl { border: 2px solid var(--line); border-radius: 10px; background: var(--surface); padding: 4px; cursor: pointer; display: flex; flex-direction: column; gap: 3px; align-items: center; font: inherit; }
.tpl canvas { width: 100%; height: auto; border-radius: 6px; display: block; }
.tpl span { font-size: 10.5px; font-weight: 700; color: var(--muted); }
.tpl.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.studio-buttons { display: flex; flex-direction: column; gap: 8px; margin-top: 18px; }
.slide-strip { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.strip-btn { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); font-weight: 800; cursor: pointer; color: var(--ink); }
.strip-btn.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.render-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.render-grid.videos { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.render { margin: 0; position: relative; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); }
.render img, .render video { width: 100%; display: block; aspect-ratio: 2/3; object-fit: cover; }
.render.videos video, .videos .render video { aspect-ratio: 9/16; }
.render figcaption { position: absolute; bottom: 6px; right: 6px; display: flex; gap: 4px; }
.render figcaption a, .render figcaption button { background: rgba(0, 0, 0, .65); color: #fff; border: 0; border-radius: 8px; width: 30px; height: 30px; display: grid; place-items: center; cursor: pointer; text-decoration: none; }
.mode-list { display: flex; flex-direction: column; gap: 8px; }
.mode { display: flex; flex-direction: column; gap: 2px; padding: 12px; border: 2px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; }
.mode input { display: none; }
.mode strong { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.mode small { color: var(--muted); font-size: 12.5px; }
.mode.on { border-color: var(--accent); background: var(--accent-soft); }
.result-box { display: flex; flex-direction: column; gap: 10px; align-items: center; }
.result-box video { max-height: 420px; border-radius: 16px; background: #000; }
.map-box { background: var(--surface-2); border-radius: var(--radius-sm); padding: 18px; }
.map-box h4 { margin-bottom: 12px; }

/* ---------------- Upgrade page ---------------- */
.upgrade { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: 20px; align-items: start; }
.upgrade h2 { font-size: 30px; margin-bottom: 6px; }
.problem-solution { display: grid; gap: 14px; margin-top: 20px; }
.ps { border-radius: var(--radius-sm); padding: 16px 18px; }
.ps > span { display: flex; align-items: center; gap: 6px; font-weight: 800; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px; }
.ps-problem { background: color-mix(in srgb, var(--danger) 8%, var(--surface)); }
.ps-problem > span { color: var(--danger); }
.ps-solution { background: var(--accent-soft); }
.ps-solution > span { color: var(--accent); }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.ticks li { display: flex; gap: 8px; align-items: flex-start; }
.ticks .ic { color: var(--ok); margin-top: 3px; }
.upgrade-side { position: sticky; top: 90px; display: flex; flex-direction: column; gap: 12px; }
.price-box { text-align: center; padding: 10px 0; display: flex; flex-direction: column; gap: 2px; }
.price { font-size: 52px; font-weight: 800; font-family: var(--head); letter-spacing: -.03em; color: var(--accent); }

/* ---------------- Agency ---------------- */
.ws-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.ws { border: 1px solid var(--line); border-radius: var(--radius-sm); }
.ws.active { border-color: var(--accent); }
.ws summary { display: flex; align-items: center; gap: 12px; padding: 12px 14px; cursor: pointer; list-style: none; flex-wrap: wrap; }
.ws summary::-webkit-details-marker { display: none; }
.ws summary .grow { display: flex; flex-direction: column; }
.ws summary small { color: var(--muted); font-size: 12px; }
.ws-avatar { width: 36px; height: 36px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 800; }
.ws-stat { font-size: 12.5px; color: var(--muted); }
.ws-body { padding: 0 14px 14px; display: flex; flex-direction: column; gap: 12px; }
.new-ws { border-top: 1px solid var(--line); padding-top: 16px; }
.move-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.move-row select { width: auto; padding: 6px 10px; font-size: 13px; }
.logo-prev { max-height: 48px; align-self: flex-start; }

/* ---------------- Admin ---------------- */
.funnel { display: flex; flex-direction: column; gap: 12px; }
.funnel-step { display: grid; grid-template-columns: 190px minmax(0, 1fr) 74px; gap: 12px; align-items: center; }
.funnel-name { display: flex; flex-direction: column; }
.funnel-name small, .funnel-num small { color: var(--muted); font-size: 11.5px; }
.funnel-bar { height: 14px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.funnel-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: 99px; }
.funnel-num { display: flex; flex-direction: column; text-align: right; font-weight: 800; font-size: 18px; line-height: 1.1; }
.tier-dots { display: flex; gap: 4px; }
.td { font-size: 10px; font-weight: 800; padding: 3px 6px; border-radius: 6px; background: var(--surface-2); color: var(--muted); }
.td.on { background: var(--accent); color: var(--accent-ink); }
.pager { display: flex; gap: 6px; margin-top: 14px; flex-wrap: wrap; }
.pager a { padding: 6px 11px; border-radius: 8px; border: 1px solid var(--line); font-size: 13px; color: var(--ink); }
.pager a.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.member-head { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.member-head h2 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.member-head p { margin: 4px 0 0; }
.howto { margin: 0 0 16px; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.copy-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--surface-2); border-radius: var(--radius-sm); margin-bottom: 8px; flex-wrap: wrap; }
.copy-row span { font-weight: 700; font-size: 13px; min-width: 150px; }
.copy-row code { flex: 1; min-width: 200px; }
.tier-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 16px; margin-bottom: 16px; }
.tier-card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.tier-card-head .grow { display: flex; flex-direction: column; }
.tier-card-head small { color: var(--muted); font-size: 12.5px; }
.tier-step { background: var(--ink); color: var(--bg); font-weight: 800; font-size: 12px; padding: 6px 10px; border-radius: 8px; white-space: nowrap; }
.ladder-note { display: flex; gap: 6px; background: var(--surface-2); padding: 8px 10px; border-radius: 8px; }
.theme-pick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.theme-opt { border: 2px solid var(--line); border-radius: var(--radius-sm); padding: 12px; display: flex !important; flex-direction: column; gap: 4px !important; cursor: pointer; position: relative; }
.theme-opt input { position: absolute; top: 10px; right: 10px; }
.theme-opt small { font-weight: 500; color: var(--muted); font-size: 12px; }
.theme-opt:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.swatch { display: flex; gap: 4px; margin-bottom: 4px; }
.swatch i { width: 22px; height: 22px; border-radius: 6px; display: block; border: 1px solid rgba(0, 0, 0, .08); }
.th-studio .swatch i:nth-child(1) { background: #f3f5f2; } .th-studio .swatch i:nth-child(2) { background: #1f7a5c; } .th-studio .swatch i:nth-child(3) { background: #f5b83d; }
.th-midnight .swatch i:nth-child(1) { background: #0d0f15; } .th-midnight .swatch i:nth-child(2) { background: #8b5cf6; } .th-midnight .swatch i:nth-child(3) { background: #2dd4bf; }
.th-paper .swatch i:nth-child(1) { background: #f5efe3; } .th-paper .swatch i:nth-child(2) { background: #c2552d; } .th-paper .swatch i:nth-child(3) { background: #2f5d50; }
.checklist { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px; margin: 14px 0; }
.check-row { display: flex; align-items: center; gap: 6px; font-size: 13px; padding: 6px 10px; border-radius: 8px; background: var(--surface-2); }
.check-row.ok { color: var(--ok); }
.check-row.bad { color: var(--danger); }
.impersonate-bar { display: flex; align-items: center; gap: 8px; }

/* ---------------- Overlay ---------------- */
.overlay { position: fixed; inset: 0; background: color-mix(in srgb, var(--bg) 70%, transparent); backdrop-filter: blur(6px); display: grid; place-items: center; z-index: 90; }
.overlay-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 34px 40px; text-align: center; box-shadow: 0 30px 80px rgba(0, 0, 0, .2); max-width: 420px; display: flex; flex-direction: column; gap: 6px; align-items: center; }
.spinner { width: 54px; height: 54px; border-radius: 50%; border: 5px solid var(--accent-soft); border-top-color: var(--accent); animation: spin 0.9s linear infinite; margin-bottom: 10px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------- Auth pages ---------------- */
.auth-page { background: var(--bg); }
.auth-wrap { display: grid; grid-template-columns: 1.05fr minmax(0, 1fr); min-height: 100vh; }
.auth-side { background: radial-gradient(100% 80% at 100% 0%, color-mix(in srgb, var(--accent-2) 45%, transparent), transparent 55%), linear-gradient(160deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #000)); color: #fff; display: flex; align-items: center; justify-content: center; padding: 48px; position: relative; overflow: hidden; }
.auth-side-inner { max-width: 460px; display: flex; flex-direction: column; gap: 26px; position: relative; z-index: 1; }
.auth-side .brand { color: #fff; padding: 0; }
.brand-lg { font-size: 22px; }
.auth-side h2 { font-size: 38px; line-height: 1.12; letter-spacing: -.02em; }
.auth-side h2 span { opacity: .75; font-weight: 600; }
.auth-points { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; font-weight: 600; }
.auth-points li { display: flex; gap: 10px; align-items: center; }
.auth-points .ic { background: rgba(255, 255, 255, .16); border-radius: 8px; padding: 6px; width: 30px; height: 30px; }
.auth-mock { background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .2); border-radius: 18px; padding: 18px; display: flex; flex-direction: column; gap: 12px; backdrop-filter: blur(4px); }
.am-row { display: flex; align-items: center; gap: 10px; }
.am-dot { width: 26px; height: 26px; border-radius: 8px; background: #ffd6dc; }
.am-dot.d2 { background: #dfe6ff; } .am-dot.d3 { background: #eedcff; }
.am-line { height: 10px; border-radius: 99px; background: rgba(255, 255, 255, .55); }
.w40 { width: 40%; } .w60 { width: 60%; } .w80 { width: 80%; }
.am-pill { margin-left: auto; font-size: 11px; font-weight: 700; background: rgba(255, 255, 255, .2); padding: 3px 8px; border-radius: 99px; }
.am-bars { display: flex; align-items: flex-end; gap: 8px; height: 70px; padding-top: 6px; }
.am-bars i { flex: 1; background: rgba(255, 255, 255, .7); border-radius: 6px 6px 2px 2px; }
.auth-main { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 24px; gap: 18px; }
.auth-card { width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 34px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 14px; }
.auth-title { font-size: 28px; }
.auth-note { display: flex; gap: 10px; font-size: 13px; color: var(--muted); background: var(--surface-2); padding: 12px 14px; border-radius: var(--radius-sm); }
.auth-note .ic { color: var(--accent); margin-top: 2px; }
.auth-foot { font-size: 12.5px; color: var(--muted); }

/* =========================================================
   Theme-specific structure
   ========================================================= */

/* Midnight: glow accents, denser sidebar */
[data-theme="midnight"] .sidebar { border-right-color: #161a24; }
[data-theme="midnight"] .brand { color: #fff; }
[data-theme="midnight"] .nav-item:hover { background: #141824; color: #fff; }
[data-theme="midnight"] .nav-item.active { background: linear-gradient(90deg, rgba(139, 92, 246, .28), rgba(139, 92, 246, .06)); color: #fff; box-shadow: inset 3px 0 0 var(--accent); }
[data-theme="midnight"] .hero-card { background: radial-gradient(90% 120% at 100% 0%, rgba(45, 212, 191, .35), transparent 50%), radial-gradient(80% 120% at 0% 100%, rgba(139, 92, 246, .55), transparent 55%), #171b27; border: 1px solid #2a3042; }
[data-theme="midnight"] .hero-card .btn-primary { color: #1b1530; }
[data-theme="midnight"] .stat-accent { background: linear-gradient(135deg, #8b5cf6, #5b3fd0); }
[data-theme="midnight"] .btn-primary { box-shadow: 0 0 0 1px rgba(255, 255, 255, .06), 0 8px 24px rgba(139, 92, 246, .35); }
[data-theme="midnight"] .tab.on { background: var(--accent); border-color: var(--accent); color: #fff; }
[data-theme="midnight"] .bar i { background: linear-gradient(180deg, #a78bfa, #6d28d9); }
[data-theme="midnight"] .auth-side { background: radial-gradient(80% 80% at 100% 0%, rgba(45, 212, 191, .4), transparent 55%), radial-gradient(90% 90% at 0% 100%, rgba(139, 92, 246, .7), transparent 60%), #0d0f15; }
[data-theme="midnight"] .toast { background: #fff; color: #0d0f15; }
[data-theme="midnight"] input, [data-theme="midnight"] select, [data-theme="midnight"] textarea { background: #10131b; }
[data-theme="midnight"] .side-promo { background: linear-gradient(150deg, #2a1f4e, #13243a); border: 1px solid #2f3650; }
[data-theme="midnight"] .side-promo .btn { background: var(--accent); color: #fff; }
[data-theme="midnight"] .occasion.hot .occ-days { background: var(--accent-2); color: #062a25; }

/* Paper & Ink: top navigation, editorial typography */
[data-theme="paper"] .layout { display: block; }
[data-theme="paper"] .sidebar { width: 100%; height: auto; position: sticky; top: 0; flex-direction: row; align-items: center; padding: 10px 28px; gap: 22px; border-right: 0; border-bottom: 3px solid var(--accent); overflow-x: auto; }
[data-theme="paper"] .brand { color: #fff5e6; font-family: Fraunces, Georgia, serif; font-weight: 600; font-size: 20px; flex: none; }
[data-theme="paper"] .brand-name em { background: var(--accent); color: #fff; }
[data-theme="paper"] .nav { flex-direction: row; gap: 2px; flex: 1; }
[data-theme="paper"] .nav-label { display: none; }
[data-theme="paper"] .nav-item { padding: 8px 12px; border-radius: 4px; color: #d8cbb6; font-size: 13.5px; white-space: nowrap; }
[data-theme="paper"] .nav-item:hover { background: rgba(255, 255, 255, .08); color: #fff; }
[data-theme="paper"] .nav-item.active { background: var(--accent); color: #fff; box-shadow: none; }
[data-theme="paper"] .nav-item .ic { width: 16px; height: 16px; }
[data-theme="paper"] .side-promo { display: none; }
[data-theme="paper"] .topbar { position: static; padding: 30px 40px 6px; background: transparent; backdrop-filter: none; max-width: 1360px; margin: 0 auto; width: 100%; }
[data-theme="paper"] .page-title { font-size: 36px; font-style: italic; }
[data-theme="paper"] .content { margin: 0 auto; padding: 6px 40px 60px; }
[data-theme="paper"] .card, [data-theme="paper"] .stat, [data-theme="paper"] .asset, [data-theme="paper"] .day, [data-theme="paper"] .book-card { border-color: var(--line); }
[data-theme="paper"] .card-head { border-bottom: 1px solid var(--line); padding-bottom: 12px; }
[data-theme="paper"] .card-head h3 { font-family: Fraunces, Georgia, serif; font-size: 19px; font-weight: 600; }
[data-theme="paper"] .hero-card { background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-left: 6px solid var(--accent); }
[data-theme="paper"] .hero-card h2 { font-size: 32px; font-style: italic; }
[data-theme="paper"] .hero-card .kicker { color: var(--accent); }
[data-theme="paper"] .hero-card .muted { color: var(--muted); }
[data-theme="paper"] .hero-card .btn-primary { background: var(--accent); color: #fff; }
[data-theme="paper"] .hero-card .btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
[data-theme="paper"] .stat-accent { background: var(--sidebar); border-color: var(--sidebar); color: #fff5e6; }
[data-theme="paper"] .stat-value { font-weight: 600; }
[data-theme="paper"] .btn { border-radius: 4px; text-transform: uppercase; letter-spacing: .06em; font-size: 12.5px; }
[data-theme="paper"] .btn-lg { font-size: 14px; }
[data-theme="paper"] .btn-primary { box-shadow: none; }
[data-theme="paper"] .pill { border-radius: 3px; text-transform: uppercase; letter-spacing: .05em; font-size: 10.5px; }
[data-theme="paper"] .tab { border-radius: 4px; }
[data-theme="paper"] .tab.on { background: var(--sidebar); border-color: var(--sidebar); color: #fff5e6; }
[data-theme="paper"] .bar i { background: var(--accent); border-radius: 2px; }
[data-theme="paper"] .type-badge { border-radius: 4px; }
[data-theme="paper"] .auth-side { background: var(--sidebar); }
[data-theme="paper"] .auth-side h2 { font-family: Fraunces, Georgia, serif; font-style: italic; font-weight: 600; }
[data-theme="paper"] .auth-mock { background: rgba(255, 245, 230, .06); border-color: rgba(255, 245, 230, .18); }
[data-theme="paper"] .am-bars i { background: var(--accent); }
[data-theme="paper"] .topbar-right .icon-btn, [data-theme="paper"] .user-chip { border-radius: 4px; }
[data-theme="paper"] .menu-toggle { display: none !important; }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1180px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .occasions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .week { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .studio { grid-template-columns: 300px minmax(0, 1fr); }
  .tier-cards { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 920px) {
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; transform: translateX(-105%); transition: transform .25s; box-shadow: 0 0 40px rgba(0, 0, 0, .2); }
  body.nav-open .sidebar { transform: none; }
  .menu-toggle { display: inline-grid; }
  [data-theme="paper"] .sidebar { position: sticky; transform: none; box-shadow: none; }
  .topbar, .content { padding-left: 18px; padding-right: 18px; }
  [data-theme="paper"] .topbar, [data-theme="paper"] .content { padding-left: 18px; padding-right: 18px; }
  .grid-2, .grid-2.grid-wide-left, .upgrade, .studio { grid-template-columns: minmax(0, 1fr); }
  .studio-side, .upgrade-side { position: static; }
  .user-meta { display: none; }
  .user-chip { padding: 4px; }
  .auth-wrap { grid-template-columns: minmax(0, 1fr); }
  .auth-side { display: none; }
  .theme-pick { grid-template-columns: minmax(0, 1fr); }
  .pin-preview { grid-template-columns: minmax(0, 1fr); }
  .pin-mock { max-width: 200px; }
}
@media (max-width: 620px) {
  .stats { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
  .stat-value { font-size: 26px; }
  .occasions { grid-template-columns: minmax(0, 1fr); }
  .week { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .span-2 { grid-column: auto; }
  .page-title { font-size: 20px; }
  .hero-card { padding: 22px; }
  .hero-card h2 { font-size: 21px; }
  .funnel-step { grid-template-columns: minmax(0, 1fr) 70px; }
  .funnel-bar { grid-column: span 2; order: 3; }
  .hbar { grid-template-columns: 100px minmax(0, 1fr) 34px; }
  .check-grid, .checklist { grid-template-columns: minmax(0, 1fr); }
  .tpl-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ---------- polish ---------- */
.layout { background: linear-gradient(90deg, var(--sidebar) calc(var(--sidebar-w) - 1px), var(--line) calc(var(--sidebar-w) - 1px) var(--sidebar-w), transparent var(--sidebar-w)); }
[data-theme="paper"] .layout { background: none; }
[data-theme="paper"] .nav-item > .ic:first-child { display: none; }
[data-theme="paper"] .nav-item { padding: 8px 11px; }
[data-theme="paper"] .occasion.hot .occ-days, [data-theme="paper"] .occasion.hot .occ-days small { color: #fff; }
#storyOpts, #spotOpts, #cdOpts, #revOpts { margin-top: 14px; display: flex; flex-direction: column; gap: 6px; }
@media (max-width: 920px) { .layout { background: none; } }

/* =========================================================
   Guide drawer + Help center
   ========================================================= */
.guide-btn .ic { color: var(--accent); }
.guide-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 92vw); background: var(--surface); border-left: 1px solid var(--line); box-shadow: -20px 0 60px rgba(0, 0, 0, .18); z-index: 80; padding: 24px; overflow-y: auto; transform: translateX(105%); transition: transform .28s ease; display: flex; flex-direction: column; gap: 14px; }
.guide-open .guide-drawer { transform: none; }
.guide-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, .25); z-index: 79; opacity: 0; pointer-events: none; transition: opacity .2s; }
.guide-open .guide-backdrop { opacity: 1; pointer-events: auto; }
.guide-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.guide-head h3 { font-size: 22px; }
.guide-intro { color: var(--muted); margin: 0; }
.guide-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.guide-steps li { display: flex; gap: 12px; align-items: flex-start; }
.guide-steps li > span { width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-weight: 800; font-size: 13px; flex: none; margin-top: 1px; }
.guide-steps p { margin: 0; font-size: 14.5px; }
.guide-tip { display: flex; gap: 8px; align-items: flex-start; background: var(--accent-soft); border-radius: var(--radius-sm); padding: 10px 12px; font-size: 13.5px; }
.guide-tip .ic { color: var(--accent); margin-top: 2px; }
.routine { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.routine > div { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px; background: var(--surface-2); }
.routine span { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); }
.routine strong { display: block; margin: 4px 0; }
.routine p { margin: 0; font-size: 13px; color: var(--muted); }
.guide-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.guide-card { display: flex; flex-direction: column; gap: 12px; }
.guide-card summary { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; list-style: none; }
.guide-card summary::-webkit-details-marker { display: none; }
.guide-card summary .grow { display: flex; flex-direction: column; gap: 2px; }
.guide-card summary small { color: var(--muted); font-size: 13px; }
.guide-card[open] summary { margin-bottom: 14px; }
.guide-card .guide-steps, .guide-card .guide-tip { margin-bottom: 12px; }
.faq-list { display: flex; flex-direction: column; }
.faq-list details { border-bottom: 1px solid var(--line); padding: 12px 0; }
.faq-list summary { font-weight: 700; cursor: pointer; }
.faq-list p { margin: 8px 0 0; color: var(--muted); }
@media (max-width: 920px) { .routine, .guide-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .guide-grid { grid-template-columns: minmax(0, 1fr); } .guide-btn span { display: none; } }

/* =========================================================
   Edit & live preview modal
   ========================================================= */
.pv-open { overflow: hidden; }
.pv-modal { position: fixed; inset: 0; z-index: 85; background: rgba(10, 14, 12, .45); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 20px; }
.pv-dialog { background: var(--surface); border-radius: var(--radius); width: min(1180px, 100%); height: min(860px, 94vh); display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 40px 100px rgba(0, 0, 0, .35); border: 1px solid var(--line); }
.pv-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 22px; border-bottom: 1px solid var(--line); gap: 12px; flex-wrap: wrap; }
.pv-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); flex: 1; min-height: 0; }
.pv-form { padding: 20px 22px; overflow-y: auto; border-right: 1px solid var(--line); gap: 12px; }
.pv-lbl { display: flex; justify-content: space-between; align-items: center; }
.pv-count { font-weight: 600; color: var(--muted); font-size: 12px; }
.pv-count.over { color: var(--danger); }
.pv-list { display: flex; flex-direction: column; gap: 10px; }
.pv-item { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 8px; margin: 0; background: var(--surface-2); }
.pv-item legend { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 0 4px; display: flex; align-items: center; gap: 6px; }
.pv-x { border: 0; background: transparent; color: var(--danger); font-size: 16px; cursor: pointer; line-height: 1; }
.pv-item label { font-size: 12.5px; }
.pv-stage { background: repeating-conic-gradient(var(--surface-2) 0% 25%, var(--surface) 0% 50%) 50% / 22px 22px; overflow-y: auto; padding: 18px 22px 26px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.pv-stage-label { align-self: stretch; font-size: 12px; font-weight: 700; color: var(--muted); display: flex; align-items: center; gap: 6px; }
#pvPreview { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.pv-feed-note { font-size: 12.5px; color: var(--muted); max-width: 380px; text-align: center; }
.pv-row { display: flex; align-items: center; gap: 8px; }
.pv-row span { display: flex; flex-direction: column; line-height: 1.2; }
.pv-row small { color: #777; font-size: 12px; }
.pv-ava { width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 13px; flex: none; }
.pv-cover { width: 100%; height: 100%; object-fit: cover; display: block; }
.pv-cover-ph { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; display: grid; place-items: center; font-size: 34px; font-weight: 800; }
.pv-clamp3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pv-clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pv-disc { font-style: italic; color: #6b7280; }
/* Pinterest */
.pv-pin { width: 300px; background: #fff; border-radius: 22px; color: #111; font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; box-shadow: 0 10px 30px rgba(0, 0, 0, .12); overflow: hidden; }
.pv-pin-img { position: relative; aspect-ratio: 2/3; background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 12%, #fff), #f6f1e8); display: flex; flex-direction: column; align-items: center; padding: 22px 18px; border-radius: 22px; overflow: hidden; }
.pv-pin-text { text-align: center; display: flex; flex-direction: column; gap: 6px; z-index: 1; }
.pv-pin-text strong { font-family: Fraunces, Georgia, serif; font-size: 24px; line-height: 1.1; color: var(--accent); }
.pv-pin-text small { font-size: 12.5px; color: #333; }
.pv-pin-book { position: absolute; bottom: 9%; width: 48%; aspect-ratio: 3/4; transform: rotate(-4deg); box-shadow: 6px 12px 22px rgba(0, 0, 0, .3); background: #fff; }
.pv-pin-save { position: absolute; top: 12px; right: 12px; background: #e60023; color: #fff; font-weight: 700; font-size: 13px; padding: 9px 14px; border-radius: 99px; }
.pv-pin-meta { padding: 12px 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.pv-pin-link { font-size: 12px; color: #111; text-decoration: underline; }
.pv-pin-meta h4 { font-family: inherit; font-size: 17px; font-weight: 700; line-height: 1.25; }
.pv-pin-meta p { font-size: 13px; color: #333; margin: 0; }
.pv-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.pv-tags span { font-size: 11px; background: #efefef; border-radius: 99px; padding: 3px 8px; }
/* Instagram */
.pv-ig { width: 340px; background: #fff; color: #111; border-radius: 14px; border: 1px solid #dbdbdb; font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; overflow: hidden; }
.pv-ig-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; font-size: 13.5px; }
.pv-ig-head span:last-child { margin-left: auto; color: #555; }
.pv-ig-slide { position: relative; aspect-ratio: 4/5; background: var(--accent); color: #fff; padding: 34px 26px; display: flex; flex-direction: column; justify-content: center; gap: 10px; }
.pv-ig-slide.is-first, .pv-ig-slide.is-last { background: #fbf6ec; color: #1b1f24; justify-content: flex-start; align-items: center; text-align: center; }
.pv-ig-slide.is-last { justify-content: flex-end; }
.pv-ig-slide h4 { font-family: Fraunces, Georgia, serif; font-size: 25px; line-height: 1.12; font-weight: 700; }
.pv-ig-slide.is-first h4, .pv-ig-slide.is-last h4 { color: var(--accent); }
.pv-ig-slide p { margin: 0; font-size: 15px; opacity: .92; }
.pv-ig-num { width: 44px; height: 44px; border-radius: 50%; background: var(--accent-2); color: #1b1405; display: grid; place-items: center; font-weight: 800; font-size: 20px; position: absolute; top: 22px; left: 24px; }
.pv-ig-book { width: 42%; aspect-ratio: 3/4; box-shadow: 6px 10px 20px rgba(0, 0, 0, .25); transform: rotate(-3deg); margin: 6px 0 10px; background: #fff; }
.pv-ig-slide.is-first .pv-ig-book { order: 3; margin-top: 14px; }
.pv-ig-slide.is-last .pv-ig-book { position: absolute; top: 26px; }
.pv-swipe { order: 4; font-size: 12px; font-weight: 700; color: var(--accent); margin-top: 8px; }
.pv-ig-count { position: absolute; top: 12px; right: 12px; background: rgba(0, 0, 0, .55); color: #fff; font-size: 11px; padding: 3px 8px; border-radius: 99px; }
.pv-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .9); color: #111; font-size: 18px; cursor: pointer; box-shadow: 0 2px 6px rgba(0, 0, 0, .2); }
.pv-nav.prev { left: 8px; } .pv-nav.next { right: 8px; }
.pv-nav:disabled { display: none; }
.pv-ig-dots { display: flex; justify-content: center; gap: 4px; padding: 10px 0 0; }
.pv-ig-dots i { width: 6px; height: 6px; border-radius: 50%; background: #ccc; }
.pv-ig-dots i.on { background: #0095f6; }
.pv-ig-actions { padding: 6px 12px; font-size: 18px; display: flex; gap: 4px; }
.pv-ig-actions span { margin-left: auto; }
.pv-ig-cap { padding: 0 12px 14px; margin: 0; font-size: 13.5px; }
/* TikTok */
.pv-phone { width: 290px; aspect-ratio: 9/18.5; background: #111; border-radius: 38px; padding: 10px; box-shadow: 0 20px 50px rgba(0, 0, 0, .35); }
.pv-tt { position: relative; width: 100%; height: 100%; border-radius: 30px; overflow: hidden; background: #000; color: #fff; font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
.pv-tt-bg { position: absolute; inset: -20px; filter: blur(18px) brightness(.5); }
.pv-tt-bar { position: absolute; top: 14px; left: 14px; right: 14px; height: 3px; background: rgba(255, 255, 255, .25); border-radius: 3px; }
.pv-tt-bar i { display: block; height: 100%; width: 0; background: #fff; border-radius: 3px; transition: width .4s; }
.pv-tt-text { position: absolute; top: 15%; left: 16px; right: 56px; font-family: Fraunces, Georgia, serif; font-weight: 700; font-size: 21px; line-height: 1.18; text-shadow: 0 2px 10px rgba(0, 0, 0, .6); }
.pv-tt-text.pop { animation: ttpop .45s ease; }
@keyframes ttpop { from { opacity: 0; transform: translateY(10px); } }
.pv-tt-book { position: absolute; left: 50%; top: 46%; width: 44%; aspect-ratio: 3/4; transform: translateX(-60%) rotate(-3deg); box-shadow: 0 14px 30px rgba(0, 0, 0, .5); background: #fff; }
.pv-tt-rail { position: absolute; right: 8px; bottom: 120px; display: flex; flex-direction: column; gap: 14px; align-items: center; font-size: 20px; }
.pv-tt-rail span { display: flex; flex-direction: column; align-items: center; }
.pv-tt-rail small { font-size: 10px; }
.pv-tt-cap { position: absolute; left: 12px; right: 56px; bottom: 16px; font-size: 12.5px; }
.pv-tt-cap p { margin: 4px 0; }
.pv-tt-cap small { color: #ffd76a; font-size: 11px; }
.pv-tt-play { position: absolute; top: 24px; right: 14px; border: 0; background: rgba(255, 255, 255, .2); color: #fff; width: 30px; height: 30px; border-radius: 50%; cursor: pointer; font-size: 11px; }
/* Reddit + Quora */
.pv-reddit, .pv-quora { width: 100%; max-width: 520px; background: #fff; color: #1a1a1b; border-radius: 12px; border: 1px solid #ddd; padding: 16px; font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; font-size: 14px; }
.pv-rd-sub { display: flex; align-items: center; gap: 6px; font-size: 12px; }
.pv-rd-sub small { color: #787c7e; }
.pv-rd-icon { width: 22px; height: 22px; border-radius: 50%; background: #ff4500; color: #fff; display: grid; place-items: center; font-size: 10px; font-weight: 800; }
.pv-reddit h4, .pv-quora h4 { font-family: inherit; font-size: 18px; font-weight: 700; margin: 8px 0; color: #1a1a1b; }
.pv-rd-stats { font-size: 12px; color: #787c7e; font-weight: 700; margin-top: 8px; }
.pv-rd-comment { border-left: 2px solid #edeff1; margin-top: 14px; padding-left: 12px; }
.pv-rd-body p { margin: 8px 0 0; line-height: 1.5; }
.pv-q-ans { border-top: 1px solid #eee; padding-top: 12px; }
.pv-q-ans p { line-height: 1.55; }
.pv-quora h4 { font-size: 19px; }
/* Email */
.pv-mail { width: 100%; max-width: 560px; background: #fff; color: #222; border-radius: 12px; border: 1px solid #ddd; overflow: hidden; font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; font-size: 14px; }
.pv-mail-bar { background: #f1f3f4; padding: 10px 12px; display: flex; gap: 6px; }
.pv-mail-bar i { width: 10px; height: 10px; border-radius: 50%; background: #d0d4d8; }
.pv-mail-fields div { padding: 9px 16px; border-bottom: 1px solid #eee; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.pv-mail-fields span { width: 60px; color: #888; font-size: 12.5px; }
.pv-mail-fields small { color: #888; }
.pv-mail-body { padding: 16px; line-height: 1.6; }
.pv-mail mark, .pv-mail-fields mark { background: #fff3bf; padding: 0 3px; border-radius: 3px; }
@media (max-width: 860px) { .pv-body { grid-template-columns: minmax(0, 1fr); overflow-y: auto; } .pv-form { border-right: 0; border-bottom: 1px solid var(--line); overflow: visible; } .pv-stage { overflow: visible; } .pv-dialog { height: 96vh; } .pv-modal { padding: 8px; } }
.pv-pin-img { padding-top: 58px; }
.pv-ig-slide { padding-left: 44px; padding-right: 44px; }

/* Book import */
.import-box { border: 2px dashed color-mix(in srgb, var(--accent) 45%, var(--line)); background: var(--accent-soft); border-radius: var(--radius-sm); padding: 16px; margin-bottom: 18px; display: flex; flex-direction: column; gap: 12px; }
.import-head { display: flex; gap: 12px; align-items: flex-start; }
.import-head div { display: flex; flex-direction: column; }
.import-head small { color: var(--muted); font-size: 13px; }
.import-head .type-badge { background: var(--accent); color: var(--accent-ink); }
.import-row { display: flex; gap: 10px; }
.import-row input { flex: 1; background: var(--surface); }
.import-status { font-size: 13.5px; padding: 10px 12px; border-radius: 10px; background: var(--surface); display: flex; gap: 8px; align-items: flex-start; flex-wrap: wrap; }
.import-status.ok { color: var(--ok); }
.import-status.ok small { color: var(--muted); }
.import-status.bad { color: var(--danger); }
.spinner.sm { width: 16px; height: 16px; border-width: 3px; margin: 0; display: inline-block; }
.just-filled { box-shadow: 0 0 0 4px var(--accent-soft); border-color: var(--accent) !important; transition: box-shadow .3s; }
.cover-prev { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.cover-prev img { width: 54px; height: 76px; object-fit: cover; border-radius: 4px; box-shadow: 2px 4px 10px rgba(0, 0, 0, .2); }
.cover-prev small { font-weight: 500; color: var(--muted); }
@media (max-width: 620px) { .import-row { flex-direction: column; } }

/* =========================================================
   Buyer persona cards (actionable)
   ========================================================= */
.bp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 16px; margin-bottom: 14px; }
.bp { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); display: flex; flex-direction: column; gap: 12px; padding: 18px; box-shadow: var(--shadow); }
.bp-head { display: flex; gap: 12px; align-items: flex-start; }
.bp-head h4 { font-size: 15.5px; line-height: 1.3; }
.bp-head small { color: var(--muted); font-size: 13px; display: block; margin-top: 3px; }
.bp-ava { width: 40px; height: 40px; border-radius: 12px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; display: grid; place-items: center; font-weight: 800; flex: none; }
.bp-share { display: flex; flex-direction: column; align-items: center; background: var(--accent-soft); color: var(--accent); border-radius: 12px; padding: 6px 10px; font-weight: 800; font-size: 18px; line-height: 1; flex: none; }
.bp-share small { font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; margin-top: 3px; }
.bp-occ { display: flex; gap: 6px; align-items: center; font-size: 12.5px; font-weight: 600; background: color-mix(in srgb, var(--accent-2) 16%, var(--surface)); padding: 7px 10px; border-radius: 10px; }
.bp-why { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.bp-why div { background: var(--surface-2); border-radius: 10px; padding: 8px 10px; }
.bp-why span, .bp-obj span, .bp-lbl { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); display: flex; align-items: center; gap: 5px; }
.bp-why p, .bp-obj p { margin: 3px 0 0; font-size: 12.5px; line-height: 1.4; }
.bp-block { display: flex; flex-direction: column; gap: 6px; }
.bp-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.bp-chip { border: 1px solid var(--line); background: var(--surface-2); border-radius: 99px; padding: 4px 10px; font: inherit; font-size: 12.5px; cursor: copy; color: var(--ink); }
.bp-chip:hover { border-color: var(--accent); color: var(--accent); }
.bp-list { margin: 0; padding-left: 18px; font-size: 13px; display: flex; flex-direction: column; gap: 2px; }
.bp-hook { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; font-family: var(--head); font-weight: 600; font-size: 14px; padding: 7px 10px; border-left: 3px solid var(--accent); background: var(--surface-2); border-radius: 0 8px 8px 0; }
.bp-obj { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.bp-obj div { border-radius: 10px; padding: 8px 10px; }
.bp-obj div:first-child { background: color-mix(in srgb, var(--danger) 8%, var(--surface)); }
.bp-obj div:last-child { background: color-mix(in srgb, var(--ok) 10%, var(--surface)); }
.bp-foot { display: flex; gap: 8px; align-items: flex-start; flex-wrap: wrap; margin-top: auto; padding-top: 4px; }
.bp-edit, .bp-add { flex: 1; }
.bp-edit summary, .bp-add summary { list-style: none; display: inline-flex; }
.bp-edit summary::-webkit-details-marker, .bp-add summary::-webkit-details-marker { display: none; }
.bp-edit[open] { flex-basis: 100%; }
.bp-form { margin-top: 12px; gap: 10px; }
.bp-form label { font-size: 12.5px; }
@media (max-width: 620px) { .bp-grid { grid-template-columns: minmax(0, 1fr); } .bp-why { grid-template-columns: minmax(0, 1fr); } .bp-obj { grid-template-columns: minmax(0, 1fr); } }

/* Gift calendar */
.occ-name { display: flex; gap: 10px; align-items: center; }
.occ-name div { display: flex; flex-direction: column; }
.occ-name small { color: var(--muted); font-size: 12px; }
.occ-buyers { max-width: 380px; font-size: 13.5px; color: var(--muted); }
.occ-table tr.occ-now td { background: color-mix(in srgb, var(--ok) 6%, transparent); }
.toolbar .seg { flex-wrap: wrap; }
.occ-table { table-layout: fixed; min-width: 760px; }
.occ-table th:nth-child(1) { width: 27%; } .occ-table th:nth-child(2) { width: 14%; } .occ-table th:nth-child(3) { width: 33%; } .occ-table th:nth-child(4) { width: 12%; } .occ-table th:nth-child(5) { width: 14%; }

/* ---------- designed pins, slide strips, voiceover (v1.5) ---------- */
.pin-art { position: relative; display: flex; flex-direction: column; gap: 6px; }
.pin-art canvas, .slide-art canvas { width: 100%; height: auto; display: block; border-radius: 12px; border: 1px solid var(--line); box-shadow: 0 6px 18px rgba(0,0,0,.08); background: var(--surface-2); }
.pin-art-bar { display: flex; gap: 6px; justify-content: space-between; }
.pin-art-bar .btn { flex: 1; justify-content: center; }
.pin-art-lock { font-size: 11px; color: var(--muted); text-decoration: none; display: flex; gap: 4px; align-items: center; justify-content: center; }
.pin-art-lock:hover { color: var(--primary); }
.slide-art { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 8px; scroll-snap-type: x mandatory; }
.slide-art figure { margin: 0; flex: 0 0 190px; scroll-snap-align: start; }
.slide-art figcaption { font-size: 11.5px; color: var(--muted); margin-top: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slide-art-bar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.vo-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 10px 12px; border: 1px dashed var(--line); border-radius: var(--radius-sm); background: var(--surface-2); }
.vo-bar audio { height: 34px; max-width: 100%; }
.vo-mini { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--primary); cursor: pointer; vertical-align: middle; margin-left: 4px; padding: 0; }
.vo-mini:hover, .vo-mini.playing { background: var(--primary); color: #fff; border-color: var(--primary); }
.vo-mini.playing { animation: voPulse 1s infinite; }
@keyframes voPulse { 50% { box-shadow: 0 0 0 5px rgba(31,111,92,.18); } }
@media (max-width: 720px) { .slide-art figure { flex-basis: 150px; } }
.vo-opts { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.pv-pin-img.has-design, .pv-ig-slide.has-design { padding: 0 !important; background: none; display: block; }
.pv-design { width: 100%; height: 100%; display: block; object-fit: cover; }
.pv-ig-slide.has-design .pv-nav { position: absolute; top: 50%; }
.prov-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.prov { display: flex !important; flex-direction: column; gap: 2px !important; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; background: var(--surface); font-weight: 500 !important; }
.prov input { position: absolute; opacity: 0; pointer-events: none; }
.prov strong { font-size: 13.5px; }
.prov small { font-size: 11.5px; color: var(--muted); line-height: 1.3; }
.prov.on { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 7%, var(--surface)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 14%, transparent); }
.inline-form input { flex: 1; min-width: 0; }

/* ---- Video Engine v2 ---- */
.vstudio .studio-side { position: static; }
.vstudio .studio-stage { position: sticky; top: 90px; align-self: start; }
.vs-writer, .vs-edit { margin-top: 10px; border: 1px dashed var(--line); border-radius: var(--radius-sm); padding: 10px 12px; }
.vs-writer summary, .vs-edit summary { cursor: pointer; font-weight: 700; font-size: 13.5px; display: flex; align-items: center; gap: 6px; }
.vs-writer[open] summary, .vs-edit[open] summary { margin-bottom: 10px; }
.vs-formats { display: flex; flex-wrap: wrap; gap: 6px; }
.vs-fmt { padding: 6px 10px; border: 1.5px solid var(--line); border-radius: 999px; cursor: pointer; font-size: 12.5px; }
.vs-fmt input { display: none; }
.vs-fmt.on { border-color: var(--accent); background: var(--accent-soft); }
.vs-writer .btn { margin-top: 10px; }
.vs-writer input, .vs-writer select { margin-bottom: 4px; }
.vs-row { border-top: 1px solid var(--line); padding: 8px 0; display: grid; gap: 4px; }
.vs-row b { font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.vs-row input, .vs-row textarea { width: 100%; font-size: 13px; }
.vs-row textarea { min-height: 44px; resize: vertical; }
.vs-themes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; }
.vs-theme { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px; border: 2px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; font-size: 12.5px; font-weight: 600; }
.vs-theme input { display: none; }
.vs-theme.on { border-color: var(--accent); background: var(--accent-soft); }
.vs-theme .sw { width: 100%; height: 46px; border-radius: 6px; display: block; }
.sw-bold { background: linear-gradient(160deg, #3a3a3a, #111); position: relative; }
.sw-bold::after { content: 'POV:'; position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font: 900 15px/1 "Plus Jakarta Sans", sans-serif; -webkit-text-stroke: 1px #000; }
.sw-clean { background: radial-gradient(circle at 30% 30%, var(--a) 0 18%, transparent 19%), radial-gradient(circle at 75% 70%, var(--p) 0 24%, transparent 25%), var(--b); }
.sw-cinema { background: radial-gradient(ellipse at 60% 30%, rgba(255,170,90,.55), transparent 60%), #0b0b10; }

/* ---- Language switcher ---- */
.lang-switch select { height: 34px; padding: 0 28px 0 10px; border-radius: 10px; border: 1px solid var(--line); background-color: var(--surface); font: inherit; font-size: 12.5px; font-weight: 700; color: var(--ink); cursor: pointer; }
.auth-lang { display: flex; justify-content: flex-end; margin-bottom: 12px; width: 100%; max-width: 440px; }
@media (max-width: 720px) { .topbar .lang-switch select { width: 64px; } }

/* ---- Visual Studio: all templates + colour sets ---- */
.tpl-grid { max-height: 430px; overflow-y: auto; padding: 2px; }
.tpl canvas { aspect-ratio: auto; }
.pal-row { display: flex; gap: 8px; margin: 10px 0 4px; flex-wrap: wrap; }
.pal { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--line); cursor: pointer; padding: 0; }
.pal.on { border-color: var(--ink); box-shadow: 0 0 0 3px var(--accent-soft); }

/* ---------- Links & Clicks analytics ---------- */
.links-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 18px; }
.links-bar .inline-form select { min-width: 220px; }
.links-bar .btn-primary { margin-left: auto; }
.new-link { margin-bottom: 20px; }
.new-link[hidden], .lk-best[hidden], .lk-table tr[hidden], .lk-empty-filter[hidden], .lk-pack-note[hidden] { display: none !important; }
.new-link-form { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) auto; gap: 12px; align-items: end; }
.links-stats { margin-bottom: 20px; }
.stat-value.stat-text { font-size: 21px; line-height: 1.25; padding: 6px 0 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.links-chart { height: 280px; }
.links-empty { padding: 30px 10px; text-align: center; }
.links-empty p { margin: 4px 0; }
.lk-split { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 22px; align-items: center; }
.lk-donut { max-width: 170px; }
.lk-hbar { grid-template-columns: minmax(120px, 170px) minmax(0, 1fr) 70px; color: inherit; text-decoration: none !important; }
.lk-hbar span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 7px; }
.lk-hbar strong small { color: var(--muted); font-weight: 600; font-size: 11.5px; margin-left: 3px; }
a.lk-hbar:hover span { color: var(--accent); }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 99px; flex: none; margin-right: 6px; vertical-align: 1px; }
.lk-hbar .dot { margin-right: 0; }
.lk-note { margin: 14px 0 0; }
.lk-hours { height: 190px; }
.lk-best { margin: 14px 0 0; }
.lk-head { flex-wrap: wrap; gap: 12px; }
.lk-tools { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.lk-search { display: flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 10px; padding: 0 10px; background: var(--surface); color: var(--muted); }
.lk-search input { border: 0; outline: 0; background: transparent; padding: 8px 0; width: 170px; font: inherit; color: var(--ink); }
.lk-check { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.lk-code { font-family: ui-monospace, Menlo, Consolas, monospace; color: var(--muted); font-size: 11.5px; margin-left: 4px; }
.spark { width: 84px; height: 22px; display: block; }
.spark polyline { fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.spark.off line { stroke: var(--line); stroke-width: 1.5; stroke-dasharray: 3 3; }
.rr-dialog { border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; width: min(480px, 92vw); background: var(--surface); color: var(--ink); box-shadow: 0 40px 100px rgba(0, 0, 0, .35); }
.rr-dialog::backdrop { background: rgba(15, 23, 42, .45); }
.rr-dialog h3 { margin: 0 0 6px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; }
@media (max-width: 1180px) { .new-link-form { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
@media (max-width: 920px) { .links-stats { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
@media (max-width: 620px) { .lk-split { grid-template-columns: minmax(0, 1fr); } .lk-donut { margin: 0 auto; } .new-link-form { grid-template-columns: minmax(0, 1fr); } .links-bar .btn-primary { margin-left: 0; } }

.lk-more-wrap { text-align: center; margin-top: 14px; }
#lkMore[hidden] { display: none; }
.lk-split .lk-hbar { grid-template-columns: minmax(0, 1fr) 56px 66px; }
.steps-mini { margin: 6px 0 12px; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }
.steps-mini li { line-height: 1.5; }
.steps-mini li::marker { font-weight: 700; color: var(--accent); }
.guide-sub { margin: 18px 0 8px; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 800; }
.guide-dl { margin: 0 0 6px; display: flex; flex-direction: column; gap: 8px; }
.guide-dl div { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; }
.guide-dl dt { font-weight: 800; font-size: 13.5px; margin-bottom: 2px; }
.guide-dl dd { margin: 0; font-size: 13.5px; color: var(--muted); line-height: 1.5; }
.verdict-legend { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--muted); }
.verdict-legend li { display: flex; gap: 8px; align-items: center; }
.verdict-legend .pill { min-width: 68px; justify-content: center; text-align: center; }

/* ---------- Auto Publish (v1.10) ---------- */
.cal-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cal-hint { margin: -4px 0 10px; display: flex; align-items: center; gap: 6px; }
.cal-item { position: relative; flex-wrap: wrap; cursor: grab; }
.cal-item > a { flex: 1; }
.cal-item.dragging { opacity: .4; }
.day.drop-on { border-color: var(--accent); background: var(--accent-soft); }
.day.past { opacity: .78; }
.cal-meta { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; padding-left: 28px; }
.cal-time { display: inline-flex; align-items: center; gap: 3px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px; padding: 1px 7px; font-size: 11px; cursor: pointer; }
.cal-time:hover { border-color: var(--accent); }
.cal-time b { font-weight: 700; font-variant-numeric: tabular-nums; }
.pub-chip { display: inline-flex; align-items: center; gap: 3px; border-radius: 999px; padding: 1px 7px; font-size: 10.5px; font-weight: 700; line-height: 1.6; text-decoration: none; }
.pub-chip i { font-style: normal; }
.pub-chip[hidden] { display: none; }
.pub-sched { background: #e7efff; color: #2747b8; }
.pub-busy { background: #fff3d6; color: #8a5a00; }
.pub-ok { background: #def7ea; color: #13724a; }
.pub-fail { background: #fde4e4; color: #b42318; cursor: help; }
.pub-clone { background: var(--surface-2); color: var(--muted); border: 1px dashed var(--line); }
[data-theme="dark"] .pub-sched { background: #1e2b4d; color: #9db4ff; }
[data-theme="dark"] .pub-busy { background: #3a2f12; color: #f5c96b; }
[data-theme="dark"] .pub-ok { background: #123326; color: #7fe0b0; }
[data-theme="dark"] .pub-fail { background: #3d1717; color: #ff9b9b; }
.asset-tags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
.cw-auto { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 4px; display: flex; flex-direction: column; gap: 6px; }
.pf-cell { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.pf-cell .check { font-weight: 500; }
.pub-pane { margin-top: 14px; }
.pub-pane[hidden] { display: none; }
.pub-table td { vertical-align: middle; }
.pub-table input[type=time] { width: 150px; }
.row-in { display: flex; gap: 6px; align-items: center; }
.row-in select { flex: 1; min-width: 0; }
.code-sm { white-space: pre-wrap; word-break: break-all; font-size: 11.5px; background: var(--surface-2); padding: 10px; border-radius: 8px; }
.text-ok { color: #13724a; }
.text-danger { color: #b42318; }
.strong { font-weight: 700; }
#calRender { position: absolute; width: 0; height: 0; overflow: hidden; }
#calWhen { width: min(580px, 94vw); }
#calWhen .dialog-actions { flex-wrap: wrap; }
#calWhen .dialog-actions #cwCancel { margin-right: auto; }

/* v1.11 Auto Publish page */
.pub-intro { margin: 0; flex: 1; min-width: 240px; }
.stats + .card, #history { margin-top: 18px; }
#history + #publish { margin-top: 18px; }
.pub-history td { vertical-align: top; }
.pub-history td a { color: inherit; }
.pub-history .pub-chip { display: inline-flex; }

/* v1.12 Rescue Mode */
.rs-hero h2 { margin: 4px 0 8px; }
.rs-flow { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 0; padding: 0; counter-reset: rs; }
.rs-flow li { counter-increment: rs; font-size: 12px; font-weight: 600; padding: 5px 10px 5px 6px; border-radius: 99px; background: rgba(255, 255, 255, .16); color: inherit; display: inline-flex; align-items: center; gap: 6px; }
.rs-flow li::before { content: counter(rs); width: 18px; height: 18px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: inline-grid; place-items: center; font-size: 11px; }
.rs-manual { margin-top: 10px; }
.rs-manual summary { cursor: pointer; font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.rs-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.rs-book { display: flex; gap: 14px; align-items: center; }
.rs-book img { width: 56px; height: 80px; object-fit: cover; border-radius: 6px; box-shadow: var(--shadow); }
.rs-book h2 { margin: 2px 0 6px; font-size: 20px; }
.rs-progress { margin-bottom: 18px; }
.card + .card { margin-top: 18px; }
.rs-score-row { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.rs-score { --c: var(--ok); width: 112px; height: 112px; border-radius: 50%; display: grid; place-items: center; align-content: center; background: radial-gradient(closest-side, var(--surface) 78%, transparent 80% 100%), conic-gradient(var(--c) calc(var(--p) * 1%), var(--surface-2) 0); flex: none; }
.rs-score strong { font-size: 32px; line-height: 1; }
.rs-score span { font-size: 12px; color: var(--muted); }
.rs-warn { --c: var(--warn); } .rs-bad { --c: var(--danger); }
.rs-verdict { margin: 0 0 4px; font-size: 18px; }
.rs-facts { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.rs-facts span { background: var(--surface-2); border-radius: 8px; padding: 6px 10px; font-size: 13px; }
.rs-facts b { color: var(--muted); font-weight: 600; margin-right: 4px; }
.rs-top { margin: 6px 0 4px; padding-left: 20px; display: grid; gap: 10px; }
.rs-top li { display: grid; gap: 2px; }
.rs-top li span { font-size: 13px; color: var(--muted); }
.rs-top li em { font-style: normal; font-size: 12px; color: var(--ok); font-weight: 700; }
.rs-how { color: var(--ink) !important; background: var(--accent-soft); padding: 6px 10px; border-radius: 8px; margin-top: 4px; }
.rs-checks { margin-top: 14px; }
.rs-checks summary { cursor: pointer; font-weight: 600; font-size: 14px; }
.rs-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px 22px; margin-top: 12px; }
.rs-groups h5 { margin: 0 0 6px; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.rs-groups ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.rs-groups li { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; gap: 8px; font-size: 13px; align-items: baseline; }
.rs-groups li i { font-style: normal; font-weight: 800; }
.rs-groups li.is-ok i { color: var(--ok); } .rs-groups li.is-bad i { color: var(--danger); } .rs-groups li.is-unknown { color: var(--muted); }
.rs-groups li small { color: var(--muted); }
.rs-copy-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; margin-top: 14px; }
.rs-copy { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; min-width: 0; }
.rs-copy-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 4px; }
.rs-copy p { margin: 0; font-size: 14px; }
.rs-desc { max-height: 260px; overflow: auto; }
.rs-kw { margin: 0; padding-left: 18px; font-size: 13px; display: grid; gap: 4px; }
.rs-weeks { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.rs-weeks div { background: var(--surface-2); border-radius: var(--radius-sm); padding: 8px 10px; display: grid; gap: 2px; font-size: 13px; }
.rs-weeks span { color: var(--muted); font-size: 12px; } .rs-weeks em { font-style: normal; font-size: 12px; color: var(--accent); font-weight: 600; }
.rs-days { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.rs-day { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px; font-size: 12px; min-height: 88px; position: relative; }
.rs-day-h { display: flex; justify-content: space-between; gap: 4px; margin-bottom: 4px; }
.rs-day-h small { color: var(--muted); }
.rs-day ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.rs-day li { display: flex; align-items: center; gap: 4px; }
.rs-day.is-milestone { background: var(--accent-soft); border-color: transparent; }
.rs-day.is-today { outline: 2px solid var(--accent); }
.rs-day.is-past { opacity: .6; }
.rs-day-done { display: block; margin-top: 4px; font-size: 11px; color: var(--ok); font-weight: 700; }
.rs-cta { margin-top: 16px; }
.rs-lock { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; border: 1px dashed var(--line); border-radius: var(--radius-sm); padding: 14px; }
.rs-lock p { margin: 4px 0 0; max-width: 620px; }
.rs-stats { margin-bottom: 10px; }
.rs-chart { width: 100%; height: auto; max-height: 280px; display: block; }
.rs-grid { stroke: var(--line); stroke-dasharray: 3 4; }
.rs-ax { font-size: 10px; fill: var(--muted); }
.rs-bar { fill: var(--accent); opacity: .75; }
.rs-sale { fill: var(--ok); }
.rs-rank { fill: none; stroke: var(--warn); stroke-width: 2; }
.rs-rankdot { fill: var(--warn); }
.rs-snap { margin: 6px 0 4px; } .rs-snap input { width: 150px; }
.rs-checkpoints { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.rs-cp { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px; }
.rs-cp.is-done { border-color: color-mix(in srgb, var(--ok) 40%, var(--line)); }
.rs-cp p { margin: 6px 0; }
.rs-ba td:first-child { color: var(--muted); }
@media (max-width: 800px) { .rs-copy-grid, .rs-checkpoints, .rs-weeks { grid-template-columns: minmax(0, 1fr); } }
@media print { .sidebar, .topbar, .rs-head .inline-form, #fix, #plan .rs-cta, .rs-snap, .rs-manual, [data-rs] { display: none !important; } }

/* v1.12.1 Upload-Post limit notes */
.pub-limit { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 14px; font-weight: 400; line-height: 1.5; }
.pub-limit svg { flex: none; margin-top: 3px; }
.pub-limit strong { font-weight: 700; }
#revOpts textarea { width: 100%; resize: vertical; }
#revOpts .alert { margin: 4px 0; font-weight: 400; }
.ms-box { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; padding: 12px; border: 1px dashed var(--line, #d9dde3); border-radius: var(--radius-sm, 10px); }
.ms-box .alert { margin: 0; font-weight: 400; }
.ms-box .ms-only { display: none; }
.ms-box[data-mode=countdown] .ms-only[data-m=countdown], .ms-box[data-mode=review] .ms-only[data-m=review] { display: block; }
/* v1.12.4 more video looks */
.vs-theme span { text-align: center; line-height: 1.2; }
.sw-pastel { background: radial-gradient(circle at 25% 35%, rgba(255,255,255,.7) 0 14%, transparent 15%), radial-gradient(circle at 75% 65%, rgba(255,143,189,.5) 0 18%, transparent 19%), linear-gradient(135deg, #ffd9ea, #e6dcff 50%, #d2f3ff); }
.sw-retro { background: repeating-conic-gradient(from 0deg at 50% 70%, rgba(224,165,38,.35) 0 7.5deg, transparent 7.5deg 15deg), #f2e5c9; box-shadow: inset 0 0 0 3px #f2e5c9, inset 0 0 0 4px rgba(59,42,26,.4); }
.sw-neon { background: linear-gradient(transparent 55%, rgba(255,62,165,.0) 55%), repeating-linear-gradient(90deg, rgba(255,62,165,.55) 0 1px, transparent 1px 12px) bottom / 100% 40% no-repeat, radial-gradient(circle at 50% 62%, #ff7a59 0 22%, transparent 23%), linear-gradient(#07051a, #2a0b4a); }
.sw-holiday { background: radial-gradient(circle at 15% 22%, #ff5a5f 0 4%, transparent 5%), radial-gradient(circle at 38% 15%, #ffcf4a 0 4%, transparent 5%), radial-gradient(circle at 62% 22%, #7fe0a8 0 4%, transparent 5%), radial-gradient(circle at 85% 15%, #6fb6ff 0 4%, transparent 5%), radial-gradient(circle at 30% 70%, #fff 0 2%, transparent 3%), radial-gradient(circle at 70% 55%, #fff 0 2%, transparent 3%), radial-gradient(circle at 55% 85%, #fff 0 2%, transparent 3%), linear-gradient(#0f4a35, #06231a); }
.sw-mono { background: linear-gradient(rgba(0,0,0,.08) 1px, transparent 1px) 0 0 / 10px 10px, linear-gradient(90deg, rgba(0,0,0,.08) 1px, transparent 1px) 0 0 / 10px 10px, #f4f3ef; position: relative; }
.sw-mono::after { content: 'Aa'; position: absolute; inset: 0; display: grid; place-items: center; color: #111; font: 900 16px/1 "Plus Jakarta Sans", sans-serif; }

/* ---------- layout fixes v1.13 ---------- */
.inline-form select, .toolbar select, .row-in select { max-width: 100%; }
.links-bar .inline-form select { min-width: min(220px, 100%); }
.vs-theme { text-align: center; line-height: 1.2; min-width: 0; }
.theme-opt { min-width: 0; }
.steps-mini, .steps-mini li { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 1280px) and (min-width: 921px) { .vs-themes { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 620px) { .pub-table input[type=time] { width: 110px; } }
.toolbar > *, .links-bar > *, .inline-form { min-width: 0; max-width: 100%; }
.inline-form select { min-width: 0; text-overflow: ellipsis; }
.lk-hbar { grid-template-columns: minmax(110px, 170px) minmax(0, 1fr) auto; }
.lk-hbar strong { white-space: nowrap; }
.lk-split .lk-hbar { grid-template-columns: minmax(0, 1fr) 48px auto; }
@media (max-width: 1180px) and (min-width: 921px) { .lk-split { grid-template-columns: minmax(0, 1fr); } .lk-donut { margin: 0 auto; max-width: 150px; } }

/* ---------- dashboard v1.13 ---------- */
.db-hero { align-items: stretch; }
.db-hero-main { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.db-hero-main .hero-actions { margin-top: 16px; }
.db-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; align-self: center; flex: 0 1 420px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18); border-radius: 16px; padding: 12px 10px; }
.db-day { display: flex; flex-direction: column; align-items: center; gap: 6px; color: inherit; text-decoration: none !important; padding: 4px 0; border-radius: 10px; }
.db-day:hover { background: rgba(255, 255, 255, .1); }
.db-dow { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; opacity: .8; }
.db-dnum { font-size: 11px; opacity: .7; }
.db-ring { --p: 0; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(#fff calc(var(--p) * 1%), rgba(255, 255, 255, .22) 0); }
.db-ring b { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; background: color-mix(in srgb, var(--accent) 85%, #000); color: #fff; }
.db-day.is-today { background: rgba(255, 255, 255, .16); }
.db-day.is-today .db-dow { opacity: 1; }
.db-day.is-done .db-ring b { background: #fff; color: var(--accent); }
.db-day.is-past:not(.is-done) .db-ring { opacity: .75; }
.db-setup .steps li.is-next { border-color: var(--accent); background: var(--accent-soft); }
.db-stats .stat:not(.stat-accent) { color: inherit; } .db-stats .stat { text-decoration: none !important; transition: transform .15s, box-shadow .15s; min-width: 0; }
.db-stats .stat:hover { transform: translateY(-2px); }
.stat-label { display: flex; align-items: center; gap: 6px; }
.stat-bar { height: 6px; background: var(--surface-2); border-radius: 99px; overflow: hidden; margin: 4px 0 2px; }
.stat-bar i { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.db-todo { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.db-todo li { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); border-left-width: 4px; }
.db-todo li div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.db-todo li small { color: var(--muted); font-size: 12.5px; }
.db-todo-ic { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--surface-2); }
.db-todo .lv-bad { border-left-color: var(--danger); }
.db-todo .lv-bad .db-todo-ic { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
.db-todo .lv-warn { border-left-color: var(--warn); }
.db-todo .lv-warn .db-todo-ic { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); }
.db-todo .lv-info { border-left-color: var(--accent); }
.db-todo .lv-info .db-todo-ic { background: var(--accent-soft); color: var(--accent); }
.db-todo .btn { flex: none; }
.db-allgood { display: flex; gap: 14px; align-items: center; padding: 18px; border-radius: var(--radius-sm); background: color-mix(in srgb, var(--ok) 10%, transparent); }
.db-allgood > span { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--ok); color: #fff; flex: none; }
.db-allgood div { display: flex; flex-direction: column; }
.db-allgood small { color: var(--muted); }
.db-books td { vertical-align: middle; }
.db-books .num { text-align: right; white-space: nowrap; }
.db-book { display: flex; align-items: center; gap: 10px; color: var(--ink); min-width: 0; text-decoration: none !important; }
.db-book:hover strong { color: var(--accent); }
.db-cover { width: 34px; height: 46px; border-radius: 5px; background: var(--surface-2); display: grid; place-items: center; flex: none; overflow: hidden; color: var(--muted); }
.db-cover img { width: 100%; height: 100%; object-fit: cover; }
.db-book-t { display: flex; flex-direction: column; min-width: 0; }
.db-book-t strong { font-size: 13.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.db-book-t small { color: var(--muted); font-size: 12px; }
.db-rk { font-size: 10px; margin-left: 2px; }
.db-rk.up { color: var(--ok); } .db-rk.down { color: var(--danger); }
.db-books .pill { text-decoration: none !important; }
.db-big { margin: -4px 0 2px; } .db-big strong { font-size: 26px; font-family: var(--head); }
.bar.is-today span { color: var(--ink); font-weight: 800; }
.db-chan { display: flex; flex-direction: column; gap: 8px; }
.db-chan-row { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) 40px; gap: 10px; align-items: center; font-size: 13px; }
.db-chan-row span { display: flex; align-items: center; gap: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.db-chan-row div { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.db-chan-row i { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.db-chan-row b { text-align: right; }
.occ-tag { display: inline-block; font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; padding: 1px 6px; border-radius: 6px; background: var(--accent-2); color: #2a1f05; vertical-align: 2px; margin-left: 4px; }
.occasion strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 1180px) { .db-week { flex-basis: 100%; } }
@media (max-width: 620px) { .db-ring { width: 32px; height: 32px; } .db-ring b { width: 25px; height: 25px; font-size: 12px; } .db-week { gap: 2px; padding: 10px 6px; } .db-todo li { flex-wrap: wrap; } .db-todo .btn { margin-left: 44px; } }
.db-row { align-items: start; }
.db-more { display: block; text-align: center; padding: 10px; margin-top: 6px; border-radius: var(--radius-sm); background: var(--surface-2); font-weight: 700; font-size: 13px; }
.db-row > .card { margin: 0; }
@media (max-width: 620px) {
  .topbar { flex-wrap: wrap; row-gap: 10px; padding-top: 12px; padding-bottom: 12px; }
  .page-title { flex: 1 1 auto; }
  .topbar-right { flex: 1 1 100%; justify-content: flex-end; gap: 8px; min-width: 0; }
  .topbar-right .ws-switch { flex: 1 1 auto; min-width: 0; }
  .topbar-right .ws-switch select { width: 100%; }
  .topbar .lang-switch select { width: 72px; }
}

/* ---------- funnel badges in the sidebar ---------- */
.nav-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-tier { margin-left: auto; flex: none; font-size: 10px; font-weight: 800; letter-spacing: .03em; line-height: 1; padding: 4px 6px; border-radius: 6px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.nav-tier + .nav-lock { margin-left: 4px; }
.nav-tier.t-fe { background: color-mix(in srgb, var(--ok) 12%, transparent); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 30%, transparent); }
.nav-tier:not(.t-fe) { background: color-mix(in srgb, var(--accent-2) 22%, transparent); color: color-mix(in srgb, var(--accent-2) 55%, var(--ink)); border-color: color-mix(in srgb, var(--accent-2) 50%, transparent); }
.nav-tier.is-part { background: linear-gradient(90deg, color-mix(in srgb, var(--ok) 12%, transparent), color-mix(in srgb, var(--accent-2) 22%, transparent)); border-style: dashed; }
.nav-item.active .nav-tier { background: rgba(255, 255, 255, .2); color: #fff; border-color: rgba(255, 255, 255, .35); }
[data-theme="paper"] .nav-tier { border-radius: 3px; background: rgba(255, 255, 255, .1); color: #f1e6d2; border-color: rgba(255, 255, 255, .2); }
[data-theme="paper"] .nav-tier { font-size: 9px; padding: 3px 4px; margin-left: 6px; }
[data-theme="paper"] .nav-tier.t-fe { display: none; }
[data-theme="paper"] .db-week { background: var(--surface-2); border-color: var(--line); }
[data-theme="paper"] .db-ring { background: conic-gradient(var(--accent) calc(var(--p) * 1%), var(--line) 0); }
[data-theme="paper"] .db-ring b { background: var(--surface); color: var(--ink); }
[data-theme="paper"] .db-day.is-done .db-ring b { background: var(--accent); color: #fff; }
[data-theme="paper"] .db-day.is-today { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.nav-tier.is-part { letter-spacing: 0; padding: 4px 4px; font-size: 9.5px; }
[data-theme="midnight"] .nav-item { gap: 9px; }

/* ---------- admin Track Log ---------- */
.tl-filters .inline-form { gap: 8px; }
.tl-filters input[name=q] { min-width: 200px; flex: 1 1 200px; }
.stat-warn { border-color: color-mix(in srgb, var(--warn) 50%, var(--line)); background: color-mix(in srgb, var(--warn) 7%, var(--surface)); }
.stat-bad { border-color: color-mix(in srgb, var(--danger) 45%, var(--line)); background: color-mix(in srgb, var(--danger) 6%, var(--surface)); }
a.stat { color: inherit; text-decoration: none !important; }
.tl-reason { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 99px; white-space: nowrap; background: var(--surface-2); color: var(--muted); }
.tl-reason.lv-bad { background: color-mix(in srgb, var(--danger) 13%, transparent); color: var(--danger); }
.tl-reason.lv-warn { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); }
.tl-reason.lv-info { background: var(--accent-soft); color: var(--accent); }
.tl-reason.lv-ok { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); }
.tl-dots { display: inline-flex; gap: 4px; }
.tl-dots i { width: 14px; height: 8px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); }
.tl-dots i.on { background: var(--ok); border-color: var(--ok); }
.tl-dots i.bad { background: var(--danger); border-color: var(--danger); }
.tl-dots i.next { border-color: var(--warn); border-style: dashed; }
.tl-help td { vertical-align: top; }
.tl-help .nav-tier { display: inline-block; margin: 4px 0 0; }
.tl-prob small { display: block; color: var(--muted); margin-top: 4px; max-width: 360px; }
.tl-never { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin-bottom: 6px; }
.tl-never > div { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; }
.tl-never small { display: block; color: var(--muted); margin-top: 4px; overflow-wrap: anywhere; }
.tl-funnels { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.tl-funnel { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.tl-funnel-h { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.tl-funnel-h .nav-tier { margin-left: 0; }
.tl-funnel-h .link { margin-left: auto; }
.tl-step { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) 28px 30px; gap: 8px; align-items: center; font-size: 12.5px; padding: 2px 4px; border-radius: 6px; }
.tl-step-l { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-step-l b { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--surface-2); font-size: 10.5px; margin-right: 2px; }
.tl-step-bar { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.tl-step-bar i { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.tl-step-n { text-align: right; font-weight: 800; }
.tl-step-f a { color: var(--danger); font-weight: 700; font-size: 11.5px; }
.tl-step.is-drop { background: color-mix(in srgb, var(--warn) 12%, transparent); }
.tl-step.is-drop .tl-step-bar i { background: var(--warn); }
.tl-drop-note { color: var(--warn); margin: 4px 0 0; display: flex; gap: 6px; align-items: center; }
.tl-reasons { display: flex; flex-direction: column; gap: 6px; }
.tl-rrow { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) 36px; gap: 10px; align-items: center; padding: 8px 10px; border-radius: var(--radius-sm); border: 1px solid var(--line); color: var(--ink); text-decoration: none !important; border-left-width: 4px; }
.tl-rrow:hover { background: var(--surface-2); }
.tl-rrow span:first-child { display: flex; flex-direction: column; font-weight: 700; font-size: 13px; min-width: 0; }
.tl-rrow small { color: var(--muted); font-weight: 500; font-size: 11.5px; }
.tl-rbar { height: 8px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.tl-rbar i { display: block; height: 100%; border-radius: 99px; background: var(--accent); }
.tl-rrow b { text-align: right; }
.tl-rrow.lv-bad { border-left-color: var(--danger); } .tl-rrow.lv-bad .tl-rbar i { background: var(--danger); }
.tl-rrow.lv-warn { border-left-color: var(--warn); } .tl-rrow.lv-warn .tl-rbar i { background: var(--warn); }
.tl-rrow.lv-info { border-left-color: var(--accent); }
.tl-tips { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; color: var(--muted); }
.tl-tips b { color: var(--ink); }
.tl-log td { vertical-align: top; font-size: 13px; }
.tl-log tr.st-fail td { background: color-mix(in srgb, var(--danger) 5%, transparent); }
.tl-det { min-width: 260px; }
.tl-det > * { margin-right: 6px; }
.tl-det small { display: block; margin-top: 3px; overflow-wrap: anywhere; }
.tl-msg { overflow-wrap: anywhere; }
.tl-no { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--surface-2); font-size: 10.5px; }
.tl-st { font-size: 12px; font-weight: 700; color: var(--muted); }
.tl-st.ok { color: var(--ok); } .tl-st.bad { color: var(--danger); }
.pager { align-items: center; }
.tl-journey { display: flex; flex-direction: column; gap: 8px; }
.tl-jrow { display: grid; grid-template-columns: 170px minmax(0, 1fr) 220px; gap: 14px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.tl-jrow.st-locked, .tl-jrow.st-never { opacity: .55; }
.tl-jrow.st-blocked { border-color: color-mix(in srgb, var(--danger) 45%, var(--line)); }
.tl-jrow.st-stuck { border-color: color-mix(in srgb, var(--warn) 50%, var(--line)); }
.tl-jname .nav-tier { display: inline-block; margin: 0 0 0 4px; }
.tl-jsteps { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.tl-jsteps li { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 3px; position: relative; }
.tl-jsteps li span { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 800; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); z-index: 1; }
.tl-jsteps li small { font-size: 10.5px; color: var(--muted); text-align: center; line-height: 1.2; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.tl-jsteps li::before { content: ''; position: absolute; top: 11px; left: -50%; right: 50%; height: 2px; background: var(--line); }
.tl-jsteps li:first-child::before { display: none; }
.tl-jsteps li.on span { background: var(--ok); border-color: var(--ok); color: #fff; }
.tl-jsteps li.on::before { background: var(--ok); }
.tl-jsteps li.bad span { background: var(--danger); border-color: var(--danger); color: #fff; }
.tl-jstate { display: flex; flex-direction: column; gap: 3px; align-items: flex-start; }
.tl-jstate small { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.tl-timeline { list-style: none; margin: 0; padding: 0; max-height: 460px; overflow-y: auto; }
.tl-timeline li { display: flex; gap: 12px; align-items: flex-start; padding: 8px 4px; border-bottom: 1px solid var(--line); }
.tl-timeline li div { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 13px; }
.tl-timeline li div small { color: var(--muted); overflow-wrap: anywhere; }
.tl-tdot { width: 10px; height: 10px; border-radius: 50%; background: var(--line); margin-top: 5px; flex: none; }
.tl-timeline .st-ok .tl-tdot { background: var(--ok); }
.tl-timeline .st-fail .tl-tdot { background: var(--danger); }
.tl-timeline .st-fail strong { color: var(--danger); }
@media (max-width: 920px) { .tl-jrow { grid-template-columns: minmax(0, 1fr); } }
.tl-funnels { grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); }
.tl-step { grid-template-columns: minmax(0, 2.2fr) minmax(40px, 1fr) 24px 28px; }
/* cards side by side in a grid must start on the same line */
.grid-2 > .card + .card, .tier-cards > .card + .card, .content > .card + .card, .stats > .card + .card { margin-top: 0; }
.nav-tier.is-locked { display: inline-flex; align-items: center; gap: 3px; }
.nav-tier.is-locked .ic { flex: none; }

/* ---------- Add book from a book file ---------- */
.import-tabs { align-self: flex-start; }
.import-tabs button { display: inline-flex; align-items: center; gap: 6px; }
.imp-pane { display: flex; flex-direction: column; gap: 10px; }
.imp-pane[hidden] { display: none; }
.bf-drop { display: flex !important; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 4px !important; padding: 22px 18px; border: 2px dashed color-mix(in srgb, var(--accent) 45%, var(--line)); border-radius: var(--radius-sm); background: var(--surface); cursor: pointer; transition: background .15s, border-color .15s; font-weight: 500; }
.bf-drop input { display: none; }
.bf-drop strong { font-size: 15px; }
.bf-drop small { color: var(--muted); font-size: 12.5px; max-width: 620px; }
.bf-drop:hover, .bf-drop.is-over { border-color: var(--accent); background: var(--accent-soft); }
.bf-drop.is-busy { opacity: .7; pointer-events: none; }
.bf-ic { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); margin-bottom: 4px; }
.bf-privacy { display: flex; align-items: center; gap: 6px; margin: 0; }
.bf-result { display: flex; gap: 14px; align-items: flex-start; background: var(--surface); border-radius: var(--radius-sm); padding: 12px; }
.bf-result[hidden] { display: none; }
.bf-cover { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: none; }
.bf-cover img { width: 78px; height: 110px; object-fit: cover; border-radius: 4px; box-shadow: 2px 4px 12px rgba(0, 0, 0, .2); background: var(--surface-2); }
.bf-cover small { font-size: 11.5px; color: var(--muted); }
.bf-pages-wrap { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.bf-pages { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.bf-page { position: relative; flex: none; width: 64px; height: 88px; padding: 0; border: 2px solid var(--line); border-radius: 5px; overflow: hidden; background: #fff; cursor: pointer; opacity: .45; }
.bf-page img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bf-page i { position: absolute; top: 3px; right: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 10px; font-style: normal; display: none; place-items: center; }
.bf-page.on { opacity: 1; border-color: var(--accent); }
.bf-page.on i { display: grid; }
.bf-extract { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.bf-drop-sm { flex-direction: row !important; text-align: left; justify-content: flex-start; padding: 12px 14px; gap: 12px !important; }
.bf-drop-sm .bf-ic { width: 36px; height: 36px; margin: 0; flex: none; }
.bf-drop-sm span:last-child { display: flex; flex-direction: column; }

/* ---------- Book ER ---------- */
.er-hero { align-items: stretch; }
.er-hero-main { flex: 1 1 420px; min-width: 0; }
.er-flow { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 0; padding: 0; counter-reset: er; }
.er-flow li { counter-increment: er; font-size: 12.5px; font-weight: 700; padding: 5px 10px 5px 6px; border-radius: 99px; background: rgba(255, 255, 255, .14); }
.er-flow li::before { content: counter(er); display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: #fff; color: var(--accent); font-size: 11px; margin-right: 6px; }
.er-hero-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; flex: 0 1 300px; align-self: center; }
.er-hero-stats div { background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .18); border-radius: 14px; padding: 10px 12px; display: flex; flex-direction: column; }
.er-hero-stats strong { font-size: 24px; font-family: var(--head); line-height: 1.1; }
.er-hero-stats small { opacity: .8; font-size: 12px; }
[data-theme="paper"] .er-flow li, [data-theme="paper"] .er-hero-stats div { background: var(--surface-2); border-color: var(--line); }
[data-theme="paper"] .er-flow li::before { background: var(--accent); color: #fff; }
.er-ring { --p: 0; --s: 84px; width: var(--s); height: var(--s); border-radius: 50%; display: grid; place-items: center; flex: none; background: conic-gradient(var(--c) calc(var(--p) * 1%), var(--surface-2) 0); }
.er-ring b { width: calc(var(--s) - 14px); height: calc(var(--s) - 14px); border-radius: 50%; background: var(--surface); display: grid; place-items: center; font-family: var(--head); font-size: calc(var(--s) * .32); color: var(--ink); }
.er-ring.ok { --c: var(--ok); } .er-ring.warn { --c: var(--warn); } .er-ring.bad { --c: var(--danger); }
.er-patients { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.er-patient { display: flex; align-items: center; gap: 10px; padding: 10px 14px 10px 10px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none !important; min-width: 220px; max-width: 300px; flex: none; }
.er-patient span:last-child { display: flex; flex-direction: column; min-width: 0; }
.er-patient strong { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.er-patient small { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.er-patient.is-on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.er-patient .er-ring b { font-size: 15px; }
.er-chart-head { display: flex; gap: 18px; align-items: center; margin-bottom: 18px; }
.er-chart-head h3 { margin: 2px 0 4px; font-size: 21px; }
.er-chart-head p { margin: 0; }
.er-funnel { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.er-step { position: relative; display: flex; flex-direction: column; gap: 3px; padding: 14px; border-radius: var(--radius-sm); border: 1px solid var(--line); border-top-width: 4px; min-width: 0; }
.er-step:not(:last-child)::after { content: '›'; position: absolute; right: -9px; top: 40%; font-size: 20px; color: var(--muted); z-index: 1; }
.er-step-ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-2); margin-bottom: 4px; }
.er-step-l { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.er-step-v { font-size: 22px; font-family: var(--head); }
.er-step small { color: var(--muted); font-size: 12px; }
.er-step-st { margin-top: 6px; font-size: 12px; font-weight: 800; align-self: flex-start; padding: 2px 8px; border-radius: 99px; background: var(--surface-2); color: var(--muted); }
.er-step.st-good { border-top-color: var(--ok); } .er-step.st-good .er-step-st { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); }
.er-step.st-warn { border-top-color: var(--warn); } .er-step.st-warn .er-step-st { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); }
.er-step.st-bad { border-top-color: var(--danger); } .er-step.st-bad .er-step-st { background: color-mix(in srgb, var(--danger) 13%, transparent); color: var(--danger); }
.er-step.is-leak { box-shadow: 0 0 0 2px color-mix(in srgb, var(--danger) 45%, transparent); background: color-mix(in srgb, var(--danger) 4%, var(--surface)); }
.er-delta { font-size: 11px; vertical-align: 3px; } .er-delta.up { color: var(--ok); } .er-delta.down { color: var(--danger); }
.er-note { display: flex; align-items: center; gap: 6px; margin: 12px 0 0; }
.er-tx { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.er-tx li { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.er-tx li:first-child { border-color: var(--accent); background: var(--accent-soft); }
.er-tx-n { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; background: var(--surface-2); flex: none; }
.er-tx li:first-child .er-tx-n { background: var(--accent); color: #fff; }
.er-tx-ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); flex: none; color: var(--accent); }
.er-tx li div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.er-tx li small { color: var(--muted); font-size: 12.5px; }
.er-tx .btn { flex: none; }
.er-case { margin-top: 16px; padding: 14px; border-radius: var(--radius-sm); background: var(--surface-2); }
.er-case-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.er-case-h strong { display: flex; align-items: center; gap: 6px; }
.er-case-bar { height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; margin: 10px 0; }
.er-case-bar i { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.er-case ul { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.er-case li { display: flex; align-items: center; gap: 6px; }
.er-case p { margin: 0; }
.er-slop { display: flex; gap: 12px; align-items: center; margin-top: 16px; padding: 12px; border-radius: var(--radius-sm); background: var(--accent-soft); }
.er-slop > span { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; flex: none; }
.er-slop div { display: flex; flex-direction: column; }
.er-slop strong { font-size: 20px; font-family: var(--head); line-height: 1.1; }
.er-slop small { color: var(--muted); font-size: 12px; }
.er-hist td { font-size: 13px; vertical-align: middle; }
.er-hist .num { text-align: right; white-space: nowrap; }
.er-learn { display: flex; flex-direction: column; gap: 8px; }
.er-learn-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto; gap: 12px; align-items: center; font-size: 13px; }
.er-learn-row span:first-child { display: flex; flex-direction: column; min-width: 0; }
.er-learn-row small { color: var(--muted); }
.er-learn-bar { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.er-learn-bar i { display: block; height: 100%; background: var(--ok); border-radius: 99px; }
@media (max-width: 920px) { .er-funnel { grid-template-columns: repeat(2, minmax(0, 1fr)); } .er-step::after { display: none; } .er-hero-stats { flex-basis: 100%; grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 560px) { .er-funnel { grid-template-columns: minmax(0, 1fr); } .er-chart-head { flex-direction: column; align-items: flex-start; } .er-hero-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .er-tx li { flex-wrap: wrap; } .er-tx .btn { margin-left: 34px; } }

/* calendar: type filter + "+N more" */
.cal-filter { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.cal-filter .chip { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px; padding: 4px 11px; font-size: 12.5px; cursor: pointer; }
.cal-filter .chip b { font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.cal-filter .chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.cal-filter .chip.on b { color: rgba(255,255,255,.85); }
.day-more { width: 100%; border: 1px dashed var(--line); background: transparent; color: var(--accent); border-radius: 10px; padding: 7px; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.day-more:hover { background: var(--surface-2); }

.book-quick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.book-quick .btn { flex: 1 1 120px; min-width: 0; }
.book-quick .btn { justify-content: center; }
.er-mini { display: inline-block; min-width: 26px; padding: 0 6px; border-radius: 999px; font-size: 11px; color: #fff; background: #c0392b; }
.er-mini.mid { background: #d68910; } .er-mini.ok { background: #1f8a63; }

/* Rescue Mode: tabs shared by Health check + 30-day rescue */
.rs-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 18px; }
.rs-tab { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); text-decoration: none; transition: border-color .15s, box-shadow .15s; }
.rs-tab svg { flex: none; color: var(--muted); }
.rs-tab span { display: flex; flex-direction: column; min-width: 0; }
.rs-tab strong { font-size: 15px; }
.rs-tab small { color: var(--muted); font-size: 12.5px; }
.rs-tab:hover { border-color: var(--accent); }
.rs-tab.is-on { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent); }
.rs-tab.is-on svg { color: var(--accent); }
@media (max-width: 560px) { .rs-tab small { display: none; } .rs-tab { padding: 10px 12px; } }
.er-rescue { display: flex; align-items: center; gap: 14px; border-left: 4px solid #d68910; }
.er-rescue.is-running { border-left-color: var(--accent); }
.er-rescue > div { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.er-rescue small { color: var(--muted); }
.er-rescue-ic { flex: none; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: #fdf2e3; color: #b9770e; }
.er-rescue.is-running .er-rescue-ic { background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); }
@media (max-width: 640px) { .er-rescue { flex-wrap: wrap; } .er-rescue .btn { width: 100%; justify-content: center; } }

/* first-run welcome */
.wl-hero { display: flex; align-items: center; gap: 24px; }
.wl-hero > div:first-child { flex: 1; min-width: 0; }
.wl-meter { display: flex; flex-direction: column; align-items: center; gap: 6px; flex: none; }
.wl-meter .db-ring { width: 78px; height: 78px; }
.wl-meter .db-ring b { font-size: 18px; }
.wl-meter small { color: var(--muted); }
.wl-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.wl-step { position: relative; border-left: 4px solid var(--line); }
.wl-step.is-cur { border-left-color: var(--accent); box-shadow: 0 6px 24px color-mix(in srgb, var(--accent) 12%, transparent); }
.wl-step.is-done { border-left-color: #1f8a63; }
.wl-step.is-wait { opacity: .62; }
.wl-head { display: flex; gap: 14px; align-items: flex-start; }
.wl-head h3 { margin: 2px 0 2px; }
.wl-head p { margin: 0; }
.wl-n { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: var(--surface-2); color: var(--ink); }
.wl-step.is-cur .wl-n { background: var(--accent); color: #fff; }
.wl-step.is-done .wl-n { background: #1f8a63; color: #fff; }
.wl-body { margin: 14px 0 0 48px; }
.wl-ok { margin: 10px 0 0 48px; color: #1f8a63; font-weight: 600; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.wl-ok a { font-weight: 500; }
.wl-cost { display: flex; gap: 8px; align-items: flex-start; background: color-mix(in srgb, var(--accent) 8%, transparent); border-radius: 10px; padding: 10px 12px; font-size: 13px; }
.wl-cost svg { flex: none; margin-top: 2px; color: var(--accent); }
.wl-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.wl-prev { display: flex; gap: 14px; align-items: flex-start; }
.wl-prev img { width: 84px; border-radius: 6px; box-shadow: 0 2px 10px rgba(0,0,0,.15); flex: none; }
.linkish { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; text-align: left; text-decoration: underline; text-underline-offset: 2px; }
.wl-honest ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.wl-skip { margin: 18px 0 8px; }
@media (max-width: 640px) {
  .wl-hero { flex-direction: column; align-items: flex-start; }
  .wl-body, .wl-ok { margin-left: 0; }
  .wl-prev img { width: 64px; }
}
.wl-body .inline-form { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.wl-body .inline-form label.grow { display: flex; flex-direction: column; gap: 6px; flex: 1 1 280px; min-width: 0; }
.wl-body .inline-form input { width: 100%; }

/* v1.17 legal links */
.app-legal { margin: 40px 0 6px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); text-align: center; }
.app-legal a { color: inherit; }
.auth-foot a { color: inherit; }
.legal-set { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px 4px; margin: 4px 0 12px; display: grid; gap: 10px; }
.legal-set legend { font-weight: 700; padding: 0 6px; font-size: 14px; }
.legal-set legend small { font-weight: 400; color: var(--muted); }

/* v1.19 review account + JV admin */
.review-bar { display: flex; gap: 10px; align-items: flex-start; }
.row-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.stack-sm { display: grid; gap: 8px; align-content: center; }
