/* =========================================================
   fabibause12.github.io  -  Basis-Styles
   ========================================================= */

:root {
  --bg:          #f6f4ec;
  --bg-alt:      #eceade;
  --surface:     #fffdf7;
  --surface-2:   #f2efe4;
  --text:        #1c2a21;
  --text-muted:  #5f6d62;
  --line:        #dcd7c7;
  --accent:      #1f7a3f;
  --accent-dark: #145c2d;
  --accent-soft: #e2f0e5;
  --shadow:      0 1px 2px rgba(20, 40, 28, .06), 0 8px 24px rgba(20, 40, 28, .07);
  --shadow-lg:   0 12px 48px rgba(20, 40, 28, .18);
  --radius:      14px;
  --radius-sm:   9px;
  --maxw:        1140px;
  --serif:       "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans:        system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:          #10150f;
    --bg-alt:      #161d16;
    --surface:     #18211a;
    --surface-2:   #1f2a20;
    --text:        #e7ece6;
    --text-muted:  #9dab9f;
    --line:        #2c392e;
    --accent:      #5cc47f;
    --accent-dark: #8fd9a8;
    --accent-soft: #1d3326;
    --shadow:      0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
    --shadow-lg:   0 12px 48px rgba(0, 0, 0, .55);
  }
}

:root[data-theme="dark"] {
  --bg:          #10150f;
  --bg-alt:      #161d16;
  --surface:     #18211a;
  --surface-2:   #1f2a20;
  --text:        #e7ece6;
  --text-muted:  #9dab9f;
  --line:        #2c392e;
  --accent:      #5cc47f;
  --accent-dark: #8fd9a8;
  --accent-soft: #1d3326;
  --shadow:      0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
  --shadow-lg:   0 12px 48px rgba(0, 0, 0, .55);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--accent-dark); }

h1, h2, h3 {
  font-family: var(--serif);
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -.01em;
}

h1 { font-size: clamp(2rem, 5vw, 3.1rem); margin: 0 0 .4em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin: 0 0 .5em; }
h3 { font-size: 1.2rem; margin: 0 0 .4em; }

.container {
  width: min(100% - 2.5rem, var(--maxw));
  margin-inline: auto;
}

.eyebrow {
  font-family: var(--sans);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 .7rem;
}

.muted { color: var(--text-muted); }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: .6rem 1rem;
  z-index: 200;
}
.skip-link:focus { left: 0; }

/* ---------- Kopf / Navigation ---------- */

