:root {
  --bg:      oklch(98% 0.004 240);
  --surface: oklch(100% 0 0);
  --fg:      oklch(20% 0.02 240);
  --muted:   oklch(50% 0.018 240);
  --border:  oklch(90% 0.006 240);
  --accent:  oklch(56% 0.12 170);

  --font-display: 'Fredoka', 'SAhne', 'Avenir Next', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-body:    -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', system-ui, sans-serif;

  --accent-deep: oklch(45% 0.10 170);
  --accent-soft: oklch(94% 0.04 170);
  --accent-ink:  oklch(99% 0.01 170);
  --accent-2:    oklch(82% 0.12 78);
  --accent-2-soft: oklch(95% 0.06 78);
  --love:        oklch(58% 0.20 25);
  --good:        oklch(55% 0.15 155);

  --pen-ink:    #2f2b45;
  --pen-teal:   #12a17c;
  --pen-red:    #e04f3a;
  --pen-blue:   #4c6ede;
  --pen-yellow: #e0b23f;
  --pen-pink:   #ee7d95;

  --r-s: 10px;
  --r-m: 14px;
  --r-l: 20px;
  --shadow-1: 0 1px 2px oklch(20% 0.02 240 / 0.05);
  --shadow-2: 0 10px 30px oklch(20% 0.02 240 / 0.09);
  --shadow-btn: 0 4px 0 var(--accent-deep);
  --wrap: 1120px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.12; }
h1 { font-size: clamp(2.5rem, 6.5vw, 4.1rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.4rem); letter-spacing: -0.015em; }
h3 { font-size: 1.22rem; letter-spacing: -0.01em; }

p { max-width: 62ch; }
a { color: inherit; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }

::selection { background: var(--accent-soft); }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.container { max-width: var(--wrap); margin-inline: auto; padding-inline: 24px; }
.container.narrow { max-width: 660px; }
.container.wide { max-width: 1060px; }
.hidden { display: none !important; }

.fineprint { font-size: 0.82rem; color: var(--muted); letter-spacing: 0.01em; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-display); font-weight: 500;
  font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 7px 14px; border-radius: 999px;
}
.eyebrow-accent { background: var(--accent-soft); color: var(--accent-deep); }
.eyebrow-plain { background: var(--surface); border: 1px solid var(--border); color: var(--muted); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 48px; padding: 10px 22px;
  font-family: var(--font-display); font-weight: 500; font-size: 1.02rem; letter-spacing: 0.01em;
  background: var(--surface); color: var(--fg);
  border: 1.5px solid var(--border); border-radius: var(--r-m);
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.15s, border-color 0.15s;
}
.btn:hover { border-color: var(--fg); }
.btn:active { transform: translateY(2px); }
.btn-primary {
  background: var(--accent); border-color: var(--accent); color: var(--accent-ink);
  box-shadow: var(--shadow-btn);
}
.btn-primary:hover { border-color: var(--accent); background: oklch(from var(--accent) calc(l - 0.05) c h); }
.btn-primary:active { box-shadow: 0 1px 0 var(--accent-deep); }
.btn-ghost { background: transparent; }
.btn-small { min-height: 40px; padding: 6px 16px; font-size: 0.92rem; border-radius: var(--r-s); }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; transform: none; }

.linklike {
  background: none; border: none; cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px;
  color: var(--muted); font-size: 0.88rem;
}
.linklike:hover { color: var(--fg); }

.card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r-l);
  padding: 26px;
  box-shadow: var(--shadow-1);
}

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-display); font-weight: 500; font-size: 0.8rem;
  padding: 5px 12px; border-radius: 999px;
}

.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }

/* topbar */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in oklab, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.topbar.scrolled { border-color: var(--border); }
.topbar-inner {
  max-width: var(--wrap); margin-inline: auto;
  padding: 14px 24px;
  display: flex; align-items: center; gap: 14px;
}
.logo { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; }
.logo-word { font-family: var(--font-display); font-weight: 600; font-size: 1.28rem; letter-spacing: -0.02em; }
.logo-word i { font-style: normal; color: var(--muted); font-weight: 400; }
.topbar-spacer { flex: 1; }
.topbar-links { display: flex; align-items: center; gap: 6px; }
.topbar-links a.tlink {
  text-decoration: none; font-family: var(--font-display); font-weight: 500; font-size: 0.95rem;
  color: var(--muted); padding: 10px 12px; border-radius: var(--r-s);
  min-height: 44px; display: inline-flex; align-items: center;
}
.topbar-links a.tlink:hover { color: var(--fg); background: var(--surface); }
.topbar-links a.tlink.on { color: var(--fg); background: var(--surface); box-shadow: var(--shadow-1); }
.topbar .btn-small { min-height: 44px; }

/* hero */
.hero {
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 40px; align-items: center;
  padding-top: clamp(36px, 7vh, 84px); padding-bottom: 56px;
}
.hero-copy h1 { margin: 20px 0 18px; }
.hl { position: relative; display: inline-block; color: var(--accent-deep); }
.hl svg { position: absolute; left: 0; right: 0; bottom: -12px; width: 100%; height: 14px; }
.hero-sub { font-size: 1.13rem; color: var(--muted); margin-bottom: 26px; }

.claim-bar {
  display: flex; align-items: stretch;
  background: var(--surface); border: 2px solid var(--fg);
  border-radius: var(--r-m); box-shadow: var(--shadow-2);
  padding: 6px; gap: 6px; max-width: 520px;
}
.claim-prefix {
  display: flex; align-items: center; padding-left: 14px;
  font-family: var(--font-display); font-weight: 500; color: var(--muted); font-size: 1.02rem;
}
.claim-input {
  flex: 1; min-width: 60px; border: none; background: transparent; outline: none;
  font-family: var(--font-display); font-weight: 500; font-size: 1.05rem; color: var(--fg);
}
.claim-input::placeholder { color: oklch(72% 0.02 240); font-weight: 400; }
.hero .fineprint { margin-top: 14px; }
.claim-hint {
  margin-top: 10px; min-height: 1.3em;
  font-size: 0.85rem; font-family: var(--font-display);
}
.claim-hint.ok { color: var(--good); }
.claim-hint.no { color: var(--love); }

/* phone mock */
.hero-visual { position: relative; display: flex; justify-content: center; }
.phone {
  width: 302px; background: var(--surface);
  border: 7px solid oklch(24% 0.02 240);
  border-radius: 40px; box-shadow: var(--shadow-2);
  overflow: hidden;
}
.phone-status {
  display: flex; justify-content: space-between; padding: 10px 18px 8px;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.02em; color: var(--muted);
}
.phone-app-head {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 16px 12px; font-family: var(--font-display); font-weight: 600; font-size: 1.05rem;
}
.phone-feed { display: grid; gap: 10px; padding: 4px 14px 22px; min-height: 300px; }
.phone-mail {
  background: var(--bg); border: 1.5px solid var(--border); border-radius: var(--r-m);
  padding: 11px 13px; font-size: 0.86rem;
  animation: mailIn 0.5s cubic-bezier(0.2, 1.2, 0.4, 1) both;
}
.phone-mail .pm-top { display: flex; align-items: center; gap: 6px; margin-bottom: 5px; }
.phone-mail .pm-anon {
  font-family: var(--font-display); font-weight: 500; font-size: 0.7rem;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
}
.phone-mail .pm-time { margin-left: auto; font-size: 0.68rem; color: var(--muted); }
.phone-mail .doodle-frame { border: none; padding: 4px 2px 0; background: transparent; }
.phone-typing {
  display: flex; align-items: center; gap: 8px; padding: 10px 14px;
  background: var(--bg); border: 1.5px dashed var(--border); border-radius: var(--r-m);
  font-size: 0.8rem; color: var(--muted);
  animation: mailIn 0.5s 0.6s cubic-bezier(0.2, 1.2, 0.4, 1) both;
}
.typing-dots { display: inline-flex; gap: 3px; }
.typing-dots i {
  width: 5px; height: 5px; border-radius: 50%; background: var(--muted);
  animation: bounceDot 1.2s infinite;
}
.typing-dots i:nth-child(2) { animation-delay: 0.15s; }
.typing-dots i:nth-child(3) { animation-delay: 0.3s; }

