/* 23 Studios - base styles.
   All brand choices live in the tokens below: swapping in the final logo
   colours and fonts means editing this block, not hunting through rules. */
:root {
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --brand: #0b3558;          /* headings, logo text */
  --accent: #006bff;         /* primary buttons, active nav, links */
  --accent-soft: #e8f1ff;
  --on-accent: #1c1c1c;

  --bg: #fafafa;             /* page background behind content */
  --surface: #ffffff;        /* sidebar, cards, header */
  --border: #e5e7eb;
  --text: #1a1a1a;
  --text-muted: #6b7280;
  --danger: #c62828;

  --radius-sm: 8px;
  --radius: 12px;
  --radius-pill: 999px;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 1px 3px rgba(16, 24, 40, 0.06);
  --sidebar-width: 256px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
h1, h2, h3 { color: var(--brand); margin: 0; }

/* ---------- app shell ---------- */
.shell { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
}
a.logo { text-decoration: none; }
.logo {
  display: flex; align-items: center; gap: 10px;
  font-size: 20px; font-weight: 700; color: var(--brand);
  padding: 0 8px 24px;
}
.logo-mark {
  width: 32px; height: 32px; border-radius: 50%;
  border: 3px solid var(--brand);
  display: grid; place-items: center;
  font-size: 12px; font-weight: 800;
}

.btn-create {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  width: 100%; padding: 10px 16px; margin-bottom: 24px;
  border: 1px solid var(--text); border-radius: var(--radius-pill);
  background: var(--surface); color: var(--text); font: inherit; font-weight: 600;
  cursor: pointer;
}
.btn-create:hover { background: var(--bg); }

.nav { display: flex; flex-direction: column; gap: 4px; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  border: 1px solid transparent; border-radius: var(--radius-sm);
  color: var(--text); font-weight: 600;
}
.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; }
.nav-item:hover { background: var(--bg); }
.nav-item.active {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--accent);
}
.nav-item.disabled { color: var(--text-muted); pointer-events: none; }
.nav-item .soon {
  margin-left: auto; font-size: 11px; font-weight: 600;
  color: var(--text-muted); background: var(--bg);
  border: 1px solid var(--border); border-radius: var(--radius-pill);
  padding: 0 8px;
}
.sidebar-bottom { margin-top: auto; }
.storage-meter + .sidebar-bottom { margin-top: 0; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.main-body { flex: 1; min-width: 0; outline: none; }
/* Keyboard users: jump past the menu straight to the page. */
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 1000; padding: 10px 16px; border-radius: var(--radius-pill);
  background: var(--surface); color: var(--text); font-weight: 600; box-shadow: var(--shadow); }
.skip-link:focus { top: 12px; }
.topbar {
  display: flex; align-items: center; justify-content: flex-end; gap: 12px;
  padding: 16px 40px;
  background: var(--surface);
}
.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center; font-weight: 700; text-transform: uppercase;
}
.page-head {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 8px 40px 24px;
}
.page-head h1 { font-size: 22px; }
.page-head .hint { color: var(--text-muted); margin: 4px 0 0; }
.content { padding: 32px 40px; width: 100%; }

