/* Dizainas: paletė „Karališka mėlyna“ (Royal blue #162660 + Powder blue #D0E6FD + Warm beige #F1E4D1), šriftas Poppins (OFL, public/fonts/),
   vidutiniai kampai, dideli mygtukai, švelnūs šešėliai. Žr. docs/FUNKCIJOS.md */
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/poppins-latin-ext-400.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/poppins-latin-400.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 500; font-display: swap; src: url(/fonts/poppins-latin-ext-500.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 500; font-display: swap; src: url(/fonts/poppins-latin-500.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 600; font-display: swap; src: url(/fonts/poppins-latin-ext-600.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 600; font-display: swap; src: url(/fonts/poppins-latin-600.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 700; font-display: swap; src: url(/fonts/poppins-latin-ext-700.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 700; font-display: swap; src: url(/fonts/poppins-latin-700.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 800; font-display: swap; src: url(/fonts/poppins-latin-ext-800.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 800; font-display: swap; src: url(/fonts/poppins-latin-800.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --bg: #F8F2E9;
  --surface: #FFFFFF;
  --surface-2: #F1E4D1; /* Warm beige */
  --ink: #162660;
  --ink-2: #4A5478;
  --ink-3: #5A6180; /* ≥4.5:1 ir ant smėlio (#F1E4D1 – 4,85:1) */
  --line: #E7DAC5;
  /* Pagrindinė (Royal blue): --brand fonui, --brand-ink tekstui ant jos, --brand-text tekstui ant šviesaus fono */
  --brand: #162660;
  --brand-ink: #FFFFFF;
  --brand-text: #162660;
  --brand-soft: #D0E6FD; /* Powder blue */
  /* Žalia: „paruošta“, sėkmė (paveikslėlyje žalios nėra) */
  --good: #2F7A5A;
  --good-ink: #FFFFFF;
  --good-text: #276B4E;
  --good-soft: #DCEFE5;
  --warn: #8A5200;
  --warn-soft: #FEF3C7;
  --info: #2F5F8F;
  --info-soft: #E4ECF3;
  --danger: #B42318;
  --danger-soft: #FCE4E1;
  --bar: #162660;
  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(22,38,96,.05), 0 8px 24px rgba(22,38,96,.07);
  --shadow-brand: 0 10px 28px rgba(22,38,96,.25);
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg); color: var(--ink);
  -webkit-font-smoothing: antialiased;
  font-size: 16px;
  line-height: 1.5;
}
a { color: inherit; }
button { font: inherit; cursor: pointer; border: 0; }
h1, h2, h3 { margin: 0; letter-spacing: -0.01em; }
.muted { color: var(--ink-2); }
.small { font-size: 13px; }
.tnum { font-variant-numeric: tabular-nums; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 20px; border-radius: var(--radius-sm); font-weight: 600; font-size: 16px;
  background: var(--surface-2); color: var(--ink); text-decoration: none;
  transition: transform var(--t1), filter var(--t1);
}
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--brand); color: var(--brand-ink); }
.btn.good { background: var(--good); color: var(--good-ink); }
.btn.block { width: 100%; padding: 18px; font-size: 18px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.small { padding: 10px 14px; font-size: 14px; border-radius: 10px; }

.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; background: var(--surface-2); color: var(--ink-2);
}
.chip.new { background: var(--info-soft); color: var(--info); }
.chip.prep { background: var(--warn-soft); color: var(--warn); }
.chip.ready { background: var(--good-soft); color: var(--good-text); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }

.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 20px; background: var(--surface); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 10;
}
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; text-decoration: none; }
.logo-mark {
  width: 32px; height: 32px; border-radius: 10px; background: var(--brand); color: var(--brand-ink);
  display: grid; place-items: center; font-size: 17px; overflow: hidden;
}
.logo-mark img { width: 100%; height: 100%; display: block; }
/* 3D ikonos (Microsoft Fluent Emoji, MIT) */
.ei { display: inline-block; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.ei.inl { width: 1.25em; height: 1.25em; vertical-align: -0.28em; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a { padding: 8px 12px; border-radius: 10px; text-decoration: none; color: var(--ink-2); font-weight: 500; font-size: 14px; }
.nav a.active, .nav a:hover { background: var(--surface-2); color: var(--ink); }
/* Valgyklos puslapių perjungiklis: Virtuvė · Analitika · Nustatymai (vienodas visur) */
.nav.vb { flex-wrap: nowrap; gap: 2px; padding: 4px; border-radius: 12px; background: var(--surface-2); }
.nav.vb a { padding: 7px 14px; border-radius: 9px; font-weight: 600; white-space: nowrap; }
.nav.vb a:hover { background: transparent; color: var(--ink); }
.nav.vb a.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
@media (max-width: 640px) {
  .topbar:has(.nav.vb) { flex-wrap: wrap; }
  .nav.vb { flex: 1 1 100%; order: 10; }
  .nav.vb a { flex: 1; text-align: center; padding: 7px 6px; }
}
.ico { display: inline-block; vertical-align: -0.2em; flex: none; }
/* Slenkantis baltas fonas po aktyviu mygtuku (ui.js): mygtukai patys fono nebeturi, jį nupiešia .pill */
.pilled > .pill { position: absolute; left: 0; top: 0; z-index: 0; pointer-events: none; background: var(--surface); box-shadow: var(--shadow);
  transition: transform var(--t3) var(--spring), width var(--t3) var(--spring), height var(--t3), opacity var(--t1); }
.pilled > :not(.pill) { position: relative; z-index: 1; transition: transform var(--t1), color var(--t2); }
.pilled > .on:not(.pill), .pilled > .active:not(.pill) { background: transparent !important; box-shadow: none !important; }
.pilled > :not(.pill):active { transform: scale(.95); }

.toast { display: flex; align-items: center; gap: 8px; }
.toast .tico { flex: none; }
.toast.ok { background: var(--good-soft); color: var(--good-text); box-shadow: 0 8px 24px rgba(22,38,96,.18); }
.toast.er { background: var(--danger-soft); color: var(--danger); box-shadow: 0 8px 24px rgba(22,38,96,.18); }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(120px);
  background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 12px; font-weight: 600;
  transition: transform var(--t2); z-index: 100; max-width: calc(100% - 32px);
}
.toast.show { transform: translateX(-50%) translateY(0); }
/* pristatymo rėmelyje (iframe) paslėpti */
html.framed .no-frame { display: none !important; }
[hidden] { display: none !important; }

/* Judesio rinkinys (2026-11-04): 2 kreivės (įprasta ir atšokanti) ir 4 trukmės visam judesiui */
:root { --ease: cubic-bezier(.2,0,0,1); --spring: cubic-bezier(.34,1.4,.64,1); --t1: 120ms; --t2: 200ms; --t3: 320ms; --t4: 500ms; }
/* Du greiti paspaudimai nebedidina puslapio (iOS) */
html { touch-action: manipulation; }
/* Paspaudimo atsakas: mygtukas susitraukia jau kitame kadre, atleidus atšoka. Svoris 0 (:where),
   todėl mygtukai, kurie turi savo paspaudimo judesį, jį pasilieka. */
:where(button, [role="button"], summary, a) { transition: scale var(--t3) var(--spring), opacity var(--t2) var(--ease); }
:where(button, [role="button"]):not(:disabled, .btn, .card, .dish, .hero-card, .mini-order, .active-order, .cat-bar button, .rate-btns button, .pilled > *, .tk):active { scale: .94; transition-duration: var(--t1); }
/* Plačios eilutės ir nuorodos ne susitraukia, o trumpam pašviesėja */
:where(summary, a:not(.btn)):active { opacity: .55; transition-duration: 0s; }
/* Paspaudimo plotas bent 44 px aukščio (Apple HIG – 44 pt), išvaizda nesikeičia: nematomas ::after.
   Gretimi mygtukai plečiami tik į aukštį, kad nepavogtų kaimyno paspaudimo. */
:where(.btn.small, .icon-btn, .link-t, .seg button, .tabs button, .nav a, .tile .pick, .tile .miss, #auShow, .dots button) { position: relative; }
:where(.btn.small, .icon-btn, .link-t, .seg button, .tabs button, .nav a, .tile .pick, .tile .miss, #auShow, .dots button, .item-hero .close, .item-hero .fav, .nav .fs)::after {
  content: ''; position: absolute; left: 0; right: 0; top: min(0px, calc(50% - 22px)); bottom: min(0px, calc(50% - 22px)); }
:where(.item-hero .close, .item-hero .fav, .nav .fs, .dots button)::after { left: min(0px, calc(50% - 22px)); right: min(0px, calc(50% - 22px)); }
:where(.dots button)::after { left: -7px; right: -7px; }
/* Slenkamas ruožas (ui.js): išblukęs kraštas rodo, kad yra daugiau */
.fade-r { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 44px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 44px), transparent); }
.fade-l { -webkit-mask-image: linear-gradient(90deg, transparent, #000 44px); mask-image: linear-gradient(90deg, transparent, #000 44px); }
.fade-l.fade-r { -webkit-mask-image: linear-gradient(90deg, transparent, #000 44px, #000 calc(100% - 44px), transparent); mask-image: linear-gradient(90deg, transparent, #000 44px, #000 calc(100% - 44px), transparent); }

/* Telefone įjungta „Mažiau judesio“: animacijos ir perėjimai beveik akimirksniu (įvykiai vis tiek suveikia) */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; scroll-behavior: auto !important; }
}

/* Nuriedantis skaitmuo (ui.js roll): kerpama pagal raidės aukštį, eilutės lygis nesikeičia */
.rl { display: inline-block; position: relative; clip-path: inset(0 -3px); }
.rl > i { position: absolute; left: 0; top: 0; font-style: normal; }

/* Pranešimus galima nubraukti pirštu (ui.js) – naršyklė tada neslenka puslapio */
.notif, .toast, .rep-toast, .undo, .off-t { touch-action: none; user-select: none; -webkit-user-select: none; }
