/* Plateline website. Same look as the app: docket-paper neutrals, paprika accent, Fraunces headings,
   Figtree for reading, Plex Mono only for docket print. Layout: one centred column, sections stacked,
   product screenshots on the right of the hero and the setup steps. */
:root {
  --bg: #f7f3ee;
  --surface: #fffdfa;
  --surface-2: #efe8df;
  --border: #e4dbd0;
  --border-input: #c9bcac;
  --text: #221a14;
  --text-muted: #6b5d50;
  --accent: #b4441c;
  --accent-soft: #f8e3d8;
  --on-accent: #ffffff;
  --success: #2f7a4a;
  --success-soft: #e0f0e3;
  --warning: #8f5c00;
  --warning-soft: #f9ecd0;
  --danger: #a8203a;
  --danger-soft: #fbe1e5;
  --docket: #fffefb;
  --shadow: 0 1px 2px rgba(34, 26, 20, .06), 0 8px 28px rgba(34, 26, 20, .09);
  --radius: 14px;
  --radius-sm: 8px;
  --font: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #161210; --surface: #201a17; --surface-2: #2a2320; --border: #3a312c; --border-input: #54473f;
    --text: #f1e9e1; --text-muted: #b3a497; --accent: #f08c5a; --accent-soft: #3d2116; --on-accent: #2a1206;
    --success: #6cc58f; --success-soft: #18301f; --warning: #e2b04f; --warning-soft: #33280f;
    --danger: #f58a9c; --danger-soft: #3d1820; --docket: #262019;
    --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 8px 28px rgba(0, 0, 0, .35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #161210; --surface: #201a17; --surface-2: #2a2320; --border: #3a312c; --border-input: #54473f;
  --text: #f1e9e1; --text-muted: #b3a497; --accent: #f08c5a; --accent-soft: #3d2116; --on-accent: #2a1206;
  --success: #6cc58f; --success-soft: #18301f; --warning: #e2b04f; --warning-soft: #33280f;
  --danger: #f58a9c; --danger-soft: #3d1820; --docket: #262019;
  --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 8px 28px rgba(0, 0, 0, .35);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { background: var(--bg); color: var(--text); font: 17px/1.6 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; margin: 0; text-wrap: balance; font-weight: 650; }
h1 { font-size: clamp(2.3rem, 5.5vw, 3.6rem); letter-spacing: -.015em; }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.4rem); letter-spacing: -.01em; }
h3 { font-size: 1.15rem; }
p { margin: 0; }
.muted { color: var(--text-muted); }
.small { font-size: .9rem; }
.wrap { max-width: 1120px; margin: 0 auto; padding-inline: 20px; }
.measure { max-width: 62ch; }
.eyebrow { font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

/* Test mode strip */
.test-strip { background: var(--warning-soft); color: var(--warning); font-size: .9rem; font-weight: 600; text-align: center; padding: 8px 16px; }

/* Header */
.topbar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.topbar .wrap { display: flex; align-items: center; gap: 20px; min-height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; color: var(--text); text-decoration: none; }
.logo svg { color: var(--accent); }
.topbar nav { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.topbar nav a:not(.btn) { color: var(--text-muted); text-decoration: none; padding: 8px 12px; border-radius: var(--radius-sm); font-weight: 500; font-size: .95rem; }
.topbar nav a:not(.btn):hover { color: var(--text); background: var(--surface-2); }
@media (max-width: 760px) { .topbar nav a.hide-sm { display: none; } }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 650; font-size: 1rem;
  min-height: 48px; padding: 10px 22px; border-radius: 999px; border: 1px solid var(--border-input); background: var(--surface); color: var(--text);
  text-decoration: none; cursor: pointer; transition: transform .12s ease, filter .12s ease, background .12s ease; }
.btn:hover { background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.primary:hover { filter: brightness(1.07); }
.btn.small { min-height: 40px; padding: 6px 16px; font-size: .95rem; }
.btn[disabled] { opacity: .6; cursor: progress; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 2px; }

/* Hero */
.hero { padding-block: 64px 48px; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 48px; align-items: center; }
.hero h1 em { font-style: italic; color: var(--accent); font-weight: 600; }
.hero .lede { font-size: 1.2rem; color: var(--text-muted); max-width: 34ch; }
.hero .cta-note { font-size: .9rem; color: var(--text-muted); }
@media (max-width: 900px) { .hero .wrap { grid-template-columns: minmax(0, 1fr); } .hero { padding-block: 40px 32px; } }

/* A device frame around app screenshots */
.device { background: #1d1714; padding: 12px; border-radius: 26px; box-shadow: var(--shadow); max-width: 100%; }
.device img { border-radius: 16px; width: 100%; height: auto; }
.device.tilt { transform: rotate(-1.2deg); }
@media (prefers-reduced-motion: no-preference) {
  .device.tilt { animation: settle .9s cubic-bezier(.2, .8, .2, 1) backwards; }
  @keyframes settle { from { transform: translateY(14px) rotate(1deg); } to { transform: rotate(-1.2deg); } }
}

/* Sections */
section.band { padding-block: 72px; }
section.band.alt { background: var(--surface); border-block: 1px solid var(--border); }
.section-head { display: flex; flex-direction: column; gap: 12px; margin-bottom: 40px; max-width: 62ch; }

/* What's in it */
.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 40px; }
.feature { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.feature .ico { width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; margin-bottom: 4px; }
.feature p { color: var(--text-muted); }
.chip { display: inline-block; font-size: .75rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--text-muted); vertical-align: middle; margin-left: 6px; font-family: var(--font); }
@media (min-width: 1000px) { .features { gap: 36px 40px; } }
@media (max-width: 860px) { .features { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .features { grid-template-columns: minmax(0, 1fr); } }

/* Instead of */
.swap { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 24px; align-items: stretch; margin-top: 8px; }
.swap .side { border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.swap .before { border: 1px dashed var(--border-input); }
.swap .before li { text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--text-muted) 60%, transparent); color: var(--text-muted); }
.swap .after { background: var(--accent-soft); }
.swap ul { margin: 0; padding-left: 1.1em; display: flex; flex-direction: column; gap: 6px; }
.swap .arrow { align-self: center; font-family: var(--font-display); font-size: 2rem; color: var(--accent); }
@media (max-width: 720px) { .swap { grid-template-columns: minmax(0, 1fr); } .swap .arrow { transform: rotate(90deg); justify-self: center; } }

/* Setup steps */
.setup { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 56px; align-items: center; }
.steps { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 22px; counter-reset: step; }
.steps li { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 16px; counter-increment: step; }
.steps li::before { content: counter(step); width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--accent); color: var(--accent); display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; }
.steps p { color: var(--text-muted); }
@media (max-width: 900px) { .setup { grid-template-columns: minmax(0, 1fr); gap: 32px; } }

/* The docket: pricing and the sign-up summary are printed like a kitchen docket */
.docket { background: var(--docket); color: var(--text); font-family: var(--font-mono); font-size: .95rem; line-height: 1.55;
  padding: 30px 28px 26px; position: relative; box-shadow: var(--shadow); max-width: 420px; width: 100%;
  --tooth: radial-gradient(circle at 8px 0, transparent 7px, var(--docket) 7.5px); }
.docket::before, .docket::after { content: ""; position: absolute; left: 0; right: 0; height: 10px; background: var(--tooth); background-size: 16px 10px; }
.docket::before { top: -9px; }
.docket::after { bottom: -9px; transform: scaleY(-1); }
.docket .d-head { text-align: center; display: flex; flex-direction: column; gap: 2px; padding-bottom: 14px; border-bottom: 2px dashed var(--border-input); }
.docket .d-head strong { font-family: var(--font-display); font-size: 1.3rem; font-weight: 700; }
.docket .d-lines { list-style: none; margin: 0; padding: 14px 0; display: flex; flex-direction: column; gap: 4px; border-bottom: 2px dashed var(--border-input); }
.docket .d-lines li { display: flex; gap: 10px; justify-content: space-between; }
.docket .d-lines li span:last-child { color: var(--text-muted); white-space: nowrap; }
.docket .d-lines li.soon span:first-child { color: var(--text-muted); }
.docket .d-total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.docket .d-total .amt { font-family: var(--font-display); font-size: 2.6rem; font-weight: 700; color: var(--accent); line-height: 1; }
.docket .d-foot { text-align: center; margin-top: 14px; color: var(--text-muted); font-size: .85rem; }

.pricing { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 56px; align-items: center; }
@media (max-width: 860px) { .pricing { grid-template-columns: minmax(0, 1fr); justify-items: center; } .pricing > div:first-child { justify-self: stretch; } }

/* Questions */
.faq { display: flex; flex-direction: column; border-top: 1px solid var(--border); max-width: 780px; }
.faq details { border-bottom: 1px solid var(--border); padding-block: 4px; }
.faq summary { cursor: pointer; font-weight: 650; font-size: 1.05rem; padding: 16px 32px 16px 0; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 12px; font-size: 1.5rem; color: var(--accent); font-weight: 400; }
.faq details[open] summary::after { content: "−"; }
.faq details p { color: var(--text-muted); padding: 0 32px 18px 0; }

.closing { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 18px; }

footer.site { padding-block: 40px 56px; border-top: 1px solid var(--border); color: var(--text-muted); font-size: .9rem; }
footer.site .wrap { display: flex; gap: 16px 28px; flex-wrap: wrap; align-items: center; }
footer.site a { color: var(--text-muted); }
footer.site .spacer { flex: 1; }

/* Forms (sign up, checkout) */
.form-page { padding-block: 48px 72px; }
.form-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 380px); gap: 56px; align-items: start; }
@media (max-width: 860px) { .form-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; } .form-grid .docket { justify-self: center; } }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); min-width: 0; }
@media (max-width: 480px) { .panel { padding: 20px; } }
fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 14px; }
legend { font-family: var(--font-display); font-size: 1.15rem; font-weight: 650; margin-bottom: 4px; padding: 0; }
.fields-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 560px) { .fields-2 { grid-template-columns: minmax(0, 1fr); } }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label { font-weight: 600; font-size: .95rem; }
.field .hint { font-size: .85rem; color: var(--text-muted); }
.field .err { font-size: .85rem; color: var(--danger); font-weight: 600; }
input[type=text], input[type=email], input[type=password], input[type=tel] {
  font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--border-input); border-radius: var(--radius-sm);
  padding: 11px 14px; width: 100%; min-height: 48px; }
input:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.field.invalid input { border-color: var(--danger); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .95rem; }
.check input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--accent); flex: none; }
.form-error { background: var(--danger-soft); color: var(--danger); padding: 12px 14px; border-radius: var(--radius-sm); font-weight: 600; font-size: .95rem; }
.note { background: var(--surface-2); padding: 12px 14px; border-radius: var(--radius-sm); font-size: .95rem; }
.note.warn { background: var(--warning-soft); color: var(--warning); font-weight: 600; }
.note.good { background: var(--success-soft); color: var(--success); font-weight: 600; }
.divider { border: 0; border-top: 1px solid var(--border); margin: 8px 0; }

.copyline { display: flex; gap: 8px; align-items: center; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 6px 6px 6px 12px; min-width: 0; }
.copyline code { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; font-family: var(--font-mono); font-size: .85rem; }
.copyline .btn { min-height: 36px; padding: 4px 14px; font-size: .9rem; flex: none; }

.center-page { max-width: 640px; margin: 0 auto; padding-block: 56px 80px; display: flex; flex-direction: column; gap: 20px; }
.spinner { width: 28px; height: 28px; border: 3px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2.4s; } }

.prose { max-width: 70ch; padding-block: 48px 80px; display: flex; flex-direction: column; gap: 14px; }
.prose h2 { font-size: 1.4rem; margin-top: 18px; }
.prose ul { margin: 0; padding-left: 1.2em; display: flex; flex-direction: column; gap: 4px; }

/* ---------- Motion ---------- */
/* Everything below rests in its finished state; motion.js only adds movement on top, and none of it
   runs when the device asks for reduced motion. */

/* Header tightens once you scroll */
.topbar { transition: box-shadow .25s ease, background .25s ease; }
.topbar.scrolled { box-shadow: 0 6px 24px rgba(34, 26, 20, .08); }
.topbar .wrap { transition: min-height .25s ease; }
.topbar.scrolled .wrap { min-height: 56px; }

/* Primary buttons with an arrow that nudges forward */
.btn.arrow::after { content: "→"; display: inline-block; transition: transform .2s ease; }
.btn.arrow:hover::after { transform: translateX(4px); }
.btn.primary { position: relative; overflow: hidden; }
.btn.primary::before { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .28) 50%, transparent 70%); transform: translateX(-120%); pointer-events: none; }
.btn.primary:hover::before { transform: translateX(120%); transition: transform .7s ease; }