.site-head {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-head .container {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 62px;
}

.brand {
  display: flex;
  align-items: center;
  gap: .55rem;
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}
.brand .leaf { color: var(--accent); display: grid; place-items: center; }
.brand .leaf svg { width: 22px; height: 22px; }

.nav { margin-left: auto; }

.nav ul {
  display: flex;
  align-items: center;
  gap: .15rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav a {
  display: block;
  padding: .45rem .7rem;
  border-radius: 99px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: .93rem;
  font-weight: 500;
  white-space: nowrap;
  transition: background .15s, color .15s;
}
.nav a:hover { background: var(--surface-2); color: var(--text); }
.nav a.active { background: var(--accent-soft); color: var(--accent-dark); }
.nav a.ext::after {
  content: "\2197";
  font-size: .72em;
  margin-left: .25em;
  opacity: .55;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  padding: 0;
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn svg { width: 18px; height: 18px; }

.theme-toggle .moon { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .sun { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .moon { display: block; }
}

.lang-toggle {
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .06em;
}
.lang-toggle + .theme-toggle { margin-left: -.5rem; }

/* Bloecke, die es in beiden Sprachen gibt (z. B. der Werdegang) */
:root:not([lang="en"]) [data-lang="en"],
:root[lang="en"] [data-lang="de"] { display: none !important; }

.nav-toggle { display: none; }

@media (max-width: 900px) {
  .nav-toggle { display: grid; order: 3; }
  .nav {
    order: 4;
    flex-basis: 100%;
    display: none;
    padding-bottom: .8rem;
  }
  .nav.open { display: block; }
  .nav ul { flex-direction: column; align-items: stretch; gap: 2px; }
  .nav a { padding: .6rem .8rem; border-radius: var(--radius-sm); }
  .site-head .container { flex-wrap: wrap; }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  display: grid;
  place-items: center;
  text-align: center;
  min-height: min(68vh, 520px);
  padding: 4rem 0;
  background: var(--bg-alt) center / cover no-repeat;
  color: #fff;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 24, 14, .35), rgba(8, 24, 14, .72));
}
.hero .container { position: relative; z-index: 1; }
.hero h1 { color: #fff; text-shadow: 0 2px 30px rgba(0, 0, 0, .45); }
.hero p {
  max-width: 46ch;
  margin: 0 auto;
  color: rgba(255, 255, 255, .88);
  font-size: 1.08rem;
}
.hero .eyebrow { color: #9fe0b4; }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem;
  justify-content: center;
  margin-top: 1.8rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .7rem 1.3rem;
  border-radius: 99px;
  border: 1px solid transparent;
  font: inherit;
  font-size: .95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform .12s, background .15s, border-color .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn svg { width: 17px; height: 17px; }
.btn-primary { background: var(--accent); color: #0d1f14; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-ghost {
  background: rgba(255, 255, 255, .1);
  border-color: rgba(255, 255, 255, .45);
  color: #fff;
  backdrop-filter: blur(4px);
}
.btn-ghost:hover { background: rgba(255, 255, 255, .2); }
.btn-quiet {
  background: var(--surface);
  border-color: var(--line);
  color: var(--text);
}
.btn-quiet:hover { background: var(--surface-2); }

/* ---------- Abschnitte ---------- */

.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section-alt { background: var(--bg-alt); }
.section-head { max-width: 62ch; margin-bottom: 2.4rem; }
.section-head p { color: var(--text-muted); margin: 0; }

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: start;
}
@media (max-width: 820px) { .split { grid-template-columns: minmax(0, 1fr); } }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}
.card p:last-child { margin-bottom: 0; }

.grid {
  display: grid;
  gap: 1.1rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
}

.link-card {
  display: flex;
  flex-direction: column;
  gap: .3rem;
  padding: 1.15rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  box-shadow: var(--shadow);
  transition: transform .15s, border-color .15s;
}
.link-card:hover { transform: translateY(-3px); border-color: var(--accent); }
.link-card strong { font-size: 1.02rem; }
.link-card span { color: var(--text-muted); font-size: .9rem; line-height: 1.45; }
.link-card .host {
  margin-top: .5rem;
  font-size: .78rem;
  letter-spacing: .04em;
  color: var(--accent);
  font-weight: 600;
}

.note {
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  padding: 1rem 1.25rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.note p { margin: 0; }

.polaroid {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: .7rem .7rem 1rem;
  box-shadow: var(--shadow);
  text-align: center;
}
.polaroid img { border-radius: var(--radius-sm); width: 100%; height: auto; }
.polaroid figcaption {
  margin-top: .7rem;
  font-size: .85rem;
  color: var(--text-muted);
}

/* ---------- Fuss ---------- */

.site-foot {
  border-top: 1px solid var(--line);
  background: var(--bg-alt);
  padding: 2.5rem 0;
  margin-top: 2rem;
}
.site-foot .container {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  color: var(--text-muted);
  font-size: .88rem;
}
.stamp {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .3rem .75rem;
  border: 1px dashed var(--accent);
  border-radius: 99px;
  color: var(--accent);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .15s;
}
.stamp:hover,
.stamp:focus-visible { background: var(--accent-soft); }

/* Zweiter Stempel: nur im dunklen Design zu sehen */
.stamps { display: inline-flex; flex-wrap: wrap; gap: .6rem; }
.stamp-dunkel { display: none; }
:root[data-theme="dark"] .stamp-dunkel { display: inline-flex; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .stamp-dunkel { display: inline-flex; }
}

/* Zertifikat-Popup zum Stempel */
.zert {
  width: min(92vw, 420px);
  padding: 1.8rem 1.6rem 1.5rem;
  border: 2px dashed var(--accent);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-lg);
}
.zert::backdrop { background: rgba(10, 20, 12, .55); }
.zert h2 {
  margin: 0 0 .8rem;
  font-family: var(--serif);
  font-size: 1.45rem;
}
.zert p { margin: 0 0 .8rem; line-height: 1.55; }
.zert ul { margin: 0; padding-left: 1.2rem; line-height: 1.55; }
.zert a { color: var(--accent); }
.zert-kicker {
  color: var(--accent);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.zert-sub { color: var(--text-muted); font-size: .92rem; }
.zert-zitat {
  margin: 0 0 .8rem;
  padding-left: .9rem;
  border-left: 3px solid var(--accent);
  font-style: italic;
  line-height: 1.55;
}
.zert-close {
  position: absolute;
  top: .5rem;
  right: .7rem;
  border: 0;
  background: none;
  color: var(--text-muted);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}
.zert-close:hover { color: var(--text); }

/* ---------- Pflanzen: Uebersicht ---------- */

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem;
  align-items: center;
  margin-bottom: 1.8rem;
}
.search {
  flex: 1 1 240px;
  max-width: 340px;
  position: relative;
}
.search input {
  width: 100%;
  padding: .6rem .9rem .6rem 2.3rem;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: .95rem;
}
.search svg {
  position: absolute;
  left: .8rem;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  pointer-events: none;
}
.count { color: var(--text-muted); font-size: .9rem; margin-left: auto; }

.plant-grid {
  display: grid;
  gap: 1.3rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 265px), 1fr));
}

.plant-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
  transition: transform .18s, box-shadow .18s, border-color .18s;
}
.plant-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}
.plant-card .thumb {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--surface-2);
  overflow: hidden;
}
.plant-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.plant-card:hover .thumb img { transform: scale(1.04); }
.plant-card .badge {
  position: absolute;
  right: .6rem;
  bottom: .6rem;
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .2rem .55rem;
  border-radius: 99px;
  background: rgba(10, 22, 14, .72);
  color: #fff;
  font-size: .75rem;
  font-weight: 600;
  backdrop-filter: blur(3px);
}
.plant-card .badge svg { width: 13px; height: 13px; }
.plant-card .body { padding: 1rem 1.1rem 1.2rem; }
.plant-card h3 { margin: 0 0 .15rem; }
.plant-card .latin {
  font-style: italic;
  font-size: .85rem;
  color: var(--text-muted);
  margin: 0 0 .5rem;
}
.plant-card .teaser {
  margin: 0;
  font-size: .92rem;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.empty {
  text-align: center;
  padding: 3.5rem 1.5rem;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text-muted);
}
.empty h3 { color: var(--text); }
.empty code {
  background: var(--surface-2);
  padding: .1rem .4rem;
  border-radius: 5px;
  font-size: .9em;
}
.empty pre {
  display: inline-block;
  text-align: left;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: .9rem 1.2rem;
  margin-top: 1rem;
  font-size: .85rem;
  line-height: 1.5;
  color: var(--text);
  overflow-x: auto;
  max-width: 100%;
}

