/* Signet — editor UI. Warm paper surfaces, ink text, sealing-wax accent. */
:root,
[data-theme='light'] {
  --bg: #f3f1ec;
  --surface: #ffffff;
  --surface-2: #f8f6f2;
  --surface-3: #ecE9e2;
  --text: #17150f;
  --text-2: #4d4840;
  --muted: #7d766b;
  --border: #e2ddd3;
  --border-strong: #cfc8bb;
  --accent: #b8402a;
  --accent-hover: #9c3421;
  --accent-soft: #f7e6e1;
  --ok: #2f7a4f;
  --ok-soft: #e4f2ea;
  --warn: #a86a12;
  --warn-soft: #f9eedb;
  --err: #b42323;
  --err-soft: #f9e2e2;
  --shadow: 0 1px 2px rgba(23, 21, 15, 0.05), 0 8px 24px -12px rgba(23, 21, 15, 0.18);
  --mail-bg: #ffffff;
  --mail-text: #202124;
  color-scheme: light;
}
[data-theme='dark'] {
  --bg: #141311;
  --surface: #1d1b18;
  --surface-2: #23211d;
  --surface-3: #2c2925;
  --text: #ede9e2;
  --text-2: #c8c2b7;
  --muted: #958d80;
  --border: #2e2b26;
  --border-strong: #423d36;
  --accent: #e0664c;
  --accent-hover: #ea7d66;
  --accent-soft: #3a231e;
  --ok: #6fc490;
  --ok-soft: #1d3327;
  --warn: #e0a447;
  --warn-soft: #3a2d15;
  --err: #ef7070;
  --err-soft: #3d1c1c;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px -12px rgba(0, 0, 0, 0.6);
  color-scheme: dark;
}

:root {
  --font-ui: 'Satoshi', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.8125rem);
  --text-sm: clamp(0.8125rem, 0.78rem + 0.2vw, 0.9rem);
  --text-base: clamp(0.9375rem, 0.9rem + 0.2vw, 1rem);
  --text-lg: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
  --text-xl: clamp(1.375rem, 1.2rem + 0.8vw, 1.75rem);
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --radius: 8px;
  --radius-lg: 12px;
  --topbar-h: 56px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font-ui);
  font-size: var(--text-base);
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); }
kbd { font-family: var(--font-mono); font-size: 0.85em; background: var(--surface-3); border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 4px; padding: 0 5px; }
code { font-family: var(--font-mono); font-size: 0.9em; background: var(--surface-3); padding: 1px 5px; border-radius: 4px; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- top bar ---------- */
.app { min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  height: var(--topbar-h);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--space-4);
  padding: 0 var(--space-5);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
}
.brand { display: inline-flex; align-items: center; gap: var(--space-2); color: var(--text); text-decoration: none; }
.brand-mark { width: 26px; height: 26px; }
.brand-name { font-weight: 700; letter-spacing: -0.01em; font-size: var(--text-lg); }
.brand-tag { color: var(--muted); font-size: var(--text-sm); margin-left: var(--space-1); padding-left: var(--space-3); border-left: 1px solid var(--border); }
.topbar-center { display: flex; align-items: center; gap: var(--space-2); justify-content: center; }
.sig-name {
  border: 1px solid transparent; background: transparent; border-radius: var(--radius);
  padding: 6px 10px; text-align: center; font-weight: 500; width: clamp(220px, 26vw, 380px); color: var(--text);
}
.sig-name:hover { border-color: var(--border); }
.sig-name:focus { outline: none; border-color: var(--accent); background: var(--surface-2); }
.topbar-actions { display: flex; justify-content: flex-end; align-items: center; gap: var(--space-2); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  border-radius: var(--radius); border: 1px solid transparent;
  padding: 8px 14px; font-size: var(--text-sm); font-weight: 500; line-height: 1.2;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.05s;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { background: var(--surface); border-color: var(--border-strong); color: var(--text); }
.btn-secondary:hover { background: var(--surface-2); border-color: var(--muted); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-3); color: var(--text); }
.btn-danger { background: transparent; color: var(--err); border-color: var(--border); }
.btn-danger:hover { background: var(--err-soft); }
.btn-sm { padding: 5px 10px; font-size: var(--text-xs); }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.icon-btn {
  width: 36px; height: 36px; display: inline-grid; place-items: center; border-radius: var(--radius);
  border: 1px solid transparent; background: transparent; color: var(--text-2);
}
.icon-btn:hover { background: var(--surface-3); color: var(--text); }
.icon-btn svg { width: 18px; height: 18px; }
[data-theme='light'] .i-moon { display: none; }
[data-theme='dark'] .i-sun { display: none; }

