/* iOS-App-Optik mit Farben von quäntchen + glück (Türkis, Blau, Koralle, Gelb …, rundes Logo).
   Fürs Smartphone gebaut: Touchflächen ≥ 48 px, Tab-Leiste unten, Sheets mit Wischgeste.
   Alles lokal: Schrift und Logo liegen bei der App, es gibt keine Verbindung zur Website. */
:root {
  --lime: #40bfb8; --on-lime: #1c1c1e; --mint: #d5f2f0; --tint: #1f3f76;
  --bg: #f2f2f7; --card: #fff; --field: #f2f2f7; --text: #1c1c1e; --sub: #6e6e73; --line: #e0e0e5;
  --btn: #e9e9ee; --danger: #d70015; --blur: rgba(249,249,251,.86);
  --sat: env(safe-area-inset-top); --sab: env(safe-area-inset-bottom);
  --r: 14px; --tab-h: 58px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #1b1d20; --card: #2a2e32; --field: #1b1d20; --text: #f2f2f4; --sub: #9a9fa5; --line: #3d4348; --btn: #3a4045; --tint: #8fb0e8; --danger: #ff6b76; --blur: rgba(27,29,32,.86); }
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.4 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif; -webkit-text-size-adjust: 100%; overscroll-behavior-y: none; }
body.noscroll { overflow: hidden; }
button, a, select, input, textarea, label { touch-action: manipulation; }
#app { max-width: 720px; margin: 0 auto; min-height: 100dvh; padding-bottom: calc(var(--tab-h) + 40px + var(--sab)); }
main { padding: 0 16px; }
h1 { font-size: 32px; font-weight: 700; letter-spacing: -.02em; line-height: 1.12; margin: 6px 0 4px; }
h2 { margin: 2px 0 6px; font-size: 22px; font-weight: 700; letter-spacing: -.01em; }
.sub { color: var(--sub); font-size: 15px; }
.center { text-align: center; }
.grow { flex: 1; min-width: 0; }
svg.ic { display: block; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Navigationsleiste: bleibt oben, Titel erscheint beim Scrollen */
.top { position: sticky; top: 0; z-index: 20; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: calc(var(--sat) + 4px) 8px 0; min-height: calc(52px + var(--sat)); background: var(--blur); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid transparent; transition: border-color .15s; }
.top.scrolled { border-bottom-color: var(--line); }
.top .navtitle { font-weight: 600; font-size: 17px; max-width: 46vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; opacity: 0; transition: opacity .15s; text-align: center; }
.top.scrolled .navtitle { opacity: 1; }
.top > :last-child { justify-self: end; }
.top.brand { display: flex; align-items: center; gap: 12px; padding: calc(var(--sat) + 12px) 20px 10px; }
.logo { height: 40px; width: auto; display: block; }
.back, .navbtn { display: inline-flex; align-items: center; gap: 2px; min-height: 48px; padding: 0 10px; color: var(--tint); background: none; border: 0; font: inherit; font-size: 17px; font-weight: 400; text-decoration: none; border-radius: 10px; }
.back:active, .navbtn:active { opacity: .5; }

/* Buttons: groß, sauber, ohne Großbuchstaben */
button, .button { font: inherit; font-size: 17px; font-weight: 600; border: 0; border-radius: var(--r); min-height: 50px; padding: 0 18px; background: var(--btn); color: var(--text); cursor: pointer; text-decoration: none; text-align: center; display: inline-flex; align-items: center; justify-content: center; gap: 8px; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
button:active, .button:active { opacity: .6; }
button:disabled { opacity: .35; }
button.primary, .button.primary { background: var(--lime); color: var(--on-lime); }
button.danger { color: var(--danger); background: transparent; }
button.link { background: none; color: var(--tint); min-height: 48px; min-width: 48px; padding: 0 6px; font-weight: 500; }
.wide { display: flex; width: 100%; margin: 10px 0; }

/* Inhalt in „Inset“-Karten */
.card { background: var(--card); border-radius: var(--r); overflow: hidden; }
.list { margin-top: 12px; }
.row { display: flex; align-items: center; gap: 14px; padding: 12px 14px; min-height: 76px; color: inherit; text-decoration: none; position: relative; }
.row + .row::before { content: ""; position: absolute; top: 0; left: 88px; right: 0; border-top: 1px solid var(--line); }
.row:active { background: var(--field); }
.row .title { font-weight: 600; font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .chev { color: var(--sub); font-size: 26px; line-height: 1; }
.cover { width: 60px; height: 60px; border-radius: 12px; background: var(--mint); color: #1c1c1e; display: grid; place-items: center; overflow: hidden; flex: none; font-size: 18px; }
.cover img { width: 100%; height: 100%; object-fit: cover; }

.empty { text-align: center; padding: 56px 16px; }
.empty p { margin: 4px 0; }
.empty .lead { font-size: 20px; font-weight: 600; }
.notes { background: var(--card); border-radius: var(--r); padding: 12px 14px; white-space: pre-wrap; font-size: 16px; margin: 14px 0 0; }

.agenda { display: flex; align-items: center; margin-top: 14px; background: var(--mint); color: #1c1c1e; }
@media (prefers-color-scheme: dark) { .agenda { background: var(--card); color: var(--text); } }
.agenda .cur { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 1px; background: none; text-align: left; color: inherit; font-weight: 400; padding: 10px 14px; min-height: 64px; border-radius: 0; }
.agenda .cur strong { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.agenda .link { margin-right: 6px; }
.actionrow { display: flex; flex-wrap: wrap; gap: 0 8px; margin-top: 4px; }
.actionrow .link { padding: 0 6px; }
.group { margin-top: 20px; }
.group h3 { margin: 0 0 8px; padding: 12px 16px; border-radius: 14px; background: var(--gbg, var(--card)); color: var(--gfg, var(--text)); font-size: 16px; font-weight: 700; display: flex; gap: 12px; align-items: baseline; }
.group h3 .t { font-weight: 500; font-variant-numeric: tabular-nums; opacity: .85; }
.group .tile .num { background: var(--gbg); color: var(--gfg); -webkit-backdrop-filter: none; backdrop-filter: none; }
.group .none { padding: 4px; }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; }
@media (min-width: 560px) { .grid { grid-template-columns: repeat(4, 1fr); } }
.tile { position: relative; padding: 0; min-height: 0; aspect-ratio: 1; overflow: hidden; border-radius: 10px; background: var(--card); display: block; }
.tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile .num { position: absolute; top: 6px; left: 6px; background: rgba(0,0,0,.55); color: #fff; font-size: 13px; font-weight: 600; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 12px; line-height: 24px; text-align: center; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.tile .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 8px 6px; font-size: 12px; font-weight: 500; color: #fff; text-align: left; background: linear-gradient(transparent, rgba(0,0,0,.7)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile.off img { opacity: .28; }
.tile .excl { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); text-align: center; font-size: 11px; font-weight: 600; color: var(--text); }
.tile .tick { position: absolute; right: 6px; top: 6px; width: 28px; height: 28px; border-radius: 50%; background: var(--lime); display: grid; place-items: center; }
.tile .tick::after { content: "✓"; color: var(--on-lime); font-size: 16px; font-weight: 700; }
.tile.off .tick { background: rgba(255,255,255,.9); border: 2px solid var(--line); }
.tile.off .tick::after { content: ""; }
.seriesbar { grid-column: 1 / -1; font-size: 13px; font-weight: 600; color: var(--tint); padding: 8px 4px 2px; }
.seriesbar:first-child { padding-top: 0; }

/* Tab-Leiste unten */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; align-items: flex-end; max-width: 720px; margin: 0 auto; padding: 6px 12px calc(6px + var(--sab)); background: var(--blur); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); border-top: 1px solid var(--line); }
.tab { flex: 1; flex-direction: column; gap: 2px; min-height: var(--tab-h); padding: 4px 0; background: none; color: var(--sub); font-size: 11px; font-weight: 500; border-radius: 12px; }
.tab:disabled { opacity: .3; }
.tab.shutter { color: var(--text); }
.tab.shutter .disc { width: 64px; height: 64px; border-radius: 50%; background: var(--lime); color: var(--on-lime); display: grid; place-items: center; margin-top: -26px; box-shadow: 0 4px 14px rgba(0,0,0,.22); border: 4px solid var(--bg); }
.tab.shutter:active .disc { transform: scale(.94); }
.tabbar .wide { margin: 0; }
.tabbar.single { padding-top: 10px; }

/* Sheets: von unten, mit Griff und Wischgeste */
.sheet { position: fixed; inset: 0; z-index: 40; display: flex; align-items: flex-end; justify-content: center; }
.backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.4); animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.panel { position: relative; width: 100%; max-width: 720px; max-height: 92dvh; overflow: auto; overscroll-behavior: contain; background: var(--card); border-radius: 22px 22px 0 0; padding: 0 18px 0; animation: up .25s cubic-bezier(.2,.8,.2,1); }
@keyframes up { from { transform: translateY(40px); opacity: .6; } }
.panel.dragging { transition: none; animation: none; }
.panel.settle { transition: transform .2s ease-out; }
.grabber { position: sticky; top: 0; z-index: 2; display: flex; justify-content: center; padding: 10px 0 14px; margin: 0 -18px; background: var(--card); touch-action: none; }
.grabber::before { content: ""; width: 40px; height: 5px; border-radius: 3px; background: var(--line); }
.panel label { display: block; font-size: 13px; color: var(--sub); margin: 14px 4px 0; font-weight: 500; }
.panel input[type=text], .panel input[type=date], .panel textarea, .panel select { display: block; width: calc(100% + 8px); margin: 6px -4px 0; font: inherit; font-size: 17px; color: var(--text); background: var(--field); border: 0; border-radius: 12px; padding: 13px 14px; min-height: 50px; -webkit-appearance: none; appearance: none; }
.panel select { background-image: linear-gradient(45deg, transparent 50%, var(--sub) 50%), linear-gradient(135deg, var(--sub) 50%, transparent 50%); background-position: calc(100% - 20px) 22px, calc(100% - 15px) 22px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
.panel input:focus, .panel textarea:focus, .panel select:focus { outline: 2px solid var(--lime); }
.panel textarea { resize: vertical; margin-top: 10px; }
.panel label textarea { margin-top: 6px; }
.panel textarea.mono { font-family: ui-monospace, Menlo, monospace; font-size: 16px; }
.panel textarea.ocr { font-size: 15px; color: var(--sub); margin-top: 6px; }
.ocrrow { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.ocrrow label { margin: 0 4px; }
.ocrrow button { min-height: 44px; padding: 0 14px; font-size: 15px; }
.actions { position: sticky; bottom: 0; z-index: 2; display: flex; align-items: center; gap: 8px; margin: 18px -18px 0; padding: 12px 18px calc(12px + var(--sab)); background: var(--card); border-top: 1px solid var(--line); }
.actions button { min-width: 52px; }
.full { display: block; width: 100%; max-height: 46dvh; object-fit: contain; background: var(--field); border-radius: 12px; }
.panel .sub.center { margin: 8px 0 0; }
.suggest { margin: 8px 4px 0; font-size: 15px; }
.suggest .link { display: inline; min-height: 0; padding: 0; }

.choice { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 1px; width: 100%; text-align: left; margin-top: 8px; min-height: 64px; background: var(--field); font-weight: 400; }
.choice strong { font-size: 17px; font-weight: 600; }
.check { display: flex !important; align-items: center; gap: 12px; font-size: 17px !important; color: var(--text) !important; margin: 12px 4px 4px !important; min-height: 44px; }
.check input { width: 26px; height: 26px; accent-color: #9bb300; flex: none; }
.done { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0; word-break: break-all; text-align: center; }
.done .okmsg { font-size: 26px; font-weight: 700; color: var(--tint); line-height: 1.2; margin-bottom: 4px; }
.selbar { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.selbar .link { margin: 0; }

.cluster { background: var(--field); border-radius: 14px; padding: 12px 14px 14px; margin-top: 12px; }
.cluster label { margin: 12px 4px 0; }
.cluster .link { display: flex; margin-top: 6px; }
.cluster select, .cluster input[type=text] { background: var(--card) !important; }
.chead { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.strip { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.thumb { width: 64px; height: 64px; min-height: 0; padding: 0; border-radius: 10px; overflow: hidden; background: var(--btn); display: block; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb.off img { opacity: .25; }

.toast { position: fixed; left: 50%; bottom: calc(var(--tab-h) + 30px + var(--sab)); transform: translateX(-50%); background: rgba(28,28,30,.92); color: #fff; padding: 12px 18px; border-radius: 22px; z-index: 50; font-size: 15px; white-space: nowrap; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }

/* Workshop-Farbe: große Titelfläche */
.hero { background: var(--lime); color: var(--on-lime); border-radius: 20px; padding: 18px 18px 16px; margin: 6px 0 4px; }
.hero h1 { margin: 0 0 4px; }
.hero .sub { color: inherit; opacity: .8; }
.dot { width: 14px; height: 14px; border-radius: 50%; flex: none; }
.swatches { display: flex; flex-wrap: wrap; gap: 12px; margin: 10px 0 2px; }
.swatch { width: 48px; height: 48px; min-height: 0; padding: 0; border-radius: 50%; border: 3px solid var(--card); box-shadow: 0 0 0 1px var(--line); }
.swatch.on { box-shadow: 0 0 0 3px var(--text); }

.tabbar.single { gap: 8px; }
.tabbar.single button { flex: 1; min-height: 52px; font-size: 15px; padding: 0 8px; white-space: nowrap; }
.tabbar.single button svg { width: 18px; height: 18px; }
.agenda-empty { display: flex; gap: 8px; margin-top: 14px; }
.agenda-empty button { flex: 1; }
.note { margin: 8px 4px 0; }
.panel .wide { margin: 6px 0 4px; }

/* Wartung */
.maint { background: var(--field); border-radius: 14px; padding: 14px; margin-top: 12px; }
.maint p { margin: 4px 0 10px; }
.maint .wide { margin: 8px 0 0; }
.warn { color: var(--danger); font-weight: 600; margin: 2px 0 6px !important; }
button.danger-solid { background: var(--danger); color: #fff; }

/* Erklärung auf der Startseite */
.howto { margin-top: 16px; padding: 0 16px; }
.howto summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; min-height: 56px; font-weight: 600; }
.howto summary::-webkit-details-marker { display: none; }
.howto summary::after { content: "›"; font-size: 24px; color: var(--sub); transform: rotate(90deg); transition: transform .15s; }
.howto[open] summary::after { transform: rotate(-90deg); }
.howto ul { list-style: none; margin: 0; padding: 0 0 8px; }
.howto li { padding: 10px 0; border-top: 1px solid var(--line); font-size: 15px; line-height: 1.45; }
.howto li strong { display: block; color: var(--tint); }

.cover img.ph { width: 70%; height: 70%; object-fit: contain; }
.maintlink { margin-top: 18px; }

.brandtitle { margin: 0; font-size: 19px; font-weight: 700; letter-spacing: -.01em; line-height: 1.2; }
.brandtitle span { display: block; font-size: 14px; font-weight: 500; color: var(--sub); letter-spacing: 0; }
main.start { padding-top: 6px; }