.loading {
  display: flex;
  align-items: center;
  gap: .7rem;
  color: var(--text-muted);
  padding: 2rem 0;
}
.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Pflanzen: Detail ---------- */

.back-link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin-bottom: 1.4rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: .92rem;
  font-weight: 500;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  padding: 0;
}
.back-link:hover { color: var(--accent); }
.back-link svg { width: 15px; height: 15px; }

.detail {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}
@media (max-width: 860px) { .detail { grid-template-columns: minmax(0, 1fr); } }
.detail > * { min-width: 0; }

.gallery { position: sticky; top: 80px; min-width: 0; }
@media (max-width: 860px) { .gallery { position: static; } }

.stage {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  touch-action: pan-y;
}
.stage > img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  cursor: zoom-in;
  animation: fade .35s ease;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.stage-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 50%;
  background: rgba(12, 24, 16, .55);
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(4px);
  transition: background .15s, opacity .15s;
}
.stage-nav:hover { background: rgba(12, 24, 16, .85); }
.stage-nav[disabled] { opacity: .25; cursor: default; }
.stage-nav.prev { left: .6rem; }
.stage-nav.next { right: .6rem; }
.stage-nav svg { width: 20px; height: 20px; }

.stage-count {
  position: absolute;
  left: .7rem;
  bottom: .7rem;
  padding: .22rem .6rem;
  border-radius: 99px;
  background: rgba(12, 24, 16, .6);
  color: #fff;
  font-size: .78rem;
  font-weight: 600;
  backdrop-filter: blur(3px);
}

.thumbs {
  display: flex;
  max-width: 100%;
  gap: .55rem;
  margin-top: .8rem;
  overflow-x: auto;
  padding-bottom: .35rem;
  scrollbar-width: thin;
}
.thumbs button {
  flex: none;
  width: 78px;
  height: 58px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface-2);
  cursor: pointer;
  opacity: .62;
  transition: opacity .15s, border-color .15s;
}
.thumbs button:hover { opacity: 1; }
.thumbs button[aria-current="true"] { opacity: 1; border-color: var(--accent); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }

.plant-title { margin-bottom: .1rem; }
.plant-latin {
  font-family: var(--serif);
  font-style: italic;
  color: var(--text-muted);
  margin: 0 0 1.2rem;
}
.plant-text p { margin: 0 0 1em; }
.plant-text p:last-child { margin-bottom: 0; }

.facts {
  margin: 1.5rem 0 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}
.facts > div {
  display: grid;
  grid-template-columns: minmax(90px, 34%) 1fr;
  gap: .8rem;
  padding: .65rem 1rem;
  border-top: 1px solid var(--line);
  font-size: .93rem;
}
.facts > div:first-child { border-top: none; }
.facts dt { color: var(--text-muted); font-weight: 600; margin: 0; }
.facts dd { margin: 0; }

/* ---------- Lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  place-items: center;
  background: rgba(6, 14, 9, .93);
  padding: 1.5rem;
}
.lightbox.open { display: grid; }
.lightbox img {
  max-width: 100%;
  max-height: 86vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
}
.lightbox .close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(255, 255, 255, .12);
  border: none;
  color: #fff;
}
.lightbox .caption {
  position: absolute;
  bottom: 1.1rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, .75);
  font-size: .85rem;
}

body.no-scroll { overflow: hidden; }

/* ---------- Diverses ---------- */

:root { --on-accent: #ffffff; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --on-accent: #0d1f14; }
}
:root[data-theme="dark"] { --on-accent: #0d1f14; }
.btn-primary { color: var(--on-accent); }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
  html { scroll-behavior: auto; }
}

.lightbox .lb-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  cursor: pointer;
}
.lightbox .lb-nav:hover { background: rgba(255, 255, 255, .25); }
.lightbox .lb-nav svg { width: 22px; height: 22px; }
.lightbox .lb-prev { left: 1rem; }
.lightbox .lb-next { right: 1rem; }

@media (max-width: 900px) {
  .lang-toggle { margin-left: auto; }
}

/* ---------- Werdegang ---------- */

.cv-intro {
  max-width: 62ch;
  font-size: 1.06rem;
}

.timeline {
  position: relative;
  margin: 0;
  padding: 0 0 0 1.6rem;
  list-style: none;
  border-left: 2px solid var(--line);
}

.tl-item { position: relative; padding-bottom: 2.2rem; }
.tl-item:last-child { padding-bottom: 0; }

.tl-item::before {
  content: "";
  position: absolute;
  left: calc(-1.6rem - 7px);
  top: .42rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
}
.tl-item.now::before { background: var(--accent); }

.tl-when {
  display: block;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .2rem;
}
.tl-item h3 { margin: 0 0 .15rem; }
.tl-where {
  margin: 0 0 .6rem;
  font-size: .92rem;
  color: var(--text-muted);
}
.tl-item ul {
  margin: 0;
  padding-left: 1.1rem;
  font-size: .95rem;
}
.tl-item li { margin-bottom: .3rem; }
.tl-item > p:last-child { margin-bottom: 0; }