.sticker {
  position: absolute; z-index: 2;
  font-family: var(--font-display); font-weight: 500; font-size: 0.85rem;
  background: var(--accent-2); color: var(--fg);
  padding: 9px 15px; border-radius: 999px; box-shadow: var(--shadow-2);
  animation: floaty 5s ease-in-out infinite;
}
.sticker-a { top: 8%; left: -4%; rotate: -7deg; }
.sticker-b { bottom: 14%; right: -3%; rotate: 5deg; background: var(--surface); border: 1.5px solid var(--fg); animation-delay: -2.4s; }
.spark { position: absolute; top: -18px; right: 12%; color: var(--accent); animation: floaty 6s -1s ease-in-out infinite; }

/* marquee */
.marquee { overflow: hidden; padding: 34px 0 42px; }
.marquee-track { display: flex; gap: 18px; width: max-content; animation: slide 46s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.note-card {
  flex: none; max-width: 300px;
  background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--r-m);
  padding: 15px 19px; font-family: var(--font-display); font-weight: 500; font-size: 0.98rem;
  box-shadow: var(--shadow-1);
}
.note-card small { display: block; margin-top: 7px; font-family: var(--font-body); font-weight: 400; font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.note-card.tilt-l { rotate: -1.6deg; }
.note-card.tilt-r { rotate: 1.2deg; }
.note-card.sun { background: var(--accent-2-soft); border-color: color-mix(in oklab, var(--accent-2) 60%, var(--border)); }
.note-card.mint { background: var(--accent-soft); border-color: color-mix(in oklab, var(--accent) 35%, var(--border)); }

/* how it works */
.how { padding: 70px 24px 30px; }
.how h2 { margin-bottom: 34px; }
.steps { list-style: none; display: grid; gap: 18px; }
.step {
  display: grid; grid-template-columns: 96px 1fr; gap: 22px; align-items: start;
  background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--r-l);
  padding: 26px 30px; box-shadow: var(--shadow-1); max-width: 760px;
}
.step:nth-child(2) { margin-left: clamp(0px, 6vw, 90px); }
.step:nth-child(3) { margin-left: clamp(0px, 12vw, 180px); }
.step-num {
  font-family: var(--font-display); font-weight: 600; font-size: 3rem; line-height: 1;
  color: transparent; -webkit-text-stroke: 2px var(--accent);
}
.step h3 { margin-bottom: 6px; }
.step p { color: var(--muted); font-size: 0.98rem; }

/* live demo */
.demo { padding: 64px 24px 20px; }
.demo > h2, .demo > .sub { text-align: center; margin-inline: auto; }
.demo .sub { color: var(--muted); margin-top: 10px; margin-bottom: 30px; }
.demo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; max-width: 900px; margin-inline: auto; }
.demo-card { position: relative; display: grid; gap: 12px; align-content: start; }
.widget-head h3 { font-size: 1.15rem; }
.widget-head p { color: var(--muted); font-size: 0.88rem; margin-top: 3px; }

textarea.msg-input {
  width: 100%; min-height: 110px; resize: vertical;
  border: 1.5px solid var(--border); border-radius: var(--r-m);
  padding: 13px 15px; font: inherit; font-size: 0.98rem; color: var(--fg);
  background: var(--bg); outline: none; transition: border-color 0.15s;
}
textarea.msg-input:focus { border-color: var(--accent); background: var(--surface); }
.widget-foot { display: flex; align-items: center; gap: 10px; }
.counter { margin-left: auto; font-size: 0.8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.widget-foot .counter { margin-left: 0; }
.widget-foot .btn { margin-left: auto; }

/* sketchpad */
.sketchpad-shell { display: grid; gap: 11px; }
.pad-frame {
  border: 1.5px solid var(--border); border-radius: var(--r-m); overflow: hidden;
  background: oklch(99.5% 0 0);
  background-image: radial-gradient(var(--border) 1px, transparent 1px);
  background-size: 16px 16px;
}
.pad-frame canvas { display: block; width: 100%; aspect-ratio: 4 / 3; touch-action: none; cursor: crosshair; }
.pad-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.swatch {
  width: 42px; height: 42px; border: none; border-radius: 50%; background: transparent;
  display: grid; place-items: center; cursor: pointer; padding: 0;
  transition: transform 0.1s;
}
.swatch i { width: 24px; height: 24px; border-radius: 50%; background: var(--sw, var(--pen-ink)); border: 1px solid oklch(20% 0.02 240 / 0.15); }
.swatch:hover { transform: scale(1.08); }
.swatch.on { outline: 2.5px solid var(--fg); outline-offset: -4px; }
.tool-sep { width: 1px; height: 26px; background: var(--border); margin-inline: 4px; }
.tool-btn {
  min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1.5px solid var(--border); background: var(--surface); border-radius: var(--r-s);
  cursor: pointer; color: var(--muted); padding: 0 10px; font-size: 0.82rem; font-family: var(--font-display); font-weight: 500;
}
.tool-btn:hover { color: var(--fg); border-color: var(--fg); }
.tool-btn.on { background: var(--fg); border-color: var(--fg); color: var(--bg); }

/* stamp */
.stamp {
  position: absolute; top: 16px; right: 16px; z-index: 5;
  font-family: var(--font-display); font-weight: 600; font-size: 0.95rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--good); border: 3px solid var(--good); border-radius: 8px;
  padding: 5px 13px; background: color-mix(in oklab, var(--good) 8%, transparent);
  rotate: -8deg; opacity: 0; pointer-events: none;
}
.stamp.show { animation: stampIn 0.5s cubic-bezier(0.2, 1.5, 0.4, 1) forwards; }
@keyframes stampIn {
  0% { opacity: 0; transform: scale(2.6); }
  60% { opacity: 1; transform: scale(0.94); }
  100% { opacity: 1; transform: scale(1); }
}

/* confetti */
.confetti-bit { position: fixed; z-index: 90; width: 9px; height: 9px; border-radius: 2px; pointer-events: none; }

/* cta band */
.cta-band { background: var(--fg); color: var(--bg); border-radius: var(--r-l); margin: 70px 24px 30px; }
.cta-band .inner { padding: clamp(38px, 6vw, 70px) clamp(24px, 5vw, 60px); text-align: center; display: grid; gap: 20px; justify-items: center; }
.cta-band h2 { color: inherit; max-width: 22ch; }
.cta-band .claim-bar { border-color: var(--bg); background: var(--bg); }
.cta-band .claim-bar .btn-primary { border-color: var(--accent); }
.cta-band .fineprint { color: oklch(75% 0.01 240); }

/* footer */
.site-footer { border-top: 1px solid var(--border); margin-top: 40px; }
.site-footer .inner {
  max-width: var(--wrap); margin-inline: auto; padding: 30px 24px 44px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 18px;
}
.foot-links { display: flex; flex-wrap: wrap; gap: 4px; }
.foot-links a {
  text-decoration: none; color: var(--muted); font-size: 0.88rem; padding: 8px 10px; border-radius: 8px;
  min-height: 44px; display: inline-flex; align-items: center;
}
.foot-links a:hover { color: var(--fg); background: var(--surface); }
.foot-note { margin-left: auto; font-size: 0.82rem; color: var(--muted); }

/* reveal */
[data-reveal] { opacity: 0; translate: 0 18px; transition: opacity 0.6s ease, translate 0.6s ease; }
[data-reveal].in { opacity: 1; translate: 0 0; }

/* ---- app chrome (auth / customize / inbox) ---- */
.app-body { background: var(--bg); }
.page-head { padding: 34px 0 22px; display: grid; gap: 8px; justify-content: start; }
.page-head h1 { font-size: clamp(2rem, 5vw, 2.9rem); }
.page-head p { color: var(--muted); }

