/* LUNA Keramik Markenfarben (wie in der Kasse). Handy-first: grosse Tasten, Navigation unten. */
:root {
  --luna-50: #fdf1e6;
  --luna-100: #f9ddc0;
  --luna-500: #dd7c3c;
  --luna-600: #c85103;
  --luna-700: #a34403;
  --luna-900: #4a1f01;
  --cream: #fdf7f0;
  --sage: #9eaea0;
  --sage-dark: #7b8a76;
  --sage-bg: #e4eae5;
  --tan: #c8a47b;
  --tan-bg: #f3ead9;
  --amber-bg: #fdf0d5;
  --amber: #b45309;
  --red-bg: #fdeceb;
  --red: #a3231a;
  --text: #3a2c1d;
  --muted: #8a7a68;
  --hairline: #ecdfd0;
  --tap-target: 44px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0; min-height: 100%;
  background: var(--cream); color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  font-size: 16px; -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%; text-size-adjust: 100%;
}
body { overscroll-behavior-y: none; }
button, a, input, select, label { touch-action: manipulation; }
h1:focus { outline: none; }
a { color: var(--luna-600); text-decoration: none; }
h1 { font-size: 1.3rem; margin: 0; color: var(--luna-900); }
h2 { font-size: 0.8rem; margin: 0.5rem 0 0; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
p { margin: 0; }

.icon { width: 1.25rem; height: 1.25rem; flex-shrink: 0; }
.icon.sm { width: 1rem; height: 1rem; }
.icon.lg { width: 1.75rem; height: 1.75rem; }

/* ---------- Shell ---------- */
.shell { min-height: 100vh; padding-bottom: calc(5.5rem + env(safe-area-inset-bottom)); }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 0.5rem;
  padding: calc(0.6rem + env(safe-area-inset-top)) 1rem 0.6rem;
  background: rgba(253, 247, 240, 0.95); backdrop-filter: blur(8px); border-bottom: 1px solid var(--luna-100);
}
.topbar-logo { width: 32px; height: 32px; border-radius: 8px; }
.topbar-title { font-weight: 700; font-size: 1.1rem; color: var(--luna-900); }
.page { max-width: 42rem; margin: 0 auto; padding: 1rem; display: flex; flex-direction: column; gap: 1rem; }

