:root {
  --bg: #f6f3ec;
  --surface: #fffdf9;
  --surface-2: #f0ebe1;
  --ink: #1f1c17;
  --muted: #6d665b;
  --line: #e6dfd2;
  --primary: #1e6a49;
  --primary-2: #2c8a60;
  --primary-ink: #ffffff;
  --primary-soft: #e1efe7;
  --accent: #de5130;
  --accent-soft: #fce7df;
  --warn: #9a6512;
  --warn-soft: #fbf0db;
  --info: #2f63c9;
  --info-soft: #e6edfb;
  --danger: #b42318;
  --danger-soft: #fde6e2;
  --konzum: #d52b1e;
  --kaufland: #b5121b;
  --lidl: #0050aa;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(31, 28, 23, .05), 0 10px 30px rgba(31, 28, 23, .06);
  --tab-h: 66px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #13120f;
    --surface: #1c1a16;
    --surface-2: #262320;
    --ink: #f3efe7;
    --muted: #a8a093;
    --line: #34302a;
    --primary: #56b98b;
    --primary-2: #6ccb9d;
    --primary-ink: #0d1912;
    --primary-soft: #1b3226;
    --accent: #ff7b55;
    --accent-soft: #3a2119;
    --warn: #e5b451;
    --warn-soft: #342913;
    --info: #86a8ff;
    --info-soft: #1b2440;
    --danger: #ff8b7c;
    --danger-soft: #3a1c18;
    --shadow: none;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { letter-spacing: -.015em; }
img { max-width: 100%; }
.icon { width: 22px; height: 22px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Layout */
.app { display: flex; min-height: 100vh; }
.sidebar { display: none; }
.main { flex: 1; min-width: 0; padding: 0 16px calc(var(--tab-h) + 28px + env(safe-area-inset-bottom)); }
.container { max-width: 780px; margin: 0 auto; }
.topbar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 8px; padding: 14px 0 10px; background: var(--bg); }
.topbar h1 { flex: 1; margin: 0; font-size: 1.55rem; font-weight: 800; }
.topbar .back { color: var(--muted); display: inline-flex; }
.icon-btn { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; color: var(--ink); background: transparent; border: 0; cursor: pointer; }
.icon-btn:hover { background: var(--surface-2); text-decoration: none; }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: grid; grid-template-columns: repeat(6, 1fr);
  height: calc(var(--tab-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: var(--surface); border-top: 1px solid var(--line);
}
.tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--muted); font-size: .68rem; font-weight: 650; }
.tab:hover { text-decoration: none; color: var(--ink); }
.tab .icon { width: 24px; height: 24px; }
.tab.active { color: var(--primary); }
.tab.active .icon { stroke-width: 2.2; }

@media (min-width: 960px) {
  .tabbar { display: none; }
  .sidebar {
    display: flex; flex-direction: column; gap: 2px; width: 250px; flex: none;
    position: sticky; top: 0; height: 100vh; padding: 22px 14px; background: var(--surface); border-right: 1px solid var(--line);
  }
  .side-link { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px; color: var(--ink); font-weight: 650; }
  .side-link:hover { background: var(--surface-2); text-decoration: none; }
  .side-link.active { background: var(--primary-soft); color: var(--primary); }
  .side-sep { height: 1px; background: var(--line); margin: 10px 8px; }
  .main { padding: 0 32px 48px; }
  .topbar { padding-top: 26px; }
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 12px 20px; font-weight: 850; font-size: 1.1rem; color: var(--ink); }
.brand img { width: 36px; height: 36px; border-radius: 11px; }
.brand:hover { text-decoration: none; }

