/* ═══════════════════════════════════════════════════════════
   Gerichte mit Genuss – Design: Basilikum-Grün + Weiß, Zitronengelb als Akzent
   Mobile first.
   ═══════════════════════════════════════════════════════════ */
:root {
  --basil-950: #0E3322;
  --basil-900: #12402A;
  --basil-700: #1F5E3B;
  --basil-500: #2E7D4F;
  --basil-300: #86C09A;
  --basil-100: #DDEFE3;
  --basil-50: #F2F9F4;
  --white: #FFFFFF;
  --lemon: #F2C94C;
  --lemon-soft: #FBEFC1;
  --ink: #14231A;
  --muted: #5C7165;
  --line: #E0EBE4;
  --danger: #D2452F;
  --shadow-s: 0 2px 10px rgba(18, 64, 42, .08);
  --shadow-m: 0 10px 30px rgba(18, 64, 42, .14);
  --shadow-l: 0 24px 60px rgba(14, 51, 34, .28);
  --r-s: 14px; --r-m: 22px; --r-l: 32px;
  --ease: cubic-bezier(.22, .8, .24, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --sab: env(safe-area-inset-bottom, 0px);
  --sat: env(safe-area-inset-top, 0px);
  --tabbar-h: 72px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; margin: 0; }
body {
  font-family: var(--sans); color: var(--ink); background: var(--basil-50);
  -webkit-font-smoothing: antialiased; overscroll-behavior: none;
}
[hidden] { display: none !important; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; padding: 0; touch-action: manipulation; }
input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; margin: 0; letter-spacing: -.01em; }
em { font-style: italic; color: var(--basil-500); }
p { margin: 0; }

/* ───────── App-Rahmen ───────── */
#app {
  position: relative; width: 100%; max-width: 480px; height: 100dvh; margin: 0 auto;
  background: var(--white); overflow: hidden; isolation: isolate;
}
@media (min-width: 520px) {
  body { display: grid; place-items: center; background: radial-gradient(circle at 20% 10%, var(--basil-100), var(--basil-50) 60%); }
  #app { height: min(900px, 96dvh); border-radius: 38px; box-shadow: var(--shadow-l); }
}

/* ───────── Splash ───────── */
#splash {
  position: fixed; inset: 0; z-index: 200; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 38%, var(--basil-500), var(--basil-900) 70%);
  color: #fff; transition: transform .8s var(--ease), opacity .6s;
}
#splash.done { transform: translateY(-100%); opacity: .6; pointer-events: none; }
.splash-inner { display: grid; justify-items: center; gap: 14px; text-align: center; }
.splash-mark { width: 120px; height: 120px; overflow: visible; }
.draw { stroke-dasharray: 260; stroke-dashoffset: 260; animation: draw 1.1s var(--ease) forwards; }
.draw.d2 { animation-delay: .25s; } .draw.d3 { animation-delay: .5s; }
.draw.d4 { animation-delay: .7s; } .draw.d5 { animation-delay: .8s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.splash-word { font-family: var(--serif); font-size: calc(46px * var(--fs, 1)); font-weight: 600; letter-spacing: .02em; display: flex; }
.splash-word span { opacity: 0; transform: translateY(24px) rotate(6deg); animation: letter .6s var(--spring) forwards; }
.splash-word span:nth-child(1) { animation-delay: .9s; } .splash-word span:nth-child(2) { animation-delay: .96s; }
.splash-word span:nth-child(3) { animation-delay: 1.02s; } .splash-word span:nth-child(4) { animation-delay: 1.08s; }
.splash-word span:nth-child(5) { animation-delay: 1.14s; } .splash-word span:nth-child(6) { animation-delay: 1.2s; color: var(--lemon); }
@keyframes letter { to { opacity: 1; transform: none; } }
.splash-tag { opacity: 0; font-size: calc(14px * var(--fs, 1)); letter-spacing: .14em; text-transform: uppercase; animation: fade .8s 1.5s forwards; }
@keyframes fade { to { opacity: .85; } }

/* ───────── Views ───────── */
#views { position: absolute; inset: 0; }
.view {
  position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden; display: none;
  padding: calc(var(--sat) + 18px) 20px calc(var(--tabbar-h) + var(--sab) + 40px);
  -webkit-overflow-scrolling: touch; scrollbar-width: none; background: var(--white);
}
.view::-webkit-scrollbar { display: none; }
.view.active { display: block; animation: viewIn .5s var(--ease); }
@keyframes viewIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.page-head { margin: 6px 0 18px; }
.page-head h1, .hero h1 { font-size: calc(34px * var(--fs, 1)); line-height: 1.05; }
.page-head p { color: var(--muted); margin-top: 8px; font-size: calc(15px * var(--fs, 1)); }

/* ───────── Entdecken ───────── */
.hero { margin: -18px -20px 0; padding: calc(var(--sat) + 18px) 20px 18px; background: linear-gradient(180deg, var(--basil-50), var(--white)); }
.brand { display: flex; align-items: center; gap: 8px; font-family: var(--serif); font-weight: 700; font-size: calc(19px * var(--fs, 1)); color: var(--basil-700); }
.greet { margin-top: 18px; font-size: calc(13px * var(--fs, 1)); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.hero h1 { margin-top: 6px; font-size: calc(38px * var(--fs, 1)); }
.hero h1 em { background: linear-gradient(transparent 62%, var(--lemon-soft) 62%); background-size: 0 100%; background-repeat: no-repeat; animation: mark 1s .9s var(--ease) forwards; padding: 0 2px; }
@keyframes mark { to { background-size: 100% 100%; } }

.search { position: relative; display: flex; align-items: center; margin-top: 18px; background: var(--white); border: 1.5px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-s); transition: border-color .2s, box-shadow .2s; }
.search:focus-within { border-color: var(--basil-500); box-shadow: 0 0 0 4px rgba(46, 125, 79, .14); }
.search > svg { margin-left: 14px; color: var(--muted); flex: none; }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; padding: 15px 10px; font-size: calc(16px * var(--fs, 1)); }
.filter-btn { position: relative; width: 44px; height: 44px; margin: 4px; border-radius: 14px; background: var(--basil-700); color: #fff; display: grid; place-items: center; transition: transform .2s var(--spring); }
.filter-btn:active { transform: scale(.9); }
.filter-btn b { position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--lemon); color: var(--basil-950); font-size: calc(11px * var(--fs, 1)); display: grid; place-items: center; animation: pop .4s var(--spring); }

