/* Zománcos konyha: fehér zománc felületek, sötétkék perem, egyetlen kék kiemelés.
   A lejárati dátumok a csomagolásra nyomott pontmátrix-betűvel (Doto) jelennek meg.
   Egy hasáb; telefonon alsó fülsáv és két lebegő gomb, széles kijelzőn felső fülsáv. */
:root {
  --bg: #EEF2F6;
  --surface: #FFFFFF;
  --surface-2: #F4F7FA;
  --ink: #142235;
  --muted: #56667C;
  --faint: #8794A7;
  --line: #DCE3EC;
  --accent: #1F5BB8;
  --accent-ink: #FFFFFF;
  --accent-soft: #E2EBF8;
  --rim: #0E1B2E;
  --st-lejart: #BF2F28;
  --st-lejart-bg: #FBE4E1;
  --st-surgos: #B0560B;
  --st-surgos-bg: #FCEBD7;
  --st-hamarosan: #7E6100;
  --st-hamarosan-bg: #F7EEC4;
  --st-ok: #2B7549;
  --st-ok-bg: #E0F0E6;
  --st-none: #8794A7;
  --scrim: rgba(14, 27, 46, .42);
  --shadow: 0 1px 2px rgba(20, 34, 53, .06), 0 6px 20px rgba(20, 34, 53, .07);
  --f-display: "Bricolage Grotesque", ui-rounded, system-ui, -apple-system, sans-serif;
  --f-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --f-stamp: "Doto", ui-monospace, "SF Mono", Menlo, monospace;
  --r: 16px;
  --tabbar: 62px;
  --gutter-l: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0D131C;
    --surface: #161F2C;
    --surface-2: #1C2736;
    --ink: #E6ECF4;
    --muted: #9CA9BC;
    --faint: #6E7C91;
    --line: #253144;
    --accent: #78A6EE;
    --accent-ink: #0B1626;
    --accent-soft: #1A2A44;
    --rim: #9CC0F5;
    --st-lejart: #FF8073;
    --st-lejart-bg: #3B1E1D;
    --st-surgos: #FFA861;
    --st-surgos-bg: #3A2817;
    --st-hamarosan: #E6C452;
    --st-hamarosan-bg: #332C12;
    --st-ok: #6BCB93;
    --st-ok-bg: #15301F;
    --st-none: #6E7C91;
    --scrim: rgba(0, 0, 0, .6);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0D131C; --surface: #161F2C; --surface-2: #1C2736; --ink: #E6ECF4; --muted: #9CA9BC; --faint: #6E7C91; --line: #253144;
  --accent: #78A6EE; --accent-ink: #0B1626; --accent-soft: #1A2A44; --rim: #9CC0F5;
  --st-lejart: #FF8073; --st-lejart-bg: #3B1E1D; --st-surgos: #FFA861; --st-surgos-bg: #3A2817;
  --st-hamarosan: #E6C452; --st-hamarosan-bg: #332C12; --st-ok: #6BCB93; --st-ok-bg: #15301F; --st-none: #6E7C91;
  --scrim: rgba(0, 0, 0, .6); --shadow: 0 1px 2px rgba(0, 0, 0, .3);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.45 var(--f-body);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 2px; }
.ic { width: 22px; height: 22px; flex: none; display: block; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.boot { min-height: 70vh; display: grid; place-content: center; text-align: center; color: var(--muted); gap: 4px; }
.wordmark { font: 800 34px/1 var(--f-display); letter-spacing: -.02em; color: var(--ink); margin: 0; }
.wordmark .dot { color: var(--accent); }

/* ---------- váz ---------- */
.shell { max-width: 760px; margin: 0 auto; padding-left: var(--gutter-l); padding-right: var(--gutter-r); padding-bottom: calc(var(--tabbar) + var(--safe-b) + 96px); }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--bg); }
.top {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  display: flex; align-items: center; gap: 12px;
  padding-block: 12px 10px; background: var(--bg);
}
.top .wordmark { font-size: 26px; margin-right: auto; }
.sync { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.sync::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--st-ok); }
.sync.busy::before { background: var(--accent); animation: pulse 1s infinite alternate; }
.sync.off::before { background: var(--st-surgos); }
@keyframes pulse { to { opacity: .3; } }
.avatar {
  width: 38px; height: 38px; border-radius: 50%; border: 0;
  background: var(--surface); color: var(--ink); box-shadow: var(--shadow);
  display: grid; place-items: center; font: 700 15px/1 var(--f-display);
}

