/* KitchenVoice — shared styles for /, /dashboard, /present. Palette from the wireframe. */
:root {
  --ground: #f4f1ea; --ink: #1c1b19; --orange: #c2410c; --green: #1f7a4d; --blue: #35507a;
  --card: #ffffff; --line: #e0d9ca; --muted: #6b665c; --amber: #b45309; --amber-bg: #fdf1dc;
  --red: #b91c1c; --dark: #1c1b19; --dark-2: #2a2926; --dark-text: #f4f1ea; --dark-muted: #b3ada0;
  --font: "IBM Plex Sans", "Noto Sans Devanagari", "Noto Sans Kannada", "Noto Sans Tamil", "Noto Sans Telugu", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: var(--font); background: var(--ground); color: var(--ink); -webkit-text-size-adjust: 100%; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); }
.tag { display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 1px 7px; vertical-align: middle; }
.chip { display: inline-block; font-size: 12px; font-weight: 600; border-radius: 999px; padding: 3px 10px; background: var(--ground); border: 1px solid var(--line); }
.chip.warn { background: var(--amber-bg); border-color: #f0d5a8; color: var(--amber); }
.chip.action { background: var(--ink); color: var(--ground); border-color: var(--ink); }
.chip.action.wastage { background: var(--orange); border-color: var(--orange); }
.chip.action.receiving { background: var(--green); border-color: var(--green); }
.chip.action.usage { background: var(--blue); border-color: var(--blue); }
.dot { width: 10px; height: 10px; border-radius: 50%; background: #c9c3b6; display: inline-block; }
.dot.on { background: var(--green); }
.dot.rec { background: var(--orange); box-shadow: 0 0 0 4px rgba(194, 65, 12, .18); }

/* ── Phone ─────────────────────────────────────────────────────────────── */
body.phone { height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
.top { display: flex; align-items: center; justify-content: space-between; padding: 12px 18px 8px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; }
.top .mono { font-size: 11px; color: var(--muted); }
#main { flex: 1 1 auto; overflow-y: auto; padding: 4px 18px 12px; position: relative; -webkit-overflow-scrolling: touch; }
section[data-view] { display: flex; flex-direction: column; gap: 14px; min-height: 100%; }
.banner { background: var(--ink); color: var(--ground); border-radius: 18px; padding: 16px 18px; }
.banner-title { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--dark-muted); font-weight: 600; }
.banner-sub { font-size: 18px; font-weight: 500; line-height: 1.3; margin-top: 4px; }
.examples { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.examples li { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; font-size: 18px; line-height: 1.3; display: flex; gap: 10px; align-items: center; }
.examples .tag { flex-shrink: 0; }
.idle-today { font-size: 13px; color: var(--muted); text-align: center; }
.live { font-size: 30px; line-height: 1.25; font-weight: 500; margin: 0; min-height: 76px; overflow-wrap: anywhere; }
.live .muted { font-weight: 400; }
.hint { font-size: 14px; color: var(--muted); margin: 0; }
#wave { width: 100%; height: 64px; display: block; }
.slow { color: var(--amber); }
.question { font-size: 28px; line-height: 1.25; font-weight: 600; margin: 4px 0 0; }
.options { display: flex; flex-direction: column; gap: 10px; }
.opt { min-height: 68px; border: 2px solid var(--ink); background: var(--card); border-radius: 16px; font-size: 22px; font-weight: 600; padding: 12px 16px; text-align: left; display: flex; justify-content: space-between; align-items: center; gap: 12px; cursor: pointer; }
.opt:active { background: var(--ground); }
.opt .stock { font-size: 14px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.btn { border: 1px solid var(--line); background: var(--card); border-radius: 14px; padding: 12px 16px; font-size: 16px; font-weight: 600; cursor: pointer; min-height: 44px; }
.btn.ghost { background: transparent; border: 2px dashed var(--line); color: var(--muted); }
.btn.big { min-height: 72px; font-size: 32px; flex: 1 1 0; border-radius: 20px; }
.btn.ok { background: var(--green); border-color: var(--green); color: #fff; }
.btn.danger { background: var(--card); border: 2px solid var(--line); color: var(--red); }
.btn.round { width: 64px; height: 64px; border-radius: 50%; font-size: 22px; padding: 0; border: 2px solid var(--ink); background: var(--card); flex-shrink: 0; }
.btn.small { min-height: 40px; padding: 8px 14px; font-size: 14px; }
.link { background: none; border: 0; padding: 0; color: var(--blue); text-decoration: underline; cursor: pointer; font-size: inherit; }
.row { display: flex; gap: 12px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.card-top { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.qty-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.qty { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; justify-content: center; }
.qty .num { font-size: 64px; font-weight: 600; line-height: 1; letter-spacing: -.02em; }
.qty .unit { font-size: 26px; font-weight: 500; }
.item-row { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; font-size: 24px; font-weight: 600; }
.item-row .item-btn { font-size: 24px; font-weight: 600; color: var(--ink); text-decoration: underline dotted; text-underline-offset: 4px; }
.item-row .reason { font-size: 16px; font-weight: 400; color: var(--muted); }
.meta { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 16px; }
.meta .value { font-weight: 600; }
.meta .stock { color: var(--muted); }
.confirm { display: flex; gap: 10px; align-items: flex-start; font-size: 18px; line-height: 1.35; margin: 0; }
.confirm svg { flex-shrink: 0; margin-top: 2px; }
.saved-panel { background: var(--green); color: #fff; border-radius: 20px; padding: 18px; display: flex; gap: 12px; align-items: flex-start; }
.saved-panel p { margin: 0; font-size: 20px; line-height: 1.35; font-weight: 500; }
.saved-panel svg { flex-shrink: 0; }
.section-title { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 6px 0 0; }
.today { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.today li { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font-size: 15px; display: flex; gap: 10px; align-items: center; }
.today li .t { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.today li .v { margin-left: auto; font-weight: 600; white-space: nowrap; }
.today li img { width: 36px; height: 36px; object-fit: cover; border-radius: 8px; }
.thumb { width: 96px; height: 96px; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); }
.picker { position: absolute; inset: 0; background: var(--ground); z-index: 5; display: flex; flex-direction: column; }
.picker-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; font-weight: 600; font-size: 18px; }
.picker-list { overflow-y: auto; padding: 0 18px 18px; display: flex; flex-direction: column; gap: 8px; }
.toast { position: fixed; left: 18px; right: 18px; bottom: 170px; background: var(--ink); color: var(--ground); border-radius: 14px; padding: 12px 16px; font-size: 16px; text-align: center; z-index: 10; box-shadow: 0 10px 30px rgba(0, 0, 0, .18); }
.bottom { padding: 8px 18px calc(14px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; align-items: center; gap: 8px; }
.typeform { display: flex; gap: 8px; width: 100%; }
.typeform input { flex: 1 1 auto; font: inherit; font-size: 16px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); min-width: 0; }
.mic { width: 104px; height: 104px; border-radius: 50%; border: 3px solid var(--ink); background: var(--card); display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; box-shadow: 0 8px 24px rgba(28, 27, 25, .12); transition: transform .08s, background .12s; }
.mic svg { pointer-events: none; }
.mic.held { background: var(--orange); border-color: var(--orange); transform: scale(1.06); box-shadow: 0 0 0 12px rgba(194, 65, 12, .18); }
.mic.held svg { stroke: #fff; }
.mic.off { opacity: .4; border-color: #aaa; }
.mic.pulse { animation: pulse 1s ease-in-out 3; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(53, 80, 122, .3); } 50% { box-shadow: 0 0 0 14px rgba(53, 80, 122, 0); } }
.mic-hint { font-size: 13px; color: var(--muted); }
.flash { animation: flash 2s ease-out; }
@keyframes flash { 0% { background: #fde3d3; } 100% { background: var(--card); } }

/* ── Dashboard ─────────────────────────────────────────────────────────── */
body.dash { padding: 20px 24px 32px; min-height: 100vh; }
.dash-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.dash-head h1 { font-size: 20px; margin: 0; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.dash-head .sub { font-size: 13px; color: var(--muted); }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; }
.tile .k { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.tile .v { font-size: 34px; font-weight: 600; line-height: 1.1; margin-top: 4px; letter-spacing: -.02em; }
.tile .s { font-size: 12px; color: var(--muted); margin-top: 2px; }
.tile.wast .v { color: var(--orange); }
.tile.recv .v { color: var(--green); }
.strip { display: flex; align-items: center; gap: 10px; background: var(--ink); color: var(--ground); border-radius: 12px; padding: 10px 14px; font-size: 16px; min-height: 44px; margin-bottom: 10px; overflow: hidden; }
.strip[data-state="idle"] { display: none; }
.strip .k { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--dark-muted); font-weight: 600; flex-shrink: 0; }
.strip[data-state="asking"] { background: var(--blue); }
.strip[data-state="reviewing"] { background: var(--dark-2); }
.strip .txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cols { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.panel h2 { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0; padding: 12px 16px; border-bottom: 1px solid var(--line); font-weight: 600; display: flex; justify-content: space-between; }
.log { list-style: none; margin: 0; padding: 0; }
.log li { display: grid; grid-template-columns: 52px 92px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--line); background: var(--card); }
.log li:last-child { border-bottom: 0; }
.log .t { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.log .tx { font-size: 16px; overflow-wrap: anywhere; }
.log .tx .tag { margin-left: 6px; }
.log .tx .asked { color: var(--blue); font-size: 12px; font-weight: 600; margin-left: 6px; }
.log .sum { font-size: 13px; color: var(--muted); margin-top: 2px; }
.log .val { font-weight: 600; text-align: right; white-space: nowrap; display: flex; align-items: center; gap: 8px; }
.log .val img { width: 40px; height: 40px; object-fit: cover; border-radius: 8px; }
.log .empty { display: block; padding: 24px 16px; color: var(--muted); font-size: 14px; }
.inv { list-style: none; margin: 0; padding: 6px 0; }
.inv li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 8px 16px; align-items: center; }
.inv .n { font-size: 14px; font-weight: 600; display: flex; gap: 8px; align-items: center; }
.inv .n .just { font-size: 11px; color: var(--orange); font-weight: 600; }
.inv .n .low { font-size: 11px; color: var(--red); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.inv .q { font-size: 13px; color: var(--muted); text-align: right; white-space: nowrap; }
.inv .bar { grid-column: 1 / -1; height: 6px; background: var(--ground); border-radius: 3px; overflow: hidden; }
.inv .bar i { display: block; height: 100%; background: var(--green); border-radius: 3px; transition: width .4s; }
.inv li.low .bar i { background: var(--red); }
.inv li.changed .bar i { background: var(--orange); }
.stack { display: flex; flex-direction: column; gap: 14px; }
.log .ing { font-size: 12px; color: var(--blue); margin-top: 2px; }
.panel.side { display: flex; flex-direction: column; }
.tabs { display: flex; align-items: center; gap: 4px; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.tab { border: 0; background: transparent; border-radius: 999px; padding: 6px 12px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; font-weight: 600; color: var(--muted); cursor: pointer; }
.tab.on { background: var(--ink); color: var(--ground); }
.tabs .hint { margin-left: auto; font-size: 12px; color: var(--muted); }
.menu { list-style: none; margin: 0; padding: 6px 0; }
.menu li { border-bottom: 1px solid var(--line); }
.menu li:last-child { border-bottom: 0; }
.dish-btn { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "n p" "c p"; gap: 2px 12px; align-items: center; padding: 12px 16px; background: transparent; border: 0; text-align: left; cursor: pointer; }
.dish-btn:hover { background: var(--ground); }
.dish-btn .n { grid-area: n; font-size: 15px; font-weight: 600; }
.dish-btn .cost { grid-area: c; font-size: 12px; color: var(--muted); }
.dish-btn .p { grid-area: p; font-size: 13px; color: var(--muted); display: flex; align-items: baseline; gap: 4px; }
.dish-btn .p b { font-size: 18px; color: var(--ink); font-weight: 600; }
.dish-btn .chev { display: none; }
.dish { padding: 10px 16px 16px; display: flex; flex-direction: column; gap: 12px; }
.dish-head { display: flex; align-items: center; gap: 12px; }
.dish-head .back { border: 0; background: transparent; color: var(--blue); font-size: 14px; font-weight: 600; padding: 6px 0; cursor: pointer; }
.dish-head h3 { margin: 0; font-size: 20px; font-weight: 600; }
.dish-head .cost { margin-left: auto; font-size: 13px; color: var(--muted); white-space: nowrap; }
.dish-cols, .dish-ing li { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr); gap: 4px 10px; align-items: center; }
.dish-cols { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 600; padding: 0 2px 6px; border-bottom: 1px solid var(--line); }
.dish-ing { list-style: none; margin: 0; padding: 0; }
.dish-ing li { padding: 8px 2px; border-bottom: 1px solid var(--line); font-size: 14px; }
.dish-ing li:last-child { border-bottom: 0; }
.dish-ing .n { font-weight: 600; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.dish-ing .n .tag.low { color: var(--red); border-color: var(--red); }
.dish-ing .q { color: var(--muted); white-space: nowrap; }
.dish-ing .bar { grid-column: 1 / -1; height: 5px; background: var(--ground); border-radius: 3px; overflow: hidden; }
.dish-ing .bar i { display: block; height: 100%; background: var(--green); border-radius: 3px; transition: width .4s; }
.dish-ing li.low .bar i { background: var(--red); }
.dish-note { margin: 4px 0 0; font-size: 12px; color: var(--muted); line-height: 1.4; }
.ingredients { border-top: 1px dashed var(--line); padding-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.ingredients .k { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.ingredients ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.ingredients li { display: flex; justify-content: space-between; gap: 10px; font-size: 15px; }
.ingredients li .q { font-weight: 600; white-space: nowrap; }
.ingredients li .after { color: var(--muted); font-size: 13px; white-space: nowrap; }
.ingredients li.short .after { color: var(--red); font-weight: 600; }
@media (max-width: 860px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cols { grid-template-columns: 1fr; } }

/* ── Presenter ─────────────────────────────────────────────────────────── */
body.present { height: 100vh; display: grid; grid-template-columns: 380px minmax(0, 1fr); overflow: hidden; }
.rail { background: var(--dark); color: var(--dark-text); padding: 36px 36px 28px; display: flex; flex-direction: column; gap: 26px; }
.rail .k { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--dark-muted); font-weight: 600; display: flex; justify-content: space-between; }
.steps { display: flex; gap: 6px; }
.steps i { flex: 1 1 0; height: 4px; border-radius: 2px; background: #3c3a35; }
.steps i.on { background: var(--dark-text); }
.rail h2 { font-size: 34px; line-height: 1.12; margin: 0; font-weight: 600; letter-spacing: -.01em; }
.pointers { display: flex; flex-direction: column; gap: 16px; font-size: 19px; line-height: 1.35; }
.pointers div { display: flex; gap: 12px; }
.pointers span:first-child { color: #f0b79b; flex-shrink: 0; }
.rail .now { margin-top: auto; background: var(--dark-2); border-radius: 14px; padding: 14px 16px; font-size: 15px; line-height: 1.4; }
.rail .now .k { margin-bottom: 4px; }
.rail .keys { font-size: 12px; color: var(--dark-muted); display: flex; gap: 14px; }
.stage { position: relative; background: var(--ground); overflow: hidden; }
.stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: var(--ground); }
.slide { position: absolute; inset: 0; padding: 72px 88px; display: flex; flex-direction: column; justify-content: space-between; }
.slide .kicker { font-size: 15px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.slide h1 { font-size: 76px; line-height: 1.04; margin: 0; font-weight: 600; letter-spacing: -.02em; max-width: 14ch; }
.slide .lines { display: flex; flex-direction: column; }
.slide .lines div { display: flex; gap: 24px; align-items: baseline; padding: 20px 0; border-top: 1px solid var(--line); font-size: 30px; line-height: 1.3; }
.slide .lines div:last-child { border-bottom: 1px solid var(--line); }
.slide .lines b { color: var(--orange); font-weight: 500; width: 36px; flex-shrink: 0; font-family: var(--mono); }
.slide .foot { display: flex; justify-content: space-between; font-size: 15px; color: var(--muted); }
.slide.qr-slide { flex-direction: row; gap: 60px; align-items: center; justify-content: flex-start; }
.slide.qr-slide .qr-box { background: #fff; padding: 24px; border-radius: 24px; border: 1px solid var(--line); flex-shrink: 0; }
.slide.qr-slide canvas { display: block; width: 360px; height: 360px; image-rendering: pixelated; }
.slide.qr-slide .qr-text { display: flex; flex-direction: column; gap: 20px; }
.slide.qr-slide .url { font-family: var(--mono); font-size: 34px; font-weight: 600; }
.livebar { position: absolute; top: 14px; right: 18px; background: var(--ink); color: var(--ground); font-size: 13px; font-family: var(--mono); padding: 8px 12px; border-radius: 999px; display: flex; gap: 8px; align-items: center; z-index: 2; }