.chips-scroll { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 10px; padding: 6px 0 4px; }
.chip {
  flex: none; padding: 9px 15px; border-radius: 999px; font-size: calc(14px * var(--fs, 1)); font-weight: 600;
  background: var(--basil-50); color: var(--basil-700); border: 1.5px solid var(--basil-100);
  transition: background .25s, color .25s, border-color .25s, transform .3s var(--spring), box-shadow .25s;
}
.chip:active { transform: scale(.94); }
.chip.on { background: var(--basil-700); color: #fff; border-color: var(--basil-700); box-shadow: 0 6px 16px rgba(31, 94, 59, .3); animation: chipPop .45s var(--spring); }
@keyframes chipPop { 0% { transform: scale(.88); } 100% { transform: scale(1); } }
.chip.sm { padding: 8px 13px; font-size: calc(13px * var(--fs, 1)); }
.chip.x::after { content: "×"; margin-left: 7px; opacity: .7; font-size: calc(16px * var(--fs, 1)); line-height: 0; }

.active-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 6px; }
.active-filters:empty { display: none; }
.active-filters .chip { animation: pop .35s var(--spring); }

.result-head { display: flex; align-items: baseline; justify-content: space-between; margin: 16px 0 12px; }
.result-head h2 { font-size: calc(22px * var(--fs, 1)); }
.result-head span { font-size: calc(13px * var(--fs, 1)); color: var(--muted); font-weight: 500; }

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.card {
  position: relative; border-radius: var(--r-m); background: var(--white); box-shadow: var(--shadow-s); border: 1px solid var(--line);
  overflow: hidden; cursor: pointer; text-align: left; opacity: 0; transform: translateY(18px) scale(.97);
  animation: cardIn .6s var(--ease) forwards; animation-delay: calc(var(--i, 0) * 45ms);
  transition: box-shadow .3s, transform .3s var(--ease);
}
.card:active { transform: scale(.97); }
@keyframes cardIn { to { opacity: 1; transform: none; } }
.card-art { position: relative; aspect-ratio: 1 / .86; display: grid; place-items: center; overflow: hidden; }
.card-art .dish { width: 108%; margin-top: 2%; transition: transform .6s var(--ease); }
.card:hover .dish, .card:active .dish { transform: scale(1.06) rotate(-2deg); }
.card-body { padding: 10px 12px 13px; }
.card h3 { font-size: calc(15.5px * var(--fs, 1)); line-height: 1.2; min-height: 2.4em; }
.meta { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: calc(12px * var(--fs, 1)); color: var(--muted); font-weight: 500; }
.meta i { width: 3px; height: 3px; border-radius: 50%; background: var(--basil-300); }
.diet { position: absolute; left: 10px; top: 10px; padding: 4px 9px; border-radius: 999px; font-size: calc(11px * var(--fs, 1)); font-weight: 700; background: rgba(255, 255, 255, .9); color: var(--basil-700); backdrop-filter: blur(6px); }
.diet.vegan { background: var(--basil-700); color: #fff; }
.match { position: absolute; left: 10px; bottom: 10px; padding: 4px 9px; border-radius: 999px; font-size: calc(11px * var(--fs, 1)); font-weight: 700; background: var(--lemon); color: var(--basil-950); }

.heart { position: absolute; right: 8px; top: 8px; z-index: 2; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .92); color: var(--basil-700); box-shadow: var(--shadow-s); transition: transform .3s var(--spring); }
.heart svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; transition: fill .2s, stroke .2s; }
.heart:active { transform: scale(.82); }
.heart.on { color: var(--danger); }
.heart.on svg { fill: var(--danger); stroke: var(--danger); animation: heartBeat .6s var(--spring); }
@keyframes heartBeat { 0% { transform: scale(.4); } 55% { transform: scale(1.35); } 100% { transform: scale(1); } }

.empty { text-align: center; padding: 40px 10px; color: var(--muted); }
.empty svg { width: 150px; height: auto; margin-bottom: 8px; }
.empty h3 { color: var(--ink); font-size: calc(20px * var(--fs, 1)); margin-bottom: 6px; }
.empty .btn-ghost { margin-top: 16px; }

/* FAB + Tabbar */
#fab {
  position: absolute; z-index: 30; right: 20px; bottom: calc(var(--tabbar-h) + var(--sab) + 18px); width: 58px; height: 58px; border-radius: 20px;
  background: linear-gradient(145deg, var(--basil-500), var(--basil-700)); box-shadow: 0 12px 26px rgba(31, 94, 59, .45); display: grid; place-items: center;
  transition: transform .4s var(--spring), opacity .3s;
}
#fab:active { transform: scale(.88) rotate(90deg); }
#fab.hide { transform: scale(0); opacity: 0; pointer-events: none; }