/* Hero headline: words rise in, then "one" gets underlined */
.rise span { display: inline-block; }
.one { position: relative; }
.one svg { position: absolute; left: -2%; bottom: -.08em; width: 104%; height: .32em; overflow: visible; }
.one path { fill: none; stroke: var(--accent); stroke-width: 4; stroke-linecap: round; }
@media (prefers-reduced-motion: no-preference) {
  .rise > span { animation: rise .7s cubic-bezier(.2, .8, .2, 1) both; }
  .rise > span:nth-child(1) { animation-delay: .05s; } .rise > span:nth-child(2) { animation-delay: .12s; }
  .rise > span:nth-child(3) { animation-delay: .19s; } .rise > span:nth-child(4) { animation-delay: .26s; }
  .rise > span:nth-child(5) { animation-delay: .33s; } .rise > span:nth-child(6) { animation-delay: .40s; }
  .rise > span:nth-child(7) { animation-delay: .47s; }
  .one path { stroke-dasharray: 130; animation: draw .8s .95s ease-out both; }
  .fade-in { animation: rise .7s var(--d, 0s) cubic-bezier(.2, .8, .2, 1) both; }
  @keyframes rise { from { opacity: 0; transform: translateY(.45em); } to { opacity: 1; transform: none; } }
  @keyframes draw { from { stroke-dashoffset: 130; } to { stroke-dashoffset: 0; } }
}

