/* ------------------------------------------------------------ Schrift (lokal, ohne Google) */
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("/static/fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("/static/fonts/inter-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ------------------------------------------------------------ Farben */
:root {
  color-scheme: light;
  --bg: #faf8f5;
  --bg-elev: #ffffff;
  --bg-sunk: #f1eee9;
  --glass: rgba(255, 255, 255, .78);
  --glass-border: rgba(255, 255, 255, .9);
  --radius: 24px;
  --radius-sm: 14px;
  --focus: #7c83f2;
  --focus-ring: 0 0 0 4px rgba(124, 131, 242, .18);
  --fg: #1a1a1a;
  --fg-muted: #6f6c67;
  --border: #e6e2dc;
  --btn-bg: #ffffff;
  --btn-fg: #1a1a1a;
  --primary-bg: #1a1a1a;
  --primary-fg: #ffffff;
  --accent: #6366f1;           /* Auswahl (Indigo, passend zum Login) */
  --accent-soft: rgba(99, 102, 241, .12);
  --ok: #2f7d4f;
  --ok-soft: rgba(47, 125, 79, .12);
  --warn: #9a6a00;
  --warn-soft: rgba(154, 106, 0, .12);
  --danger: #b42318;
  --danger-soft: rgba(180, 35, 24, .1);
  --tile-bg: #ebe7e1;
  /* Farbmarkierungen: gedämpft, gleiche Helligkeit, harmonieren miteinander */
  --c-red: #e06c62;
  --c-yellow: #e5b94e;
  --c-green: #6daf86;
  --c-blue: #5b8fd4;
  --c-purple: #9f82d6;
  --shadow: 0 1px 2px rgba(30, 20, 10, .04), 0 12px 32px -8px rgba(60, 40, 20, .14);
  --shadow-lg: 0 1px 2px rgba(30, 20, 10, .04), 0 24px 60px -12px rgba(60, 40, 20, .18);
}

/* ------------------------------------------------------------ Basis */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 15px/1.5 "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  isolation: isolate;
}
body.no-scroll { overflow: hidden; }
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60vmax 60vmax at 10% 0%, #fde2d4 0%, transparent 60%),
    radial-gradient(55vmax 55vmax at 100% 20%, #dbe7ff 0%, transparent 55%),
    radial-gradient(60vmax 60vmax at 50% 110%, #efe3fb 0%, transparent 60%),
    var(--bg);
}
h1, h2, h3 { font-weight: 600; letter-spacing: -.02em; line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.1rem); }
h2 { font-size: 1.15rem; }
h3 { font-size: 1rem; margin-top: 1.2em; }
a { color: inherit; }
p { margin: 0 0 1em; }
img { max-width: 100%; display: block; }
code, .mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .92em; }
[hidden] { display: none !important; }

.muted { color: var(--fg-muted); }
.small { font-size: .85rem; }
.error { color: var(--danger); }
.eyebrow {
  text-transform: uppercase; letter-spacing: .2em; font-size: .7rem;
  color: var(--fg-muted); margin: 0 0 .4rem;
}
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.truncate { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.heart-inline { color: var(--accent); }

/* ------------------------------------------------------------ Buttons & Formulare */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45em;
  min-height: 42px; padding: .5em 1.15em;
  border: 1px solid var(--border); border-radius: 12px;
  background: var(--btn-bg); color: var(--btn-fg);
  font: inherit; font-weight: 550; text-decoration: none; cursor: pointer;
  transition: background .15s, border-color .15s, box-shadow .15s, transform .12s, opacity .15s;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(30, 20, 10, .05);
}
.btn:hover { border-color: #cfc9c1; box-shadow: 0 4px 12px -4px rgba(60, 40, 20, .15); }
.btn:active:not(:disabled) { transform: scale(.98); }
.btn:focus-visible { outline: none; box-shadow: var(--focus-ring); border-color: var(--focus); }
.btn:disabled { opacity: .45; cursor: default; box-shadow: none; }
.btn.primary {
  background: var(--primary-bg); color: var(--primary-fg); border-color: var(--primary-bg);
  box-shadow: 0 8px 20px -8px rgba(0, 0, 0, .45);
}
.btn.primary:hover:not(:disabled) { background: #000; box-shadow: 0 12px 24px -8px rgba(0, 0, 0, .5); }
.btn.ghost { background: transparent; box-shadow: none; }
.btn.ghost:hover { background: rgba(255, 255, 255, .6); }
.btn.small { min-height: 36px; padding: .3em .95em; font-size: .88rem; border-radius: 10px; }
.btn.wide { width: 100%; }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.danger-ghost { background: transparent; color: var(--danger); }
.btn-sub { font-weight: 400; opacity: .7; font-size: .85em; }
.btn-row { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; cursor: pointer; }

.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px;
  border: 1px solid var(--border); border-radius: 50%;
  background: var(--btn-bg); color: var(--fg); cursor: pointer; padding: 0;
  box-shadow: 0 1px 2px rgba(30, 20, 10, .05);
}
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.input {
  width: 100%; min-height: 46px; padding: .6em .95em;
  border: 1.5px solid var(--border); border-radius: 12px;
  background: #fff; color: var(--fg); font: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.input:focus { outline: none; border-color: var(--focus); box-shadow: var(--focus-ring); }
.input.big { font-size: 1.3rem; text-align: center; letter-spacing: .12em; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; min-height: 54px; }
textarea.input { resize: vertical; }
.field { display: flex; flex-direction: column; gap: .3rem; margin-bottom: 1rem; }
.field > span { font-size: .85rem; font-weight: 500; }
.field.inline { flex-direction: row; align-items: center; gap: .6rem; margin: 0; }
.field.inline .input { width: auto; }
.check { display: flex; align-items: center; gap: .5rem; margin-bottom: 1rem; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.form-grid .span-2 { grid-column: span 2; }
.form-actions { display: flex; justify-content: flex-end; gap: .5rem; margin-top: .5rem; }
.inline-form { display: flex; gap: .5rem; margin: .6rem 0 .3rem; }
.inline-form .input { flex: 1; }
@media (max-width: 640px) {
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: auto; }
  .inline-form { flex-direction: column; }
}

.card {
  background: var(--glass); border: 1px solid var(--glass-border); border-radius: var(--radius);
  backdrop-filter: blur(20px) saturate(1.4); -webkit-backdrop-filter: blur(20px) saturate(1.4);
  box-shadow: var(--shadow);
  padding: clamp(1.1rem, 3vw, 1.8rem); margin-bottom: 1.4rem;
}
.card.narrow { width: min(420px, 100%); }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: .6rem; }
.card-head h2 { margin: 0; }

.badge {
  display: inline-block; padding: .15em .7em; border-radius: 999px;
  font-size: .78rem; font-weight: 500; background: var(--bg-sunk); color: var(--fg-muted); white-space: nowrap;
}
.badge.status-selection { background: var(--warn-soft); color: var(--warn); }
.badge.status-submitted { background: var(--accent-soft); color: var(--accent); }
.badge.status-editing { background: var(--bg-sunk); color: var(--fg); }
.badge.status-done { background: var(--ok-soft); color: var(--ok); }
.badge.expired { background: var(--danger-soft); color: var(--danger); }

.flash { padding: .75rem 1.1rem; border-radius: var(--radius-sm); margin-bottom: 1rem; font-weight: 500; }
.flash.ok { background: var(--ok-soft); color: var(--ok); }
.flash.err { background: var(--danger-soft); color: var(--danger); }

.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 100;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--primary-bg); color: var(--primary-fg);
  padding: .7rem 1.3rem; border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); font-weight: 500;
  transition: opacity .2s, transform .2s; max-width: calc(100vw - 32px); text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.no-scroll .toast { bottom: auto; top: calc(64px + env(safe-area-inset-top)); }
