/* Verwaltung – Gärtnerei am Gegenbach. Ruhig, warm, große Tippflächen (Handy zuerst). */
@font-face { font-family: Poppins; font-weight: 400; font-display: swap; src: url(/_/fonts/poppins-400.woff2) format('woff2'); }
@font-face { font-family: Poppins; font-weight: 500; font-display: swap; src: url(/_/fonts/poppins-500.woff2) format('woff2'); }
@font-face { font-family: Poppins; font-weight: 600; font-display: swap; src: url(/_/fonts/poppins-600.woff2) format('woff2'); }

:root {
  --bg: #f7f5ef;
  --card: #fff;
  --ink: #1d2b22;
  --ink-2: #56645a;
  --ink-3: #8a958c;
  --line: #e8e4d9;
  --line-2: #d9d4c6;
  --green: #2f6b45;
  --green-d: #24563a;
  --green-l: #e7f0e9;
  --sun: #f5c542;
  --sun-l: #fdf4d8;
  --red: #b4372f;
  --red-l: #fbeceb;
  --blue: #0033cc;
  --r: 16px;
  --r-s: 11px;
  --shadow: 0 1px 2px rgba(29, 43, 34, .05), 0 4px 18px rgba(29, 43, 34, .06);
  --shadow-l: 0 10px 40px rgba(29, 43, 34, .18);
  --side: 248px;
  --tab: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.5 Poppins, system-ui, sans-serif; min-height: 100dvh; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--green); }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: 26px; line-height: 1.25; }
h2 { font-size: 19px; }
h3 { font-size: 16px; }
p { margin: 0; }
svg.i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.muted { color: var(--ink-2); }
.small { font-size: 14px; }
.tiny { font-size: 12.5px; color: var(--ink-3); }
.hidden { display: none !important; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--green) 45%, transparent); outline-offset: 2px; border-radius: 6px; }