.bottomnav {
  position: fixed; inset: auto 0 0 0; z-index: 30; display: flex; justify-content: space-around; align-items: flex-end;
  background: rgba(255, 255, 255, 0.96); backdrop-filter: blur(8px); border-top: 1px solid var(--luna-100);
  padding: 0 0.5rem env(safe-area-inset-bottom);
}
.bn-item, .bn-primary { display: flex; flex-direction: column; align-items: center; gap: 0.2rem; font-size: 11px; font-weight: 500; color: #6b7280; padding: 0.5rem 0; min-width: 56px; }
.bn-item .icon { width: 1.5rem; height: 1.5rem; }
.bn-item.active { color: var(--luna-700); }
.bn-primary { margin-top: -1.3rem; color: var(--luna-700); }
.bn-primary-circle { display: flex; width: 3.5rem; height: 3.5rem; border-radius: 999px; background: var(--luna-600); color: white; align-items: center; justify-content: center; box-shadow: 0 8px 20px rgba(200, 81, 3, 0.3); }
.bn-primary-circle .icon { width: 1.75rem; height: 1.75rem; }

/* ---------- Bausteine ---------- */
.card { background: white; border-radius: 1rem; box-shadow: 0 1px 3px rgba(58, 44, 29, 0.08); padding: 1rem; }
.card.tight { padding: 0.75rem; }
.card.flush { padding: 0; }
.card.accent { border: 2px solid var(--luna-500); }
.card.dashed { border: 2px dashed var(--luna-500); }
.card.danger { background: var(--red-bg); color: var(--red); }
.section { background: rgba(255, 255, 255, 0.6); border-radius: 1.5rem; padding: 0.75rem; display: flex; flex-direction: column; gap: 0.5rem; }
.stack { display: flex; flex-direction: column; gap: 0.75rem; }
.stack-sm { display: flex; flex-direction: column; gap: 0.4rem; }
.row { display: flex; align-items: center; gap: 0.5rem; }
.row.between { justify-content: space-between; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem; }
.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.4rem; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.xs { font-size: 0.72rem; }
.bold { font-weight: 600; }
.title { font-weight: 600; color: var(--luna-900); }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.center { text-align: center; }
.back { display: inline-flex; align-items: center; gap: 0.25rem; font-size: 0.9rem; font-weight: 500; color: var(--luna-700); background: none; border: 0; padding: 0; min-height: auto; cursor: pointer; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: var(--tap-target); padding: 0.75rem 1rem; border-radius: 0.75rem; border: 0;
  font-size: 1rem; font-weight: 500; cursor: pointer; text-decoration: none; width: auto;
}
.btn.block { width: 100%; }
.btn.big { font-size: 1.1rem; padding: 0.9rem 1rem; }
.btn-primary { background: var(--luna-600); color: white; }
.btn-primary:active { background: var(--luna-700); }
.btn-secondary { background: white; color: var(--luna-900); border: 1px solid var(--luna-100); }
.btn-danger { background: white; color: var(--red); border: 1px solid #f5c2bf; }
.btn-ghost { background: transparent; color: var(--luna-700); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.link-btn { background: none; border: 0; padding: 0.25rem; color: var(--luna-700); font-weight: 500; display: inline-flex; align-items: center; gap: 0.35rem; cursor: pointer; font-size: 0.9rem; }

.badge { display: inline-flex; align-items: center; gap: 0.2rem; border-radius: 999px; padding: 0.1rem 0.5rem; font-size: 0.72rem; font-weight: 600; white-space: nowrap; }
.b-luna { background: var(--luna-100); color: var(--luna-900); }
.b-luna-strong { background: var(--luna-600); color: white; }
.b-sage { background: var(--sage-bg); color: var(--sage-dark); }
.b-tan { background: var(--tan-bg); color: var(--luna-900); }
.b-gray { background: #eee; color: #555; }
.b-red { background: var(--red-bg); color: var(--red); }
.b-amber { background: var(--amber-bg); color: var(--amber); }
.b-white { background: white; color: #9ca3af; border: 1px solid #e5e7eb; }

.icon-badge { display: flex; align-items: center; justify-content: center; border-radius: 999px; background: var(--luna-50); color: var(--luna-600); flex-shrink: 0; width: 2.75rem; height: 2.75rem; }
.icon-badge.sm { width: 2.25rem; height: 2.25rem; }
.icon-badge.strong { background: var(--luna-600); color: white; }
.icon-badge.amber { background: var(--amber-bg); color: var(--amber); }

.thumb { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 0.75rem; background: #f3f4f6; }
.thumb-empty { display: flex; align-items: center; justify-content: center; width: 100%; aspect-ratio: 1; border-radius: 0.75rem; background: var(--luna-50); color: var(--luna-500); font-size: 0.72rem; text-align: center; }

.fill { height: 0.75rem; width: 100%; background: #f3f4f6; border-radius: 999px; overflow: hidden; }
.fill > div { height: 100%; border-radius: 999px; background: var(--luna-500); transition: width .3s; }
.fill > div.mid { background: var(--tan); }
.fill > div.full { background: var(--sage-dark); }
.progress { height: 0.5rem; background: var(--luna-50); border-radius: 999px; overflow: hidden; }
.progress > div { height: 100%; background: var(--luna-500); }

.note { border-radius: 0.75rem; padding: 0.5rem 0.75rem; font-size: 0.9rem; display: flex; gap: 0.5rem; align-items: flex-start; }
.note.error { background: var(--red-bg); color: var(--red); }
.note.ok { background: var(--sage-bg); color: var(--sage-dark); }
.note.warn { background: var(--amber-bg); color: var(--amber); }

/* ---------- Formulare ---------- */
label.field { display: block; }
label.field > span { display: block; font-size: 0.85rem; font-weight: 500; color: #374151; margin-bottom: 0.25rem; }
input, select, textarea {
  width: 100%; min-height: var(--tap-target); font-size: 1rem; border-radius: 0.75rem;
  border: 1px solid var(--luna-100); background: white; padding: 0.7rem 0.75rem; font-family: inherit; color: inherit;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--luna-500); outline-offset: 1px; }
input[type=checkbox] { width: 1.25rem; height: 1.25rem; min-height: auto; accent-color: var(--luna-600); }
.check { display: flex; align-items: center; gap: 0.6rem; font-size: 0.95rem; }

.seg { display: grid; gap: 0.5rem; }
.seg button { border: 1px solid var(--luna-100); background: white; color: var(--luna-900); border-radius: 0.75rem; padding: 0.55rem 0.25rem; text-align: center; cursor: pointer; min-height: var(--tap-target); }
.seg button .l { display: block; font-size: 0.9rem; font-weight: 600; }
.seg button .h { display: block; font-size: 0.68rem; color: #6b7280; }
.seg button.on { background: var(--luna-600); border-color: var(--luna-600); color: white; }
.seg button.on .h { color: var(--luna-50); }

.chips { display: flex; gap: 0.5rem; overflow-x: auto; margin: 0 -1rem; padding: 0 1rem 0.25rem; }
.chip { flex-shrink: 0; border: 0; border-radius: 999px; padding: 0.4rem 0.8rem; font-size: 0.85rem; font-weight: 500; background: white; color: var(--luna-900); cursor: pointer; min-height: auto; }
.chip.on { background: var(--luna-600); color: white; }

.tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.25rem; background: white; border-radius: 0.75rem; padding: 0.25rem; box-shadow: 0 1px 3px rgba(58,44,29,.08); }
.tabs a, .tabs button { display: flex; align-items: center; justify-content: center; gap: 0.35rem; border-radius: 0.5rem; padding: 0.6rem 0; font-size: 0.9rem; font-weight: 600; color: var(--luna-900); background: none; border: 0; cursor: pointer; min-height: auto; }
.tabs .on { background: var(--luna-600); color: white; }

/* ---------- Kacheln ---------- */
.tile { position: relative; display: block; background: white; border-radius: 1rem; padding: 0.35rem; box-shadow: 0 1px 3px rgba(58,44,29,.08); text-align: left; border: 0; cursor: pointer; color: inherit; width: 100%; }
.tile.sel { outline: 4px solid var(--luna-500); }
.tile.loaded { outline: 4px solid var(--sage-dark); }
.tile.damaged { outline: 4px solid #f87171; }
.tile-check { position: absolute; top: 0.6rem; right: 0.6rem; width: 2rem; height: 2rem; border-radius: 999px; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,.9); color: #d1d5db; }
.tile-check.on { background: var(--luna-600); color: white; }
.tile.loaded .tile-check.on { background: var(--sage-dark); }
.tile-x { position: absolute; top: 0.6rem; left: 0.6rem; width: 2rem; height: 2rem; border-radius: 999px; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,.9); color: #4b5563; border: 0; cursor: pointer; min-height: auto; min-width: auto; padding: 0; }
.tile-body { padding: 0.35rem 0.25rem 0.1rem; }
.collage { display: grid; grid-template-columns: 1fr 1fr; gap: 0.25rem; }
.collage .thumb, .collage .thumb-empty { border-radius: 0.5rem; }
.collage .thumb-empty.wide { grid-column: span 2; aspect-ratio: 2 / 1; }

.list-row { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1rem; color: inherit; }
.list-row + .list-row { border-top: 1px solid var(--luna-50); }

.sticky-action { position: fixed; left: 0; right: 0; bottom: calc(5.5rem + env(safe-area-inset-bottom)); z-index: 25; padding: 0 1rem; }
.sticky-action > div { max-width: 42rem; margin: 0 auto; display: flex; gap: 0.5rem; }
.sticky-action .btn { box-shadow: 0 8px 20px rgba(58,44,29,.2); }

/* ---------- Bottom-Sheet ---------- */
.sheet-backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(0,0,0,.4); display: flex; align-items: flex-end; justify-content: center; }
.sheet { width: 100%; max-width: 32rem; max-height: 92vh; overflow-y: auto; background: var(--cream); border-radius: 1.5rem 1.5rem 0 0; padding: 1.25rem 1.25rem calc(1.25rem + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 1rem; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; }
.sheet-head h2 { font-size: 1.1rem; text-transform: none; letter-spacing: 0; color: var(--luna-900); margin: 0; }
@media (min-width: 640px) { .sheet-backdrop { align-items: center; } .sheet { border-radius: 1.5rem; } }

.photo-btn { display: flex; align-items: center; gap: 0.75rem; width: 100%; background: white; border: 2px dashed var(--luna-100); border-radius: 1rem; padding: 0.75rem; cursor: pointer; position: relative; }
.photo-btn img, .photo-btn .ph { width: 5rem; height: 5rem; border-radius: 0.75rem; object-fit: cover; }
.photo-btn .ph { display: flex; align-items: center; justify-content: center; background: var(--luna-50); color: var(--luna-600); }
.photo-btn input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

.stat-num { font-size: 1.25rem; font-weight: 600; color: var(--luna-900); }

.blazor-error-boundary { background: #b32121; padding: 1rem; color: white; border-radius: 0.75rem; }
.blazor-error-boundary::after { content: "Ein Fehler ist aufgetreten – bitte Seite neu laden."; }

/* Weitere Fotos im Stueck-Editor */
.extra-main { position: absolute; left: 0.25rem; right: 0.25rem; bottom: 0.25rem; border: 0; border-radius: 0.4rem; background: rgba(255,255,255,.9); color: var(--luna-700); font-size: 0.65rem; font-weight: 600; padding: 0.15rem 0; min-height: auto; cursor: pointer; }
.extra-confirm { position: absolute; inset: 0; border-radius: 0.75rem; background: rgba(253,236,235,.95); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.25rem; color: var(--red); }

/* Textbausteine */
.textchips { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.textchip { border: 1px solid var(--luna-100); background: white; color: var(--luna-900); border-radius: 999px; padding: 0.35rem 0.7rem; font-size: 0.78rem; text-align: left; cursor: pointer; min-height: auto; min-width: auto; line-height: 1.2; }
.textchip:active { background: var(--luna-50); }

/* Stueckzahl */
.stepper { display: flex; align-items: center; gap: 0.5rem; }
.stepper button { width: 3rem; height: 3rem; min-height: auto; border-radius: 0.75rem; border: 1px solid var(--luna-100); background: white; color: var(--luna-700); font-size: 1.5rem; font-weight: 600; cursor: pointer; padding: 0; }
.stepper button:disabled { opacity: 0.35; }
.stepper-value { min-width: 4rem; text-align: center; font-size: 1.25rem; font-weight: 700; color: var(--luna-900); }
.qty-badge { position: absolute; left: 0.4rem; bottom: 0.4rem; background: var(--luna-600); color: white; border-radius: 999px; padding: 0.1rem 0.5rem; font-size: 0.75rem; font-weight: 700; box-shadow: 0 1px 3px rgba(0,0,0,.2); z-index: 2; }
.thumb-wrap { position: relative; }

/* Kundenbereich: Ueberraschung statt Fertigfoto */
.mystery { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.35rem; width: 100%; aspect-ratio: 1; border-radius: 0.75rem;
  background: linear-gradient(135deg, var(--luna-500), var(--luna-700)); color: white; font-weight: 700; font-size: 0.85rem; }
.mystery.big { aspect-ratio: auto; padding: 2rem 1rem; gap: 0.75rem; font-size: 1rem; text-align: center; }
.mystery.big > .icon { width: 3rem; height: 3rem; }
.photo-large { display: block; width: 100%; border-radius: 1rem; background: #f3f4f6; }
.textchip.on { background: var(--luna-600); border-color: var(--luna-600); color: white; }

/* Glasurschichten: zwei Spalten aussen/innen */
.glaze-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0.5rem; }
.layer { background: var(--cream); border: 1px solid var(--luna-100); border-radius: 0.75rem; padding: 0.45rem; display: flex; flex-direction: column; gap: 0.3rem; }
.layer select, .layer input { min-height: 2.3rem; padding: 0.35rem 0.45rem; font-size: 0.82rem; border-radius: 0.5rem; }
/* Auswahl ohne Wert ("– Glasur –", "wo?") grau wie ein Platzhalter */
select.placeholder { color: #9ca3af; }
select.placeholder option { color: var(--text); }

/* Glasursuche Inspiration */
.search { position: relative; display: flex; align-items: center; }
.search > .icon { position: absolute; left: 0.75rem; color: #9ca3af; pointer-events: none; }
.search input { width: 100%; padding-left: 2.3rem; padding-right: 2.5rem; }
.search input::-webkit-search-cancel-button { display: none; }
.search-clear { position: absolute; right: 0.25rem; border: 0; background: none; color: #9ca3af; padding: 0.5rem; min-height: auto; min-width: auto; cursor: pointer; }
a.glaze-link { color: inherit; text-decoration: underline; text-decoration-color: var(--luna-100); text-underline-offset: 2px; }

/* Inspiration wie Instagram: Wisch-Fotos, Herz, Doppeltippen */
.ig-post { display: flex; flex-direction: column; gap: 0.35rem; }
.ig-media { position: relative; border-radius: 1rem; overflow: hidden; background: #f3f4f6; touch-action: manipulation; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.ig-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.ig-track::-webkit-scrollbar { display: none; }
.ig-track img { flex: 0 0 100%; width: 100%; aspect-ratio: 1; object-fit: contain; background: white; scroll-snap-align: center; display: block; }
.ig-pop { position: absolute; left: 50%; top: 50%; width: 6rem; height: 6rem; margin: -3rem 0 0 -3rem; fill: white; opacity: 0; pointer-events: none; filter: drop-shadow(0 4px 16px rgba(0,0,0,.35)); transform: scale(0); }
.ig-pop.show { animation: ig-pop 0.9s ease-out; }
@keyframes ig-pop { 0% { opacity: 0; transform: scale(0); } 15% { opacity: .95; transform: scale(1.2); } 30% { transform: scale(.95); } 45%, 75% { opacity: .95; transform: scale(1); } 100% { opacity: 0; transform: scale(0); } }
.ig-bar { position: relative; display: flex; align-items: center; min-height: 2.75rem; }
.ig-like { border: 0; background: none; padding: 0.4rem; margin-left: -0.4rem; color: var(--luna-900); cursor: pointer; min-height: auto; min-width: auto; }
.ig-like .icon { width: 1.75rem; height: 1.75rem; }
.ig-like.on { color: #ed4956; }
.ig-like.on .icon { fill: currentColor; animation: ig-like 0.35s ease-out; }
@keyframes ig-like { 0% { transform: scale(1); } 40% { transform: scale(1.3); } 100% { transform: scale(1); } }
.ig-dots { position: absolute; left: 50%; transform: translateX(-50%); display: flex; gap: 0.3rem; }
.ig-dots span { width: 6px; height: 6px; border-radius: 999px; background: #d1d5db; }
.ig-dots span.on { background: var(--luna-600); }
.ig-count { position: absolute; right: 0.4rem; bottom: 0.4rem; display: inline-flex; align-items: center; gap: 0.2rem; padding: 0.15rem 0.45rem; border-radius: 999px; background: rgba(0,0,0,.45); color: white; font-size: 0.75rem; font-weight: 600; }
.ig-count.on .icon { fill: #ed4956; color: #ed4956; }
.icon.fill { fill: currentColor; }

/* Meine Stuecke: Box "Probleme" (nur wenn es Schaeden gibt) */
.section.problems { background: var(--red-bg); border: 1px solid #f5c2bf; color: var(--red); }
.section.problems .title { color: var(--red); }
.section.problems .icon-badge { background: white; color: var(--red); }
.section.problems .tile { color: var(--luna-900); }

/* Kommentare wie Instagram */
.ig-bar .ig-like + .ig-like { margin-left: 0.4rem; }
.ig-comments { display: flex; flex-direction: column; gap: 0.6rem; margin-top: 0.5rem; }
.ig-comment p { margin: 0; }
.ig-creator { display: inline-block; margin: 0 0.25rem; padding: 0 0.4rem; border-radius: 999px; background: var(--luna-50); color: var(--luna-700); font-size: 0.7rem; font-weight: 600; vertical-align: 1px; }
.ig-link { border: 0; background: none; padding: 0; min-height: auto; min-width: auto; font: inherit; color: inherit; font-weight: 600; cursor: pointer; }
.ig-compose { display: flex; align-items: flex-end; gap: 0.5rem; border-top: 1px solid var(--luna-100); padding-top: 0.6rem; margin-top: 0.4rem; }
.ig-compose textarea { flex: 1; resize: none; field-sizing: content; max-height: 8rem; min-height: 2.5rem; }
.ig-post-btn { border: 0; background: none; color: var(--luna-600); font-weight: 700; padding: 0.6rem 0.25rem; min-height: auto; min-width: auto; cursor: pointer; }
.ig-post-btn:disabled { opacity: 0.4; cursor: default; }
.ig-count .icon.c { margin-left: 0.25rem; }

/* Atelier-Vorschau Kundenbereich */
.preview-banner { position: sticky; top: 3.4rem; z-index: 25; display: flex; align-items: center; gap: 0.5rem; margin: 0.5rem 1rem 0; padding: 0.5rem 0.75rem; border-radius: 0.75rem; background: var(--amber-bg); color: var(--amber); font-size: 0.85rem; }
#preview-toast { position: fixed; left: 50%; bottom: 6.5rem; transform: translateX(-50%); z-index: 60; padding: 0.5rem 0.9rem; border-radius: 999px; background: rgba(58,44,29,.9); color: white; font-size: 0.85rem; opacity: 0; transition: opacity .2s; pointer-events: none; }
#preview-toast.show { opacity: 1; }

/* Ofenplan */
.week-row { display: grid; grid-template-columns: 3rem 1fr 6.5rem; align-items: center; gap: 0.5rem; }
.week-label { color: var(--luna-900); font-variant-numeric: tabular-nums; }
.week-info { text-align: right; color: #6b7280; white-space: nowrap; }
.week-bar { height: 0.7rem; border-radius: 999px; background: var(--luna-50); overflow: hidden; }
.week-fill { height: 100%; border-radius: 999px; }
.week-fill.green { background: var(--sage-dark); }
.week-fill.amber { background: #e3a008; }
.week-fill.red { background: var(--red); }
.week-fill.low { background: #d1d5db; }
.plan-chip { display: inline-block; border-radius: 999px; padding: 0.15rem 0.55rem; font-size: 0.72rem; line-height: 1.3; }
.plan-chip.real { background: var(--luna-100); color: var(--luna-900); }
.plan-chip.est { background: white; border: 1px dashed var(--luna-600); color: var(--luna-700); }
.plan-chip.late { background: var(--red-bg); color: var(--red); border-color: var(--red); }
.plan-times { display: flex; flex-wrap: wrap; gap: 0.25rem 0.9rem; color: var(--luna-900); }
.plan-part { display: flex; align-items: baseline; gap: 0.5rem; font-size: 0.8rem; padding: 0.3rem 0.5rem; border-radius: 0.5rem; }
.plan-part.real { background: var(--luna-50); }
.plan-part.est { border: 1px dashed var(--luna-100); }
.plan-part.late { background: var(--red-bg); color: var(--red); border-color: var(--red); }
.plan-kind { font-weight: 700; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.03em; min-width: 3.4rem; }
.nowrap { white-space: nowrap; }

/* Monatskalender Ofenplan */
.cal { display: flex; flex-direction: column; gap: 2px; }
.cal-head { display: grid; grid-template-columns: repeat(7, 1fr); font-size: 0.7rem; font-weight: 600; color: #6b7280; text-align: center; padding-bottom: 2px; }
.cal-week { display: grid; grid-template-columns: repeat(7, 1fr); grid-template-rows: 1.6rem 1.25rem; gap: 2px; }
.cal-day { grid-row: 1 / 3; background: white; border-radius: 0.4rem; padding: 0.15rem 0.25rem; display: flex; justify-content: space-between; align-items: flex-start; min-width: 0; }
.cal-day.out { background: transparent; color: #c4b8aa; }
.cal-day.today { outline: 2px solid var(--luna-600); outline-offset: -2px; }
.cal-num { font-size: 0.78rem; font-weight: 600; }
.cal-day.pickup { background: #d1fae5; box-shadow: inset 0 0 0 2px #059669; gap: 2px; overflow: hidden; }
.cal-day.pickup .cal-num { color: #065f46; }
.cal-pickup { font-size: 0.55rem; font-weight: 700; color: white; background: #059669; border-radius: 999px; padding: 0 0.25rem; line-height: 1.3; margin-top: 0.15rem; margin-right: auto; }
.cal-legend i.pickup { background: #d1fae5; box-shadow: inset 0 0 0 2px #059669; border-radius: 0.2rem; height: 0.7rem; }
.plan-pickup { display: flex; align-items: center; gap: 0.5rem; font-size: 0.85rem; font-weight: 600; color: #065f46; background: #d1fae5; border-left: 4px solid #059669; border-radius: 0.5rem; padding: 0.45rem 0.7rem; }
.cal-dots { display: flex; gap: 2px; padding-top: 0.25rem; }
.cal-dots i { width: 6px; height: 6px; border-radius: 999px; background: var(--luna-600); display: block; }
.cal-dots i.dot-frei { background: #7c3aed; }
.cal-dots i.dot-bemalen { background: #0891b2; }
.cal-dots i.dot-privat { background: #db2777; }
.cal-bar { grid-row: 2; z-index: 1; margin: 0 1px 2px; border-radius: 999px; font-size: 0.62rem; font-weight: 700; color: white; display: flex; align-items: center; padding: 0 0.35rem; overflow: hidden; white-space: nowrap; text-decoration: none; }
.cal-bar.cont-l { border-top-left-radius: 0; border-bottom-left-radius: 0; margin-left: -2px; }
.cal-bar.cont-r { border-top-right-radius: 0; border-bottom-right-radius: 0; margin-right: -2px; }
.cal-bar.full { background: var(--sage-dark); }
.cal-bar.half { background: #e3a008; }
.cal-bar.low { background: #9ca3af; }
.cal-bar.late { background: var(--red); }
.cal-legend { display: flex; flex-wrap: wrap; gap: 0.35rem 0.8rem; font-size: 0.7rem; color: #6b7280; }
.cal-legend i { display: inline-block; width: 0.9rem; height: 0.45rem; border-radius: 999px; vertical-align: middle; margin-right: 0.2rem; }
.cal-legend i.round { width: 6px; height: 6px; }
.cal-bar.t1020, .week-fill.t1020 { background: #e3a008; }
.cal-bar.t1220, .week-fill.t1220 { background: #c0392b; }
.cal-bar.late { box-shadow: inset 0 0 0 2px #7f1d1d; }
.temp-badge { font-size: 0.68rem; font-weight: 700; border-radius: 999px; padding: 0.05rem 0.45rem; color: white; vertical-align: 2px; }
.temp-badge.t1020 { background: #e3a008; }
.temp-badge.t1220 { background: #c0392b; }
.photo-library { position: relative; align-self: flex-start; margin-top: -0.35rem; }
.photo-library input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* Temperaturkurve */
.temp-chart { width: 100%; height: auto; background: white; border-radius: 0.75rem; }
.temp-chart .grid { stroke: var(--luna-50); stroke-width: 1; }
.temp-chart .lbl { font-size: 8px; fill: #9ca3af; }
.temp-chart .curve { fill: none; stroke: var(--luna-600); stroke-width: 2; }
.temp-chart .pred { stroke: #0891b2; stroke-width: 1.5; stroke-dasharray: 4 3; }
.temp-chart .pred-dot { fill: white; stroke: #0891b2; stroke-width: 1.5; }
.temp-chart circle.heat { fill: #e3a008; }
.temp-chart circle.cool { fill: #0891b2; }
.temp-dot { display: inline-block; width: 8px; height: 8px; border-radius: 999px; vertical-align: 1px; }
.temp-dot.heat { background: #e3a008; }
.temp-dot.cool { background: #0891b2; }

/* Gaeste-Seiten (Events mit QR-Code): randloses Titelbild, Karte ragt ins Bild */
/* Kundenbereich: Kopf mit Stimmungsbild */
.kunde-head { position: relative; height: calc(12rem + env(safe-area-inset-top)); overflow: hidden; margin-bottom: -3.5rem; }
.kunde-head-img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 52%; display: block; }
.kunde-head-fade { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(58, 44, 29, 0.45) 0%, rgba(58, 44, 29, 0) 40%, rgba(253, 247, 240, 0.6) 75%, #fdf7f0 100%); }
.kunde-head-bar { position: absolute; top: 0; left: 0; right: 0; max-width: 42rem; margin: 0 auto; display: flex; align-items: center; gap: 0.5rem; padding: calc(0.75rem + env(safe-area-inset-top)) 1rem 0; color: white; }
.kunde-head-logo { width: 36px; height: 36px; border-radius: 9px; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25); }
.kunde-head-title { font-weight: 700; font-size: 1.1rem; white-space: nowrap; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.45); }
.kunde-head-btn { display: inline-flex; align-items: center; gap: 0.3rem; min-height: auto; padding: 0.35rem 0.7rem; border: 0; border-radius: 999px; background: rgba(255, 255, 255, 0.22); backdrop-filter: blur(6px); color: white; font-size: 0.85rem; font-weight: 600; cursor: pointer; }
.kunde-head + .preview-banner, .kunde-head ~ .preview-banner { position: relative; top: 0; z-index: 2; }
.kunde-head ~ .page { position: relative; z-index: 1; }
.gast-shell { min-height: 100vh; padding-bottom: calc(2rem + env(safe-area-inset-bottom)); background: var(--bg, #fdf7f0); }
.gast-cover { position: relative; height: min(46vh, 26rem); overflow: hidden; }
.gast-cover.small { height: min(24vh, 12rem); }
.gast-cover-img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 62%; display: block; }
.gast-cover-fade { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(58, 44, 29, 0.25) 0%, rgba(58, 44, 29, 0) 35%, rgba(253, 247, 240, 0) 60%, #fdf7f0 100%); }
.gast-cover-logo { position: absolute; top: calc(1rem + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); width: 64px; height: 64px; border-radius: 16px; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25); }
.gast-cover.small .gast-cover-logo { width: 48px; height: 48px; border-radius: 12px; }
.gast-cover-kicker { position: absolute; top: calc(5.4rem + env(safe-area-inset-top)); left: 0; right: 0; text-align: center; color: white; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.45); }
.gast-cover.small .gast-cover-kicker { top: calc(4.2rem + env(safe-area-inset-top)); }
.gast-card { position: relative; max-width: 28rem; margin: -3.5rem auto 0; width: calc(100% - 2rem); background: white; border-radius: 1.5rem; padding: 1.4rem 1.2rem; box-shadow: 0 12px 40px rgba(58, 44, 29, 0.12); }
.gast-title { font-size: 1.6rem; line-height: 1.2; letter-spacing: -0.01em; }
.gast-choice { display: flex; align-items: center; gap: 0.9rem; width: 100%; text-align: left; background: #fdf7f0; border: 2px solid transparent; border-radius: 1.25rem; padding: 1rem; cursor: pointer; color: var(--luna-900); transition: border-color .15s, transform .15s; }
.gast-choice:active { border-color: var(--luna-600); transform: scale(0.99); }
.gast-choice-icon { display: flex; align-items: center; justify-content: center; width: 3.5rem; height: 3.5rem; border-radius: 1rem; background: white; color: var(--luna-600); flex-shrink: 0; box-shadow: 0 4px 12px rgba(200, 81, 3, 0.12); }
.gast-choice-icon .icon { width: 1.9rem; height: 1.9rem; }
.glaze-book { display: flex; flex-direction: column; gap: 0.6rem; padding: 0.85rem; border-radius: 1rem; background: #fdf3e7; border: 1px solid var(--luna-100); }
.glaze-book-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); gap: 0.5rem; }
.glaze-book-link { display: flex; flex-direction: column; gap: 0.1rem; padding: 0.55rem 0.75rem; border-radius: 0.75rem; background: white; color: var(--luna-900); text-decoration: none; box-shadow: 0 2px 8px rgba(58, 44, 29, 0.08); }
.glaze-book-link .bold { color: var(--luna-600); }
.share-photo { display: block; width: 100%; aspect-ratio: 1; object-fit: contain; background: white; border-radius: 1rem; }
.gast-check { font-size: 0.95rem; }
.cfg-fields { display: grid; grid-template-columns: 1fr auto 1.4fr; gap: 0.4rem 0.75rem; align-items: center; }
.cfg-fields select { min-height: 2.2rem; padding: 0.2rem 0.5rem; font-size: 0.85rem; }
.temp-toggle { display: grid; grid-template-columns: 1fr 1fr; border-radius: 999px; overflow: hidden; border: 1px solid var(--luna-100); }
.temp-toggle button { border: 0; background: white; padding: 0.4rem 0; font-weight: 700; font-size: 0.85rem; color: var(--luna-900); min-height: auto; cursor: pointer; }
.temp-toggle button.on.t1020 { background: #e3a008; color: white; }
.temp-toggle button.on.t1220 { background: #c0392b; color: white; }

/* Kundenbereich: "Mein Tipp fuer dich" - Nachricht von Alex unten rechts (ueber der Navigation) */
.install-chat { position: fixed; right: 0.75rem; left: 0.75rem; bottom: calc(5.6rem + env(safe-area-inset-bottom)); z-index: 100; display: flex; align-items: flex-end; justify-content: flex-end; gap: 0.5rem; pointer-events: none; animation: install-in .35s ease-out; }
.install-bubble { pointer-events: auto; position: relative; max-width: 19.5rem; max-height: calc(100vh - 9rem); overflow-y: auto; background: white; border-radius: 1.25rem 1.25rem 0.3rem 1.25rem; padding: 0.9rem 1rem 0.4rem; box-shadow: 0 10px 34px rgba(58, 44, 29, 0.22); display: flex; flex-direction: column; gap: 0.55rem; text-align: left; }
.install-head { display: flex; align-items: center; gap: 0.6rem; padding-right: 1.5rem; }
.install-avatar { width: 44px; height: 44px; flex-shrink: 0; border-radius: 50%; object-fit: cover; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); }
.install-name { font-weight: 800; font-size: 0.95rem; color: var(--luna-900); line-height: 1.2; }
.install-x { position: absolute; top: 0.35rem; right: 0.5rem; border: 0; background: none; font-size: 1.3rem; line-height: 1; color: var(--muted, #8a7a68); min-height: auto; padding: 0.2rem; cursor: pointer; }
.install-kicker { font-size: 0.68rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--luna-600); }
.install-text { font-size: 0.9rem; line-height: 1.45; color: var(--luna-900); }
.install-sign { font-size: 0.9rem; font-style: italic; color: var(--luna-900); margin-top: -0.2rem; }
.install-more { display: flex; flex-direction: column; gap: 0.6rem; }
.install-more[hidden] { display: none; }
.install-preview { display: flex; align-items: center; gap: 0.6rem; font-size: 0.8rem; color: var(--muted, #8a7a68); background: #fdf7f0; border-radius: 0.75rem; padding: 0.5rem 0.75rem; }
.install-preview img { width: 32px; height: 32px; border-radius: 8px; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15); }
.install-steps { margin: 0; padding-left: 1.2rem; display: flex; flex-direction: column; gap: 0.45rem; font-size: 0.9rem; color: var(--luna-900); }
.install-hint { font-size: 0.78rem; color: var(--muted, #8a7a68); }
.install-later { align-self: center; border: 0; background: none; color: var(--muted, #8a7a68); font-size: 0.85rem; padding: 0.35rem; min-height: auto; cursor: pointer; }
@keyframes install-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* Kurs-Einladung im Kundenbereich: ein Angebot pro Zeile */
.offer-row { display: flex; align-items: center; gap: 0.75rem; background: white; border-radius: 0.75rem; padding: 0.5rem; color: inherit; text-decoration: none; }
.offer-img { width: 4.5rem; height: 4.5rem; flex-shrink: 0; border-radius: 0.5rem; object-fit: cover; background: var(--luna-50); }
.offer-img-empty { display: flex; align-items: center; justify-content: center; color: var(--luna-600); }
.plan-fixed { box-shadow: inset 0 0 0 2px var(--luna-600); }
.cal-bar.fixed { box-shadow: inset 0 0 0 2px var(--luna-900); }

/* Personensuche (bestehende Kundinnen und Wix-Kontakte) */
.person-hits { display: flex; flex-direction: column; gap: 0.35rem; margin: -0.25rem 0 0.75rem; }
.person-hit { display: flex; align-items: center; gap: 0.5rem; width: 100%; padding: 0.55rem 0.75rem; border: 1px solid var(--line, #eadccd); border-radius: 12px; background: white; text-align: left; cursor: pointer; color: inherit; }
.person-hit:active { background: var(--luna-50, #fdf3ea); }
