/* Schützenliesl München-Neuhausen
   Lodengrün als Grundton, Patronenmessing als einziger Akzent, helle Inhaltsflächen. */

@font-face { font-family: "Zilla Slab"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/ZillaSlab-500-latin.woff2") format("woff2"); }
@font-face { font-family: "Zilla Slab"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/ZillaSlab-600-latin.woff2") format("woff2"); }
@font-face { font-family: "Zilla Slab"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/ZillaSlab-700-latin.woff2") format("woff2"); }
@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 200 900; font-display: swap; src: url("../fonts/SourceSans3-latin.woff2") format("woff2"); }

:root {
  --loden: #26331f;
  --loden-2: #31412a;
  --moos: #556b2f;
  --messing: #b88a2c;
  --messing-hell: #caa046;
  --messing-text: #8a6a22;
  --scheibe: #f6f6f0;
  --papier: #ffffff;
  --tinte: #1f241b;
  --grau: #5f6757;
  --linie: #dfe2d6;
  --gruen-hell: #eef3e2;
  --rot: #9b2c1f;
  --nav-text: #dfe5d3;
  --nav-muted: #c9d1b8;

  --f-display: "Zilla Slab", Rockwell, "Roboto Slab", Georgia, serif;
  --f-body: "Source Sans 3", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --f-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --radius: 12px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--scheibe); color: var(--tinte); font: 17px/1.55 var(--f-body); display: flex; flex-direction: column; min-height: 100vh; }
main { flex: 1; }
img { max-width: 100%; height: auto; }
h1, h2, h3, h4 { font-family: var(--f-display); line-height: 1.15; margin: 0; text-wrap: balance; }
p { margin: 0; }
a { color: var(--moos); }
:focus-visible { outline: 3px solid var(--messing); outline-offset: 2px; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.in { max-width: 1920px; margin: 0 auto; padding-left: max(18px, env(safe-area-inset-left)); padding-right: max(18px, env(safe-area-inset-right)); }
@media (min-width: 640px) { .in { padding-left: 28px; padding-right: 28px; } }
@media (min-width: 1200px) { .in { padding-left: clamp(28px, 4vw, 72px); padding-right: clamp(28px, 4vw, 72px); } }

/* Platzhalter für noch fehlende Angaben */
.ph { background: rgba(184, 138, 44, .2); border-radius: 4px; padding: 0 4px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }

/* ===== Knöpfe ===== */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 700 16px var(--f-body); border-radius: 8px; padding: 11px 18px; border: 0; cursor: pointer; text-decoration: none; line-height: 1.2; }
.btn-gold { background: var(--messing); color: #1d1606; }
.btn-gold:hover { background: var(--messing-hell); }
.btn-ghost { background: transparent; color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.55); }
.btn-ghost:hover { background: rgba(255,255,255,.08); }
.btn-dark { background: var(--loden); color: #fff; }
.btn-dark:hover { background: var(--loden-2); }
.btn-line { background: var(--papier); color: var(--loden); box-shadow: inset 0 0 0 1.5px var(--linie); }
.btn-line:hover { box-shadow: inset 0 0 0 1.5px var(--moos); }
.btn-danger { background: var(--papier); color: var(--rot); box-shadow: inset 0 0 0 1.5px #e7c6c0; }
.btn-sm { padding: 7px 12px; font-size: 14px; }
.btn-link { background: none; border: 0; padding: 0; font: inherit; color: var(--moos); text-decoration: underline; cursor: pointer; }

/* ===== Navigation ===== */
.nav { background: var(--loden); color: #fff; position: relative; z-index: 20; }
.nav .in { display: flex; align-items: center; gap: 18px; padding-top: 12px; padding-bottom: 12px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; min-width: 0; }
.brand img { flex: none; width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: #fff; box-shadow: 0 0 0 2px var(--messing); }
.brand b { font: 700 20px/1.05 var(--f-display); display: block; }
.brand small { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--nav-muted); display: block; }
.links { display: none; gap: 18px; margin-left: auto; font-weight: 600; font-size: 16px; align-items: center; }
.links a { color: var(--nav-text); text-decoration: none; padding: 4px 0; }
.links a:hover, .links a[aria-current="page"] { color: #fff; box-shadow: 0 2px 0 var(--messing); }
.nav-cta { display: none; }
.burger { margin-left: auto; background: none; border: 0; color: #fff; padding: 8px; cursor: pointer; border-radius: 8px; }
.burger svg { display: block; }
/* Mobiles Menü als Dropdown unter der Kopfleiste, Punkte untereinander */
.mobile-menu { position: absolute; left: 0; right: 0; top: 100%; background: var(--loden); border-top: 1px solid rgba(255,255,255,.12); box-shadow: 0 18px 30px rgba(0,0,0,.35); max-height: calc(100dvh - 70px); overflow-y: auto; overscroll-behavior: contain; }
.mobile-menu[hidden] { display: none; }
.nav .mobile-menu ul.in { display: block; list-style: none; margin: 0 auto; padding-top: 4px; padding-bottom: 12px; }
.mobile-menu li:last-child a, .mobile-menu li:last-child button { border-bottom: 0; }
.mobile-menu a, .mobile-menu button { display: block; width: 100%; text-align: left; color: #fff; text-decoration: none; font: 600 18px var(--f-body); padding: 14px 0; background: none; border: 0; border-bottom: 1px solid rgba(255,255,255,.08); cursor: pointer; }
.mobile-menu a[aria-current="page"] { color: #e4d3a6; }
@media (min-width: 1000px) {
  .links, .nav-cta { display: flex; }
  .burger, .mobile-menu { display: none !important; }
}
.nav-user { display: flex; align-items: center; gap: 10px; }
.nav-user img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; background: #fff; }

/* ===== Meldungen ===== */
.flashes { padding-top: 18px; display: grid; gap: 10px; }
.flash { border-radius: 10px; padding: 12px 16px; font-weight: 600; border: 1px solid var(--linie); background: var(--papier); }
.flash.success { background: var(--gruen-hell); border-color: #cfdcb3; color: #2f3d1c; }
.flash.error { background: #fbeeec; border-color: #ecc9c3; color: #7a2418; }
.flash.warning, .flash.info { background: #f8f1e1; border-color: #ead9b2; color: #5e4714; }

/* ===== Startseite ===== */
.hero { background: var(--loden); color: #fff; overflow: hidden; }
.hero .in { display: grid; gap: 32px; align-items: center; padding-top: 36px; padding-bottom: 64px; }
.hero h1 { font-size: clamp(34px, 6vw, 58px); font-weight: 700; letter-spacing: -.01em; }
.hero h1 em { font-style: normal; color: var(--messing); }
.hero .lead { font-size: 19px; color: #d6dcc9; margin-top: 16px; max-width: 46ch; }
.hero .cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.eyebrow-h { font: 700 13px var(--f-body); letter-spacing: .14em; text-transform: uppercase; color: #e4d3a6; display: block; margin-bottom: 14px; }
.medal-wrap { position: relative; justify-self: start; width: 100%; max-width: 200px; padding-bottom: 14px; order: -1; }
.medal { position: relative; width: 100%; aspect-ratio: 4 / 5; border-radius: 50%; background: #fff; box-shadow: 0 0 0 8px var(--moos), 0 0 0 10px var(--messing), 0 30px 60px -20px rgba(0,0,0,.6); display: grid; place-items: center; overflow: hidden; }
.medal img { width: 62%; margin-top: 4%;
  /* Bildränder (Fass, Wolken) weich ins Weiß auslaufen lassen statt mit gerader Kante enden */
  -webkit-mask-image: radial-gradient(ellipse 58% 60% at 50% 40%, #000 80%, transparent 100%);
  mask-image: radial-gradient(ellipse 58% 60% at 50% 40%, #000 80%, transparent 100%); }
.ribbon { position: absolute; left: 50%; bottom: -12px; transform: translateX(-50%); background: var(--messing); color: #1d1606; font: 700 15px var(--f-display); letter-spacing: .06em; padding: 6px 18px; border-radius: 6px; white-space: nowrap; box-shadow: 0 6px 16px rgba(0,0,0,.3); }
@media (min-width: 760px) {
  .hero .in { grid-template-columns: 1.15fr .85fr; padding-top: 56px; padding-bottom: 88px; }
  .medal-wrap { order: 0; justify-self: center; max-width: 330px; }
  .medal { box-shadow: 0 0 0 10px var(--moos), 0 0 0 12px var(--messing), 0 30px 60px -20px rgba(0,0,0,.6); }
}

.week { background: var(--papier); color: var(--tinte); border-radius: 16px; overflow: hidden; display: grid; box-shadow: 0 24px 60px -28px rgba(0,0,0,.55); border: 1px solid var(--linie); }
.week .top { background: var(--messing); color: #1d1606; padding: 10px 20px; display: flex; justify-content: space-between; gap: 10px; font: 700 12px var(--f-body); letter-spacing: .12em; text-transform: uppercase; }
.week .body { padding: 20px 22px 22px; display: grid; gap: 14px; }
.week .when { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.week .when b { font: 700 42px/1 var(--f-display); color: var(--loden); font-variant-numeric: tabular-nums; }
.week .when span { font: 600 18px var(--f-body); color: var(--grau); }
.week dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 16px; }
.week dt { color: var(--grau); font-weight: 600; }
.week dd { margin: 0; font-weight: 600; min-width: 0; }
.week .row { display: flex; gap: 8px; flex-wrap: wrap; border-top: 1px solid var(--linie); padding-top: 14px; }
.next { margin-top: -40px; position: relative; z-index: 2; }
@media (min-width: 860px) {
  .next .week { grid-template-columns: auto 1fr; }
  .next .week .top { writing-mode: vertical-rl; transform: rotate(180deg); justify-content: center; padding: 18px 10px; }
  .next .body { grid-template-columns: auto 1fr auto; align-items: center; gap: 14px 28px; }
  .next .row { border-top: 0; padding-top: 0; }
}
.chip { font: 600 14px var(--f-body); background: var(--scheibe); border: 1px solid var(--linie); border-radius: 999px; padding: 4px 10px; color: var(--loden); }
.chip.g { background: var(--gruen-hell); border-color: #cfdcb3; }

section.block { padding-top: 56px; padding-bottom: 56px; }
@media (min-width: 760px) { section.block { padding-top: 72px; padding-bottom: 72px; } }
.sec-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.sec-head h2 { font-size: clamp(26px, 4vw, 36px); }
.kicker { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--moos); font-weight: 700; margin-bottom: 6px; display: block; }
.more { color: var(--moos); font-weight: 700; text-decoration: none; }
.more:hover { text-decoration: underline; }

.disz { display: grid; gap: 18px; }
@media (min-width: 760px) { .disz { grid-template-columns: repeat(3, 1fr); } }
.card { background: var(--papier); border: 1px solid var(--linie); border-radius: var(--radius); padding: 22px; display: grid; gap: 8px; align-content: start; min-width: 0; }
.card h3 { font-size: 22px; }
.card p { color: var(--grau); }
.card .meta { font: 600 13px var(--f-mono); color: var(--moos); }
a.card { text-decoration: none; color: inherit; }
a.card:hover { border-color: var(--moos); }

.split { display: grid; gap: 32px; }
@media (min-width: 820px) { .split { grid-template-columns: 1.2fr .8fr; } }
.termine { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.termin { display: grid; grid-template-columns: 64px 1fr; gap: 16px; align-items: center; background: var(--papier); border: 1px solid var(--linie); border-radius: var(--radius); padding: 14px 16px; }
.termin h3 { font: 600 18px var(--f-body); }
.termin p { color: var(--grau); font-size: 15px; }
.termin.abgesagt h3 { text-decoration: line-through; color: var(--grau); }
.cal { text-align: center; border-radius: 8px; background: var(--scheibe); padding: 6px 0; font-variant-numeric: tabular-nums; border: 1px solid var(--linie); }
.cal b { display: block; font: 700 24px/1 var(--f-display); color: var(--loden); }
.cal small { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--grau); font-weight: 700; }
.badge { font: 700 11px var(--f-body); letter-spacing: .06em; text-transform: uppercase; border-radius: 4px; padding: 2px 6px; background: var(--gruen-hell); color: var(--moos); margin-left: 6px; vertical-align: 2px; white-space: nowrap; }
.badge.intern { background: #f1ece0; color: var(--messing-text); }
.badge.abgesagt { background: #fbeeec; color: var(--rot); }
.badge.neu { background: var(--messing); color: #1d1606; }
.aside { background: var(--moos); color: #fff; border-radius: 14px; padding: 28px; display: grid; gap: 14px; align-content: start; align-self: start; }
.aside h3 { font-size: 26px; }
.aside p { color: #e4ead6; }
.aside .kicker { color: #e4d3a6; }
.aside .aside-btn { justify-self: start; }

.about { background: var(--papier); border-block: 1px solid var(--linie); }
.about .in { display: grid; gap: 28px; align-items: center; }
@media (min-width: 760px) { .about .in { grid-template-columns: .9fr 1.1fr; gap: 44px; } }
.logo-box { background: #fff; border-radius: var(--radius); padding: 20px; display: grid; place-items: center; border: 1px solid var(--linie); margin: 0; }
.logo-box img { width: 380px; }
.logo-box figcaption { font-size: 13px; color: var(--grau); margin-top: 8px; text-align: center; }
.about p { color: #3c4335; max-width: 58ch; }
.stats { display: flex; gap: 32px; flex-wrap: wrap; margin-top: 20px; }
.stats b { font: 700 32px var(--f-display); color: var(--loden); display: block; font-variant-numeric: tabular-nums; }
.stats span { color: var(--grau); font-size: 14px; }

.news { display: grid; gap: 18px; }
@media (min-width: 760px) { .news { grid-template-columns: repeat(3, 1fr); } }
.news time, .newslist time { font: 600 13px var(--f-body); color: var(--grau); letter-spacing: .04em; }

/* ===== Unterseiten ===== */
.pagehead { background: var(--loden); color: #fff; }
.pagehead .in { padding-top: 40px; padding-bottom: 36px; }
.pagehead h1 { font-size: clamp(30px, 5vw, 46px); }
.pagehead p { color: var(--nav-muted); margin-top: 10px; max-width: 60ch; font-size: 18px; }
.pagehead .kicker { color: #e4d3a6; }
.page { padding-top: 40px; padding-bottom: 72px; }
.prose { max-width: 90ch; display: grid; gap: 16px; }
.prose h2 { font-size: 26px; margin-top: 18px; }
.prose h3 { font-size: 20px; margin-top: 8px; }
.prose ul { margin: 0; padding-left: 22px; display: grid; gap: 6px; }
.prose address { font-style: normal; }
.hinweis { border-left: 4px solid var(--messing); background: #f8f1e1; padding: 12px 16px; border-radius: 0 8px 8px 0; color: #5e4714; }
.empty { color: var(--grau); background: var(--papier); border: 1px dashed var(--linie); border-radius: var(--radius); padding: 22px; text-align: center; }

.newslist { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
@media (min-width: 640px) { .newslist { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); } }
.newslist li { background: var(--papier); border: 1px solid var(--linie); border-radius: var(--radius); padding: 20px 22px; display: grid; gap: 6px; align-content: start; overflow: hidden; }
.newslist li p { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.newslist h2 { font-size: 24px; }
.newslist h2 a { color: var(--tinte); text-decoration: none; }
.newslist h2 a:hover { color: var(--moos); }
.pager { display: flex; gap: 12px; align-items: center; margin-top: 24px; }

.koenige { display: grid; gap: 14px; }
@media (min-width: 760px) { .koenige { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1400px) { .koenige { grid-template-columns: repeat(3, 1fr); } }
.koenig-jahr { background: var(--papier); border: 1px solid var(--linie); border-radius: var(--radius); overflow: hidden; display: grid; grid-template-columns: 92px 1fr; }
.koenig-jahr .jahr { background: var(--loden); color: #fff; display: grid; place-items: center; font: 700 26px var(--f-display); font-variant-numeric: tabular-nums; }
.koenig-jahr ul { list-style: none; margin: 0; padding: 12px 18px; display: grid; gap: 8px; }
.koenig-jahr li { display: grid; gap: 0; }
.koenig-jahr li small { color: var(--messing-text); font-weight: 700; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.koenig-jahr li span { font-weight: 600; font-size: 18px; }
.koenig-jahr li em { font-style: normal; color: var(--grau); font-size: 14px; }

.chronik { list-style: none; margin: 0; padding: 0; position: relative; }
.chronik p { max-width: 90ch; }
.chronik::before { content: ""; position: absolute; left: 39px; top: 6px; bottom: 6px; width: 2px; background: var(--linie); }
.chronik li { display: grid; grid-template-columns: 80px 1fr; gap: 18px; padding-bottom: 26px; position: relative; }
.chronik .jahr { font: 700 20px var(--f-display); color: #fff; background: var(--moos); border-radius: 999px; text-align: center; padding: 4px 0; align-self: start; position: relative; font-variant-numeric: tabular-nums; }
.chronik h2 { font-size: 22px; margin-bottom: 4px; }
.chronik p { color: #3c4335; }

.kontakt-grid { display: grid; gap: 18px; }
@media (min-width: 760px) { .kontakt-grid { grid-template-columns: repeat(3, 1fr); } }

/* ===== Fuß ===== */
.foot { background: var(--loden); color: var(--nav-muted); font-size: 15px; margin-top: auto; }
.foot .in { display: grid; gap: 26px; padding-top: 44px; padding-bottom: calc(26px + env(safe-area-inset-bottom)); }
@media (min-width: 760px) { .foot .in { grid-template-columns: 1.3fr 1fr 1fr; } }
.foot h2 { font: 700 13px var(--f-body); letter-spacing: .12em; text-transform: uppercase; color: #fff; margin: 0 0 10px; }
.foot a { color: #e5ead9; }
.foot .legal { grid-column: 1 / -1; border-top: 1px solid rgba(255,255,255,.12); padding-top: 16px; display: flex; gap: 18px; flex-wrap: wrap; font-size: 13px; align-items: center; }
.foot .legal .version { margin-left: auto; color: #9aa48c; font-family: var(--f-mono); font-size: 12px; }

/* ===== Anmeldung ===== */
.login { min-height: calc(100vh - 220px); display: grid; place-items: center; padding: 48px 18px; background: radial-gradient(circle at 50% 40%, var(--loden-2) 0, var(--loden) 70%); }
.login .box { background: var(--papier); border-radius: 14px; padding: 30px; width: 100%; max-width: 400px; display: grid; gap: 16px; box-shadow: 0 30px 60px -30px rgba(0,0,0,.6); }
.login h1 { font-size: 28px; }
.login p { color: var(--grau); font-size: 15px; }
.login .btn { width: 100%; }
.login .flash { font-size: 15px; }
.switch { display: flex; border: 1.5px solid var(--linie); border-radius: 8px; overflow: hidden; }
.switch a { flex: 1; text-align: center; padding: 8px; font-weight: 600; text-decoration: none; color: var(--tinte); font-size: 15px; }
.switch a[aria-current="true"] { background: var(--moos); color: #fff; }

/* ===== Formulare ===== */
.form { display: grid; gap: 16px; }
.form label, .form .label { font-weight: 700; font-size: 15px; display: grid; gap: 6px; min-width: 0; }
.form input[type=text], .form input[type=password], .form input[type=email], .form input[type=date], .form input[type=time], .form input[type=number], .form select, .form textarea {
  font: 16px var(--f-body); padding: 11px 12px; border: 1.5px solid var(--linie); border-radius: 8px; background: var(--papier); color: var(--tinte); width: 100%; min-width: 0;
}
.form input:focus, .form select:focus, .form textarea:focus { border-color: var(--moos); outline: none; box-shadow: 0 0 0 3px rgba(85,107,47,.15); }
.form .code-input { font: 600 24px var(--f-mono); letter-spacing: .2em; text-align: center; }
.form .help { font-weight: 400; font-size: 14px; color: var(--grau); }
.form .errorlist { list-style: none; margin: 0; padding: 0; color: var(--rot); font-weight: 600; font-size: 14px; }
.form .fields { display: grid; gap: 14px; }
@media (min-width: 560px) { .form .fields { grid-template-columns: 1fr 1fr; } .form .full { grid-column: 1 / -1; } }
.form .check { display: flex; align-items: flex-start; gap: 10px; font-weight: 600; }
.form .check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--moos); flex: none; }
.form .actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.seg { display: flex; border: 1.5px solid var(--linie); border-radius: 8px; overflow: hidden; }
.seg label { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 8px; font-weight: 600; cursor: pointer; font-size: 15px; }
.seg input { accent-color: var(--moos); }
.seg div { flex: 1; display: flex; }
.drop { border: 2px dashed #c3cbb0; border-radius: 12px; background: var(--scheibe); padding: 26px 18px; text-align: center; display: grid; gap: 6px; justify-items: center; cursor: pointer; position: relative; }
.drop.over, .drop:focus-within { border-color: var(--moos); background: var(--gruen-hell); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.drop strong { font-size: 18px; }
.drop span { color: var(--grau); font-size: 14px; font-weight: 400; }
.drop .file { font: 500 14px var(--f-mono); color: var(--loden); }

/* ===== Mitgliederbereich ===== */
.mhead { background: var(--loden); color: #fff; }
.mhead .in { padding-top: 30px; padding-bottom: 26px; display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; }
.mhead h1 { font-size: clamp(28px, 5vw, 40px); }
.mhead p { color: var(--nav-muted); }
.mtabs { display: flex; gap: 6px; flex-wrap: wrap; }
.mtabs a, .mtabs button { font: 600 15px var(--f-body); border-radius: 8px; padding: 9px 14px; text-decoration: none; background: rgba(255,255,255,.1); color: #e5ead9; border: 0; cursor: pointer; }
.mtabs form { display: contents; }
/* Abmelden als letzter Knopf: am Desktop ganz rechts, mobil über die ganze Breite ganz unten */
.mtabs .abmelden button { margin-left: auto; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.35); background: transparent; }
@media (max-width: 639px) { .mtabs { width: 100%; } .mtabs .abmelden button { flex-basis: 100%; } }
.mtabs a[aria-current="page"] { background: #fff; color: var(--loden); }
.mtabs .role { font: 700 11px var(--f-body); letter-spacing: .08em; text-transform: uppercase; color: #e4d3a6; margin-left: 6px; }
.mtabs a[aria-current="page"] .role { color: var(--messing-text); }
.mgrid { display: grid; gap: 28px; padding-top: 30px; padding-bottom: 60px; align-items: start; }
@media (min-width: 900px) { .mgrid { grid-template-columns: 1.35fr .65fr; } }
.mgrid.even { grid-template-columns: 1fr; }
@media (min-width: 900px) { .mgrid.even { grid-template-columns: 1.1fr .9fr; } }
.stack { display: grid; gap: 28px; min-width: 0; }
.panel { background: var(--papier); border: 1px solid var(--linie); border-radius: 14px; overflow: hidden; min-width: 0; }
.panel > header { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--linie); flex-wrap: wrap; }
.panel h2 { font-size: 22px; }
.panel .pad { padding: 20px; }
.panel .sub { color: var(--grau); font-size: 14px; }
.filter { display: flex; gap: 6px; flex-wrap: wrap; }
.filter a { font: 600 14px var(--f-body); border: 1px solid var(--linie); background: var(--scheibe); color: var(--tinte); border-radius: 999px; padding: 5px 12px; text-decoration: none; }
.filter a[aria-current="true"] { background: var(--moos); border-color: var(--moos); color: #fff; }
.docs { list-style: none; margin: 0; padding: 0; }
.doc { display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: center; padding: 14px 20px; border-bottom: 1px solid var(--linie); }
.doc:last-child { border-bottom: 0; }
.doc h3 { font: 600 17px var(--f-body); }
.doc .sub { font-variant-numeric: tabular-nums; }
.doc .btn { grid-column: 2; justify-self: start; }
@media (min-width: 560px) { .doc { grid-template-columns: 44px 1fr auto; } .doc .btn { grid-column: auto; } }
.pdf { width: 40px; height: 48px; border-radius: 5px; background: #f1ece0; border: 1px solid #e2d8c2; display: grid; place-items: end center; padding-bottom: 6px; font: 700 10px var(--f-mono); color: var(--messing-text); position: relative; }
.pdf::before { content: ""; position: absolute; top: -1px; right: -1px; width: 12px; height: 12px; background: linear-gradient(225deg, var(--papier) 50%, #e2d8c2 50%); }
.bdays { list-style: none; margin: 0; padding: 6px 0; }
.bday { display: grid; grid-template-columns: 52px 1fr auto; gap: 12px; align-items: center; padding: 10px 20px; }
.bday .cal b { font-size: 20px; }
.bday strong { font-weight: 600; }
.soon { font: 600 14px var(--f-body); color: var(--moos); white-space: nowrap; }
.soon.heute { color: var(--messing-text); }
.note { font-size: 13px; color: var(--grau); padding: 12px 20px 16px; border-top: 1px solid var(--linie); }
.mehr { padding: 14px 20px 18px; border-top: 1px solid var(--linie); text-align: center; margin: 0; }
.docs .doc { scroll-margin-top: 16px; }
.panel .termine { padding: 14px; }
.ev-admin { list-style: none; margin: 0; padding: 0; }
.ev-admin li { display: grid; grid-template-columns: 56px 1fr; gap: 14px; align-items: center; padding: 12px 20px; border-bottom: 1px solid var(--linie); }
.ev-admin li:last-child { border-bottom: 0; }
.ev-admin li.aktiv { background: var(--gruen-hell); }
.ev-admin h3 { font: 600 16px var(--f-body); }
.ev-admin p { color: var(--grau); font-size: 14px; }
.ev-admin .acts { display: flex; gap: 6px; flex-wrap: wrap; grid-column: 2; }
.ev-admin .acts form { display: inline; }
@media (min-width: 560px) { .ev-admin li { grid-template-columns: 56px 1fr auto; } .ev-admin .acts { grid-column: auto; } }
.ev-admin.ohne-datum li { grid-template-columns: 1fr auto; }
.ev-admin.ohne-datum .acts { grid-column: auto; }
.form .fields { align-items: end; }
.api pre, pre.code { margin: 0; background: var(--loden); color: #e5ead9; border-radius: 10px; padding: 14px; font: 500 13px/1.6 var(--f-mono); overflow-x: auto; }
.api { display: grid; gap: 12px; }
.api p { color: var(--grau); font-size: 15px; }

.viewer { display: grid; gap: 14px; padding-top: 24px; padding-bottom: 48px; }
.viewer-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.viewer-frame { width: 100%; height: min(82vh, 1100px); border: 1px solid var(--linie); border-radius: 12px; background: #3a4034; overflow: hidden; }

/* PDF-Betrachter (assets/js/pdfansicht.js) */
.pdfansicht { display: grid; grid-template-rows: auto 1fr; min-height: 0; }
.pdf-leiste { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; align-items: center; padding: 8px 10px; background: var(--loden); color: #e4ead6; }
.pdf-gruppe { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.pdf-leiste .btn { min-width: 38px; }
.pdf-zoom, .pdf-zaehler { font: 600 14px var(--f-body); font-variant-numeric: tabular-nums; padding: 0 6px; }
.pdf-flaeche { overflow: auto; background: #3a4034; padding: 12px; -webkit-overflow-scrolling: touch; min-height: 0; }
/* margin statt Zentrieren per Grid: vergrößerte Seiten bleiben nach links scrollbar */
.pdf-seite { background: #fff; box-shadow: 0 6px 20px rgba(0,0,0,.35); margin: 0 auto 12px; }
.pdf-seite canvas { display: block; width: 100%; height: 100%; }
.pdf-fehler { color: #e4ead6; padding: 20px; text-align: center; }
.pdf-fehler a { color: #fff; }
.pdf-overlay { position: fixed; inset: 0; z-index: 100; display: grid; grid-template-rows: auto 1fr; background: #3a4034; }
.pdf-overlay > div:last-child { min-height: 0; display: grid; }
.pdf-titel { background: var(--loden); color: #fff; font: 700 16px var(--f-body); padding: 10px 14px 0; text-align: center; }
.pdf-titel:empty { display: none; }
.pdf-zu { font-size: 20px; }
@media (max-width: 639px) {
  .pdf-leiste { padding: 6px 8px; gap: 6px; }
  .pdf-zoom { display: none; }
  .pdf-leiste .btn { padding: 6px 10px; }
  .pdf-flaeche { padding: 8px; }
}

/* ===== Profil / 2FA ===== */
.profil-head { display: flex; gap: 16px; align-items: center; }
.profil-head img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; background: var(--scheibe); border: 2px solid var(--messing); }
.status { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; }
.status::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: #a3ab98; }
.status.an::before { background: #4c8a2b; }
a.panel-link { display: block; text-decoration: none; color: inherit; }
a.panel-link:hover .panel, a.panel-link:focus-visible .panel { border-color: var(--moos); }
.qr { display: grid; gap: 18px; }
@media (min-width: 640px) { .qr { grid-template-columns: 220px 1fr; align-items: start; } }
.qr img { width: 220px; height: 220px; border: 1px solid var(--linie); border-radius: 10px; image-rendering: pixelated; background: #fff; }
.details { border: 1px solid var(--linie); border-radius: 10px; padding: 10px 14px; }
.details summary { cursor: pointer; font-weight: 700; }
.details dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 12px 0 4px; font-size: 15px; }
.details dt { color: var(--grau); font-weight: 600; }
.details dd { margin: 0; word-break: break-all; }
.details .key { font: 600 15px var(--f-mono); letter-spacing: .06em; }
.codes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.codes li { font: 600 18px var(--f-mono); letter-spacing: .06em; background: var(--scheibe); border: 1px solid var(--linie); border-radius: 8px; padding: 10px; text-align: center; }
details.aktion { border-top: 1px solid var(--linie); }
details.aktion summary { cursor: pointer; padding: 16px 20px; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
details.aktion summary::after { content: "+"; color: var(--moos); font-size: 20px; line-height: 1; }
details.aktion[open] summary::after { content: "–"; }
details.aktion .form { padding: 0 20px 20px; }
details.aktion summary .help { font-weight: 400; color: var(--grau); }

@media print {
  .nav, .foot, .no-print, .flashes, .mobile-menu { display: none !important; }
  body { background: #fff; }
  .panel { border: 0; }
  .codes li { border: 1px solid #999; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }

/* Inhalte aus dem Redaktionsbereich */
.rt { display: grid; gap: 16px; }
.rt > * { margin: 0; }
.rt h2 { font-size: 26px; margin-top: 18px; }
.rt h3 { font-size: 20px; margin-top: 8px; }
.rt ul, .rt ol { padding-left: 22px; display: grid; gap: 6px; }
.rt hr { border: 0; border-top: 1px solid var(--linie); }
.inhalt { max-width: none; }
.rt p, .rt li, .rt h2, .rt h3, .hinweis { max-width: 90ch; }
.bildblock { margin: 0; display: grid; gap: 8px; justify-items: start; }
.bildblock img { max-width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--linie); }
.bildblock figcaption, .galerie figcaption { color: var(--grau); font-size: 14px; }
/* Galerie als ruhiges Raster: gleich große Kacheln, Ausschnitt eher oben (Köpfe), ganzes Bild im Bildbetrachter */
.galerie { display: grid; gap: 10px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 640px) { .galerie { grid-template-columns: repeat(3, 1fr); gap: 12px; } }
@media (min-width: 900px) { .galerie { grid-template-columns: repeat(4, 1fr); } }
.galerie figure { margin: 0; display: grid; gap: 6px; align-content: start; }
.galerie img { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; object-position: 50% 15%; display: block; border-radius: var(--radius); border: 1px solid var(--linie); }
/* Bild mit Text: nebeneinander ab Tablet, auf dem Handy untereinander */
.bildtext { display: grid; gap: 20px; align-items: start; }
.bildtext .bildblock img { width: auto; max-width: 100%; }
@media (min-width: 760px) {
  .bildtext { grid-template-columns: fit-content(40%) minmax(0, 1fr); gap: 32px; }
  .bildtext.bild-rechts { grid-template-columns: minmax(0, 1fr) fit-content(40%); }
  .bildtext.bild-rechts .bildblock { order: 2; }
}
[data-lightbox] { cursor: zoom-in; display: block; }
.inhalt table, .tafel table { border-collapse: collapse; width: 100%; background: var(--papier); border: 1px solid var(--linie); border-radius: var(--radius); overflow: hidden; }
.inhalt th, .inhalt td, .tafel th, .tafel td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--linie); vertical-align: top; }
.inhalt th, .tafel th { background: var(--loden); color: #fff; font-weight: 600; }
.tafel td:first-child { font-variant-numeric: tabular-nums; font-weight: 700; width: 5.5em; }
.tafel td em { font-style: normal; color: var(--grau); font-size: 14px; }
.koenige-aktuell { margin-bottom: 36px; display: grid; gap: 14px; }
.koenige-aktuell h2, .tafel h2 { font-size: 24px; }
.ehrentafel { display: grid; gap: 28px; }
@media (min-width: 900px) { .ehrentafel { grid-template-columns: repeat(2, 1fr); align-items: start; } }
@media (min-width: 1400px) { .ehrentafel { grid-template-columns: repeat(3, 1fr); } }
.tafel { display: grid; gap: 10px; }
.newslist li.mit-bild { padding-top: 0; gap: 16px; }
.newslist li > div { display: grid; gap: 6px; }
.newsbild { margin: 0 -22px; }
.newsbild img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; object-position: 50% 12%; display: block; }
.news .cardbild { width: calc(100% + 44px); max-width: none; height: auto; aspect-ratio: 16 / 9; object-fit: cover; object-position: 50% 12%; margin: -22px -22px 4px; border-radius: var(--radius) var(--radius) 0 0; display: block; }

/* Einzelne Nachricht: ruhige, mittige Lesespalte */
.in.artikel { max-width: 1100px; }
.artikel .rt p, .artikel .rt li { max-width: none; }

/* Bildbetrachter */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(15, 18, 12, .97); display: grid; grid-template-rows: auto 1fr auto; color: #fff; touch-action: pan-y pinch-zoom; }
.lightbox[hidden] { display: none; }
.lightbox .lb-kopf { display: flex; justify-content: space-between; align-items: center; padding: 10px max(14px, env(safe-area-inset-right)) 10px max(14px, env(safe-area-inset-left)); font: 600 15px var(--f-body); color: #d6dcc9; }
.lightbox .lb-buehne { position: relative; display: grid; place-items: center; min-height: 0; padding: 0 8px; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 140px); max-height: calc(100dvh - 140px); object-fit: contain; border-radius: 6px; user-select: none; -webkit-user-drag: none; }
.lightbox .lb-text { text-align: center; padding: 10px 16px calc(14px + env(safe-area-inset-bottom)); color: #e4ead6; min-height: 1em; }
.lightbox button { background: rgba(255,255,255,.12); color: #fff; border: 0; border-radius: 999px; width: 46px; height: 46px; font-size: 24px; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.lightbox button:hover { background: rgba(255,255,255,.24); }
.lightbox .lb-zurueck, .lightbox .lb-weiter { position: absolute; top: 50%; transform: translateY(-50%); }
.lightbox .lb-zurueck { left: 12px; }
.lightbox .lb-weiter { right: 12px; }
.lightbox.einzeln .lb-zurueck, .lightbox.einzeln .lb-weiter { display: none; }
@media (max-width: 639px) { .lightbox .lb-zurueck, .lightbox .lb-weiter { display: none; } }
body.lb-offen { overflow: hidden; }

/* ===== Mobile Ansicht: möglichst alles zentriert ===== */
@media (max-width: 639px) {
  .hero .in, .pagehead .in, .sec-head, .card, .aside, .about .in, .newslist li, .chronik li > div, .koenige-aktuell, .tafel h2, .rt, .prose, .empty, .login .box, .foot .in { text-align: center; }
  .hero .lead, .pagehead p, .about p, .rt p, .rt li, .rt h2, .rt h3, .prose > * { margin-left: auto; margin-right: auto; }
  .hero .cta, .stats, .week .row, .week .when, .pager, .foot .legal, .profil-head { justify-content: center; }
  .medal-wrap { justify-self: center; padding-bottom: 0; }
  .ribbon { display: none; }
  .aside .aside-btn { justify-self: center; }
  .sec-head { flex-direction: column; align-items: center; }
  .card, .newslist li, .newslist li > div { justify-items: center; }
  .news .cardbild { justify-self: stretch; }
  .week .top { justify-content: center; text-align: center; }
  .week .body { justify-items: center; text-align: center; }
  .week dl { justify-content: center; text-align: left; }
  .bildblock { justify-items: center; }
  .rt ul, .rt ol, .prose ul { list-style-position: inside; padding-left: 0; }
  .inhalt table, .tafel table, .details dl, .codes li { text-align: left; }
  .foot .legal .version { margin-left: 0; flex-basis: 100%; }
  .artikel.page > p { text-align: center; }
  .hinweis { border-left: 0; border-top: 4px solid var(--messing); border-radius: 0 0 8px 8px; text-align: center; }
}