.skills {
  display: grid;
  gap: 1.1rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
}
.skill-block {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem 1.3rem;
  box-shadow: var(--shadow);
}
.skill-block h3 {
  font-family: var(--sans);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .8rem;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.chips li {
  padding: .25rem .7rem;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: var(--surface-2);
  font-size: .87rem;
}

.cv-note {
  margin-top: 2.5rem;
  font-size: .92rem;
  color: var(--text-muted);
}

.cv-list { padding-left: 1.1rem; margin: 0; font-size: .95rem; }
.cv-list li { margin-bottom: .35rem; }
.cv-list li:last-child { margin-bottom: 0; }
.cv-card-2 { margin-top: 1.1rem; }
.cv-card-2 p { font-size: .95rem; margin: 0 0 .6rem; }
.cv-card-2 p:last-child { margin-bottom: 0; }

.brand .logo {
  width: 26px;
  height: 26px;
  flex: none;
  border-radius: 6px;
  object-fit: cover;
}

/* ---------- Wuerfelspiele ---------- */

.game-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  padding: .35rem;
  margin-bottom: 1.6rem;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 99px;
  width: fit-content;
}

.game-tabs button {
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-weight: 600;
  font-size: .95rem;
  padding: .45rem 1.1rem;
  border-radius: 99px;
  cursor: pointer;
}

.game-tabs button:hover { color: var(--text); }

.game-tabs button[aria-selected="true"] {
  background: var(--surface);
  color: var(--accent-dark);
  box-shadow: var(--shadow);
}

.game-panel > .card,
.game-panel > #kBoard > .card,
.game-panel > #gBoard > .card,
.game-panel .game-stage { margin-bottom: 1.2rem; }

.name-list {
  display: grid;
  gap: .5rem;
  margin: 1.2rem 0;
  max-width: 24rem;
}

.name-row { display: flex; gap: .4rem; align-items: center; }

.name-row input {
  flex: 1;
  padding: .55rem .8rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: .95rem;
}

.name-row input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

.pick {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  margin: .2rem 0 1rem;
  font-size: .95rem;
  color: var(--text-muted);
}

.pick select,
.pick input {
  padding: .45rem .6rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: .95rem;
}

.turn-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .6rem 1rem;
  margin-bottom: 1.1rem;
}

.turn-bar h3 { margin: 0; }
.turn-bar .eyebrow { margin: 0 0 .2rem; }

.rolls {
  margin: 0 0 0 auto;
  color: var(--text-muted);
  font-size: .92rem;
  font-weight: 600;
}

.dice-row {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin: .2rem 0 .9rem;
}

.die {
  --seite: 54px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: calc(var(--seite) * .09);
  width: var(--seite);
  height: var(--seite);
  padding: calc(var(--seite) * .12);
  border-radius: calc(var(--seite) * .24);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  color: var(--text);
}

.die i {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: currentColor;
  opacity: 0;
}

.die[data-face="1"] i:nth-child(5),
.die[data-face="2"] i:nth-child(3),
.die[data-face="2"] i:nth-child(7),
.die[data-face="3"] i:nth-child(3),
.die[data-face="3"] i:nth-child(5),
.die[data-face="3"] i:nth-child(7),
.die[data-face="4"] i:nth-child(1),
.die[data-face="4"] i:nth-child(3),
.die[data-face="4"] i:nth-child(7),
.die[data-face="4"] i:nth-child(9),
.die[data-face="5"] i:nth-child(1),
.die[data-face="5"] i:nth-child(3),
.die[data-face="5"] i:nth-child(5),
.die[data-face="5"] i:nth-child(7),
.die[data-face="5"] i:nth-child(9),
.die[data-face="6"] i:nth-child(1),
.die[data-face="6"] i:nth-child(3),
.die[data-face="6"] i:nth-child(4),
.die[data-face="6"] i:nth-child(6),
.die[data-face="6"] i:nth-child(7),
.die[data-face="6"] i:nth-child(9) { opacity: 1; }

.die[data-face="zahl"] {
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
  place-items: center;
  font-family: var(--serif);
  font-size: calc(var(--seite) * .46);
  font-weight: 600;
  padding: 0;
}

.die.zu {
  border-style: dashed;
  border-color: var(--accent);
  background: var(--surface-2);
  color: var(--text-muted);
}

/* Bei Maexchen liegen nur zwei Wuerfel auf dem Tisch - die duerfen groesser sein. */
.game-stage .die { --seite: 72px; }

.die-btn {
  padding: 0;
  border: 0;
  background: transparent;
  border-radius: 15px;
  cursor: pointer;
  line-height: 0;
}

.die-btn[disabled] { cursor: default; }

.die-btn[aria-pressed="true"] .die {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 2px var(--accent) inset;
}

.die-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

@keyframes wuerfelfall {
  from { transform: translateY(-6px) rotate(-10deg); }
  to   { transform: none; }
}

.dice-row.rollt .die { animation: wuerfelfall .3s ease-out; }

@media (prefers-reduced-motion: reduce) {
  .dice-row.rollt .die { animation: none; }
}

.hint { color: var(--text-muted); font-size: .92rem; margin: 0 0 1rem; }

