:root {
  --paper: #f3ece3;
  --paper-2: #faf6f1;
  --ink: #1a120e;
  --ink-soft: #5c4d43;
  --line: rgba(26, 18, 14, 0.1);
  --line-strong: rgba(26, 18, 14, 0.18);
  --terracotta: #c45c3e;
  --terracotta-deep: #9e3f26;
  --sage: #3d5348;
  --sage-soft: #d7e0da;
  --gold: #c4a06a;
  --blush: #edd5cb;
  --shadow: 0 24px 60px rgba(26, 18, 14, 0.12);
  --radius: 22px;
  --font-serif: "Fraunces", "Iowan Old Style", Palatino, Georgia, serif;
  --font-sans: "Outfit", "Avenir Next", "Segoe UI", sans-serif;
  --nav: 76px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
html { background: var(--paper); }
body {
  font-family: var(--font-sans);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 80% -10%, #f7d7c8 0%, transparent 55%),
    radial-gradient(900px 500px at -10% 110%, #d7e0da 0%, transparent 50%),
    var(--paper);
  letter-spacing: 0.01em;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; display: block; }
a { color: inherit; }

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 80;
  opacity: 0.045;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

#app { min-height: 100dvh; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- landing ---------- */
.land { overflow: clip; }
.land-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 28px;
  max-width: 1180px;
  margin: 0 auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 22px;
}
.mark {
  width: 28px;
  height: 34px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.mark svg {
  width: 28px;
  height: 34px;
  display: block;
  filter: drop-shadow(0 1px 1px rgba(26, 18, 14, 0.22));
}
.land-nav-links { display: flex; gap: 8px; align-items: center; }
.ghost {
  background: transparent;
  border: 0;
  padding: 10px 14px;
  color: var(--ink-soft);
  text-decoration: none;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  background: var(--ink);
  color: var(--paper-2);
  padding: 12px 18px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 520;
  letter-spacing: 0.02em;
  transition: transform 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-terra { background: var(--terracotta); color: #fff; }
.btn-line {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line-strong);
}
.btn-sage { background: var(--sage); color: #f4f7f5; }
.btn-sm { padding: 8px 12px; font-size: 14px; }
.btn-block { width: 100%; }

.hero {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 28px 80px;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--terracotta-deep);
  font-weight: 520;
  margin-bottom: 18px;
}
.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(42px, 6vw, 76px);
  line-height: 0.95;
  font-weight: 600;
  letter-spacing: -0.03em;
  margin: 0 0 18px;
}
.hero h1 em {
  font-style: italic;
  font-weight: 400;
  color: var(--terracotta-deep);
}
.lede {
  font-size: 19px;
  line-height: 1.45;
  color: var(--ink-soft);
  max-width: 38ch;
  margin: 0 0 28px;
}
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.price-note {
  margin-top: 18px;
  font-size: 14px;
  color: var(--ink-soft);
}
.phone {
  background: var(--ink);
  border-radius: 42px;
  padding: 14px;
  box-shadow: var(--shadow);
  color: var(--paper-2);
  transform: rotate(3deg);
}
.phone-screen {
  background: #efe6db;
  color: var(--ink);
  border-radius: 30px;
  overflow: hidden;
  min-height: 520px;
}
.phone-bar {
  display: flex;
  justify-content: space-between;
  padding: 18px 18px 8px;
  font-size: 13px;
  color: var(--ink-soft);
}
.phone-title {
  font-family: var(--font-serif);
  font-size: 28px;
  padding: 0 18px 12px;
}
.mini-cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; padding: 8px 14px 18px; }
.mini-cal b { font-size: 10px; color: var(--ink-soft); font-weight: 450; text-align: center; }
.mini-day {
  aspect-ratio: 1;
  border-radius: 10px;
  background: rgba(255,255,255,0.45);
  display: grid;
  place-items: end center;
  font-size: 11px;
  padding-bottom: 4px;
  position: relative;
  overflow: hidden;
}
.mini-day.has { background: #fff; }
.mini-day .dot {
  position: absolute;
  inset: 4px 4px 18px;
  border-radius: 7px;
}
.section {
  max-width: 1180px;
  margin: 0 auto;
  padding: 72px 28px;
}
.section h2 {
  font-family: var(--font-serif);
  font-size: clamp(32px, 4.5vw, 52px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0 0 12px;
  max-width: 16ch;
}
.section .sub { color: var(--ink-soft); max-width: 46ch; margin: 0 0 36px; font-size: 17px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}
.card h3 { font-family: var(--font-serif); font-size: 24px; margin: 10px 0 8px; }
.card p { margin: 0; color: var(--ink-soft); line-height: 1.5; }
.num {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--terracotta);
  font-size: 20px;
}
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: center; }
.ba-demo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-radius: 28px;
  overflow: hidden;
  min-height: 340px;
  box-shadow: var(--shadow);
}
.ba-pane { padding: 18px; display: flex; flex-direction: column; justify-content: space-between; }
.ba-pane span { font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid var(--line-strong);
  background: transparent;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 14px;
}
.chip.on { background: var(--ink); color: var(--paper-2); border-color: var(--ink); }
.pricing { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.plan {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.plan.featured { background: var(--ink); color: var(--paper-2); border-color: var(--ink); }
.plan-tag {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 6px;
  color: var(--gold);
}
.plan .amt { font-family: var(--font-serif); font-size: 36px; margin: 8px 0; }
.plan ul { margin: 8px 0 16px; padding-left: 18px; color: inherit; opacity: 0.82; }
.quote {
  font-family: var(--font-serif);
  font-size: clamp(26px, 3.4vw, 40px);
  line-height: 1.2;
  max-width: 22ch;
  margin: 0;
}
.by { margin-top: 16px; color: var(--ink-soft); }
.footer {
  padding: 28px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--ink-soft);
  font-size: 14px;
  max-width: 1180px;
  margin: 0 auto;
}

/* ---------- studio shell ---------- */
.studio {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 240px 1fr;
}
.side {
  padding: 22px 16px 28px;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: sticky;
  top: 0;
  height: 100dvh;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  text-decoration: none;
  color: var(--ink-soft);
  border: 0;
  background: transparent;
  text-align: left;
  width: 100%;
}
.nav-item.on, .nav-item:hover { background: rgba(255,255,255,0.55); color: var(--ink); }
.side .spacer { flex: 1; }
.main { padding: 22px 28px 110px; min-width: 0; }
.top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}
.top h1 {
  font-family: var(--font-serif);
  font-size: 40px;
  margin: 0;
  letter-spacing: -0.03em;
}
.muted { color: var(--ink-soft); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.search {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 14px;
  min-width: 220px;
  outline: none;
}
.search:focus { border-color: var(--ink); }

/* calendar */
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}
.cal-dow {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding: 0 6px 4px;
}
.cal-cell {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 16px;
  min-height: 108px;
  padding: 8px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cal-cell.out { opacity: 0.4; }
.cal-cell.today { border-color: var(--terracotta); box-shadow: inset 0 0 0 1px var(--terracotta); }
.cal-num { font-size: 13px; font-weight: 520; }
.thumbs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.thumb {
  aspect-ratio: 1.1;
  border-radius: 8px;
  overflow: hidden;
  background: var(--blush);
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }

.sheet {
  position: fixed;
  inset: 0;
  background: rgba(26, 18, 14, 0.38);
  z-index: 40;
  display: grid;
  place-items: end center;
}
.sheet-card {
  background: var(--paper-2);
  width: min(720px, 100%);
  max-height: 86dvh;
  overflow: auto;
  border-radius: 28px 28px 0 0;
  padding: 18px 18px 28px;
}
.sheet-handle { width: 42px; height: 4px; background: var(--line-strong); border-radius: 99px; margin: 0 auto 12px; }

/* lists */
.list { display: flex; flex-direction: column; gap: 10px; }
.person, .case-row {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 14px;
  align-items: center;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 12px;
  text-decoration: none;
  text-align: left;
  width: 100%;
}
.avatar {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-family: var(--font-serif);
  font-size: 22px;
  background: var(--blush);
}
.person h3, .case-row h3 { margin: 0 0 4px; font-size: 18px; }
.file-h {
  font-family: var(--font-serif);
  font-size: 22px;
  margin: 28px 0 12px;
  letter-spacing: -0.02em;
}
.file-grid { margin-bottom: 8px; }
.badge {
  font-size: 12px;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--sage-soft);
  color: var(--sage);
  white-space: nowrap;
}