.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 25;
  display: grid; grid-template-columns: repeat(4, 1fr);
  padding: 6px var(--gutter-r) calc(6px + var(--safe-b)) var(--gutter-l);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-top: 1px solid var(--line);
}
.tab {
  border: 0; background: none; padding: 6px 4px; border-radius: 12px;
  display: grid; justify-items: center; gap: 2px; color: var(--faint);
  font-size: 11.5px; font-weight: 600; letter-spacing: .01em; position: relative;
}
.tab[aria-current="page"] { color: var(--accent); }
.tab .badge { position: absolute; top: 2px; left: calc(50% + 6px); }
.badge {
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--st-lejart); color: #fff; font: 700 11px/18px var(--f-body); text-align: center;
}

.fabs { position: fixed; z-index: 24; right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(var(--tabbar) + var(--safe-b) + 14px); display: flex; align-items: center; gap: 12px; }
.fab {
  border: 0; border-radius: 50%; display: grid; place-items: center;
  width: 52px; height: 52px; background: var(--surface); color: var(--ink); box-shadow: var(--shadow), 0 0 0 1px var(--line);
}
.fab.main {
  width: 62px; height: 62px; background: var(--accent); color: var(--accent-ink);
  box-shadow: 0 0 0 3px var(--rim), 0 8px 22px rgba(31, 91, 184, .35);
}
.fab.main .ic { width: 28px; height: 28px; stroke-width: 2.2; }

@media (min-width: 820px) {
  .tabs {
    position: sticky; top: calc(env(safe-area-inset-top, 0px) + 60px); bottom: auto; z-index: 19;
    display: flex; gap: 6px; padding: 0 0 12px; background: var(--bg); border: 0; backdrop-filter: none; -webkit-backdrop-filter: none;
  }
  .tab { grid-auto-flow: column; gap: 8px; padding: 9px 16px; font-size: 14.5px; background: var(--surface); color: var(--muted); box-shadow: var(--shadow); }
  .tab[aria-current="page"] { background: var(--ink); color: var(--bg); }
  .tab .ic { width: 19px; height: 19px; }
  .tab .badge { position: static; }
  .shell { padding-bottom: 120px; }
  .fabs { bottom: 28px; right: max(28px, calc((100vw - 760px) / 2 - 90px)); }
}

/* ---------- közös elemek ---------- */
h1, h2, h3 { font-family: var(--f-display); letter-spacing: -.015em; text-wrap: balance; margin: 0; }
h1 { font-size: 30px; line-height: 1.1; font-weight: 800; }
h2 { font-size: 20px; line-height: 1.2; font-weight: 700; }
h3 { font-size: 16px; font-weight: 700; }
.lbl, .eyebrow { font-size: 12.5px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.eyebrow { display: flex; align-items: center; gap: 6px; margin: 0 0 2px; }
.eyebrow .ic { width: 16px; height: 16px; }
.hint { font-size: 13.5px; color: var(--muted); margin: 6px 0 0; }
.muted { color: var(--muted); }
.stack { display: grid; gap: 22px; padding-top: 6px; }
.block { display: grid; gap: 10px; }
.block-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.link { border: 0; background: none; color: var(--accent); font-weight: 650; padding: 4px 0; font-size: 15px; }

.btn {
  border: 0; border-radius: 12px; padding: 12px 16px; min-height: 46px;
  background: var(--surface-2); color: var(--ink); font-weight: 650; font-size: 15.5px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-align: center;
  box-shadow: inset 0 0 0 1px var(--line);
}
.btn .ic { width: 20px; height: 20px; }
.btn.primary { background: var(--accent); color: var(--accent-ink); box-shadow: none; }
.btn.danger { color: var(--st-lejart); }
.btn.danger.solid { background: var(--st-lejart); color: #fff; box-shadow: none; }
.btn.on { background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 0 0 1.5px var(--accent); }
.btn:disabled { opacity: .45; cursor: default; }
.btn.small { min-height: 36px; padding: 7px 12px; font-size: 14px; border-radius: 10px; }
.icon-btn { border: 0; background: none; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; color: var(--muted); flex: none; }
.icon-btn:hover { background: var(--surface-2); }

.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 0 4px; margin: 0 calc(-1 * var(--gutter-r)) 0 calc(-1 * var(--gutter-l)); padding-left: var(--gutter-l); padding-right: var(--gutter-r); }
.chips::-webkit-scrollbar { display: none; }
.chips.wrap { flex-wrap: wrap; overflow: visible; margin: 0; padding: 0; }
.chip {
  border: 0; border-radius: 999px; padding: 7px 13px; white-space: nowrap; flex: none;
  background: var(--surface); color: var(--ink); font-size: 14.5px; font-weight: 600;
  box-shadow: inset 0 0 0 1px var(--line); display: inline-flex; align-items: center; gap: 6px;
}
.chip .ic { width: 17px; height: 17px; }
.chip .n { color: var(--faint); font-weight: 600; font-variant-numeric: tabular-nums; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); box-shadow: none; }
.chip[aria-pressed="true"] .n { color: inherit; opacity: .7; }
.chip.st-lejart[aria-pressed="false"] .n { color: var(--st-lejart); }
.chip.st-surgos[aria-pressed="false"] .n { color: var(--st-surgos); }
.chip.st-hamarosan[aria-pressed="false"] .n { color: var(--st-hamarosan); }
.chip.ghost { background: transparent; }