.sheet-wrap {
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.sheet {
  border-collapse: collapse;
  width: 100%;
  font-size: .93rem;
}

.sheet th,
.sheet td {
  border-bottom: 1px solid var(--line);
  padding: .3rem .55rem;
  text-align: center;
}

.sheet thead th {
  position: sticky;
  top: 0;
  background: var(--surface-2);
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
}

.sheet tbody th,
.sheet tfoot th {
  text-align: left;
  font-weight: 600;
  white-space: nowrap;
}

.sheet td.now,
.sheet th.now { background: color-mix(in srgb, var(--accent-soft) 60%, transparent); }

.score-cell {
  width: 100%;
  min-width: 3.2rem;
  padding: .3rem;
  border: 1px dashed transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text);
  font: inherit;
  font-variant-numeric: tabular-nums;
  cursor: default;
}

.score-cell.locked { font-weight: 700; }

.score-cell.vorschau {
  border-color: var(--accent);
  color: var(--accent-dark);
  cursor: pointer;
}

.score-cell.vorschau:hover { background: var(--accent-soft); }
.score-cell:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

.sheet .sum-row { background: var(--surface-2); }
.sheet .sum-row td { font-weight: 600; font-variant-numeric: tabular-nums; }
.sheet .total th,
.sheet .total td { font-size: 1.02rem; font-weight: 700; }

.rank-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 1.2rem;
  display: grid;
  gap: .3rem;
  max-width: 22rem;
}

.rank-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .4rem .7rem;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
}

.game-stage h3 { margin: 0 0 .6rem; }
.game-stage .eyebrow { margin-bottom: .3rem; }
.game-stage > p:last-of-type { margin-bottom: 1rem; }

.lives {
  list-style: none;
  padding: 0;
  margin: 0 0 1.2rem;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.lives li {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .35rem .8rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 99px;
  font-size: .9rem;
}

.lives li.now { border-color: var(--accent); background: var(--accent-soft); }
.lives li.out { opacity: .45; text-decoration: line-through; }

.lives .pips { display: inline-flex; gap: 3px; }

.lives .pips i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.lives .pips i.off { background: var(--line); }

.rules {
  border-top: 1px solid var(--line);
  padding-top: 1rem;
  margin-top: 1.4rem;
  font-size: .93rem;
  color: var(--text-muted);
}

.rules summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
}

.rules ul { margin: .8rem 0 0; padding-left: 1.1rem; }
.rules li { margin-bottom: .35rem; }

/* ---------- Bank ---------- */

.rolls.gefahr { color: var(--accent); }

.verlauf { display: flex; gap: .35rem; align-self: center; }
.verlauf .icon-btn[disabled] { opacity: .35; cursor: default; }
.btn[hidden] { display: none; }

.bank-pot {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin: 0 0 1rem;
}

.bank-label {
  color: var(--text-muted);
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.bank-pot strong {
  font-size: clamp(2.4rem, 8vw, 3.4rem);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.bank-eingabe { margin: 0 0 1rem; }
.bank-eingabe .bank-label { margin: 0 0 .5rem; text-transform: none; letter-spacing: 0; }

.dice-row[hidden] { display: none; }

.summen-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .5rem;
  max-width: 24rem;
}

.summe {
  min-height: 3.2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 1.3rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: transform .12s, background .15s, border-color .15s;
}

.summe:hover:not([disabled]) { background: var(--surface-2); transform: translateY(-1px); }
.summe:active:not([disabled]) { transform: translateY(1px); }
.summe.pasch { font-size: 1rem; }

.summe.gefahr,
.summe.gefahr:hover:not([disabled]) {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}

.summe[disabled] { opacity: .35; cursor: not-allowed; }

.stat-titel { margin: 1.4rem 0 .7rem; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr));
  gap: .5rem;
  margin: 0 0 1rem;
}

.stat-kachel {
  display: flex;
  flex-direction: column;
  gap: .15rem;
  padding: .7rem .9rem;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
}

.stat-kachel .bank-label { font-size: .75rem; }
.stat-kachel strong { font-size: 1.15rem; overflow-wrap: anywhere; }
.stat-kachel > span:last-child { color: var(--text-muted); font-size: .85rem; }

.stat-tabelle td { text-align: center; font-variant-numeric: tabular-nums; }
.result .sheet-wrap { margin-bottom: 1.2rem; }

.bank-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  display: grid;
  gap: .5rem;
  max-width: 30rem;
}

.bank-list li {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 1rem;
  padding: .45rem .5rem .45rem .9rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.bank-list li.now { border-color: var(--accent); background: var(--accent-soft); }
.bank-list li.drin { opacity: .6; }

.bank-list .wer { min-width: 0; overflow-wrap: anywhere; }
.bank-list .wer small { margin-left: .5rem; color: var(--text-muted); font-weight: 600; }
.bank-list strong { font-variant-numeric: tabular-nums; }
.bank-list .btn { min-width: 5.5rem; }

.becher-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin: 1rem 0;
}

.becher-row .pick { margin: 0; }
.becher-row #bCount { width: 4.5rem; }

@media (max-width: 560px) {
  .game-tabs { width: 100%; justify-content: space-between; }
  .game-tabs button { flex: 1; padding: .45rem .5rem; }
  .die { --seite: 46px; }
}

