/* Nordic ocean · playful, clean and sharp.
   Layout: phone = one column + docked bottom tab bar; ≥900px = slim sidebar, content max 860px, recipes in 3 columns. */
:root {
  --bg: #F2F6F9;
  --surface: #FFFFFF;
  --ink: #0E1E2B;
  --muted: #586A79;
  --line: #DCE5EC;
  --accent: #0E7C8C;
  --accent-ink: #0A6270;
  --accent-soft: #DCF0F2;
  --on-accent: #FFFFFF;
  --sun: #FFC83D;
  --sun-ink: #6E4D00;
  --sun-soft: #FFF4D6;
  --coral: #E8553D;
  --coral-ink: #A8341F;
  --coral-soft: #FDE6E1;
  --c-protein: #008A9E; --c-carbs: #D99A00; --c-fat: #7B5CE6; --c-veg: #3E9B5A;
  --tile-sun: #FFEFC2; --tile-coral: #FBDCD3; --tile-teal: #CFEBEE; --tile-green: #DDF0DF; --tile-sky: #DCE9F7;
  --font-display: "Sora", "Manrope", system-ui, sans-serif;
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --r-card: 10px;
  --r-ctl: 7px;
  --r-pill: 5px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0B141B; --surface: #121F29; --ink: #E6EEF4; --muted: #8FA2B1; --line: #22323F;
    --accent: #3FC1CF; --accent-ink: #72D7E2; --accent-soft: #11343D; --on-accent: #06151B;
    --sun: #FFD25E; --sun-ink: #FFDB80; --sun-soft: #352B10;
    --coral: #FF7A63; --coral-ink: #FF9C8A; --coral-soft: #3A1D18;
    --c-protein: #1E9DAD; --c-carbs: #B8841C; --c-fat: #8C73F0; --c-veg: #4FA968;
    --tile-sun: #3A3217; --tile-coral: #3D241F; --tile-teal: #133840; --tile-green: #18311F; --tile-sky: #182B40;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0B141B; --surface: #121F29; --ink: #E6EEF4; --muted: #8FA2B1; --line: #22323F;
  --accent: #3FC1CF; --accent-ink: #72D7E2; --accent-soft: #11343D; --on-accent: #06151B;
  --sun: #FFD25E; --sun-ink: #FFDB80; --sun-soft: #352B10;
  --coral: #FF7A63; --coral-ink: #FF9C8A; --coral-soft: #3A1D18;
  --tile-sun: #3A3217; --tile-coral: #3D241F; --tile-teal: #133840; --tile-green: #18311F; --tile-sky: #182B40;
  --c-protein: #1E9DAD; --c-carbs: #B8841C; --c-fat: #8C73F0; --c-veg: #4FA968;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { margin: 0; text-wrap: balance; font-family: var(--font-display); letter-spacing: -0.025em; }
h1 { font-size: 1.7rem; font-weight: 800; line-height: 1.12; }
h2 { font-size: 1.12rem; font-weight: 700; }
h3 { font-size: .98rem; font-weight: 700; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: .86rem; }
a { color: var(--accent-ink); }

/* ---------- shell ---------- */
.sidebar { display: none; }
main { max-width: 560px; margin: 0 auto; padding: calc(18px + env(safe-area-inset-top)) 16px calc(92px + env(safe-area-inset-bottom)); }
.view { display: none; flex-direction: column; gap: 14px; }
.view.active { display: flex; }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; background: var(--surface); border-top: 1px solid var(--line); padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(4, 1fr); }
.navlink { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 7px 0; text-decoration: none; color: var(--muted); font-size: .72rem; font-weight: 700; position: relative; border-top: 3px solid transparent; }
.navlink svg { width: 22px; height: 22px; }
.navlink[aria-current="page"] { color: var(--accent-ink); border-top-color: var(--accent); }
.tabbar .navlink { margin-top: -7px; padding-top: 10px; }
.dot-badge { position: absolute; top: 8px; right: calc(50% - 17px); width: 9px; height: 9px; border-radius: 50%; background: var(--coral); border: 2px solid var(--surface); }