.toast.error { background: var(--danger); color: #fff; }

.dialog {
  border: 1px solid var(--glass-border); border-radius: var(--radius); padding: clamp(1.4rem, 5vw, 2rem);
  background: #fff; color: var(--fg); width: min(440px, calc(100vw - 32px));
  box-shadow: var(--shadow-lg);
}
.dialog[open] { animation: welcome-in .3s cubic-bezier(.2, .8, .2, 1) both; }
.dialog::backdrop { background: rgba(40, 30, 20, .35); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.dialog textarea.input { margin-bottom: 1rem; }
.dialog-actions { display: flex; justify-content: flex-end; gap: .5rem; flex-wrap: wrap; }
.confirm-modal { width: min(400px, calc(100vw - 32px)); }
.confirm-modal h2 { font-size: 1.15rem; margin-bottom: .5rem; }
.confirm-modal p { margin-bottom: 1.4rem; }
.btn.danger { box-shadow: 0 8px 20px -8px rgba(180, 35, 24, .5); }
.btn.danger:hover { background: #9b1c12; border-color: #9b1c12; }

/* ------------------------------------------------------------ Login */
.center-page { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 16px; }
.recent { margin-top: 1.6rem; border-top: 1px solid var(--border); padding-top: 1rem; }
.recent p { margin-bottom: .4rem; }
.recent-item { display: flex; justify-content: space-between; padding: .5rem 0; text-decoration: none; border-bottom: 1px solid var(--border); }

/* ------------------------------------------------------------ Willkommen / Login */
.welcome {
  min-height: 100vh; min-height: 100dvh; padding: 24px 16px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.2rem;
}
.welcome-card h1 { font-size: 1.6rem; margin-bottom: 1.2rem; }
.welcome-card {
  width: min(430px, 100%); padding: clamp(28px, 6vw, 44px);
  background: rgba(255, 255, 255, .78);
  backdrop-filter: blur(20px) saturate(1.4); -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border: 1px solid rgba(255, 255, 255, .9); border-radius: 28px;
  box-shadow: 0 1px 2px rgba(30, 20, 10, .04), 0 24px 60px -12px rgba(60, 40, 20, .18);
  text-align: center;
  animation: welcome-in .5s cubic-bezier(.2, .8, .2, 1) both;
}
@keyframes welcome-in { from { opacity: 0; transform: translateY(12px) scale(.98); } }
@media (prefers-reduced-motion: reduce) { .welcome-card { animation: none; } }
.welcome-icon {
  width: 64px; height: 64px; margin: 0 auto 1.2rem; border-radius: 20px;
  display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, #f59e7b 0%, #d9669b 50%, #7c83f2 100%);
  box-shadow: 0 10px 24px -6px rgba(217, 102, 155, .55);
}
.welcome-icon svg { width: 32px; height: 32px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; }
.welcome h1 { font-size: clamp(1.8rem, 1.4rem + 1.6vw, 2.2rem); margin-bottom: .4rem; }
.welcome-lead { color: var(--fg-muted); font-size: 1rem; margin: 0 auto 1.6rem; max-width: 30ch; }
.welcome-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: .75rem; }
.pw-field {
  display: flex; align-items: center; gap: .6rem; padding: 0 1.1rem;
  height: 56px; border-radius: 16px; background: #fff;
  border: 1.5px solid var(--border); transition: border-color .15s, box-shadow .15s;
}
.pw-field:focus-within { border-color: #7c83f2; box-shadow: 0 0 0 4px rgba(124, 131, 242, .18); }
.pw-field.has-error { border-color: var(--danger); }
.pw-field svg { width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: var(--fg-muted); stroke-width: 1.7; stroke-linecap: round; }
.pw-field input {
  flex: 1; min-width: 0; width: 100%; border: 0; outline: 0; background: none; color: var(--fg);
  font: 500 1.15rem/1 "Inter", sans-serif; letter-spacing: .08em;
}
.pw-field input::placeholder { color: #a8a39b; letter-spacing: 0; font-weight: 400; }
.welcome-note { margin: 0; color: var(--fg-muted); font-size: .82rem; text-align: left; line-height: 1.45; }
.welcome-card > .welcome-note { margin-top: 1rem; text-align: center; }
.welcome-check { margin: 0; text-align: left; font-size: .9rem; align-items: flex-start; }
.welcome-check input { margin-top: 2px; flex-shrink: 0; }
.pw-field input.plain { letter-spacing: 0; font-size: 1rem; }
.welcome-error { margin: 0; padding: .55rem .9rem; border-radius: 12px; background: var(--danger-soft); color: var(--danger); font-size: .9rem; }
.welcome-btn {
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  height: 56px; border: 0; border-radius: 16px; cursor: pointer; text-decoration: none;
  background: #1a1a1a; color: #fff; font: 600 1rem "Inter", sans-serif;
  transition: transform .12s, box-shadow .15s, background .15s;
  box-shadow: 0 8px 20px -8px rgba(0, 0, 0, .45);
}
.welcome-btn:hover { background: #000; box-shadow: 0 12px 24px -8px rgba(0, 0, 0, .5); }
.welcome-btn:active { transform: scale(.98); }
.welcome-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s; }
.welcome-btn:hover svg { transform: translateX(3px); }
.welcome-or { display: flex; align-items: center; gap: .8rem; margin: 1.5rem 0 1rem; color: #a8a39b; font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; }
.welcome-or::before, .welcome-or::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.welcome-qr { display: flex; align-items: center; gap: .8rem; margin: 0; text-align: left; color: var(--fg-muted); font-size: .9rem; }
.welcome-qr svg { width: 36px; height: 36px; flex-shrink: 0; padding: 7px; border-radius: 10px; background: var(--bg-sunk); fill: none; stroke: var(--fg); stroke-width: 1.5; stroke-linejoin: round; }
.welcome .recent { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--border); text-align: left; }
.recent-label { color: var(--fg-muted); font-size: .8rem; margin-bottom: .3rem; }
.welcome-foot { color: var(--fg-muted); font-size: .85rem; margin: 0; }


/* ------------------------------------------------------------ Moodboard */
.mb-board { position: relative; width: 100%; }
.mb-tile {
  position: absolute; margin: 0; overflow: hidden; cursor: zoom-in;
  border-radius: 10px; background: var(--tile-bg);
  transition: left .45s cubic-bezier(.2, .8, .2, 1), top .45s cubic-bezier(.2, .8, .2, 1),
              width .45s cubic-bezier(.2, .8, .2, 1), height .45s cubic-bezier(.2, .8, .2, 1);
}
.mb-tile img {
  width: 100%; height: 100%; object-fit: cover; opacity: 0;
  transition: opacity .5s, transform .6s cubic-bezier(.2, .8, .2, 1);
}
.mb-tile.loaded img { opacity: 1; }
@media (hover: hover) { .mb-tile:hover img { transform: scale(1.025); } }
@media (max-width: 560px) { .mb-tile { border-radius: 6px; } }
@media (prefers-reduced-motion: reduce) { .mb-tile, .mb-tile img { transition: none; } }

.palette { display: flex; gap: 10px; flex-wrap: wrap; }
.swatch { display: flex; flex-direction: column; align-items: center; gap: .35rem; }
.swatch i {
  display: block; width: 52px; height: 52px; border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06), 0 6px 16px -8px rgba(60, 40, 20, .35);
}
.swatch span { font: .72rem ui-monospace, "SF Mono", Menlo, Consolas, monospace; color: var(--fg-muted); letter-spacing: .03em; }

/* Großansicht */
.mb-lightbox {
  position: fixed; inset: 0; z-index: 90; display: grid; place-items: center;
  background: rgba(250, 248, 245, .96); opacity: 0; transition: opacity .2s;
  padding: calc(64px + env(safe-area-inset-top)) 16px calc(56px + env(safe-area-inset-bottom));
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.mb-lightbox.open { opacity: 1; }
.mb-lightbox img {
  max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px;
  box-shadow: var(--shadow-lg); opacity: 0; transition: opacity .25s;
}
.mb-lightbox img.in { opacity: 1; }
.lb-btn {
  position: absolute; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--border); background: rgba(255, 255, 255, .9); color: var(--fg); cursor: pointer; padding: 0;
  box-shadow: 0 4px 14px -6px rgba(60, 40, 20, .3);
}
.lb-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.lb-close { top: calc(12px + env(safe-area-inset-top)); right: 12px; }
.lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 16px; top: 50%; transform: translateY(-50%); }
.lb-count { position: absolute; bottom: calc(18px + env(safe-area-inset-bottom)); left: 0; right: 0; text-align: center; color: var(--fg-muted); font-size: .85rem; }
@media (max-width: 700px) { .lb-prev, .lb-next { display: none; } }

/* Öffentliche Seite */
.board-page { width: min(1320px, 100%); margin: 0 auto; padding: clamp(24px, 4vw, 48px) clamp(16px, 3vw, 40px) 56px; }
.board-head { max-width: 720px; margin: 0 0 clamp(20px, 3vw, 32px); animation: welcome-in .6s cubic-bezier(.2, .8, .2, 1) both; }
.board-head h1 { font-size: clamp(1.8rem, 1.3rem + 2vw, 2.8rem); letter-spacing: -.035em; margin-bottom: .6rem; }
.board-note { font-size: clamp(1rem, .95rem + .3vw, 1.15rem); color: #4a4743; white-space: pre-line; margin: 0; max-width: 60ch; }
.board-colors { margin-top: clamp(28px, 4vw, 44px); }
.board-colors h2, .section-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .2em; color: var(--fg-muted); font-weight: 600; margin-bottom: 1rem; }
.board-empty { padding: 4rem 1rem; text-align: center; color: var(--fg-muted); }

/* ------------------------------------------------------------ Admin */
.admin-page { width: min(1320px, 100%); margin: 0 auto; padding: 20px clamp(16px, 3vw, 40px) 64px; }
.admin-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.6rem; flex-wrap: wrap; }
.admin-top a.back { text-decoration: none; color: var(--fg-muted); font-weight: 500; display: inline-flex; align-items: center; gap: .35rem; }
.admin-top a.back svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.brand { display: inline-flex; align-items: center; gap: .6rem; font-weight: 650; letter-spacing: -.01em; font-size: 1.05rem; }
.brand img { width: 28px; height: 28px; }

.board-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.2rem; }
.board-card {
  display: flex; flex-direction: column; text-decoration: none; overflow: hidden;
  background: var(--glass); border: 1px solid var(--glass-border); border-radius: 20px;
  box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s;
  -webkit-backdrop-filter: blur(20px) saturate(1.4); backdrop-filter: blur(20px) saturate(1.4);
}
.board-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.board-card .cover { aspect-ratio: 4 / 3; display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; gap: 3px; background: var(--tile-bg); }
.board-card .cover img { width: 100%; height: 100%; object-fit: cover; min-height: 0; }
.board-card .cover img:first-child { grid-row: span 2; }
.board-card .cover.n1 img:first-child { grid-column: span 2; }
.board-card .cover.n2 img:nth-child(2) { grid-row: span 2; }
.board-card .cover.n0 { display: grid; place-items: center; grid-template-columns: 1fr; color: #a8a39b; }
.board-card .cover.n0 svg { width: 40px; height: 40px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linejoin: round; }
.board-card .meta { padding: .9rem 1.1rem 1rem; }
.board-card h2 { font-size: 1.02rem; margin: 0 0 .2rem; }
.board-card .dots { display: flex; gap: 4px; margin-top: .55rem; }
.board-card .dots i { width: 14px; height: 14px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06); }
.new-card {
  display: flex; flex-direction: column; justify-content: center; gap: .8rem; padding: 1.4rem;
  border: 1.5px dashed #d6d0c7; border-radius: 20px; background: rgba(255, 255, 255, .4); min-height: 200px;
}
.new-card h2 { margin: 0; font-size: 1.02rem; }