input[type="text"], input[type="search"], input[type="date"], input[type="password"], input:not([type]), select, textarea {
  width: 100%; min-height: 46px; border-radius: 12px; border: 0; padding: 11px 13px;
  background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); font-size: 16px;
}
textarea { min-height: 150px; line-height: 1.5; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; box-shadow: inset 0 0 0 2px var(--accent); }
input[type="date"] { -webkit-appearance: none; appearance: none; text-align: left; }
input[type="date"]::-webkit-date-and-time-value { text-align: left; }
select { -webkit-appearance: none; appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 32px; }

/* ---------- dátumbélyegző ---------- */
.stamp-date { font: 900 17px/1 var(--f-stamp); letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.st-lejart { --st: var(--st-lejart); --st-bg: var(--st-lejart-bg); }
.st-surgos { --st: var(--st-surgos); --st-bg: var(--st-surgos-bg); }
.st-hamarosan { --st: var(--st-hamarosan); --st-bg: var(--st-hamarosan-bg); }
.st-ok { --st: var(--st-ok); --st-bg: var(--st-ok-bg); }
.st-none { --st: var(--st-none); --st-bg: var(--surface-2); }

/* ---------- áttekintés ---------- */
.hello p { margin: 4px 0 0; color: var(--muted); }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tile {
  border: 0; text-align: left; border-radius: var(--r); padding: 13px 13px 12px;
  background: var(--st-bg); color: var(--st); display: grid; gap: 6px; min-width: 0;
}
.tile .num { font: 900 40px/0.9 var(--f-stamp); font-variant-numeric: tabular-nums; }
.tile .cap { font-size: 13.5px; font-weight: 650; line-height: 1.2; color: var(--ink); opacity: .85; }
.tile.zero { background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.tile.zero .num { color: var(--faint); }

.places { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 620px) { .places { grid-template-columns: repeat(4, 1fr); } }
.place {
  border: 0; text-align: left; background: var(--surface); border-radius: var(--r); padding: 13px; box-shadow: var(--shadow);
  display: grid; gap: 10px; min-width: 0;
}
.place .ic { width: 26px; height: 26px; color: var(--accent); }
.place b { display: block; font: 700 16px/1.2 var(--f-display); overflow-wrap: anywhere; }
.place small { color: var(--muted); font-size: 13.5px; }
.place .warn { color: var(--st-lejart); font-weight: 650; }
.place .warn.soon { color: var(--st-surgos); }

.teaser {
  border: 0; width: 100%; text-align: left; background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 12px; padding: 14px;
}
.teaser .ic { color: var(--accent); }
.teaser span { flex: 1; min-width: 0; }
.teaser small { display: block; color: var(--muted); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.teaser .chev { color: var(--faint); }

.empty { background: var(--surface); border-radius: var(--r); padding: 22px 18px; box-shadow: var(--shadow); display: grid; gap: 12px; }
.empty p { margin: 0; color: var(--muted); }
.empty .btns { display: flex; flex-wrap: wrap; gap: 10px; }
.quiet { color: var(--muted); padding: 14px 2px; margin: 0; }

/* ---------- tétel sorok ---------- */
.rows { list-style: none; margin: 0; padding: 0; background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }
.row { display: flex; align-items: stretch; border-top: 1px solid var(--line); }
.row:first-child { border-top: 0; }
.row-btn {
  flex: 1; min-width: 0; border: 0; background: none; text-align: left;
  display: flex; align-items: center; gap: 12px; padding: 12px 6px 12px 14px;
}
.row-btn:hover { background: var(--surface-2); }
.row-main { flex: 1; min-width: 0; }
.nm { font-weight: 650; font-size: 16px; line-height: 1.25; overflow-wrap: anywhere; }
.meta { color: var(--muted); font-size: 13.5px; margin-top: 2px; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.tag { font-size: 11.5px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; border-radius: 6px; padding: 2px 6px; background: var(--surface-2); color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); }
.tag.low { background: var(--accent-soft); color: var(--accent); box-shadow: none; }
.stamp { text-align: right; display: grid; justify-items: end; gap: 3px; flex: none; }
.stamp .stamp-date { color: var(--st); }
.stamp .rel { font-size: 12.5px; font-weight: 650; color: var(--st); white-space: nowrap; }
.st-none .stamp .rel { font-weight: 500; }
.row .minus {
  flex: none; width: 54px; border: 0; background: none; color: var(--muted);
  display: grid; place-items: center; border-left: 1px solid var(--line);
}
.row .minus span { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; box-shadow: inset 0 0 0 1.5px var(--line); }
.row .minus:hover span { background: var(--surface-2); color: var(--ink); }

.stock-top { display: flex; gap: 8px; align-items: center; padding-bottom: 10px; }
.search { position: relative; flex: 1; }
.search .ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--faint); width: 20px; height: 20px; pointer-events: none; }
.search input { padding-left: 40px; background: var(--surface); }
.sort { width: auto; min-width: 0; background-color: var(--surface); font-size: 15px; }
.filters { display: grid; gap: 4px; margin-bottom: 12px; }
.count-line { font-size: 13.5px; color: var(--muted); margin: 0 2px 8px; display: flex; justify-content: space-between; gap: 10px; }

/* ---------- bevásárlás ---------- */
.shop-form { display: flex; gap: 8px; }
.shop-form input { background: var(--surface); }
.shop-form .btn { flex: none; }
.check {
  flex: none; width: 52px; border: 0; background: none; display: grid; place-items: center; color: var(--accent-ink);
}
.check span { width: 26px; height: 26px; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--faint); display: grid; place-items: center; }
.check .ic { width: 16px; height: 16px; stroke-width: 3; opacity: 0; }
.done .check span { background: var(--accent); box-shadow: none; }
.done .check .ic { opacity: 1; }
.done .nm { text-decoration: line-through; color: var(--muted); }
.shop-row .row-btn { padding-left: 0; cursor: default; }
.shop-row .row-btn:hover { background: none; }
.row .del { flex: none; width: 46px; border: 0; background: none; color: var(--faint); display: grid; place-items: center; }

