/* Paar-Ops: mobil zuerst, Farben und Formen vom PoC (app/previews/paar-ops).
 * Keine Inline-Stile im HTML; die CSP erlaubt Stile nur aus dieser Datei. */
:root {
  --g: #427b62;
  --g-dark: #306148;
  --p: #f6f8f5;
  --l: #dce4de;
  --i: #26372f;
  --m: #69766f;
  --warn: #fff3dd;
  --err: #a33a2f;
  --touch: 48px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--p);
  color: var(--i);
  font: 16px/1.45 system-ui, sans-serif;
  -webkit-tap-highlight-color: transparent;
}
.app {
  max-width: 760px;
  margin: 0 auto;
  padding: 16px 14px calc(92px + env(safe-area-inset-bottom));
  outline: none;
}
.app.bare { padding-bottom: 24px; }
h1, h2, h3 { margin: 0; }
h1 { font-size: 22px; }
h2 { font-size: 18px; }
h3 { font-size: 16px; }
p { margin: 6px 0; }
a { color: var(--g-dark); }
.muted { color: var(--m); font-size: 14px; }
.hidden { display: none !important; }
.row { display: flex; align-items: center; gap: 8px; }
.space { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }

.card {
  margin-top: 14px;
  padding: 15px;
  background: #fff;
  border: 1px solid var(--l);
  border-radius: 16px;
  box-shadow: 0 7px 22px #26372f12;
}
.tabelle { width: 100%; border-collapse: collapse; font-size: 14px; }
.tabelle th, .tabelle td { padding: 5px 6px; border-bottom: 1px solid var(--l); text-align: right; }
.tabelle th:first-child, .tabelle td:first-child { text-align: left; }
.scroll { overflow-x: auto; }
.notice { background: var(--warn); padding: 10px 12px; border-radius: 10px; font-size: 14px; }
.error { color: var(--err); font-size: 14px; min-height: 1.4em; }

button, input, select, textarea { font: inherit; color: inherit; }
button, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: var(--touch);
  padding: 9px 16px;
  background: var(--g);
  color: #fff;
  border: 0;
  border-radius: 12px;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
}
button.alt, .button.alt { background: #fff; color: var(--i); border: 1px solid var(--l); }
button.danger { background: #fff; color: var(--err); border: 1px solid var(--l); }
button.icon { min-width: var(--touch); padding: 9px; background: none; color: var(--m); font-size: 20px; }
button:disabled { opacity: 0.5; cursor: default; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible {
  outline: 3px solid #9bceb0;
  outline-offset: 1px;
}
label { display: block; font-size: 14px; font-weight: bold; margin: 12px 0 4px; }
input, select, textarea {
  width: 100%;
  min-height: var(--touch);
  padding: 10px;
  border: 1px solid var(--l);
  border-radius: 10px;
  background: #fff;
}
textarea { min-height: 96px; }
input[type="checkbox"] { width: 28px; min-height: 28px; height: 28px; flex: none; accent-color: var(--g); }
input[type="file"] { padding: 8px; }
.actions { display: flex; gap: 8px; overflow-x: auto; margin-top: 10px; padding-bottom: 3px; }
.actions > * { white-space: nowrap; flex: none; }

.tabs {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  background: #fffffff5;
  border-top: 1px solid var(--l);
  padding-bottom: env(safe-area-inset-bottom);
  display: flex;
  justify-content: center;
}
.tabs div { display: flex; width: min(760px, 100%); }
.tabs a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-height: 60px;
  padding: 8px 2px;
  color: var(--m);
  font-size: 12px;
  text-decoration: none;
  border-top: 3px solid transparent;
}
.tabs a span { font-size: 22px; line-height: 1; }
.tabs a.active { color: var(--g-dark); border-top-color: var(--g); font-weight: bold; }

.status {
  position: sticky;
  top: 0;
  z-index: 4;
  padding: 8px 14px;
  background: var(--warn);
  font-size: 14px;
  text-align: center;
}
.status button { min-height: 36px; padding: 4px 12px; margin-left: 8px; }

.item {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 11px 0;
  border-bottom: 1px solid var(--l);
}
.item:last-child, .line:last-child { border-bottom: 0; }
a.item { color: inherit; text-decoration: none; min-height: var(--touch); }
.item p { margin: 2px 0; font-size: 14px; color: var(--m); }
.card > .pic { height: auto; max-height: 260px; }
.pic {
  height: 57px;
  border-radius: 11px;
  background: linear-gradient(135deg, #d5e9db, #f3d7a7);
  display: grid;
  place-items: center;
  font-size: 24px;
  overflow: hidden;
}
.pic img { width: 100%; height: 100%; object-fit: cover; }
.line { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--l); min-height: var(--touch); }
.line.done .grow { text-decoration: line-through; color: var(--m); }
.shopping-group + .shopping-group { margin-top: 16px; }
.shopping-group h3 { color: var(--g-dark); font-size: 14px; margin: 0 0 2px; }
.checked-by { display: block; margin-top: 1px; text-decoration: none; }
.badge { font-size: 12px; color: var(--g-dark); background: #e2f0e8; border-radius: 12px; padding: 3px 8px; }
.badge.warn { background: var(--warn); color: #7a5200; }

.week { display: grid; gap: 10px; }
.day { padding: 10px 0; border-bottom: 1px solid var(--l); }
.day:last-child { border-bottom: 0; }
.day.today h3 { color: var(--g-dark); }
.slot { display: grid; grid-template-columns: 64px 1fr; gap: 8px; align-items: center; margin-top: 6px; }
.slot .muted { font-size: 13px; }

.steps { padding-left: 22px; }
.steps li { margin: 8px 0; }
.cook-step { font-size: clamp(24px, 6vw, 40px); line-height: 1.25; margin: 24px 0; min-height: 30vh; }
.cook-mode {
  position: fixed;
  inset: 0;
  z-index: 6;
  overflow-y: auto;
  background: var(--p);
  padding: max(16px, env(safe-area-inset-top)) 14px calc(20px + env(safe-area-inset-bottom));
}
.cook-mode > * { max-width: 760px; margin-left: auto; margin-right: auto; }
.cook-ingredients, .cook-timers { background: #fff; border: 1px solid var(--l); border-radius: 16px; padding: 14px; margin-top: 14px; }
.cook-ingredients ul { margin: 8px 0; padding-left: 22px; }
.cook-ingredients details { margin-top: 12px; color: var(--m); }
.cook-ingredients summary { cursor: pointer; font-weight: 650; }
.timer { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--l); }
.timer:last-child { border-bottom: 0; }
.timer-clock { margin-left: auto; font-variant-numeric: tabular-nums; }
.cook-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 18px; }
.cook-nav button { min-width: 42%; }

.sheet {
  position: fixed;
  inset: 0;
  z-index: 5;
  overflow-y: auto;
  background: var(--p);
  padding: 16px 14px calc(24px + env(safe-area-inset-bottom));
}
.sheet > div { max-width: 760px; margin: 0 auto; }

.center { min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.center > .card { width: min(440px, 100%); }
.brand { font-size: 26px; font-weight: 800; color: var(--g-dark); margin-bottom: 4px; }
.loader {
  display: inline-block;
  width: 19px;
  height: 19px;
  border: 3px solid var(--l);
  border-top-color: var(--g);
  border-radius: 50%;
  vertical-align: middle;
  animation: s 0.7s linear infinite;
}
@keyframes s { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .loader { animation: none; } }
@media (min-width: 600px) { .app { padding-top: 25px; } }