/* ---------- basics ---------- */
.card { background: var(--surface); border-radius: var(--r-card); padding: 16px; display: flex; flex-direction: column; gap: 12px; border: 1px solid var(--line); }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.btn { font: inherit; font-weight: 800; font-size: .95rem; border-radius: var(--r-ctl); border: 1.5px solid transparent; background: var(--accent-soft); color: var(--accent-ink); padding: 11px 16px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
.btn.primary { background: var(--accent); color: var(--on-accent); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.big { padding: 17px 20px; font-size: 1.08rem; font-family: var(--font-display); letter-spacing: -0.01em; }
.btn.ghost { background: transparent; color: var(--muted); padding: 8px 6px; }
.btn.outline { background: var(--surface); border-color: var(--line); color: var(--ink); }
.btn.danger { background: var(--coral-soft); color: var(--coral-ink); }
.btn.small { padding: 7px 11px; font-size: .84rem; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
input[type="text"], input[type="url"], input[type="email"], input[type="password"], input[type="date"], textarea {
  font: inherit; color: var(--ink); background: var(--bg); border: 1.5px solid var(--line); border-radius: var(--r-ctl); padding: 11px 12px; width: 100%; min-width: 0;
}
input:focus, textarea:focus { border-color: var(--accent); outline: none; }
textarea { min-height: 130px; resize: vertical; font-family: ui-monospace, Menlo, monospace; font-size: .82rem; }
.label { font-weight: 800; font-size: .9rem; }
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: .76rem; font-weight: 800; border-radius: var(--r-pill); padding: 4px 8px; background: var(--bg); color: var(--muted); white-space: nowrap; }
.pill.green { background: var(--accent-soft); color: var(--accent-ink); }
.pill.sun { background: var(--sun-soft); color: var(--sun-ink); }
.pill.coral { background: var(--coral-soft); color: var(--coral-ink); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font: inherit; font-size: .88rem; font-weight: 700; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); border-radius: var(--r-ctl); padding: 8px 12px; cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.chip.allergy[aria-pressed="true"] { background: var(--coral); border-color: var(--coral); color: #fff; }
.toggle { display: flex; gap: 12px; align-items: flex-start; font-size: .92rem; cursor: pointer; }
.toggle input { width: 22px; height: 22px; margin: 0; accent-color: var(--accent); flex: none; }
.status { font-size: .88rem; color: var(--muted); }
.status.err { color: var(--coral-ink); }
.status.ok { color: var(--accent-ink); }
.leaf { width: 16px; height: 16px; flex: none; }
.food { flex: none; display: block; }

/* ---------- motto ---------- */
.motto { display: flex; flex-direction: column; gap: 1px; margin: 0; }
.motto [lang="sk"] { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.01em; color: var(--accent-ink); }
.motto [lang="en"] { font-size: .84em; color: var(--muted); font-weight: 600; }
.motto.home { font-size: .86rem; flex-direction: row; flex-wrap: wrap; gap: 2px 8px; align-items: baseline; }
.motto.big { font-size: 1.25rem; }
.motto.side { font-size: .8rem; padding: 0 8px; margin-top: -12px; }
.about { gap: 8px; }

/* ---------- home ---------- */
.hello { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.level-chip { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-ctl); padding: 5px 10px 5px 5px; text-decoration: none; color: var(--ink); font-weight: 800; font-size: .85rem; }
.ring { --p: 0; width: 32px; height: 32px; border-radius: 50%; background: conic-gradient(var(--sun) calc(var(--p) * 1%), var(--sun-soft) 0); display: grid; place-items: center; }
.ring span { width: 24px; height: 24px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; font-size: .76rem; color: var(--sun-ink); font-family: var(--font-display); }
.rescue { background: var(--coral-soft); border-color: transparent; }
.rescue.calm { background: var(--accent-soft); }
.rescue-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.rescue-item { background: var(--surface); border-radius: var(--r-ctl); padding: 8px 10px; font-weight: 800; font-size: .88rem; display: flex; align-items: center; gap: 8px; line-height: 1.2; }
.rescue-item small { display: block; font-weight: 700; color: var(--coral-ink); font-size: .74rem; }
.challenge { display: flex; gap: 14px; align-items: center; }
.challenge-dots { display: flex; gap: 6px; }
.challenge-dots span { width: 28px; height: 28px; border-radius: var(--r-ctl); background: var(--bg); border: 2px dashed var(--line); display: grid; place-items: center; }
.challenge-dots span.done { background: var(--sun); border: 0; color: var(--ink); }
.challenge-dots svg { width: 15px; height: 15px; }
.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mini-stats div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 10px; }
.mini-stats b { display: block; font-size: 1.12rem; font-weight: 800; font-variant-numeric: tabular-nums; font-family: var(--font-display); letter-spacing: -0.02em; }
.mini-stats span { font-size: .74rem; color: var(--muted); font-weight: 700; }
.example-note { background: var(--sun-soft); border-color: transparent; }

.spoil-row { display: flex; gap: 6px; flex-wrap: wrap; }
.spoil { display: inline-flex; align-items: center; gap: 6px; background: var(--coral-soft); color: var(--coral-ink); border-radius: var(--r-pill); padding: 3px 9px 3px 4px; font-size: .8rem; font-weight: 800; }
.picks { display: flex; flex-direction: column; gap: 10px; }
.pick { font: inherit; text-align: left; color: var(--ink); background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r-card); padding: 8px; display: grid; grid-template-columns: 104px 1fr; gap: 12px; align-items: center; cursor: pointer; }
.pick:hover { border-color: var(--accent); }
.pick:first-child { border-color: var(--accent); }
.pick-body { display: flex; flex-direction: column; gap: 7px; padding: 4px 4px 4px 0; min-width: 0; }
.pick-title { font-family: var(--font-display); font-weight: 700; font-size: 1rem; line-height: 1.25; letter-spacing: -0.015em; }
.pick .saves { padding: 5px 8px; font-size: .78rem; }
.cover.thumb { height: 100%; min-height: 96px; }
.home-grid.two { display: grid; gap: 12px; }

/* ---------- wizard ---------- */
.wiz-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.steps-dots { display: flex; gap: 4px; }
.steps-dots span { width: 26px; height: 5px; background: var(--line); }
.steps-dots span.on { background: var(--accent); }
.wiz-q { font-size: 1.75rem; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tile { font: inherit; text-align: left; border: 2px solid var(--line); background: var(--surface); border-radius: var(--r-card); padding: 14px; cursor: pointer; display: flex; flex-direction: column; gap: 4px; color: var(--ink); min-height: 96px; }
.tile:hover { border-color: var(--accent); }
.tile b { font-size: 1.02rem; font-family: var(--font-display); letter-spacing: -0.01em; }
.tile span { font-size: .82rem; color: var(--muted); font-weight: 700; }
.tile .big-n { font-size: 1.9rem; font-weight: 800; line-height: 1; color: var(--accent-ink); font-family: var(--font-display); }
.tile[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.tile:disabled { opacity: .4; cursor: not-allowed; }
.tile.wide { grid-column: 1 / -1; min-height: 0; }
.tile .tile-art { display: flex; gap: 2px; margin-bottom: 4px; }

/* ---------- covers ---------- */
.cover { height: 112px; border-radius: var(--r-ctl); overflow: hidden; background: var(--tile-teal); display: flex; }
.cover svg { width: 100%; height: 100%; }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.cover.lg { height: 180px; }
.cover[data-cuisine="slovenska"] { background: var(--tile-sun); }
.cover[data-cuisine="talianska"] { background: var(--tile-coral); }
.cover[data-cuisine="stredomorska"] { background: var(--tile-sky); }
.cover[data-cuisine="azijska"] { background: var(--tile-green); }
.cover[data-cuisine="indicka"] { background: var(--tile-sun); }
.cover[data-cuisine="mexicka"] { background: var(--tile-coral); }
.cover[data-cuisine="madarska"] { background: var(--tile-coral); }

/* ---------- results & detail ---------- */
.results { display: flex; flex-direction: column; gap: 12px; }
.rcard { font: inherit; text-align: left; color: var(--ink); background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r-card); padding: 10px 10px 14px; cursor: pointer; display: flex; flex-direction: column; gap: 9px; }
.rcard > :not(.cover) { margin: 0 6px; }
.rcard:hover { border-color: var(--accent); }
.rcard.best { border-color: var(--accent); }
.rcard-title { font-size: 1.1rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.25; font-family: var(--font-display); }
.rank { font-size: .72rem; font-weight: 800; color: var(--accent-ink); text-transform: uppercase; letter-spacing: .08em; }
.saves { display: flex; gap: 8px; align-items: flex-start; background: var(--sun-soft); color: var(--sun-ink); border-radius: var(--r-ctl); padding: 8px 10px; font-size: .85rem; font-weight: 800; }
.detail-hero { display: flex; flex-direction: column; gap: 10px; }
.nutri { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.nutri div { background: var(--bg); border-radius: var(--r-ctl); padding: 8px 4px; text-align: center; line-height: 1.15; }
.nutri b { display: block; font-size: .98rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.nutri span { font-size: .7rem; color: var(--muted); font-weight: 700; }
.ing { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ing li { display: grid; grid-template-columns: 30px 1fr auto; gap: 10px; align-items: center; font-size: .95rem; }
.ing .amt { color: var(--muted); font-variant-numeric: tabular-nums; font-size: .88rem; font-weight: 700; }
.ing-icon { width: 30px; height: 30px; border-radius: var(--r-ctl); background: var(--bg); display: grid; place-items: center; position: relative; }
.ing-icon .tick { position: absolute; right: -4px; bottom: -4px; width: 15px; height: 15px; border-radius: 50%; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; border: 2px solid var(--surface); }
.ing-icon .tick svg { width: 8px; height: 8px; }
.ing li.missing .ing-icon { background: var(--sun-soft); }
.ing li.optional { color: var(--muted); }
.steps { margin: 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 12px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 30px 1fr; gap: 10px; font-size: .95rem; }
.steps li::before { content: counter(s); width: 26px; height: 26px; border-radius: var(--r-ctl); background: var(--accent-soft); color: var(--accent-ink); font-weight: 800; font-size: .82rem; display: grid; place-items: center; font-family: var(--font-display); }
.sticky-cta { position: sticky; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 4; }

/* ---------- nutrition charts ---------- */
.seg-protein { background: var(--c-protein); }
.seg-carbs { background: var(--c-carbs); }
.seg-fat { background: var(--c-fat); }
.seg-veg { background: var(--c-veg); }
.split { display: flex; flex-direction: column; gap: 8px; }
.splitbar { display: flex; gap: 2px; height: 16px; background: var(--surface); }
.splitbar span:first-child { border-radius: 4px 0 0 4px; }
.splitbar span:last-child { border-radius: 0 4px 4px 0; }
.split-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .84rem; color: var(--muted); font-weight: 700; }
.split-legend b { color: var(--ink); font-variant-numeric: tabular-nums; }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; flex: none; }
.meters { display: flex; flex-direction: column; gap: 14px; }
.meter { display: flex; flex-direction: column; gap: 5px; }
.meter-head { display: flex; align-items: center; gap: 4px; font-size: .9rem; }
.meter-head .sw { margin-right: 4px; }
.meter-val { margin-left: auto; font-weight: 800; font-variant-numeric: tabular-nums; }
.meter-st { font-size: .76rem; font-weight: 800; border-radius: var(--r-pill); padding: 2px 7px; min-width: 70px; text-align: center; }
.st-ok { background: var(--accent-soft); color: var(--accent-ink); }
.st-low, .st-high { background: var(--sun-soft); color: var(--sun-ink); }
.meter-track { position: relative; height: 14px; background: var(--bg); border-radius: 3px; }
.meter-band { position: absolute; top: 0; bottom: 0; background: color-mix(in srgb, var(--muted) 22%, transparent); border-left: 2px solid var(--muted); border-right: 2px solid var(--muted); }
.meter-fill { position: absolute; left: 0; top: 4px; bottom: 4px; border-radius: 0 4px 4px 0; }
.meter-note { font-size: .74rem; color: var(--muted); font-weight: 600; }
.kcal { display: flex; align-items: baseline; gap: 8px; }
.kcal b { font-family: var(--font-display); font-size: 1.8rem; letter-spacing: -0.03em; }
.kcal span { color: var(--muted); font-weight: 700; font-size: .86rem; }
.advice { background: var(--sun-soft); color: var(--ink); border-radius: var(--r-ctl); padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.advice.ok { background: var(--accent-soft); }
.advice ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: .9rem; }
.table-view summary { cursor: pointer; font-weight: 700; font-size: .86rem; color: var(--accent-ink); }
.table-view table { width: 100%; border-collapse: collapse; font-size: .86rem; margin-top: 8px; }
.table-view th, .table-view td { text-align: left; padding: 6px 4px; border-bottom: 1px solid var(--line); }
.table-view th { color: var(--muted); font-weight: 700; }
.nutri-pill { background: color-mix(in srgb, var(--c-veg) 16%, var(--surface)); color: var(--ink); }
.focus-line { display: flex; gap: 8px; align-items: flex-start; font-size: .86rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-ctl); padding: 9px 11px; }

/* ---------- reward ---------- */
.reward { text-align: center; align-items: center; padding: 26px 18px; background: var(--sun-soft); border-color: transparent; position: relative; overflow: hidden; }
.reward-points { font-size: 3.6rem; font-weight: 800; color: var(--sun-ink); letter-spacing: -0.05em; line-height: 1; font-family: var(--font-display); }
.reward > * { position: relative; z-index: 1; }
.bar { height: 10px; border-radius: 2px; background: var(--bg); overflow: hidden; width: 100%; }
.bar span { display: block; height: 100%; background: var(--sun); transition: width .6s ease; }
.level-card .bar { background: color-mix(in srgb, var(--surface) 60%, transparent); }
.confetti { position: absolute; inset: 0; pointer-events: none; z-index: 0 !important; }
.confetti i { position: absolute; top: -12px; width: 8px; height: 12px; opacity: 0; }
@media (prefers-reduced-motion: no-preference) {
  .reward-points { animation: pop .5s cubic-bezier(.2,1.4,.4,1); }
  .confetti i { animation: fall 1.8s ease-in forwards; }
  .view.active { animation: fade .18s ease-out; }
}
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes fall { 0% { opacity: 1; transform: translateY(0) rotate(0); } 100% { opacity: 0; transform: translateY(340px) rotate(540deg); } }
@keyframes fade { from { opacity: .4; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ---------- pantry ---------- */
.plist { display: flex; flex-direction: column; }
.pitem { display: grid; grid-template-columns: 36px 1fr auto auto; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); }
.pitem:last-child { border-bottom: 0; }
.pitem .pic { width: 36px; height: 36px; border-radius: var(--r-ctl); background: var(--bg); display: grid; place-items: center; }
.pitem .name { font-weight: 800; }
.pitem .when { font-size: .8rem; color: var(--muted); font-weight: 700; }
.pitem .when.urgent { color: var(--coral-ink); }
.qty { display: flex; align-items: center; gap: 4px; font-size: .8rem; color: var(--muted); font-weight: 700; }
.qty input { width: 66px !important; text-align: right; padding: 7px 8px !important; }
.more-btn { font: inherit; border: 0; background: var(--bg); color: var(--muted); width: 32px; height: 32px; border-radius: var(--r-ctl); cursor: pointer; font-weight: 800; }
.remove-choice { grid-column: 1 / -1; display: flex; gap: 8px; }
.remove-choice .btn { flex: 1; }

/* ---------- add ---------- */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 4px; gap: 4px; }
.seg button { font: inherit; font-size: .9rem; font-weight: 800; border: 0; border-radius: var(--r-ctl); padding: 10px 4px; background: transparent; color: var(--muted); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }
.rline { display: grid; grid-template-columns: 24px 1fr; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.rline:last-child { border-bottom: 0; }
.rline input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--accent); margin-top: 2px; }
.raw { font-family: ui-monospace, Menlo, monospace; font-size: .74rem; color: var(--muted); }
.rline-fields { display: grid; grid-template-columns: 1fr 84px; gap: 6px; margin-top: 6px; }
.rline-fields input { padding: 9px 10px !important; }
.add-grid { display: grid; grid-template-columns: 1fr 90px; gap: 8px; }

/* ---------- scan / product ---------- */
.product-card { border: 1.5px solid var(--accent); border-radius: var(--r-card); padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.product-head { display: flex; gap: 12px; align-items: center; }
.product-head .pic { width: 44px; height: 44px; border-radius: var(--r-ctl); background: var(--bg); display: grid; place-items: center; flex: none; }
.date-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.date-chips .chip { padding: 6px 10px; font-size: .84rem; }
.code-note { font-size: .8rem; font-weight: 700; border-radius: var(--r-ctl); padding: 8px 10px; }
.code-note.has-date { background: var(--accent-soft); color: var(--accent-ink); }
.code-note.no-date { background: var(--sun-soft); color: var(--sun-ink); }
.pitem .exp-edit { grid-column: 1 / -1; display: flex; gap: 8px; align-items: center; font-size: .84rem; font-weight: 700; }
.pitem .exp-edit input { width: auto !important; flex: 1; }

/* ---------- account ---------- */
.account-form { display: flex; flex-direction: column; gap: 10px; }
.sync-line { display: flex; align-items: center; gap: 8px; font-size: .86rem; font-weight: 700; color: var(--muted); }
.sync-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--sun); flex: none; }
.sync-dot.ok { background: var(--accent); }
.sync-dot.err { background: var(--coral); }