/* ---------- Bienen: Tagebuch ---------- */

.log-section { margin-top: clamp(2.5rem, 5vw, 4rem); }
.log-head { margin-bottom: 1.8rem; }
.log-section .timeline { max-width: 62ch; }
.log-section .tl-item p { margin: 0; }
.log-more { margin-top: 1.6rem; }

/* ---------- Startseite: Neues aus dem Stockbuch ---------- */

.neues-liste { max-width: 62ch; }
.neues-liste p { margin: 0; }

/* ---------- Pflanzen: Ableger anfragen ---------- */

.ableger-btn { margin-top: 1.6rem; }

/* ---------- 404 ---------- */

.nicht-gefunden { text-align: center; }
.nicht-gefunden .section-head { margin-inline: auto; }
.nicht-gefunden .btn-row { justify-content: center; }
.nicht-gefunden .gross {
  font-size: clamp(4rem, 14vw, 8rem);
  font-weight: 800;
  line-height: 1;
  color: var(--accent);
  margin: 0 0 .5rem;
}

/* ---------- Bienen: Honig- und Orangetoene ---------- */

body.bienen {
  --accent:      #a85600;
  --accent-dark: #8a4600;
  --accent-soft: #ffeccd;
  --honig:       #f2b418;
  --bg:          #fbf7ec;
  --bg-alt:      #f6edda;
  --surface:     #fffdf6;
  --surface-2:   #f8f0dd;
  --line:        #e7dcc2;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) body.bienen {
    --accent:      #f5b73e;
    --accent-dark: #ffd27a;
    --accent-soft: #3b2a0e;
    --honig:       #ffc733;
    --bg:          #14110b;
    --bg-alt:      #1c1710;
    --surface:     #201b12;
    --surface-2:   #2a2214;
    --line:        #3c3223;
  }
}

:root[data-theme="dark"] body.bienen {
  --accent:      #f5b73e;
  --accent-dark: #ffd27a;
  --accent-soft: #3b2a0e;
  --honig:       #ffc733;
  --bg:          #14110b;
  --bg-alt:      #1c1710;
  --surface:     #201b12;
  --surface-2:   #2a2214;
  --line:        #3c3223;
}

