/* Žlica — plum + lime on warm off-white. */
:root {
  --bg: #FAF6F1;
  --surface: #FFFFFF;
  --surface-2: #F4EEF3;
  --ink: #23121F;
  --muted: #76687A;
  --line: #EBE3EA;
  --plum: #4E1A55;
  --plum-2: #6E2D77;
  --plum-soft: #EFE3F0;
  --on-plum: #FFFFFF;
  --lime: #CDF35E;
  --lime-soft: #F1F9D6;
  --lime-ink: #2D3B06;
  --warn: #B4452F;
  --tip: #FBF3E6;
  --shadow: 0 1px 2px rgba(46, 15, 51, .05), 0 6px 22px rgba(46, 15, 51, .07);
  --glow: 0 0 0 1px rgba(205, 243, 94, .55), 0 0 22px rgba(205, 243, 94, .55);
  --r-card: 24px;
  --r-pill: 999px;
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Fraunces', Georgia, serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #170A19;
    --surface: #241327;
    --surface-2: #2F1A33;
    --ink: #F6EEF7;
    --muted: #B5A6B9;
    --line: #3A2440;
    --plum: #D9A6E0;
    --plum-2: #E8C3EC;
    --plum-soft: #3B2141;
    --on-plum: #2A0E2E;
    --lime-soft: #2F3A12;
    --lime-ink: #DDF88E;
    --tip: #2E2216;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 26px rgba(0, 0, 0, .35);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body {
  font: 500 16px/1.45 var(--font);
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
:focus-visible { outline: 2px solid var(--plum-2); outline-offset: 3px; border-radius: 12px; }
svg.i { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }

#app { max-width: 480px; margin: 0 auto; min-height: 100dvh; position: relative; }
.screen {
  padding: calc(env(safe-area-inset-top) + 20px) 20px calc(env(safe-area-inset-bottom) + 120px);
  min-height: 100dvh;
}
#app.enter .screen, #app.enter .gen { animation: in .28s ease both; }
@keyframes in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

h1, h2, .display { font-family: var(--display); font-weight: 650; letter-spacing: -.01em; margin: 0; }
h1 { font-size: 34px; line-height: 1.1; }
h2 { font-size: 24px; line-height: 1.2; }
.sub { color: var(--muted); margin: 10px 0 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* ---------- onboarding chrome ---------- */
.ob-top { display: flex; align-items: center; gap: 14px; height: 56px; margin-bottom: 18px; }
.round-btn {
  width: 52px; height: 52px; border-radius: 50%; background: var(--surface);
  display: grid; place-items: center; box-shadow: var(--shadow); border: 1px solid var(--line);
}
.progress { flex: 1; height: 6px; border-radius: 6px; background: var(--line); overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--lime); border-radius: 6px; box-shadow: var(--glow); transition: width .35s ease; }
.ob-body { display: flex; flex-direction: column; gap: 12px; margin-top: 26px; }
.ob-foot {
  position: fixed; left: 0; right: 0; bottom: 0; padding: 16px 20px calc(env(safe-area-inset-bottom) + 18px);
  background: linear-gradient(to top, var(--bg) 70%, transparent); max-width: 480px; margin: 0 auto;
  display: flex; flex-direction: column; gap: 10px;
}

.btn {
  height: 60px; border-radius: var(--r-pill); padding: 0 26px; font-weight: 700; font-size: 17px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: 100%;
  transition: transform .12s ease, box-shadow .2s ease, opacity .2s;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--plum); color: var(--on-plum); }