/* ---------- profile ---------- */
.level-card { background: var(--accent); border: 0; color: var(--on-accent); }
.level-name { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.03em; font-family: var(--font-display); }
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 14px; }
.stat b { display: block; font-size: 1.45rem; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -0.03em; font-family: var(--font-display); }
.stat span { font-size: .8rem; color: var(--muted); font-weight: 700; }
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.badge { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 12px 6px; border-radius: var(--r-card); background: var(--bg); }
.badge .medal { width: 44px; height: 44px; transform: rotate(45deg); border-radius: 6px; display: grid; place-items: center; background: var(--line); color: var(--surface); margin: 4px 0; }
.badge .medal svg { width: 20px; height: 20px; transform: rotate(-45deg); }
.badge.earned .medal { background: var(--sun); color: var(--ink); }
.badge b { font-size: .78rem; line-height: 1.2; }
.badge span { font-size: .7rem; color: var(--muted); line-height: 1.25; }
.badge:not(.earned) b { color: var(--muted); }
details.settings { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 2px 16px; }
details.settings summary { font-weight: 800; padding: 14px 0; cursor: pointer; font-family: var(--font-display); letter-spacing: -0.01em; }
details.settings > div { padding-bottom: 16px; display: flex; flex-direction: column; gap: 12px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: .88rem; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; word-break: break-all; }
.toast { position: fixed; left: 50%; bottom: calc(84px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 11px 16px; border-radius: var(--r-ctl); font-size: .9rem; font-weight: 700; z-index: 20; max-width: calc(100% - 32px); }

/* ---------- desktop ---------- */
@media (min-width: 900px) {
  body { display: grid; grid-template-columns: 220px 1fr; }
  .sidebar { display: flex; flex-direction: column; gap: 22px; position: sticky; top: 0; height: 100vh; padding: 26px 14px; background: var(--surface); border-right: 1px solid var(--line); }
  .sidebar nav { display: flex; flex-direction: column; gap: 2px; }
  .sidebar .navlink { flex-direction: row; justify-content: flex-start; gap: 12px; padding: 11px 12px; font-size: .95rem; border-top: 0; border-left: 3px solid transparent; }
  .sidebar .navlink[aria-current="page"] { border-left-color: var(--accent); background: var(--accent-soft); }
  .sidebar .dot-badge { position: static; margin-left: auto; }
  .brand { font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; display: flex; align-items: center; gap: 10px; letter-spacing: -0.03em; padding: 0 8px; }
  .brand-mark { width: 32px; height: 32px; border-radius: var(--r-ctl); background: var(--accent); color: var(--on-accent); display: grid; place-items: center; }
  .brand-mark svg { width: 20px; height: 20px; }
  .tabbar { display: none; }
  main { max-width: 860px; width: 100%; padding: 36px 32px 60px; }
  .tiles { grid-template-columns: repeat(4, 1fr); }
  .tile.wide { grid-column: span 2; }
  .results { display: grid; grid-template-columns: repeat(3, 1fr); align-items: stretch; }
  .detail-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 14px; align-items: start; }
  .sticky-cta { bottom: 20px; }
  .toast { bottom: 28px; }
  .home-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 14px; align-items: start; }
  .home-grid.two { grid-template-columns: 1fr 1fr; }
  .motto.home { display: none; }
  .picks { display: grid; grid-template-columns: repeat(3, 1fr); }
  .pick { grid-template-columns: 1fr; align-items: stretch; padding: 10px; }
  .pick-body { padding: 0 4px 4px; }
  .cover.thumb { height: 120px; min-height: 0; }
}