body.bienen .site-head { border-bottom-color: color-mix(in srgb, var(--honig) 25%, var(--line)); }
body.bienen .stage { border-color: color-mix(in srgb, var(--honig) 35%, var(--line)); }
body.bienen .timeline { border-left-color: color-mix(in srgb, var(--honig) 45%, var(--line)); }
body.bienen .tl-item::before { border-color: var(--honig); }
body.bienen .tl-item.now::before {
  background: var(--honig);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
body.bienen .plant-title {
  background: linear-gradient(95deg, var(--accent-dark), #c47407);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
body.bienen .badge { background: color-mix(in srgb, var(--honig) 85%, #000); }

/* ---------- Bienen: Bienenjahr-Balken und Legende ---------- */

body.bienen {
  --ev-schwarm:        #c98200;
  --ev-koenigin:       #8a56c2;
  --ev-fuetterung:     #3e8a4c;
  --ev-behandlung:     #c4432b;
  --ev-milben:         #7b6650;
  --ev-restentmilbung: #3878bd;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) body.bienen {
    --ev-schwarm:        #ffc233;
    --ev-koenigin:       #c39cf0;
    --ev-fuetterung:     #73c983;
    --ev-behandlung:     #ff8a70;
    --ev-milben:         #c9b49b;
    --ev-restentmilbung: #7fb6f2;
  }
}

:root[data-theme="dark"] body.bienen {
  --ev-schwarm:        #ffc233;
  --ev-koenigin:       #c39cf0;
  --ev-fuetterung:     #73c983;
  --ev-behandlung:     #ff8a70;
  --ev-milben:         #c9b49b;
  --ev-restentmilbung: #7fb6f2;
}

.art-schwarm        { --ev: var(--ev-schwarm); }
.art-koenigin       { --ev: var(--ev-koenigin); }
.art-fuetterung     { --ev: var(--ev-fuetterung); }
.art-behandlung     { --ev: var(--ev-behandlung); }
.art-milben         { --ev: var(--ev-milben); }
.art-restentmilbung { --ev: var(--ev-restentmilbung); }

.jahr-balken {
  --reihen: 1;
  --ev-gr: 22px;
  position: sticky;
  top: calc(var(--kopf, 62px) + .5rem);
  z-index: 20;
  margin-bottom: 2rem;
  padding: .7rem 1.1rem .45rem;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(10px);
  border: 1px solid color-mix(in srgb, var(--honig) 35%, var(--line));
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.jb-kopf {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.jb-titel { color: var(--text-muted); }
.jb-datum { color: var(--accent); font-variant-numeric: tabular-nums; }

.jb-bahn {
  position: relative;
  margin: 0 11px;
  padding-top: calc(var(--reihen) * (var(--ev-gr) + 2px) + 4px);
}

.jb-marken { position: absolute; inset: 0 0 auto 0; height: calc(var(--reihen) * (var(--ev-gr) + 2px)); }

.jb-ev {
  display: inline-grid;
  place-items: center;
  width: var(--ev-gr, 22px);
  height: var(--ev-gr, 22px);
  padding: 0;
  border: 1.5px solid var(--ev, var(--text-muted));
  border-radius: 50%;
  background: var(--surface);
  color: var(--ev, var(--text-muted));
  cursor: pointer;
  transition: transform .15s ease, background .15s ease, color .15s ease;
}
.jb-ev svg { width: 64%; height: 64%; }
.jb-marken .jb-ev {
  position: absolute;
  bottom: calc(var(--reihe, 0) * (var(--ev-gr) + 2px));
  transform: translateX(-50%);
}
.jb-ev.geplant { opacity: .5; border-style: dashed; }
.jb-marken .jb-ev:hover,
.jb-marken .jb-ev:focus-visible,
.jb-marken .jb-ev.an {
  background: var(--ev, var(--text-muted));
  color: var(--surface);
  transform: translateX(-50%) scale(1.15);
  z-index: 1;
}

.jb-spur {
  position: relative;
  height: 12px;
  border-radius: 99px;
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--line);
  overflow: hidden;
}
.jb-vergangen {
  position: absolute;
  inset: 0 auto 0 0;
  background: linear-gradient(90deg, color-mix(in srgb, var(--honig) 25%, transparent), color-mix(in srgb, var(--honig) 55%, transparent));
}
.jb-band {
  position: absolute;
  top: 3px;
  bottom: 3px;
  border-radius: 99px;
  background: var(--ev);
  opacity: .85;
}
.jb-band.art-fuetterung { top: 6px; bottom: 2px; opacity: .7; }
.jb-band.art-behandlung { top: 2px; bottom: 6px; }
.jb-band.offen {
  background: repeating-linear-gradient(90deg, var(--ev) 0 4px, transparent 4px 7px);
}
.jb-heute {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  margin-left: -1px;
  background: var(--accent);
}

.jb-zeiger {
  position: absolute;
  bottom: 14px;
  height: calc(12px + 8px);
  width: 0;
  pointer-events: none;
  transition: left .12s linear;
}
.jb-zeiger::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -1.5px;
  width: 3px;
  border-radius: 2px;
  background: var(--text);
}
.jb-zeiger::after {
  content: "";
  position: absolute;
  top: -4px;
  left: -5px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--text);
  box-shadow: 0 0 0 2px var(--surface);
}

.jb-monate {
  position: relative;
  height: 14px;
  font-size: .68rem;
  color: var(--text-muted);
}
.jb-monate span {
  position: absolute;
  top: 1px;
  padding-left: 3px;
  border-left: 1px solid var(--line);
  line-height: 1.1;
  white-space: nowrap;
}

/* Liste links, Legende unten rechts daneben */
.log-raster {
  display: grid;
  grid-template-columns: minmax(0, 62ch) minmax(220px, 290px);
  justify-content: space-between;
  gap: 2.5rem;
}
.log-section .tl-item { scroll-margin-top: calc(var(--kopf, 62px) + var(--balken-unten, 140px)); }
.log-section .tl-item.aktiv .tl-when { text-decoration: underline 2px var(--honig); text-underline-offset: 4px; }

.jb-legende {
  align-self: end;
  position: sticky;
  bottom: 1.5rem;
  padding: 1rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.jb-legende .eyebrow { margin: 0 0 .6rem; }
.jb-legende ul { margin: 0; padding: 0; list-style: none; display: grid; gap: .55rem; }
.jb-legende li { display: flex; align-items: flex-start; gap: .6rem; line-height: 1.3; }
.jb-legende li .jb-ev { flex: none; cursor: default; }
.jb-legende strong { display: block; font-size: .9rem; }
.jb-legende small { display: block; font-size: .78rem; color: var(--text-muted); }
.jb-legende .lg-extra { align-items: center; padding-top: .35rem; border-top: 1px dashed var(--line); }
.jb-legende .lg-extra + .lg-extra { border-top: 0; padding-top: 0; }
.lg-zeiger {
  flex: none;
  position: relative;
  width: 22px;
  height: 22px;
}
.lg-zeiger::before {
  content: "";
  position: absolute;
  left: 9.5px;
  top: 5px;
  bottom: 0;
  width: 3px;
  border-radius: 2px;
  background: var(--text);
}
.lg-zeiger::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--text);
}

@media (max-width: 820px) {
  .log-raster { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
  .jb-legende { position: static; align-self: start; }
  .jb-legende ul { grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); }
}

@media (max-width: 560px) {
  .jahr-balken { --ev-gr: 18px; padding: .55rem .7rem .35rem; margin-bottom: 1.5rem; }
  .jb-kopf { font-size: .72rem; }
  .jb-monate { font-size: .6rem; }
  .jb-monate span:nth-child(even) { visibility: hidden; }
}

@media (prefers-reduced-motion: reduce) {
  .jb-zeiger, .jb-ev { transition: none; }
}

/* ---------- Seitenfarben: Startseite (grau) ---------- */

body.start {
  --accent:      #51585c;
  --accent-dark: #3a4043;
  --accent-soft: #e6e9ea;
  --bg:          #f5f5f4;
  --bg-alt:      #eaeae8;
  --surface:     #fcfcfb;
  --surface-2:   #f0f0ee;
  --line:        #dcdcd9;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) body.start {
    --accent:      #b6c0c5;
    --accent-dark: #d4dcdf;
    --accent-soft: #2b3134;
    --bg:          #111314;
    --bg-alt:      #17191a;
    --surface:     #1a1d1e;
    --surface-2:   #232728;
    --line:        #333839;
  }
}

:root[data-theme="dark"] body.start {
  --accent:      #b6c0c5;
  --accent-dark: #d4dcdf;
  --accent-soft: #2b3134;
  --bg:          #111314;
  --bg-alt:      #17191a;
  --surface:     #1a1d1e;
  --surface-2:   #232728;
  --line:        #333839;
}

body.start .hero::after {
  background: linear-gradient(180deg, rgba(10, 12, 13, .35), rgba(10, 12, 13, .74));
}
body.start .hero .eyebrow { color: #d3d9dc; }

/* ---------- Seitenfarben: Werdegang (lila mit Orange) ---------- */

body.cv {
  --accent:      #6d3fa0;
  --accent-dark: #58307f;
  --accent-soft: #efe6fa;
  --orange:      #d2740f;
  --bg:          #f7f5fa;
  --bg-alt:      #efebf5;
  --surface:     #fefcff;
  --surface-2:   #f3eff8;
  --line:        #ded7e7;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) body.cv {
    --accent:      #bb92f2;
    --accent-dark: #d6bdff;
    --accent-soft: #2a1d3c;
    --orange:      #f59b3c;
    --bg:          #121017;
    --bg-alt:      #181322;
    --surface:     #1c1726;
    --surface-2:   #251e31;
    --line:        #362c46;
  }
}

:root[data-theme="dark"] body.cv {
  --accent:      #bb92f2;
  --accent-dark: #d6bdff;
  --accent-soft: #2a1d3c;
  --orange:      #f59b3c;
  --bg:          #121017;
  --bg-alt:      #181322;
  --surface:     #1c1726;
  --surface-2:   #251e31;
  --line:        #362c46;
}

body.cv .tl-when { color: var(--orange); }
body.cv .tl-item::before { border-color: var(--orange); }
body.cv .tl-item.now::before {
  background: var(--orange);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
body.cv .chips li {
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--orange) 40%, transparent);
}