/* ---------- building blocks ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.stat-value { font-size: 28px; font-weight: 700; color: var(--brand); }
.stat-label { color: var(--text-muted); font-weight: 500; }
.empty-state { text-align: center; color: var(--text-muted); padding: 48px 24px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 20px; border-radius: var(--radius-pill);
  border: 1px solid var(--accent); background: var(--accent); color: var(--on-accent);
  font: inherit; font-weight: 600; cursor: pointer;
}
.btn:hover { filter: brightness(0.95); }

/* ---------- auth pages (login, signup, password reset) ---------- */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.auth-card { width: 100%; max-width: 420px; }
.auth-card .logo { justify-content: center; padding-bottom: 16px; }
.auth-card h1 { font-size: 22px; text-align: center; margin-bottom: 8px; }
.auth-card > .card > p { color: var(--text-muted); text-align: center; }
.auth-card form p { display: flex; flex-direction: column; gap: 6px; margin: 0 0 16px; }
.auth-card label { font-weight: 600; }
input[type="email"], input[type="password"], input[type="text"], textarea, select {
  width: 100%; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font: inherit; background: var(--surface);
}
/* A text field only stretches downwards, never wider than its place. */
textarea { resize: vertical; max-width: 100%; }
textarea[data-autogrow] { overflow-y: hidden; min-height: 120px; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.auth-card form p:has(input[type="checkbox"]) { flex-direction: row; align-items: center; }
.auth-card button, .auth-card form a[href] + button {
  width: 100%; padding: 12px; border-radius: var(--radius-pill);
  border: 1px solid var(--accent); background: var(--accent); color: var(--on-accent);
  font: inherit; font-weight: 600; cursor: pointer; margin-top: 8px;
}
.auth-card .errorlist { color: var(--danger); padding-left: 18px; margin: 0 0 8px; }
/* Cancel and other second choices (two-step login): quiet, not orange like the main button. */
.auth-card button.auth-quiet, [data-mode] .auth-card button.auth-quiet { background: transparent; border-color: var(--border); color: var(--text); }
.auth-card button.auth-danger, [data-mode] .auth-card button.auth-danger { color: var(--danger); border-color: var(--danger); }
.auth-card img[src^="data:image/svg"] { display: block; margin: 8px auto 16px; width: 180px; height: 180px; padding: 10px; background: #fff; border-radius: 12px; }
.account-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.account-row .btn { white-space: nowrap; }
/* Phone: a longer explanation with its button(s) on the left underneath, not squeezed beside it. */
@media (max-width: 600px) { .account-row-stack { flex-direction: column; align-items: flex-start; } }
.messages { list-style: none; padding: 0; margin: 0 0 16px; }
.messages li { background: var(--accent-soft); border-radius: var(--radius-sm); padding: 10px 14px; margin-bottom: 8px; }

.topbar-studio { color: var(--text-muted); font-weight: 500; }
.mobile-logo, .mobile-logout, .tabbar { display: none; }

/* Account, studio and light/dark live at the bottom of the sidebar; the
   top bar is only for phones (logo + account). */
.sidebar-account .account-link { gap: 10px; }
.sidebar-account .avatar { flex: none; width: 28px; height: 28px; font-size: 13px; }
.account-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.account-text strong, .account-text small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-text strong { font-weight: 600; font-size: 14px; }
.account-text small { color: var(--text-muted); font-size: 12px; font-weight: 400; }
/* Light / dark: top right of the sidebar, next to the logo. */
.sidebar-top { display: flex; align-items: flex-start; justify-content: space-between; }
.sidebar-top .theme-toggle { flex: none; width: 32px; height: 32px; margin-top: 4px; }
.sidebar-top .theme-toggle svg { width: 16px; height: 16px; display: block; }
@media (min-width: 801px) { .topbar { display: none; } .page-head { padding-top: 40px; } }

/* ---------- phone: logo + account on top, main places as a bottom tab bar ---------- */
@media (max-width: 800px) {
  .shell { flex-direction: column; }
  .sidebar { display: none; }
  .topbar { padding: 12px 16px; padding-top: max(12px, env(safe-area-inset-top)); border-bottom: 1px solid var(--border); }
  .mobile-logo { display: flex; padding: 0; margin-right: auto; font-size: 17px; }
  .mobile-logo .logo-mark { width: 28px; height: 28px; font-size: 11px; border-width: 2.5px; }
  .topbar-studio { font-size: 14px; max-width: 40vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mobile-logout { display: block; }
  .mobile-logout button { display: grid; place-items: center; width: 36px; height: 36px; color: var(--text-muted); }
  .mobile-logout svg { width: 20px; height: 20px; }
  .page-head { padding: 16px 16px 16px; }
  .content { padding: 20px 16px; }
  .main { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }

  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); align-items: end;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    background: var(--surface); border-top: 1px solid var(--border);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .tab-item {
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    padding: 4px 0; color: var(--text-muted); font-size: 11px; font-weight: 600; text-decoration: none;
  }
  .tab-item svg { width: 22px; height: 22px; }
  .tab-item.active { color: var(--accent); }
  .tab-plus {
    display: grid; place-items: center; width: 40px; height: 40px; margin-top: -14px; border-radius: 50%;
    background: var(--accent); color: var(--on-accent); font-size: 24px; font-weight: 500; line-height: 1;
    box-shadow: 0 4px 12px rgba(16, 24, 40, .18);
  }
  .upload-tray { bottom: calc(80px + env(safe-area-inset-bottom)) !important; }
  button.tab-item { border: 0; background: none; font: inherit; font-size: 11px; font-weight: 600; cursor: pointer; }
}
/* "More" on phones: a sheet from the bottom with the other places. */
.more-overlay { position: fixed; inset: 0; z-index: 90; background: rgba(0,0,0,.32); opacity: 0; transition: opacity .32s ease;
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); touch-action: none; }
.more-overlay.open { opacity: 1; }
.more-sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 91; border-radius: 22px 22px 0 0;
  padding: 8px 16px calc(20px + env(safe-area-inset-bottom)); background: var(--page-base, #F2F2F0); color: var(--text);
  box-shadow: 0 -10px 40px rgba(0,0,0,.18); transform: translateY(100%);
  transition: transform .38s cubic-bezier(.32, .72, 0, 1); touch-action: none; overscroll-behavior: contain; will-change: transform; }
.more-sheet.open { transform: translateY(0); }
.more-sheet.dragging, .more-overlay.dragging { transition: none; }
.more-overlay[hidden], .more-sheet[hidden] { display: none; }
html.sheet-open, html.sheet-open body { overflow: hidden; overscroll-behavior: none; }
.more-grip { width: 40px; height: 5px; margin: 0 auto 14px; border-radius: 3px; background: var(--border); box-shadow: 0 0 0 14px transparent; cursor: grab; }
.more-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.more-item { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 6px 12px; border-radius: 16px;
  background: var(--surface); border: 1px solid var(--border); color: var(--text); font-size: 13px; font-weight: 600; text-decoration: none; }
.more-item svg { width: 26px; height: 26px; }
.more-item > span:not(.soon) { text-align: center; }
.more-item.active { color: var(--accent); border-color: var(--accent); }
.more-item.disabled { opacity: .45; }
.tab-icon { position: relative; display: block; line-height: 0; }
.tab-badge { position: absolute; top: -5px; right: -9px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px;
  background: var(--accent); color: var(--on-accent); font-size: 10.5px; font-weight: 700; line-height: 17px; text-align: center;
  box-shadow: 0 0 0 2px var(--surface); }
.new-list { display: flex; flex-direction: column; gap: 10px; }
.new-item { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 16px; background: var(--surface);
  border: 1px solid var(--border); color: var(--text); text-decoration: none; }
.new-item svg { flex: none; width: 24px; height: 24px; color: var(--accent); }
.new-item strong { display: block; font-size: 15px; }
.new-item small { display: block; font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }
@media (max-width: 800px) { .hide-on-phone { display: none !important; } }
.more-item .soon { position: absolute; top: 6px; right: 6px; font-size: 9.5px; padding: 1px 6px; border-radius: 999px; background: var(--bg); color: var(--text-muted); }

/* allauth's password rules list - keep it quiet */
.auth-card form span ul { color: var(--text-muted); font-size: 12px; margin: 4px 0 0; padding-left: 18px; }

/* ---------- lists, tabs, editor ---------- */
a.card { color: inherit; display: block; }
a.card:hover { border-color: var(--accent); }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.page-head .hint a { font-weight: 600; }
.section-title { font-size: 16px; margin: 32px 0 12px; }

.btn-create { text-decoration: none; }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-danger { background: var(--surface); color: var(--danger); border-color: var(--danger); }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 16px; }
.toolbar input[type="search"] {
  flex: 1 1 240px; max-width: 320px; padding: 9px 14px;
  border: 1px solid var(--border); border-radius: var(--radius-pill); font: inherit; background: var(--surface);
}
.toolbar-link { margin-left: auto; font-weight: 600; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tab {
  padding: 6px 14px; border-radius: var(--radius-pill); border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font-weight: 600;
}
.tab.active { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.tab:focus { outline: none; }
.tab:focus-visible { border-color: var(--text-muted); }

.table-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.row {
  display: grid; grid-template-columns: 2fr 1fr 1.6fr 1.3fr; gap: 16px; align-items: center;
  padding: 14px 20px; border-top: 1px solid var(--border); color: var(--text);
}
.row:first-child { border-top: none; }
a.row:hover { background: var(--bg); }
.row-head { font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; }
.row-main { font-weight: 600; }
.row-main small { display: block; font-weight: 400; color: var(--text-muted); }
.row-sub { color: var(--text-muted); }
.pill {
  display: inline-block; margin: 2px 4px 2px 0; padding: 1px 8px; border-radius: var(--radius-pill);
  font-size: 12px; font-weight: 600; background: var(--bg); border: 1px solid var(--border); color: var(--text-muted);
}
.pill-editing { background: #fff6e5; border-color: #f5d49a; color: #8a5a00; }
.pill-almost { background: var(--accent-soft); border-color: #b9d3ff; color: var(--accent); }
.pill-delivered { background: #e9f7ef; border-color: #b6e2c6; color: #1c7a43; }

.editor-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; }
.editor-grid .span-2 { grid-column: 1 / -1; }
.editor h2 { font-size: 15px; margin-bottom: 16px; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-weight: 600; }
.field-hint { color: var(--text-muted); font-size: 13px; }
.field .errorlist, .film-title .errorlist { color: var(--danger); list-style: none; padding: 0; margin: 0; font-size: 13px; }
.has-error input { border-color: var(--danger); }
input[type="date"], input[type="tel"], input[type="time"], input[type="datetime-local"] {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); font: inherit; background: var(--surface);
}
/* iPhone: date fields have their own minimum width and centred text, which
   pushed them (and the card) past the screen edge. */
input[type="date"], input[type="time"], input[type="datetime-local"] {
  display: block; min-width: 0; max-width: 100%; min-height: 44px; -webkit-appearance: none; appearance: none; text-align: left;
}
input:is([type="date"], [type="time"], [type="datetime-local"])::-webkit-date-and-time-value { text-align: left; }
.checklist { display: flex; flex-direction: column; gap: 8px; }
.checklist > div, .checklist ul { display: contents; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.check.danger { color: var(--danger); }
.film-rows { display: flex; flex-direction: column; gap: 10px; }
.film-row { display: grid; grid-template-columns: 2fr 1fr 160px 90px; gap: 12px; align-items: center; }
.editor-actions { display: flex; gap: 10px; margin-top: 20px; }
.danger-zone { display: flex; justify-content: flex-end; gap: 10px; margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--border); }
.danger-zone form { margin: 0; }
.danger-zone { flex-wrap: wrap; }
.danger-zone .btn { white-space: nowrap; }
.call-join { text-align: right; white-space: nowrap; }
.data-table td .btn-small { margin-top: 0; }  /* buttons in a row sit level with the text */
@media (max-width: 800px) { .data-table td.call-join { text-align: left; padding-top: 4px; } .data-table td.call-join:empty { display: none; } }
@media (max-width: 800px) {
  .danger-zone { display: grid; grid-template-columns: repeat(3, 1fr); }
  .danger-zone .btn, .danger-zone form .btn { width: 100%; padding-left: 8px; padding-right: 8px; }
}

@media (max-width: 800px) {
  .editor-grid, .field-grid { grid-template-columns: 1fr; }
  .row { grid-template-columns: 1fr 1fr; }
  .row-head { display: none; }
  .film-row { grid-template-columns: 1fr 1fr; }
  .page-head { flex-direction: column; align-items: flex-start; }
}

/* ---------- status dropdown ---------- */
.row { grid-template-columns: 1.8fr 0.9fr 1.1fr 1.5fr 1.2fr; }
.field.span-2 { grid-column: 1 / -1; }
.tone-gray   { --tone-bg: #f1f1ef; --tone-fg: #5a5a57; }
.tone-brown  { --tone-bg: #f4eeee; --tone-fg: #7a4f3c; }
.tone-orange { --tone-bg: #fbecdd; --tone-fg: #a65200; }
.tone-yellow { --tone-bg: #fbf3db; --tone-fg: #8a6a00; }
.tone-green  { --tone-bg: #e6f3ea; --tone-fg: #1f7a45; }
.tone-blue   { --tone-bg: #e5f0fb; --tone-fg: #1d5fa8; }
.tone-purple { --tone-bg: #efe9f8; --tone-fg: #6a3fa8; }
.tone-pink   { --tone-bg: #f9e8f1; --tone-fg: #a8336d; }
.tone-red    { --tone-bg: #fbe4e2; --tone-fg: #b3261e; }
.pill[class*="tone-"] { background: var(--tone-bg); color: var(--tone-fg); border-color: transparent; font-size: 13px; }

.status-picker, .multi-select { position: relative; }
.pill-removable { display: inline-flex; align-items: center; gap: 4px; padding-right: 4px; }
.pill-x { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; font-size: 13px; line-height: 1; opacity: .6; cursor: pointer; }
.pill-x:hover, .pill-x:focus-visible { opacity: 1; background: color-mix(in srgb, currentColor 18%, transparent); outline: none; }
.status-trigger {
  width: 100%; min-height: 42px; text-align: left; padding: 8px 12px;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); font: inherit; cursor: pointer;
}
.status-trigger:hover { border-color: var(--accent); }
.status-placeholder { color: var(--text-muted); }
.status-menu {
  position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; width: 100%; max-width: 420px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: 0 12px 32px rgba(16, 24, 40, 0.14); padding: 8px;
}
.status-search { margin-bottom: 6px; }
.status-options { list-style: none; margin: 0; padding: 0; max-height: 300px; overflow-y: auto; }
.status-option {
  display: grid; grid-template-columns: 18px 1fr auto auto; align-items: center; gap: 6px;
  padding: 4px 6px; border-radius: var(--radius-sm);
}
.status-option:hover, .status-option.selected { background: var(--bg); }
.status-option.dragging { opacity: .4; }
.drag-handle { color: var(--text-muted); cursor: grab; font-size: 12px; letter-spacing: -2px; user-select: none; }
.status-choose, .status-color-btn, .status-delete, .status-create, .link-btn {
  background: none; border: 0; padding: 4px; font: inherit; cursor: pointer; text-align: left;
}
.status-delete { color: var(--text-muted); font-size: 16px; line-height: 1; }
.status-delete:hover { color: var(--danger); }
.status-create { width: 100%; padding: 8px 6px; border-radius: var(--radius-sm); color: var(--text-muted); }
.status-create:hover { background: var(--bg); }
.status-empty { color: var(--text-muted); font-size: 13px; margin: 6px; }
.swatch { display: inline-block; width: 16px; height: 16px; border-radius: 4px; background: var(--tone-bg); border: 1px solid var(--tone-fg); }
.color-row { grid-column: 1 / -1; display: flex; gap: 6px; padding: 6px 0 4px 24px; }
.color-row .swatch { cursor: pointer; padding: 0; width: 20px; height: 20px; }
.color-row .swatch.active { outline: 2px solid var(--accent); outline-offset: 1px; }

/* ---------- activity + films ---------- */
.activity { list-style: none; margin: 0; padding: 0; max-height: 520px; overflow-y: auto; }
.activity li { padding: 10px 0; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 2px; }
.activity li:first-child { border-top: none; padding-top: 0; }
.activity time { color: var(--text-muted); font-size: 12px; }
.link-btn.danger { color: var(--danger); font-weight: 500; }
.btn-small { padding: 7px 14px; margin-top: 12px; }
@media (max-width: 800px) { .row { grid-template-columns: 1fr 1fr; } }

/* ---------- custom properties ---------- */
.add-prop { margin-top: 14px; }
.add-prop-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
.add-prop-form input { flex: 1 1 200px; width: auto; }
.add-prop-form select { width: auto; }
.add-prop-form .btn-small { margin-top: 0; }
.add-prop .field-hint { margin: 8px 0 0; }
.prop-delete { background: none; border: 0; color: var(--text-muted); cursor: pointer; font-size: 15px; padding: 0 4px; visibility: hidden; }
.custom-prop:hover .prop-delete, .prop-delete:focus { visibility: visible; }
.prop-delete:hover { color: var(--danger); }
input[type="number"], input[type="url"] {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); font: inherit; background: var(--surface);
}

/* ---------- couples table ---------- */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  text-align: left; padding: 12px 20px; font-size: 12px; font-weight: 600; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid var(--border);
}
.data-table td { padding: 12px 20px; border-top: 1px solid var(--border); vertical-align: middle; }
.data-table tbody tr:first-child td { border-top: none; }
.data-table tbody tr { cursor: pointer; }
.data-table tbody tr:hover { background: var(--bg); }
.cell-main a { color: var(--text); font-weight: 600; white-space: nowrap; }
.cell-main small { display: block; color: var(--text-muted); }
.cell-sub { color: var(--text-muted); white-space: nowrap; }
/* Status column is exactly as wide as the widest status; every pill in it
   stretches to that same width so the column reads as a neat stack. */
.data-table .col-status { width: 1%; white-space: nowrap; }
.data-table td.col-status .pill { display: block; margin: 3px 0; text-align: center; }
.status-trigger .pill { margin: 2px 4px 2px 0; }
.tick { display: inline-block; width: 16px; color: var(--accent); font-weight: 700; }
@media (max-width: 800px) {
  .data-table th:nth-child(4), .data-table td:nth-child(4) { display: none; }
  .data-table th, .data-table td { padding: 10px 12px; }
}

/* ---------- remove film: confirm + hold ---------- */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.film-remove { margin-top: 0; }
.film-row { grid-template-columns: 2fr 1fr 160px 100px; }
.confirm-dialog {
  border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; width: min(420px, calc(100% - 32px));
  box-shadow: 0 20px 48px rgba(16, 24, 40, 0.22); color: var(--text);
}
.confirm-dialog::backdrop { background: rgba(16, 24, 40, 0.45); }
.confirm-dialog h3 { color: var(--brand); font-size: 18px; margin: 0 0 8px; }
.confirm-dialog p { color: var(--text-muted); margin: 0 0 20px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; }
.frame-dialog { width: min(960px, calc(100% - 32px)); }
.frame-dialog video { display: block; width: 100%; max-height: 60vh; background: #000; border-radius: 6px; margin-bottom: 16px; }
.frame-dialog .dialog-actions { align-items: center; flex-wrap: wrap; }
.frame-error { color: var(--danger) !important; }
.hold-btn {
  position: relative; overflow: hidden; min-width: 170px; user-select: none; -webkit-user-select: none; touch-action: none;
  background: var(--danger); color: #fff;
}
.hold-fill { position: absolute; inset: 0; width: 0; background: rgba(0, 0, 0, 0.35); transition: width 0.25s ease-out; }
.hold-btn.holding .hold-fill { width: 100%; transition: width 1.5s linear; }
.hold-label { position: relative; }
@media (max-width: 800px) { .film-row { grid-template-columns: 1fr 1fr; } }

/* status menu: centred colour swatch, bigger drag grip */
.status-option { grid-template-columns: 22px 1fr auto auto; }
.drag-handle { display: flex; align-items: center; justify-content: center; color: #9ca3af; }
.drag-handle svg { width: 18px; height: 18px; fill: currentColor; }
.status-option:hover .drag-handle { color: var(--text-muted); }
.status-color-btn, .status-delete { display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; padding: 0; }
.status-color-btn .swatch { display: block; }
.status-choose { display: flex; align-items: center; }

/* ---------- couples column filter ---------- */
.toolbar-right { margin-left: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.toolbar-link { white-space: nowrap; }  /* on a phone a link moves to the next line instead of breaking in two */
.toolbar-right .toolbar-link { margin-left: 0; }
.column-picker { position: relative; }
.filter-menu { max-height: 70vh; overflow-y: auto; }
.filter-menu .check { display: flex; align-items: center; gap: 8px; padding: 4px 2px; cursor: pointer; }
.filter-menu .check input { width: auto; margin: 0; }
.filter-menu .column-menu-title:not(:first-child) { margin-top: 10px; }
.filter-clear { display: block; margin-top: 10px; font-weight: 600; font-size: 13px; }
.column-picker-btn { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-weight: 600; cursor: pointer; }
.column-picker-btn svg { width: 16px; height: 16px; }
.column-menu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 230px; max-height: 420px; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: 0 12px 32px rgba(16, 24, 40, 0.14); padding: 10px 14px; display: flex; flex-direction: column; gap: 8px;
}
.column-menu-title { margin: 0 0 2px; font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; }
.check.disabled { color: var(--text-muted); }
.table-scroll { overflow-x: auto; }
.data-table td.cell-sub { max-width: 260px; overflow: hidden; text-overflow: ellipsis; }

/* ---------- films checklist + settings ---------- */
.film-options { display: flex; flex-direction: column; gap: 8px; }
.film-option {
  display: grid; grid-template-columns: 1fr 200px 170px; gap: 12px; align-items: center;
  padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface);
}
.film-option.checked { border-color: var(--accent); background: var(--accent-soft); }
.film-option:not(.checked) select, .film-option:not(.checked) .check:not(.film-pick) { opacity: .35; pointer-events: none; }
.film-pick { font-weight: 600; }
.film-pick small { font-weight: 400; margin-left: 6px; }
.settings-card { max-width: 640px; }
.billing .settings-card { max-width: none; }  /* Plan & billing: the plans side by side, full width */
.settings-card h2 { font-size: 16px; margin-bottom: 4px; }
.film-type-list { list-style: none; margin: 16px 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.film-type { display: grid; grid-template-columns: 22px 1fr 28px; gap: 8px; align-items: center; }
.film-type.dragging { opacity: .4; }
.film-type .drag-handle { cursor: grab; }
.saved-flash { border-color: #1f7a45 !important; box-shadow: 0 0 0 2px #e6f3ea; }
@media (max-width: 800px) { .film-option { grid-template-columns: 1fr; } }

/* films: + Add / Delete instead of checkboxes */
.film-option { grid-template-columns: 1fr 200px 170px 110px; }
.film-option .when-on { display: none; }
.film-option.checked .when-on { display: revert; }
.film-option.checked .when-off { display: none; }
.film-option:not(.checked) { background: var(--bg); border-style: dashed; }
.film-option:not(.checked) .fname { color: var(--text-muted); }
.film-option .when-off { grid-column: 4; justify-self: end; margin-top: 0; }
.film-option .btn-small { margin-top: 0; justify-self: end; }
.film-option .fname { font-weight: 600; }
.film-name small { margin-left: 6px; }
@media (max-width: 800px) { .film-option { grid-template-columns: 1fr 1fr; } .film-option .when-off { grid-column: auto; } }

/* extras + settings sections */
.section-hint { margin: -8px 0 14px; }
.settings-stack { display: flex; flex-direction: column; gap: 16px; }
/* Settings in tabs, one part at a time; on a phone the row swipes sideways. */
.settings-tabs { display: flex; gap: 4px; margin: 0 0 24px; box-shadow: inset 0 -1px 0 var(--border);
  overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.settings-tabs::-webkit-scrollbar { display: none; }
.settings-tab { flex: none; padding: 9px 12px 11px; border-bottom: 2px solid transparent; border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  color: var(--text-muted); font-weight: 600; white-space: nowrap; }
.settings-tab:hover { color: var(--text); }
.settings-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
/* No browser box around a tab (Chrome draws one when you come back to the window);
   with the keyboard the tab gets a soft background instead. */
.settings-tab:focus { outline: none; }
.settings-tab:focus-visible { background: var(--surface); color: var(--text); }
.settings-pane[hidden] { display: none; }
@media (max-width: 700px) {
  .settings-tabs { gap: 20px; margin: 0 -16px 20px; padding: 0 16px;
    mask-image: linear-gradient(to right, transparent, #000 16px, #000 calc(100% - 28px), transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, #000 16px, #000 calc(100% - 28px), transparent); }
  .settings-tab { padding: 12px 0; }
}
.film-type { grid-template-columns: 22px 1fr; align-items: start; padding: 8px 8px 8px 10px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); transition: border-color .2s, box-shadow .2s; }
.film-type-list { gap: 8px; }
.film-type.open, .package-row.open { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 10%, transparent); }
.film-type .drag-handle, .film-type .status-delete { margin-top: 10px; }
.type-fields { display: flex; flex-direction: column; min-width: 0; }
.type-head { display: flex; align-items: center; gap: 6px; }
.type-head .type-name { flex: 1; min-width: 0; font-weight: 600; border-color: transparent; background: transparent; }
.type-head .type-name:hover, .type-head .type-name:focus { border-color: var(--border); background: var(--surface); }
.type-head { cursor: pointer; }
.type-toggle { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex: none; min-width: 92px; height: 36px; padding: 0 8px; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--text-muted); font: inherit; font-size: 13px; cursor: pointer; }
.type-toggle:focus { outline: none; }
.type-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.type-includes { display: flex; flex-direction: column; gap: 6px; }
.type-includes .field-hint { margin: 0; }
.type-include-box { display: flex; flex-direction: column; gap: 6px; padding-left: 26px; }
.type-include-box[hidden] { display: none; }
.type-include-list:not(.is-ready) { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 14px; }
.type-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.type-foot .btn.type-delete { color: var(--danger); }
.type-toggle:hover { background: var(--bg); color: var(--text); }
.type-toggle svg { width: 16px; height: 16px; transition: transform .25s ease; }
.open .type-toggle svg { transform: rotate(180deg); }
.type-more { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .3s cubic-bezier(.22, .8, .24, 1); }
.type-more > div { overflow: hidden; min-height: 0; display: flex; flex-direction: column; gap: 6px; }
.open > * > .type-more { grid-template-rows: 1fr; }
.open > * > .type-more > div { padding-top: 8px; }
.film-type.open:has(.tag-picker.is-open) .type-more > div { overflow: visible; }
@media (prefers-reduced-motion: reduce) { .type-more, .type-toggle svg { transition: none; } }
.type-description { font-size: 13px; color: var(--text-muted); }
.type-price { position: relative; display: block; max-width: 180px; }
.type-price span { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); font-size: 13px; color: var(--text-muted); pointer-events: none; }
.type-price input { padding-left: 24px; font-size: 13px; }
.type-parts { display: flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; }
.type-parts input { width: auto; margin: 0; }

/* Settings > Payments */
.pay-status { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 10px 0 12px; }
.pay-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok, #1fa85a); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok, #1fa85a) 25%, transparent); }
.pay-badge { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: color-mix(in srgb, var(--blue, #8FAAB3) 22%, transparent); color: var(--blue-ink, #4f6b74); }
.pay-badge.live { background: color-mix(in srgb, var(--green, #8B9187) 22%, transparent); color: var(--green-ink, #5f6559); }
.pay-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.pay-actions form { margin: 0; }
.pay-orders { list-style: none; margin: 14px 0 0; padding: 0; border-top: 1px solid var(--border); }
.pay-orders li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.pay-orders .muted { color: var(--text-muted); }

/* status pills side by side in the couples list */
.data-table .col-status { width: auto; }
.data-table td.col-status { white-space: nowrap; }
.data-table td.col-status .pill { display: inline-block; margin: 2px 4px 2px 0; text-align: left; }

/* draggable Details fields */
.sortable-field label { display: flex; align-items: center; gap: 4px; }
.field-grip { display: inline-flex; width: 16px; margin-left: -20px; color: #9ca3af; cursor: grab; opacity: 0; transition: opacity .15s; }
.field-grip svg { width: 16px; height: 16px; fill: currentColor; }
.sortable-field:hover .field-grip { opacity: 1; }
.sortable-field.dragging { opacity: .4; }
@media (hover: none) { .field-grip { opacity: 1; margin-left: 0; } }

/* settings: estimated delivery */
.delivery-form { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; margin-top: 12px; }
.delivery-form .field-hint { margin: -4px 0 0; }
.delivery-time { display: flex; flex-direction: column; gap: 6px; }
.delivery-time label { font-weight: 600; }
.inline-fields { display: flex; gap: 8px; }
.inline-fields input[type="number"] {
  width: 90px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); font: inherit;
}
.inline-fields select { width: auto; }
.delivery-form .btn-small { margin-top: 4px; }

/* One consistent dropdown everywhere: own chevron with proper spacing,
   same height as text inputs. */
select {
  -webkit-appearance: none; appearance: none;
  padding: 10px 38px 10px 12px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font: inherit; color: var(--text); line-height: 1.5;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E") no-repeat right 12px center / 14px 14px;
  cursor: pointer;
}
select:hover { border-color: #cbd5e1; }
.add-prop-form select, .inline-fields select { width: auto; min-width: 110px; }

/* reorderable couples columns */
.column-items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.column-item { display: flex; align-items: center; gap: 6px; padding: 3px 4px; border-radius: 6px; }
.column-item:hover { background: var(--bg); }
.column-item.dragging, .data-table th.dragging { opacity: .4; }
.column-item .drag-handle { cursor: grab; width: 16px; }
.column-item .drag-handle svg { width: 14px; height: 14px; }
.data-table th[draggable="true"] { cursor: grab; user-select: none; }
.data-table th[draggable="true"]:hover { color: var(--text); }

/* settings groups + thank you messages */
.settings-group { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); margin: 12px 0 -4px; }
.settings-group:first-child { margin-top: 0; }
.settings-group-hint { margin: -10px 0 0; }
.message-list { list-style: none; margin: 16px 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.message-item { display: flex; flex-direction: column; gap: 8px; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg); }
.message-item.dragging { opacity: .4; }
.message-head { display: grid; grid-template-columns: 22px 1fr auto 28px; gap: 8px; align-items: center; }
.message-head .drag-handle { cursor: grab; }
.default-pick { font-size: 13px; white-space: nowrap; }
.msg-text { width: 100%; }
code { background: var(--bg); border: 1px solid var(--border); border-radius: 4px; padding: 0 4px; font-size: 12px; }
.thank-you-custom { margin-top: 14px; }
.thank-you-tools { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.thank-you-tools .link-btn { color: var(--accent); font-weight: 600; padding: 0; }
.thank-you-preview { margin-top: 16px; padding: 14px 16px; background: var(--bg); border-radius: var(--radius-sm); }
#thank-you-preview { white-space: pre-line; color: var(--text); }
#thank-you-card select { width: 100%; }

/* film files */
.film-option { row-gap: 8px; }
.film-file { grid-column: 1 / -1; }
.film-option.checked .film-file.when-on { display: block; }
.film-upload { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding-top: 8px; border-top: 1px dashed #c9dafc; }
.film-upload .file-info { flex: 1 1 160px; min-width: 0; overflow-wrap: anywhere; } /* long file names wrap instead of running under the button */
.film-upload .file-info a { font-weight: 600; }
.film-upload .btn-small { margin-top: 0; }
.upload-progress { flex-basis: 100%; height: 6px; background: #dbe7fd; border-radius: 999px; overflow: hidden; }
.upload-progress span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.upload-error { color: var(--danger); font-weight: 500; }
.dashboard-link { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.dashboard-link input { flex: 1; font-size: 13px; color: var(--text-muted); }
.dashboard-link .btn-small { margin-top: 0; }
#thank-you-card > .field-hint { margin: 0 0 16px; }

/* settings: couple dashboard look */
.branding-row { display: grid; grid-template-columns: 130px 1fr; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--border); }
.branding-row:first-of-type { margin-top: 12px; }
.branding-label { font-weight: 600; }
.branding-row .film-upload { border-top: 0; padding-top: 0; }
.logo-preview { max-height: 48px; max-width: 200px; display: block; }
.dashboard-texts { display: flex; flex-direction: column; gap: 14px; margin-top: 12px; align-items: stretch; }
.dashboard-texts .btn-small { align-self: flex-start; }
.header-field { margin-top: 16px; }
.header-field .film-upload { border-top: 0; padding-top: 0; }

/* background upload tray */
.upload-tray {
  position: fixed; right: 24px; bottom: 24px; z-index: 50; width: min(380px, calc(100vw - 32px));
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: 0 16px 40px rgba(16, 24, 40, 0.18); padding: 10px 14px; display: flex; flex-direction: column; gap: 10px;
  max-height: 50vh; overflow-y: auto;
}
.tray-item + .tray-item { border-top: 1px solid var(--border); padding-top: 10px; }
.tray-row { display: flex; align-items: center; gap: 10px; }
.tray-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.tray-status { color: var(--text-muted); font-variant-numeric: tabular-nums; }
.tray-done .tray-status { color: #1f7a45; font-weight: 600; }
.tray-error .tray-status { color: var(--danger); font-weight: 600; }
.tray-bar { height: 6px; background: var(--accent-soft); border-radius: 999px; overflow: hidden; margin-top: 8px; }
.tray-bar span { display: block; height: 100%; background: var(--accent); transition: width .2s; }
.tray-error { color: var(--danger); font-size: 13px; margin-top: 4px; }
.tray-close { background: none; border: 0; font-size: 18px; line-height: 1; color: var(--text-muted); cursor: pointer; padding: 0 2px; }
@media (max-width: 800px) { .upload-tray { right: 16px; } }

/* film stills in the studio */
.film-still { display: flex; gap: 14px; align-items: center; padding-top: 8px; border-top: 1px dashed #c9dafc; margin-bottom: 8px; }
.still-thumb { width: 180px; flex-shrink: 0; aspect-ratio: 3840 / 1640; border-radius: 6px; overflow: hidden; background: var(--bg); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; font-size: 12px; color: var(--text-muted); }
.still-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.film-still .film-upload { flex: 1; border-top: 0; padding-top: 0; }
@media (max-width: 800px) { .film-still { flex-direction: column; align-items: stretch; } .still-thumb { width: 100%; } }

/* Open Couple Dashboard from the couples list */
.data-table .col-open { width: 1%; white-space: nowrap; text-align: right; }
.open-dashboard { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border: 1px solid var(--border); border-radius: var(--radius-pill);
  color: var(--text); font-weight: 600; font-size: 13px; background: var(--surface); }
.open-dashboard svg { width: 14px; height: 14px; }
.open-dashboard:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Delivery Page builder ---------- */
.builder { display: grid; grid-template-columns: minmax(320px, 420px) 1fr; gap: 20px; align-items: start; }
.builder-panel { display: flex; flex-direction: column; gap: 14px; }
.builder-tabs { flex-wrap: wrap; }
.builder-tabs .tab { font: inherit; font-weight: 600; cursor: pointer; }
.builder-section h2 { font-size: 16px; margin-bottom: 6px; }
.color-field { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); }
.color-field:first-of-type { border-top: 0; }
.color-field label { font-weight: 600; }
.color-inputs { display: flex; align-items: center; gap: 8px; }
.color-inputs input[type="color"] { width: 40px; height: 36px; padding: 2px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); cursor: pointer; }
.color-hex { width: 96px !important; font-family: ui-monospace, monospace; font-size: 13px; }
.builder-actions { display: flex; gap: 8px; margin-top: 12px; }
.builder-actions .btn-small { margin-top: 0; }
.builder-preview { position: sticky; top: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.preview-bar { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.preview-bar label { font-weight: 600; white-space: nowrap; }
.preview-bar select { flex: 1; min-width: 0; }
.preview-bar .btn-small { margin-top: 0; }
#preview-frame { display: block; width: 100%; height: calc(100vh - 150px); min-height: 560px; border: 0; background: #fff; }
@media (max-width: 1100px) { .builder { grid-template-columns: 1fr; } .builder-preview { position: static; } }

/* ---------- builder: languages ---------- */
.lang-pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 4px; }
.lang-pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface); color: var(--text); font: inherit; font-weight: 500; text-decoration: none; cursor: pointer; }
.lang-pill.active { border-color: var(--brand); color: var(--brand); box-shadow: 0 0 0 1px var(--brand) inset; }
.lang-pill .field-hint { font-size: 12px; }
#language-form { margin-top: 16px; }

/* ---------- couples list: sort by clicking a column header ---------- */
.sort-link { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.sort-link:hover { color: var(--text); }
.sort-arrow { opacity: 0; font-size: 12px; }
.sort-link:hover .sort-arrow { opacity: .4; }
.sort-link.sorted { color: var(--text); }
.sort-link.sorted .sort-arrow { opacity: 1; }
.style-options { display: flex; gap: 18px; }

/* =====================================================================
   Glass themes: light and dark
   <html data-mode="light|dark"> (set in base.html from the person's choice:
   Light, Dark or System). Both are frosted glass panes over a warm glow;
   the tokens below decide the colours, the rules after them are shared.
   ===================================================================== */
:root[data-mode="light"] {
  color-scheme: light;
  --brand: #1C1C1C;
  --accent: #FF5A00;
  --accent-soft: rgba(255, 90, 0, .10);
  --bg: rgba(28, 28, 28, .04);
  --surface: rgba(255, 255, 255, .62);
  --border: rgba(28, 28, 28, .10);
  --text: #1C1C1C;
  --text-muted: rgba(28, 28, 28, .58);
  --danger: #c0392b;
  --on-accent: #1c1c1c;  /* text on orange: dark, for contrast (5.5:1) */
  --on-danger: #fff;
  --shadow: 0 10px 30px rgba(28, 28, 28, .08);
  --glass-edge: inset 1px 1px 0 rgba(255, 255, 255, .9), inset -1px -1px 0 rgba(255, 255, 255, .35);
  --field-bg: rgba(255, 255, 255, .6);
  --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%236b5a4e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
  --page-base: #F2F2F0;
  --glow-1: rgba(255, 90, 0, .16);
  --glow-2: rgba(217, 208, 199, .55);
  --glow-3: rgba(217, 208, 199, .50);
  --glow-4: rgba(255, 90, 0, .08);
  --bar-bg: rgba(242, 242, 240, .82);
  --tone-mix: 16%;
  --beige: #D9D0C7;
  --green: #8B9187;
  --green-ink: #5f6559;
  --ok: #1fa85a;  /* confirmed: connected, verified, found */
  --blue: #8FAAB3;
  --blue-ink: #4f6b74;
}
:root[data-mode="dark"] {
  color-scheme: dark;
  --brand: #F2F2F0;
  --accent: #FF5A00;
  --accent-soft: rgba(255, 90, 0, .16);
  --bg: rgba(255, 255, 255, .04);
  --surface: rgba(255, 255, 255, .07);
  --border: rgba(255, 255, 255, .12);
  --text: #F2F2F0;
  --text-muted: rgba(242, 242, 240, .58);
  --danger: #ff7a6b;
  --on-accent: #1c1c1c;
  --on-danger: #1c1c1c;
  --shadow: 0 12px 32px rgba(0, 0, 0, .28);
  --glass-edge: inset 1px 1px 0 rgba(255, 255, 255, .10), inset -1px -1px 0 rgba(255, 255, 255, .03);
  --field-bg: rgba(0, 0, 0, .22);
  --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23d9cec5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
  --page-base: #1C1C1C;
  --glow-1: rgba(255, 90, 0, .22);
  --glow-2: rgba(217, 208, 199, .14);
  --glow-3: rgba(255, 90, 0, .12);
  --glow-4: rgba(217, 208, 199, .10);
  --bar-bg: rgba(28, 28, 28, .78);
  --tone-mix: 18%;
  --beige: #D9D0C7;
  --green: #8B9187;
  --green-ink: #b9bfb4;
  --ok: #3ccf7a;
  --blue: #8FAAB3;
  --blue-ink: #b7ccd3;
}
:root[data-mode] { --glass-blur: blur(24px) saturate(150%); }
[data-mode] body {
  background-color: var(--page-base);
  background-image:
    radial-gradient(55% 45% at 18% -5%, var(--glow-1), transparent 70%),
    radial-gradient(45% 40% at 95% 25%, var(--glow-2), transparent 70%),
    radial-gradient(60% 50% at 60% 115%, var(--glow-3), transparent 70%),
    radial-gradient(40% 35% at 5% 85%, var(--glow-4), transparent 70%);
  background-attachment: fixed;
  accent-color: var(--accent);
}
[data-mode] ::placeholder { color: var(--text-muted); }

/* glass panes */
[data-mode] :is(.sidebar, .card, .table-card, .status-menu, .column-menu, .confirm-dialog, .upload-tray, .tabbar) {
  background: var(--surface);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border-color: var(--border);
  box-shadow: var(--glass-edge), var(--shadow);
}
[data-mode] .film-option.checked {
  background: var(--surface); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-edge), var(--shadow);
}
[data-mode] :is(.card, .table-card) { border-radius: 18px; }
[data-mode] .sidebar { background: color-mix(in srgb, var(--surface) 65%, transparent); border-right: 1px solid var(--border); box-shadow: none; }
[data-mode] :is(.topbar, .page-head) { background: transparent; border-color: var(--border); }
[data-mode] .confirm-dialog { background: color-mix(in srgb, var(--page-base) 85%, transparent); color: var(--text); }
[data-mode] .tabbar { background: var(--bar-bg); border-top-color: var(--border); }
/* Phone top bar: sits on the top of the page, see-through; it turns frosted
   only once the page scrolls under it (.scrolled, set by topbar.js). */
@media (max-width: 800px) {
  [data-mode] .topbar { position: sticky; top: 0; z-index: 30; background: transparent; border-bottom-color: transparent;
    transition: background-color .25s ease, border-color .25s ease, -webkit-backdrop-filter .25s ease, backdrop-filter .25s ease; }
  [data-mode] .topbar.scrolled { background: var(--bar-bg); border-bottom-color: var(--border);
    -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); }
  .topbar { padding-top: max(18px, calc(env(safe-area-inset-top) + 8px)); padding-bottom: 16px; }
  .topbar .mobile-logo .logo-mark { width: 40px; height: 38px; }
  /* Under the phone's status bar (one flat colour): fade the warm glow into
     that same colour, so there's no visible band at the top. */
  [data-mode] body::before { content: ""; position: fixed; left: 0; right: 0; top: 0; z-index: -1; pointer-events: none;
    height: calc(env(safe-area-inset-top) + 90px);
    background: linear-gradient(var(--page-base) calc(env(safe-area-inset-top) + 4px), transparent); }
}

/* form controls */
[data-mode] :is(input[type="email"], input[type="password"], input[type="text"], input[type="search"], input[type="number"],
  input[type="date"], input[type="time"], input[type="datetime-local"], input[type="tel"], input[type="url"], textarea, select, .status-trigger, .tag-picker-btn, .rich-notes) {
  background-color: var(--field-bg);
  color: var(--text);
  border-color: var(--border);
}
[data-mode] select { background-image: var(--chevron); }
[data-mode] :is(select, .status-trigger):hover { border-color: color-mix(in srgb, var(--text) 30%, transparent); }
[data-mode] select option { background: var(--page-base); color: var(--text); }
[data-mode] :is(input, textarea, select):focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }

/* buttons */
[data-mode] .btn { color: var(--on-accent); }
[data-mode] .btn-ghost { background: color-mix(in srgb, var(--text) 6%, transparent); color: var(--text); border-color: var(--border); }
[data-mode] .btn-ghost:hover { background: color-mix(in srgb, var(--text) 10%, transparent); filter: none; }
[data-mode] .btn-danger { background: color-mix(in srgb, var(--danger) 8%, transparent); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 50%, transparent); }
[data-mode] .btn-create { background: color-mix(in srgb, var(--text) 6%, transparent); color: var(--text); border-color: color-mix(in srgb, var(--text) 25%, transparent); }
[data-mode] .btn-create:hover { background: color-mix(in srgb, var(--text) 10%, transparent); }
[data-mode] .hold-btn { background: var(--danger); color: var(--on-danger); }
[data-mode] :is(.auth-card button, .auth-card form a[href] + button, .tab-plus) { color: var(--on-accent); }

/* nav */
[data-mode] .nav-item.active { background: var(--accent-soft); color: var(--accent); border-color: transparent; box-shadow: none; }
[data-mode] .nav-item:hover { background: color-mix(in srgb, var(--text) 6%, transparent); }

/* status colours, readable on both */
[data-mode="dark"] .tone-gray   { --tone-fg: #d6d3cf; }
[data-mode="dark"] .tone-brown  { --tone-fg: #e0b8a2; }
[data-mode="dark"] .tone-orange { --tone-fg: #ffb07a; }
[data-mode="dark"] .tone-yellow { --tone-fg: #f5d36b; }
[data-mode="dark"] .tone-green  { --tone-fg: #7fd69c; }
[data-mode="dark"] .tone-blue   { --tone-fg: #8ec1f5; }
[data-mode="dark"] .tone-purple { --tone-fg: #c3a4f0; }
[data-mode="dark"] .tone-pink   { --tone-fg: #f2a2c8; }
[data-mode="dark"] .tone-red    { --tone-fg: #ff9a8f; }
[data-mode] [class*="tone-"] { --tone-bg: color-mix(in srgb, var(--tone-fg) var(--tone-mix), transparent); }
[data-mode="dark"] .pill-editing { background: rgba(245, 211, 107, .14); border-color: transparent; color: #f5d36b; }
[data-mode="dark"] .pill-delivered { background: rgba(127, 214, 156, .14); border-color: transparent; color: #7fd69c; }
[data-mode] .pill-almost { background: var(--accent-soft); border-color: transparent; color: var(--accent); }

/* details that were light blue on white */
[data-mode] :is(.film-upload, .film-still) { border-top-color: var(--border); }
[data-mode] .upload-progress { background: color-mix(in srgb, var(--text) 10%, transparent); }
[data-mode] .film-option { background: color-mix(in srgb, var(--text) 3%, transparent); }
[data-mode] .film-option.checked { border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
[data-mode="dark"] .saved-flash { box-shadow: 0 0 0 2px rgba(127, 214, 156, .3); }
[data-mode="dark"] :is(.tray-done .tray-status, .saved-flash) { color: #7fd69c; }
[data-mode] .messages li { background: var(--accent-soft); color: var(--text); }
/* brand colours for feedback: green = done, blue = info, orange = needs attention */
[data-mode] .messages li.success { background: color-mix(in srgb, var(--green) 20%, transparent); }
[data-mode] .messages li.info { background: color-mix(in srgb, var(--blue) 20%, transparent); }
[data-mode] .messages li.error, [data-mode] .messages li.warning { background: var(--accent-soft); }
[data-mode] .messages li a { color: var(--accent); }
[data-mode] :is(.drag-handle, .field-grip) { color: color-mix(in srgb, var(--text) 35%, transparent); }
[data-mode] .data-table tbody tr:hover { background: color-mix(in srgb, var(--text) 4%, transparent); }

/* light / dark switch in the top bar */
.theme-toggle { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 1px solid var(--border); border-radius: 50%;
  background: color-mix(in srgb, var(--text) 5%, transparent); color: var(--text-muted); cursor: pointer; }
.theme-toggle:hover { color: var(--text); }
.theme-toggle svg { width: 17px; height: 17px; }
[data-mode="dark"] .theme-toggle .icon-moon, [data-mode="light"] .theme-toggle .icon-sun { display: none; }
.theme-options { display: flex; gap: 18px; margin-top: 10px; }

/* ---------- sidebar hover: gliding glass blob (static/js/nav-blob.js) ---------- */
.nav.has-blob { position: relative; }
.nav.has-blob .nav-item { position: relative; z-index: 1; background: transparent !important; box-shadow: none !important; border-color: transparent !important; }
.nav-blob {
  position: absolute; left: 0; right: 0; top: 0; height: 0; z-index: 0; opacity: 0; pointer-events: none;
  border-radius: var(--radius-sm);
  /* frosted glass with a little orange glow (the same as the buttons' hover below) */
  background: var(--glow-glass);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  backdrop-filter: blur(16px) saturate(180%);
  box-shadow: var(--glow-shadow);
  transition: opacity .2s ease; /* movement is animated from nav-blob.js */
}
:root {
  --glow-glass: linear-gradient(135deg, rgba(255, 255, 255, .55), color-mix(in srgb, var(--accent) 9%, rgba(255, 255, 255, .25)));
  --glow-shadow: var(--glass-edge, inset 0 0 0 1px rgba(255, 255, 255, .4)),
    0 0 0 1px color-mix(in srgb, var(--accent) 14%, transparent),
    0 4px 16px color-mix(in srgb, var(--accent) 20%, transparent), 0 6px 18px rgba(40, 20, 10, .06);
}
:root[data-mode="dark"] {
  --glow-glass: linear-gradient(135deg, rgba(255, 255, 255, .10), color-mix(in srgb, var(--accent) 12%, rgba(255, 255, 255, .04)));
  --glow-shadow: var(--glass-edge), 0 0 0 1px color-mix(in srgb, var(--accent) 22%, transparent),
    0 4px 18px color-mix(in srgb, var(--accent) 26%, transparent), 0 6px 18px rgba(0, 0, 0, .3);
}
/* The text (and its icon) fades to orange under the pointer. */
.nav-item, .nav-group-head { transition: color .3s ease; }
.nav.has-blob .nav-item:hover { color: var(--accent); }

/* Delivery Page builder: use the full width (same outer spacing as other pages) */
.content:has(> .builder), .content:has(> .mail-builder), .content:has(> .br-layout) { max-width: none; }
[data-mode] .builder-preview { border-radius: 18px; }
.tab-plus svg { width: 20px; height: 20px; display: block; }

/* builder preview bar: language switch first, example couple second */
.preview-bar { flex-wrap: wrap; row-gap: 8px; }
.preview-label { font-weight: 600; white-space: nowrap; }
.preview-couple-label { margin-left: 8px; font-weight: 500; color: var(--text-muted); }
.lang-switch { display: inline-flex; padding: 3px; gap: 2px; border: 1px solid var(--border); border-radius: 999px; background: var(--bg); }
.lang-switch-item { padding: 5px 14px; border-radius: 999px; color: var(--text-muted); font-weight: 600; font-size: 13px; text-decoration: none; white-space: nowrap; transition: background .2s, color .2s; }
.lang-switch-item:hover { color: var(--text); }
.lang-switch-item.active { background: var(--accent); color: var(--on-accent, #fff); }
.preview-bar select { flex: 1 1 180px; }

/* Popups (status dropdown, column filter, dialogs, upload tray) sit on top of
   content, so they're near-solid rather than see-through glass. */
[data-mode] :is(.status-menu, .column-menu, .confirm-dialog, .upload-tray, .tag-picker-pop) {
  background: color-mix(in srgb, var(--page-base) 88%, #fff 12%);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-shadow: var(--glass-edge), 0 18px 48px rgba(40, 20, 10, .22);
}
[data-mode="light"] :is(.status-menu, .column-menu, .confirm-dialog, .upload-tray, .tag-picker-pop, .bell-panel) { background: #fff; }

/* Couples list: full page width (same outer spacing as other pages) */
.content:has(#couples-table), .content:has(> .toolbar) { max-width: none; }
/* scrollbars that match the theme instead of a bright default bar */
[data-mode] .table-card { scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--text) 25%, transparent) transparent; }

/* builder: background blur slider + background image */
.blur-field { display: flex; align-items: center; gap: 12px; flex: 1; max-width: 240px; }
.blur-field input[type=range] { flex: 1; accent-color: var(--accent); border: 0; background: none !important; padding: 0; box-shadow: none; }
.blur-field output { min-width: 2ch; text-align: right; font-variant-numeric: tabular-nums; color: var(--text-muted); }
.background-row { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }
.background-preview { max-height: 64px; border-radius: 8px; }

.review-fields { display: flex; flex-direction: column; gap: 12px; width: 100%; }
[data-mode] input[type="url"] { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); font: inherit; }

/* builder on phones: columns may shrink to the screen; long rows wrap */
.builder > * { min-width: 0; }
@media (max-width: 1100px) { .builder { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 800px) {
  .color-field { flex-wrap: wrap; gap: 8px; }
  .branding-row { grid-template-columns: 1fr; }
  .blur-field { max-width: none; }
  .preview-bar select { min-width: 0; }
}

/* ---------- 23 Studios logo: the "23" mark + STUDIOS ---------- */
.logo { gap: 10px; }
.logo-mark {
  width: 34px; height: 32px; border: 0; border-radius: 0; flex-shrink: 0;
  background: var(--accent);
  -webkit-mask: url("../brand/23-mark.9c173119c243.svg") center / contain no-repeat;
  mask: url("../brand/23-mark.9c173119c243.svg") center / contain no-repeat;
}
.logo-lockup { display: none; }
.mobile-logo .logo-mark { width: 30px; height: 28px; }
/* Login and other standalone pages: the full logo, mark with STUDIOS under it */
.auth-card .logo-mark { display: none; }
.auth-card .logo-lockup {
  display: block; width: 92px; aspect-ratio: 520 / 586; background: var(--accent);
  -webkit-mask: url("../brand/23-studios-lockup.afe5b4459f42.svg") center / contain no-repeat;
  mask: url("../brand/23-studios-lockup.afe5b4459f42.svg") center / contain no-repeat;
}

/* builder: one couple at a time */
.preview-bar #builder-couple { flex: 0 1 320px; min-width: 0; }
.preview-note { flex: 1 1 0; min-width: 0; color: var(--text-muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.builder-section .branding-row:first-of-type { border-top: 0; }
#couple-form { margin-top: 6px; border-top: 1px solid var(--border); }
#couple-form .field { margin-top: 12px; }
.builder-empty { max-width: 560px; }
.preset-name { max-width: 200px; }
.preset-select { max-width: 220px; }
.preset-actions { margin-top: 8px; }
.preset-actions form { margin: 0; }
.builder-actions { flex-wrap: wrap; }

/* In the dashboard the mark stands alone. */
.sidebar .logo-mark { width: 40px; height: 38px; }

/* avatar opens Account */
a.avatar { text-decoration: none; transition: box-shadow .2s, transform .2s; }
a.avatar:hover, a.avatar.active { box-shadow: 0 0 0 2px var(--accent); }
.account-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); }
.account-row p { margin: 2px 0 0; }
.account-row .btn-small { margin-top: 0; }
.settings-card.account-card h2 { margin-bottom: 14px; }
.account-card form > .btn-small { margin-top: 16px; }
.account-card .field-hint { margin-top: 6px; }
.account-row { padding: 16px 0; }
.account-row:last-child { padding-bottom: 0; }
.account-row-first { margin-top: 24px; }
.currency-form { display: flex; align-items: center; gap: 10px; margin: 10px 0 4px; }
.currency-form label { font-weight: 600; }
.currency-form select { max-width: 260px; }
.dialog-label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 6px; }
.confirm-dialog input[name="confirm"] { width: 100%; margin-bottom: 18px; letter-spacing: .08em; }

/* ---------- Phone: feels like an app ----------
   iOS zooms into any field with text under 16px and then stays zoomed, which
   is what made pages scroll sideways. 16px fields stop that. Tables turn into
   a stack of cards instead of scrolling sideways. */
@media (max-width: 800px) {
  html, body { overflow-x: hidden; }
  html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
  input, select, textarea, [data-mode] input, [data-mode] select, [data-mode] textarea { font-size: 16px !important; }
  .table-card.table-scroll, .table-card { overflow-x: visible; }
  .data-table, .data-table tbody { display: block; width: 100%; }
  .data-table thead { display: none; }
  .data-table tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; row-gap: 4px;
    padding: 14px 16px; border-top: 1px solid var(--border); }
  .data-table tbody tr:first-child { border-top: 0; }
  .data-table td { display: block; padding: 0 !important; border: 0 !important; grid-column: 1; white-space: normal; min-width: 0; }
  .data-table td[hidden] { display: none; }
  .data-table td.cell-main { font-weight: 600; font-size: 16px; }
  .data-table td.col-open { grid-column: 2; grid-row: 1 / span 6; align-self: center; }
  .data-table td[data-label]::before { content: attr(data-label) " · "; color: var(--text-muted); opacity: .75; }
  .data-table td.col-status { width: auto; }
  .data-table td.col-status .pill { display: inline-block; margin: 2px 4px 2px 0; white-space: normal; max-width: 100%; }  /* a long status wraps instead of running under Open */
  .data-table td:nth-child(4):not([hidden]) { display: block; }
  .data-table td.cell-sub { font-size: 14px; }
}

/* Settings > Sending address */
.sender-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
.sender-form input { flex: 1 1 240px; min-width: 0; }
.sender-form .btn-small { margin-top: 0; }
.dns-table { margin: 12px 0; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; font-size: 12.5px; }
.dns-row { display: grid; grid-template-columns: 52px minmax(0, 1fr) minmax(0, 2fr) 20px; gap: 10px; padding: 8px 10px; border-top: 1px solid var(--border); align-items: start; }
.dns-row:first-child { border-top: 0; }
.dns-head { font-weight: 600; color: var(--text-muted); }
.dns-row code { word-break: break-all; font-size: 12px; user-select: all; }
.dns-ok { color: var(--ok, #1fa85a); font-weight: 700; }
.dns-bad { color: var(--danger, #c0392b); font-weight: 700; }
.dns-wait { color: var(--text-muted); }
@media (max-width: 800px) { .dns-row { grid-template-columns: 44px minmax(0, 1fr); } .dns-row .dns-value { grid-column: 1 / -1; } .dns-head span:nth-child(3) { display: none; } }
/* "Email couple" next to Delete on a delivered film */
.film-option:has(.film-mail-btn) { grid-template-columns: 1fr 200px 170px auto 110px; }
.film-mail-btn { white-space: nowrap; margin-top: 0; }
@media (max-width: 800px) { .film-option:has(.film-mail-btn) { grid-template-columns: 1fr; } }

/* ---------- Analytics ---------- */
.analytics-toolbar { justify-content: space-between; }
.stat-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat-change { margin-top: 6px; font-size: 12px; color: var(--text-muted); }
.stat-change.up { color: var(--green-ink, #5f6559); }
.stat-change.down { color: var(--accent); }
.analytics-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.analytics-grid h2 { font-size: 15px; margin-bottom: 12px; }
.bars { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 6px; align-items: end; height: 180px; }
.bar-col { display: flex; flex-direction: column; align-items: center; height: 100%; min-width: 0; }
.bar { flex: 1; width: 100%; display: flex; align-items: flex-end; }
.bar span { display: block; width: 100%; min-height: 2px; border-radius: 6px 6px 2px 2px; background: var(--accent); opacity: .85; }
.bar-label { font-size: 11px; color: var(--text-muted); margin-top: 6px; }
.bar-value { font-size: 10px; color: var(--text-muted); height: 14px; white-space: nowrap; overflow: hidden; max-width: 100%; }
.rank-list { list-style: none; margin: 0; padding: 0; }
.rank-list li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid var(--border); font-size: 13.5px; }
.rank-list li:first-child { border-top: 0; }
@media (max-width: 1000px) { .stat-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .analytics-grid { grid-template-columns: 1fr; } }
.paid-badge { display: inline-block; margin-top: 4px; font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: color-mix(in srgb, var(--green, #8B9187) 22%, transparent); color: var(--green-ink, #5f6559); }
.film-name { display: flex; flex-direction: column; align-items: flex-start; }

/* ---------- Tags ---------- */
.note-banner { padding: 12px 16px; margin-bottom: 16px; border-radius: var(--radius-sm); background: color-mix(in srgb, var(--blue, #8FAAB3) 18%, transparent); font-size: 13.5px; }
.tag-list { display: flex; flex-direction: column; }
.tag-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; padding: 14px 18px; border: 0; border-top: 1px solid var(--border); background: none; font: inherit; color: var(--text); text-align: left; cursor: pointer; }
.tag-row:first-child { border-top: 0; }
.tag-row:hover { background: var(--bg); }
.tag-row > span:first-child { display: flex; flex-direction: column; gap: 2px; }
.tag-dialog-actions { align-items: center; }
.tag-dialog-actions .spacer { flex: 1; }
#tag-dialog input[name="name"] { width: 100%; margin-bottom: 18px; }
/* Tags field on a couple */

/* ---------- Emails ---------- */
.email-tabs { margin-bottom: 16px; }
.merge-tags { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 0; }
.merge-tag { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; width: 100%; text-align: left; font: inherit; padding: 7px 10px;
  border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; }
.merge-tag:hover { border-color: var(--accent); }
.merge-tag[hidden] { display: none; }
.merge-tag-label { font-size: 13px; font-weight: 600; }
.merge-tag-hint { font-size: 12px; color: var(--text-muted); line-height: 1.35; }
.merge-tag code { font: 11px ui-monospace, monospace; color: var(--text-muted); }
.merge-tag:hover code { color: var(--accent); }

/* The builder: blocks on the left, the email itself in the middle. */
.mail-builder { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 18px; align-items: start; }
.mb-side { position: sticky; top: 84px; padding: 16px; display: flex; flex-direction: column; gap: 18px; max-height: calc(100vh - 100px); overflow: auto; }
.mb-side-title { display: block; margin: 0 0 6px; font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); }
.mb-side-section .field-hint { margin: 0 0 8px; }
.mb-side-section select, .mb-side-section input[type="text"] { width: 100%; }
.mb-add { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mb-add button { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 6px 11px; font: inherit; font-size: 13px;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); cursor: grab; transition: border-color .15s, transform .15s; }
.mb-add button:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }
.mb-add button:active { cursor: grabbing; }
.mb-add-icon { display: grid; place-items: center; height: 28px; font-size: 26px; line-height: 1; opacity: .8; }
.mb-add-icon svg { width: 26px; height: 26px; }
.mb-add-serif { font-family: "Cormorant Garamond", Georgia, serif; font-weight: 300; font-size: 28px; }
.mb-side-links { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; font-size: 13.5px; }
.mb-main { min-width: 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.mb-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.mb-toolbar .tabs { margin: 0; }
.mb-toolbar-spacer { flex: 1; }
.mb-preview-for { display: flex; align-items: center; gap: 8px; }
.mb-preview-for select { width: auto; max-width: 200px; }
.mb-subject { display: flex; align-items: center; gap: 10px; padding: 8px 14px; border-bottom: 1px solid var(--border); }
.mb-subject label { flex: 0 0 92px; font-size: 13px; color: var(--text-muted); }
/* Clearly fields you can type in: a soft box that lights up on focus. */
.mb-subject input { flex: 1; border: 1px solid transparent; border-radius: 8px; background: color-mix(in srgb, var(--text) 5%, transparent);
  font-size: 15px; font-weight: 600; padding: 7px 10px; box-shadow: none; transition: border-color .12s, background .12s; }
.mb-subject input:hover { border-color: var(--border); }
.mb-subject input:focus { outline: none; border-color: var(--accent); background: var(--surface); }
.mb-preheader input { font-weight: 400; font-size: 14px; }
.mb-sample-note { margin-right: auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mb-toolbar .btn-small { margin-top: 0; }  /* in line with the rest, vertically centred */
.mb-subject-filled { flex: 0 1 auto; max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; color: var(--text-muted); }
.mb-preview-btn { display: inline-flex; align-items: center; gap: 6px; }
.mb-preview-btn[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }
.mb-tag { display: inline-block; max-width: 100%; vertical-align: baseline; padding: 0 4px; margin: 0 1px; border-radius: 5px; line-height: 1.25;
  background: color-mix(in srgb, var(--mail-accent) 13%, transparent); box-shadow: inset 0 -1.5px 0 color-mix(in srgb, var(--mail-accent) 45%, transparent);
  cursor: default; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mb-tag.empty { font-style: italic; opacity: .65; }
.mb-tag[data-tag="page_link"] { max-width: 240px; }
.mb-btn .mb-tag { background: rgba(255,255,255,.18); box-shadow: inset 0 -1.5px 0 rgba(255,255,255,.5); }
.mb-canvas { position: relative; background: #ecebe8; padding: 28px 130px 40px; min-height: 520px; } /* room left of the email for the block controls */
.mb-canvas[hidden], .mb-previewpane[hidden], .mb-subject[hidden] { display: none; }
.mb-paper { --mail-bg: #fff; --mail-ink: #1C1C1C; --mail-accent: #c4622d; max-width: 600px; margin: 0 auto; background: var(--mail-bg); color: var(--mail-ink);
  border-radius: 14px; font-family: Helvetica, Arial, sans-serif; padding: 34px 0 6px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.mb-logo { text-align: center; padding: 0 32px 6px; }
.mb-logo img { max-height: 64px; max-width: 220px; }
.mb-logo span { font-family: Georgia, "Times New Roman", serif; font-size: 24px; letter-spacing: .04em; }
.mb-footer { margin: 26px 32px 24px; padding-top: 18px; border-top: 1px solid rgba(0,0,0,.08); text-align: center; font-size: 12px; opacity: .7; }
#mb-blocks { min-height: 80px; }
.mb-empty { margin: 18px 32px; padding: 28px; border: 1.5px dashed rgba(0,0,0,.15); border-radius: 12px; text-align: center; font-size: 14px; opacity: .6; }
.mb-block { position: relative; padding: 4px 0; border-radius: 8px; outline: 1.5px solid transparent; outline-offset: -1px; transition: outline-color .12s; }
.mb-block:hover, .mb-block.open { outline-color: color-mix(in srgb, var(--mail-accent) 45%, transparent); }
.mb-block.dragging { opacity: .35; }
.mb-block.busy { opacity: .5; pointer-events: none; }
/* Block controls: orange, outside the email, shown on hover. */
.mb-ctrl { position: absolute; z-index: 2; top: 2px; left: -8px; transform: translateX(-100%); display: flex; flex-direction: row; gap: 2px; padding: 3px;
  border-radius: 10px; background: var(--page-base, #F2F2F0); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); box-shadow: 0 2px 8px rgba(0,0,0,.12);
  opacity: 0; transition: opacity .12s; }
/* Shown while the mouse is on the block (or its controls), or while its settings are open. */
.mb-block:hover .mb-ctrl, .mb-block.open .mb-ctrl { opacity: 1; }
.mb-ctrl::after { content: ""; position: absolute; top: 0; bottom: 0; right: -10px; width: 10px; } /* bridge to the block */
.mb-ctrl > * { width: 30px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 7px; background: none; color: var(--accent); cursor: pointer; }
.mb-ctrl svg { width: 18px; height: 18px; }
.mb-handle { cursor: grab; }
.mb-drop { height: 3px; margin: -1.5px 24px; border-radius: 3px; background: var(--mail-accent); }
[contenteditable] { outline: none; cursor: text; }
[contenteditable]:empty::before { content: attr(data-ph); opacity: .35; }
.mb-h { padding: 7px 40px; text-align: center; font-family: var(--mail-font, "Cormorant Garamond", Georgia, serif); font-weight: 300; font-size: 34px; line-height: 1.2; }
.mb-paper.has-font .mb-h { font-family: "StudioFont", var(--mail-font, "Cormorant Garamond", Georgia, serif); }
.mb-t { padding: 10px 40px; font-size: 15px; line-height: 1.7; }
.mb-t p, .mb-t div { margin: 0 0 14px; }
/* Every block: as much room above its content as below, so it sits in the middle. */
.mb-t > :last-child { margin-bottom: 0; }
.mb-t a { color: inherit; }
.mb-t.small { font-size: 12.5px; text-align: center; opacity: .6; }
.mb-img { display: block; width: auto; max-width: calc(100% - 64px); height: auto; margin: 4px auto; border-radius: 12px; cursor: pointer; }
.mb-img-empty { margin: 4px 32px; padding: 22px 16px; border: 1.5px dashed rgba(0,0,0,.18); border-radius: 12px; text-align: center; font-size: 13.5px; }
.mb-img-empty p { margin: 0 0 10px; opacity: .6; }
.mb-img-choices { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.mb-img-choices button { font: inherit; font-size: 12.5px; padding: 6px 12px; border-radius: 999px; border: 1px solid rgba(0,0,0,.15); background: rgba(255,255,255,.6); color: #1C1C1C; cursor: pointer; }
.mb-img-choices button.active, .mb-img-choices button:hover { border-color: var(--mail-accent); color: var(--mail-accent); }
.mb-img-empty input[type="url"], .mb-settings input[type="url"] { width: 100%; margin-top: 10px; }
.mb-note { margin: 8px 0 0; font-size: 12.5px; opacity: .65; }
.mb-btn-row { text-align: center; padding: 7px 32px; }
.mb-btn { display: inline-block; min-width: 60px; background: var(--mail-accent); color: #fff; font-weight: bold; font-size: 14px; padding: 13px 28px; border-radius: 999px; }
.mb-divider { margin: 5px 40px; border-top: 1px solid rgba(0,0,0,.1); }
.mb-options { margin: 4px 40px; padding: 10px 14px; border: 1px dashed rgba(0,0,0,.18); border-radius: 10px; }
.mb-options ul { margin: 6px 0 0; padding-left: 18px; font-size: 15px; line-height: 1.7; }
.mb-options .mb-note { margin: 0; }
.mb-spacer { height: 24px; }
.mb-settings { margin: 10px 32px 4px; padding: 12px; border-radius: 10px; background: var(--surface); color: var(--text); border: 1px solid var(--border); font-size: 13.5px;
  display: flex; flex-direction: column; gap: 8px; }
.mb-settings label { display: flex; align-items: center; gap: 8px; }
.mb-settings select { width: auto; }
.mb-format { position: absolute; z-index: 5; display: flex; gap: 2px; padding: 3px; border-radius: 9px; background: #1C1C1C; box-shadow: 0 4px 14px rgba(0,0,0,.2); }
.mb-format[hidden] { display: none; }
.mb-format button { border: 0; background: none; color: #F2F2F0; font: inherit; font-size: 13px; padding: 5px 9px; border-radius: 6px; cursor: pointer; }
.mb-format button:hover { background: rgba(255,255,255,.12); }
@media (hover: none) { .mb-ctrl { opacity: 1; } } /* touch screens can't hover */
@media (max-width: 700px) {
  .mb-canvas { padding: 20px 8px 32px; }
  .mb-ctrl { left: auto; right: 6px; top: 6px; transform: none; }
}
@media (max-width: 900px) {
  .mail-builder { grid-template-columns: 1fr; }
  .mb-side { position: static; max-height: none; }
  .mb-add { grid-template-columns: repeat(3, 1fr); }
  .mb-h, .mb-t { padding-left: 20px; padding-right: 20px; }
}
.email-subject-line { padding: 10px 14px; border-bottom: 1px solid var(--border); font-size: 13.5px; }
#email-frame { display: block; width: 100%; height: calc(100vh - 230px); min-height: 560px; border: 0; background: #ecebe8; }
.new-template-form { margin-top: 16px; max-width: 640px; }
.sent-row { cursor: default; }
.autosave-status { font-size: 13px; color: var(--text-muted); white-space: nowrap; }
.autosave-status.ok::before { content: "✓ "; color: var(--green-ink, #5f6559); }
.autosave-status.busy { color: var(--text-muted); }
.autosave-status.error { color: var(--danger); }

/* ---------- Templates ---------- */
.inline-form { margin: 0; }
.back-link { display: inline-block; margin-bottom: 14px; font-size: 14px; font-weight: 600; color: var(--text-muted); text-decoration: none; }
.back-link:hover { color: var(--accent); }
.tpl-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 16px; }
.tpl-sort { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-muted); }
.tpl-sort select { width: auto; padding: 9px 34px 9px 14px; border-radius: 999px; }
.tpl-toolbar input[type="search"] { flex: 0 1 320px; padding: 10px 14px; border: 1px solid var(--border); border-radius: 999px; font: inherit; background: var(--surface); color: var(--text); }
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.tpl-card { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 18px; background: var(--surface); overflow: hidden; transition: border-color .15s, transform .15s; }
.tpl-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.tpl-card[hidden] { display: none; }
.tpl-thumb { position: relative; display: block; height: 260px; overflow: hidden; background: #ecebe8; }
.tpl-thumb iframe { position: absolute; top: 0; left: 0; width: 640px; height: 900px; border: 0; transform: scale(.42); transform-origin: top left; pointer-events: none; }
.tpl-meta { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px 16px; border-top: 1px solid var(--border); }
.tpl-name { font-weight: 700; color: var(--text); text-decoration: none; }
.tpl-meta .field-hint { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tpl-actions { display: flex; gap: 8px; margin-top: 8px; }
.tag-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }

/* Email builder: the image Library */
.mb-library { margin-top: 12px; text-align: left; }
.mb-library-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; max-height: 260px; overflow: auto; padding: 2px; }
.mb-library-item { position: relative; }
.mb-library-item > button[data-pick] { display: block; width: 100%; aspect-ratio: 4 / 3; padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; background: rgba(0,0,0,.06); cursor: pointer; }
.mb-library-item > button[data-pick] img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mb-library-item > button[data-pick]:hover, .mb-library-item.active > button[data-pick] { border-color: var(--mail-accent); }
.mb-library-remove { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border: 0; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; font-size: 14px; line-height: 1; cursor: pointer; }
/* Media */
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.media-card { border: 1px solid var(--border); border-radius: 16px; background: var(--surface); overflow: hidden; }
.media-card[hidden] { display: none; }
.media-thumb { display: block; aspect-ratio: 4 / 3; background: rgba(0,0,0,.06); }
.media-thumb { position: relative; }
.media-thumb img, .media-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-badge { position: absolute; left: 8px; bottom: 8px; padding: 2px 8px; border-radius: 999px; background: rgba(0,0,0,.6); color: #fff; font-size: 11px; font-weight: 600; }
.media-meta { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px 12px; }
.media-couple { font-size: 13px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.media-couple .pill { margin: 0 0 0 4px; font-size: 11px; }
.media-name { font-weight: 600; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.media-delete { align-self: flex-start; margin-top: 4px; color: var(--danger); font-size: 13px; }
#media-upload-btn { cursor: pointer; margin-left: auto; white-space: nowrap; }
@media (max-width: 700px) {
  .tpl-toolbar input[type="search"] { flex: 1 1 100%; }
  .media-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
}

/* Sidebar: storage used */
.storage-meter { margin: auto 8px 8px; padding: 12px; border: 1px solid var(--border); border-radius: 14px; background: color-mix(in srgb, var(--surface) 70%, transparent); }
.storage-head { display: flex; justify-content: space-between; font-size: 12.5px; font-weight: 700; }
.storage-track { height: 6px; margin: 8px 0 6px; border-radius: 3px; background: var(--border); overflow: hidden; }
.storage-track span { display: block; height: 100%; min-width: 3px; border-radius: 3px; background: var(--green, #8B9187); transition: width .4s; }
.storage-meter.warn .storage-track span { background: var(--accent); }
.storage-meter.full .storage-track span { background: var(--danger); }
.storage-meter.warn .storage-head span:last-child { color: var(--accent); }
.storage-meter.full .storage-head span:last-child, .storage-meter.full .storage-nudge { color: var(--danger); }
.storage-nudge { margin: -4px 0 10px; font-size: 12px; font-weight: 600; color: var(--accent); }
.storage-text { margin: 0 0 10px; font-size: 12px; color: var(--text-muted); }
.storage-upgrade { width: 100%; }
/* Delivery builder: font for names */
.font-pick { display: flex; flex-direction: column; gap: 10px; flex: 1; min-width: 0; }
.font-form select { width: 100%; max-width: 360px; }
.font-sample { margin: 0; font-size: 30px; line-height: 1.2; font-weight: 400; }
/* "From Media" picker */
.media-picker { width: min(720px, 92vw); }
.media-picker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; max-height: 60vh; overflow: auto; margin: 12px 0; }
.media-picker-grid > button { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 0; border: 2px solid transparent; border-radius: 12px; background: none; color: var(--text); cursor: pointer; text-align: left; overflow: hidden; }
.media-picker-grid > button:hover { border-color: var(--accent); }
.media-picker-grid img, .media-picker-grid video { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; border-radius: 10px; background: rgba(0,0,0,.06); }
.media-picker-name { font-size: 12px; padding: 0 4px 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Couples list: change status in place */
.status-cell { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; padding: 4px; margin: -4px; border: 1px solid transparent; border-radius: 10px; background: none; font: inherit; color: inherit; cursor: pointer; text-align: left; }
.status-cell:hover { border-color: var(--border); background: var(--bg); }
.list-status-menu { position: fixed; z-index: 80; min-width: 220px; max-height: 340px; overflow: auto; padding: 6px; border: 1px solid var(--border); border-radius: 12px; background: var(--page-base, #fff); box-shadow: var(--shadow, 0 8px 24px rgba(0,0,0,.18)); }
.list-status-option { display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 8px; border: 0; border-radius: 8px; background: none; color: var(--text); font: inherit; cursor: pointer; text-align: left; }
.list-status-option:hover { background: var(--bg); }
.list-status-option .tick { width: 14px; color: var(--accent); font-weight: 700; }
.compose-film-note { margin: 8px 0 0; padding: 8px 10px; border-radius: 10px; font-size: 13px; background: color-mix(in srgb, var(--accent) 12%, transparent); }
/* Parts of a film (e.g. one clip per speech) */
.film-parts { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--border); display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.film-parts-title { margin: 0; font-weight: 600; font-size: 13.5px; }
.film-parts-title .field-hint { font-weight: 400; margin-left: 6px; }
.film-part { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; width: 100%; }
.film-part .part-label { flex: 0 1 200px; min-width: 120px; }
.film-part .film-upload { flex: 1; border-top: 0; padding-top: 0; }

/* Settings > Packages */
.package-list { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.package-row { display: grid; grid-template-columns: 22px 1fr; gap: 8px; align-items: start; padding: 8px 8px 8px 10px; transition: border-color .2s, box-shadow .2s; border: 1px solid var(--border); border-radius: 12px; background: var(--surface, transparent); }
.package-row.dragging { opacity: .5; }
.package-row .drag-handle, .package-row .status-delete { margin-top: 10px; }
.package-fields { display: flex; flex-direction: column; min-width: 0; }
.package-fields .type-more > div { gap: 8px; }
.type-head .pkg-name { flex: 1; min-width: 0; font-weight: 600; }
.package-top { display: flex; gap: 8px; }
.package-top .pkg-name { flex: 1; min-width: 0; font-weight: 600; }
.package-top .type-price { flex: 0 0 140px; }
.package-facts { display: flex; gap: 8px 14px; flex-wrap: wrap; font-size: 13px; color: var(--text-muted); }
.package-facts label { display: flex; align-items: center; gap: 6px; }
.package-facts input { width: 52px; font-size: 13px; }
.package-films { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; font-size: 13px; }
.package-films .field-hint { width: 100%; margin: 0; }
.pkg-film { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.pkg-film input { width: auto; margin: 0; }
@media (max-width: 600px) { .package-top { flex-direction: column; } .package-top .type-price { flex: none; max-width: none; } }

/* Couple > Booking */
.bk-package-row { display: flex; gap: 8px; }
.bk-package-row .bk-package { flex: 1; min-width: 0; }
.bk-package-row .type-price { flex: 0 0 150px; max-width: none; }
.bk-includes { margin: 6px 0 10px; }
.bk-includes:empty { display: none; }
.bk-lines { display: flex; flex-direction: column; gap: 6px; margin: 10px 0; }
.bk-lines:empty { display: none; }
.bk-line { display: grid; grid-template-columns: 1fr 76px 130px 120px 28px; gap: 8px; align-items: center; }
.bk-line .bk-title[readonly] { background: transparent; border-color: transparent; padding-left: 0; font-weight: 500; }
.bk-line .type-price { max-width: none; }
.bk-qty { display: flex; align-items: center; gap: 6px; }
.bk-qty input { width: 64px; text-align: center; padding-left: 6px; padding-right: 6px; }
.bk-qty span { color: var(--text-muted); }
.bk-sub { text-align: right; font-variant-numeric: tabular-nums; font-size: 13px; color: var(--text-muted); }
.bk-add { margin-top: 4px; max-width: 360px; }
.bk-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 14px 0 8px; padding-top: 12px; border-top: 1px solid var(--border); }
.bk-discount-row { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-muted); }
.bk-discount-row .type-price { width: 130px; }
.bk-total { font-size: 15px; }
.bk-total strong { font-size: 20px; margin-left: 8px; font-variant-numeric: tabular-nums; }
@media (max-width: 700px) {
  .bk-package-row { flex-direction: column; }
  .bk-package-row .type-price { flex: none; }
  .bk-line { grid-template-columns: 84px 1fr 28px; grid-template-areas: "t t x" "q p x"; padding: 8px 0; border-bottom: 1px solid var(--border); }
  .bk-line .bk-title { grid-area: t; } .bk-line .bk-qty { grid-area: q; } .bk-line .type-price { grid-area: p; } .bk-line .status-delete { grid-area: x; }
  .bk-line .bk-sub { display: none; }
}

/* Analytics > Booked income */
.booked-card { margin-bottom: 20px; }
.booked-head { display: flex; justify-content: flex-start; align-items: center; gap: 16px; flex-wrap: wrap; }
.booked-head h2 { margin: 0; }
.year-nav { display: flex; align-items: center; gap: 8px; }
.year-nav .btn-small { margin-top: 0; }
.year-nav strong { font-variant-numeric: tabular-nums; min-width: 4ch; text-align: center; }
.booked-figures { display: flex; gap: 32px; flex-wrap: wrap; margin: 16px 0 8px; }
.booked-grid { margin-top: 8px; grid-template-columns: 2fr 1fr; }
.booked-grid > div { min-width: 0; }
.booked-sub { font-size: 13px; margin: 16px 0 6px; color: var(--text-muted); font-weight: 600; }
@media (max-width: 800px) { .booked-grid { grid-template-columns: 1fr; } }
.booked-card + .settings-group { margin-bottom: 12px; }
#period-part { margin-top: 32px; }
#period-part > .settings-group { margin: 0 0 14px; }
.package-facts input[data-field] { width: 3.2em; min-width: 0; padding-left: 8px; padding-right: 4px; text-align: center; }
@media (max-width: 600px) { .package-facts { flex-wrap: nowrap; gap: 10px; } .package-facts label { gap: 5px; } }
.type-window { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: 13px; color: var(--text-muted); }
.type-window label { display: flex; align-items: center; gap: 6px; }
.type-window select { width: auto; font-size: 13px; padding-top: 6px; padding-bottom: 6px; }
.type-window .type-deadline-input { width: 3.4em; font-size: 13px; text-align: center; padding: 6px 4px; }
.type-deadline[hidden] { display: none; }
.bk-line.is-paid .bk-sub { color: var(--green-ink, #1c7a43); }
.storage-manage { display: block; margin-top: 8px; text-align: center; font-size: 12px; color: var(--text); opacity: .75; }
.storage-manage:hover { color: var(--accent); }
.storage-overview { margin-bottom: 16px; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.storage-overview .storage-track-lg { width: 100%; height: 10px; }
.storage-list td.num, .storage-list th.num { text-align: right; white-space: nowrap; }
.storage-other td { color: var(--text-muted); }

/* Grips work with a finger too (static/js/touch-sort.js): no scrolling or
   text selection while holding one, and a bigger target on touch screens. */
.drag-handle, .field-grip { touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
@media (hover: none) { .drag-handle { min-width: 32px; min-height: 36px; } }
.touch-dragging { opacity: .85; box-shadow: 0 8px 24px rgba(0, 0, 0, .18); position: relative; z-index: 5; }
.storage-plan { margin: 0 0 8px; font-size: 12px; color: var(--text-muted); }
a.storage-upgrade { display: block; text-align: center; }

/* Plan & billing */
.billing-status h2 { margin-bottom: 6px; }
.billing-status.state-past_due, .billing-status.state-trial_ended, .billing-status.state-ended { border-color: var(--accent); }
.billing-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.billing-head h2 { margin: 0; }
.save-badge { font-size: 11px; font-weight: 600; margin-left: 4px; color: var(--accent); }
.plan-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.plan-card { display: flex; flex-direction: column; gap: 8px; padding: 16px; border: 1px solid var(--border); border-radius: 14px; }
.plan-card.current { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.plan-card h3 { margin: 0; font-size: 16px; }
.plan-price strong { font-size: 26px; }
.plan-price span { color: var(--text-muted); margin-left: 2px; }
.plan-price .field-hint { margin: 2px 0 0; }
.plan-card ul { margin: 4px 0 8px; padding-left: 18px; font-size: 13px; color: var(--text-muted); flex: 1; }
.plan-card .btn { align-self: flex-start; }
.billing-cancel { margin-top: 14px; }
.link-button { background: none; border: 0; padding: 0; color: var(--text-muted); text-decoration: underline; cursor: pointer; font: inherit; font-size: 13px; }
@media (max-width: 800px) { .plan-grid { grid-template-columns: 1fr; } }

/* Hold to delete: the fill runs across while the button is held. */
.hold-button { position: relative; overflow: hidden; touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.hold-button .hold-fill { position: absolute; inset: 0; width: 0; background: var(--danger); opacity: .18; }
.hold-button.holding .hold-fill { width: 100%; transition: width 1.5s linear; }
.hold-button .hold-label { position: relative; }
.tpl-delete { color: var(--danger); }
.tpl-actions .btn { white-space: nowrap; }
.tpl-meta { position: relative; }
.tpl-meta .tpl-name, .tpl-meta > .field-hint { padding-right: 36px; }
.tpl-actions .tpl-delete { position: absolute; top: 12px; margin: 0; right: 10px; width: 32px; height: 32px; min-height: 0; padding: 0; display: inline-flex; align-items: center; justify-content: center; }

/* Delivery Page builder: template vs. one couple */
.builder-tip { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; margin: 0 0 14px; border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 8%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent); font-size: 13px; }
.builder-tip svg { flex: none; margin-top: 1px; color: var(--accent); }
.builder-tip p { margin: 0; color: var(--text-muted); }
.builder-tip strong { color: var(--text); }
.moment-switch { margin: 0; }
.preview-with { display: flex; align-items: center; gap: 8px; }
.preview-with select { width: auto; min-width: 250px; max-width: 320px; }
.personalise-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 4px; }
.personalise-row .field-hint { margin: 0; flex: 1; min-width: 200px; }

/* Automations */
.auto-safety { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; margin-bottom: 16px; border-radius: 14px;
  background: color-mix(in srgb, var(--accent) 9%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); }
.auto-safety svg { flex: none; color: var(--accent); margin-top: 1px; }
.auto-safety p { margin: 0; font-size: 14px; color: var(--text-muted); }
.auto-safety strong { color: var(--text); }
.auto-list { display: flex; flex-direction: column; gap: 10px; }
.auto-list .auto-card { display: grid; grid-template-columns: 1fr auto auto auto auto auto; gap: 16px; align-items: center; color: inherit; }
.auto-card-main { display: flex; flex-direction: column; gap: 3px; color: inherit; min-width: 0; }
.auto-card-main strong { color: var(--text); }
.auto-card .auto-switch b { min-width: 60px; font-weight: 600; }
.auto-card .btn-small { margin-top: 0; }
.auto-card .inline-form { margin: 0; }
.auto-tag { font-weight: 600; color: var(--text); }
.auto-state { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--border); color: var(--text-muted); }
.auto-state.on { background: color-mix(in srgb, var(--green, #2e9e5b) 20%, transparent); color: var(--green-ink, #1c7a43); }
.auto-name { font: inherit; font-size: inherit; font-weight: inherit; border: 1px solid transparent; background: transparent; padding: 2px 6px; margin-left: -7px; border-radius: 8px; width: min(100%, 520px); color: inherit; }
.auto-name:hover { border-color: var(--border); }
.auto-name:focus { outline: none; border-color: var(--accent); background: var(--surface); }
.auto-switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; }
.auto-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.auto-switch span { width: 40px; height: 22px; border-radius: 999px; background: var(--border); position: relative; transition: background .15s; }
.auto-switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .15s; }
.auto-switch input:checked + span { background: var(--accent); }
.auto-switch input:checked + span::after { transform: translateX(18px); }
.auto-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.auto-canvas { overflow-x: auto; padding: 24px; }
.auto-step { display: flex; flex-direction: column; align-items: center; }
.auto-step > .auto-step::before, .auto-add::before { content: ""; display: block; width: 2px; height: 12px; margin: 0 auto; background: var(--border); }
.auto-node { position: relative; display: flex; gap: 9px; align-items: flex-start; width: 236px; max-width: 100%; padding: 10px 12px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border); box-shadow: 0 1px 3px rgba(0,0,0,.05); }
.auto-node.type-trigger_tag { border-color: var(--accent); }
.auto-node.type-exit { width: auto; }
.auto-icon { flex: none; width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); font-size: 12px; }
.auto-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; font-size: 12px; }
.auto-kind { font-weight: 700; font-size: 12.5px; padding-right: 12px; }
.auto-body .field-hint { font-size: 11.5px; }
.auto-inline { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.auto-lang { margin-top: 2px; color: var(--text-muted); }
.auto-node select, .auto-node input[type=number] { width: auto; max-width: 100%; min-height: 0; font-size: 12px; padding: 3px 22px 3px 6px; background-position: right 5px center; background-size: 12px; }
.auto-node input[type=number] { width: 48px; padding-right: 6px; }
.auto-del { position: absolute; top: 4px; right: 6px; border: 0; background: none; color: var(--text-muted); font-size: 16px; cursor: pointer; line-height: 1; }
.auto-del:hover { color: var(--danger); }
/* Branches like a family tree: a line down from the step, one bar from the
   middle of the first branch to the middle of the last, a line down to each. */
.auto-branches { position: relative; display: flex; align-items: flex-start; justify-content: center; padding-top: 12px; }
.auto-branches::before { content: ""; position: absolute; top: 0; left: 50%; width: 2px; height: 12px; margin-left: -1px; background: var(--border); }
.auto-branch { position: relative; display: flex; flex-direction: column; align-items: center; padding: 12px 7px 0; }
.auto-branch::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--border); }
.auto-branch:first-child::before { left: 50%; }
.auto-branch:last-child::before { right: 50%; }
.auto-branch:only-child::before { display: none; }
.auto-branch::after { content: ""; position: absolute; top: 0; left: 50%; width: 2px; height: 12px; margin-left: -1px; background: var(--border); }
.auto-add { display: flex; flex-direction: column; align-items: center; }
.auto-add-btn { cursor: pointer; font: inherit; font-size: 12px; font-weight: 600; color: var(--accent); background: none; padding: 4px 11px; border: 1px dashed color-mix(in srgb, var(--accent) 50%, transparent); border-radius: 999px; }
.auto-add-btn:hover { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.auto-dialog select, .auto-dialog input { width: 100%; }
.auto-dialog .add-field { margin-top: 12px; }
.auto-dialog .add-field[hidden] { display: none; }
.add-wait { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.auto-dialog #add-hint { margin: 12px 0 0; }
.auto-activity { display: flex; flex-direction: column; gap: 12px; }
.auto-activity h2 { font-size: 15px; display: flex; justify-content: space-between; }
.auto-run { display: flex; flex-direction: column; gap: 2px; padding: 8px 0; border-top: 1px solid var(--border); font-size: 13.5px; }
.auto-run ol { margin: 6px 0 0; padding-left: 18px; color: var(--text-muted); font-size: 12.5px; }
.auto-run .link-btn { align-self: flex-start; font-size: 12px; }
.danger-text { color: var(--danger); }
@media (max-width: 1000px) { .auto-layout { grid-template-columns: 1fr; } .auto-list .auto-card { grid-template-columns: 1fr auto auto auto auto; } .auto-card > .auto-count { display: none; } }
.auto-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.auto-actions form { margin: 0; }
.auto-dialog .dialog-actions { margin-top: 18px; }

/* ---------- leads ---------- */
.tab-count { margin-left: 4px; font-size: 12px; font-weight: 600; color: var(--text-muted); }
.lead-steps { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 16px; }
.lead-step { padding: 8px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font-size: 13.5px; }
.lead-step strong { font-size: 16px; margin-right: 4px; }
.lead-step.active { border-color: var(--accent); color: var(--accent); }
.lead-group { font-size: 15px; margin: 8px 0 10px; }
.lead-group + .table-card, .table-card + .lead-group { margin-top: 0; }
.table-card + .lead-group { margin-top: 24px; }
.lead-source { display: block; font-size: 12.5px; font-weight: 400; color: var(--text-muted); }
.lead-due { color: var(--danger); font-weight: 600; }
select.lead-status.pill { width: auto; min-height: 0; font: inherit; font-size: 13px; font-weight: 600; padding: 4px 26px 4px 12px; margin: 0; cursor: pointer;
  background-color: var(--tone-bg); color: var(--tone-fg); border: 0; box-shadow: none; }
@media (min-width: 801px) {
  .lead-table { table-layout: fixed; }
  .lead-table :is(td, th):nth-child(1) { width: 26%; }
  .lead-table :is(td, th):nth-child(2) { width: 14%; }
  .lead-table :is(td, th):nth-child(3) { width: 22%; }
  .lead-table :is(td, th):nth-child(4) { width: 17%; }
  .lead-table :is(td, th):nth-child(5) { width: 10%; }
  .lead-table :is(td, th):nth-child(6) { width: 11%; }
}
.lead-table td.cell-sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 800px) { .lead-table td.cell-sub { white-space: normal; } }
.lead-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.lead-side h2 { font-size: 15px; margin-bottom: 12px; }
.lead-side form { margin: 0; }
.lead-side .btn { margin-top: 0; }
.lead-side .field-hint { margin-top: 8px; }
.lead-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.lead-actions .btn-small { margin-top: 0; }
.auto-live-note { margin: 0 auto 18px; max-width: 520px; padding: 10px 14px; border-radius: 12px; font-size: 13.5px; text-align: center;
  background: color-mix(in srgb, #1f7a45 12%, transparent); color: var(--text); }
.auto-live-note.is-paused { background: color-mix(in srgb, #a65200 12%, transparent); }
.auto-canvas.is-live :is(select, input) { opacity: .75; cursor: not-allowed; }
/* ---------- integrations ---------- */
.int-group { font-size: 15px; margin: 8px 0 12px; }
.int-grid + .int-group { margin-top: 28px; }
.int-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.int-card { display: flex; flex-direction: column; gap: 10px; color: inherit; text-decoration: none; }
.int-head { display: flex; align-items: center; gap: 10px; }
.int-logo { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--c); color: #fff; font-weight: 700; }
/* The brand's own icon, in white on its colour (a mask, so the file stays unchanged). */
.int-logo-mark.is-wide { width: 28px; height: 28px; }
.int-logo-mark { width: 22px; height: 22px; background: #fff; -webkit-mask: var(--logo) center / contain no-repeat; mask: var(--logo) center / contain no-repeat; }
.int-soon, .int-on { margin-left: auto; font-size: 11.5px; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: var(--bg); color: var(--text-muted); white-space: nowrap; }
.int-on { background: color-mix(in srgb, #1f7a45 15%, transparent); color: #1f7a45; }
[data-mode="dark"] .int-on { color: #6fd39a; }
.int-foot { margin-top: 24px; }
.int-how h2, .int-add h2 { font-size: 15px; margin-bottom: 10px; }
.int-how ol { margin: 0 0 10px; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.int-how p { margin: 0 0 8px; }
.int-keys code, .int-how code { font-size: 12.5px; padding: 1px 6px; border-radius: 6px; background: var(--bg); }
.int-how, .int-conn, .int-add { margin-bottom: 16px; }
.int-conn.is-off { opacity: .7; }
.int-conn-head { display: flex; gap: 12px; align-items: center; }
.int-name { flex: 1; font-weight: 600; font-size: 15px; }
.int-conn .dashboard-link { margin: 6px 0; }
.int-fields { margin-top: 16px; }
.int-tags { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.int-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.int-actions form { margin: 0; }
.int-actions .btn-small { margin-top: 0; }
.int-secondary { justify-content: flex-end; margin-top: -40px; }
.int-sub { font-size: 13px; margin: 18px 0 6px; color: var(--text-muted); }
.int-connected { margin: 10px 0; }
.int-add-form { display: flex; flex-wrap: wrap; gap: 8px; }
.int-add-form input { flex: 1 1 200px; }
.int-add-form select { flex: 1 1 240px; width: auto; min-width: 0; }
.int-map { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.int-map-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 260px) 24px; gap: 12px; align-items: center; padding: 6px 0; border-top: 1px solid var(--border); }
.int-map-forget { font-size: 18px; line-height: 1; color: var(--text-muted); }
.int-map-new { border-top: 0; margin-top: 4px; }
.int-form-section { margin-top: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.int-form-name { margin: 0 0 4px; font-size: 14px; }
.int-map-row:first-child { border-top: 0; }
.int-map-q { overflow-wrap: anywhere; }
@media (max-width: 600px) { .int-map-row { grid-template-columns: minmax(0, 1fr) 24px; gap: 4px; } .int-map-row select { grid-column: 1; } }
.int-add-form .btn-small { margin-top: 0; }
.int-add-form > .field-hint { flex: 1 1 200px; margin: 0; align-self: center; }
@media (max-width: 800px) { .int-secondary { justify-content: flex-start; margin-top: 8px; } }
/* ---------- plan ending / read-only ---------- */
.plan-banner { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap;
  margin-bottom: 18px; padding: 14px 18px; border-radius: var(--radius); border: 1px solid color-mix(in srgb, #a65200 35%, transparent);
  background: color-mix(in srgb, #a65200 9%, var(--surface)); font-size: 14px; }
.plan-banner p { margin: 0; flex: 1 1 320px; }
.plan-banner .btn-small { margin-top: 0; }
.plan-banner.is-ended { border-color: color-mix(in srgb, var(--danger) 40%, transparent); background: color-mix(in srgb, var(--danger) 8%, var(--surface)); }
.export-films { display: flex; flex-direction: column; gap: 6px; }
.export-couple { padding: 12px 0; border-top: 1px solid var(--border); }
.export-couple:first-child { border-top: 0; }
.export-couple ul { margin: 6px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13.5px; }
.danger-card { border-color: color-mix(in srgb, var(--danger) 35%, transparent); }
#delete-studio-dialog input[type="text"] { width: 100%; margin: 4px 0 12px; }
.locked-card { max-width: 560px; margin: 24px auto; text-align: center; padding: 36px 28px; }
.locked-card h2 { font-size: 20px; margin: 12px 0 8px; }
.locked-card p { margin: 0 0 12px; }
.locked-icon { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: var(--accent-soft, color-mix(in srgb, var(--accent) 12%, transparent)); color: var(--accent); }
.locked-icon svg { width: 26px; height: 26px; }
.nav-lock { margin-left: auto; width: 14px; height: 14px; opacity: .55; }
.more-item .nav-lock { position: absolute; top: 8px; right: 8px; margin: 0; }
.plan-card.popular { border-color: color-mix(in srgb, var(--accent) 55%, var(--border)); }
.plan-badge { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; vertical-align: middle;
  background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.plan-enterprise { background: color-mix(in srgb, var(--text) 3%, transparent); }
.int-list { margin: 0 0 10px; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.int-script { position: relative; margin: 6px 0 4px; }
.int-script pre { margin: 0; padding: 12px 14px; border-radius: 10px; background: var(--bg); font-size: 12px; line-height: 1.5; overflow-x: auto; white-space: pre; }
.int-script .btn-small { margin-top: 8px; }
.int-manual summary { cursor: pointer; font-weight: 600; font-size: 14px; }
.int-manual[open] summary { margin-bottom: 12px; }
.billing-storage { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 8px; }
.billing-storage .storage-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 14px; }
.more-storage { display: block; margin: 0 0 12px; padding: 12px 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); color: var(--text); text-decoration: none; }
.more-storage .storage-head { display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.more-storage .storage-text { margin: 6px 0 0; font-size: 12px; color: var(--text-muted); }
.more-storage-up { color: var(--accent); font-weight: 600; }
#plans { scroll-margin-top: 16px; }
.addon-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.addon-card { display: flex; flex-direction: column; gap: 8px; padding: 16px; border: 1px solid var(--border); border-radius: 14px; }
.addon-head { display: flex; align-items: center; gap: 8px; }
.addon-card p { margin: 0; }
.addon-price strong { font-size: 18px; }
.addon-actions { display: flex; align-items: center; gap: 10px; margin-top: auto; }
.addon-actions .btn-small { margin-top: 0; }
.addon-stepper { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; }
.addon-stepper button { width: 32px; height: 32px; border: 0; background: none; font-size: 16px; color: var(--text-muted); }
.addon-stepper span { min-width: 24px; text-align: center; font-weight: 600; }
@media (max-width: 800px) { .addon-grid { grid-template-columns: 1fr; } }
/* ---------- brochure builder ---------- */
.br-layout { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 16px; align-items: start; }
.br-editor { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.br-block { padding: 0; overflow: hidden; }
.br-block-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px; }
.br-toggle { flex: 1; min-width: 0; text-align: left; border: 0; background: none; font: inherit; cursor: pointer; display: flex; flex-direction: column; gap: 2px; color: var(--text); }
.br-toggle .field-hint { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.br-tools { display: flex; gap: 4px; }
.br-tools button { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text-muted); cursor: pointer; }
.br-tools button:disabled { opacity: .35; cursor: default; }
.br-body { padding: 4px 14px 16px; display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--border); }
.br-body input[type=text], .br-body input[type=url], .br-body textarea, .br-body select { width: 100%; }
.br-body .dialog-label { margin-top: 8px; }
.br-item { display: flex; flex-direction: column; gap: 6px; padding: 10px; border: 1px solid var(--border); border-radius: 10px; margin-top: 6px; }
.br-item .link-btn { align-self: flex-start; }
.br-picks { display: flex; flex-direction: column; gap: 4px; padding-left: 4px; }
.br-picks[hidden] { display: none; }
.br-image-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.br-image-row img { width: 72px; height: 48px; object-fit: cover; border-radius: 8px; }
.br-image-row .btn-small { margin-top: 0; }
.br-noimg { font-size: 12.5px; color: var(--text-muted); }
.br-add { display: flex; gap: 8px; align-items: center; }
.br-add select { flex: 1; }
.br-add .btn-small { margin-top: 0; }
.br-look { padding: 0; overflow: hidden; }
.br-look > summary { list-style: none; cursor: pointer; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.br-look > summary::-webkit-details-marker { display: none; }
.br-look .blur-field { max-width: none; }
.br-share details { margin-top: 8px; }
.br-share summary { cursor: pointer; }
.br-embed { width: 100%; font-family: ui-monospace, monospace; font-size: 12px; margin: 6px 0; }
.br-preview { position: sticky; top: 16px; padding: 0; overflow: hidden; height: calc(100vh - 32px); display: flex; flex-direction: column; }
.br-preview-head { padding: 8px 14px; border-bottom: 1px solid var(--border); }
.br-preview iframe { flex: 1; width: 100%; border: 0; background: #fff; }
@media (max-width: 1000px) { .br-layout { grid-template-columns: 1fr; } .br-preview { position: relative; height: 80vh; } }
.br-item > summary { list-style: none; cursor: pointer; }
.br-item > summary::-webkit-details-marker { display: none; }
.br-item-head { display: flex; align-items: center; gap: 8px; }
.br-item-head strong { flex: 1; min-width: 0; font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.br-item[open] > summary { margin-bottom: 6px; }
.br-add-item select { width: 100%; margin-top: 8px; }
.br-discount { display: grid; grid-template-columns: 1fr 1fr 110px auto; gap: 6px; align-items: center; margin-top: 6px; }
.br-discount .type-price input { width: 100%; }
@media (max-width: 600px) { .br-discount { grid-template-columns: 1fr 1fr; } }

/* ---------- setup wizard (Studio > Setup) ---------- */
.setup-wrap { min-height: 100vh; padding: 0 16px 48px; }
.setup-top { max-width: 760px; margin: 0 auto; display: flex; align-items: center; gap: 16px; padding: 20px 0 8px; }
.setup-wide .setup-top, .setup-wide .setup-main { max-width: 1100px; }
.setup-logo { padding: 0; }
.setup-logo .logo-mark { width: 30px; height: 28px; }
.setup-steps { flex: 1; display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; justify-content: center; }
.setup-steps a { display: flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: var(--radius-pill); color: var(--text-muted); font-weight: 500; font-size: 13px; }
.setup-steps a:hover { background: var(--surface); }
.setup-dot { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--border); font-size: 12px; font-weight: 600; }
.setup-steps .is-current a { color: var(--text); }
.setup-steps .is-current .setup-dot { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.setup-steps .is-past .setup-dot { background: var(--accent-soft); border-color: transparent; color: var(--accent); }
.setup-quit .link-btn { color: var(--text-muted); font-weight: 500; white-space: nowrap; }
.setup-messages { max-width: 760px; margin: 8px auto 0; }
.setup-main { max-width: 760px; margin: 0 auto; }
.setup-main h1 { font-size: 26px; margin: 4px 0 6px; }
.setup-count { color: var(--text-muted); font-size: 13px; font-weight: 600; margin: 20px 0 0; }
.setup-lead { color: var(--text-muted); font-size: 15px; margin: 0 0 20px; max-width: 620px; }
.setup-card { margin-bottom: 16px; }
.setup-card h2 { font-size: 16px; margin-bottom: 4px; }
.setup-sub { margin-top: 20px; }
.setup-form label:not(.check):not(.chip-check):not(.palette):not(.setup-color) { display: block; font-weight: 600; margin: 14px 0 6px; }
.setup-form input[type="text"], .setup-form input[type="email"], .setup-form input[type="date"], .setup-form select { width: 100%; }
.setup-two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.setup-langs { border: 1px solid var(--border); border-radius: 10px; margin: 6px 0 14px; }
.setup-lang { display: grid; grid-template-columns: 1fr 48px; align-items: center; padding: 8px 12px; border-top: 1px solid var(--border); }
.setup-lang:first-child { border-top: 0; }
.setup-lang-head { padding: 6px 12px; font-size: 12px; color: var(--text-muted); text-align: center; }
.setup-lang input[type=radio] { justify-self: center; accent-color: var(--accent); }
.setup-lang .check { margin: 0; }
.setup-footer { display: flex; align-items: center; gap: 16px; margin-top: 24px; }
.setup-footer .setup-next { order: 3; margin-left: auto; }
.setup-footer .setup-skip { order: 2; color: var(--text-muted); font-weight: 500; }
.setup-footer .setup-back { order: 1; color: var(--text-muted); font-weight: 500; }
.setup-card > .film-upload { margin-top: 12px; }

.setup-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.setup-preview { position: sticky; top: 16px; }
.setup-preview iframe { width: 100%; height: 640px; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; }
.palette-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; margin-top: 12px; }
.palette { display: flex; flex-direction: column; gap: 6px; cursor: pointer; font-weight: 500; }
.palette input { position: absolute; opacity: 0; pointer-events: none; }
.palette-swatch { position: relative; height: 70px; border-radius: 10px; border: 2px solid var(--border); display: flex; align-items: center; justify-content: center; }
.palette-swatch span { padding: 6px 14px; border-radius: 8px; font-family: Georgia, serif; font-size: 18px; }
.palette-swatch i { position: absolute; right: 8px; bottom: 8px; width: 14px; height: 14px; border-radius: 50%; }
.palette.is-on .palette-swatch, .palette input:checked + .palette-swatch { border-color: var(--accent); }
.palette input:focus-visible + .palette-swatch { outline: 2px solid var(--accent); outline-offset: 2px; }
.palette-name { font-size: 13px; }
.font-sample { font-size: 34px; margin: 12px 0 4px; color: var(--text); }

.pick-list { list-style: none; margin: 12px 0 0; padding: 0; }
.pick { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-top: 1px solid var(--border); min-height: 46px; }
.pick:first-child { border-top: 0; }
.pick .check { flex: 1; }
.pick.is-have .check { color: var(--text-muted); }
.pick-own input[type="text"]:first-child { flex: 1; }
.pick-price { display: flex; align-items: center; gap: 6px; color: var(--text-muted); }
.pick-price input { width: 100px !important; }

.pkg-row.is-off .pkg-fields { opacity: .45; }
.pkg-toggle { margin-bottom: 4px; }
.setup-label-row { font-weight: 600; margin: 14px 0 6px; }
.pkg-films { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-check { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border: 1px solid var(--border); border-radius: var(--radius-pill); cursor: pointer; font-size: 13px; }
.chip-check:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.have-list { margin: 8px 0; padding-left: 18px; }
.setup-sample { display: flex; align-items: center; gap: 16px; justify-content: space-between; }
.setup-sample .btn { flex-shrink: 0; }

.setup-done { text-align: center; padding-top: 64px; }
.setup-done .setup-lead { margin: 0 auto 28px; }
.setup-check { width: 56px; height: 56px; margin: 0 auto 16px; border-radius: 50%; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; }
.done-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; text-align: left; }
a.card.done-tile { display: flex; flex-direction: column; gap: 4px; color: var(--text); padding: 20px; }
a.card.done-tile:hover { border-color: var(--accent); }

@media (max-width: 800px) {
  .setup-label { display: none; }
  .setup-steps { justify-content: flex-start; }
  .setup-steps a { padding: 4px; }
  .setup-split { grid-template-columns: 1fr; }
  .setup-preview { position: static; }
  .setup-preview iframe { height: 480px; }
}
@media (max-width: 520px) {
  .setup-two { grid-template-columns: 1fr; }
  .setup-sample { flex-direction: column; align-items: stretch; }
  .pick-own { flex-wrap: wrap; }
  .setup-footer { flex-wrap: wrap; }
}

/* ---------- Home: Get started ---------- */
.getting-started { margin-bottom: 16px; }
.gs-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.gs-head h2 { font-size: 17px; margin-bottom: 2px; }
.gs-head .link-btn { color: var(--text-muted); font-weight: 500; }
.gs-bar { height: 6px; border-radius: 999px; background: var(--border); margin: 14px 0 6px; overflow: hidden; }
.gs-bar span { display: block; height: 100%; background: var(--accent); border-radius: inherit; }
.gs-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
.gs-list a { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; color: var(--text); border-top: 1px solid var(--border); }
.gs-list a:hover strong { color: var(--accent); }
.gs-tick { flex-shrink: 0; width: 20px; height: 20px; margin-top: 1px; border-radius: 50%; border: 1.5px solid var(--border); display: grid; place-items: center; color: var(--on-accent); }
.gs-list .is-done .gs-tick { background: var(--accent); border-color: var(--accent); }
.gs-list .is-done strong { color: var(--text-muted); font-weight: 500; text-decoration: line-through; }
.gs-text { display: flex; flex-direction: column; }
.gs-text strong { font-weight: 600; }
.gs-wizard { margin-top: 12px; }
@media (max-width: 800px) { .gs-list { grid-template-columns: 1fr; } }
.palette-custom { background: conic-gradient(from 45deg, #f3ede4, #eef1ec, #f7eeec, #e8f1ff, #f3ede4); }
.palette-custom span { background: rgba(255, 255, 255, .85); color: #1c1c1c; font-family: var(--font-sans); font-size: 13px; font-weight: 600; }
.custom-colors { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; margin-top: 14px; }
.custom-colors .field-hint { grid-column: 1 / -1; margin: 0; }
.setup-color { display: flex; align-items: center; gap: 10px; font-weight: 500; cursor: pointer; }
.setup-color input[type="color"] { width: 40px; height: 32px; padding: 2px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); cursor: pointer; }
.setup-note { margin: -8px 0 16px; }
.auto-start-pick { display: flex; flex-direction: column; gap: 6px; margin-bottom: 4px; }
.auto-date-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.auto-date-row input[type="number"], .auto-date .auto-inline input[type="number"] { width: 72px; }
.auto-date .auto-inline { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.auto-date-row select, .auto-date .auto-inline select { width: auto; padding-right: 30px; background-position: right 8px center; }
.auto-start-pick + div, .auto-start-pick { margin-top: 6px; }
/* Read by screen readers, not shown. */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.invoice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; margin: 12px 0; }
.invoice-grid label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; }
.invoice-grid .span-2 { grid-column: 1 / -1; }
.invoice-grid input, .invoice-grid select { width: 100%; font-weight: 400; }
@media (max-width: 600px) { .invoice-grid { grid-template-columns: 1fr; } }
.invoice-filter { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.invoice-filter label:not(.check) { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.invoice-downloads { margin-left: auto; display: flex; gap: 8px; }
.invoice-downloads .btn-small { margin-top: 0; }
.plan-extra { align-items: flex-start; font-weight: 500; margin: 4px 0 12px; }
.plan-extra input { margin-top: 3px; }

/* ---------- Calendar ---------- */
.cal-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; margin-bottom: 16px; }
.cal-nav { display: flex; align-items: center; gap: 10px; }
.cal-nav .btn-small { margin-top: 0; width: 36px; padding: 6px 0; font-size: 18px; line-height: 1; }
.cal-month { font-size: 20px; min-width: 170px; text-align: center; }
.cal-today { color: var(--accent); font-weight: 600; }
.cal-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.cal-toggle { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; cursor: pointer; }
.cal-toggle i { width: 10px; height: 10px; border-radius: 3px; background: var(--k); }
.cal-toggle input { accent-color: var(--k); }
.k-wedding { --k: #2e9e5b; }
.k-call { --k: #7c5cd6; }
.k-followup { --k: #e08a00; }
.k-asked { --k: #3b82c4; }
.k-delivery { --k: #8a8f98; }
.k-own { --k: var(--accent); }
.cal-grid { padding: 0; overflow: hidden; }
.cal-head, .cal-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-head span { padding: 10px 10px 6px; font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; }
.cal-week { border-top: 1px solid var(--border); }
.cal-day { min-height: 112px; padding: 6px 6px 8px; border-left: 1px solid var(--border); display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal-day:first-child { border-left: 0; }
.cal-day.is-other { background: color-mix(in srgb, var(--border) 25%, transparent); }
.cal-day.is-other .cal-date { opacity: .5; }
.cal-date { align-self: flex-start; min-width: 26px; height: 26px; padding: 0 6px; border: 0; border-radius: 999px; background: none;
  font: inherit; font-size: 13px; font-weight: 600; color: var(--text); cursor: pointer; }
.cal-date:hover { background: var(--accent-soft); color: var(--accent); }
.cal-day.is-today .cal-date { background: var(--accent); color: var(--on-accent); }
.cal-item { display: block; padding: 3px 6px 3px 8px; border-radius: 6px; border-left: 3px solid var(--k);
  background: color-mix(in srgb, var(--k) 12%, transparent); color: var(--text); font-size: 12px; line-height: 1.35;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-decoration: none; }
.cal-item:hover { background: color-mix(in srgb, var(--k) 22%, transparent); }
.cal-item.k-asked { border-left-style: dashed; background: transparent; }
.cal-item b { font-weight: 600; }
.cal-list { display: none; }
.cal-list-day { margin-bottom: 14px; }
.cal-list-day h3 { font-size: 14px; margin: 0 0 6px; }
.cal-list-day.is-today h3 { color: var(--accent); }
.cal-list .cal-item { white-space: normal; font-size: 14px; padding: 8px 10px; margin-bottom: 6px; }
.cal-list .cal-item .field-hint { display: block; font-size: 12px; }
.cal-subscribe-hint { margin-top: 16px; }
#calendar .dashboard-link { margin: 10px 0 6px; }
.cal-two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; align-items: end; }
.cal-allday { padding-bottom: 10px; }
.cal-dialog input[type="text"], .cal-dialog input[type="date"], .cal-dialog input[type="time"], .cal-dialog select, .cal-dialog textarea { width: 100%; }
.cal-delete { margin-right: auto; }
.cal-tools { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.cal-views { display: none; }
.cal-stage { overflow: hidden; }
.cal-views-wrap { touch-action: pan-y; will-change: transform; }
.cal-grid .cal-sub { display: none; }
.cal-list .cal-sub, .cal-sheet .cal-sub { display: block; font-size: 12px; }
/* Phones: tap a day, its items slide up. */
.cal-sheet { position: fixed; inset: auto 0 0 0; width: 100%; max-width: 560px; margin: 0 auto; max-height: 75vh; overflow-y: auto;
  border: 0; border-radius: 20px 20px 0 0; padding: 16px 16px calc(20px + env(safe-area-inset-bottom));
  background: var(--page-base, var(--surface)); color: var(--text); box-shadow: 0 -10px 40px rgba(0,0,0,.25); }
.cal-sheet::backdrop { background: rgba(0,0,0,.35); }
.cal-sheet[open] { animation: cal-sheet-up .22s ease-out; }
@keyframes cal-sheet-up { from { transform: translateY(40px); opacity: .4; } to { transform: none; opacity: 1; } }
.cal-sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cal-sheet-head h3 { font-size: 17px; margin: 0; }
.cal-sheet-head .link-btn { font-size: 26px; line-height: 1; padding: 0 6px; color: var(--text-muted); }
.cal-sheet .cal-item { white-space: normal; font-size: 15px; padding: 10px 12px; margin-bottom: 8px; border-left-width: 4px; }
.cal-sheet .cal-item b { display: inline; }
.cal-sheet-add { width: 100%; margin-top: 6px; }
@media (prefers-reduced-motion: reduce) { .cal-views-wrap { transition: none !important; } .cal-sheet[open] { animation: none; } }
.cal-views .tab { padding: 5px 12px; font-size: 13px; }
@media (max-width: 800px) {
  /* Phones: a compact month (like Google Calendar) or the list. */
  /* Today + Month/List on top, then what to show, then ‹ month › centred right above the grid. */
  .cal-bar { flex-direction: column; align-items: stretch; gap: 10px; margin-bottom: 8px; }
  .cal-tools { order: 1; margin-left: 0; justify-content: flex-end; }
  .cal-legend { order: 2; }
  .cal-nav { order: 3; justify-content: center; gap: 12px; margin-top: 4px; }
  .cal-nav .btn-small { width: 34px; flex: none; }
  .cal-views { display: flex; flex-wrap: nowrap; gap: 4px; }
  .cal-views .tab { padding: 4px 12px; }
  .cal-month { min-width: 0; font-size: 18px; white-space: nowrap; text-align: center; }
  .cal-today { white-space: nowrap; font-size: 14px; margin-right: auto; }
  .cal-legend { gap: 4px 10px; }
  .cal-toggle { font-size: 12px; }
  [data-view="list"] .cal-grid { display: none; }
  [data-view="list"] .cal-list { display: block; }
  .cal-stage { margin: 0 -16px; }  /* edge to edge; the stage clips the sliding month */
  .cal-grid { border-radius: 0; border-left: 0; border-right: 0; }
  .cal-list { padding: 0 16px; }
  .cal-head span { padding: 6px 0 4px; text-align: center; font-size: 11px; letter-spacing: 0; }
  .cal-day { min-height: 84px; padding: 3px 2px 4px; gap: 2px; }
  .cal-date { align-self: center; min-width: 22px; height: 22px; padding: 0 4px; font-size: 12px; }
  .cal-grid .cal-item { padding: 1px 3px; border-left: 0; border-radius: 4px; font-size: 10.5px; line-height: 1.4;
    background: color-mix(in srgb, var(--k) 30%, transparent); text-overflow: clip; }
  .cal-grid .cal-item.k-asked { border: 1px dashed var(--k); background: transparent; }
  .cal-grid .cal-item b { display: none; }
}
@media (max-width: 370px) {
  .cal-month { font-size: 16px; }
}

/* ---------- sidebar groups: fold open and shut ---------- */
.sidebar { overflow-y: auto; scrollbar-width: thin; }
.nav-group-head {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  margin-top: 10px; padding: 6px 12px; border: 0; border-radius: var(--radius-sm); background: none;
  font: inherit; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--text-muted); cursor: pointer;
}
.nav-group-head:hover { color: var(--accent); }
.nav-group-head:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.nav-chevron { width: 14px; height: 14px; transition: transform .28s cubic-bezier(.4, 0, .2, 1); }
.nav-group:not(.open) .nav-chevron { transform: rotate(-90deg); }
.nav-group-body {
  display: grid; grid-template-rows: 1fr;
  transition: grid-template-rows .3s cubic-bezier(.4, 0, .2, 1);
}
.nav-group:not(.open) .nav-group-body { grid-template-rows: 0fr; }
.nav-group-inner {
  min-height: 0; overflow: hidden; display: flex; flex-direction: column; gap: 4px;
  padding: 4px 2px 0; margin: 0 -2px; opacity: 1; transition: opacity .25s ease, visibility 0s;
}
/* Shut: hidden from the keyboard too, once it has folded away. */
.nav-group:not(.open) .nav-group-inner { opacity: 0; visibility: hidden; transition: opacity .2s ease, visibility 0s .3s; }
@media (prefers-reduced-motion: reduce) {
  .nav-group-body, .nav-chevron, .nav-group-inner { transition: none; }
}

/* Tokens and secrets: hidden like a password, but not a password field,
   so browsers don't fill in your login here. */
.secret-input { -webkit-text-security: disc; }
.int-days { display: flex; align-items: center; gap: 8px; }
.int-days input { width: 90px; }
.int-pages { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--radius-sm); margin: 8px 0 6px; }
.int-page { display: grid; grid-template-columns: minmax(0, 1fr) 190px minmax(0, 1fr); gap: 12px; align-items: center; padding: 10px 12px; }
.int-page + .int-page { border-top: 1px solid var(--border); }
.int-page-name { align-items: center; }
.int-page-questions { grid-column: 1 / -1; padding-left: 26px; }
.int-page-questions .field-hint { margin: 0 0 2px; }
.int-page select { width: 100%; }
@media (max-width: 800px) { .int-page { grid-template-columns: 1fr; gap: 8px; } }

/* ---------- tag picker: tags as a dropdown with search ---------- */
.tag-picker { position: relative; }
.tag-picker:not(.is-ready) { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.tag-picker-btn {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px; width: 100%; min-height: 42px;
  padding: 7px 34px 7px 10px; position: relative; text-align: left; cursor: pointer;
  background: var(--surface); color: var(--text); font: inherit;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.tag-picker-btn:hover { border-color: color-mix(in srgb, var(--text) 30%, var(--border)); }
.tag-picker.is-open .tag-picker-btn, .tag-picker-btn:focus-visible { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.tag-picker-empty { color: var(--text-muted); font-size: 14px; }
.tag-chip {
  display: inline-flex; align-items: center; padding: 2px 10px; border-radius: var(--radius-pill);
  background: var(--accent-soft); color: var(--accent); font-size: 13px; font-weight: 600; white-space: nowrap;
}
.tag-picker-caret {
  position: absolute; right: 12px; top: 50%; width: 8px; height: 8px; margin-top: -6px;
  border-right: 2px solid var(--text-muted); border-bottom: 2px solid var(--text-muted); transform: rotate(45deg);
  transition: transform .2s ease, margin-top .2s ease;
}
.tag-picker.is-open .tag-picker-caret { transform: rotate(-135deg); margin-top: -2px; }
.tag-picker-pop {
  position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; right: 0; min-width: 240px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .18); padding: 8px; animation: tag-pop .16s ease-out;
}
@keyframes tag-pop { from { opacity: 0; transform: translateY(-4px); } }
.tag-picker-search {
  width: 100%; margin-bottom: 6px; padding: 9px 12px; font: inherit; font-size: 14px; color: var(--text);
  background: var(--field-bg, var(--bg)); border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.tag-picker-list { display: flex; flex-direction: column; max-height: 260px; overflow-y: auto; }
.tag-picker-list label.check { display: flex; width: 100%; padding: 7px 8px; border-radius: 6px; margin: 0; cursor: pointer; user-select: none; }
.tag-picker-list label.check:hover, .tag-picker-list label.check:focus-within { background: color-mix(in srgb, var(--text) 6%, transparent); }
.tag-picker-list label.check[hidden] { display: none; }
.tag-picker-none { padding: 6px 8px; margin: 0; }
@media (prefers-reduced-motion: reduce) { .tag-picker-pop { animation: none; } .tag-picker-caret { transition: none; } }

/* Brochure builder: B / I above text fields */
.fmt-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; }
.fmt-head-end { justify-content: flex-end; margin-top: 6px; }
.fmt-bar { display: inline-flex; gap: 4px; margin-bottom: 6px; }
.fmt-bar button {
  width: 32px; height: 30px; display: grid; place-items: center; padding: 0; cursor: pointer;
  font: inherit; font-size: 14px; color: var(--text); background: var(--surface);
  border: 1px solid var(--border); border-radius: 8px;
}
.fmt-bar button:hover { border-color: var(--accent); color: var(--accent); }
.fmt-bar button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.has-open-picker { position: relative; z-index: 40; }
.tag-picker.opens-up .tag-picker-pop { top: auto; bottom: calc(100% + 6px); }

/* Calendar: the whole width, and on a computer the month fills the screen
   (each week a share of the height left under the header). */
.content:has(#cal-stage) { max-width: none; }
@media (min-width: 801px) {
  .cal-day { min-height: max(86px, calc((100vh - 390px) / var(--weeks, 6))); }
}

/* Automation builder: the whole width, and the canvas as tall as the screen. */
.content:has(.auto-layout) { max-width: none; }
@media (min-width: 1001px) {
  .auto-canvas { min-height: calc(100vh - 310px); }
  .auto-activity { position: sticky; top: 16px; }
}

/* Recently deleted */
.trash-note { margin: 0 0 14px; max-width: 760px; }
.trash-actions { display: flex; gap: 8px; justify-content: flex-end; align-items: center; }
.trash-actions form { margin: 0; }

/* Brochure builder: a question with its move buttons */
.br-faq-head { display: flex; align-items: center; gap: 8px; }
.br-faq-head input { flex: 1; min-width: 0; }
.br-faq-head .br-tools { flex: none; }

/* Leads > Merge */
.merge-card { max-width: 640px; display: flex; flex-direction: column; gap: 12px; }
.merge-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 60vh; overflow-y: auto; }
.merge-list a { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); text-decoration: none; }
.merge-list a:hover { border-color: var(--accent); }
.merge-choices { display: flex; flex-direction: column; gap: 10px; }
.merge-choices fieldset { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 12px 10px; margin: 0; }
.merge-choices legend { font-weight: 600; font-size: 13px; padding: 0 4px; }
.merge-choices .check { display: flex; align-items: center; gap: 8px; padding: 3px 0; }
.merge-choices .check input { width: auto; margin: 0; }
.merge-actions { display: flex; gap: 8px; align-items: center; }

/* ---------- Opening the app: film light leak, then a blur-zoom into the page ---------- */
.splash { position: fixed; inset: 0; z-index: 9999; display: grid; place-items: center; overflow: hidden;
  background: #0e0b09; transform-origin: 50% 45%; }
.splash[hidden] { display: none; }
.splash-logo { position: relative; z-index: 2; width: min(24vw, 108px); aspect-ratio: 520 / 586; background: #ff6b1a;
  -webkit-mask: url("../brand/23-studios-lockup.afe5b4459f42.svg") center / contain no-repeat;
  mask: url("../brand/23-studios-lockup.afe5b4459f42.svg") center / contain no-repeat;
  opacity: 0; transform: scale(.94); filter: blur(10px);
  animation: splash-logo 1.1s .75s cubic-bezier(.2, .7, .2, 1) forwards; }
.splash-leak { position: absolute; inset: -20%; z-index: 1; mix-blend-mode: screen; }
.splash-leak span { position: absolute; border-radius: 50%; filter: blur(48px); opacity: 0; }
.splash-leak span:nth-child(1) { width: 85vmax; height: 55vmax; left: -60vmax; top: 10%;
  background: radial-gradient(closest-side, rgba(255, 140, 60, .95), rgba(255, 90, 30, .5) 55%, transparent);
  animation: splash-leak-a 2s cubic-bezier(.45, .05, .3, 1) forwards; }
.splash-leak span:nth-child(2) { width: 60vmax; height: 40vmax; right: -55vmax; top: 35%;
  background: radial-gradient(closest-side, rgba(255, 205, 130, .9), rgba(255, 150, 70, .35) 60%, transparent);
  animation: splash-leak-b 2s .15s cubic-bezier(.45, .05, .3, 1) forwards; }
.splash-leak span:nth-child(3) { width: 140vmax; height: 18vmax; left: -40vmax; top: 22%; border-radius: 40%;
  background: linear-gradient(90deg, transparent, rgba(255, 120, 40, .55) 40%, rgba(255, 230, 190, .7) 50%, rgba(255, 120, 40, .55) 60%, transparent);
  transform: rotate(-18deg) translateX(-60%);
  animation: splash-streak 1.6s .3s cubic-bezier(.4, 0, .2, 1) forwards; }
.splash-vignette { position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 45%, rgba(0, 0, 0, .55)); }
@keyframes splash-logo { to { opacity: 1; transform: scale(1); filter: blur(0); } }
@keyframes splash-leak-a { 0% { opacity: 0; transform: translateX(0); } 35% { opacity: .95; } 100% { opacity: .35; transform: translateX(120vmax); } }
@keyframes splash-leak-b { 0% { opacity: 0; transform: translateX(0); } 40% { opacity: .8; } 100% { opacity: .3; transform: translateX(-110vmax); } }
@keyframes splash-streak { 0% { opacity: 0; transform: rotate(-18deg) translateX(-60%); } 30% { opacity: 1; } 100% { opacity: 0; transform: rotate(-18deg) translateX(60%); } }
/* Light mode: warm paper instead of a dark room; the light leaks become soft peach glows. */
html[data-mode="light"] .splash { background: #f6f1eb; }
html[data-mode="light"] .splash-leak { mix-blend-mode: multiply; }
html[data-mode="light"] .splash-leak span:nth-child(1) { background: radial-gradient(closest-side, rgba(255, 150, 90, .55), rgba(255, 175, 120, .25) 55%, transparent); }
html[data-mode="light"] .splash-leak span:nth-child(2) { background: radial-gradient(closest-side, rgba(255, 200, 140, .6), rgba(255, 215, 170, .25) 60%, transparent); }
html[data-mode="light"] .splash-leak span:nth-child(3) { background: linear-gradient(90deg, transparent, rgba(255, 160, 100, .35) 40%, rgba(255, 190, 130, .45) 50%, rgba(255, 160, 100, .35) 60%, transparent); }
html[data-mode="light"] .splash-vignette { background: radial-gradient(ellipse at center, transparent 50%, rgba(120, 80, 50, .12)); }
/* Second 3: the splash zooms towards you and blurs away while the page comes into focus. */
html.splashing body > :not(.splash):not(script) { transform: scale(1.06); filter: blur(14px); }
html.splash-out body > :not(.splash):not(script) { transform: none; filter: none;
  transition: transform 1s cubic-bezier(.2, .7, .2, 1), filter 1s cubic-bezier(.2, .7, .2, 1); }
html.splash-out .splash { animation: splash-out 1s cubic-bezier(.5, 0, .2, 1) forwards; pointer-events: none; }
@keyframes splash-out { to { opacity: 0; transform: scale(1.45); filter: blur(26px); } }
.link-cell { max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.film-plan ul { margin: 8px 0 0; padding-left: 18px; max-height: 260px; overflow-y: auto; font-size: 13px; }
.film-plan li { padding: 2px 0; }

/* Sidebar: a feature that isn't in the plan gets a small upgrade note. */
.nav-upsell { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 600; letter-spacing: .01em; color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent); }
.nav-upsell svg { width: 11px; height: 11px; }
.nav-upsell .nav-upsell-text { display: inline; }
.sidebar .nav-group .nav-upsell { padding: 3px 6px; gap: 0; }
.sidebar .nav-group .nav-upsell-text { display: none; }

.pick-col { width: 36px; }
.pick-col input { width: auto; margin: 0; }

.card-head-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.card-head-link { font-size: 13px; font-weight: 600; }

.trash-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.trash-head .trash-note { flex: 1 1 420px; margin: 0; }

.lead-props { margin-top: 16px; }
.lead-props:empty { display: none; }

/* Copy button inside a field (couple and lead details). */
.copy-wrap { position: relative; display: block; }
.copy-wrap > input { padding-right: 40px; }
.copy-field { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; display: grid; place-items: center;
  border: 0; border-radius: 8px; background: transparent; color: var(--text-muted); cursor: pointer; opacity: .55; }
.copy-field svg { width: 15px; height: 15px; }
.copy-field:hover, .copy-field:focus-visible { opacity: 1; background: var(--accent-soft); color: var(--accent); outline: none; }
.copy-field.copied { opacity: 1; color: var(--accent); }
.copy-field[hidden] { display: none; }

/* Notes with bold (rich-notes.js): looks like the other text fields. */
.rich-notes { min-height: 120px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.5; cursor: text; }
.rich-notes:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.rich-notes b, .rich-notes strong { font-weight: 700; }

/* Templates: Duplicate sits next to Delete, top right of the card. */
.tpl-dup-form { position: absolute; top: 12px; right: 46px; margin: 0; }
.tpl-dup-form:last-child { right: 10px; }
.tpl-actions .tpl-icon { width: 32px; height: 32px; min-height: 0; padding: 0; display: inline-flex; align-items: center; justify-content: center; margin: 0; }

.auto-ready-title { margin-top: 28px; }
.auto-ready { display: flex; align-items: center; gap: 16px; justify-content: space-between; flex-wrap: wrap; }
.auto-ready-text { display: flex; flex-direction: column; gap: 4px; flex: 1 1 320px; }
.auto-ready form { margin: 0; }

/* Template card: the name never runs under the duplicate/delete icons. */
.tpl-meta .tpl-name { padding-right: 72px; }
.tpl-meta:not(:has(.tpl-delete)) .tpl-name { padding-right: 36px; }
.tpl-merge { margin-bottom: 16px; }
.tpl-merge summary { cursor: pointer; }
.tpl-merge-list { margin: 12px 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
/* The subject starts below the icons, so it can use the whole width without running into them. */
.tpl-meta .tpl-name { min-height: 30px; }
.tpl-meta > .field-hint { padding-right: 0; }

/* Template cards: Edit / Use in email on one line across a row, whatever the name's length. */
.tpl-card .tpl-meta { flex: 1; }
.tpl-card .tpl-actions { margin-top: auto; padding-top: 8px; }
/* Templates: one version per language (the main one, then e.g. Nederlands). */
.tpl-langs { margin-bottom: 12px; }
.tpl-lang .field-hint { font-weight: 400; margin-left: 4px; }
.tpl-lang-hint { margin: -4px 0 14px; }
/* Settings > Languages */
.lang-list { list-style: none; margin: 0 0 14px; padding: 0; }
.lang-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 0; border-bottom: 1px solid var(--border); }
.lang-actions { display: flex; gap: 14px; align-items: center; }
.lang-actions form { margin: 0; }
.lang-add-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.lang-add-row input[type=text] { flex: 1 1 220px; }
.lang-add-row select { width: auto; }
.lang-default { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; background: var(--accent-soft, rgba(255,90,0,.12)); color: var(--accent); }
.lang-actions .link-btn:not(.danger-text) { color: var(--accent); }
.auto-card .auto-delete { width: 34px; height: 34px; min-height: 0; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
.auto-card .auto-delete:hover { color: var(--danger, #c0392b); }
/* Phone: name and details on top, full width; the switch and buttons on a row below. */
@media (max-width: 700px) {
  .auto-list .auto-card { grid-template-columns: auto auto auto minmax(34px, 1fr); gap: 12px 8px; }
  .auto-card .auto-switch { gap: 6px; }
  .auto-list .auto-card .auto-card-main { grid-column: 1 / -1; }
  .auto-list .auto-card > .inline-form:last-child { justify-self: end; }
  .auto-card .auto-switch b { min-width: 0; }
}
button.sort-link { background: none; border: 0; padding: 0; margin: 0; font: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; min-height: 0; }
/* The bell (sidebar top and the phone's top bar) and its list. */
.sidebar-tools { display: flex; align-items: center; gap: 6px; }
.bell-btn { position: relative; display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 1px solid var(--border); border-radius: 50%;
  background: transparent; color: var(--text-muted); cursor: pointer; flex: none; }
.sidebar-tools .bell-btn, .sidebar-tools .theme-toggle { margin-top: 4px; }
.bell-btn:hover { color: var(--text); }
.bell-btn svg { width: 16px; height: 16px; display: block; }
.bell-btn.has-unread { color: var(--text); }
.bell-count { position: absolute; top: -5px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: #e5484d; color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; box-shadow: 0 0 0 2px var(--bg, #fff); }
.bell-panel { position: fixed; z-index: 1000; max-height: min(70vh, 520px); overflow-y: auto; background: color-mix(in srgb, var(--page-base, #fff) 94%, transparent); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); border: 1px solid var(--border);
  border-radius: 16px; box-shadow: 0 12px 40px rgba(0,0,0,.14); padding: 6px 0; }
.bell-panel[hidden] { display: none; }
.bell-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px 8px; font-size: 14px; }
.bell-list { list-style: none; margin: 0; padding: 0; }
.bell-list a { display: flex; gap: 10px; padding: 10px 16px; color: inherit; text-decoration: none; }
.bell-list a:hover { background: var(--hover, rgba(0,0,0,.04)); }
.bell-dot { flex: none; width: 8px; height: 8px; margin-top: 6px; border-radius: 50%; background: transparent; }
.bell-list li.unread .bell-dot { background: #e5484d; }
.bell-list li.unread .bell-title { font-weight: 700; }
.bell-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 13.5px; }
.bell-detail, .bell-when { color: var(--text-muted); font-size: 12.5px; }
.bell-when { font-size: 11.5px; }
.bell-empty { padding: 8px 16px 14px; margin: 0; }
/* Home: the Leads card when new leads haven't been opened yet. */
.card.has-new-leads { position: relative; box-shadow: 0 0 0 2px #e5484d; }
.new-leads-badge { position: absolute; top: 12px; right: 12px; padding: 2px 9px; border-radius: 999px; background: #e5484d; color: #fff; font-size: 12px; font-weight: 700; }
/* Leads: not opened yet. */
.lead-table tr.lead-unread .cell-main a { font-weight: 800; }
.lead-unread-dot { display: inline-block; width: 8px; height: 8px; margin-right: 7px; border-radius: 50%; background: #e5484d; vertical-align: 1px; }
/* 23 Studios admin: a platform email and its preview side by side. */
.platform-email { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.platform-preview { padding: 14px; position: sticky; top: 16px; }
.platform-preview iframe { width: 100%; height: 640px; border: 0; border-radius: 12px; background: #f2f2f0; }
.pe-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.pe-tags .btn-small { margin-top: 0; font-family: ui-monospace, Menlo, monospace; font-size: 12px; }
@media (max-width: 1000px) { .platform-email { grid-template-columns: 1fr; } .platform-preview { position: static; } }
.pe-list .account-row:first-child { border-top: 0; padding-top: 0; }
.pe-list .account-row:last-child { padding-bottom: 0; }

/* Films on a phone: name on top, then status + Delete, then Visible + Email; the still's buttons
   in two even columns; the file's name above its Replace / Remove file. */
@media (max-width: 800px) {
  .film-option:not(.checked) { grid-template-columns: 1fr auto; }
  .film-option.checked, .film-option.checked:has(.film-mail-btn) { grid-template-columns: 1fr auto; }
  .film-option.checked .film-name { grid-column: 1 / -1; }
  .film-option.checked > select { order: 1; min-width: 0; width: 100%; }
  .film-option.checked > [data-film-delete] { order: 2; }
  .film-option.checked > .check { order: 3; white-space: nowrap; }
  .film-option.checked > .film-mail-btn { order: 4; }
  .film-option.checked > .film-file { order: 5; }
}
@media (max-width: 600px) {
  .still-upload { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .still-upload :is(.file-info, .upload-progress) { grid-column: 1 / -1; }
  .still-upload .btn-small { width: 100%; justify-content: center; }
  .still-upload:has(.still-frame-btn[hidden]) .still-link-btn { grid-column: 1 / -1; }
  .still-upload .still-remove-btn { grid-column: 1 / -1; justify-self: start; }
  .film-option .film-upload:not(.still-upload) .file-info { order: -1; flex-basis: 100%; }
}

/* Films & extras in Settings: the name reads as a title (a field only on hover / while typing),
   also in light / dark mode, and on a phone the details stack neatly. */
[data-mode] .type-head :is(.type-name, .pkg-name):not(:hover):not(:focus) { background-color: transparent; border-color: transparent; }
.type-head :is(.type-name, .pkg-name) { padding-left: 8px; padding-right: 8px; text-overflow: ellipsis; }
.type-includes .check { gap: 6px; font-size: 13px; font-weight: 400; cursor: pointer; }
.type-includes .check > input { width: auto; margin: 0; }
@media (max-width: 600px) {
  .type-toggle { min-width: 0; padding: 0 4px; gap: 6px; }
  .open .type-toggle .type-sum { display: none; } /* open: the price is right below, the name gets the room */
  .type-price { max-width: none; }
  .type-window { flex-direction: column; align-items: stretch; gap: 6px; }
  .type-window > label:first-child { flex-direction: column; align-items: stretch; gap: 4px; }
  .type-window select { width: 100%; }
  .type-includes .check, .type-parts { display: block; font-size: 14px; font-weight: 500; line-height: 1.45; }
  :is(.type-includes .check, .type-parts) > input { display: inline-block; vertical-align: -2px; margin: 0 8px 0 0; width: auto; }
  .type-foot .btn { flex: 1 1 0; white-space: nowrap; margin: 0; padding-left: 10px; padding-right: 10px; }
}

/* Sidebar: always some room between the last menu item and the storage box, also when the menu is long. */
.sidebar > .nav[aria-label="Main"] { padding-bottom: 20px; }

/* Billing: Yearly / Monthly centred right above the plans, so it's clear it switches their prices. */
.tabs.billing-interval { display: flex; width: fit-content; margin: 16px auto 14px; }
.billing-interval .tab { padding: 8px 18px; font-size: 14px; }

/* Locked page: the smaller step after "it's in Grow" (e.g. only the Booking Brochure on Deliver). */
.locked-alt { margin-top: 16px !important; font-size: 13px; color: var(--text-muted); }

/* Links that allauth shows as buttons (Download codes, Generate new codes): quiet full-width buttons, not loose links. */
.auth-card a.auth-link-btn { display: block; width: 100%; margin-top: 8px; padding: 11px 12px; border: 1px solid var(--border);
  border-radius: var(--radius-pill); color: var(--text); font-weight: 600; text-align: center; text-decoration: none; }
.auth-card a.auth-link-btn:hover { border-color: var(--accent); color: var(--accent); }

/* Account › Two-step login: Recovery codes and Switch off stacked and lined up on the right. */
.account-row-stack .account-actions { flex-direction: column; align-items: stretch; flex-shrink: 0; }
.account-row-stack .account-actions .btn { text-align: center; justify-content: center; }
@media (max-width: 600px) { .account-row-stack .account-actions { flex-direction: row; align-self: stretch; } }

/* Onboarding: empty screens that explain what goes here and offer the first step. */
.empty-guide { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 40px 24px; }
.empty-guide strong { color: var(--text); font-size: 16px; }
.empty-guide p { max-width: 460px; margin: 0; line-height: 1.5; }
.empty-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 8px; }
.empty-actions form { margin: 0; }
.empty-actions .btn { margin-top: 0; }
/* The sample couple: a note on top with one-click removal. */
.sample-banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.sample-banner form { margin: 0; }
.sample-banner .btn { margin-top: 0; }

/* Automation builder: "Test on yourself" results. */
.auto-test-dialog { max-width: 520px; }
.auto-test-results { margin: 12px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.auto-test-results .field-hint { display: block; }

/* Billing: a tester's discounted price, with the normal price struck through. */
.plan-was { color: var(--text-muted); font-size: 15px; margin-right: 2px; }
.tester-invite { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
.tester-invite input[type="email"] { flex: 1 1 220px; }
.tester-invite select { flex: 0 1 auto; width: auto; }
.tester-invite .btn { margin-top: 0; }

/* ---------- terms and privacy ---------- */
.legal { max-width: 760px; margin: 0 auto; padding: 24px 16px 64px; }
.legal-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-bottom: 24px; }
.legal-head .logo { display: inline-flex; }
.legal-head nav { font-size: 14px; color: var(--text-muted); }
.legal-head nav a { color: var(--text-muted); }
.legal-head nav a[aria-current] { color: var(--text); font-weight: 600; }
.legal-body { line-height: 1.6; }
.legal-body h1 { font-size: 28px; margin: 8px 0 4px; }
.legal-body h2 { font-size: 18px; margin: 28px 0 8px; }
.legal-body ul { padding-left: 20px; }
.legal-body li { margin: 4px 0; }
.legal-body hr { margin: 48px 0 24px; border: 0; border-top: 1px solid var(--border); }
.legal-meta { color: var(--text-muted); font-size: 14px; margin-top: 0; }
.legal-table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 8px 0; }
.legal-table th, .legal-table td { text-align: left; padding: 8px 10px; border-top: 1px solid var(--border); vertical-align: top; }
.legal-table th { color: var(--text-muted); font-weight: 600; border-top: 0; }
@media (max-width: 600px) { .legal-table { font-size: 13px; } .legal-table th, .legal-table td { padding: 6px; } }
.create-agree { display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; line-height: 1.45; margin: 4px 0 12px; }
.create-agree input { margin-top: 3px; flex: none; }
.int-recent { margin-top: 16px; border-top: 1px solid var(--border); padding-top: 12px; }
.int-recent > summary { cursor: pointer; list-style: none; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.int-recent > summary::-webkit-details-marker { display: none; }
.int-recent > summary .int-sub { margin: 0; }
.int-recent > summary .int-sub::after { content: " ▸"; color: var(--text-muted); }
.int-recent[open] > summary .int-sub::after { content: " ▾"; }
.int-recent .activity { margin-top: 10px; }
.int-page-lang { width: auto; max-width: 220px; }
.int-form-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.int-page .int-page-lang { width: 190px; justify-self: start; }
/* ---------- forms ---------- */
.fb-notice { background: var(--accent-soft); border-radius: var(--radius-sm); padding: 10px 14px; margin: 0; font-size: 14px; }
.fb-notice[hidden] { display: none; }
.fb-opts { display: flex; flex-direction: column; gap: 6px; }
.fb-opt { display: flex; gap: 6px; align-items: center; }
.fb-opt input { flex: 1; }
.fb-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.fb-row select { width: auto !important; }
#fb .br-body > .btn { align-self: flex-start; }
/* drag to reorder in the builders */
.br-block-head > .drag-handle, .br-item-head > .drag-handle, .br-faq-head > .drag-handle, .fb-opt > .drag-handle { flex: none; width: 18px; cursor: grab; touch-action: none; }
.br-block.dragging, .br-item.dragging, .fb-opt.dragging { opacity: .5; }
.terms-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); }
.terms-card h2 { margin: 0 0 4px; }
.terms-card p { margin: 0; max-width: 60ch; }
.terms-card form { margin: 0; }
/* ---------- help: the ? button, videos and a line to us ---------- */
.help-btn { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); color: var(--text-muted); font: 700 14px/1 inherit; cursor: pointer; }
.help-btn:hover { color: var(--text); }
.help-dialog { width: min(640px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 0; border: 0; border-radius: var(--radius, 16px); background: var(--page-base, #fff); color: var(--text); box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.help-dialog::backdrop { background: rgba(0,0,0,.45); }
.help-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px 8px; }
.help-head h2 { margin: 0; font-size: 18px; }
.help-head .link-btn { font-size: 22px; line-height: 1; }
.help-player { padding: 0 20px 8px; }
.help-player iframe, .help-player video { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 10px; background: #000; display: block; }
.help-player [hidden] { display: none; }
.help-admin-row { display: flex; gap: 10px; align-items: center; margin-top: 10px; }
.help-admin-row input[type=url] { flex: 1; }
.help-admin-min input { width: 64px; }
.help-list { padding: 0 12px; }
.help-group { margin: 12px 8px 4px; font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; }
.help-item { display: flex; gap: 12px; align-items: flex-start; width: 100%; text-align: left; padding: 10px 8px; border: 0; border-radius: 10px; background: none; color: inherit; font: inherit; cursor: pointer; }
.help-item:hover, .help-item.is-playing { background: var(--accent-soft); }
.help-item strong { display: block; font-size: 14px; }
.help-item small { display: block; color: var(--text-muted); font-size: 12.5px; margin-top: 2px; }
.help-play { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; font-size: 10px; margin-top: 1px; }
.help-ask { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 12px 20px 20px; padding: 14px 16px; border-radius: 12px; background: color-mix(in srgb, var(--text) 5%, transparent); }
.help-ask p { margin: 0; font-size: 14px; max-width: 40ch; }
.help-inline { margin-top: 6px; padding: 0; border: 0; background: none; color: var(--accent); font: 600 13px/1.4 inherit; cursor: pointer; }
.help-inline span { color: var(--text-muted); font-weight: 400; }
.gs-list li { position: relative; }
.gs-video { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%; border: 0; background: var(--accent); color: #fff; font-size: 10px; cursor: pointer; }
.help-grow { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 99px; font-size: 11px; font-weight: 600; vertical-align: 1px; background: var(--accent-soft); color: var(--accent); }
.fb-requests { gap: 0; }
.fb-request { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); }
.fb-request:first-child { border-top: 0; }
.fb-request > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.fb-request > .btn, .fb-request > form { flex: none; white-space: nowrap; }
.fb-request.is-failed { box-shadow: inset 3px 0 0 var(--danger); padding-left: 12px; }
.fb-answers summary { cursor: pointer; }
.fb-answers dl { margin: 6px 0 0; display: grid; grid-template-columns: minmax(0, max-content) minmax(0, 1fr); gap: 4px 16px; font-size: 13.5px; }
.fb-answers dt { color: var(--text-muted); }
.fb-answers dd { margin: 0; overflow-wrap: anywhere; }

/* ---------- sidebar buttons: the same glowing glass on hover ----------
   + New couple, the group heads (Email, Studio), ?, the bell and light/dark.
   The bell gives a little ring, the moon rocks, the sun turns. */
[data-mode] :is(.btn-create, .help-btn, .bell-btn, .theme-toggle, .nav-group-head) {
  transition: color .3s ease, background .3s ease, border-color .3s ease, box-shadow .3s ease;
}
[data-mode] :is(.btn-create, .help-btn, .bell-btn, .theme-toggle, .nav-group-head):is(:hover, :focus-visible) {
  background: var(--glow-glass); box-shadow: var(--glow-shadow); border-color: transparent; color: var(--accent);
  -webkit-backdrop-filter: blur(16px) saturate(180%); backdrop-filter: blur(16px) saturate(180%); outline: none;
}
.theme-toggle svg, .bell-btn svg { transition: transform .5s cubic-bezier(.34, 1.56, .64, 1); }
.theme-toggle:hover .icon-sun { transform: rotate(90deg) scale(1.08); }
.theme-toggle:hover .icon-moon { animation: moon-rock .7s ease-in-out; }
.bell-btn:hover svg { animation: bell-ring .6s ease-in-out; transform-origin: 50% 10%; }
@keyframes moon-rock { 0%, 100% { transform: rotate(0); } 30% { transform: rotate(-22deg); } 65% { transform: rotate(10deg); } }
@keyframes bell-ring { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(14deg); } 40% { transform: rotate(-12deg); } 60% { transform: rotate(7deg); } 80% { transform: rotate(-4deg); } }
@media (prefers-reduced-motion: reduce) {
  .theme-toggle svg, .bell-btn svg { transition: none; animation: none !important; transform: none !important; }
}

/* ---------- everywhere in the app: the same hover ----------
   Second buttons, tabs, small text buttons and cards you can click get the
   frosted glass with an orange glow and orange text; orange buttons glow
   and get a glassy sheen. (Not on the couples' Delivery Page: delivery.css.) */
[data-mode] :is(.btn-ghost, .tab, .settings-tab, .link-btn:not(.danger), .lang-switch-item:not(.active)) {
  transition: color .3s ease, background .3s ease, border-color .3s ease, box-shadow .3s ease;
}
[data-mode] :is(.btn-ghost, .tab:not(.active), .settings-tab:not(.active), .link-btn:not(.danger), .lang-switch-item:not(.active)):is(:hover, :focus-visible) {
  background: var(--glow-glass); box-shadow: var(--glow-shadow); border-color: transparent; color: var(--accent); filter: none;
  -webkit-backdrop-filter: blur(16px) saturate(180%); backdrop-filter: blur(16px) saturate(180%); outline: none;
}
[data-mode] .settings-tab:not(.active):is(:hover, :focus-visible) { border-bottom-color: color-mix(in srgb, var(--accent) 35%, transparent); }
[data-mode] .link-btn:not(.danger):is(:hover, :focus-visible) { border-radius: var(--radius-sm); }
/* orange buttons: a glow and a glassy sheen */
[data-mode] :is(.btn:not(.btn-ghost):not(.btn-danger), .auth-card button:not(.auth-quiet):not(.auth-danger)) {
  transition: box-shadow .3s ease, background-image .3s ease, filter .3s ease;
}
[data-mode] :is(.btn:not(.btn-ghost):not(.btn-danger), .auth-card button:not(.auth-quiet):not(.auth-danger)):is(:hover, :focus-visible) {
  filter: none; outline: none;
  background-image: linear-gradient(180deg, rgba(255, 255, 255, .28), rgba(255, 255, 255, 0) 60%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 0 0 1px color-mix(in srgb, var(--accent) 30%, transparent),
    0 6px 20px color-mix(in srgb, var(--accent) 38%, transparent);
}
/* cards you can click */
[data-mode] :is(a.card, .tpl-card, .int-card):hover { border-color: color-mix(in srgb, var(--accent) 35%, transparent);
  box-shadow: var(--glass-edge, none), 0 6px 22px color-mix(in srgb, var(--accent) 16%, transparent); }
/* the rest found by walking every page: buttons and chips with a border or fill get the glass… */
[data-mode] :is(.lead-step:not(.active), .lang-pill:not(.active), .tag-picker-btn, .gs-video) {
  transition: color .3s ease, background .3s ease, border-color .3s ease, box-shadow .3s ease;
}
[data-mode] :is(.lead-step:not(.active), .lang-pill:not(.active), .tag-picker-btn, .gs-video):is(:hover, :focus-visible) {
  background: var(--glow-glass); box-shadow: var(--glow-shadow); border-color: transparent; color: var(--accent); outline: none;
  -webkit-backdrop-filter: blur(16px) saturate(180%); backdrop-filter: blur(16px) saturate(180%);
}
/* …plain text links and fold-out titles fade to orange */
[data-mode] :is(.toolbar-link, a.field-hint, .sort-link, .tpl-name, .br-toggle, .help-inline, details > summary, .auto-card-main) { transition: color .3s ease; }
[data-mode] :is(.toolbar-link, a.field-hint, .sort-link, .tpl-name, .br-toggle, .help-inline, details > summary, .auto-card-main):hover,
[data-mode] .br-toggle:hover :is(strong, .field-hint), [data-mode] details > summary:hover :is(strong, .field-hint, span) { color: var(--accent); }
[data-mode] .help-inline:hover { text-shadow: 0 0 14px color-mix(in srgb, var(--accent) 45%, transparent); }
[data-mode] .auto-card:has(.auto-card-main:hover) { border-color: color-mix(in srgb, var(--accent) 35%, transparent);
  box-shadow: var(--glass-edge, none), 0 6px 22px color-mix(in srgb, var(--accent) 16%, transparent); }
[data-mode] .toolbar-link { padding: 5px 10px; border-radius: var(--radius-sm); transition: background .3s ease, box-shadow .3s ease; }
[data-mode] .toolbar-link:is(:hover, :focus-visible) { background: var(--glow-glass); box-shadow: var(--glow-shadow); outline: none; }
/* remove (×): red under the pointer */
[data-mode] .br-tools button[data-remove], [data-mode] .br-tools button[data-del-item] { transition: color .3s ease, background .3s ease; border-radius: 6px; }
[data-mode] .br-tools button:is([data-remove], [data-del-item]):hover { color: var(--danger); background: color-mix(in srgb, var(--danger) 10%, transparent); }

/* ---------- signing up and setup: one question at a time (setup-flow.js) ---------- */
.setup-progress { position: fixed; top: 0; left: 0; right: 0; z-index: 50; height: 4px;
  background: color-mix(in srgb, var(--accent) 12%, transparent); }
.setup-progress > span { display: block; height: 100%; width: 0; border-radius: 0 4px 4px 0; background: var(--accent);
  box-shadow: 0 0 12px color-mix(in srgb, var(--accent) 60%, transparent); transition: width .6s cubic-bezier(.4, 0, .2, 1); }
.setup-wrap, .auth-wrap { position: relative; }
/* the question in the middle of the screen (the Style step with its preview stays at the top) */
.setup-wrap:not(.setup-wide) .is-flow { min-height: calc(100vh - 150px); display: flex; flex-direction: column; justify-content: center; padding-bottom: 6vh; }
.setup-wide .is-flow { padding-top: 4vh; }
/* above the question: the step in orange, then "2 of 5" */
.is-flow .setup-count { display: flex; align-items: center; gap: 10px; margin: 0 0 18px; font-size: 13px; }
.setup-count-step { color: var(--accent); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; font-size: 12px; }
.setup-count [data-q-count]:not(:empty) { padding: 3px 10px; border-radius: var(--radius-pill); background: color-mix(in srgb, var(--accent) 10%, transparent);
  color: var(--text-muted); font-weight: 600; font-size: 12px; }
.is-flow > h1 { margin-top: 0; }
.is-flow > .setup-lead { margin-bottom: 28px; }
.is-flow .setup-q { padding: 32px; }
.is-flow .setup-q > h2 { font-size: 24px; line-height: 1.25; margin-bottom: 6px; letter-spacing: -.01em; }
.is-flow .setup-q > .field-hint:first-of-type { font-size: 14px; margin-bottom: 18px; }
.is-flow .setup-q > :is(input[type="text"], input[type="email"], select) { font-size: 18px; padding: 14px 16px; margin-top: 6px; }
.is-flow .setup-q > input:focus { box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent); }
.setup-q h3 { font-size: 15px; margin: 0 0 2px; }
.is-flow .setup-sample { margin-top: 24px; padding-top: 20px; border-top: 1px dashed var(--border); }
@keyframes q-in-up { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
@keyframes q-in-down { from { opacity: 0; transform: translateY(-28px); } to { opacity: 1; transform: none; } }
.q-in-up { animation: q-in-up .45s cubic-bezier(.2, .8, .2, 1); }
.q-in-down { animation: q-in-down .45s cubic-bezier(.2, .8, .2, 1); }
/* Next (or Continue) on the left with "or press Enter", Back and Skip on the right */
.is-flow .setup-footer { gap: 12px; }
.is-flow .setup-footer :is(.setup-next, .setup-q-next) { order: 1; margin-left: 0; }
.is-flow .setup-footer .setup-enter { order: 2; color: var(--text-muted); font-size: 13px; }
.setup-enter kbd { font: 600 12px/1 inherit; padding: 3px 6px; border: 1px solid var(--border); border-radius: 5px; background: var(--surface); }
.is-flow .setup-footer :is(.setup-back, .setup-q-back) { order: 3; margin-left: auto; color: var(--text-muted); font-weight: 500; }
.is-flow .setup-footer .setup-skip { order: 4; }
.setup-footer .setup-enter, .setup-footer .setup-q-back { display: none; }
.is-flow .setup-footer .setup-enter { display: inline; }
.is-flow .setup-footer .setup-q-back:not([hidden]) { display: inline-flex; }
@media (max-width: 700px) { .is-flow .setup-footer .setup-enter { display: none; } .is-flow .setup-q { padding: 22px; } }
@media (prefers-reduced-motion: reduce) { .q-in-up, .q-in-down { animation: none; } .setup-progress > span { transition: none; } }
/* the same glass and glow in the setup steps */
[data-mode] .setup-steps a { transition: color .3s ease, background .3s ease, box-shadow .3s ease; }
[data-mode] .setup-steps a:is(:hover, :focus-visible) { background: var(--glow-glass); box-shadow: var(--glow-shadow); color: var(--accent); outline: none;
  -webkit-backdrop-filter: blur(16px) saturate(180%); backdrop-filter: blur(16px) saturate(180%); }
/* the question you're on glows softly while you type in it */
.is-flow .setup-q { transition: box-shadow .4s ease, border-color .4s ease; }
.is-flow .setup-q:focus { outline: none; }
.is-flow .setup-q:focus-within { border-color: color-mix(in srgb, var(--accent) 22%, var(--border));
  box-shadow: var(--glass-edge, none), 0 10px 36px color-mix(in srgb, var(--accent) 12%, transparent), var(--shadow); }
/* choices: colour tiles lift and glow, rows and chips get the glass */
.palette-swatch { transition: transform .3s cubic-bezier(.34, 1.56, .64, 1), box-shadow .3s ease, border-color .3s ease; }
.palette:hover .palette-swatch { transform: translateY(-2px); box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 22%, transparent); }
.palette:hover .palette-name { color: var(--accent); }
[data-mode] :is(.setup-q .pick, .setup-lang:not(.setup-lang-head)) { transition: background .3s ease, box-shadow .3s ease; border-radius: 8px; }
[data-mode] :is(.setup-q .pick, .setup-lang:not(.setup-lang-head)):hover { background: var(--glow-glass); box-shadow: var(--glow-shadow); }
[data-mode] .setup-q .pick { padding-left: 8px; padding-right: 8px; }
[data-mode] .chip-check { transition: color .3s ease, background .3s ease, box-shadow .3s ease, border-color .3s ease; }
[data-mode] .chip-check:hover { background: var(--glow-glass); box-shadow: var(--glow-shadow); border-color: transparent; color: var(--accent); }

/* setup Style step: a bigger preview in a browser frame */
.setup-wide .setup-top, .setup-wide .setup-main { max-width: 1560px; }
.setup-wide .setup-split { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 32px; }
.pf-frame { border-radius: 16px; overflow: hidden; background: var(--surface);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--text) 14%, transparent), 0 24px 60px rgba(40, 20, 10, .16), 0 4px 14px rgba(40, 20, 10, .06); }
.pf-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; background: color-mix(in srgb, var(--text) 5%, var(--surface));
  border-bottom: 1px solid color-mix(in srgb, var(--text) 10%, transparent); }
.pf-bar i { width: 10px; height: 10px; border-radius: 50%; background: color-mix(in srgb, var(--text) 18%, transparent); }
.pf-bar i:first-child { background: #ff5f57; } .pf-bar i:nth-child(2) { background: #febc2e; } .pf-bar i:nth-child(3) { background: #28c840; }
.pf-bar span { flex: 1; margin: 0 40px 0 14px; padding: 3px 12px; border-radius: var(--radius-pill); text-align: center; font-size: 12px;
  color: var(--text-muted); background: color-mix(in srgb, var(--text) 6%, transparent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.setup-preview .pf-frame iframe { display: block; width: 100%; height: max(480px, calc(100vh - 220px)); border: 0; border-radius: 0; }
.setup-preview > .field-hint { margin: 0 0 10px; }

/* colour picker (color-picker.js): swatch, hex field, and a field + hue slider */
.cp { position: relative; display: inline-flex; align-items: center; gap: 8px; }
.cp-swatch { width: 36px; height: 36px; padding: 0; border-radius: 10px; cursor: pointer; border: 1px solid color-mix(in srgb, var(--text) 20%, transparent);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .6); transition: box-shadow .3s ease, transform .2s ease; }
.cp-swatch:hover, .cp-swatch[aria-expanded="true"] { transform: translateY(-1px); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .6), 0 4px 14px color-mix(in srgb, var(--accent) 28%, transparent); }
.cp-hex { width: 96px !important; padding: 7px 10px !important; font: 500 13px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace !important; text-transform: uppercase; }
.cp-hex.is-bad { border-color: var(--danger) !important; }
.cp-pop { position: absolute; z-index: 60; top: calc(100% + 8px); right: 0; width: 232px; padding: 12px; border-radius: 14px;
  background: var(--glow-glass), var(--surface); box-shadow: var(--glow-shadow), 0 18px 40px rgba(40, 20, 10, .18);
  -webkit-backdrop-filter: blur(16px) saturate(180%); backdrop-filter: blur(16px) saturate(180%); }
.cp-sv { position: relative; height: 150px; border-radius: 10px; cursor: crosshair; touch-action: none;
  background-image: linear-gradient(to top, #000, transparent), linear-gradient(to right, #fff, transparent); }
.cp-sv:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.cp-dot { position: absolute; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .3), 0 2px 6px rgba(0, 0, 0, .3); pointer-events: none; }
.cp-hue { -webkit-appearance: none; appearance: none; width: 100%; height: 12px; margin: 12px 0 2px; border-radius: 999px; cursor: pointer;
  background: linear-gradient(to right, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00); }
.cp-hue::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 0; box-shadow: 0 0 0 1px rgba(0, 0, 0, .25), 0 2px 6px rgba(0, 0, 0, .3); }
.cp-hue::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 0; box-shadow: 0 0 0 1px rgba(0, 0, 0, .25), 0 2px 6px rgba(0, 0, 0, .3); }
.setup-color { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 0; font-weight: 600; }
.custom-colors { display: grid; grid-template-columns: 1fr; gap: 4px; margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--border); }

/* "… is ready": in the middle of the screen, the next steps under each other */
.setup-done { min-height: calc(100vh - 48px); display: flex; flex-direction: column; justify-content: center; padding: 48px 0 8vh; }
.setup-done h1 { font-size: 34px; letter-spacing: -.02em; }
.setup-done .setup-lead { font-size: 16px; margin: 6px auto 32px; }
.setup-done .setup-check { width: 72px; height: 72px; margin-bottom: 20px; box-shadow: 0 10px 30px color-mix(in srgb, var(--accent) 40%, transparent); }
.setup-done .setup-check svg { width: 34px; height: 34px; }
.setup-done .done-grid { grid-template-columns: 1fr; gap: 14px; width: 100%; max-width: 560px; margin: 0 auto; }
a.card.done-tile { display: grid; grid-template-columns: 1fr auto; column-gap: 16px; align-items: center; padding: 22px 26px; border-radius: 18px; }
a.card.done-tile strong { font-size: 17px; }
a.card.done-tile .field-hint { grid-column: 1; font-size: 14px; }
.done-arrow { grid-column: 2; grid-row: 1 / span 2; font-size: 20px; color: var(--text-muted); transition: transform .3s cubic-bezier(.34, 1.56, .64, 1), color .3s ease; }
a.card.done-tile:hover .done-arrow { transform: translateX(4px); color: var(--accent); }
a.card.done-tile:hover strong { color: var(--accent); }

/* setup Films step: the example films as tiles, then "Or add your own" */
.pick-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.pick-tile { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 18px; border-radius: 14px; cursor: pointer;
  border: 1.5px solid var(--border); background: var(--surface); transition: border-color .3s ease, box-shadow .3s ease, background .3s ease, transform .2s ease; }
.pick-tile input { accent-color: var(--accent); width: 18px; height: 18px; margin: 0; }
.pick-tile-name { font-weight: 600; font-size: 15px; }
.pick-tile:hover { transform: translateY(-1px); background: var(--glow-glass), var(--surface); box-shadow: var(--glow-shadow); }
.pick-tile:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent), 0 8px 22px color-mix(in srgb, var(--accent) 16%, transparent); }
.pick-tile.is-have { cursor: default; opacity: .75; }
.own-block { margin-top: 24px; padding-top: 20px; border-top: 1px dashed var(--border); }
.own-block h3 { font-size: 16px; margin: 0 0 2px; }
.own-block > .field-hint { margin: 0 0 12px; }
.own-rows { display: grid; gap: 8px; }
.own-row { display: flex; align-items: center; gap: 10px; }
.own-row > input[type="text"] { flex: 1; }
.own-add { margin-top: 10px; font-weight: 600; color: var(--accent); }
@media (max-width: 600px) { .pick-tiles { grid-template-columns: 1fr; } }

/* colour sets: glass and an orange glow under the pointer (setup, Delivery Page, brochure) */
.palette-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.palette { padding: 8px; margin: -8px; border-radius: 16px; transition: background .3s ease, box-shadow .3s ease; }
[data-mode] .palette:hover { background: var(--glow-glass); box-shadow: var(--glow-shadow); }
.palette-own { display: flex; align-items: center; gap: 12px; margin-top: 18px; padding: 14px 16px; border: 1.5px dashed var(--border); border-radius: 14px;
  cursor: pointer; font-weight: 600; transition: border-color .3s ease, background .3s ease, box-shadow .3s ease, color .3s ease; }
.palette-own input { position: absolute; opacity: 0; pointer-events: none; }
.palette-own-dots { display: inline-flex; }
.palette-own-dots i { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--surface); margin-left: -6px; }
.palette-own-dots i:first-child { margin-left: 0; background: #e85a4f; } .palette-own-dots i:nth-child(2) { background: #865d36; } .palette-own-dots i:nth-child(3) { background: #2c3a23; }
[data-mode] .palette-own:hover { background: var(--glow-glass); box-shadow: var(--glow-shadow); border-color: transparent; color: var(--accent); }
.palette-own:has(input:checked) { border-style: solid; border-color: var(--accent); color: var(--accent); }
.palette-starters { margin: 4px 0 14px; }
.palette-starter-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 6px 0; }
.palette-starter, .preset-tile { display: flex; flex-direction: column; gap: 6px; padding: 8px; border: 1px solid var(--border); border-radius: 12px;
  background: var(--surface); color: var(--text); font: 600 12px/1.2 inherit; text-align: left; cursor: pointer;
  transition: background .3s ease, box-shadow .3s ease, border-color .3s ease, color .3s ease, transform .2s ease; }
[data-mode] :is(.palette-starter, .preset-tile):is(:hover, :focus-visible) { background: var(--glow-glass); box-shadow: var(--glow-shadow);
  border-color: transparent; color: var(--accent); transform: translateY(-1px); outline: none; }
:is(.palette-starter, .preset-tile).is-on { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 20%, transparent); }
.palette-starter-swatch { position: relative; display: grid; place-items: center; height: 44px; border-radius: 8px; border: 1px solid color-mix(in srgb, var(--text) 10%, transparent); }
.palette-starter-swatch span { padding: 2px 8px; border-radius: 6px; font: 15px/1.3 Georgia, serif; }
.palette-starter-swatch i { position: absolute; right: 6px; bottom: 6px; width: 10px; height: 10px; border-radius: 50%; }
.preset-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; margin-bottom: 6px; }
.preset-strip { display: flex; height: 26px; border-radius: 7px; overflow: hidden; border: 1px solid color-mix(in srgb, var(--text) 10%, transparent); }
.preset-strip i { flex: 1; }
.preset-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 600px) { .palette-grid, .palette-starter-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* setup: the uploaded logo on its own row, twice as big, with Replace / Remove under it */
.setup-q .film-upload .file-info:has(img) { flex-basis: 100%; display: flex; align-items: center; justify-content: center; padding: 20px;
  border-radius: 12px; background: color-mix(in srgb, var(--text) 4%, transparent); }
.setup-q .film-upload .logo-preview { max-height: 96px; max-width: 400px; }
/* Style step: the preview starts level with the title and ends above the bottom of the screen */
.setup-wide .setup-left > h1 { margin-top: 0; }
.setup-wide .setup-split { align-items: start; }
.setup-wide .setup-preview { top: 24px; }
.preset-save { display: flex; gap: 10px; align-items: center; margin: 12px 0 4px; }
.preset-save input { flex: 1; }
.preset-save .btn { margin-top: 0; white-space: nowrap; }
.setup-label-row + .palette-grid { margin-top: 6px; }
/* setup footer: Back and Skip get room around them (and their glass hover) */
.is-flow .setup-footer :is(.setup-back, .setup-q-back, .setup-skip) { padding: 9px 16px; border-radius: var(--radius-pill); }
.is-flow .setup-footer .setup-skip { margin-right: -16px; }  /* keeps the text lined up with the card's edge */
.setup-wrap.setup-wide { padding-left: clamp(16px, 4vw, 64px); padding-right: clamp(16px, 4vw, 64px); }

/* table rows (Home, Leads, Couples…): a soft orange glass under the pointer, the name turns orange */
[data-mode] .data-table tbody tr { transition: background .3s ease, box-shadow .3s ease; }
[data-mode] .data-table tbody tr:hover {
  background: color-mix(in srgb, var(--accent) 8%, transparent);  /* flat: a gradient would start again in every cell */
  box-shadow: inset 3px 0 0 var(--accent), 0 6px 20px color-mix(in srgb, var(--accent) 10%, transparent);
}
[data-mode] .data-table tbody tr .cell-main a { transition: color .3s ease; }
[data-mode] .data-table tbody tr:hover .cell-main, [data-mode] .data-table tbody tr:hover .cell-main a { color: var(--accent); }

/* ---------- setup on a desktop: one screen, the page itself never scrolls ----------
   The wizard fills the window; the question sits in the middle of what's left
   (scrolling inside only if a question is ever taller), and on the Style step
   the preview fills the height next to it. */
@media (min-width: 900px) and (min-height: 600px) {
  .setup-wrap { height: 100vh; min-height: 0; display: flex; flex-direction: column; padding-bottom: 0; overflow: hidden; }
  .setup-wrap > .setup-top, .setup-wrap > .setup-messages { flex: none; }
  .setup-wrap .setup-main.is-flow { flex: 1; min-height: 0; width: 100%; overflow-y: auto; padding: 12px 0 24px; justify-content: safe center; }
  .setup-wrap:not(.setup-wide) .setup-main.is-flow { min-height: 0; padding-bottom: 4vh; }
  .setup-wide .setup-main.is-flow { display: flex; flex-direction: column; justify-content: flex-start; overflow: hidden; padding-top: 2vh; }
  .setup-wide .is-flow .setup-split { flex: 1; min-height: 0; align-items: stretch; grid-template-rows: minmax(0, 1fr); }
  .setup-wide .is-flow .setup-left { min-height: 0; overflow-y: auto; padding: 4px 6px 12px 4px; margin: -4px -6px 0 -4px; }
  .setup-wide .is-flow .setup-preview { position: static; min-height: 0; display: flex; flex-direction: column; }
  .setup-wide .is-flow .pf-frame { flex: 1; min-height: 0; display: flex; flex-direction: column; }
  .setup-wide .is-flow .setup-preview .pf-frame iframe { flex: 1; height: auto; min-height: 0; }
  .setup-done { min-height: 0; height: 100%; }
}
/* the colours question stays compact: own colours in two columns, lower tiles */
@media (min-width: 1600px) {
  .setup-wide .custom-colors { grid-template-columns: 1fr 1fr; column-gap: 24px; }
  .setup-wide .custom-colors > .preset-save, .setup-wide .custom-colors > .field-hint { grid-column: 1 / -1; }
}
.setup-wide .palette-swatch { height: 58px; }
@media (min-width: 900px) and (max-height: 820px) {
  .setup-top { padding-top: 12px; padding-bottom: 4px; }
  .is-flow .setup-q { padding: 24px 28px; }
  .is-flow .setup-q > h2 { font-size: 21px; }
  .is-flow .setup-q > .field-hint:first-of-type { margin-bottom: 12px; }
  .is-flow > .setup-lead, .setup-left > .setup-lead { margin-bottom: 16px; }
  .is-flow .setup-count { margin-bottom: 10px; }
  .is-flow .setup-footer { margin-top: 16px; }
  .pick { min-height: 40px; padding-top: 5px; padding-bottom: 5px; }
}
@media (min-width: 900px) and (min-height: 600px) {
  /* own colours open: the intro above has done its job, the colours get the room */
  .setup-left:has(.palette-own input:checked) > [data-step-intro] { display: none; }
}
@media (min-width: 900px) and (max-height: 900px) {
  .setup-wide .setup-color { padding: 2px 0; }
  .setup-wide .cp-swatch { width: 32px; height: 32px; }
  .setup-wide .palette-own { margin-top: 12px; padding: 10px 14px; }
  .setup-wide .custom-colors { margin-top: 12px; padding-top: 10px; }
  .setup-wide .preset-save { margin-top: 8px; }
}
.gs-list li { position: relative; }
.gs-skip { position: absolute; right: 0; top: 8px; }
.gs-skip .link-btn { font-size: 12px; color: var(--text-muted); font-weight: 500; padding: 4px 10px; }
.gs-list li:has(.gs-skip) a { padding-right: 96px; }
/* setup: "How many packages?" as big number tiles */
.count-picks { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-top: 8px; }
.count-pick { position: relative; cursor: pointer; }
.count-pick input { position: absolute; opacity: 0; pointer-events: none; }
.count-pick span { display: grid; place-items: center; height: 72px; border: 1.5px solid var(--border); border-radius: 14px; background: var(--surface);
  font-size: 26px; font-weight: 700; transition: border-color .3s ease, box-shadow .3s ease, background .3s ease, color .3s ease, transform .2s ease; }
[data-mode] .count-pick:hover span { background: var(--glow-glass), var(--surface); box-shadow: var(--glow-shadow); color: var(--accent); transform: translateY(-1px); }
.count-pick input:checked + span { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent); }
.count-pick input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.pkg-of { color: var(--text-muted); font-weight: 600; }
.gs-locked { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--border); opacity: .5; cursor: default; }
/* "Start from" tiles: the swatch fills the tile (a button doesn't stretch its children everywhere), name centred under it */
.palette-starter { align-items: stretch; text-align: center; }
.palette-starter-swatch { width: 100%; box-sizing: border-box; }

/* Integrations › Notion: one block per database (leads, couples). */
.notion-section { margin-top: 14px; padding: 14px 16px; }
.notion-head { font-size: 15px; margin: 0 0 10px; }
.notion-section .field { margin-bottom: 6px; }
.notion-section .field select { max-width: 420px; }
.notion-values { margin-top: 14px; }

/* Forms › Settings: corners, fields and questions side by side. */
.fb-look { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.fb-look select { width: 100%; }
@media (max-width: 600px) { .fb-look { grid-template-columns: 1fr; } }

/* Settings › Calendar: what goes in the calendar link. */
.cal-feed-kinds { margin: 14px 0 10px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.cal-feed-kinds .tag-picker-list { display: flex; flex-wrap: wrap; gap: 6px 18px; }

/* A green dot right after a card title: set up and working. */
.title-with-dot { display: flex; align-items: center; gap: 10px; }

/* Billing: an extra that goes at the end of the period, with "Keep it" on the same line. */
.addon-removing { margin-top: 8px; }
.addon-removing form { display: inline; }

/* An integration's own page: what it does, what it takes, one button (like Mailchimp's). */
.int-hero { margin-bottom: 16px; display: flex; flex-direction: column; gap: 18px; }
.int-hero-top { display: flex; align-items: center; gap: 16px; }
.int-logo.is-big { width: 56px; height: 56px; border-radius: 14px; font-size: 22px; }
.int-logo.is-big .int-logo-mark { width: 32px; height: 32px; }
.int-hero-text { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.int-hero-text p { margin: 0; font-size: 15px; }
.int-hero-text .int-on { margin-left: 0; }
.int-hero-btn { flex: none; }
.int-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; margin: 0;
  padding: 14px 0 0; border-top: 1px solid var(--border); }
.int-facts dt { font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); }
.int-facts dd { margin: 2px 0 0; font-size: 14px; }
.int-uses-title { font-size: 15px; margin: 4px 0 0; }
.int-uses { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.int-uses li { display: flex; gap: 12px; align-items: flex-start; }
.int-uses p { margin: 4px 0 0; }
.int-use-icon { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px;
  background: var(--accent-soft); color: var(--accent); }
.int-use-icon svg { width: 18px; height: 18px; }
@media (max-width: 700px) {
  .int-hero-top { flex-wrap: wrap; }
  .int-hero-btn { width: 100%; text-align: center; }
}

/* "Connect Zapier to your studio?" and the apps admin. */
.api-allow h1 { font-size: 20px; margin: 0 0 10px; }
.api-allow .api-can { margin: 0 0 10px; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
.api-allow form { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.api-allow-actions { display: flex; gap: 10px; }
.api-urls { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0; font-size: 13.5px; }
.api-urls dd { margin: 0; overflow-wrap: anywhere; }
.api-secret input { font-family: ui-monospace, monospace; }

/* Public pages about each integration (/apps/), for app directories. */
.public-apps { max-width: 980px; }
.public-intro { margin: 8px 0 24px; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.public-intro h1, .public-title { font-size: 28px; margin: 4px 0 16px; }
.public-intro p { margin: 0; color: var(--text-muted); max-width: 620px; }
.public-foot { margin-top: 40px; padding-top: 16px; border-top: 1px solid var(--border); font-size: 13.5px; color: var(--text-muted); }

/* ---------- 23 Studios' own mailing list (apps/mailing) ---------- */
.mail-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.mail-stats .card { padding: 14px 18px; display: flex; flex-direction: column; gap: 2px; }
.mail-stats strong { font-size: 24px; }
.mail-stats span { color: var(--text-muted); font-size: 13px; }
.mail-link { margin: 0 0 16px; overflow-wrap: anywhere; }
.mail-link code, .mail-below code { font-size: 12px; }
.mail-labels { display: flex; gap: 6px; align-items: center; min-width: 200px; }
.mail-labels input { flex: 1 1 auto; min-width: 0; padding: 6px 10px; font-size: 13px; }
.mail-labels .btn { margin-top: 0; }
.mail-table td { vertical-align: middle; }
.mail-table .account-actions { flex-wrap: wrap; justify-content: flex-end; }
.mail-pages { margin-top: 12px; }
.mail-below { margin-top: 20px; }
.mail-add { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
.mail-add input[type="email"], .mail-add input[type="text"] { flex: 1 1 200px; }
.mail-add .btn { margin-top: 0; }
.mail-button-row { display: grid; grid-template-columns: 1fr 2fr; gap: 12px; }
.mail-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; margin-top: 8px; }
.mail-actions .btn { margin-top: 0; }
@media (max-width: 600px) {
  .mail-stats strong { font-size: 20px; }
  .mail-button-row { grid-template-columns: 1fr; }
  .mail-table thead { display: none; }
  .mail-table tr { display: block; padding: 10px 0; }
  .mail-table td { display: block; border: 0; padding: 4px 12px; }
  .mail-table .account-actions { justify-content: flex-start; }
}
.join-form { text-align: left; margin-top: 16px; }
.join-consent { display: flex; gap: 10px; align-items: flex-start; font-weight: 400 !important; font-size: 13.5px; color: var(--text-muted); }
.join-consent input { margin-top: 3px; flex: 0 0 auto; }
.auth-card form p:has(.join-consent) { flex-direction: row; }
.join-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.join-error { color: var(--danger); margin: 0 0 12px !important; }
.join-form .cf-turnstile { margin-bottom: 16px; }
.mail-compose .field, .mail-form .field { margin-bottom: 16px; }
.mail-compose .field-hint, .mail-form .field-hint { margin: 0; }
.mail-head-btn { white-space: nowrap; }
/* lead form editor (23 Studios' own mailing list): its live preview, not clickable */
#lf-frame { display: block; width: 100%; height: calc(100vh - 150px); min-height: 620px; border: 0; pointer-events: none; }
.mail-builder .builder-panel > .card { margin: 0; }
.mail-builder code, .mail-link { overflow-wrap: anywhere; word-break: break-all; }
/* a lead form's text keeps the line breaks typed in its settings */
.join-wrap [data-f="intro"], .join-wrap [data-f="thanks"] { white-space: pre-line; }
/* an integration's own full-colour app icon (Cal.com, Typeform, Jotform, Fillout) instead of a white mark on a colour */
.int-logo.is-icon { background: transparent; overflow: hidden; padding: 0; }
.int-logo.is-icon img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: inherit; }
.int-logo.is-icon { box-shadow: 0 0 0 1px var(--border), 0 1px 3px rgba(0, 0, 0, .06); }
/* Account › You › Notifications on this device */
.push-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.push-row .btn { margin-top: 0; }
#push-card [data-install] { margin-top: 12px; }
.push-note { margin-top: 10px; }
.push-devices-title { margin: 18px 0 4px; font-weight: 600; }

/* 23 Studios › Lead forms: one card per form, like the automations list (switch, edit, delete) */
.lf-list { margin-bottom: 16px; }
.lf-list .lf-card { grid-template-columns: minmax(0, 1fr) auto auto auto; padding: 18px 20px; }
.lf-main { gap: 6px; }
.lf-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.lf-title a { color: inherit; text-decoration: none; }
.lf-title .int-on { margin-left: 0; }
.lf-link { margin: 4px 0 0; max-width: 520px; }
.lf-tips { display: grid; gap: 18px; max-width: none; }
.lf-code { justify-self: start; max-width: 100%; margin: 2px 0; padding: 6px 10px; border-radius: 8px; font-size: 12.5px;
  background: var(--field-bg, var(--bg)); border: 1px solid var(--border); word-break: break-all; }
.lf-tips h2 { margin: 0; }
.lf-tip { display: grid; gap: 4px; }
.lf-tip p { margin: 0; }
.lf-tip .dashboard-link { margin: 6px 0 0; max-width: 520px; }
@media (max-width: 700px) {
  .lf-list .lf-card { grid-template-columns: auto auto minmax(34px, 1fr); }
  .lf-list .lf-card > .inline-form:last-child { justify-self: end; }
}

/* Couples: tick couples, then add or remove a tag on all of them (js/bulk-select.js) */
.data-table .col-pick { width: 36px; padding-right: 0 !important; }
.data-table .col-pick input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); cursor: pointer; vertical-align: middle; }
.data-table tr.is-picked { background: color-mix(in srgb, var(--accent) 7%, transparent); }
.bulk-bar { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 40; display: flex; align-items: center; gap: 10px;
  flex-wrap: wrap; justify-content: center; width: max-content; max-width: calc(100vw - 32px); padding: 10px 14px !important; border-radius: 999px;
  box-shadow: 0 12px 32px rgba(16, 24, 40, .18); }
.bulk-bar[hidden] { display: none; }
.bulk-bar select, .bulk-bar input[type=text] { width: auto; min-width: 150px; margin: 0; }
.bulk-bar .btn-small { margin-top: 0; }
.bulk-count { font-size: 14px; color: var(--text-muted); padding-left: 6px; }
.bulk-count strong { color: var(--text); }
@media (min-width: 801px) { .bulk-bar { left: calc(50% + var(--sidebar-width) / 2); } }  /* centred on the content, not under the sidebar */
@media (max-width: 800px) {
  /* the tick box gets its own narrow column on the left of each couple's card */
  #couples-table tbody tr { grid-template-columns: 26px minmax(0, 1fr) auto; }
  #couples-table td { grid-column: 2; }
  #couples-table td.col-pick { grid-column: 1; grid-row: 1 / span 6; align-self: start; width: auto; padding-top: 3px !important; }
  #couples-table td.col-open { grid-column: 3; }
  .bulk-bar { bottom: calc(84px + env(safe-area-inset-bottom)); border-radius: 22px; }
}

/* Compose › Several couples: a year, then everyone in it ticked (js/compose-many.js) */
.compose-mode { margin: 2px 0 10px; }
.compose-years { margin-bottom: 8px; }
.compose-years .tab { font: inherit; font-size: 13px; cursor: pointer; }
.compose-list { max-height: 320px; overflow-y: auto; border: 1px solid var(--border); border-radius: 12px; padding: 4px 10px; }
.compose-group[hidden] { display: none; }
.compose-group-title { margin: 8px 0 2px !important; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); }
.compose-row { display: flex; align-items: center; gap: 8px; padding: 5px 0; font-size: 14px; }
.compose-row span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.compose-row small { color: var(--text-muted); font-size: 12px; white-space: nowrap; }
.compose-row.is-off { opacity: .55; }
.compose-row.is-sent span::after { content: " ✓"; color: var(--ok, #1fa85a); font-weight: 700; }
.compose-many-note { margin-top: 8px !important; }
[data-mode] .bulk-bar.card { background: var(--page-base); -webkit-backdrop-filter: none; backdrop-filter: none; }  /* solid: it floats over the list */
.compose-mode button.lang-switch-item { border: 0; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.compose-mode button.lang-switch-item:not(.active) { background: transparent; }

/* Delivery Page › After the wedding: show the progress or not */
.builder-switch { margin: 4px 0 14px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; }
.builder-switch .field-hint { margin: 6px 0 0; }

/* Booked income and invoices: per year, quarter, month or week */
.booked-head .booked-kinds .tab, .invoice-filter .tabs .tab { font-size: 13px; }
.year-nav .field-hint { white-space: nowrap; }
.booked-now { font-size: 13px; }

/* Fonts: a font and its size side by side (Delivery Page builder, brochure Look) */
.font-form { display: flex; gap: 8px; flex-wrap: wrap; }
.font-form select[name=font] { flex: 1 1 200px; min-width: 0; }
.font-form select.font-size { flex: 0 0 auto; width: auto; }
.font-sample-text { font-size: 15px !important; line-height: 1.5; }
.br-font-row { display: flex; gap: 8px; }
.br-font-row select:first-child { flex: 1; min-width: 0; }
.br-font-row select:last-child { flex: 0 0 auto; width: auto; }

/* Emails › Drafts, and Compose's Save draft next to Send */
.mb-toolbar-actions { display: inline-flex; gap: 8px; align-items: center; }
.draft-row { gap: 12px; }
.draft-row .draft-open { flex: 1; min-width: 0; color: inherit; text-decoration: none; display: flex; flex-direction: column; }
.draft-row .draft-open:hover strong { text-decoration: underline; }
.draft-row .inline-form { margin: 0; }

/* 23 Studios admin › Testers */
.tester-steps { list-style: none; counter-reset: step; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 0 0 16px; padding: 0; max-width: 960px; }
.tester-steps li { counter-increment: step; display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 14px; font-size: 13px; color: var(--text-muted); line-height: 1.45; }
.tester-steps strong { color: var(--text); font-size: 13.5px; }
.tester-steps strong::before { content: counter(step); display: inline-grid; place-items: center; width: 20px; height: 20px; margin-right: 7px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 11.5px; }
@media (max-width: 800px) { .tester-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .tester-steps { grid-template-columns: 1fr; } }
.tester-sub { margin: 20px 0 4px; font-size: 13px; font-weight: 600; color: var(--text-muted); }
.tester-state { margin-left: 6px; vertical-align: 1px; }
.tester-delete { color: var(--danger); }
.tester-link { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 12px 0 4px; }
.tester-link input { flex: 1 1 260px; min-width: 0; }
.tester-link .btn-small, .tester-link .inline-form { margin: 0; }
.tester-more summary { cursor: pointer; list-style: none; }
.tester-more summary::-webkit-details-marker { display: none; }
.tester-more summary::after { content: " ›"; color: var(--text-muted); }
.tester-more[open] summary::after { content: " ⌄"; }
.tester-more[open] summary { margin-bottom: 8px; }
.tester-notify { margin: 4px 0 18px; }
#delete-tester-dialog input[name="confirm_name"] { width: 100%; margin-bottom: 12px; }
.plan-storage { margin: 4px 0 12px; padding: 8px 10px; border-radius: 10px; background: var(--accent-soft); font-size: 12.5px; line-height: 1.45; color: var(--text); }