.pill {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-display); font-weight: 500; font-size: 0.88rem;
  background: var(--surface); border: 1.5px solid var(--border); border-radius: 999px;
  padding: 8px 15px; cursor: pointer; transition: border-color 0.15s;
  min-height: 40px;
}
.pill:hover { border-color: var(--fg); }
.pill b { font-weight: 600; }

.avatar { width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--surface); box-shadow: var(--shadow-1); background: var(--bg); }
.avatar.big { width: 84px; height: 84px; border-radius: 50%; border: 3px solid var(--surface); box-shadow: var(--shadow-2); }

.bottomnav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 45;
  display: grid; grid-template-columns: repeat(3, 1fr);

  background: color-mix(in oklab, var(--surface) 92%, transparent);
  backdrop-filter: blur(12px);
  border-top: 1.5px solid var(--border);
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
}
.nav-item {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 7px 4px 5px; min-height: 52px; text-decoration: none;
  font-family: var(--font-display); font-weight: 500; font-size: 0.74rem; color: var(--muted);
  border-radius: var(--r-s);
}
.nav-item svg { transition: transform 0.15s; }
.nav-item.on { color: var(--fg); }
.nav-item.on svg { transform: translateY(-2px) scale(1.08); }
.bottomnav.has-admin { grid-template-columns: repeat(5, 1fr); }
.app-main { padding-bottom: 110px; }

/* auth */
.auth-body { min-height: 100dvh; display: grid; place-items: center; padding: 28px 20px 60px; position: relative; overflow-x: hidden; }
.auth-back { position: fixed; top: 18px; left: 20px; text-decoration: none; font-family: var(--font-display); font-weight: 500; color: var(--muted); padding: 10px 12px; border-radius: var(--r-s); z-index: 3; }
.auth-back:hover { color: var(--fg); background: var(--surface); }
.auth-card { width: min(460px, 100%); display: grid; gap: 16px; padding: 34px 30px; position: relative; z-index: 2; }
.auth-step { display: grid; gap: 14px; justify-items: center; text-align: center; }
.auth-step h1 { font-size: 1.9rem; letter-spacing: -0.015em; }
.auth-step > p { color: var(--muted); font-size: 0.98rem; }
.auth-avatar { width: 92px; height: 92px; border-radius: 50%; border: 4px solid var(--surface); box-shadow: var(--shadow-2); background: var(--bg); animation: popIn 0.5s cubic-bezier(0.2, 1.4, 0.4, 1); }
.invite-allowance { font-family: var(--font-display); font-weight: 600; color: var(--accent-deep); margin: -4px 0 10px; }
.invite-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  padding: 9px 12px; border: 2px solid var(--border); border-radius: 12px; background: var(--bg); margin-bottom: 8px;
}
.invite-row.spent { opacity: 0.62; }
.invite-row code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0.09em; font-size: 0.95rem; }
.invite-acts { display: flex; gap: 6px; flex-wrap: wrap; }
.invite-used { font-size: 0.85rem; color: var(--muted); }
.invite-note {
  width: 100%; padding: 10px 14px; border-radius: 14px; font-size: 0.92rem;
  border: 2px solid var(--border); background: var(--bg); font-weight: 500;
}
.invite-note.good { border-color: var(--good); color: var(--good); }
.invite-note.bad { border-color: var(--love); color: var(--love); }
.invite-gate {
  width: 100%; display: grid; gap: 8px; justify-items: center; text-align: center;
  padding: 14px; border-radius: 16px; border: 2px dashed var(--border); background: var(--bg);
}
.invite-gate b { font-family: var(--font-display); font-size: 1.02rem; }
.code-row { display: flex; gap: 8px; width: 100%; margin-top: 4px; }
.code-row input {
  flex: 1; min-width: 0; border: 2px solid var(--border); border-radius: 12px;
  padding: 9px 12px; font: inherit; background: var(--surface); color: var(--fg);
  letter-spacing: 0.08em; text-transform: uppercase;
}
.code-row input:focus { outline: none; border-color: var(--fg); }
.dev-auth { width: 100%; display: grid; gap: 6px; justify-items: center; border-top: 1px dashed var(--border); padding-top: 12px; }
.dev-auth .code-row input { text-transform: none; letter-spacing: 0; }
.oauth { width: 100%; border-width: 2px; border-color: var(--fg); box-shadow: var(--shadow-1); background: var(--surface); }
.oauth:hover { background: var(--bg); transform: translateY(-1px); }
.oauth:active { transform: translateY(1px); }
.oauth svg { flex: none; }
.input-group {
  display: flex; align-items: stretch; gap: 4px; width: 100%;
  background: var(--bg); border: 2px solid var(--border); border-radius: var(--r-m);
  padding: 5px; transition: border-color 0.15s;
}
.input-group:focus-within { border-color: var(--fg); }
.input-group.ok { border-color: var(--good); }
.input-group.no { border-color: var(--love); }
.input-group > span { display: flex; align-items: center; padding-left: 12px; font-family: var(--font-display); font-weight: 500; color: var(--muted); }
.input-group input {
  flex: 1; min-width: 0; border: none; background: transparent; outline: none;
  font-family: var(--font-display); font-weight: 500; font-size: 1.05rem; padding: 9px 8px;
}
.check { font-size: 0.86rem; color: var(--muted); min-height: 1.4em; font-family: var(--font-display); }
.check.ok { color: var(--good); }
.check.no { color: var(--love); }
.signedin { font-size: 0.82rem; color: var(--muted); letter-spacing: 0.01em; }
.bg-doodle { position: absolute; color: var(--border); z-index: 1; opacity: 0.9; animation: floaty 7s ease-in-out infinite; }

/* customize */
.customize-grid { display: grid; grid-template-columns: 1fr 340px; gap: 26px; align-items: start; }
.customize-controls { display: grid; gap: 18px; }
.ctl-card h2 { font-size: 1.25rem; margin-bottom: 4px; }
.ctl-card .card-sub { color: var(--muted); font-size: 0.88rem; margin-bottom: 18px; }

.face-row { display: flex; gap: 18px; align-items: flex-start; }
.face-fields { flex: 1; display: grid; gap: 10px; }
.field label { display: block; font-family: var(--font-display); font-weight: 500; font-size: 0.86rem; margin-bottom: 6px; letter-spacing: 0.02em; }
.field input[type="email"], .field input[type="text"] {
  width: 100%; min-height: 48px; border: 1.5px solid var(--border); border-radius: var(--r-m);
  padding: 10px 14px; font: inherit; background: var(--bg); color: var(--fg); outline: none;
  transition: border-color 0.15s;
}
.field input:focus { border-color: var(--accent); background: var(--surface); }
.chips-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.style-chip {
  border: 1.5px solid var(--border); background: var(--surface); border-radius: 999px;
  padding: 8px 14px; min-height: 40px; cursor: pointer;
  font-family: var(--font-display); font-weight: 500; font-size: 0.84rem; color: var(--muted);
}
.style-chip:hover { border-color: var(--fg); color: var(--fg); }
.style-chip.on { border-color: var(--fg); background: var(--fg); color: var(--bg); }

.row-toggle {
  display: flex; align-items: center; gap: 15px;
  padding: 16px 4px; border-top: 1px solid var(--border);
}
.row-toggle:first-of-type { border-top: none; padding-top: 6px; }
.toggle-icon { flex: none; width: 46px; height: 46px; border-radius: var(--r-m); display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-deep); }
.toggle-icon.alt { background: var(--accent-2-soft); color: var(--fg); }
.toggle-copy { flex: 1; min-width: 0; }
.toggle-copy b { font-family: var(--font-display); font-weight: 600; font-size: 1rem; display: block; }
.toggle-copy span { font-size: 0.84rem; color: var(--muted); }
.switch { position: relative; flex: none; width: 54px; height: 32px; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; cursor: pointer; margin: 0; }
.switch i {
  position: absolute; inset: 0; border-radius: 999px; background: var(--border);
  transition: background 0.2s; pointer-events: none;
}
.switch i::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px;
  border-radius: 50%; background: var(--surface); box-shadow: var(--shadow-1);
  transition: left 0.2s cubic-bezier(0.2, 1.2, 0.4, 1);
}
.switch input:checked + i { background: var(--accent); }
.switch input:checked + i::after { left: 25px; }
.switch input:focus-visible + i { outline: 3px solid var(--accent); outline-offset: 2px; }

