/* DictaCart — "Receipt & Rubber Stamp" · v0.1.2
   Smaragdni pult · topel papir · paradižnikov žig · kobaltni kemik · barvni oddelki kot napisi v trgovini.
   Pisave: Atkinson Hyperlegible (zasnovana za največjo berljivost) + Bodoni Moda samo za logotip. */

:root {
  --counter: #0c3a2e;
  --counter-2: #17604a;
  --counter-line: rgba(255, 244, 214, 0.055);
  --paper: #fffbf3;
  --paper-2: #f5eedd;
  --ink: #1c1a17;
  --ink-soft: #5a554b;
  --ink-faint: #8e887b;
  --vermilion: #f0502d;
  --vermilion-deep: #c23a17;
  --cobalt: #2f4bf5;
  --sun: #ffc93d;
  --mint: #8ee6bf;
  --cream: #fff4d6;

  /* oddelki: barve kot table nad policami (bel tekst ≥ 4,5 : 1) */
  --c1: #1b8a4a;   /* Sadje in zelenjava */
  --c2: #a8620f;   /* Kruh in pekovski izdelki */
  --c3: #2463d6;   /* Mlečni izdelki in jajca */
  --c4: #c8283f;   /* Meso in ribe */
  --c5: #8a5a12;   /* Suho blago */
  --c6: #c2410c;   /* Juhe in omake */
  --c7: #0b7f74;   /* Pijače */
  --c8: #1f7fb8;   /* Zamrznjeno */
  --c9: #b42a7c;   /* Sladkarije in prigrizki */
  --c10: #6d3fcf;  /* Higiena */
  --c11: #0a7a96;  /* Čistila */
  --c12: #5a554b;  /* Drugo */

  /* ena sama pisava, zasnovana za berljivost; številke tabelarne (poravnane) */
  --f-sans: 'Atkinson Hyperlegible Next', 'Atkinson Hyperlegible', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --f-display: var(--f-sans);
  --f-mono: var(--f-sans);

  --dock-h: 104px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --ease-thud: cubic-bezier(.3, 1.6, .5, 1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --counter: #08261e;
    --counter-2: #0f4535;
    --paper: #f3ecdc;
    --paper-2: #e8dfca;
  }
}
:root[data-theme="dark"] {
  --counter: #08261e;
  --counter-2: #0f4535;
  --paper: #f3ecdc;
  --paper-2: #e8dfca;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  background-color: var(--counter);
  background-image:
    linear-gradient(var(--counter-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--counter-line) 1px, transparent 1px),
    radial-gradient(110% 55% at 50% 0%, var(--counter-2), var(--counter) 72%);
  background-size: 28px 28px, 28px 28px, 100% 100%;
  background-attachment: fixed;
  color: var(--cream);
  font-family: var(--f-sans);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: contain;
}
button { font: inherit; color: inherit; cursor: pointer; }
em { font-style: normal; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--sun);
  outline-offset: 2px;
}

/* ───────── MASTHEAD ───────── */
.masthead {
  max-width: 480px;
  margin: 0 auto;
  padding: calc(env(safe-area-inset-top, 0px) + 22px) 20px 18px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}
