/* LEIF — "Leaf & Sun"
   Display: Bodoni Moda (invitation typography). UI: Figtree.
   Signature: event cards cut like invitation tickets with a date stub. */
:root {
  --paper: #f8faf1;
  --paper-2: #eef3e2;
  --card: #ffffff;
  --ink: #1e2a17;
  --ink-2: #4b5a40;
  --ink-3: #7c8a70;
  --line: #dfe8cf;
  --leaf: #3d6b1f;
  --leaf-2: #22401a;
  --leaf-tint: #eef5dc;
  --sun: #b5d334;
  --sun-soft: #f2f7d2;
  --sage: #3f7a5f;
  --sage-tint: #e3f0e8;
  --amber: #a5661a;
  --amber-tint: #fbefd9;
  --danger: #b0313f;
  --danger-tint: #fbe5e7;
  --display: "Bodoni Moda", "Didot", "Bodoni 72", Georgia, serif;
  --ui: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --shadow: 0 1px 2px rgba(34,64,26, .06), 0 8px 24px -12px rgba(34,64,26, .18);
  --focus: 0 0 0 3px #fff, 0 0 0 5px var(--leaf);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--ui); font-size: 16px; line-height: 1.55; color: var(--ink); background: var(--paper); }
img, svg { max-width: 100%; }
a { color: var(--leaf); text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.15; margin: 0 0 .4em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.9rem, 1.4rem + 1.6vw, 2.6rem); }
h2 { font-size: 1.45rem; }
h3 { font-size: 1.12rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
.muted { color: var(--ink-3); }
.small { font-size: .875rem; }
.ico { flex: none; vertical-align: middle; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- buttons & forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; font: 600 .95rem/1 var(--ui); padding: .8em 1.15em; border-radius: 999px; border: 1.5px solid transparent; cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s, transform .1s; min-height: 44px; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--leaf); color: #fff; }
.btn-primary:hover { background: var(--leaf-2); }
.btn-sun { background: var(--sun); color: #1e2a17; }
.btn-sun:hover { background: #a3bf22; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink-3); background: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger-ghost { color: var(--danger); border-color: #efc4c9; background: transparent; }
.btn-danger-ghost:hover { background: var(--danger-tint); }
.btn-sm { padding: .55em .9em; font-size: .85rem; min-height: 36px; }
.btn-lg { padding: 1em 1.6em; font-size: 1.05rem; }
.btn[disabled], .btn.is-loading { opacity: .6; pointer-events: none; }
.btn.is-loading::after { content: ""; width: 1em; height: 1em; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.linkbtn { background: none; border: 0; padding: 0; color: var(--leaf); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.field label, .label { font-weight: 600; font-size: .92rem; }
.field .hint { font-size: .84rem; color: var(--ink-3); }
.field .err { font-size: .86rem; color: var(--danger); font-weight: 500; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=number], input[type=search], input[type=url], input[type=tel], select, textarea {
  font: inherit; color: var(--ink); background: #fff; border: 1.5px solid var(--line); border-radius: var(--r-sm); padding: .7em .85em; width: 100%; min-height: 44px; }
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--leaf); box-shadow: 0 0 0 3px var(--leaf-tint); }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--danger); }
input[type=color] { width: 52px; height: 44px; padding: 3px; border: 1.5px solid var(--line); border-radius: var(--r-sm); background: #fff; cursor: pointer; }
.check { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; cursor: pointer; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--leaf); flex: none; }
.check strong { display: block; font-weight: 600; }
.check span.muted { font-size: .88rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
@media (max-width: 640px) { .grid-2 { grid-template-columns: 1fr; } }
.radio-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.radio-cards label { border: 1.5px solid var(--line); border-radius: var(--r-md); padding: 12px 14px; cursor: pointer; background: #fff; font-weight: 500; display: flex; gap: 10px; align-items: center; }
.radio-cards input { accent-color: var(--leaf); }
.radio-cards label:has(input:checked) { border-color: var(--leaf); background: var(--leaf-tint); }

/* ---------- flash & badges */
.flashes { display: grid; gap: 10px; margin-bottom: 20px; }
.flash { padding: 12px 16px; border-radius: var(--r-md); display: flex; gap: 10px; align-items: flex-start; font-weight: 500; border: 1px solid; }
.flash-success { background: var(--sage-tint); border-color: #bfdccb; color: #23523d; }
.flash-error { background: var(--danger-tint); border-color: #f0c2c7; color: #8a2330; }
.flash-info { background: #fff; border-color: var(--line); color: var(--ink-2); }
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--paper-2); color: var(--ink-2); white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .7; }
.badge-live, .badge-approved, .badge-active, .badge-paid { background: var(--sage-tint); color: var(--sage); }
.badge-draft, .badge-pending, .badge-simulated, .badge-trialing { background: var(--amber-tint); color: var(--amber); }
.badge-closed, .badge-hidden, .badge-canceled { background: #e8ece3; color: #5e6a57; }
.badge-suspended, .badge-failed, .badge-past_due { background: var(--danger-tint); color: var(--danger); }
.badge-dev { background: var(--sun-soft); color: #59661a; }

/* ---------- app shell */
.shell { display: grid; grid-template-columns: 252px 1fr; min-height: 100vh; }
.side { background: var(--leaf-2); color: #e6f0d3; padding: 22px 16px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 6px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-family: var(--display); font-size: 1.45rem; font-weight: 700; letter-spacing: .14em; padding: 4px 10px 18px; }
.brand-mark { width: 34px; height: 34px; }
.side nav { display: grid; gap: 2px; }
.side nav a { display: flex; align-items: center; gap: 12px; color: #d4e5b8; text-decoration: none; padding: 10px 12px; border-radius: 10px; font-weight: 500; }
.side nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.side nav a[aria-current=page] { background: rgba(181,211,52,.18); color: #fff; box-shadow: inset 3px 0 0 var(--sun); }
.side .acct { margin-top: auto; padding: 14px 12px; border-top: 1px solid rgba(255,255,255,.1); font-size: .88rem; }
.side .acct strong { display: block; color: #fff; }
.side .acct form { margin-top: 10px; }
.side .acct button { background: none; border: 0; color: #d4e5b8; font: inherit; cursor: pointer; padding: 0; display: inline-flex; gap: 8px; align-items: center; }
.side .plan-chip { display: inline-block; margin-top: 6px; color: var(--sun); font-weight: 600; }
.main { padding: 32px clamp(18px, 4vw, 48px) 64px; min-width: 0; }
.topbar { display: none; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 26px; }
.page-head p { color: var(--ink-2); margin: 0; max-width: 60ch; }
.page-head .actions { display: flex; gap: 10px; flex-wrap: wrap; }
.crumb { font-size: .9rem; margin-bottom: 6px; display: inline-flex; gap: 6px; align-items: center; color: var(--ink-3); text-decoration: none; }
.crumb:hover { color: var(--leaf); }
.devbar { background: var(--sun-soft); color: #4b5612; font-size: .85rem; padding: 7px 16px; text-align: center; border-bottom: 1px solid #dbe5a0; }
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 auto 0 0; width: 270px; z-index: 50; transform: translateX(-100%); transition: transform .2s; }
  .side.open { transform: none; box-shadow: 0 0 0 100vmax rgba(30,42,23,.45); }
  .topbar { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; background: var(--leaf-2); color: #fff; position: sticky; top: 0; z-index: 40; }
  .topbar .brand { padding: 0; font-size: 1.15rem; }
  .topbar button { background: none; border: 0; color: #fff; padding: 8px; cursor: pointer; }
  .main { padding-top: 22px; }
}

/* ---------- surfaces */
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; }
.panel + .panel { margin-top: 20px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; }
.panel-head h2, .panel-head h3 { margin: 0; }
.layout-2 { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr); gap: 22px; align-items: start; }
@media (max-width: 1080px) { .layout-2 { grid-template-columns: 1fr; } }
.stack > * + * { margin-top: 20px; }

/* dashboard greeting with confetti hairlines */
.hello { position: relative; overflow: hidden; background: linear-gradient(120deg, #fff 0%, #f0f7dc 100%); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 28px; margin-bottom: 22px; display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: center; }
.hello h1 { margin-bottom: 6px; }
.hello p { color: var(--ink-2); margin: 0; }
.hello::after { content: ""; position: absolute; right: -30px; top: -40px; width: 260px; height: 200px; background: radial-gradient(circle, var(--sun) 2px, transparent 2.5px) 0 0/26px 26px; opacity: .35; transform: rotate(12deg); pointer-events: none; mask-image: radial-gradient(closest-side, #000, transparent); }
.hello .actions { display: flex; gap: 10px; flex-wrap: wrap; position: relative; z-index: 1; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 22px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); padding: 16px 18px; }
.kpi b { display: block; font-family: var(--display); font-size: 1.9rem; font-weight: 600; line-height: 1.1; }
.kpi span { color: var(--ink-3); font-size: .9rem; }

/* usage meters */
.meter { margin-bottom: 14px; }
.meter-top { display: flex; justify-content: space-between; font-size: .9rem; margin-bottom: 5px; }
.meter-top span:last-child { color: var(--ink-3); }
.meter-bar { height: 8px; border-radius: 99px; background: var(--paper-2); overflow: hidden; }
.meter-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--sun), #d9b878); }
.meter.full .meter-bar i { background: var(--danger); }
.meter.full .meter-top span:last-child { color: var(--danger); font-weight: 600; }

/* ---------- invitation ticket: the signature element */
.tickets { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.ticket { --accent: var(--leaf); position: relative; display: grid; grid-template-columns: 86px 1fr; background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); text-decoration: none; color: inherit; transition: box-shadow .15s, border-color .15s; }
.ticket:hover { box-shadow: var(--shadow); border-color: #cddfb2; }
.ticket-stub { background: var(--accent); color: #fff; border-radius: var(--r-md) 0 0 var(--r-md); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 14px 6px; text-align: center; position: relative; }
.ticket-stub::after { content: ""; position: absolute; right: -1px; top: 10px; bottom: 10px; border-right: 2px dashed rgba(255,255,255,.9); }
.ticket-stub .mo { font-size: .8rem; opacity: .9; }
.ticket-stub .day { font-family: var(--display); font-size: 2rem; line-height: 1; font-weight: 600; }
.ticket-stub .yr { font-size: .75rem; opacity: .8; }
.ticket-stub .tbd { font-size: .8rem; opacity: .9; }
.ticket::before, .ticket::after { content: ""; position: absolute; left: 77px; width: 18px; height: 18px; border-radius: 50%; background: var(--paper); border: 1px solid var(--line); }
.ticket::before { top: -10px; clip-path: inset(50% 0 0 0); }
.ticket::after { bottom: -10px; clip-path: inset(0 0 50% 0); }
.ticket-body { padding: 16px 18px; min-width: 0; }
.ticket-body h3 { font-size: 1.1rem; margin: 0 0 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ticket-meta { color: var(--ink-3); font-size: .88rem; display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.ticket-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; gap: 8px; font-size: .88rem; color: var(--ink-2); }

/* templates grid */
.tgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; }
.tcard { background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; display: flex; flex-direction: column; }
.tcard .thumb { aspect-ratio: 4/5; background: repeating-conic-gradient(#ecf1e2 0 25%, #f7f9f2 0 50%) 0 0/18px 18px; display: grid; place-items: center; padding: 14px; text-decoration: none; }
.tcard .thumb img { max-height: 100%; max-width: 100%; object-fit: contain; box-shadow: 0 6px 18px -8px rgba(30,42,23,.45); background: #fff; }
.tcard .thumb .ph { color: var(--ink-3); font-size: .9rem; }
.tcard .info { padding: 12px 14px 14px; display: grid; gap: 8px; }
.tcard .info h3 { font-size: 1rem; margin: 0; }
.tcard .row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.tcard .tools { display: flex; gap: 6px; flex-wrap: wrap; }

/* preset chooser */
.presets { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.preset { border: 1.5px solid var(--line); border-radius: var(--r-md); padding: 14px; background: #fff; cursor: pointer; text-align: left; font: inherit; color: inherit; display: grid; gap: 8px; }
.preset:hover, .preset:focus-visible { border-color: var(--leaf); }
.preset .shape { background: var(--leaf-tint); border: 1.5px solid #cfe2a8; border-radius: 4px; margin: 0 auto 4px; }
.preset strong { font-weight: 600; }
.preset span { font-size: .84rem; color: var(--ink-3); }

/* activity list */
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: grid; grid-template-columns: 30px 1fr; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: .93rem; }
.feed li:last-child { border-bottom: 0; }
.feed .dot { width: 30px; height: 30px; border-radius: 50%; background: var(--leaf-tint); color: var(--leaf); display: grid; place-items: center; }
.feed time { display: block; color: var(--ink-3); font-size: .82rem; }

/* empty states */
.empty { text-align: center; padding: 40px 20px; border: 1.5px dashed #d3e2bb; border-radius: var(--r-lg); background: #fcfdf8; }
.empty .art { width: 84px; height: 84px; margin: 0 auto 12px; }
.empty h3 { font-size: 1.25rem; }
.empty p { color: var(--ink-2); max-width: 44ch; margin: 0 auto 16px; }

/* tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-md); background: #fff; }
table { width: 100%; border-collapse: collapse; font-size: .93rem; }
th { text-align: left; font-weight: 600; color: var(--ink-2); background: #f9fbf3; padding: 11px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td a { font-weight: 600; text-decoration: none; }
td a:hover { text-decoration: underline; }

/* toolbar / filters */
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 18px; }
.filters input[type=search] { max-width: 260px; }
.filters select { width: auto; }
.seg { display: inline-flex; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.seg a { padding: 7px 14px; border-radius: 999px; text-decoration: none; color: var(--ink-2); font-weight: 500; font-size: .9rem; }
.seg a[aria-current=true] { background: var(--leaf); color: #fff; }

/* gallery */
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.pcell { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; }
.pcell img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--paper-2); }
.pcell .sel { position: absolute; top: 8px; left: 8px; width: 24px; height: 24px; accent-color: var(--leaf); }
.pcell .meta { padding: 8px 10px; font-size: .8rem; display: flex; justify-content: space-between; gap: 6px; align-items: center; }
.pcell .meta span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--ink-2); }
.pcell .actions { position: absolute; top: 6px; right: 6px; display: flex; gap: 4px; }
.pcell .actions a { background: rgba(255,255,255,.92); border-radius: 8px; padding: 5px; display: grid; color: var(--ink); }
.pcell:has(.sel:checked) { outline: 3px solid var(--leaf); outline-offset: -1px; }
.bulkbar { position: sticky; bottom: 14px; z-index: 5; background: var(--ink); color: #fff; border-radius: 999px; padding: 8px 10px 8px 20px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; box-shadow: 0 14px 30px -10px rgba(30,42,23,.5); margin-top: 18px; }
.bulkbar .btn-ghost { color: #fff; border-color: rgba(255,255,255,.3); }
.bulkbar .btn-ghost:hover { background: rgba(255,255,255,.1); }
.bulkbar .count { margin-right: auto; font-weight: 600; }
.lightbox { position: fixed; inset: 0; background: rgba(16,26,12,.92); z-index: 80; display: none; place-items: center; padding: 20px; }
.lightbox.open { display: grid; }
.lightbox img { max-height: 84vh; max-width: 92vw; border-radius: 6px; }
.lightbox .lb-bar { position: absolute; top: 14px; right: 14px; display: flex; gap: 8px; }

/* share box */
.share { display: grid; grid-template-columns: 180px 1fr; gap: 20px; align-items: center; }
.share .qr { background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); padding: 8px; }
.share .qr svg { width: 100%; height: auto; display: block; }
.copyrow { display: flex; gap: 8px; }
.copyrow input { font-size: .88rem; }
@media (max-width: 560px) { .share { grid-template-columns: 1fr; } .share .qr { max-width: 200px; } }

dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; margin: 0; font-size: .93rem; }
dl.facts dt { color: var(--ink-3); }
dl.facts dd { margin: 0; }

/* plans */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; }
.plan { background: #fff; border: 1.5px solid var(--line); border-radius: var(--r-lg); padding: 22px; display: flex; flex-direction: column; gap: 12px; }
.plan.current { border-color: var(--sun); box-shadow: 0 0 0 4px var(--sun-soft); }
.plan h3 { font-size: 1.3rem; margin: 0; }
.plan .price { font-family: var(--display); font-size: 2rem; font-weight: 600; line-height: 1; }
.plan .price small { font-family: var(--ui); font-size: .9rem; font-weight: 400; color: var(--ink-3); }
.plan ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 7px; font-size: .92rem; flex: 1; }
.plan li { display: flex; gap: 8px; }
.plan li .ico { color: var(--sage); margin-top: 3px; }
.plan li.no { color: var(--ink-3); }
.plan li.no .ico { color: var(--ink-3); }
.callout { border-radius: var(--r-md); padding: 14px 18px; display: flex; gap: 12px; align-items: flex-start; border: 1px solid; }
.callout-gold { background: var(--sun-soft); border-color: #d6e09a; color: #4a5410; }
.callout-danger { background: var(--danger-tint); border-color: #f0c2c7; color: #7c2330; }
.callout-info { background: #fff; border-color: var(--line); }

/* bar chart (admin) */
.bars { display: flex; align-items: flex-end; gap: 6px; height: 160px; padding-top: 10px; }
.bars div { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; font-size: .72rem; color: var(--ink-3); }
.bars i { width: 100%; background: var(--leaf); border-radius: 4px 4px 0 0; min-height: 2px; display: block; }
.bars b { font-weight: 600; color: var(--ink-2); font-size: .74rem; }

/* auth / landing */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-art { background: var(--leaf-2); color: #e6f0d3; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-art .brand { padding: 0; }
.auth-art blockquote { font-family: var(--display); font-size: clamp(1.6rem, 1rem + 2vw, 2.5rem); line-height: 1.2; margin: 0; max-width: 18ch; color: #fff; position: relative; z-index: 1; }
.auth-art .strip-art { position: absolute; right: 8%; top: 18%; width: 150px; transform: rotate(8deg); background: #fff; padding: 10px 10px 34px; box-shadow: 0 30px 50px -20px rgba(0,0,0,.5); }
.auth-art .strip-art span { display: block; height: 110px; margin-bottom: 8px; background: linear-gradient(135deg, #d9ec9a, #b5d334); }
.auth-art .strip-art span:nth-child(2) { background: linear-gradient(135deg, #c8e08a, #4a7c23); }
.auth-art .strip-art span:nth-child(3) { background: linear-gradient(135deg, #eef6c8, #8fb22a); }
.auth-form { display: grid; place-items: center; padding: 40px 22px; }
.auth-form .box { width: 100%; max-width: 420px; }
.demo-creds { background: #fff; border: 1px dashed #cddfb2; border-radius: var(--r-md); padding: 14px 16px; font-size: .88rem; margin-top: 22px; }
.demo-creds code { background: var(--paper-2); padding: 1px 6px; border-radius: 5px; }
@media (max-width: 860px) { .auth { grid-template-columns: 1fr; } .auth-art { padding: 28px 22px; min-height: 220px; } .auth-art .strip-art { width: 90px; top: 30px; right: 22px; } .auth-art .strip-art span { height: 60px; } }

.landing-nav { display: flex; justify-content: space-between; align-items: center; padding: 18px clamp(18px, 5vw, 64px); }
.landing-nav .brand { color: var(--leaf-2); padding: 0; }
.landing-nav .actions { display: flex; gap: 10px; }
.hero { padding: 40px clamp(18px, 5vw, 64px) 70px; display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; max-width: 1240px; margin: 0 auto; }
.hero h1 { font-size: clamp(2.4rem, 1.5rem + 3.4vw, 4.4rem); line-height: 1.04; margin-bottom: 18px; max-width: 14ch; }
.hero p.lead { font-size: 1.15rem; color: var(--ink-2); max-width: 46ch; margin-bottom: 26px; }
.hero .cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-stage { position: relative; height: 480px; }
.hero-stage .print { position: absolute; background: #fff; padding: 12px 12px 44px; box-shadow: 0 30px 60px -28px rgba(34,64,26,.55); }
.hero-stage .print img { display: block; }
.hero-stage .p1 { width: 250px; left: 4%; top: 30px; transform: rotate(-6deg); }
.hero-stage .p2 { width: 130px; right: 8%; top: 0; transform: rotate(7deg); padding-bottom: 12px; }
.hero-stage .p3 { width: 270px; right: 0; bottom: 0; transform: rotate(3deg); padding-bottom: 12px; }
.hero-stage .phone { position: absolute; left: 34%; bottom: -10px; width: 170px; height: 330px; border-radius: 30px; background: var(--ink); padding: 10px; box-shadow: 0 30px 60px -20px rgba(30,42,23,.6); }
.hero-stage .phone div { width: 100%; height: 100%; border-radius: 22px; background: linear-gradient(180deg, #22401a, #3d6b1f); display: grid; place-items: center; color: #fff; text-align: center; font-family: var(--display); font-size: 1.05rem; padding: 14px; }
.hero-stage .phone .shutter { width: 58px; height: 58px; border-radius: 50%; border: 4px solid var(--sun); margin: 10px auto 0; background: rgba(255,255,255,.15); }
.landing-sec { max-width: 1140px; margin: 0 auto; padding: 50px clamp(18px, 5vw, 64px); }
.flow { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 26px; counter-reset: step; }
.flow li { list-style: none; padding-top: 14px; border-top: 2px solid var(--sun); }
.flow li::before { counter-increment: step; content: counter(step); font-family: var(--display); font-size: 2rem; color: var(--sun); display: block; }
.flow h3 { margin-top: 6px; }
.flow p { color: var(--ink-2); }
footer.site { text-align: center; color: var(--ink-3); font-size: .88rem; padding: 30px; border-top: 1px solid var(--line); }
@media (max-width: 900px) { .hero { grid-template-columns: 1fr; } .hero-stage { height: 380px; } .hero-stage .p1 { width: 180px; } .hero-stage .p3 { width: 200px; } .hero-stage .phone { width: 130px; height: 250px; } }

/* dialogs */
dialog { border: 0; border-radius: var(--r-lg); padding: 0; width: min(560px, 94vw); box-shadow: 0 30px 80px -20px rgba(30,42,23,.5); color: var(--ink); }
dialog::backdrop { background: rgba(30,42,23,.5); }
dialog .dlg { padding: 24px; }
dialog .dlg-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.toast-wrap { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 120; display: grid; gap: 8px; width: min(440px, 92vw); }
.toast { background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; font-weight: 500; box-shadow: 0 14px 30px -10px rgba(0,0,0,.4); animation: toastIn .2s ease-out; }
.toast.error { background: var(--danger); }
.toast.success { background: #2d5e47; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } }
.error-page { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 30px; }
.error-page .code { font-family: var(--display); font-size: 5rem; color: var(--sun); line-height: 1; }
.landing-nav { gap: 12px; }
@media (max-width: 480px) { .landing-nav .btn { padding: .6em .9em; font-size: .88rem; min-height: 40px; } .landing-nav .brand { font-size: 1.1rem; } }

.tcard .thumb canvas.live-thumb:not(.ready) { display: none; }
.tcard .thumb canvas.live-thumb, .tcard .thumb .fallback-thumb { max-width: 100%; max-height: 100%; box-shadow: 0 6px 18px -8px rgba(30,42,23,.45); background: #fff; }
.preset-cat { font-family: var(--ui); font-size: .95rem; font-weight: 700; color: var(--ink-2); margin: 18px 0 10px; }
.preset-art { display: grid; place-items: center; height: 160px; background: repeating-conic-gradient(#ecf1e2 0 25%, #f7f9f2 0 50%) 0 0/16px 16px; border-radius: 10px; }
.preset-art canvas { box-shadow: 0 6px 14px -6px rgba(30,42,23,.5); background: #fff; max-height: 150px; }
.presets { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
