/* Meister Optimizer Forum. Farben, Glanz und Schrift wie meisteroptimizer.de. Alles liegt lokal, nichts wird von fremden Servern geladen. */

@font-face { font-family: "Inter"; src: url("fonts/Inter-Regular.woff") format("woff"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/Inter-Medium.woff") format("woff"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/Inter-SemiBold.woff") format("woff"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter Display"; src: url("fonts/InterDisplay-Medium.woff") format("woff"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter Display"; src: url("fonts/InterDisplay-SemiBold.woff") format("woff"); font-weight: 600; font-style: normal; font-display: swap; }

:root {
  --bg: #ffffff; --surface: #f3f1ed; --card: #ffffff; --ink: #16181b; --muted: #5a5e63; --line: #e2ddd3;
  --gold: #c9a05a; --gold-2: #7a5a1e; --gold-soft: #f7f0e2; --gold-line: #e6d3ad;
  --danger: #a33a2a; --danger-soft: #fff4f2; --danger-line: #f3c9c0;
  --ok: #1f6b3d; --ok-soft: #e6f3ea; --ok-line: #bfdcc8;
  --on-gold: #17130b; --field-line: #c9ced2; --glass: rgba(255, 255, 255, .86);
  --glow: radial-gradient(1100px 520px at 78% -180px, rgba(214, 176, 100, .24), transparent 70%), radial-gradient(760px 460px at -8% 14%, rgba(214, 176, 100, .10), transparent 70%);
  --sheen: linear-gradient(180deg, #ffffff 0%, #fdfbf7 55%, #f8f3ea 100%);
  --card-line: rgba(194, 154, 91, .34);
  --card-shadow: inset 0 1px 0 #fff, 0 22px 44px -30px rgba(122, 90, 30, .42), 0 2px 6px -2px rgba(122, 90, 30, .10);
  --btn-grad: linear-gradient(180deg, #f1d595 0%, #d3a959 52%, #b98c3f 100%);
  --btn-shadow: inset 0 1px 0 rgba(255, 246, 220, .85), 0 12px 26px -12px rgba(160, 118, 40, .65);
  --head-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 12px 30px -26px rgba(122, 90, 30, .55);
  --display: "Inter Display", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --text: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}
html[data-theme="dark"] {
  --bg: #0b0b0c; --surface: #121214; --card: #151517; --ink: #f4f1ec; --muted: #a9a59d; --line: #2b2b30;
  --gold: #d0a960; --gold-2: #e7cb92; --gold-soft: rgba(208, 169, 96, .13); --gold-line: rgba(208, 169, 96, .32);
  --danger: #ef7a64; --danger-soft: rgba(239, 122, 100, .13); --danger-line: rgba(239, 122, 100, .35);
  --ok: #6fcf97; --ok-soft: rgba(95, 191, 131, .14); --ok-line: rgba(95, 191, 131, .34);
  --field-line: #3a3a40; --glass: rgba(11, 11, 12, .8);
  --glow: radial-gradient(1100px 520px at 78% -180px, rgba(208, 169, 96, .20), transparent 70%), radial-gradient(760px 460px at -8% 14%, rgba(208, 169, 96, .07), transparent 70%);
  --sheen: linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .012) 60%);
  --card-line: rgba(208, 169, 96, .24);
  --card-shadow: inset 0 1px 0 rgba(255, 255, 255, .07), 0 22px 44px -28px rgba(0, 0, 0, .9), 0 0 40px -26px rgba(208, 169, 96, .5);
  --btn-grad: linear-gradient(180deg, #f3d897 0%, #d2a758 52%, #b98c3f 100%);
  --btn-shadow: inset 0 1px 0 rgba(255, 246, 220, .7), 0 12px 30px -12px rgba(208, 169, 96, .7);
  --head-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 12px 30px -26px rgba(0, 0, 0, .9);
  color-scheme: dark;
}

/* Grundlagen */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background-color: var(--bg); background-image: var(--glow); background-repeat: no-repeat; color: var(--ink); font-family: var(--text); font-size: 16px; line-height: 1.5; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--gold-2); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
h1, h2, h3, p, ul, ol { margin: 0; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; text-wrap: balance; }
h1 { font-size: clamp(28px, 3.6vw, 36px); line-height: 1.12; letter-spacing: -0.9px; }
h2 { font-size: 22px; line-height: 1.25; letter-spacing: -0.4px; }
.h3, h3 { font-size: 17px; line-height: 1.3; letter-spacing: -0.2px; }
.h1-klein { font-size: 26px; letter-spacing: -0.6px; }
.ico { flex: none; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sprung { position: absolute; left: -9999px; }
.sprung:focus { left: 16px; top: 16px; z-index: 10; padding: 10px 14px; background: var(--card); border: 1px solid var(--gold); border-radius: 10px; }
.gedimmt { color: var(--muted); }
.klein { font-size: 14.5px; }
.gold { color: var(--gold-2); font-weight: 500; }
.unter { text-decoration: underline; }
.mitte { text-align: center; }
.mit-ico { display: inline-flex; align-items: center; gap: 6px; }
h2.mit-ico .ico, .h3.mit-ico .ico { color: var(--gold-2); }
.eyebrow { font-size: 13px; font-weight: 600; color: var(--gold-2); letter-spacing: .02em; }
.lead { font-size: 18px; color: var(--muted); max-width: 56ch; }
.mehr { font-size: 14.5px; font-weight: 600; color: var(--gold-2); }
.rahmen { width: 100%; max-width: 1240px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
main.rahmen { padding-top: 32px; padding-bottom: 64px; display: flex; flex-direction: column; gap: 24px; flex: 1 0 auto; }

/* Obere Leiste */
.leiste { background: var(--surface); border-bottom: 1px solid var(--line); font-size: 13.5px; color: var(--muted); }
.leiste-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; padding-top: 9px; padding-bottom: 9px; }
.leiste nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }

/* Kopf */
.kopf { position: sticky; top: 0; z-index: 5; background: var(--glass); -webkit-backdrop-filter: saturate(1.5) blur(14px); backdrop-filter: saturate(1.5) blur(14px); box-shadow: var(--head-shadow); border-bottom: 1px solid var(--line); }
.kopf-in { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding-top: 14px; padding-bottom: 14px; }
.marke { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 600; font-size: 16.5px; letter-spacing: -0.2px; white-space: nowrap; }
.marke:hover { color: var(--ink); }
.marke img { width: 40px; height: 40px; flex: none; border-radius: 50%; box-shadow: 0 6px 18px -6px rgba(160, 118, 40, .7), 0 0 0 1px rgba(208, 169, 96, .35); }
.marke b { font-weight: 600; color: var(--gold-2); }
.suche { flex: 1 1 240px; min-width: 0; position: relative; display: flex; align-items: center; }
.suche .ico { position: absolute; left: 14px; color: var(--muted); pointer-events: none; }
.suche .feld { padding-left: 42px; }
.kopf-rechts { display: flex; align-items: center; gap: 10px; }
.ich { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; }
.unternav { border-bottom: 1px solid var(--line); }
.unternav-in { display: flex; flex-wrap: wrap; gap: 0 28px; font-size: 15px; color: var(--muted); }
.unternav a { padding: 14px 0; }
.unternav a.an { font-weight: 600; color: var(--ink); box-shadow: inset 0 -2px 0 var(--gold); }

/* Knöpfe und Felder */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 20px; border-radius: 12px; font: 600 15px var(--text); cursor: pointer; white-space: nowrap; }
.btn-gold, .btn-gold:hover { background-image: var(--btn-grad); color: var(--on-gold); border: 1px solid #dcb86e; box-shadow: var(--btn-shadow); }
.btn-ghost { background-color: var(--card); background-image: var(--sheen); color: var(--ink); border: 1px solid var(--card-line); box-shadow: var(--card-shadow); }
.btn-ghost:hover { color: var(--ink); border-color: var(--gold); }
.btn-rund { width: 44px; padding: 10px; border-radius: 50%; color: var(--gold-2); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.knoepfe { display: flex; flex-wrap: wrap; gap: 12px; }
.knoepfe .feld { flex: 1 1 240px; width: auto; }
.feld { width: 100%; min-height: 46px; padding: 10px 14px; border: 1px solid var(--field-line); border-radius: 12px; background: var(--card); color: var(--ink); font: 400 16px var(--text); }
.feld::placeholder { color: var(--muted); }
.feld[disabled] { opacity: .6; }
.label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }

/* Aufteilung */
.spalten { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; }
.haupt { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 32px; }
.seite { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.stapel { display: flex; flex-direction: column; gap: 32px; }
.stapel-eng { gap: 18px; }
.zweispaltig { display: flex; flex-wrap: wrap; gap: 40px 64px; align-items: flex-start; justify-content: center; padding-top: 24px; }
.schmal { max-width: 560px; margin: 24px auto; }

/* Karten */
.karte { background-color: var(--card); background-image: var(--sheen); border: 1px solid var(--card-line); box-shadow: var(--card-shadow); border-radius: 16px; overflow: hidden; }
.karte-in { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.karte-kopf { padding: 20px 20px 16px; border-bottom: 1px solid var(--line); }
.karte-kopf p { margin-top: 4px; }
.karte-kopf-zeile { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.hero { display: flex; flex-direction: column; gap: 18px; padding: 16px 0 8px; }
.hero h1 { font-size: clamp(32px, 4.6vw, 48px); line-height: 1.08; letter-spacing: -1.4px; max-width: 17ch; }
.punkte { padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; font-size: 14.5px; }
.punkte li { display: flex; gap: 10px; align-items: flex-start; }
.punkte .ico { color: var(--gold-2); margin-top: 2px; }
.linkliste { display: flex; flex-direction: column; font-size: 15px; }
.linkliste a { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; }
.linkliste a + a { border-top: 1px solid var(--line); }
.linkliste .ico { color: var(--muted); }
.hinweis { padding: 12px 14px; border-radius: 12px; background: var(--gold-soft); border: 1px solid var(--gold-line); color: var(--gold-2); font-size: 14.5px; }
.leer { padding: 36px 20px; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; color: var(--muted); }

/* Chips, Abzeichen, Avatare */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: 13px; color: var(--muted); }
a.chip:hover { color: var(--gold-2); border-color: var(--gold-line); }
.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: 12.5px; font-weight: 600; white-space: nowrap; border: 1px solid; }
.badge-gold { background: var(--gold-soft); color: var(--gold-2); border-color: var(--gold-line); }
.badge-ok { background: var(--ok-soft); color: var(--ok); border-color: var(--ok-line); }
.badge-warn { background: var(--danger-soft); color: var(--danger); border-color: var(--danger-line); }
.avatar { width: 40px; height: 40px; flex: none; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--gold-soft); border: 1px solid var(--gold-line); color: var(--gold-2); font-weight: 600; font-size: 13.5px; }
.avatar-klein { width: 36px; height: 36px; font-size: 12.5px; }
.avatar-gross { width: 52px; height: 52px; font-size: 17px; }
.kachel { width: 46px; height: 46px; flex: none; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: var(--gold-soft); border: 1px solid var(--gold-line); color: var(--gold-2); }
.kachel-gross { width: 56px; height: 56px; border-radius: 14px; }

/* Forenübersicht */
.forumzeile { display: flex; flex-wrap: wrap; gap: 14px 20px; align-items: center; padding: 18px 20px; }
.forumzeile + .forumzeile { border-top: 1px solid var(--line); }
.forumzeile-text { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.forumzeile-text .chips { margin-top: 4px; }
.zaehler { flex: none; width: 150px; display: flex; gap: 20px; font-size: 13px; color: var(--muted); }
.zaehler b { display: block; font-size: 16px; font-weight: 600; color: var(--ink); }
.zaehler.gross { width: auto; }
.zaehler.gross b { font-size: 18px; }
.letztes { flex: 0 1 230px; min-width: 0; display: flex; flex-direction: column; font-size: 13.5px; color: var(--muted); }
.letztes-titel { color: var(--ink); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.forumkopf { padding: 24px; display: flex; flex-wrap: wrap; gap: 18px 24px; align-items: flex-start; }
.forumkopf-text { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }

/* Themenliste */
.themazeile { display: flex; gap: 14px; align-items: flex-start; padding: 18px 20px; }
.themazeile + .themazeile { border-top: 1px solid var(--line); }
.themazeile-in { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.meta { font-size: 14px; color: var(--muted); }
.themazeile-fuss { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; font-size: 13.5px; color: var(--muted); }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.tab { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; min-width: 40px; padding: 6px 14px; border-radius: 12px; border: 1px solid var(--line); font-size: 14px; font-weight: 600; color: var(--muted); }
.tab.an { background: var(--gold-soft); border-color: var(--gold-line); color: var(--gold-2); }
.seiten { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.seiten-links { display: flex; gap: 6px; }
.pfad { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); }
.pfad span { color: var(--ink); }

/* Thema */
.themakopf { display: flex; flex-direction: column; gap: 12px; }
.beitrag { padding: 22px; display: flex; flex-wrap: wrap; gap: 16px 22px; align-items: flex-start; scroll-margin-top: 96px; }
.beitrag-loesung { border-color: var(--ok-line); }
.autor { flex: 0 0 132px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.autor-name { font-weight: 600; overflow-wrap: anywhere; }
.beitrag-in { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.text { display: flex; flex-direction: column; gap: 14px; overflow-wrap: anywhere; }
.text p { max-width: 68ch; }

/* Anmelden */
.anmeldekarte { flex: 1 1 420px; min-width: 0; max-width: 520px; padding: 32px; display: flex; flex-direction: column; gap: 18px; }
.anmeldekarte h1 { font-size: 30px; letter-spacing: -0.7px; }
.anmeldeinfo { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 24px; padding-top: 12px; }
.anmeldeinfo h2 { font-size: 26px; letter-spacing: -0.6px; }
.punkt { display: flex; gap: 14px; align-items: flex-start; }
.punkt p { margin-top: 4px; font-size: 15px; max-width: 44ch; }

/* Chat */
.chat { gap: 0; }
.chatzeile { display: flex; gap: 12px; align-items: flex-start; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.chatzeile-kopf { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; }
.chatzeile p { max-width: 64ch; overflow-wrap: anywhere; }
.chat-eingabe { padding: 16px 20px 20px; display: flex; flex-direction: column; gap: 10px; }

/* Fließtext-Seiten */
.prosa { gap: 16px; padding: 28px; }
.prosa p { max-width: 68ch; }
.regeln { padding-left: 22px; display: flex; flex-direction: column; gap: 10px; max-width: 68ch; }

/* Fuß */
.fuss { margin-top: auto; background: var(--surface); border-top: 1px solid var(--line); font-size: 14.5px; color: var(--muted); }
.fuss-in { display: flex; flex-wrap: wrap; gap: 32px 48px; padding-top: 40px; padding-bottom: 28px; }
.fuss-marke { flex: 2 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.fuss-marke p { max-width: 34ch; }
.fuss-spalte { flex: 1 1 160px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.fuss-titel { font-weight: 600; font-size: 14px; color: var(--ink); }
.fuss-unten { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-top: 16px; padding-bottom: 24px; border-top: 1px solid var(--line); font-size: 13.5px; }

@media (max-width: 760px) {
  .sm-aus { display: none !important; }
  .rahmen { padding-left: 16px; padding-right: 16px; }
  .autor { flex: 1 1 100%; flex-direction: row; align-items: center; flex-wrap: wrap; }
  .letztes { flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