/* ---------- studio layout ---------- */
.studio {
  flex: 1;
  display: grid;
  grid-template-columns: 200px minmax(340px, 420px) 1fr;
  min-height: calc(100vh - var(--topbar-h));
}
.rail {
  border-right: 1px solid var(--border);
  background: var(--surface);
  padding: var(--space-4) var(--space-3);
  display: flex; flex-direction: column; gap: 2px;
  position: sticky; top: var(--topbar-h); height: calc(100vh - var(--topbar-h)); overflow: auto;
}
.rail-btn {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 10px; border-radius: var(--radius); border: 0; background: transparent;
  color: var(--text-2); font-size: var(--text-sm); font-weight: 500; text-align: left;
}
.rail-btn svg { width: 18px; height: 18px; flex: none; opacity: 0.8; }
.rail-btn:hover { background: var(--surface-3); color: var(--text); }
.rail-btn.active { background: var(--accent-soft); color: var(--accent); }
.rail-btn .lock { margin-left: auto; width: 12px; height: 12px; opacity: 0.7; }
.rail-footer { margin-top: auto; padding: var(--space-3) var(--space-2) 0; color: var(--muted); font-size: var(--text-xs); line-height: 1.4; }
.rail-footer a { color: var(--muted); }

.panel {
  border-right: 1px solid var(--border);
  background: var(--surface);
  padding: var(--space-6) var(--space-6) var(--space-10);
  overflow: auto;
  position: sticky; top: var(--topbar-h); height: calc(100vh - var(--topbar-h));
}
.panel h2 { margin: 0 0 var(--space-1); font-size: var(--text-lg); font-weight: 700; letter-spacing: -0.01em; }
.panel .lede { margin: 0 0 var(--space-6); color: var(--muted); font-size: var(--text-sm); }
.panel-lock svg { width: 12px; height: 12px; flex: none; }
.panel-lock { display: inline-flex; align-items: center; gap: 6px; background: var(--warn-soft); color: var(--warn); font-size: var(--text-xs); font-weight: 500; padding: 4px 10px; border-radius: 999px; margin-bottom: var(--space-4); }
fieldset { border: 0; padding: 0; margin: 0 0 var(--space-6); min-width: 0; }
fieldset[disabled] { opacity: 0.6; }
legend { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 700; margin-bottom: var(--space-3); padding: 0; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: var(--space-4); min-width: 0; }
.field label, .field .label { font-size: var(--text-sm); font-weight: 500; color: var(--text-2); display: flex; justify-content: space-between; gap: 8px; }
.field .label-val { color: var(--muted); font-weight: 400; font-variant-numeric: tabular-nums; }
.field input[type='text'], .field input[type='url'], .field input[type='email'], .field input[type='tel'], .field input[type='number'], .field input[type='password'], .field select, .field textarea {
  width: 100%; border: 1px solid var(--border-strong); background: var(--surface); border-radius: var(--radius);
  padding: 9px 11px; font-size: var(--text-sm); color: var(--text); min-width: 0;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field textarea { resize: vertical; min-height: 84px; line-height: 1.45; }
.field .help { font-size: var(--text-xs); color: var(--muted); }
.field input[type='range'] { width: 100%; accent-color: var(--accent); }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
.row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: var(--space-3); }
.color-field { display: grid; grid-template-columns: 38px 1fr; gap: 8px; }
.color-field input[type='color'] { width: 38px; height: 38px; padding: 2px; border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--surface); }
.color-field input[type='text'] { font-family: var(--font-mono); text-transform: lowercase; }
.check, .field .check { display: flex; justify-content: flex-start; align-items: center; gap: 10px; font-size: var(--text-sm); color: var(--text-2); margin-bottom: var(--space-3); cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--accent); }
.seg { display: inline-flex; background: var(--surface-3); border-radius: var(--radius); padding: 3px; gap: 2px; }
.seg-btn { border: 0; background: transparent; padding: 5px 11px; border-radius: 6px; font-size: var(--text-xs); font-weight: 500; color: var(--text-2); }
.seg-btn.active { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,0.08); }
.seg-block { display: flex; flex-wrap: wrap; gap: 4px; padding: 3px; width: 100%; }
.seg-block .seg-btn { flex: 1; text-align: center; }

