/* KetoAvocado iššūkis. Spalvos – tik iš ketoavocado-theme :root tokenų. */
:root {
  --ink: #123522; --forest: #17462c; --green: #69a925; --lime: #d8ef6c; --cream: #fbf8ed; --paper: #fffdf7; --orange: #f47945;
  --line: rgba(18, 53, 34, .14); --shadow: 0 18px 50px rgba(25, 67, 39, .12);
  --muted: color-mix(in srgb, var(--ink) 62%, var(--cream));
  --lime-soft: color-mix(in srgb, var(--lime) 34%, var(--paper));
  --orange-soft: color-mix(in srgb, var(--orange) 14%, var(--paper));
  --serif: Georgia, "Times New Roman", serif;
  /* suderinama su ankstesniais pavadinimais */
  --bg: var(--cream); --card: var(--paper); --green2: var(--forest); --lime2: var(--lime-soft); --yolk: var(--orange); --yolk2: var(--orange-soft); --red: #b8442a; --r: 22px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--cream); color: var(--ink); font: 16px/1.5 "Avenir Next", Avenir, "Segoe UI", sans-serif; }
body { min-height: 100dvh; }
body::before { content: ""; position: fixed; inset: 0; pointer-events: none; opacity: .03; z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E"); }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
h1, h2 { font-family: var(--serif); font-weight: 700; letter-spacing: -.04em; line-height: 1; }
h3 { font-family: var(--serif); font-size: 1.15rem; line-height: 1.15; letter-spacing: -.02em; }
a { color: var(--forest); }
#app { position: relative; z-index: 1; max-width: 520px; margin: 0 auto; padding: 0 18px calc(104px + env(safe-area-inset-bottom)); }
.splash { width: 96px; margin: 34vh auto 0; animation: bob 1.6s ease-in-out infinite; }
.splash img { width: 100%; display: block; }
@keyframes bob { 50% { transform: translateY(-8px) rotate(-3deg); } }

/* Ikonos */
.avo { width: 1em; height: 1.3em; flex: none; vertical-align: -.28em; --avo-skin: #2c6a2a; --avo-mid: #86b83a; --avo-flesh: #eef3b2; --avo-pit: #9a4a1c; --avo-face: 1; }
.avo.plain { --avo-face: 0; }
.avo.off { --avo-skin: color-mix(in srgb, var(--ink) 22%, var(--cream)); --avo-mid: color-mix(in srgb, var(--ink) 12%, var(--cream)); --avo-flesh: var(--cream); --avo-pit: color-mix(in srgb, var(--ink) 16%, var(--cream)); --avo-face: 0; }
.ic { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* Viršus */
.brandbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 0 0; }
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; color: var(--ink); }
.brand img { width: 40px; height: 40px; border-radius: 50%; background: var(--paper); }
.brand-name { font-family: var(--serif); font-weight: 700; font-size: 1.12rem; letter-spacing: -.03em; line-height: 1; }
.brand-name span { color: var(--green); }
.brand-tag { display: block; font-size: .6rem; font-weight: 900; text-transform: uppercase; letter-spacing: .19em; opacity: .62; margin-top: 4px; }
.top { padding: 22px 0 8px; }
.top h1 { font-size: clamp(2.3rem, 10.5vw, 3rem); letter-spacing: -.055em; line-height: .95; overflow-wrap: anywhere; }
.eyebrow, .top .sub, .section { display: flex; align-items: center; gap: 9px; text-transform: uppercase; letter-spacing: .14em; font-size: .7rem; font-weight: 900; }
.top .sub { color: var(--green); margin-bottom: 10px; }
.section { color: var(--ink); margin: 30px 2px 4px; }
.section::before, .top .sub::before { content: ""; width: 18px; height: 2px; background: currentColor; border-radius: 2px; }
.chips { display: flex; gap: 7px; flex: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px 6px 9px; font-weight: 900; font-size: .9rem; font-variant-numeric: tabular-nums; }
.chip.fire::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--orange); }
.chip.fire { padding-left: 11px; }

/* Kortelės */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; margin: 12px 0; }
.card h2 { font-size: 1.5rem; margin-bottom: 10px; }
.muted { color: var(--muted); font-size: .9rem; }
.small { font-size: .8rem; }
.row { display: flex; align-items: center; gap: 12px; }
.grow { flex: 1; min-width: 0; }
.center { text-align: center; }
.banner { background: var(--lime-soft); border-color: color-mix(in srgb, var(--lime) 70%, var(--ink) 8%); }
.warn { background: var(--orange-soft); border-color: color-mix(in srgb, var(--orange) 35%, var(--paper)); }