/* ---------- Grundgerüst ---------- */
.shell { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: 100dvh; }
.side { position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; gap: 4px; padding: 22px 14px; border-right: 1px solid var(--line); background: #fbfaf6; }
.col-main { min-width: 0; }
.brand-row { display: flex; align-items: center; gap: 4px; padding: 4px 0 22px 10px; }
.brand { flex: 1; min-width: 0; display: flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; }
.brand > div { min-width: 0; }
.logo-tile { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 12px; background: #fff; border: 1px solid var(--line); box-shadow: 0 1px 2px rgba(29, 43, 34, .06); }
.logo-tile img { width: 76%; height: 76%; object-fit: contain; }
.side-toggle { display: grid; place-items: center; flex: none; width: 32px; height: 32px; margin-top: 4px; border: 0; border-radius: 9px; background: none; color: var(--ink-3); cursor: pointer; }
.side-toggle:hover { background: #f1eee6; color: var(--ink); }
.side-toggle svg.i { width: 19px; height: 19px; }
.brand b { display: block; font-weight: 600; font-size: 15px; line-height: 1.2; }
.nav-link { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: 15px; }
.nav-link:hover { background: #f1eee6; color: var(--ink); }
.nav-link[aria-current] { background: var(--green-l); color: var(--green-d); }
.nav-sep { height: 1px; margin: 10px 12px; background: var(--line); }
.side .foot { margin-top: auto; display: grid; gap: 10px; padding-top: 12px; }
.site-link { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 12px; background: #fff; color: var(--ink-2); font-size: 14px; font-weight: 500; text-decoration: none; }
.site-link:hover { color: var(--ink); border-color: var(--ink-3); }
.site-link svg.i { width: 17px; height: 17px; flex: none; }
.me { display: flex; align-items: center; gap: 10px; padding: 10px 6px 0 4px; border-top: 1px solid var(--line); }
.avatar { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--green-l); color: var(--green-d); font-weight: 600; font-size: 14px; }
.me b, .me span:not(.avatar) { display: block; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; }
.me b { font-size: 14px; }
.me .nl-t span { font-size: 12px; color: var(--ink-3); }
.me-out { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border: 0; border-radius: 9px; background: none; color: var(--ink-3); cursor: pointer; }
.me-out:hover { background: var(--red-l); color: var(--red); }
.me-out svg.i { width: 19px; height: 19px; }
button.nav-link { width: 100%; border: 0; background: none; font: inherit; font-weight: 500; font-size: 15px; text-align: left; cursor: pointer; }
.nav-link .i { flex: none; }
.nl-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Eingeklappte Seitenleiste: nur Icons */
.shell.mini { --side: 76px; }
.shell.mini .side { padding-inline: 12px; }
.shell.mini .brand-row { flex-direction: column; align-items: center; gap: 8px; padding-left: 0; }
.shell.mini .brand { justify-content: center; }
.shell.mini .brand div, .shell.mini .nl-t { display: none; }
.shell.mini .site-link { padding: 0; }
.shell.mini .me { flex-direction: column; padding-inline: 0; }
.shell.mini .nav-link { justify-content: center; padding-inline: 0; }
.shell.mini .nav-sep { margin-inline: 4px; }
.main { min-width: 0; padding: 34px 40px 80px; }
.page { max-width: 860px; margin: 0 auto; }
.page.wide { max-width: none; }
.topbar { display: none; }
.tabs { display: none; }

@media (max-width: 899px) {
  .shell { display: block; }
  .side { display: none; }
  .main { padding: 18px 16px calc(var(--tab) + var(--safe-b) + 28px); }
  .topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 8px 12px; padding-top: max(8px, env(safe-area-inset-top)); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid transparent; }
  .topbar.scrolled { border-bottom-color: var(--line); }
  .topbar .t { flex: 1; min-width: 0; font-weight: 600; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .topbar .logo-tile { width: 32px; height: 32px; border-radius: 10px; }
  .tabs { position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(5, 1fr); height: calc(var(--tab) + var(--safe-b)); padding-bottom: var(--safe-b); background: rgba(255, 255, 255, .94); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); }
  .tabs a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--ink-3); text-decoration: none; font-size: 11.5px; font-weight: 500; }
  .tabs a svg.i { width: 23px; height: 23px; }
  .tabs a[aria-current] { color: var(--green); }
  h1 { font-size: 23px; }
}

/* ---------- Bausteine ---------- */
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.head p { margin-top: 4px; }
.back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 8px; color: var(--ink-2); font-size: 14px; text-decoration: none; font-weight: 500; }
.back svg.i { width: 17px; height: 17px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 20px; }
.card + .card, .stack > * + * { margin-top: 14px; }
.card h2 + p, .card h3 + p { margin-top: 3px; }
.section-title { margin: 34px 0 12px; font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.section-title.first { margin-top: 0; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.row.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 599px) { .grid2 { grid-template-columns: 1fr; } }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border: 1px solid var(--line-2); border-radius: 12px; background: #fff; color: var(--ink); font-weight: 500; font-size: 15px; cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s, transform .05s; }
.btn:hover { background: #f6f4ee; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: default; transform: none; }
.btn.primary { background: var(--green); border-color: var(--green); color: #fff; }
.btn.primary:hover { background: var(--green-d); }
.btn.danger { color: var(--red); }
.btn.danger:hover { background: var(--red-l); border-color: #efc9c6; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: #efece4; color: var(--ink); }
.btn.big { min-height: 54px; padding: 0 24px; font-size: 16px; border-radius: 14px; }
.btn.block { display: flex; width: 100%; }
.btn.icon { width: 40px; min-height: 40px; padding: 0; border-radius: 11px; }
.btn.icon.sm { width: 34px; min-height: 34px; }
.btn.icon svg.i { width: 19px; height: 19px; }
.btn .spin { width: 18px; height: 18px; border: 2.5px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.field { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
.field + .field, .field + .row, .row + .field, .grid2 + .field, .field + .grid2, .grid2 + .grid2 { margin-top: 14px; }
.field > label, .lbl { font-weight: 500; font-size: 14px; color: var(--ink-2); }
.field .hint { font-size: 13px; color: var(--ink-3); }
.input, .field input:not([type=checkbox]):not([type=radio]):not([type=file]), .field select, .field textarea, .rich {
  width: 100%; min-height: 46px; padding: 10px 13px; border: 1px solid var(--line-2); border-radius: var(--r-s); background: #fff; font-size: 16px; line-height: 1.45; transition: border-color .15s, box-shadow .15s; }
.field textarea { min-height: 90px; resize: vertical; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus, .rich:focus-within { outline: none; border-color: var(--green); box-shadow: 0 0 0 4px color-mix(in srgb, var(--green) 14%, transparent); }
.field select { appearance: none; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2356645a' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center; padding-right: 40px; }
.code-input { font-size: 28px !important; letter-spacing: .35em; text-align: center; font-variant-numeric: tabular-nums; font-weight: 500; }

.check { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 15px; user-select: none; }
.check input { flex: none; width: 20px; height: 20px; accent-color: var(--green); margin: 0; }

.switch { position: relative; display: inline-flex; flex: none; width: 50px; height: 30px; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: #d6d2c6; transition: background .2s; }
.switch span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .2s; }
.switch input:checked + span { background: var(--green); }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--green) 45%, transparent); outline-offset: 2px; }

.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 13px; background: #efece4; }
.seg button { min-height: 38px; padding: 6px 14px; line-height: 1.25; border: 0; border-radius: 10px; background: transparent; color: var(--ink-2); font-weight: 500; font-size: 14px; cursor: pointer; }
.seg button[aria-pressed=true] { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .1); }

.badge { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; padding: 3px 10px; border-radius: 12px; font-size: 12.5px; font-weight: 500; line-height: 1.35; background: #efece4; color: var(--ink-2); }
.badge.green { background: var(--green-l); color: var(--green-d); }
.badge.sun { background: var(--sun-l); color: #8a6410; }
.badge.red { background: var(--red-l); color: var(--red); }
.badge .dot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

.empty { padding: 34px 20px; text-align: center; color: var(--ink-2); }
.empty svg.i { width: 34px; height: 34px; color: var(--ink-3); margin-bottom: 8px; }

/* ---------- Übersicht ---------- */
.hello { margin-bottom: 22px; }
.hello h1 { font-size: 28px; }
.status { display: flex; align-items: center; gap: 14px; }
.status .pulse { position: relative; width: 12px; height: 12px; flex: none; border-radius: 50%; background: #3aa865; }
.status .pulse::after { content: ''; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid #3aa865; opacity: .35; animation: pulse 2.4s ease-out infinite; }
.status.err .pulse { background: var(--red); }
.status.err .pulse::after { border-color: var(--red); }
.status.warn .pulse { background: var(--sun); }
.status.warn .pulse::after { border-color: var(--sun); }
.card.warn { background: var(--sun-l); }
@keyframes pulse { 0% { transform: scale(.6); opacity: .6; } 100% { transform: scale(1.5); opacity: 0; } }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 14px; }
.tile { display: flex; flex-direction: column; gap: 12px; min-height: 150px; padding: 20px; border: 1px solid var(--line); border-radius: var(--r); background: #fff; box-shadow: var(--shadow); color: var(--ink); text-decoration: none; transition: transform .15s, box-shadow .15s, border-color .15s; }
.tile:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(29, 43, 34, .05), 0 12px 30px rgba(29, 43, 34, .09); border-color: var(--line-2); }
.tile .ico { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 13px; background: var(--green-l); color: var(--green); }
.tile .ico.sun { background: var(--sun-l); color: #a2770f; }
.tile .ico.blue { background: #e9eefc; color: #2d4fb8; }
.tile .ico.rose { background: #f8ebe6; color: #a5543a; }
.tile b { display: block; font-weight: 600; font-size: 16px; }
.tile .sub { font-size: 13.5px; color: var(--ink-2); line-height: 1.45; }
.tile .sub.clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 599px) {
  .tiles { gap: 10px; }
  .tile { min-height: 132px; padding: 15px; gap: 10px; }
  .tile b { font-size: 15px; }
  .hello h1 { font-size: 24px; }
}
.list-item { display: flex; align-items: center; gap: 14px; padding: 14px 4px; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.list-item:first-child { border-top: 0; }
.list-item .grow b { display: block; font-weight: 500; }
.list-item > svg.i:last-child { color: var(--ink-3); }
a.list-item:hover b { color: var(--green-d); }
.card.list { padding: 6px 18px; }

/* ---------- Öffnungszeiten ---------- */
.hours-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) auto; gap: 10px; align-items: end; padding: 14px 0; border-top: 1px solid var(--line); }
.hours-row:first-child { border-top: 0; padding-top: 0; }
.hours-row .acts { display: flex; gap: 4px; padding-bottom: 3px; }
@media (max-width: 599px) {
  .hours-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: 'd a' 't t'; }
  .hours-row .f-day { grid-area: d; }
  .hours-row .f-time { grid-area: t; }
  .hours-row .acts { grid-area: a; }
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 36px; padding: 0 14px; border: 1px dashed var(--line-2); border-radius: 99px; background: transparent; color: var(--ink-2); font-size: 13.5px; font-weight: 500; cursor: pointer; }
.chip:hover { border-style: solid; background: #fff; color: var(--ink); }
.savebar { position: sticky; bottom: 16px; z-index: 20; display: flex; align-items: center; gap: 12px; margin-top: 18px; padding: 12px 12px 12px 18px; border-radius: 16px; background: var(--ink); color: #fff; box-shadow: var(--shadow-l); animation: up .25s ease-out; }
/* Hülle ohne eigene Box: so klebt die Leiste an der ganzen Seite (unten im Bild), nicht nur an sich selbst */
.bar-slot { display: contents; }
.savebar .grow { font-size: 14.5px; }
.savebar .grow b { font-weight: 600; }
/* Meldungen über der Speicherleiste statt darauf */
body:has(.savebar) #toasts { bottom: 104px; }
@media (max-width: 899px) { body:has(.savebar) #toasts { bottom: calc(var(--tab) + var(--safe-b) + 90px); } }
@media (max-width: 599px) { body:has(.savebar) #toasts { bottom: calc(var(--tab) + var(--safe-b) + 140px); } }
.savebar .btn { border-color: transparent; }
.savebar .btn.ghost { color: #cfd6d0; }
.savebar .btn.ghost:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.savebar .btn.primary { background: var(--sun); border-color: var(--sun); color: var(--ink); }
.savebar .btn.primary:hover { background: #f0b92a; }
@media (max-width: 899px) { .savebar { bottom: calc(var(--tab) + var(--safe-b) + 10px); } }
@media (max-width: 599px) { .savebar { flex-wrap: wrap; } .savebar .grow { flex-basis: 100%; } .savebar .btn { flex: 1; } }
@keyframes up { from { transform: translateY(12px); opacity: 0; } }

/* ---------- Hinweise ---------- */
.notice { display: grid; gap: 14px; }
.notice.off { background: #fbfaf6; }
.notice.off textarea { color: var(--ink-3); }
.notice .when { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 599px) { .notice .when { grid-template-columns: 1fr; } }

/* ---------- Seiten-Editor ---------- */
.editor { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 24px; align-items: start; }
.editor .pv { position: sticky; top: 20px; height: calc(100dvh - 40px); display: flex; flex-direction: column; border-radius: var(--r); border: 1px solid var(--line); background: #fff; overflow: hidden; box-shadow: var(--shadow); }
.pv-bar { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-bottom: 1px solid var(--line); background: #fbfaf6; font-size: 13px; color: var(--ink-2); }
.pv-frame { position: relative; flex: 1; overflow: hidden; background: #e9e6dd; }
.pv-frame iframe { position: absolute; top: 0; left: 50%; border: 0; background: #fff; transform-origin: top center; }
.pv-full { position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; background: #fff; }
.pv-full .pv-frame { background: #fff; }
.pv-full iframe { left: 0; width: 100%; height: 100%; transform: none !important; }
@media (max-width: 1279px) { .editor { grid-template-columns: minmax(0, 1fr); } .editor .pv { display: none; } }
.ed-head { position: sticky; top: 0; z-index: 25; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: -10px -8px 16px; padding: 10px 8px; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
@media (max-width: 899px) { .ed-head { top: 56px; } }
.ed-head > .grow { flex: 1 1 240px; }
.saved { font-size: 13px; color: var(--ink-3); display: inline-flex; align-items: center; gap: 6px; }
.blk { padding: 0; overflow: hidden; }
.blk + .blk { margin-top: 10px; }
.blk-h { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 12px 12px 14px; border: 0; background: transparent; text-align: left; cursor: pointer; }
.blk-h .ico { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 10px; background: var(--green-l); color: var(--green); }
.blk-h .ico svg.i { width: 18px; height: 18px; }
.blk-h .grow b { display: block; font-weight: 500; font-size: 15px; }
.blk-h .grow span { display: block; font-size: 13px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.blk-h .chev { color: var(--ink-3); transition: transform .2s; }
.blk.open > .blk-h .chev { transform: rotate(180deg); }
.blk-b { padding: 4px 16px 18px; border-top: 1px solid var(--line); }
.blk-b > .field:first-child, .blk-b > .row:first-child { margin-top: 14px; }
.blk-tools { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--line); }
.blk.hidden-mobile .blk-h .ico, .blk.hidden-desktop .blk-h .ico { background: #efece4; color: var(--ink-3); }
.nest { margin-top: 10px; padding: 12px; border-radius: 13px; background: #f8f6f0; border: 1px solid var(--line); }
.nest > .lbl { display: block; margin-bottom: 10px; }
.add-blk { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 48px; margin-top: 12px; border: 1.5px dashed var(--line-2); border-radius: 14px; background: transparent; color: var(--ink-2); font-weight: 500; cursor: pointer; }
.add-blk:hover { border-color: var(--green); color: var(--green); background: #fff; }
.item { padding: 12px; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.item + .item { margin-top: 10px; }
.item-h { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.item-h .lbl { flex: 1; }
.str-row { display: flex; gap: 6px; align-items: center; }
.str-row + .str-row { margin-top: 8px; }

.rich { padding: 0; overflow: hidden; }
.rich-bar { display: flex; flex-wrap: wrap; gap: 2px; padding: 5px; border-bottom: 1px solid var(--line); background: #fbfaf6; }
.rich-bar button { display: grid; place-items: center; min-width: 36px; height: 34px; padding: 0 8px; border: 0; border-radius: 8px; background: transparent; color: var(--ink-2); cursor: pointer; font-weight: 600; font-size: 14px; }
.rich-bar button:hover { background: #efece4; color: var(--ink); }
.rich-bar svg.i { width: 18px; height: 18px; }
.rich-area { min-height: 110px; max-height: 60vh; overflow: auto; padding: 12px 14px; font: 300 16px/1.65 Poppins, sans-serif; color: #000; outline: none; }
.rich-area p { margin: 0 0 .8em; }
.rich-area p:last-child { margin-bottom: 0; }
.rich-area a { color: var(--blue); text-decoration: underline; }
.rich-area ul, .rich-area ol { margin: 0 0 .8em; padding-left: 1.4em; }
.rich-area strong { font-weight: 500; }

.img-field { display: flex; gap: 14px; align-items: center; }
.img-field .th { width: 92px; height: 70px; flex: none; border-radius: 10px; background: #efece4 center / cover no-repeat; border: 1px solid var(--line); display: grid; place-items: center; color: var(--ink-3); overflow: hidden; }
.img-field .th img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Bilder ---------- */
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.m-item { position: relative; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 14px; background: #fff; overflow: hidden; text-align: left; padding: 0; cursor: pointer; transition: box-shadow .15s, border-color .15s; }
.m-item:hover { border-color: var(--line-2); box-shadow: var(--shadow); }
.m-item .th { aspect-ratio: 4 / 3; background: #efece4; }
.m-item .th img { width: 100%; height: 100%; object-fit: cover; display: block; }
.m-item .meta { padding: 8px 10px 10px; font-size: 12.5px; }
.m-item .meta b { display: block; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13px; }
.m-item.sel { border-color: var(--green); box-shadow: 0 0 0 3px var(--green); }
.drop { display: grid; place-items: center; gap: 8px; padding: 26px; border: 2px dashed var(--line-2); border-radius: var(--r); background: #fbfaf6; color: var(--ink-2); text-align: center; cursor: pointer; }
.drop.over { border-color: var(--green); background: var(--green-l); color: var(--green-d); }
.drop svg.i { width: 30px; height: 30px; }

/* ---------- Dialog, Meldungen ---------- */
.overlay { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 20px; background: rgba(23, 33, 26, .45); backdrop-filter: blur(3px); animation: fade .15s; }
.dialog { width: min(100%, 520px); max-height: calc(100dvh - 40px); overflow: auto; padding: 24px; border-radius: 20px; background: #fff; box-shadow: var(--shadow-l); animation: pop .18s ease-out; }
.dialog.wide { width: min(100%, 980px); }
.dialog h2 { margin-bottom: 6px; }
.dialog .actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
/* Knöpfe bleiben unten im Dialog sichtbar, auch bei langem Inhalt */
.dialog > .actions { position: sticky; z-index: 2; bottom: -24px; margin: 22px -24px -24px; padding: 14px 24px 24px; background: #fff; box-shadow: 0 -10px 14px -12px rgba(23, 33, 26, .25); }
@media (max-width: 599px) {
  .overlay { place-items: end center; padding: 0; }
  .dialog { width: 100%; max-height: 92dvh; border-radius: 22px 22px 0 0; padding: 22px 14px calc(18px + var(--safe-b)); animation: sheet .22s ease-out; }
  .dialog .actions .btn { flex: 1; }
  .dialog > .actions { bottom: calc(-18px - var(--safe-b)); margin: 22px -14px calc(-18px - var(--safe-b)); padding: 14px 14px calc(18px + var(--safe-b)); }
}
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { transform: scale(.97); opacity: 0; } }
@keyframes sheet { from { transform: translateY(40px); opacity: .4; } }
#toasts { position: fixed; z-index: 120; left: 50%; bottom: 24px; transform: translateX(-50%); display: grid; gap: 8px; width: max-content; max-width: calc(100vw - 32px); pointer-events: none; }
@media (max-width: 899px) { #toasts { bottom: calc(var(--tab) + var(--safe-b) + 14px); } }
.toast { display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 14px; background: var(--ink); color: #fff; box-shadow: var(--shadow-l); font-size: 14.5px; font-weight: 500; animation: up .2s ease-out; pointer-events: auto; }
.toast.err { background: var(--red); }
.toast svg.i { width: 19px; height: 19px; }
.msg { padding: 12px 14px; border-radius: 12px; font-size: 14.5px; }
.msg.err { background: var(--red-l); color: var(--red); }
.msg.info { background: var(--sun-l); color: #6d5210; }
.msg.ok { background: var(--green-l); color: var(--green-d); }

/* ---------- Anmeldung ---------- */
.auth { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(1200px 600px at 10% -10%, #fdf1cf 0, transparent 60%), radial-gradient(900px 600px at 110% 110%, #dfeee3 0, transparent 55%), var(--bg); }
.auth-card { width: min(100%, 420px); padding: 32px 28px; border-radius: 24px; background: #fff; box-shadow: 0 2px 6px rgba(29, 43, 34, .05), 0 24px 60px rgba(29, 43, 34, .12); }
.auth-card .logo { width: 60px; height: 60px; margin: 0 auto 16px; border-radius: 17px; }
.auth-card h1 { text-align: center; font-size: 23px; }
.auth-card .lead { text-align: center; color: var(--ink-2); margin: 6px 0 24px; font-size: 15px; }
.auth-card form > * + * { margin-top: 14px; }
.auth-card .btn.primary { width: 100%; min-height: 52px; margin-top: 22px; font-size: 16px; }
.auth-card .linkbtn { display: block; margin: 16px auto 0; border: 0; background: none; color: var(--ink-2); font-size: 14px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.qr { display: grid; place-items: center; margin: 4px auto 14px; width: 210px; padding: 10px; border-radius: 16px; border: 1px solid var(--line); }
.qr svg { width: 100%; height: auto; display: block; }
.secret { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 14px; letter-spacing: .08em; word-break: break-all; text-align: center; padding: 10px; border-radius: 10px; background: #f6f4ee; user-select: all; }
.codes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 14px; border-radius: 14px; background: #f6f4ee; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 15px; text-align: center; }
.steps { display: flex; justify-content: center; gap: 6px; margin-bottom: 18px; }
.steps span { width: 28px; height: 5px; border-radius: 9px; background: var(--line); }
.steps span.on { background: var(--green); }
.loading { display: grid; place-items: center; min-height: 60vh; color: var(--ink-3); }
.loading .spin { width: 28px; height: 28px; border: 3px solid var(--line-2); border-right-color: var(--green); border-radius: 50%; animation: spin .8s linear infinite; }
.skeleton { height: 120px; border-radius: var(--r); background: linear-gradient(90deg, #efece4 0, #f6f4ee 50%, #efece4 100%) 0 0 / 200% 100%; animation: sk 1.3s linear infinite; }
@keyframes sk { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- Kleinkram ---------- */
.mt { margin-top: 14px; }
details > summary { cursor: pointer; list-style: none; }
details > summary::-webkit-details-marker { display: none; }
details > summary::before { content: '›'; display: inline-block; width: 1em; transition: transform .15s; color: var(--ink-3); }
details[open] > summary::before { transform: rotate(90deg); }
.link-card { padding: 16px 18px; margin-top: 14px; }
.link-card .ico { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 12px; background: var(--sun-l); color: #a2770f; }
.link-card .grow b { display: block; }
.preview-img { width: 100%; max-height: 50vh; object-fit: contain; margin: 12px 0; border-radius: 12px; background: #f6f4ee; }
.chooser .blk-h { border: 1px solid var(--line); }
.grid2 > .blk-h.card { padding: 12px; margin: 0; }
@media (max-width: 599px) { .hide-sm { display: none; } }

.notice .seg { display: grid; grid-template-columns: repeat(3, 1fr); }
@media (max-width: 520px) { .notice .seg { grid-template-columns: 1fr; } }

/* Warnhinweis Mailversand (oben auf jeder Seite) */
.alert { display: flex; align-items: center; gap: 14px; max-width: 860px; margin: 0 auto 22px; padding: 16px 18px; border: 1px solid color-mix(in srgb, var(--red) 35%, transparent); border-radius: var(--r); background: var(--red-l); color: var(--red); }
.alert .ico { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 13px; background: var(--red); color: #fff; }
.alert b { font-size: 16.5px; }
.alert p { margin: 2px 0 0; font-size: 14.5px; color: #7d2a24; }
.page > .alert { margin-bottom: 0; }
@media (max-width: 599px) { .alert { flex-wrap: wrap; } .alert .btn { width: 100%; } }
.mailmsg .body { margin-top: 10px; padding: 12px 14px; border-radius: 12px; background: #faf8f3; white-space: pre-wrap; overflow-wrap: anywhere; }

/* ---------- Visueller Editor: Vorschau anklicken, Felder im Panel ---------- */
.page.visual { max-width: none; }
.page.visual > .back, .page.visual > .ed-head { display: none; }
/* Vollbild über Seitenleiste und Hinweisen; Dialoge (z-index 90) liegen darüber */
.ve { position: fixed; inset: 0; z-index: 80; display: flex; flex-direction: column; background: var(--bg); }
.ve-bar { display: flex; align-items: center; gap: 10px; min-height: 60px; padding: 8px 14px 8px 10px; border-bottom: 1px solid var(--line); background: #fff; }
.ve-bar .logo-tile { width: 34px; height: 34px; }
.ve-title { flex: 1 1 auto; min-width: 0; line-height: 1.25; }
.ve-title b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 16px; }
.ve-bar > .row { flex: none; flex-wrap: nowrap; }
.ve-main { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 400px; }
.ve-canvas { display: flex; flex-direction: column; min-width: 0; background: #e9e6dd; }
.ve-panel { display: flex; flex-direction: column; min-height: 0; border-left: 1px solid var(--line); background: #fff; overflow: hidden; }
.ve-head { display: flex; align-items: center; gap: 10px; padding: 12px 10px 12px 14px; border-bottom: 1px solid var(--line); }
.ve-head .ico, .ve-hint .ico { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 10px; background: var(--green-l); color: var(--green); }
.ve-head b, .ve-head .tiny { display: block; }
.ve-body { flex: 1; min-height: 0; overflow: auto; padding: 16px; }
.ve-body > * + * { margin-top: 4px; }
.ve-hint { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 28px; }
.ve-hint .ico.big { width: 52px; height: 52px; border-radius: 15px; margin-bottom: 6px; }
.ve-hint h3 { margin: 6px 0 4px; }
.ve-hint p { margin: 4px 0; max-width: 300px; }
.ve-hint .stack { width: 100%; max-width: 280px; }
.ve-tools { display: flex; align-items: center; gap: 6px; padding: 10px 12px; border-top: 1px solid var(--line); background: #fbfaf6; }
/* Schmalere Fenster: Panel schiebt sich von rechts über die Vorschau */
@media (max-width: 1299px) {
  .ve-main { grid-template-columns: minmax(0, 1fr); position: relative; }
  .ve-panel { position: absolute; top: 0; right: 0; bottom: 0; z-index: 2; width: min(400px, 100%); box-shadow: var(--shadow-l); transform: translateX(calc(100% + 24px)); transition: transform .2s ease; }
  .ve.open .ve-panel { transform: none; }
}
@media (max-width: 1099px) { .ve-bar { flex-wrap: wrap; } .ve-bar .logo-tile { display: none; } .ve-bar > .row { flex-wrap: wrap; } }
/* Seitenliste mit Papierkorb */
.list-row { display: flex; align-items: center; gap: 6px; border-top: 1px solid var(--line); }
.list-row:first-child { border-top: 0; }
.list-row > .list-item { border-top: 0; min-width: 0; }
.row.undo { gap: 2px; }

/* ---------- Feinschliff ---------- */
.grid2 > .field + .field { margin-top: 0; }
.m-item .th { position: relative; overflow: hidden; }
.m-item .th img { position: absolute; inset: 0; }
.status.wait .pulse, .status.wait .pulse::after { background: var(--ink-3); border-color: var(--ink-3); }
.status.wait .pulse::after { animation: none; opacity: 0; }
.savebar .sb-note { display: block; font-size: 12.5px; color: #b9c3bb; }
/* Verlauf & Zugänge: am Handy Knöpfe unter den Text */
@media (max-width: 599px) {
  .list-item.user-row { flex-wrap: wrap; }
  .list-item.user-row > .grow { flex-basis: calc(100% - 40px); }
  .list-item.user-row > .row { width: 100%; justify-content: flex-end; }
}
/* Menü: eine Zeile pro Eintrag */
.nav-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) auto; grid-template-areas: 't l a'; gap: 8px; align-items: center; }
.nav-row > :nth-child(1) { grid-area: t; }
.nav-row > :nth-child(2) { grid-area: l; }
.nav-row > :nth-child(3) { grid-area: a; display: flex; gap: 2px; }
.nav-head { margin-bottom: 6px; font-size: 12.5px; font-weight: 500; color: var(--ink-3); }
.nav-head > :nth-child(3) { width: 104px; }
.nav-item + .nav-item { margin-top: 8px; }
.nav-sub { margin: 6px 0 4px 14px; padding-left: 14px; border-left: 2px solid var(--line); }
.nav-sub > summary { padding: 2px 0; font-size: 13px; color: var(--ink-3); cursor: pointer; }
.nav-sub[open] > summary { margin-bottom: 8px; }
.nav-ed > .btn.ghost { margin-top: 8px; }
@media (max-width: 599px) {
  .nav-head { display: none; }
  .nav-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: 't a' 'l l'; }
  .nav-item + .nav-item { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
}
/* Bilder: Suche und Filter */
.media-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.media-tools .input { flex: 1 1 220px; }
.pg-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; }
.field.bad .input { border-color: var(--red); } .field.bad .hint { color: var(--red); }

/* Administration */
.side .foot .nav-sep { margin: 0 12px; }
.admin-tabs { display: flex; margin-bottom: 18px; }
.admin-tabs a { display: inline-flex; align-items: center; min-height: 38px; padding: 6px 16px; border-radius: 10px; color: var(--ink-2); font-weight: 500; font-size: 14px; text-decoration: none; }
.admin-tabs a[aria-current] { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .1); }
.admin-tabs a:hover:not([aria-current]) { color: var(--ink); }
@media (max-width: 520px) { .admin-tabs { display: grid; grid-template-columns: repeat(4, 1fr); } .admin-tabs a { justify-content: center; padding-inline: 4px; } }
.err-text { color: var(--red); }
.block { display: block; }
.list-item .badge { vertical-align: 1px; }

/* ---------- Offen / geschlossen ---------- */
.closure { display: grid; gap: 16px; }
.closure.closed { background: #fbfaf6; }
.closure-top { display: flex; align-items: center; gap: 14px; }
.closure-top .switch { transform: scale(1.15); transform-origin: left center; margin-right: 6px; }
.closure-title { font-size: 19px; font-weight: 600; line-height: 1.3; margin-bottom: 4px; }
.plan { display: grid; gap: 12px; padding: 14px; border-radius: 12px; background: #f6f4ee; }
.plan .field + .check, .plan .check + .field { margin-top: 0; }
.plan-sub { display: grid; gap: 10px; padding-left: 30px; }
/* Offen: Schließung planen → Ankündigung → Wiedereröffnung als getrennte Schritte */
.plan-step { display: grid; gap: 12px; }
.plan-step + .plan-step { border-top: 1px solid #e3dfd3; padding-top: 14px; }
.plan-step.hidden { display: none; }
.step-title { font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: #6b6a5e; }
.plan .seg { display: flex; flex-wrap: nowrap; } /* Wann öffnet ihr wieder?: drei gleich breite Knöpfe, auch am Handy in einer Zeile */
.plan .seg button { flex: 1; padding: 6px 8px; }
.field select.auto, select.auto { width: auto; min-height: 40px; padding: 0 36px 0 12px; border: 1px solid var(--line-2); border-radius: 10px; background-color: #fff; font: inherit; }
.reason-row { display: flex; align-items: center; gap: 6px; padding: 4px 0; border-top: 1px solid var(--line); }
.reason-row:first-child { border-top: 0; }
.reason-row b { font-weight: 500; }
/* ganze Zeile anklickbar */
.reason-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 10px; margin: 0 -4px; border: 0; border-radius: 12px; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.reason-main:hover { background: var(--bg); }
.reason-main:focus-visible { outline: 2px solid var(--green); outline-offset: 1px; }
.reason-edit-hint { display: inline-flex; align-items: center; gap: 6px; flex: none; padding: 6px 12px; border: 1px solid var(--line-2); border-radius: 999px; background: #fff; font-size: 14px; font-weight: 500; color: var(--ink-2); }
.reason-main:hover .reason-edit-hint { border-color: var(--green); color: var(--green); }
.closure-link { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; color: var(--ink); text-decoration: none; }
.closure-link b { display: block; font-weight: 600; margin-bottom: 3px; }
.closure-link .ico { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 13px; background: var(--green-l); color: var(--green); }
.closure-link .ico.red { background: var(--red-l); color: var(--red); }
.closure-link > svg.i:last-child { color: var(--ink-3); }
.plan-date { align-items: center; flex-wrap: nowrap; gap: 6px; }
.plan-date > .input { flex: 1; min-width: 0; }
.plan-date > div { flex: none; }
.plan-date > div:empty { display: none; }

/* ---------- Dialog-Kopf bleibt beim Scrollen stehen (Überschrift + Schließen) ---------- */
.dialog > .dlg-head { position: sticky; z-index: 2; top: -24px; margin: -24px -24px 8px; padding: 20px 24px 10px; background: #fff; }
.dialog > .dlg-head h2 { margin: 0; }
@media (max-width: 599px) { .dialog > .dlg-head { top: -22px; margin: -22px -14px 8px; padding: 18px 14px 10px; } }
.field .hint.err-text { color: var(--red); }

/* ---------- Dezente Bewegung beim Aufklappen ---------- */
.reveal { animation: reveal .22s ease-out; }
@keyframes reveal { from { opacity: 0; transform: translateY(-6px); } }
@supports (interpolate-size: allow-keywords) {
  :root { interpolate-size: allow-keywords; }
  details::details-content { block-size: 0; overflow: hidden; transition: block-size .24s ease, content-visibility .24s allow-discrete; }
  details[open]::details-content { block-size: auto; }
}

/* ---------- Vorschau „Das sehen Besucher“: kleines Browserfenster ---------- */
.mock { overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: var(--shadow); font-family: Poppins, sans-serif; }
.mock-bar { display: flex; align-items: center; gap: 10px; padding: 9px 12px; background: #f1efe8; border-bottom: 1px solid var(--line); }
.mock-bar .dots { display: flex; gap: 5px; flex: none; }
.mock-bar .dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-2); }
.mock-url { flex: 1; min-width: 0; max-width: 320px; margin: 0 auto; padding: 3px 12px; border-radius: 999px; background: #fff; font-size: 12px; color: var(--ink-3); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mock-page { position: relative; min-height: 280px; }
.mock-banner { padding: 8px 16px; background: #e6ebfa; color: var(--blue); font-size: 13.5px; line-height: 1.45; text-align: center; animation: reveal .22s ease-out; }
.mock-head { display: flex; align-items: center; gap: 12px; padding: 10px 18px; border-bottom: 1px solid #eef0f6; }
.mock-head .logo-tile { width: 28px; height: 28px; border-radius: 8px; }
.mock-lines { display: flex; gap: 12px; margin-left: auto; }
.mock-lines i { width: 34px; height: 6px; border-radius: 3px; background: #dfe4f3; }
@media (max-width: 599px) { .mock-lines i:nth-child(n+3) { display: none; } }
.mock-hours { padding: 18px 22px 22px; }
.mock-hours h3 { margin: 0 0 8px; color: var(--blue); font-weight: 400; font-size: 21px; letter-spacing: 0; }
/* Hinweis bei den Öffnungszeiten wie .hours-notice auf der Seite (src/site/assets/site.css): unter den Zeiten, Text + Warndreieck */
.mock-note { --c: var(--blue); --sign: var(--blue); max-width: 100%; margin: 10px 0 0; color: var(--c); font-size: 14.5px; font-weight: 500; line-height: 1.45; animation: reveal .22s ease-out; }
.mock-note.closed { --c: #c62828; --sign: #e53935; }
.mock-note.soon { --c: #b35900; --sign: #f08c00; }
.mock-note::after { content: ''; display: inline-block; width: 15px; height: 15px; margin-left: 6px; vertical-align: -2px; background: var(--sign);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M10.3 3.2a2 2 0 0 1 3.4 0l8.6 15a2 2 0 0 1-1.7 3H3.4a2 2 0 0 1-1.7-3zM11 9h2v6h-2zm0 8h2v2h-2z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M10.3 3.2a2 2 0 0 1 3.4 0l8.6 15a2 2 0 0 1-1.7 3H3.4a2 2 0 0 1-1.7-3zM11 9h2v6h-2zm0 8h2v2h-2z'/%3E%3C/svg%3E") center / contain no-repeat; }
.mock-times { margin: 0; color: #000; font-weight: 300; font-size: 16px; line-height: 1.6; }
.mock-pop { position: absolute; inset: 0; display: grid; place-items: center; padding: 16px; background: rgba(23, 33, 26, .42); animation: fade .2s; }
.mock-pop-card { position: relative; width: min(100%, 320px); max-height: 100%; overflow: hidden; border-radius: 14px; background: #fff; text-align: center; box-shadow: 0 8px 24px rgba(0, 0, 0, .3); animation: pop .22s ease-out; }
.mock-pop-card img { display: block; width: auto; max-width: calc(100% - 40px); height: auto; max-height: 90px; margin: 32px auto 0; object-fit: contain; border-radius: 5px; }
.mock-pop-body { padding: 13px 20px 20px; }
.mock-pop-body.bare { padding-top: 34px; }
.mock-pop-body b { display: block; margin-bottom: 4px; color: var(--blue); font-weight: 300; font-size: 19px; line-height: 1.3; }
.mock-pop-body p { margin: 0 0 15px; color: #000; font-size: 14px; line-height: 1.5; white-space: pre-line; }
.mock-ok { display: inline-block; min-width: 108px; padding: 9px 16px; border: 0; border-radius: 10px; background: var(--blue); color: #fff; font: inherit; font-size: 13px; line-height: 1; cursor: pointer; }
.mock-ok:hover { background: #e6ebfa; color: var(--blue); }
.mock-x { position: absolute; top: 6px; right: 6px; display: grid; place-items: center; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #3a3a3a; cursor: pointer; }
.mock-x:hover { background: var(--blue); color: #fff; }
.mock-x .i { width: 11px; height: 11px; }
.look-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 10px; }
.look-legend .badge .i { width: 13px; height: 13px; }
/* Vorschau lädt unsichtbar dahinter, bis sie fertig ist (kein Flackern, kein Springen) */
.pv-frame iframe.pv-next { opacity: 0; pointer-events: none; }
.linkbtn { padding: 0; border: 0; background: none; color: var(--green); font: inherit; font-weight: 500; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* Dialog, Vollbild-Vorschau oder visueller Editor offen: Seite dahinter scrollt nicht mit */
html:has(body > .overlay, body > .pv-full, .ve) { overflow: hidden; }
html { scrollbar-gutter: stable; } /* kein Seitensprung, wenn die Scrollleiste dabei verschwindet */
.dialog, .ve-body, .ve-panel { overscroll-behavior: contain; }

/* Alle anklickbaren Karten reagieren gleich wie die Kacheln */
a.closure-link, a.link-card { transition: transform .15s, box-shadow .15s, border-color .15s; }
a.closure-link:hover, a.link-card:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(29, 43, 34, .05), 0 12px 30px rgba(29, 43, 34, .09); border-color: var(--line-2); }
a.closure-link:hover b, a.link-card:hover b { color: inherit; }
@media (prefers-reduced-motion: reduce) { .tile, a.closure-link, a.link-card { transition: none; } .tile:hover, a.closure-link:hover, a.link-card:hover { transform: none; } }

/* Seitenliste: Papierkorb links neben dem Pfeil, Pfeile in allen Zeilen bündig */
.list-row { position: relative; }
.list-item .del-slot { flex: none; width: 44px; }
.list-row > .row-del { position: absolute; top: calc(50% - 20px); right: 40px; }

/* Neuer Stand auf dem Server: Leiste oben mit „Neu laden“ */
.update-bar { position: fixed; z-index: 110; top: calc(12px + env(safe-area-inset-top, 0px)); left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 12px; width: max-content; max-width: calc(100vw - 24px); padding: 8px 8px 8px 16px; border-radius: 14px; background: var(--ink); color: #fff; box-shadow: var(--shadow-l); font-size: 14.5px; animation: fade .2s; }
.update-bar .btn { min-height: 38px; }

/* Fehler bei den Dialog-Knöpfen (immer im Blick) + kurzes Aufleuchten der betroffenen Stelle */
.dialog .actions .foot-err { flex: 1 0 100%; display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 10px; background: var(--red-l); color: var(--red); font-size: 14px; line-height: 1.4; }
.dialog .actions .foot-err.hidden { display: none; }
.flash { animation: flash .9s ease; }
@keyframes flash { 0%, 100% { box-shadow: 0 0 0 0 rgba(180, 55, 47, 0); } 25% { box-shadow: 0 0 0 4px rgba(180, 55, 47, .35); } }
.field.flash { border-radius: 12px; }
@media (prefers-reduced-motion: reduce) { .flash { animation: none; } }

/* ---------- Verlauf: Einträge aufklappbar, darin genau was sich geändert hat ---------- */
.card.hist { padding: 0; overflow: hidden; }
.hist-head { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 18px; border: 0; background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.hist-head:hover { background: #faf9f5; }
.hist-head b { display: block; font-weight: 600; }
.hist-head .tiny { display: block; margin-top: 2px; }
.hist-head .chev { flex: none; color: var(--ink-3); transition: transform .2s; }
.hist.open .hist-head .chev { transform: rotate(180deg); }
.hist-body { display: none; padding: 4px 18px 16px; border-top: 1px solid var(--line); }
.hist.open .hist-body { display: block; animation: reveal .22s ease-out; }
.hist-body .loading { min-height: 90px; }
.df-sec { margin-top: 14px; }
.df-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; color: var(--ink-2); }
.df-head b { color: var(--ink); font-weight: 600; font-size: 15px; }
.df-head .i { width: 18px; height: 18px; flex: none; }
.df-row { padding: 9px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fcfbf8; }
.df-row + .df-row { margin-top: 6px; }
.df-path { margin-bottom: 4px; font-size: 12.5px; color: var(--ink-3); }
.df-text { font-size: 14.5px; line-height: 1.55; overflow-wrap: anywhere; }
.df-row del, .df-row ins { text-decoration: none; border-radius: 4px; padding: 0 2px; }
.df-row del { background: var(--red-l); color: var(--red); text-decoration: line-through; text-decoration-color: rgba(180, 55, 47, .55); }
.df-row ins { background: var(--green-l); color: var(--green-d); }
.df-val { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14.5px; }
.df-val > .i { width: 16px; height: 16px; flex: none; color: var(--ink-3); }
.df-add { display: flex; align-items: flex-start; gap: 10px; font-size: 14.5px; line-height: 1.5; overflow-wrap: anywhere; }
.df-tag { flex: none; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 20px; }
.df-tag.add { background: var(--green-l); color: var(--green-d); }
.df-tag.del { background: var(--red-l); color: var(--red); }
.df-img { display: inline-flex; flex-direction: column; gap: 3px; max-width: 150px; }
.df-img img, .df-img > .i { width: 120px; height: 80px; object-fit: cover; border-radius: 8px; background: var(--line); }
.df-img > .i { padding: 26px 44px; color: var(--ink-3); }
.df-img .tiny { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hist-acts { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
@media (max-width: 599px) { .hist-head { padding: 12px 14px; } .hist-body { padding: 2px 14px 14px; } .hist-acts .btn { flex: 1; } .hist-acts .grow { display: none; } }

/* Handy: horizontalen Platz ausnutzen – schmalere Ränder außen und in den Karten */
@media (max-width: 599px) {
  .main { padding-left: 10px; padding-right: 10px; }
  .card { padding: 14px; }
  .card.list { padding: 4px 12px; }
  .card.hist { padding: 0; }
  .alert { gap: 10px; padding: 12px; }
  .alert .ico { width: 36px; height: 36px; }
  .plan { padding: 10px; }
  .tile { padding: 13px; }
  .hist-head { padding: 12px; }
  .hist-body { padding: 2px 12px 12px; }
  .df-row { padding: 8px 10px; }
}
@media (max-width: 599px) {
  /* Seiten-Editor: Hoch/Runter/Duplizieren/Löschen zweispaltig statt je eine Zeile */
  .blk-tools { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
  .blk-tools > .grow { display: none; }
  .blk-tools .btn { justify-content: flex-start; padding: 0 10px; }
}
/* Backup als Datei: am Handy Knopf unter den Text */
@media (max-width: 599px) { .file-row { flex-wrap: wrap; } .file-row > .grow { flex: 1 1 calc(100% - 40px); } .file-row > :last-child { margin-left: 38px; } }