.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; }
.theme-card {
  display: grid; gap: 7px; justify-items: center; cursor: pointer;
  border: 1.5px solid var(--border); background: var(--surface); padding: 12px 8px 10px; border-radius: var(--r-m);
  transition: border-color 0.15s, transform 0.12s;
}
.theme-card:hover { border-color: var(--fg); transform: translateY(-1px); }
.theme-card i { width: 56px; height: 56px; border-radius: var(--r-s); border: 1px solid color-mix(in oklab, var(--fg) 10%, transparent); box-shadow: var(--shadow-1); display: block; }
.theme-card span { font-family: var(--font-display); font-weight: 500; font-size: 0.8rem; color: var(--muted); }
.theme-card em {
  font-style: normal; font-family: var(--font-display); font-weight: 500;
  font-size: 0.6rem; letter-spacing: 0.07em; text-transform: uppercase;
  background: var(--bg); border: 1px solid var(--border); color: var(--muted);
  padding: 1px 7px; border-radius: 999px;
}
.theme-card.on { border-color: var(--fg); box-shadow: var(--shadow-1); }
.theme-card.on span { color: var(--fg); }

.accent-block { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border); }
.accent-block b { font-family: var(--font-display); font-weight: 600; font-size: 0.98rem; }
.accent-block .card-sub { margin-top: 2px; }
.accent-dots { display: flex; flex-wrap: wrap; gap: 11px; margin-top: 12px; }
.accent-dot {
  width: 44px; height: 44px; border-radius: 50%; cursor: pointer;
  border: 1.5px solid var(--border); padding: 0; background: none;
  transition: transform 0.12s, border-color 0.15s;
}
.accent-dot:hover { transform: scale(1.08); border-color: var(--fg); }
.accent-dot.on { border-color: var(--fg); box-shadow: 0 0 0 2.5px var(--bg), 0 0 0 4.5px var(--fg); }