.edit-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1.6rem; align-items: start; }
@media (max-width: 980px) { .edit-layout { grid-template-columns: 1fr; } .edit-side { order: -1; } }
.edit-side { position: sticky; top: 20px; display: flex; flex-direction: column; gap: 1rem; }
@media (max-width: 980px) { .edit-side { position: static; } }
.panel {
  background: var(--glass); border: 1px solid var(--glass-border); border-radius: 20px; padding: 1.2rem;
  box-shadow: var(--shadow); -webkit-backdrop-filter: blur(20px) saturate(1.4); backdrop-filter: blur(20px) saturate(1.4);
}
.panel h2 { font-size: .72rem; text-transform: uppercase; letter-spacing: .2em; color: var(--fg-muted); margin-bottom: .8rem; }
.title-input {
  width: 100%; border: 0; background: none; padding: 0; margin: 0 0 .2rem; color: var(--fg);
  font: 650 clamp(1.5rem, 1.1rem + 1.6vw, 2.2rem)/1.2 "Inter", sans-serif; letter-spacing: -.03em;
  border-bottom: 2px solid transparent; transition: border-color .15s;
}
.title-input:hover { border-bottom-color: var(--border); }
.title-input:focus { outline: none; border-bottom-color: var(--focus); }
.link-box { display: flex; gap: .4rem; }
.link-box .input { font-size: .82rem; min-height: 40px; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
.link-box.off .input { text-decoration: line-through; color: var(--fg-muted); }
.stat { font-size: .82rem; color: var(--fg-muted); margin: .6rem 0 0; }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: .9rem 0 0; font-size: .92rem; cursor: pointer; }
.switch input { appearance: none; -webkit-appearance: none; width: 42px; height: 24px; border-radius: 999px; background: #d6d0c7; position: relative; cursor: pointer; transition: background .15s; flex-shrink: 0; margin: 0; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .15s; }
.switch input:checked { background: var(--ok); }
.switch input:checked::after { transform: translateX(18px); }
.side-actions { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .9rem; }
.saved-hint { font-size: .78rem; color: var(--ok); opacity: 0; transition: opacity .3s; }
.saved-hint.show { opacity: 1; }

.dropzone {
  border: 1.5px dashed #d0c9bf; border-radius: 20px; padding: 1.6rem 1.2rem; text-align: center;
  background: rgba(255, 255, 255, .5); transition: border-color .15s, background .15s; margin-bottom: 1.2rem; cursor: pointer;
}
.dropzone:hover { border-color: #b8b0a5; }
.dropzone.drag { border-color: var(--focus); background: rgba(124, 131, 242, .08); }
.dropzone p { margin: .2rem 0; }
.dropzone svg { width: 30px; height: 30px; fill: none; stroke: var(--fg-muted); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; margin-bottom: .3rem; }
.upload-progress { margin-top: .9rem; }
.bar { height: 6px; border-radius: 999px; background: var(--bg-sunk); overflow: hidden; max-width: 360px; margin: 0 auto .4rem; }
.bar-fill { height: 100%; width: 0; background: linear-gradient(90deg, #f59e7b, #d9669b, #7c83f2); transition: width .25s; }
.upload-errors { color: var(--danger); list-style: none; padding: 0; margin: .3rem 0 0; }

/* Knöpfe auf den Kacheln im Editor */
.tile-tools { position: absolute; top: 8px; right: 8px; display: flex; gap: 6px; opacity: 0; transition: opacity .15s; }
.mb-tile:hover .tile-tools, .mb-tile:focus-within .tile-tools, .mb-tile.is-big .tile-tools .t-big { opacity: 1; }
.mb-tile.is-big .tile-tools { opacity: 1; }
.mb-tile.is-big .tile-tools .t-del { opacity: 0; }
.mb-tile.is-big:hover .tile-tools .t-del { opacity: 1; }
@media (hover: none) { .tile-tools, .mb-tile.is-big .tile-tools .t-del { opacity: 1; } }
.tile-tools button {
  width: 34px; height: 34px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer; padding: 0;
  background: rgba(255, 255, 255, .92); color: var(--fg); box-shadow: 0 2px 8px rgba(0, 0, 0, .18); transition: opacity .15s, background .15s;
}
.tile-tools button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tile-tools .t-big[aria-pressed="true"] { background: #1a1a1a; color: #fff; }
.tile-tools .t-del:hover { background: var(--danger); color: #fff; }
.mb-tile.uploading { cursor: default; }
@media (max-width: 560px) {
  .palette { gap: 8px; }
  .swatch i { width: 42px; height: 42px; }
  .swatch span { font-size: .62rem; }
}
.lb-btn:focus { outline: none; }
.lb-btn:focus-visible { box-shadow: var(--focus-ring); border-color: var(--focus); }
.mb-lightbox img { max-height: calc(100vh - 130px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); max-height: calc(100dvh - 130px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); }

/* Ausschnitt verschieben (Editor) */
.mb-edit .mb-tile.cropped { cursor: grab; }
.mb-edit .mb-tile.dragging { cursor: grabbing; }
.mb-tile.dragging img, .mb-tile.panning img { transform: none !important; }
.mb-tile.panning { box-shadow: 0 0 0 3px var(--focus); touch-action: none; cursor: move; }
.mb-tile.panning .tile-tools { opacity: 1; }
.tile-tools .t-crop { display: none; }
.mb-tile.cropped .t-crop { display: grid; }
.tile-tools .t-crop[aria-pressed="true"] { background: var(--focus); color: #fff; }
.tile-tools { max-width: calc(100% - 16px); flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 560px) {
  .tile-tools { top: 5px; right: 5px; gap: 4px; max-width: calc(100% - 10px); }
  .tile-tools button { width: 28px; height: 28px; }
  .tile-tools button svg { width: 15px; height: 15px; }
}

/* Bilder tauschen (Editor) */
.tile-tools .t-move { cursor: grab; touch-action: none; }
.mb-tile.lifted { z-index: 5; pointer-events: none; transition: none; box-shadow: 0 20px 40px -12px rgba(0, 0, 0, .45); opacity: .9; }
.mb-tile.lifted .tile-tools { opacity: 1; }
.mb-tile.drop-target { box-shadow: 0 0 0 3px var(--accent); }
.mb-tile.drop-target img { opacity: .75; }

/* Zeit & Make-up */
.details { display: flex; flex-wrap: wrap; gap: .7rem; margin: 1.3rem 0 0; }
.detail {
  display: grid; grid-template-columns: auto 1fr; column-gap: .75rem; align-items: center;
  padding: .75rem 1.1rem .75rem .85rem; border-radius: 16px; min-width: 0; max-width: 100%;
  background: var(--glass); border: 1px solid var(--glass-border); box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(20px) saturate(1.4); backdrop-filter: blur(20px) saturate(1.4);
}
.detail svg {
  grid-row: span 2; width: 38px; height: 38px; padding: 8px; border-radius: 12px; box-sizing: border-box;
  background: linear-gradient(135deg, #fde2d4, #efe3fb); color: #8a4f6a;
  fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}
.detail dt { font-size: .68rem; text-transform: uppercase; letter-spacing: .16em; color: var(--fg-muted); font-weight: 600; }
.detail dd { margin: 0; font-weight: 550; overflow-wrap: anywhere; }
.detail-field { display: flex; align-items: center; gap: .6rem; margin-top: .6rem; }
.detail-field svg {
  width: 36px; height: 36px; padding: 8px; border-radius: 11px; flex-shrink: 0; box-sizing: border-box;
  background: linear-gradient(135deg, #fde2d4, #efe3fb); color: #8a4f6a;
  fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}
.detail-field .input { min-height: 42px; }

/* ------------------------------------------------------------ Infoblatt */
.details { margin: 0 0 clamp(20px, 3vw, 30px); display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .7rem; }
.detail.wide { grid-column: span 2; }
@media (max-width: 560px) { .details { grid-template-columns: 1fr; } .detail.wide { grid-column: auto; } }
.detail dd a { color: inherit; text-decoration: underline; text-decoration-color: rgba(0, 0, 0, .25); text-underline-offset: 3px; }
.detail dd a:hover { text-decoration-color: currentColor; }

.contract-cta {
  display: flex; align-items: center; gap: .9rem; text-decoration: none; color: #fff;
  margin: 0 0 clamp(20px, 3vw, 30px); padding: 1rem 1.2rem; border-radius: 18px; max-width: 640px;
  background: linear-gradient(120deg, #1a1a1a, #3b2f45); box-shadow: 0 14px 30px -14px rgba(0, 0, 0, .55);
  transition: transform .15s, box-shadow .15s;
}
.contract-cta:hover { transform: translateY(-2px); box-shadow: 0 18px 36px -14px rgba(0, 0, 0, .6); }
.contract-cta strong { display: block; font-weight: 600; }
.contract-cta small { display: block; opacity: .75; font-size: .85rem; margin-top: .1rem; }
.cta-icon { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; flex-shrink: 0; background: linear-gradient(135deg, #f59e7b, #d9669b 50%, #7c83f2); }
.contract-cta svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.contract-cta .arrow { margin-left: auto; opacity: .7; flex-shrink: 0; }
.contract-done { display: inline-flex; align-items: center; gap: .5rem; margin: 0 0 clamp(20px, 3vw, 30px); padding: .55rem .95rem; border-radius: 999px; background: var(--ok-soft); color: var(--ok); font-weight: 550; font-size: .92rem; }
.contract-done svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* ------------------------------------------------------------ Rückmeldung (Model) */
.feedback-hint { color: var(--fg-muted); font-size: .88rem; margin: 0 0 .8rem; display: flex; align-items: center; gap: .35rem; }
.feedback-hint svg { width: 16px; height: 16px; fill: #e0567b; stroke: none; }
.fb-tools { position: absolute; right: 8px; bottom: 8px; display: flex; gap: 6px; }
.fb-tools button {
  width: 36px; height: 36px; border-radius: 50%; border: 0; padding: 0; cursor: pointer; display: grid; place-items: center;
  background: rgba(255, 255, 255, .9); color: #3a3a3a; box-shadow: 0 2px 10px rgba(0, 0, 0, .2);
  transition: opacity .15s, transform .15s, background .15s; -webkit-tap-highlight-color: transparent;
}
.fb-tools svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.fb-heart[aria-pressed="true"] { background: #fff; color: #e0567b; }
.fb-heart[aria-pressed="true"] svg { fill: currentColor; }
.fb-heart.pop svg { animation: heart-pop .35s cubic-bezier(.2, .8, .2, 1.4); }
@keyframes heart-pop { 40% { transform: scale(1.35); } }
.fb-comment.has { background: #1a1a1a; color: #fff; }
@media (hover: hover) {
  .fb-tools button { opacity: 0; }
  .mb-tile:hover .fb-tools button, .fb-heart[aria-pressed="true"], .fb-comment.has { opacity: 1; }
  .fb-tools button:hover { transform: scale(1.08); }
}
@media (max-width: 560px) { .fb-tools { right: 5px; bottom: 5px; gap: 4px; } .fb-tools button { width: 30px; height: 30px; } .fb-tools svg { width: 16px; height: 16px; } }
.board-comment { margin-top: clamp(28px, 4vw, 44px); max-width: 640px; position: relative; }
.board-comment h2 { font-size: .72rem; text-transform: uppercase; letter-spacing: .2em; color: var(--fg-muted); font-weight: 600; margin-bottom: .8rem; }
.board-comment .saved-hint { position: absolute; right: 0; top: 0; }

/* ------------------------------------------------------------ Vertrag (Model) */
.contract-page { width: min(760px, 100%); margin: 0 auto; padding: clamp(20px, 4vw, 40px) clamp(16px, 3vw, 32px) 64px; }
.back-link { display: inline-flex; align-items: center; gap: .3rem; color: var(--fg-muted); text-decoration: none; font-weight: 500; margin-bottom: 1.4rem; }
.back-link svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.contract-text {
  background: #fff; border: 1px solid var(--border); border-radius: 18px; padding: clamp(18px, 4vw, 32px);
  font-size: .92rem; line-height: 1.6; max-height: 52vh; overflow-y: auto; box-shadow: var(--shadow);
  white-space: pre-line;
}
.contract-text h3 { font-size: .95rem; margin: 1.1em 0 .3em; white-space: normal; }
.contract-text p { margin: 0 0 .5em; white-space: normal; }
.contract-text p:first-child { font-weight: 650; font-size: 1.15rem; }
.contract-text mark { background: rgba(124, 131, 242, .14); color: #4b4fb8; border-radius: 4px; padding: 0 .25em; }
.contract-text mark.filled { background: rgba(47, 125, 79, .12); color: var(--ok); }
.contract-form { margin-top: 1.6rem; }
.contract-form h2 { font-size: .72rem; text-transform: uppercase; letter-spacing: .2em; color: var(--fg-muted); margin: 1.4rem 0 .8rem; }
fieldset.choice { border: 0; padding: 0; margin: 0 0 1rem; display: flex; flex-wrap: wrap; gap: .5rem; }
fieldset.choice legend { font-size: .85rem; font-weight: 500; margin-bottom: .4rem; padding: 0; width: 100%; }
.pill { display: inline-flex; align-items: center; gap: .45rem; padding: .55rem 1rem; border: 1.5px solid var(--border); border-radius: 999px; background: #fff; cursor: pointer; font-size: .92rem; }
.pill:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.pill input { accent-color: var(--accent); margin: 0; }
.sig-wrap { position: relative; margin-bottom: 1.1rem; }
.sig-pad {
  display: block; width: 100%; height: 180px; border-radius: 16px; background: #fff; touch-action: none; cursor: crosshair;
  border: 1.5px dashed #cfc8be; background-image: linear-gradient(transparent calc(100% - 46px), #e6e2dc calc(100% - 46px), #e6e2dc calc(100% - 45px), transparent calc(100% - 45px));
}
.sig-pad.signed { border-style: solid; border-color: var(--focus); }
.sig-hint { position: absolute; left: 0; right: 0; bottom: 18px; text-align: center; color: #b3ada4; font-size: .85rem; pointer-events: none; transition: opacity .2s; }
.sig-pad.signed + .sig-hint { opacity: 0; }
.sig-clear { position: absolute; top: 8px; right: 8px; }
.contract-form .check { font-size: .95rem; }
.contract-form .welcome-btn { width: 100%; margin-top: .4rem; }
.contract-form .welcome-btn:disabled { opacity: .6; cursor: default; }
.contract-form .welcome-error { margin-bottom: .8rem; }
.contract-ok { margin: 2rem auto; display: flex; flex-direction: column; align-items: center; }
.contract-ok .btn { width: 100%; }
.ok-icon { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 1rem; background: var(--ok-soft); color: var(--ok); }
.ok-icon svg { width: 32px; height: 32px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.contract-ok .welcome-btn { width: 100%; }

/* ------------------------------------------------------------ Einstellungen */
.settings-page { max-width: 880px; }
.settings-page h1 { margin-bottom: 1.2rem; }
.settings-page .panel { margin-bottom: 1.1rem; }
.contract-edit { font: .85rem/1.55 ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
.placeholder-list { columns: 2; padding-left: 1.1rem; font-size: .88rem; margin: .4rem 0 .8rem; }
.placeholder-list code { background: var(--bg-sunk); padding: .05em .35em; border-radius: 5px; }
@media (max-width: 640px) { .placeholder-list { columns: 1; } }
.sig-current { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.sig-current img { height: 70px; background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 8px 14px; }

/* ------------------------------------------------------------ Editor: Shooting, Vertrag, Rückmeldung */
.form-grid.tight { gap: 0 .6rem; }
.form-grid.tight .field { margin-bottom: .2rem; }
.small-input { min-height: 40px; margin-top: .6rem; font-size: .92rem; }
.geo-line { margin: .45rem 0 0 46px; color: var(--fg-muted); }
.geo-line.warn { color: var(--warn); }
.shoot-preview { margin: .7rem 0 .2rem; padding: .7rem .8rem; border-radius: 14px; background: linear-gradient(135deg, rgba(253, 226, 212, .6), rgba(239, 227, 251, .6)); font-size: .85rem; }
.shoot-preview p { margin: 0; display: flex; gap: .5rem; align-items: flex-start; }
.shoot-preview p + p { margin-top: .35rem; }
.shoot-preview svg { width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: #8a4f6a; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.segmented { display: flex; background: var(--bg-sunk); border-radius: 12px; padding: 3px; gap: 2px; }
.segmented button { flex: 1; border: 0; background: none; padding: .45rem .6rem; border-radius: 9px; font: inherit; font-size: .88rem; font-weight: 550; color: var(--fg-muted); cursor: pointer; }
.segmented button.active { background: #fff; color: var(--fg); box-shadow: 0 1px 4px rgba(0, 0, 0, .1); }
.contract-state { display: flex; gap: .5rem; margin: 0; }
.contract-state svg { width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: var(--ok); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; margin-top: 2px; }
.flash.small { font-size: .85rem; padding: .55rem .8rem; }
.fb-note { display: flex; gap: .6rem; align-items: flex-start; margin-top: .55rem; }
.fb-note img { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.fb-note p { margin: 0; font-size: .88rem; }
.model-comment { margin: .8rem 0 0; padding: .6rem .8rem; border-left: 3px solid var(--accent); background: var(--accent-soft); border-radius: 0 10px 10px 0; font-size: .9rem; white-space: pre-line; }
.fb-badge { position: absolute; left: 8px; bottom: 8px; display: flex; gap: 4px; }
.fb-badge span { min-width: 26px; height: 26px; border-radius: 13px; display: grid; place-items: center; background: rgba(255, 255, 255, .92); color: #e0567b; font-size: .8rem; box-shadow: 0 2px 8px rgba(0, 0, 0, .18); padding: 0 6px; }
.badge.new { background: #e0567b; color: #fff; font-size: .68rem; vertical-align: middle; }

/* Feinschliff Handy */
.seg { white-space: nowrap; }
.contract-text.rendered { white-space: normal; }
.feedback-hint { display: block; }
.feedback-hint svg { display: inline-block; vertical-align: -3px; margin: 0 .1rem; }
@media (max-width: 560px) {
  .details { grid-template-columns: 1fr 1fr; gap: .5rem; }
  .detail.wide { grid-column: span 2; }
  .detail { grid-template-columns: 1fr; padding: .7rem .8rem; row-gap: .15rem; border-radius: 14px; }
  .detail svg { grid-row: auto; width: 30px; height: 30px; padding: 6px; border-radius: 9px; margin-bottom: .25rem; }
  .detail dd { font-size: .92rem; }
  .detail.wide { grid-template-columns: auto 1fr; column-gap: .65rem; }
  .detail.wide svg { grid-row: span 2; margin-bottom: 0; }
}
@media (max-width: 560px) {
  .detail.wide-m { grid-column: span 2; grid-template-columns: auto 1fr; column-gap: .65rem; }
  .detail.wide-m svg { grid-row: span 2; margin-bottom: 0; }
}

/* Infoblatt: ein ruhiger Kasten statt vieler Karten */
.info {
  margin: 0 0 clamp(22px, 3vw, 32px); padding: clamp(16px, 2.4vw, 24px) clamp(18px, 2.6vw, 28px);
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.05rem 2.2rem;
  background: var(--glass); border: 1px solid var(--glass-border); border-radius: 20px;
  -webkit-backdrop-filter: blur(20px) saturate(1.4); backdrop-filter: blur(20px) saturate(1.4);
  box-shadow: 0 1px 2px rgba(30, 20, 10, .04), 0 10px 28px -14px rgba(60, 40, 20, .16);
}
.info > div { display: grid; grid-template-columns: 18px 1fr; column-gap: .7rem; align-items: start; min-width: 0; }
.info svg { grid-row: span 2; width: 18px; height: 18px; margin-top: 1px; fill: none; stroke: #9a7d8a; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.info dt { font-size: .7rem; text-transform: uppercase; letter-spacing: .14em; color: var(--fg-muted); font-weight: 600; line-height: 1.3; }
.info dd { margin: .15rem 0 0; font-size: .95rem; line-height: 1.45; overflow-wrap: anywhere; }
.info dd a { color: inherit; text-decoration: underline; text-decoration-color: rgba(0, 0, 0, .2); text-underline-offset: 3px; }
.info dd a:hover { text-decoration-color: currentColor; }
@media (max-width: 560px) { .info { grid-template-columns: 1fr; gap: .9rem; border-radius: 16px; } }
.info > div { align-content: start; }

.info .wa-link { display: inline-flex; vertical-align: -4px; margin-left: .55rem; text-decoration: none; }
.info svg.wa { grid-row: auto; width: 20px; height: 20px; margin: 0; fill: #25d366; stroke: none; transition: transform .15s; }
.info .wa-link:hover svg.wa { transform: scale(1.12); }

.info .when-time { display: flex; align-items: center; gap: .35rem; margin-top: .1rem; }
.info .when-time svg { grid-row: auto; width: 14px; height: 14px; margin: 0; }

.info a.gps-line { display: flex; white-space: nowrap; align-items: center; gap: .35rem; margin-top: .15rem; text-decoration: none; color: #8a4f6a; font-weight: 550; font-size: .9rem; }
.info a.gps-line u { text-decoration-color: rgba(138, 79, 106, .35); text-underline-offset: 3px; }
.info a.gps-line:hover u { text-decoration-color: currentColor; }
.info a.gps-line svg { grid-row: auto; width: 14px; height: 14px; margin: 0; stroke: currentColor; }
.info .gps-coords { display: block; margin: .1rem 0 0 1.25rem; font: .72rem ui-monospace, "SF Mono", Menlo, Consolas, monospace; color: var(--fg-muted); }

/* Großansicht mit Leiste für Herz & Anmerkung */
.mb-lightbox.has-foot { padding-bottom: calc(118px + env(safe-area-inset-bottom)); }
.mb-lightbox.has-foot .lb-count { bottom: auto; top: calc(24px + env(safe-area-inset-top)); }
.lb-foot {
  position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(16px + env(safe-area-inset-bottom));
  width: min(620px, calc(100% - 24px)); display: flex; align-items: flex-end; gap: .6rem;
  padding: .55rem .6rem .55rem .55rem; border-radius: 20px; background: #fff; border: 1px solid var(--border);
  box-shadow: 0 16px 40px -18px rgba(60, 40, 20, .35);
}
.fb-big-heart {
  width: 46px; height: 46px; flex-shrink: 0; border-radius: 50%; border: 1.5px solid var(--border); background: #fff;
  display: grid; place-items: center; cursor: pointer; color: #3a3a3a; padding: 0; transition: background .15s, border-color .15s;
}
.fb-big-heart svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.fb-big-heart[aria-pressed="true"] { color: #e0567b; border-color: rgba(224, 86, 123, .35); background: rgba(224, 86, 123, .08); }
.fb-big-heart[aria-pressed="true"] svg { fill: currentColor; }
.fb-big-heart.pop svg { animation: heart-pop .35s cubic-bezier(.2, .8, .2, 1.4); }
.fb-field { flex: 1; position: relative; min-width: 0; }
.fb-field textarea {
  width: 100%; resize: none; border: 0; outline: 0; background: var(--bg-sunk); border-radius: 14px;
  padding: .72rem 5.2rem .72rem .95rem; font: inherit; font-size: 1rem; line-height: 1.35; color: var(--fg); min-height: 46px; display: block;
}
.fb-field textarea:focus { background: #f5f2ee; box-shadow: var(--focus-ring); }
.fb-state { position: absolute; right: .8rem; bottom: .8rem; font-size: .75rem; color: var(--ok); pointer-events: none; }
.lb-count { pointer-events: none; }

/* Vertrags-Hinweis hell, passend zum Rest */
.contract-cta {
  color: var(--fg); background: var(--glass); border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: blur(20px) saturate(1.4); backdrop-filter: blur(20px) saturate(1.4);
  box-shadow: 0 1px 2px rgba(30, 20, 10, .04), 0 10px 28px -14px rgba(60, 40, 20, .16);
  padding: .85rem 1.1rem .85rem .85rem;
}
.contract-cta:hover { box-shadow: 0 1px 2px rgba(30, 20, 10, .04), 0 14px 32px -14px rgba(60, 40, 20, .24); }
.contract-cta small { color: var(--fg-muted); opacity: 1; }
.contract-cta .cta-icon { width: 38px; height: 38px; border-radius: 12px; color: #fff; }
.contract-cta .cta-icon svg { width: 19px; height: 19px; }
.contract-cta .arrow { color: var(--fg-muted); }

.contract-cta strong { font-weight: 600; }
/* Eigene Bilder des Models */
.mine { margin-top: clamp(32px, 5vw, 56px); }
.mine-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-bottom: .9rem; }
.mine-head h2 { font-size: .72rem; text-transform: uppercase; letter-spacing: .2em; color: var(--fg-muted); font-weight: 600; margin-bottom: .35rem; }
.mine-head p { margin: 0; max-width: 52ch; }
.mine-count { font-size: .8rem; color: var(--fg-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.mine-add {
  display: flex; align-items: center; justify-content: center; gap: .5rem; cursor: pointer; margin-bottom: 1rem;
  padding: .9rem; border: 1.5px dashed #d0c9bf; border-radius: 16px; background: rgba(255, 255, 255, .5);
  color: var(--fg); font-weight: 550; transition: border-color .15s, background .15s;
}
.mine-add:hover { border-color: #b8b0a5; background: rgba(255, 255, 255, .8); }
.mine-add svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.mine-status { color: var(--fg-muted); margin: -.4rem 0 .8rem; }
.mine-del {
  position: absolute; top: 6px; right: 6px; width: 30px; height: 30px; border-radius: 50%; border: 0; padding: 0; cursor: pointer;
  display: grid; place-items: center; background: rgba(255, 255, 255, .9); color: #3a3a3a; box-shadow: 0 2px 8px rgba(0, 0, 0, .18);
}
.mine-del svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
@media (hover: hover) { .mine-del { opacity: 0; transition: opacity .15s; } .mb-tile:hover .mine-del { opacity: 1; } }

/* Anmerkungen wie in der Galerie */
.fb-comment { position: relative; }
.fb-comment .note-count, .t-note .note-count, .fb-note-badge .note-count {
  position: absolute; top: -3px; right: -3px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px;
  background: #1a1a1a; color: #fff; font: 700 .65rem/17px "Inter", sans-serif; text-align: center;
}
.fb-comment .note-count:empty { display: none; }
.fb-comment.has { background: #fff; color: #1a1a1a; }
.fb-big-note {
  flex: 1; display: flex; align-items: center; gap: .55rem; height: 46px; padding: 0 1rem; border-radius: 14px; border: 0;
  background: var(--bg-sunk); color: var(--fg); font: inherit; font-weight: 550; cursor: pointer; text-align: left;
}
.fb-big-note:hover { background: #ece8e2; }
.fb-big-note svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; flex-shrink: 0; }
.lb-foot { align-items: center; }
.notes-dialog { width: min(480px, calc(100vw - 24px)); }
.notes-head { display: flex; gap: .8rem; align-items: center; margin-bottom: 1rem; }
.notes-head img { width: 54px; height: 54px; object-fit: cover; border-radius: 12px; flex-shrink: 0; }
.notes-head h2 { margin: 0 0 .1rem; font-size: 1.1rem; }
.notes-head p { margin: 0; }
.notes-dialog .thread { list-style: none; margin: 0 0 .9rem; padding: .75rem .9rem; border-radius: var(--radius-sm); background: var(--bg-sunk);
  max-height: 260px; overflow-y: auto; display: grid; gap: 10px; }
.note-item { position: relative; min-width: 0; overflow-wrap: anywhere; white-space: pre-line; color: var(--fg); font-size: .93rem; }
.note-item.is-reply { margin-left: 1.2rem; padding-left: .7rem; border-left: 2px solid var(--border); }
.note-name { font-weight: 650; }
.note-item.admin .note-name { color: #b4541f; }
.note-time { color: var(--fg-muted); font-size: .76rem; margin-left: .35rem; }
.note-quote { display: block; font-size: .8rem; color: var(--fg-muted); margin-bottom: .15rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.note-acts { display: flex; gap: .8rem; margin-top: 3px; }
.note-act { border: 0; background: none; padding: 0; font: 600 .75rem "Inter", sans-serif; color: var(--fg-muted); cursor: pointer; }
.note-act:hover { color: var(--fg); text-decoration: underline; }
.note-act.del:hover { color: var(--danger); }
.note-item.is-fresh { animation: note-fresh 2s ease-out; }
@keyframes note-fresh { 0% { background: var(--accent-soft); transform: translateY(4px); opacity: .4; } 15% { transform: none; opacity: 1; } 100% { background: transparent; } }
.reply-to { display: flex; align-items: center; gap: .5rem; margin: 0 0 .5rem; padding: .4rem .6rem; border-radius: 10px; background: var(--accent-soft); color: var(--accent); font-size: .82rem; }
.reply-to span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reply-to button { width: 24px; height: 24px; flex-shrink: 0; padding: 0; border: 0; border-radius: 6px; background: none; color: inherit; cursor: pointer; display: grid; place-items: center; }
.reply-to svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.notes-dialog textarea { margin-bottom: 1rem; }

.fb-badge { align-items: center; }
.fb-heart-mark { min-width: 26px; height: 26px; border-radius: 13px; display: grid; place-items: center; background: rgba(255,255,255,.92); color: #e0567b; font-size: .8rem; box-shadow: 0 2px 8px rgba(0,0,0,.18); }
.fb-note-badge { position: relative; width: 30px; height: 30px; border-radius: 50%; border: 0; padding: 0; cursor: pointer; display: grid; place-items: center;
  background: rgba(255,255,255,.92); color: #3a3a3a; box-shadow: 0 2px 8px rgba(0,0,0,.18); opacity: 0; transition: opacity .15s; }
.fb-note-badge svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.fb-note-badge .note-count:empty { display: none; }
.fb-badge.has-notes .fb-note-badge, .mb-tile:hover .fb-note-badge { opacity: 1; }
@media (hover: none) { .fb-note-badge { opacity: 1; } }
button.fb-note { display: flex; gap: .6rem; align-items: center; width: 100%; margin-top: .45rem; padding: .35rem; border: 0; border-radius: 12px; background: none; cursor: pointer; text-align: left; font: inherit; color: inherit; }
button.fb-note:hover { background: var(--bg-sunk); }
.fb-note p { flex: 1; min-width: 0; margin: 0; font-size: .86rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fb-note-n { font-size: .72rem; font-weight: 700; background: #1a1a1a; color: #fff; border-radius: 999px; min-width: 18px; height: 18px; line-height: 18px; text-align: center; padding: 0 5px; }

.info .cal-line { display: flex; align-items: center; gap: .35rem; margin-top: .25rem; font-size: .88rem; color: #8a4f6a; }
.info .cal-line svg { grid-row: auto; width: 14px; height: 14px; margin: 0; stroke: currentColor; }
.info .cal-line a { color: inherit; font-weight: 550; }

.note-item.is-editing { background: var(--accent-soft); border-radius: 8px; box-shadow: 0 0 0 4px var(--accent-soft); }

.notes-dialog .note-item { padding-right: 64px; }
.note-tools { position: absolute; top: -2px; right: -2px; display: flex; gap: 2px; }
.note-tool { width: 28px; height: 28px; padding: 0; border: 0; border-radius: 8px; background: none; color: var(--fg-muted); cursor: pointer; display: grid; place-items: center; }
.note-tool svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.note-tool:hover { background: rgba(0, 0, 0, .06); color: var(--fg); }
.note-tool.del:hover { color: var(--danger); }