/* case */
.ba {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  min-height: 380px;
  background: #ddd;
  user-select: none;
  touch-action: none;
  cursor: ew-resize;
}
.ba img, .ba .ph { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ba-after {
  position: absolute;
  inset: 0;
  z-index: 1;
  clip-path: inset(0 0 0 50%);
}
.ba-after img, .ba-after .ph {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ba-range {
  position: absolute;
  inset: 0;
  width: 100%;
  opacity: 0;
  cursor: ew-resize;
  z-index: 3;
  pointer-events: none;
}
.ba-bar {
  position: absolute;
  top: 0; bottom: 0;
  left: 50%;
  width: 2px;
  background: #fff;
  z-index: 2;
  pointer-events: none;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.15);
}
.ba-knob {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 36px; height: 36px;
  margin: -18px;
  border-radius: 50%;
  background: #fff;
  z-index: 2;
  pointer-events: none;
  display: grid;
  place-items: center;
  font-size: 12px;
  color: var(--ink);
}
.ba-label {
  position: absolute;
  top: 14px;
  z-index: 2;
  background: rgba(26,18,14,0.62);
  color: #fff;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 6px 10px;
  border-radius: 999px;
}
.ba-label.l { left: 14px; }
.ba-label.r { right: 14px; }

.slots { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.slot-more { grid-column: 1 / -1; }
.slot {
  background: var(--paper-2);
  border: 1px dashed var(--line-strong);
  border-radius: 20px;
  min-height: 180px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.slot h4 { margin: 0; font-size: 14px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); font-weight: 520; }
.slot-hint { margin: 0; font-size: 13px; color: var(--ink-soft); }
.slot-photos { display: flex; gap: 8px; flex-wrap: wrap; }
.slot-photos.is-sorting { touch-action: none; }
.slot-photos img, .add-ph {
  width: 72px; height: 72px; object-fit: cover; border-radius: 12px;
}
.slot-ph {
  position: relative;
  width: 72px;
  height: 72px;
  cursor: grab;
  touch-action: none;
}
.slot-ph.dragging {
  opacity: 0.4;
  pointer-events: none;
  z-index: 3;
}
.slot-ph-edit {
  position: relative;
  padding: 0;
  border: 0;
  background: none;
  width: 72px;
  height: 72px;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
}
.slot-ph-edit img, .slot-ph-edit .add-ph {
  width: 100%;
  height: 100%;
  display: block;
}
.slot-ph-edit::after {
  content: "Edit";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 3px 0 4px;
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(transparent, rgba(26, 18, 14, 0.72));
}
.slot-ph-remove {
  position: absolute;
  top: -7px;
  right: -7px;
  z-index: 2;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}
.add-ph {
  border: 1px dashed var(--line-strong);
  background: transparent;
  display: grid;
  place-items: center;
  font-size: 22px;
  color: var(--ink-soft);
}

.form { display: flex; flex-direction: column; gap: 12px; max-width: 640px; }
label.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--ink-soft); }
.field input, .field select, .field textarea {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  outline: none;
}
.field textarea { min-height: 90px; resize: vertical; }
.procs { display: flex; flex-wrap: wrap; gap: 8px; }
.proc {
  border: 1px solid var(--line-strong);
  background: var(--paper-2);
  border-radius: 999px;
  padding: 8px 12px;
}
.proc.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.library {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}
.lib-card {
  background: var(--paper-2);
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  text-decoration: none;
}
.lib-card img, .lib-card .ph { aspect-ratio: 4/5; width: 100%; object-fit: cover; }
.lib-card figcaption { padding: 10px; font-size: 13px; }