/* The live service board in the hero: an iPad running Plateline, drawn in HTML */
.board-wrap { min-width: 0; }
.board-wrap .device { padding: 12px; }
.board-fit { position: relative; width: 100%; aspect-ratio: 720 / 470; overflow: hidden; border-radius: 16px; background: #f7f3ee; }
.board { position: absolute; left: 0; top: 0; width: 720px; height: 470px; transform-origin: 0 0; transform: scale(var(--s, 1));
  display: grid; grid-template-columns: 150px 1fr; font: 13px/1.35 var(--font);
  /* the app's own light palette, whatever the website's theme */
  --p-bg: #f7f3ee; --p-surface: #fffdfa; --p-s2: #efe8df; --p-border: #e4dbd0; --p-text: #221a14; --p-muted: #6b5d50; --p-accent: #b4441c; --p-ok: #2f7a4a; --p-blue: #2b5fa8; --p-amber: #8f5c00;
  color: var(--p-text); background: var(--p-bg); }
.b-side { background: var(--p-surface); border-right: 1px solid var(--p-border); padding: 16px 10px; display: flex; flex-direction: column; gap: 4px; }
.b-name { font-family: var(--font-display); font-size: 14px; margin: 0 6px 10px; }
.b-item { padding: 7px 8px; border-radius: 7px; color: var(--p-muted); display: flex; align-items: center; gap: 6px; }
.b-item.on { background: var(--p-s2); color: var(--p-text); font-weight: 600; }
.b-item.dim { font-size: 12px; }
.b-badge { font-style: normal; font-size: 10px; font-weight: 700; background: var(--p-accent); color: #fff; border-radius: 999px; min-width: 17px; height: 17px; display: inline-grid; place-items: center; padding: 0 5px; }
.b-badge.bump { animation: bump .5s ease; }
@keyframes bump { 40% { transform: scale(1.35); } }
.b-main { padding: 14px 16px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.b-head { display: flex; align-items: center; justify-content: space-between; }
.b-head strong { font-family: var(--font-display); font-size: 19px; }
.b-live { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; color: var(--p-ok); text-transform: uppercase; letter-spacing: .06em; }
.b-live i { width: 8px; height: 8px; border-radius: 50%; background: var(--p-ok); box-shadow: 0 0 0 0 rgba(47, 122, 74, .5); animation: pulse 1.8s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(47, 122, 74, 0); } 100% { box-shadow: 0 0 0 0 rgba(47, 122, 74, 0); } }
.b-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; align-items: start; }
.b-docket { background: var(--p-surface); border: 1px solid var(--p-border); border-top: 4px solid var(--p-blue); border-radius: 10px; padding: 9px 9px 8px;
  box-shadow: 0 1px 2px rgba(34, 26, 20, .06); display: flex; flex-direction: column; gap: 6px; transition: opacity .45s ease, transform .45s ease; }
.b-docket.takeaway { border-top-color: var(--p-ok); }
.b-docket.ai { border-top-color: var(--p-amber); }
.bd-top { display: flex; align-items: baseline; gap: 6px; }
.bd-top b { font-family: var(--font-display); font-size: 14px; }
.bd-top .num { color: var(--p-muted); font-size: 11px; }
.bd-top .age { margin-left: auto; font-weight: 700; font-size: 11px; }
.bd-who { color: var(--p-muted); font-size: 11px; margin-top: -4px; }
.bd-tag { align-self: flex-start; font-size: 10px; font-weight: 700; color: var(--p-accent); background: #f8e3d8; padding: 1px 7px; border-radius: 999px; }
.b-docket ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.b-docket li { background: var(--p-s2); border-radius: 7px; padding: 6px 7px; display: grid; grid-template-columns: 16px 1fr; gap: 7px; align-items: start; transition: background .3s ease; }
.b-docket li .tick { width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid #b9ab9c; margin-top: 1px; display: grid; place-items: center; transition: background .25s ease, border-color .25s ease; }
.b-docket li .tick::after { content: ""; width: 7px; height: 4px; border: solid #fff; border-width: 0 0 2px 2px; transform: rotate(-45deg) scale(0); margin-top: -2px; transition: transform .25s cubic-bezier(.3, 1.6, .5, 1); }
.b-docket li .dish { min-width: 0; }
.b-docket li .dish b { font-weight: 700; }
.b-docket li small { display: block; font-size: 10.5px; color: var(--p-muted); }
.b-docket li small.add::before { content: "+ "; color: var(--p-ok); font-weight: 700; }
.b-docket li small.no { color: #a8203a; font-weight: 600; }
.b-docket li.out { background: var(--p-surface); outline: 1px solid var(--p-border); }
.b-docket li.out .tick { background: var(--p-ok); border-color: var(--p-ok); }
.b-docket li.out .tick::after { transform: rotate(-45deg) scale(1); }
.b-docket li.out .dish { color: var(--p-muted); text-decoration: line-through; }
.bd-foot { font-size: 11px; color: var(--p-muted); display: flex; justify-content: space-between; }
.bd-foot .done { color: var(--p-ok); font-weight: 700; }
.b-docket.arriving { animation: arrive .6s cubic-bezier(.2, .9, .3, 1.2) both; }
@keyframes arrive { from { opacity: 0; transform: translateY(-26px) scale(.96); } }
.b-docket.arriving { box-shadow: 0 0 0 3px rgba(180, 68, 28, .25); }
.b-docket.leaving { opacity: 0; transform: scale(.92) translateY(8px); }
.b-toasts { position: absolute; right: 14px; bottom: 14px; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; pointer-events: none; }
.b-toast { background: #221a14; color: #f7f3ee; border-radius: 10px; padding: 9px 12px; font-size: 12px; box-shadow: 0 8px 24px rgba(0, 0, 0, .25); display: flex; gap: 9px; align-items: center; max-width: 290px;
  animation: toast-in .45s cubic-bezier(.2, .9, .3, 1.2) both; }
.b-toast .ic { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; background: #b4441c; flex: none; font-size: 13px; }
.b-toast .ic svg { width: 14px; height: 14px; fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.b-toast strong { display: block; font-size: 12px; }
.b-toast.bye { animation: toast-out .4s ease both; }
@keyframes toast-in { from { opacity: 0; transform: translateY(14px) scale(.95); } }
@keyframes toast-out { to { opacity: 0; transform: translateX(30px); } }
@media (prefers-reduced-motion: no-preference) { .device.tilt { transition: transform .6s cubic-bezier(.2, .8, .2, 1); } }

/* Moving strip of the night's events */
.ticker { border-block: 1px solid var(--border); background: var(--surface-2); overflow: hidden; font-family: var(--font-mono); font-size: .9rem; }
.ticker-track { display: flex; width: max-content; }
.ticker ul { list-style: none; margin: 0; padding: 14px 0; display: flex; gap: 0; flex: none; }
.ticker li { white-space: nowrap; padding-inline: 28px; position: relative; color: var(--text-muted); }
.ticker li::after { content: "•"; position: absolute; right: -4px; color: var(--accent); }
.ticker li b { color: var(--text); font-weight: 600; margin-right: 8px; }
.ticker li em { font-style: normal; font-weight: 600; color: var(--success); margin-left: 6px; }
@media (prefers-reduced-motion: no-preference) {
  .ticker-track { animation: ticker 48s linear infinite; }
  .ticker:hover .ticker-track { animation-play-state: paused; }
  @keyframes ticker { to { transform: translateX(-50%); } }
}
@media (prefers-reduced-motion: reduce) { .ticker { overflow-x: auto; } }

/* Scroll reveals (motion.js adds .pre only to things still below the screen) */
@media (prefers-reduced-motion: no-preference) {
  [data-reveal], [data-stagger] > * { transition: opacity .7s cubic-bezier(.2, .8, .2, 1), transform .7s cubic-bezier(.2, .8, .2, 1); transition-delay: var(--delay, 0s); }
  .pre[data-reveal], [data-stagger].pre > * { opacity: 0; transform: translateY(28px); }
}

/* Features: icons wake up on hover */
.feature { padding: 18px; margin: -18px; border-radius: var(--radius); transition: background .25s ease, transform .25s ease; }
.feature:hover { background: var(--bg); transform: translateY(-3px); }
.feature .ico { transition: transform .35s cubic-bezier(.3, 1.6, .5, 1), background .25s ease, color .25s ease; }
.feature:hover .ico { transform: rotate(-8deg) scale(1.12); background: var(--accent); color: var(--on-accent); }

/* Swap: the old list gets crossed off, the new list ticks in */
.swap .before li { text-decoration: none; position: relative; width: fit-content; }
.swap .before li::after { content: ""; position: absolute; left: -2px; right: -2px; top: 52%; height: 2px; background: var(--accent); transform-origin: left; transform: scaleX(1); }
.swap .after ul { list-style: none; padding: 0; }
.swap .after li { display: grid; grid-template-columns: 22px 1fr; gap: 8px; }
.swap .after li::before { content: "✓"; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; font-size: .75rem; font-weight: 700; margin-top: 2px; }
@media (prefers-reduced-motion: no-preference) {
  .swap .before li::after { transition: transform .45s ease; transition-delay: calc(.35s + var(--i, 0) * .22s); }
  .swap .after li { transition: opacity .45s ease, transform .45s cubic-bezier(.3, 1.4, .5, 1); transition-delay: calc(1.2s + var(--i, 0) * .14s); }
  .swap.pre .before li::after { transform: scaleX(0); }
  .swap.pre .after li { opacity: 0; transform: translateX(-12px); }
  .swap .arrow { animation: nudge 1.6s ease-in-out infinite; }
  @keyframes nudge { 50% { translate: 6px 0; } }
}

/* Floor plan demo: drag a table into place, others change status */
.floor-demo { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.fd-tabs { display: flex; gap: 6px; flex-wrap: wrap; font-size: .85rem; font-weight: 600; }
.fd-tabs span { border: 1px solid var(--border-input); border-radius: 999px; padding: 4px 12px; }
.fd-tabs i { font-style: normal; color: var(--text-muted); font-weight: 500; }
.fd-tabs .on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.fd-tabs .on i { color: inherit; opacity: .8; }
.fd-tabs .add { border-style: dashed; color: var(--text-muted); }
.fd-room { position: relative; aspect-ratio: 16 / 10; border-radius: 12px; background-color: var(--surface-2);
  background-image: radial-gradient(color-mix(in srgb, var(--text-muted) 35%, transparent) 1px, transparent 1.2px); background-size: 18px 18px; overflow: hidden; }
.fd-label { position: absolute; right: 12px; bottom: 10px; font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); font-weight: 700; }
.fd-t { position: absolute; width: 19%; aspect-ratio: 1; border: 2px solid var(--success); background: var(--surface); border-radius: 12px; display: grid; place-content: center; text-align: center; line-height: 1.15; font-size: clamp(.65rem, 1.6vw, .85rem); box-shadow: 0 1px 2px rgba(0, 0, 0, .06); }
.fd-t.round { border-radius: 50%; }
.fd-t.sq { width: 22%; aspect-ratio: 1.25; }
.fd-t b { font-size: 1.1em; }
.fd-t small { color: var(--text-muted); font-size: .85em; }
.fd-slot { position: absolute; width: 22%; aspect-ratio: 1.25; border: 2px dashed color-mix(in srgb, var(--accent) 55%, transparent); border-radius: 12px; }
.fd-t.drag { left: 66%; top: 16%; border-color: var(--accent); z-index: 2; }
.fd-hand { position: absolute; right: -8px; bottom: -14px; fill: var(--surface); stroke: var(--text); stroke-width: 1.4; stroke-linejoin: round; opacity: 0; }
.fd-legend { display: flex; gap: 8px; font-size: .8rem; font-weight: 600; }
.fd-legend span { padding: 2px 10px; border-radius: 999px; }
.fd-legend .free { background: var(--success-soft); color: var(--success); }
.fd-legend .seated { background: var(--warning-soft); color: var(--warning); }
.fd-legend .bill { background: var(--danger-soft); color: var(--danger); }
@media (prefers-reduced-motion: no-preference) {
  .fd-t.drag { animation: drag-table 7s cubic-bezier(.45, .05, .3, 1) infinite; }
  .fd-t.drag .fd-hand { animation: drag-hand 7s ease infinite; }
  .fd-slot { animation: slot 7s ease infinite; }
  .fd-t.s1 { animation: status 9s infinite; }
  .fd-t.s2 { animation: status 9s -3s infinite; }
  .fd-t.s3 { animation: status 9s -6s infinite; }
  @keyframes drag-table {
    0%, 8% { left: 64%; top: 64%; transform: none; box-shadow: none; }
    14% { left: 64%; top: 64%; transform: scale(1.08) rotate(-3deg); box-shadow: 0 16px 30px rgba(0, 0, 0, .18); }
    48% { left: 66%; top: 16%; transform: scale(1.08) rotate(2deg); box-shadow: 0 16px 30px rgba(0, 0, 0, .18); }
    54%, 86% { left: 66%; top: 16%; transform: none; box-shadow: 0 1px 2px rgba(0, 0, 0, .06); }
    92% { left: 66%; top: 16%; opacity: 0; transform: none; }
    93% { left: 64%; top: 64%; opacity: 0; }
    100% { left: 64%; top: 64%; opacity: 1; }
  }
  @keyframes drag-hand { 0%, 6% { opacity: 0; transform: translate(10px, 10px); } 10%, 50% { opacity: 1; transform: none; } 58%, 100% { opacity: 0; transform: translate(8px, 12px); } }
  @keyframes slot { 0%, 46% { opacity: 1; } 52%, 90% { opacity: 0; } 100% { opacity: 1; } }
  @keyframes status {
    0%, 30% { border-color: var(--success); background: var(--surface); }
    36%, 63% { border-color: var(--warning); background: var(--warning-soft); }
    69%, 94% { border-color: var(--danger); background: var(--danger-soft); }
  }
}

/* Steps light up in turn */
.steps li::before { transition: background .4s ease, color .4s ease; }
.steps li:hover::before { background: var(--accent); color: var(--on-accent); }

/* The price docket prints out of the printer */
.printable { transform-origin: top center; }
@media (prefers-reduced-motion: no-preference) {
  .printable.pre { opacity: 1; transform: none; clip-path: inset(0 0 100% 0); }
  .printable { transition: clip-path 1.6s steps(14, end); }
  .printable:not(.pre) { clip-path: inset(-12px -40px -40px -40px); }
  .printable .d-lines li { transition: opacity .3s ease, transform .3s ease; transition-delay: calc(.3s + var(--i, 0) * .12s); }
  .printable.pre .d-lines li { opacity: 0; transform: translateX(-6px); }
  .docket:hover { transform: rotate(-1deg) translateY(-4px); }
  .docket { transition: transform .35s ease; }
}

/* Questions open smoothly */
@media (prefers-reduced-motion: no-preference) {
  .faq details[open] p { animation: rise .4s ease both; }
  .faq summary::after { transition: transform .25s ease; }
  .faq details[open] summary::after { transform: rotate(180deg); }
}

/* Closing: a slowly turning plate */
.closing-band { background: var(--accent-soft); border-top: 1px solid var(--border); position: relative; overflow: hidden; }
.plate-spin { width: 88px; height: 88px; color: var(--accent); }
.plate-spin svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 3; }
.plate-spin circle:nth-child(2) { stroke-dasharray: 6 8; }
@media (prefers-reduced-motion: no-preference) {
  .plate-spin svg { animation: spin 24s linear infinite; }
  .plate-spin { animation: bob 3.2s ease-in-out infinite; }
  @keyframes bob { 50% { transform: translateY(-6px); } }
}

/* ---------- Interactive pieces ---------- */
.scroll-progress { position: fixed; left: 0; top: env(safe-area-inset-top, 0px); height: 3px; width: 100%; background: var(--accent); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); z-index: 30; pointer-events: none; }

/* Hero board can be tapped */
.board-hint { display: flex; align-items: center; gap: 10px; justify-content: center; margin-top: 18px; font-size: .9rem; color: var(--text-muted); font-weight: 600; }
.tap-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 50%, transparent); }
@media (prefers-reduced-motion: no-preference) { .tap-dot { animation: tap 1.6s infinite; } @keyframes tap { 70% { box-shadow: 0 0 0 10px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } } }
.b-docket li { cursor: pointer; }
.b-docket li:hover { background: #e6dccf; }
.b-docket li.out:hover { background: var(--p-surface); }
.b-pop { position: absolute; pointer-events: none; font: 700 14px var(--font); color: var(--p-ok); animation: pop-up .9s ease-out forwards; }
@keyframes pop-up { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(-26px); } }

/* Try it: guest phone -> pass */
.try { display: grid; grid-template-columns: minmax(0, 320px) minmax(60px, 1fr) minmax(0, 420px); gap: 24px; align-items: center; justify-content: center; }
@media (max-width: 900px) { .try { grid-template-columns: minmax(0, 360px); justify-content: center; } .try-path { height: 60px; transform: rotate(90deg); width: 60px; justify-self: center; } }
.phone { background: #1d1714; border-radius: 40px; padding: 12px; box-shadow: var(--shadow); position: relative; width: 100%; max-width: 320px; justify-self: center; }
.phone-notch { position: absolute; top: 18px; left: 50%; width: 90px; height: 22px; border-radius: 12px; background: #1d1714; transform: translateX(-50%); z-index: 2; }
.g-screen { background: #fffdfa; color: #221a14; border-radius: 30px; min-height: 540px; padding: 50px 16px 16px; display: flex; flex-direction: column; gap: 12px; font-size: .9rem; overflow: hidden; }
.g-top { display: flex; flex-direction: column; gap: 2px; padding-bottom: 8px; border-bottom: 1px solid #e4dbd0; }
.g-top strong { font-family: var(--font-display); font-size: 1.15rem; }
.g-top span { color: #6b5d50; font-size: .8rem; }
.g-view { display: flex; flex-direction: column; gap: 12px; flex: 1; }
.g-menu { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.g-menu button { width: 100%; display: grid; grid-template-columns: 1fr auto 30px; gap: 8px; align-items: center; text-align: left; font: inherit; color: inherit; background: #f7f3ee; border: 1px solid #e4dbd0; border-radius: 12px; padding: 8px 10px; cursor: pointer; transition: transform .15s ease, border-color .15s ease; }
.g-menu button:hover { border-color: #b4441c; }
.g-menu button:active { transform: scale(.98); }
.g-menu small { display: block; color: #6b5d50; font-size: .75rem; }
.g-menu .plus { width: 30px; height: 30px; border-radius: 50%; background: #b4441c; color: #fff; display: grid; place-items: center; font-size: 1.2rem; font-weight: 700; }
.g-cart { display: flex; flex-direction: column; gap: 8px; flex: 1; }
.g-line { background: #f8e3d8; border-radius: 12px; padding: 8px 10px; display: flex; flex-direction: column; gap: 6px; animation: rise .35s ease both; }
.g-line .row1 { display: flex; justify-content: space-between; gap: 8px; font-weight: 700; }
.g-line .row1 button { font: inherit; border: 0; background: none; color: #a8203a; cursor: pointer; font-size: .8rem; font-weight: 600; padding: 0; }
.g-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.g-chips button { font: 600 .75rem var(--font); border-radius: 999px; padding: 4px 9px; border: 1px solid #c9bcac; background: #fffdfa; color: #221a14; cursor: pointer; transition: background .15s ease, color .15s ease; }
.g-chips button[aria-pressed="true"] { background: #2f7a4a; border-color: #2f7a4a; color: #fff; }
.g-chips button.no[aria-pressed="true"] { background: #a8203a; border-color: #a8203a; }
.g-send { font: 700 1rem var(--font); min-height: 48px; border-radius: 999px; border: 0; background: #b4441c; color: #fff; cursor: pointer; display: flex; justify-content: space-between; align-items: center; padding: 0 18px; }
.g-send[disabled] { background: #c9bcac; cursor: default; justify-content: center; }
.g-sent { align-items: center; justify-content: center; text-align: center; gap: 10px; }
.g-sent strong { font-family: var(--font-display); font-size: 1.4rem; }
.g-sent span { color: #6b5d50; max-width: 24ch; }
.g-check svg { width: 72px; height: 72px; fill: none; stroke: #2f7a4a; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
@media (prefers-reduced-motion: no-preference) {
  .g-check circle { stroke-dasharray: 160; animation: draw-c .6s ease-out both; }
  .g-check path { stroke-dasharray: 40; animation: draw-p .4s .5s ease-out both; }
  @keyframes draw-c { from { stroke-dashoffset: 160; } to { stroke-dashoffset: 0; } }
  @keyframes draw-p { from { stroke-dashoffset: 40; } to { stroke-dashoffset: 0; } }
}
.try-path { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.try-path span { width: 10px; height: 10px; border-radius: 50%; background: var(--border-input); }
.try-path.go span { animation: path-dot .9s ease both; }
.try-path.go span:nth-child(2) { animation-delay: .1s; } .try-path.go span:nth-child(3) { animation-delay: .2s; }
.try-path.go span:nth-child(4) { animation-delay: .3s; } .try-path.go span:nth-child(5) { animation-delay: .4s; }
@keyframes path-dot { 40% { background: var(--accent); transform: scale(1.6); } }
.pass { background: #1d1714; border-radius: 26px; padding: 12px; box-shadow: var(--shadow); width: 100%; justify-self: center; }
.pass-head { display: flex; justify-content: space-between; align-items: center; color: #f1e9e1; padding: 4px 8px 10px; font-size: .9rem; }
.pass-board { background: #f7f3ee; border-radius: 16px; min-height: 330px; padding: 14px; display: flex; flex-direction: column; gap: 10px; color: #221a14;
  --p-surface: #fffdfa; --p-s2: #efe8df; --p-border: #e4dbd0; --p-muted: #6b5d50; --p-accent: #b4441c; --p-ok: #2f7a4a; --p-blue: #2b5fa8; --p-amber: #8f5c00; font-size: .9rem; }
.pass-board .b-docket li small { font-size: .75rem; }
.pass-board .bd-top b { font-size: 1rem; }
.pass-empty { margin: auto; color: #6b5d50; text-align: center; max-width: 24ch; }
.pass-board .b-docket .collected { align-self: flex-end; font: 700 .8rem var(--font); background: #b4441c; color: #fff; border: 0; border-radius: 999px; padding: 6px 14px; cursor: pointer; }

/* Savings calculator */
.calc { margin-top: 48px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; background: var(--bg); border: 1px solid var(--border); border-radius: 20px; padding: 32px; box-shadow: var(--shadow); }
@media (max-width: 860px) { .calc { grid-template-columns: minmax(0, 1fr); padding: 22px; gap: 28px; } }
.calc-inputs { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.calc-inputs h3 { font-size: 1.5rem; }
.slider { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: baseline; }
.slider label { font-size: .95rem; font-weight: 600; }
.slider output { font-family: var(--font-mono); font-weight: 600; color: var(--accent); font-variant-numeric: tabular-nums; }
.slider input { grid-column: 1 / -1; width: 100%; accent-color: var(--accent); height: 28px; cursor: pointer; }
.calc-result { display: flex; flex-direction: column; gap: 16px; justify-content: center; min-width: 0; }
.bars { display: flex; flex-direction: column; gap: 14px; }
.bar-row { display: grid; grid-template-columns: 130px minmax(0, 1fr) 90px; gap: 12px; align-items: center; font-size: .9rem; }
.bar-row b { font-family: var(--font-mono); text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 480px) { .bar-row { grid-template-columns: minmax(0, 1fr) 80px; } .bar-row .bar { grid-column: 1 / -1; grid-row: 2; } }
.bar { height: 22px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--text-muted); transition: width .6s cubic-bezier(.2, .8, .2, 1); }
.bar.pl i { background: var(--accent); }
.calc-big { font-size: 1.15rem; }
.calc-big strong { display: block; font-family: var(--font-display); font-size: clamp(2.6rem, 6vw, 3.8rem); line-height: 1.05; color: var(--success); font-variant-numeric: tabular-nums; }
.calc-big.more strong { color: var(--text); }
.calc .btn { align-self: flex-start; }

/* Interactive floor */
.fd-tabs button { font: inherit; color: inherit; background: none; border: 1px solid var(--border-input); border-radius: 999px; padding: 4px 12px; cursor: pointer; transition: background .2s ease, color .2s ease; }
.fd-tabs button:hover { background: var(--surface-2); }
.fd-tabs button.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.fd-tabs button.on i { color: inherit; opacity: .8; }
.fd-tabs .add { border-style: dashed; color: var(--text-muted); margin-left: auto; }
.fd-room.live .fd-t { cursor: grab; touch-action: none; user-select: none; transition: border-color .25s ease, background .25s ease, box-shadow .2s ease, transform .2s ease; }
.fd-room.live .fd-t:hover { box-shadow: 0 6px 16px rgba(0, 0, 0, .12); }
.fd-room.live .fd-t.grabbing { cursor: grabbing; transform: scale(1.08) rotate(-2deg); box-shadow: 0 16px 30px rgba(0, 0, 0, .2); z-index: 3; transition: none; }
.fd-room.live .fd-t, .fd-room.live .fd-t.drag { animation: none !important; }
.fd-room.live .fd-hand, .fd-room.live .fd-slot { display: none; }
.fd-t.seated { border-color: var(--warning); background: var(--warning-soft); }
.fd-t.bill { border-color: var(--danger); background: var(--danger-soft); }
.fd-room.live .fd-t.new, .fd-t.new { animation: pop-in .45s cubic-bezier(.3, 1.6, .5, 1) both !important; }
@keyframes pop-in { from { transform: scale(0); } }
.fd-room.live.swap-in .fd-t { animation: pop-in .4s cubic-bezier(.3, 1.6, .5, 1) both !important; }
.fd-foot { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; }
.fd-hint { font-size: .85rem; color: var(--text-muted); font-weight: 600; }

/* AI call */
.call-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 460px); gap: 56px; align-items: center; }
@media (max-width: 900px) { .call-wrap { grid-template-columns: minmax(0, 1fr); gap: 32px; } }
.call { background: #1d1714; color: #f1e9e1; border-radius: 26px; padding: 22px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 16px; min-height: 440px; min-width: 0; }
.call-head { display: grid; grid-template-columns: 48px 1fr auto; gap: 12px; align-items: center; }
.call-head strong { display: block; }
.call-head span { font-size: .85rem; color: #b3a497; }
.call-avatar { width: 48px; height: 48px; border-radius: 50%; background: #2f7a4a; display: grid; place-items: center; }
.call-avatar svg { width: 22px; height: 22px; fill: none; stroke: #fff; stroke-width: 2; stroke-linejoin: round; }
.call.ringing .call-avatar { animation: ring .5s ease-in-out infinite alternate; box-shadow: 0 0 0 6px rgba(47, 122, 74, .3); }
@keyframes ring { from { transform: rotate(-10deg); } to { transform: rotate(10deg); } }
.wave { display: flex; gap: 3px; align-items: center; height: 26px; }
.wave i { width: 4px; height: 6px; border-radius: 2px; background: #f08c5a; transition: height .1s; }
.call.talking .wave i { animation: wave .8s ease-in-out infinite; }
.call.talking .wave i:nth-child(2) { animation-delay: .1s; } .call.talking .wave i:nth-child(3) { animation-delay: .2s; }
.call.talking .wave i:nth-child(4) { animation-delay: .3s; } .call.talking .wave i:nth-child(5) { animation-delay: .15s; }
.call.talking .wave i:nth-child(6) { animation-delay: .25s; } .call.talking .wave i:nth-child(7) { animation-delay: .05s; }
.call.caller .wave i { background: #86aef0; }
@keyframes wave { 50% { height: 24px; } }
.call-log { display: flex; flex-direction: column; gap: 10px; flex: 1; font-size: .92rem; max-height: 380px; overflow-y: auto; scroll-behavior: smooth; }
.msg { max-width: 85%; padding: 9px 13px; border-radius: 16px; animation: rise .35s ease both; line-height: 1.45; }
.msg.them { align-self: flex-start; background: #2a2320; border-bottom-left-radius: 4px; }
.msg.ai { align-self: flex-end; background: #b4441c; color: #fff; border-bottom-right-radius: 4px; }
.msg small { display: block; font-size: .7rem; opacity: .7; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 2px; }
.typing { display: inline-flex; gap: 4px; padding: 4px 0; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .5; animation: blink 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 50% { opacity: 1; } }
.call-booked { background: #fffdfa; color: #221a14; border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; animation: arrive .6s cubic-bezier(.2, .9, .3, 1.2) both; }
.call-booked span:last-child { color: #6b5d50; font-size: .85rem; }
.call .btn { align-self: flex-start; }

/* Welcome confetti */
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 50; width: 100%; height: 100%; }
@media (prefers-reduced-motion: reduce) { .try-path.go span { animation: none; } }

/* Staff timesheets: real app screens in a device frame, staff view and owner view */
.chip.new { background: var(--accent); color: var(--on-accent); }
.ts-wrap { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 56px; align-items: center; }
@media (max-width: 900px) { .ts-wrap { grid-template-columns: minmax(0, 1fr); gap: 32px; } }
.ts-points { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.ts-points li { position: relative; padding-left: 34px; color: var(--text-muted); }
.ts-points li b { color: var(--text); font-weight: 650; }
.ts-points li::before { content: "✓"; position: absolute; left: 0; top: 1px; width: 22px; height: 22px; border-radius: 7px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-size: .8rem; font-weight: 700; }
.ts-shots { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.ts-tabs { display: inline-flex; align-self: flex-start; gap: 4px; padding: 4px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); max-width: 100%; }
.ts-tabs button { font: inherit; font-weight: 600; font-size: .92rem; border: 0; background: transparent; color: var(--text-muted); padding: 7px 14px; border-radius: 999px; cursor: pointer; transition: background .25s ease, color .25s ease; }
.ts-tabs button.on { background: var(--accent); color: var(--on-accent); }
.ts-tabs button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ts-device { position: relative; transform: rotate(1deg); outline: 1px solid var(--border); }
.ts-stage { display: grid; border-radius: 16px; overflow: hidden; background: #f7f3ee; }
.ts-stage img { grid-area: 1 / 1; border-radius: 0; opacity: 0; visibility: hidden; }
.ts-stage img.on { opacity: 1; visibility: visible; }
.ts-toast { position: absolute; right: -10px; bottom: 26px; background: #221a14; color: #f7f3ee; border-radius: 10px; padding: 9px 13px; font-size: .85rem; box-shadow: 0 8px 24px rgba(0, 0, 0, .25); display: flex; gap: 9px; align-items: center; max-width: 80%; }
.ts-toast .ic { width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; background: #b4441c; color: #fff; flex: none; font-size: .75rem; font-weight: 700; }
@media (max-width: 560px) { .ts-toast { right: 8px; bottom: 18px; font-size: .78rem; } .ts-tabs button { padding: 7px 11px; font-size: .85rem; } }
@media (prefers-reduced-motion: no-preference) {
  .ts-device { transition: transform .6s cubic-bezier(.2, .8, .2, 1); }
  .ts-shots:hover .ts-device { transform: rotate(0deg) translateY(-4px); }
  .ts-stage img { transition: opacity .5s ease, transform .6s cubic-bezier(.2, .8, .2, 1), visibility 0s linear .5s; transform: scale(1.03); }
  .ts-stage img.on { transition: opacity .5s ease, transform .6s cubic-bezier(.2, .8, .2, 1), visibility 0s; transform: none; }
  .ts-toast { transition: opacity .35s ease, transform .45s cubic-bezier(.3, 1.6, .5, 1); }
  .ts-toast.hide { opacity: 0; transform: translateY(10px) scale(.92); }
  .ts-points li::before { transition: transform .35s cubic-bezier(.3, 1.6, .5, 1); }
  .ts-points li:hover::before { transform: rotate(-8deg) scale(1.15); }
}
@media (prefers-reduced-motion: reduce) { .ts-toast.hide { opacity: 0; } }

/* Stock: real app screens (shots on the left this time), then a counter visitors can tap */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.stk-wrap { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); }
.stk-wrap .ts-device { transform: rotate(-1deg); }
@media (max-width: 900px) { .stk-wrap { grid-template-columns: minmax(0, 1fr); } .stk-wrap > .stack { order: -1; } }
.stk-try { --p-ok: var(--success); margin-top: 64px; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, .9fr); gap: 24px; align-items: start; }
@media (max-width: 900px) { .stk-try { grid-template-columns: minmax(0, 1fr); margin-top: 48px; } }
.stk-pad, .stk-card { background: var(--bg); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow); padding: 20px; min-width: 0; }
.stk-pad-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.stk-pad-head strong { font-family: var(--font-display); font-size: 1.15rem; }
.stk-label { margin: 0 0 6px; font-weight: 600; font-size: .92rem; }
.stk-modes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--border-input); border-radius: 12px; overflow: hidden; background: var(--surface); }
.stk-modes button { font: inherit; font-weight: 600; font-size: .95rem; border: 0; border-left: 1px solid var(--border); background: transparent; color: var(--text-muted); padding: 11px 6px; cursor: pointer; min-height: 46px; }
.stk-modes button:first-child { border-left: 0; }
.stk-modes button.on { background: var(--accent); color: var(--on-accent); }
.stk-modes button:focus-visible { outline: 2px solid var(--accent); outline-offset: -4px; }
.stk-help { margin: 8px 0 12px; min-height: 1.5em; }
.stk-list { list-style: none; margin: 0; padding: 0 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; }
.stk-row { display: grid; grid-template-columns: minmax(0, 1fr) 52px 74px 52px; align-items: center; gap: 8px; padding: 12px 0; border-top: 1px solid var(--border); border-radius: 10px; }
.stk-row:first-child { border-top: 0; }
.stk-name { min-width: 0; }
.stk-name b { font-weight: 650; }
.stk-name small { display: block; color: var(--text-muted); font-size: .85rem; }
.stk-low { display: inline-block; margin-left: 8px; font-size: .75rem; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: var(--danger-soft); color: var(--danger); vertical-align: 2px; }
.stk-btn { font: 600 1.6rem/1 var(--font); width: 52px; height: 52px; border-radius: 12px; border: 1px solid var(--border-input); background: var(--surface); color: var(--text); cursor: pointer; touch-action: manipulation; }
.stk-btn.plus { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.stk-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.stk-btn:active { transform: scale(.94); }
.stk-qty { text-align: center; line-height: 1.1; }
.stk-qty b { display: block; font-size: 1.35rem; font-variant-numeric: tabular-nums; }
.stk-qty small { color: var(--text-muted); font-size: .78rem; }
.stk-row.low .stk-qty b { color: var(--danger); }
.stk-set { grid-column: 2 / -1; display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.stk-set input { width: 110px; font: 600 1.15rem var(--font); padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border-input); background: var(--surface); color: var(--text); text-align: right; }
.stk-set input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.stk-set small { color: var(--text-muted); width: 52px; font-size: .85rem; }
.stk-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.stk-card h3 { margin-bottom: 10px; }
.stk-order, .stk-log { list-style: none; margin: 0; padding: 0; }
.stk-order li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px dashed var(--border-input); }
.stk-order li:first-child { border-top: 0; }
.stk-order li b { color: var(--danger); }
.stk-order li.empty, .stk-log li.empty { color: var(--text-muted); font-size: .92rem; display: block; }
.stk-totals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.stk-totals div { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; min-width: 0; }
.stk-totals b { display: block; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.stk-totals span { color: var(--text-muted); font-size: .8rem; }
.stk-log li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 2px 10px; padding: 7px 0; border-top: 1px solid var(--border); font-size: .9rem; }
.stk-log li:first-child { border-top: 0; }
.stk-log .when { color: var(--text-muted); font-variant-numeric: tabular-nums; grid-row: span 2; }
.stk-log .why { grid-column: 2 / -1; color: var(--text-muted); font-size: .8rem; }
.stk-log b.neg { color: var(--text); } .stk-log b.pos { color: var(--success); }
@media (max-width: 560px) {
  .stk-pad, .stk-card { padding: 14px; }
  .stk-list { padding: 0 10px; }
  .stk-row { grid-template-columns: minmax(0, 1fr) 46px 58px 46px; gap: 6px; }
  .stk-btn { width: 46px; height: 46px; }
  .stk-modes button { font-size: .85rem; padding: 10px 2px; }
}
@media (prefers-reduced-motion: no-preference) {
  .stk-btn { transition: transform .12s ease, background .2s ease; }
  .stk-row.flash-used, .stk-row.flash-waste { animation: stk-flash-out .7s ease; }
  .stk-row.flash-delivery { animation: stk-flash-in .7s ease; }
  .stk-row.flash-count { animation: stk-flash-count .7s ease; }
  .stk-row[class*="flash-"] .stk-qty b { animation: stk-bump .35s cubic-bezier(.3, 1.6, .5, 1); }
  .stk-low.pop { animation: stk-pop .5s cubic-bezier(.3, 1.6, .5, 1); }
  .stk-log li.new { animation: stk-in .4s ease; }
  .stk-list:not(.touched) .stk-row[data-i="1"] .stk-btn.minus { animation: stk-nudge 1.6s infinite; }
  @keyframes stk-flash-out { 0% { background: var(--accent-soft); } 100% { background: transparent; } }
  @keyframes stk-flash-in { 0% { background: var(--success-soft); } 100% { background: transparent; } }
  @keyframes stk-flash-count { 0% { background: var(--warning-soft); } 100% { background: transparent; } }
  @keyframes stk-bump { 40% { transform: scale(1.25); } }
  @keyframes stk-pop { 0% { transform: scale(0); } 100% { transform: scale(1); } }
  @keyframes stk-in { from { opacity: 0; transform: translateY(-6px); } }
  @keyframes stk-nudge { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 45%, transparent); } 70%, 100% { box-shadow: 0 0 0 10px transparent; } }
}