.hero { position: relative; background: var(--forest); color: #fff; border: 0; border-radius: 30px; padding: 24px 22px 22px; margin-top: 16px; box-shadow: var(--shadow); }
.hero .eyebrow { color: var(--lime); }
.hero h2 { font-size: clamp(1.9rem, 8.4vw, 2.4rem); line-height: .98; margin: 12px 0 8px; max-width: 78%; }
.hero.plain h2 { max-width: none; }
.hero .muted { color: rgba(255, 255, 255, .74); }
.hero b { color: var(--lime); }
.sticker { position: absolute; right: -8px; top: -18px; width: 92px; height: 92px; border-radius: 50%; display: grid; place-content: center; text-align: center; background: var(--orange); color: #fff; transform: rotate(9deg); box-shadow: 0 13px 31px rgba(63, 56, 22, .2); line-height: .95; }
.sticker b { display: block; font-family: var(--serif); font-size: 2.1rem; letter-spacing: -.05em; color: #fff; }
.sticker span { font-size: .6rem; font-weight: 900; text-transform: uppercase; letter-spacing: .09em; }

/* Savaitė – septyni avokadai */
.days { display: flex; justify-content: space-between; align-items: flex-end; margin-top: 20px; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, .16); }
.day { display: grid; justify-items: center; gap: 5px; font-size: .62rem; font-weight: 900; letter-spacing: .08em; color: rgba(255, 255, 255, .55); }
.day .avo { width: 30px; height: 39px; --avo-skin: rgba(255, 255, 255, .26); --avo-mid: rgba(255, 255, 255, .13); --avo-flesh: rgba(255, 255, 255, .1); --avo-pit: rgba(255, 255, 255, .22); --avo-face: 0; transition: transform .25s; }
.day.full .avo { --avo-skin: #2c6a2a; --avo-mid: #86b83a; --avo-flesh: #eef3b2; --avo-pit: #9a4a1c; --avo-face: 1; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .25)); }
.day.part .avo { --avo-skin: #2c6a2a; --avo-mid: #86b83a; --avo-flesh: #eef3b2; --avo-pit: rgba(154, 74, 28, .35); }
.day.today, .day.full.is-today, .day.part.is-today { color: var(--lime); }
.day.is-today .avo { transform: scale(1.22); transform-origin: bottom center; }
.day.future { opacity: .5; }

/* Užduotys */
.task { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; margin: 10px 0; cursor: pointer; transition: transform .1s, background .25s, border-color .25s; }
.task:active { transform: scale(.985); }
.task .check { flex: none; width: 32px; height: 32px; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--ink) 28%, var(--cream)); display: grid; place-items: center; color: transparent; transition: all .2s; }
.task .check .ic { width: 18px; height: 18px; stroke-width: 3; }
.task.done { background: var(--lime-soft); border-color: color-mix(in srgb, var(--lime) 70%, var(--ink) 8%); }
.task.done .check { background: var(--forest); border-color: var(--forest); color: var(--lime); }
.task .cat { display: block; font-size: .62rem; font-weight: 900; text-transform: uppercase; letter-spacing: .14em; color: var(--green); margin-bottom: 3px; }
.task .cat.new { color: var(--orange); }
.task .t { font-family: var(--serif); font-weight: 700; font-size: 1.18rem; line-height: 1.12; letter-spacing: -.025em; }
.task.done .t { opacity: .6; }
.task .d { color: var(--muted); font-size: .85rem; margin-top: 5px; line-height: 1.4; }
.task .p { flex: none; font-weight: 900; font-size: .78rem; color: var(--ink); background: var(--lime); border-radius: 999px; padding: 4px 10px; font-variant-numeric: tabular-nums; }
.task .go { flex: none; color: var(--muted); }
.task .avatar { background: var(--lime-soft); color: var(--forest); }

/* Formos */
label { display: block; font-size: .7rem; font-weight: 900; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 14px 0 6px; }
input, select, textarea { width: 100%; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 13px 14px; outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--forest); box-shadow: 0 0 0 3px color-mix(in srgb, var(--lime) 55%, transparent); }
label.checkline { display: flex; gap: 10px; align-items: flex-start; text-transform: none; letter-spacing: 0; font-weight: 500; font-size: .85rem; color: var(--ink); line-height: 1.4; }
label.checkline input { width: 20px; height: 20px; flex: none; margin-top: 1px; accent-color: var(--forest); padding: 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 52px; border: 1px solid transparent; border-radius: 14px; padding: 14px 20px; font-weight: 900; background: var(--forest); color: #fff; cursor: pointer; text-decoration: none; transition: transform .2s, background .2s; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .45; }
.btn.alt { background: var(--lime); color: var(--ink); }
.btn.ghost { background: rgba(255, 255, 255, .48); color: var(--ink); border-color: var(--line); }
.btn.yolk { background: var(--orange); color: #fff; }
.btn.sm { width: auto; min-height: 0; padding: 10px 15px; font-size: .85rem; border-radius: 12px; }
.link { background: none; border: 0; color: var(--forest); font-weight: 900; font-size: .85rem; cursor: pointer; padding: 10px 4px; text-decoration: underline; text-decoration-color: var(--lime); text-decoration-thickness: 3px; text-underline-offset: 3px; }
.link.danger { color: var(--red); text-decoration-color: var(--orange-soft); }
.seg { display: flex; background: color-mix(in srgb, var(--ink) 7%, var(--cream)); border-radius: 14px; padding: 4px; }
.seg button { flex: 1; border: 0; background: transparent; border-radius: 11px; padding: 9px 6px; font-weight: 900; font-size: .8rem; color: var(--muted); cursor: pointer; }
.seg button.on { background: var(--forest); color: #fff; }

/* Prisijungimas */
.auth { min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; padding: 28px 2px; }
.auth .mascot { width: 150px; margin: 0 0 10px -12px; display: block; }
.auth h1 { font-size: clamp(2.9rem, 13vw, 3.6rem); letter-spacing: -.065em; line-height: .88; margin: 12px 0 14px; }
.auth h1 em { font-style: normal; color: var(--green); }
.auth p.lead { color: var(--muted); font-size: 1.05rem; margin-bottom: 20px; max-width: 30ch; }
.auth .eyebrow { color: var(--green); }
.pin { letter-spacing: .5em; text-align: center; font-size: 1.7rem; font-weight: 900; padding-left: calc(14px + .5em); }
.proof { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); font-size: .68rem; font-weight: 900; letter-spacing: .07em; text-transform: uppercase; }
.proof span::before { content: "✓ "; color: var(--green); }

/* Navigacija */
nav.tabs { position: fixed; left: 0; right: 0; bottom: 0; background: color-mix(in srgb, var(--paper) 94%, transparent); backdrop-filter: blur(12px); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); z-index: 10; }
nav.tabs .in { max-width: 520px; margin: 0 auto; display: flex; padding: 6px 8px; }
nav.tabs button { flex: 1; display: grid; justify-items: center; gap: 3px; border: 0; background: none; padding: 4px 0; font-size: .62rem; font-weight: 900; letter-spacing: .04em; color: var(--muted); cursor: pointer; position: relative; }
nav.tabs button i { display: grid; place-items: center; width: 52px; height: 32px; border-radius: 999px; transition: background .2s; }
nav.tabs button.on { color: var(--ink); }
nav.tabs button.on i { background: var(--lime); }
.dot { position: absolute; top: 0; left: 50%; margin-left: 10px; min-width: 18px; height: 18px; border-radius: 99px; background: var(--orange); color: #fff; font-size: .68rem; line-height: 18px; padding: 0 4px; }

/* Sąrašai */
.list .li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.list .li:last-child { border-bottom: 0; }
.list .li.me { background: var(--lime-soft); margin: 0 -10px; padding: 11px 10px; border-radius: 14px; border-bottom-color: transparent; }
.rank { flex: none; width: 30px; text-align: center; font-family: var(--serif); font-weight: 700; font-size: 1.2rem; color: var(--muted); }
.rank.top { color: var(--orange); }
.avatar { flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--lime); color: var(--ink); display: grid; place-items: center; font-family: var(--serif); font-weight: 700; font-size: 1.1rem; }
.num { font-weight: 900; font-variant-numeric: tabular-nums; }

/* Statistika */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 16px 0 12px; }
.stat { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 14px 8px; text-align: center; }
.stat b { display: block; font-family: var(--serif); font-size: 1.7rem; letter-spacing: -.04em; line-height: 1.05; }
.stat span { font-size: .62rem; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.kcal { font-family: var(--serif); font-weight: 700; font-size: 3.2rem; letter-spacing: -.06em; line-height: .9; }
.kcal small { font-family: "Avenir Next", Avenir, sans-serif; font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 900; color: var(--green); }
.macros { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.macro { border-radius: 16px; padding: 12px 8px; text-align: center; background: var(--lime-soft); }
.macro b { display: block; font-family: var(--serif); font-size: 1.35rem; letter-spacing: -.03em; }
.macro span { font-size: .62rem; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; }
.heat { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-top: 10px; }
.heat i { aspect-ratio: 1; border-radius: 50%; background: color-mix(in srgb, var(--ink) 8%, var(--cream)); }
.heat i.l1 { background: var(--lime); } .heat i.l2 { background: var(--green); } .heat i.l3 { background: var(--forest); } .heat i.pre { opacity: .35; }
.badges { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px 8px; margin-top: 12px; }
.badge { text-align: center; font-size: .66rem; font-weight: 700; color: var(--ink); line-height: 1.2; }
.badge .avo { display: block; width: 40px; height: 52px; margin: 0 auto 6px; }
.badge.off { color: var(--muted); font-weight: 500; }
svg.chart { width: 100%; height: 150px; display: block; margin-top: 8px; }

/* Receptai */
.recipes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.recipe { background: var(--paper); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; text-decoration: none; color: inherit; display: block; }
.recipe .img { aspect-ratio: 4/3; background: var(--lime-soft) center/cover; display: grid; place-items: center; }
.recipe .img .avo { width: 34px; height: 44px; }
.recipe .meta { padding: 11px 13px 14px; display: grid; gap: 5px; }
.recipe .cat { font-size: .58rem; font-weight: 900; text-transform: uppercase; letter-spacing: .14em; color: var(--green); }
.recipe b { font-family: var(--serif); font-size: 1rem; line-height: 1.12; letter-spacing: -.02em; }

/* Pasiūlymas */
.pkg { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 18px; padding: 16px; margin: 10px 0; text-decoration: none; color: inherit; background: #fff; position: relative; }
.pkg b { font-family: var(--serif); font-size: 1.15rem; letter-spacing: -.02em; }
.pkg.best { border: 2px solid var(--forest); background: var(--lime-soft); }
.pkg .price { font-family: var(--serif); font-size: 1.8rem; font-weight: 700; letter-spacing: -.05em; }
.pkg .flag { position: absolute; top: -11px; right: 14px; background: var(--orange); color: #fff; font-size: .6rem; font-weight: 900; text-transform: uppercase; letter-spacing: .1em; border-radius: 999px; padding: 4px 10px; transform: rotate(3deg); }
.save { color: var(--green); font-weight: 900; }

/* Žinutės */
.chat { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; }
.msg { max-width: 84%; padding: 11px 15px; border-radius: 20px; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.me { align-self: flex-end; background: var(--forest); color: #fff; border-bottom-right-radius: 6px; }
.msg.adm { align-self: flex-start; background: var(--paper); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.msg time { display: block; font-size: .68rem; opacity: .6; margin-top: 4px; }
.composer { display: flex; gap: 8px; align-items: flex-end; }
.composer textarea { resize: none; }

/* Pranešimai */
#toasts { position: fixed; top: 14px; left: 0; right: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; z-index: 50; pointer-events: none; }
.toast { background: var(--ink); color: #fff; border-radius: 999px; padding: 11px 20px; font-weight: 900; font-size: .88rem; box-shadow: var(--shadow); animation: drop .25s ease-out; max-width: 92vw; }
.toast.pts { background: var(--lime); color: var(--ink); }
.toast.err { background: var(--red); }
@keyframes drop { from { transform: translateY(-20px); opacity: 0; } }
.confetti { position: fixed; top: -20px; width: 12px; height: 16px; border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%; z-index: 40; pointer-events: none; animation: fall 1.7s ease-in forwards; }
@keyframes fall { to { transform: translateY(108vh) rotate(540deg); opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .confetti { display: none; } .splash { animation: none; } }