.preview-col { position: sticky; top: 86px; display: grid; gap: 10px; justify-items: center; }
.preview-label { font-size: 0.8rem; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; font-family: var(--font-display); font-weight: 500; }
.phone-preview { width: 100%; max-width: 300px; }
.phone-preview .pv-screen {
  height: 560px; overflow-y: auto; overscroll-behavior: contain;
  scrollbar-width: thin; scrollbar-color: var(--border) transparent;
}
.phone-preview .pv-screen::-webkit-scrollbar { width: 6px; }
.phone-preview .pv-screen::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
.preview-col { position: sticky; top: 88px; align-self: start; }
.pv-screen { padding-bottom: 26px; }
.pv-band { height: 74px; background: var(--pv-band, var(--accent-soft)); }
.pv-head { display: grid; justify-items: center; gap: 7px; padding: 0 18px; margin-top: -34px; }
.pv-head .avatar.big { width: 68px; height: 68px; }
.pv-name { font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; }
.pv-bio { font-size: 0.8rem; color: var(--muted); text-align: center; min-height: 1.2em; }
.pv-widgets { display: grid; gap: 10px; padding: 14px 16px 0; }
.pv-widget { border: 1.5px solid var(--border); border-radius: var(--r-m); padding: 11px 13px; font-size: 0.8rem; background: var(--surface); }
.pv-widget b { font-family: var(--font-display); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.pv-widget.off { opacity: 0.35; filter: grayscale(1); }
.pv-widget .pv-lines { margin-top: 8px; display: grid; gap: 5px; }
.pv-widget .pv-lines i { height: 7px; border-radius: 4px; background: var(--bg); border: 1px solid var(--border); display: block; }
.pv-widget .pv-lines i:last-child { width: 60%; }
.pv-pad { margin-top: 8px; height: 64px; border: 1.5px dashed var(--border); border-radius: 8px; display: grid; place-items: center; color: var(--muted); font-size: 0.85rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

/* public site */
.site-body { background: var(--site-bg, var(--bg)); min-height: 100dvh; }
.site-body[data-theme="cloud"] { --site-bg: oklch(97.6% 0.007 170); --site-surface: oklch(99.8% 0.002 170); --site-fg: oklch(21% 0.02 240); --site-muted: oklch(50% 0.018 240); --site-border: oklch(90% 0.008 200); --site-band: oklch(92% 0.06 170); }
.site-body[data-theme="mint"] { --site-bg: oklch(97% 0.04 165); --site-surface: oklch(99.7% 0.01 165); --site-fg: oklch(25% 0.04 170); --site-muted: oklch(50% 0.04 170); --site-border: oklch(90% 0.05 165); --site-band: oklch(90% 0.1 165); }
.site-body[data-theme="peach"] { --site-bg: oklch(97.2% 0.024 75); --site-surface: oklch(99.6% 0.008 75); --site-fg: oklch(28% 0.05 55); --site-muted: oklch(52% 0.05 55); --site-border: oklch(90% 0.035 75); --site-band: oklch(91% 0.09 75); }
.site-body[data-theme="bubblegum"] { --site-bg: oklch(97% 0.028 350); --site-surface: oklch(99.7% 0.007 350); --site-fg: oklch(28% 0.06 340); --site-muted: oklch(52% 0.05 340); --site-border: oklch(90% 0.04 350); --site-band: oklch(91% 0.08 350); }
.site-body[data-theme="grape"] { --site-bg: oklch(96.8% 0.028 305); --site-surface: oklch(99.6% 0.007 305); --site-fg: oklch(30% 0.06 305); --site-muted: oklch(53% 0.05 305); --site-border: oklch(89% 0.04 305); --site-band: oklch(90% 0.09 305); }
.site-body[data-theme="soda"] { --site-bg: oklch(97% 0.05 115); --site-surface: oklch(99.6% 0.015 115); --site-fg: oklch(27% 0.06 135); --site-muted: oklch(50% 0.06 135); --site-border: oklch(89% 0.06 118); --site-band: oklch(91% 0.11 112); }
.site-body[data-theme="sunset"] { --site-bg: oklch(96% 0.05 55); --site-surface: oklch(99.4% 0.012 60); --site-fg: oklch(30% 0.08 30); --site-muted: oklch(51% 0.07 35); --site-border: oklch(88% 0.06 50); --site-band: oklch(78% 0.14 40); background-image: linear-gradient(170deg, oklch(94% 0.07 70), oklch(93% 0.09 35) 45%, oklch(96% 0.05 55)); }
.site-body[data-theme="ocean"] { --site-bg: oklch(96.5% 0.03 225); --site-surface: oklch(99.5% 0.006 225); --site-fg: oklch(26% 0.05 230); --site-muted: oklch(50% 0.04 225); --site-border: oklch(89% 0.04 225); --site-band: oklch(62% 0.13 225); background-image: linear-gradient(170deg, oklch(95% 0.06 225), oklch(94% 0.06 200) 50%, oklch(96.5% 0.03 225)); }
.site-body[data-theme="ink"] { --site-bg: oklch(21% 0.02 260); --site-surface: oklch(27% 0.02 260); --site-fg: oklch(95% 0.005 240); --site-muted: oklch(72% 0.01 240); --site-border: oklch(36% 0.02 260); --site-band: oklch(32% 0.06 170); }
.site-body[data-theme="midnight"] { --site-bg: oklch(21% 0.04 280); --site-surface: oklch(28% 0.03 275); --site-fg: oklch(94% 0.005 240); --site-muted: oklch(72% 0.012 260); --site-border: oklch(38% 0.03 270); --site-band: oklch(40% 0.12 280); background-image: linear-gradient(170deg, oklch(25% 0.05 260), oklch(21% 0.05 290) 55%, oklch(21% 0.04 280)); }
.site-body[data-theme="sunset"] .site-band,
.site-body[data-theme="ocean"] .site-band,
.site-body[data-theme="midnight"] .site-band {
  background-image:
    radial-gradient(color-mix(in oklab, var(--site-fg) 7%, transparent) 1.5px, transparent 1.5px),
    linear-gradient(120deg, var(--band-a), var(--band-b) 50%, var(--band-c));
  background-size: 22px 22px, 200% 100%;
}
.site-body[data-theme="sunset"] .site-band { --band-a: oklch(82% 0.13 55); --band-b: oklch(70% 0.19 25); --band-c: oklch(62% 0.21 350); }
.site-body[data-theme="ocean"] .site-band { --band-a: oklch(62% 0.14 230); --band-b: oklch(60% 0.11 200); --band-c: oklch(58% 0.12 170); }
.site-body[data-theme="midnight"] .site-band { --band-a: oklch(48% 0.13 265); --band-b: oklch(40% 0.13 300); --band-c: oklch(34% 0.10 250); }
.site-col { max-width: 540px; margin-inline: auto; padding: 0 18px 90px; }
.site-band {
  height: 168px; margin-inline: -18px; position: relative;
  background: var(--site-band, var(--accent-soft));
  background-image: radial-gradient(color-mix(in oklab, var(--site-fg, var(--fg)) 7%, transparent) 1.5px, transparent 1.5px);
  background-size: 22px 22px;
  border-bottom: 1.5px solid var(--site-border, var(--border));
  overflow: hidden;
}
.site-band svg { position: absolute; opacity: 0.5; color: var(--site-fg, var(--fg)); }
.site-head { text-align: center; margin-top: -46px; position: relative; }
.site-head .avatar.big { margin-inline: auto; width: 92px; height: 92px; border-color: var(--site-surface, var(--surface)); }
.site-name { font-size: 1.75rem; margin-top: 12px; color: var(--site-fg, var(--fg)); }
.site-bio { color: var(--site-muted, var(--muted)); margin: 6px auto 14px; font-size: 0.95rem; }
.site-meta { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; align-items: center; }
.site-count { margin-top: 14px; font-size: 0.82rem; color: var(--site-muted, var(--muted)); letter-spacing: 0.06em; text-transform: uppercase; font-family: var(--font-display); font-weight: 500; }
.site-body .card { background: var(--site-surface, var(--surface)); border-color: var(--site-border, var(--border)); color: var(--site-fg, var(--fg)); }
.site-widgets { display: grid; gap: 18px; margin-top: 26px; }
.widget { position: relative; }
.widget .msg-input { background: color-mix(in oklab, var(--site-bg, var(--bg)) 65%, var(--site-surface, var(--surface))); border-color: var(--site-border, var(--border)); color: var(--site-fg, var(--fg)); }
.widget .msg-input:focus { border-color: var(--accent); background: var(--site-surface, var(--surface)); }
.widget .pad-frame { border-color: var(--site-border, var(--border)); }
.widget-head-row { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.widget-badge { flex: none; width: 42px; height: 42px; border-radius: var(--r-m); display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-deep); }
.site-body:is([data-theme="ink"], [data-theme="midnight"]) .widget-badge {
  background: color-mix(in oklab, var(--accent) 26%, transparent);
  color: color-mix(in oklab, var(--accent) 45%, white);
}
.widget .counter { color: var(--site-muted, var(--muted)); }
.anon-note { display: flex; align-items: center; gap: 7px; font-size: 0.78rem; color: var(--site-muted, var(--muted)); }
.anon-note svg { flex: none; }
.site-foot {
  margin-top: 34px; text-align: center; font-size: 0.9rem; color: var(--site-muted, var(--muted));
}
.site-foot a { color: var(--site-fg, var(--fg)); font-family: var(--font-display); font-weight: 500; }
.peek {
  position: fixed; bottom: 18px; right: 18px; z-index: 50;
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--fg); color: var(--bg); text-decoration: none;
  font-family: var(--font-display); font-weight: 500; font-size: 0.85rem;
  padding: 11px 18px; border-radius: 999px; box-shadow: var(--shadow-2);
  transition: transform 0.12s;
}
.peek:hover { transform: translateY(-2px); }
.widget-off-note { text-align: center; color: var(--site-muted, var(--muted)); display: grid; gap: 10px; justify-items: center; padding: 34px 24px; }

/* inbox */
.tabs { display: inline-flex; gap: 4px; background: var(--surface); border: 1.5px solid var(--border); border-radius: 999px; padding: 5px; margin-bottom: 22px; max-width: 100%; overflow-x: auto; }
.tab-btn {
  border: none; background: transparent; border-radius: 999px; cursor: pointer;
  font-family: var(--font-display); font-weight: 500; font-size: 0.92rem; color: var(--muted);
  padding: 9px 17px; min-height: 44px; display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
}
.tab-btn b { font-weight: 600; font-size: 0.78rem; background: var(--bg); border-radius: 999px; padding: 1px 8px; }
.tab-btn.on { background: var(--fg); color: var(--bg); }
.tab-btn.on b { background: color-mix(in oklab, var(--bg) 22%, transparent); }

.mail-list { display: grid; gap: 14px; }
.mail-card {
  background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--r-l);
  padding: 20px 22px; box-shadow: var(--shadow-1); position: relative;
  animation: mailIn 0.4s cubic-bezier(0.2, 1.1, 0.4, 1) both;
}
.mail-card.unread { border-color: color-mix(in oklab, var(--accent) 45%, var(--border)); }
.mail-top { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.mail-kind { font-family: var(--font-display); font-weight: 500; font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.new-chip { font-family: var(--font-display); font-weight: 600; font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; background: var(--accent-soft); color: var(--accent-deep); padding: 3px 9px; border-radius: 999px; }
.mail-time { margin-left: auto; font-size: 0.8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.mail-text { font-size: 1.12rem; font-family: var(--font-display); font-weight: 400; line-height: 1.4; overflow-wrap: anywhere; }
.mail-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.icon-btn {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  border: 1.5px solid var(--border); background: var(--surface); color: var(--muted);
  border-radius: var(--r-s); padding: 8px 12px; min-height: 40px;
  font-family: var(--font-display); font-weight: 500; font-size: 0.8rem;
  transition: color 0.15s, border-color 0.15s;
}
.icon-btn:hover { color: var(--fg); border-color: var(--fg); }
.icon-btn.danger:hover { color: var(--love); border-color: var(--love); }
.drawing-frame {
  background: oklch(99.5% 0 0); border: 1.5px solid var(--border); border-radius: var(--r-m);
  padding: 12px; display: grid; place-items: center;
}
.drawing-frame img { max-height: 300px; width: 100%; object-fit: contain; }
.drawing-frame svg { width: min(320px, 100%); }

.empty-state { text-align: center; display: grid; gap: 12px; justify-items: center; padding: 50px 20px; color: var(--muted); }
.empty-state h3 { color: var(--fg); }
.empty-state .pill { cursor: pointer; }

/* toast */
#toast-host { position: fixed; bottom: 24px; left: 50%; translate: -50% 0; z-index: 100; display: grid; gap: 8px; justify-items: center; pointer-events: none; }
.toast {
  background: var(--fg); color: var(--bg); padding: 12px 22px; border-radius: 999px;
  font-family: var(--font-display); font-weight: 500; font-size: 0.94rem;
  box-shadow: var(--shadow-2); opacity: 0; translate: 0 12px;
  transition: opacity 0.25s, translate 0.25s cubic-bezier(0.2, 1.2, 0.4, 1);
  max-width: min(90vw, 480px); text-align: center;
}
.toast.show { opacity: 1; translate: 0 0; }

/* launcher */
.flow { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 8px 0 30px; }
.flow li { display: flex; align-items: center; gap: 10px; }
.flow .node {
  font-family: var(--font-display); font-weight: 500; font-size: 0.9rem;
  background: var(--surface); border: 1.5px solid var(--border); border-radius: 999px;
  padding: 9px 16px; box-shadow: var(--shadow-1);
}
.flow .arrow { color: var(--muted); font-family: var(--font-display); }
.screen-list { display: grid; gap: 14px; }
.screen-card {
  display: flex; align-items: center; gap: 20px; text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.screen-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); border-color: var(--fg); }
.screen-num { font-family: var(--font-display); font-weight: 600; font-size: 1.6rem; color: transparent; -webkit-text-stroke: 1.6px var(--accent); flex: none; }
.screen-card h2 { font-size: 1.15rem; margin-bottom: 3px; }
.screen-card p { color: var(--muted); font-size: 0.9rem; }
.screen-try { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; list-style: none; }
.screen-try li { font-size: 0.76rem; background: var(--bg); border: 1px solid var(--border); border-radius: 999px; padding: 3px 10px; color: var(--muted); }
.screen-go { margin-left: auto; font-family: var(--font-display); font-size: 1.3rem; color: var(--muted); transition: translate 0.15s, color 0.15s; flex: none; }
.screen-card:hover .screen-go { translate: 4px 0; color: var(--fg); }

@keyframes mailIn { from { opacity: 0; transform: translateY(12px) scale(0.97); } to { opacity: 1; transform: none; } }
@keyframes popIn { from { opacity: 0; transform: scale(0.6); } to { opacity: 1; transform: scale(1); } }
@keyframes bounceDot { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(-4px); } }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
@keyframes slide { to { transform: translateX(-50%); } }
@keyframes drawIn {
  0% { stroke-dashoffset: 1; opacity: 1; }
  42% { stroke-dashoffset: 0; }
  86% { stroke-dashoffset: 0; opacity: 1; }
  96% { opacity: 0; }
  100% { stroke-dashoffset: 1; opacity: 0; }
}
.autodraw path, .autodraw circle { stroke-dasharray: 1; stroke-dashoffset: 1; animation: drawIn 6.5s ease-in-out infinite; }
.autodraw :nth-child(2) { animation-delay: 0.35s; }
.autodraw :nth-child(3) { animation-delay: 0.7s; }
.autodraw :nth-child(4) { animation-delay: 1.05s; }
.autodraw :nth-child(5) { animation-delay: 1.4s; }
.autodraw :nth-child(6) { animation-delay: 1.7s; }
.autodraw :nth-child(7) { animation-delay: 2s; }
.autodraw :nth-child(8) { animation-delay: 2.3s; }

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; gap: 56px; padding-top: 30px; }
  .hero-visual { margin-top: 6px; }
  .customize-grid { grid-template-columns: 1fr; }
  .preview-col { position: static; }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .desktop-only { display: none !important; }
  .step { grid-template-columns: 1fr; gap: 10px; padding: 22px; }
  .step:nth-child(2), .step:nth-child(3) { margin-left: 0; }
  .step-num { font-size: 2.3rem; }
  .demo-grid { grid-template-columns: 1fr; }
  .claim-bar { flex-wrap: wrap; }
  .claim-bar .btn { width: 100%; }
  .claim-prefix { padding: 8px 4px 0 10px; }
  .cta-band { margin: 50px 12px 20px; }
  .sticker { display: none; }
  .face-row { flex-direction: column; }
  .topbar-links a.tlink { display: none; }
  .topbar-inner { flex-wrap: wrap; row-gap: 8px; padding-inline: 16px; }
  .topbar-links { flex-wrap: wrap; justify-content: flex-end; }
  .topbar-links .btn-small { padding: 6px 13px; }
}
@media (min-width: 721px) {
  .mobile-only { display: none !important; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  [data-reveal] { opacity: 1; translate: 0 0; }
}

/* delivery stats */
.stats-card { display: flex; justify-content: space-between; align-items: center; gap: 22px; flex-wrap: wrap; }
.stats-left { display: flex; align-items: center; gap: 24px; min-width: 0; flex-wrap: wrap; }
.stats-big { display: flex; align-items: center; gap: 10px; }
.stats-big b { font-family: var(--font-display); font-weight: 600; font-size: 2.9rem; line-height: 1; color: var(--accent-deep); }
.stats-big span { font-size: 0.72rem; color: var(--muted); line-height: 1.3; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 500; }
.stats-facts { display: grid; gap: 4px; font-size: 0.88rem; color: var(--muted); }
.stats-facts b { color: var(--fg); font-weight: 600; }
.stats-right { display: grid; gap: 5px; }
.stats-bars { display: flex; align-items: flex-end; gap: 6px; height: 72px; width: 172px; }
.stats-bars i { flex: 1; background: var(--accent-soft); border-radius: 5px 5px 2px 2px; min-height: 6px; }
.stats-bars i.today { background: var(--accent); }
.stats-axis { display: flex; justify-content: space-between; width: 172px; font-size: 0.64rem; color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; font-family: var(--font-display); }

/* chips + held state */
.meta-chip { font-family: var(--font-display); font-weight: 600; font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; }
.meta-chip.wall { background: var(--accent-soft); color: var(--accent-deep); }
.meta-chip.held { background: oklch(95% 0.06 85); color: oklch(42% 0.12 70); border: 1.5px solid oklch(87% 0.09 85); }
.mail-card.held { border-color: oklch(86% 0.09 85); background: oklch(99% 0.014 85); }
.held-banner { margin-top: 12px; padding: 12px 14px; border-radius: var(--r-m); background: oklch(96.5% 0.045 85); border: 1.5px dashed oklch(84% 0.09 80); color: oklch(38% 0.09 60); font-size: 0.88rem; display: grid; gap: 10px; }
.held-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* reply on the wall */
.wall-q { color: var(--site-muted, var(--muted)); font-size: 0.86rem; border-left: 3px solid var(--accent); padding-left: 10px; margin: 0; }
.wall-a { font-size: 1.04rem; font-weight: 500; color: var(--site-fg, var(--fg)); margin: 0; }
.wall-list { display: grid; gap: 14px; margin-top: 16px; }
.wall-card { border: 1.5px solid var(--site-border, var(--border)); border-radius: var(--r-m); padding: 15px 17px; display: grid; gap: 9px; background: var(--site-surface, var(--surface)); transform: rotate(-0.6deg); }
.wall-card:nth-child(even) { transform: rotate(0.55deg); }
.wall-meta { font-size: 0.66rem; color: var(--site-muted, var(--muted)); letter-spacing: 0.09em; text-transform: uppercase; font-family: var(--font-display); }
.wall-empty { margin-top: 16px; color: var(--site-muted, var(--muted)); text-align: center; padding: 28px 16px; border: 1.5px dashed var(--site-border, var(--border)); border-radius: var(--r-m); font-size: 0.92rem; }
.reply-block { margin-top: 14px; padding: 13px 15px; border-radius: var(--r-m); background: var(--accent-soft); display: grid; gap: 5px; }
.reply-block b { font-family: var(--font-display); font-size: 0.7rem; letter-spacing: 0.09em; text-transform: uppercase; color: var(--accent-deep); }
.reply-block p { margin: 0; color: var(--fg); font-size: 0.95rem; }
.reply-box { margin-top: 14px; display: grid; gap: 10px; }
.reply-box textarea { font: inherit; padding: 12px 14px; border: 1.5px solid var(--border); border-radius: var(--r-m); background: var(--bg); color: var(--fg); min-height: 86px; resize: vertical; }
.reply-box textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.reply-foot { display: flex; gap: 8px; flex-wrap: wrap; }

/* QR sticker */
.qr-block { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.qr-frame { background: #fff; padding: 10px; border-radius: var(--r-m); border: 1.5px solid var(--border); line-height: 0; flex: none; box-shadow: var(--shadow-1); }
.qr-frame canvas { width: 150px; height: 150px; image-rendering: pixelated; }
.qr-caption { display: grid; gap: 10px; flex: 1; min-width: 190px; align-content: center; }
.qr-caption .fineprint { margin: 0; }

/* share modal */
@keyframes fadeIn { from { opacity: 0; } }
.modal-backdrop { position: fixed; inset: 0; z-index: 95; background: oklch(17% 0.02 240 / 0.52); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 20px; animation: fadeIn 0.2s; }
.modal-backdrop.hidden { display: none; }
.modal { width: min(430px, 100%); background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--r-l); box-shadow: var(--shadow-2); padding: 22px; display: grid; gap: 15px; animation: popIn 0.28s cubic-bezier(0.2, 1.2, 0.4, 1); }
.modal-head { display: flex; justify-content: space-between; align-items: center; }
.modal-head h3 { margin: 0; font-family: var(--font-display); font-size: 1.15rem; }
.share-preview { display: grid; place-items: center; background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-m); padding: 14px; min-height: 300px; }
.share-preview canvas { height: 300px; width: auto; border-radius: 12px; box-shadow: var(--shadow-2); }
.modal-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.modal-actions .btn { flex: 1; min-width: 140px; }

@media (max-width: 560px) {
  .stats-right { width: 100%; }
  .stats-bars, .stats-axis { width: 100%; }
  .stats-big b { font-size: 2.4rem; }
}

/* language toggle */
.lang-toggle { display: inline-flex; gap: 2px; background: var(--site-surface, var(--surface)); border: 1.5px solid var(--site-border, var(--border)); border-radius: 999px; padding: 3px; }
.lang-opt {
  border: none; background: transparent; cursor: pointer; border-radius: 999px;
  font-family: var(--font-display); font-weight: 500; font-size: 0.76rem; letter-spacing: 0.04em;
  color: var(--site-muted, var(--muted)); padding: 6px 11px; min-height: 32px;
}
.lang-opt:hover { color: var(--site-fg, var(--fg)); }
.lang-opt.on { background: var(--site-fg, var(--fg)); color: var(--site-bg, var(--bg)); }
.topbar .lang-toggle { margin-left: 4px; }

/* locked-prefix input */
.prefixed {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 7px;
  border: 1.5px solid var(--border); border-radius: var(--r-m);
  padding: 13px 15px; background: var(--bg);
  transition: border-color 0.15s;
}
.prefixed:focus-within { border-color: var(--accent); background: var(--surface); }
.locked-prefix {
  font-family: var(--font-display); font-weight: 600; color: var(--accent-deep);
  white-space: nowrap; user-select: none; flex: none;
}
.prefixed textarea {
  flex: 1 1 150px; min-width: 120px; min-height: 74px; resize: vertical;
  border: none; background: transparent; outline: none; padding: 0;
  font: inherit; font-size: 0.98rem; color: inherit;
}
.widget .tool-btn { background: var(--site-surface, var(--surface)); border-color: var(--site-border, var(--border)); color: var(--site-muted, var(--muted)); }
.widget .tool-btn:hover { color: var(--site-fg, var(--fg)); border-color: var(--site-fg, var(--fg)); }
.widget .tool-btn.on { background: var(--site-fg, var(--fg)); border-color: var(--site-fg, var(--fg)); color: var(--site-bg, var(--bg)); }
.widget .prefixed { background: color-mix(in oklab, var(--site-bg, var(--bg)) 65%, var(--site-surface, var(--surface))); border-color: var(--site-border, var(--border)); color: var(--site-fg, var(--fg)); }
.widget .prefixed:focus-within { border-color: var(--accent); background: var(--site-surface, var(--surface)); }
.site-body:is([data-theme="ink"], [data-theme="midnight"]) .locked-prefix { color: color-mix(in oklab, var(--accent) 55%, white); }

/* widget row: order + color */
.widget-row { display: grid; gap: 12px; padding: 16px 4px; border-top: 1px solid var(--border); }
.widget-row:first-of-type { border-top: none; padding-top: 6px; }
.widget-row .row-toggle { padding: 0; border-top: none; }
.widget-row-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding-left: 61px; }
.order-btns { display: inline-flex; gap: 4px; }
.order-btn {
  width: 40px; height: 40px; display: grid; place-items: center; cursor: pointer; padding: 0;
  border: 1.5px solid var(--border); background: var(--surface); border-radius: var(--r-s); color: var(--muted);
}
.order-btn:hover:not(:disabled) { color: var(--fg); border-color: var(--fg); }
.order-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.widget-colors { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.widget-colors .accent-dot { width: 30px; height: 30px; }
.widget-colors .accent-dot.on { box-shadow: 0 0 0 2px var(--bg), 0 0 0 3.5px var(--fg); }
.color-label { font-size: 0.78rem; color: var(--muted); font-family: var(--font-display); font-weight: 500; }

@media (max-width: 560px) {
  .widget-row-tools { padding-left: 0; }
}

/* reported content */
.mail-card.reviewing { border-style: dashed; border-color: var(--border); background: var(--bg); }
.review-note {
  display: grid; gap: 6px; padding: 18px 20px; border-radius: var(--r-m);
  background: var(--bg); border: 1.5px dashed var(--border); color: var(--muted);
  text-align: center;
}
.review-note b {
  font-family: var(--font-display); font-size: 0.72rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--fg);
}
.review-note span { font-size: 0.88rem; max-width: 46ch; margin-inline: auto; }
.mail-card.reviewing .mail-kind, .mail-card.reviewing .mail-time { opacity: 0.55; }

