/* ==========================================================================================================
   Version 3.0 · Stil „Hybrid“: moderner Aufbau mit etwas XP-Glanz. Startseite (views/v3/portal.ejs), Downloads, Duden,
   Deliziösitäten. Hell und dunkel nach Gerät, umschaltbar unten rechts (public/v3.js, <html data-theme>).
   Im Desktop-Fenster (body.framed) fallen Kopf und Fuß weg.
   ========================================================================================================== */
:root {
  color-scheme: light;
  --bg: #f3f7fc;
  --bg-glow-1: #bfe0ff;
  --bg-glow-2: #d8f5d0;
  --bg-top: #eef5ff;
  --bg-bottom: #f8faf6;
  --surface: #ffffff;
  --surface-2: #f5f8fc;
  --surface-3: #eef3fb;
  --glass: rgba(255, 255, 255, .74);
  --line: #d6e1f1;
  --line-soft: #e8eef7;
  --text: #14213d;
  --text-2: #45567a;
  --muted: #6b7a99;
  --heading: #0b2a6b;
  --accent: #1f62d6;
  --accent-2: #4f97ff;
  --accent-line: #1a55bb;
  --accent-soft: #e3efff;
  --accent-soft-line: #b9d3fb;
  --ok: #2fb14b;
  --warn: #e0a100;
  --bad: #d8432f;
  --ok-soft: #e5f6e2;
  --ok-text: #22702f;
  --bad-soft: #fde8e4;
  --bad-text: #a5301f;
  --shadow: 0 1px 0 #fff inset, 0 6px 18px rgba(20, 50, 110, .08);
  --shadow-lg: 0 18px 50px rgba(20, 50, 110, .18);
  --gloss: linear-gradient(180deg, rgba(255, 255, 255, .38), rgba(255, 255, 255, .06));
  --btn: linear-gradient(180deg, #fff, #e9eff8);
  --btn-line: #c5d2e6;
  --input: #fff;
  --code-bg: #f1f5fb;
  --c-desk: linear-gradient(180deg, #14a3a3, #0b7676);
  --c-dl: linear-gradient(180deg, #4f97ff, #1d5fd1);
  --c-du: linear-gradient(180deg, #f2b33d, #cf8a0c);
  --c-de: linear-gradient(180deg, #ff7a63, #d8432f);
  --c-fs: linear-gradient(180deg, #9cc71e, #5f8f10);
  --c-x: linear-gradient(180deg, #a98bff, #6b4fd6);
  --c-gray: linear-gradient(180deg, #8d9bb3, #5b6a85);
  --c-di: linear-gradient(180deg, #d39a5f, #9a6332);
  --radius: 16px;
  --font: Inter, "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Inter Display", Inter, "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --mono: "JetBrains Mono", "Cascadia Code", Consolas, "Liberation Mono", monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0f1522; --bg-glow-1: #17305a; --bg-glow-2: #173a24; --bg-top: #0f1726; --bg-bottom: #10151d;
    --surface: #161e2e; --surface-2: #1a2336; --surface-3: #1e2840; --glass: rgba(18, 25, 39, .78);
    --line: #2a3650; --line-soft: #222c42; --text: #e6ecf7; --text-2: #b4c0d8; --muted: #8b98b3; --heading: #dbe7ff;
    --accent: #4f97ff; --accent-2: #6fadff; --accent-line: #2d6fe0; --accent-soft: #1b2c4d; --accent-soft-line: #2f4f86;
    --ok-soft: #173a24; --ok-text: #8fe0a0; --bad-soft: #3d1d18; --bad-text: #ffb2a5;
    --shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 6px 18px rgba(0, 0, 0, .35); --shadow-lg: 0 18px 50px rgba(0, 0, 0, .55);
    --gloss: linear-gradient(180deg, rgba(255, 255, 255, .22), rgba(255, 255, 255, .03));
    --btn: linear-gradient(180deg, #24304a, #1b2539); --btn-line: #33415f; --input: #111827; --code-bg: #0f1625;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f1522; --bg-glow-1: #17305a; --bg-glow-2: #173a24; --bg-top: #0f1726; --bg-bottom: #10151d;
  --surface: #161e2e; --surface-2: #1a2336; --surface-3: #1e2840; --glass: rgba(18, 25, 39, .78);
  --line: #2a3650; --line-soft: #222c42; --text: #e6ecf7; --text-2: #b4c0d8; --muted: #8b98b3; --heading: #dbe7ff;
  --accent: #4f97ff; --accent-2: #6fadff; --accent-line: #2d6fe0; --accent-soft: #1b2c4d; --accent-soft-line: #2f4f86;
  --ok-soft: #173a24; --ok-text: #8fe0a0; --bad-soft: #3d1d18; --bad-text: #ffb2a5;
  --shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 6px 18px rgba(0, 0, 0, .35); --shadow-lg: 0 18px 50px rgba(0, 0, 0, .55);
  --gloss: linear-gradient(180deg, rgba(255, 255, 255, .22), rgba(255, 255, 255, .03));
  --btn: linear-gradient(180deg, #24304a, #1b2539); --btn-line: #33415f; --input: #111827; --code-bg: #0f1625;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.v3 {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  font: 15px/1.5 var(--font); color: var(--text);
  background:
    radial-gradient(1200px 500px at 15% -10%, var(--bg-glow-1) 0, transparent 60%),
    radial-gradient(900px 500px at 100% 0, var(--bg-glow-2) 0, transparent 55%),
    linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
  background-color: var(--bg);
}
body.v3.framed { background: var(--bg); }
.v3 a { color: var(--accent); text-decoration: none; }
.v3 a:hover { text-decoration: underline; }
.v3 :focus-visible { outline: 3px solid color-mix(in srgb, var(--accent-2) 55%, transparent); outline-offset: 2px; border-radius: 6px; }
.v3 h1, .v3 h2, .v3 h3, .v3 h4 { color: var(--heading); font-family: var(--font-display); letter-spacing: -.01em; }
.v3 img { max-width: 100%; height: auto; }
.v3 code, .v3 pre, .v3 kbd { font-family: var(--mono); font-size: .9em; }
.v3 .muted { color: var(--muted); }
.v3 .vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.v3 [hidden] { display: none !important; }
.emo { font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif; font-style: normal; }

/* ---------- Kopfleiste ---------- */
.v3-top {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 14px; padding: 12px clamp(16px, 4vw, 40px);
  background: var(--glass); border-bottom: 1px solid var(--line); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.v3-logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; letter-spacing: -.01em; color: var(--heading) !important; text-decoration: none !important; white-space: nowrap; }
.v3-logo .mk {
  width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; color: #fff; font-size: 16px; flex: none;
  background: linear-gradient(180deg, #5fa3ff, #1d5fd1); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), 0 1px 2px rgba(0, 0, 0, .25);
}
.v3-crumb { color: var(--muted); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.v3-crumb a { color: var(--text-2); }
.v3-crumb b { color: var(--text); }
.v3-search { flex: 1; max-width: 440px; margin-left: auto; position: relative; }
.v3 .v3-search input[type=search] {
  width: 100%; font: inherit; color: var(--text); background: var(--input); border: 1px solid var(--line); border-radius: 999px;
  padding: 9px 16px 9px 38px; box-shadow: inset 0 1px 2px rgba(20, 33, 61, .06);
}
.v3-search::before { content: "🔍"; position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-size: 14px; opacity: .7; pointer-events: none; }
.v3-me { position: relative; flex: none; }
.v3-me > button, .v3-me > a { display: inline-flex; align-items: center; gap: 8px; }
.v3-me .av { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; background: var(--surface-3); display: inline-grid; place-items: center; font-size: 14px; }
.v3-me .badge { background: var(--bad); color: #fff; border-radius: 999px; font-size: 11px; font-weight: 700; padding: 0 6px; line-height: 18px; }
.v3-menu {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 230px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; box-shadow: var(--shadow-lg); padding: 6px; z-index: 40;
}
.v3-menu a, .v3-menu button {
  display: flex; gap: 10px; align-items: center; width: 100%; padding: 9px 12px; border-radius: 9px; border: 0; background: none;
  font: inherit; color: var(--text); text-align: left; cursor: pointer; text-decoration: none !important;
}
.v3-menu a:hover, .v3-menu button:hover { background: var(--accent-soft); }
.v3-menu hr { border: 0; border-top: 1px solid var(--line-soft); margin: 6px 4px; }
.v3-menu .who { padding: 8px 12px 6px; color: var(--muted); font-size: 13px; }
.v3-menu .who b { display: block; color: var(--text); font-size: 15px; }

/* ---------- Knöpfe, Chips, Plaketten ---------- */
.pill, .v3 button.pill, .v3 .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; border-radius: 999px; padding: 8px 16px; font: 600 14px/1.2 var(--font);
  background: var(--btn); border: 1px solid var(--btn-line); color: var(--text) !important; cursor: pointer; text-decoration: none !important; white-space: nowrap;
}
.pill:hover, .v3 .pill:hover, .v3 .btn:hover { filter: brightness(1.03); border-color: var(--accent-soft-line); }
.pill.pri, .v3 .pill.pri, .v3 .btn.pri {
  background: linear-gradient(180deg, var(--accent-2), var(--accent)); border-color: var(--accent-line); color: #fff !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45);
}
.pill.big, .v3 .pill.big, .v3 .btn.big { padding: 12px 22px; font-size: 16px; }
.pill.small, .v3 .pill.small, .v3 .btn.small { padding: 5px 11px; font-size: 13px; }
.pill.danger, .v3 .pill.danger, .v3 .btn.danger { color: var(--bad) !important; }
.pill.ghost, .v3 .pill.ghost { background: transparent; }
.v3 button[disabled], .pill[aria-disabled="true"] { opacity: .55; cursor: default; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
  padding: 4px 11px; font-size: 13px; color: var(--text-2); white-space: nowrap;
}
a.chip { color: var(--text-2); }
a.chip:hover { border-color: var(--accent-soft-line); text-decoration: none; }
.chip.on { background: linear-gradient(180deg, var(--accent-2), var(--accent)); color: #fff; border-color: var(--accent-line); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 20%, transparent); flex: none; }
.dot.warn { background: var(--warn); box-shadow: 0 0 0 3px color-mix(in srgb, var(--warn) 20%, transparent); }
.dot.down, .dot.bad { background: var(--bad); box-shadow: 0 0 0 3px color-mix(in srgb, var(--bad) 20%, transparent); }
.dot.off { background: var(--muted); box-shadow: none; }
.tag { display: inline-block; font: 600 11.5px/1.5 var(--font); background: var(--surface-3); color: var(--text-2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 7px; }
a.tag:hover { text-decoration: none; border-color: var(--accent-soft-line); }
.ver { display: inline-block; font: 700 11.5px/1.5 var(--font); background: var(--ok-soft); color: var(--ok-text); border: 1px solid color-mix(in srgb, var(--ok) 35%, transparent); border-radius: 6px; padding: 1px 7px; }
.lr .nm span .ver, .lr .nm span .tag { display: inline-block; }
.kind { font-size: 11px; font-weight: 700; border-radius: 5px; padding: 2px 6px; color: #fff; text-transform: uppercase; letter-spacing: .03em; white-space: nowrap; }
.k-dl { background: #1d5fd1; } .k-du { background: #c07d06; } .k-de { background: #d8432f; } .k-fs { background: #5f8f10; } .k-desk { background: #0b7676; } .k-blog { background: #6b4fd6; } .k-x { background: #5b6a85; } .k-di { background: #9a6332; }

/* ---------- Seite ---------- */
.v3-main { flex: 1; width: 100%; max-width: 1320px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px) 36px; }
body.framed .v3-main { padding-top: 14px; }
.v3-hero { display: flex; align-items: flex-end; gap: 20px; flex-wrap: wrap; padding: 30px 0 6px; }
.v3-hero h1 { margin: 0; font: 800 clamp(28px, 4.2vw, 40px)/1.08 var(--font-display); letter-spacing: -.02em; }
.v3-hero p { margin: 8px 0 0; color: var(--text-2); font-size: 16.5px; }
.v3-hero .now { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.v3-flash { margin: 14px 0 0; padding: 10px 14px; border-radius: 12px; background: var(--ok-soft); color: var(--ok-text); border: 1px solid color-mix(in srgb, var(--ok) 35%, transparent); }
.v3-flash.err { background: var(--bad-soft); color: var(--bad-text); border-color: color-mix(in srgb, var(--bad) 35%, transparent); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.card + .card { margin-top: 14px; }
.card h2:first-child, .card h3:first-child { margin-top: 0; }
.sec-h { margin: 0 0 10px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-family: var(--font); }
h2.page-h { margin: 0 0 4px; font: 800 26px/1.15 var(--font-display); }
.page-sub { color: var(--text-2); margin: 0 0 16px; }

/* ---------- Kacheln der Startseite ---------- */
.tiles { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; padding: 20px 0 6px; }
.tile {
  grid-column: span 2; position: relative; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
  overflow: hidden; min-height: 176px; display: flex; flex-direction: column; color: var(--text) !important; text-decoration: none !important;
  transition: transform .15s ease, box-shadow .15s ease;
}
.tile.wide { grid-column: span 3; }
.tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.tile .band { height: 76px; position: relative; display: flex; align-items: center; padding: 0 18px; gap: 14px; color: #fff; background: var(--c-x); }
.tile .band::after { content: ""; position: absolute; inset: 0 0 50% 0; background: var(--gloss); pointer-events: none; }
.tile .band .e { font-size: 34px; line-height: 1; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .25)); position: relative; z-index: 1; }
.tile .band h2 { margin: 0; color: #fff; font: 800 20px/1.1 var(--font-display); text-shadow: 0 1px 1px rgba(0, 0, 0, .25); position: relative; z-index: 1; }
.tile .band small { display: block; font: 600 12px var(--font); opacity: .92; letter-spacing: .04em; text-transform: uppercase; }
.tile .body { padding: 14px 18px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.tile .body p { margin: 0; color: var(--text-2); font-size: 14px; line-height: 1.45; }
.tile .meta { margin-top: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.tile .meta span { font-size: 12px; background: var(--surface-2); border: 1px solid var(--line-soft); border-radius: 999px; padding: 3px 9px; color: var(--text-2); display: inline-flex; gap: 6px; align-items: center; }
.tile .lock { position: absolute; right: 14px; top: 12px; z-index: 2; font-size: 12px; background: rgba(0, 0, 0, .25); color: #fff; border-radius: 999px; padding: 2px 9px; }
.c-desk .band, .art.c-desk { background: var(--c-desk); }
.c-dl .band, .art.c-dl { background: var(--c-dl); }
.c-du .band, .art.c-du { background: var(--c-du); }
.c-de .band, .art.c-de { background: var(--c-de); }
.c-fs .band, .art.c-fs { background: var(--c-fs); }
.c-x .band, .art.c-x { background: var(--c-x); }
.c-gray .band, .art.c-gray { background: var(--c-gray); }
.c-di .band, .art.c-di { background: var(--c-di); }
.mini { position: absolute; right: 14px; top: 12px; width: 86px; height: 54px; border-radius: 5px; background: #008080; border: 2px solid rgba(255, 255, 255, .8); z-index: 2; box-shadow: 0 2px 6px rgba(0, 0, 0, .25); }
.mini::before { content: ""; position: absolute; left: 10px; top: 7px; width: 46px; height: 28px; background: #c0c0c0; border-top: 5px solid #000080; }
.mini::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 7px; background: #c0c0c0; }
.strip { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 10px; }
.box { background: var(--glass); border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; }
.box h3 { margin: 0 0 8px; font: 700 13px var(--font); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.box .row { display: flex; gap: 10px; align-items: center; font-size: 14px; padding: 4px 0; min-width: 0; }
.box .row a { color: var(--text); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.box .row .when { margin-left: auto; color: var(--muted); font-size: 13px; white-space: nowrap; }
.box .empty { color: var(--muted); font-size: 14px; margin: 4px 0; }

/* ---------- Fuß ---------- */
.v3-foot { display: flex; gap: 6px 18px; flex-wrap: wrap; align-items: center; padding: 12px clamp(16px, 4vw, 40px); color: var(--muted); font-size: 13px; border-top: 1px solid var(--line); background: var(--glass); }
.v3-foot a { color: var(--muted); }
.v3-foot .right { margin-left: auto; display: flex; gap: 12px; align-items: center; }
.v3 .v3-foot select { width: auto; display: inline-block; margin-left: 6px; font: inherit; color: var(--text-2); background: transparent; border: 1px solid var(--line); border-radius: 8px; padding: 2px 6px; }

/* ---------- Bereiche: Seitenleiste + Inhalt ---------- */
.v3-page { display: flex; gap: 22px; padding-top: 22px; align-items: flex-start; }
.v3-side { width: 230px; flex: none; position: sticky; top: 76px; }
body.framed .v3-side { top: 10px; }
.v3-side .grp { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 8px; }
.v3-side .grp + .grp { margin-top: 12px; }
.v3-side h3 { margin: 6px 10px 6px; font: 700 11.5px var(--font); text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.v3-side .it { display: flex; gap: 9px; align-items: center; padding: 8px 10px; border-radius: 9px; font-size: 14px; color: var(--text-2); text-decoration: none !important; }
.v3-side .it:hover { background: var(--surface-2); }
.v3-side .it.sel { background: linear-gradient(180deg, var(--accent-soft), color-mix(in srgb, var(--accent-soft) 80%, var(--accent-2))); color: var(--heading); font-weight: 600; box-shadow: inset 0 0 0 1px var(--accent-soft-line); }
.v3-side .it .n { margin-left: auto; font-size: 12px; color: var(--muted); }
.v3-content { flex: 1; min-width: 0; }
.v3-rail { width: 250px; flex: none; position: sticky; top: 76px; }
body.framed .v3-rail { top: 10px; }
.v3-rail .card { padding: 14px 16px; }
.v3-rail ol, .v3-rail ul { margin: 0; padding-left: 18px; font-size: 14px; }
.v3-rail li { margin: 4px 0; }
.v3-tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 0 0 14px; }
.v3-tools .grow { flex: 1; }

/* ---------- Downloads ---------- */
/* Projektkarten im Stil der Titelleiste einer Projektseite (Update 96) */
.dl-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.dl-head [data-ed-start], .dl-head a.pill { margin-left: auto; }
.dl-bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 0 0 16px; }
.dl-bar input[type=search] { width: auto; flex: 0 1 280px; min-width: 160px; }
.v3 .dl-bar select { width: auto; padding: 6px 12px; border-radius: 999px; }
.dl-bar .sp { flex: 1; }
.dl-bar .chips { display: flex; gap: 6px; flex-wrap: wrap; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--surface); }
.seg a { padding: 6px 12px; font-size: 13px; color: var(--text-2); text-decoration: none !important; }
.seg a.on { background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.dl-opts { display: flex; gap: 10px 16px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.pc-list { display: grid; gap: 14px; }
.pc { position: relative; display: flex; gap: 20px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); transition: border-color .15s; }
.pc:hover { border-color: var(--accent-soft-line); }
.pc .art-l { flex: none; display: block; text-decoration: none !important; }
.pc .art { width: 104px; height: 104px; border-radius: 20px; font-size: 50px; }
.pc .info { flex: 1; min-width: 0; }
.pc h3 { margin: 0 0 4px; font: 800 24px/1.15 var(--font-display); color: var(--heading); }
.pc h3 a { color: inherit; }
.pc p.lead { margin: 0 0 12px; color: var(--text-2); font-size: 15px; line-height: 1.45; }
.pc .cta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.pc .cta .pill.pri { padding: 10px 20px; font-size: 15px; }
.pc .cta small { font-weight: 500; opacity: .85; }
.pc .tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.pc .flag { display: inline-flex; gap: 6px; vertical-align: 4px; margin-left: 8px; }
.pc .flag:not(:has(.flag-b:not([hidden]))) { display: none; }
.flag-b { font: 700 11.5px/1.5 var(--font); border-radius: 999px; padding: 2px 9px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text-2); white-space: nowrap; }
.flag-b.up { background: var(--ok-soft); color: var(--ok-text); border-color: color-mix(in srgb, var(--ok) 35%, transparent); }
.flag-b.new { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-soft-line); }
.flag-b.pin { background: #fff3c4; color: #7a5a00; border-color: #f1d27a; }
:root[data-theme="dark"] .flag-b.pin { background: #3a2f0c; color: #ffe08a; border-color: #7a6216; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .flag-b.pin { background: #3a2f0c; color: #ffe08a; border-color: #7a6216; } }
.pc.hub .art { background: var(--c-fs); }
.pc .grip { color: var(--muted); font-size: 20px; align-self: center; margin-right: -8px; cursor: grab; }
.pc .etools { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); }
.pc .pin-on, .pc.pinned .pin-off { display: none; }
.pc.pinned .pin-on { display: inline; }
body.editing .pc p.lead:empty { min-height: 1.4em; }
/* Kompakt: zwei Spalten, kleineres Bild, Text einzeilig */
.pc-list.compact { grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 12px; }
.pc-list.compact .pc { padding: 14px; gap: 14px; }
.pc-list.compact .art { width: 72px; height: 72px; font-size: 34px; border-radius: 16px; }
.pc-list.compact h3 { font-size: 18px; }
.pc-list.compact p.lead { font-size: 13.5px; margin-bottom: 8px; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.pc-list.compact .cta .pill.pri { padding: 6px 13px; font-size: 13.5px; }
.pc-list.compact .tags { margin-top: 8px; }
.pc-list.compact .opt-c { display: none; }
body.editing .pc-list.compact p.lead { display: block; }
.more-card { display: flex; align-items: center; gap: 14px; margin-top: 18px; padding: 14px 18px; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--text-2) !important; text-decoration: none !important; }
.more-card:hover { border-color: var(--accent-soft-line); }
.more-card > .emo { font-size: 26px; }
.more-card b { display: block; color: var(--text); }
.more-card small { display: block; }
.more-card .sp { flex: 1; }
.lr .art.xs { width: 32px; height: 32px; font-size: 17px; border-radius: 8px; }
.art { width: 84px; height: 84px; border-radius: 14px; flex: none; display: grid; place-items: center; font-size: 40px; color: #fff; position: relative; overflow: hidden; background: var(--c-dl); }
.art img { width: 100%; height: 100%; object-fit: cover; }
.art::after { content: ""; position: absolute; inset: 0 0 50% 0; background: var(--gloss); pointer-events: none; }
.art.big { width: 120px; height: 120px; font-size: 58px; border-radius: 22px; }
.art.sm { width: 44px; height: 44px; font-size: 22px; border-radius: 10px; }
.list { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); }
.lr { display: grid; grid-template-columns: 36px minmax(0, 1fr) 130px 80px 90px 150px; align-items: center; gap: 12px; padding: 11px 16px; border-top: 1px solid var(--line-soft); font-size: 14px; }
.lr:first-child { border-top: 0; }
.lr.h { background: var(--surface-2); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 8px 16px; }
.lr .e { font-size: 22px; text-align: center; }
.lr .nm { min-width: 0; }
.lr .nm b, .lr .nm a.t { display: block; font-size: 14.5px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lr .nm span { color: var(--muted); font-size: 12.5px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lr .mu { color: var(--muted); font-size: 13px; }
.lr .act { justify-self: end; display: flex; gap: 6px; }
.empty-state { padding: 28px 18px; text-align: center; color: var(--muted); }
.empty-state .e { font-size: 40px; display: block; margin-bottom: 6px; }
.proj-head { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.proj-head .info { flex: 1; min-width: 240px; }
.proj-head h1 { margin: 0 0 6px; font: 800 30px/1.1 var(--font-display); }
.proj-head p.lead { margin: 0 0 12px; color: var(--text-2); font-size: 16px; }
.proj-head .cta { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.shots { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; margin: 14px 0 0; }
.shots a { flex: none; }
.shots img { height: 150px; width: auto; border-radius: 12px; border: 1px solid var(--line); display: block; }
.vers { list-style: none; margin: 0; padding: 0; }
.vers li { padding: 12px 0; border-top: 1px solid var(--line-soft); }
.vers li:first-child { border-top: 0; padding-top: 0; }
.vers .vh2 { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.vers .vh2 .act { margin-left: auto; display: flex; gap: 6px; }
.vers .chg { margin: 6px 0 0; color: var(--text-2); font-size: 14px; }
.vers .chg ul { margin: 4px 0; padding-left: 20px; }

/* ---------- Texte (Markdown) ---------- */
.prose { font-size: 15.5px; line-height: 1.65; overflow-wrap: anywhere; }
.prose > :first-child { margin-top: 0; }
.prose h2 { font: 800 22px/1.25 var(--font-display); margin: 1.6em 0 .5em; scroll-margin-top: 80px; }
.prose h3 { font: 700 18px/1.3 var(--font-display); margin: 1.4em 0 .4em; scroll-margin-top: 80px; }
.prose p, .prose ul, .prose ol { margin: 0 0 .9em; }
.prose li { margin: .25em 0; }
.prose blockquote { margin: 0 0 1em; padding: 10px 16px; border-left: 4px solid var(--accent-2); background: var(--accent-soft); border-radius: 0 10px 10px 0; color: var(--text); }
.prose pre { background: var(--code-bg); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; overflow: auto; line-height: 1.45; }
.prose :not(pre) > code { background: var(--code-bg); border: 1px solid var(--line-soft); border-radius: 6px; padding: 1px 5px; }
.prose table { border-collapse: collapse; width: 100%; margin: 0 0 1em; font-size: 14px; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--line); padding: 6px 10px; text-align: left; }
.prose th { background: var(--surface-2); }
.prose img { border-radius: 10px; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 1.5em 0; }
.prose details { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; margin: 0 0 1em; }
.prose details summary { cursor: pointer; font-weight: 600; }
.prose .img-links { float: left; margin: 0 16px 8px 0; }
.prose .img-rechts { float: right; margin: 0 0 8px 16px; }
.prose .img-mitte { display: block; margin: 0 auto 1em; }
.prose .clear { clear: both; }
.prose .mitte { text-align: center; }
.prose .rechts { text-align: right; }

/* ---------- Duden ---------- */
.du-list { display: grid; gap: 10px; }
.du-item { display: flex; gap: 14px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; color: var(--text) !important; text-decoration: none !important; box-shadow: var(--shadow); }
.du-item:hover { border-color: var(--accent-soft-line); }
.du-item .art { width: 46px; height: 46px; font-size: 24px; border-radius: 12px; background: var(--c-du); }
.du-item h3 { margin: 0 0 2px; font-size: 16px; color: var(--text); }
.du-item p { margin: 0; color: var(--text-2); font-size: 14px; }
.du-item .row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 6px; font-size: 12.5px; color: var(--muted); }
.du-article h1 { margin: 0 0 6px; font: 800 30px/1.15 var(--font-display); }
.du-article .by { color: var(--muted); font-size: 13.5px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.links-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.links-list li { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line-soft); border-radius: 12px; background: var(--surface-2); }
.links-list .fav { width: 20px; height: 20px; border-radius: 4px; flex: none; margin-top: 2px; }
.links-list b { display: block; }
.links-list small { color: var(--muted); display: block; overflow-wrap: anywhere; }

/* ---------- Rezepte ---------- */
.rgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.rc { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); color: var(--text) !important; text-decoration: none !important; display: flex; flex-direction: column; }
.rc:hover { border-color: var(--accent-soft-line); transform: translateY(-1px); }
.rc .ph { height: 130px; display: grid; place-items: center; font-size: 54px; position: relative; overflow: hidden; }
.rc .ph img { width: 100%; height: 100%; object-fit: cover; }
.rc .in { padding: 12px 14px; }
.rc h3 { margin: 0 0 6px; font-size: 15.5px; color: var(--text); }
.rc .mt { display: flex; gap: 10px; color: var(--muted); font-size: 12.5px; flex-wrap: wrap; }
.fav-btn {
  position: absolute; right: 10px; top: 10px; z-index: 2; border: 0; border-radius: 50%; width: 34px; height: 34px; display: grid; place-items: center;
  background: rgba(255, 255, 255, .92); font-size: 16px; cursor: pointer; box-shadow: 0 1px 4px rgba(0, 0, 0, .2); color: #d8432f;
}
.fav-btn[aria-pressed="false"] { color: #8d9bb3; }
.ph.p0 { background: radial-gradient(circle at 30% 30%, #ffe9a8, #f2b33d); } .ph.p1 { background: radial-gradient(circle at 30% 30%, #d8f5c0, #79b84a); }
.ph.p2 { background: radial-gradient(circle at 30% 30%, #ffd6c9, #e2674f); } .ph.p3 { background: radial-gradient(circle at 30% 30%, #f3e1ff, #a874d6); }
.ph.p4 { background: radial-gradient(circle at 30% 30%, #d4ecff, #4f8fd6); } .ph.p5 { background: radial-gradient(circle at 30% 30%, #ffe1ec, #e0658f); }
.ph.p6 { background: radial-gradient(circle at 30% 30%, #fff3cf, #c99a3a); } .ph.p7 { background: radial-gradient(circle at 30% 30%, #e3f7f4, #3ea594); }
.rz-head { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; align-items: start; }
.rz-head .ph { height: 260px; border-radius: 18px; display: grid; place-items: center; font-size: 100px; overflow: hidden; position: relative; border: 1px solid var(--line); }
.rz-head .ph img { width: 100%; height: 100%; object-fit: cover; }
.rz-head h1 { margin: 0 0 6px; font: 800 32px/1.1 var(--font-display); }
.rz-facts { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 14px; }
.rz-body > .card { margin-top: 0; }
.rz-body { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 22px; align-items: start; margin-top: 18px; }
.portions { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; }
.portions button { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--btn-line); background: var(--btn); color: var(--text); font: 700 18px/1 var(--font); cursor: pointer; }
.portions output { font: 700 18px var(--font); min-width: 2ch; text-align: center; }
.ingr { list-style: none; margin: 0; padding: 0; }
.ingr li { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 10px; padding: 7px 0; border-top: 1px solid var(--line-soft); font-size: 14.5px; }
.ingr li:first-child { border-top: 0; }
.ingr li.grp { display: block; border-top: 0; padding: 12px 0 2px; font: 700 12px var(--font); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.ingr .amt { font-weight: 700; text-align: right; color: var(--heading); white-space: nowrap; }
.ingr .note { color: var(--muted); }
.steps { list-style: none; counter-reset: st; margin: 0; padding: 0; }
.steps li { counter-increment: st; position: relative; padding: 0 0 18px 48px; font-size: 15.5px; line-height: 1.6; }
.steps li::before {
  content: counter(st); position: absolute; left: 0; top: -2px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  font: 800 15px var(--font); color: #fff; background: var(--c-de); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45);
}
.timer-btn { margin-left: 6px; vertical-align: 1px; }
.cook { position: fixed; inset: 0; z-index: 100; background: var(--bg); display: flex; flex-direction: column; }
.cook-top { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--line); background: var(--glass); }
.cook-top b { font-size: 17px; }
.cook-top .prog { flex: 1; height: 6px; background: var(--surface-3); border-radius: 99px; overflow: hidden; }
.cook-top .prog i { display: block; height: 100%; background: var(--c-de); width: 0; transition: width .2s; }
.cook-step { flex: 1; overflow: auto; padding: clamp(18px, 5vw, 60px); display: flex; flex-direction: column; justify-content: center; max-width: 900px; margin: 0 auto; width: 100%; }
.cook-step .n { color: var(--muted); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; font-size: 13px; }
.cook-step .t { font-size: clamp(22px, 3.6vw, 34px); line-height: 1.4; margin: 10px 0 18px; color: var(--text); }
.cook-step .need { color: var(--text-2); font-size: 16px; }
.cook-nav { display: flex; gap: 12px; padding: 14px 18px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--glass); }
.cook-nav .pill { flex: 1; padding: 14px; font-size: 17px; }
.timers { position: fixed; right: 16px; bottom: 16px; z-index: 110; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.cooking .timers { bottom: calc(86px + env(safe-area-inset-bottom)); left: 16px; align-items: flex-end; }
.timers .tm { pointer-events: auto; display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 8px 12px; box-shadow: var(--shadow-lg); font-variant-numeric: tabular-nums; }
.timers .tm b { font-size: 18px; }
.timers .tm.done { background: var(--bad-soft); border-color: var(--bad); animation: ring 1s infinite; }
@keyframes ring { 50% { transform: scale(1.04); } }
.shop { list-style: none; margin: 0; padding: 0; }
.shop li { display: flex; gap: 10px; align-items: center; padding: 9px 0; border-top: 1px solid var(--line-soft); }
.shop li:first-child { border-top: 0; }
.shop li.done .what { text-decoration: line-through; color: var(--muted); }
.shop .amt { font-weight: 700; min-width: 80px; text-align: right; color: var(--heading); }
.shop .from { color: var(--muted); font-size: 12.5px; }
.shop input[type=checkbox] { width: 20px; height: 20px; }

/* ---------- Formulare ---------- */
.v3 form.stack { display: grid; gap: 14px; }
.v3 label.f { display: grid; gap: 5px; font-weight: 600; font-size: 14px; color: var(--text); }
.v3 label.f small, .v3 .hint { font-weight: 400; color: var(--muted); font-size: 13px; }
.v3 input[type=text], .v3 input[type=search], .v3 input[type=url], .v3 input[type=number], .v3 input[type=password], .v3 input[type=email],
.v3 input[type=file], .v3 select, .v3 textarea {
  font: 15px/1.4 var(--font); color: var(--text); background: var(--input); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; width: 100%;
}
.v3 textarea { min-height: 120px; resize: vertical; }
.v3 textarea.mono { font-family: var(--mono); font-size: 13.5px; }
.v3 input:focus, .v3 select:focus, .v3 textarea:focus { outline: none; border-color: var(--accent-2); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-2) 25%, transparent); }
.v3 .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.v3 .grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.v3 .check { display: flex; gap: 8px; align-items: center; font-weight: 500; font-size: 14px; }
.v3 .check input { width: 18px; height: 18px; }
.v3 .actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.v3 fieldset { border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; margin: 0; }
.v3 fieldset legend { padding: 0 6px; font-weight: 700; color: var(--heading); }
.v3 .group-pick { display: flex; gap: 6px 14px; flex-wrap: wrap; margin-top: 6px; font-size: 14px; }
.v3 .group-pick label.inline { display: inline-flex; gap: 6px; align-items: center; }
.v3 .group-pick input { width: auto; }
.auth-box { max-width: 420px; margin: 40px auto; }
.auth-box h1 { margin: 0 0 4px; font: 800 28px/1.15 var(--font-display); }

/* Editor (public/editor.js, views/partials/md-editor.ejs) im neuen Aussehen */
.v3 .editor { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); }
.v3 .editor-tools { display: flex; flex-wrap: wrap; gap: 4px 10px; padding: 6px 8px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.v3 .editor-tools .tool-group { display: inline-flex; gap: 2px; align-items: center; }
.v3 .editor-tools button.small, .v3 .editor-tools .btn.small { border: 1px solid transparent; background: transparent; color: var(--text); border-radius: 7px; padding: 4px 8px; font: 13px var(--font); cursor: pointer; }
.v3 .editor-tools button.small:hover { background: var(--surface); border-color: var(--line); }
.v3 .editor-tools .view-switch { margin-left: auto; }
.v3 .editor-tools button.on, .v3 .editor-tools button[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent-soft-line); }
.v3 .editor textarea.code { border: 0; border-radius: 0; min-height: 320px; font-family: var(--mono); font-size: 13.5px; }
.v3 .editor .preview .content { min-height: 320px; padding: 12px 14px; outline: none; }
.v3 .editor > small { display: block; padding: 6px 10px; color: var(--muted); border-top: 1px solid var(--line-soft); }
.v3 .editor .panel { background: var(--surface); }
.v3 .editor .img-tools { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; position: absolute; z-index: 5; }
.v3 .editor .img-tools button { border: 1px solid var(--line); background: var(--surface); border-radius: 6px; padding: 3px 7px; font-size: 12px; color: var(--text); cursor: pointer; }
.v3 .editor .editor-panes { position: relative; }
.v3 .editor .img-handle { position: absolute; width: 12px; height: 12px; background: var(--accent); border-radius: 3px; cursor: nwse-resize; z-index: 6; }
.v3 .editor img.sel { outline: 3px solid var(--accent-2); }
.v3 .drafts-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; position: relative; }
.v3 .drafts-bar button.small { border-radius: 999px; padding: 5px 11px; font: 600 13px var(--font); background: var(--btn); border: 1px solid var(--btn-line); color: var(--text); cursor: pointer; }
.v3 .drafts-panel { position: absolute; top: 100%; left: 0; z-index: 20; min-width: 320px; max-width: 520px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 8px; margin-top: 6px; }

/* ---------- Suche ---------- */
.hits { display: grid; gap: 8px; }
.hit { display: flex; gap: 12px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; color: var(--text) !important; text-decoration: none !important; }
.hit:hover { border-color: var(--accent-soft-line); }
.hit .e { font-size: 22px; width: 30px; text-align: center; flex: none; }
.hit b { display: block; }
.hit small { color: var(--muted); }
.hit mark { background: color-mix(in srgb, var(--warn) 35%, transparent); color: inherit; border-radius: 3px; }

/* ---------- Schmale Bildschirme ---------- */
@media (max-width: 1100px) {
  .v3-rail { display: none; }
  .rz-body { grid-template-columns: 300px minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .tile, .tile.wide { grid-column: span 1; }
  .strip { grid-template-columns: 1fr; }
  .v3-page { flex-direction: column; }
  .v3-side { width: 100%; position: static; }
  .v3-side .grp.nav { display: flex; overflow-x: auto; gap: 4px; }
  .v3-side .grp.nav h3 { display: none; }
  .v3-side .grp.nav .it { flex: none; }
  .v3-side .grp.nav .it .n { margin-left: 4px; }
  .lr { grid-template-columns: 32px minmax(0, 1fr) auto; }
  .lr .mu.opt, .lr.h .opt { display: none; }
  .pc { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 4px 12px; padding: 14px; align-items: center; }
  .pc .info { display: contents; }
  .pc .art-l { grid-row: span 2; align-self: start; }
  .pc .art, .pc-list.compact .art { width: 64px; height: 64px; font-size: 32px; border-radius: 14px; }
  .pc h3, .pc-list.compact h3 { font-size: 19px; grid-column: 2; grid-row: span 2; align-self: center; }
  .pc .flag { flex-wrap: wrap; }
  .pc p.lead, .pc .cta, .pc .tags, .pc .etools { grid-column: 1 / -1; }
  .pc p.lead { margin: 8px 0 4px; }
  .pc .cta .pill.pri { flex: 1; justify-content: center; }
  .pc .cta .opt-c { display: none; }
  .more-card { flex-wrap: wrap; }
  .more-card small { display: none; }
  .pc .grip { display: none; }
  .pc-list.compact { grid-template-columns: minmax(0, 1fr); }
  .dl-bar .seg, .dl-bar select { display: none; }
  .dl-bar input[type=search] { flex: 1 1 100%; }
  .dl-bar .chips { flex: 1 1 100%; min-width: 0; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; }
  .dl-bar .chip { white-space: nowrap; }
  .rz-head, .rz-body { grid-template-columns: 1fr; }
  .rz-head .ph { height: 200px; order: -1; }
  .v3 .grid2, .v3 .grid3 { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .v3-top { flex-wrap: wrap; gap: 10px; }
  .v3-search { order: 3; flex-basis: 100%; max-width: none; }
  .v3-crumb { display: none; }
  .v3-me { margin-left: auto; }
  .tiles { grid-template-columns: 1fr; gap: 12px; }
  .tile { min-height: 0; }
  .tile .band { height: 64px; }
  .mini { display: none; }
  .v3-hero .now { margin-left: 0; }
  .v3-foot .right { margin-left: 0; }
  .proj-head h1, .du-article h1, .rz-head h1 { font-size: 25px; }
}
@media (prefers-reduced-motion: reduce) {
  .tile, .rc { transition: none; }
  .tile:hover, .rc:hover { transform: none; }
  .timers .tm.done { animation: none; }
}
@media print {
  .v3-top, .v3-foot, .v3-side, .v3-rail, .noprint, .fav-btn { display: none !important; }
  body.v3 { background: #fff; }
  .card { box-shadow: none; }
}

/* ==========================================================================================================
   Dancors Daddelecke (views/v3/spiele.ejs, spiel.ejs, spiel-edit.ejs)
   ========================================================================================================== */
.dd-c-blau { --dd: linear-gradient(180deg, #4f97ff, #1d5fd1); }
.dd-c-gruen { --dd: linear-gradient(180deg, #1f9a5a, #0d6b3a); }
.dd-c-rot { --dd: linear-gradient(180deg, #ff7a63, #d8432f); }
.dd-c-gelb { --dd: linear-gradient(180deg, #f2b33d, #cf8a0c); }
.dd-c-lila { --dd: linear-gradient(180deg, #a98bff, #6b4fd6); }
.dd-c-tuerkis { --dd: linear-gradient(180deg, #5ec8ff, #2283c7); }
.dd-c-orange { --dd: linear-gradient(180deg, #ffb347, #e0661b); }
.dd-c-rosa { --dd: linear-gradient(180deg, #ff9ac2, #d1508a); }
.dd-c-nacht { --dd: linear-gradient(180deg, #5b4a8a, #2c2250); }
.dd-c-grau { --dd: linear-gradient(180deg, #8d9bb3, #4b5a75); }
.dd-hero { display: flex; gap: 20px; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; padding: 28px 0 6px; }
.dd-hero h1 { margin: 0; font: 800 clamp(28px, 4.2vw, 40px)/1.08 var(--font-display); letter-spacing: -.02em; }
.dd-hero p { margin: 8px 0 0; color: var(--text-2); font-size: 16px; max-width: 680px; }
.dd-hero .acts { display: flex; gap: 8px; flex-wrap: wrap; }
.dd-opts { display: flex; gap: 10px 18px; align-items: center; flex-wrap: wrap; margin-top: 14px; }
.dd-opts select { width: auto; margin-left: 6px; }
.dd-pending { margin-top: 14px; }
.dd-pending .row { display: flex; gap: 8px; align-items: center; padding: 3px 0; }
.dd-today { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; margin: 18px 0 6px; }
.dd-feat {
  position: relative; border-radius: 18px; overflow: hidden; padding: 18px 20px; min-height: 160px; display: flex; flex-direction: column; justify-content: flex-end;
  box-shadow: var(--shadow); background: var(--dd, var(--c-x)) center / cover; transition: transform .15s ease, box-shadow .15s ease;
}
.v3 a.dd-feat, .v3 a.dd-feat * { color: #fff; text-decoration: none; }
.dd-feat:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.dd-feat::after { content: ""; position: absolute; inset: 0 0 55% 0; background: var(--gloss); pointer-events: none; }
.dd-feat[style*="background-image"]::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 20%, rgba(0, 0, 0, .65)); }
.dd-feat > * { position: relative; z-index: 1; }
.dd-feat .big { position: absolute; right: 16px; top: 10px; font-size: 76px; line-height: 1; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .25)); }
.dd-feat[style*="background-image"] .big { display: none; }
.dd-feat small { font: 700 11.5px var(--font); letter-spacing: .07em; text-transform: uppercase; opacity: .92; text-shadow: 0 1px 2px rgba(0, 0, 0, .3); max-width: 70%; }
.dd-feat h2 { margin: 2px 0 4px; color: #fff; font: 800 23px/1.15 var(--font-display); text-shadow: 0 1px 2px rgba(0, 0, 0, .3); max-width: 75%; }
.dd-feat p { margin: 0; font-size: 14px; max-width: 75%; text-shadow: 0 1px 2px rgba(0, 0, 0, .3); }
.dd-feat .row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.dd-feat .chipw { font-size: 12px; background: rgba(255, 255, 255, .22); border: 1px solid rgba(255, 255, 255, .35); border-radius: 999px; padding: 3px 10px; }
.dd-shelf { margin-top: 26px; }
.dd-shelf .hd { display: flex; align-items: baseline; gap: 4px 10px; margin-bottom: 10px; flex-wrap: wrap; }
.dd-shelf .hd h3 { margin: 0; font: 800 19px var(--font-display); }
.dd-shelf .hd .sub { color: var(--muted); font-size: 14px; }
.dd-shelf .hd .more { margin-left: auto; font-size: 14px; }
.dd-shelf .hd .tools { margin-left: auto; display: flex; gap: 6px; }
.dd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; min-height: 40px; }
.gc { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; transition: transform .12s ease, box-shadow .12s ease; }
.gc:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.gc .cv { height: 108px; display: grid; place-items: center; position: relative; color: #fff; background: var(--dd, var(--c-x)) center / cover; }
.gc .cv::after { content: ""; position: absolute; inset: 0 0 55% 0; background: var(--gloss); pointer-events: none; }
.gc .cv .e { font-size: 50px; line-height: 1; position: relative; z-index: 1; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .25)); }
.gc.has-cover .cv .e { display: none; }
.gc .cv .badge2, .gc .cv .live, .gc .cv .lockc { position: absolute; z-index: 2; font: 700 11px/1.5 var(--font); border-radius: 999px; padding: 1px 8px; }
.gc .cv .badge2 { left: 10px; top: 9px; background: rgba(0, 0, 0, .32); color: #fff; }
.gc .cv .badge2.warn { background: #e0a100; color: #2b1d00; }
.gc .cv .live { right: 10px; top: 9px; background: #fff; color: #1b7a35; display: flex; gap: 5px; align-items: center; }
.gc .cv .live i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); display: inline-block; }
.gc .cv .lockc { right: 10px; bottom: 8px; background: rgba(0, 0, 0, .32); color: #fff; }
.gc .bd { padding: 10px 13px 12px; display: grid; gap: 4px; align-content: start; flex: 1; }
.gc .bd b { font-size: 15px; }
.v3 .gc .bd b a { color: var(--text); text-decoration: none; }
.gc .stretch::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.gc .bd .tx { color: var(--text-2); font-size: 13px; line-height: 1.4; }
.gc .bd .mt { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 4px; }
.gc .tools { position: absolute; right: 8px; bottom: 8px; display: flex; gap: 4px; z-index: 3; align-items: center; }
.gc .tools .grip { color: var(--muted); cursor: grab; margin-right: 2px; }
.v3 .gc.add { border: 2px dashed var(--accent-soft-line); background: transparent; box-shadow: none; display: grid; place-items: center; min-height: 180px; color: var(--accent); font-weight: 700; text-align: center; padding: 12px; }
.gc.add:hover { transform: none; background: var(--accent-soft); text-decoration: none; }
.dd-grid .gc.add.dd-drop { min-height: 120px; color: var(--muted); font-weight: 500; }

/* Spielseite */
.dd-bar { display: flex; align-items: center; gap: 8px 10px; margin: 16px 0 0; flex-wrap: wrap; }
.dd-bar h1 { margin: 0; font: 800 26px var(--font-display); }
.dd-bar .sp { flex: 1; }
.dd-play { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; padding-top: 14px; align-items: start; }
.dd-play.full { grid-template-columns: minmax(0, 1fr); }
.dd-play.full .dd-side { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.dd-play.full .dd-side .card + .card { margin-top: 0; }
.dd-frame { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--surface); box-shadow: var(--shadow); }
.dd-frame iframe { display: block; width: 100%; border: 0; height: min(78vh, 760px); background: var(--bg); }
.dd-play.full .dd-frame iframe { height: min(82vh, 860px); }
.dd-frame.fill iframe { height: calc(100vh - 170px); }
.dd-frame:fullscreen { border-radius: 0; border: 0; }
.dd-frame:fullscreen iframe { height: 100vh !important; aspect-ratio: auto !important; }
.dd-frame:fullscreen .ft { display: none; }
.dd-frame .ft { display: flex; gap: 6px; align-items: center; padding: 8px 12px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); background: var(--surface-2); flex-wrap: wrap; }
.dd-frame .ft .sp { flex: 1; }
.dd-side .card { padding: 14px 16px; }
.lb { display: grid; font-size: 14px; }
.lb > div { display: flex; gap: 8px; padding: 5px 2px; border-bottom: 1px dashed var(--line-soft); }
.lb > div:last-child { border-bottom: 0; }
.lb > div > :last-child { margin-left: auto; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.lb .me, .lb .me > :last-child { font-weight: 700; color: var(--accent); }
.dd-side .note, .dd-form .note { font-size: 13px; color: var(--muted); margin: 0; }
.dd-side .note-b { margin: 0; font-size: 14px; color: var(--text-2); }
.dd-howto { font-size: 14px; }

/* Formular */
.dd-form { max-width: 980px; }
.fmt { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.fmt label { border: 1.5px solid var(--line); border-radius: 12px; padding: 12px; display: grid; gap: 3px; cursor: pointer; background: var(--surface-2); font-size: 13px; color: var(--text-2); position: relative; }
.fmt label input { position: absolute; opacity: 0; pointer-events: none; }
.fmt label b { font-size: 15px; color: var(--text); }
.fmt label .e { font-size: 24px; }
.fmt label.sel, .fmt label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.fmt label:has(input:focus-visible) { outline: 3px solid color-mix(in srgb, var(--accent-2) 55%, transparent); }
.drop { position: relative; display: grid; gap: 4px; justify-items: center; border: 2px dashed var(--accent-soft-line); border-radius: 14px; padding: 22px; text-align: center; color: var(--text-2); background: var(--surface-2); cursor: pointer; }
.drop.over { background: var(--accent-soft); border-color: var(--accent); }
.drop b { color: var(--text); }
.drop input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dd-form .checks { display: flex; gap: 6px 14px; flex-wrap: wrap; padding-top: 6px; }
.dd-form .cover-now { display: flex; gap: 12px; align-items: center; }
.dd-form .cover-now img { width: 160px; border-radius: 10px; border: 1px solid var(--line); }

/* ==========================================================================================================
   Bearbeiten-Modus (public/v3-edit.js): gilt für jede moderne Seite mit [data-ed-root]
   ========================================================================================================== */
[data-ed-only] { display: none !important; }
body.editing [data-ed-off] { display: none !important; }
body.editing [data-ed-only] { display: revert !important; }
body.editing .tools[data-ed-only], body.editing .dd-opts[data-ed-only], body.editing .dl-opts[data-ed-only], body.editing .etools[data-ed-only] { display: flex !important; }
body.editing .gc.add[data-ed-only], body.editing .tile.add[data-ed-only] { display: grid !important; }
body:not(.editing) [data-ed-item][data-hidden], body:not(.editing) .dd-shelf[data-empty] { display: none !important; }
.edit-bar {
  position: sticky; top: 64px; z-index: 25; display: flex; gap: 8px 12px; align-items: center; flex-wrap: wrap; margin-top: 16px; padding: 9px 14px; border-radius: 12px; font-size: 14px;
  background: #fff7d6; border: 1px solid #f1d27a; color: #5b4500; box-shadow: var(--shadow);
}
:root[data-theme="dark"] .edit-bar { background: #3a2f0c; border-color: #7a6216; color: #ffe08a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .edit-bar { background: #3a2f0c; border-color: #7a6216; color: #ffe08a; } }
body.framed .edit-bar { top: 6px; }
.edit-bar .sp { flex: 1; }
.edit-bar .hint { opacity: .9; }
body.editing [data-ed-text] { outline: 2px dashed color-mix(in srgb, var(--accent-2) 70%, transparent); outline-offset: 3px; border-radius: 6px; cursor: text; min-width: 2ch; display: inline-block; }
body.editing h1[data-ed-text], body.editing p[data-ed-text], body.editing h2[data-ed-text] { display: block; width: fit-content; max-width: 100%; }
body.editing [data-ed-text]:empty::before { content: "…"; color: var(--muted); }
body.editing [data-ed-text]:focus { outline-style: solid; background: color-mix(in srgb, var(--accent-soft) 60%, transparent); }
body.editing .tile [data-ed-text]:focus, body.editing .dd-feat [data-ed-text]:focus { background: rgba(0, 0, 0, .18); }
body.editing .gc .stretch::after { display: none; }
body.editing [data-ed-item] { cursor: grab; }
body.editing [data-ed-item][data-hidden] { opacity: .45; }
body.editing [data-ed-item].dragging { opacity: .35; outline: 2px dashed var(--accent); }
body.editing .gc:hover, body.editing .tile:hover { transform: none; }
body.editing .gc .bd { padding-bottom: 44px; }
body.editing .dd-shelf { padding: 10px; margin-left: -10px; margin-right: -10px; border-radius: 16px; border: 1px dashed var(--line); }
body.editing .dd-shelf .hd .grip { cursor: grab; color: var(--muted); font-size: 18px; }
[data-ed-hide] .h-off, [data-hidden] > * [data-ed-hide] .h-on, [data-hidden] [data-ed-hide] .h-on { display: none; }
[data-hidden] [data-ed-hide] .h-off { display: inline; }
.tile .tools { position: absolute; right: 10px; bottom: 10px; z-index: 3; display: flex; gap: 4px; }
.v3 .tile.add { border: 2px dashed var(--accent-soft-line); background: transparent; box-shadow: none; place-items: center; color: var(--accent); font: 700 15px var(--font); cursor: pointer; }
body.editing .tile .body { padding-bottom: 46px; }
.v3-hero .ed-start { margin-left: auto; }
dialog.ed-dlg { border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); width: min(440px, calc(100vw - 32px)); }
dialog.ed-dlg::backdrop { background: rgba(10, 20, 40, .35); }
dialog.ed-dlg h3 { margin: 0 0 12px; font: 800 18px var(--font-display); color: var(--heading); }
dialog.ed-dlg .ed-fields { display: grid; gap: 10px; }
dialog.ed-dlg .actions { display: flex; gap: 8px; margin-top: 16px; }
dialog.ed-dlg .ed-img { display: grid; gap: 6px; }
dialog.ed-dlg .ed-img img { max-height: 110px; width: auto; border-radius: 8px; border: 1px solid var(--line); }
@media (max-width: 860px) {
  .dd-play { grid-template-columns: minmax(0, 1fr); }
  .dd-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .gc .cv { height: 84px; }
  .gc .cv .e { font-size: 40px; }
  .dd-frame iframe { height: 72vh; }
  .edit-bar .hint { display: none; }
}

/* ---------- Changelog, Datenschutz, Kontakt, Besucherbuch im Stil der Startseite (views/v3/changelog, datenschutz, kontakt, besucherbuch) ---------- */
.v3-text { max-width: 900px; margin-top: 14px; }
.v3-changelog h2 { font-size: 19px; padding: 0 0 6px; margin: 1.8em 0 .6em; border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.v3-changelog h2:first-child { margin-top: 0; }
.v3-changelog h2 a { color: inherit; text-decoration: none; }
.v3-changelog li { margin: .45em 0; }
.v3-changelog [hidden] { display: none !important; }
.cl-search { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 14px; }
.cl-search[hidden] { display: none; }
.v3-legal h1 { font: 800 clamp(24px, 3vw, 30px)/1.2 var(--font-display); margin: 0 0 .4em; }
.v3-legal h2 a { color: inherit; text-decoration: none; }
.v3-legal fieldset.groupbox { border: 1px solid var(--line); border-radius: 14px; background: var(--accent-soft); padding: 12px 18px; margin: 0 0 1.2em; }
.v3-legal fieldset.groupbox legend { font-weight: 700; padding: 0 6px; color: var(--heading); }
.v3-legal details { background: var(--surface-2); }
.v3-legal details[open] summary { margin-bottom: 8px; }
.v3-legal .code-snippet { margin: 8px 0; }
.v3-legal .code-snippet figcaption { font-size: 13px; margin-bottom: 4px; }
.v3-legal .code-snippet pre { font-size: 12.5px; max-height: 420px; }
.v3-legal .code-snippet .ln { display: inline-block; width: 3.2em; color: var(--muted); user-select: none; }
.v3-legal .code-snippet p { font-size: 14px; margin: 6px 0 0; }
.v3-legal .shots { display: flex; flex-wrap: wrap; gap: 12px; }
.v3-legal .shot { margin: 0; flex: 1 1 260px; }
.v3-legal .shot img { max-width: 100%; border: 1px solid var(--line); }
.v3-legal .shot figcaption { font-size: 13px; color: var(--muted); }
.v3-legal table.list { display: table; border-radius: 0; box-shadow: none; overflow: visible; }
.v3-legal .msg { padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.gb-v3 { display: grid; grid-template-columns: minmax(260px, 340px) 1fr; gap: 18px; align-items: start; margin-top: 14px; }
.gb-form { position: sticky; top: 80px; }
.gb-list { display: grid; gap: 12px; }
.gb-list .card + .card { margin-top: 0; }
.gb-card header { display: flex; justify-content: space-between; gap: 10px; align-items: center; margin-bottom: 8px; flex-wrap: wrap; }
.gb-card .who { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--heading); }
.gb-card .av { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; background: var(--surface-3); display: inline-grid; place-items: center; font-size: 16px; }
.gb-card time { font-size: 13px; }
.gb-card p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 760px) { .gb-v3 { grid-template-columns: 1fr; } .gb-form { position: static; } }
.v3-legal td, .v3-legal th { overflow-wrap: normal; }
.v3-legal td code { white-space: nowrap; }

/* ---------- Dancors Dioramen (Update 98, Kacheln Update 99; views/v3/dioramen.ejs, diorama.ejs, _dio-tile.ejs, diorama-edit.ejs) ---------- */
.di-head { margin-top: 26px; }
.di-head .new-entry { margin-left: 0 !important; }
.di-head [data-ed-start] + .new-entry, .di-head a.pill + .new-entry { margin-left: 0 !important; }
.di-bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 4px 0 16px; }
.di-bar .sp { flex: 1; }
.di-bar .chips { display: flex; gap: 6px; flex-wrap: wrap; }
.di-bar .chip small { opacity: .7; margin-left: 2px; }
.di-bar select { width: auto; padding: 6px 10px; border-radius: 999px; }
.di-bar input[type=search] { width: auto; flex: 0 1 200px; padding: 6px 12px; border-radius: 999px; }
.di-opts { display: flex; gap: 10px 14px; flex-wrap: wrap; align-items: center; padding: 12px 16px; margin-bottom: 14px; font-size: 14px; }

.di-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; }
.dc { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; transition: transform .15s, border-color .15s; }
.dc:hover { transform: translateY(-2px); border-color: var(--accent-soft-line); }
body.editing .dc:hover { transform: none; }
.dc .im { position: relative; display: block; aspect-ratio: 16 / 9; background: var(--c-di); }
.dc .im img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dc .ph { position: absolute; inset: 0; display: grid; place-items: center; font-size: 56px; color: #fff; }
.dc .im .typ, .dc .im .cnt { position: absolute; font: 700 12px var(--font); background: rgba(0, 0, 0, .55); color: #fff; border-radius: 999px; padding: 3px 10px; backdrop-filter: blur(4px); }
.dc .im .typ { left: 10px; top: 10px; }
.dc .im .cnt { right: 10px; bottom: 10px; }
.dc .grip { position: absolute; left: 10px; bottom: 10px; z-index: 2; background: rgba(0, 0, 0, .6); color: #fff; border-radius: 8px; padding: 2px 8px; font-size: 14px; cursor: grab; }
.dc .flg { position: absolute; right: 10px; top: 10px; display: flex; gap: 6px; z-index: 1; }
.dc .bd { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0; }
.dc .gm { font: 700 11.5px var(--font); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.dc h3 { margin: 0; font: 800 19px/1.2 var(--font-display); }
.dc h3 a { color: var(--heading, var(--text)); }
.dc p { margin: 0; color: var(--text-2); font-size: 14px; line-height: 1.45; }
body.editing .dc p:empty { min-height: 1.4em; }
.dc .of { font-size: 12.5px; color: var(--muted); }
.dc .mt { margin-top: auto; padding-top: 8px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.dc .mt .dl-go { margin-left: auto; }
.dc .mt .dl-go small { font-weight: 500; opacity: .85; }
.dc .etools { display: flex; gap: 6px; flex-wrap: wrap; align-items: flex-start; padding: 10px 16px 14px; border-top: 1px dashed var(--line); }
.dc .pin-on, .dc.pinned .pin-off { display: none; }
.dc.pinned .pin-on { display: inline; }
.dc.wide { grid-column: span 2; flex-direction: row; flex-wrap: wrap; }
.dc.wide .im { aspect-ratio: auto; flex: 1.35 1 0; min-height: 280px; }
.dc.wide .bd { flex: 1 1 0; padding: 22px; }
.dc.wide h3 { font-size: 27px; }
.dc.wide p { font-size: 15px; }
.dc.wide .etools { flex: 1 1 100%; }
.dc.wide .flg { right: auto; left: calc(57% - 10px); transform: translateX(-100%); }

.crumbs { margin: 18px 0 0; font-size: 14px; color: var(--muted); }
.di-hero { position: relative; border-radius: 22px; overflow: hidden; margin-top: 14px; min-height: 340px; display: flex; align-items: flex-end; color: #fff; box-shadow: var(--shadow-lg); background: var(--c-di); }
.di-hero[data-lb-hero] { cursor: zoom-in; }
.di-hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.di-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, .74)); pointer-events: none; }
.di-hero.plain { min-height: 200px; }
.di-hero .tx { position: relative; z-index: 1; padding: 26px 30px; max-width: 820px; cursor: auto; }
.di-hero .kick { font: 700 12px var(--font); letter-spacing: .08em; text-transform: uppercase; opacity: .92; }
.di-hero h1 { margin: 4px 0 8px; font: 800 clamp(26px, 4vw, 40px)/1.08 var(--font-display); color: #fff; letter-spacing: -.01em; }
.di-hero p { margin: 0 0 14px; font-size: 16px; opacity: .95; }
.di-hero .row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.di-hero .tag { background: rgba(255, 255, 255, .18); border-color: rgba(255, 255, 255, .35); color: #fff; }
.di-hero .flg { position: absolute; top: 18px; left: 18px; z-index: 2; display: flex; gap: 6px; }

.di-entry { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; margin-top: 18px; align-items: start; }
.di-main > .card + .card, .di-side > .card + .card { margin-top: 14px; }
.side-h { margin: 0 0 10px; font: 800 16px var(--font-display); }
.small-note { font-size: 13px; margin: 8px 0 0; }
.dlbox { border: 2px solid var(--accent-soft-line); }
.dlbox .big { width: 100%; justify-content: center; padding: 12px 16px; font-size: 16px; }
.dlbox .big small { font-weight: 500; opacity: .85; margin-left: 4px; }
.dlbox .sm { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--muted); margin: 8px 2px 0; }
.dlbox .sm .fn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vers-mini { margin-top: 10px; }
.vers-mini .vrow { display: flex; gap: 8px; align-items: center; padding: 7px 0; border-top: 1px solid var(--line-soft); font-size: 13.5px; }
.vers-mini .vrow:first-child { border-top: 0; }
.vers-mini .vrow .sp { flex: 1; color: var(--muted); }
.vers-mini .chg { font-size: 13px; color: var(--text-2); margin: -2px 0 6px; }
.vers-mini .chg ul { margin: 0; padding-left: 18px; }
.dlbox .note, .di-form .note { font-size: 13px; color: var(--text-2); background: var(--surface-2); border-radius: 10px; padding: 10px 12px; margin-top: 12px; }
.dlbox details.note summary { cursor: pointer; font-weight: 700; }
.dlbox details.note .prose { margin-top: 6px; font-size: 13px; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; font-size: 14px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.mods { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 14px; }
.mods li { display: flex; gap: 8px; align-items: center; padding: 7px 10px; background: var(--surface-2); border-radius: 10px; }
.mods li .sp { flex: 1; min-width: 0; }
.mods li small { color: var(--muted); }

.v3-lb { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; }
.v3-lb::backdrop { background: rgba(0, 0, 0, .88); }
.v3-lb figure { margin: 0; width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 40px 70px; box-sizing: border-box; }
.v3-lb img { max-width: 100%; max-height: calc(100vh - 110px); object-fit: contain; border-radius: 8px; }
.v3-lb figcaption { color: #eee; font-size: 14px; white-space: pre; }
.v3-lb .nav, .v3-lb .close { position: fixed; background: rgba(255, 255, 255, .14); color: #fff; border: 0; border-radius: 999px; width: 48px; height: 48px; font-size: 28px; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.v3-lb .nav:hover, .v3-lb .close:hover { background: rgba(255, 255, 255, .28); }
.v3-lb .prev { left: 14px; top: 50%; transform: translateY(-50%); }
.v3-lb .next { right: 14px; top: 50%; transform: translateY(-50%); }
.v3-lb .close { right: 14px; top: 14px; font-size: 20px; }
.v3-lb.one .nav { display: none; }

/* Formular */
.up-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.up { position: relative; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.up[data-img] { cursor: grab; }
.up.dragging { opacity: .4; }
.up img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block; }
.up .cap { width: 100%; border: 0; border-top: 1px solid var(--line-soft); border-radius: 0; padding: 6px 8px; font-size: 12.5px; background: var(--surface); }
.up .tb { position: absolute; top: 6px; right: 6px; display: flex; gap: 4px; }
.up .tb > * { background: rgba(0, 0, 0, .62); color: #fff; border: 0; border-radius: 6px; padding: 1px 7px; font-size: 12px; line-height: 20px; cursor: pointer; }
.up .tb .newb { background: var(--accent); cursor: default; }
.up .cv { position: absolute; top: 6px; left: 6px; background: rgba(0, 0, 0, .55); color: #fff; border-radius: 6px; padding: 1px 7px; font: 700 12px/20px var(--font); cursor: pointer; }
.up .cv input { position: absolute; opacity: 0; pointer-events: none; }
.up .cv span { display: none; }
.up .cv:has(input:checked) { background: #f2b33d; color: #3a2a00; }
.up .cv:has(input:checked) span { display: inline; }
.drop2 { position: relative; display: grid; place-items: center; text-align: center; border: 2px dashed var(--line); border-radius: 12px; color: var(--muted); font-size: 13.5px; min-height: 140px; cursor: pointer; padding: 10px; }
.drop2.over, .drop2:hover { border-color: var(--accent); color: var(--accent); }
.drop2 input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.kv { display: grid; grid-template-columns: 1fr 1fr 34px; gap: 8px; align-items: center; margin-bottom: 8px; }
.kv3 { display: grid; grid-template-columns: 1fr 76px 34px; gap: 8px; align-items: center; margin-bottom: 12px; }
.kv3 .wide { grid-column: 1 / 3; }
.kv input, .kv3 input { min-width: 0; }
.x { width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface-2); color: var(--muted); cursor: pointer; }

@media (max-width: 900px) {
  .di-entry { grid-template-columns: 1fr; }
  .dc.wide { grid-column: auto; flex-direction: column; }
  .dc.wide .im { flex: none; min-height: 0; aspect-ratio: 16 / 9; }
  .dc.wide .bd { flex: none; padding: 16px; }
  .dc.wide .flg { left: auto; right: 10px; transform: none; }
}
@media (max-width: 640px) {
  .di-hero { min-height: 260px; border-radius: 16px; }
  .di-hero .tx { padding: 56px 18px 18px; }
  .di-bar .chips { flex-wrap: nowrap; overflow-x: auto; width: 100%; }
  .di-grid { grid-template-columns: 1fr; }
  .v3-lb figure { padding: 50px 8px; }
  .v3-lb .nav { top: auto; bottom: 14px; transform: none; }
}
.di-opts label.check { display: inline-flex; gap: 6px; align-items: center; }
.di-opts b:not(:first-child) { margin-left: 10px; }
@media (max-width: 640px) { .di-hero::after { background: linear-gradient(180deg, rgba(0, 0, 0, .25), rgba(0, 0, 0, .78) 55%); } }

/* Dioramen: Kacheln auf dem Raster (views/v3/_dio-tile.ejs, public/dio-kacheln.js) */
.jump { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 16px; font-size: 14px; color: var(--muted); }
.jump a, .bwchips a { display: inline-flex; gap: 6px; align-items: center; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--text); font-weight: 600; text-decoration: none !important; }
.jump a { padding: 5px 12px 5px 6px; }
.jump a:hover, .bwchips a:hover { border-color: var(--bwc); }
.jump i, .bwchips i { font-style: normal; border-radius: 50%; background: var(--bwc); color: #fff; display: grid; place-items: center; font-weight: 800; }
.jump i { width: 22px; height: 22px; font-size: 12px; }
.bwchips { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 2px; }
.bwchips a, .bwchips > span { font-size: 12px; padding: 2px 9px 2px 3px; background: var(--surface-2); border-color: var(--line-soft); }
.bwchips > span { border-radius: 999px; padding: 2px 9px; color: var(--muted); }
.bwchips i { width: 17px; height: 17px; font-size: 10px; }
.kg { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-auto-rows: 40px; gap: 14px; margin-top: 18px; position: relative; }
.kt { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; min-width: 0; min-height: 0; scroll-margin-top: 140px; transition: box-shadow .3s; }
.kt.has-bw { border-top: 4px solid var(--bwc); }
.kg > .kt { z-index: 1; }
/* Rahmen um alle Kacheln eines Bauwerks (halbdurchsichtig in seiner Farbe) */
.bwframe { margin: -7px; border: 2px solid color-mix(in srgb, var(--bwc) 55%, transparent); background: color-mix(in srgb, var(--bwc) 12%, transparent); border-radius: 22px; pointer-events: none; z-index: 0; }
.bwframe + .bwframe { margin: -7px; }
.kt > .bd { padding: 14px 16px; flex: 1; min-height: 0; overflow: auto; }
.kt.has-bw > .bd { padding-top: 34px; }
.kt h3 { margin: 0 0 8px; font: 800 17px var(--font-display); color: var(--heading, var(--text)); }
.kt .prose { font-size: 14.5px; }
.kt .prose > :first-child, .kt .prose > .md-block:first-child > :first-child { margin-top: 0; }
.kt .anc { position: absolute; top: -90px; }
.bwtag { position: absolute; top: 8px; right: 8px; z-index: 2; font: 700 11.5px var(--font); color: #fff; background: var(--bwc); border-radius: 999px; padding: 2px 9px; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kt .fill { position: absolute; inset: 0; display: block; cursor: zoom-in; background: var(--surface-2); }
.kt .fill img { width: 100%; height: 100%; object-fit: cover; display: block; }
.kt .fill.contain img { object-fit: contain; }
.kcap, .klbl { position: absolute; left: 10px; bottom: 10px; z-index: 2; background: rgba(0, 0, 0, .62); color: #fff; font: 600 12.5px var(--font); border-radius: 8px; padding: 3px 9px; pointer-events: none; max-width: calc(100% - 20px); }
.klbl { bottom: auto; top: 10px; border-radius: 999px; font-weight: 700; font-size: 12px; }
.kt.has-bw .klbl { top: 10px; }
/* Vorher/Nachher mit Schieber (seit Update 98; Update 99 hatte diese Regeln versehentlich entfernt) */
.cmp { position: relative; border-radius: 16px; overflow: hidden; aspect-ratio: 16 / 9; border: 1px solid var(--line); --at: 50%; user-select: none; }
.cmp img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.cmp .after { clip-path: inset(0 0 0 var(--at)); }
.cmp .line { position: absolute; top: 0; bottom: 0; left: var(--at); width: 4px; background: #fff; transform: translateX(-50%); box-shadow: 0 0 8px rgba(0, 0, 0, .4); pointer-events: none; }
.cmp .knob { position: absolute; top: 50%; left: var(--at); transform: translate(-50%, -50%); width: 44px; height: 44px; border-radius: 50%; background: #fff; display: grid; place-items: center; font: 800 16px var(--font); color: #333; box-shadow: 0 2px 10px rgba(0, 0, 0, .4); pointer-events: none; }
.cmp .lb1, .cmp .lb2 { position: absolute; top: 12px; background: rgba(0, 0, 0, .6); color: #fff; font: 700 12px var(--font); border-radius: 999px; padding: 3px 10px; pointer-events: none; }
.cmp .lb1 { left: 12px; } .cmp .lb2 { right: 12px; }
.cmp input[type=range] { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; -webkit-appearance: none; appearance: none; }
.kt .cmp { position: absolute; inset: 0; aspect-ratio: auto; border: 0; border-radius: 0; }
.kt .cmp .lb1, .kt .cmp .lb2 { top: auto; bottom: 12px; }
.kgal { position: absolute; inset: 0; display: grid; gap: 6px; padding: 6px; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 1fr; }
.kgal.n1 { grid-template-columns: 1fr; } .kgal.n2, .kgal.n4 { grid-template-columns: 1fr 1fr; }
.kgal a { position: relative; display: block; min-height: 0; cursor: zoom-in; }
.kgal a[hidden] { display: none; }
.kgal img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; display: block; }
.kgal .more { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0, 0, 0, .55); color: #fff; font: 800 22px var(--font); border-radius: 10px; }
.kvid { position: absolute; inset: 0; display: grid; place-items: center; background: #111; color: #fff; text-decoration: none !important; }
.kvid img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .7; }
.kvid .play { position: relative; width: 70px; height: 50px; background: #e62117; border-radius: 14px; display: grid; place-items: center; font-size: 22px; }
.kvid .vtx { position: absolute; left: 12px; bottom: 10px; font: 700 14px var(--font); text-shadow: 0 1px 3px #000; }
.k-map { container-type: size; }
.mapw { position: absolute; inset: 0; display: grid; place-items: center; background: var(--surface-2); }
.mapin { position: relative; line-height: 0; }
.mapin img { display: block; max-width: 100cqw; max-height: 100cqh; }
.mp { position: absolute; transform: translate(-50%, -100%); display: flex; flex-direction: column; align-items: center; z-index: 2; line-height: 1.2; text-decoration: none !important; }
.mp i { font-style: normal; width: 30px; height: 30px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--bwc); border: 3px solid #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .35); display: grid; place-items: center; transition: transform .15s; }
.mp i span { transform: rotate(45deg); color: #fff; font: 800 13px var(--font); }
.mp em { font-style: normal; margin-top: 4px; background: rgba(0, 0, 0, .74); color: #fff; font: 700 12px var(--font); border-radius: 6px; padding: 2px 7px; white-space: nowrap; }
.mp:hover i, .mp:focus-visible i { transform: rotate(-45deg) scale(1.2); }
.k-head { flex-direction: row; align-items: center; gap: 14px; padding: 0 18px; border-top-width: 1px !important; border-left: 6px solid var(--bwc); background: linear-gradient(90deg, color-mix(in srgb, var(--bwc) 14%, var(--surface)), var(--surface) 70%); }
.k-head .no { width: 34px; height: 34px; border-radius: 50%; background: var(--bwc); color: #fff; display: grid; place-items: center; font: 800 16px var(--font); flex: none; }
.k-head .hx { min-width: 0; }
.k-head h2 { margin: 0; font: 800 22px/1.15 var(--font-display); color: var(--heading, var(--text)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.k-head small { color: var(--muted); font-size: 13px; }
.k-head .sp { flex: 1; }
.dlbox2 { display: flex; flex-direction: column; gap: 6px; }
.dlbox2 .big { justify-content: center; padding: 11px 14px; font-size: 15.5px; }
.dlbox2 .big small { font-weight: 500; opacity: .85; margin-left: 4px; }
.dlbox2 .sm { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--muted); }
.dlbox2 .sm .fn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dlbox2 .note { font-size: 13px; color: var(--text-2); background: var(--surface-2); border-radius: 10px; padding: 8px 10px; }
.dlbox2 details.note summary { cursor: pointer; font-weight: 700; }
.kt.glow { box-shadow: 0 0 0 3px var(--bwc, var(--accent)), 0 0 28px color-mix(in srgb, var(--bwc, var(--accent)) 55%, transparent); }
.dio-toast { position: fixed; left: 50%; top: 78px; transform: translateX(-50%); z-index: 40; display: flex; gap: 10px; align-items: center; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg); border-radius: 999px; padding: 6px 8px 6px 16px; font: 600 14px var(--font); max-width: calc(100vw - 32px); }
.dio-toast[hidden] { display: none; }
.dio-toast .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--bwc, var(--accent)); flex: none; }
.kt.empty:not(.show) { display: none; }
body.dio-ed .kt.empty, .kt.empty.show { display: flex; }
.kph { flex: 1; display: grid; place-content: center; justify-items: center; gap: 4px; text-align: center; padding: 12px; color: var(--muted); background: repeating-linear-gradient(45deg, transparent 0 10px, color-mix(in srgb, var(--line) 40%, transparent) 10px 20px); }
.kph .emo { font-size: 26px; }
.kph b { color: var(--text-2); }
.kph small { font-size: 12.5px; max-width: 260px; }

/* Gestalten */
.ktool, .rz { display: none; }
.dio-wrap { display: block; }
body.dio-ed .dio-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 22px; align-items: start; }
.dio-pal { position: sticky; top: 130px; display: grid; gap: 12px; }
.dio-pal[hidden] { display: none; }
.dio-pal .card { padding: 14px; }
.pal { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pal button { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 9px 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); color: var(--text); font: 600 12.5px var(--font); text-align: center; cursor: grab; touch-action: none; }
.pal button:hover { border-color: var(--accent); }
.pal button b { font-size: 21px; line-height: 1.1; }
.bwlist { display: grid; gap: 6px; font-size: 13.5px; }
.bwlist .r { display: flex; gap: 8px; align-items: center; padding: 6px 8px; border-radius: 10px; background: var(--surface-2); }
.bwlist i { font-style: normal; width: 22px; height: 22px; border-radius: 50%; background: var(--bwc); color: #fff; display: grid; place-items: center; font: 800 12px var(--font); flex: none; }
.bwlist .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bwlist small { color: var(--muted); }
.bwlist button { border: 0; background: none; cursor: pointer; padding: 2px 4px; border-radius: 6px; color: var(--text-2); }
.bwlist button:hover { background: var(--surface); }
.bwlist .ord { display: grid; flex: none; margin: -3px 0; }
.bwlist .ord button { padding: 0 4px; font-size: 11px; line-height: 1.2; }
.bwlist .ord button:disabled { opacity: .25; cursor: default; background: none; }
body.dio-ed .kg { background-image: linear-gradient(to right, color-mix(in srgb, var(--accent) 16%, transparent) 1px, transparent 1px); background-size: calc((100% + 14px) / 12) 100%; outline: 2px dashed color-mix(in srgb, var(--accent) 30%, transparent); outline-offset: 6px; border-radius: 6px; min-height: 300px; padding-bottom: 54px; }
body.dio-ed .kt { user-select: none; }
body.dio-ed .kt > .bd { padding-top: 42px; }
body.dio-ed .k-head { padding-top: 26px; }
body.dio-ed .ktool { display: flex; position: absolute; left: 8px; top: 8px; z-index: 5; gap: 4px; align-items: center; max-width: calc(100% - 16px); }
body.dio-ed .bwtag { display: none; }
.ktool > * { background: rgba(20, 24, 36, .86); color: #fff; border: 0; border-radius: 7px; padding: 0 8px; font: 600 12px/24px var(--font); height: 24px; white-space: nowrap; cursor: pointer; }
.ktool .mv { cursor: grab; touch-action: none; font-size: 15px; }
.ktool .kty { cursor: default; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.ktool .bwsel { background: var(--bwc, #5b6a85); max-width: 160px; padding: 0 8px; -webkit-appearance: none; appearance: none; line-height: normal; color: #fff; min-width: 0; text-overflow: ellipsis; }
.ktool .bwsel option { background: var(--surface); color: var(--text); }
body.dio-ed .rz { display: block; position: absolute; z-index: 5; background: var(--accent); border-radius: 6px; touch-action: none; opacity: .75; }
body.dio-ed .kt:hover .rz, body.dio-ed .kt.sel .rz { opacity: 1; }
.rz-r { right: 0; top: 50%; transform: translateY(-50%); width: 8px; height: 44px; cursor: ew-resize; }
.rz-b { bottom: 0; left: 50%; transform: translateX(-50%); height: 8px; width: 44px; cursor: ns-resize; }
.rz-c { right: 2px; bottom: 2px; width: 16px; height: 16px; background: none !important; border-right: 4px solid var(--accent); border-bottom: 4px solid var(--accent); border-radius: 0 0 6px 0 !important; cursor: nwse-resize; }
body.dio-ed .kt.sel { outline: 3px solid var(--accent); outline-offset: 2px; z-index: 3; }
body.dio-ed .kt.drag { opacity: .85; z-index: 6; box-shadow: var(--shadow-lg); }
body.dio-ed .kt a, body.dio-ed .kt input[type=range] { pointer-events: none; }
.kghost { border: 2px dashed var(--accent); border-radius: 16px; background: color-mix(in srgb, var(--accent) 10%, transparent); pointer-events: none; z-index: 1; }
.ksize { position: fixed; z-index: 60; background: var(--accent); color: #fff; font: 700 12px var(--font); border-radius: 8px; padding: 3px 8px; pointer-events: none; }
body.dio-ed .jump, body.dio-ed .di-hero .row > :not([data-k]) { pointer-events: none; }
.dio-bar .dio-state { font-size: 13px; opacity: .85; }
/* Dialoge beim Gestalten */
.kdlg { border: 1px solid var(--line); border-radius: 18px; padding: 0; width: min(980px, calc(100vw - 24px)); max-height: calc(100vh - 40px); background: var(--surface); color: var(--text); box-shadow: 0 30px 80px rgba(0, 0, 0, .35); }
.kdlg::backdrop { background: rgba(10, 14, 24, .55); }
.kdlg.small { width: min(520px, calc(100vw - 24px)); }
.kdlg form { display: flex; flex-direction: column; max-height: calc(100vh - 40px); }
.kdlg .hd { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.kdlg .hd b { font: 800 18px var(--font-display); flex: 1; }
.kdlg .bdy { padding: 16px 18px; overflow: auto; display: grid; gap: 12px; }
.kdlg .ft { display: flex; gap: 8px; justify-content: flex-end; padding: 12px 18px; border-top: 1px solid var(--line); }
.kdlg label.f { display: grid; gap: 5px; font-weight: 600; font-size: 14px; }
.kdlg label.f small { color: var(--muted); font-weight: 500; }
.kdlg textarea { min-height: 220px; font: 14px/1.5 var(--font-mono, monospace); }
.kpick { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; max-height: 320px; overflow: auto; padding: 2px; }
.kpick button { position: relative; border: 2px solid transparent; border-radius: 10px; padding: 0; overflow: hidden; background: var(--surface-2); cursor: pointer; aspect-ratio: 4 / 3; }
.kpick button img { width: 100%; height: 100%; object-fit: cover; display: block; }
.kpick button.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.kpick button .n { position: absolute; top: 4px; left: 4px; background: var(--accent); color: #fff; border-radius: 999px; font: 800 11px/18px var(--font); min-width: 18px; padding: 0 5px; }
.kpick .up2 { display: grid; place-items: center; border: 2px dashed var(--line); border-radius: 10px; color: var(--muted); font: 600 12.5px var(--font); text-align: center; cursor: pointer; aspect-ratio: 4 / 3; position: relative; padding: 6px; }
.kpick .up2 input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.kpick .up2:hover { border-color: var(--accent); color: var(--accent); }
.kmap { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.krows { display: grid; grid-template-columns: 1fr 1.4fr 34px; gap: 6px; align-items: center; }
.krows input { min-width: 0; }
.kmap .box { position: relative; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); cursor: crosshair; line-height: 0; }
.kmap .box img { width: 100%; display: block; user-select: none; -webkit-user-drag: none; }
.kmap .box .mp { cursor: grab; touch-action: none; }
.kmap .box .mp.on i { box-shadow: 0 0 0 5px color-mix(in srgb, var(--bwc) 40%, transparent), 0 2px 6px rgba(0, 0, 0, .35); }
.kpts { display: grid; gap: 8px; max-height: 460px; overflow: auto; }
.kpt { border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; display: grid; gap: 6px; font-size: 13.5px; }
.kpt.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.kpt .r { display: flex; gap: 8px; align-items: center; }
.kpt i { font-style: normal; width: 24px; height: 24px; border-radius: 50%; background: var(--bwc); color: #fff; display: grid; place-items: center; font: 800 12px var(--font); flex: none; }
.kpt input, .kpt select { flex: 1; min-width: 0; padding: 5px 8px; font-size: 13px; }
.kcolors { display: flex; gap: 8px; flex-wrap: wrap; }
.kcolors label { width: 30px; height: 30px; border-radius: 50%; background: var(--c); cursor: pointer; display: grid; place-items: center; }
.kcolors input { position: absolute; opacity: 0; pointer-events: none; }
.kcolors label:has(input:checked) { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--c); }
@media (max-width: 1100px) { body.dio-ed .dio-wrap { grid-template-columns: minmax(0, 1fr) 210px; } }
@media (max-width: 760px) {
  .kg { display: flex; flex-direction: column; gap: 12px; }
  .bwframe { display: none; }
  .kt { min-height: 0; }
  .k-img, .k-cmp, .k-gal, .k-video, .k-map { aspect-ratio: var(--ar); max-height: 75vh; }
  .k-head { padding: 12px 14px; }
  .k-head h2 { font-size: 18px; white-space: normal; }
  .k-text .bd, .k-dl .bd, .k-facts .bd, .k-mods .bd { overflow: visible; }
  body.dio-ed .dio-wrap { display: block; }
  body.dio-ed .rz, body.dio-ed .ktool .mv { display: none; }
  body.dio-ed .dio-pal { position: static; margin-top: 16px; }
  .kmap { grid-template-columns: 1fr; }
}

/* ==========================================================================================================
   Update 106: Arten, eigener Hintergrund je Diorama, neue Kacheln (Zahlen, Bild mit Hinweisen, Zeitleiste, 360°-Panorama)
   ========================================================================================================== */
.di-kinds, .di-bgmodes { display: flex; flex-wrap: wrap; gap: 6px; }
.di-kinds label, .di-bgmodes label { position: relative; cursor: pointer; }
.di-kinds input, .di-bgmodes input, .di-bgpick input { position: absolute; opacity: 0; pointer-events: none; }
.di-kinds span, .di-bgmodes span { display: inline-flex; gap: 6px; align-items: center; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2); font: 600 13.5px var(--font); }
.di-kinds input:checked + span, .di-bgmodes input:checked + span { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, var(--surface)); color: var(--accent); }
.di-kinds input:focus-visible + span, .di-bgmodes input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.di-bgopt { display: grid; gap: 8px; }
.di-bgopt[hidden] { display: none; }
.di-bgpick { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; }
.di-bgpick label { position: relative; cursor: pointer; border-radius: 10px; overflow: hidden; border: 3px solid transparent; aspect-ratio: 4 / 3; }
.di-bgpick img { width: 100%; height: 100%; object-fit: cover; display: block; }
.di-bgpick label:has(input:checked) { border-color: var(--accent); }
.di-bgpick label:has(input:focus-visible) { outline: 2px solid var(--accent); }

/* Eigener Hintergrund: liegt hinter der Seite, wahlweise unscharf und abgedunkelt */
.dio-bg { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; background-size: cover; background-position: center; }
.dio-bg.scroll { position: absolute; height: 100%; min-height: 100vh; }
.dio-bg[style*="--bgblur:0px"] { filter: none; }
.dio-bg:not([style*="--bgblur:0px"]) { inset: calc(var(--bgblur) * -2); filter: blur(var(--bgblur)); }
.dio-bg::after { content: ""; position: absolute; inset: 0; background: rgb(0 0 0 / var(--bgdim)); }
body:has(.dio-bg) .crumbs, body:has(.dio-bg) .jump { background: var(--glass, rgba(255, 255, 255, .8)); backdrop-filter: blur(10px); border-radius: 999px; padding: 6px 14px; width: fit-content; max-width: 100%; }
.kg.glass .kt { background: color-mix(in srgb, var(--surface) 72%, transparent); backdrop-filter: blur(14px) saturate(1.2); }
.kg.glass .k-head { background: linear-gradient(90deg, color-mix(in srgb, var(--bwc) 22%, transparent), color-mix(in srgb, var(--surface) 70%, transparent) 70%); }

/* Zahlen */
.knum { display: flex; flex-direction: column; justify-content: center; }
.knum .nums { display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); gap: 10px; }
.knum .nums.n1 { --n: 1; } .knum .nums.n2 { --n: 2; } .knum .nums.n4 { --n: 4; } .knum .nums.n5 { --n: 5; } .knum .nums.n6 { --n: 6; }
.knum .nums > div { display: grid; justify-items: center; text-align: center; gap: 2px; padding: 8px 4px; border-radius: 12px; background: color-mix(in srgb, var(--bwc, var(--accent)) 9%, transparent); }
.knum b { font: 800 clamp(22px, 3.2vw, 36px)/1.05 var(--font-display); color: var(--bwc, var(--accent)); font-variant-numeric: tabular-nums; }
.knum span { font-size: 13px; color: var(--text-2); }
.kt.has-bw > .knum { padding-top: 34px; }

/* Bild mit Hinweisen */
.k-hot { container-type: size; }
.khot { position: absolute; inset: 0; display: grid; place-items: center; background: var(--surface-2); }
.khot .hin { position: relative; line-height: 0; }
.khot img { display: block; max-width: 100cqw; max-height: 100cqh; }
.khot .hp { position: absolute; transform: translate(-50%, -50%); width: 30px; height: 30px; border-radius: 50%; border: 3px solid #fff; background: var(--bwc, var(--accent)); color: #fff; font: 800 13px var(--font); display: grid; place-items: center; cursor: pointer; box-shadow: 0 2px 8px rgba(0, 0, 0, .4); z-index: 2; padding: 0; }
.khot .hp::before { content: ""; position: absolute; inset: -7px; border-radius: 50%; border: 2px solid #fff; opacity: .7; animation: hp-pulse 2.2s ease-out infinite; }
.khot .hp[aria-expanded=true] { transform: translate(-50%, -50%) scale(1.15); }
@keyframes hp-pulse { from { transform: scale(.8); opacity: .8; } to { transform: scale(1.5); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .khot .hp::before { animation: none; } }
.khot .hbub { position: absolute; left: calc(var(--x) * 1%); top: calc(var(--y) * 1%); transform: translate(-50%, 22px); z-index: 3; width: max-content; max-width: min(260px, 80cqw); line-height: 1.4; background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 9px 12px; font-size: 13.5px; text-align: left; }
.khot .hbub.left { transform: translate(calc(-100% + 20px), 22px); }
.khot .hbub.right { transform: translate(-20px, 22px); }
.khot .hbub.up { transform: translate(-50%, calc(-100% - 22px)); }
.khot .hbub.up.left { transform: translate(calc(-100% + 20px), calc(-100% - 22px)); }
.khot .hbub.up.right { transform: translate(-20px, calc(-100% - 22px)); }
.khot .hbub b { display: block; font-size: 14px; margin-bottom: 2px; }
.khot .hbub p { margin: 0; color: var(--text-2); }
.kmap .hp2 i { border-radius: 50%; transform: none; background: var(--accent); }
.kmap .hp2 i span { transform: none; }
.kmap .hp2 { transform: translate(-50%, -50%); }
.kpt textarea { width: 100%; margin-top: 6px; font: inherit; font-size: 13px; border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; background: var(--surface); color: var(--text); resize: vertical; }

/* Zeitleiste */
.ktime { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--surface-2); }
.ktime .tview { position: relative; flex: 1; min-height: 0; }
.ktime .tstep { position: absolute; inset: 0; margin: 0; opacity: 0; transition: opacity .45s; }
.ktime .tstep.on { opacity: 1; }
.ktime .tstep img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ktime figcaption { position: absolute; left: 10px; bottom: 10px; max-width: calc(100% - 20px); background: rgba(0, 0, 0, .66); color: #fff; font-size: 13px; border-radius: 10px; padding: 5px 10px; }
.ktime figcaption b { margin-right: 6px; }
.ktime .ttl { position: absolute; left: 10px; top: 10px; background: rgba(0, 0, 0, .62); color: #fff; font: 700 12.5px var(--font); border-radius: 999px; padding: 3px 10px; }
.kt.has-bw .ktime .ttl { top: 34px; }
.ktime .tline { display: flex; gap: 0; padding: 10px 14px 8px; overflow-x: auto; position: relative; background: var(--surface); }
.ktime .tline::before { content: ""; position: absolute; left: 24px; right: 24px; top: 17px; height: 3px; background: var(--line); border-radius: 2px; }
.ktime .tline button { position: relative; flex: 1 0 70px; display: grid; justify-items: center; gap: 4px; background: none; border: 0; cursor: pointer; padding: 0 4px; color: var(--muted); font: 600 12px var(--font); }
.ktime .tline i { width: 14px; height: 14px; border-radius: 50%; background: var(--surface); border: 3px solid var(--line); transition: transform .2s; }
.ktime .tline button[aria-selected=true] { color: var(--text); }
.ktime .tline button[aria-selected=true] i { border-color: var(--bwc, var(--accent)); background: var(--bwc, var(--accent)); transform: scale(1.25); }
.ktime .tline span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 110px; }
.ksteps { display: grid; gap: 8px; margin-top: 10px; }
.kst { display: grid; grid-template-columns: 64px 22px 1fr 1.6fr; gap: 8px; align-items: center; }
.kst img { width: 64px; height: 44px; object-fit: cover; border-radius: 6px; }
.kst .n { font: 800 13px var(--font); color: var(--muted); }
.kst input { min-width: 0; }

/* 360°-Panorama: Bild läuft endlos rundherum */
.kpano { position: absolute; inset: 0; background: var(--pano) repeat-x 0 50% / auto 100%; cursor: grab; touch-action: pan-y; outline-offset: -3px; }
.kpano.grab { cursor: grabbing; }
.kpano .pv { position: absolute; right: 10px; top: 10px; background: rgba(0, 0, 0, .6); color: #fff; font: 700 12px var(--font); border-radius: 999px; padding: 3px 10px; pointer-events: none; }
.kt.has-bw .kpano .pv { top: 34px; }

/* 3D-Modell (Update 107): <model-viewer> füllt die Kachel, Hinweis oben rechts wie beim Panorama */
.k-model { background: radial-gradient(ellipse at 50% 30%, color-mix(in srgb, var(--surface) 75%, #9fb3d6), color-mix(in srgb, var(--surface) 55%, #2a3550)); }
.k3d { position: absolute; inset: 0; width: 100%; height: 100%; --poster-color: transparent; --progress-bar-color: var(--accent); outline-offset: -3px; }
.k-model .pv { position: absolute; right: 10px; top: 10px; background: rgba(0, 0, 0, .6); color: #fff; font: 700 12px var(--font); border-radius: 999px; padding: 3px 10px; pointer-events: none; z-index: 1; }
.kt.has-bw.k-model .pv { top: 34px; }
.k-model .kcap { z-index: 1; }
.k3dup { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.k3dup .up2 { cursor: pointer; }
.k3dup input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.k3dlist { display: flex; gap: 6px; flex-wrap: wrap; }
.k3dlist button.on { outline: 2px solid var(--accent); }
.kfrow { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 520px) { .kfrow { grid-template-columns: 1fr; } }
/* Hintergrund der 3D-Kachel (Update 108) */
.k3bg { position: absolute; inset: 0; pointer-events: none; }
.k3bg.b-hell { background: radial-gradient(ellipse at 50% 35%, #ffffff, #dfe5ee); }
.k3bg.b-dunkel { background: radial-gradient(ellipse at 50% 35%, #3a4152, #12151c); }
.k3bg.b-farbe { background: radial-gradient(ellipse at 50% 35%, color-mix(in srgb, var(--mbg) 80%, #fff), var(--mbg) 70%); }
.k3bg.b-bild { background: var(--mbg) center / cover no-repeat; }
/* 360°: das Rundumbild liegt hinter dem Modell und wandert beim Drehen mit (public/dioramen.js), das Licht bleibt neutral */
.k3bg.b-pano { background: var(--mbg) 0 50% / auto 150% repeat-x; }
.k3bg.b-weltall { background:
  radial-gradient(1px 1px at 12% 18%, #fff, transparent), radial-gradient(1px 1px at 33% 72%, #dfe8ff, transparent), radial-gradient(1.5px 1.5px at 57% 31%, #fff, transparent),
  radial-gradient(1px 1px at 78% 12%, #fff, transparent), radial-gradient(1px 1px at 88% 64%, #cfe0ff, transparent), radial-gradient(1.5px 1.5px at 22% 48%, #fff, transparent),
  radial-gradient(1px 1px at 46% 88%, #fff, transparent), radial-gradient(1px 1px at 67% 54%, #fff, transparent), radial-gradient(1px 1px at 5% 85%, #fff, transparent),
  radial-gradient(1px 1px at 95% 35%, #fff, transparent), radial-gradient(1.5px 1.5px at 40% 8%, #ffe9c7, transparent), radial-gradient(1px 1px at 73% 93%, #fff, transparent),
  radial-gradient(ellipse at 85% 110%, rgba(214, 120, 64, .55), transparent 45%),
  radial-gradient(ellipse at 20% 0%, rgba(80, 90, 170, .35), transparent 55%),
  linear-gradient(#070a18, #121735); background-size: 220px 220px, 260px 260px, 300px 300px, 240px 240px, 280px 280px, 320px 320px, 200px 200px, 340px 340px, 230px 230px, 270px 270px, 310px 310px, 250px 250px, 100% 100%, 100% 100%, 100% 100%; }
.k3bgpick { display: flex; gap: 6px; flex-wrap: wrap; }
.k3bgpick button { width: 64px; height: 44px; border-radius: 8px; border: 1px solid var(--line); font: 600 11px var(--font); color: #fff; text-shadow: 0 1px 2px #000; display: flex; align-items: flex-end; justify-content: center; padding: 3px; cursor: pointer; }
.k3bgpick button.on { outline: 3px solid var(--accent); outline-offset: 1px; }
.k3bgpick .b-standard { background: radial-gradient(ellipse at 50% 30%, color-mix(in srgb, var(--surface) 75%, #9fb3d6), color-mix(in srgb, var(--surface) 55%, #2a3550)); }
.k3bgpick .b-hell { background: #eef1f6; color: #223; text-shadow: none; }
.k3bgpick .b-dunkel { background: #1b1f28; }
.k3bgpick .b-weltall { background: radial-gradient(1px 1px at 20% 30%, #fff, transparent), radial-gradient(1px 1px at 70% 60%, #fff, transparent), radial-gradient(1px 1px at 45% 15%, #fff, transparent), linear-gradient(#070a18, #121735); }
.k3bgpick .b-farbe { background: conic-gradient(#d8432f, #e07a12, #5f8f10, #0f9488, #1d5fd1, #7a4cc2, #d63384, #d8432f); }
.k3bgpick .b-bild { background: linear-gradient(135deg, #7aa7d9, #c9a46b); }
.k3bgpick .b-pano { background: linear-gradient(90deg, #6aa0d8, #9cc48a, #e3c58d, #6aa0d8); }
.k3bgopt { display: flex; flex-direction: column; gap: 6px; }
.k3bgopt[hidden] { display: none; }
.k3bgopt input[type=color] { width: 64px; height: 36px; border: 0; padding: 0; background: none; }

/* Datei-Download (Update 108): kleine Kachel mit Bild oder Symbol, Titel, Eckdaten und Download-Knopf; --fc = eigene Farbe */
.kfile { --fc: var(--accent); position: absolute; inset: 0; display: flex; flex-direction: column; }
.kfile .fpic { position: relative; flex: 1 1 40%; min-height: 80px; display: grid; place-items: center; background: radial-gradient(ellipse at 50% 30%, color-mix(in srgb, var(--fc) 30%, var(--surface)), color-mix(in srgb, var(--fc) 14%, var(--surface))); overflow: hidden; }
.kfile .fpic.img { background: radial-gradient(ellipse at 50% 30%, #2c3550, #0d1120); }
.kfile .fpic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 6px; }
.kfile .fpic span { font-size: 46px; line-height: 1; }
.kfile .fbd { flex: 0 0 auto; padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 6px; min-width: 0; border-top: 3px solid var(--fc); }
.kfile h3 { margin: 0; font-size: 15.5px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kfile .fmeta { display: flex; flex-wrap: wrap; gap: 4px; font-size: 11.5px; color: var(--muted); min-width: 0; }
.kfile .fmeta span { background: color-mix(in srgb, var(--text) 8%, transparent); border-radius: 999px; padding: 1px 7px; }
.kfile .fmeta .fn { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kfile .fdesc { margin: 0; font-size: 12.5px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.kt .kfile .pill.pri { justify-content: center; background: linear-gradient(180deg, color-mix(in srgb, var(--fc) 82%, #fff), var(--fc)); border-color: var(--fc); }
.kfile .pri small { font-weight: 500; opacity: .85; margin-left: 3px; }
.kfile .fto { align-self: center; }

@media (max-width: 760px) {
  .k-hot, .k-time, .k-pano, .k-model { aspect-ratio: var(--ar); max-height: 75vh; }
  .k-file { min-height: 320px; }
  .k-time { min-height: 300px; }
  .knum .nums { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kst { grid-template-columns: 54px 1fr; }
  .kst .n { display: none; }
}

/* ==========================================================================================================
   Update 100: Aussehen der Seite (src/look.js schreibt die Variablen, public/v3-look.js und v3-look-edit.js)
   Ohne Einstellungen bleibt alles wie vorher: jede Variable hat den bisherigen Wert als Ersatz.
   ========================================================================================================== */
/* Hintergrund-Ebene hinter der Seite: Bild (oder Farbe), Regler als Filter, Schleier darüber */
.lk-bg { position: var(--lk-attach, fixed); left: 0; right: 0; top: 0; height: 100vh; z-index: -1; pointer-events: none; overflow: hidden; }
body.framed .lk-bg { display: none; }
.lk-bg > i {
  position: absolute; inset: calc(var(--lk-blur, 0px) * -2); background: var(--lk-img, none) var(--lk-pos, 50% 50%) / var(--lk-size, cover) var(--lk-rep, no-repeat);
  opacity: var(--lk-op, 1); filter: blur(var(--lk-blur, 0px)) brightness(var(--lk-bright, 1)) saturate(var(--lk-sat, 1)); transition: opacity 1.8s ease;
}
.lk-bg > i.lk-slide { opacity: 0; }
.lk-bg > i.lk-slide.on { opacity: var(--lk-op, 1); }
.lk-bg::after { content: ""; position: absolute; inset: 0; background: var(--lk-veil, transparent); }
html.lk-t-e .lk-daytime .lk-bg > i.base { background-image: var(--lk-img-e, var(--lk-img, none)); }
html.lk-t-n .lk-daytime .lk-bg > i.base { background-image: var(--lk-img-n, var(--lk-img-e, var(--lk-img, none))); }

/* Kacheln und Kästen als Milchglas, Begrüßung als Tafel, Überschriften mit Schein, wenn ein Bild dahinter liegt */
.tile, .gc, .card, .pc, .list, .du-item, .rc, .hit, .dc, .v3-side .grp { background-color: var(--lk-card, var(--surface)); backdrop-filter: var(--lk-bf, none); -webkit-backdrop-filter: var(--lk-bf, none); }
.box { background: var(--lk-card, var(--glass)); backdrop-filter: var(--lk-bf, none); -webkit-backdrop-filter: var(--lk-bf, none); }
.v3-hero { background: var(--lk-hero-bg, none); padding: var(--lk-hero-pad, 30px 0 6px); margin-top: var(--lk-hero-mt, 0); border: var(--lk-hero-bd, 0); border-radius: var(--radius); backdrop-filter: var(--lk-bf, none); -webkit-backdrop-filter: var(--lk-bf, none); }
.dd-hero { background: var(--lk-hero-bg, none); padding: var(--lk-hero-pad, 28px 0 6px); margin-top: var(--lk-hero-mt, 0); border: var(--lk-hero-bd, 0); border-radius: var(--radius); backdrop-filter: var(--lk-bf, none); -webkit-backdrop-filter: var(--lk-bf, none); }
.page-h, .page-sub, .dd-shelf .hd, .v3-main > h1, .v3-main > h2, .v3-main > p, .v3-content > h2, .v3-content > p, .v3-crumb, .di-bar, .cl-entry > h2 { text-shadow: var(--lk-halo, none); }

/* Kopfleiste: Deckkraft, Symbol, Titel, Untertitel, Schnellwahl */
.v3-top, .v3-foot { background: var(--lk-barbg, var(--glass)); }
.lk-bar-static .v3-top { position: relative; }
.lk-bar-shrink .v3-top { transition: padding .2s ease; }
.lk-bar-shrink.lk-small .v3-top { padding-top: 6px; padding-bottom: 6px; }
.lk-bar-shrink.lk-small .v3-logo .tt small { display: none; }
.v3-logo .mk { width: var(--lk-mk, 30px); height: var(--lk-mk, 30px); border-radius: var(--lk-mkr, 8px); background: var(--lk-mkbg, linear-gradient(180deg, #5fa3ff, #1d5fd1)); font-size: calc(var(--lk-mk, 30px) * .53); overflow: hidden; }
.v3-logo .mk.lk-k-letters { font: 800 calc(var(--lk-mk, 30px) * .46) / 1 var(--font-display); letter-spacing: -.02em; }
.v3-logo .mk.lk-k-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.v3-logo .mk.lk-free { box-shadow: none; }
.v3-logo .mk.lk-free.lk-k-image img { object-fit: contain; }
.v3-logo .mk.lk-free.lk-k-emoji { font-size: calc(var(--lk-mk, 30px) * .85); filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .2)); }
.v3-logo .tt { display: grid; line-height: 1.08; min-width: 0; }
.v3-logo .tt b { font: 800 var(--lk-tsize, 19px) / 1.1 var(--lk-tfont, var(--font)); color: var(--lk-tcol, var(--heading)); letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; }
.lk-tgrad .v3-logo .tt b { background: var(--lk-tgrad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.v3-logo .tt small { font: 600 12px var(--font); color: var(--muted); letter-spacing: .02em; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; }
.v3-quick { display: flex; gap: 2px; min-width: 0; }
.v3-quick a { font-size: 14px; color: var(--text-2) !important; padding: 6px 10px; border-radius: 999px; white-space: nowrap; text-decoration: none !important; }
.v3-quick a:hover { background: var(--accent-soft); }
.v3-quick a.on { background: var(--accent-soft); color: var(--accent) !important; font-weight: 700; }
.lk-nosearch .v3-search { display: none; }
.lk-nosearch .v3-me { margin-left: auto; }
@media (max-width: 1420px) { .v3-quick a .qn { display: none; } .v3-quick a { padding: 6px 8px; font-size: 16px; } }
@media (max-width: 1100px) { .v3-quick { display: none; } }
body.lk-drawer .v3-quick a .qn { display: none; }

/* Hinweis-Leiste ganz oben */
.lk-notice { display: flex; align-items: center; gap: 10px; padding: 8px clamp(16px, 4vw, 40px); font-size: 14px; font-weight: 600; background: var(--accent); color: #fff; }
.lk-notice.t-warn { background: #e0a100; color: #2b1d00; }
.lk-notice.t-ok { background: #2f8f3a; }
.lk-notice span { flex: 1; min-width: 0; }
.lk-notice button { border: 0; background: rgba(0, 0, 0, .15); color: inherit; border-radius: 999px; width: 26px; height: 26px; cursor: pointer; font: inherit; flex: none; }

/* Begrüßung je Tageszeit (Startseite) und eigener Text in der Fußzeile */
.lk-greet { font: 700 14px var(--font); color: var(--accent); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px; }
.v3-foot .lk-own { color: var(--text-2); font-weight: 600; }
.v3-foot .lk-fx { display: inline-flex; gap: 6px; align-items: center; }

/* Stil: Abstände, Ecken, Spalten, Schriftgröße */
.v3-main { zoom: var(--lk-zoom, 1); }
.tiles { gap: var(--lk-gap, 16px); }
.dd-grid { gap: var(--lk-gap, 14px); }
.tile { border-radius: calc(var(--lk-r, 16px) + 2px); }
.gc, .box, .du-item { border-radius: var(--lk-r, 14px); }
.hit { border-radius: var(--lk-r, 12px); }
.dc, .rc { border-radius: calc(var(--lk-r, 16px) + 2px); }
.rc { border-radius: var(--lk-r, 16px); }
@media (min-width: 901px) {
  .lk-cols-2 .tiles { grid-template-columns: repeat(2, 1fr); }
  .lk-cols-2 .tile { grid-column: span 1; }
  .lk-cols-2 .tile.wide { grid-column: span 2; }
  .lk-cols-4 .tiles { grid-template-columns: repeat(4, 1fr); }
  .lk-cols-4 .tile { grid-column: span 1; }
  .lk-cols-4 .tile.wide { grid-column: span 2; }
  .lk-cols-auto .tiles { grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); }
  .lk-cols-auto .tile { grid-column: span 1; }
  .lk-cols-auto .tile.wide { grid-column: span 2; }
}

/* Kachelstil: Glanz (wie bisher), Flach, Glas, Umriss; dazu „alle Kacheln in der Akzentfarbe“ */
.c-desk { --tc: var(--c-desk); } .c-dl { --tc: var(--c-dl); } .c-du { --tc: var(--c-du); } .c-de { --tc: var(--c-de); }
.c-fs { --tc: var(--c-fs); } .c-x { --tc: var(--c-x); } .c-gray { --tc: var(--c-gray); } .c-di { --tc: var(--c-di); }
.gc { --tc: var(--dd, var(--c-x)); }
.lk-onecolor .tile { --tc: var(--lk-tilebg); }
.lk-onecolor .tile .band { background: var(--lk-tilebg); }
.lk-tile-flat .tile .band::after, .lk-tile-flat .gc .cv::after { display: none; }
.lk-tile-flat .tile .band h2, .lk-tile-flat .tile .band .e { text-shadow: none; filter: none; }
.lk-tile-glass .tile .band, .lk-tile-glass .gc:not(.has-cover) .cv { background: none; }
.lk-tile-glass .tile .band::before, .lk-tile-glass .gc:not(.has-cover) .cv::before { content: ""; position: absolute; inset: 0; background: var(--tc); opacity: .7; }
.lk-tile-glass .tile .band::after, .lk-tile-glass .gc .cv::after { inset: 0 0 60% 0; }
.lk-tile-outline .tile, .lk-tile-outline .gc { border: 2px solid transparent; background: linear-gradient(var(--lk-card, var(--surface)), var(--lk-card, var(--surface))) padding-box, var(--tc) border-box; }
.lk-tile-outline .tile .band, .lk-tile-outline .gc:not(.has-cover) .cv { background: none; color: var(--heading); }
.lk-tile-outline .tile .band::after, .lk-tile-outline .gc .cv::after { display: none; }
.lk-tile-outline .tile .band h2 { color: var(--heading); text-shadow: none; }
.lk-tile-outline .tile .band small { color: var(--muted); }
.lk-tile-outline .tile .lock { background: var(--surface-3); color: var(--text-2); }

/* Jahreszeiten-Deko */
.lk-deko { position: fixed; inset: 0; pointer-events: none; z-index: 25; }

/* Mein Hintergrund (Mitglieder) */
dialog.lk-mine-dlg { border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); width: min(560px, calc(100vw - 32px)); }
dialog.lk-mine-dlg::backdrop { background: rgba(10, 20, 40, .35); }
.lk-mine-dlg h2 { margin: 0 0 4px; font-size: 19px; }
.lk-mine-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; margin: 12px 0; }
.lk-mine-grid button { aspect-ratio: 16 / 10; border-radius: 10px; border: 2px solid transparent; box-shadow: 0 0 0 1px var(--line); background: var(--surface-2) center / cover; cursor: pointer; font: 600 12px var(--font); color: var(--text-2); }
.lk-mine-grid button.on { border-color: var(--surface); box-shadow: 0 0 0 3px var(--accent); }

/* Handy: lange Titel in „Zuletzt neu“ und „Vom Desktop“ schieben die Seite nicht mehr zur Seite */
.strip > .box { min-width: 0; }
@media (max-width: 900px) { .strip { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) {
  .v3-logo .tt small { display: none; }
  .v3-hero, .dd-hero { padding: var(--lk-hero-pad-m, var(--lk-hero-pad, 30px 0 6px)); }
  .lk-bg > i { background-position: var(--lk-pos, 50% 50%); }
}
@media (prefers-reduced-motion: reduce) { .lk-bg > i { transition: none; } .lk-deko { display: none; } }
@media print { .lk-bg, .lk-notice, .lk-deko { display: none !important; } }
.v3-hero .ed-start-wrap { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.v3-hero .ed-start-wrap .ed-start { margin-left: 0; }
body.editing .v3-hero .ed-start-wrap { display: none; }

/* ---------- Schublade „Aussehen der Seite“ (public/v3-look-edit.js) ---------- */
body.lk-drawer { padding-right: 420px; }
.lk-ax {
  position: fixed; right: 0; top: 0; bottom: 0; width: 420px; z-index: 60; display: flex; flex-direction: column; font-size: 14px;
  background: var(--surface); color: var(--text); border-left: 1px solid var(--line); box-shadow: -12px 0 40px rgba(20, 50, 110, .18);
}
.lk-ax .ah { display: flex; align-items: center; gap: 10px; padding: 14px 16px 10px; }
.lk-ax .ah .emo { font-size: 22px; }
.lk-ax .ah h2 { margin: 0; font: 800 18px var(--font-display); }
.lk-ax .ah .x { margin-left: auto; }
.lk-ax .tabs { display: flex; gap: 4px; padding: 0 12px; border-bottom: 1px solid var(--line); }
.lk-ax .tabs button { padding: 8px 10px; border: 0; background: none; border-radius: 10px 10px 0 0; color: var(--text-2); font: 600 13.5px var(--font); cursor: pointer; }
.lk-ax .tabs button.on { color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 -3px 0 var(--accent); }
.lk-ax .sc { flex: 1; overflow: auto; padding: 14px 16px 18px; display: grid; gap: 14px; align-content: start; }
.lk-ax fieldset { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px 12px; margin: 0; display: grid; gap: 9px; min-width: 0; }
.lk-ax legend { font: 700 12px var(--font); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 0 6px; }
.lk-ax .row { display: grid; grid-template-columns: 104px minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.lk-ax .row > label { color: var(--text-2); }
.lk-ax .row > :nth-child(2):last-child { grid-column: span 2; }
.lk-ax .row > .v { font: 600 12.5px var(--mono); min-width: 48px; text-align: right; }
.lk-ax input[type=range] { width: 100%; accent-color: var(--accent); margin: 0; }
.lk-ax input[type=text], .lk-ax input[type=date] { font: inherit; color: var(--text); background: var(--input); border: 1px solid var(--line); border-radius: 9px; padding: 6px 10px; width: 100%; min-width: 0; }
.lk-ax .idea input[type=text] { margin-top: 6px; }
.lk-ax .seg { display: flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; min-width: 0; }
.lk-ax .seg button { flex: 1; border: 0; border-right: 1px solid var(--line); background: var(--surface); color: var(--text-2); padding: 6px 4px; font: 13px var(--font); cursor: pointer; white-space: nowrap; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.lk-ax .seg button:last-child { border-right: 0; }
.lk-ax .seg.many { display: grid; grid-template-columns: repeat(3, 1fr); }
.lk-ax .seg.many button { border-bottom: 1px solid var(--line); }
.lk-ax .seg.many button:nth-child(3n) { border-right: 0; }
.lk-ax .seg button.on { background: var(--accent); color: #fff; font-weight: 700; }
.lk-ax .sw, .lk-ax .sw-row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.lk-ax .sw button { width: 26px; height: 26px; border-radius: 8px; border: 2px solid transparent; box-shadow: 0 0 0 1px var(--line); cursor: pointer; padding: 0; }
.lk-ax .sw button.on { border-color: var(--surface); box-shadow: 0 0 0 2px var(--accent); }
.lk-ax .cpick { display: inline-flex; gap: 6px; align-items: center; }
.lk-ax .cpick input[type=color] { width: 34px; height: 28px; border: 1px solid var(--line); border-radius: 8px; padding: 1px; background: var(--input); cursor: pointer; }
.lk-ax .cpick .pill.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.lk-ax .thumbs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; min-width: 0; }
.lk-ax .thumbs.sq { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.lk-ax .thumbs > * { position: relative; aspect-ratio: 16 / 10; border-radius: 8px; border: 2px solid transparent; box-shadow: 0 0 0 1px var(--line); background: var(--surface-2) center / cover; cursor: pointer; padding: 0; display: grid; place-items: center; font: 600 11px var(--font); color: var(--muted); }
.lk-ax .thumbs.sq > * { aspect-ratio: 1; }
.lk-ax .thumbs > .on { border-color: var(--surface); box-shadow: 0 0 0 2px var(--accent); }
.lk-ax .thumbs .up { border: 2px dashed var(--accent-soft-line); box-shadow: none; color: var(--accent); font-size: 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; cursor: pointer; }
.lk-ax .thumbs .up small { font-size: 11px; font-weight: 600; }
.lk-ax .thumbs em { position: absolute; left: 4px; top: 4px; background: var(--accent); color: #fff; font: 700 11px/18px var(--font); min-width: 18px; border-radius: 999px; font-style: normal; }
.lk-ax .thumbs .del { position: absolute; right: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: rgba(0, 0, 0, .55); color: #fff; font-size: 10px; line-height: 18px; display: none; }
.lk-ax .thumbs > :hover .del, .lk-ax .thumbs > :focus-within .del { display: block; }
.lk-ax .sub { display: grid; gap: 6px; min-width: 0; }
.lk-ax .sc > *, .lk-ax fieldset > * { min-width: 0; }
.lk-ax .sub b { font-size: 13px; color: var(--text-2); font-weight: 600; }
.lk-ax .ico { display: grid; grid-template-columns: repeat(8, 1fr); gap: 5px; }
.lk-ax .ico button { aspect-ratio: 1; font-size: 18px; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--line-soft); cursor: pointer; padding: 0; }
.lk-ax .ico button.on { box-shadow: 0 0 0 2px var(--accent); background: var(--accent-soft); }
.lk-ax .chk { display: flex; gap: 8px; align-items: center; color: var(--text-2); }
.lk-ax .chk input { accent-color: var(--accent); width: 16px; height: 16px; margin: 0; flex: none; }
.lk-ax .hint { color: var(--muted); font-size: 12.5px; margin: 0; line-height: 1.4; }
.lk-ax .scope { display: flex; gap: 6px; flex-wrap: wrap; }
.lk-ax .scope button { font: 12.5px var(--font); border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; color: var(--text-2); background: var(--surface-2); cursor: pointer; }
.lk-ax .scope button.inh { border-style: dashed; color: var(--muted); }
.lk-ax .scope button.on { border: 1px solid var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.lk-ax .focus { position: relative; border-radius: 10px; overflow: hidden; aspect-ratio: 16 / 7; background: center / cover; cursor: crosshair; }
.lk-ax .focus i { position: absolute; left: var(--fx, 50%); top: var(--fy, 50%); width: 22px; height: 22px; margin: -11px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 2px rgba(0, 0, 0, .4); pointer-events: none; }
.lk-ax .focus em { position: absolute; left: 8px; bottom: 6px; font: 600 11px var(--font); color: #fff; background: rgba(0, 0, 0, .45); padding: 1px 7px; border-radius: 999px; font-style: normal; pointer-events: none; }
.lk-ax .vl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.lk-ax .vl button { position: relative; border-radius: 10px; overflow: hidden; border: 2px solid transparent; box-shadow: 0 0 0 1px var(--line); background: var(--surface); cursor: pointer; padding: 0; text-align: center; }
.lk-ax .vl button i { display: block; height: 30px; }
.lk-ax .vl button b { display: block; padding: 4px 2px 5px; font: 600 12px var(--font); color: var(--text-2); }
.lk-ax .vl button.on { border-color: var(--surface); box-shadow: 0 0 0 2px var(--accent); }
.lk-ax .vl .del { position: absolute; right: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: rgba(0, 0, 0, .55); color: #fff; font-size: 10px; line-height: 18px; }
.lk-ax .idea { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 8px; align-items: start; padding: 9px 0; border-bottom: 1px solid var(--line-soft); }
.lk-ax .idea:last-child { border-bottom: 0; }
.lk-ax .idea > .emo { font-size: 18px; }
.lk-ax .idea b { display: block; }
.lk-ax .idea p { margin: 2px 0 0; color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.lk-ax .idea .row2 { display: flex; gap: 6px; align-items: center; margin-top: 6px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-2); }
.lk-ax .idea .row2 input[type=date] { width: auto; }
.lk-ax .tg { appearance: none; -webkit-appearance: none; width: 36px; height: 21px; border-radius: 999px; background: var(--line); position: relative; cursor: pointer; margin: 2px 0 0; flex: none; transition: background .15s; }
.lk-ax .tg::after { content: ""; position: absolute; left: 2px; top: 2px; width: 17px; height: 17px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .3); transition: left .15s; }
.lk-ax .tg:checked { background: var(--accent); }
.lk-ax .tg:checked::after { left: 17px; }
.lk-ax .af { display: flex; gap: 8px; align-items: center; padding: 12px 16px; border-top: 1px solid var(--line); background: var(--surface-2); }
.lk-ax .af .sp { flex: 1; color: var(--muted); font-size: 12.5px; }
.lk-ax .af .pri { background: var(--accent); color: #fff; border-color: var(--accent-line); }
@media (max-width: 760px) {
  body.lk-drawer { padding-right: 0; padding-bottom: 62vh; }
  .lk-ax { top: auto; left: 0; width: auto; height: 62vh; border-left: 0; border-top: 1px solid var(--line); border-radius: 16px 16px 0 0; box-shadow: 0 -12px 40px rgba(20, 50, 110, .2); }
}

/* Update 103: Bilder in Texten lassen sich groß ansehen */
.prose img.lb-zoom, .shots a[data-lb], .lb-cover { cursor: zoom-in; }
