/* BudjettiBuffet: tori-teema. Vihreä tausta, puolukanpunaiset toiminnot, voikukankeltaiset korostukset. */
:root {
  --bg: #eef3ea;
  --surface: #ffffff;
  --surface-2: #f5f8f2;
  --ink: #14261c;
  --muted: #566a5e;
  --line: #d9e3d4;
  --leaf: #1d6b47;
  --leaf-deep: #12382b;
  --berry: #c3234a;
  --berry-ink: #ffffff;
  --sun: #f5c431;
  --sun-ink: #3a2c00;
  --blue: #3a4da0;
  --radius-panel: 22px;
  --radius-tile: 18px;
  --radius-ctl: 12px;
  --shadow: 0 1px 2px rgba(20, 38, 28, .06), 0 8px 24px -12px rgba(20, 38, 28, .18);
  --font: "Avenir Next", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Avenir Next", "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1912;
    --surface: #15261c;
    --surface-2: #1a2f23;
    --ink: #e8f1ea;
    --muted: #97ad9f;
    --line: #27402f;
    --leaf: #4fbf86;
    --leaf-deep: #0a2018;
    --berry: #ee5a7c;
    --berry-ink: #1a0610;
    --sun: #f5c431;
    --blue: #8fa0ff;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px -12px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.5 var(--font); -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; margin: 0; letter-spacing: -.015em; }
p { margin: 0; }
button { font: inherit; color: inherit; }
.wrap { max-width: 980px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.fineprint { color: var(--muted); font-size: .8125rem; margin-top: 10px; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }

/* ---------- Hero ---------- */
.skip { position: absolute; left: -999px; top: 8px; background: var(--sun); color: var(--sun-ink); padding: 8px 14px; border-radius: 10px; z-index: 100; font-weight: 700; }
.skip:focus { left: 8px; }
.hero { position: relative; background: radial-gradient(110% 120% at 88% 10%, #24795a 0%, #14402f 45%, var(--leaf-deep) 100%); color: #f1f8f2; overflow: hidden; }
.hero::before, .hero::after { content: ""; position: absolute; border-radius: 50%; pointer-events: none; }
.hero::before { width: 520px; height: 520px; right: -140px; top: -200px; background: radial-gradient(circle, rgba(245, 196, 49, .22), transparent 65%); }
.hero::after { width: 380px; height: 380px; left: -160px; bottom: -180px; background: radial-gradient(circle, rgba(195, 35, 74, .22), transparent 65%); }
.topbar { position: relative; z-index: 2; border-bottom: 1px solid rgba(255, 255, 255, .1); background: rgba(8, 28, 20, .35); backdrop-filter: blur(8px); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 10px; padding-bottom: 10px; }
.topnav { display: flex; align-items: center; gap: 4px; }
.topnav a { color: #cfe3d6; text-decoration: none; font-weight: 600; font-size: .92rem; padding: 8px 12px; border-radius: 10px; }
.topnav a:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.topnav .topnav-cta { background: var(--sun); color: var(--sun-ink); font-weight: 800; }
.topnav .topnav-cta:hover { background: #ffd24d; color: var(--sun-ink); }
@media (max-width: 560px) { .topnav a:not(.topnav-cta) { display: none; } }
.hero-inner { position: relative; z-index: 1; padding-top: 34px; padding-bottom: 64px; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: #f1f8f2; text-decoration: none; }
.brand-mark { width: 42px; height: 42px; flex: none; filter: drop-shadow(0 3px 6px rgba(0, 0, 0, .3)); }
.brand-text { display: grid; line-height: 1.05; }
.brand-text strong { font-family: var(--font-display); font-size: 1.4rem; font-weight: 900; letter-spacing: -.025em; }
.brand-text strong span { color: var(--sun); }
.brand-text small { color: #a9cdb7; font-size: .74rem; font-weight: 600; margin-top: 3px; letter-spacing: .01em; }
.hero-grid { display: grid; gap: 28px; align-items: center; }
@media (min-width: 860px) { .hero-grid { grid-template-columns: 1.2fr .8fr; gap: 40px; } }
.eyebrow { display: inline-block; font-size: .78rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--sun); margin-bottom: 14px; }
.hero h1 { font-size: clamp(2.2rem, 7vw, 4rem); font-weight: 900; letter-spacing: -.035em; line-height: 1.02; max-width: 14ch; }
.hero h1 em { font-style: normal; color: var(--sun); position: relative; white-space: nowrap; }
.hero h1 em::after { content: ""; position: absolute; left: 0; right: 0; bottom: -.08em; height: .14em; background: var(--berry); border-radius: 99px; transform: rotate(-1deg); }
.hero-sub { margin-top: 18px; max-width: 50ch; color: #c5dccd; font-size: 1.08rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.hero-actions .btn { text-decoration: none; }
.pills { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 22px 0 0; }
.pills li { padding: 7px 13px; border-radius: 999px; background: rgba(255, 255, 255, .09); border: 1px solid rgba(255, 255, 255, .16); font-size: .86rem; font-weight: 600; color: #dcebe1; }
.pills b { color: var(--sun); }
.hero-wave { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: 36px; display: block; }

/* Hero-kuvitus: lautanen, kolikko ja kuitti */
.hero-art { position: relative; justify-self: center; width: min(340px, 82vw); aspect-ratio: 1 / .95; }
.plate { position: absolute; left: 0; top: 4%; width: 78%; aspect-ratio: 1; animation: plate-in .7s cubic-bezier(.2, 1.3, .4, 1) both; }
.plate-rim { position: absolute; inset: 0; border-radius: 50%; background: #f4f8f1; box-shadow: 0 26px 44px -14px rgba(0, 0, 0, .6), inset 0 -6px 0 rgba(20, 38, 28, .08); display: grid; place-items: center; }
.plate-well { position: relative; width: 76%; height: 76%; border-radius: 50%; background: #e7f0e2; box-shadow: inset 0 3px 10px rgba(20, 38, 28, .14); }
.plate .f { position: absolute; font-size: clamp(2rem, 8vw, 3.2rem); line-height: 1; filter: drop-shadow(0 4px 5px rgba(0, 0, 0, .25)); animation: pop .5s cubic-bezier(.3, 1.6, .5, 1) both; }
.f1 { left: 14%; top: 22%; animation-delay: .35s; } .f2 { right: 12%; top: 14%; animation-delay: .45s; }
.f3 { right: 16%; bottom: 14%; animation-delay: .55s; } .f4 { left: 16%; bottom: 12%; animation-delay: .65s; }
.f5 { left: 38%; top: 38%; animation-delay: .75s; }
.coin { position: absolute; right: 2%; top: 0; width: 22%; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; font: 900 clamp(1.5rem, 6vw, 2.3rem)/1 Georgia, serif; color: var(--sun-ink); background: radial-gradient(circle at 35% 30%, #ffe27a, var(--sun) 55%, #d69e12); border: 4px solid #fff3c4; box-shadow: 0 10px 20px -6px rgba(0, 0, 0, .5); animation: coin-in .8s .9s cubic-bezier(.3, 1.6, .5, 1) both; }
.receipt { position: absolute; right: 0; bottom: 0; width: 52%; background: #fffdf6; color: #1e2a22; border-radius: 6px 6px 0 0; padding: 12px 12px 18px; font-size: .74rem; box-shadow: 0 18px 30px -12px rgba(0, 0, 0, .55); transform: rotate(4deg); animation: receipt-in .7s 1.05s cubic-bezier(.2, 1.2, .4, 1) both;
  -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / 12px 100%; mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / 12px 100%; }
.receipt-title { font-weight: 800; letter-spacing: .08em; text-transform: uppercase; font-size: .66rem; color: #6b7a70; margin-bottom: 6px; }
.receipt-row, .receipt-total { display: flex; justify-content: space-between; gap: 8px; padding: 3px 0; border-bottom: 1px dashed #d9d4c2; }
.receipt-total { border: 0; border-top: 2px solid #1e2a22; margin-top: 4px; padding-top: 6px; font-weight: 800; font-size: .84rem; }
@keyframes plate-in { from { transform: scale(.6) rotate(-25deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes pop { from { transform: scale(0) rotate(-30deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes coin-in { from { transform: translateY(-40px) rotate(-120deg) scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes receipt-in { from { transform: translateY(40px) rotate(14deg); opacity: 0; } to { transform: rotate(4deg); opacity: 1; } }
@media (max-width: 859px) { .hero-art { width: min(300px, 80vw); margin-top: 4px; } }
body.on-plan .hero-art, body.on-plan .eyebrow, body.on-plan .hero-sub, body.on-plan .hero-actions, body.on-plan .pills, body.on-plan .hero h1 { display: none; }
body.on-plan .hero-inner { padding: 0; }
body.on-plan .hero { padding-bottom: 6px; }
body.on-plan .hero-wave { display: none; }
body.on-plan .brand-text small { display: none; }

main { padding-top: 22px; padding-bottom: 40px; }

/* ---------- Lomake ---------- */
.form { display: grid; gap: 18px; }
.panel { background: var(--surface); border-radius: var(--radius-panel); box-shadow: var(--shadow); padding: 22px 20px; }
.panel + .panel { margin-top: 16px; }
.form .panel + .panel { margin-top: 0; }
.panel-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 18px; }
.panel-icon { flex: none; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 1.5rem; background: var(--surface-2); border: 1px solid var(--line); }
.panel-head h2 { font-size: 1.35rem; font-weight: 800; }
.panel-head p { margin-top: 4px; font-size: .95rem; }
.group + .group { margin-top: 24px; }
.group > .chips + .input-unit, .group > .chips + .input, .group > .chips + .budget-rows { margin-top: 16px; }
.group > .input-unit + .chips, .group > .input + .chips { margin-top: 12px; }
.group > .input + .input, .group > select + .input, .group > .input + select, .group > .input-unit + .input { margin-top: 12px; }
.group > .chips + .hint, .group > .input-unit + .hint, .group > .budget-rows + .hint { margin-top: 12px; }
.panel-body > * + .group { margin-top: 24px; }
.panel-body > .chips + .chips { margin-top: 14px; }
.group .row { margin-top: 4px; }
.form-tools { display: flex; justify-content: flex-end; }
.label { font-weight: 700; margin-bottom: 8px; }
.hint { color: var(--muted); font-size: .875rem; margin: 4px 0 10px; }
.two { display: grid; gap: 20px; grid-template-columns: 1fr; margin-bottom: 20px; }
@media (min-width: 720px) { .two { grid-template-columns: 1fr 1fr; } .panel { padding: 26px 28px; } }

.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 640px) { .tiles { grid-template-columns: repeat(4, 1fr); } }
.tile {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px 8px 14px; cursor: pointer;
  background: var(--surface-2); border: 2px solid var(--line); border-radius: var(--radius-tile);
  transition: transform .12s, border-color .12s, background .12s;
}
.tile:hover { transform: translateY(-2px); }
.tile-emoji { font-size: 2.2rem; line-height: 1; }
.tile strong { font-size: .95rem; }
.tile[aria-pressed="true"] { background: var(--sun); border-color: var(--sun); color: var(--sun-ink); }

.counts { margin: 18px 0 4px; display: grid; gap: 10px; }
@media (min-width: 720px) { .counts { grid-template-columns: 1fr 1fr; } }
.count-card { display: grid; gap: 10px; padding: 14px 16px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 16px; }
.count-name { font-weight: 800; font-size: 1.05rem; display: flex; gap: 8px; align-items: center; }
.count-ctrl { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.count-sub { color: var(--muted); font-size: .875rem; font-weight: 600; }
.count-total { color: var(--leaf); font-weight: 700; font-size: .85rem; border-top: 1px dashed var(--line); padding-top: 8px; }
.budget-rows { display: grid; gap: 8px; margin-top: 10px; }
.budget-row { display: grid; grid-template-columns: minmax(96px, 120px) 1fr; gap: 10px; align-items: center; }
.budget-name { display: flex; gap: 6px; align-items: center; font-weight: 700; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips.tight { margin-top: 10px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; border-radius: 999px; cursor: pointer;
  border: 1.5px solid var(--line); background: var(--surface); font-weight: 600; font-size: .9375rem;
  transition: background .12s, border-color .12s, transform .12s;
}
.chip:hover { border-color: var(--leaf); }
.chip-icon { font-size: 1.05rem; line-height: 1; }
.chip[aria-pressed="true"] { background: var(--leaf); border-color: var(--leaf); color: #fff; }
@media (prefers-color-scheme: dark) { .chip[aria-pressed="true"] { color: #04140c; } }

.input {
  width: 100%; min-height: 46px; padding: 10px 14px; border-radius: var(--radius-ctl); border: 1.5px solid var(--line);
  background: var(--surface); color: var(--ink); font: inherit;
}
.input:focus { border-color: var(--leaf); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--leaf) 25%, transparent); }
.input-unit { position: relative; }
.input-unit .input { padding-right: 54px; }
.input-unit span { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 600; pointer-events: none; }
.row { display: flex; gap: 8px; flex-wrap: wrap; }
.row .input { flex: 1 1 180px; width: auto; }

.stepper { display: inline-flex; align-items: center; gap: 4px; background: var(--surface); border: 1.5px solid var(--line); border-radius: 999px; padding: 3px; }
.stepper-value { min-width: 2.2ch; text-align: center; font-weight: 800; font-size: 1.1rem; }

.goal-grid { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .goal-grid { grid-template-columns: 1fr 1fr; } }
.choice {
  display: grid; grid-template-columns: auto 1fr; column-gap: 14px; align-items: center; text-align: left; cursor: pointer;
  padding: 14px 16px; background: var(--surface-2); border: 2px solid var(--line); border-radius: var(--radius-tile);
}
.choice-emoji { grid-row: span 2; font-size: 1.9rem; }
.choice strong { font-size: 1rem; }
.choice span:last-child { color: var(--muted); font-size: .875rem; }
.choice[aria-pressed="true"] { border-color: var(--berry); background: color-mix(in srgb, var(--berry) 9%, var(--surface)); }
.choice[aria-pressed="true"] strong::after { content: "  ✓"; color: var(--berry); }

/* ---------- Painikkeet ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 46px; padding: 0 20px;
  border-radius: var(--radius-ctl); border: 1.5px solid var(--line); background: var(--surface); font-weight: 700; cursor: pointer;
  transition: transform .1s, filter .1s;
}
.btn:hover { filter: brightness(.97); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .35; cursor: default; }
.btn.primary { background: var(--berry); border-color: var(--berry); color: var(--berry-ink); }
.btn.big { min-height: 54px; padding: 0 28px; font-size: 1.05rem; border-radius: 16px; }
.btn.ghost { background: transparent; }
.btn.light { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .35); color: #fff; }
.btn.small { min-height: 40px; padding: 0 16px; font-size: .9rem; }
.btn.icon { min-height: 38px; min-width: 38px; padding: 0; border-radius: 999px; font-size: 1.2rem; border-color: transparent; background: var(--surface-2); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.link { background: none; border: 0; color: var(--muted); text-decoration: underline; cursor: pointer; padding: 0; }

.cta-bar { position: sticky; bottom: 0; z-index: 5; margin: 0 -16px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-top: 1px solid var(--line); }
.cta-inner { max-width: 980px; margin: 0 auto; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.cta-text { display: grid; flex: 1 1 160px; }
.cta-text span { color: var(--muted); font-size: .85rem; }
@media (max-width: 520px) { .cta-inner .btn.big { flex: 1 1 100%; } .cta-text { display: none; } }

/* ---------- Yhteenveto ---------- */
.summary { background: var(--leaf-deep); color: #eef7f0; border-radius: var(--radius-panel); padding: 22px 20px; box-shadow: var(--shadow); }
.summary-head h2 { font-size: 1.6rem; font-weight: 850; }
.summary-head p { color: #b6cfbf; margin-top: 4px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 18px 0 8px; }
.stat { display: grid; gap: 2px; background: rgba(255, 255, 255, .08); border-radius: 16px; padding: 14px 12px; }
.stat-icon { font-size: 1.3rem; }
.stat strong { font-size: clamp(1rem, 4.2vw, 1.6rem); font-weight: 850; white-space: nowrap; }
@media (max-width: 480px) { .stats { gap: 8px; } .stat { padding: 12px 10px; } }
.stat span:last-child { color: #b6cfbf; font-size: .78rem; line-height: 1.25; }
.bar { height: 10px; border-radius: 99px; background: rgba(255, 255, 255, .15); overflow: hidden; margin-top: 12px; }
.bar div { height: 100%; background: var(--sun); border-radius: 99px; }
.bar.over div { background: #ff7a8e; }
.notice { margin-top: 12px; padding: 10px 14px; border-radius: 12px; background: rgba(245, 196, 49, .18); border: 1px solid rgba(245, 196, 49, .5); font-size: .9rem; }
.summary-note { margin-top: 10px; color: #b6cfbf; font-size: .9rem; }
.summary .fineprint { color: #8fb09b; }
.panel .notice { color: var(--ink); }

.tabs { display: flex; gap: 6px; margin: 18px 0 6px; padding: 5px; background: var(--surface); border-radius: 16px; box-shadow: var(--shadow); position: sticky; top: 8px; z-index: 4; }
.tabs button { flex: 1; min-height: 44px; border: 0; background: transparent; border-radius: 12px; font-weight: 700; cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--berry); color: var(--berry-ink); }

/* ---------- Ruokakortit ---------- */
.meal-group { margin-top: 24px; }
.group-title { font-size: 1.5rem; font-weight: 850; display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.meal-grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 820px) { .meal-grid { grid-template-columns: 1fr 1fr; } }
.meal { background: var(--surface); border-radius: var(--radius-panel); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; }
.meal-body { padding: 16px 18px 18px; display: grid; gap: 8px; flex: 1; align-content: start; }
.meal-head { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: .875rem; font-weight: 600; }
.meal h3 { font-size: 1.25rem; font-weight: 800; }
.meal-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-weight: 600; font-size: .9rem; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { padding: 3px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-size: .78rem; font-weight: 600; color: var(--muted); }
.meal .actions { margin-top: 6px; }

/* Kuvitettu ruokakuva: keittiön väri + annoksen emoji */
.art {
  position: relative; display: grid; place-items: center; overflow: hidden; isolation: isolate;
  background:
    radial-gradient(circle at 20% 25%, rgba(255, 255, 255, .28) 0 14%, transparent 15%),
    radial-gradient(circle at 85% 80%, rgba(0, 0, 0, .16) 0 22%, transparent 23%),
    linear-gradient(135deg, hsl(var(--h) 72% 54%), hsl(calc(var(--h) + 38) 70% 36%));
}
.art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card-art { height: 150px; }
.art-main { font-size: 4.4rem; line-height: 1; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .3)); transform: rotate(-6deg); }
.art-side { position: absolute; left: 12px; bottom: 10px; display: flex; gap: 4px; }
.art-side i { font-style: normal; font-size: 1.15rem; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: rgba(255, 255, 255, .86); box-shadow: 0 2px 6px rgba(0, 0, 0, .2); }
.dlg-art-inner { height: 190px; }
.dlg-art-inner .art-main { font-size: 5.6rem; }

/* Aterioittaiset kustannukset */
.type-costs { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 10px; }
.type-costs li { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; }
.tc-name { display: flex; gap: 8px; align-items: center; font-weight: 700; }
.tc-val { font-weight: 800; }
.type-costs li.over .tc-val { color: #ff9aa9; }
.type-costs .bar { grid-column: 1 / -1; margin-top: 2px; height: 8px; }

/* Valitse itse -ikkuna */
.dlg-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.dlg-top h2 { font-size: 1.35rem; }
.btn.icon.inline { position: static; background: var(--surface-2); color: var(--ink); }
.pick-count { font-size: .85rem; }
.pick-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; max-height: min(58vh, 520px); overflow: auto; }
.pick-row { display: grid; grid-template-columns: 54px 1fr auto; gap: 12px; align-items: center; width: 100%; text-align: left; padding: 8px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); cursor: pointer; }
.pick-row:hover { border-color: var(--leaf); background: var(--surface-2); }
.pick-art { width: 54px; height: 54px; border-radius: 12px; }
.pick-art .art-main { font-size: 1.9rem; transform: none; }
.pick-art .art-side { display: none; }
.pick-main { display: grid; gap: 2px; min-width: 0; }
.pick-main strong { overflow-wrap: anywhere; }
.pick-main .muted { font-size: .8rem; }
.pick-cost { text-align: right; font-weight: 800; white-space: nowrap; }
.pick-cost small { display: block; font-weight: 500; color: var(--muted); font-size: .72rem; }

/* Esittely- ja UKK-osiot (myös hakukoneille) */
.about { padding: 44px 0 8px; }
.about h2 { font-size: clamp(1.5rem, 4vw, 2rem); font-weight: 850; margin-bottom: 18px; }
.how { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
@media (min-width: 760px) { .how { grid-template-columns: repeat(3, 1fr); } }
.how li { background: var(--surface); border-radius: var(--radius-panel); box-shadow: var(--shadow); padding: 20px; display: grid; gap: 6px; align-content: start; }
.how-n { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--berry); color: var(--berry-ink); font-weight: 900; margin-bottom: 4px; }
.how h3 { font-size: 1.15rem; }
.how p { color: var(--muted); }
.faq details { background: var(--surface); border-radius: 16px; box-shadow: var(--shadow); padding: 4px 18px; margin-bottom: 10px; }
.faq summary { cursor: pointer; font-weight: 700; padding: 14px 0; }
.faq details p { color: var(--muted); padding-bottom: 14px; }
body.on-plan .about { display: none; }

/* ---------- Ostoslista ---------- */
.aisle + .aisle { margin-top: 20px; }
.aisle h3 { font-size: 1.05rem; font-weight: 800; display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.shop { list-style: none; margin: 0; padding: 0; }
.shop li { border-bottom: 1px solid var(--line); }
.shop li:last-child { border-bottom: 0; }
.shop label { display: grid; grid-template-columns: auto auto 1fr auto; gap: 12px; align-items: center; padding: 10px 2px; cursor: pointer; }
.shop input { width: 22px; height: 22px; accent-color: var(--leaf); }
.shop-emoji { font-size: 1.4rem; }
.shop .qty { text-align: right; font-weight: 700; }
.shop .qty small { display: block; color: var(--muted); font-weight: 500; font-size: .75rem; }
.shop li.done .name, .shop li.done .shop-emoji { text-decoration: line-through; opacity: .45; }
.total { display: flex; justify-content: space-between; padding-top: 16px; margin-top: 12px; border-top: 2px solid var(--ink); font-weight: 850; font-size: 1.2rem; }
.pantry-title { font-size: 1.05rem; margin-bottom: 8px; }
.pantry { color: var(--muted); }

/* ---------- Reseptiikkuna ---------- */
dialog { border: 0; padding: 0; border-radius: 24px; width: min(640px, calc(100vw - 20px)); max-height: calc(100vh - 20px); background: var(--surface); color: var(--ink); box-shadow: 0 30px 80px rgba(0, 0, 0, .45); }
dialog::backdrop { background: rgba(8, 20, 14, .6); backdrop-filter: blur(3px); }
.dlg-art { position: relative; }
.dlg-art .close { position: absolute; top: 12px; right: 12px; background: rgba(255, 255, 255, .9); color: #14261c; }
.dlg-body { padding: 20px 22px 24px; display: grid; gap: 10px; }
.dlg-body h2 { font-size: 1.7rem; font-weight: 850; }
.dlg-body h3 { margin-top: 12px; font-size: 1.1rem; }
.ingr { list-style: none; margin: 0; padding: 0; }
.ingr li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.ingr-name { display: flex; gap: 10px; align-items: center; }
.steps-list { margin: 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 10px; }
.steps-list li { counter-increment: s; display: grid; grid-template-columns: 30px 1fr; gap: 12px; align-items: start; }
.steps-list li::before { content: counter(s); width: 30px; height: 30px; border-radius: 50%; background: var(--sun); color: var(--sun-ink); font-weight: 800; display: grid; place-items: center; }

.empty { text-align: center; padding: 38px 20px; }
.empty-emoji { font-size: 3.4rem; }
.empty h2 { margin: 8px 0; }
.empty .actions { justify-content: center; }

#toast { position: fixed; left: 50%; bottom: 90px; transform: translate(-50%, 20px); background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 14px; opacity: 0; pointer-events: none; transition: .2s; z-index: 50; max-width: calc(100vw - 32px); }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.foot-links a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
.foot-links a:hover { color: var(--ink, inherit); }
.foot { padding-top: 12px; padding-bottom: 36px; color: var(--muted); font-size: .8125rem; display: grid; gap: 8px; }

@media (prefers-reduced-motion: reduce) {
  .plate, .plate .f, .coin, .receipt { animation: none; }
  * { transition: none !important; }
}
@media print {
  .hero, .about, .cta-bar, .tabs, .actions, .foot, #toast { display: none !important; }
  body { background: #fff; color: #000; }
  .panel, .summary, .meal { box-shadow: none; border: 1px solid #ccc; }
  .summary { background: #fff; color: #000; }
  .stat { background: #f2f2f2; }
  .stat span:last-child, .summary-head p { color: #333; }
}

/* Ostoslistan sähköpostilähetys */
.mail-ov { position: fixed; inset: 0; background: rgba(10, 30, 22, .55); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 60; }
.mail-box { background: var(--card, #fff); color: var(--ink); border-radius: 18px; padding: 22px; width: 100%; max-width: 440px; box-shadow: 0 10px 40px rgba(0, 0, 0, .3); }
.mail-box h3 { margin: 0 0 8px; }
.mail-input { width: 100%; min-height: 46px; margin: 14px 0 6px; padding: 0 14px; border: 1.5px solid var(--line, #c9d6cc); border-radius: 12px; font: inherit; background: #fff; color: var(--ink); }
.mail-box .actions { margin-top: 12px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.mk-row { display: flex; gap: 10px; align-items: flex-start; font-size: .85rem; color: var(--muted); margin: 6px 0; cursor: pointer; }
.mk-row input { margin-top: 3px; flex: none; width: 18px; height: 18px; }