/* template cards */
.tpl-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); }
.tpl-grid > * { min-width: 0; }
.tpl-card {
  border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); padding: var(--space-3);
  text-align: left; display: flex; flex-direction: column; gap: 8px; transition: border-color 0.15s, box-shadow 0.15s; min-width: 0; overflow: hidden;
}
.tpl-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow); }
.tpl-card.active { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.tpl-thumb { height: 64px; width: 100%; min-width: 0; background: var(--surface-2); border-radius: 6px; padding: 10px; display: flex; gap: 8px; align-items: flex-start; overflow: hidden; }
.tpl-thumb > * { min-width: 0; }
.tpl-thumb .ph { background: var(--border-strong); border-radius: 4px; flex: none; }
.tpl-thumb .ph.round { border-radius: 50%; }
.tpl-thumb .ln { height: 4px; background: var(--border-strong); border-radius: 2px; }
.tpl-thumb .ln.strong { background: var(--text-2); height: 5px; }
.tpl-thumb .ln.accent { background: var(--accent); }
.tpl-thumb .col { display: flex; flex-direction: column; gap: 5px; flex: 1; min-width: 0; }
.tpl-thumb .ph.full { width: 100%; }
.tpl-thumb .dots { display: flex; gap: 3px; }
.tpl-thumb .dots span { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); display: block; }
.tpl-name { font-weight: 700; font-size: var(--text-sm); }
.tpl-desc { font-size: var(--text-xs); color: var(--muted); line-height: 1.4; }

/* list items (social) */
.list-item { border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-3); margin-bottom: var(--space-3); background: var(--surface-2); }
.list-item-head { display: flex; align-items: center; gap: 8px; margin-bottom: var(--space-2); }
.list-item-head select { flex: 1; }
.list-item-head .icon-btn { width: 30px; height: 30px; }
.list-item-head .icon-btn svg { width: 15px; height: 15px; }
.list-item .field { margin-bottom: var(--space-2); }
.platform-icon { width: 22px; height: 22px; flex: none; border-radius: 4px; }
.add-btn { width: 100%; justify-content: center; border-style: dashed; }

/* image source */
.img-source { display: grid; grid-template-columns: 96px 1fr; gap: var(--space-3); align-items: start; margin-bottom: var(--space-3); }
.img-thumb { width: 96px; height: 96px; border-radius: var(--radius); border: 1px dashed var(--border-strong); background: var(--surface-2); display: grid; place-items: center; overflow: hidden; color: var(--muted); font-size: var(--text-xs); text-align: center; padding: 6px; }
.img-thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }
.dropzone { display: block; border: 1px dashed var(--border-strong); border-radius: var(--radius); padding: var(--space-3); text-align: center; font-size: var(--text-xs); color: var(--muted); background: var(--surface-2); cursor: pointer; }
.dropzone.drag { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.dropzone strong { color: var(--text-2); }
.dropzone input { display: none; }

/* icon picker */
.icon-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; }
.icon-grid button { aspect-ratio: 1; border-radius: 6px; border: 1px solid var(--border); background: var(--surface); display: grid; place-items: center; padding: 0; }
.icon-grid button.active { border-color: var(--accent); background: var(--accent-soft); }
.icon-grid img { width: 18px; height: 18px; }