/* report modal */
.reason-list { display: grid; gap: 2px; }
.reason {
  display: flex; align-items: center; gap: 10px; cursor: pointer;
  padding: 9px 12px; border-radius: var(--r-s); min-height: 44px;
  font-size: 0.94rem; border: 1.5px solid transparent;
}
.reason:hover { background: var(--bg); }
.reason input { accent-color: var(--accent); width: 17px; height: 17px; flex: none; }
.reason:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.report-detail {
  width: 100%; min-height: 76px; resize: vertical; font: inherit; font-size: 0.92rem;
  border: 1.5px solid var(--border); border-radius: var(--r-m); padding: 11px 13px;
  background: var(--bg); color: var(--fg); outline: none;
}
.report-detail:focus { border-color: var(--accent); }
.wall-card .wall-report, .site-foot .site-report {
  background: none; border: none; cursor: pointer; padding: 4px 2px;
  font-size: 0.7rem; letter-spacing: 0.06em; text-transform: uppercase;
  font-family: var(--font-display); font-weight: 500;
  color: var(--site-muted, var(--muted)); text-decoration: underline; text-underline-offset: 3px;
}
.wall-card .wall-report:hover, .site-foot .site-report:hover { color: var(--love); }
.wall-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.site-foot .site-report { display: inline-block; margin-top: 12px; }