.btn-primary:not(:disabled):hover { box-shadow: 0 8px 24px rgba(78, 26, 85, .28); }
.btn-primary:disabled { opacity: .35; cursor: not-allowed; }
.btn-ghost { background: var(--surface); border: 1px solid var(--line); color: var(--plum); }
.btn-lime { background: var(--lime); color: #24300A; box-shadow: var(--glow); }

.input {
  width: 100%; height: 60px; border-radius: 18px; border: 1.5px solid var(--line); background: var(--surface);
  padding: 0 20px; font-size: 18px; outline: none; transition: border-color .15s, box-shadow .15s;
}
.input:focus { border-color: var(--plum-2); box-shadow: 0 0 0 4px var(--plum-soft); }

.option {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left;
  min-height: 66px; padding: 14px 18px; border-radius: 20px; background: var(--surface);
  border: 1.5px solid var(--line); font-weight: 650; font-size: 17px; transition: border-color .15s, background .15s, box-shadow .2s;
}
.option .ic { width: 40px; height: 40px; border-radius: 14px; background: var(--surface-2); display: grid; place-items: center; color: var(--plum); flex: none; }
.option .grow { flex: 1; }
.option .meta { font-size: 13px; color: var(--muted); font-weight: 600; display: block; margin-top: 2px; }
.option[aria-pressed="true"], .option[aria-checked="true"] { border-color: var(--plum); background: var(--plum-soft); }
.option[aria-pressed="true"] .ic, .option[aria-checked="true"] .ic { background: var(--plum); color: var(--on-plum); }
.option .tick { width: 24px; height: 24px; border-radius: 8px; border: 1.5px solid var(--line); display: grid; place-items: center; flex: none; }
.option[aria-checked="true"] .tick { background: var(--lime); border-color: var(--lime); color: #24300A; box-shadow: var(--glow); }
.option .tick svg { width: 16px; height: 16px; stroke-width: 3; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.store-tile {
  height: 112px; border-radius: 22px; background: var(--surface); border: 1.5px solid var(--line);
  display: grid; place-items: center; font-family: var(--display); font-size: 22px; font-weight: 650; box-shadow: var(--shadow);
  transition: border-color .15s, box-shadow .2s;
}
.store-tile[aria-pressed="true"] { border-color: var(--plum); box-shadow: 0 0 0 3px var(--plum-soft), var(--shadow); }

.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  height: 46px; padding: 0 18px; border-radius: var(--r-pill); border: 1.5px solid var(--line); background: var(--surface);
  font-weight: 650; display: inline-flex; align-items: center; gap: 8px; transition: all .15s;
}
.chip[aria-pressed="true"] { background: var(--plum); border-color: var(--plum); color: var(--on-plum); }
.chip.sm { height: 36px; padding: 0 14px; font-size: 14px; }

.stepper { display: flex; align-items: center; justify-content: center; gap: 28px; margin: 40px 0; }
.stepper .val { font-family: var(--display); font-size: 72px; min-width: 90px; text-align: center; }
.stepper .round-btn { width: 64px; height: 64px; }

.bignum { font-family: var(--display); font-size: 64px; text-align: center; margin-top: 30px; line-height: 1; }
.center { text-align: center; }
.range { width: 100%; margin: 46px 0 8px; accent-color: var(--plum); height: 28px; }
input[type=range] { -webkit-appearance: none; appearance: none; background: transparent; }
input[type=range]::-webkit-slider-runnable-track { height: 10px; border-radius: 10px; background: linear-gradient(to right, var(--plum) var(--p, 0%), var(--line) var(--p, 0%)); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 34px; height: 34px; margin-top: -12px; border-radius: 50%; background: var(--lime); border: 3px solid var(--plum); box-shadow: var(--glow); }
input[type=range]::-moz-range-track { height: 10px; border-radius: 10px; background: var(--line); }
input[type=range]::-moz-range-progress { height: 10px; border-radius: 10px; background: var(--plum); }
input[type=range]::-moz-range-thumb { width: 28px; height: 28px; border-radius: 50%; background: var(--lime); border: 3px solid var(--plum); box-shadow: var(--glow); }
.range-ends { display: flex; justify-content: space-between; color: var(--muted); font-size: 14px; }
.per-portion { text-align: center; color: var(--plum-2); font-weight: 650; font-size: 15px; margin-top: 12px; }

.benefits { display: flex; flex-direction: column; gap: 12px; margin-top: 30px; }
.benefit { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: var(--r-pill); background: var(--surface); box-shadow: var(--shadow); font-weight: 650; }
.benefit .ic { width: 38px; height: 38px; border-radius: 50%; background: var(--lime); color: #24300A; display: grid; place-items: center; box-shadow: var(--glow); }

.bars { display: flex; align-items: flex-end; justify-content: center; gap: 36px; height: 280px; margin-top: 30px; }
.bar { display: flex; flex-direction: column; align-items: center; gap: 10px; width: 108px; font-weight: 650; text-align: center; }
.bar .col { width: 100%; border-radius: 20px 20px 10px 10px; display: grid; place-items: start center; padding-top: 12px; font-family: var(--display); font-size: 22px; animation: grow .9s cubic-bezier(.2,.8,.2,1) both; transform-origin: bottom; }
.bar.us .col { background: var(--lime); color: #24300A; box-shadow: var(--glow); }
.bar.them .col { background: var(--surface-2); color: var(--muted); }
@keyframes grow { from { transform: scaleY(0); } to { transform: none; } }

.reveal { margin-top: 40px; padding: 30px 24px; border-radius: 28px; background: var(--plum); color: var(--on-plum); text-align: center; position: relative; overflow: hidden; }
.reveal::after { content: ''; position: absolute; inset: auto -40px -80px; height: 160px; background: radial-gradient(closest-side, rgba(205,243,94,.45), transparent); }
.reveal .amt { font-family: var(--display); font-size: 60px; color: var(--lime); text-shadow: 0 0 24px rgba(205,243,94,.55); display: block; margin: 6px 0; }
.estimate { font-size: 12px; opacity: .7; margin-top: 14px; }

.tabs2 { display: grid; grid-template-columns: 1fr 1fr; padding: 5px; border-radius: var(--r-pill); background: var(--surface); border: 1px solid var(--line); }
.tabs2 button { height: 48px; border-radius: var(--r-pill); font-weight: 700; color: var(--muted); }
.tabs2 button[aria-selected="true"] { background: var(--lime-soft); color: var(--lime-ink); box-shadow: inset 0 0 0 1.5px var(--lime); }

.addrow { display: flex; gap: 10px; }
.addrow .input { height: 54px; }
.addrow .btn { width: auto; height: 54px; padding: 0 20px; }

/* ---------- main app ---------- */
.hello { display: flex; justify-content: space-between; align-items: flex-start; margin-top: 18px; }
.hello .greet { color: var(--plum-2); font-weight: 650; font-size: 19px; }
.hello h1 { font-size: 44px; }
.brand { display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--plum); }
.brand svg { width: 44px; height: 44px; }
.brand span { font-family: var(--display); font-weight: 700; font-size: 18px; }

.card { background: var(--surface); border-radius: var(--r-card); box-shadow: var(--shadow); border: 1px solid var(--line); overflow: hidden; }
.week-card { margin-top: 26px; }
.wc-head { display: flex; align-items: center; gap: 16px; padding: 18px 20px; background: var(--surface-2); }
.wc-head .ic { width: 54px; height: 54px; border-radius: 50%; background: var(--plum-soft); color: var(--plum); display: grid; place-items: center; }
.wc-head .lbl { color: var(--muted); font-size: 14px; }
.wc-head .val { font-weight: 800; font-size: 21px; }
.wc-budget { display: grid; grid-template-columns: 1fr auto; border-top: 1px solid var(--line); }
.wc-budget > div { padding: 18px 20px; }
.wc-budget > div:first-child { min-width: 0; }
.wc-budget > div + div { border-left: 1px solid var(--line); text-align: center; min-width: 112px; padding-left: 12px; padding-right: 12px; }
.wc-budget .of { white-space: nowrap; }
.money { font-weight: 800; font-size: 26px; letter-spacing: -.02em; white-space: nowrap; }
.money.ok { color: var(--plum-2); }
.money.over { color: var(--warn); }
.meter { height: 10px; border-radius: 10px; background: var(--line); margin-top: 12px; overflow: hidden; }
.meter > i { display: block; height: 100%; border-radius: 10px; background: linear-gradient(90deg, var(--plum), var(--plum-2) 60%, var(--lime)); }
.wc-store { display: flex; align-items: center; gap: 14px; padding: 16px 20px; border-top: 1px solid var(--line); }
.store-badge { width: 48px; height: 48px; border-radius: 14px; background: var(--plum); color: var(--on-plum); display: grid; place-items: center; font-family: var(--display); font-weight: 700; font-size: 20px; }

.sec-head { display: flex; justify-content: space-between; align-items: center; margin: 34px 0 6px; gap: 10px; }
.pill-count { padding: 8px 14px; border-radius: var(--r-pill); background: var(--surface-2); color: var(--muted); font-weight: 650; font-size: 14px; white-space: nowrap; }
.day-label { color: var(--plum-2); font-weight: 750; margin: 22px 4px 10px; text-transform: capitalize; display: flex; gap: 8px; align-items: center; }
.today-dot { font-size: 12px; font-weight: 700; color: #24300A; background: var(--lime); border-radius: var(--r-pill); padding: 3px 10px; box-shadow: var(--glow); text-transform: none; white-space: nowrap; display: inline-block; vertical-align: 2px; }

.meal { display: flex; align-items: stretch; width: 100%; text-align: left; margin-bottom: 12px; min-height: 112px; }
.meal .thumb { width: 96px; flex: none; display: grid; place-items: center; font-size: 50px; background: radial-gradient(circle at 40% 35%, var(--lime-soft), var(--plum-soft)); }
.meal .body { flex: 1; padding: 14px 14px 14px 16px; display: flex; flex-direction: column; justify-content: space-between; gap: 8px; min-width: 0; }
.meal .type { font-size: 12px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.meal .title { font-weight: 750; font-size: 17px; line-height: 1.25; }
.meal .row { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 14px; white-space: nowrap; }
.meal .type { display: flex; align-items: center; gap: 8px; }
.meal .row .price { margin-left: auto; color: var(--plum-2); font-weight: 800; }
.meal .row svg { width: 17px; height: 17px; }
.sale { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; padding: 3px 8px; border-radius: var(--r-pill); background: var(--lime); color: #24300A; }
.pending { opacity: .65; }
.shimmer { background: linear-gradient(90deg, var(--surface-2), var(--surface), var(--surface-2)); background-size: 200% 100%; animation: sh 1.4s linear infinite; }
@keyframes sh { to { background-position: -200% 0; } }

/* floating bottom nav */
.nav {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(env(safe-area-inset-bottom) + 12px);
  width: min(456px, calc(100% - 24px)); height: 74px; border-radius: 37px; display: grid; grid-template-columns: repeat(5, 1fr);
  background: color-mix(in srgb, var(--surface) 86%, transparent); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border: 1px solid var(--line); box-shadow: 0 10px 34px rgba(46, 15, 51, .16); padding: 6px; z-index: 20;
}
.nav button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border-radius: 30px; font-size: 11.5px; font-weight: 700; color: var(--muted); transition: background .2s, color .2s; }
.nav button svg { width: 24px; height: 24px; }
.nav button[aria-current="page"] { background: var(--plum); color: var(--on-plum); }
.nav button[aria-current="page"] svg { color: var(--lime); filter: drop-shadow(0 0 6px rgba(205,243,94,.8)); }

/* recipe */
.hero { height: 300px; margin: calc(-20px - env(safe-area-inset-top)) -20px 0; display: grid; place-items: center; font-size: 120px; position: relative;
  background: radial-gradient(circle at 50% 45%, rgba(205,243,94,.55), transparent 55%), linear-gradient(160deg, var(--plum-2), var(--plum)); }
.hero .round-btn { position: absolute; top: calc(env(safe-area-inset-top) + 16px); left: 16px; }
.hero .emoji { filter: drop-shadow(0 10px 24px rgba(0,0,0,.25)); }
.r-title { margin-top: 22px; font-size: 30px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 18px; text-align: center; }
.stats > div + div { border-left: 1px solid var(--line); }
.stats .k { font-size: 12px; letter-spacing: .14em; color: var(--muted); font-weight: 700; }
.stats .v { font-weight: 800; font-size: 22px; margin-top: 4px; }
.macros { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; padding: 16px 10px; border-top: 1px solid var(--line); }
.macros .v { font-weight: 800; font-size: 19px; }
.macros .k { font-size: 11px; letter-spacing: .14em; color: var(--muted); font-weight: 700; margin-top: 2px; }
.macros .dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; margin-bottom: 6px; }
.r-card { margin-top: 16px; padding: 18px; }
.ing { display: flex; align-items: center; gap: 12px; padding: 13px 2px; border-bottom: 1px solid var(--line); }
.ing:last-child { border-bottom: 0; }
.ing .name { flex: 1; font-weight: 600; }
.ing .name::first-letter, .li .nm::first-letter { text-transform: uppercase; }
.ing .name small { text-transform: none; color: var(--muted); font-weight: 500; }
.ing .amt { font-weight: 750; color: var(--plum-2); white-space: nowrap; }
.step { display: flex; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.step:last-child { border-bottom: 0; }
.step .n { width: 38px; height: 38px; border-radius: 50%; background: var(--lime-soft); color: var(--lime-ink); display: grid; place-items: center; font-weight: 800; flex: none; }
.step b { display: block; margin-bottom: 4px; }
.tip { background: var(--tip); border-radius: 20px; padding: 18px 20px; margin-top: 14px; }
.tip .h { display: flex; gap: 10px; align-items: center; font-weight: 800; margin-bottom: 10px; color: var(--plum); }
.tip b { display: block; margin-top: 8px; }
.tip p { margin: 4px 0 0; color: var(--muted); }
.r-actions { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; margin-top: 22px; }
.r-actions .btn { height: 58px; white-space: nowrap; font-size: 16px; padding: 0 18px; }
.r-actions .sq { width: 58px; min-width: 58px; padding: 0; }
.fav-on { color: #E0457B; }
.fav-on svg { fill: currentColor; }

/* list */
.list-group h3 { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 26px 4px 8px; }
.li { display: flex; align-items: center; gap: 14px; padding: 14px 16px; width: 100%; text-align: left; border-bottom: 1px solid var(--line); }
.li:last-child { border-bottom: 0; }
.li .box { width: 26px; height: 26px; border-radius: 9px; border: 2px solid var(--line); display: grid; place-items: center; flex: none; transition: all .15s; }
.li .box svg { width: 16px; height: 16px; stroke-width: 3; opacity: 0; }
.li.done .box { background: var(--lime); border-color: var(--lime); box-shadow: var(--glow); }
.li.done .box svg { opacity: 1; color: #24300A; }
.li.done .nm { text-decoration: line-through; color: var(--muted); }
.li .nm { flex: 1; font-weight: 600; }
.li .q { color: var(--plum-2); font-weight: 750; white-space: nowrap; }

/* akcije */
.store-card { margin-top: 16px; }
.store-card .head { display: flex; align-items: center; gap: 14px; padding: 16px 18px; }
.store-card .head .grow { flex: 1; min-width: 0; }
.store-card .head b { font-size: 18px; }
.deal { display: flex; align-items: center; gap: 12px; padding: 11px 18px; border-top: 1px solid var(--line); font-size: 15px; }
.deal .nm { flex: 1; font-weight: 600; }
.deal .u { color: var(--muted); font-size: 13px; }
.deal .p { font-weight: 800; color: var(--plum-2); white-space: nowrap; text-align: right; }
.deal s { color: var(--muted); font-weight: 500; font-size: 12px; display: block; }
.pct { font-size: 11px; font-weight: 800; padding: 3px 7px; border-radius: 8px; background: var(--lime); color: #24300A; }
.more { width: 100%; padding: 14px; border-top: 1px solid var(--line); color: var(--plum); font-weight: 700; }
.stale { color: var(--warn); font-size: 13px; font-weight: 600; }
.link { color: var(--plum); font-weight: 700; text-decoration: none; display: inline-flex; gap: 6px; align-items: center; }

/* profile */
.prow { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--line); gap: 12px; }
.prow:last-child { border-bottom: 0; }
.prow .k { color: var(--muted); }
.prow .v { font-weight: 700; text-align: right; }
.stack { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.seg { display: inline-flex; padding: 4px; background: var(--surface-2); border-radius: var(--r-pill); }
.seg button { padding: 6px 14px; border-radius: var(--r-pill); font-weight: 700; font-size: 14px; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--plum); color: var(--on-plum); }

.empty { text-align: center; padding: 50px 20px; color: var(--muted); }
.empty svg { width: 56px; height: 56px; color: var(--plum-2); margin-bottom: 10px; }
.empty .btn { margin-top: 18px; }
.warnbox { margin-top: 14px; padding: 12px 16px; border-radius: 16px; background: color-mix(in srgb, var(--warn) 12%, transparent); color: var(--warn); font-weight: 600; font-size: 14px; }

/* generation loader */
.gen { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; min-height: 100dvh; padding: 30px 26px; gap: 10px; }
.pot { width: 190px; height: 190px; position: relative; margin-bottom: 18px; }
.pot .halo { position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(closest-side, rgba(205,243,94,.55), transparent); animation: pulse 2.2s ease-in-out infinite; }
.pot svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.pot .spoon { transform-origin: 95px 100px; animation: stir 2.4s ease-in-out infinite; }
@keyframes stir { 0%, 100% { transform: rotate(-14deg); } 50% { transform: rotate(14deg); } }
@keyframes pulse { 0%, 100% { transform: scale(.9); opacity: .7; } 50% { transform: scale(1.05); opacity: 1; } }
.gen .msg { min-height: 24px; color: var(--muted); font-weight: 600; }
.gen-steps { display: flex; flex-direction: column; gap: 10px; margin-top: 22px; width: 100%; max-width: 320px; text-align: left; }
.gen-step { display: flex; align-items: center; gap: 12px; font-weight: 650; color: var(--muted); }
.gen-step .d { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; flex: none; }
.gen-step.on { color: var(--ink); }
.gen-step.on .d { border-color: var(--lime); box-shadow: var(--glow); }
.gen-step.on .d::after { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--lime); animation: pulse 1.2s infinite; }
.gen-step.ok { color: var(--ink); }
.gen-step.ok .d { background: var(--lime); border-color: var(--lime); color: #24300A; }
.gen-step .d svg { width: 15px; height: 15px; stroke-width: 3; }
.gen .bar2 { width: 100%; max-width: 320px; height: 8px; border-radius: 8px; background: var(--line); overflow: hidden; margin-top: 18px; }
.gen .bar2 i { display: block; height: 100%; background: var(--lime); box-shadow: var(--glow); transition: width .5s ease; }

/* modal + toast */
.modal-back { position: fixed; inset: 0; background: rgba(23, 10, 25, .45); display: grid; place-items: end center; z-index: 50; animation: in .2s ease; }
.modal { width: min(480px, 100%); background: var(--bg); border-radius: 28px 28px 0 0; padding: 26px 20px calc(env(safe-area-inset-bottom) + 22px); display: flex; flex-direction: column; gap: 14px; }
.modal p { margin: 0; color: var(--muted); }
#toast { position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 100px); transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: var(--r-pill); font-weight: 650; font-size: 14px; transition: all .25s; z-index: 60; max-width: calc(100% - 40px); text-align: center; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
.spin { width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid currentColor; border-right-color: transparent; animation: rot .8s linear infinite; }
@keyframes rot { to { transform: rotate(360deg); } }

.li .nm small.pk { display: block; font-weight: 500; font-size: 13px; color: var(--muted); margin-top: 2px; }
.li.tot { cursor: default; font-weight: 800; }
.li.tot .nm, .li.tot .q { font-weight: 800; }

.li .use { display: block; height: 5px; border-radius: 5px; background: var(--line); margin-top: 7px; overflow: hidden; max-width: 180px; }
.li .use i { display: block; height: 100%; background: var(--lime); border-radius: 5px; }
.li small.rest { color: var(--warn); }
