:root {
  --paper: #FBFAF4;
  --ink: #20296B;
  --muted: #70749B;
  --line: #D9D8C9;
  --coral: #DE3B20;
  --coral-dark: #B32C14;
  --gold: #E8B04B;
  --teal: #1E7A4F;
  --blue: #2742D8;
  --card: #FFFFFF;
  --shadow: 0 10px 30px rgba(32,41,107,.10);
  --radius: 2px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Archivo', system-ui, sans-serif;
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--blue); color: #fff; }
h1, h2, h3 { font-family: 'Courier Prime', monospace; font-weight: 700; letter-spacing: -.01em; }
button { font-family: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

/* airmail edge stripe */
.airmail {
  height: 8px;
  background: repeating-linear-gradient(-45deg,
    var(--coral) 0 11px, var(--paper) 11px 22px, var(--blue) 22px 33px, var(--paper) 33px 44px);
}

/* ---------- top bar ---------- */
.topbar {
  display: flex; align-items: center; gap: 24px;
  padding: 14px 28px; background: var(--card);
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20;
}
.brand { display: flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.brand:hover { opacity: .85; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 4px;
  object-fit: cover; display: block;
  box-shadow: 0 3px 8px rgba(222,59,32,.30);
}
.brand-name { font-family: 'Courier Prime', monospace; font-weight: 700; font-size: 21px; letter-spacing: .01em; }
.brand-name span { color: var(--coral); }
.steps { display: flex; gap: 18px; margin-left: auto; flex-wrap: wrap; }
.steps button {
  border: none; background: transparent; color: var(--muted);
  padding: 8px 2px; border-radius: 0; font-size: 12px; font-weight: 700;
  font-family: 'Courier Prime', monospace; text-transform: uppercase; letter-spacing: .12em;
  border-bottom: 3px solid transparent; transition: .15s;
}
.steps button:hover { color: var(--ink); }
.steps button.active { color: var(--ink); border-bottom-color: var(--coral); }
.steps button:disabled { opacity: .4; cursor: not-allowed; }
.env-pill {
  font-family: 'Courier Prime', monospace; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .1em;
  background: var(--gold); color: #4a3500; padding: 4px 9px; border-radius: var(--radius);
}

/* ---------- views ---------- */
main { max-width: 1080px; margin: 0 auto; padding: 36px 28px 120px; }
.view { display: none; animation: fade .25s ease; }
.view.active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .view { animation: none; } }
.view-head { margin-bottom: 22px; }
.view-head h2 { font-size: 30px; margin: 0 0 6px; }
.sub { color: var(--muted); margin: 0; max-width: 620px; }

/* ---------- hero ---------- */
.hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; padding-top: 24px; }
.eyebrow {
  display: flex; align-items: center; gap: 10px;
  color: var(--coral); font-family: 'Courier Prime', monospace; font-weight: 700;
  text-transform: uppercase; letter-spacing: .13em; font-size: 12px; margin: 0 0 14px;
}
.eyebrow::before { content: ''; width: 34px; height: 2px; background: var(--coral); flex: none; }
.hero h1 { font-size: 44px; line-height: 1.05; margin: 0 0 18px; }
.hero h1.big { font-size: 56px; line-height: 1.02; letter-spacing: -.015em; margin: 0 0 20px; }
.rotator { display: inline-block; color: var(--coral); transition: opacity .22s ease, transform .22s ease; }
.rotator::after { content: ''; display: block; height: 13px; background: rgba(222,59,32,.20); margin-top: -15px; }
@media (max-width: 640px) { .hero h1.big { font-size: 42px; } }

