/* TSV Feichten – Verwaltung */
:root { --red: #c8102e; --red-dark: #8e0c21; --red-soft: #fbeaec; --blue: #1f6fc0; --blue-soft: #e9f2fb; --ink: #1b1c1f; --ink-2: #4a4d55; --muted: #6f737c; --line: #e3e1dc; --bg: #f4f3f0; --ok: #1d7a46; --warn: #8a6100;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body.admin { margin: 0; font: 15px/1.5 var(--font); color: var(--ink); background: var(--bg); display: flex; min-height: 100vh; }
a { color: var(--red); }
h1 { font-size: 1.7rem; margin: 0 0 .4em; }
h2 { font-size: 1.15rem; margin: 0 0 .7em; }
h3 { font-size: 1rem; margin: 0 0 .6em; }
h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 1.2em 0 .4em; }
.muted { color: var(--muted); } .small { font-size: 13px; } .strong { font-weight: 700; } .mt { margin-top: 1.5rem; }
.hint { color: var(--muted); font-size: 13px; font-weight: 400; margin: 2px 0 8px; }
img { max-width: 100%; }

/* Seitenleiste */
.a-side { width: 236px; flex: none; background: #17181b; color: #c9ccd3; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.a-brand { display: flex; align-items: center; gap: 10px; padding: 18px 18px 14px; color: #fff; text-decoration: none; font-weight: 700; font-size: 16px; }
.a-logo { width: 38px; height: 38px; border-radius: 50%; background: #fff; color: var(--red); border: 3px solid var(--red); display: grid; place-items: center; font: 900 12px "Arial Black", sans-serif; text-decoration: none; }
.a-logo.big { width: 70px; height: 70px; font-size: 20px; margin: 0 auto 14px; }
.a-side nav { display: flex; flex-direction: column; padding: 6px 10px; gap: 2px; flex: 1; overflow: auto; }
.a-side nav a { color: #c9ccd3; text-decoration: none; padding: 9px 12px; border-radius: 8px; font-weight: 500; }
.a-side nav a:hover { background: #24262b; color: #fff; }
.a-side nav a.on { background: var(--red); color: #fff; }
.a-user { border-top: 1px solid #2a2c31; padding: 14px 18px 18px; display: flex; flex-direction: column; gap: 3px; font-size: 13px; }
.a-user strong { color: #fff; font-size: 14px; }
.a-user span { color: #8d929c; margin-bottom: 6px; }
.a-user a, .a-user .linkbtn { color: #c9ccd3; text-decoration: none; text-align: left; }
.a-user a:hover, .a-user .linkbtn:hover { color: #fff; text-decoration: underline; }
.a-main { flex: 1; min-width: 0; padding: 28px clamp(16px, 3vw, 40px) 60px; max-width: 1400px; }
.a-main.center { display: grid; place-items: center; }

/* Karten & Layout */
.card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px; margin-bottom: 18px; }
.card.flush { padding: 0; overflow: hidden; }
.card.narrow, .narrow { max-width: 640px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.head-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .6rem; flex-wrap: wrap; }
.head-row h1 { margin: 0; }
.edit-grid { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 18px; align-items: start; }
.edit-side .card { padding: 18px; }
.sticky { position: sticky; top: 16px; z-index: 2; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.row3 { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 14px; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }

/* Formulare */
label { display: block; font-weight: 600; margin-bottom: 14px; font-size: 14px; }
label.lbl { margin-bottom: 6px; }
input:not([type=checkbox]):not([type=radio]):not([type=file]), select, textarea { display: block; width: 100%; margin-top: 5px; font: inherit; font-weight: 400; padding: 9px 11px; border: 1px solid #cfccc5; border-radius: 8px; background: #fff; color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--blue); outline-offset: 0; border-color: var(--blue); }
textarea { resize: vertical; }
input[type=file] { font-size: 13px; margin-top: 4px; max-width: 100%; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 500; margin: 10px 0; }
.check input { width: 17px; height: 17px; accent-color: var(--red); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 18px; border-radius: 9px; background: var(--red); color: #fff; border: 1px solid var(--red); font: 600 15px var(--font); cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--red-dark); border-color: var(--red-dark); color: #fff; }
.btn-outline { background: #fff; color: var(--ink); border-color: #cfccc5; }
.btn-outline:hover { background: var(--bg); color: var(--ink); border-color: #b9b5ac; }
.btn-danger { background: #fff; color: #b00020; border-color: #e7b3bb; }
.btn-danger:hover { background: #b00020; color: #fff; border-color: #b00020; }
.btn-sm { padding: 6px 12px; font-size: 13.5px; }
.btn-block { width: 100%; margin-bottom: 8px; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--red); cursor: pointer; }
.linkbtn.danger { color: #b00020; }
.icon-btn { background: none; border: 1px solid transparent; border-radius: 6px; width: 30px; height: 30px; cursor: pointer; color: var(--muted); font-size: 14px; }
.icon-btn:hover { background: var(--red-soft); color: var(--red); }
.danger-zone { border-color: #f0d2d6; }
.danger-zone .btn { margin-bottom: 6px; }

/* Meldungen */
.flash { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; background: #e7f5ec; color: var(--ok); border: 1px solid #bfe3cc; }
.flash.error { background: #fdecee; color: #a0001c; border-color: #f2c2c9; }
.flash.warn { background: #fff6dd; color: var(--warn); border-color: #f1dea4; }
.flash.raw { background: #fff6dd; color: #3d2f00; border-color: #f1dea4; font-size: 15px; line-height: 1.8; }
code { background: #fff; border: 1px solid var(--line); padding: 2px 7px; border-radius: 5px; font-size: 14px; }
code.pw { font-size: 17px; font-weight: 700; letter-spacing: .05em; user-select: all; }

/* Login */
.login-box { width: min(400px, 100%); background: #fff; border-radius: 18px; padding: 34px 32px; box-shadow: 0 10px 40px rgba(0,0,0,.08); border-top: 5px solid var(--red); text-align: left; }
.login-box.wide { width: min(500px, 100%); }
.login-box h1 { text-align: center; }
.login-box > p { text-align: center; }
.login-box .btn { width: 100%; padding: 12px; margin-top: 4px; }

/* Listen */
table.list { width: 100%; border-collapse: collapse; }
table.list th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 12px 14px; border-bottom: 1px solid var(--line); background: #faf9f7; }
table.list td { padding: 11px 14px; border-bottom: 1px solid #efede9; vertical-align: top; }
table.list tr:last-child td { border-bottom: 0; }
table.list tr:hover td { background: #fcfbfa; }
table.list a { text-decoration: none; color: var(--ink); }
table.list a:hover { color: var(--red); }
table.list tr.inactive td { opacity: .55; }
.actions { text-align: right; white-space: nowrap; }
.actions a { color: var(--red) !important; margin-left: 12px; font-size: 14px; }
.pill { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: #eceae5; color: var(--ink-2); vertical-align: middle; }
.pill.ok { background: #e2f3e8; color: var(--ok); }
.pill.red { background: var(--red-soft); color: var(--red); }
ul.plain { list-style: none; padding: 0; margin: 0 0 10px; }
ul.plain li { padding: 6px 0; border-bottom: 1px dashed #ebe8e3; }
ul.plain a { text-decoration: none; font-weight: 600; }
ul.tree { list-style: none; margin: 0 0 12px; padding: 0; }
ul.tree li { padding: 5px 0 5px calc(var(--d) * 20px); border-bottom: 1px dashed #ebe8e3; }
ul.tree a { text-decoration: none; color: var(--ink); font-weight: 600; }
ul.tree a:hover { color: var(--red); }

/* Dashboard */
.quick { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin: 18px 0 22px; }
.quick .q { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; text-decoration: none; color: var(--ink); font-weight: 600; transition: .15s; }
.quick .q:hover { border-color: var(--red); box-shadow: 0 4px 14px rgba(0,0,0,.06); }
.quick b { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; background: var(--red-soft); color: var(--red); font-size: 18px; }

/* Bearbeiten */
.thumb-lg { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 8px; margin-bottom: 6px; }
.thumb-lg.contain { object-fit: contain; background: var(--bg); }
table.slots { width: 100%; border-collapse: collapse; margin-bottom: 10px; }
table.slots th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 0 4px 4px; }
table.slots td { padding: 3px 4px; }
table.slots input, table.slots select { margin: 0 !important; padding: 7px 8px !important; }
table.slots td:nth-child(2), table.slots td:nth-child(3) { width: 105px; }
table.slots td:first-child { width: 130px; }

/* Editor */
.ed { border: 1px solid #cfccc5; border-radius: 10px; background: #fff; margin-bottom: 4px; }
.ed:focus-within { border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue); }
.ed-bar { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px; border-bottom: 1px solid var(--line); background: #faf9f7; border-radius: 10px 10px 0 0; position: sticky; top: 0; z-index: 3; }
.ed-grp { display: flex; gap: 1px; padding-right: 6px; margin-right: 2px; border-right: 1px solid var(--line); }
.ed-grp:last-child { border: 0; }
.ed-bar button { background: none; border: 1px solid transparent; border-radius: 6px; padding: 5px 8px; min-width: 32px; cursor: pointer; font: 13.5px var(--font); color: var(--ink); white-space: nowrap; }
.ed-bar button:hover { background: #fff; border-color: var(--line); }
.ed-bar button.on { background: var(--ink); color: #fff; }
.ed-bar.src-mode .ed-grp:not(:last-child) { opacity: .35; pointer-events: none; }
.ed-area { min-height: 340px; max-height: 70vh; overflow: auto; padding: 16px 20px; outline: none; font: 16px/1.6 var(--font); }
.ed-src { width: 100%; min-height: 340px; border: 0 !important; margin: 0 !important; font: 13px/1.5 ui-monospace, Consolas, monospace !important; border-radius: 0 0 10px 10px !important; }
.ed-area h2 { font-size: 1.4rem; margin: 1em 0 .4em; } .ed-area h3 { font-size: 1.15rem; margin: 1em 0 .4em; color: var(--red-dark); }
.ed-area > :first-child { margin-top: 0; }
.ed-area img { max-width: 100%; border-radius: 6px; }
.ed-area table { border-collapse: collapse; width: 100%; }
.ed-area th, .ed-area td { border: 1px solid var(--line); padding: 6px 8px; text-align: left; }
.ed-area th { background: #f1efeb; }
.ed-area blockquote { border-left: 4px solid var(--red); margin: 1em 0; padding: .3em 1em; background: #faf9f7; }
.ed-area .gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 6px; padding: 6px; border: 1px dashed var(--line); }
.ed-area .gallery img { aspect-ratio: 4/3; object-fit: cover; }
.ed-area .box { background: var(--blue-soft); border-left: 4px solid var(--blue); padding: .6em 1em; border-radius: 6px; margin: 1em 0; }

/* Medien */
.upload-zone { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; border-style: dashed; border-width: 2px; }
.upload-zone p { margin: 0; flex-basis: 100%; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.media-item { margin: 0; background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.media-item img, .media-item .file-ico { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: grid; place-items: center; background: var(--bg); }
.file-ico { font: 900 22px "Arial Black", sans-serif; color: var(--red); }
.media-item figcaption { padding: 8px 10px; font-size: 12.5px; display: flex; flex-direction: column; gap: 2px; }
.media-item figcaption > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.media-item form { margin: 0; }
.m-dialog { width: min(820px, 95vw); border: 0; border-radius: 16px; padding: 0; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.m-dialog::backdrop { background: rgba(20,20,22,.55); }
.m-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); margin: 0; }
.m-upload { padding: 14px 18px 0; display: flex; gap: 12px; align-items: center; }
.m-upload label { margin: 0; }
.m-status { color: var(--muted); font-size: 13px; }
.m-dialog .hint { padding: 0 18px; margin-top: 12px; }
.m-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; padding: 6px 18px; max-height: 50vh; overflow: auto; }
.m-tile { border: 3px solid transparent; border-radius: 10px; padding: 0; overflow: hidden; background: var(--bg); cursor: pointer; aspect-ratio: 4/3; display: grid; place-items: center; position: relative; }
.m-tile img { width: 100%; height: 100%; object-fit: cover; }
.m-tile small { font-size: 11px; padding: 0 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.m-tile.on { border-color: var(--red); }
.m-tile.on::after { content: "✓"; position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 50%; background: var(--red); color: #fff; display: grid; place-items: center; font-weight: 700; }
.m-foot { padding: 14px 18px; border-top: 1px solid var(--line); text-align: right; margin-top: 10px; }

/* Rechte */
.role-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.radio-card { display: flex; gap: 10px; align-items: flex-start; border: 2px solid var(--line); border-radius: 12px; padding: 12px 14px; cursor: pointer; font-weight: 400; margin: 0; }
.radio-card:has(input:checked) { border-color: var(--red); background: var(--red-soft); }
.radio-card input { margin-top: 4px; accent-color: var(--red); }
.radio-card strong { display: block; }
.radio-card span { font-size: 13.5px; color: var(--ink-2); }
.perm-tree { columns: 2 260px; column-gap: 24px; }
.perm-tree > .check:first-child, .perm-tree > .hint { column-span: all; }
.perm-tree h4 { break-after: avoid; }
.tree-item { margin: 3px 0 3px calc(var(--d) * 22px); break-inside: avoid; }
.tree-item.implied { color: var(--muted); }
.perm-tree.is-disabled { opacity: .4; pointer-events: none; }

@media (max-width: 1000px) {
  body.admin { flex-direction: column; }
  .a-side { width: auto; height: auto; position: static; }
  .a-side nav { flex-direction: row; flex-wrap: wrap; }
  .a-user { flex-direction: row; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
  .a-user span { margin: 0; }
  .edit-grid, .grid2, .role-pick { grid-template-columns: 1fr; }
  .sticky { position: static; }
}
@media (max-width: 640px) {
  .row2, .row3 { grid-template-columns: 1fr; }
  table.slots, table.slots tbody, table.slots tr, table.slots td { display: block; width: auto !important; }
  table.slots thead { display: none; }
  table.slots tr { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 8px 0; border-bottom: 1px solid var(--line); }
  table.list .actions a { display: block; }
}
.theme-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.theme-card span { font-size: 13.5px; }
.theme-card a { font-weight: 600; }
.swatch { display: flex !important; height: 34px; border-radius: 8px; overflow: hidden; margin-bottom: 8px; }
.swatch i { flex: 1; }
.sw-arena i:nth-child(1) { background: #0f1115; } .sw-arena i:nth-child(2) { background: #d4122f; } .sw-arena i:nth-child(3) { background: #f2f2f0; }
.sw-heimat i:nth-child(1) { background: #fbf6ee; } .sw-heimat i:nth-child(2) { background: #1d5fae; } .sw-heimat i:nth-child(3) { background: #d3263f; }
.sw-klassisch i:nth-child(1) { background: #fff; } .sw-klassisch i:nth-child(2) { background: #c8102e; } .sw-klassisch i:nth-child(3) { background: #1b1c1f; }
@media (max-width: 1100px) { .theme-pick { grid-template-columns: 1fr; } }

/* Branding */
.a-side { background: var(--side, #17181b); }
.a-side nav a:hover { background: var(--side-2, #24262b); }
.a-brand > span:not(.a-logo) { display: flex; flex-direction: column; line-height: 1.15; }
.a-brand small { font-size: 11.5px; font-weight: 500; color: #9aa0aa; }
.a-logo-img { width: 40px; height: 40px; object-fit: contain; background: #fff; border-radius: 50%; padding: 2px; }
.a-logo-img.big { width: 84px; height: 84px; }
.login-logo { display: flex; justify-content: center; margin-bottom: 14px; text-decoration: none; }
.badge { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 999px; background: #fff; color: var(--red); font-size: 11.5px; text-align: center; margin-left: 6px; }
.badge.warn { background: #ffd54a; color: #3d2f00; }
td .badge { background: var(--red); color: #fff; }
.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--line); margin-bottom: 18px; }
.tabs a { padding: 9px 16px; text-decoration: none; color: var(--ink-2); font-weight: 600; border-bottom: 3px solid transparent; margin-bottom: -2px; }
.tabs a.on { color: var(--red); border-color: var(--red); }
.theme-pick { grid-template-columns: repeat(2, 1fr) !important; }
.color-grid { display: grid; gap: 8px; margin-bottom: 16px; }
.color-row { display: flex; align-items: center; gap: 10px; font-weight: 500; margin: 0; }
.color-row input[type=color] { width: 54px !important; height: 34px; padding: 2px !important; margin: 0 !important; display: inline-block !important; cursor: pointer; }
label.color-row { flex-wrap: wrap; }
.live-preview { --color_primary: #d4122f; --color_dark: #0f1115; --color_accent: #2a7fd0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin: 6px 0 12px; }
.lp-head { background: var(--color_dark); color: #fff; display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 4px solid var(--color_primary); }
.lp-logo { width: 26px; height: 26px; border-radius: 50%; background: #fff; border: 3px solid var(--color_primary); }
.lp-nav { margin-left: auto; font-size: 13px; opacity: .8; }
.lp-body { padding: 16px; }
.lp-body h3 { font-family: var(--lp-head); color: var(--color_dark); font-size: 1.4rem; }
.lp-body a { color: var(--color_primary); }
.lp-btn { display: inline-block; background: var(--color_primary); color: #fff; padding: 8px 16px; border-radius: 6px; font-weight: 700; }
.lp-tag { display: inline-block; background: var(--color_accent); color: #fff; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.conflict { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 12px; margin-bottom: 8px; border-radius: 10px; background: #fff6dd; border: 1px solid #f1dea4; flex-wrap: wrap; }
.conflict.ok { background: #f6f5f2; border-color: var(--line); }
.conflict form { margin: 0; }
.occ-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.occ-grid > div { background: #faf9f7; border-radius: 8px; padding: 8px; min-height: 60px; font-size: 13px; }
.occ-grid b { display: block; color: var(--muted); margin-bottom: 4px; }
.occ-slot { display: block; background: #fff; border-left: 3px solid var(--red); border-radius: 4px; padding: 4px 6px; margin-bottom: 4px; font-weight: 600; }
.occ-slot small { font-weight: 400; color: var(--ink-2); }
.fb-list { display: grid; gap: 8px; margin-bottom: 14px; }
.fb-row { display: grid; grid-template-columns: 130px 1fr auto; gap: 12px; align-items: start; background: #faf9f7; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.fb-type { font-size: 12px; font-weight: 700; color: var(--red); text-transform: uppercase; letter-spacing: .04em; padding-top: 10px; }
.fb-main input, .fb-main textarea { margin-top: 0 !important; margin-bottom: 6px; }
.fb-opts { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.fb-opts .check { margin: 4px 0; }
.fb-add { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.entry.is-new { border-left: 4px solid var(--red); }
.entry-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.entry-head form { margin: 0; }
.entry dl { display: grid; grid-template-columns: 200px 1fr; gap: 6px 16px; margin: 0; }
.entry dt { color: var(--muted); font-weight: 600; }
.entry dd { margin: 0; }
@media (max-width: 800px) { .occ-grid { grid-template-columns: repeat(2, 1fr); } .fb-row, .entry dl { grid-template-columns: 1fr; } .theme-pick { grid-template-columns: 1fr !important; } }
/* Trainingszeiten-Editor */
.slots { display: grid; gap: 10px; margin-bottom: 12px; }
.slot { border: 1px solid var(--line); border-radius: 10px; background: #faf9f7; padding: 10px 12px; }
.slot label { margin: 0; font-size: 12px; font-weight: 600; color: var(--muted); }
.slot input, .slot select { margin-top: 3px !important; padding: 7px 8px !important; font-size: 14px; }
.slot-main { display: grid; grid-template-columns: 130px 100px 100px 1.2fr 1fr 32px; gap: 8px; align-items: end; }
.slot-more { margin-top: 8px; }
.slot-more summary { cursor: pointer; font-size: 13px; color: var(--ink-2); font-weight: 600; }
.slot-prog { display: grid; grid-template-columns: 1.2fr 1fr 1.2fr 1.2fr; gap: 8px; margin-top: 8px; }
.slot-prog .wide { grid-column: 1 / -1; }
.occ-grid { grid-template-columns: repeat(8, 1fr); }
.pdf-box { display: flex; gap: 10px; flex-wrap: wrap; }
@media (max-width: 800px) { .slot-main { grid-template-columns: 1fr 1fr 1fr; } .slot-prog { grid-template-columns: 1fr 1fr; } }
.import-box { border: 2px dashed var(--red); background: var(--red-soft); }
.import-box h2 { color: var(--red-dark); }

/* Editor: Fotogrößen & Werkzeugleiste */
.ed { position: relative; }
.ed-area img { cursor: pointer; }
.ed-area img.img-s { width: 33%; } .ed-area img.img-m { width: 50%; } .ed-area img.img-l { width: 75%; } .ed-area img.img-full { width: 100%; }
.ed-area img.img-center { display: block; margin-left: auto; margin-right: auto; }
.ed-area img.img-left { float: left; margin: .3em 1.2em .8em 0; }
.ed-area img.img-right { float: right; margin: .3em 0 .8em 1.2em; }
.ed-area::after { content: ""; display: table; clear: both; }
.ed-area h2, .ed-area h3, .ed-area .gallery, .ed-area table { clear: both; }
.ed-area .gallery.gallery-s { grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); }
.ed-area .gallery.gallery-l { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.ed-area img.ed-sel { outline: 3px solid var(--blue); outline-offset: 2px; }
.img-bar { position: absolute; z-index: 5; display: flex; flex-wrap: wrap; gap: 2px; background: #1b1c1f; border-radius: 10px; padding: 5px; box-shadow: 0 8px 24px rgba(0,0,0,.25); max-width: calc(100% - 20px); }
.img-bar b { color: #9aa0aa; font: 600 11px var(--font); text-transform: uppercase; letter-spacing: .05em; align-self: center; padding: 0 6px; }
.img-bar button { background: none; border: 0; color: #fff; font: 13px var(--font); padding: 6px 9px; border-radius: 6px; cursor: pointer; white-space: nowrap; }
.img-bar button:hover { background: #33363d; }
.img-bar button.on { background: var(--red); }
.img-bar .sep { width: 1px; background: #3a3d44; margin: 3px 4px; }
.ed-area a.download { display: inline-block; padding: 8px 14px 8px 12px; border: 1px solid var(--line); border-left: 4px solid var(--red); border-radius: 8px; text-decoration: none; color: var(--ink); font-weight: 600; background: #fff; }
.ed-area a.download::before { content: "📄 "; }
.ed-area a.download::after { content: "  ↓ Download-Karte"; color: var(--muted); font-weight: 400; font-size: 12px; }
.ed-area ol.steps { padding-left: 1.4em; }
.tpl-menu { position: absolute; z-index: 6; width: 320px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 16px 40px rgba(0,0,0,.18); padding: 6px; display: grid; gap: 2px; }
.tpl-menu button { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; text-align: left; background: none; border: 0; border-radius: 8px; padding: 8px 10px; cursor: pointer; font: 14px var(--font); color: var(--ink); }
.tpl-menu button:hover { background: var(--bg); }
.tpl-menu small { color: var(--muted); font-size: 12.5px; }
.m-dialog.small { width: min(520px, 95vw); }
.doc-form { padding: 14px 18px 0; }
.ed-area a.download[title]::after { content: "  – " attr(title); }
.ed-area a.download.ed-sel { outline: 3px solid var(--blue); outline-offset: 2px; }
.ed-area ul.sponsors img { max-height: 40px; width: auto; vertical-align: middle; margin-right: 8px; }
.sponsor-card .sp-list { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 8px; }
.sponsor-card .sp-list li { display: flex; gap: 10px; align-items: center; }
.sponsor-card .sp-th { width: 56px; height: 36px; flex: none; display: flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--muted); }
.sponsor-card .sp-th img { max-width: 50px; max-height: 30px; }
.sponsor-card small { display: block; color: var(--muted); font-size: 12.5px; }
.slot-period { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 8px; font-size: 13px; }
.slot-period > span { font-weight: 600; color: var(--ink-2); }
.slot-period label { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 13px; }
.slot-period input { width: auto; padding: 4px 8px; }
