/* Pirur — bakery awning identity. Logical properties throughout so RTL/LTR mirror cleanly. */
:root {
  --bg: #E9F1DC;          /* pistachio */
  --bg-2: #DDE9CC;
  --card: #FFFFFF;
  --ink: #3E2016;         /* cinnamon */
  --ink-2: #6E4A3B;
  --muted: #7D6457;
  --line: #D6E2C4;
  --pink: #FF8FAB;        /* glaze */
  --pink-ink: #B8325A;    /* readable pink on white */
  --pink-soft: #FFE3EB;
  --butter: #FFD166;
  --butter-soft: #FFF1CC;
  --mint: #7FC8A9;
  --mint-ink: #2F7A5A;
  --danger: #C2413B;
  --hero: #4A2618;
  --hero-ink: #FFF4EC;
  --shadow: 0 1px 0 rgba(62, 32, 22, .06), 0 6px 18px -10px rgba(62, 32, 22, .35);
  --r-lg: 22px; --r-md: 16px; --r-sm: 10px;
  --st-new: #FFD166; --st-confirmed: #9CC5FF; --st-baking: #FFB077; --st-ready: #7FC8A9; --st-done: #CDBFB7; --st-cancelled: #E6A3A3;
  --font-display: 'Fredoka', 'Assistant', system-ui, sans-serif;
  --font-body: 'Assistant', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --tabbar-h: 68px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #23160F; --bg-2: #2E1E16; --card: #33221A; --ink: #FBEFE6; --ink-2: #E7D3C6; --muted: #C2A797; --line: #4A3328;
    --pink-ink: #FF9DB7; --pink-soft: #4A2632; --butter-soft: #4A3A1A; --mint-ink: #8FDDBB; --danger: #FF8A80;
    --hero: #FFD9C2; --hero-ink: #3E2016; --shadow: 0 6px 18px -10px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #23160F; --bg-2: #2E1E16; --card: #33221A; --ink: #FBEFE6; --ink-2: #E7D3C6; --muted: #C2A797; --line: #4A3328;
  --pink-ink: #FF9DB7; --pink-soft: #4A2632; --butter-soft: #4A3A1A; --mint-ink: #8FDDBB; --danger: #FF8A80;
  --hero: #FFD9C2; --hero-ink: #3E2016; --shadow: 0 6px 18px -10px rgba(0, 0, 0, .7);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 17px/1.45 var(--font-body);
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
  padding-block-end: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 24px);
  min-height: 100dvh;
}
body.sheet-open { overflow: hidden; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; margin: 0; letter-spacing: -0.01em; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
.hidden { display: none !important; }
.ltr { direction: ltr; unicode-bidi: isolate; }
[dir="rtl"] .flip { transform: scaleX(-1); }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.center { text-align: center; }
.pad { padding: 8px 2px; }
.pre { white-space: pre-wrap; }
.good-text { color: var(--mint-ink); } .warn-text { color: var(--pink-ink); }
.skip { position: absolute; inset-inline-start: -999px; top: 8px; background: var(--card); padding: 8px 12px; border-radius: 8px; z-index: 99; }
.skip:focus { inset-inline-start: 8px; }
:focus-visible { outline: 3px solid var(--pink-ink); outline-offset: 2px; border-radius: 6px; }
.ic { inline-size: 22px; block-size: 22px; flex: none; }

/* ---------- awning (the one loud thing) ---------- */
.awning { position: sticky; top: 0; z-index: 20; }
.awning-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(env(safe-area-inset-top) + 10px) 14px 10px;
  background: repeating-linear-gradient(90deg, var(--pink) 0 28px, #FFF5F7 28px 56px);
}
.scallop {
  block-size: 14px;
  background: radial-gradient(circle at 14px 0, var(--pink) 13px, transparent 14px) 0 0 / 56px 14px repeat-x,
              radial-gradient(circle at 42px 0, #FFF5F7 13px, transparent 14px) 0 0 / 56px 14px repeat-x;
  filter: drop-shadow(0 3px 2px rgba(62, 32, 22, .12));
}
.sign {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none;
  background: #FFFFFF; color: #3E2016; border: 2px solid #3E2016; border-radius: 999px;
  padding: 4px 16px 4px 6px; padding-inline: 6px 16px;
  font: 600 21px/1 var(--font-display); box-shadow: 0 3px 0 #3E2016;
}
.sign-mark { inline-size: 30px; block-size: 30px; }
.lang-btn {
  min-inline-size: 48px; min-block-size: 40px; border-radius: 999px; border: 2px solid #3E2016; background: var(--butter);
  color: #3E2016; font: 600 16px/1 var(--font-display); box-shadow: 0 3px 0 #3E2016; cursor: pointer;
}
.lang-btn:active, .sign:active { transform: translateY(2px); box-shadow: 0 1px 0 #3E2016; }

/* ---------- page ---------- */
main { display: block; max-inline-size: 640px; margin-inline: auto; padding-inline: 16px; outline: none; }
.page { padding-block: 10px 8px; }
.page-head { display: flex; align-items: center; gap: 8px; margin-block: 8px 14px; min-block-size: 44px; }
.page-head h1 { font-size: 28px; flex: 1; min-inline-size: 0; overflow-wrap: anywhere; }
.page-head-actions { display: flex; gap: 4px; }
.greet { font: 500 20px/1.3 var(--font-display); margin: 8px 2px 14px; color: var(--ink-2); }
.block { margin-block: 22px; }
.block > h2, .card > h2 { font-size: 19px; margin-block-end: 10px; }
.card { background: var(--card); border-radius: var(--r-lg); padding: 16px; box-shadow: var(--shadow); margin-block: 14px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-block-size: 46px; padding: 10px 18px;
  border-radius: 999px; border: 0; background: var(--card); color: var(--ink); font-weight: 700; font-size: 16px;
  text-decoration: none; cursor: pointer; box-shadow: var(--shadow); white-space: nowrap;
}
.btn.primary { background: var(--ink); color: var(--bg); box-shadow: 0 4px 0 color-mix(in srgb, var(--ink) 60%, #000); }
.btn.primary:active { transform: translateY(2px); box-shadow: 0 2px 0 color-mix(in srgb, var(--ink) 60%, #000); }
.btn.ghost { background: transparent; box-shadow: inset 0 0 0 2px var(--line); }
.btn.cream { background: var(--hero-ink); color: var(--hero); box-shadow: none; }
.btn.danger { background: var(--danger); color: #fff; }
.danger-text { color: var(--danger) !important; }
.btn.small { min-block-size: 40px; padding: 8px 14px; font-size: 15px; }
.btn.big { min-block-size: 54px; font-size: 18px; padding-inline: 28px; }
.btn .ic { inline-size: 20px; block-size: 20px; }
.btn-row { display: flex; gap: 10px; margin-block: 14px; }
.btn-row.wrap { flex-wrap: wrap; }
.btn-row.sticky {
  position: sticky; bottom: 0; background: var(--card); padding-block: 12px calc(12px + env(safe-area-inset-bottom));
  margin-block: 16px 0; margin-inline: -18px; padding-inline: 18px; border-block-start: 1px solid var(--line); justify-content: flex-end;
}
.btn-row.sticky .btn.primary { min-inline-size: 120px; }
.icon-btn {
  display: inline-grid; place-items: center; inline-size: 44px; block-size: 44px; border-radius: 999px; border: 0;
  background: transparent; color: var(--ink); cursor: pointer; text-decoration: none; flex: none;
}
.icon-btn:active { background: var(--bg-2); }
.icon-btn.round { background: var(--bg); }
.icon-btn.wa { background: #25D366; color: #fff; }
.icon-btn .mini { font: 600 14px var(--font-display); }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-block: 12px; }

/* ---------- chips / segmented ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-block: 10px; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -16px; padding-inline: 16px; }
.chips.scroll::-webkit-scrollbar { display: none; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; min-block-size: 38px; padding: 6px 14px; border-radius: 999px;
  background: var(--card); border: 0; box-shadow: inset 0 0 0 1.5px var(--line); text-decoration: none; cursor: pointer;
  font-weight: 600; font-size: 15px; white-space: nowrap; color: var(--ink);
}
.chip.on { background: var(--ink); color: var(--bg); box-shadow: none; }
.chip.warn { background: var(--pink-soft); color: var(--pink-ink); box-shadow: none; }
.chip-check { position: relative; }
.chip-check input { position: absolute; opacity: 0; inset: 0; }
.chip-check span { display: inline-flex; min-block-size: 38px; align-items: center; padding: 6px 14px; border-radius: 999px; box-shadow: inset 0 0 0 1.5px var(--line); font-weight: 600; font-size: 15px; background: var(--card); }
.chip-check input:checked + span { background: var(--pink-soft); color: var(--pink-ink); box-shadow: inset 0 0 0 1.5px var(--pink); }
.chip-check input:focus-visible + span { outline: 3px solid var(--pink-ink); }

.seg { display: flex; background: var(--bg-2); border-radius: 999px; padding: 4px; gap: 2px; margin-block: 6px 12px; }
.seg a, .seg button, .seg label span {
  flex: 1; display: grid; place-items: center; min-block-size: 40px; border-radius: 999px; text-decoration: none; font-weight: 700; font-size: 15px;
  border: 0; background: transparent; cursor: pointer; padding-inline: 8px; white-space: nowrap;
}
.seg label { flex: 1; display: flex; position: relative; }
.seg label input { position: absolute; opacity: 0; }
.seg .on, .seg label input:checked + span { background: var(--card); box-shadow: var(--shadow); }
.seg label input:focus-visible + span { outline: 3px solid var(--pink-ink); }
.seg.small { margin: 0; }

/* ---------- pills ---------- */
.pill { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; background: var(--bg-2); color: var(--ink); white-space: nowrap; }
.pill.soft { background: var(--bg); }
.pill.paid { background: color-mix(in srgb, var(--mint) 35%, transparent); color: var(--mint-ink); }
.pill.unpaid { background: var(--pink-soft); color: var(--pink-ink); }
.pill.st-new { background: var(--st-new); color: #3E2016; } .pill.st-confirmed { background: var(--st-confirmed); color: #1F3A5F; }
.pill.st-baking { background: var(--st-baking); color: #5A2A08; } .pill.st-ready { background: var(--st-ready); color: #12402C; }
.pill.st-done { background: var(--st-done); color: #3E2016; } .pill.st-cancelled { background: var(--st-cancelled); color: #5A1414; }
.al-list { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.al { font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: var(--butter-soft); color: var(--ink); }
.tag { position: absolute; inset-block-start: 8px; inset-inline-end: 8px; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: var(--butter); color: #3E2016; }

/* ---------- hero (next bake day) ---------- */
.hero { background: var(--hero); color: var(--hero-ink); border-radius: 28px; padding: 20px 18px 18px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.hero::after { content: ''; position: absolute; inset-block-start: -40px; inset-inline-end: -40px; inline-size: 150px; block-size: 150px; border-radius: 50%;
  background: repeating-radial-gradient(circle, transparent 0 10px, color-mix(in srgb, var(--hero-ink) 9%, transparent) 10px 13px); pointer-events: none; }
.hero-when { display: flex; flex-direction: column; gap: 2px; }
.hero-kicker { font-weight: 700; font-size: 15px; opacity: .8; }
.hero-day { font: 600 46px/1.05 var(--font-display); color: var(--pink); letter-spacing: -0.02em; }
.hero-day.small { font-size: 26px; color: var(--hero-ink); }
.hero-date { font-size: 17px; font-weight: 600; }
.hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-block: 16px 12px; }
.hero-stats div { background: color-mix(in srgb, var(--hero-ink) 10%, transparent); border-radius: var(--r-md); padding: 10px 8px; text-align: center; }
.hero-stats b { display: block; font: 600 22px/1.1 var(--font-display); }
.hero-stats span { font-size: 13px; opacity: .85; }
.hero-bake { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-block: 2px 4px; }
.hb-item { display: flex; align-items: center; gap: 6px; background: var(--hero-ink); color: var(--hero); border-radius: 999px; padding: 4px 14px 4px 4px; padding-inline: 4px 14px; flex: none; }
.hb-item .art, .hb-item .photo { inline-size: 34px; block-size: 34px; border-radius: 50%; }
.hb-qty { font: 600 17px var(--font-display); }
.hb-name { font-size: 14px; font-weight: 600; max-inline-size: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hero-foot { margin-block: 10px 4px; font-size: 15px; }
.hero-foot .closed { opacity: .7; }
.hero-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-block-start: 10px; }
.hero-actions .btn { flex: 1; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-block: 14px; }
.stats.four { grid-template-columns: repeat(2, 1fr); }
.stat { background: var(--card); border-radius: var(--r-md); padding: 12px; box-shadow: var(--shadow); text-decoration: none; display: flex; flex-direction: column; gap: 2px; min-inline-size: 0; }
.stat span { font-size: 13px; color: var(--muted); font-weight: 600; }
.stat b { font: 600 20px/1.2 var(--font-display); overflow-wrap: anywhere; }
.stat.alert b { color: var(--pink-ink); }
.stat.hi { background: var(--butter); color: #3E2016; } .stat.hi span { color: #6E4A3B; }

.banner { display: flex; align-items: center; gap: 12px; background: var(--butter-soft); border-radius: var(--r-md); padding: 12px; margin-block: 0 14px; flex-wrap: wrap; }
.banner p { flex: 1 1 180px; margin: 0; font-size: 15px; }
.banner.warn { background: var(--pink-soft); }

/* ---------- tickets (orders) ---------- */
.tickets { display: flex; flex-direction: column; gap: 10px; }
.ticket {
  --st: var(--st-new);
  position: relative; display: block; text-decoration: none; background: var(--card); border-radius: var(--r-md);
  padding: 12px 14px; padding-inline-start: 24px; box-shadow: var(--shadow);
  background-image: linear-gradient(var(--st), var(--st)); background-size: 8px 100%; background-repeat: no-repeat; background-position: left;
}
[dir="rtl"] .ticket { background-position: right; }
.ticket::before {   /* perforation */
  content: ''; position: absolute; inset-block: 8px; inset-inline-start: 13px; border-inline-start: 2px dotted var(--line);
}
.ticket.st-confirmed { --st: var(--st-confirmed); } .ticket.st-baking { --st: var(--st-baking); } .ticket.st-ready { --st: var(--st-ready); }
.ticket.st-done { --st: var(--st-done); opacity: .85; } .ticket.st-cancelled { --st: var(--st-cancelled); opacity: .7; }
.ticket-top { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.ticket-name { font-weight: 700; font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ticket-total { font: 600 18px var(--font-display); white-space: nowrap; }
.ticket-items { color: var(--ink-2); font-size: 15px; margin-block: 2px 8px; }
.ticket-items .sep { color: var(--muted); }
.ticket-meta { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.ticket-when { margin-inline-start: auto; font-size: 14px; color: var(--muted); font-weight: 600; }
.day-group { margin-block: 18px; }
.day-head { font-size: 17px; margin-block-end: 8px; }
.day-head .muted { font-family: var(--font-body); font-weight: 600; font-size: 15px; }

/* ---------- order page ---------- */
.cust-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cust-name { font: 600 22px/1.2 var(--font-display); text-decoration: none; }
.cust-actions { display: flex; gap: 8px; }
.ltr.big { font: 600 20px var(--font-display); }
.note { display: flex; gap: 8px; align-items: flex-start; border-radius: var(--r-sm); padding: 10px 12px; margin-block-start: 10px; background: var(--bg); font-size: 15px; font-weight: 600; }
.note.warn { background: var(--pink-soft); color: var(--pink-ink); }
.note.good { background: var(--butter-soft); }
.receipt { padding: 0; overflow: hidden; }
.receipt-when { display: flex; align-items: center; gap: 8px; padding: 14px 16px; background: var(--butter-soft); font-weight: 700; flex-wrap: wrap; }
.receipt-when .pill { margin-inline-start: auto; background: var(--card); }
.receipt-lines { list-style: none; margin: 0; padding: 6px 16px; }
.receipt-lines li { display: flex; align-items: center; gap: 10px; padding-block: 10px; border-block-end: 1px dashed var(--line); }
.receipt-lines li:last-child { border: 0; }
.receipt-lines .art, .receipt-lines .photo { inline-size: 36px; block-size: 36px; border-radius: 10px; }
.rl-name { flex: 1; display: flex; flex-direction: column; min-inline-size: 0; font-weight: 700; }
.rl-name small { font-weight: 400; color: var(--muted); }
.rl-qty { font: 600 17px var(--font-display); color: var(--ink-2); }
.rl-price { font-weight: 700; min-inline-size: 64px; text-align: end; }
.receipt-total { display: flex; justify-content: space-between; padding: 14px 16px; border-block-start: 2px solid var(--ink); margin-inline: 16px; font-weight: 700; }
.receipt-total b { font: 600 24px var(--font-display); }

.stepper { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); position: relative; }
.stepper::before { content: ''; position: absolute; inset-inline: 10%; inset-block-start: 21px; border-block-start: 3px dotted var(--line); }
.stepper button { display: flex; flex-direction: column; align-items: center; gap: 6px; inline-size: 100%; background: none; border: 0; cursor: pointer; padding: 0; position: relative; }
.stepper .dot { inline-size: 42px; block-size: 42px; border-radius: 50%; background: var(--card); box-shadow: inset 0 0 0 2px var(--line); display: grid; place-items: center; color: var(--ink); }
.stepper .dot .ic { inline-size: 20px; block-size: 20px; }
.stepper .lbl { font-size: 13px; font-weight: 700; color: var(--muted); text-align: center; }
.stepper .past .dot { background: var(--ink); color: var(--bg); box-shadow: none; }
.stepper .now .dot { background: var(--pink); box-shadow: 0 0 0 4px var(--pink-soft); }
.stepper .now .lbl { color: var(--ink); }

.pay-row { display: flex; flex-direction: column; gap: 6px; }
.toggle { display: inline-flex; align-items: center; gap: 10px; background: none; border: 0; cursor: pointer; font-weight: 700; font-size: 17px; padding: 4px 0; align-self: flex-start; }
.toggle .knob { inline-size: 52px; block-size: 30px; border-radius: 999px; background: var(--line); position: relative; transition: background .2s; }
.toggle .knob::after { content: ''; position: absolute; inset-block-start: 3px; inset-inline-start: 3px; inline-size: 24px; block-size: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: inset-inline-start .2s; }
.toggle.on .knob { background: var(--mint); }
.toggle.on .knob::after { inset-inline-start: 25px; }
.wa-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.wa-btn { background: color-mix(in srgb, #25D366 16%, var(--card)); color: var(--ink); box-shadow: none; white-space: normal; text-align: center; line-height: 1.2; }
.wa-btn .ic { color: #1DA851; }

/* ---------- product grid ---------- */
.prod-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.prod-card { position: relative; background: var(--card); border: 0; border-radius: var(--r-lg); padding: 14px 12px 12px; box-shadow: var(--shadow); text-align: start; cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
.prod-card.off { opacity: .55; }
.prod-vis { display: grid; place-items: center; background: var(--bg); border-radius: var(--r-md); padding: 8px; margin-block-end: 8px; aspect-ratio: 1.3; }
.prod-vis .photo { inline-size: 100%; block-size: 100%; object-fit: cover; border-radius: 12px; }
.prod-name { font-weight: 700; line-height: 1.2; }
.prod-unit { font-size: 13px; color: var(--muted); }
.prod-price { font: 600 20px var(--font-display); margin-block-start: 4px; }
.prod-margin { font-size: 13px; font-weight: 700; color: var(--mint-ink); }
.prod-margin.low { color: var(--pink-ink); }
.photo { object-fit: cover; border-radius: 12px; }

/* ---------- lists ---------- */
.list { display: flex; flex-direction: column; background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow); overflow: hidden; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 14px 16px; text-decoration: none; border: 0; background: none; text-align: start; inline-size: 100%; cursor: pointer; border-block-end: 1px solid var(--line); }
.list-item:last-child { border-block-end: 0; }
.list-item.static { cursor: default; }
.list-item.low { background: color-mix(in srgb, var(--pink-soft) 50%, transparent); }
.li-main { flex: 1; min-inline-size: 0; display: flex; flex-direction: column; gap: 3px; }
.li-title { font-weight: 700; }
.li-sub { font-size: 14px; color: var(--muted); }
.li-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-block-start: 2px; }
.li-amt { font: 600 17px var(--font-display); white-space: nowrap; }
.chev { color: var(--muted); }
.avatar { inline-size: 42px; block-size: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--pink-soft); color: var(--pink-ink); font: 600 19px var(--font-display); flex: none; }
.meter { block-size: 6px; border-radius: 99px; background: var(--bg-2); overflow: hidden; margin-block-start: 4px; }
.meter span { display: block; block-size: 100%; background: var(--mint); border-radius: 99px; }
.ing-item.low .meter span { background: var(--pink); }

/* ---------- recipe ---------- */
.scale-card { display: flex; flex-direction: column; gap: 10px; }
.scale-in { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-weight: 700; }
.stepper-in { display: inline-flex; align-items: center; gap: 2px; background: var(--bg); border-radius: 999px; padding: 2px; }
.stepper-in input { inline-size: 44px; text-align: center; border: 0; background: transparent; font: 600 18px var(--font-display); padding: 0; }
.stepper-in.big input { inline-size: 64px; font-size: 22px; }
.scale-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 15px; color: var(--ink-2); }
.ing-list { list-style: none; margin: 0; padding: 4px 16px; background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.ing-list li { display: flex; gap: 14px; align-items: baseline; padding-block: 10px; border-block-end: 1px dashed var(--line); }
.ing-list li:last-child { border: 0; }
.ing-q { font: 600 17px var(--font-display); min-inline-size: 96px; color: var(--pink-ink); white-space: nowrap; }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.steps li { display: flex; gap: 12px; background: var(--card); border-radius: var(--r-md); padding: 12px; box-shadow: var(--shadow); }
.step-n { inline-size: 32px; block-size: 32px; border-radius: 50%; background: var(--butter); color: #3E2016; display: grid; place-items: center; font: 600 16px var(--font-display); flex: none; }
.step-t { flex: 1; } .step-t p { margin: 4px 0 6px; }
.timer-btn { background: var(--pink-soft); color: var(--pink-ink); box-shadow: none; }

/* ---------- plan ---------- */
.bake-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; margin-block-end: 12px; }
.bake-tile { background: var(--card); border-radius: var(--r-md); padding: 10px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; box-shadow: var(--shadow); font-size: 14px; font-weight: 600; }
.bake-tile b { font: 600 22px var(--font-display); color: var(--pink-ink); }
.bake-tile .photo { border-radius: 50%; }
.tbl { inline-size: 100%; border-collapse: collapse; background: var(--card); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow); font-size: 15px; }
.tbl th, .tbl td { padding: 10px 12px; text-align: start; border-block-end: 1px solid var(--line); }
.tbl th { font-size: 13px; color: var(--muted); }
.tbl td.num { text-align: end; white-space: nowrap; }
.tbl tr.short td { background: color-mix(in srgb, var(--pink-soft) 60%, transparent); }
.tbl tr.short td:first-child { font-weight: 700; color: var(--pink-ink); }

/* ---------- timers ---------- */
.timers { display: flex; flex-direction: column; gap: 10px; }
.timer-row { display: flex; align-items: center; gap: 12px; background: var(--card); border-radius: var(--r-md); padding: 10px 8px 10px 14px; padding-inline: 14px 8px; box-shadow: var(--shadow); }
.timer-ring { inline-size: 44px; block-size: 44px; border-radius: 50%; background: var(--pink-soft); color: var(--pink-ink); display: grid; place-items: center; flex: none; }
.timer-info { flex: 1; min-inline-size: 0; }
.timer-label { font-weight: 700; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.timer-left { font: 600 28px/1.1 var(--font-display); font-variant-numeric: tabular-nums; text-align: start; }
.timer-btns { display: flex; }
.timer-row.paused .timer-left { opacity: .5; }
.timer-row.done { background: var(--butter); color: #3E2016; animation: pulse 1s ease-in-out infinite alternate; }
.timer-row.done .icon-btn { color: #3E2016; }
@keyframes pulse { to { box-shadow: 0 0 0 6px color-mix(in srgb, var(--butter) 50%, transparent); } }
.timer-new { display: flex; gap: 8px; margin-block-start: 12px; }
.timer-new input { flex: 1; min-inline-size: 0; }
.timer-new .w-num { flex: 0 0 80px; }
.badge { position: absolute; inset-block-start: 8px; inset-inline-end: calc(50% - 20px); inline-size: 10px; block-size: 10px; border-radius: 50%; background: var(--pink); box-shadow: 0 0 0 2px var(--card); }

/* ---------- shopping / checklist ---------- */
.shop { display: flex; flex-direction: column; background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow); overflow: hidden; }
.shop-row { display: flex; align-items: center; border-block-end: 1px solid var(--line); }
.shop-row:last-child { border: 0; }
.shop-row .shop-item { border: 0; flex: 1; }
.shop-item { display: flex; align-items: center; gap: 12px; padding: 13px 16px; cursor: pointer; border-block-end: 1px solid var(--line); position: relative; }
.shop > .shop-item:last-child { border: 0; }
.shop-item input { position: absolute; opacity: 0; inline-size: 1px; }
.shop-item .box { inline-size: 26px; block-size: 26px; border-radius: 8px; box-shadow: inset 0 0 0 2px var(--line); display: grid; place-items: center; color: transparent; flex: none; }
.shop-item .box .ic { inline-size: 18px; block-size: 18px; }
.shop-item input:checked + .box { background: var(--mint); color: #fff; box-shadow: none; }
.shop-item input:focus-visible + .box { outline: 3px solid var(--pink-ink); }
.shop-text { display: flex; flex-direction: column; font-weight: 600; }
.shop-text small { font-weight: 400; color: var(--muted); font-size: 14px; }
.shop-item.got .shop-text { text-decoration: line-through; opacity: .55; }
.link-out { padding-inline: 16px; font-weight: 700; font-size: 14px; color: var(--pink-ink); }
.progress { block-size: 12px; background: var(--bg-2); border-radius: 99px; overflow: hidden; margin-block: 6px; }
.progress span { display: block; block-size: 100%; background: linear-gradient(90deg, var(--mint), var(--butter)); border-radius: 99px; }
[dir="rtl"] .progress span { background: linear-gradient(-90deg, var(--mint), var(--butter)); }

/* ---------- more ---------- */
.more-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-block: 8px 20px; }
.more-tile { background: var(--card); border-radius: var(--r-lg); padding: 18px 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 12px; text-decoration: none; font-weight: 700; font-size: 17px; }
.mt-ic { inline-size: 46px; block-size: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--pink-soft); color: var(--pink-ink); }
.more-tile:nth-child(2) .mt-ic { background: var(--butter-soft); color: var(--ink); }
.more-tile:nth-child(3) .mt-ic { background: color-mix(in srgb, var(--mint) 30%, transparent); color: var(--mint-ink); }
.more-tile:nth-child(4) .mt-ic { background: var(--bg-2); color: var(--ink); }

/* customer */
.loyalty h2 { margin-block-end: 12px; }
.stamps { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; max-inline-size: 360px; }
.stamp { aspect-ratio: 1; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--line); display: grid; place-items: center; background: var(--bg); }
.stamp.on { background: var(--butter-soft); box-shadow: none; }
.stamp .art { inline-size: 80%; block-size: 80%; }

/* menu card */
.menu-card { background: #FFFFFF; color: #3E2016; border-radius: 26px; overflow: hidden; box-shadow: var(--shadow); padding: 0 20px 22px; margin-block: 14px 8px; }
.mc-awning { block-size: 36px; margin-inline: -20px; background: repeating-linear-gradient(90deg, #FF8FAB 0 22px, #FFF5F7 22px 44px);
  border-block-end: 3px solid #3E2016; }
.mc-name { font-size: 34px; text-align: center; margin-block-start: 18px; }
.mc-date { text-align: center; margin: 2px 0 14px; font-weight: 700; color: #B8325A; }
.mc-list { list-style: none; margin: 0; padding: 0; }
.mc-list li { display: flex; align-items: center; gap: 12px; padding-block: 10px; border-block-end: 2px dotted #EAD8CC; }
.mc-list li > div { flex: 1; display: flex; flex-direction: column; }
.mc-list small { color: #7D6457; }
.mc-list .photo { border-radius: 50%; }
.mc-price { font: 600 20px var(--font-display); }
.mc-foot { text-align: center; margin: 14px 0 0; font-weight: 600; color: #6E4A3B; }
.menu-text { white-space: pre-wrap; font-family: var(--font-body); font-size: 15px; background: var(--card); padding: 14px; border-radius: var(--r-md); box-shadow: var(--shadow); margin: 0; unicode-bidi: plaintext; }

/* money */
.chart { inline-size: 100%; block-size: auto; display: block; }
.b-rev { fill: var(--pink); } .b-exp { fill: var(--muted); opacity: .55; }
.b-lbl { font-size: 9px; fill: var(--muted); font-family: var(--font-body); }
.b-axis { stroke: var(--line); }
.legend { display: flex; gap: 16px; font-size: 13px; color: var(--muted); margin-block-start: 6px; }
.legend i { display: inline-block; inline-size: 10px; block-size: 10px; border-radius: 3px; margin-inline-end: 6px; }
.lg-rev { background: var(--pink); } .lg-exp { background: var(--muted); opacity: .55; }
.bars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.bars li { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; }
.bar-name { font-weight: 700; } .bar-name small { color: var(--muted); font-weight: 400; }
.bar { grid-column: 1 / -1; block-size: 10px; background: var(--bg); border-radius: 99px; overflow: hidden; order: 3; }
.bar span { display: block; block-size: 100%; background: var(--pink); border-radius: 99px; }

/* settings */
.days { display: flex; gap: 6px; }
.day { flex: 1; min-block-size: 44px; border-radius: 12px; border: 0; background: var(--bg); font-weight: 700; cursor: pointer; }
.day.on { background: var(--pink); color: #3E2016; }

/* ---------- forms ---------- */
.form { display: flex; flex-direction: column; gap: 14px; }
.card.form > h2 { margin: 0; }
.field { display: flex; flex-direction: column; gap: 6px; border: 0; padding: 0; margin: 0; min-inline-size: 0; }
.field-label { font-size: 14px; font-weight: 700; color: var(--ink-2); padding: 0; }
.field-hint { font-size: 13px; color: var(--muted); }
input:not([type=checkbox]):not([type=radio]):not([type=file]), select, textarea {
  inline-size: 100%; min-block-size: 48px; border-radius: 12px; border: 2px solid var(--line); background: var(--card); padding: 10px 12px; font-size: 17px;
}
input:focus, select:focus, textarea:focus { border-color: var(--pink); outline: none; box-shadow: 0 0 0 3px var(--pink-soft); }
textarea { resize: vertical; line-height: 1.4; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid2.align-end { align-items: end; }
.check { display: flex; align-items: center; gap: 10px; font-weight: 700; min-block-size: 48px; cursor: pointer; }
.check input { inline-size: 24px; block-size: 24px; accent-color: var(--ink); }
.w-num { inline-size: 84px !important; flex: none; text-align: center; }
.rows { display: flex; flex-direction: column; gap: 8px; }
.row-line { display: flex; gap: 6px; align-items: center; }
.row-line select { flex: 1; min-inline-size: 0; }
.row-line.part .muted { white-space: nowrap; }
.step-line { align-items: flex-start; }
.step-texts { flex: 1; display: flex; flex-direction: column; gap: 4px; min-inline-size: 0; }
.step-texts input { min-block-size: 42px !important; font-size: 15px !important; }
.pick-list { display: flex; flex-direction: column; gap: 6px; }
.pick { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: var(--r-md); background: var(--bg); transition: background .15s; }
.pick.has { background: var(--pink-soft); }
.pick .art, .pick .photo { inline-size: 44px; block-size: 44px; border-radius: 10px; flex: none; }
.pick-info { flex: 1; display: flex; flex-direction: column; font-weight: 700; min-inline-size: 0; line-height: 1.25; }
.pick-info small { font-weight: 400; color: var(--muted); }
.pick .stepper-in { background: var(--card); }
.pick .stepper-in input { inline-size: 36px; min-block-size: 0 !important; border: 0 !important; padding: 0 !important; background: transparent !important; box-shadow: none !important; }
.form-total { display: flex; justify-content: space-between; align-items: baseline; padding-block: 6px; font-weight: 700; }
.form-total b { font: 600 26px var(--font-display); }
.calc { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; background: var(--butter-soft); border-radius: var(--r-md); padding: 12px; }
.calc div { display: flex; flex-direction: column; } .calc span { font-size: 12px; color: var(--ink-2); font-weight: 700; }
.calc b { font: 600 18px var(--font-display); } .calc b.low { color: var(--pink-ink); }
.calc .calc-wide { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; gap: 4px; }
.photo-pick { display: flex; align-items: center; gap: 14px; }
.photo-prev { inline-size: 104px; block-size: 104px; border-radius: 18px; background: var(--bg); display: grid; place-items: center; overflow: hidden; flex: none; }
.photo-prev .photo { inline-size: 100%; block-size: 100%; border-radius: 0; }
.photo-btns { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.art-pick { display: flex; gap: 6px; flex-wrap: wrap; }
.art-opt { position: relative; cursor: pointer; }
.art-opt input { position: absolute; opacity: 0; }
.art-opt .art { display: block; padding: 4px; border-radius: 12px; background: var(--bg); box-shadow: inset 0 0 0 2px transparent; inline-size: 48px; block-size: 48px; }
.art-opt input:checked + .art { box-shadow: inset 0 0 0 2px var(--pink); background: var(--pink-soft); }
.art-opt input:focus-visible + .art { outline: 3px solid var(--pink-ink); }

/* ---------- sheet ---------- */
.sheet-wrap { position: fixed; inset: 0; z-index: 50; }
.sheet-scrim { position: absolute; inset: 0; background: rgba(43, 26, 19, .45); opacity: 0; transition: opacity .2s; }
.sheet {
  position: absolute; inset-inline: 0; inset-block-end: 0; max-block-size: 92dvh; display: flex; flex-direction: column;
  background: var(--card); border-radius: 26px 26px 0 0; transform: translateY(100%); transition: transform .24s cubic-bezier(.2, .8, .2, 1);
  max-inline-size: 640px; margin-inline: auto;
}
.sheet-wrap.in .sheet-scrim { opacity: 1; }
.sheet-wrap.in .sheet { transform: none; }
.sheet-grip { inline-size: 44px; block-size: 5px; border-radius: 99px; background: var(--line); margin: 10px auto 2px; flex: none; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 10px 4px 18px; padding-inline: 18px 10px; flex: none; }
.sheet-head h2 { font-size: 22px; }
.sheet-body { overflow-y: auto; padding: 8px 18px 0; overscroll-behavior: contain; }
.sheet-body > p.confirm-msg { font-size: 18px; font-weight: 600; margin: 14px 0 8px; }
.sheet-body > .btn-row { padding-block-end: calc(16px + env(safe-area-inset-bottom)); }
.sheet-body > .btn-row .btn { flex: 1; }

/* ---------- tabbar + fab ---------- */
.tabbar {
  position: fixed; inset-inline: 0; inset-block-end: 0; z-index: 30; display: flex; justify-content: space-around;
  background: var(--card); padding-block-end: env(safe-area-inset-bottom); border-radius: 22px 22px 0 0;
  box-shadow: 0 -4px 20px -12px rgba(62, 32, 22, .45); max-inline-size: 640px; margin-inline: auto;
}
.tabbar a { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-block-size: var(--tabbar-h); text-decoration: none; font-size: 12px; font-weight: 700; color: var(--muted); }
.tabbar a .ic { inline-size: 26px; block-size: 26px; padding: 2px; border-radius: 12px; box-sizing: content-box; padding-inline: 14px; transition: background .2s; }
.tabbar a.on { color: var(--ink); }
.tabbar a.on .ic { background: var(--pink-soft); color: var(--pink-ink); }
.fab {
  position: fixed; z-index: 31; inset-block-end: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 16px); inset-inline-end: max(16px, calc(50% - 304px));
  inline-size: 62px; block-size: 62px; border-radius: 50%; border: 3px solid #3E2016; background: var(--pink); color: #3E2016;
  display: grid; place-items: center; box-shadow: 0 4px 0 #3E2016; cursor: pointer;
}
.fab svg { inline-size: 30px; block-size: 30px; }
.fab:active { transform: translateY(3px); box-shadow: 0 1px 0 #3E2016; }
.fab[hidden] { display: none; }

/* ---------- toasts ---------- */
.toasts { position: fixed; inset-inline: 16px; inset-block-start: calc(env(safe-area-inset-top) + 76px); z-index: 70; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast { background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 999px; font-weight: 700; font-size: 15px; box-shadow: var(--shadow); animation: tin .2s ease-out; max-inline-size: 100%; text-align: center; }
.toast.bad { background: var(--danger); color: #fff; } .toast.good { background: var(--butter); color: #3E2016; }
.toast.out { opacity: 0; transform: translateY(-6px); transition: all .3s; }
@keyframes tin { from { opacity: 0; transform: translateY(-8px); } }

/* ---------- empty ---------- */
.empty { text-align: center; padding: 36px 16px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty p { color: var(--muted); font-weight: 600; margin: 0; max-inline-size: 30ch; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- labels / print ---------- */
.label-sheet { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.label { background: #FFFFFF; color: #3E2016; border: 2px solid #3E2016; border-radius: 14px; padding: 10px 12px; font-size: 12.5px; line-height: 1.35; break-inside: avoid; }
.lb-head { display: flex; justify-content: space-between; border-block-end: 1px dashed #3E2016; padding-block-end: 4px; margin-block-end: 6px; }
.lb-head b { font: 600 15px var(--font-display); }
.lb-name { font: 600 18px var(--font-display); margin-block-end: 4px; }
.lb-al { margin-block-start: 3px; } .lb-al b { text-decoration: underline; }
.lb-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-block-start: 6px; font-weight: 700; }
.lb-store { margin-block-start: 4px; font-weight: 700; }
@media print {
  @page { margin: 8mm; }
  body { background: #fff; padding: 0; }
  .awning, .tabbar, .fab, .toasts, .no-print, .skip { display: none !important; }
  main { max-inline-size: none; padding: 0; }
  .label-sheet { grid-template-columns: repeat(3, 1fr); gap: 4mm; }
  .label { border-width: 1px; }
}

@media (min-width: 560px) {
  .prod-grid { grid-template-columns: repeat(3, 1fr); }
  .stats.four { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 360px) {
  .hero-day { font-size: 38px; }
  .stats { gap: 6px; } .stat b { font-size: 17px; }
  .wa-grid { grid-template-columns: 1fr; }
}

/* specificity fixes: keep compact inputs compact */
.stepper-in input[inputmode] { inline-size: 44px !important; min-block-size: 40px !important; border: 0 !important; background: transparent !important; box-shadow: none !important; padding: 0 !important; text-align: center; font: 600 18px var(--font-display) !important; }
.stepper-in.big input[inputmode] { inline-size: 64px !important; font-size: 22px !important; }
.page-head h1:focus, main:focus { outline: none; }
[dir="rtl"] .field input[dir="ltr"]:not(.w-num) { text-align: right; }
.lang-btn { padding-inline: 10px; }
body[data-view="today"] main, body[data-view="orders"] main { padding-block-end: 84px; }
code { font-family: ui-monospace, Menlo, monospace; font-size: 13px; background: var(--bg); padding: 1px 5px; border-radius: 6px; }
.tbl th:not(:first-child) { text-align: end; }

/* ---------- Today: ask bar ---------- */
.askbar { display: flex; align-items: center; gap: 6px; background: var(--card); border-radius: 999px; padding: 6px; box-shadow: var(--shadow), inset 0 0 0 2px var(--pink); margin-block: 0 10px; }
.askbar-text { flex: 1; min-inline-size: 0; display: flex; align-items: center; gap: 8px; border: 0; background: none; text-align: start; padding: 8px 10px; cursor: pointer; color: var(--muted); font-weight: 600; font-size: 16px; }
.askbar-text span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.askbar-text .ic { color: var(--pink-ink); }
.askbar-btn { inline-size: 44px; block-size: 44px; border-radius: 50%; display: grid; place-items: center; border: 0; background: var(--bg); color: var(--ink); cursor: pointer; flex: none; }
.askbar-btn.mic { background: var(--pink); color: #3E2016; box-shadow: inset 0 0 0 2px #3E2016; }
.chips.quick { margin-block: 0 16px; }
.chips.quick .chip .ic, .photo-btn .ic { inline-size: 18px; block-size: 18px; }
.photo-btn { cursor: pointer; }
.h-icon { display: flex; align-items: center; gap: 8px; } .h-icon .ic { color: var(--pink-ink); }

/* ---------- "I baked this" ---------- */
.baked-btn { inline-size: 100%; background: var(--butter); color: #3E2016; box-shadow: 0 4px 0 #C9A13F; font-size: 17px; min-block-size: 54px; }
.baked-btn:active { transform: translateY(2px); box-shadow: 0 2px 0 #C9A13F; }
.baked-btn .art { inline-size: 30px; block-size: 30px; }
.baked-list { list-style: none; margin: 0; padding: 4px 12px; background: var(--bg); border-radius: var(--r-md); }
.baked-list li { display: grid; grid-template-columns: 1fr auto; gap: 0 10px; padding-block: 8px; border-block-end: 1px dashed var(--line); font-weight: 600; }
.baked-list li:last-child { border: 0; }
.bl-q { color: var(--pink-ink); font: 600 16px var(--font-display); white-space: nowrap; }
.bl-left { grid-column: 1 / -1; font-size: 13px; font-weight: 400; color: var(--muted); }
.baked-list li.short .bl-left { color: var(--danger); font-weight: 700; }

/* ---------- toast with action ---------- */
.toast.has-action { display: flex; align-items: center; gap: 12px; pointer-events: auto; padding-inline-end: 6px; }
.toast.has-action button { border: 0; border-radius: 999px; background: var(--butter); color: #3E2016; font-weight: 700; padding: 6px 14px; cursor: pointer; font-size: 15px; }

/* ---------- Claude sheet ---------- */
.ai-sheet { block-size: 90dvh; }
.ai-head h2 { display: flex; align-items: center; gap: 8px; }
.ai-head h2 .ic { color: var(--pink-ink); inline-size: 24px; block-size: 24px; }
.ai-head-btns { display: flex; align-items: center; gap: 4px; }
.ai-log { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 8px 16px 16px; display: flex; flex-direction: column; gap: 10px; }
.ai-empty { display: flex; flex-direction: column; gap: 14px; padding-block: 6px; }
.ai-hello { display: flex; gap: 10px; align-items: flex-start; }
.ai-hello .ic { color: var(--pink-ink); inline-size: 26px; block-size: 26px; flex: none; margin-block-start: 2px; }
.ai-hello p { margin: 0; font-weight: 600; color: var(--ink-2); }
.ai-sugg { display: flex; flex-direction: column; gap: 8px; }
.ai-chip { text-align: start; border: 0; background: var(--bg); color: var(--ink); border-radius: 16px; padding: 10px 14px; font-size: 15px; cursor: pointer; line-height: 1.35; }
.ai-chip:active { background: var(--pink-soft); }
.ai-photo-row { display: flex; gap: 8px; flex-wrap: wrap; }
.msg { max-inline-size: 86%; border-radius: 20px; padding: 10px 14px; line-height: 1.4; }
.msg p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.me { align-self: flex-end; background: var(--pink-soft); border-end-end-radius: 6px; }
.msg.ai { align-self: flex-start; background: var(--bg); border-end-start-radius: 6px; }
.msg.err { align-self: stretch; max-inline-size: none; background: var(--pink-soft); color: var(--pink-ink); display: flex; gap: 8px; align-items: flex-start; flex-wrap: wrap; font-weight: 600; }
.msg.err p { flex: 1 1 200px; }
.msg-img { display: block; max-inline-size: 180px; max-block-size: 180px; border-radius: 12px; margin-block-end: 6px; object-fit: cover; }
.msg.wa { display: flex; flex-direction: column; gap: 6px; background: color-mix(in srgb, #25D366 12%, var(--card)); }
.wa-to { font-weight: 700; font-size: 14px; } .wa-text { font-size: 15px; }
.msg.wa .wa-btn { align-self: flex-start; background: #25D366; color: #fff; }
.msg.wa .wa-btn .ic { color: #fff; }
.acts { align-self: stretch; background: var(--card); border-radius: var(--r-md); box-shadow: var(--shadow); padding: 4px 14px 10px; position: relative; }
.acts ul { list-style: none; margin: 0; padding: 0; }
.acts li a, .acts li > span { display: flex; align-items: center; gap: 10px; padding-block: 10px; text-decoration: none; font-weight: 600; font-size: 15px; border-block-end: 1px dashed var(--line); }
.acts li:last-child a, .acts li:last-child > span { border: 0; }
.acts li bdi { flex: 1; min-inline-size: 0; }
.acts li .ic:first-child { inline-size: 22px; block-size: 22px; padding: 3px; border-radius: 50%; background: var(--mint); color: #fff; flex: none; }
.acts .chev { inline-size: 18px; block-size: 18px; }
.acts.undone { opacity: .55; } .acts.undone bdi { text-decoration: line-through; }
.acts .btn { margin-block-start: 6px; }
.typing { display: flex; gap: 5px; padding: 14px 16px; }
.typing span { inline-size: 8px; block-size: 8px; border-radius: 50%; background: var(--muted); animation: bob 1s ease-in-out infinite; }
.typing span:nth-child(2) { animation-delay: .15s; } .typing span:nth-child(3) { animation-delay: .3s; }
@keyframes bob { 50% { transform: translateY(-5px); opacity: .5; } }
.ai-compose { flex: none; border-block-start: 1px solid var(--line); padding: 8px 12px calc(10px + env(safe-area-inset-bottom)); background: var(--card); }
.ai-attach { display: flex; gap: 8px; padding-block-end: 8px; }
.att { position: relative; }
.att img { inline-size: 64px; block-size: 64px; object-fit: cover; border-radius: 12px; display: block; }
.att button { position: absolute; inset-block-start: -6px; inset-inline-end: -6px; inline-size: 26px; block-size: 26px; border-radius: 50%; border: 0; background: var(--ink); color: var(--bg); display: grid; place-items: center; cursor: pointer; }
.att button .ic { inline-size: 14px; block-size: 14px; }
.ai-status { margin: 0; font-size: 13px; font-weight: 700; color: var(--pink-ink); min-block-size: 0; }
.ai-status:empty { display: none; }
.ai-bar { display: flex; align-items: flex-end; gap: 6px; }
.ai-cam { background: var(--bg); cursor: pointer; }
#ai-input { flex: 1; min-inline-size: 0; resize: none; min-block-size: 46px; max-block-size: 140px; border-radius: 22px; padding: 11px 16px; line-height: 1.35; font-size: 17px; }
.ai-go { inline-size: 48px; block-size: 48px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer; flex: none; background: var(--ink); color: var(--bg); }
.ai-go.mic { background: var(--pink); color: #3E2016; box-shadow: inset 0 0 0 2px #3E2016; }
.ai-go:disabled { opacity: .5; }
.ai-sheet.listening .ai-go.mic { background: var(--danger); color: #fff; box-shadow: none; animation: listen 1.2s ease-in-out infinite; }
.ai-sheet.listening #ai-input { border-color: var(--pink); }
@keyframes listen { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--danger) 45%, transparent); } 50% { box-shadow: 0 0 0 10px transparent; } }
.fab svg { inline-size: 32px; block-size: 32px; }
.ai-go[hidden], .askbar-btn[hidden] { display: none; }

/* =========================================================
   Tablet (iPad) layout
   768+  : wider canvas, two-column screens, sheets become centered dialogs
   1024+ : side navigation rail, Claude opens as a side panel next to the app
   ========================================================= */
.split > * { min-inline-size: 0; }
@media (min-width: 768px) {
  body { font-size: 17px; padding-block-end: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 32px); }
  main { max-inline-size: 1120px; padding-inline: 28px; }
  .page-head h1 { font-size: 32px; }
  .greet { font-size: 22px; }
  .awning-bar { padding-inline: 24px; }

  .split { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 0 28px; align-items: start; }
  .split > .block:first-child, .split > .split-a > :first-child, .split > .split-b > :first-child { margin-block-start: 14px; }
  .today-split { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
  .today-split .split-b .stats { margin-block-start: 0; }
  .order-page .split-b > .block:first-child { margin-block-start: 14px; }

  .hero-day { font-size: 58px; }
  .hero { padding: 26px 24px 22px; }

  .tickets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .split .tickets { grid-template-columns: 1fr; }
  .prod-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
  .more-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .stats.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .bake-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }

  /* long lists flow in two columns */
  .page > .list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page > .list > .list-item:nth-child(odd) { border-inline-end: 1px solid var(--line); }
  .shop { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shop > .shop-item:nth-child(odd), .shop > .shop-row:nth-child(odd) { border-inline-end: 1px solid var(--line); }
  .shop > .shop-item:last-child { border-block-end: 1px solid var(--line); }

  .settings-cols { column-count: 2; column-gap: 20px; }
  .settings-cols > .card { break-inside: avoid; margin-block: 0 20px; display: flex; }
  .menu-card, .menu-card + p, .menu-card ~ .block { max-inline-size: 560px; margin-inline: auto; }
  .stamps { max-inline-size: 420px; }
  .chips.scroll { margin-inline: 0; padding-inline: 0; flex-wrap: wrap; }

  /* sheets become centered dialogs */
  .sheet-wrap { display: grid; place-items: center; padding: 24px; }
  .sheet { position: relative; inset: auto; inline-size: min(620px, 100%); max-block-size: 88dvh; border-radius: 26px;
    transform: translateY(18px) scale(.98); opacity: 0; transition: transform .22s cubic-bezier(.2, .8, .2, 1), opacity .18s; }
  .sheet-wrap.in .sheet { transform: none; opacity: 1; }
  .sheet-grip { display: none; }
  .sheet-head { padding-block-start: 14px; }
  .btn-row.sticky { border-end-start-radius: 26px; border-end-end-radius: 26px; padding-block-end: 16px; }
  .ai-sheet { block-size: min(820px, 88dvh); inline-size: min(680px, 100%); }
  .ai-compose { border-end-start-radius: 26px; border-end-end-radius: 26px; padding-block-end: 14px; }

  .tabbar { inset-inline: 0; margin-inline: auto; max-inline-size: 640px; bottom: 12px; border-radius: 22px; padding-block-end: 0;
    box-shadow: 0 8px 30px -12px rgba(62, 32, 22, .45); }
  body { padding-block-end: calc(var(--tabbar-h) + 44px); }
  .fab { inset-inline-end: 28px; inset-block-end: calc(var(--tabbar-h) + 32px); }
  .toasts { inset-block-start: calc(env(safe-area-inset-top) + 84px); }
}

@media (min-width: 1024px) {
  :root { --rail: 96px; }
  body { padding-inline-start: var(--rail); padding-block-end: 40px; }
  .awning { margin-inline-start: calc(-1 * var(--rail)); }
  .tabbar { inset-block: 0; inset-inline-start: 0; inset-inline-end: auto; bottom: 0; margin: 0; max-inline-size: none; inline-size: var(--rail);
    flex-direction: column; justify-content: flex-start; gap: 6px; padding-block: 104px 24px; border-radius: 0; z-index: 15;
    box-shadow: 1px 0 0 var(--line); }
  [dir="rtl"] .tabbar { box-shadow: -1px 0 0 var(--line); }
  .tabbar a { flex: none; min-block-size: 76px; }
  .fab { inset-block-end: 28px; inset-inline-end: 32px; }
  .prod-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .more-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .page > .list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .page > .list > .list-item:nth-child(odd) { border-inline-end: 0; }
  .page > .list > .list-item:not(:nth-child(3n)) { border-inline-end: 1px solid var(--line); }
  .tickets { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .split .tickets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .today-split .split-b .tickets { grid-template-columns: 1fr; }

  /* Claude as a side panel: the app stays visible while it works */
  .ai-wrap { place-items: stretch end; padding: 0; }
  .ai-wrap .sheet-scrim { background: rgba(43, 26, 19, .18); }
  .ai-sheet { block-size: 100dvh; max-block-size: none; inline-size: 440px; border-radius: 0; transform: translateX(24px); }
  [dir="rtl"] .ai-sheet { transform: translateX(-24px); }
  .ai-wrap.in .ai-sheet { transform: none; }
  .ai-sheet .sheet-head { padding-block-start: calc(env(safe-area-inset-top) + 16px); }
  .ai-compose { border-radius: 0; padding-block-end: calc(14px + env(safe-area-inset-bottom)); }
}

/* =========================================================
   v1.3 consistency pass: two control sizes, one toolbar pattern,
   dark hero, contrast, FAB clearance
   ========================================================= */
:root { --ctl-sm: 44px; --ctl: 48px; --danger: #A8352F; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --hero: #4A2A1C; --hero-ink: #FFF1E6; --danger: #FF8A80; } }
:root[data-theme="dark"] { --hero: #4A2A1C; --hero-ink: #FFF1E6; --danger: #FF8A80; }
:root[data-theme="dark"] .hero, :root:not([data-theme="light"]) .hero { box-shadow: inset 0 0 0 1px rgba(255, 241, 230, .08), var(--shadow); }
.btn.danger { color: #FFFFFF; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn.danger, :root:not([data-theme="light"]) .toast.bad { color: #3E2016; } }
:root[data-theme="dark"] .btn.danger, :root[data-theme="dark"] .toast.bad { color: #3E2016; }

/* every button is one of two heights, whatever element it is (button, a, label) */
.btn { box-sizing: border-box; min-block-size: var(--ctl); line-height: 1.2; }
.btn.small { min-block-size: var(--ctl-sm); block-size: auto; padding-block: 0; font-size: 15px; }
.btn.big { min-block-size: 56px; }
.btn .ic, .chip .ic { flex: none; }
.chip { min-block-size: 40px; }
.chips.quick .chip { min-block-size: var(--ctl-sm); }
.icon-btn { inline-size: var(--ctl-sm); block-size: var(--ctl-sm); }
.toggle { min-block-size: var(--ctl-sm); }
.day { inline-size: auto; min-block-size: var(--ctl-sm); }
.lang-btn { min-block-size: var(--ctl-sm); }
.sign { min-block-size: var(--ctl-sm); }
.askbar-text { min-block-size: var(--ctl-sm); }
.stepper-in.big input[inputmode] { block-size: var(--ctl-sm) !important; }
.stepper-in input[inputmode] { block-size: var(--ctl-sm) !important; }

/* toolbars: equal-width buttons in one row, label wraps instead of the row */
.toolbar { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; }
.toolbar > .btn { white-space: normal; text-align: center; padding-inline: 10px; }
@media (min-width: 768px) { .toolbar { grid-auto-columns: minmax(0, max-content); justify-content: start; } .toolbar > .btn { white-space: nowrap; padding-inline: 16px; } }

/* secondary action rows on the order page: tidy 2-column grid on phones */
.order-page .split-b > .btn-row.wrap { display: grid; grid-template-columns: 1fr 1fr; }
.order-page .split-b > .btn-row.wrap .btn { white-space: normal; }

/* horizontal chip rows fade out instead of cutting a word */
.hero-bake, .chips.scroll { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); padding-inline-end: 28px; }
[dir="rtl"] .hero-bake, [dir="rtl"] .chips.scroll { -webkit-mask-image: linear-gradient(to left, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(to left, #000 calc(100% - 28px), transparent); }
@media (min-width: 768px) { .chips.scroll { -webkit-mask-image: none; mask-image: none; padding-inline-end: 0; } }

/* keep the floating ✦ clear of content: reserve room at the end of every page; hidden on Today (the ask bar is there) */
main { padding-block-end: 84px; }
body[data-view="today"] .fab { display: none; }
@media (min-width: 768px) { .askbar { max-inline-size: 680px; } }
@media (min-width: 1024px) { main { padding-block-end: 96px; } }

/* product illustrations sit on a soft plate */
.prod-vis .art { inline-size: 64%; block-size: auto; }
.pill.warn { background: var(--butter-soft); color: var(--ink); }

/* first-run welcome */
.welcome { background: var(--card); border-radius: 28px; padding: 24px 20px; box-shadow: var(--shadow); text-align: center; margin-block: 0 16px; }
.welcome h1 { font-size: 26px; margin-block: 8px 6px; }
.welcome p { color: var(--ink-2); margin: 0 auto 14px; max-inline-size: 42ch; }
.welcome .btn-row { justify-content: center; }
.welcome-art { display: flex; justify-content: center; align-items: end; gap: 6px; }
/* finished-timer alarm */
.alarm { position: fixed; inset: 0; z-index: 95; display: grid; place-items: center; padding: 24px; background: rgba(43, 26, 19, .55); }
.alarm-card { background: var(--butter); color: #3E2016; border: 3px solid #3E2016; border-radius: 28px; box-shadow: 0 6px 0 #3E2016; padding: 26px 24px 22px; text-align: center; inline-size: min(380px, 100%); animation: alarmIn .3s cubic-bezier(.2, 1.4, .4, 1); }
.alarm-card .ic { inline-size: 48px; block-size: 48px; }
.alarm-title { font: 600 30px/1.1 var(--font-display); margin: 8px 0 4px; }
.alarm-label { margin: 0 0 18px; font-weight: 600; }
.alarm-card .btn.primary { inline-size: 100%; background: #3E2016; color: #FFF5F7; }
@keyframes alarmIn { from { transform: scale(.9); opacity: 0; } }
/* optional English fields */
.en-fields { border-radius: var(--r-md); background: var(--bg); padding: 4px 12px; }
.en-fields > summary { cursor: pointer; font-weight: 700; font-size: 14px; color: var(--ink-2); min-block-size: 40px; display: flex; align-items: center; }
.en-fields[open] { padding-block-end: 12px; }
.en-fields[open] > .field { margin-block-start: 10px; }
.typing-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 6px 8px 6px 14px; }
.typing-row .typing { padding: 8px 0; }
.chips.quick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.chips.quick .chip { justify-content: center; padding-inline: 8px; font-size: 14px; white-space: normal; text-align: center; line-height: 1.15; }
@media (min-width: 768px) { .chips.quick { display: flex; } .chips.quick .chip { font-size: 15px; padding-inline: 14px; } }