/* hero card fan */
.hero-art { position: relative; min-height: 320px; display: block; }
.hero-card { position: absolute; width: 200px; aspect-ratio: 7/5; border-radius: 3px; overflow: hidden; box-shadow: 0 18px 44px rgba(32,41,107,.20); border: 4px solid #fff; }
.hero-card.hc0 { top: 30px; left: 16%; transform: rotate(-9deg); z-index: 1; }
.hero-card.hc1 { top: 4px; left: 38%; transform: rotate(3deg); z-index: 3; }
.hero-card.hc2 { top: 64px; left: 60%; transform: rotate(11deg); z-index: 2; }
.hero-card svg, .hero-card img { width: 100%; height: 100%; display: block; object-fit: cover; }
.hero-card .hw-tag { position: absolute; bottom: 8px; left: 8px; background: rgba(32,41,107,.85); color: #fff; font-family: 'Courier Prime', monospace; font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; padding: 3px 8px; border-radius: var(--radius); backdrop-filter: blur(2px); }
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: transparent; color: var(--blue); border: 1.5px solid var(--blue);
  font-family: 'Courier Prime', monospace; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .09em;
  padding: 6px 12px; border-radius: var(--radius); margin: 0 0 20px;
}
@media (max-width: 820px) { .hero-art { min-height: 240px; } .hero-card { width: 150px; } }
.lede { font-size: 17px; line-height: 1.6; color: #4A5080; max-width: 480px; }
.btn-google {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 22px;
  background: #fff; border: 1.5px solid var(--ink); padding: 13px 22px;
  border-radius: var(--radius); font-size: 15px; font-weight: 600;
  box-shadow: 2.5px 2.5px 0 var(--ink);
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn-google:hover { transform: translate(1px,1px); box-shadow: 1.5px 1.5px 0 var(--ink); }
.btn-google .g {
  display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  background: conic-gradient(#EA4335 0 25%, #FBBC05 0 50%, #34A853 0 75%, #4285F4 0); color: #fff;
  font-weight: 700; font-size: 13px;
}
.btn-ms {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 12px;
  background: #fff; border: 1.5px solid var(--ink); padding: 13px 22px; border-radius: var(--radius);
  font-size: 15px; font-weight: 600; box-shadow: 2.5px 2.5px 0 var(--ink);
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn-ms:hover { transform: translate(1px,1px); box-shadow: 1.5px 1.5px 0 var(--ink); }
.btn-ms .ms { width: 18px; height: 18px; flex-shrink: 0; border-radius: 2px;
  background: conic-gradient(#F25022 0 25%, #7FBA00 0 50%, #FFB900 0 75%, #00A4EF 0); }
.fineprint { color: var(--muted); font-family: 'Courier Prime', monospace; font-size: 12px; margin-top: 14px; }

.hero-art { display: grid; place-items: center; }
.env-card {
  width: 300px; height: 200px; background: #fff; border-radius: var(--radius); position: relative;
  box-shadow: var(--shadow); border: 1px solid var(--line); padding: 18px; transform: rotate(-3deg);
  background-image: repeating-linear-gradient(45deg, transparent, transparent 8px, #F7F5EC 8px, #F7F5EC 11px);
}
.stamp {
  position: absolute; top: 14px; right: 14px; width: 58px; height: 64px; background: var(--coral);
  color: #fff; font-family: 'Courier Prime', monospace; font-size: 9px; font-weight: 700;
  display: grid; place-items: center; text-align: center;
  border: 3px dashed #fff; border-radius: var(--radius); line-height: 1.2; box-shadow: 0 3px 8px rgba(0,0,0,.12);
}
.env-card .addr { position: absolute; bottom: 46px; left: 24px; font-size: 13px; line-height: 1.5; }
.postmark { position: absolute; bottom: 16px; left: 24px; font-family: 'Courier Prime', monospace; font-size: 9px; letter-spacing: .12em; color: var(--muted); font-weight: 700; }

/* ---------- list cards ---------- */
.list { display: grid; gap: 12px; }
.row {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; display: grid; grid-template-columns: 44px 1fr auto; gap: 16px; align-items: center;
  transition: .15s;
}
.row.on { border-color: var(--blue); box-shadow: 0 6px 18px rgba(39,66,216,.10); }
.avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--paper); display: grid; place-items: center; font-weight: 600; color: var(--blue); border: 1px solid var(--line); }
.row-main .name { font-weight: 600; font-size: 15px; }
.row-main .meta { color: var(--muted); font-size: 13px; margin-top: 2px; }
.badge { display: inline-block; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 2px 9px; font-size: 11px; margin-left: 6px; color: var(--muted); }
.badge.soon { background: #FAE8E4; color: var(--coral-dark); border-color: #F0C9C0; }

.row-controls { display: flex; align-items: center; gap: 14px; }
.opt { display: none; }
.row.on .opt { display: flex; gap: 8px; align-items: center; }
select, input[type=text] {
  font-family: inherit; font-size: 13px; padding: 8px 10px; border: 1px solid var(--line);
  border-radius: var(--radius); background: #fff; color: var(--ink);
}
.link-btn { background: none; border: none; color: var(--blue); font-weight: 600; font-size: 13px; padding: 0; text-decoration: underline; text-underline-offset: 3px; }

/* toggle */
.switch { position: relative; width: 46px; height: 26px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; inset: 0; background: #D3D2C4; border-radius: 999px; transition: .2s; }
.slider::before { content: ''; position: absolute; height: 20px; width: 20px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch input:checked + .slider { background: var(--teal); }
.switch input:checked + .slider::before { transform: translateX(20px); }

/* ---------- sticky action bar ---------- */
.sticky-bar {
  position: fixed; bottom: 0; left: 0; right: 0; background: rgba(255,255,255,.94);
  backdrop-filter: blur(8px); border-top: 1px solid var(--line); padding: 14px 28px;
  display: flex; align-items: center; gap: 20px; z-index: 15;
}
.sticky-bar .cart-summary { margin-left: auto; font-weight: 600; }
.btn-primary {
  background: var(--coral); color: #fff; border: none; padding: 12px 22px; border-radius: var(--radius);
  font-family: 'Courier Prime', monospace; font-weight: 700; font-size: 12.5px;
  text-transform: uppercase; letter-spacing: .09em;
  box-shadow: 2.5px 2.5px 0 var(--ink);
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.btn-primary:hover { background: var(--coral-dark); transform: translate(1px,1px); box-shadow: 1.5px 1.5px 0 var(--ink); }
.btn-primary.block { width: 100%; margin-top: 16px; }
.btn-primary:disabled { background: #D3D2C4; box-shadow: none; cursor: not-allowed; transform: none; }

/* ---------- checkout ---------- */
.checkout-grid { display: grid; grid-template-columns: 1fr 320px; gap: 28px; align-items: start; }
.cart-lines { display: grid; gap: 10px; }
.cart-line { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: flex; justify-content: space-between; align-items: center; }
.cart-line .left .name { font-weight: 600; }
.cart-line .left .meta { color: var(--muted); font-size: 13px; margin-top: 2px; }
.cart-line .price { font-weight: 600; font-variant-numeric: tabular-nums; }
.order-box { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; position: sticky; top: 90px; box-shadow: var(--shadow); }
.order-box h3 { margin: 0 0 14px; font-size: 19px; }
.total-row { display: flex; justify-content: space-between; padding: 7px 0; font-size: 14px; color: #4A5080; }
.total-row.grand { border-top: 3px double var(--ink); margin-top: 8px; padding-top: 12px; font-size: 18px; font-weight: 700; color: var(--ink); font-family: 'Courier Prime', monospace; }

/* ---------- dashboard ---------- */
.dash-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.col-title {
  font-size: 14px; display: flex; align-items: center; gap: 10px;
  text-transform: uppercase; letter-spacing: .13em;
  border-bottom: 3px double var(--ink); padding-bottom: 9px;
}
.pill { background: transparent; border: none; padding: 1px 0; font-size: 12px; font-family: 'Courier Prime', monospace; color: var(--muted); font-weight: 700; }
.timeline { display: grid; gap: 10px; margin-top: 12px; }
.ti { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--blue); border-radius: var(--radius); padding: 13px 15px; }
.ti.done { border-left-color: var(--teal); }
.ti .top { display: flex; justify-content: space-between; align-items: baseline; }
.ti .who { font-weight: 600; }
.ti .when { color: var(--muted); font-family: 'Courier Prime', monospace; font-weight: 700; font-size: 12px; }
.ti .desc { color: var(--muted); font-size: 13px; margin-top: 4px; }
.ti .track { font-size: 11.5px; color: var(--teal); margin-top: 6px; font-family: 'Courier Prime', monospace; letter-spacing: .03em; }
.ti .mailbtn { margin-top: 10px; background: var(--ink); color: #fff; border: none; padding: 7px 13px; border-radius: var(--radius); font-family: 'Courier Prime', monospace; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.empty { color: var(--muted); font-size: 14px; padding: 24px; text-align: center; border: 1px dashed var(--line); border-radius: var(--radius); }

/* ---------- modal ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(32,41,107,.45); display: none; place-items: center; z-index: 40; padding: 20px; overflow-y: auto; }
.modal-backdrop.open { display: grid; }
/* On short/narrow screens, align to top and let the whole modal scroll so nothing is clipped. */
@media (max-width: 720px), (max-height: 700px) {
  .modal-backdrop { place-items: start center; }
}
.modal { position: relative; }
.modal-close { position: absolute; top: -14px; right: -14px; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: #fff; font-size: 20px; box-shadow: var(--shadow); }
.card-preview {
  width: 440px; max-width: 88vw; aspect-ratio: 7/5; background: #fff; border-radius: 3px; box-shadow: 0 24px 60px rgba(0,0,0,.3);
  padding: 40px; display: flex; flex-direction: column; justify-content: center; position: relative;
}
.card-preview .occ { text-transform: uppercase; letter-spacing: .18em; font-family: 'Courier Prime', monospace; font-size: 11px; color: var(--coral); font-weight: 700; }
.card-preview h3 { font-size: 26px; margin: 10px 0 16px; }
.card-preview p { font-family: 'Archivo', system-ui, sans-serif; font-size: 18px; line-height: 1.55; color: #333C74; }
.card-preview .sig { margin-top: 22px; font-style: italic; color: var(--muted); }
.card-preview .gift-tag { position: absolute; bottom: 18px; right: 22px; background: var(--gold); color: #4a3500; font-family: 'Courier Prime', monospace; font-size: 10.5px; font-weight: 700; padding: 5px 10px; border-radius: var(--radius); }

/* ---------- connect actions ---------- */
.connect-actions { display: flex; gap: 12px; align-items: center; margin-top: 22px; flex-wrap: wrap; }
.btn-ghost { background: transparent; border: 1.5px solid var(--ink); color: var(--ink); padding: 12px 18px; border-radius: var(--radius); font-weight: 600; font-size: 14px; transition: .15s; }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
.btn-ghost.danger { color: var(--coral-dark); border-color: #F0C9C0; }
.btn-ghost.danger:hover { background: var(--coral-dark); border-color: var(--coral-dark); color: #fff; }
.btn-primary.sm, .btn-ghost.sm { padding: 8px 14px; font-size: 13px; }
.btn-primary.sm { font-size: 11.5px; }

/* ---------- contacts page ---------- */
.row-between { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; }
.head-actions { display: flex; gap: 10px; flex-shrink: 0; }
.contact { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 14px; }
.contact-head { display: grid; grid-template-columns: 44px 1fr auto; gap: 14px; align-items: center; }
.contact-id .name { font-weight: 600; font-size: 15.5px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.contact-id .meta { color: var(--muted); font-size: 13px; margin-top: 3px; }
.badge.warn { background: #FAE8E4; color: var(--coral-dark); border-color: #F0C9C0; }

.subs { margin-top: 12px; border-top: 1px dashed var(--line); padding-top: 12px; display: grid; gap: 12px; }
.sub { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 11px 13px; }
.sub-main { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.sub-label { font-weight: 600; min-width: 92px; }
.mini { padding: 6px 8px; font-size: 12.5px; }
.mini.hidden { display: none; }
.renew { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 4px; }
.x { margin-left: auto; border: none; background: none; color: var(--muted); font-size: 18px; cursor: pointer; line-height: 1; }
.x:hover { color: var(--coral); }

.gift-row { display: flex; align-items: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.gift-label { font-size: 13px; color: var(--muted); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: var(--radius); padding: 5px 12px; font-size: 13px; font-weight: 500; color: var(--ink); transition: .12s; }
.chip:hover { border-color: var(--blue); }
.chip.on { background: var(--blue); color: #fff; border-color: var(--blue); }
.custom { display: inline-flex; align-items: center; gap: 2px; font-size: 13px; color: var(--muted); border: 1px solid var(--line); border-radius: var(--radius); padding: 2px 8px; background: #fff; }
.custom input { width: 56px; border: none; outline: none; font-family: inherit; font-size: 13px; padding: 4px 2px; }

/* small switch */
.switch.sm { width: 38px; height: 22px; flex-shrink: 0; }
.switch.sm .slider::before { height: 16px; width: 16px; }
.switch.sm input:checked + .slider::before { transform: translateX(16px); }

/* ---------- pay banner + schedule extras ---------- */
.pay-banner { background: #FBF3E2; border: 1px solid #E6D3A3; border-radius: var(--radius); padding: 14px 18px; margin-bottom: 22px; display: flex; align-items: center; justify-content: space-between; gap: 16px; font-size: 14px; }
.pay-banner.ok { background: #E9F3EC; border-color: #BFDCC9; }
.cost-line { font-size: 13px; color: #4A5080; margin-top: 6px; }

/* autopilot bar */
.autopilot-bar { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 22px; font-size: 13.5px; }
.ap-toggle { display: flex; align-items: center; gap: 10px; }
.ap-notify { color: var(--muted); display: flex; align-items: center; gap: 6px; }
.ap-notify input { border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 6px; font-family: inherit; }
.autopilot-bar .btn-ghost.sm { margin-left: auto; }

/* schedule item extras */
.ti-actions { display: flex; align-items: center; gap: 14px; margin-top: 10px; }
.linklike { background: none; border: none; color: var(--muted); font-size: 12.5px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 0; }
.linklike:hover { color: var(--blue); }
.ti.skip { opacity: .7; border-left-color: #C9C8B8; }
.ti .reaction { margin-top: 8px; background: #FAE8E4; color: var(--coral-dark); border-radius: var(--radius); padding: 6px 10px; font-size: 13px; display: inline-block; }

/* remix row */
.remix-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.remix-label { font-family: 'Courier Prime', monospace; font-size: 11px; color: var(--blue); font-weight: 700; text-transform: uppercase; letter-spacing: .1em; }
.remix-row .chip { padding: 4px 11px; border: 1.5px dashed var(--blue); color: var(--blue); font-family: 'Courier Prime', monospace; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; background: transparent; }
.remix-row .chip:hover { background: var(--blue); color: #fff; border-style: solid; }

/* onboarding hint */
.onboard-hint { background: #FBF3E2; border: 1px solid #E6D3A3; border-radius: var(--radius); padding: 11px 15px; margin-bottom: 14px; font-size: 13.5px; color: #6b5a2e; }
.onboard-hint.ok { background: #E9F3EC; border-color: #BFDCC9; color: #1E6B47; }
.ti.warn { border-left-color: var(--gold); }
.ti .mailbtn:disabled { background: #D3D2C4; cursor: not-allowed; }
/* Blocked-state shortcut: looks urgent and actionable, not disabled. */
.ti .fixbtn { margin-top: 10px; background: #FAE8E4; color: var(--coral-dark); border: 1px solid #F0C9C0; padding: 7px 13px; border-radius: var(--radius); font-size: 12.5px; font-weight: 600; cursor: pointer; }
.ti .fixbtn:hover { background: #F6DCD5; border-color: var(--coral); }

/* ---------- contact modal form ---------- */
.modal-form { background: #fff; border-radius: var(--radius); padding: 26px 28px; width: 540px; max-width: 92vw; box-shadow: 0 24px 60px rgba(0,0,0,.3); }
.modal-form h3 { margin: 0 0 18px; font-size: 22px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid label { display: flex; flex-direction: column; gap: 5px; font-family: 'Courier Prime', monospace; font-size: 11px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.form-grid label.col2 { grid-column: 1 / -1; }
.form-grid input, .form-grid select { font-family: 'Archivo', system-ui, sans-serif; font-size: 14px; padding: 9px 11px; border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); text-transform: none; letter-spacing: 0; }
.modal-actions { display: flex; justify-content: space-between; margin-top: 22px; }

/* ---------- design chip + thumbnails ---------- */
.thumb { display: inline-block; overflow: hidden; border-radius: var(--radius); flex-shrink: 0; box-shadow: inset 0 0 0 1px rgba(32,41,107,.12); vertical-align: middle; }
.thumb svg, .thumb img { display: block; width: 100%; height: 100%; }
.design-chip { display: inline-flex; align-items: center; gap: 7px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 11px 4px 5px; font-size: 13px; font-weight: 500; color: var(--ink); transition: .12s; }
.design-chip:hover { border-color: var(--blue); }
.design-chip .chev { color: var(--muted); margin-left: 2px; }
.badge.g { background: #E9EDFB; color: var(--blue); border-color: #C4CDF0; }

/* ---------- design gallery modal ---------- */
.modal-form.gallery { width: 640px; }
.design-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; max-height: 64vh; overflow: auto; padding: 2px; }
.design-tile { border: 2px solid var(--line); background: #fff; border-radius: var(--radius); padding: 8px; cursor: pointer; display: flex; flex-direction: column; gap: 6px; align-items: stretch; transition: .12s; }
.design-tile:hover { border-color: var(--ink); transform: translateY(-2px); }
.design-tile.on { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(39,66,216,.15); }
.tile-art { height: 92px; border-radius: var(--radius); display: grid; place-items: center; font-size: 40px; }
.tile-name { font-size: 13px; font-weight: 600; }
.tile-price { font-size: 12px; color: var(--muted); }

/* ---------- richer card preview ---------- */
.card-preview { padding: 22px; }
.card-preview .pv-emoji { font-size: 40px; text-align: center; margin-bottom: 12px; filter: drop-shadow(0 2px 4px rgba(0,0,0,.15)); }
.card-preview .pv-paper { background: rgba(255,255,255,.95); border-radius: var(--radius); padding: 26px 28px; }

/* ---------- account chip + menu ---------- */
.acct { position: relative; }
.acct-chip { display: inline-flex; align-items: center; gap: 8px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 12px 4px 4px; font-weight: 600; font-size: 13px; color: var(--ink); }
.acct-chip .acct-email { color: var(--muted); font-weight: 500; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-chip > *:first-child { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--blue); color: #fff; font-size: 11px; }
.acct-menu { position: absolute; right: 0; top: 44px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 6px; display: none; min-width: 170px; z-index: 30; }
.acct-menu.open { display: block; }
.acct-menu button { display: block; width: 100%; text-align: left; background: none; border: none; padding: 9px 12px; border-radius: var(--radius); font-size: 13.5px; color: var(--ink); }
.acct-menu button:hover { background: var(--paper); }

/* ---------- auth modal ---------- */
.modal-form.auth { width: 400px; }
.auth-sub { color: var(--muted); font-size: 13.5px; margin: -8px 0 16px; }
.auth-tabs { display: flex; gap: 6px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 4px; margin-bottom: 16px; }
.auth-tab { flex: 1; border: none; background: none; padding: 8px; border-radius: var(--radius); font-family: 'Courier Prime', monospace; font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.auth-tab.active { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
label.stack { display: flex; flex-direction: column; gap: 5px; font-family: 'Courier Prime', monospace; font-size: 11px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 12px; }
label.stack input, label.stack select { font-family: 'Archivo', system-ui, sans-serif; font-size: 14px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); text-transform: none; letter-spacing: 0; }
.auth-err { color: var(--coral-dark); font-size: 13px; min-height: 16px; margin: 0 0 8px; }
.link-btn.danger { color: var(--coral-dark); margin-top: 4px; }

/* ---------- card editor ---------- */
.modal.editor { width: 760px; max-width: 94vw; background: #fff; border-radius: var(--radius); padding: 26px 28px; box-shadow: 0 24px 60px rgba(0,0,0,.3); }
.editor-grid { display: grid; grid-template-columns: 1fr 300px; gap: 22px; align-items: start; }
.editor-preview { position: sticky; top: 0; }
.preview-hint { text-align: center; color: var(--muted); font-family: 'Courier Prime', monospace; font-size: 11px; text-transform: uppercase; letter-spacing: .1em; margin: 10px 0 0; }
.gcard { display: grid; grid-template-columns: 1fr 1fr; width: 100%; aspect-ratio: 2 / 1.35; border-radius: 3px; overflow: hidden; box-shadow: 0 18px 44px rgba(0,0,0,.20); border: 1px solid var(--line); }
.gcard-front { position: relative; overflow: hidden; }
.gcard-front svg, .gcard-front img { width: 100%; height: 100%; display: block; }
.gcard-front::after { content: ''; position: absolute; right: 0; top: 8%; height: 84%; width: 1px; background: rgba(255,255,255,.35); }
.gcard-front .fe { font-size: 46px; filter: drop-shadow(0 2px 6px rgba(0,0,0,.25)); }
.gcard-front .fo { font-size: 10px; text-transform: uppercase; letter-spacing: .16em; opacity: .9; }
.gcard-front .fn { font-family: 'Courier Prime', monospace; font-weight: 700; font-size: 15px; }
.gcard-inside { background: #fff; padding: 20px 22px; display: flex; flex-direction: column; background-image: repeating-linear-gradient(transparent, transparent 27px, #EDEBF7 27px, #EDEBF7 28px); }
.gcard-inside h4 { font-family: 'Courier Prime', monospace; margin: 0 0 8px; font-size: 18px; color: var(--ink); }
.gcard-inside p { font-family: 'Archivo', system-ui, sans-serif; font-size: 14px; line-height: 1.55; color: #333C74; white-space: pre-wrap; flex: 1; margin: 0; min-height: 0; overflow-y: auto; }
.gcard-inside .sig { font-style: italic; color: var(--muted); margin-top: 10px; font-family: 'Archivo', system-ui, sans-serif; }
.gcard-inside .gt { margin-top: 10px; align-self: flex-start; background: var(--gold); color: #4a3500; font-family: 'Courier Prime', monospace; font-size: 10px; font-weight: 700; padding: 4px 9px; border-radius: var(--radius); }
.gcard-inside .hand-tag { margin-top: 8px; align-self: flex-start; background: #E9EDFB; color: var(--blue); font-family: 'Courier Prime', monospace; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding: 4px 9px; border-radius: var(--radius); }

.editor-controls { display: flex; flex-direction: column; }
.ctrl-label { font-family: 'Courier Prime', monospace; font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; margin-bottom: 8px; }
.ctrl-label.row-between { display: flex; justify-content: space-between; align-items: baseline; margin-top: 16px; }
.ctrl-label .link-btn { text-transform: none; letter-spacing: 0; }
.design-strip { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; }
.ds-tile { flex: 0 0 auto; width: 66px; cursor: pointer; border: 2px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; padding: 0; }
.ds-tile.on { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(39,66,216,.15); }
.ds-art { display: block; height: 50px; overflow: hidden; border-radius: var(--radius); }
.ds-art svg, .ds-art img { display: block; width: 100%; height: 100%; }
.ds-name { display: block; font-size: 9.5px; line-height: 1.3; padding: 4px 2px; text-align: center; color: var(--muted); }
#editorMessage { font-family: inherit; font-size: 14px; padding: 11px 12px; border: 1px solid var(--line); border-radius: var(--radius); resize: vertical; color: var(--ink); width: 100%; }
.editor-actions { display: flex; gap: 10px; margin-top: 16px; }
.editor-actions .btn-primary { flex: 1; }

@media (max-width: 720px) {
  .editor-grid { grid-template-columns: 1fr; }
  .editor-preview { position: static; }
}

@media (max-width: 480px) {
  .acct-full { display: none; }
  .acct-chip .acct-email { display: none; }
  .acct-chip { padding: 4px; }
}
@media (max-width: 820px) {
  .hero, .dash-cols { grid-template-columns: 1fr; }
  /* Nav pills wrap to their own full-width row instead of disappearing. */
  .topbar { flex-wrap: wrap; gap: 8px 16px; padding: 12px 16px; }
  .steps { order: 3; width: 100%; justify-content: center; margin-left: 0; }
  /* On the bare landing (Contacts/Schedule still hidden) skip the row entirely. */
  .steps:not(:has(.app-nav:not([hidden]))) { display: none; }
  .row-between { flex-direction: column; align-items: stretch; }
  .form-grid { grid-template-columns: 1fr; }
  .design-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- site footer ---------- */
.site-footer { margin-top: 96px; border-top: 1px solid var(--line); background: var(--card); }
.foot-inner { max-width: 1080px; margin: 0 auto; padding: 44px 24px 36px; text-align: center; }
.foot-brand { display: inline-flex; align-items: center; gap: 8px; font-family: 'Courier Prime', monospace; font-weight: 700; font-size: 18px; }
.foot-brand em { font-style: normal; color: var(--coral); }
.foot-tag { color: var(--muted); font-size: 14px; margin: 10px 0 18px; }
.foot-links { display: flex; justify-content: center; gap: 22px; flex-wrap: wrap; margin-bottom: 18px; }
.foot-links a { color: var(--ink); font-size: 14px; font-weight: 500; text-decoration: none; }
.foot-links a:hover { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.foot-copy { color: var(--muted); font-family: 'Courier Prime', monospace; font-size: 12px; margin: 0; }

/* ---------- landing marketing sections ---------- */
.landing { margin-top: 104px; display: flex; flex-direction: column; gap: 96px; }
.lp-eyebrow { text-align: center; color: var(--coral); font-family: 'Courier Prime', monospace; font-weight: 700; text-transform: uppercase; letter-spacing: .14em; font-size: 12px; margin: 0 0 12px; }
.lp-h2 { text-align: center; font-size: 34px; line-height: 1.12; margin: 0 auto 14px; max-width: 20ch; text-wrap: balance; }
.lp-lede { text-align: center; color: var(--muted); font-size: 18px; line-height: 1.6; max-width: 640px; margin: 0 auto; }

.lp-problem { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 60px 40px; box-shadow: var(--shadow); }

.lp-grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 40px; }
.lp-step { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.lp-num { display: block; width: auto; height: auto; border-radius: 0; background: none; color: var(--coral); font-weight: 700; font-family: 'Courier Prime', monospace; font-size: 13px; letter-spacing: .12em; margin-bottom: 14px; }
.lp-num::before { content: 'N°'; }
.lp-step h3 { margin: 0 0 7px; font-size: 18px; }
.lp-step p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.55; }

.lp-cases { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 40px; }
.lp-case { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; transition: transform .15s ease, box-shadow .15s ease; }
.lp-case:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.lp-case .ico { font-size: 26px; display: block; margin-bottom: 12px; }
.lp-case h3 { margin: 0 0 7px; font-size: 16px; }
.lp-case p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }

.lp-benefits { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px 30px; margin: 40px auto 0; max-width: 760px; }
.lp-benefit { display: flex; gap: 14px; align-items: flex-start; }
.lp-benefit .ico { font-size: 22px; line-height: 1; }
.lp-benefit h3 { margin: 0 0 4px; font-size: 15px; }
.lp-benefit p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }

.faq-list { max-width: 720px; margin: 40px auto 0; display: flex; flex-direction: column; gap: 12px; }
.faq-item { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.faq-item summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 18px 22px; font-weight: 600; font-size: 16px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; flex: none; color: var(--coral); font-family: 'Courier Prime', monospace; font-size: 22px; font-weight: 400; line-height: 1; transition: transform .15s ease; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { margin: 0; padding: 0 22px 18px; color: var(--muted); font-size: 14.5px; line-height: 1.6; }

.lp-cta { text-align: center; position: relative; overflow: hidden; background: var(--ink); color: #fff; border-radius: var(--radius); padding: 66px 40px; }
.lp-cta::before, .lp-cta::after {
  content: ''; position: absolute; left: 0; right: 0; height: 8px;
  background: repeating-linear-gradient(-45deg, var(--coral) 0 11px, var(--ink) 11px 22px, #fff 22px 33px, var(--ink) 33px 44px);
}
.lp-cta::before { top: 0; }
.lp-cta::after { bottom: 0; }
.lp-cta h2 { color: #fff; font-size: 34px; line-height: 1.1; margin: 0 0 12px; }
.lp-cta p { color: rgba(255,255,255,.85); font-size: 17px; margin: 0 0 28px; }
.lp-cta .cta-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn-cta-solid { background: #fff; color: var(--ink); border: 0; padding: 13px 24px; border-radius: var(--radius); font-family: 'Courier Prime', monospace; font-weight: 700; font-size: 12.5px; text-transform: uppercase; letter-spacing: .09em; box-shadow: 2.5px 2.5px 0 rgba(0,0,0,.4); transition: transform .12s ease, box-shadow .12s ease; }
.btn-cta-solid:hover { transform: translate(1px,1px); box-shadow: 1.5px 1.5px 0 rgba(0,0,0,.4); }
.btn-cta-ghost { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,.65); padding: 13px 22px; border-radius: var(--radius); font-weight: 600; font-size: 15px; }
.btn-cta-ghost:hover { background: rgba(255,255,255,.14); }

@media (max-width: 820px) {
  .lp-grid3, .lp-cases, .lp-benefits { grid-template-columns: 1fr; }
  .lp-h2 { font-size: 28px; }
  .lp-cta h2 { font-size: 28px; }
  .lp-problem { padding: 40px 24px; }
}

/* ---------- design gallery (bigger art, grid, scrollable) ---------- */
.design-gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; max-height: 300px; overflow-y: auto; padding: 2px 4px 6px 2px; }
.design-gallery .ds-tile { width: auto; border: 2px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; padding: 0; cursor: pointer; text-align: left; transition: transform .12s ease, border-color .12s ease; }
.design-gallery .ds-tile:hover { transform: translateY(-2px); border-color: var(--ink); }
.design-gallery .ds-tile.on { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(39,66,216,.15); }
/* Explicit height chain: the base .ds-art{height:50px} rule and the
   aspect-ratio/percentage-height circularity both collapsed tiles on some
   engines (empty pills on iOS). position:relative + absolutely-filled art
   cannot collapse, and min-height floors the tile even with no image. */
.design-gallery .ds-art { display: block; width: 100%; height: auto; aspect-ratio: 7/5; min-height: 96px; position: relative; overflow: hidden; background: #fff; }
.design-gallery .ds-art svg, .design-gallery .ds-art img { position: absolute; inset: 6px; width: calc(100% - 12px); height: calc(100% - 12px); object-fit: contain; display: block; }
.design-gallery .ds-name { display: block; font-size: 11px; line-height: 1.35; padding: 6px 8px; color: var(--ink); }

/* ---------- send queue (visual card queue) ---------- */
.ti { display: flex; gap: 12px; align-items: flex-start; }
.ti .ti-art { flex: 0 0 auto; }
.ti .ti-art .thumb { width: 76px !important; height: 56px !important; border-radius: var(--radius); overflow: hidden; display: block; box-shadow: 0 4px 12px rgba(32,41,107,.14); border: 2px solid #fff; }
.ti .ti-art .thumb svg, .ti .ti-art .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ti .ti-body { flex: 1; min-width: 0; }

/* ---------- setup summary / checklist ---------- */
.setup-summary { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; margin-bottom: 16px; }
.ss-stats { font-size: 14px; margin-bottom: 9px; }
.ss-stats strong { color: var(--coral-dark); }
.ss-steps { display: flex; gap: 8px; flex-wrap: wrap; }
.ss-step { font-family: 'Courier Prime', monospace; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; padding: 4px 11px; border-radius: var(--radius); background: var(--paper); border: 1px solid var(--line); color: var(--muted); }
.ss-step.done { background: #E9F3EC; border-color: #BFDCC9; color: #1E7A4F; }

/* ---------- guest save nudge ---------- */
.guest-nudge { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; background: #FAE8E4; border: 1px solid #F0C9C0; border-radius: var(--radius); padding: 11px 16px; margin-bottom: 12px; font-size: 13.5px; }
.gn-actions { display: flex; align-items: center; gap: 8px; }
.gn-x { border: none; background: transparent; font-size: 18px; color: var(--muted); cursor: pointer; padding: 2px 6px; }

/* ---------- empty states ---------- */
.empty { text-align: center; padding: 30px 18px; color: var(--muted); font-size: 14px; background: var(--card); border: 1px dashed var(--line); border-radius: var(--radius); }
.empty .empty-ico { display: block; font-size: 34px; margin-bottom: 8px; }
.empty p { margin: 0 0 12px; }

/* ---------- design category tabs ---------- */
.cat-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.cat-tab { border: 1px solid var(--line); background: #fff; color: var(--muted); padding: 4px 11px; border-radius: var(--radius); font-family: 'Courier Prime', monospace; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.cat-tab.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.cat-tab:hover { color: var(--ink); }
.cat-tab.on:hover { color: #fff; }
.ds-empty { color: var(--muted); font-size: 13px; padding: 12px 2px; }

/* ---------- toasts ---------- */
#toastHost { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 60; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: max-content; max-width: 92vw; }
.toast { pointer-events: auto; cursor: pointer; background: var(--ink); color: #fff; padding: 12px 16px; border-radius: var(--radius); font-size: 14px; box-shadow: 0 12px 30px rgba(0,0,0,.25); opacity: 0; transform: translateY(10px); transition: opacity .22s ease, transform .22s ease; max-width: 92vw; }
.toast.show { opacity: 1; transform: none; }
.toast a { color: #fff; text-decoration: underline; margin-left: 6px; font-weight: 600; }
.toast-success { background: #1E7A4F; }
.toast-error { background: var(--coral-dark); }
.toast-warn { background: #9a6b00; }

/* ---------- mobile: card editor ---------- */
@media (max-width: 720px) {
  .modal.editor { width: 100%; }
  .modal-form { width: 100% !important; }
  .editor-preview { position: static; }
  .design-strip { gap: 6px; }
  .design-gallery { grid-template-columns: repeat(2, 1fr); max-height: 44vh; }
}

/* ---------- clean white card backgrounds (Cardly PNGs can be transparent) ---------- */
.design-gallery .ds-art, .thumb, .hero-card, .ti .ti-art .thumb, .gcard-front, .tile-art, .art { background: #fff; }

/* ---------- OAuth buttons + password requirements ---------- */
.oauth-row { display: flex; flex-direction: column; gap: 8px; margin: 4px 0 6px; }
.btn-oauth { display: flex; align-items: center; justify-content: center; gap: 9px; width: 100%; padding: 11px; border: 1.5px solid var(--ink); background: #fff; border-radius: var(--radius); font-weight: 600; font-size: 14px; color: var(--ink); }
.btn-oauth:hover { background: var(--paper); }
.btn-oauth .g { font-weight: 800; color: #4285F4; font-family: Arial, sans-serif; }
.btn-oauth .ap::before { content: ''; }
#oauthApple { background: #111; color: #fff; border-color: #111; }
#oauthApple .ap::before { content: '🍎'; }
.oauth-or { text-align: center; position: relative; margin: 12px 0; }
.oauth-or::before { content: ''; position: absolute; top: 50%; left: 0; right: 0; height: 1px; background: var(--line); }
.oauth-or span { position: relative; background: #fff; padding: 0 10px; color: var(--muted); font-family: 'Courier Prime', monospace; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.pw-reqs { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.pw-reqs li { font-size: 12px; color: var(--muted); }
.pw-reqs li::before { content: '○ '; }
.pw-reqs li.ok { color: #1E7A4F; }
.pw-reqs li.ok::before { content: '✓ '; }

/* ---------- contact quick-remove + await-reaction ---------- */
.contact-actions { display: flex; align-items: center; gap: 4px; }
.icon-btn { border: none; background: transparent; font-size: 15px; padding: 5px 7px; border-radius: var(--radius); cursor: pointer; opacity: .55; }
.icon-btn:hover { opacity: 1; background: var(--paper); }
.icon-btn.danger:hover { background: #FAE8E4; }
.await-react { margin-top: 8px; font-size: 12.5px; color: var(--muted); }

/* message character counter */
.char-count { text-align: right; font-family: 'Courier Prime', monospace; font-size: 11px; color: var(--muted); margin-top: 4px; }
.char-count.near { color: var(--coral-dark); font-weight: 700; }