/* ---------- preview ---------- */
.preview { display: flex; flex-direction: column; min-width: 0; background: var(--bg); }
.preview-toolbar { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-4) var(--space-6); border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.preview-hint { margin-left: auto; color: var(--muted); font-size: var(--text-xs); }
.preview-stage { flex: 1; padding: var(--space-8) var(--space-6); display: flex; justify-content: center; align-items: flex-start; overflow: auto; }
.mail-frame {
  width: 100%; max-width: 760px; background: var(--mail-bg); color: var(--mail-text);
  border-radius: var(--radius-lg); box-shadow: var(--shadow); border: 1px solid var(--border); overflow: hidden;
  transition: max-width 0.25s ease;
}
.mail-frame.mobile { max-width: 390px; }
.mail-frame.dark { --mail-bg: #1f1f1f; --mail-text: #e3e3e3; --mail-border: #333; }
.mail-head { padding: 14px 20px 10px; border-bottom: 1px solid var(--mail-border, #eee); font-family: Roboto, Arial, sans-serif; font-size: 13px; }
.mail-row { display: flex; align-items: center; gap: 12px; padding: 4px 0; }
.mail-label { color: #80868b; width: 56px; flex: none; }
.mail-chip { background: rgba(128,128,128,0.15); border-radius: 999px; padding: 2px 10px; font-size: 12px; }
.mail-subject { font-weight: 500; }
.mail-body { padding: 18px 20px 26px; font-family: Arial, Helvetica, sans-serif; font-size: 13.5px; line-height: 1.5; }
.mail-text { margin: 0 0 12px; color: inherit; }
.preview-frame { display: block; width: 100%; border: 0; min-height: 80px; background: transparent; margin-top: 18px; }

.export-bar { display: flex; gap: var(--space-2); flex-wrap: wrap; padding: var(--space-4) var(--space-6); border-top: 1px solid var(--border); background: var(--surface); }
.health { padding: var(--space-3) var(--space-6) var(--space-6); background: var(--surface); display: flex; flex-direction: column; gap: 6px; }
.health-item { display: grid; grid-template-columns: 18px 1fr; gap: 10px; padding: 8px 12px; border-radius: var(--radius); font-size: var(--text-sm); align-items: start; }
.health-item .dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 7px; margin-left: 4px; }
.health-item.ok { background: var(--ok-soft); color: var(--ok); }
.health-item.ok .dot { background: var(--ok); }
.health-item.warn { background: var(--warn-soft); color: var(--warn); }
.health-item.warn .dot { background: var(--warn); }
.health-item.error { background: var(--err-soft); color: var(--err); }
.health-item.error .dot { background: var(--err); }
.health-item strong { font-weight: 700; }
.health-item .detail { display: block; color: var(--text-2); font-size: var(--text-xs); margin-top: 2px; }
.health-title { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 700; margin: 0 0 var(--space-2); display: flex; justify-content: space-between; }

/* ---------- modals ---------- */
.modal-root:empty { display: none; }
.modal-backdrop { position: fixed; inset: 0; background: rgba(16, 14, 10, 0.5); display: grid; place-items: center; padding: var(--space-4); z-index: 50; animation: fade 0.15s ease; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal { background: var(--surface); border-radius: var(--radius-lg); width: 100%; max-width: 720px; max-height: calc(100vh - 48px); display: flex; flex-direction: column; box-shadow: var(--shadow); border: 1px solid var(--border); animation: rise 0.18s ease; }
.modal.wide { max-width: 960px; }
@keyframes rise { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-head { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-4) var(--space-5); border-bottom: 1px solid var(--border); }
.modal-head h3 { margin: 0; font-size: var(--text-lg); font-weight: 700; flex: 1; }
.modal-body { padding: var(--space-5); overflow: auto; }
.modal-foot { display: flex; gap: var(--space-2); justify-content: flex-end; padding: var(--space-4) var(--space-5); border-top: 1px solid var(--border); }
.tabs { display: flex; gap: 2px; flex-wrap: wrap; border-bottom: 1px solid var(--border); margin-bottom: var(--space-4); }
.tab { border: 0; background: transparent; padding: 8px 12px; font-size: var(--text-sm); color: var(--text-2); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab.active { color: var(--accent); border-color: var(--accent); font-weight: 500; }
.steps { padding-left: 1.4em; margin: 0 0 var(--space-4); }
.steps li { margin-bottom: 8px; }
.notes { background: var(--surface-2); border-radius: var(--radius); padding: var(--space-3) var(--space-4); font-size: var(--text-sm); color: var(--text-2); }
.notes ul { margin: 6px 0 0; padding-left: 1.2em; }
.notes li { margin-bottom: 4px; }
.sources { font-size: var(--text-xs); color: var(--muted); margin-top: var(--space-3); }
.sources a { color: var(--muted); }
pre.code { font-family: var(--font-mono); font-size: 12px; line-height: 1.5; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--space-3); overflow: auto; max-height: 360px; white-space: pre-wrap; word-break: break-all; margin: 0; }
.table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
.table th, .table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table th { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: var(--text-xs); font-weight: 500; padding: 2px 8px; border-radius: 999px; background: var(--surface-3); color: var(--text-2); }
.badge-brand { background: var(--accent-soft); color: var(--accent); }
.lock-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px var(--space-4); }
.empty { text-align: center; color: var(--muted); padding: var(--space-8) var(--space-4); font-size: var(--text-sm); }
.share-url { display: flex; gap: 8px; }
.share-url input { flex: 1; font-family: var(--font-mono); font-size: 12px; }
.callout { border-left: 3px solid var(--accent); background: var(--accent-soft); color: var(--text-2); padding: var(--space-3) var(--space-4); border-radius: 0 var(--radius) var(--radius) 0; font-size: var(--text-sm); margin-bottom: var(--space-4); }

/* toasts */
.toast-root { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 60; pointer-events: none; }
.toast { background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 999px; font-size: var(--text-sm); font-weight: 500; box-shadow: var(--shadow); animation: rise 0.2s ease; }
.toast.error { background: var(--err); color: #fff; }

/* skeleton */
.skeleton { background: linear-gradient(90deg, var(--surface-3) 25%, var(--surface-2) 50%, var(--surface-3) 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: 6px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .studio { grid-template-columns: 170px minmax(320px, 380px) 1fr; }
  .brand-tag { display: none; }
}
@media (max-width: 960px) {
  .topbar { grid-template-columns: auto 1fr auto; padding: 0 var(--space-3); }
  .topbar-center { justify-content: flex-start; }
  .sig-name { min-width: 0; width: 100%; text-align: left; }
  .topbar-actions .btn-ghost { display: none; }
  .studio { grid-template-columns: 1fr; }
  .rail { position: sticky; top: var(--topbar-h); height: auto; flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--border); padding: var(--space-2) var(--space-3); z-index: 10; }
  .rail-btn { width: auto; white-space: nowrap; }
  .rail-btn .lock { display: none; }
  .rail-footer { display: none; }
  .panel { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--border); }
  .preview-stage { padding: var(--space-5) var(--space-3); }
  .preview-hint { display: none; }
  .export-bar, .health { padding-left: var(--space-3); padding-right: var(--space-3); }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ---------- client hand-off page ---------- */
.handoff-body { display: block; }
.handoff { max-width: 820px; margin: 0 auto; padding: var(--space-6) var(--space-5) var(--space-10); }
.handoff-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--space-8); }
.handoff-intro h1 { font-size: var(--text-xl); font-weight: 700; letter-spacing: -0.02em; margin: 0 0 var(--space-2); }
.handoff-intro .lede { margin: 0; color: var(--text-2); font-size: var(--text-base); }
.handoff-note { margin: 0; color: var(--text-2); font-size: var(--text-base); white-space: pre-line; border-left: 3px solid var(--accent); padding: var(--space-2) var(--space-4); background: var(--surface); border-radius: 0 var(--radius) var(--radius) 0; }
.handoff-meta { margin: var(--space-2) 0 0; color: var(--muted); font-size: var(--text-xs); }
.handoff-card { margin-top: var(--space-6); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); }
.handoff-toolbar { border-bottom: 1px solid var(--border); padding: var(--space-3) var(--space-4); }
.handoff-frame { max-width: none; border: 0; border-radius: 0; box-shadow: none; }
.handoff-frame .mail-body { padding: var(--space-6) var(--space-6) var(--space-8); }
.handoff-actions { border-top: 1px solid var(--border); padding: var(--space-4); }
.handoff-guide { margin-top: var(--space-10); }
.handoff-guide h2 { font-size: var(--text-lg); font-weight: 700; margin: 0 0 var(--space-1); }
.handoff-guide .lede { margin: 0 0 var(--space-4); color: var(--muted); font-size: var(--text-sm); }
.handoff-foot { margin-top: var(--space-10); padding-top: var(--space-5); border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); color: var(--text-2); font-size: var(--text-sm); }
.handoff-foot .btn { text-decoration: none; }
.handoff-credit { margin-left: auto; color: var(--muted); font-size: var(--text-xs); }
.handoff-credit a { color: var(--muted); }
@media (max-width: 640px) {
  .handoff { padding: var(--space-4) var(--space-3) var(--space-8); }
  .handoff-frame .mail-body { padding: var(--space-4); }
  .handoff-credit { margin-left: 0; width: 100%; }
}

/* file drop overlay + share modal extras */
.drop-overlay { position: fixed; inset: 0; background: rgba(184, 64, 42, 0.12); border: 3px dashed var(--accent); z-index: 70; display: grid; place-items: center; font-weight: 700; color: var(--accent); font-size: var(--text-lg); pointer-events: none; }
.link-card { border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-4); margin-bottom: var(--space-3); background: var(--surface-2); }
.link-card h4 { margin: 0 0 4px; font-size: var(--text-sm); font-weight: 700; display: flex; align-items: center; gap: 8px; }
.link-card p { margin: 0 0 var(--space-3); font-size: var(--text-xs); color: var(--muted); }
.link-card .share-url { margin-top: 6px; }
.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
.choice { border: 1px solid var(--border-strong); background: var(--surface); border-radius: var(--radius-lg); padding: var(--space-4); text-align: left; display: flex; flex-direction: column; gap: 6px; }
.choice:hover { border-color: var(--accent); background: var(--accent-soft); }
.choice strong { font-size: var(--text-sm); }
.choice span { font-size: var(--text-xs); color: var(--muted); line-height: 1.4; }
@media (max-width: 640px) { .choice-grid { grid-template-columns: 1fr; } }