/* Surfaces */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 12px 0; box-shadow: var(--shadow); }
.card.flat { box-shadow: none; }
.card h2 { margin: 0 0 10px; font-size: 1.1rem; }
.card h3 { margin: 0 0 6px; font-size: 1rem; }
.hero { background: linear-gradient(140deg, #1e6a49 0%, #2c8a60 60%, #3aa06f 100%); color: #fff; border: 0; }
.hero .muted, .hero a { color: rgba(255, 255, 255, .85); }
.hero .btn { background: #fff; color: #1e6a49; border-color: #fff; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 26px 0 4px; }
.section-title h2 { margin: 0; font-size: 1.08rem; }
.section-title a { font-size: .9rem; font-weight: 650; }
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.tiny { font-size: .76rem; }
.center { text-align: center; }
.row { display: flex; align-items: center; gap: 12px; }
.row.top { align-items: flex-start; }
.row.wrap { flex-wrap: wrap; }
.row.gap-s { gap: 6px; }
.spacer, .grow { flex: 1; min-width: 0; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stack > * + * { margin-top: 10px; }
.mt { margin-top: 14px; }
.mb0 { margin-bottom: 0; }
hr.sep { border: 0; border-top: 1px solid var(--line); margin: 14px 0; }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 520px) { .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin: 12px 0; }
.cards .card { margin: 0; }

.list { list-style: none; margin: 0; padding: 0; }
.list > li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.list > li:first-child { border-top: 0; }
.list .title { font-weight: 650; }
.list .meta { color: var(--muted); font-size: .85rem; }
.list a.item { display: flex; align-items: center; gap: 12px; color: inherit; flex: 1; min-width: 0; }
.list a.item:hover { text-decoration: none; }

/* Controls */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 18px; border-radius: 13px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn:hover { text-decoration: none; border-color: color-mix(in srgb, var(--ink) 22%, var(--line)); }
.btn:disabled { opacity: .55; cursor: default; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.btn.primary:hover { background: var(--primary-2); border-color: var(--primary-2); }
.btn.accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.soft { background: var(--primary-soft); border-color: transparent; color: var(--primary); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--primary); }
.btn.danger { color: var(--danger); }
.btn.small { min-height: 36px; padding: 0 12px; font-size: .88rem; border-radius: 10px; }
.btn.block { display: flex; width: 100%; }
.btn .icon { width: 19px; height: 19px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
form.inline { display: inline; margin: 0; }

label.field { display: block; margin: 14px 0 6px; font-size: .9rem; font-weight: 650; }
.hint { font-size: .82rem; color: var(--muted); margin-top: 4px; }
input:not([type]), input[type=text], input[type=search], input[type=number], input[type=date], input[type=time], input[type=password], input[type=email], select, textarea {
  width: 100%; min-height: 48px; padding: 10px 13px; border: 1px solid var(--line); border-radius: 13px;
  background: var(--surface); color: var(--ink); font: inherit;
}
textarea { min-height: 120px; resize: vertical; }
input:focus, select:focus, textarea:focus, .btn:focus-visible, .chip:focus-visible, .tab:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--primary) 35%, transparent); outline-offset: 1px;
}
input[type=checkbox], input[type=radio] { width: 22px; height: 22px; accent-color: var(--primary); flex: none; }
.search { position: relative; }
.search .icon { position: absolute; left: 13px; top: 13px; color: var(--muted); }
.search input { padding-left: 44px; }
.check { display: flex; align-items: center; gap: 12px; cursor: pointer; }

.chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 8px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 13px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font: inherit; font-size: .88rem; font-weight: 650; cursor: pointer; text-decoration: none;
}
.chip:hover { text-decoration: none; }
.chip.active { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.chip .icon { width: 17px; height: 17px; }

.segmented { display: grid; grid-template-columns: repeat(4, 1fr); gap: 3px; padding: 3px; border-radius: 12px; background: var(--surface-2); }
.segmented button { min-height: 34px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font: inherit; font-size: .78rem; font-weight: 700; cursor: pointer; }
.segmented button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.segmented button.on.s-imam { color: var(--primary); }
.segmented button.on.s-mozda { color: var(--warn); }
.segmented button.on.s-pri_kraju { color: var(--accent); }
.segmented button.on.s-nemam { color: var(--danger); }

.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 13px; overflow: hidden; background: var(--surface); }
.stepper button { width: 46px; height: 46px; border: 0; background: transparent; color: var(--ink); font-size: 1.35rem; cursor: pointer; }
.stepper input { width: 58px; min-height: 46px; border: 0; border-radius: 0; text-align: center; font-weight: 750; -moz-appearance: textfield; }
.stepper input::-webkit-inner-spin-button { -webkit-appearance: none; }