/* ---------- skener kódov ---------- */
.meat-tip { display: flex; gap: 12px; align-items: center; background: var(--tile-coral); border-radius: var(--r-ctl); padding: 12px; }
.dm-icon { width: 40px; height: 40px; flex: none; fill: var(--ink); background: var(--surface); padding: 5px; border-radius: 4px; }
body.camera-open { overflow: hidden; }
.camera { position: fixed; inset: 0; z-index: 50; background: #000; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.camera video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.camera-frame { position: relative; width: min(62vmin, 340px); aspect-ratio: 1; box-shadow: 0 0 0 100vmax rgba(0,0,0,.45); border-radius: 6px; }
.camera-frame i { position: absolute; width: 28px; height: 28px; border: 4px solid var(--sun); }
.camera-frame i:nth-child(1) { top: -2px; left: -2px; border-right: 0; border-bottom: 0; }
.camera-frame i:nth-child(2) { top: -2px; right: -2px; border-left: 0; border-bottom: 0; }
.camera-frame i:nth-child(3) { bottom: -2px; left: -2px; border-right: 0; border-top: 0; }
.camera-frame i:nth-child(4) { bottom: -2px; right: -2px; border-left: 0; border-top: 0; }
.scanline { position: absolute; left: 8%; right: 8%; height: 2px; background: var(--sun); opacity: .8; animation: scan 1.8s ease-in-out infinite alternate; }
@keyframes scan { from { top: 10%; } to { top: 88%; } }
@media (prefers-reduced-motion: reduce) { .scanline { animation: none; top: 50%; } }
.camera-hint { position: relative; color: #fff; text-align: center; max-width: 320px; margin: 22px 16px 0; font-weight: 700; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.camera-bar { position: absolute; bottom: calc(20px + env(safe-area-inset-bottom)); left: 0; right: 0; display: flex; gap: 10px; justify-content: center; }
.camera-bar .btn[aria-pressed="true"] { background: var(--sun); color: #2A1D00; }

/* ---------- domácnosť ---------- */
.eyebrow { font-size: .75rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-ink); }
.join-card { border: 2px solid var(--accent); background: var(--accent-soft); }
.members { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.member { display: flex; align-items: center; gap: 10px; min-width: 0; }
.member .grow { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--tile-teal); color: var(--accent-ink); display: grid; place-items: center; font-weight: 800; flex: none; }
.invite { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; background: var(--bg); border-radius: var(--r-ctl); padding: 12px; }
.qr { width: 168px; height: 168px; flex: none; border-radius: 6px; }
.invite .stack { flex: 1; min-width: 180px; }
.hh-name summary { cursor: pointer; list-style: none; }
.hh-name summary::-webkit-details-marker { display: none; }
.hh-name input { flex: 1; }