.files { display: flex; flex-direction: column; gap: 8px; }
.file {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  padding: 12px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.file span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file .row { flex-shrink: 0; }

.cloud-banner {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  background: var(--sage-soft);
  border-radius: 18px;
  padding: 14px;
  margin: 14px 0;
}

.public {
  max-width: 880px;
  margin: 0 auto;
  padding: 40px 20px 80px;
}
.public-hero { text-align: center; margin-bottom: 36px; }
.public-hero h1 { font-family: var(--font-serif); font-size: 48px; margin: 8px 0; }
.gallery { display: grid; gap: 28px; }
.case-public {
  background: var(--paper-2);
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.case-public .pair { display: grid; grid-template-columns: 1fr 1fr; }
.case-public img, .case-public .ph { aspect-ratio: 4/5; width: 100%; object-fit: cover; }
.case-public footer { padding: 16px 18px 20px; }
.post-slides {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.post-slides img, .post-slides .ph {
  flex: 0 0 100%;
  scroll-snap-align: start;
  aspect-ratio: 4 / 5;
}
.post-caption {
  margin: 8px 0 0;
  white-space: pre-wrap;
  color: var(--ink-soft);
  line-height: 1.45;
  font-size: 14px;
}

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--paper-2);
  padding: 12px 16px;
  border-radius: 999px;
  z-index: 50;
  font-size: 14px;
}

.ph {
  background:
    linear-gradient(160deg, var(--c1, #edd5cb), var(--c2, #c4a06a));
  display: grid;
  place-items: center;
  color: rgba(26,18,14,0.55);
  font-family: var(--font-serif);
  font-size: 18px;
  text-align: center;
  padding: 10px;
}

.mobile-nav {
  display: none;
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: rgba(250, 246, 241, 0.92);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
  padding: 8px 10px calc(10px + env(safe-area-inset-bottom));
  z-index: 30;
  grid-template-columns: repeat(5, 1fr);
}
.mobile-nav a, .mobile-nav button {
  background: transparent;
  border: 0;
  text-decoration: none;
  font-size: 11px;
  color: var(--ink-soft);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px 0;
}
.mobile-nav .fab {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  display: grid;
  place-items: center;
  font-size: 24px;
  margin-top: -18px;
}
.mobile-nav .on { color: var(--ink); font-weight: 600; }

.modal {
  position: fixed;
  inset: 0;
  background: rgba(26,18,14,0.4);
  z-index: 45;
  display: grid;
  place-items: center;
  padding: 20px;
}
.cloud-card {
  width: min(440px, 100%);
  max-height: min(92dvh, 820px);
  overflow: auto;
  position: relative;
  padding-top: 28px;
}
.cloud-card h3 {
  font-family: var(--font-serif);
  font-size: 28px;
  margin: 4px 0 8px;
}
.cloud-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: var(--paper);
  font-size: 22px;
  line-height: 1;
}
.cloud-user {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  word-break: break-all;
}
.oauth-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 16px 0 4px;
}
.oauth {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  border-radius: 999px;
  padding: 12px 16px;
  font: inherit;
  font-weight: 520;
  cursor: pointer;
  border: 1px solid var(--line-strong);
  background: var(--paper-2);
}
.oauth.google {
  background: #fff;
  color: #1f1f1f;
}
.oauth.apple {
  background: #111;
  color: #fff;
  border-color: #111;
}
.oauth.is-unset { opacity: 0.72; }
.oauth-mark {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
}
.oauth-mark svg { width: 18px; height: 18px; display: block; }
.oauth-or {
  text-align: center;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 11px;
  margin: 14px 0 10px;
  color: var(--ink-soft);
}
.setup-link {
  width: 100%;
  text-align: center;
  font-size: 13px;
  cursor: pointer;
}
.setup-block {
  margin: 0 0 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
}
.setup-block h4 {
  margin: 0 0 6px;
  font-size: 15px;
}
.setup-console {
  display: inline-block;
  margin: 0 0 10px;
  color: var(--sage);
  font-size: 13px;
}
.setup-block textarea {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  resize: none;
}
.account-msg {
  min-height: 1.2em;
  font-size: 13px;
  color: var(--sage);
  margin: 4px 0 8px;
}
.account-msg.is-err { color: var(--terracotta-deep); }
.land-nav-links .ghost {
  cursor: pointer;
  font: inherit;
}
#cloud-login-pane[hidden],
#cloud-setup-pane[hidden] { display: none !important; }

.empty {
  text-align: center;
  padding: 48px 16px;
  color: var(--ink-soft);
}
.empty h3 { font-family: var(--font-serif); color: var(--ink); font-size: 28px; margin: 0 0 8px; }

.switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.share-cta { background: #edd5cb; }

.share-studio {
  position: fixed;
  inset: 0;
  z-index: 55;
  background: var(--paper);
  display: grid;
  grid-template-columns: 1fr min(420px, 46vw);
}
.share-close {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 2;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: rgba(250, 246, 241, 0.9);
  font-size: 24px;
  line-height: 1;
}
.share-stage {
  display: grid;
  place-items: center;
  padding: 28px 20px;
  background: #1a120e;
}
.share-phone {
  width: min(100%, 380px);
  filter: drop-shadow(0 28px 60px rgba(0,0,0,0.45));
}
.share-phone.wide { width: min(100%, 640px); }
.share-phone img {
  width: 100%;
  display: block;
  border-radius: 4px;
  background: #f3ece3;
  cursor: zoom-in;
}
.share-phone-frame { position: relative; }
.share-edit-badge {
  position: absolute;
  right: 10px;
  bottom: 10px;
  border: 0;
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(26, 18, 14, 0.82);
  color: #faf6f1;
  font: inherit;
  font-size: 13px;
  letter-spacing: 0.02em;
}
.share-add-badge {
  right: auto;
  left: 10px;
}
.share-panel {
  padding: 28px 22px 40px;
  overflow: auto;
  background: var(--paper-2);
}
.share-panel h2 {
  font-family: var(--font-serif);
  font-size: 32px;
  margin: 6px 0 8px;
  letter-spacing: -0.03em;
}
.chips[hidden], .muted[hidden] { display: none !important; }
.share-thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.share-thumbs button {
  width: 64px;
  height: 80px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 12px;
  overflow: hidden;
  background: var(--blush);
}
.share-thumbs button.on { border-color: var(--ink); }
.share-carousel-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 12px;
}
.share-carousel-bar > button {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(250, 246, 241, 0.92);
  color: #1a120e;
  font-size: 22px;
  line-height: 1;
}
.share-carousel-bar > button:disabled { opacity: 0.35; }
.share-dots {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}
.share-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(250, 246, 241, 0.35);
}
.share-dot.on { background: #faf6f1; }
.share-panel textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
  resize: vertical;
  background: var(--paper);
  color: var(--ink);
}
.lib-card.on { outline: 2px solid var(--ink); outline-offset: 2px; }
.share-panel .switch {
  margin-top: 8px;
  border-bottom: 0;
}
.share-brand input:disabled { opacity: 0.45; }
.logo-preview {
  width: min(220px, 100%);
  height: 88px;
  object-fit: contain;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 14px;
  display: block;
  margin-top: 10px;
}
.logo-preview.empty {
  display: grid;
  place-items: center;
  color: var(--ink-soft);
  font-size: 13px;
}
.share-bg-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 4px 0 8px;
}
.share-bg-row input[type="color"] {
  width: 44px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
}
.share-swatch {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--line);
  padding: 0;
  cursor: pointer;
}
.share-swatch.on {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}
.share-bg-row input:disabled,
.share-swatch:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.ig-view {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 28px 16px;
  overflow: auto;
  background: rgba(26, 18, 14, 0.92);
}
.ig-view[hidden] { display: none !important; }
.ig-card {
  width: min(420px, 100%);
  background: #faf6f1;
  border-radius: 18px;
  overflow: hidden;
  color: #1a120e;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.45);
}
.ig-card.wide { width: min(640px, 100%); }
.ig-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
}
.ig-head strong { display: block; font-size: 14px; }
.ig-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #1a120e;
  color: #faf6f1;
  display: grid;
  place-items: center;
  font-weight: 600;
  font-size: 14px;
  flex-shrink: 0;
}
.ig-media img {
  width: 100%;
  display: block;
  background: #f3ece3;
}
.ig-bar { padding: 0 10px; margin: 8px 0 0; }
.ig-bar > button { background: #edd5cb; }
.ig-bar .share-dot { background: rgba(26, 18, 14, 0.22); }
.ig-bar .share-dot.on { background: #1a120e; }
.ig-caption {
  margin: 0;
  padding: 12px 14px 4px;
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
}
.ig-actions { padding: 12px 14px 16px; }

@media (max-width: 900px) {
  .hero, .split, .steps, .pricing { grid-template-columns: 1fr; }
  .hero { padding-top: 8px; }
  .phone { transform: none; max-width: 380px; margin: 0 auto; }
  .studio { grid-template-columns: 1fr; }
  .side { display: none; }
  .main { padding: 16px 16px 120px; }
  .top h1 { font-size: 32px; }
  .cal-cell { min-height: 72px; padding: 5px; }
  .thumbs { grid-template-columns: 1fr; }
  .mobile-nav { display: grid; }
  .slots, .case-public .pair { grid-template-columns: 1fr; }
  .person { grid-template-columns: 48px 1fr; }
  .person .badge { display: none; }
  .share-studio { grid-template-columns: 1fr; grid-template-rows: 1fr auto; }
  .share-stage { min-height: 42dvh; padding: 56px 16px 16px; }
  .share-phone { width: min(100%, 240px); }
  .share-phone.wide { width: min(100%, 92%); }
  .share-panel { max-height: 52dvh; }
}

.edit-root {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  flex-direction: column;
  background: #1a120e;
  color: #f3ece3;
  font-family: var(--font-sans);
  touch-action: none;
}
.edit-top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  padding-top: max(10px, env(safe-area-inset-top));
}
.edit-title {
  font-family: var(--font-serif);
  font-size: 16px;
  letter-spacing: -0.02em;
}
.edit-text {
  border: 0;
  background: none;
  color: #edd5cb;
  font: inherit;
  font-size: 15px;
  padding: 8px 4px;
  text-align: left;
}
.edit-text.on:disabled { opacity: 0.4; }
.edit-actions {
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  padding: 10px 16px calc(14px + env(safe-area-inset-bottom));
  background: #241912;
  border-top: 1px solid rgba(243, 236, 227, 0.1);
}
.edit-actions .btn {
  width: auto;
  padding: 8px 16px;
}
.edit-actions .btn:disabled {
  opacity: 0.45;
  transform: none;
}
.edit-stage {
  flex: 1;
  min-height: 0;
  display: flex;
  padding: 8px 16px 4px;
  touch-action: none;
  user-select: none;
}
.edit-board {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  height: 100%;
  min-height: 0;
  max-width: 100%;
}
.edit-view {
  position: relative;
  flex: 1;
  min-height: 0;
  width: 100%;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 32px 16px 16px;
  box-sizing: border-box;
}
.edit-deg {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  pointer-events: none;
  min-width: 52px;
  text-align: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(26, 18, 14, 0.72);
  color: #fff;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.edit-frame {
  position: relative;
  z-index: 1;
  overflow: visible;
  background: transparent;
  border: 2px solid #f3ece3;
  border-radius: 2px;
  box-shadow:
    0 0 0 8px rgba(243, 236, 227, 0.08),
    0 0 0 9999px rgba(13, 9, 7, 0.62);
  pointer-events: none;
}
.edit-ratio {
  position: absolute;
  top: -28px;
  left: 50%;
  transform: translateX(-50%);
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(26, 18, 14, 0.82);
  color: #f3ece3;
  font-size: 11px;
  letter-spacing: 0.08em;
  white-space: nowrap;
}
.edit-corner {
  position: absolute;
  width: 16px;
  height: 16px;
  pointer-events: none;
}
.edit-corner.tl { top: -2px; left: -2px; border-top: 3px solid #f3ece3; border-left: 3px solid #f3ece3; }
.edit-corner.tr { top: -2px; right: -2px; border-top: 3px solid #f3ece3; border-right: 3px solid #f3ece3; }
.edit-corner.bl { bottom: -2px; left: -2px; border-bottom: 3px solid #f3ece3; border-left: 3px solid #f3ece3; }
.edit-corner.br { bottom: -2px; right: -2px; border-bottom: 3px solid #f3ece3; border-right: 3px solid #f3ece3; }
.edit-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}
.edit-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(to right, transparent calc(33.33% - 0.5px), rgba(255,255,255,0.5) calc(33.33% - 0.5px), rgba(255,255,255,0.5) calc(33.33% + 0.5px), transparent calc(33.33% + 0.5px)),
    linear-gradient(to right, transparent calc(66.66% - 0.5px), rgba(255,255,255,0.5) calc(66.66% - 0.5px), rgba(255,255,255,0.5) calc(66.66% + 0.5px), transparent calc(66.66% + 0.5px)),
    linear-gradient(to bottom, transparent calc(33.33% - 0.5px), rgba(255,255,255,0.5) calc(33.33% - 0.5px), rgba(255,255,255,0.5) calc(33.33% + 0.5px), transparent calc(33.33% + 0.5px)),
    linear-gradient(to bottom, transparent calc(66.66% - 0.5px), rgba(255,255,255,0.5) calc(66.66% - 0.5px), rgba(255,255,255,0.5) calc(66.66% + 0.5px), transparent calc(66.66% + 0.5px));
}
.edit-dock {
  padding: 8px 16px 10px;
  background: #241912;
  border-top: 1px solid rgba(243, 236, 227, 0.1);
  max-height: 40dvh;
  overflow: auto;
  overscroll-behavior: contain;
}
.edit-hint {
  margin: 0 0 8px;
  text-align: center;
  font-size: 12px;
  color: #c4b3a6;
}
.edit-tabs {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 10px;
}
.edit-tab {
  border: 0;
  background: transparent;
  color: #c4b3a6;
  font: inherit;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 999px;
}
.edit-tab.on {
  background: var(--terracotta);
  color: #fff;
}
.edit-row, .edit-aspects {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 10px;
}
.edit-chip {
  border: 1px solid rgba(243, 236, 227, 0.18);
  background: #2c2119;
  color: #f3ece3;
  font: inherit;
  font-size: 13px;
  min-width: 40px;
  height: 36px;
  padding: 0 12px;
  border-radius: 999px;
}
.edit-chip.on {
  background: var(--blush);
  color: var(--ink);
  border-color: transparent;
}
.edit-chip.hold {
  touch-action: none;
  user-select: none;
  cursor: ns-resize;
}
.edit-chip.hold[data-act="hold-rot"] { cursor: grab; }
.edit-chip.hold.on { cursor: grabbing; }
.edit-slider {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 10px;
  align-items: center;
  font-size: 13px;
  color: #c4b3a6;
  margin: 8px 0;
}
.edit-slider input {
  width: 100%;
  accent-color: var(--terracotta);
}
.edit-ai-status {
  margin: 4px 0 0;
  text-align: center;
  font-size: 12px;
  color: #c4b3a6;
  min-height: 1.2em;
}
.edit-view.busy::after {
  content: "Remaking…";
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  background: rgba(13, 9, 7, 0.55);
  color: #f3ece3;
  font-size: 14px;
  letter-spacing: 0.06em;
}

.collage-root {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  flex-direction: column;
  background: #1a120e;
  color: #f3ece3;
  font-family: var(--font-sans);
  touch-action: none;
}
.collage-stage {
  flex: 1;
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 8px 16px;
}
.collage-canvas {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  background: #f3ece3;
  touch-action: none;
  cursor: grab;
  filter: drop-shadow(0 18px 40px rgba(0,0,0,0.45));
}
.collage-canvas:active { cursor: grabbing; }
.collage-dock {
  padding: 8px 16px calc(16px + env(safe-area-inset-bottom));
  background: #241912;
  border-top: 1px solid rgba(243, 236, 227, 0.1);
  max-height: 42dvh;
  overflow: auto;
}
.collage-tray {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0 10px;
}
.collage-thumb {
  flex: 0 0 auto;
  width: 56px;
  height: 72px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 10px;
  overflow: hidden;
  background: #3a2c24;
}
.collage-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.collage-thumb.on { border-color: #faf6f1; }
.collage-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}
.collage-dock .chips { margin: 0; }
.collage-dock .chip {
  background: #2c2119;
  color: #f3ece3;
  border-color: rgba(243, 236, 227, 0.18);
}
.collage-dock .chip.on {
  background: var(--blush);
  color: var(--ink);
}
.collage-dock .edit-slider {
  grid-template-columns: 88px 1fr;
}
.collage-dock .edit-slider input[type="text"] {
  border: 1px solid rgba(243, 236, 227, 0.2);
  background: #2c2119;
  color: #faf6f1;
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
}
.collage-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #c4b3a6;
  margin: 6px 0 4px;
}
.collage-dock .share-swatch.on {
  outline-color: #faf6f1;
}
.collage-dock .share-bg-row input[type="color"] {
  border-color: #3d2f26;
}