/* ---------- napló ---------- */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat { background: var(--surface); border-radius: var(--r); padding: 12px; box-shadow: var(--shadow); min-width: 0; }
.stat .num { font: 900 32px/1 var(--f-stamp); font-variant-numeric: tabular-nums; }
.stat .cap { font-size: 13px; color: var(--muted); font-weight: 600; margin-top: 4px; }
.stat.waste .num { color: var(--st-lejart); }
.log-day { font-size: 13px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin: 8px 2px 6px; }
.log-row { display: grid; grid-template-columns: 46px 1fr; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--line); font-size: 15px; }
.log-row:first-child { border-top: 0; }
.log-row time { color: var(--faint); font-variant-numeric: tabular-nums; font-size: 13.5px; padding-top: 1px; }
.log-row .act-waste { color: var(--st-lejart); font-weight: 650; }
.log-row .act-add, .log-row .act-buy { color: var(--st-ok); font-weight: 650; }

/* ---------- lap (sheet) ---------- */
.scrim { position: fixed; inset: 0; z-index: 40; background: var(--scrim); display: flex; align-items: flex-end; justify-content: center; animation: fade .18s ease-out; }
.sheet {
  width: 100%; max-width: 640px; max-height: calc(100dvh - env(safe-area-inset-top, 0px) - 12px); overflow: auto; overscroll-behavior: contain;
  background: var(--surface); border-radius: 22px 22px 0 0;
  padding: 8px var(--gutter-r) calc(20px + var(--safe-b)) var(--gutter-l);
  animation: rise .22s cubic-bezier(.2, .8, .2, 1);
}
.sheet::before { content: ""; display: block; width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 8px; }
@media (min-width: 700px) {
  .scrim { align-items: center; }
  .sheet { border-radius: 22px; max-height: 88vh; padding-bottom: 22px; }
  .sheet::before { display: none; }
}
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(40px); opacity: .6; } }
@media (prefers-reduced-motion: reduce) { .scrim, .sheet { animation: none; } }
.sheet-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 6px 0 12px; position: sticky; top: -8px; background: var(--surface); z-index: 2; }
.sheet-h h2 { font-size: 23px; padding-top: 4px; overflow-wrap: anywhere; }
.form { display: grid; gap: 18px; }
.field { display: grid; gap: 8px; min-width: 0; }
.field > label:not(.toggle) { font-size: 12.5px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.row2 { display: grid; grid-template-columns: 1.3fr 1fr; gap: 12px; }
.name-row { display: flex; gap: 6px; }
.sugg { display: flex; flex-wrap: wrap; gap: 6px; }
.sugg:empty { display: none; }
.sugg button { border: 0; border-radius: 10px; padding: 7px 11px; background: var(--accent-soft); color: var(--accent); font-weight: 650; font-size: 14.5px; display: inline-flex; gap: 6px; align-items: center; }
.sugg button small { color: var(--muted); font-weight: 500; }
.have { font-size: 14px; color: var(--muted); }
.have:empty { display: none; }
.have b { color: var(--ink); }
.stepper { display: flex; align-items: center; background: var(--surface-2); border-radius: 12px; box-shadow: inset 0 0 0 1px var(--line); }
.stepper button { border: 0; background: none; width: 46px; height: 46px; display: grid; place-items: center; color: var(--accent); flex: none; }
.stepper input { text-align: center; background: none; box-shadow: none; padding: 0; min-width: 0; font-weight: 650; font-variant-numeric: tabular-nums; }
.exp-row { display: flex; gap: 12px; align-items: center; }
.exp-row input { flex: 1; min-width: 0; }
.exp-view { flex: none; text-align: right; display: grid; gap: 3px; justify-items: end; min-width: 92px; }
.exp-view .stamp-date { font-size: 20px; color: var(--st); }
.exp-view small { color: var(--st); font-weight: 650; font-size: 12.5px; }
.chips.wrap .chip { padding: 7px 11px; font-size: 14px; }
.chip.pao .ic { width: 15px; height: 15px; }
.more { border-radius: 14px; box-shadow: inset 0 0 0 1px var(--line); padding: 2px 14px; }
.more[open] { padding-bottom: 14px; }
.more summary { cursor: pointer; padding: 12px 0; font-weight: 650; color: var(--accent); list-style: none; display: flex; justify-content: space-between; }
.more summary::-webkit-details-marker { display: none; }
.more summary::after { content: "+"; font-size: 20px; line-height: 1; }
.more[open] summary::after { content: "−"; }
.more .field + .field { margin-top: 14px; }
.toggle { display: flex; gap: 10px; align-items: center; font-weight: 600; }
.toggle input { width: 22px; height: 22px; accent-color: var(--accent); }
.actions { display: grid; gap: 10px; }
.saved-note { color: var(--st-ok); font-weight: 650; font-size: 14.5px; margin: 0; }
.saved-note:empty { display: none; }

.item-hero { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 6px 14px; background: var(--st-bg); color: var(--st); border-radius: var(--r); padding: 16px; }
.item-hero .stamp-date { font-size: 34px; }
.item-hero .rel { font-weight: 700; font-size: 16px; }
.item-hero .qty { grid-row: 1 / span 2; grid-column: 2; text-align: right; color: var(--ink); font: 800 26px/1 var(--f-display); }
.item-hero .qty small { display: block; font: 600 13px/1.3 var(--f-body); color: var(--muted); }
.facts { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-size: 15px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.use-row { display: flex; gap: 10px; }
.use-row .stepper { flex: 1; }
.use-row .btn { flex: 1.3; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.confirm { background: var(--st-lejart-bg); color: var(--ink); border-radius: 14px; padding: 14px; display: grid; gap: 10px; }
.confirm p { margin: 0; }

.bulk-prev { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; border-radius: 14px; box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.bulk-prev li { display: flex; justify-content: space-between; gap: 10px; padding: 9px 12px; border-top: 1px solid var(--line); font-size: 15px; }
.bulk-prev li:first-child { border-top: 0; }
.bulk-prev .stamp-date { font-size: 15px; color: var(--st); }

.unpack-item { display: grid; gap: 10px; padding: 14px 0; border-top: 1px solid var(--line); }
.unpack-item:first-of-type { border-top: 0; }
.unpack-item .head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.unpack-item .head b { font-size: 16.5px; }
.unpack-item .grid3 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 8px; }
.unpack-item.skip > :not(.head) { display: none; }
.unpack-item.skip .head b { color: var(--muted); text-decoration: line-through; }

.setting { display: grid; gap: 10px; padding: 16px 0; border-top: 1px solid var(--line); }
.setting:first-of-type { border-top: 0; padding-top: 4px; }
.place-edit { display: flex; gap: 6px; align-items: center; }
.place-edit input { min-height: 42px; padding: 8px 11px; }
.place-edit .icon-btn { width: 40px; height: 40px; }
.place-edit .ic-pick { color: var(--accent); background: var(--accent-soft); }
.people { display: flex; flex-wrap: wrap; gap: 8px; }
.who-list { display: grid; gap: 10px; }
.who-list .btn { justify-content: flex-start; font-size: 17px; min-height: 54px; }
.inline-form { display: flex; gap: 8px; }
.inline-form .btn { flex: none; }

/* ---------- értesítés (toast) ---------- */
.toast {
  position: fixed; z-index: 60; left: 50%; transform: translateX(-50%);
  bottom: calc(var(--tabbar) + var(--safe-b) + 88px); width: min(560px, calc(100vw - 32px));
  background: var(--ink); color: var(--bg); border-radius: 14px; padding: 10px 10px 10px 16px;
  display: flex; align-items: center; gap: 8px; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); font-size: 15px;
  animation: rise .2s ease-out;
}
.toast span { flex: 1; min-width: 0; }
.toast button { border: 0; background: none; color: var(--bg); font-weight: 700; padding: 8px 10px; border-radius: 10px; flex: none; text-decoration: underline; text-underline-offset: 3px; }
@media (min-width: 820px) { .toast { bottom: 28px; } }

/* ---------- belépés ---------- */
.login { min-height: 100dvh; display: grid; place-items: center; padding: 24px var(--gutter-r) 24px var(--gutter-l); }
.login form { width: min(380px, 100%); display: grid; gap: 14px; }
.login .wordmark { font-size: 46px; }
.login .sub { margin: -6px 0 10px; color: var(--muted); }
.err { color: var(--st-lejart); font-weight: 600; margin: 0; font-size: 14.5px; }
.err:empty { display: none; }

/* ---------- vonalkód ---------- */
.scan { position: fixed; inset: 0; z-index: 70; background: #000; color: #fff; display: grid; grid-template-rows: 1fr auto; }
.scan video { width: 100%; height: 100%; object-fit: cover; grid-area: 1 / 1 / 3 / 2; }
.scan-frame { grid-area: 1 / 1; place-self: center; width: min(78vw, 360px); aspect-ratio: 1.7; max-width: 100%; border-radius: 18px; box-shadow: 0 0 0 4000px rgba(0, 0, 0, .45), inset 0 0 0 3px #fff; position: relative; }
.scan-frame::after { content: ""; position: absolute; left: 8%; right: 8%; top: 50%; height: 2px; background: #ff5a4e; box-shadow: 0 0 12px #ff5a4e; animation: pulse .8s infinite alternate; }
.scan-bar { grid-area: 2 / 1; z-index: 1; display: grid; gap: 10px; padding: 16px var(--gutter-r) calc(18px + var(--safe-b)) var(--gutter-l); background: linear-gradient(transparent, rgba(0, 0, 0, .75) 30%); }
.scan-bar p { margin: 0; text-align: center; font-weight: 600; }
.scan-bar .inline-form input { background: rgba(255, 255, 255, .14); color: #fff; box-shadow: none; }
.scan-bar .btn { background: rgba(255, 255, 255, .18); color: #fff; box-shadow: none; }
.scan-bar .btn.primary { background: #fff; color: #000; }
.stamp-date .sep { font-family: var(--f-body); font-style: normal; font-weight: 700; margin: 0 .04em; }
.sheet-tools { display: flex; align-items: center; gap: 6px; flex: none; }
.chip.ghost[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