.wordmark {
  margin: 0;
  font-family: var(--f-display);
  font-weight: 800;
  font-size: clamp(36px, 10.5vw, 46px);
  line-height: .9;
  letter-spacing: -0.02em;
  color: var(--paper);
}
.wordmark em {
  font-style: normal;
  font-weight: 800;
  color: var(--vermilion);
  margin-left: .02em;
}
.motto {
  margin: 9px 0 0;
  font-size: 13px;
  color: var(--mint);
}
.motto em {
  font-style: normal;
  font-weight: 800;
  font-size: 15px;
  color: var(--cream);
}
.mast-right { display: grid; justify-items: end; gap: 12px; flex: none; }
.mast-tools { display: flex; gap: 8px; align-items: center; }
.lang {
  display: flex;
  border: 2px solid rgba(255, 244, 214, .35);
  border-radius: 999px;
  padding: 2px;
}
.lang button {
  border: 0;
  background: transparent;
  color: var(--cream);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .06em;
  padding: 6px 9px 5px;
  min-height: 32px;
  border-radius: 999px;
}
.lang button[aria-pressed="true"] { background: var(--sun); color: var(--ink); }
.icon-btn {
  width: 40px; height: 40px;
  border: 0;
  border-radius: 12px;
  background: var(--paper);
  display: grid;
  place-items: center;
}
.icon-btn svg { width: 22px; height: 22px; fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linecap: round; }
.tally {
  display: grid;
  justify-items: end;
  gap: 4px;
  font-family: var(--f-mono);
}
.tally-num {
  font-size: 28px;
  font-weight: 500;
  color: var(--paper);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.tally-num b { font-weight: 800; color: var(--sun); }
.tally-num i { font-style: normal; color: var(--vermilion); padding: 0 2px; }
.tally-label {
  font-family: var(--f-sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--mint);
}

/* ───────── RECEIPT ───────── */
.counter {
  max-width: 480px;
  margin: 0 auto;
  padding: 8px 12px calc(var(--dock-h) + var(--safe-b) + 64px);
}
.receipt {
  --tooth: 14px;
  position: relative;
  color: var(--ink);
  background-color: var(--paper);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .3 0 0 0 0 .25 0 0 0 0 .15 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  padding: 24px 18px 30px;
  margin: var(--tooth) 0;
  box-shadow:
    0 30px 60px -20px rgba(0,0,0,.6),
    0 8px 18px -8px rgba(0,0,0,.45);
  transform: rotate(-.4deg);
  animation: feed .7s var(--ease-out) both;
}
.receipt::before, .receipt::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  height: var(--tooth);
  background: var(--paper);
}
.receipt::before {
  top: calc(var(--tooth) * -1 + 1px);
  -webkit-mask: conic-gradient(from 135deg at top, #000 90deg, #0000 0) 50% / calc(var(--tooth) * 2) 100%;
          mask: conic-gradient(from 135deg at top, #000 90deg, #0000 0) 50% / calc(var(--tooth) * 2) 100%;
}
.receipt::after {
  bottom: calc(var(--tooth) * -1 + 1px);
  -webkit-mask: conic-gradient(from -45deg at bottom, #000 90deg, #0000 0) 50% / calc(var(--tooth) * 2) 100%;
          mask: conic-gradient(from -45deg at bottom, #000 90deg, #0000 0) 50% / calc(var(--tooth) * 2) 100%;
}
@keyframes feed {
  from { transform: translateY(-60px) rotate(-.4deg); opacity: 0; }
  to   { transform: translateY(0) rotate(-.4deg); opacity: 1; }
}

.r-head { text-align: center; font-family: var(--f-mono); }
.r-shop { font-size: 11px; font-weight: 600; letter-spacing: .1em; color: var(--ink-soft); }
.r-no {
  margin-top: 10px;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: .06em;
}
.r-date { margin-top: 4px; font-size: 13px; color: var(--ink-soft); }
.r-rule {
  height: 2px;
  margin: 18px -2px;
  background: repeating-linear-gradient(90deg, var(--ink) 0 7px, transparent 7px 12px);
  opacity: .35;
}

/* oddelek: barvna tabla + barvni rob */
.cat {
  --cc: var(--c12);
  margin: 4px 0 20px;
  padding-left: 10px;
  border-left: 4px solid var(--cc);
}
.cat-head {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 4px;
}
.cat-no {
  font-family: var(--f-mono);
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  background: var(--cc);
  padding: 4px 6px 3px;
  border-radius: 4px;
  line-height: 1;
}
.cat-name {
  flex: 1;
  font-weight: 800;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: .07em;
  line-height: 1.1;
  color: var(--cc);
}
.cat-count {
  font-family: var(--f-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-soft);
  white-space: nowrap;
}

/* vrstica artikla: [kljukica] ime ...... količina [×] */
.item {
  position: relative;
  overflow: hidden;
  margin: 0 -6px 0 -8px;
  border-radius: 6px;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}
.item-del {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 16px;
  background: var(--vermilion);
  color: #fff;
  font-family: var(--f-mono);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .14em;
  visibility: hidden;
}
.item.dragging .item-del, .item.leaving .item-del, .item.swiped .item-del { visibility: visible; }
.item-body {
  position: relative;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto 40px;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  padding: 4px 0 4px 8px;
  background: transparent;
  transition: transform .28s var(--ease-out), background-color .2s;
  will-change: transform;
}
.item-body:active { background: rgba(28, 26, 23, .05); }
.item.dragging .item-body, .item.swiped .item-body { transition: none; background: var(--paper); }

.tick { width: 24px; height: 24px; }
.tick rect { fill: #fff; stroke: var(--cc, var(--ink)); stroke-width: 1.8; }
.tick path {
  fill: none;
  stroke: var(--cobalt);
  stroke-width: 2.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 30;
  stroke-dashoffset: 30;
  transition: stroke-dashoffset .35s var(--ease-out);
}
.done .tick path { stroke-dashoffset: 0; }
.done .tick rect { stroke: var(--ink-faint); fill: transparent; }

.name {
  position: relative;
  justify-self: start;
  font-size: 19px;
  font-weight: 500;
  line-height: 1.25;
  padding: 2px 2px;
  overflow-wrap: anywhere;
  transition: color .3s;
}
.qty {
  font-family: var(--f-mono);
  font-size: 16px;
  font-weight: 700;
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.qty small {
  font-family: var(--f-sans);
  font-size: 15px;
  font-weight: 600;
  color: var(--vermilion-deep);
}
/* hitra odstranitev */
.x {
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  display: grid;
  place-items: center;
  color: var(--ink-faint);
  transition: background .15s, color .15s, transform .1s;
}
.x svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.x:hover { color: var(--vermilion-deep); background: rgba(240, 80, 45, .1); }
.x:active { transform: scale(.88); background: var(--vermilion); color: #fff; }

/* kemik prečrta (samo ime, ne oznak) */
.nm { position: relative; margin-right: 6px; }
.nm::after {
  content: '';
  position: absolute;
  left: -4px;
  top: 54%;
  height: 2.5px;
  width: calc(100% + 8px);
  background: var(--cobalt);
  border-radius: 2px 6px 3px 5px;
  transform: rotate(-1.6deg) scaleX(0);
  transform-origin: left center;
  transition: transform .38s var(--ease-out);
  opacity: .9;
}
.done .name { color: var(--ink-faint); }
.done .nm::after { transform: rotate(-1.6deg) scaleX(1); }
.done .qty, .done .qty small { color: var(--ink-faint); }
.done .pill { opacity: .45; }

/* oznake trgovine in akcije */
.pill {
  display: inline-block;
  vertical-align: 2px;
  margin: 2px 4px 0 0;
  padding: 2px 7px 1px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
  line-height: 1.35;
  white-space: nowrap;
}
.pill.shop { background: #e7ecff; color: #1f35b8; box-shadow: inset 0 0 0 1.5px #b9c5ff; }
.pill.sale { background: var(--sun); color: var(--ink); }

/* filter po trgovini */
.shop-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -4px 0 18px;
}
.chip {
  border: 2px solid var(--ink);
  background: transparent;
  color: var(--ink);
  border-radius: 999px;
  padding: 6px 13px 5px;
  font-size: 15px;
  font-weight: 700;
  min-height: 40px;
}
.chip b { font-weight: 800; color: var(--vermilion-deep); margin-left: 2px; }
.chip.on { background: var(--ink); color: var(--paper); }
.chip.on b { color: var(--sun); }
.chip-note { flex-basis: 100%; margin: 0; font-size: 13px; color: var(--ink-soft); }

.item.printed .item-body { animation: print .6s var(--ease-out) both; }
@keyframes print {
  from { clip-path: inset(0 100% 0 0); background: #ffe9a3; }
  60% { background: #fff1c2; }
  to { clip-path: inset(0 0 0 0); }
}
.item.bump .qty { animation: bump .5s var(--ease-thud); }
@keyframes bump { 40% { transform: scale(1.3); color: var(--vermilion); } }
.item.leaving { animation: leave .3s ease-in forwards; }
@keyframes leave { to { height: 0; opacity: 0; } }

/* prazno */
.r-empty { text-align: center; padding: 4px 6px 8px; }
.e-big {
  margin: 0;
  font-family: var(--f-display);
  font-size: 28px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.01em;
}
.e-small { margin: 12px 0 12px; font-size: 16px; color: var(--ink-soft); line-height: 1.45; }
.e-small b { font-family: var(--f-mono); font-size: 14px; color: var(--vermilion-deep); letter-spacing: .04em; }
.r-empty blockquote {
  margin: 0 auto;
  max-width: 320px;
  font-size: 17px;
  line-height: 1.5;
  padding: 14px 16px;
  background: #fff3c4;
  border-left: 4px solid var(--sun);
  text-align: left;
  transform: rotate(.6deg);
}

/* noga */
.r-sum {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 0;
  margin: 0;
  font-family: var(--f-mono);
  font-size: 14px;
}
.r-sum dt { letter-spacing: .08em; color: var(--ink-soft); }
.r-sum dd { margin: 0; font-weight: 800; font-variant-numeric: tabular-nums; }
.r-sum dt:last-of-type, .r-sum dd:last-of-type { font-size: 17px; padding-top: 4px; color: var(--ink); }

.tip {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 14px;
  align-items: baseline;
  text-decoration: none;
  color: var(--ink);
  padding: 14px 14px;
  margin: 0 -4px;
  background: var(--sun);
  border-radius: 6px;
  position: relative;
  transition: background .2s, color .2s, transform .15s;
}
.tip:hover, .tip:active { background: var(--ink); color: var(--paper); }
.tip:active { transform: scale(.99); }
.tip-k {
  grid-row: 1 / 3;
  align-self: center;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-family: var(--f-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .14em;
  border-right: 1.5px dashed currentColor;
  padding-left: 8px;
}
.tip-v {
  font-family: var(--f-display);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.1;
}
.tip-arrow {
  display: inline-block;
  font-family: var(--f-sans);
  font-style: normal;
  color: var(--vermilion-deep);
  transition: transform .25s var(--ease-out);
}
.tip:hover .tip-arrow { transform: translateX(5px); color: var(--sun); }
.tip-s { font-size: 13px; margin-top: 4px; opacity: .8; }
.r-thanks {
  margin-top: 24px;
  text-align: center;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: .08em;
  color: var(--ink);
}
.barcode {
  display: flex;
  justify-content: center;
  align-items: stretch;
  height: 38px;
  margin: 14px auto 0;
  width: 78%;
}
.barcode i { display: block; background: var(--ink); height: 100%; }

/* ───────── ŽIG ───────── */
.stamp-layer { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.stamp {
  position: absolute;
  right: 6%;
  padding: 7px 14px 6px;
  border: 3.5px solid var(--vermilion);
  border-radius: 8px;
  outline: 1.5px solid var(--vermilion);
  outline-offset: 3px;
  color: var(--vermilion);
  font-family: var(--f-sans);
  font-weight: 800;
  font-size: 32px;
  letter-spacing: .14em;
  line-height: 1;
  text-align: center;
  mix-blend-mode: multiply;
  filter: url(#ink);
  transform: rotate(var(--rot, -9deg));
  animation: stamp 1.9s var(--ease-out) forwards;
}
.stamp small {
  display: block;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: .2em;
  font-weight: 800;
  margin-top: 4px;
}
@keyframes stamp {
  0%   { opacity: 0; transform: rotate(var(--rot)) scale(2.2); }
  12%  { opacity: 1; transform: rotate(var(--rot)) scale(.94); }
  18%  { transform: rotate(var(--rot)) scale(1.02); }
  24%  { transform: rotate(var(--rot)) scale(1); }
  75%  { opacity: .92; }
  100% { opacity: 0; transform: rotate(var(--rot)) scale(1); }
}
.receipt.thud { animation: thud .25s ease-out; }
@keyframes thud { 30% { transform: rotate(-.4deg) translateY(2px) scale(.996); } }

/* ───────── TRAK STANJA ───────── */
.ticker {
  position: fixed;
  left: 50%;
  bottom: calc(var(--dock-h) + var(--safe-b) + 6px);
  transform: translateX(-50%);
  width: min(456px, calc(100% - 24px));
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 12px 14px 13px;
  background: var(--paper);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.4;
  border-radius: 8px;
  box-shadow: 0 12px 30px -10px rgba(0,0,0,.65);
  animation: rise .3s var(--ease-out);
  z-index: 15;
}
.ticker[hidden] { display: none; }
@keyframes rise { from { transform: translate(-50%, 12px); opacity: 0; } }
.ticker-tag {
  flex: none;
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .1em;
  color: #fff;
  background: var(--vermilion);
  padding: 4px 6px 3px;
  border-radius: 4px;
  align-self: flex-start;
  margin-top: 2px;
}
.ticker.busy .ticker-tag { background: var(--ink); }
.ticker-text { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.ticker-text .interim { color: var(--ink-faint); }
.caret {
  flex: none;
  width: 3px; height: 20px;
  background: var(--vermilion);
  align-self: center;
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ───────── SPODNJA VRSTICA ───────── */
.dock {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 60px 1fr 60px;
  gap: 12px;
  align-items: center;
  max-width: 480px;
  margin: 0 auto;
  padding: 18px 14px calc(16px + var(--safe-b));
  background: linear-gradient(180deg, transparent, var(--counter) 34%);
}
.dock-side {
  height: 60px;
  border: 0;
  background: var(--paper);
  border-radius: 14px;
  display: grid;
  place-items: center;
  box-shadow: 0 -3px 0 rgba(0,0,0,.12) inset, 0 10px 20px -10px rgba(0,0,0,.6);
  transition: transform .15s, background .2s;
}
.dock-side:active { transform: scale(.94); }
.dock-side svg {
  width: 26px; height: 26px;
  fill: none;
  stroke: var(--ink);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.dictum {
  position: relative;
  height: 72px;
  border: 0;
  border-radius: 14px;
  background: var(--vermilion);
  color: #fff;
  overflow: hidden;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 4px;
  box-shadow:
    0 -4px 0 var(--vermilion-deep) inset,
    0 14px 28px -10px rgba(240, 80, 45, .75);
  transition: transform .12s, box-shadow .12s, background .3s;
}
.dictum:active { transform: translateY(2px); box-shadow: 0 -1px 0 var(--vermilion-deep) inset; }
.dictum-label {
  position: relative;
  font-weight: 800;
  font-size: 27px;
  letter-spacing: .12em;
  padding-left: .12em;
  white-space: nowrap;
  line-height: .9;
}
.dictum-hint {
  position: relative;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--cream);
}
.dictum-bars {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 0 14px;
  opacity: 0;
  transition: opacity .3s;
}
.dictum-bars i {
  flex: 1;
  max-width: 5px;
  height: 8%;
  background: rgba(255, 201, 61, .45);
  border-radius: 2px;
  transition: height .08s linear;
}
.dictum.live { background: #d43f1f; }
.dictum.live .dictum-bars { opacity: 1; }
.dictum.live::before {
  content: '';
  position: absolute;
  inset: 6px;
  border: 2px dashed rgba(255, 244, 214, .6);
  border-radius: 9px;
}
.dictum.busy { background: var(--ink); box-shadow: 0 -4px 0 #000 inset; }
.dictum.busy .dictum-label { animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .45; } }

/* ───────── OKNA ───────── */
.scrim {
  position: fixed;
  inset: 0;
  background: rgba(4, 20, 15, .62);
  backdrop-filter: blur(2px);
  z-index: 30;
  animation: fade .2s;
}
@keyframes fade { from { opacity: 0; } }
.sheet {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(480px, 100%);
  z-index: 31;
  background: var(--paper);
  color: var(--ink);
  padding: 22px 20px calc(20px + var(--safe-b));
  animation: sheetUp .32s var(--ease-out);
  max-height: 88dvh;
  overflow: auto;
}
.sheet::before {
  content: '';
  position: absolute;
  left: 0; right: 0; top: -12px;
  height: 12px;
  background: var(--paper);
  -webkit-mask: conic-gradient(from 135deg at top, #000 90deg, #0000 0) 50% / 24px 100%;
          mask: conic-gradient(from 135deg at top, #000 90deg, #0000 0) 50% / 24px 100%;
}
@keyframes sheetUp { from { transform: translate(-50%, 100%); } }
.sheet[hidden], .scrim[hidden], .toast[hidden] { display: none; }
.sheet h2 {
  margin: 0 0 16px;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 28px;
  line-height: 1.15;
}
.sheet textarea, .field input, .field select {
  width: 100%;
  font: 500 18px/1.45 var(--f-sans);
  color: var(--ink);
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 10px 12px;
  resize: none;
  appearance: none;
}
.field { display: block; margin-bottom: 16px; }
.field span {
  display: block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 5px;
}
.field-row { display: grid; grid-template-columns: 1fr 1.3fr; gap: 14px; }
.field select {
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 18px) 55%, calc(100% - 12px) 55%;
  background-size: 6px 6px;
  background-repeat: no-repeat;
  padding-right: 32px;
}
.sheet-row { display: flex; gap: 10px; margin-top: 18px; }
.btn {
  flex: 1;
  min-height: 54px;
  padding: 8px 12px;
  line-height: 1.15;
  border-radius: 12px;
  font-weight: 800;
  font-size: 17px;
  letter-spacing: .04em;
  border: 2px solid var(--ink);
}
.btn.ink { background: var(--ink); color: var(--paper); flex: 1.6; }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.danger { color: var(--vermilion-deep); border-color: var(--vermilion-deep); }
.btn:active { transform: translateY(1px); }

.menu-item {
  display: grid;
  width: 100%;
  text-align: left;
  gap: 3px;
  padding: 14px 4px;
  background: none;
  border: 0;
  border-top: 1.5px dashed rgba(28,26,23,.25);
  color: var(--ink);
  text-decoration: none;
}
.menu-item b { font-size: 19px; font-weight: 700; }
.menu-item span { font-size: 14px; color: var(--ink-soft); }
.menu-item.danger b { color: var(--vermilion-deep); }
.menu-item.coffee {
  margin-top: 10px;
  border: 0;
  border-radius: 10px;
  padding: 15px 16px;
  background: var(--sun);
  color: var(--ink);
}
.menu-item.coffee b { font-family: var(--f-display); font-weight: 800; font-size: 24px; }
.menu-item.coffee span { color: var(--ink); opacity: .75; }
.menu-meta {
  margin: 16px 0 0;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .06em;
  color: var(--ink-faint);
  text-align: center;
}

/* ───────── OBVESTILO ───────── */
.toast {
  position: fixed;
  bottom: calc(var(--dock-h) + var(--safe-b) + 10px);
  left: 50%;
  transform: translateX(-50%) rotate(-1deg);
  z-index: 50;
  width: max-content;
  max-width: calc(100% - 28px);
  padding: 11px 16px 10px;
  background: var(--cream);
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  border-radius: 8px;
  box-shadow: 0 10px 24px -8px rgba(0,0,0,.6);
  border-left: 5px solid var(--vermilion);
  animation: drop .35s var(--ease-thud);
}
@keyframes drop { from { transform: translate(-50%, 24px) rotate(-1deg); opacity: 0; } }

@media (min-width: 720px) {
  .masthead { padding-top: 44px; }
  .receipt { padding: 34px 30px 36px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ───────── 0.2: fotografija, urejanje trgovine, jezik govora ───────── */
.ticker-thumb {
  flex: none;
  width: 44px; height: 44px;
  object-fit: cover;
  border-radius: 6px;
  align-self: center;
}
.field.check {
  display: flex;
  align-items: center;
  gap: 10px;
  align-self: end;
  min-height: 48px;
}
.field.check input { width: 24px; height: 24px; accent-color: var(--vermilion); flex: none; appearance: auto; padding: 0; }
.field.check span { margin: 0; font-size: 15px; letter-spacing: 0; text-transform: none; color: var(--ink); }
.menu-item.select { cursor: default; }
.menu-item.select select {
  margin-top: 8px;
  width: 100%;
  font: 600 17px/1.4 var(--f-sans);
  color: var(--ink);
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 8px 10px;
}
.dictum.live .dictum-label, .dictum.busy .dictum-label { font-size: 23px; letter-spacing: .06em; padding-left: .06em; }

/* zelo ozki telefoni (< 360 px) */
@media (max-width: 359px) {
  .masthead { padding-left: 14px; padding-right: 14px; gap: 8px; }
  .brand { min-width: 0; }
  .wordmark { font-size: 32px; }
  .motto { font-size: 12px; }
  .lang button { padding: 5px 7px 4px; font-size: 11px; }
  .icon-btn { width: 36px; height: 36px; }
  .tally-num { font-size: 24px; }
  .dock { grid-template-columns: 52px 1fr 52px; gap: 8px; padding-left: 10px; padding-right: 10px; }
  .dock-side { height: 56px; }
  .dictum-label { font-size: 23px; letter-spacing: .08em; padding-left: .08em; }
  .dictum.live .dictum-label, .dictum.busy .dictum-label { font-size: 19px; letter-spacing: .03em; padding-left: .03em; }
  .dictum-hint { font-size: 11px; }
}

/* ═════════ 0.4 · igriva tema (usklajena z letakom) ═════════
   Krem ozadje z barvnimi lisami, elementi kot nalepke (debela obroba + zamaknjena senca),
   Baloo 2 (od 0.8.1; prej Fredoka, ki nima Č) za logotip/naslove/gumb, Caveat za slogan. Besedilo artiklov ostane Atkinson Hyperlegible. */
:root {
  --bg: #fff6e6;
  /* 0.5: svetlejša zelena namesto temno smaragdne, sence v svetli meti */
  --on-bg: #1d5c48;
  --on-bg-soft: #3f7a66;
  --ink: #1d5c48;
  --ink-soft: #3f7a66;
  --ink-faint: #8fb3a5;
  --shade: #a9dcc5;
  --lilac: #e7fbf1;
  --vermilion: #f0502d;
  --vermilion-deep: #c9381a;
  --sun: #ffcc3f;
  --mint: #9be8c5;
  --sky: #9fd3ff;
  --pink: #ffb3c7;
  --paper: #ffffff;
  --paper-2: #fff9ef;
  --counter: var(--bg);
  --blob-a: #9be8c5;
  --blob-b: rgba(255, 179, 199, .75);
  --blob-c: rgba(159, 211, 255, .7);
  --f-fun: 'Baloo 2', 'Atkinson Hyperlegible Next', system-ui, sans-serif; /* 0.8.1: Fredoka nima črke Č */
  --f-hand: 'Caveat', cursive;
  --shadow: 8px 9px 0 var(--shade);
  --shadow-s: 4px 5px 0 var(--shade);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #173d32; --on-bg: #fff6e6; --on-bg-soft: #b8d8cb;
    --blob-a: rgba(155, 232, 197, .18); --blob-b: rgba(255, 179, 199, .14); --blob-c: rgba(159, 211, 255, .14);
    --paper: #ffffff; --paper-2: #fff9ef;
  }
}
:root[data-theme="dark"] {
  --bg: #173d32; --on-bg: #fff6e6; --on-bg-soft: #b8d8cb;
  --blob-a: rgba(155, 232, 197, .18); --blob-b: rgba(255, 179, 199, .14); --blob-c: rgba(159, 211, 255, .14);
}

body {
  background-color: var(--bg);
  background-image:
    radial-gradient(260px 240px at 100% 0%, var(--blob-a) 0 70%, transparent 71%),
    radial-gradient(240px 230px at 0% 46%, var(--blob-b) 0 70%, transparent 71%),
    radial-gradient(230px 220px at 100% 82%, var(--blob-c) 0 70%, transparent 71%);
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: var(--on-bg);
}
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--vermilion);
}

/* glava */
.wordmark { font-family: var(--f-fun); font-weight: 700; letter-spacing: -0.01em; color: var(--on-bg); }
.wordmark em { color: var(--vermilion); font-weight: 700; }
.motto { color: var(--vermilion); font-size: 14px; }
.motto em { font-family: var(--f-fun); font-weight: 600; color: var(--on-bg); font-size: 15px; }
.motto span { font-family: var(--f-hand); font-size: 23px; font-weight: 700; color: var(--vermilion); }
.tally-num { color: var(--on-bg); font-family: var(--f-fun); font-weight: 600; }
.tally-num b { color: var(--vermilion); font-weight: 700; }
.tally-num i { color: var(--on-bg-soft); }
.tally-label { color: var(--on-bg-soft); }
.lang { border: 3px solid var(--on-bg); background: var(--paper); }
.lang button { color: var(--ink); }
.lang button[aria-pressed="true"] { background: var(--sun); color: var(--ink); }
.icon-btn { border: 3px solid var(--ink); box-shadow: var(--shadow-s); }

/* listek kot kartica-nalepka */
.receipt {
  background-color: var(--paper);
  background-image: none;
  border: 4px solid var(--ink);
  border-radius: 30px;
  box-shadow: var(--shadow);
  margin: 8px 6px 22px 0;
  transform: none;
  animation: feed2 .6s var(--ease-out) both;
}
.receipt::before, .receipt::after { display: none; }
@keyframes feed2 { from { transform: translateY(-40px); opacity: 0; } to { transform: none; opacity: 1; } }
.receipt.thud { animation: thud2 .25s ease-out; }
@keyframes thud2 { 30% { transform: translateY(2px) scale(.996); } }
.r-shop, .r-date { color: var(--ink-soft); }
.r-no { font-family: var(--f-fun); font-weight: 700; letter-spacing: .03em; font-size: 21px; }
.r-rule { background: repeating-linear-gradient(90deg, var(--ink) 0 8px, transparent 8px 14px); opacity: .22; }
.cat-name { font-family: var(--f-fun); font-weight: 700; letter-spacing: .04em; font-size: 17px; }
.cat-no { border: 2px solid var(--ink); border-radius: 8px; font-family: var(--f-fun); }

/* kljukica in prečrtanje kot na letaku */
.tick rect { stroke: var(--ink); stroke-width: 2.4; fill: #fff; }
.tick path { stroke: var(--ink); }
.done .tick rect { fill: var(--mint); stroke: var(--ink); }
.nm::after { background: var(--vermilion); }
.done .name { color: var(--ink-faint); }

.pill.shop { background: var(--sky); color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.pill.sale { background: var(--sun); color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.chip { border: 3px solid var(--ink); background: var(--paper); font-family: var(--f-fun); font-weight: 600; }
.chip.on { background: var(--ink); color: #fff; }
.qty small { color: var(--vermilion-deep); }

.e-big { font-family: var(--f-fun); font-weight: 700; }
.r-empty blockquote { background: var(--lilac); border-left: 0; border: 3px solid var(--ink); border-radius: 18px; box-shadow: var(--shadow-s); transform: rotate(-1deg); }
.e-small b { font-family: var(--f-fun); color: var(--vermilion); }

.tip { background: var(--sun); border: 3px solid var(--ink); border-radius: 22px; box-shadow: var(--shadow-s); margin: 0 4px 0 0; }
.tip-v { font-family: var(--f-fun); }
.tip:hover, .tip:active { background: var(--ink); color: #fff; }
.r-thanks { font-family: var(--f-fun); font-weight: 700; color: var(--vermilion); letter-spacing: .04em; font-size: 20px; }

/* spodnja vrstica */
.dock { background: linear-gradient(180deg, transparent, var(--bg) 38%); }
.dock-side { background: var(--paper); border: 3px solid var(--ink); border-radius: 18px; box-shadow: var(--shadow-s); }
.dock-side:active { transform: translate(2px, 3px); box-shadow: 1px 1px 0 var(--shade); }
.dictum {
  border: 4px solid var(--ink);
  border-radius: 22px;
  box-shadow: 6px 7px 0 var(--shade);
}
.dictum:active { transform: translate(3px, 4px); box-shadow: 2px 2px 0 var(--shade); }
.dictum-label { font-family: var(--f-fun); font-weight: 700; }
.dictum-hint { color: #fff; opacity: .92; }
.dictum.busy { background: var(--ink); box-shadow: 6px 7px 0 var(--vermilion); }

/* trak, obvestilo, okna */
.ticker { border: 3px solid var(--ink); border-radius: 20px; box-shadow: var(--shadow-s); }
.toast { background: var(--paper); border: 3px solid var(--ink); border-radius: 18px; box-shadow: var(--shadow-s); }
.sheet { background: var(--paper-2); border: 4px solid var(--ink); border-bottom: 0; border-radius: 30px 30px 0 0; }
.sheet::before { display: none; }
.sheet h2 { font-family: var(--f-fun); font-weight: 700; }
.sheet textarea, .field input, .field select { border: 3px solid var(--ink); border-radius: 14px; }
.btn { border: 3px solid var(--ink); border-radius: 16px; font-family: var(--f-fun); font-weight: 700; }
.btn.ink { background: var(--vermilion); color: #fff; box-shadow: var(--shadow-s); }
.menu-item b { font-family: var(--f-fun); font-weight: 600; }
.menu-item.coffee { background: var(--sun); border: 3px solid var(--ink); border-radius: 18px; box-shadow: var(--shadow-s); }
.menu-item.coffee b { font-family: var(--f-fun); font-weight: 700; }
.scrim { background: rgba(23, 61, 50, .45); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --shadow: 8px 9px 0 rgba(155, 232, 197, .45); --shadow-s: 4px 5px 0 rgba(155, 232, 197, .45); }
  :root:not([data-theme="light"]) .dictum { box-shadow: 6px 7px 0 rgba(155, 232, 197, .45); }
}

/* 0.5 · okno za deljenje (rezerva, ko sistemsko deljenje ni na voljo) */
#shareText { width: 100%; font: 15px/1.45 'Atkinson Hyperlegible Next', system-ui, sans-serif; resize: none; background: #fff; color: var(--ink); padding: 12px; }
.share-apps { display: flex; gap: 8px; margin-top: 12px; }
.share-apps .btn { flex: 1; text-align: center; text-decoration: none; padding: 12px 6px; font-size: 15px; }

/* 0.6 · več listkov */
.r-title { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 10px; }
.r-no {
  all: unset; box-sizing: border-box; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px; max-width: calc(100% - 52px);
  font-family: var(--f-fun); font-weight: 700; letter-spacing: .03em; font-size: 21px; color: var(--ink);
  padding: 4px 10px; border-radius: 14px; text-transform: uppercase;
}
.r-no:hover, .r-no:focus-visible { background: var(--blob-a); }
#listTitle { overflow-wrap: anywhere; text-align: center; line-height: 1.15; }
.r-chev { flex: none; width: 18px; height: 18px; fill: none; stroke: var(--ink); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.r-plus {
  flex: none; display: grid; place-items: center; width: 36px; height: 36px; padding: 0; cursor: pointer;
  background: var(--sun); border: 3px solid var(--ink); border-radius: 12px; box-shadow: 2px 3px 0 var(--shade);
}
.r-plus svg { width: 18px; height: 18px; fill: none; stroke: var(--ink); stroke-width: 2.8; stroke-linecap: round; }
.r-plus:active { transform: translate(1px, 2px); box-shadow: none; }
.r-count { margin-top: 2px; font-size: 12px; font-weight: 700; letter-spacing: .1em; color: var(--ink-soft); }

.all-bought {
  margin: 14px 0 6px; padding: 14px 16px 16px; text-align: center;
  background: var(--blob-a); border: 3px solid var(--ink); border-radius: 20px; box-shadow: var(--shadow-s);
}
.ab-big { margin: 0 0 12px; font-family: var(--f-fun); font-weight: 700; font-size: 22px; color: var(--ink); }
.ab-row { display: flex; gap: 10px; }
.ab-row .btn { flex: 1; padding: 11px 6px; font-size: 16px; }

.new-list { width: 100%; padding: 14px; font-size: 18px; margin: 4px 0 14px; }
.lists { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; max-height: 52vh; overflow-y: auto; overscroll-behavior: contain; }
.li-card { position: relative; border-radius: 18px; overflow: hidden; touch-action: pan-y; }
.li-del {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: flex-end; padding-right: 18px;
  background: var(--vermilion); color: #fff; font-family: var(--f-fun); font-weight: 700; letter-spacing: .06em; border-radius: 18px;
}
.li-body {
  position: relative; display: flex; align-items: center; gap: 4px; padding: 6px 6px 6px 4px;
  background: var(--paper); border: 3px solid var(--ink); border-radius: 18px; transition: transform .2s var(--ease-out, ease-out);
}
.li-card.on .li-body { background: #e7fbf1; }
.li-open { all: unset; box-sizing: border-box; cursor: pointer; flex: 1; min-width: 0; display: grid; gap: 2px; padding: 8px 10px; }
.li-open b { font-family: var(--f-fun); font-weight: 700; font-size: 18px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.li-open span { font-size: 14px; color: var(--ink-soft); }
.li-open em { font-style: normal; font-weight: 700; color: var(--vermilion-deep); }
.li-act { flex: none; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; background: none; border: 0; border-radius: 12px; cursor: pointer; }
.li-act svg { width: 20px; height: 20px; fill: none; stroke: var(--ink-soft); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.li-act:hover, .li-act:focus-visible { background: var(--paper-2); }
.lists-hint { margin: 14px 2px 4px; font-size: 14px; line-height: 1.4; color: var(--ink-soft); }
@media (max-width: 420px) { .r-title { gap: 4px; } .r-no { font-size: 16.5px; letter-spacing: 0; padding: 4px 4px; gap: 3px; } .r-chev { width: 16px; height: 16px; } }

/* 0.7 · ikonice izdelkov */
.item-body { grid-template-columns: 26px 30px minmax(0, 1fr) auto 40px; gap: 6px; }
.ico { font-size: 22px; line-height: 1; text-align: center; filter: saturate(1.05); }
.done .ico { opacity: .4; filter: grayscale(.6); }

/* 0.7 · skupni listek */
.fam-chip {
  all: unset; box-sizing: border-box; cursor: pointer;
  display: inline-flex; align-items: center; gap: 7px; margin: 8px auto 0; padding: 5px 12px 5px 8px;
  font-family: var(--f-fun); font-weight: 600; font-size: 14px; letter-spacing: .02em; color: var(--ink);
  border: 2px solid var(--ink); border-radius: 999px; background: #fff; box-shadow: 2px 3px 0 var(--shade);
}
.fam-chip:active { transform: translateY(1px); box-shadow: 1px 1px 0 var(--shade); }
.fam-chip:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }
.fam-chip.invite { border-style: dashed; background: transparent; box-shadow: none; color: var(--ink-soft); }
.fc-plus { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--sun); color: var(--ink); font-weight: 700; border: 2px solid var(--ink); font-size: 15px; line-height: 1; }
.fc-faces { display: inline-flex; }
.fc-faces i {
  display: grid; place-items: center; width: 24px; height: 24px;
  border-radius: 50%; border: 2px solid var(--ink); font: normal 700 10px/1 var(--f-sans); color: var(--ink);
  background: hsl(calc(var(--i) * 70 + 150) 70% 82%);
}
.fc-faces i + i { margin-left: -4px; }
.fc-dot { width: 9px; height: 9px; border-radius: 50%; background: #9aa39f; }
.fam-chip.live .fc-dot { background: #22b573; box-shadow: 0 0 0 0 rgba(34, 181, 115, .55); animation: live 2.4s infinite; }
@keyframes live { 70% { box-shadow: 0 0 0 7px rgba(34, 181, 115, 0); } 100% { box-shadow: 0 0 0 0 rgba(34, 181, 115, 0); } }
@media (prefers-reduced-motion: reduce) { .fam-chip.live .fc-dot { animation: none; } }

.fam-sheet { max-height: 88vh; overflow-y: auto; }
.fam-list-name { margin: -6px 0 12px; font-family: var(--f-fun); font-weight: 600; font-size: 17px; color: var(--ink-soft); }
.fam-p { margin: 0 0 12px; font-size: 16px; line-height: 1.45; }
.fam-p.big { font-size: 19px; font-weight: 600; }
.fam-note { margin: 6px 2px 12px; font-size: 14px; line-height: 1.4; color: var(--ink-soft); }
.fam-note.dev { padding: 8px 10px; background: var(--sun); color: var(--ink); border-radius: 10px; font-weight: 700; }
.fam-err { margin: 4px 0 12px; padding: 8px 12px; border-radius: 12px; background: #ffe1d9; color: var(--vermilion-deep); font-weight: 700; }
.fam-hero { display: flex; justify-content: center; gap: 4px; margin: 4px 0 14px; font-size: 38px; }
.fam-hero span { display: inline-block; animation: hop 2.8s var(--ease-out) infinite; animation-delay: calc(var(--d, 0) * 1s); }
.fam-hero span:nth-child(2) { --d: .2; } .fam-hero span:nth-child(3) { --d: .4; } .fam-hero .fh-list { --d: .6; margin-left: 8px; }
@keyframes hop { 0%, 70%, 100% { transform: none; } 80% { transform: translateY(-7px) rotate(-6deg); } }
@media (prefers-reduced-motion: reduce) { .fam-hero span { animation: none; } }
.fam-sub { margin: 4px 0 8px; font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); }
.fam-members { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 8px; }
.fam-m { display: flex; align-items: center; gap: 10px; padding: 8px 6px 8px 10px; background: #fff; border: 2px solid var(--ink); border-radius: 16px; }
.fam-face { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--ink); background: var(--lilac); font-weight: 800; font-size: 13px; }
.fam-who { flex: 1; min-width: 0; display: grid; }
.fam-who b { font-weight: 700; font-size: 16px; overflow-wrap: anywhere; }
.fam-who em { font-style: normal; font-weight: 500; color: var(--ink-soft); }
.fam-who small { font-size: 13px; color: var(--ink-soft); overflow-wrap: anywhere; }
.fam-m .pill { background: var(--sun); color: var(--ink); flex: none; }
.fam-invite { width: 100%; padding: 14px; font-size: 18px; }
.fam-danger { margin-top: 18px; padding-top: 14px; border-top: 2px dashed var(--ink-faint); display: grid; }
.fam-danger .btn { width: 100%; min-height: 48px; font-size: 16px; }
.btn.armed { background: var(--vermilion-deep); color: #fff; border-color: var(--vermilion-deep); }
.fam-legal { margin: 14px 0 4px; text-align: center; font-size: 14px; }
.fam-legal a, .terms a { color: var(--ink); font-weight: 700; }
.field.check.terms { align-items: flex-start; min-height: 0; margin: 6px 0 10px; }
.field.check.terms span { font-size: 15px; line-height: 1.4; }
.code-input { font-size: 28px !important; letter-spacing: .4em; text-align: center; font-weight: 700; }
.fam-pill { background: var(--lilac); color: var(--ink); font-size: 11px; vertical-align: 1px; white-space: nowrap; }
.menu-item.fam b::before { content: '👪 '; }

/* ───────── 0.8 · paleta B: limeta in borovnica ─────────
   Borovničeva modra za besedilo in obrobe (11 : 1 na beli), limeta za glavne gumbe (z modrim besedilom 8 : 1),
   malinova za poudarke (DictaCart, prečrtanje, žig), svetla limeta za sence nalepk. */
:root {
  --bg: #f4f8e6;
  --on-bg: #24357a;
  --on-bg-soft: #4a5a9c;
  --ink: #24357a;
  --ink-soft: #4a5a9c;
  --ink-faint: #97a1c9;
  --shade: #d6e39c;
  --lilac: #eef5d6;
  --lime: #c8ee4a;
  --lime-deep: #9fc81c;
  --vermilion: #d6336c;
  --vermilion-deep: #a51f52;
  --sun: #ffd23f;
  --mint: #c8ee4a;
  --sky: #c7d3ff;
  --pink: #ffb3c1;
  --paper-2: #fbfdf3;
  --blob-a: #dcf07c;
  --blob-b: rgba(255, 179, 193, .7);
  --blob-c: rgba(176, 194, 255, .6);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1b2552; --on-bg: #f4f8e6; --on-bg-soft: #c3cbef; --paper-2: #fbfdf3;
    --blob-a: rgba(200, 238, 74, .16); --blob-b: rgba(255, 179, 193, .13); --blob-c: rgba(176, 194, 255, .14);
    --shadow: 8px 9px 0 rgba(200, 238, 74, .5); --shadow-s: 4px 5px 0 rgba(200, 238, 74, .5);
  }
  :root:not([data-theme="light"]) .dictum { box-shadow: 6px 7px 0 rgba(200, 238, 74, .5); }
}
:root[data-theme="dark"] {
  --bg: #1b2552; --on-bg: #f4f8e6; --on-bg-soft: #c3cbef;
  --blob-a: rgba(200, 238, 74, .16); --blob-b: rgba(255, 179, 193, .13); --blob-c: rgba(176, 194, 255, .14);
}
.dictum { background: var(--lime); color: var(--ink); }
.dictum-hint { color: var(--ink); opacity: .85; }
.dictum.live { background: var(--vermilion); color: #fff; }
.dictum.live .dictum-hint { color: #fff; }
.dictum-bars i { background: rgba(255, 255, 255, .5); }
.dictum.busy { background: var(--ink); color: #fff; box-shadow: 6px 7px 0 var(--lime); }
.dictum.busy .dictum-hint { color: #fff; }
.btn.ink { background: var(--lime); color: var(--ink); }
.btn.armed { background: var(--vermilion-deep); color: #fff; }
.lang button[aria-pressed="true"], .r-plus, .fc-plus { background: var(--lime); }
.done .tick rect { fill: var(--lime); }
.tick path { stroke: var(--ink); }
.chip.on b { color: var(--lime); }
.tip:hover .tip-arrow { color: var(--lime); }
.scrim { background: rgba(27, 37, 82, .45); }
.fam-err { background: #ffe0ea; }
.x:hover { background: rgba(214, 51, 108, .1); }
.fc-faces i { background: hsl(calc(var(--i) * 70 + 70) 75% 80%); }

/* ───────── 0.8 · Vrečko ───────── */
.mascot { position: absolute; top: -33px; right: 20px; z-index: 3; width: 50px; height: 55px; }
.mascot[hidden] { display: none; }
.vr { all: unset; cursor: pointer; display: block; width: 50px; height: 55px; -webkit-tap-highlight-color: transparent; }
.vr:focus-visible { outline: 3px solid var(--vermilion); outline-offset: 2px; border-radius: 14px; }
.vr svg { width: 100%; height: 100%; overflow: visible; }
.vr-bag { fill: var(--lime); stroke: var(--ink); stroke-width: 3; stroke-linejoin: round; }
.vr-fold { fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linejoin: round; opacity: .5; }
.vr-leaf { fill: #6cc24a; stroke: var(--ink); stroke-width: 2.4; stroke-linejoin: round; }
.vr-leaf2 { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; }
.vr-eyes ellipse { fill: var(--ink); }
.vr-glint { fill: #fff; }
.vr-cheek { fill: var(--pink); opacity: .9; }
.vr-mouth { fill: none; stroke: var(--ink); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; display: none; }
.vr-o { fill: var(--ink); stroke: none; }
.vr-grin { fill: var(--vermilion); }
.vr-arm { fill: none; stroke: var(--ink); stroke-width: 3; stroke-linecap: round; display: none; }
.vr-waves path { fill: none; stroke: var(--vermilion); stroke-width: 2.4; stroke-linecap: round; opacity: 0; }

.vr-body, .vr-eyes, .vr-arm, .vr-waves path { transform-box: fill-box; transform-origin: center; }
.vr-body { transform-origin: 50% 100%; }
.vr-arm-l { transform-origin: 100% 0; }
.vr-arm-r { transform-origin: 0 0; }

/* mirovanje: rahlo zibanje in mežikanje */
.vr[data-mood="idle"] .vr-smile, .vr[data-mood="think"] .vr-smile { display: inline; }
.vr[data-mood="idle"] .vr-body { animation: vr-sway 5s ease-in-out infinite; }
.vr .vr-eyes { animation: vr-blink 4.6s infinite; }
@keyframes vr-sway { 50% { transform: rotate(-3deg) translateY(-1px); } }
@keyframes vr-blink { 0%, 93%, 100% { transform: scaleY(1); } 96% { transform: scaleY(.1); } }
/* posluša: usta »o«, valovi zvoka, nagnjen naprej */
.vr[data-mood="listen"] .vr-o { display: inline; }
.vr[data-mood="listen"] .vr-body { animation: vr-nod 1.1s ease-in-out infinite; }
.vr[data-mood="listen"] .vr-waves path { animation: vr-wave 1.1s ease-out infinite; }
.vr[data-mood="listen"] .vr-waves path:nth-child(2) { animation-delay: .25s; }
@keyframes vr-nod { 50% { transform: rotate(4deg) translateY(1px); } }
@keyframes vr-wave { 0% { opacity: 0; transform: scale(.7); } 40% { opacity: 1; } 100% { opacity: 0; transform: scale(1.15); } }
/* razmišlja (tiska): oči gledajo vstran */
.vr[data-mood="think"] .vr-eyes { animation: vr-look 1.2s ease-in-out infinite; }
@keyframes vr-look { 50% { transform: translateX(3px); } }
/* poskok ob DODANO */
.vr.vr-hop .vr-body { animation: vr-hop .7s var(--ease-thud); }
.vr.vr-hop .vr-smile { display: none; }
.vr.vr-hop .vr-grin { display: inline; }
@keyframes vr-hop { 0% { transform: none; } 35% { transform: translateY(-12px) scale(1.04, .96); } 70% { transform: translateY(0) scale(1.06, .92); } 100% { transform: none; } }
/* ples ob »Vse kupljeno« */
.vr.vr-party .vr-body { animation: vr-dance .65s ease-in-out 4; }
.vr.vr-party .vr-arm, .vr.vr-wave .vr-arm-r { display: inline; }
.vr.vr-party .vr-arm-l { animation: vr-arm-l .32s ease-in-out infinite alternate; }
.vr.vr-party .vr-arm-r, .vr.vr-wave .vr-arm-r { animation: vr-arm-r .32s ease-in-out infinite alternate; }
.vr.vr-party .vr-smile, .vr.vr-party .vr-o { display: none; }
.vr.vr-party .vr-grin { display: inline; }
@keyframes vr-dance { 25% { transform: rotate(-9deg) translateY(-6px); } 75% { transform: rotate(9deg) translateY(-6px); } }
@keyframes vr-arm-l { to { transform: rotate(35deg); } }
@keyframes vr-arm-r { to { transform: rotate(-35deg); } }

.vr-say {
  position: absolute; right: 52px; top: 2px; width: max-content; max-width: 210px;
  padding: 7px 11px; background: #fff; color: var(--ink); border: 2.5px solid var(--ink); border-radius: 14px 14px 4px 14px;
  font: 600 14px/1.3 var(--f-fun); box-shadow: 2px 3px 0 var(--shade); animation: vr-pop .25s var(--ease-thud);
}
.vr-say[hidden] { display: none; }
@keyframes vr-pop { from { transform: scale(.6); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .vr *, .vr.vr-hop .vr-body, .vr.vr-party .vr-body { animation: none !important; }
  .vr[data-mood="listen"] .vr-waves path { opacity: 1; }
}
.menu-item.toggle { display: grid; grid-template-columns: 1fr auto; align-items: center; cursor: pointer; }
.menu-item.toggle b, .menu-item.toggle span { grid-column: 1; }
.menu-item.toggle input { grid-column: 2; grid-row: 1 / span 2; width: 26px; height: 26px; accent-color: var(--ink); }
.all-bought { background: #e6ebff; }

/* 0.8.1 · preklop svetli/temni način (gumb v glavi); temne vrednosti tudi za ročno izbiro */
.theme-btn svg { width: 22px; height: 22px; fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.theme-btn .ic-sun { display: none; }
.theme-btn.is-dark .ic-moon { display: none; }
.theme-btn.is-dark .ic-sun { display: block; }
.theme-btn .ic-moon { fill: var(--lime); }
.theme-btn.is-dark .ic-sun circle { fill: var(--sun); }
:root[data-theme="dark"] {
  --paper-2: #fbfdf3;
  --shadow: 8px 9px 0 rgba(200, 238, 74, .5); --shadow-s: 4px 5px 0 rgba(200, 238, 74, .5);
}
:root[data-theme="dark"] .dictum { box-shadow: 6px 7px 0 rgba(200, 238, 74, .5); }
/* glava s tremi gumbi (jezik, tema, meni) mora pri 375 px ostati v eni vrstici */
@media (max-width: 420px) {
  .masthead { padding-left: 16px; padding-right: 16px; gap: 8px; }
  .wordmark { font-size: 35px; }
  .mast-tools { gap: 5px; }
  .lang button { padding: 5px 7px 4px; }
  .icon-btn { width: 36px; height: 36px; }
  .theme-btn svg { width: 20px; height: 20px; }
}
@media (max-width: 359px) {
  .wordmark { font-size: 29px; }
  .lang button { padding: 4px 5px 3px; font-size: 11px; }
  .icon-btn { width: 33px; height: 33px; border-radius: 10px; }
}
.receipt { margin-top: 26px; }

/* 0.8.1 · okno za deljenje: kopija besedila ali povabilo v živo */
.share-hint { margin: -4px 0 10px; font-size: 14.5px; line-height: 1.4; color: var(--ink-soft); }
.share-family { width: 100%; margin: 0 0 14px; min-height: 50px; font-size: 16px; border-style: dashed; }
.share-family[hidden] { display: none; }

/* 0.9 · namestitev na telefon */
.menu-item.install { background: var(--lime); border: 3px solid var(--ink); border-radius: 18px; box-shadow: var(--shadow-s); margin-bottom: 6px; }
.menu-item.install b::before { content: '📲 '; }
.menu-item.install[hidden] { display: none; }

/* 0.9.2 · slogan vedno cel v svoji vrstici */
.motto span { display: block; white-space: nowrap; margin-top: 2px; }
.admin-link { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 50px; margin: 4px 0 12px; text-decoration: none; color: var(--ink); }

/* ───────── 0.9.2 · UX: Hick, Fitts, vizualna hierarhija ───────── */
/* Hick: skupine v meniju */
.menu-group { margin: 18px 0 2px; font: 800 12px var(--f-sans); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); }
.menu-group + .menu-item { border-top: 0; }
.menu-keys { margin: 14px 0 0; font-size: 13px; color: var(--ink-soft); }
.menu-keys kbd { display: inline-block; min-width: 20px; padding: 0 5px; border: 1.5px solid var(--ink-soft); border-radius: 5px; font: 700 12px/18px var(--f-sans); text-align: center; }
@media (hover: none) { .menu-keys { display: none; } } /* na telefonu ni tipkovnice */
/* Fitts: najmanj 44 px ciljne površine, brez spremembe videza (nevidna razširitev) */
.icon-btn, .r-plus, .fam-chip, .lang button, .x, .li-act { position: relative; }
.icon-btn::after, .r-plus::after, .fam-chip::after { content: ''; position: absolute; inset: -6px; }
.lang button::after { content: ''; position: absolute; inset: -6px -2px; }
.fam-chip { min-height: 40px; }
/* vizualna hierarhija: napitnina in pozdrav sta drugotna – ne smeta tekmovati z listkom in gumbom POVEJ */
.tip { background: var(--paper); border: 2px dashed var(--ink-faint); box-shadow: none; padding-top: 10px; padding-bottom: 10px; }
.tip-v { font-size: 19px; }
.tip-k { opacity: .7; }
.tip:hover, .tip:active { background: var(--sun); color: var(--ink); }
.r-thanks { font-size: 16px; color: var(--ink-soft); }

/* ───────── 0.10 · družina ───────── */
.menu-item.account { grid-template-columns: 44px 1fr; column-gap: 12px; align-items: center; padding-top: 6px; }
.menu-item.account b, .menu-item.account span:not(.acc-face) { grid-column: 2; }
.acc-face { grid-row: 1 / span 2; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 3px solid var(--ink); background: var(--lime); font: 800 16px var(--f-sans); color: var(--ink); }
.menu-item.account + .menu-item { border-top: 0; }
.menu-badge { position: absolute; right: -8px; top: -8px; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 999px; border: 2px solid var(--ink); background: var(--lime); color: var(--ink); font: 800 11px/18px var(--f-sans); text-align: center; pointer-events: none; }
.menu-badge.alert { background: var(--vermilion); color: #fff; animation: badge 1.6s ease-in-out 3; }
.menu-badge[hidden] { display: none; }
@keyframes badge { 50% { transform: scale(1.2); } }
@media (prefers-reduced-motion: reduce) { .menu-badge.alert { animation: none; } }
.fam-pick { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 8px; }
.fam-pick label { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 6px 12px; background: #fff; border: 2px solid var(--ink); border-radius: 16px; cursor: pointer; }
.fam-pick input { width: 26px; height: 26px; accent-color: var(--ink); flex: none; }
.fam-pick b { font-size: 17px; }
.fam-more { width: 100%; height: 48px; margin-top: 10px; font-size: 15px; border-style: dashed; }
.fam-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.fam-add { flex: 0 0 auto; height: 44px; padding: 0 14px; font-size: 16px; }
.btn.small { flex: 0 0 auto; min-height: 40px; padding: 0 12px; font-size: 14px; }
.fam-acts { display: flex; gap: 6px; flex: none; }
.fam-auto { margin: 16px 0 4px; }
.fam-auto span { font-size: 15px; }

/* pogoji v oknu za prijavo */
.legal-frame { width: 100%; height: 58vh; border: 2px solid var(--ink); border-radius: 16px; background: #fff; }
.legal-back { width: 100%; min-height: 52px; margin-top: 12px; }

/* skrbnik */
.admin-pill { background: var(--vermilion); color: #fff; font-size: 10px; vertical-align: 3px; }
.menu-item.admin b::before { content: '🛠️ '; }
.menu-item.admin[hidden] { display: none; }

/* 0.10.3: prošnja za kavo in vidnejša kava v meniju */
.coffee-sheet { text-align: center; }
.coffee-sheet h2 { margin-top: 4px; }
.cf-cup { font-size: 54px; line-height: 1; margin-top: 4px; animation: cf-bob 2.4s ease-in-out infinite; }
@keyframes cf-bob { 50% { transform: translateY(-5px) rotate(-6deg); } }
@media (prefers-reduced-motion: reduce) { .cf-cup { animation: none; } }
.cf-text { margin: 8px 0 0; font-size: 16px; line-height: 1.45; text-align: left; }
.cf-yes { display: flex; align-items: center; justify-content: center; text-decoration: none; }
.cf-note { margin: 12px 0 0; font-size: 13px; color: var(--ink-soft); }
/* račun: gumba drug pod drugim (dolg napis »Prenesi moje podatke« ni več v treh vrsticah) */
.sheet-row.stack { flex-direction: column; }
.sheet-row.stack .btn { flex: none; width: 100%; }
