/* ---------- Farben & Stile (Wähle deinen Stil) ---------- */
:root {
  --bg: #f3eee6;
  --paper: #fffdf9;
  --ink: #2f2b27;
  --muted: #8a8279;
  --line: #ebe3d8;
  --marker: #fff0a0;
  --accent: #f2c4cc;      /* Pastell */
  --accent-ink: #a2526a;  /* dunkle Variante für Text/Knöpfe */
  --tint: #fcf0f2;        /* ganz hell */
  --radius: 18px;
  --shadow: 0 1px 2px rgba(60, 45, 30, .06), 0 12px 32px -12px rgba(60, 45, 30, .18);
  --hand: 'Caveat', 'Segoe Print', cursive;
  --sans: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --nav-h: 64px;
  color-scheme: light;
}
[data-theme="flieder"]   { --accent: #d8c7ea; --accent-ink: #6f5596; --tint: #f5f0fa; }
[data-theme="graphit"]   { --accent: #9b9a98; --accent-ink: #3f3e3c; --tint: #f1f0ee; }
[data-theme="zitrone"]   { --accent: #f4e8a0; --accent-ink: #8a7417; --tint: #fcf8e3; --marker: #ffd9c2; }
[data-theme="minze"]     { --accent: #c9e6d4; --accent-ink: #3f7d5a; --tint: #eff8f2; }
[data-theme="pfirsich"]  { --accent: #f8d0b4; --accent-ink: #a65a2c; --tint: #fdf2ea; }
[data-theme="nebel"]     { --accent: #dedcd8; --accent-ink: #5f5b55; --tint: #f6f5f3; }
[data-theme="salbei"]    { --accent: #b5cba5; --accent-ink: #4f6b3e; --tint: #f1f5ed; }
[data-theme="rose"]      { --accent: #f2c4cc; --accent-ink: #a2526a; --tint: #fcf0f2; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 15px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }

/* ---------- Buch & Register-Reiter ---------- */
.book {
  max-width: 1180px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
}
.page {
  flex: 1;
  min-width: 0;
  background: var(--paper);
  min-height: 100vh;
  padding: 0 16px calc(var(--nav-h) + 32px + env(safe-area-inset-bottom));
  outline: none;
}
.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: flex; justify-content: space-around;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.tabs a {
  position: relative; flex: 1; height: var(--nav-h);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  text-decoration: none; font-size: 11px; color: var(--muted);
}
.tabs a.on { color: var(--accent-ink); font-weight: 500; }
.tabs a.on svg { fill: color-mix(in srgb, var(--accent) 70%, transparent); }
.badge:empty { display: none; }
.badge {
  position: absolute; top: 8px; left: calc(50% + 6px);
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--accent-ink); color: #fff; font: 600 10px/18px var(--sans); text-align: center;
}

@media (min-width: 900px) {
  body { padding: 28px 24px; }
  .book { min-height: auto; }
  .page {
    border-radius: 22px 6px 6px 22px;
    box-shadow: var(--shadow);
    min-height: calc(100vh - 56px);
    padding: 0 48px 56px;
  }
  /* Reiter rechts am Rand wie im digitalen Planer */
  .tabs {
    position: sticky; top: 64px; left: auto; right: auto; bottom: auto;
    flex-direction: column; justify-content: flex-start; gap: 6px;
    background: none; backdrop-filter: none; -webkit-backdrop-filter: none; border: 0;
    padding: 0;
  }
  .tabs a {
    flex: none; height: auto; width: 44px; padding: 18px 0;
    writing-mode: vertical-rl;
    flex-direction: row; gap: 8px;
    border-radius: 0 12px 12px 0;
    background: color-mix(in srgb, var(--accent) 45%, var(--paper));
    color: var(--ink); font-size: 12.5px; letter-spacing: .02em;
    box-shadow: 4px 4px 12px -6px rgba(60, 45, 30, .25);
    transition: width .2s, background .2s;
  }
  .tabs a:nth-child(2) { background: color-mix(in srgb, var(--accent) 65%, var(--paper)); }
  .tabs a:nth-child(3) { background: color-mix(in srgb, var(--accent) 85%, var(--paper)); }
  .tabs a:nth-child(4) { background: var(--accent); }
  .tabs a:nth-child(5) { background: color-mix(in srgb, var(--accent) 80%, var(--ink) 8%); }
  .tabs a:hover, .tabs a.on { width: 54px; }
  .tabs a.on { background: var(--paper); color: var(--accent-ink); box-shadow: 4px 4px 12px -6px rgba(60, 45, 30, .3); }
  .tabs a svg { transform: rotate(90deg); width: 18px; height: 18px; }
  .badge { top: 6px; left: auto; right: 4px; writing-mode: horizontal-tb; }
}

/* ---------- Allgemeine Bausteine ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 8px;
  margin: 0 -16px; padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
@media (min-width: 900px) { .topbar { margin: 0 -48px; padding: 18px 48px 12px; border-radius: 22px 6px 0 0; } }
.topbar h1 { flex: 1; margin: 0; font: 300 20px/1.2 var(--sans); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-btn {
  width: 42px; height: 42px; border-radius: 50%; border: 0; background: transparent;
  display: inline-grid; place-items: center; cursor: pointer; text-decoration: none; color: var(--ink);
}
.icon-btn:hover { background: var(--tint); }
.icon-btn.on svg { fill: var(--accent); stroke: var(--accent-ink); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--paper); cursor: pointer; text-decoration: none; font-size: 14px; white-space: nowrap;
}
.btn:hover { border-color: var(--accent); background: var(--tint); }
.btn.primary { background: var(--accent-ink); border-color: var(--accent-ink); color: #fff; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.soft { background: var(--tint); border-color: transparent; color: var(--accent-ink); }
.btn.danger { color: #b3261e; }
.btn svg { width: 18px; height: 18px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.muted { color: var(--muted); }
.hand { font-family: var(--hand); }
.empty { text-align: center; padding: 48px 16px; color: var(--muted); }
.empty .hand { font-size: 30px; color: var(--accent-ink); display: block; margin-bottom: 6px; }

.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field > span { font-size: 13px; color: var(--muted); }
input[type=text], input[type=url], input[type=number], input[type=password], input[type=search], textarea, select {
  width: 100%; border: 1px solid var(--line); border-radius: 12px; background: #fff;
  padding: 11px 14px; font-size: 16px; outline: none;
}
input:focus, textarea:focus, select:focus { border-color: var(--accent-ink); box-shadow: 0 0 0 3px var(--tint); }
textarea { resize: vertical; min-height: 120px; line-height: 1.6; }
.hint { font-size: 12.5px; color: var(--muted); margin: -10px 0 16px; }

/* ---------- Umschlag (Startseite) ---------- */
.cover {
  margin: 0 -16px 20px;
  padding: calc(34px + env(safe-area-inset-top)) 20px 30px;
  text-align: center;
  background-color: var(--paper);
  background-image:
    linear-gradient(90deg, color-mix(in srgb, var(--accent) 45%, transparent) 50%, transparent 50%),
    linear-gradient(color-mix(in srgb, var(--accent) 45%, transparent) 50%, transparent 50%);
  background-size: 34px 34px;
  position: relative;
}
@media (min-width: 900px) { .cover { margin: 0 -48px 28px; border-radius: 22px 6px 0 0; padding: 48px 48px 40px; } }
.cover-card {
  display: inline-block; background: var(--paper); border-radius: 16px;
  padding: 18px 28px 20px; box-shadow: var(--shadow); max-width: 100%;
}
.cover-card .dots { display: flex; justify-content: center; gap: 3px; margin-bottom: 4px; }
.cover-card .dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--accent-ink); }
.cover-card .dots i:nth-child(2) { transform: translateY(-5px); }
.cover h1 { margin: 0; font: 700 44px/1 var(--hand); color: var(--ink); }
.cover p { margin: 6px 0 0; font-size: 13px; color: var(--muted); }
.searchbar {
  display: flex; align-items: center; gap: 8px; max-width: 520px; margin: 18px auto 0;
  background: #fff; border-radius: 999px; padding: 4px 6px 4px 16px; box-shadow: var(--shadow);
}
.searchbar svg { color: var(--muted); }
.searchbar input { border: 0; box-shadow: none !important; padding: 10px 4px; background: transparent; }

.index { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 10px; margin-bottom: 8px; scrollbar-width: none; }
.index::-webkit-scrollbar { display: none; }
.chip {
  flex: none; border: 1px solid var(--line); background: var(--paper); border-radius: 999px;
  padding: 7px 14px; font-size: 13.5px; cursor: pointer; white-space: nowrap;
}
.chip b { font-weight: 500; color: var(--muted); margin-left: 4px; }
.chip.on { background: var(--accent); border-color: var(--accent); color: var(--ink); }
.chip.on b { color: var(--accent-ink); }

.toolbar { display: flex; align-items: center; gap: 10px; margin: 6px 0 16px; flex-wrap: wrap; }
.toolbar h2 { margin: 0 auto 0 0; font: 700 26px/1 var(--hand); color: var(--accent-ink); }
.toolbar select { width: auto; padding: 8px 12px; font-size: 14px; border-radius: 999px; }

.shelf { margin-bottom: 26px; }
.shelf .scroller { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.shelf .card { width: 180px; flex: none; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px; }
@media (min-width: 600px) { .grid { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 22px; } }
.card {
  position: relative; display: block; text-decoration: none; color: inherit;
  background: #fff; border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 1px 2px rgba(60, 45, 30, .05), 0 8px 20px -14px rgba(60, 45, 30, .35);
  transition: transform .15s, box-shadow .15s;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.card .ph { aspect-ratio: 4 / 3; background: var(--tint); display: grid; place-items: center; color: var(--accent-ink); overflow: hidden; }
.card .ph img { width: 100%; height: 100%; object-fit: cover; }
.card .ph svg { width: 40px; height: 40px; opacity: .5; }
.card .body { padding: 10px 12px 12px; }
.card h3 { margin: 0; font: 400 15px/1.3 var(--sans); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .meta { margin-top: 6px; font-size: 12px; color: var(--muted); display: flex; gap: 10px; align-items: center; }
.card .meta svg { width: 14px; height: 14px; }
.card .fav { position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; border-radius: 50%; background: rgba(255,255,255,.9); display: grid; place-items: center; color: var(--accent-ink); }
.card .fav svg { width: 16px; height: 16px; fill: var(--accent); }
.card .pick { position: absolute; top: 8px; left: 8px; width: 28px; height: 28px; border-radius: 50%; background: rgba(255,255,255,.95); border: 2px solid var(--accent-ink); display: grid; place-items: center; color: #fff; }
.card .pick svg { width: 16px; height: 16px; opacity: 0; }
.card.picked .pick { background: var(--accent-ink); }
.card.picked .pick svg { opacity: 1; }
.card.picked { outline: 3px solid var(--accent-ink); }

.fab {
  position: fixed; right: 18px; bottom: calc(var(--nav-h) + 18px + env(safe-area-inset-bottom)); z-index: 25;
  width: 58px; height: 58px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--accent-ink); color: #fff; display: grid; place-items: center; box-shadow: var(--shadow);
}
.fab svg { width: 26px; height: 26px; stroke-width: 2; }
@media (min-width: 900px) { .fab { right: calc(50% - 560px); bottom: 40px; } }
@media (min-width: 900px) and (max-width: 1230px) { .fab { right: 90px; } }

.menu {
  position: fixed; inset: 0; z-index: 60; background: rgba(40, 30, 20, .3);
  display: flex; align-items: flex-end; justify-content: center; animation: fade .15s;
}
.menu .sheet {
  width: 100%; max-width: 460px; background: var(--paper); border-radius: 22px 22px 0 0;
  padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); display: grid; gap: 8px;
}
@media (min-width: 600px) { .menu { align-items: center; } .menu .sheet { border-radius: 22px; } }
.menu .sheet h3 { margin: 0 0 6px; font: 700 26px/1 var(--hand); color: var(--accent-ink); text-align: center; }
.menu .sheet .btn { justify-content: flex-start; min-height: 52px; border-radius: 14px; }
@keyframes fade { from { opacity: 0; } }

/* ---------- Rezeptseite (Planer-Seite) ---------- */
.recipe { padding-top: 8px; }
.r-head { display: grid; gap: 22px; margin-bottom: 26px; }
.r-title { margin: 0; font: 300 30px/1.15 var(--sans); letter-spacing: -.01em; }
@media (min-width: 700px) { .r-title { font-size: 38px; } }
.sticker {
  display: inline-block; font: 700 26px/1 var(--hand); color: var(--accent-ink);
  transform: rotate(-4deg); margin: 6px 0 2px;
  text-shadow: 2px 2px 0 var(--accent);
}
.r-desc { color: var(--muted); margin: 10px 0 0; }
.r-facts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.fact {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px;
  background: var(--tint); font-size: 13px;
}
.fact svg { width: 16px; height: 16px; color: var(--accent-ink); }
.r-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.r-tags a { font-size: 12.5px; text-decoration: none; color: var(--accent-ink); border-bottom: 1px dashed var(--accent); }

.photo { position: relative; margin: 12px 8px 0; }
.photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; box-shadow: var(--shadow); transform: rotate(1.2deg); background: var(--tint); }
.photo::before, .photo::after {   /* Washi-Tape */
  content: ''; position: absolute; z-index: 2; width: 92px; height: 26px;
  background: color-mix(in srgb, var(--accent) 75%, transparent);
  background-image: repeating-linear-gradient(45deg, rgba(255,255,255,.35) 0 6px, transparent 6px 12px);
  opacity: .9;
}
.photo::before { top: -12px; left: 18px; transform: rotate(-8deg); }
.photo::after { bottom: -10px; right: 18px; transform: rotate(-6deg); }
@media (min-width: 760px) {
  .r-head { grid-template-columns: 1fr 340px; align-items: start; }
}

.cols { display: grid; gap: 30px; }
@media (min-width: 760px) { .cols { grid-template-columns: 340px 1fr; gap: 44px; } .cols .ing { order: 0; } }

.label { font: 700 28px/1 var(--hand); color: var(--accent-ink); margin: 0 0 12px; display: flex; align-items: center; gap: 10px; }

.servings { display: flex; align-items: center; gap: 4px; margin-bottom: 10px; }
.servings .icon-btn { width: 36px; height: 36px; background: var(--tint); }
.servings strong { min-width: 96px; text-align: center; font-weight: 500; }
.factor { font-size: 12.5px; color: var(--accent-ink); margin: -4px 0 8px; }
.factor button { border: 0; background: none; color: var(--muted); text-decoration: underline; cursor: pointer; font-size: 12.5px; }

.lined { list-style: none; margin: 0; padding: 0; }
.lined li {
  display: flex; gap: 10px; align-items: baseline;
  padding: 8px 2px; border-bottom: 1px solid var(--line); line-height: 1.45;
}
.lined li.sec { border-bottom: 0; padding-top: 18px; font: 700 22px/1 var(--hand); color: var(--accent-ink); }
.lined .amt { min-width: 74px; font-weight: 500; text-align: right; cursor: pointer; border-radius: 6px; }
.lined .amt:hover { background: var(--tint); }
.lined .amt:empty { min-width: 74px; }
.lined li.done { color: var(--muted); text-decoration: line-through; }
.tick {
  width: 22px; height: 22px; flex: none; border-radius: 6px; border: 1.5px solid var(--accent-ink);
  display: grid; place-items: center; cursor: pointer; background: #fff; align-self: center;
}
.tick svg { width: 14px; height: 14px; stroke: #fff; stroke-width: 3; opacity: 0; }
.done .tick, .tick.on { background: var(--accent-ink); }
.done .tick svg, .tick.on svg { opacity: 1; }

.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; }
.steps li { margin-bottom: 20px; }
.steps li.sec { font: 700 24px/1 var(--hand); color: var(--accent-ink); margin: 26px 0 12px; }
.steps .no {
  display: inline-flex; align-items: center; gap: 8px;
  font: 700 21px/1 var(--hand); padding: 3px 12px 4px 8px; margin-bottom: 6px;
  background: var(--marker); border-radius: 4px 14px 6px 16px; transform: rotate(-1.2deg);
  cursor: pointer; user-select: none;
}
.steps .no .tick { width: 18px; height: 18px; border-radius: 5px; }
.steps li.done p { color: var(--muted); }
.steps li.done .no { background: var(--line); }
.steps p { margin: 0; }
.timer-link { color: var(--accent-ink); font-weight: 500; border-bottom: 1px dashed var(--accent-ink); cursor: pointer; white-space: nowrap; }
.timer-link svg { width: 14px; height: 14px; vertical-align: -2px; margin-right: 2px; }
.rlink { color: var(--accent-ink); font-weight: 500; }

.notes {
  margin-top: 28px; padding: 14px 18px; border-radius: 14px; background: var(--tint);
  font: 500 22px/1.45 var(--hand); white-space: pre-wrap;
}
.notes .label { font-size: 24px; margin-bottom: 4px; }
.source { margin-top: 18px; font-size: 13px; color: var(--muted); word-break: break-all; }
.source a { color: var(--accent-ink); }

.actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 34px 0 10px; padding-top: 20px; border-top: 1px dashed var(--line); }

/* ---------- Editor ---------- */
.editor { max-width: 860px; padding-top: 8px; }
.ed-grid { display: grid; gap: 0 18px; }
@media (min-width: 700px) { .ed-grid.two { grid-template-columns: 1fr 1fr; } .ed-grid.four { grid-template-columns: repeat(4, 1fr); } }
.ed-photo {
  border: 2px dashed var(--line); border-radius: var(--radius); background: var(--tint);
  aspect-ratio: 16 / 9; display: grid; place-items: center; cursor: pointer; overflow: hidden; position: relative;
  margin-bottom: 16px; color: var(--accent-ink);
}
.ed-photo img { width: 100%; height: 100%; object-fit: cover; }
.ed-photo .over { position: absolute; right: 10px; bottom: 10px; display: flex; gap: 6px; }
.tagpick { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }

/* ---------- Kochliste & Einkauf ---------- */
.cook-tabs { display: flex; gap: 8px; overflow-x: auto; margin-bottom: 18px; padding-bottom: 4px; }
.cook-tabs button { flex: none; display: flex; align-items: center; gap: 8px; }
.shop-add { display: flex; gap: 8px; margin-bottom: 18px; }
.shop-group { margin-bottom: 18px; }
.shop-group h4 { margin: 0 0 4px; font: 700 22px/1 var(--hand); color: var(--accent-ink); }
.shop-group h4 a { text-decoration: none; }
.lined li .del { margin-left: auto; opacity: .5; }

/* ---------- Mehr / Einstellungen ---------- */
.settings { max-width: 720px; padding-top: 8px; }
.panel { background: #fff; border-radius: var(--radius); padding: 18px; margin-bottom: 18px; border: 1px solid var(--line); }
.panel h3 { margin: 0 0 12px; font: 700 24px/1 var(--hand); color: var(--accent-ink); }
.swatches { display: flex; gap: 12px; flex-wrap: wrap; }
.swatch { width: 40px; height: 40px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px var(--line); cursor: pointer; }
.swatch.on { box-shadow: 0 0 0 2px var(--ink); }

/* ---------- Anmelden (geteilte Seite) ---------- */
body.out .tabs { display: none; }
body.out .page { padding: 0; overflow: hidden; }
.kicker { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin: 0; }
.auth { display: grid; min-height: 100vh; }
@media (min-width: 900px) {
  body.out .page { min-height: calc(100vh - 56px); }
  .auth { grid-template-columns: 1.1fr 1fr; min-height: calc(100vh - 56px); }
}
.auth-art {
  position: relative; display: flex; flex-direction: column; gap: 22px;
  padding: calc(22px + env(safe-area-inset-top)) 22px 26px;
  background-color: var(--tint);
  background-image:
    linear-gradient(90deg, color-mix(in srgb, var(--accent) 40%, transparent) 50%, transparent 50%),
    linear-gradient(color-mix(in srgb, var(--accent) 40%, transparent) 50%, transparent 50%);
  background-size: 34px 34px;
}
@media (min-width: 900px) { .auth-art { padding: 36px 44px; justify-content: space-between; } }
.brand { display: flex; align-items: center; gap: 10px; font: 600 18px/1 var(--sans); }
.brand .dots { display: inline-flex; gap: 2px; background: var(--paper); padding: 8px 7px; border-radius: 10px; box-shadow: var(--shadow); }
.brand .dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent-ink); }
.brand .dots i:nth-child(2) { transform: translateY(-3px); }
.auth-copy { background: color-mix(in srgb, var(--paper) 88%, transparent); border-radius: 18px; padding: 18px 20px; max-width: 460px; box-shadow: var(--shadow); }
.auth-copy h1 { margin: 10px 0 8px; font: 300 32px/1.12 var(--sans); letter-spacing: -.01em; }
@media (min-width: 900px) { .auth-copy h1 { font-size: 44px; } .auth-copy { padding: 26px 28px; } }
.auth-copy h1 .hand { font-size: 1.15em; font-weight: 700; color: var(--accent-ink); }
.auth-copy .lead { margin: 0; color: var(--muted); }
.minis { display: none; }
@media (min-width: 900px) {
  .minis { display: flex; gap: 14px; align-items: flex-end; }
  .mini {
    width: 132px; height: 132px; border-radius: 12px; padding: 12px; position: relative;
    display: flex; flex-direction: column; justify-content: space-between; box-shadow: var(--shadow);
  }
  .mini small { font-size: 9px; letter-spacing: .14em; text-transform: uppercase; }
  .m1 { background: var(--accent); transform: rotate(-4deg); }
  .m1 b { width: 64px; height: 64px; border-radius: 50%; background: var(--accent-ink); align-self: center; margin-bottom: 8px; }
  .m2 { background: var(--paper); transform: rotate(2deg) translateY(10px); color: var(--accent-ink); }
  .m2 svg { width: 60px; height: 60px; align-self: center; margin-bottom: 10px; stroke-width: 1.3; }
  .m3 { background: var(--ink); color: #fff; transform: rotate(5deg) translateY(-14px); }
  .m3 small { color: rgba(255,255,255,.7); }
  .m3 .hand { font-size: 26px; line-height: 1; }
}
.auth-art .foot { display: none; }
@media (min-width: 900px) { .auth-art .foot { display: block; } }

.auth-form { display: flex; flex-direction: column; justify-content: center; padding: 28px 22px calc(28px + env(safe-area-inset-bottom)); }
@media (min-width: 900px) { .auth-form { padding: 36px 56px; } }
.auth-form form { width: 100%; max-width: 380px; margin: 0 auto; }
.auth-form .lock { width: 44px; height: 44px; border-radius: 12px; background: var(--tint); color: var(--accent-ink); display: grid; place-items: center; margin-bottom: 18px; }
.auth-form h2 { margin: 6px 0 6px; font: 400 26px/1.2 var(--sans); }
.auth-form .sub { margin: 0 0 22px; font-size: 13.5px; }
.auth-form .btn.wide { width: 100%; justify-content: space-between; padding: 0 18px; min-height: 50px; border-radius: 12px; }
.auth-form .msg { min-height: 20px; margin: 10px 0 0; font-size: 13.5px; color: #b3261e; }
.auth-form hr { border: 0; border-top: 1px solid var(--line); margin: 12px 0 14px; }
.auth-form .note { font-size: 13px; margin: 0; }
.auth-form > .foot { text-align: center; margin-top: 28px; }
.pw { position: relative; display: block; }
.pw input { padding-right: 48px; }
.pw .eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border: 0; background: none; color: var(--muted); cursor: pointer; display: grid; place-items: center; }

/* ---------- Freigaben ---------- */
.who { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 999px; background: var(--tint); margin-bottom: 14px; }
.who button { border: 0; background: none; padding: 7px 14px; border-radius: 999px; cursor: pointer; font-size: 13.5px; color: var(--muted); }
.who button.on { background: var(--paper); color: var(--ink); font-weight: 500; box-shadow: 0 1px 3px rgba(60,45,30,.12); }
.card .owner { position: absolute; left: 8px; top: 8px; height: 24px; padding: 0 10px; border-radius: 999px; background: rgba(255,255,255,.92); font: 700 16px/24px var(--hand); color: var(--accent-ink); }
.card .pick ~ .owner { display: none; }
.sharebadge {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; padding: 5px 12px; border-radius: 999px;
  border: 1px dashed var(--accent-ink); background: none; color: var(--accent-ink); font-size: 13px; cursor: pointer;
}
.sharebadge svg { width: 15px; height: 15px; }
.sharebadge.other { border-style: solid; border-color: var(--accent); background: var(--tint); cursor: default; }
.sharepick { display: flex; flex-wrap: wrap; gap: 8px; }
.sp { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; font-size: 14.5px; }
.sp input { position: absolute; opacity: 0; pointer-events: none; }
.sp:has(input:checked) { border-color: var(--accent-ink); background: var(--tint); }
.sp:has(input:checked) .tick { background: var(--accent-ink); }
.sp:has(input:checked) .tick svg { opacity: 1; }
.sp:has(input:focus-visible) { outline: 2px solid var(--accent-ink); }
.sp-hint { font-size: 12.5px; margin: 8px 0 0; }
.menu .sheet .sharepick { justify-content: center; margin: 6px 0; }
.menu .sheet .sp-hint { text-align: center; }

/* ---------- Timer, Toast, Sync ---------- */
.timers { position: fixed; z-index: 50; left: 50%; transform: translateX(-50%); top: calc(10px + env(safe-area-inset-top)); display: grid; gap: 8px; }
.timer {
  display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 16px; border-radius: 999px;
  background: var(--ink); color: #fff; box-shadow: var(--shadow); font-size: 14px;
}
.timer b { font-variant-numeric: tabular-nums; font-weight: 600; font-size: 16px; }
.timer.ring { background: #c0392b; animation: pulse 1s infinite; }
.timer button { border: 0; background: rgba(255,255,255,.15); color: #fff; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; }
.timer button svg { width: 16px; height: 16px; }
@keyframes pulse { 50% { transform: scale(1.04); } }
.toast {
  position: fixed; z-index: 70; left: 50%; bottom: calc(var(--nav-h) + 24px + env(safe-area-inset-bottom));
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 999px; font-size: 14px;
  transition: .2s; max-width: calc(100vw - 32px); text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (min-width: 900px) { .toast { bottom: 32px; } }
.sync { position: fixed; z-index: 40; right: 10px; top: calc(10px + env(safe-area-inset-top)); width: 8px; height: 8px; border-radius: 50%; background: transparent; }
.sync.busy { background: var(--accent-ink); animation: pulse 1s infinite; }
.sync.offline { background: #c98a1b; }
.sync.error { background: #c0392b; }

/* ---------- Druck / PDF ---------- */
.print-only { display: none; }
@media print {
  @page { margin: 14mm; }
  body { background: #fff; padding: 0; font-size: 11pt; }
  .tabs, .topbar, .fab, .actions, .timers, .toast, .sync, .no-print, .servings .icon-btn, .factor button { display: none !important; }
  .print-only { display: block; }
  .page { box-shadow: none; padding: 0; min-height: 0; }
  .book { display: block; max-width: none; }
  .recipe { break-after: page; }
  .recipe:last-child { break-after: auto; }
  .photo img { transform: none; max-height: 70mm; }
  .photo::before, .photo::after { display: none; }
  .tick { display: none; }
  .cols { grid-template-columns: 70mm 1fr !important; gap: 10mm !important; }
  .r-head { grid-template-columns: 1fr 70mm !important; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
