/* © 2026 Németh András. Minden jog fenntartva. */
/* ---- betűtípusok: Montserrat (címek) + Inter (szöveg), helyben tárolva (fonts/, SIL OFL licenc), változtatható vastagsággal ---- */
@font-face { font-family: 'Inter'; font-style: normal; font-display: swap; font-weight: 100 900; src: url(fonts/inter-latin-wght-normal.woff2) format('woff2-variations');
  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: 'Inter'; font-style: normal; font-display: swap; font-weight: 100 900; src: url(fonts/inter-latin-ext-wght-normal.woff2) format('woff2-variations');
  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: 'Montserrat'; font-style: normal; font-display: swap; font-weight: 100 900; src: url(fonts/montserrat-latin-wght-normal.woff2) format('woff2-variations');
  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: 'Montserrat'; font-style: normal; font-display: swap; font-weight: 100 900; src: url(fonts/montserrat-latin-ext-wght-normal.woff2) format('woff2-variations');
  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; }

/* ---- színek: világos, pozitív design (lásd design-javaslat.html). Alapból mindig világos;
   a sötét változat a :root[data-theme="dark"] alatt van (később az Én → Megjelenés kapcsolója állítja). ---- */
:root {
  --font: 'Inter', system-ui, 'Segoe UI', sans-serif; --font-head: 'Montserrat', 'Inter', system-ui, sans-serif;
  --radius: 18px; --card-shadow: 0 6px 22px rgba(31, 42, 36, .07); --shadow-sm: var(--card-shadow);
  --bg: #FFFBF5; --card: #FFFFFF; --text: #1F2A24; --muted: #6E7C74; --line: #F0E9DE; --field: #FFFFFF;
  --accent: #1F8A56; --accent-soft: #E4F6EC; --green: #2FA36B;            /* zöld: fő szín, kész, gombok */
  --warn: #C4501F; --warn-soft: #FFEEE5; --done: #9AA59F;                  /* barack: figyelem (kedvesen) */
  --peach: #FF8A5B; --peach-btn: #E2622F; --sun: #F5B82E; --sun-soft: #FFF5D9; --sun-ink: #8A6200;
  --berry: #7C6CF2; --berry-soft: #EFEDFF; --berry-ink: #5446C9; --sky: #3BA7E0; --sky-soft: #E5F4FC; --peach-soft: #FFEEE5;
  --shadow: 0 18px 50px rgba(31, 42, 36, .14);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #161917; --card: #1f2321; --text: #e9ece9; --muted: #9aa29c; --line: #313733; --field: #1a1e1c;
  --accent: #6cc496; --accent-soft: #1f3a2c; --green: #6cc496; --warn: #f0a070; --warn-soft: #3d2a1e; --done: #7a817c;
  --sun-soft: #3a3016; --sun-ink: #f0c860; --berry-soft: #2a2747; --berry-ink: #b7adff; --sky-soft: #1b3240; --peach-soft: #3d2a1e;
  --card-shadow: 0 6px 22px rgba(0, 0, 0, .35); --shadow: 0 18px 50px rgba(0, 0, 0, .5);
  color-scheme: dark;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, h5, legend, .eyebrow, .tabs a, .weeknav strong { font-family: var(--font-head); letter-spacing: -.005em; }
h2, h3 { font-weight: 700; }
h4, h5 { font-weight: 650; }
.muted { color: var(--muted); }
.small { font-size: .8rem; }

input, select, button, textarea { font: inherit; color: var(--text); background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
button { cursor: pointer; transition: background-color .15s, border-color .15s, filter .15s; }
button:hover:not(:disabled) { border-color: var(--accent); }
button:disabled { opacity: .55; cursor: default; }
button.primary { background: var(--accent); border-color: var(--accent); color: var(--bg); font-weight: 600; }
button.primary:hover:not(:disabled) { filter: brightness(1.08); }
button.link { background: none; border: none; padding: 2px 4px; color: var(--accent); }
button.link:hover { text-decoration: underline; }
button.small, .link.small { font-size: .8rem; padding: 2px 6px; }
button.danger { color: var(--warn); }
.chk { display: inline-flex; align-items: center; gap: 6px; font-size: .9rem; cursor: pointer; }
.chk input { width: 16px; height: 16px; margin: 0; }

/* fejléc + fülek */
.top { position: sticky; top: 0; z-index: 10; background: var(--bg); border-bottom: 1px solid var(--line);
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; padding: 10px 16px; }
.top h1 { font-size: 1.2rem; font-weight: 800; margin: 0; color: var(--accent); display: flex; align-items: center; gap: 8px; }
.top h1 .logo { width: 28px; height: 28px; }
.tabs { display: flex; gap: 4px; overflow-x: auto; max-width: 100%; }
.tabs a { padding: 6px 12px; border-radius: 999px; color: var(--muted); text-decoration: none; white-space: nowrap; font-weight: 600; font-size: .92rem; display: inline-flex; align-items: center; gap: 6px; }
.tabs a:hover { color: var(--text); }
.tabs a.active { background: var(--accent-soft); color: var(--accent); }
.tabs .ti { font-size: 1rem; line-height: 1; }
.tabs .ts { display: none; } /* rövid felirat: csak az alsó fülsorban */

/* telefon: alsó fülsor ikonokkal, a fejlécben csak a név és az állapot */
@media (max-width: 700px) {
  .top { padding: 8px 12px; }
  .top h1 { font-size: 1.05rem; }
  .tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 15; justify-content: space-around; gap: 0; overflow: visible;
    background: var(--card); border-top: 1px solid var(--line); padding: 4px 2px calc(4px + env(safe-area-inset-bottom)); }
  .tabs a { flex: 1 1 0; flex-direction: column; gap: 1px; padding: 4px 0; border-radius: 10px; font-size: .64rem; min-width: 0; }
  .tabs .ti { font-size: 1.25rem; }
  .tabs .tl { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
  .tabs a:has(.ts) .tl { display: none; }
  .tabs .ts { display: inline; }
  body > main { padding: 12px 12px calc(80px + env(safe-area-inset-bottom)); } /* a fülsor ne takarja a lista alját */
  /* a visszavonás-sáv és az időzítők az alsó fülsor fölött (body-val erősebb, mint a későbbi alap-szabály) */
  body .undo, body .timer-dock { bottom: calc(72px + env(safe-area-inset-bottom)); }
  body .undo { max-width: calc(100vw - 24px); }
  /* iPhone: 16 px alatti betűs mezőre fókuszálva ránagyít az oldalra → telefonon minden mező legalább 16 px */
  /* (!important: több helyen erősebb szabály kicsinyíti a mezőket — telefonon ennek mindenhol nyernie kell) */
  input, select, textarea { font-size: 16px !important; }
}
/* telepített appként (önálló ablakban) a fejléc ne lógjon az értesítési sáv alá */
@media (display-mode: standalone) { .top { padding-top: max(10px, env(safe-area-inset-top)); } }
/* állapotüzenet: alul felbukkanó kis buborék, pár másodperc múlva eltűnik (nem tolja le az oldalt) */
.status { position: fixed; left: 50%; bottom: 24px; z-index: 45; transform: translate(-50%, 12px); opacity: 0; pointer-events: none;
  background: var(--text); color: var(--bg); font-size: .85rem; font-weight: 600; padding: 8px 16px; border-radius: 99px; box-shadow: var(--shadow);
  max-width: calc(100vw - 32px); width: max-content; text-align: center; transition: opacity .2s, transform .25s var(--ease-out, ease); }
.status.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; cursor: pointer; }
.status.error { background: var(--warn); color: #fff; border-radius: 16px; }
/* ha a visszavonás-sáv is látszik, a buborék fölé kerül */
body:has(.undo:not([hidden])) .status { margin-bottom: 56px; }

main { max-width: 1500px; margin: 0 auto; padding: 16px; }
.view { display: none; }
.view.active { display: block; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-bottom: 14px; }
.toolbar input[type=search] { min-width: 240px; flex: 0 1 320px; }

/* készlet-jelvények */
.avail { display: inline-block; font-size: .72rem; font-weight: 600; padding: 1px 7px; border-radius: 999px; white-space: nowrap; }
.avail.ok { background: var(--accent-soft); color: var(--accent); }
.avail.miss { background: var(--warn-soft); color: var(--warn); }
.avail.done { background: var(--line); color: var(--muted); }

/* ---- Tervezés: hét ---- */
.weeknav { display: flex; align-items: center; gap: 8px; }
.weeknav strong { min-width: 150px; text-align: center; }
.week-scroll { overflow-x: auto; padding-bottom: 6px; }
.week { display: grid; grid-template-columns: repeat(7, minmax(172px, 1fr)); gap: 10px; min-width: 1240px; }
.day { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 0 10px 6px; display: flex; flex-direction: column; }
.day.today { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.day-head { height: 78px; padding: 10px 0 6px; border-bottom: 1px solid var(--line); overflow: hidden; }
.day-head h2 { font-size: .95rem; margin: 0; display: flex; justify-content: space-between; gap: 6px; }
.day-head .dname::first-letter { text-transform: uppercase; }
.day-head .ddate { color: var(--muted); font-weight: 400; font-size: .85rem; }
.day-head .totals { font-size: .75rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.day-head .link { padding: 0; }

.cell { height: 118px; padding: 8px 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 3px; overflow: hidden; }
.cell:last-child { border-bottom: none; }
.cell-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.cell-add { border-style: dashed; color: var(--muted); background: transparent; text-align: left; }
.cell-add:hover { color: var(--accent); border-color: var(--accent); }
.cell-add-row { display: flex; gap: 4px; }
.cell-add-row .cell-add { flex: 1; }
.cell-rand { border-style: dashed; background: transparent; padding: 4px 8px; }
.cell-rand:hover { border-color: var(--accent); }
.cell .link.small { align-self: flex-start; padding: 0; }
.cell-name { background: none; border: none; padding: 0; text-align: left; font-weight: 600; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; }
.cell-name:hover { color: var(--accent); }
.cell-meta { font-size: .78rem; color: var(--muted); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.cell-actions { display: flex; gap: 10px; margin-top: auto; }
.cell.prepared .cell-name { color: var(--done); }

@media (max-width: 760px) {
  .week { grid-template-columns: 1fr; min-width: 0; }
  .day-head { height: auto; }
  .cell { height: auto; min-height: 84px; }
}

/* ---- választó ---- */
.picker { position: fixed; z-index: 30; background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow); display: flex; flex-direction: column; overflow: hidden; }
.picker-top { padding: 10px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.picker-top input[type=search] { width: 100%; }
.picker-body { flex: 1; display: grid; grid-template-columns: 1fr 1fr; min-height: 0; }
.picker-list { list-style: none; margin: 0; padding: 4px 0; overflow-y: auto; border-right: 1px solid var(--line); }
.picker-list .group { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 8px 12px 2px; }
.picker-list .opt { padding: 6px 12px; cursor: pointer; display: flex; flex-direction: column; gap: 1px; }
.picker-list .opt.active { background: var(--accent-soft); }
.picker-list .opt.selected .opt-name::before { content: "● "; color: var(--accent); }
.picker-list .empty { padding: 12px; color: var(--muted); }
.opt-name { font-weight: 500; }
.opt-meta { font-size: .75rem; color: var(--muted); display: flex; gap: 6px; align-items: center; }
.picker-detail { padding: 12px; overflow-y: auto; font-size: .88rem; }
.picker-detail h3 { margin: 0 0 6px; font-size: 1rem; }
.picker.sheet { left: 0; right: 0; bottom: 0; top: 12vh; border-radius: 14px 14px 0 0; }
.picker.sheet .picker-body { grid-template-columns: 1fr; grid-template-rows: 1fr auto; }
.picker.sheet .picker-list { border-right: none; border-bottom: 1px solid var(--line); }
.picker.sheet .picker-detail { max-height: 34vh; }

/* recept-összefoglaló */
.macros { color: var(--muted); margin: 6px 0; font-size: .85rem; }
.ings { list-style: none; padding: 0; margin: 6px 0; }
.ing { display: flex; justify-content: space-between; gap: 8px; padding: 3px 0; border-bottom: 1px dashed var(--line); }
.ing.spice { color: var(--muted); font-style: italic; }
.ing-ok { color: var(--accent); }
.ing-miss { color: var(--warn); font-size: .8rem; white-space: nowrap; }

/* ---- felugró ablak (recept, recept-űrlap): gépen középen, telefonon alulról felcsúszó teljes képernyős lap ---- */
.backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 20; display: none; }
.backdrop.open { display: block; }
.drawer { position: fixed; left: 50%; top: 50%; width: min(820px, calc(100vw - 32px)); max-height: calc(100dvh - 48px);
  background: var(--card); z-index: 21; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow);
  overflow-y: auto; overscroll-behavior: contain;
  opacity: 0; visibility: hidden; transform: translate(-50%, -46%); transition: opacity .15s ease, transform .15s ease, visibility .15s; }
.drawer.open { opacity: 1; visibility: visible; transform: translate(-50%, -50%); }
@media (max-width: 600px) {
  .drawer { left: 0; top: 0; width: 100%; height: 100dvh; max-height: none; border-radius: 0; border: 0; transform: translateY(100%); transition: transform .2s ease, visibility .2s; opacity: 1; }
  .drawer.open { transform: none; }
}
/* nyitott ablaknál a háttér (az oldal) nem görgethető */
body:has(.drawer.open) { overflow: hidden; }
/* felső sáv: rögzített, tömör háttér (a tartalom alatta görög el, alján finom áttűnéssel) — ez a lehúzási sáv is (drawer.js, 72 px) */
.drawer-top { position: sticky; top: 0; z-index: 3; display: flex; justify-content: flex-end; align-items: center;
  min-height: 52px; padding: 6px 8px; background: var(--card); }
.drawer-top::after { content: ''; position: absolute; left: 0; right: 0; top: 100%; height: 10px; pointer-events: none;
  background: linear-gradient(var(--card), transparent); }
.drawer-close { font-size: 1.3rem; line-height: 1; padding: 4px 10px; }
.drawer-body { padding: 6px 20px 40px; } /* felül annyi hely, hogy az áttűnés görgetés nélkül ne takarjon */
.drawer h2 { margin: 2px 0 8px; font-size: 1.25rem; }
.drawer h4 { margin: 18px 0 6px; }
.eyebrow { margin: 0; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.steps { color: var(--muted); }
/* recept alján: betervezés összefoglaló + gomb; a naptár külön ablakban (openPlanSheet) */
.plan-card { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 18px; padding: 14px; border-radius: 16px; background: var(--accent-soft); }
.plan-card-t { flex: 1 1 200px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.plan-on { color: var(--accent); font-weight: 600; }
.plan-on::first-letter { text-transform: uppercase; }
.plan-card .primary { min-height: 44px; border-radius: 99px; padding: 0 18px; }
.pl-modal { width: min(460px, 100%); }
.pl-sub { margin: -6px 0 0; }
.pl-nav { display: flex; align-items: center; justify-content: space-between; }
.pl-nav button { width: 40px; height: 40px; padding: 0; border-radius: 12px; font-size: 1.2rem; }
.pl-wl { margin: 4px 2px; font-size: .78rem; font-weight: 700; color: var(--muted); }
.pl-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.pl-tile { display: flex !important; flex-direction: column; align-items: center; gap: 1px; padding: 6px 0 !important; min-height: 66px; border-radius: 14px !important;
  border: 2px dashed var(--line) !important; background: transparent !important; color: var(--muted); font-size: .7rem; font-weight: 700; }
.pl-tile b { font: 800 1.05rem var(--font-head); color: var(--text); }
.pl-ic { font-style: normal; font-size: .9rem; line-height: 1.1; }
.pl-tile.other { border-style: solid !important; border-color: var(--line) !important; background: var(--card) !important; }
.pl-tile.other .pl-ic { color: var(--peach); }
.pl-tile.same { border: 2px solid var(--green) !important; background: var(--green) !important; color: #e9fff3; }
.pl-tile.same b { color: #fff; }
.pl-tile.today:not(.same) { border-color: var(--accent) !important; }
.pl-tile.past { opacity: .5; }
.pl-tile.asking { box-shadow: 0 0 0 3px var(--peach); }
.pl-ask { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; background: var(--peach-soft); border-radius: 12px; padding: 10px 12px; }
.pl-ask > .small { flex: 1 1 200px; }
.pl-ask-b { display: flex; gap: 6px; }
.pl-ask-b button { min-height: 40px; border-radius: 99px !important; }
.pl-key { margin: 0; }
.pl-k { display: inline-block; min-width: 18px; text-align: center; border-radius: 6px; font-weight: 800; }
.pl-k.same { background: var(--green); color: #fff; } .pl-k.other { color: var(--peach); } .pl-k.empty { border: 1px dashed var(--line); }

/* saját görgetősáv mindenhol (nem a rendszeré): vékony, lekerekített, az app színeivel */
* { scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--muted) 45%, transparent) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--muted) 40%, transparent); border-radius: 99px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: color-mix(in srgb, var(--accent) 70%, transparent); border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-corner { background: transparent; }
::-webkit-scrollbar-button { display: none; height: 0; width: 0; }

/* ---- Receptek ---- */
.recipe-list { display: flex; flex-direction: column; gap: 8px; }
.rec { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; display: flex; gap: 16px; justify-content: space-between; }
.rec h3 { margin: 0; font-size: 1rem; }
.rec-sub { font-size: .8rem; color: var(--muted); }
.rec-ings { font-size: .82rem; margin-top: 4px; }
.rec-side { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; gap: 8px; flex-shrink: 0; }
.rec-btns { display: flex; gap: 6px; }
@media (max-width: 600px) {
  .rec { flex-direction: column; }
  .rec-side { flex-direction: row; align-items: center; }
  .toolbar input[type=search] { min-width: 0; flex: 1 1 100%; }
}

/* ---- Itthon van ---- */
.stock-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 6px 22px; }
.stock-row { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 10px; padding: 5px 0; border-bottom: 1px solid var(--line); min-height: 44px; }
.stock-row.have .stock-name label { font-weight: 600; }
.stock-name { display: flex; flex-direction: column; }
.stock-sub { font-size: .72rem; color: var(--muted); }
.stock-sub .pg { width: 46px; padding: 0 4px; font-size: .72rem; text-align: right; }
.stock-input { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); }
.stock-input input { width: 80px; text-align: right; }
.stock-tools { display: flex; align-items: center; gap: 8px; min-width: 130px; justify-content: flex-end; }
.staple-toggle { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.staple-toggle button { border: none; border-radius: 0; padding: 4px 10px; font-size: .82rem; color: var(--muted); }
.staple-toggle button.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.staple-toggle button.on.off { background: var(--warn-soft); color: var(--warn); }

/* ---- Főzés ---- */
.cook-list { display: flex; flex-direction: column; gap: 10px; }
.cook { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; }
.cook.open { border-color: var(--accent); }
.cook-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.cook-title { flex: 1 1 220px; display: flex; flex-direction: column; }
.cook-title h3 { margin: 0; font-size: 1rem; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: .8rem; padding: 3px 9px; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; color: var(--muted); }
.chip.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); font-weight: 600; }
.chip input { margin: 0; }
.cook-body { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 8px; }
.cook-ings { width: 100%; border-collapse: collapse; font-size: .9rem; }
.cook-ings th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; padding: 4px 6px; }
.cook-ings td { padding: 6px; border-top: 1px solid var(--line); vertical-align: middle; }
.ci-name { font-weight: 600; }
.ci-need { white-space: nowrap; font-variant-numeric: tabular-nums; }
.ci-ctrl { white-space: nowrap; }
.left-input { margin-left: 6px; color: var(--muted); }
.left-input input { width: 70px; text-align: right; padding: 3px 6px; }
.cook-body h4 { margin: 12px 0 4px; }
.cook-actions { display: flex; justify-content: flex-end; margin-top: 8px; }
.cook-done { margin-top: 22px; }
.cook-done h3 { font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.cook-done ul { list-style: none; padding: 0; margin: 0; }
.cook-done li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.cook-done li span::first-letter { text-transform: uppercase; }
@media (max-width: 700px) {
  .cook-ings thead { display: none; }
  .cook-ings tr { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; padding: 6px 0; border-top: 1px solid var(--line); }
  .cook-ings td { border: none; padding: 0; }
  .ci-have, .ci-ctrl { grid-column: 1 / -1; }
  .ci-ctrl { white-space: normal; }
}

/* ---- Profil ---- */
.profile-form { max-width: 820px; }
.pf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px 16px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.pf-grid .field input, .pf-grid .field select { font-size: .95rem; color: var(--text); }
.pf-grid .wide { grid-column: span 2; }
.pf-result { margin-top: 14px; }
.calc { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; margin: 0 0 8px; }
.calc div { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; }
.calc div.hl { border-color: var(--accent); background: var(--accent-soft); }
.calc dt { font-size: .75rem; color: var(--muted); }
.calc dd { margin: 2px 0 0; font-size: 1.15rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.warn { color: var(--warn); font-size: .88rem; }
.pf-apply { margin-top: 14px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; background: var(--card); }
.pf-apply legend { font-weight: 600; padding: 0 6px; }
.radio { display: flex; gap: 8px; align-items: flex-start; padding: 5px 0; cursor: pointer; }
.radio input { margin-top: 4px; }
@media (max-width: 600px) { .pf-grid .wide { grid-column: 1 / -1; } }

.health { margin-top: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 8px 14px; }
.health.bad { border-color: var(--warn); background: var(--warn-soft); }
.health-warn { color: var(--warn); font-weight: 600; margin: 6px 0; }
.health p.small { margin: 6px 0; }
.forecast { margin-top: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; }
.forecast h4 { margin: 0 0 6px; }
.forecast p { margin: 4px 0; }

/* ---- Részletes útmutató ---- */
.gtag { color: var(--accent); font-weight: 600; }
.guide { margin-top: 10px; }
.gmeta { font-size: .85rem; color: var(--muted); }
.gboxes { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; margin: 8px 0 12px; }
.gbox { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; font-size: .88rem; }
.gbox h5 { margin: 0 0 4px; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.gbox ul { margin: 0; padding-left: 18px; }
.gsteps { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.gstep { display: grid; grid-template-columns: auto 40px 1fr; gap: 10px; align-items: start; padding: 10px; border: 1px solid var(--line); border-radius: 10px; }
.gstep.done { opacity: .55; }
.gstep.done strong { text-decoration: line-through; }
.gcheck input { width: 20px; height: 20px; margin: 10px 0 0; }
.gico { width: 40px; height: 40px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.gicon { width: 26px; height: 26px; }
.gtext p { margin: 4px 0; }
.gwhy { font-size: .85rem; color: var(--muted); }
.gwhy span { font-weight: 700; color: var(--accent); }
.timer { margin-top: 4px; font-variant-numeric: tabular-nums; }
.timer.run { background: var(--accent); color: var(--bg); border-color: var(--accent); font-weight: 700; }
.timer.ring { background: var(--warn); color: var(--bg); border-color: var(--warn); font-weight: 700; animation: ring 1s infinite; }
@keyframes ring { 50% { opacity: .5; } }
/* párhuzamos („közben”) lépések */
.gstep.meanwhile { margin-left: 26px; border-left: 3px solid var(--accent); border-radius: 0 10px 10px 0; }
.gpar { display: inline-block; font-size: .72rem; font-weight: 700; color: var(--accent); background: var(--accent-soft); border-radius: 999px; padding: 1px 8px; margin-bottom: 3px; }
.gwin { font-size: .85rem; background: var(--accent-soft); border-radius: 8px; padding: 6px 10px; }
.timer.oven { border-color: var(--warn); }
.timer.oven.run { background: var(--warn); border-color: var(--warn); }
@media (max-width: 600px) { .gstep.meanwhile { margin-left: 10px; } }

/* saját recept űrlap */
.avail.mine { background: var(--sky-soft); color: #1d6f9c; }
.avail.bazis { background: var(--berry-soft); color: var(--berry-ink); }
/* étrend */
.pf-diet { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; margin-bottom: 14px; display: flex; flex-direction: column; gap: 8px; }
.pf-diet legend { font-weight: 700; padding: 0 6px; }
.pf-diet h5 { margin: 6px 0 0; }
.pf-diet-q { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; }
.pf-sens { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.diet-line { font-size: .85rem; margin: 6px 0; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.diet-chip { font-size: .75rem; padding: 1px 8px; border-radius: 99px; background: var(--accent-soft); }
.diet-no { color: var(--warn); font-size: .8rem; }
:root[data-theme="dark"] .diet-no { color: #e0a526; }
.rec-tools { display: flex; gap: 8px; margin: 4px 0 10px; }
.recipe-form { display: flex; flex-direction: column; gap: 10px; }
.recipe-form h4 { margin: 10px 0 0; }
.recipe-form .field input, .recipe-form .field select, .recipe-form textarea { width: 100%; font-size: .95rem; color: var(--text); }
.recipe-form textarea { font: inherit; resize: vertical; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); }
.ing-rows { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.ing-row { display: grid; grid-template-columns: 1fr 70px 110px auto; gap: 6px; align-items: center; }
.ing-row input, .ing-row select { min-width: 0; padding: 5px 7px; }
.ir-pg { grid-column: 1 / -1; font-size: .8rem; color: var(--muted); padding-left: 4px; }
.ing-group { display: grid; grid-template-columns: 1fr auto; gap: 6px; margin-top: 8px; }
.ig-name { font-weight: 700; border-style: dashed; }
.rf-addbtns { display: flex; gap: 14px; }
.hnote { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; font-size: .85rem; margin: 8px 0; }
.hnote h5 { margin: 0 0 4px; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.hnote ul { margin: 0; padding-left: 18px; }
.hnote-ok { color: var(--accent); margin: 6px 0 0; font-weight: 600; }
.hnote.over { border-color: transparent; background: var(--peach-soft, #FFEEE5); }
.hnote-over { margin: 6px 0 2px; font-weight: 600; color: var(--warn); }
.hnote-treat { margin: 2px 0 0; }
:root[data-theme="dark"] .hnote-over { color: #e0a526; }
.ai-box { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 12px; border: 1px dashed var(--accent); border-radius: 10px; background: var(--accent-soft); }
.ai-modal { width: min(640px, 100%); }
.ai-modal textarea { width: 100%; font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--text); resize: vertical; }
.ai-tag { margin: 0; }
/* részletes lépésszerkesztő */
.ge-steps { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.ge-step { border: 1px solid var(--line); border-radius: 10px; padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.ge-head { display: grid; grid-template-columns: auto 150px 1fr auto; gap: 6px; align-items: center; }
.ge-num { font-weight: 700; color: var(--accent); }
.ge-title { font-weight: 600; min-width: 0; }
.ge-btns { display: flex; gap: 2px; }
.ge-btns button { padding: 3px 8px; }
.ge-text { font: inherit; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--text); resize: vertical; }
.ge-why { font-size: .85rem; }
.ge-nums { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .82rem; color: var(--muted); }
.ge-nums input { width: 60px; padding: 2px 6px; }
.ge-extra { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; margin-top: 8px; }
.ge-extra .wide { grid-column: 1 / -1; }
.ge-extra textarea { font: inherit; width: 100%; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--text); }
@media (max-width: 600px) { .ge-head { grid-template-columns: auto 1fr auto; } .ge-head .ge-title { grid-column: 1 / -1; } }
.ir-pgv.estimated, #rf-servings.estimated { border-color: #e0a526; background: rgba(224, 165, 38, .12); }
.ai-imgs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.ai-pick { display: inline-block; cursor: pointer; padding: 7px 14px; border-radius: 8px; background: var(--accent); color: var(--bg); font-weight: 600; }
.ai-thumbs { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; }
.ai-thumbs:empty { display: none; }
.ai-thumb { position: relative; }
.ai-thumb img { width: 88px; height: 88px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); display: block; }
.ai-thumb button { position: absolute; top: -6px; right: -6px; width: 22px; height: 22px; padding: 0; border-radius: 50%; line-height: 1; }
/* ételfotó-felismerés: széles ablak, felismerés után két hasáb (bal: fotó + mi ez, jobb: hasonló receptek + diétás recept) */
.food-modal.has-result { width: min(1000px, 100%); }
.food-modal.has-result .food-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.food-side h4:first-child { margin-top: 0; }
@media (max-width: 760px) { .food-modal.has-result .food-grid { display: block; } }
.food-side .ai-box + .ai-box { margin-top: 8px; }
.food-web { width: 100%; }
.food-web:empty { display: none; }
.food-web .food-matches { margin: 4px 0; }
.food-web .food-matches li { background: var(--card); }
.food-web a { color: var(--text); }
.ai-url { width: 100%; font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--text); }
.food-res { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; margin-top: 10px; }
.food-res h4 { margin: 4px 0; }
.food-res p { margin: 4px 0; }
.food-diet { background: var(--accent-soft); border-radius: 8px; padding: 6px 8px; }
.food-matches { list-style: none; padding: 0; margin: 0 0 10px; display: flex; flex-direction: column; gap: 6px; }
.food-matches li { display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; }
.calc-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.calc-info { font-size: .85rem; background: var(--accent-soft); border-radius: 8px; padding: 8px 10px; }
.ing-grp { font-weight: 700; font-size: .85rem; padding: 8px 0 2px; color: var(--accent); }
.ir-pg input { width: 60px; padding: 2px 5px; }
.nutri-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
@media (max-width: 600px) { .nutri-grid { grid-template-columns: repeat(2, 1fr); } .ing-row { grid-template-columns: 1fr 60px 95px auto; } }

/* hét kitöltése időszakokkal */
.fill-modal { width: min(520px, 100%); }
.fill-days { list-style: none; padding: 0; margin: 0; }
.fill-days li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 5px 0; border-bottom: 1px solid var(--line); }
.fd-name::first-letter { text-transform: uppercase; }
.fd-letters { display: flex; gap: 3px; }
.fl { width: 30px; height: 30px; padding: 0; border-radius: 8px; font-weight: 700; color: var(--muted); }
.fl.on { color: #fff; border-color: transparent; }
.fl-A.on { background: #2f7a55; } .fl-B.on { background: #2b6cb0; } .fl-C.on { background: #b5541c; } .fl-D.on { background: #7b4bb3; }
.fl-E.on { background: #a33b6b; } .fl-F.on { background: #2c8a8a; } .fl-G.on { background: #6b6f2a; }
@media (max-width: 600px) { .fl { width: 26px; height: 28px; } .fill-days li { flex-wrap: wrap; } }

/* mindig látható időzítő-sáv */
.timer-dock { position: fixed; left: 16px; bottom: 16px; z-index: 45; display: flex; flex-direction: column; gap: 6px; max-width: min(360px, calc(100vw - 32px)); }
.timer-dock[hidden] { display: none; }
.dock-row { display: flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 6px 8px 6px 12px; box-shadow: var(--shadow); font-size: .85rem; }
.dock-row span { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.dock-row small { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dock-row strong { font-variant-numeric: tabular-nums; }
.dock-row button { padding: 3px 9px; }
.dock-row.oven-on { border-color: var(--warn); }
.dock-ico { font-style: normal; font-size: 1.1rem; }
.dock-row.rang { border-color: var(--warn); background: var(--warn-soft); animation: ring 1s infinite; }
.orig { margin-top: 10px; font-size: .85rem; }
.orig summary { cursor: pointer; color: var(--muted); }

/* kedvencek */
.fav { border: none; background: none; padding: 0 2px; font-size: 1.1rem; line-height: 1; color: var(--muted); cursor: pointer; vertical-align: -1px; }
.fav.on, .fav-mark { color: var(--sun); }
.fav:hover { color: var(--sun); }
.picker-filters { display: flex; flex-wrap: wrap; gap: 6px 16px; }

/* visszavonás-sáv */
.undo { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 40; display: flex; align-items: center; gap: 14px;
  background: var(--text); color: var(--bg); padding: 8px 10px 8px 16px; border-radius: 10px; box-shadow: var(--shadow); max-width: calc(100vw - 32px); font-size: .9rem; }
.undo[hidden] { display: none; }
.undo span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.undo button { background: var(--accent); color: var(--bg); border: none; font-weight: 700; white-space: nowrap; }
.undo button.undo-close { background: transparent; color: var(--bg); opacity: .75; font-size: 1.2rem; line-height: 1; padding: 2px 6px; margin-left: -6px; }
.undo button.undo-close:hover { opacity: 1; }

/* ---- Napló ---- */
.journal { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); max-width: 1100px; }
.j-card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.j-card h3 { margin: 0 0 8px; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.j-stats { margin: 0 0 8px; }
.chart-wrap { position: relative; }
.wchart { width: 100%; height: auto; display: block; }
.wchart .grid { stroke: var(--line); stroke-width: 1; }
.wchart .axis { fill: var(--muted); font-size: 11px; }
.wchart .line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.wchart .dot { fill: var(--accent); stroke: var(--card); stroke-width: 2; }
.wchart .hit { fill: transparent; cursor: pointer; }
.wchart .goal { stroke: var(--muted); stroke-width: 1.5; stroke-dasharray: 5 4; }
.tip { position: absolute; transform: translate(-50%, -100%); background: var(--text); color: var(--bg); font-size: .8rem; padding: 3px 8px; border-radius: 6px; pointer-events: none; white-space: nowrap; }
.journal { max-width: 720px; }
/* Előzmények: a hét rácsa (oszlop = nap, koppintva kiválasztja) */
.hw { display: grid; grid-template-columns: auto repeat(7, minmax(0, 1fr)); gap: 4px 3px; align-items: center; }
.hw-l { font-size: .74rem; font-weight: 700; color: var(--muted); white-space: nowrap; padding-right: 4px; }
.hw-h, .hw-c { border: 0 !important; background: transparent !important; padding: 4px 0 !important; min-height: 36px; border-radius: 10px !important;
  display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: .72rem; color: var(--muted); font-weight: 600; min-width: 0; }
.hw-h b { font: 800 1rem var(--font-head); color: var(--text); }
.hw-h.today:not(.on) b { color: var(--accent); }
.hw-h.on, .hw-c.on { background: var(--accent-soft) !important; }
.hw-h.on { background: var(--accent) !important; color: #e9fff3; } .hw-h.on b { color: #fff; }
.hw-n { font-weight: 700; color: var(--text); font-size: .78rem; } .hw-n.ok { color: var(--accent); }
.hw-kg { font-weight: 700; color: var(--text); font-size: .74rem; }
.hw-dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line); vertical-align: -2px; }
.hw-dot.sky.part { background: var(--sky-soft); border-color: var(--sky); } .hw-dot.sky.full { background: var(--sky); border-color: var(--sky); }
.hw-dot.peach.part { background: var(--peach-soft); border-color: var(--peach); } .hw-dot.peach.full { background: var(--peach); border-color: var(--peach); }
.hw-key { margin: 8px 0 0; }
.hd { display: flex; flex-direction: column; gap: 8px; }
.hd h3 { text-transform: none; letter-spacing: 0; font-size: 1rem; color: var(--text); font-family: var(--font-head); }
.hd-sum { margin: 0; color: var(--muted); }
.hd-list { display: flex; flex-direction: column; gap: 8px; }
.hd-w { background: var(--accent-soft); border-radius: 16px; padding: 8px; }
/* Feladataim (a Terv alján) */
.plan-tasks { margin-top: 16px; max-width: 720px; }
.te { display: flex; flex-direction: column; gap: 8px; }
.te h3 { font-size: 1rem; text-transform: none; letter-spacing: 0; color: var(--text); font-family: var(--font-head); margin: 0; }
.te-wk { font: 600 .82rem var(--font); color: var(--muted); }
.te-h { margin: 8px 0 0; font-size: .78rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.te-h .small { text-transform: none; letter-spacing: 0; font-weight: 500; }
.te-row { display: flex; align-items: center; gap: 10px; min-height: 48px; }
.te-row .jt-ic { width: 36px; height: 36px; font-size: 1.1rem; }
.te-t { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.te-t b, .jt-txt b { overflow-wrap: anywhere; hyphens: auto; } /* hosszú szó (pl. „Gyulladáscsökkentő”) ne lógjon a gombokba */
.te-miss { color: var(--warn); }
.te-del { border: 0 !important; background: transparent !important; color: var(--muted); font-size: 1.3rem; width: 40px; height: 40px; padding: 0 !important; flex: none; }
.te-del:hover { color: var(--warn); }
.te-pw { display: inline-flex; align-items: center; gap: 4px; flex: none; }
.te-pw b { min-width: 2.2ch; text-align: center; font-size: .9rem; }
.te-pw button { width: 34px; height: 34px; padding: 0 !important; border-radius: 10px !important; font-weight: 700; }
.te-flex { border-top: 1px solid var(--line); padding-top: 4px; }
.te-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; padding: 2px 0 8px 46px; }
.te-day { min-height: 40px; padding: 0 !important; border-radius: 12px !important; border: 2px solid var(--line) !important; background: transparent !important;
  font-weight: 700; font-size: .78rem; color: var(--muted); }
.te-day.today { border-color: var(--accent) !important; }
.te-day.on { background: var(--accent) !important; border-color: var(--accent) !important; color: #fff; }
.te-day.done { background: var(--green) !important; border-color: var(--green) !important; }
.te-add { border-style: dashed !important; min-height: 44px; width: 100%; }
@media (max-width: 520px) { .te-days { padding-left: 0; } }
/* Terv telefonon: Nap · Hét kapcsoló és a heti lista */
.pv-seg { margin-bottom: 0; }
.pw-day { background: var(--card); border-radius: var(--radius); box-shadow: var(--card-shadow); padding: 4px 12px 8px; display: flex; flex-direction: column; }
.pw-day.today { box-shadow: 0 0 0 2px var(--green), var(--card-shadow); }
.pw-head { display: flex !important; align-items: baseline; gap: 6px; border: 0 !important; background: transparent !important; padding: 8px 0 !important;
  text-align: left; color: var(--text); min-height: 44px; }
.pw-head b { font-family: var(--font-head); }
.pw-kcal { margin-left: auto; white-space: nowrap; }
.pw-meal, .pw-empty { display: flex !important; align-items: center; gap: 8px; min-height: 44px; padding: 6px 0 !important; border: 0 !important;
  border-top: 1px solid var(--line) !important; background: transparent !important; border-radius: 0 !important; text-align: left; cursor: pointer; width: 100%; }
.pw-meal b { flex: 1; min-width: 0; font-size: .92rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pw-meal .ma-tag, .pw-empty .ma-tag { flex: none; width: 68px; text-align: center; align-self: center; } /* a .ma-tag alapból a sor tetejére igazodna */
.pw-meal .allergy-badge { align-self: center; margin-top: 0; }
.pw-meal.done b { color: var(--muted); }
.pw-done { color: var(--green); font-weight: 800; }
.pw-empty { color: var(--muted); font-size: .88rem; }
/* profil: súlymérés kapcsoló */
.pf-track { grid-column: 1 / -1; }

/* ---- Listák (Listonic-szerű) ---- */
.list-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 12px; border-bottom: 1px solid var(--line); }
.ltab { white-space: nowrap; border-radius: 999px; padding: 6px 14px; color: var(--muted); }
.ltab.on { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); font-weight: 600; }
.ltab.add { border-style: dashed; }
.lcount { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: var(--bg); font-size: .75rem; font-weight: 700; }
.li-head { margin-bottom: 8px; }
.li-name { font-size: 1.1rem; font-weight: 700; border-color: transparent; background: transparent; padding-left: 0; }
.li-name:hover, .li-name:focus { border-color: var(--line); background: var(--card); padding-left: 8px; }
.li-add-wrap { position: relative; display: flex; gap: 8px; max-width: 640px; }
.li-add-wrap input { flex: 1; font-size: 1rem; padding: 9px 12px; }
.ac { position: absolute; top: 100%; left: 0; right: 90px; z-index: 15; list-style: none; margin: 4px 0 0; padding: 4px 0; background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); }
.ac[hidden] { display: none; }
.ac li { padding: 7px 12px; cursor: pointer; }
.ac li.active, .ac li:hover { background: var(--accent-soft); }
.li-row { display: grid; grid-template-columns: 1fr auto auto; gap: 2px 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.li-row:last-child { border-bottom: none; }
.li-text { display: flex; flex-direction: column; }
.li-note { font-size: .75rem; color: var(--muted); }
/* bevásárlási napló */
.log-row { display: grid; grid-template-columns: 1fr auto auto; gap: 4px 12px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); }
.log-name { min-width: 0; }
.li-qtyv { font-variant-numeric: tabular-nums; color: var(--muted); white-space: nowrap; }
.li-edit { border: none; background: none; color: var(--muted); font-size: 1rem; padding: 2px 6px; }
.li-edit:hover { color: var(--accent); }
.li-btns { display: inline-flex; gap: 2px; }
.li-rm:hover { color: var(--warn); }
.ac-custom { color: var(--accent); font-weight: 600; }
/* Terv alapján */
.plan-item { display: grid; grid-template-columns: 1fr auto auto; gap: 2px 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.plan-item:last-child { border-bottom: none; }
.pi-name { font-weight: 600; }
.plan-item.home .pi-name, .plan-item.home .shop-amount { text-decoration: line-through; color: var(--muted); }
.plan-item.sent { opacity: .75; }
.home-btn { font-size: .8rem; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.home-btn:hover { border-color: var(--accent); color: var(--accent); }
.shop-actions .send-bar { margin: 0; color: var(--muted); }
.li-row.done .shop-name, .li-row.done .li-qtyv { text-decoration: line-through; color: var(--muted); }
.li-row.done { opacity: .55; }
.ac li { display: flex; justify-content: space-between; gap: 10px; }
.ac-cat { font-size: .75rem; color: var(--muted); white-space: nowrap; }

/* felugró ablak (tétel felvétele / szerkesztése) */
.modal-bg { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.45); display: grid; place-items: center; padding: 16px; }
.modal { width: min(440px, 100%); max-height: calc(100dvh - 32px); overflow-y: auto; overscroll-behavior: contain; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 18px; display: flex; flex-direction: column; gap: 12px; }
/* nyitott felugró ablaknál a háttér (az oldal) nem görgethető — a görgő az ablakot teker */
body:has(.modal-bg) { overflow: hidden; }
.modal h3 { margin: 0; }
.modal .field input, .modal .field select { font-size: 1rem; color: var(--text); width: 100%; }
.m-row { display: grid; grid-template-columns: 1fr 120px; gap: 12px; }
.stepper { display: flex; }
.stepper input { text-align: center; border-radius: 0; min-width: 0; }
.stepper button { width: 40px; font-size: 1.1rem; font-weight: 700; }
.stepper button:first-child { border-radius: 8px 0 0 8px; }
.stepper button:last-child { border-radius: 0 8px 8px 0; }
.m-actions { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.m-gap { flex: 1; }
@media (max-width: 600px) { .modal-bg { place-items: end stretch; padding: 0; } .modal { border-radius: 14px 14px 0 0; max-height: calc(100dvh - 16px); } }
.shop-section.cart { opacity: .8; }
.send-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 6px 0 4px; font-size: .9rem; }
@media (max-width: 600px) { .li-qty { width: 110px; } .ac { right: 0; } }

/* ---- Bevásárlólista ---- */
.field { display: flex; flex-direction: column; font-size: .8rem; color: var(--muted); gap: 3px; }
.quick { display: flex; flex-wrap: wrap; gap: 4px; align-self: flex-end; }
.shop-period { margin: 0 0 6px; }
.notes p { margin: 4px 0; font-size: .85rem; color: var(--warn); }
.shop-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 14px; margin: 12px 0; align-items: start; }
.shop-section { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; }
.shop-section h3 { margin: 0 0 6px; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.shop-section ul { list-style: none; margin: 0; padding: 0; }
.shop-row { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 7px 0; border-bottom: 1px solid var(--line); align-items: center; }
.shop-row:last-child { border-bottom: none; }
.shop-check { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.shop-check input { width: 20px; height: 20px; margin: 0; flex-shrink: 0; }
.shop-name { font-weight: 600; }
.shop-amount { text-align: right; font-variant-numeric: tabular-nums; }
.shop-uses { grid-column: 1 / -1; font-size: .75rem; color: var(--muted); padding-left: 30px; }
.shop-bought { grid-column: 1 / -1; padding-left: 30px; font-size: .85rem; color: var(--muted); }
.shop-bought input { width: 70px; text-align: right; padding: 2px 6px; }
.shop-row.in-cart .shop-name, .shop-row.in-cart .shop-amount { text-decoration: line-through; color: var(--muted); }
.shop-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; position: sticky; bottom: 0; background: var(--bg); padding: 10px 0; border-top: 1px solid var(--line); }
.shop-actions button:disabled { opacity: .5; cursor: default; }
@media (max-width: 600px) {
  .shop-list { grid-template-columns: 1fr; }
  .stock-list { grid-template-columns: 1fr; }
  .stock-tools { min-width: 0; }
}

/* =====================================================================================
   ÚJ DESIGN — 1. lépés: egységes, világos, barátságos megjelenés a mostani szerkezeten
   (puha, kerek kártyák keret helyett árnyékkal; nagyobb, kerekebb gombok; lebegő alsó fülsor;
   étkezésenként saját szín). A szabályok szándékosan a fájl végén vannak, hogy a régieket felülírják.
   ===================================================================================== */

/* kártyák: keret helyett finom árnyék, nagyobb lekerekítés */
.day, .rec, .cook, .pf-grid, .calc div, .pf-apply, .health, .forecast, .j-card, .shop-section, .pf-diet,
.hnote, .gbox, .food-res, .modal, .picker, .stock-list > *, .li-row-card {
  border: 0; border-radius: var(--radius); box-shadow: var(--card-shadow); background: var(--card);
}
.hnote, .gbox { box-shadow: none; background: var(--bg); }
.hnote.over { background: var(--peach-soft); }
.health.bad { background: var(--warn-soft); }
.calc div.hl { background: var(--accent-soft); box-shadow: none; }
.cook.open { box-shadow: 0 0 0 2px var(--green), var(--card-shadow); }
.day.today { box-shadow: 0 0 0 2px var(--green), var(--card-shadow); }
.rec { padding: 14px 16px; }
.rec + .rec { margin-top: 2px; }
.modal { padding: 20px; }
.drawer { border: 0; border-radius: 24px; }
.drawer-close { border-radius: 50%; width: 44px; height: 44px; padding: 0; display: grid; place-items: center; font-size: 1.6rem; box-shadow: var(--card-shadow); z-index: 2; }
/* telefonon: fogantyú felül — jelzi, hogy az ablak lehúzással is bezárható (drawer.js) */
.drawer-grip { display: none; }
@media (max-width: 700px) {
  .drawer-grip { display: block; position: absolute; left: 50%; top: 8px; width: 44px; height: 5px; margin-left: -22px; border-radius: 99px; background: var(--muted); opacity: .35; }
  .drawer-close { width: 40px; height: 40px; font-size: 1.4rem; }
}

/* mezők és gombok: kerekebb, levegősebb, nagyobb érintési felület */
input, select, textarea { border-radius: 12px; border-color: var(--line); background: var(--field); padding: 8px 12px; }
button { border-radius: 12px; padding: 8px 14px; }
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 6px 16px rgba(31, 138, 86, .25); }
button.primary:hover:not(:disabled) { filter: brightness(1.07); }
button.small, .link.small { border-radius: 10px; }
button.link { color: var(--accent); font-weight: 600; }
/* :where() → nulla prioritás: az egyedi gomb-stílusok (pl. hétsáv, pipák) mindig felülírhatják */
button:where(:not(.primary, .link, .li-edit, .fav, .ltab, .drawer-close)) { background: var(--card); border-color: var(--line); }
.home-btn { border-radius: 99px; }
.ai-box { border: 0; border-radius: var(--radius); background: var(--accent-soft); }

/* fejléc és fülek */
.top { background: var(--bg); border-bottom: 0; box-shadow: 0 1px 0 var(--line); }
.top h1 { color: var(--accent); }
.tabs a { border-radius: 14px; }
.tabs a.active { background: var(--accent-soft); color: var(--accent); }
.list-tabs { border-bottom: 0; }
.ltab { border-radius: 99px; background: var(--card); border: 0; box-shadow: var(--card-shadow); }
.ltab.on { background: var(--text); color: var(--bg); box-shadow: none; } /* var(--bg): sötét módban is olvasható */
.ltab.add { box-shadow: none; border: 2px dashed var(--line); background: transparent; }

/* telefon: lebegő alsó fülsor */
@media (max-width: 700px) {
  .tabs { left: 8px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom)); border: 0; border-radius: 24px;
    box-shadow: var(--shadow); padding: 6px; }
  /* a kijelölt fül íve kövesse a sáv ívét: belső sugár = külső (24) − körben egyforma belső margó (6) */
  .tabs a { border-radius: 18px; font-size: .62rem; letter-spacing: -.01em; padding: 4px 0; }
  .tabs .tl, .tabs .ts { overflow: visible; }
  body > main { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  body .undo, body .timer-dock { bottom: calc(86px + env(safe-area-inset-bottom)); }
  body .status { bottom: calc(92px + env(safe-area-inset-bottom)); }
}

/* jelvények, címkék */
.avail { border-radius: 99px; }
.avail.ok { background: var(--accent-soft); color: var(--accent); }
.avail.miss { background: var(--warn-soft); color: var(--warn); }
.diet-chip { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.chip { border: 0; box-shadow: var(--card-shadow); background: var(--card); }
.gpar { background: var(--sky-soft); color: #1d6f9c; }

/* étkezések saját színe (tervező): reggeli napsárga, ebéd zöld, snack barack, vacsora lila */
.cell-label { display: inline-block; align-self: flex-start; font-weight: 700; padding: 1px 9px; border-radius: 99px; letter-spacing: .04em; }
.cell.slot-reggeli .cell-label { background: var(--sun-soft); color: var(--sun-ink); }
.cell.slot-ebed .cell-label { background: var(--accent-soft); color: var(--accent); }
.cell.slot-snack .cell-label { background: var(--peach-soft); color: var(--warn); }
.cell.slot-vacsora .cell-label { background: var(--berry-soft); color: var(--berry-ink); }
.cell-add, .cell-rand { border: 2px dashed var(--line); border-radius: 12px; }

/* visszavonás-sáv és állapotsor */
.undo { border-radius: 16px; }
.undo button:not(.undo-close) { background: var(--green); }

/* hétsáv (Terv napi nézet) */
.jd-strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.jd { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 7px 0 6px; border: 0; border-radius: 14px;
  background: var(--card); box-shadow: var(--card-shadow); color: var(--muted); font-size: .7rem; font-weight: 600; }
.jd b { font-family: var(--font-head); font-size: 1.05rem; color: var(--text); line-height: 1.2; }
.jd.today:not(.on) b { color: var(--accent); }
.plan-day .jd.on { background: var(--accent); color: #e9fff3; box-shadow: 0 6px 16px rgba(31, 138, 86, .3); } /* erősebb az általános gomb-szabálynál */
.jd.on b { color: #fff; }
.jdots { display: flex; gap: 2px; margin-top: 3px; max-width: 90%; flex-wrap: wrap; justify-content: center; }
.jdots i { width: 5px; height: 5px; border-radius: 50%; background: var(--line); }
.jdots i.f { background: var(--green); }
.jd.on .jdots i { background: rgba(255, 255, 255, .35); } .jd.on .jdots i.f { background: #fff; }
/* súlykártya */
.jw { padding: 14px; }
.jw-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.jw-mid { text-align: center; flex: 1; min-width: 0; }
.jw-val { width: 5.2ch; border: 0 !important; background: transparent; text-align: right; padding: 0; font: 800 1.7rem var(--font-head) !important; color: var(--text); }
.jw-val.ghost { color: var(--muted); }
.jw-kg { font: 700 1.1rem var(--font-head); margin-left: 4px; color: var(--muted); }
.jw-pm { width: 48px; height: 48px; border-radius: 16px !important; border: 0 !important; background: var(--accent-soft) !important; color: var(--accent);
  font-size: 1.5rem; font-weight: 700; padding: 0; flex: none; }
.jw-good { color: var(--accent); font-weight: 600; }
.jw .chart-wrap { margin-top: 8px; }
/* feladatsorok */
.jt-head { display: flex; align-items: baseline; justify-content: space-between; margin: 8px 4px 0; }
.jt-head h3 { margin: 0; font-size: .78rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.jt { display: flex; align-items: center; gap: 12px; background: var(--card); border-radius: 16px; padding: 10px 12px; box-shadow: var(--card-shadow); cursor: pointer; }
.jt.done .jt-txt b { color: var(--muted); }
.jt-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 1.25rem; flex: none; }
.jc-sun { background: var(--sun-soft); } .jc-green { background: var(--accent-soft); } .jc-peach { background: var(--peach-soft); }
.jc-berry { background: var(--berry-soft); } .jc-sky { background: var(--sky-soft); }
.jt-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.jt-txt .small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jt-chk { appearance: none; -webkit-appearance: none; width: 34px; height: 34px; margin: 0; border-radius: 12px; border: 2px solid var(--line);
  background: var(--card); flex: none; display: grid; place-items: center; cursor: pointer; }
/* a pipa képként (nem ::after szövegként): iPhone-on a szöveges pipa a jobb alsó sarokba csúszott */
.jt-chk:checked { border-color: var(--green);
  background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='%23fff' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 22px no-repeat; }
.jt-add { border-radius: 99px !important; font-size: .82rem; font-weight: 600; color: var(--accent); background: var(--accent-soft) !important; border: 0 !important; white-space: nowrap; }
.jt-mini, .jt-del { border: 0 !important; background: transparent !important; color: var(--muted); font-size: 1.1rem; padding: 4px 8px; }
.jt-del { color: var(--warn); }

/* ---- 3. lépés: „Ma” és „Én” képernyő, vissza-sáv, választó alsó lapként, nagyobb betűk ---- */
html.big-text { font-size: 112.5%; }
html.big-text body { font-size: 17px; }
.ma { max-width: 640px; display: flex; flex-direction: column; gap: 10px; }
.ma-date { margin: 0; color: var(--muted); font-size: .85rem; }
.ma-hello { margin: 0 0 4px; font-size: 1.45rem; font-weight: 800; }
/* „Ma” oldal: gyors koppintgatásnál (víz, pipák) ne jelölődjön ki a szöveg — a mezők írhatók maradnak */
#ma-body { -webkit-user-select: none; user-select: none; }
#ma-body :is(input, textarea) { -webkit-user-select: text; user-select: text; }
/* „Ma” dashboard: egy sor egyforma gyűrű (feladatok · víz · lépések · edzés) — saját kártya nélkül */
.ma-rings { display: grid; grid-template-columns: repeat(var(--n, 4), 1fr); gap: 6px; margin: 2px 0 4px; }
.ma-rg { display: flex !important; flex-direction: column; align-items: center; gap: 4px; min-width: 0; padding: 4px 0 !important; border: 0 !important;
  background: transparent !important; color: var(--text); text-decoration: none; cursor: pointer; font: inherit;
  -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; }
div.ma-rg { cursor: default; } /* a feladat- és lépésgyűrű csak mutat */
.ma-ring { --p: 0%; --rc: var(--green); --rs: var(--accent-soft); width: 64px; height: 64px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: conic-gradient(var(--rc) 0 var(--p), var(--rs) var(--p) 100%); }
.ma-ring > span { width: 50px; height: 50px; border-radius: 50%; background: var(--bg); display: flex; flex-direction: column; align-items: center; justify-content: center;
  line-height: 1.05; font: 800 1rem var(--font-head); }
.ma-ring small { font: 700 .7rem var(--font); color: var(--muted); }
.ma-rg-ic { font-style: normal; font-size: 1.15rem; line-height: 1.1; }
.ma-ring.rc-sky { --rc: var(--sky); --rs: var(--sky-soft); }
.ma-ring.rc-peach { --rc: var(--peach); --rs: var(--peach-soft); }
.ma-rg.full .ma-ring > span { background: var(--rs); }
.ma-rg.off .ma-ring { --rs: var(--line); opacity: .6; }
.ma-rg-l { font-size: .74rem; font-weight: 700; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.ma-plus { color: #1d6f9c; }
.ma-bar { height: 8px; border-radius: 99px; background: var(--accent-soft); overflow: hidden; margin-top: 4px; }
.ma-bar i { display: block; height: 100%; background: var(--green); border-radius: 99px; }
/* csoportfejléc jobb oldali gombbal (🍳 Főzés, Lista ›) */
.ma-sec-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.ma-sec-row .ma-sec { margin-top: 0; }
.ma-sec-sub { font-weight: 600; letter-spacing: 0; text-transform: none; }
.ma-head-btn { text-decoration: none; font-weight: 700; font-size: .88rem; color: var(--accent); background: var(--accent-soft); border-radius: 99px;
  padding: 0 14px; min-height: 36px; display: inline-flex; align-items: center; white-space: nowrap; }
/* mára teendő: a kész halványan a helyén marad; a bevásárlás tétele kipipálva kiúszik */
.ma-todo { display: flex; flex-direction: column; gap: 8px; }
.ma-todo-row.done { opacity: .75; } /* mint a kipipált ételek */
.ma-alldone { margin: 0; background: var(--accent-soft); color: var(--accent); font-weight: 700; border-radius: 16px; padding: 12px 14px; }
/* bevásárlás: a listák neve a „Ma” oldalon — koppintva felugró ablakban pipálható (openListSheet) */
.ma-list { display: flex !important; align-items: center; gap: 12px; width: 100%; text-align: left; border: 0 !important; background: var(--card) !important;
  border-radius: var(--radius) !important; box-shadow: var(--card-shadow); padding: 10px 12px !important; color: var(--text); min-height: 60px; }
.ma-list-t { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.ma-list-t .small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ma-list-go { color: var(--muted); font-size: 1.4rem; }
/* 💚 „Magamért” a „Ma” oldalon */
.ma-self { display: flex; flex-direction: column; gap: 8px; background: var(--accent-soft); border-radius: var(--radius); padding: 12px; }
/* fix méret (nem méretezhető): 3 sor, hogy a minta-szöveg (placeholder) telefonon is kiférjen */
.ma-self textarea, .hd-self-ta { width: 100%; height: calc(3 * 1.45em + 22px); line-height: 1.45; resize: none; border-radius: 12px; font: inherit; font-size: 1rem; }
.ma-self .primary { align-self: flex-end; min-height: 44px; border-radius: 99px; padding: 0 20px; }
.ma-self-done { display: flex !important; align-items: flex-start; gap: 10px; width: 100%; text-align: left; border: 0 !important;
  background: var(--accent-soft) !important; border-radius: var(--radius) !important; padding: 12px 14px !important; color: var(--text); }
.ma-self-t { flex: 1; min-width: 0; font-weight: 600; line-height: 1.4; white-space: pre-wrap; }
.ma-self-ed { color: var(--accent); }
.hd-selfl { display: flex; flex-direction: column; gap: 4px; background: var(--accent-soft); border-radius: 12px; padding: 10px; }
.hw-dot.green.full { background: var(--green); border-color: var(--green); }
/* 🧍 „Nyújtózz egyet” (posture.js): mozgó figura — SVG + CSS-animáció; a transform-origin a viewBox koordinátáiban */
.fig { display: block; }
.fig * { stroke: var(--accent); stroke-width: 7; stroke-linecap: round; fill: none; transform-box: view-box; }
.fig .fig-hd { fill: var(--accent-soft); }
.fig .fig-fl { stroke: var(--line); stroke-width: 2; }
.fig-big { width: 170px; height: 230px; margin: 4px auto 0; }
.fig .fig-al { transform-origin: 44px 50px; } .fig .fig-ar { transform-origin: 76px 50px; }
.fig .fig-hg { transform-origin: 60px 40px; } .fig .fig-up { transform-origin: 60px 96px; }
.fig-reach .fig-al { animation: figRA 4s ease-in-out infinite; } .fig-reach .fig-ar { animation: figRB 4s ease-in-out infinite; }
.fig-reach .fig-bd { animation: figTip 4s ease-in-out infinite; }
@keyframes figRA { 0%, 100% { transform: rotate(12deg); } 40%, 70% { transform: rotate(168deg); } }
@keyframes figRB { 0%, 100% { transform: rotate(-12deg); } 40%, 70% { transform: rotate(-168deg); } }
@keyframes figTip { 0%, 100% { transform: none; } 40%, 70% { transform: translateY(-4px); } }
.fig-shoulders .fig-al { transform: rotate(10deg); } .fig-shoulders .fig-ar { transform: rotate(-10deg); }
.fig-shoulders .fig-sh { animation: figSh 2.4s ease-in-out infinite; }
@keyframes figSh { 0%, 100% { transform: none; } 30% { transform: translateY(-7px); } 60% { transform: translateY(2px); } }
.fig-neck .fig-al { transform: rotate(8deg); } .fig-neck .fig-ar { transform: rotate(-8deg); }
.fig-neck .fig-hg { animation: figNk 6s ease-in-out infinite; }
@keyframes figNk { 0%, 50%, 100% { transform: none; } 20%, 40% { transform: rotate(-22deg); } 70%, 90% { transform: rotate(22deg); } }
.fig-chest .fig-al { animation: figCA 3.5s ease-in-out infinite; } .fig-chest .fig-ar { animation: figCB 3.5s ease-in-out infinite; }
@keyframes figCA { 0%, 100% { transform: rotate(12deg); } 40%, 70% { transform: rotate(95deg); } }
@keyframes figCB { 0%, 100% { transform: rotate(-12deg); } 40%, 70% { transform: rotate(-95deg); } }
.fig-side .fig-al { transform: rotate(165deg); } .fig-side .fig-ar { transform: rotate(-165deg); }
.fig-side .fig-up { animation: figSd 6s ease-in-out infinite; }
@keyframes figSd { 0%, 50%, 100% { transform: none; } 20%, 40% { transform: rotate(-16deg); } 70%, 90% { transform: rotate(16deg); } }
.st-sheet { display: flex; flex-direction: column; max-width: 520px; margin: 0 auto; }
.st-sheet > p { margin: 0; }
.st-title { margin: 2px 0 6px !important; font-family: var(--font-head); }
.st-tip { background: var(--accent-soft); border-radius: 12px; padding: 8px 12px; }
.st-steps { margin: 8px 0 4px; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
.st-acts { display: flex; gap: 10px; margin-top: 12px; }
.st-acts button { flex: 1; min-height: 50px; border-radius: 99px !important; font-weight: 700; }
.st-timer { --t: 0%; background: linear-gradient(90deg, var(--accent-soft) var(--t), var(--card) var(--t)) !important; border: 2px solid var(--accent) !important; color: var(--accent); }
.st-next { align-self: center; margin: 10px 0 4px; min-height: 44px; font-weight: 700; }
.st-note { text-align: center; }
/* 🧺 „Mit főzzek?” (pantry.js) és a „Mi ez az étel?” szöveges mezője */
.pt-modal textarea { height: calc(3 * 1.45em + 18px); line-height: 1.45; resize: none; font-size: 1rem; }
.pt-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pt-acts .primary { margin-left: auto; min-height: 44px; border-radius: 99px; padding: 0 18px; }
.pt-acts .ai-pick { min-height: 44px; display: inline-flex; align-items: center; border-radius: 99px; }
.pt-modal [hidden] { display: none !important; } /* a display:flex ne írja felül az elrejtést */
.pt-modal > * { flex-shrink: 0; } /* sok találatnál se nyomódjon össze a mező (az ablak görgethető) */
.pt-photo { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; background: var(--accent-soft); border-radius: 12px; padding: 8px; }
.pt-res { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.pt-row { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 14px; padding: 8px 10px; }
.pt-main { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.pt-have { color: var(--accent); font-weight: 600; }
.pt-miss { color: var(--warn); }
.pt-btns { display: flex; flex-direction: column; gap: 6px; flex: none; }
.pt-btns button { min-height: 36px; border-radius: 99px !important; white-space: nowrap; }
/* „AI dolgozik” sáv (aibusy.js): felül, rögzítve, az időzítők alatt; minden felugró ablak fölött */
.ai-dock { position: fixed; left: 50%; transform: translateX(-50%); top: calc(6px + env(safe-area-inset-top) + var(--dock-h, 0px));
  width: min(460px, calc(100vw - 16px)); z-index: 70; pointer-events: none; }
.ai-dock[hidden] { display: none; }
.ai-row { position: relative; overflow: hidden; border: 2px solid #8b5cf6 !important; padding-right: 14px; }
.ai-row .ai-dock-badge { flex: none; font-size: .78rem; }
.ai-dock-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(139, 92, 246, .18); }
.ai-dock-bar::after { content: ''; position: absolute; top: 0; bottom: 0; width: 35%; background: #8b5cf6; border-radius: 99px; animation: aiSlide 1.4s ease-in-out infinite; }
@keyframes aiSlide { from { left: -35%; } to { left: 100%; } }
/* webes receptkeresés találatai: mini-értékelés, az ajánlott kiemelve */
.web-res li { align-items: flex-start; flex-wrap: wrap; }
.web-main { flex: 1 1 230px; min-width: 0; display: flex; flex-direction: column; gap: 2px; } /* keskeny képernyőn a gomb a szöveg alá kerül */
.web-sum { color: var(--text); line-height: 1.35; }
.web-best { border: 2px solid var(--green) !important; }
.web-pick { align-self: flex-start; font-size: .72rem; font-weight: 800; color: #fff; background: var(--green); border-radius: 99px; padding: 1px 8px; }
.web-nofit { margin: 6px 0; background: var(--sun-soft); color: var(--text); border-radius: 10px; padding: 8px 10px; }
.ai-box.web-best { border: 2px solid var(--green); }
.ai-box > .web-pick { margin-bottom: 2px; }
.web-res li > button { align-self: center; flex: none; margin-left: auto; min-height: 40px; }
/* Receptek keresés: a „nem neked való” találatok külön, összecsukható csoportban; allergén miatt rejtettek csak névvel */
.rc-others { grid-column: 1 / -1; background: var(--peach-soft); border-radius: var(--radius); padding: 10px 12px; }
.rc-others > summary { cursor: pointer; min-height: 40px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; list-style: none; }
.rc-others > summary::-webkit-details-marker { display: none; }
.rc-others > summary::before { content: '›'; font-size: 1.3rem; color: var(--warn); transition: transform .2s; }
.rc-others[open] > summary::before { transform: rotate(90deg); }
.rc-others-body { overflow: hidden; } /* a lenyitás animációja a magasságot mozgatja (recipes.js) */
.rc-others-body > p { margin: 4px 0 10px; }
.rc-others > summary::before { transition: transform .35s cubic-bezier(.22, 1, .36, 1); }
.rc-dim { opacity: .78; }
.rc-allergy { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; background: #FDECEA; border-radius: var(--radius); padding: 10px 12px; }
:root[data-theme="dark"] .rc-allergy { background: #3a1513; }
.rc-allergy-b { display: flex; flex-wrap: wrap; gap: 6px; }
.rc-allergy-b button { min-height: 40px; border-radius: 99px !important; }
/* Receptek: keresés szövegből AI-val (a találatok alatt, a rács teljes szélességében) */
.rc-aisearch { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 12px 14px;
  background: var(--accent-soft); border-radius: var(--radius); }
.rc-aisearch button { min-height: 44px; border-radius: 99px !important; font-weight: 700; }
.rc-bar { flex-wrap: wrap; }
/* naponta többször elvégzendő feladat: számláló gomb „1/3” (koppintva +1), mellette „−” */
.cnt-wrap { display: flex; flex-direction: row-reverse; align-items: center; gap: 2px; flex: none; }
.cnt-btn { min-width: 52px; height: 40px; flex: none; padding: 0 10px !important; border-radius: 99px !important; border: 2px solid var(--line) !important;
  background: var(--card) !important; font: 800 .95rem var(--font-head); color: var(--text); }
.cnt-btn.full { background: var(--green) !important; border-color: var(--green) !important; color: #fff; }
.cnt-minus { width: 34px; height: 34px; flex: none; padding: 0 !important; border: 0 !important; background: transparent !important; color: var(--muted); font-size: 1.3rem; }
/* Lista: a frissen felvett tétel egyszer felvillan (a kategóriájával együtt felülre kerül) */
.li-row.li-new { animation: liNew 1.6s var(--ease-out, ease); border-radius: 12px; }
@keyframes liNew { 0%, 30% { background: var(--accent-soft); box-shadow: 0 0 0 2px var(--accent); } 100% { background: transparent; box-shadow: 0 0 0 0 transparent; } }
.ls-title { margin: 0; font-family: var(--font-head); font-size: 1.3rem; }
.ls-sec { margin-top: 12px; }
.ls-sec h3 { margin: 0 0 2px; font-size: .74rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.ls-row { display: flex; align-items: center; gap: 12px; min-height: 52px; border-bottom: 1px solid var(--line); cursor: pointer; }
.ls-row .jt-chk { width: 30px; height: 30px; border-radius: 50%; }
.ls-row .jt-chk:checked { background-size: 18px; }
.ls-n { flex: 1; min-width: 0; display: flex; flex-direction: column; font-weight: 600; }
.ls-q { white-space: nowrap; }
.ls-row.done .ls-n { color: var(--muted); text-decoration: line-through; }
.ls-row.done { opacity: .75; }
.ls-finish { width: 100%; margin-top: 14px; min-height: 48px; }
.ls-open { display: block; text-align: center; margin: 14px 0 6px; font-weight: 700; color: var(--accent); text-decoration: none; padding: 10px; }
.ac-on { color: var(--accent); }
/* súly a „Ma” oldalon (ha a profilban kérted) */
.ma-wt { display: flex; align-items: center; gap: 8px; background: var(--sun-soft); border-radius: var(--radius); padding: 10px 12px; }
.ma-wt-ic { font-size: 1.4rem; flex: none; }
.ma-wt-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.15; }
.ma-wt-l { color: var(--sun-ink); font-weight: 700; }
.ma-wt-val { width: 4.6ch; border: 0 !important; background: transparent !important; padding: 0 !important; font: 800 1.45rem var(--font-head) !important; color: var(--text); min-height: 0; }
.ma-wt-val.ghost { color: var(--muted); }
/* keret nélküli nagy szám-mezők (súly): fókusznál doboz helyett finom aláhúzás */
.ma-wt-val, .jw-val { border-bottom: 2px dashed transparent !important; border-radius: 0 !important; box-shadow: none !important; }
.ma-wt-val:hover, .jw-val:hover { border-bottom-color: var(--line) !important; }
.ma-wt-val:focus, .jw-val:focus { outline: none !important; border-bottom: 2px solid var(--accent) !important; color: var(--text); }
.ma-wt-kg { font: 700 1rem var(--font-head); color: var(--muted); margin-left: 2px; }
.ma-wt-pm, .ma-wt-ok-btn { width: 44px; height: 44px; flex: none; padding: 0 !important; border: 0 !important; border-radius: 14px !important;
  background: var(--card) !important; color: var(--sun-ink); font: 800 1.3rem var(--font-head); box-shadow: var(--card-shadow); }
.ma-wt-ok-btn { background: var(--green) !important; color: #fff; }
.ma-wt-done { display: flex !important; align-items: center; gap: 6px; border: 0 !important; background: var(--sun-soft) !important; border-radius: 99px !important;
  padding: 8px 14px !important; align-self: flex-start; font-size: .9rem; color: var(--text); min-height: 40px; }
.ma-wt-ok { color: var(--green); font-weight: 800; }
.ma-sec { margin: 8px 4px 0; font-size: .78rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.ma-meal { display: flex; align-items: center; gap: 12px; background: var(--card); border-radius: var(--radius); box-shadow: var(--card-shadow); padding: 10px; cursor: pointer; }
.ma-meal.done { opacity: .75; }
/* víz-emlékeztető beállítása az „Én” oldalon */
.en-water { gap: 8px; }
.w-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; }
.w-grid label { display: flex; flex-direction: column; gap: 3px; font-size: .82rem; color: var(--muted); font-weight: 600; }
.w-grid input, .w-grid select { width: 100%; min-height: 44px; color: var(--text); }
.w-unit { display: flex; align-items: center; gap: 6px; color: var(--text); }
.w-plan, .w-ok { margin: 0; }
.w-ok { color: var(--accent); font-weight: 600; }
.w-tests { display: flex; flex-wrap: wrap; gap: 8px; }
.w-rec, .w-test { align-self: flex-start; border-radius: 99px !important; font-weight: 600; min-height: 44px; }

/* lépésszámláló az „Én” oldalon: heti oszlopok, célvonal, beállítási leírás */
.en-steps { gap: 8px; }
.st-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; height: 130px; padding-top: 4px; }
.st-day { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 0; }
.st-val { font-size: .66rem; color: var(--muted); font-weight: 600; }
.st-col { flex: 1; width: 100%; max-width: 30px; display: flex; align-items: flex-end; background: var(--peach-soft); border-radius: 8px; overflow: hidden; }
.st-col i { display: block; width: 100%; background: var(--peach); border-radius: 8px; transition: height .8s var(--ease-out, ease); }
.st-col i.ok { background: var(--green); }
.st-lbl { font-size: .72rem; font-weight: 700; color: var(--muted); }
.st-day.today .st-lbl { color: var(--accent); }
.st-col { position: relative; }
.st-gl { position: absolute; left: -3px; right: -3px; height: 0; border-top: 2px dashed var(--accent); opacity: .55; } /* a napi cél szintje */
.st-help summary { cursor: pointer; font-weight: 650; color: var(--accent); padding: 8px 0; min-height: 44px; display: flex; align-items: center; }
.st-help ol { padding-left: 20px; margin: 6px 0; display: flex; flex-direction: column; gap: 8px; }
.st-help code { font-size: .8em; background: var(--accent-soft); padding: 1px 6px; border-radius: 6px; word-break: break-all; }
.st-url { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 4px 0; }

/* víz-mennyiség választó (a „Ma” víz-gyűrűjét hosszan nyomva) */
.w-minus { margin-top: 4px; min-height: 44px; color: var(--warn); }
.w-amounts { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.w-amounts button { min-height: 48px; text-align: center !important; font-weight: 700; background: var(--sky-soft) !important; border: 0 !important; color: #1d6f9c; }
.w-custom { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: .9rem; margin-top: 4px; }
.w-custom input { width: 5em; }
.ma-book { display: none; border: 0 !important; background: transparent !important; font-size: 1.2rem; padding: 6px !important; }
@media (hover: hover) { .ma-book { display: block; } } /* egérrel nincs hosszú nyomás → külön gomb a recepthez */
.ma-meal .jt-chk { order: 2; } /* a DOM-ban a pipa az első (a <label> azt kapcsolja), látszani a 📖 után */
.ma-thumb { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; font-size: 1.6rem; flex: none; }
.ma-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; line-height: 1.25; }
.ma-txt b { font-size: .98rem; }
.ma-tag { align-self: flex-start; font-size: .66rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; padding: 1px 8px; border-radius: 99px; }
.tag-reggeli { background: var(--sun-soft); color: var(--sun-ink); } .tag-ebed { background: var(--accent-soft); color: var(--accent); }
.tag-snack { background: var(--peach-soft); color: var(--warn); } .tag-vacsora { background: var(--berry-soft); color: var(--berry-ink); }
.ma-empty { border: 2px dashed var(--line) !important; background: transparent !important; border-radius: var(--radius) !important; padding: 16px !important; color: var(--muted); text-align: center; }
.ma-remind { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); background: var(--peach-soft); border-radius: 16px; padding: 12px 14px; font-size: .88rem; }
.ma-remind span:nth-child(1) { flex: 1; }
.ma-go { color: var(--warn); font-weight: 700; white-space: nowrap; }
.ma-tip { margin: 4px; }
[data-recipe] { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
/* Én */
.en-head { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.en-avatar { width: 56px; height: 56px; border-radius: 50%; background: var(--accent-soft); display: grid; place-items: center; font-size: 1.6rem; flex: none; }
.en-head select { padding: 2px 8px; margin-left: 4px; }
.en-card { display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: var(--text); background: var(--card); border-radius: var(--radius); box-shadow: var(--card-shadow); padding: 14px 16px; }
.en-row { display: flex; justify-content: space-between; align-items: center; }
.en-row b, .en-card > b { font-family: var(--font-head); }
.en-go { color: var(--muted); font-size: 1.3rem; }
.en-spark { width: 100%; height: 46px; margin-top: 6px; }
.en-spark polyline { fill: none; stroke: var(--sky); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.en-set { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.en-set:last-child { border-bottom: 0; }
.en-set > span { display: flex; flex-direction: column; }
.en-toggle { appearance: none; -webkit-appearance: none; width: 48px; height: 28px; border-radius: 99px; background: var(--line); position: relative; flex: none; margin: 0; cursor: pointer; transition: background .15s; }
.en-toggle::after { content: ''; position: absolute; left: 3px; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: left .15s; }
.en-toggle:checked { background: var(--green); }
.en-toggle:checked::after { left: 23px; }
.en-copy { text-align: center; margin: 8px 0 0; }
/* vissza-sáv az aloldalakon */
.backbar { display: inline-block; margin: 0 0 10px; color: var(--accent); font-weight: 700; text-decoration: none; font-size: .95rem; }
/* külön oldalakon (admin, képválasztó): gomb formájú vissza-link */
.backbtn { display: inline-flex; align-items: center; gap: 4px; align-self: flex-start; min-height: 44px; padding: 0 16px 0 12px; border-radius: 99px;
  background: var(--card); box-shadow: var(--card-shadow); color: var(--accent); font-weight: 700; text-decoration: none; font-size: .95rem; }
.backbtn:hover { box-shadow: 0 0 0 2px var(--accent-soft), var(--card-shadow); }
/* receptválasztó telefonon: alsó lap fejléccel, sötétített háttérrel */
.picker-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.picker-head b { font-family: var(--font-head); }
.picker-close { border: 0 !important; background: var(--bg) !important; border-radius: 50% !important; width: 36px; height: 36px; padding: 0 !important; font-size: 1rem; }
.picker:not(.sheet) .picker-head { display: none; }
.picker-bg { position: fixed; inset: 0; z-index: 29; background: rgba(0, 0, 0, .4); }
.picker.sheet { top: 14vh; border-radius: 24px 24px 0 0; }
.picker.sheet .picker-detail { display: none; } /* telefonon a lista a fontos; a részletek hosszú nyomásra / a receptben */
.picker.sheet .picker-list .opt { padding: 12px 16px; border-bottom: 1px solid var(--line); }
body:has(.picker.sheet) { overflow: hidden; }

/* ---- 4. lépés: Terv — telefonon hétsáv + egy nap (gépen marad a heti rács) ---- */
.plan-day { display: none; }
@media (max-width: 700px) {
  #tervezes .week-scroll { display: none; }
  .plan-day { display: flex; flex-direction: column; gap: 10px; max-width: 640px; }
  #tervezes .toolbar { gap: 8px 10px; margin-bottom: 12px; }
  #tervezes .weeknav { flex: 1 1 100%; gap: 6px; }
  #tervezes .weeknav strong { flex: 1; min-width: 0; text-align: left; font: 800 1.2rem var(--font-head); }
  #tervezes .weeknav button:not(.link) { width: 44px; height: 44px; padding: 0; border-radius: 14px; font-size: 1.3rem; }
  #fill-random { order: 2; margin-left: auto; border-radius: 99px; border: 0; box-shadow: var(--card-shadow); font-weight: 600; min-height: 44px; }
  #tervezes .toolbar .chk { order: 1; flex: 1 1 0; min-width: 0; font-size: .82rem; line-height: 1.3; color: var(--muted); }
}
.pd-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 4px 4px 0; }
.pd-head b { font-family: var(--font-head); font-size: 1.05rem; }
.pd-more { color: var(--muted); font-size: 1.3rem; padding: 0 6px; }
.pd-empty-row { display: flex; gap: 8px; }
.pd-empty { flex: 1; border: 2px dashed var(--line) !important; background: transparent !important; border-radius: var(--radius) !important;
  padding: 16px 12px !important; color: var(--muted); text-align: center; min-height: 64px; }
.pd-rand { width: 64px; flex: none; border: 2px dashed var(--line) !important; background: transparent !important; border-radius: var(--radius) !important; font-size: 1.4rem; padding: 0 !important; }
.pd-copy { border: 0 !important; background: var(--accent-soft) !important; color: var(--accent); font-weight: 700; border-radius: 16px !important; padding: 13px !important; }
.pd-tip { margin: 4px; }
/* allergia: feltűnő piros jelzések (kártyán jelvény, receptben sáv), a profilban kiemelt rész */
.allergy-badge { display: inline-block; align-self: flex-start; margin-top: 3px; padding: 2px 8px; border-radius: 99px; background: #D93025; color: #fff;
  font-size: .68rem; font-weight: 800; letter-spacing: .02em; line-height: 1.4; }
.allergy-banner { background: #FDECEA; border: 2px solid #D93025; color: #8C1D18; border-radius: 14px; padding: 10px 12px; margin: 6px 0 10px; font-size: .9rem; }
:root[data-theme="dark"] .allergy-banner { background: #3a1513; color: #ffb4ab; }
.pf-allergy { border: 2px solid #D93025; border-radius: 14px; padding: 10px 12px; margin: 10px 0; background: #FFF8F7; }
:root[data-theme="dark"] .pf-allergy { background: #2a1615; }
.pf-allergy h5 { margin-top: 0; color: #B3261E; }
.pf-allergy-note { margin: 6px 0 0; color: var(--muted); }
.fp-allergy { margin: 6px 0 0; color: #B3261E; font-weight: 600; }
/* sorsolási feltételek (hét kitöltése, 🎲 hosszú nyomás) */
.fp-lbl { margin: 10px 0 4px; font-size: .8rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.fp-lbl .small { text-transform: none; letter-spacing: 0; font-weight: 400; }
.fp-row { display: flex; flex-wrap: wrap; gap: 6px; }
.fp-row .rc-chip { min-height: 40px; }
.cell-rand, .pd-rand { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.pd-clear { border: 0 !important; background: transparent !important; color: var(--warn); font-weight: 650; padding: 10px !important; min-height: 44px; }
.day-acts { display: flex; justify-content: space-between; gap: 6px; }
.day-acts .link.small { padding: 0; }
.pd-menu { display: flex; flex-direction: column; gap: 8px; }
.pd-menu h3 { margin: 0 0 6px; font-family: var(--font-head); }
.pd-menu p { margin: 0; }
.pd-menu button { text-align: left; min-height: 48px; font-size: 1rem; font-weight: 600; }
.pd-menu button.link { text-align: center; }
.pd-menu .pd-del { color: var(--warn); }

/* ---- 5. lépés: Receptek — kereső, címkék („csipeszek”), kártyák két (gépen több) oszlopban ---- */
.rc-top { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; max-width: 900px; }
.rc-search { display: flex; align-items: center; gap: 8px; background: var(--card); border-radius: 16px; box-shadow: var(--card-shadow); padding: 4px 14px; }
.rc-search input { flex: 1; min-width: 0; border: 0 !important; background: transparent; padding: 10px 0; font-size: 1rem; outline: none; }
.rc-chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 2px 6px; }
.rc-chips::-webkit-scrollbar { display: none; }
.rc-chip { flex: none; border: 0 !important; border-radius: 99px !important; background: var(--card) !important; box-shadow: var(--card-shadow);
  font-size: .85rem; font-weight: 600; color: var(--muted); padding: 8px 14px; min-height: 40px; white-space: nowrap; }
.rc-chip.on { background: var(--text) !important; color: var(--bg); box-shadow: none; }
.rc-more { display: flex; flex-wrap: wrap; gap: 8px; }
.rc-more[hidden] { display: none; }
.rc-more select { flex: 1 1 200px; }
.rc-bar { display: flex; align-items: center; gap: 8px; }
.rc-bar #rec-count { flex: 1; white-space: nowrap; }
.rc-pill { border-radius: 99px !important; font-weight: 600; font-size: .85rem; min-height: 40px; }
button.rc-pill:not(.primary) { border: 0; box-shadow: var(--card-shadow); }
.rc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.rc-card { background: var(--card); border-radius: 18px; box-shadow: var(--card-shadow); overflow: hidden; cursor: pointer; display: flex; flex-direction: column; }
.rc-card:hover { box-shadow: 0 0 0 2px var(--accent-soft), var(--card-shadow); }
.rc-img { position: relative; height: 96px; display: grid; place-items: center; font-size: 2.5rem; }
.rc-img .fav { position: absolute; top: 4px; right: 4px; width: 40px; height: 40px; font-size: 1.35rem; padding: 0; }
.rc-img .fav:not(.on) { color: rgba(0, 0, 0, .3); }
.rc-slot { position: absolute; left: 8px; bottom: 8px; font-size: .62rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; padding: 1px 8px; border-radius: 99px; }
.rc-bd { padding: 9px 11px 11px; display: flex; flex-direction: column; gap: 3px; }
.rc-nm { font-size: .9rem; line-height: 1.25; font-weight: 650; }
.rc-mt { font-size: .74rem; color: var(--muted); }
.rc-badge { align-self: flex-start; font-size: .66rem; font-weight: 700; color: var(--muted); }
.rc-badge.mine { color: var(--accent); }
.rc-badge.no { color: var(--warn); }
.rc-none { grid-column: 1 / -1; }
@media (max-width: 700px) {
  .rc-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .rc-chips { margin: 0 -12px; padding-left: 12px; padding-right: 12px; }
  .rc-img { height: 86px; font-size: 2.2rem; }
  /* a gombok egy sorban maradjanak (az AI-jelvénnyel is) */
  .rc-pill { padding: 8px 11px !important; font-size: .8rem; white-space: nowrap; }
  .rc-bar { gap: 6px; }
}

/* ---- 6. lépés: Lista — szegmens-kapcsoló, beviteli sáv, nagy kerek pipák, összecsukható időszak, egy fő gomb ---- */
.shop-seg { display: flex; gap: 4px; background: var(--line); border-radius: 16px; padding: 4px; margin-bottom: 12px; max-width: 640px; }
.shop-seg button { flex: 1 1 0; min-width: 0; border: 0 !important; background: transparent !important; border-radius: 12px !important; padding: 9px 4px !important;
  font-size: .82rem; font-weight: 650; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 44px; }
.shop-seg button.on { background: var(--card) !important; color: var(--text); box-shadow: var(--card-shadow); }
.shop-seg .lcount { font-size: .68rem; vertical-align: 1px; }
@media (max-width: 520px) { .shop-seg .seg-ic { display: none; } .shop-seg button { font-size: .78rem; padding: 9px 2px !important; } }
#bevasarlas .list-tabs { margin-bottom: 6px; padding: 2px 2px 6px; }
#bevasarlas .li-head { margin-bottom: 6px; }
/* beviteli sáv */
.li-add-wrap { background: var(--card); border-radius: 16px; box-shadow: var(--card-shadow); padding: 4px 4px 4px 14px; align-items: center; margin-bottom: 4px; }
.li-add-wrap input { border: 0 !important; background: transparent; padding: 10px 0; outline: none; }
#li-add-btn { width: 46px; height: 46px; padding: 0; border-radius: 13px; font-size: 1.5rem; line-height: 1; flex: none; }
.ac { right: 0; }
/* tételek: nagy kerek pipa */
.shop-check input[type=checkbox] { appearance: none; -webkit-appearance: none; width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--line); background: var(--card); cursor: pointer; flex: none; }
.shop-check input[type=checkbox]:checked { border-color: var(--green);
  background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='%23fff' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 19px no-repeat; }
.li-row { min-height: 52px; }
.shop-check { gap: 12px; min-height: 44px; }
.shop-section { border: 0; }
/* „Terv alapján”: összecsukható időszak-választó */
.sp-sum { display: flex; align-items: center; gap: 12px; width: 100%; max-width: 640px; text-align: left; border: 0 !important; background: var(--card) !important;
  border-radius: 16px !important; box-shadow: var(--card-shadow); padding: 12px 14px !important; }
.sp-ic { font-size: 1.4rem; }
.sp-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.sp-txt b { font-family: var(--font-head); }
.sp-chev { color: var(--muted); transition: transform .15s; }
.sp-sum[aria-expanded="true"] .sp-chev { transform: rotate(180deg); }
.sp-box { max-width: 640px; background: var(--card); border-radius: 16px; box-shadow: var(--card-shadow); padding: 12px 14px; margin-top: 8px; display: flex; flex-direction: column; gap: 10px; }
.sp-box[hidden] { display: none; }
.sp-box .quick { align-self: stretch; gap: 8px; }
.sp-dates { display: flex; gap: 10px; flex-wrap: wrap; }
.sp-dates .field { flex: 1 1 140px; }
.sp-box p { margin: 0; }
#shop-notes { margin-top: 8px; }
.plan-item { min-height: 48px; }
.home-btn { min-height: 36px; }
/* alsó gombsor: egy fő gomb, a többi kicsi */
.shop-actions { justify-content: flex-start; align-items: center; }
.shop-actions #send-btn, .shop-actions #li-finish { min-height: 48px; font-weight: 700; padding: 10px 18px; }
#li-finish:not(:disabled) { background: var(--peach-btn); border-color: var(--peach-btn); box-shadow: 0 6px 16px rgba(226, 98, 47, .3); }
#li-finish:disabled { background: var(--line); border-color: var(--line); color: var(--muted); box-shadow: none; opacity: 1; }
.shop-stock { max-width: 900px; }

/* bevásárlási mód (💰 Spórolós · ✨ Minőségi) és becsült árak */
.pm-seg { display: inline-flex; gap: 4px; background: var(--line); border-radius: 99px; padding: 3px; margin: 0 0 10px; }
.pm-seg[hidden] { display: none; }
.pm-seg button { border: 0 !important; background: transparent !important; border-radius: 99px !important; padding: 7px 14px !important; font-weight: 650; font-size: .85rem; color: var(--muted); min-height: 38px; }
.pm-seg button.on { background: var(--card) !important; color: var(--text); box-shadow: var(--card-shadow); }
.cost-card { max-width: 640px; background: var(--card); border-radius: 16px; box-shadow: var(--card-shadow); padding: 10px 14px; margin: 8px 0; display: flex; flex-direction: column; gap: 2px; }
.cost-card:empty { display: none; }
.cost-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.cost-row > b { font-family: var(--font-head); white-space: nowrap; }
.cost-alt { margin: 0 0 4px; }
.pi-price { display: block; font-size: .75rem; color: var(--accent); font-weight: 650; }
.pi-tip { display: block; color: var(--warn); font-size: .74rem; }
.cost-line { margin: 4px 0 8px; font-size: .9rem; }
/* hozzávaló ára a recept-ablakban: a sor végén, egy oszlopba igazítva */
.ing > span:first-child { flex: 1; min-width: 0; }
.ing-ft { min-width: 4.8em; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; font-size: .85rem; color: var(--muted); }
.price-row .stock-input input { width: 6.5em; }

/* AI-jelvény: minden gombon, ami AI-t hív (pénzbe kerül) — egységes, jól látható jel */
.ai-badge { display: inline-block; vertical-align: 1px; margin-left: 4px; padding: 1px 7px; border-radius: 99px; font: 800 .66rem/1.5 var(--font);
  letter-spacing: .05em; color: #fff; background: linear-gradient(135deg, #7C6CF2, #B05CE0); box-shadow: 0 1px 3px rgba(84, 70, 201, .35); }
.ai-badge::before { content: '✦ '; font-weight: 400; }

/* Lista: telefonon az alsó gombsor a lebegő fülsor FÖLÖTT ragadjon (eddig a fülsor eltakarta) */
@media (max-width: 700px) {
  .shop-actions { bottom: calc(80px + env(safe-area-inset-bottom)); z-index: 5; gap: 8px; padding: 8px 10px; margin: 0 -4px;
    border-top: 0; border-radius: 18px; background: var(--card); box-shadow: var(--card-shadow); align-items: center; }
  .shop-actions .send-bar { flex: 1 1 auto; display: flex; align-items: center; gap: 6px; min-width: 0; }
  .shop-actions .send-bar select { flex: 1; min-width: 0; }
  .shop-actions #send-btn, .shop-actions #li-finish { flex: 1 1 100%; order: -1; }
}

/* =====================================================================================
   MOZGÁS — finom, „modern” átmenetek (Andras kérése):
   csíkok és gyűrű feltöltődése, fülváltáskor beúszó tartalom, rugalmasan nyíló ablakok.
   A rendszer „csökkentett mozgás” beállításánál minden kikapcsol (a fájl legvégén).
   ===================================================================================== */
:root { --ease-out: cubic-bezier(.22, 1, .36, 1); --ease-spring: cubic-bezier(.34, 1.36, .64, 1); }

/* feltöltődés: a csíkok szélessége és a haladás-gyűrű (--p) animálható (today.js indítja a régi értékről) */
@property --p { syntax: '<percentage>'; inherits: false; initial-value: 0%; }
.ma-ring { transition: --p 1s var(--ease-out); }
.ma-bar i { transition: width .9s var(--ease-out); }
/* „hullámzó” fény a csíkon, amíg tölt */
.ma-bar i.filling::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .55), transparent);
  transform: translateX(-100%); animation: shine .9s var(--ease-out); }
@keyframes shine { to { transform: translateX(100%); } }
.ma-rg-ic.pop { display: inline-block; animation: pop .45s var(--ease-spring); }
button.ma-rg:active .ma-ring { transform: scale(.94); }
.ma-ring { transition: --p 1s var(--ease-out), transform .12s ease; }
@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.25); } 100% { transform: scale(1); } }

/* a beúszó animáció alatt se jelenjen meg vízszintes görgetősáv (clip: nem lesz görgethető, a ragadós elemek maradnak) */
body > main { overflow-x: clip; }
/* fülváltás: az új oldal a fülsor irányából úszik be (előre: jobbról, vissza: balról) */
.view.in-fwd { animation: viewFwd .38s var(--ease-out); }
.view.in-back { animation: viewBack .38s var(--ease-out); }
@keyframes viewFwd { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
@keyframes viewBack { from { opacity: 0; transform: translateX(-28px); } to { opacity: 1; transform: none; } }
/* kisebb váltások (Lista szegmensei, Terv napjai): rövid felúszás */
.fade-in { animation: fadeUp .3s var(--ease-out); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
/* fülre lépve az oldal elemei egymás után úsznak be — minden fülön (Ma, Én, Terv, Receptek, Lista, Napló, Profil, Főzés) */
.view:is(.in-fwd, .in-back) :is(.ma, .toolbar, #plan-day, #week, .rc-top, .rc-grid, #shop-list-view, #shop-plan-view, #shop-log-view, #keszlet,
  .shop-list, .journal, #plan-tasks, #profile-form, .pf-grid, #cook-list) > * { animation: fadeUp .45s var(--ease-out) both; }
.view:is(.in-fwd, .in-back) > :is(.shop-seg, .pm-seg, .backbar) { animation: fadeUp .45s var(--ease-out) both; }
.view:is(.in-fwd, .in-back) :is(.ma, .toolbar, #plan-day, #week, .rc-top, .rc-grid, #shop-list-view, #shop-plan-view, #shop-log-view, #keszlet,
  .shop-list, .journal, #plan-tasks, #profile-form, .pf-grid, #cook-list) > :nth-child(2) { animation-delay: .03s; }
.view:is(.in-fwd, .in-back) :is(.ma, .toolbar, #plan-day, #week, .rc-top, .rc-grid, #shop-list-view, #shop-plan-view, #shop-log-view, #keszlet,
  .shop-list, .journal, #plan-tasks, #profile-form, .pf-grid, #cook-list) > :nth-child(3) { animation-delay: .06s; }
.view:is(.in-fwd, .in-back) :is(.ma, .toolbar, #plan-day, #week, .rc-top, .rc-grid, #shop-list-view, #shop-plan-view, #shop-log-view, #keszlet,
  .shop-list, .journal, #plan-tasks, #profile-form, .pf-grid, #cook-list) > :nth-child(4) { animation-delay: .09s; }
.view:is(.in-fwd, .in-back) :is(.ma, .toolbar, #plan-day, #week, .rc-top, .rc-grid, #shop-list-view, #shop-plan-view, #shop-log-view, #keszlet,
  .shop-list, .journal, #plan-tasks, #profile-form, .pf-grid, #cook-list) > :nth-child(5) { animation-delay: .12s; }
.view:is(.in-fwd, .in-back) :is(.ma, .toolbar, #plan-day, #week, .rc-top, .rc-grid, #shop-list-view, #shop-plan-view, #shop-log-view, #keszlet,
  .shop-list, .journal, #plan-tasks, #profile-form, .pf-grid, #cook-list) > :nth-child(6) { animation-delay: .15s; }
.view:is(.in-fwd, .in-back) :is(.ma, .toolbar, #plan-day, #week, .rc-top, .rc-grid, #shop-list-view, #shop-plan-view, #shop-log-view, #keszlet,
  .shop-list, .journal, #plan-tasks, #profile-form, .pf-grid, #cook-list) > :nth-child(7) { animation-delay: .18s; }
.view:is(.in-fwd, .in-back) :is(.ma, .toolbar, #plan-day, #week, .rc-top, .rc-grid, #shop-list-view, #shop-plan-view, #shop-log-view, #keszlet,
  .shop-list, .journal, #plan-tasks, #profile-form, .pf-grid, #cook-list) > :nth-child(8) { animation-delay: .21s; }
.view:is(.in-fwd, .in-back) :is(.ma, .toolbar, #plan-day, #week, .rc-top, .rc-grid, #shop-list-view, #shop-plan-view, #shop-log-view, #keszlet,
  .shop-list, .journal, #plan-tasks, #profile-form, .pf-grid, #cook-list) > :nth-child(n+9) { animation-delay: .24s; }

/* felugró ablak (recept): a háttér elsötétül, az ablak rugalmasan érkezik; bezáráskor gyorsabban távozik */
.backdrop { display: block; opacity: 0; visibility: hidden; transition: opacity .25s ease, visibility .25s; }
.backdrop.open { opacity: 1; visibility: visible; transition: opacity .3s ease; }
.drawer { transform: translate(-50%, -47%) scale(.96); transition: opacity .2s ease, transform .2s ease-in, visibility .2s; }
.drawer.open { transform: translate(-50%, -50%); transition: opacity .3s ease, transform .45s var(--ease-out), visibility 0s; }
@media (max-width: 600px) {
  .drawer { transform: translateY(100%); transition: transform .28s cubic-bezier(.4, 0, 1, 1), visibility .28s; }
  .drawer.open { transform: none; transition: transform .5s var(--ease-out), visibility 0s; }
}
/* kisebb ablakok (menük, kérdések, víz, AI) és a receptválasztó */
.modal-bg { animation: bgIn .25s ease; }
.modal-bg > .modal { animation: popIn .4s var(--ease-out); }
@keyframes bgIn { from { background: rgba(0, 0, 0, 0); } }
@keyframes popIn { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }
@media (max-width: 600px) { .modal-bg > .modal { animation: sheetUp .45s var(--ease-out); } }
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: none; } }
.picker-bg { animation: fadeOnly .25s ease; }
@keyframes fadeOnly { from { opacity: 0; } }
.picker.sheet { animation: sheetUp .45s var(--ease-out); }
.picker:not(.sheet) { animation: popIn .25s var(--ease-out); }
/* gombok: lenyomva enyhén „besüllyednek” */
button:active:not(:disabled), .rc-card:active, .ma-meal:active, .pd-meal:active { transform: scale(.97); }
button, .rc-card, .ma-meal, .pd-meal { transition: background-color .15s, border-color .15s, filter .15s, transform .12s ease; }

/* =====================================================================================
   Andras jegyzetei (2026-10-06): főzés mód, időzítők felül, lehúzható ablakok, víz-beállítás telefonon
   ===================================================================================== */
/* felugró ablakok telefonon: rögzített fogantyús sáv felül (innen lehúzható), a tartalom alatta görög — nem „folyik ki” */
@media (max-width: 600px) {
  .modal-bg > .modal { padding-top: 0; }
  .modal-bg > .modal::before { content: ''; position: sticky; top: 0; z-index: 3; flex: none; height: 26px; margin: 0 -20px -4px;
    background: linear-gradient(var(--muted), var(--muted)) center 10px / 44px 5px no-repeat, var(--card); opacity: 1; border-radius: 14px 14px 0 0;
    box-shadow: 0 10px 8px -2px var(--card); } /* finom áttűnés: a görgetett tartalom a sáv alatt elhalványul */
}

/* időzítők: felül, ragadósan, egymás alatt; a fejléc és a recept-ablak lejjebb kerül, hogy ne takarják egymást */
.timer-dock { top: calc(6px + env(safe-area-inset-top)); bottom: auto !important; left: 50%; right: auto; transform: translateX(-50%);
  width: min(460px, calc(100vw - 16px)); max-width: none; z-index: 60; }
.dock-row { border: 0; box-shadow: 0 6px 20px rgba(0, 0, 0, .18); min-height: 48px; }
.dock-row button { min-width: 40px; min-height: 40px; border-radius: 12px; }
.dock-open { cursor: pointer; }
.dock-open small::after { content: ''; }
html.has-dock .top { position: static; } /* futó időzítőnél a fejléc görög a tartalommal, felül csak az időzítő marad */
html.has-dock body { padding-top: var(--dock-h, 0px); } /* az oldal teteje (fejléc) ne bújjon az időzítő alá */
/* előkészítés (Főzés): összefoglaló kártyák a listában, a többi az alulról feljövő ablakban */
.cook-sum { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; cursor: pointer; margin-bottom: 10px; }
.cook-sum h3 { margin: 0 0 2px; font-size: 1rem; }
.cook-sum .primary { flex: none; min-height: 40px; }
.cook-ask { display: flex; flex-direction: column; gap: 10px; background: var(--accent-soft); border-radius: 16px; padding: 14px; margin: 8px 0; }
.cook-ask p { margin: 0; }
.cook-ask button { min-height: 46px; }
.cook-portion { background: var(--sky-soft); border-radius: 16px; padding: 12px 14px; margin: 12px 0; }
.cook-portion h4 { margin: 0 0 6px; }
.cook-portion ul { margin: 6px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
#drawer .cook-actions { position: sticky; bottom: 0; background: var(--card); padding: 10px 0 calc(10px + env(safe-area-inset-bottom)); }
#drawer .cook-actions .primary { width: 100%; min-height: 50px; font-weight: 700; }
@media (max-width: 600px) {
  .drawer { top: var(--dock-h, 0px); height: calc(100dvh - var(--dock-h, 0px)); }
}

/* recept-ablak: a névre koppintva másol */
.rec-title { cursor: copy; }
.rec-title:active { background: var(--accent-soft); border-radius: 6px; }

/* főzés mód: nagy, könnyen pipálható lépések és allépések, haladás-csík; megnézéskor nincs pipa */
.gstep { grid-template-columns: 40px 1fr; }
.gstep.cookmode { grid-template-columns: auto 40px 1fr; cursor: pointer; border-width: 2px; }
.gstep.cookmode .gcheck input, .gsub input { appearance: none; -webkit-appearance: none; width: 32px; height: 32px; margin: 4px 0 0; border-radius: 10px;
  border: 2px solid var(--line); background: var(--card); cursor: pointer; flex: none; }
.gsub input { width: 26px; height: 26px; margin: 0; border-radius: 8px; }
.gstep.cookmode .gcheck input:checked, .gsub input:checked { border-color: var(--green);
  background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='%23fff' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 20px no-repeat; }
.gstep.cookmode.done { opacity: .5; }
.gsubs { list-style: none; padding: 0; margin: 6px 0 0; display: flex; flex-direction: column; gap: 4px; }
.gsub { display: flex; align-items: center; gap: 10px; padding: 6px 4px; min-height: 40px; cursor: pointer; }
.gsub.done { color: var(--muted); text-decoration: line-through; }
/* lépés-kártya elrendezése: felül egy sorban pipa · ikon · cím, alatta a tartalom a kártya TELJES szélességén
   (Andras: kevesebb üres hely bal oldalt). A .gtext „feloldódik”, a gyerekei közvetlenül a rácsba kerülnek. */
.gstep { align-items: center; row-gap: 6px; }
.gstep > .gtext { display: contents; }
.gstep > .gtext > * { grid-column: 1 / -1; margin: 0; }
.gstep > .gtext > strong { grid-column: -2 / -1; grid-row: 1; align-self: center; line-height: 1.3; }
.gstep .gcheck, .gstep .gico { grid-row: 1; align-self: center; }
.gstep .gcheck input { margin: 0 !important; }
.gstep > .gtext > .gpar, .gstep > .gtext > button.timer { justify-self: start; }
.gsub { justify-content: flex-start; }
.gsub .muted { margin-left: auto; font-size: .8rem; }
.gprogress { display: flex; flex-direction: column; gap: 4px; margin: 6px 0 10px; font-size: .9rem; }
.gprogress .ma-bar i { transition: width .4s var(--ease-out); }
.gnotes { background: var(--sun-soft); border-radius: 14px; padding: 10px 14px; margin-top: 10px; font-size: .9rem; }
.gnotes h5 { margin: 0 0 4px; }
.gnotes p { margin: 4px 0; }

/* víz-emlékeztető beállítás: a mezők ne lógjanak ki a dobozból (iPhone időmező) */
.w-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.w-grid label { min-width: 0; }
.w-grid input, .w-grid select { min-width: 0; max-width: 100%; box-sizing: border-box; }
.w-grid input[type=time] { -webkit-appearance: none; appearance: none; display: block; text-align: left; padding: 8px 12px; }
.w-unit input { flex: 1; width: auto; }

/* ===== 📷 RECEPT-FOTÓK (photos.js) — fotó nélkül marad a színes emoji ===== */
.rc-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; animation: phIn .35s var(--ease-out) both; }
.rc-img:has(.rc-photo) .fav:not(.on) { color: #fff; text-shadow: 0 1px 4px rgba(0, 0, 0, .45); }
.rc-img .fav, .rc-img .rc-slot { z-index: 1; }
.ph-thumb { overflow: hidden; background: var(--line); position: relative; }
.ph-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.ph-ic { font-size: 1.4rem; } /* csak akkor látszik, ha a kép nem jön be */
.rec-hero { position: relative; margin: 0 -20px 14px; aspect-ratio: 4 / 3; max-height: 46vh; width: calc(100% + 40px); overflow: hidden; background: var(--line); }
.rec-hero img { width: 100%; height: 100%; object-fit: cover; display: block; animation: phIn .4s var(--ease-out) both; }
.rec-hero-btn { position: absolute; right: 12px; bottom: 12px; border: 0 !important; border-radius: 99px !important; min-height: 44px; padding: 8px 16px !important;
  background: rgba(20, 28, 24, .72) !important; color: #fff !important; font-weight: 650; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.rec-ill { position: absolute; left: 12px; bottom: 12px; padding: 4px 10px; border-radius: 99px; font-size: .72rem; font-weight: 700;
  background: rgba(255, 255, 255, .85); color: #1F2A24; }
.rec-addphoto { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 4px; margin: 4px 0 14px; padding: 22px 12px !important; min-height: 92px;
  border: 2px dashed var(--line) !important; background: transparent !important; border-radius: var(--radius) !important; color: var(--text); font-weight: 650; font-size: 1rem; }
.rec-addphoto:hover { border-color: var(--accent) !important; }
.ph-hint { padding: 0 4px; }
/* „✥ Melyik rész látsszon?” — a keret a receptkártya arányával (2:1) */
.ph-crop { display: flex; flex-direction: column; gap: 10px; }
.ph-crop h3 { margin: 0; font-family: var(--font-head); }
.ph-crop p { margin: 0; }
.pc-frame { position: relative; aspect-ratio: 2 / 1; border-radius: 18px; overflow: hidden; background: var(--line); cursor: grab; touch-action: none;
  box-shadow: 0 0 0 3px var(--accent); user-select: none; -webkit-user-select: none; }
.pc-frame.dragging { cursor: grabbing; }
.pc-frame img, .pc-mini img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; -webkit-user-drag: none; }
.pc-minis { display: flex; gap: 18px; align-items: flex-end; }
.pc-minis figure { margin: 0; display: flex; flex-direction: column; gap: 4px; }
.pc-mini { display: block; overflow: hidden; background: var(--line); }
.pc-sq { width: 56px; height: 56px; border-radius: 16px; }
.pc-43 { width: 96px; height: 72px; border-radius: 10px; }
@media (min-width: 701px) { .rec-hero { margin: 0 0 14px; width: 100%; border-radius: var(--radius); } }
@keyframes phIn { from { opacity: 0; } to { opacity: 1; } }

/* ===== 📱 TABLET: „Hét” heti tábla (week.js) — csak html.tablet alatt (érintőképernyő + ≥ 900 px, vagy ?tablet=1) ===== */
html:not(.tablet) .tab-het { display: none !important; }
:root { --appt: #D64545; }
:root[data-theme="dark"] { --appt: #FF8A80; }
.wk-time { color: var(--appt); font-variant-numeric: tabular-nums; }
.wk-strip { --wk-n: 4; --wk-gap: 12px; position: relative; display: flex; gap: var(--wk-gap); align-items: flex-start; overflow-x: auto; overflow-y: hidden;
  overscroll-behavior-x: contain; scrollbar-width: none; padding: 4px 2px 8px; -webkit-overflow-scrolling: touch; }
.wk-strip::-webkit-scrollbar { display: none; }
.wk-strip { user-select: none; -webkit-user-select: none; cursor: grab; } /* húzáskor ne jelöljön ki szöveget */
.wk-strip.dragging { cursor: grabbing; }
.wk-strip input, .wk-strip button, .wk-meal { cursor: pointer; }
#het-body .wk-today { position: fixed; right: 16px; top: 8px; z-index: 21;
  min-height: 44px; padding: 0 20px !important; border-radius: 99px !important; border: 0 !important; background: var(--accent) !important; color: #fff !important;
  font-weight: 700; box-shadow: 0 6px 20px rgba(31, 42, 36, .25); margin: 0; }
#het-body .wk-today[hidden] { display: none; }
.wk-strip > .wk-day { flex: 0 0 calc((100% - (var(--wk-n) - 1) * var(--wk-gap)) / var(--wk-n)); } /* nincs „bepattanás” (Andras: darabosnak érződött) — szabad, folyamatos húzás */
.wk-day { background: var(--card); border-radius: 20px; box-shadow: var(--card-shadow); padding: 12px 10px 10px; display: flex; flex-direction: column; gap: 4px;
  height: var(--wk-h, 70vh); overflow: hidden; }
/* a nap neve felül, a víz + „Időpont” alul marad; a középső rész görög, ha sok a teendő */
.wk-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 4px; margin: 0 -6px; padding: 0 6px; }
.wk-day.today { box-shadow: 0 0 0 3px var(--accent), var(--card-shadow); background: color-mix(in srgb, var(--accent-soft) 45%, var(--card)); }
.wk-day.past { opacity: .72; }
.wk-head { display: flex; justify-content: space-between; align-items: baseline; gap: 4px; border-bottom: 2px solid var(--line); padding-bottom: 6px; margin-bottom: 2px; }
.wk-head b { font-family: var(--font-head); font-size: 1.05rem; }
.wk-head span { color: var(--muted); font-weight: 650; font-size: .9rem; }
.wk-day.today .wk-head span { color: var(--accent); }
.wk-day h5 { margin: 8px 0 0; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.wk-row { display: flex; align-items: flex-start; gap: 8px; padding: 5px 0; font-size: .98rem; line-height: 1.3; cursor: pointer; }
.wk-row .jt-chk { width: 28px; height: 28px; border-radius: 9px; flex: none; }
.wk-row.done .wk-t { color: var(--muted); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--muted) 60%, transparent); }
.wk-t { flex: 1; display: flex; flex-direction: column; min-width: 0; overflow-wrap: break-word; hyphens: auto; padding-top: 3px; }
.wk-cnt { align-items: center; cursor: default; }
.wk-cnt .wk-t { flex: 1; padding-top: 0; }
.wk-cnt .cnt-wrap { flex: none; }
.wk-cnt .cnt-btn { min-width: 40px; min-height: 34px; font-size: .8rem; padding: 0 6px !important; }
.wk-water small { font-weight: 500; color: var(--muted); }
.wk-sub { font-size: .75rem; color: var(--muted); }
.wk-late { color: var(--appt); font-style: normal; font-weight: 800; margin-right: 4px; }
.wk-meal { all: unset; cursor: pointer; display: inline-flex; vertical-align: top; align-items: center; gap: 6px; min-width: 0; padding-top: 2px; }
.wk-meal .ph-thumb { width: 30px; height: 30px; border-radius: 8px; flex: none; display: grid; place-items: center; }
.wk-meal .ph-ic { font-size: .9rem; }
.wk-m:not(:has(.jt-chk)) { padding-left: 36px; }
.wk-xtra { cursor: default; }
.wk-ev { align-items: flex-start; }
.wk-x { margin-left: auto; border: 0 !important; background: transparent !important; color: var(--muted); font-size: 1.3rem; line-height: 1; min-width: 36px; min-height: 36px; padding: 0 !important; }
.wk-empty { border: 2px dashed var(--line) !important; background: transparent !important; color: var(--muted); border-radius: 12px !important; min-height: 40px; font-size: .88rem; padding: 4px 8px !important; text-align: left; }
.wk-none { margin: 2px 0; color: var(--muted); }
.wk-foot { margin-top: auto; display: flex; flex-direction: column; gap: 6px; padding-top: 10px; }
.wk-water { display: flex; justify-content: space-between; align-items: center; gap: 6px; min-height: 48px; border-radius: 14px !important; background: color-mix(in srgb, #4AA8E0 14%, var(--card)) !important; border: 0 !important; font-weight: 650; padding: 6px 10px !important; }
.wk-water b { color: #2F86C0; font-size: .85rem; white-space: nowrap; }
.wk-water.full span::after { content: ' ✓'; }
.wk-add { min-height: 44px; border-radius: 12px !important; border: 2px dashed var(--line) !important; background: transparent !important; color: var(--muted); font-weight: 650; font-size: .88rem; }
.wk-evm { display: flex; flex-direction: column; gap: 12px; }
.wk-evm h3 { margin: 0; }
.wk-evm label { display: flex; flex-direction: column; gap: 4px; }
.wk-evm input { font-size: 16px; min-height: 44px; }
/* tableten nagyobb betűk a messzebbről olvasáshoz */
html.tablet main { max-width: none; }
html.tablet #het-body { font-size: 1.04rem; }
/* főzés tableten: szélesebb ablak, két hasáb, nagy betű */
.drawer.cook-wide { width: min(1240px, calc(100vw - 32px)); }
.cook2 { display: grid; grid-template-columns: minmax(260px, 1fr) 2fr; gap: 24px; align-items: start; font-size: 1.12rem; }
.cook2-ing { position: sticky; top: 64px; max-height: calc(100dvh - 140px); overflow: auto; background: var(--bg); border-radius: var(--radius); padding: 12px 14px; }
.cook2-steps { min-width: 0; }

/* ===== 🌐 FIÓK (account.js): belépés, háztartás, visszajelzés, frissítés-jelzés ===== */
body.login-mode > header, body.login-mode > main { display: none; }
.login { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.login-card { width: min(420px, 100%); background: var(--card); border-radius: 28px; box-shadow: var(--card-shadow); padding: 32px 24px; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.login-logo { width: 72px; height: 72px; }
.login-card h1 { margin: 0; font-family: var(--font-head); font-size: 1.6rem; color: var(--accent); }
.login-inv { background: var(--accent-soft); border-radius: var(--radius); padding: 12px 14px; margin: 0; }
.login-g { min-height: 44px; }
.login-dev, .login-choose { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.login-dev input { font-size: 16px; min-height: 44px; }
.login-choose button { min-height: 48px; font-size: 1rem; }
.login-privacy { margin: 6px 0 0; }
.hh-card { gap: 10px; }
.hh-members { display: flex; flex-wrap: wrap; gap: 12px; }
.hh-m { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: .8rem; }
.hh-m img, .hh-m > b { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-size: 1.1rem; }
.hh-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.hh-btns button, .btn-like { min-height: 44px; }
.btn-like { display: inline-flex; align-items: center; padding: 0 14px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); color: var(--text); text-decoration: none; font-weight: 600; }
.hh-invite { display: flex; flex-direction: column; gap: 8px; background: var(--accent-soft); border-radius: var(--radius); padding: 12px; }
.hh-invite input { font-size: 16px; width: 100%; }
.fb-modal { display: flex; flex-direction: column; gap: 10px; }
.fb-modal h3 { margin: 0; }
.fb-modal textarea { font-size: 16px; width: 100%; }
.fb-thumb img { max-width: 160px; max-height: 160px; border-radius: 12px; }
.update-bar { position: fixed; left: 0; right: 0; margin: 0 auto; bottom: calc(96px + env(safe-area-inset-bottom)); z-index: 40; width: min(460px, calc(100vw - 32px));
  display: flex; flex-direction: column; gap: 2px; text-align: left; border: 0 !important; border-radius: 18px !important; padding: 12px 16px !important;
  background: var(--accent) !important; color: #fff !important; box-shadow: 0 10px 30px rgba(31, 42, 36, .3); animation: fadeUp .4s var(--ease-out) both; }
.update-bar span { font-size: .85rem; opacity: .92; }
/* 💬 visszajelzés-gomb a felső sáv jobb szélén (minden oldalon) — telefonon csak az ikon */
.fb-btn { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px !important; border-radius: 99px !important;
  border: 0 !important; background: var(--accent-soft) !important; color: var(--accent) !important; font-weight: 700; font-size: .88rem; }
.fb-btn[hidden] { display: none; }
.fb-btn.fb-update { background: var(--accent) !important; color: #fff !important; animation: fbPulse 1.6s ease-in-out infinite; }
@keyframes fbPulse { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 45%, transparent); } 50% { box-shadow: 0 0 0 7px transparent; } }
@media (max-width: 1100px) { .top { column-gap: 10px; } .fb-btn { min-width: 44px; min-height: 40px; padding: 0 !important; justify-content: center; font-size: 1.15rem; } .fb-btn-t { display: none; } }
/* 🤖 AI-keret: az AI-ablakok alján és az Én oldalon; kevés maradt (< 20%) → narancs */
.ai-meter { margin: 4px 0 0; color: var(--muted); display: flex; flex-direction: column; gap: 5px; }
.ai-meter b { color: var(--text); }
.ai-meter .ai-bar { height: 6px; }
.ai-meter.low b { color: var(--warn); }
.ai-meter.low .ai-bar i { background: var(--warn); }
/* AI-gombok: a jelvény a felirattal egy sorban maradjon (különben magasra nő a gomb) */
.m-actions { flex-wrap: wrap; } /* ha nem fér ki, a gombok törnek új sorba — nem a feliratuk */
.m-actions button { white-space: nowrap; }
.food-modal .m-actions button { flex: 1 1 auto; } .food-modal .m-actions .m-gap { display: none; } /* ha törnek, a sorokat kitöltik */
.m-actions button .ai-badge { vertical-align: middle; }
.ai-card { gap: 8px; }
.ai-left { font-weight: 700; color: var(--accent); }
.ai-card.low .ai-left { color: var(--warn); }
.ai-bar { height: 10px; border-radius: 99px; background: var(--line); overflow: hidden; }
.ai-bar i { display: block; height: 100%; background: linear-gradient(90deg, #A78BFA, #7C5CE0); border-radius: 99px; }
.ai-card.low .ai-bar i { background: var(--warn); }
@media (min-width: 701px) { .update-bar { bottom: 24px; } }

/* ===== 📊 TÁPÉRTÉK FOTÓBÓL (nutriphoto.js) ===== */
.nu-res { display: flex; flex-direction: column; gap: 10px; }
.nu-res h4, .nu-res p { margin: 0; }
.nu-tot { display: flex; flex-direction: column; gap: 2px; background: var(--accent-soft); border-radius: var(--radius); padding: 12px 14px; }
.nu-kcal { font-family: var(--font-head); font-size: 1.5rem; }
.nu-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.nu-list li { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.nu-nm { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.nu-g { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.nu-g input, .nu-w input { width: 76px; font-size: 16px; text-align: right; padding: 8px 10px; }
.nu-kc { grid-column: 1 / -1; color: var(--muted); }
.nu-scale { display: flex; flex-direction: column; gap: 8px; background: var(--card); border-radius: var(--radius); box-shadow: var(--card-shadow); padding: 12px 14px; }
.nu-w { display: inline-flex; align-items: center; gap: 6px; }
.nu-seg { align-self: flex-start; margin: 0; }
.nu-plates { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.nu-plates select { font-size: 16px; max-width: 100%; }
.nu-newp { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.nu-newp input { font-size: 16px; padding: 8px 10px; width: 150px; }
.nu-newp input[data-pg] { width: 100px; }
.nu-tip { margin: 0; }
.nu-log { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.nu-log button { min-height: 44px; }
.nu-logged { color: var(--accent); font-weight: 650; }
.ma-extra { cursor: default; }
.ma-xdel { border: 0 !important; background: transparent !important; color: var(--muted); font-size: 1.5rem; line-height: 1; min-width: 44px; min-height: 44px; padding: 0 !important; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