#tabbar {
  position: absolute; z-index: 40; left: 12px; right: 12px; bottom: calc(var(--sab) + 12px); height: 66px;
  display: grid; grid-template-columns: repeat(5, 1fr); padding: 6px; border-radius: 26px;
  background: rgba(255, 255, 255, .86); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border: 1px solid rgba(224, 235, 228, .9); box-shadow: var(--shadow-m);
}
.tab-pill { position: absolute; top: 6px; bottom: 6px; left: 6px; width: calc((100% - 12px) / 5); border-radius: 20px; background: var(--basil-100); transition: transform .5s var(--spring); z-index: 0; }
.tab { position: relative; z-index: 1; display: grid; place-items: center; align-content: center; gap: 2px; color: var(--muted); transition: color .3s; }
.tab svg { width: 24px; height: 24px; transition: transform .45s var(--spring); }
.tab span { font-size: calc(10.5px * var(--fs, 1)); font-weight: 600; }
.tab.active { color: var(--basil-700); }
.tab.active svg { transform: translateY(-1px) scale(1.12); }
.tab .badge { position: absolute; top: 4px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--lemon); color: var(--basil-950); font-size: calc(10.5px * var(--fs, 1)); display: grid; place-items: center; }
.tab .badge.bump { animation: pop .4s var(--spring); }
@keyframes pop { 0% { transform: scale(0); } 100% { transform: scale(1); } }