/* admin */
.admin-list { display: grid; gap: 14px; }
.admin-row {
  display: grid; gap: 12px; padding: 18px 20px;
  border: 1.5px solid var(--border); border-radius: var(--r-l); background: var(--surface);
  box-shadow: var(--shadow-1);
}
.admin-row-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.admin-row-top b { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; }
.admin-row-top .fineprint { flex-basis: 100%; }
.tag {
  font-family: var(--font-display); font-weight: 600; font-size: 0.66rem;
  letter-spacing: 0.08em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px;
  background: var(--bg); border: 1.5px solid var(--border); color: var(--muted);
}
.tag.custom { background: var(--accent-soft); border-color: transparent; color: var(--accent-deep); }
.admin-row-actions { margin-left: auto; display: flex; gap: 6px; }
.rollout-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rollout-row select {
  font: inherit; font-size: 0.9rem; padding: 9px 12px; min-height: 42px;
  border: 1.5px solid var(--border); border-radius: var(--r-s);
  background: var(--bg); color: var(--fg);
}
.rollout-row input[type="text"] {
  flex: 1; min-width: 190px; min-height: 42px; font: inherit; font-size: 0.9rem;
  border: 1.5px solid var(--border); border-radius: var(--r-s); padding: 9px 12px;
  background: var(--bg); color: var(--fg); outline: none;
}
.rollout-row input[type="text"]:focus { border-color: var(--accent); }
.admin-form { display: grid; gap: 14px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid .field input, .form-grid .field select {
  width: 100%; min-height: 46px; font: inherit; font-size: 0.94rem;
  border: 1.5px solid var(--border); border-radius: var(--r-s); padding: 9px 12px;
  background: var(--bg); color: var(--fg); outline: none;
}
.form-grid .field input:focus { border-color: var(--accent); }
.report-card { display: grid; gap: 9px; }
.report-card .excerpt {
  font-family: var(--font-display); font-size: 1rem; padding: 11px 14px;
  background: var(--bg); border-left: 3px solid var(--love); border-radius: 0 var(--r-s) var(--r-s) 0;
  overflow-wrap: anywhere;
}
.report-why { font-family: var(--font-display); font-weight: 600; color: var(--love); }
.admin-gate { text-align: center; display: grid; gap: 10px; justify-items: center; padding: 60px 20px; }

@media (max-width: 620px) {
  .form-grid { grid-template-columns: 1fr; }
}

.setting-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 4px 0 8px; }
.setting-row label { font-weight: 600; }
.setting-row input { width: 96px; border: 2px solid var(--border); border-radius: 12px; padding: 8px 10px; font: inherit; background: var(--bg); color: var(--fg); }
.member-search { margin: 16px 0 10px; }
.member-search input {
  width: 100%; border: 2px solid var(--border); border-radius: 14px;
  padding: 11px 14px; font: inherit; background: var(--surface); color: var(--fg);
}
.member-search input:focus { outline: none; border-color: var(--fg); }
.tag.banned { background: var(--love); color: #fff; border-color: transparent; }
.modal.wide { width: min(620px, 94vw); }
.ban-tree {
  max-height: min(48vh, 420px); overflow-y: auto; margin-top: 10px;
  border: 2px solid var(--border); border-radius: 14px; padding: 8px; background: var(--bg);
}
.ban-node {
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
  padding: 7px 8px; border-radius: 10px; cursor: pointer;
}
.ban-node:hover { background: var(--surface); }
.ban-node input { margin: 0; flex: none; }
.ban-who { font-family: var(--font-display); font-weight: 600; }
.ban-who i { font-style: normal; font-size: 0.78rem; color: var(--accent-deep); }
.ban-signals { font-size: 0.8rem; color: var(--muted); }
.danger-btn { background: var(--love); border-color: var(--love); color: #fff; }
.danger-btn:hover { filter: brightness(0.94); }

.legal { max-width: 760px; }
.legal h1 { font-size: 2rem; letter-spacing: -0.015em; margin-bottom: 6px; }
.legal h2 { font-size: 1.18rem; margin: 30px 0 8px; }
.legal p, .legal li { color: var(--fg); line-height: 1.68; }
.legal p { margin-bottom: 12px; }
.legal ul { margin: 0 0 14px 20px; display: grid; gap: 7px; }
.legal li { list-style: disc; }
.legal b { font-weight: 600; }
.legal-date { color: var(--muted); font-size: 0.9rem; margin-bottom: 24px; }
.legal-identity {
  margin-top: 40px; padding: 20px 22px; border: 2px solid var(--border);
  border-radius: 18px; background: var(--surface);
}
.legal-identity h2 { margin-top: 0; }
.legal-identity dl { display: grid; grid-template-columns: minmax(120px, auto) 1fr; gap: 8px 18px; margin-bottom: 12px; }
.legal-identity dt { font-weight: 600; color: var(--muted); }
.legal-identity dd { margin: 0; }
.legal-identity dd.todo { color: var(--love); font-weight: 600; }
.legal-nav { margin: 28px 0 10px; color: var(--muted); }
@media (max-width: 560px) {
  .legal-identity dl { grid-template-columns: 1fr; gap: 2px 0; }
  .legal-identity dd { margin-bottom: 10px; }
}

.settings-col { display: grid; gap: 18px; max-width: 640px; }
.account-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 10px; }
.account-who { display: grid; gap: 3px; min-width: 0; }
.account-who b { font-family: var(--font-display); font-size: 1.15rem; }
.danger-card { border-color: color-mix(in oklab, var(--love) 45%, var(--border)); }
.danger-card h2 { color: var(--love); }
.danger-list { margin: 0 0 16px 20px; display: grid; gap: 6px; }
.danger-list li { list-style: disc; color: var(--muted); font-size: 0.92rem; line-height: 1.5; }
@media (max-width: 420px) {
  .bottomnav .nav-item { font-size: 0.66rem; padding-left: 2px; padding-right: 2px; }
}

.icon-link {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 12px; color: var(--muted); text-decoration: none;
}
.icon-link:hover { background: var(--bg); color: var(--fg); }
.icon-link.on { color: var(--fg); }
.unread-dot {
  position: absolute; top: 2px; right: 1px; min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 9px; background: var(--love); color: #fff;
  font-size: 0.64rem; font-weight: 700; line-height: 17px; text-align: center;
  border: 2px solid var(--surface);
}
.avatar-menu { position: relative; }
.avatar-btn {
  display: block; padding: 0; border: none; background: none; cursor: pointer; line-height: 0;
  border-radius: 50%;
}
.avatar-btn:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 2px; }
.avatar-btn .avatar { display: block; }
.avatar-pop {
  position: absolute; top: calc(100% + 10px); right: 0; z-index: 60;
  min-width: 216px; padding: 8px; display: grid; gap: 2px;
  background: var(--surface); border: 2px solid var(--border); border-radius: 16px;
  box-shadow: var(--shadow-2);
  animation: popIn 0.14s ease-out;
}
.pop-head {
  display: flex; align-items: center; gap: 9px; padding: 6px 8px 10px;
  border-bottom: 1px solid var(--border); margin-bottom: 4px;
}
.pop-head .avatar { width: 30px; height: 30px; }
.pop-head span { font-family: var(--font-display); font-weight: 600; font-size: 0.9rem; }
.pop-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 10px; border: none; background: none; border-radius: 11px;
  font: inherit; font-size: 0.92rem; color: var(--fg); text-decoration: none; cursor: pointer; text-align: left;
}
.pop-item:hover { background: var(--bg); }
.pop-item svg { color: var(--muted); flex: none; }
.pop-item.danger { color: var(--love); }
.pop-item.danger svg { color: var(--love); }