/* ---------- Seitenfarben: Wuerfelspiele (rot) ---------- */

body.wuerfel {
  --accent:      #c02626;
  --accent-dark: #9a1c1c;
  --accent-soft: #fde3e0;
  --bg:          #faf6f5;
  --bg-alt:      #f4eae8;
  --surface:     #fffcfb;
  --surface-2:   #f8eeec;
  --line:        #e7d6d2;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) body.wuerfel {
    --accent:      #f4715f;
    --accent-dark: #ffa596;
    --accent-soft: #3a1a16;
    --bg:          #17100f;
    --bg-alt:      #1e1413;
    --surface:     #221715;
    --surface-2:   #2c1e1b;
    --line:        #3f2d29;
  }
}

:root[data-theme="dark"] body.wuerfel {
  --accent:      #f4715f;
  --accent-dark: #ffa596;
  --accent-soft: #3a1a16;
  --bg:          #17100f;
  --bg-alt:      #1e1413;
  --surface:     #221715;
  --surface-2:   #2c1e1b;
  --line:        #3f2d29;
}

/* ---------- Wuerfelbecher: Verteilung ---------- */

.verteilung-block {
  border-top: 1px solid var(--line);
  margin-top: 1.6rem;
  padding-top: 1.3rem;
}

.verteilung-block h3 { margin: 0 0 .7rem; }

.legende {
  display: flex;
  flex-wrap: wrap;
  gap: 1.1rem;
  margin: 0 0 .9rem;
  font-size: .85rem;
  color: var(--text-muted);
}

.legende span { display: inline-flex; align-items: center; gap: .45rem; }

.legende i {
  width: 13px;
  height: 13px;
  border-radius: 3px;
  display: inline-block;
}

.legende i.theorie {
  width: 20px;
  height: 4px;
  border-radius: 2px;
  background: var(--accent);
  opacity: .55;
}

.legende i.ist { background: var(--accent); }

.verteilung {
  overflow-x: auto;
  padding-bottom: .3rem;
}

/* Waechst mit den Spalten mit, damit die Kurve auch beim Scrollen passt. */
.plot {
  position: relative;
  width: max-content;
  min-width: 100%;
}

.kurve {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 120px;
  z-index: 0;
}

.kurve .flaeche { fill: var(--accent-soft); opacity: .75; }

.kurve .linie {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linejoin: round;
  opacity: .55;
}

.saeulen {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
}

.saeule {
  flex: 1 1 0;
  min-width: 11px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .3rem;
}

.saeule .balken {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: 100%;
  height: 120px;
}

.saeule .ist {
  width: 62%;
  min-height: 2px;
  border-radius: 3px 3px 0 0;
  background: color-mix(in srgb, var(--accent) 88%, transparent);
}

.saeule .zahl {
  font-size: .7rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

/* ---------- Teaser-Bilder auf der Startseite ---------- */

.split.bild-links { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); }
@media (max-width: 820px) { .split.bild-links { grid-template-columns: minmax(0, 1fr); } }

/* Hochformat im Querformat-Rahmen zeigen, ohne die Datei anzufassen. */
.polaroid.quer img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center 10%;
}

/* ---------- Impressum ---------- */

.impressum { max-width: 62ch; }
.impressum h2 { font-size: 1.15rem; margin: 2rem 0 .4rem; }
.impressum h2:first-child { margin-top: 0; }
.impressum p { margin: 0 0 .9rem; }