/* ───────── Buttons ───────── */
.btn-big {
  display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; padding: 18px; margin-top: 22px; border-radius: 22px; color: #fff; font-weight: 700; font-size: calc(18px * var(--fs, 1));
  background: linear-gradient(145deg, var(--basil-500), var(--basil-700)); box-shadow: 0 14px 30px rgba(31, 94, 59, .38); position: relative; overflow: hidden;
  transition: transform .3s var(--spring);
}
.btn-big:active { transform: scale(.96); }
.btn-big::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .28) 50%, transparent 70%); transform: translateX(-120%); animation: shine 3.2s 1s infinite; }
@keyframes shine { 40%, 100% { transform: translateX(120%); } }
.btn-big:disabled { opacity: .6; }
.spin-ico { width: 24px; height: 24px; border-radius: 7px; border: 2.5px solid #fff; position: relative; }
.spin-ico::before, .spin-ico::after { content: ""; position: absolute; width: 4px; height: 4px; border-radius: 50%; background: #fff; }
.spin-ico::before { left: 4px; top: 4px; } .spin-ico::after { right: 4px; bottom: 4px; }
.btn-big.rolling .spin-ico { animation: roll .6s linear infinite; }
@keyframes roll { to { transform: rotate(360deg); } }
.btn-primary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 15px 20px; border-radius: 18px; background: var(--basil-700); color: #fff; font-weight: 700; transition: transform .25s var(--spring); }
.btn-primary:active { transform: scale(.95); }
.btn-primary.wide, .btn-ghost.wide { width: 100%; }
.btn-ghost { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 18px; border-radius: 16px; border: 1.5px solid var(--basil-100); background: var(--basil-50); color: var(--basil-700); font-weight: 700; font-size: calc(14.5px * var(--fs, 1)); transition: transform .25s var(--spring), background .2s; }
.btn-ghost:active { transform: scale(.95); }
.btn-ghost.danger { color: var(--danger); background: #FDF1EE; border-color: #F6D6CF; }

/* ───────── Zufall ───────── */
.filter-summary { display: block; width: 100%; padding: 12px 16px; border-radius: 16px; background: var(--basil-50); border: 1.5px dashed var(--basil-300); color: var(--basil-700); font-weight: 600; font-size: calc(14px * var(--fs, 1)); text-align: left; }
.deck { position: relative; height: 330px; margin: 26px 8px 0; perspective: 1000px; }
.deck-card { position: absolute; inset: 0; border-radius: 30px; background: var(--white); box-shadow: var(--shadow-m); border: 1px solid var(--line); overflow: hidden; }
.deck-card.back.b1 { transform: translateY(12px) scale(.95) rotate(-3deg); background: var(--basil-100); }
.deck-card.back.b2 { transform: translateY(22px) scale(.9) rotate(3deg); background: var(--basil-300); opacity: .7; }
.deck-card.front { display: grid; grid-template-rows: 1fr auto; text-align: center; cursor: pointer; transition: transform .5s var(--spring); }
.deck-card .art { display: grid; place-items: center; overflow: hidden; }
.deck-card .art .dish { width: 88%; }
.deck-card .txt { padding: 4px 18px 20px; }
.deck-card .txt h3 { font-size: calc(24px * var(--fs, 1)); }
.deck-card .txt p { margin-top: 4px; color: var(--muted); font-size: calc(14px * var(--fs, 1)); }
.deck-card.front.flip { animation: flipIn .22s ease-out; }
@keyframes flipIn { from { transform: rotateY(-70deg) scale(.92); opacity: .4; } to { transform: none; opacity: 1; } }
.deck.rumble .deck-card.back.b1 { animation: wob1 .35s infinite alternate ease-in-out; }
.deck.rumble .deck-card.back.b2 { animation: wob2 .3s infinite alternate ease-in-out; }
@keyframes wob1 { to { transform: translateY(10px) scale(.95) rotate(3deg) translateX(10px); } }
@keyframes wob2 { to { transform: translateY(20px) scale(.9) rotate(-4deg) translateX(-10px); } }
.deck.landed .deck-card.front { animation: land .8s var(--spring); }
@keyframes land { 0% { transform: scale(.85) rotate(-4deg); } 60% { transform: scale(1.05) rotate(1deg); } 100% { transform: none; } }
.deck-glow { position: absolute; left: 10%; right: 10%; bottom: -26px; height: 40px; background: radial-gradient(closest-side, rgba(31, 94, 59, .35), transparent); filter: blur(8px); z-index: -1; }
#btn-spin-open { display: flex; width: 100%; margin-top: 12px; animation: pop .4s var(--spring); }
#btn-spin-open[hidden] { display: none; }

/* ───────── Wochenplan ───────── */
.week-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.week-nav button { width: 44px; height: 44px; border-radius: 14px; background: var(--basil-50); color: var(--basil-700); display: grid; place-items: center; transition: transform .25s var(--spring); }
.week-nav button:active { transform: scale(.88); }
#week-label { font-weight: 700; text-align: center; font-size: calc(15px * var(--fs, 1)); }
#week-label small { display: block; color: var(--muted); font-weight: 500; font-size: calc(12px * var(--fs, 1)); margin-top: 1px; }
.week { display: grid; gap: 10px; margin-bottom: 16px; }
.day { display: grid; grid-template-columns: 56px 1fr 1fr; gap: 8px; align-items: stretch; padding: 10px; border-radius: 20px; background: var(--basil-50); border: 1.5px solid transparent; animation: cardIn .5s var(--ease) both; animation-delay: calc(var(--i, 0) * 50ms); }
.day.today { border-color: var(--basil-500); background: var(--white); box-shadow: var(--shadow-s); }
.day-label { display: grid; place-content: center; text-align: center; border-radius: 14px; background: var(--basil-100); color: var(--basil-700); font-weight: 700; }
.day.today .day-label { background: var(--basil-700); color: #fff; }
.day-label b { font-size: calc(16px * var(--fs, 1)); font-family: var(--serif); }
.day-label small { font-size: calc(11px * var(--fs, 1)); opacity: .8; }
.slot { position: relative; min-height: 70px; border-radius: 14px; padding: 8px; border: 1.5px dashed var(--basil-300); color: var(--basil-700); font-size: calc(12px * var(--fs, 1)); font-weight: 600; display: grid; place-content: center; text-align: center; background: rgba(255, 255, 255, .6); transition: transform .25s var(--spring); }
.slot:active { transform: scale(.95); }
.slot.full { border: 0; background: var(--white); place-content: stretch; box-shadow: var(--shadow-s); text-align: left; padding: 0; overflow: hidden; display: block; }
.slot .slot-art { height: 50px; display: grid; place-items: center; overflow: hidden; }
.slot .slot-art .dish { width: 118%; margin-top: 8px; }
.slot .slot-t { padding: 4px 8px 6px; font-size: calc(11.5px * var(--fs, 1)); line-height: 1.2; font-weight: 700; color: var(--ink); display: block; }
.slot .slot-k { position: absolute; left: 6px; top: 4px; font-size: calc(9.5px * var(--fs, 1)); text-transform: uppercase; letter-spacing: .06em; color: var(--basil-700); font-weight: 700; z-index: 1; background: rgba(255,255,255,.8); border-radius: 6px; padding: 1px 5px; }
.slot .slot-x { position: absolute; right: 4px; top: 4px; width: 22px; height: 22px; border-radius: 50%; background: rgba(255, 255, 255, .92); font-size: calc(15px * var(--fs, 1)); line-height: 1; color: var(--muted); display: grid; place-items: center; z-index: 1; }

/* ───────── Einkaufsliste ───────── */
.add-item { display: flex; gap: 8px; margin-bottom: 16px; }
.add-item input { flex: 1; min-width: 0; padding: 15px 16px; border-radius: 16px; border: 1.5px solid var(--line); outline: 0; font-size: calc(16px * var(--fs, 1)); background: var(--white); }
.add-item input:focus { border-color: var(--basil-500); box-shadow: 0 0 0 4px rgba(46, 125, 79, .14); }
.add-item button { width: 52px; border-radius: 16px; background: var(--basil-700); color: #fff; display: grid; place-items: center; transition: transform .25s var(--spring); }
.add-item button:active { transform: scale(.9) rotate(90deg); }
.shop-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.shop-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: var(--basil-50); animation: cardIn .4s var(--ease) both; transition: opacity .3s; }
.shop-item .box { flex: none; width: 26px; height: 26px; border-radius: 9px; border: 2px solid var(--basil-300); display: grid; place-items: center; background: var(--white); transition: background .25s, border-color .25s, transform .35s var(--spring); }
.shop-item .box svg { width: 16px; height: 16px; stroke: #fff; stroke-width: 3.2; fill: none; stroke-dasharray: 24; stroke-dashoffset: 24; transition: stroke-dashoffset .35s .05s var(--ease); }
.shop-item.done .box { background: var(--basil-500); border-color: var(--basil-500); transform: scale(1.08); }
.shop-item.done .box svg { stroke-dashoffset: 0; }
.shop-item .t { flex: 1; min-width: 0; }
.shop-item .t b { font-weight: 600; font-size: calc(15.5px * var(--fs, 1)); position: relative; transition: color .3s; }
.shop-item.done .t b { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--basil-500); }
.shop-item .t small { display: block; color: var(--muted); font-size: calc(12px * var(--fs, 1)); margin-top: 2px; }
.shop-item.done { opacity: .6; }
.shop-item .del { width: 32px; height: 32px; border-radius: 50%; color: var(--muted); font-size: calc(20px * var(--fs, 1)); line-height: 1; }
.shop-actions { display: flex; gap: 10px; margin-top: 18px; }
.shop-actions[hidden] { display: none; }
.shop-actions .btn-ghost { flex: 1; }

/* ───────── Detail ───────── */
#detail { position: absolute; inset: 0; z-index: 60; background: var(--white); display: none; }
#detail.open { display: block; }
#detail.enter { animation: detailIn .55s var(--ease); }
@keyframes detailIn { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.d-scroll { position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden; scrollbar-width: none; }
.d-scroll::-webkit-scrollbar { display: none; }
.d-hero { position: absolute; top: 0; left: 0; right: 0; height: 330px; display: grid; place-items: center; overflow: hidden; will-change: transform; }
.d-hero .dish { width: 92%; margin-top: 30px; will-change: transform; view-transition-name: dish; }
.d-bar { position: absolute; z-index: 5; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; padding: calc(var(--sat) + 14px) 16px 0; pointer-events: none; }
.d-bar button { pointer-events: auto; width: 44px; height: 44px; border-radius: 50%; background: rgba(255, 255, 255, .94); box-shadow: var(--shadow-m); display: grid; place-items: center; color: var(--basil-700); position: relative; transition: transform .3s var(--spring); }
.d-bar button:active { transform: scale(.86); }
.d-bar .heart { position: static; width: 44px; height: 44px; }
.d-sheet { position: relative; margin-top: 290px; padding: 26px 22px calc(40px + var(--sab)); background: var(--white); border-radius: 34px 34px 0 0; min-height: 70vh; box-shadow: 0 -16px 40px rgba(18, 64, 42, .1); }
.d-sheet::before { content: ""; display: block; width: 44px; height: 5px; border-radius: 3px; background: var(--line); margin: -12px auto 16px; }
.d-sheet h1 { font-size: calc(30px * var(--fs, 1)); line-height: 1.1; }
.d-sheet .sub { color: var(--muted); margin-top: 6px; font-size: calc(15px * var(--fs, 1)); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 20px 0 6px; }
.stat { padding: 12px 4px; border-radius: 16px; background: var(--basil-50); text-align: center; }
.stat b { display: block; font-family: var(--serif); font-size: calc(18px * var(--fs, 1)); color: var(--basil-700); }
.stat small { font-size: calc(11px * var(--fs, 1)); color: var(--muted); font-weight: 600; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.tag { padding: 5px 11px; border-radius: 999px; font-size: calc(12px * var(--fs, 1)); font-weight: 700; background: var(--lemon-soft); color: #6B5410; }
.tag.g { background: var(--basil-100); color: var(--basil-700); }
.d-sheet h2 { font-size: calc(21px * var(--fs, 1)); margin: 28px 0 12px; display: flex; align-items: center; justify-content: space-between; }
.portions { display: flex; align-items: center; gap: 4px; background: var(--basil-50); border-radius: 14px; padding: 3px; }
.portions button { width: 34px; height: 34px; border-radius: 11px; background: var(--white); box-shadow: var(--shadow-s); font-size: calc(20px * var(--fs, 1)); font-weight: 700; color: var(--basil-700); transition: transform .25s var(--spring); }
.portions button:active { transform: scale(.8); }
.portions span { min-width: 62px; text-align: center; font-family: var(--sans); font-size: calc(13px * var(--fs, 1)); font-weight: 700; }
.ing { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ing li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--basil-50); cursor: pointer; transition: opacity .25s; }
.ing li .q { flex: none; min-width: 74px; font-weight: 700; color: var(--basil-700); font-size: calc(14px * var(--fs, 1)); }
.ing li.on { opacity: .45; }
.ing li.on .n { text-decoration: line-through; }
.ing li .q.bump { animation: qBump .35s var(--ease); }
@keyframes qBump { 50% { transform: translateY(-4px) scale(1.12); } }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; counter-reset: s; }
.steps li { position: relative; padding: 14px 14px 14px 58px; border-radius: 18px; background: var(--basil-50); cursor: pointer; line-height: 1.5; font-size: calc(15px * var(--fs, 1)); transition: background .3s, opacity .3s; counter-increment: s; }
.steps li::before { content: counter(s); position: absolute; left: 14px; top: 12px; width: 32px; height: 32px; border-radius: 50%; background: var(--white); color: var(--basil-700); font-family: var(--serif); font-weight: 700; display: grid; place-items: center; box-shadow: var(--shadow-s); transition: background .3s, color .3s, transform .4s var(--spring); }
.steps li.on { background: var(--basil-100); opacity: .7; }
.steps li.on::before { transform: rotate(360deg) scale(1.08); }
.progress { height: 6px; border-radius: 3px; background: var(--basil-100); overflow: hidden; margin: -2px 0 14px; }
.progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--basil-300), var(--basil-500)); border-radius: 3px; transition: width .5s var(--ease); }
.d-actions { display: grid; gap: 10px; margin-top: 28px; }
.d-actions .row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.d-actions .btn-ghost.danger { margin-top: 6px; }

/* View-Transition: Gericht fliegt von der Karte ins Detail */
::view-transition-group(dish) { animation-duration: .55s; animation-timing-function: var(--ease); }
::view-transition-old(dish), ::view-transition-new(dish) { animation: none; mix-blend-mode: normal; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .35s; }

/* ───────── Sheets ───────── */
.sheet-backdrop { position: absolute; inset: 0; z-index: 80; background: rgba(14, 51, 34, .5); backdrop-filter: blur(3px); animation: fadeIn .3s forwards; }
.sheet-backdrop.out { animation: fadeOut .28s forwards; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeOut { to { opacity: 0; } }
.sheet { position: absolute; z-index: 81; left: 0; right: 0; bottom: 0; max-height: 92%; display: flex; flex-direction: column; background: var(--white); border-radius: 30px 30px 0 0; box-shadow: var(--shadow-l); animation: sheetIn .5s var(--ease); touch-action: pan-y; }
.sheet.out { animation: sheetOut .3s var(--ease) forwards; }
@keyframes sheetIn { from { transform: translateY(100%); } to { transform: none; } }
@keyframes sheetOut { to { transform: translateY(100%); } }
.sheet-grab { padding: 12px 0 6px; cursor: grab; flex: none; }
.sheet-grab::before { content: ""; display: block; width: 44px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto; }
.sheet-head { padding: 4px 22px 12px; flex: none; display: flex; align-items: center; justify-content: space-between; }
.sheet-head h2 { font-size: calc(23px * var(--fs, 1)); }
.sheet-head button { width: 36px; height: 36px; border-radius: 50%; background: var(--basil-50); font-size: calc(20px * var(--fs, 1)); color: var(--muted); }
.sheet-body { padding: 4px 22px 22px; overflow-y: auto; scrollbar-width: none; flex: 1; }
.sheet-body::-webkit-scrollbar { display: none; }
.sheet-foot { flex: none; display: flex; gap: 10px; padding: 12px 22px calc(16px + var(--sab)); border-top: 1px solid var(--line); background: var(--white); }
.sheet-foot .btn-primary { flex: 1; }
.fgroup { margin-bottom: 22px; }
.fgroup > label, .field > span { display: block; font-size: calc(12.5px * var(--fs, 1)); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; margin-bottom: 9px; }
.fchips { display: flex; flex-wrap: wrap; gap: 8px; }
.pantry-in { display: flex; gap: 8px; }
.pantry-in input, .field input, .field select, .field textarea { width: 100%; padding: 13px 14px; border-radius: 14px; border: 1.5px solid var(--line); outline: 0; background: var(--white); font-size: calc(16px * var(--fs, 1)); }
.pantry-in input:focus, .field input:focus, .field select:focus, .field textarea:focus { border-color: var(--basil-500); box-shadow: 0 0 0 4px rgba(46, 125, 79, .14); }
.field { display: block; margin-bottom: 16px; }
.field textarea { min-height: 110px; resize: vertical; line-height: 1.45; }
.field small { display: block; margin-top: 6px; color: var(--muted); font-size: calc(12px * var(--fs, 1)); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row2 .field { margin-bottom: 16px; }
.hint { color: var(--muted); font-size: calc(13px * var(--fs, 1)); margin-top: 8px; }
.toggle { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--basil-50); font-weight: 600; cursor: pointer; margin-bottom: 16px; }
.toggle input { width: 20px; height: 20px; accent-color: var(--basil-700); }
.art-preview { height: 150px; margin: 0 0 14px; border-radius: 22px; display: grid; place-items: center; overflow: hidden; }
.art-preview .dish { height: 150px; }
.type-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-bottom: 12px; }
.type-btn { border-radius: 14px; border: 2px solid var(--line); background: var(--basil-50); overflow: hidden; padding: 2px; transition: transform .25s var(--spring), border-color .2s; }
.type-btn.on { border-color: var(--basil-700); background: var(--basil-100); transform: scale(1.06); }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.sw { width: 40px; height: 40px; border-radius: 50%; border: 3px solid var(--white); box-shadow: 0 0 0 1.5px var(--line); position: relative; overflow: hidden; transition: transform .3s var(--spring), box-shadow .2s; }
.sw.on { box-shadow: 0 0 0 3px var(--basil-700); transform: scale(1.12); }
.sw i { position: absolute; inset: 0; }
.pick-list { display: grid; gap: 8px; }
.pick { display: flex; align-items: center; gap: 12px; padding: 8px 12px 8px 8px; border-radius: 16px; background: var(--basil-50); text-align: left; transition: transform .25s var(--spring); }
.pick:active { transform: scale(.97); }
.pick .pa { flex: none; width: 58px; height: 52px; border-radius: 12px; display: grid; place-items: center; overflow: hidden; }
.pick .pa .dish { width: 110%; }
.pick b { display: block; font-size: calc(15px * var(--fs, 1)); }
.pick small { color: var(--muted); font-size: calc(12px * var(--fs, 1)); }

/* ───────── Effekte, Toast ───────── */
#fx { position: absolute; inset: 0; z-index: 120; pointer-events: none; overflow: hidden; }
.confetti { position: absolute; top: -20px; width: 10px; height: 16px; border-radius: 3px; animation: fall linear forwards; }
@keyframes fall { to { transform: translate3d(var(--dx), 110vh, 0) rotate(var(--rot)); opacity: .9; } }
.burst { position: absolute; width: 14px; height: 14px; margin: -7px; background: var(--danger); clip-path: path("M7 13 L6 12 C2 8 0 6 0 4 C0 2 1.5 0 3.5 0 C5 0 6.200 .8 7 2 C7.800 .8 9 0 10.500 0 C12.500 0 14 2 14 4 C14 6 12 8 8 12Z"); animation: burst .75s var(--ease) forwards; }
@keyframes burst { from { transform: translate(0, 0) scale(.4); opacity: 1; } to { transform: translate(var(--bx), var(--by)) scale(1.2); opacity: 0; } }
#toast { position: absolute; z-index: 130; left: 50%; bottom: calc(var(--tabbar-h) + var(--sab) + 34px); transform: translate(-50%, 30px); opacity: 0; padding: 12px 20px; border-radius: 16px; background: var(--basil-950); color: #fff; font-weight: 600; font-size: calc(14px * var(--fs, 1)); max-width: 86%; text-align: center; box-shadow: var(--shadow-m); pointer-events: none; transition: transform .45s var(--spring), opacity .3s; }
#toast.show { transform: translate(-50%, 0); opacity: 1; }

/* Dampf-Animation der Gerichte */
.steam path { stroke-dasharray: 60; animation: steamUp 3s ease-in-out infinite; opacity: 0; }
.steam .s2 { animation-delay: .8s; } .steam .s3 { animation-delay: 1.6s; }
@keyframes steamUp { 0% { stroke-dashoffset: 60; opacity: 0; transform: translateY(8px); } 30% { opacity: .9; } 100% { stroke-dashoffset: -30; opacity: 0; transform: translateY(-10px); } }
.dish-body { transform-origin: 50% 90%; }
.card:hover .dish-body { animation: wiggle .8s var(--ease); }
@keyframes wiggle { 30% { transform: rotate(-1.5deg); } 60% { transform: rotate(1deg); } }

/* ───────── Barrierefreiheit ───────── */
/* Weniger Animationen: Systemeinstellung (Standard) oder eigene Wahl in den Einstellungen (html[data-motion]) */
@media (prefers-reduced-motion: reduce) {
  html:not([data-motion="full"]) *, html:not([data-motion="full"]) *::before, html:not([data-motion="full"]) *::after { animation-duration: .01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  html:not([data-motion="full"]) .card { opacity: 1; transform: none; }
}
html[data-motion="reduced"] *, html[data-motion="reduced"] *::before, html[data-motion="reduced"] *::after { animation-duration: .01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
html[data-motion="reduced"] .card { opacity: 1; transform: none; }
button:focus-visible, input:focus-visible { outline: 3px solid var(--lemon); outline-offset: 2px; }

/* ═══════════ Erweiterung: Wählen-Tab, Sterne, Geräte, Automatik ═══════════ */
.seg { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); padding: 4px; margin-bottom: 20px; border-radius: 18px; background: var(--basil-50); border: 1px solid var(--line); }
.seg-pill { position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc((100% - 8px) / 3); border-radius: 14px; background: var(--white); box-shadow: var(--shadow-s); transition: transform .5s var(--spring); }
.seg button { position: relative; z-index: 1; padding: 11px 4px; font-weight: 700; font-size: calc(14px * var(--fs, 1)); color: var(--muted); transition: color .3s; }
.seg button.on { color: var(--basil-700); }
.mode { display: none; }
.mode.on { display: block; animation: viewIn .5s var(--ease); }

/* Icons (SVG statt Emojis) */
.ico { display: inline-block; width: 1.05em; height: 1.05em; vertical-align: -0.16em; fill: currentColor; flex: none; }
.ico.stroke { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.chip .ico, .rate-badge .ico, .sort-toggle .ico { margin-right: 4px; }
.btn-primary .ico, .btn-ghost .ico { width: 1.15em; height: 1.15em; }

/* Swipe */
.swipe-info { text-align: center; color: var(--muted); font-size: calc(13px * var(--fs, 1)); font-weight: 600; margin-bottom: 10px; min-height: 18px; }
.swipe-stack { position: relative; height: 420px; margin: 0 6px; }
.sw-card { position: absolute; inset: 0 0 18px; border-radius: 30px; background: var(--white); border: 1px solid var(--line); box-shadow: var(--shadow-m); overflow: hidden; display: grid; grid-template-rows: 1fr auto; touch-action: pan-y; user-select: none; -webkit-user-select: none; cursor: grab; transition: transform .45s var(--spring); will-change: transform; }
.sw-card:active { cursor: grabbing; }
.sw-art { position: relative; display: grid; place-items: center; overflow: hidden; pointer-events: none; }
.sw-art .dish { width: 92%; }
.sw-body { padding: 4px 18px 18px; pointer-events: none; }
.sw-body h3 { font-size: calc(22px * var(--fs, 1)); }
.sw-body p { color: var(--muted); font-size: calc(14px * var(--fs, 1)); margin-top: 3px; }
.sw-body .tags { margin-top: 10px; }
.stamp { position: absolute; top: 22px; padding: 6px 14px; border: 4px solid; border-radius: 12px; font-family: var(--serif); font-weight: 700; font-size: calc(26px * var(--fs, 1)); letter-spacing: .06em; opacity: 0; background: rgba(255, 255, 255, .75); }
.stamp.yes { left: 20px; color: var(--basil-500); transform: rotate(-12deg); }
.stamp.no { right: 20px; color: var(--danger); transform: rotate(12deg); }
.sw-empty { position: absolute; inset: 0; display: grid; align-content: center; justify-items: center; text-align: center; padding: 20px; color: var(--muted); animation: pop .5s var(--spring); }
.sw-empty svg.dish { width: 170px; }
.sw-empty h3 { color: var(--ink); font-size: calc(22px * var(--fs, 1)); margin: 6px 0; }
.sw-empty .btn-ghost { margin-top: 14px; }
.swipe-btns { display: flex; justify-content: center; align-items: center; gap: 22px; margin-top: 8px; }
.sb { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--white); box-shadow: var(--shadow-m); border: 1px solid var(--line); transition: transform .3s var(--spring), opacity .2s; }
.sb:active { transform: scale(.84); }
.sb:disabled { opacity: .35; }
.sb.no { color: var(--danger); }
.sb.yes { color: #fff; background: linear-gradient(145deg, var(--basil-500), var(--basil-700)); border: 0; width: 72px; height: 72px; }
.sb.undo { width: 46px; height: 46px; color: var(--muted); }
.taste-line { text-align: center; margin-top: 18px; color: var(--muted); font-size: calc(14px * var(--fs, 1)); line-height: 1.5; padding: 0 10px; }
.taste-line b { color: var(--basil-700); }
.taste-line small { font-size: calc(12px * var(--fs, 1)); }

/* Assistent */
.assist-step { animation: viewIn .45s var(--ease); }
.steps-dots { display: flex; gap: 8px; margin-bottom: 18px; }
.steps-dots i { height: 6px; flex: 1; border-radius: 3px; background: var(--basil-100); transition: background .4s; }
.steps-dots i.done { background: var(--basil-500); }
.steps-dots i.now { background: var(--basil-300); }
.aq { font-size: calc(26px * var(--fs, 1)); margin-bottom: 18px; }
.opts { display: grid; gap: 10px; }
.opt { display: block; width: 100%; text-align: left; padding: 18px; border-radius: 20px; background: var(--basil-50); border: 1.5px solid var(--basil-100); transition: transform .3s var(--spring), border-color .2s, background .2s; }
.opt:active { transform: scale(.97); border-color: var(--basil-500); background: var(--basil-100); }
.opt b { display: block; font-size: calc(17px * var(--fs, 1)); font-family: var(--serif); }
.opt small { color: var(--muted); font-size: calc(13.5px * var(--fs, 1)); }
.btn-ghost.sm { padding: 10px 14px; font-size: calc(13.5px * var(--fs, 1)); margin-top: 16px; }
.recs { display: grid; gap: 12px; }
.rec { display: grid; grid-template-columns: 110px 1fr; gap: 12px; padding: 10px; border-radius: 22px; background: var(--white); border: 1px solid var(--line); box-shadow: var(--shadow-s); cursor: pointer; animation: cardIn .6s var(--ease) both; animation-delay: calc(var(--i) * 120ms); transition: transform .3s var(--spring); }
.rec:active { transform: scale(.97); }
.rec-art { border-radius: 16px; display: grid; place-items: center; overflow: hidden; min-height: 100px; }
.rec-art .dish { width: 120%; }
.rec-t h3 { font-size: calc(17px * var(--fs, 1)); line-height: 1.2; }
.rec-t p { color: var(--muted); font-size: calc(13px * var(--fs, 1)); margin-top: 3px; }
.rec-t .tags { margin-top: 8px; }
.rec-t .tag { font-size: calc(11px * var(--fs, 1)); padding: 4px 9px; }

/* Sterne */
.stars { display: flex; align-items: center; gap: 2px; margin-top: 10px; }
.stars button { width: 38px; height: 38px; display: grid; place-items: center; color: #D3DDD6; transition: transform .25s var(--spring), color .2s; }
.stars button svg { width: 30px; height: 30px; fill: currentColor; }
.stars button.on { color: var(--lemon); }
.stars button:active { transform: scale(.8); }
.stars button.pop { animation: starPop .5s var(--spring) both; }
@keyframes starPop { 0% { transform: scale(.3) rotate(-30deg); } 60% { transform: scale(1.3) rotate(8deg); } 100% { transform: none; } }
.stars small { margin-left: 8px; color: var(--muted); font-size: calc(13px * var(--fs, 1)); font-weight: 600; }
.rate-badge { position: absolute; right: 10px; bottom: 10px; display: inline-flex; align-items: center; padding: 4px 9px; border-radius: 999px; background: var(--basil-950); color: var(--lemon); font-size: calc(11px * var(--fs, 1)); font-weight: 700; }
.sort-toggle { display: inline-flex; align-items: center; margin: -4px 0 12px; padding: 7px 13px; border-radius: 999px; font-size: calc(12.5px * var(--fs, 1)); font-weight: 700; background: var(--basil-50); color: var(--muted); border: 1.5px solid var(--basil-100); transition: transform .25s var(--spring); }
.sort-toggle.on { background: var(--lemon-soft); color: #6B5410; border-color: #F3DE8F; }
.sort-toggle:active { transform: scale(.95); }

/* Geräte */
.tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 14px; }
.tools b { font-size: calc(12px * var(--fs, 1)); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-right: 4px; }
.tool { padding: 5px 11px; border-radius: 10px; font-size: calc(12px * var(--fs, 1)); font-weight: 700; background: var(--basil-50); color: var(--basil-700); border: 1px solid var(--basil-100); }

/* Regeln im Wochenplan-Assistent */
.rule { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 4px 8px 14px; border-radius: 16px; background: var(--basil-50); margin-bottom: 8px; font-weight: 600; font-size: calc(14.5px * var(--fs, 1)); }
.rule .portions { background: var(--white); }
.rule .portions span { min-width: 40px; }


/* Haken statt Textsymbol bei erledigten Schritten */
.steps li.on::before { content: ""; background: var(--basil-500) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7'/%3E%3C/svg%3E") center / 18px no-repeat; }
.sheet-foot .btn-ghost { flex: 1; padding: 14px 8px; }
.sheet-foot .btn-primary { flex: 1.4; padding: 15px 10px; }

/* ═══════════ Feinschliff für kleine Smartphones (ab 320 px) ═══════════ */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
h1, h2, h3, p, .meta, .tag, .chip, .opt, .sub { overflow-wrap: break-word; hyphens: auto; -webkit-hyphens: auto; }
.card h3, .rec-t h3, .sw-body h3 { hyphens: auto; -webkit-hyphens: auto; }
.stat b { font-size: calc(clamp(14px, 4.6vw, 18px) * var(--fs, 1)); overflow-wrap: anywhere; }
.stat { min-width: 0; }
.portions button { width: 40px; height: 40px; }
.heart { width: 40px; height: 40px; }
.deck { height: clamp(250px, 42dvh, 330px); }
.swipe-stack { height: clamp(250px, calc(100dvh - 380px), 460px); }
.d-sheet { overflow-wrap: break-word; }
.tools b { white-space: nowrap; }

@media (max-width: 360px) {
  .view { padding-left: 16px; padding-right: 16px; }
  .hero { margin-left: -16px; margin-right: -16px; padding-left: 16px; padding-right: 16px; }
  .chips-scroll { margin-left: 0; margin-right: 0; }
  .page-head h1, .hero h1 { font-size: calc(30px * var(--fs, 1)); }
  .hero h1 { font-size: calc(32px * var(--fs, 1)); }
  .grid { gap: 10px; }
  .card h3 { font-size: calc(14.5px * var(--fs, 1)); }
  .meta { font-size: calc(11.5px * var(--fs, 1)); gap: 4px; }
  .day { grid-template-columns: 48px 1fr 1fr; gap: 6px; padding: 8px; }
  .slot { font-size: calc(11.5px * var(--fs, 1)); }
  .tab span { font-size: calc(10px * var(--fs, 1)); }
  .sheet-body, .sheet-head, .sheet-foot { padding-left: 16px; padding-right: 16px; }
  .d-sheet { padding-left: 16px; padding-right: 16px; }
  .stats { gap: 6px; }
  .ing li .q { min-width: 62px; }
  .seg button { font-size: calc(13px * var(--fs, 1)); }
  .rec { grid-template-columns: 92px 1fr; }
  .q-hide-sm { display: none; }
}
@media (max-height: 680px) {
  #mode-sub { display: none; }
  .page-head { margin-bottom: 12px; }
}