.avatar.tiny { width: 26px; height: 26px; border-width: 2px; }
.invite-who { display: flex; align-items: center; gap: 8px; min-width: 0; }
.invite-who b { font-family: var(--font-display); font-weight: 600; font-size: 0.95rem; }
.invite-row.spent { opacity: 1; background: var(--surface); }
.autodraw.still path, .autodraw.still circle { animation: none !important; stroke-dashoffset: 0 !important; }
.anon-note { justify-content: center; text-align: center; }

.mail-corner { display: inline-flex; gap: 2px; margin-left: 6px; }
.corner-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; padding: 0; border-radius: 9px;
  border: 1.5px solid transparent; background: none; color: var(--muted); cursor: pointer;
}
.corner-btn:hover { background: var(--bg); border-color: var(--border); color: var(--fg); }
.corner-btn.danger:hover { color: var(--love); border-color: color-mix(in oklab, var(--love) 45%, var(--border)); }
.mail-top .mail-time { margin-left: auto; }
.mail-actions { margin-top: 12px; }

.wall-drawing { border-radius: var(--r-m); overflow: hidden; border: 1.5px solid var(--border); background: #fff; margin-bottom: 8px; }
.wall-drawing canvas { display: block; width: 100%; height: auto; }

.report-facts { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 8px 0 10px; font-size: 0.84rem; }
.report-facts dt { color: var(--muted); font-weight: 600; }
.report-facts dd { margin: 0; }
.report-facts code { font-family: ui-monospace, Menlo, monospace; font-size: 0.8rem; }