/* Status and money */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; font-size: .74rem; font-weight: 750; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.badge.ok { background: var(--primary-soft); color: var(--primary); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.accent { background: var(--accent-soft); color: var(--accent); }
.badge.info { background: var(--info-soft); color: var(--info); }
.badge.danger { background: var(--danger-soft); color: var(--danger); }
.price { font-variant-numeric: tabular-nums; font-weight: 800; white-space: nowrap; }
.price.big { font-size: 1.75rem; letter-spacing: -.02em; line-height: 1.1; }
.price.mid { font-size: 1.2rem; }
.price-old { color: var(--muted); text-decoration: line-through; font-size: .84rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.discount { display: inline-block; padding: 4px 9px; border-radius: 10px; background: var(--accent); color: #fff; font-weight: 850; font-size: .92rem; }
/* Store badges in each chain's brand colours (name text only, no copied logo artwork). */
.chain { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; font-size: .74rem; font-weight: 850; letter-spacing: .01em; white-space: nowrap; background: var(--surface-2); color: var(--ink); }
.chain.konzum { background: #e30613; color: #fff; text-transform: lowercase; }
.chain.kaufland { background: #e10915; color: #fff; }
.chain.lidl { background: #0050aa; color: #fff000; }
.chain.spar { background: #00843d; color: #fff; text-transform: uppercase; }
.chain.plodine { background: #e2001a; color: #ffe100; }
.chain.tommy { background: #004b93; color: #fff; }
.chain.studenac { background: #009640; color: #fff; }
.chain.eurospin { background: #003d8f; color: #ffdd00; }
.chain.ntl { background: #d0021b; color: #fff; }
.chain.ktc { background: #1d4f91; color: #fff; }
.chain.ribola { background: #0072bc; color: #fff; }
.chain.metro { background: #003d7c; color: #ffed00; }
.chain.boso { background: #e30613; color: #fff; }
.chain.trgovina-krk { background: #0a5aa6; color: #fff; }
.chain.lorenco { background: #c8102e; color: #fff; }
.chain.brodokomerc { background: #00539f; color: #fff; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin: 12px 0; }
.stat { padding: 12px 14px; border-radius: 15px; background: var(--surface); border: 1px solid var(--line); }
.stat .label { font-size: .76rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.stat .value { margin-top: 2px; font-size: 1.3rem; font-weight: 850; font-variant-numeric: tabular-nums; }
.stat .sub { font-size: .8rem; color: var(--muted); }

progress { width: 100%; height: 8px; border: 0; border-radius: 99px; background: var(--surface-2); overflow: hidden; -webkit-appearance: none; appearance: none; }
progress::-webkit-progress-bar { background: var(--surface-2); border-radius: 99px; }
progress::-webkit-progress-value { background: var(--primary); border-radius: 99px; }
progress::-moz-progress-bar { background: var(--primary); border-radius: 99px; }

.flash { margin: 8px 0 4px; padding: 12px 14px; border-radius: 13px; font-weight: 650; display: flex; gap: 10px; align-items: center; }
.flash.ok { background: var(--primary-soft); color: var(--primary); }
.flash.error { background: var(--danger-soft); color: var(--danger); }

.empty { padding: 30px 16px; text-align: center; color: var(--muted); }
.empty .icon { width: 46px; height: 46px; color: var(--muted); opacity: .6; stroke-width: 1.4; }
.empty h3 { margin: 10px 0 4px; color: var(--ink); font-size: 1.05rem; }
.empty p { margin: 0 auto 14px; max-width: 34ch; }

/* Domain pieces */
.tile { width: 50px; height: 50px; flex: none; border-radius: 15px; display: grid; place-items: center; font-weight: 850; font-size: 1.15rem; }
.tile.t0 { background: #e1efe7; color: #1e6a49; }
.tile.t1 { background: #fce7df; color: #b8421f; }
.tile.t2 { background: #fbf0db; color: #8a5a0e; }
.tile.t3 { background: #e6edfb; color: #2a57b5; }
.tile.t4 { background: #efe6fb; color: #6a3fb5; }
.tile.t5 { background: #e2f3f5; color: #1c7482; }
@media (prefers-color-scheme: dark) {
  .tile.t0 { background: #1b3226; color: #6fcf9e; }
  .tile.t1 { background: #3a2119; color: #ff9a7a; }
  .tile.t2 { background: #342913; color: #e8bd62; }
  .tile.t3 { background: #1b2440; color: #93b1ff; }
  .tile.t4 { background: #2a2040; color: #c2a2ff; }
  .tile.t5 { background: #14302f; color: #72d2dc; }
}

.promo { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.promo .name { font-weight: 700; line-height: 1.3; }
.promo .foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; margin-top: auto; }

.need { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.need:first-child { border-top: 0; }
.dot { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 50%; }
.dot .icon { width: 17px; height: 17px; stroke-width: 2.4; }
.dot.ok { background: var(--primary-soft); color: var(--primary); }
.dot.buy { background: var(--accent-soft); color: var(--accent); }
.dot.ask { background: var(--warn-soft); color: var(--warn); }
.dot.neutral { background: var(--surface-2); color: var(--muted); }

.option { position: relative; display: block; padding: 14px; margin: 10px 0; border-radius: 16px; border: 2px solid var(--line); background: var(--surface); cursor: pointer; }
.option.best { border-color: var(--primary); }
.option input[type=radio] { position: absolute; top: 16px; right: 14px; }
.option .ribbon { position: absolute; top: -11px; left: 14px; padding: 2px 10px; border-radius: 999px; background: var(--primary); color: var(--primary-ink); font-size: .74rem; font-weight: 800; }

.week { display: grid; gap: 8px; }
.day { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.day.today { border-color: var(--primary); }
.day .date { width: 44px; flex: none; text-align: center; }
.day .dow { font-size: .68rem; font-weight: 800; text-transform: uppercase; color: var(--muted); letter-spacing: .04em; }
.day .dom { font-size: 1.35rem; font-weight: 850; line-height: 1.1; }

.upload { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 26px 16px; border: 2px dashed var(--line); border-radius: 18px; background: var(--surface); text-align: center; cursor: pointer; }
.upload:hover { border-color: var(--primary); }
.upload .icon { width: 40px; height: 40px; color: var(--primary); stroke-width: 1.5; }
.upload strong { font-size: 1.05rem; }
.preview { max-height: 260px; border-radius: 12px; margin-top: 10px; display: block; }
.receipt-img { width: 100%; border-radius: 14px; border: 1px solid var(--line); }

table.clean { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.clean th { text-align: left; font-size: .76rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
table.clean td, table.clean th { padding: 9px 6px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table-wrap { overflow-x: auto; }

.spark { width: 100%; height: 70px; display: block; }
.spark .line { fill: none; stroke: var(--primary); stroke-width: 2; }
.spark .area { fill: var(--primary-soft); stroke: none; }
.spark .point { fill: var(--primary); }

details.more > summary { cursor: pointer; list-style: none; color: var(--primary); font-weight: 700; padding: 6px 0; }
details.more > summary::-webkit-details-marker { display: none; }

.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; }
.steps li { position: relative; padding: 10px 0 10px 44px; border-top: 1px solid var(--line); }
.steps li:first-child { border-top: 0; }
.steps li::before { counter-increment: step; content: counter(step); position: absolute; left: 0; top: 9px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); font-weight: 800; font-size: .9rem; }

.sticky-cta { position: sticky; bottom: calc(var(--tab-h) + 12px + env(safe-area-inset-bottom)); z-index: 4; padding: 10px 0 0; background: linear-gradient(to top, var(--bg) 70%, transparent); }
@media (min-width: 960px) { .sticky-cta { bottom: 12px; } }

.login-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-page .card { width: 100%; max-width: 410px; padding: 26px; }
.login-page .brand { justify-content: center; padding: 0 0 12px; font-size: 1.35rem; }
.login-page .brand img { width: 52px; height: 52px; border-radius: 15px; }

.onboarding li { align-items: flex-start; }
.onboarding .num-circle { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); font-weight: 800; flex: none; }
.onboarding .done .num-circle { background: var(--primary); color: var(--primary-ink); }

@media (min-width: 960px) { .only-mobile { display: none !important; } }
.nowrap { white-space: nowrap; }
.right { margin-left: auto; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: .92rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 650; }
.pill-group { display: flex; flex-wrap: wrap; gap: 6px; }
.lead { font-size: 1.05rem; }
.wish { display: flex; gap: 8px; }
.wish input { flex: 1; }
.big-number { font-size: 2.1rem; font-weight: 850; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.store-row .check { flex: 1; min-width: 0; }
.fav { color: var(--muted); }
.fav.on { color: #e0a100; }
.fav.on .icon { fill: #e0a100; }
.inline-form { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.inline-form > * { flex: 1; min-width: 120px; }
.inline-form > .btn { flex: none; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
label.field.flush { margin-top: 0; }

/* Recipes with pictures */
.recipe-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin: 10px 0; }
.recipe-card { position: relative; display: flex; flex-direction: column; overflow: hidden; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); box-shadow: var(--shadow); }
.recipe-card:hover { text-decoration: none; border-color: color-mix(in srgb, var(--primary) 45%, var(--line)); }
.recipe-card .body { padding: 10px 12px 12px; }
.recipe-card .title { font-weight: 750; line-height: 1.25; }
.recipe-card .meta { margin-top: 4px; font-size: .8rem; color: var(--muted); display: flex; align-items: center; gap: 4px; }
.recipe-photo { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--surface-2); }
.recipe-photo.placeholder, .hero-photo.placeholder { display: grid; place-items: center; }
.recipe-photo.placeholder .tile { width: 64px; height: 64px; font-size: 1.6rem; border-radius: 20px; }
.card-star { position: absolute; top: 8px; right: 8px; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: rgba(0, 0, 0, .45); color: #ffd35c; }
.card-star .icon { width: 17px; height: 17px; fill: #ffd35c; }
.tiny-icon { width: 14px; height: 14px; }
.recipe-hero { margin: 8px 0 4px; }
.hero-photo { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 18px; background: var(--surface-2); }
.hero-photo.placeholder .tile { width: 96px; height: 96px; font-size: 2.4rem; border-radius: 28px; }
.credit { margin: 6px 2px 8px; }
.recipe-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; }
.recipe-layout > * { min-width: 0; }
@media (min-width: 960px) {
  .recipe-layout { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 22px; align-items: start; }
}
.summary .summary-top { display: flex; gap: 14px; align-items: flex-start; }
.summary .summary-cost { text-align: right; }
.summary .summary-actions { display: flex; gap: 10px; margin-top: 14px; align-items: stretch; }
.summary .summary-actions .btn { flex: none; }
.ok-text { color: var(--primary); display: flex; align-items: center; gap: 8px; font-size: 1.4rem; }
.servings-form { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin: -2px 0 6px; }
.list > li.ingredient { align-items: flex-start; flex-wrap: wrap; row-gap: 8px; }
.ingredient > .grow { flex: 1 1 calc(100% - 44px); }
.ingredient .row { flex-wrap: wrap; gap: 2px 10px; }
.ingredient-side { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding-left: 42px; }
@media (min-width: 640px) {
  .list > li.ingredient { flex-wrap: nowrap; }
  .ingredient > .grow { flex: 1 1 0; }
  .ingredient-side { width: auto; padding-left: 0; flex-direction: column; align-items: flex-end; gap: 6px; }
}
.hero-photo.placeholder { aspect-ratio: auto; height: 140px; }
.toggle { display: inline-grid; grid-template-columns: 1fr 1fr; gap: 2px; padding: 2px; border-radius: 11px; background: var(--surface-2); }
.toggle button { min-height: 34px; padding: 0 12px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font: inherit; font-size: .82rem; font-weight: 750; cursor: pointer; }
.toggle button:hover { color: var(--ink); }
.toggle button.on.yes { background: var(--primary); color: var(--primary-ink); }
.toggle button.on.no { background: var(--accent); color: #fff; }

/* Product pictures */
.promo-img { width: 100%; height: 130px; object-fit: contain; border-radius: 12px; background: #fff; }
.promo-img.placeholder { display: grid; place-items: center; background: var(--surface-2); color: var(--muted); }
.promo-img.placeholder .icon { width: 34px; height: 34px; opacity: .45; }
.staple-list .segmented button { min-height: 38px; }
.option { padding-right: 50px; }
.option input[type=radio] { top: 18px; right: 16px; }
.list > li.staple-row { flex-direction: column; align-items: stretch; gap: 8px; }
.staple-row .segmented { width: 100%; }
@media (min-width: 640px) {
  .list > li.staple-row { flex-direction: row; align-items: center; }
  .staple-row .segmented { width: 340px; flex: none; }
}

/* Tjedan */
.week-nav { display: flex; align-items: center; gap: 8px; }
.week-day.today { border-color: var(--primary); }
.week-day-head { font-weight: 800; margin-bottom: 2px; }
.meal-row { display: flex; align-items: center; gap: 10px; }
.meal-label { width: 70px; flex: none; font-size: .7rem; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; color: var(--muted); }
.meal-thumb { width: 56px; height: 42px; flex: none; object-fit: cover; border-radius: 8px; }
.meal-actions { display: flex; gap: 2px; }
.min0 { min-width: 0; }
@media (max-width: 560px) {
  .meal-row { flex-wrap: wrap; }
  .meal-label { width: 100%; }
}

/* Kućanstvo */
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px 14px; margin: 6px 0 4px; }
.check-grid .check { font-size: .88rem; }
.warn-card { border-color: var(--warn); }
.warn-card ul { margin: 4px 0 0; padding-left: 18px; }
.verdict { margin-top: 4px; }

/* 2026-09 consumer task flow: denser information, visible navigation and real chain marks. */
:root {
  --bg: #f7f7f3;
  --surface: #ffffff;
  --surface-2: #f0f2ed;
  --line: #dde2d9;
  --primary: #176b45;
  --primary-2: #0f7b4b;
  --primary-soft: #e3f3ea;
  --accent: #e84c2a;
  --radius: 16px;
}
.container { max-width: 1080px; }
.topnav { display: none; }
.chain-logo { display: inline-flex; align-items: center; justify-content: center; width: 78px; height: 30px; padding: 4px 7px; border: 1px solid var(--line); border-radius: 8px; background: #fff; flex: none; overflow: hidden; }
.chain-logo img { display: block; width: 100%; height: 100%; object-fit: contain; }
.chain-logo.lidl, .chain-logo.eurospin { width: 46px; height: 34px; padding: 3px; }
.chain-logo.tommy { background: #07539b; }
.chain-logo.tommy img { width: 120px; max-width: none; height: 63px; object-fit: cover; }

.home-hero { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(260px, .75fr); gap: 18px; align-items: center; padding: 24px; }
.home-hero h2 { font-size: clamp(1.65rem, 4vw, 2.6rem); line-height: 1.05; margin: 5px 0 10px; max-width: 14ch; }
.home-hero .wish { background: #fff; padding: 5px; border-radius: 14px; }
.home-hero .wish input { border: 0; background: transparent; color: #17211b; }
.home-hero .wish input::placeholder { color: #66736b; }
.hero-shortcuts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.hero-shortcut { display: flex; flex-direction: column; gap: 4px; min-height: 84px; padding: 12px; border-radius: 14px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.24); color: #fff; }
.hero-shortcut:hover { text-decoration: none; background: rgba(255,255,255,.2); }
.hero-shortcut .icon { width: 25px; height: 25px; }
.hero-shortcut strong { font-size: .92rem; }
.hero-shortcut span { font-size: .73rem; opacity: .86; }
.quick-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 12px 0; }
.quick-card { display: flex; align-items: center; gap: 12px; min-height: 92px; padding: 15px; border-radius: 15px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); box-shadow: var(--shadow); }
.quick-card:hover { text-decoration: none; border-color: var(--primary); }
.quick-card > .icon { width: 30px; height: 30px; color: var(--primary); }
.quick-card strong, .quick-card span { display: block; }
.quick-card span { color: var(--muted); font-size: .8rem; margin-top: 2px; }
.meal-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 10px; }
.home-meal { display: grid; grid-template-columns: 92px minmax(0,1fr); gap: 14px; padding: 0; overflow: hidden; }
.home-meal > img { width: 92px; height: 100%; min-height: 118px; object-fit: cover; }
.home-meal-body { padding: 14px 14px 14px 0; min-width: 0; }
.home-meal-label { color: var(--primary); font-size: .72rem; font-weight: 850; letter-spacing: .055em; text-transform: uppercase; }
.home-meal .title { color: var(--ink); font-size: 1.02rem; font-weight: 780; }
.home-meal .title:hover { text-decoration: underline; }
.home-meal-price { font-weight: 850; font-variant-numeric: tabular-nums; }

.promo { padding: 12px; gap: 7px; min-width: 0; }
.promo-main { display: flex; flex-direction: column; gap: 7px; color: var(--ink); min-width: 0; }
.promo-main:hover { text-decoration: none; }
.promo-main:hover .name { text-decoration: underline; }
.promo-img { height: 92px; }
.promo-img.placeholder { display: none; }
.promo .name { min-height: 2.5em; }
.data-chain { display: flex; align-items: center; gap: 13px; width: 100%; padding: 8px 0; color: inherit; }
.data-chain:hover { text-decoration: none; }
.data-chain .chain-logo { width: 92px; height: 34px; }

@media (min-width: 650px) and (max-width: 959px) {
  .main { padding: 0 24px 40px; }
  .tabbar { display: none; }
  .topnav { position: sticky; top: 0; z-index: 15; display: flex; gap: 4px; overflow-x: auto; margin: 0 -24px; padding: 9px 24px; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); backdrop-filter: blur(12px); }
  .topnav .tab { flex: 1 0 90px; flex-direction: row; min-height: 44px; gap: 7px; padding: 0 10px; border-radius: 11px; font-size: .84rem; }
  .topnav .tab.active { background: var(--primary-soft); }
  .topnav .tab .icon { width: 20px; height: 20px; }
  .topbar { top: 63px; }
}
@media (max-width: 680px) {
  .home-hero { grid-template-columns: 1fr; padding: 19px; }
  .home-hero h2 { font-size: 1.8rem; }
  .quick-grid { grid-template-columns: 1fr; }
  .hero-shortcuts { grid-template-columns: 1fr 1fr; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .promo .chain-logo { width: 65px; }
  .promo .chain-logo.lidl, .promo .chain-logo.eurospin { width: 40px; }
  .promo .discount { font-size: .78rem; }
  .promo .foot { align-items: center; }
}
@media (max-width: 390px) {
  .tab { font-size: .62rem; }
  .cards { grid-template-columns: 1fr; }
}
.store-compare { display: grid; gap: 8px; }
.store-option { display: flex; align-items: center; gap: 12px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); color: var(--ink); }
.store-option:hover { text-decoration: none; border-color: var(--primary); }
.store-option.active { border: 2px solid var(--primary); background: var(--primary-soft); }
.store-option .icon { width: 18px; color: var(--muted); }
.product-detail { display: flex; gap: 20px; align-items: flex-start; padding: 22px; }
.product-detail h2 { font-size: 1.4rem; margin: 12px 0 4px; }
.product-detail-photo { width: 190px; height: 190px; object-fit: contain; border-radius: 14px; background: #fff; }
.chain-hero { display: flex; align-items: center; gap: 22px; padding: 22px; }
.chain-hero > .chain-logo { width: 130px; height: 58px; }
@media (max-width: 540px) {
  .store-option { align-items: flex-start; flex-wrap: wrap; }
  .store-option > .grow { flex-basis: calc(100% - 100px); }
  .product-detail { flex-direction: column; }
  .product-detail-photo { align-self: center; }
  .chain-hero { align-items: flex-start; }
  .chain-hero > .chain-logo { width: 92px; height: 42px; }
}
.chain-logo.tommy img { width: 100%; max-width: 100%; height: 100%; object-fit: contain; }
.meal-chips { padding-bottom: 10px; margin-bottom: 3px; border-bottom: 1px solid var(--line); }
.recipe-card .pill-group { min-height: 20px; margin-bottom: 3px; }

/* Runda 3: chips se prelamaju umjesto da se sakriju iza ruba */
.chips { flex-wrap: wrap; overflow: visible; }

/* Plan obroka: dani × doručak / ručak / večera */
.week-head .week-nav { display: flex; align-items: center; gap: 8px; }
.week-build { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.week-total-main { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.week-total .where { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 4px; }
.week-total .pill-group { margin-top: 10px; }
.pill { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); font-size: .82rem; }
.pill.warn { background: color-mix(in srgb, var(--warn) 18%, var(--surface)); }
.week-grid { display: grid; gap: 8px; margin: 12px 0 90px; }
.week-grid-row { display: grid; gap: 8px; align-items: stretch; }
.week-grid.cols-1 .week-grid-row { grid-template-columns: 120px minmax(0, 1fr); }
.week-grid.cols-2 .week-grid-row { grid-template-columns: 120px repeat(2, minmax(0, 1fr)); }
.week-grid.cols-3 .week-grid-row { grid-template-columns: 120px repeat(3, minmax(0, 1fr)); }
.week-grid-head span { padding: 0 4px; font-size: .72rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.week-grid-day { display: flex; flex-direction: column; justify-content: center; padding: 8px 4px; }
.week-grid-day strong { text-transform: capitalize; }
.week-grid-day span { font-size: .8rem; color: var(--muted); }
.week-grid-row.today .week-grid-day strong { color: var(--primary); }
.meal-cell { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.meal-cell + .meal-cell { margin-top: 0; }
.meal-cell.empty { align-items: center; justify-content: center; min-height: 84px; border-style: dashed; background: transparent; }
.meal-cell .meal-label { display: none; }
.meal-link { display: flex; align-items: center; gap: 8px; min-width: 0; color: var(--ink); }
.meal-link:hover { text-decoration: none; }
.meal-text { display: flex; flex-direction: column; min-width: 0; }
.meal-text .title { font-weight: 700; line-height: 1.25; }
.meal-text .meta { font-size: .78rem; color: var(--muted); }
.meal-foot { display: flex; align-items: center; gap: 2px; }
@media (max-width: 760px) {
  .week-grid-head { display: none !important; }
  .week-grid .week-grid-row { grid-template-columns: 1fr !important; }
  .meal-cell .meal-label { display: block; width: auto; font-size: .7rem; font-weight: 800; text-transform: uppercase; color: var(--muted); }
  .meal-cell.empty { flex-direction: row; justify-content: space-between; min-height: 0; }
}

/* Doma: upravo zapisano */
.staple-row.fresh { background: color-mix(in srgb, var(--primary) 8%, transparent); border-radius: 10px; }
@media (max-width: 760px) {
  .week-total-main { flex-direction: column; align-items: stretch; }
  .week-total-main form .btn { width: 100%; }
  .week-build .spacer { display: none; }
  .week-build .btn { width: 100%; }
}

/* Recepti: više filtera odjednom */
.filter-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 2px 0; }
.filter-label { width: 52px; flex: none; font-size: .72rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.filter-row .chips { flex: 1; padding: 4px 0; }
.chip.exclude.active { background: var(--danger); border-color: var(--danger); color: #fff; text-decoration: line-through; }

/* Plan: poredak trgovina */
.store-rank { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 4px; }
.store-rank li { display: list-item; }
.store-rank li > * { vertical-align: middle; }
.store-rank li .grow { margin: 0 8px; }
.store-combo { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }

/* Stranica proizvoda: je li cijena stvarno dobra, graf kretanja cijene, isti i slični proizvodi */
.pd-price-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 14px; margin: 12px 0 2px; }
.pd-price-row .price.big { font-size: 2.3rem; }
.pd-unit { font-size: 1.12rem; font-weight: 750; white-space: nowrap; }
.pd-before { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 4px 0 10px; }
.pd-before .price-old { font-size: 1rem; }
.pd-before .pd-percent { padding: 2px 9px; border-radius: 999px; background: var(--accent); color: #fff; font-weight: 800; font-size: .88rem; }
.pd-top .small { margin: 0 0 12px; }
.pd-box p { margin: 0 0 8px; line-height: 1.45; }
.pd-box .pd-answer { margin: 0 0 6px; font-size: 1.2rem; font-weight: 800; }
.pd-box .pd-answer .badge { font-size: 1rem; padding: 5px 13px; }
.pd-facts { list-style: none; margin: 10px 0 0; padding: 0; }
.pd-facts li { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.pd-facts .title { font-weight: 700; line-height: 1.35; }
.pd-facts .meta { margin-top: 2px; color: var(--muted); font-size: .9rem; line-height: 1.45; }
.pd-chart { padding: 14px 12px 12px; }
.pd-chart p { margin: 6px 4px 0; }
.pc { display: block; width: 100%; height: auto; }
.pc-narrow { display: none; }
@media (max-width: 600px) { .pc-wide { display: none; } .pc-narrow { display: block; } }
.pc-grid { stroke: var(--line); stroke-width: 1; }
.pc-base, .pc-tick { stroke: var(--muted); stroke-width: 1; opacity: .45; }
.pc-axis { fill: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.pc-gap { fill: var(--surface-2); }
.pc-gap-label { fill: var(--muted); font-size: 11px; font-style: italic; }
.pc-line { fill: none; stroke: var(--pc, #7a7a7a); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; opacity: .8; }
.pc-line.current { stroke-width: 3.6; opacity: 1; }
.pc-line.kaufland { stroke-dasharray: 7 4; }
.pc-promo { fill: var(--pc, #7a7a7a); stroke: var(--surface); stroke-width: 1.5; }
.pc-key { display: inline-block; width: 22px; height: 4px; border-radius: 2px; background: var(--pc, #7a7a7a); flex: none; }
.pc-key.current { height: 7px; }
.konzum { --pc: #d52b1e; } .kaufland { --pc: #7b1f2a; } .lidl { --pc: #0050aa; } .spar { --pc: #00843d; }
.plodine { --pc: #ef8a00; } .tommy { --pc: #0f8b8d; } .studenac { --pc: #7cb342; } .eurospin { --pc: #6a3fb5; }
.ntl { --pc: #c2185b; } .ktc { --pc: #6d4c41; } .ribola { --pc: #039be5; } .metro { --pc: #455a64; }
.trgovina-krk { --pc: #9e9d24; } .boso { --pc: #f06292; } .lorenco { --pc: #8e24aa; } .brodokomerc { --pc: #546e7a; }
.pc-legend { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 12px 4px 4px; padding: 0; font-size: .92rem; }
.pc-legend li { display: inline-flex; align-items: center; gap: 7px; }
.pc-key-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--ink); flex: none; }
.pc-key-gap { display: inline-block; width: 18px; height: 12px; border-radius: 3px; background: var(--surface-2); border: 1px solid var(--line); flex: none; }
.pd-prices { display: flex; flex-direction: column; align-items: flex-end; flex: none; text-align: right; }
.pd-prices .tiny { white-space: nowrap; }
.list > li.pd-current { padding-left: 8px; padding-right: 8px; border-radius: 10px; background: color-mix(in srgb, var(--primary) 7%, transparent); }
.list .meta .badge { margin-right: 4px; }
.pd-sim .title a { color: inherit; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.pd-sim-spark { width: 120px; flex: none; }
.pd-sim-spark .spark { height: 32px; }
.pd-sim form.inline { flex: none; }
.pd-progress { width: 110px; height: 10px; flex: none; accent-color: var(--primary); }
@media (max-width: 600px) {
  .list > li.pd-sim { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; row-gap: 8px; }
  .pd-sim > .grow { grid-column: 1; grid-row: 1; }
  .pd-sim > .pd-prices { grid-column: 2; grid-row: 1; }
  .pd-sim > .pd-sim-spark { grid-column: 1; grid-row: 2; width: 120px; }
  .pd-sim > form.inline { grid-column: 2; grid-row: 2; align-self: center; }
  .pd-progress { width: 70px; }
}

/* Namirnica: klik na naziv otvara cijene u svim trgovinama */
.concept-link { color: inherit; text-decoration: underline dotted; text-underline-offset: 3px; }
.concept-link:hover { color: var(--primary); }
.concept-head { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.concept-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.concept-best { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 4px; }
.concept-offer { display: flex; align-items: center; gap: 10px; }
.concept-price { text-align: right; white-space: nowrap; }
/* Stranica proizvoda: dorada nakon pregleda na mobitelu i računalu */
.pd-logo { display: flex; align-items: center; width: 96px; flex: none; }
@media (max-width: 600px) {
  .pd-offers a.item { flex-wrap: wrap; row-gap: 6px; }
  .pd-offers a.item > .pd-logo { order: 1; }
  .pd-offers a.item > .pd-prices { order: 2; margin-left: auto; }
  .pd-offers a.item > .icon { order: 3; }
  .pd-offers a.item > .grow { order: 4; flex-basis: 100%; }
  .list > li.pd-sim { grid-template-columns: minmax(0, 1fr) auto auto; }
  .pd-sim > .grow { grid-column: 1 / 3; }
  .pd-sim > .pd-prices { grid-column: 3; }
  .pd-sim > form.inline { grid-column: 2 / 4; }
  .pd-tracking .pd-logo { width: 84px; }
}

/* Kupnja: jela iz plana, višak pakiranja, veće pakiranje */
.plan-to-list { border-color: var(--primary); }
.plan-to-list .row { gap: 12px; }
.bulk-hint { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 6px; padding: 8px 10px; border-radius: 10px; background: color-mix(in srgb, var(--primary) 8%, var(--surface)); }
.shop-summary p { margin-top: 6px; }

/* Plan: fotografija jela; početna: akcije iz više trgovina */
.plan-photo { display: block; margin: 4px 0 10px; }
.plan-photo .hero-photo { aspect-ratio: 16 / 9; max-height: 280px; }
.deal-chains { margin-top: -4px; }
.deal-chains .chain-logo, .deal-chains .chain { pointer-events: none; }
.low30 { display: inline-block; margin-top: 4px; }

/* Kupnja na mobitelu, osnovno doma, trgovine koje nemaju sve, oznake ikona */
.shop-list > li { align-items: flex-start; }
.shop-list .line-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 6px; }
.shop-list .line-actions .small { white-space: nowrap; }
.basics-card .list > li { padding: 8px 0; }
.basics-card form { margin-top: 8px; }
.store-divider { margin: 12px 2px 4px; }
.icon-btn.labeled { width: auto; min-width: 44px; height: auto; padding: 3px 2px; display: inline-flex; flex-direction: column; align-items: center; gap: 1px; font-size: .62rem; line-height: 1.1; color: var(--muted); }
/* A long title must wrap instead of pushing the header wider than the phone. */
.topbar h1 { min-width: 0; overflow-wrap: anywhere; }
/* Pages with a back button have less room: the header icons keep only their pictures there. */
.topbar:has(.back) .icon-btn.labeled { min-width: 38px; }
.topbar:has(.back) .icon-btn.labeled span { display: none; }
.icon-btn.labeled .icon { width: 20px; height: 20px; color: var(--ink); }
.more-recipes summary { list-style: none; cursor: pointer; display: inline-flex; }
.more-recipes summary::-webkit-details-marker { display: none; }

/* Akcije: dosljedne rečenice o cijeni, moguća greška u cjeniku, akcija u malo poslovnica */
.promo .foot > div { min-width: 0; }
.promo-before { margin-top: 1px; }
.promo-before .price-old { font-size: inherit; }
.promo-fact { margin-top: 2px; line-height: 1.3; }
.promo-fact.ok { color: var(--primary); font-weight: 700; }
.promo-fact.warn { color: var(--warn); font-weight: 700; }
.promo-warning { display: flex; align-items: flex-start; gap: 5px; margin: 5px 0 2px; padding: 5px 8px; border-radius: 10px; background: var(--warn-soft); color: var(--warn); font-size: .8rem; font-weight: 750; line-height: 1.3; }
.promo-warning .icon, .pd-warning .icon { width: 16px; height: 16px; flex: none; margin-top: 1px; }
.promo-coverage { margin-top: 2px; line-height: 1.3; }
.promo-coverage.warn { display: flex; align-items: flex-start; gap: 4px; color: var(--warn); font-weight: 750; }
.promo-coverage .icon { width: 14px; height: 14px; flex: none; margin-top: 1px; }
.pd-warning { display: flex; align-items: flex-start; gap: 8px; margin: 6px 0 12px; padding: 10px 12px; border-radius: 12px; background: var(--warn-soft); color: var(--warn); line-height: 1.4; }
.pd-top .pd-rare { color: var(--warn); font-weight: 700; }

/* Stranica proizvoda: jednostavan graf (najviše 3 crte, točka današnje akcije, isprekidano gdje nema cijene) */
.pc-intro { margin: 0 4px 8px; }
.pc-rest { --pc: #9aa0a6; }
.pc-line.pc-rest { stroke-width: 2; stroke-dasharray: none; opacity: .9; }
.pc-bridge { fill: none; stroke: var(--pc, #7a7a7a); stroke-width: 1.6; stroke-dasharray: 1 5; stroke-linecap: round; opacity: .75; }
.pd-chart .pc-line.kaufland { stroke-dasharray: none; } /* only dotted lines mean "no price on those days" */
.pc-deal { fill: var(--accent); stroke: var(--surface); stroke-width: 2.5; }
.pc-deal-label { fill: var(--accent); font-size: 13px; font-weight: 800; paint-order: stroke; stroke: var(--surface); stroke-width: 4px; stroke-linejoin: round; }
.pc-legend .pc-key-dot { background: var(--accent); }
.pc-key.pc-none { background: transparent; }
.pd-chart .pc-gaps { margin: 8px 4px 0; }

/* Poveznice na kartici akcije i stranici proizvoda; "Koliko dugo pratimo cijenu" sklopljeno */
.chain-link { display: inline-flex; align-items: center; border-radius: 8px; }
.chain-link:hover { text-decoration: none; opacity: .85; }
.promo-head { gap: 8px; }
.pd-link { display: inline-flex; align-items: center; gap: 5px; text-decoration: underline; text-underline-offset: 3px; }
.pd-link .icon { width: 15px; height: 15px; flex: none; }
.pd-concept { margin: 2px 0 8px; }
.pd-concept .pd-link { font-weight: 700; }
.section-title h2 .concept-link { color: var(--primary); }
.pd-sim .title a.pd-link { color: inherit; text-decoration-color: var(--muted); }
.pd-tracking-box { margin-top: 18px; }
.pd-tracking-box > summary { cursor: pointer; font-weight: 750; padding: 2px 0; }
.pd-tracking-box[open] > summary { margin-bottom: 8px; }

/* Postavke, poslovnice i stranica lanca: ime lanca jednom, jasne poruke o ukućanima */
.data-chain > .chain { min-width: 92px; height: 34px; justify-content: center; }
.chain-hero .lead { margin-top: 0; }
.chain-facts > li { gap: 10px; }
.chain-facts .icon { width: 19px; height: 19px; flex: none; color: var(--muted); }
.household-note { margin: 10px 0; padding: 11px 13px; border-radius: 13px; background: var(--warn-soft); }
.household-note .actions { margin-top: 8px; }
.household-totals { display: grid; gap: 4px; margin: 10px 0; padding: 10px 13px; border-radius: 13px; background: var(--info-soft); }
#kucanstvo .list .badge { white-space: normal; }
.store-count { margin: 4px 0 0; }
/* "Odaberi sve u gradu Slavonski Brod (Trgovina Krk)" must wrap on a phone instead of widening the page. */
.store-bulk form.inline { max-width: 100%; }
.store-bulk .btn { max-width: 100%; white-space: normal; text-align: left; padding-top: 8px; padding-bottom: 8px; }

/* Recepti: filteri na preklop, prazna pretraga, vrijeme kuhanja, kratki dani, plan s jednim glavnim gumbom */
details.filters-more { margin: 6px 0 0; padding: 4px 14px; }
details.filters-more > summary { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; min-height: 40px; }
details.filters-more > summary .icon { width: 18px; height: 18px; }
details.filters-more[open] > summary { margin-bottom: 4px; }
.more-chosen { font-size: .82rem; font-weight: 650; color: var(--muted); }
.recipe-empty .chips.suggest { justify-content: center; margin-bottom: 12px; }
.recipe-card .meta { flex-wrap: wrap; column-gap: 4px; row-gap: 0; }
.card-time { display: inline-flex; align-items: center; gap: 4px; }
.summary .summary-day { min-width: 0; }
.summary .summary-day select { min-width: 7.5em; padding-right: 8px; }
details.plan-more { padding: 4px 14px; }
details.plan-more .actions { margin: 4px 0 8px; }

/* Unutarnje poveznice: svaki sastojak, recept, lanac, poslovnica i proizvod otvara svoju stranicu */
.recipe-link, .store-link, .chain-name-link, .product-link { color: inherit; text-decoration: underline dotted; text-underline-offset: 3px; }
.recipe-link:hover, .store-link:hover, .chain-name-link:hover, .product-link:hover, .concept-link:hover { color: var(--primary); text-decoration: underline solid; }
.meal-link .meal-thumb-link { display: flex; flex: none; border-radius: 8px; }
.meal-text a.title { color: var(--ink); }
.meal-text a.meta { color: var(--muted); }
.meal-text a.meta:hover { text-decoration: underline; }
.home-meal > .home-meal-photo { display: block; min-height: 118px; }
.home-meal-photo > img { display: block; width: 92px; height: 100%; min-height: 118px; object-fit: cover; }
.concept-choice-links { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.concept-choice-links .icon { width: 16px; height: 16px; }

/* Plan: jasniji zbroj, više jela u jednom obroku, tiša prazna mjesta; Kupnja: objašnjen izbor proizvoda */
.week-total .where { display: block; }
.week-others { margin-top: 4px; }
.meal-slot { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.slot-more > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; padding: 2px 4px; font-size: .82rem; font-weight: 700; color: var(--primary); }
.slot-more > summary::-webkit-details-marker { display: none; }
.slot-more > summary .icon { width: 15px; height: 15px; }
.slot-more-options { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.meal-cell.empty { min-height: 64px; opacity: .75; }
.choice-intro { margin-bottom: 12px; }
