/* Version 20 – Lebensschritte Balance
   Die wichtigsten Farben und die Überschriftenschrift hier ändern. */
:root {
  --bg: #f8f5ed;
  --soft: #edddd4;
  --accent: #3e5d4d;
  --ink: #2f3f35;
  --serif: 'Playfair Display';
  /* Terrakotta-Akzent (bisher direkt im Hero-Titel verwendet) */
  --terra: #a15b45;
  /* abgedunkelte Terrakotta für kleine Schrift (WCAG AA auch auf Rosé) */
  --terra-text: color-mix(in srgb,var(--terra) 75%,var(--ink));
  /* Status-Farben für den Kurskalender: Grün = Plätze frei, Rot = ausgebucht.
     Beide erreichen mit weißer Schrift und auf der hellen Fläche WCAG AA. */
  --status-free: #2a6b45;
  --status-free-bg: #e2eee5;
  --status-full: #a93a3a;
  --status-full-bg: #f6e2df;
  --status-closed: #5a5e57;
  --status-closed-bg: #ebe8e1;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 30px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.65 'DM Sans',sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

h1,
h2,
h3,
p,
figure {
  margin: 0;
}

h1,
h2,
h3 {
  font-family: var(--serif),Georgia,serif;
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -.045em;
}

h1 {
  font-size: 68px;
}

h2 {
  font-size: 48px;
}

h3 {
  font-size: 28px;
}

em {
  font-weight: 400;
  color: var(--accent);
}

header {
  height: 104px;
  max-width: 1600px;
  padding: 0 6%;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid color-mix(in srgb,var(--ink) 12%,transparent);
  position: relative;
  z-index: 10;
  background: var(--bg);
}

.brand {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand>span {
  font-family: var(--serif),Georgia,serif;
  font-size: 30px;
  letter-spacing: -1.2px;
}

.brand i {
  font-size: 25px;
  font-style: normal;
  color: var(--accent);
  margin-left: 10px;
}

.brand small {
  font-size: 9px;
  letter-spacing: 1.9px;
  margin-top: 8px;
}

nav {
  display: flex;
  gap: 34px;
  align-items: center;
  font-size: 14px;
}

nav a:hover,
.textlink:hover {
  text-decoration: underline;
  text-underline-offset: 6px;
}

.navcontact {
  border: 1px solid var(--accent);
  padding: 12px 23px;
  border-radius: 30px;
}

.navcontact span {
  margin-left: 22px;
}

.menubutton {
  display: none;
}

.eyebrow {
  font-size: 11px;
  letter-spacing: 2px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 26px;
}

.hero {
  position: relative;
  max-width: 1600px;
  margin: auto;
  min-height: 690px;
}

.copy {
  position: relative;
  z-index: 2;
}

.intro {
  font-size: 17px;
  line-height: 1.75;
  max-width: 490px;
  margin: 28px 0 30px;
}

.actions {
  display: flex;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
}

.button {
  background: var(--accent);
  color: #fff;
  padding: 15px 23px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 26px;
  border: 1px solid var(--accent);
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  min-height: 52px;
}

.button:hover {
  filter: brightness(.9);
}

.textlink {
  font-size: 13px;
  padding: 12px 0;
  display: inline-flex;
  gap: 20px;
  align-items: center;
}

.micro {
  font-size: 11px;
  letter-spacing: .3px;
  margin-top: 38px;
  opacity: .8;
}

.micro span {
  margin: 0 10px;
}

.photocaption {
  position: absolute;
  bottom: 26px;
  left: 30px;
  background: var(--bg);
  padding: 15px 22px;
  min-width: 190px;
  line-height: 1.5;
  z-index: 2;
}

.photocaption span {
  display: block;
  font-family: var(--serif);
  font-size: 22px;
}

.photocaption small {
  font-size: 11px;
}

.portrait {
  object-position: 50% 33%;
}

.section {
  padding: 96px 7%;
  max-width: 1600px;
  margin: auto;
}

.services {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 100px;
  border-top: 1px solid color-mix(in srgb,var(--ink) 15%,transparent);
}

.sectionintro>p {
  margin-top: 25px;
  max-width: 320px;
}

.servicelist {
  border-top: 1px solid color-mix(in srgb,var(--ink) 20%,transparent);
}

.service {
  display: flex;
  gap: 20px;
  padding: 23px 0;
  border-bottom: 1px solid color-mix(in srgb,var(--ink) 20%,transparent);
}

.service>small {
  color: var(--terra-text);
  font-size: 12px;
  margin-top: 6px;
}

.service>span {
  margin-left: auto;
}

.service p {
  font-size: 14px;
  line-height: 1.55;
  margin-top: 10px;
  max-width: 410px;
}

.service:hover h3,
.service:hover>span {
  color: var(--terra);
}

.servicetag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--terra-text);
  margin-bottom: 8px;
}

.about {
  background: var(--soft);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8%;
  align-items: center;
}

.about>div:first-child {
  height: 480px;
}

.about img {
  object-position: center;
}

.about p {
  margin-top: 22px;
}

.about .textlink {
  margin-top: 20px;
}

.courses {
  text-align: center;
}

.coursegrid {
  text-align: left;
  display: grid;
  grid-template-columns: repeat(3,1fr);
  margin-top: 50px;
  gap: 22px;
}

.coursegrid article {
  padding: 30px;
  background: var(--soft);
  border-top: 3px solid var(--terra);
}

.coursegrid article>span {
  font-size: 10px;
  letter-spacing: 1.4px;
  color: var(--terra-text);
  font-weight: 700;
}

.coursegrid h3 {
  margin: 25px 0 16px;
}

.coursegrid p {
  font-size: 15px;
  min-height: 74px;
}

.coursegrid a {
  display: inline-block;
  margin-top: 28px;
  font-size: 14px;
  border-bottom: 1px solid;
}

.faq {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 9%;
  padding-top: 20px;
}

.faq details {
  border-top: 1px solid color-mix(in srgb,var(--ink) 20%,transparent);
  padding: 23px 0;
}

.faq summary {
  cursor: pointer;
  font-weight: 500;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: '+';
  color: var(--terra);
  font-size: 22px;
  line-height: 1;
}

.faq details[open] summary::after {
  content: '–';
}

.faq details a,
.contactmail a,
.kcheck a {
  border-bottom: 1px solid var(--terra);
}

.faq details p {
  margin-top: 18px;
  font-size: 15px;
}

.contact {
  text-align: center;
  background: var(--soft);
  padding-top: 80px;
  padding-bottom: 80px;
}

.contact h2 {
  font-size: 64px;
}

.contact p {
  margin: 25px 0;
}

.contact .actions {
  justify-content: center;
  margin-bottom: 24px;
}

.contact small {
  font-size: 12px;
}

.contact .contactmail {
  margin: 0 0 22px;
  font-size: 14px;
}

.contact .contactnote {
  max-width: 520px;
  margin: 0 auto 28px;
  padding: 16px 20px;
  background: var(--bg);
  border-left: 3px solid var(--terra);
  border-radius: 4px;
  font-size: 14px;
  text-align: left;
}

.contact h2 em {
  color: var(--terra);
}

.eyebrow.terra {
  color: var(--terra-text);
}

.footerphone {
  display: block;
  font-size: 11px;
  opacity: .75;
}

button.textlink {
  background: none;
  border: 0;
  color: inherit;
  cursor: pointer;
}

.secondary {
  background: transparent;
  color: var(--accent);
}

footer {
  padding: 45px 7% 26px;
  display: flex;
  gap: 30px;
  justify-content: space-between;
  flex-wrap: wrap;
  align-items: center;
  font-size: 12px;
}

footer p {
  width: 100%;
  font-size: 10px;
  opacity: .7;
  border-top: 1px solid color-mix(in srgb,var(--ink) 15%,transparent);
  padding-top: 20px;
}

.footerbrand {
  font-family: var(--serif);
  font-size: 26px;
}

.skip {
  position: absolute;
  left: 15px;
  top: -70px;
  background: var(--ink);
  color: white;
  z-index: 100;
  padding: 12px;
}

.skip:focus {
  top: 12px;
}

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

.forestcaption {
  position: absolute;
  bottom: 25px;
  left: 7%;
  right: 7%;
  border-top: 1px solid #ffffff60;
  padding-top: 15px;
  font-size: 9px;
  letter-spacing: 2px;
}

.forestcaption span {
  float: right;
}

.pathway b {
  font: 11px 'DM Sans';
  font-weight: 400;
  align-self: flex-start;
  margin-top: 5px;
}

.pathway>a span {
  flex: 1;
}

.pathway small {
  display: block;
  font: 11px 'DM Sans';
  margin-top: 9px;
}

.pathperson img {
  width: 70px;
  height: 90px;
  border-radius: 50px;
}

.pathperson span {
  font-family: var(--serif);
  font-size: 24px;
  line-height: 1.2;
}

.berryphoto {
  position: relative;
  padding: 45px 55px 45px 0;
}

.berryphoto img {
  border-radius: 200px 200px 0 0;
  max-height: 625px;
}

.berrylabel {
  position: absolute;
  bottom: 62px;
  left: -35px;
  padding: 18px 28px;
  background: var(--bg);
  font: 29px/1.1 var(--serif);
  color: var(--ink);
}

.centerphoto img {
  object-position: center 46%;
}

.collagephotos {
  position: relative;
  height: 570px;
}

.collagephotos>span {
  position: absolute;
  bottom: 55px;
  right: 0;
  width: 190px;
  font: italic 27px/1.2 var(--serif);
  text-align: center;
}

.bluephoto img {
  border-radius: 45% 45% 8% 8%;
  object-position: center 26%;
}

.bluephoto>span {
  position: absolute;
  bottom: -20px;
  left: -45px;
  background: var(--bg);
  padding: 25px 35px;
  font: 28px/1.15 var(--serif);
}

.miniperson img {
  height: 72px;
  width: 72px;
  border-radius: 50%;
  object-position: center 20%;
}

.miniperson span {
  font-size: 13px;
}

.miniperson small {
  font-size: 10px;
}

.balance .hero {
  margin: 28px auto 0;
  max-width: 1280px;
  display: grid;
  grid-template-columns: 57% 43%;
  background: var(--soft);
  border-radius: 10px 10px 0 0;
  overflow: hidden;
}

.balance .copy {
  padding: 60px 9% 35px;
}

.balance h1 {
  font-size: 62px;
}

.balance h1 em {
  color: var(--terra);
}

.balance .intro {
  font-size: 16px;
}

.balance .balancephoto {
  padding: 35px 35px 30px 0;
  position: relative;
}

.balancephoto img {
  border-radius: 230px 230px 10px 10px;
  height: 550px;
}

.balance .photocaption {
  bottom: 50px;
  left: 20px;
  min-width: 0;
}

.balancebadge {
  position: absolute;
  right: 5px;
  top: 35px;
  border-radius: 50%;
  background: var(--terra);
  color: #fff;
  height: 130px;
  width: 130px;
  display: grid;
  place-content: center;
  text-align: center;
  font: 22px/1.2 var(--serif);
  transform: rotate(9deg);
}

.balancebadge em {
  color: var(--soft);
  font-size: 16px;
}

.balance .micro {
  display: none;
}

.balance .button {
  border-radius: 40px;
}

.balancesteps {
  grid-column: 1/3;
  display: grid;
  grid-template-columns: repeat(4,1fr);
  background: var(--accent);
  color: var(--bg);
}

.balancesteps a {
  padding: 23px 30px;
  border-right: 1px solid #ffffff40;
  font-size: 17px;
}

.balancesteps a:last-child {
  border-right: 0;
}

.balancesteps a:hover {
  background: color-mix(in srgb,var(--ink) 25%,transparent);
}

.balancesteps small {
  font-size: 10px;
  margin-right: 16px;
  color: #d3dbc9;
}

.balance .services {
  border-top: 0;
}

@media(min-width:1601px) {
  header {
    max-width: none;
    padding-left: calc((100% - 1408px)/2);
    padding-right: calc((100% - 1408px)/2);
  }
}

@media(max-width:1050px) and (min-width:701px) {
  h1,
  .balance h1 {
    font-size: 52px;
  }

  .hero .copy {
    padding: 35px;
  }

  .services {
    gap: 45px;
  }

  .actions {
    gap: 10px;
  }

  .textlink {
    font-size: 11px;
  }

  .balance .hero {
    margin: 25px;
  }
}

@media(max-width:700px) {
  body {
    font-size: 15px;
  }

  header {
    height: 90px;
    padding: 0 23px;
  }

  .brand>span {
    font-size: 25px;
  }

  .brand small {
    font-size: 7px;
    letter-spacing: 1.6px;
    margin-top: 6px;
  }

  .brand i {
    font-size: 22px;
    margin-left: 8px;
  }

  .menubutton {
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid color-mix(in srgb,var(--accent) 40%,transparent);
    border-radius: 30px;
    background: transparent;
    color: var(--ink);
    font-size: 11px;
    padding: 11px 15px;
  }

  .menubutton span {
    font-size: 13px;
  }

  nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 90px;
    background: var(--bg);
    padding: 25px;
    box-shadow: 0 15px 20px #0001;
  }

  nav.open {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }

  nav a {
    padding: 8px;
  }

  .navcontact {
    border: 0;
    border-radius: 0;
  }

  h1 {
    font-size: 46px!important;
    letter-spacing: -.045em;
  }

  h2 {
    font-size: 38px!important;
  }

  h3 {
    font-size: 25px;
  }

  .eyebrow {
    font-size: 9px;
    letter-spacing: 1.4px;
    margin-bottom: 20px;
  }

  .intro {
    font-size: 15px!important;
    line-height: 1.7;
    margin: 21px 0 24px!important;
  }

  .actions {
    gap: 8px 18px;
  }

  .button {
    min-height: 50px;
    font-size: 13px;
    padding: 13px 18px;
    gap: 20px;
  }

  .textlink {
    font-size: 12px;
    gap: 12px;
  }

  .micro {
    font-size: 9px;
    margin-top: 25px;
  }

  .micro span {
    margin: 0 4px;
  }

  .hero {
    min-height: 0!important;
    display: flex!important;
    flex-direction: column;
    padding: 35px 24px!important;
    gap: 0!important;
    max-width: 100%!important;
    margin: 0!important;
  }

  .hero .copy {
    padding: 0!important;
    width: 100%!important;
  }

  .section {
    padding: 60px 24px;
  }

  .services {
    display: block;
  }

  .sectionintro>p {
    margin-top: 20px;
  }

  .servicelist {
    margin-top: 35px;
  }

  .service {
    gap: 15px;
    padding: 21px 0;
  }

  .service h3 {
    font-size: 24px;
  }

  .service p {
    font-size: 13px;
  }

  .about {
    display: flex;
    flex-direction: column;
    gap: 35px;
  }

  .about>div:first-child {
    height: 285px;
    width: 100%;
  }

  .about p {
    font-size: 14px;
  }

  .courses {
    text-align: left;
  }

  .coursegrid {
    display: block;
    margin-top: 30px;
  }

  .coursegrid article {
    margin-top: 12px;
    padding: 25px;
  }

  .coursegrid h3 {
    margin-top: 20px;
  }

  .coursegrid p {
    min-height: 0;
  }

  .coursegrid a {
    margin-top: 20px;
  }

  .faq {
    display: block;
    padding-top: 5px;
  }

  .faq>div:last-child {
    margin-top: 30px;
  }

  .faq summary {
    font-size: 14px;
  }

  .contact .actions {
    flex-direction: column;
    gap: 12px;
  }

  .contact .button {
    width: 100%;
  }

  .contact small {
    font-size: 11px;
  }

  footer {
    padding: 35px 24px 22px;
    gap: 17px;
  }

  footer>span,
  footer>a {
    display: block;
    width: 100%;
  }

  footer p {
    font-size: 10px;
  }

  .photocaption {
    bottom: 15px;
    left: 15px;
    padding: 10px 16px;
  }

  .photocaption span {
    font-size: 21px;
  }

  .photocaption small {
    font-size: 10px;
  }

  .forestcaption {
    left: 25px;
    right: 25px;
    bottom: 19px;
    font-size: 8px;
  }

  .forestcaption span {
    display: none;
  }

  .pathperson img {
    height: 75px;
    width: 60px;
  }

  .pathperson span {
    font-size: 23px;
  }

  .berryphoto img {
    height: 100%;
    object-position: center 25%;
    border-radius: 150px 150px 0 0;
  }

  .berrylabel {
    left: 0;
    bottom: 20px;
    font-size: 25px;
    padding: 18px 23px;
  }

  .chapterphoto img {
    object-position: center 25%;
  }

  .collagephotos>span {
    right: -5px;
    bottom: 35px;
    width: 145px;
    font-size: 23px;
  }

  .bluephoto>span {
    left: -32px;
    bottom: -20px;
    padding: 18px 25px;
    font-size: 25px;
  }

  .miniperson img {
    width: 57px;
    height: 57px;
  }

  .miniperson span {
    font-size: 11px;
  }

  .miniperson small {
    font-size: 9px;
  }

  .minimal-line span {
    text-align: right;
  }

  .balance .hero {
    padding: 0!important;
    margin: 18px!important;
    width: calc(100% - 36px);
    border-radius: 8px;
  }

  .balance .hero .copy {
    padding: 31px 24px 12px!important;
  }

  .balance h1 {
    font-size: 40px!important;
  }

  .balance .eyebrow {
    font-size: 8px;
  }

  .balance .intro {
    font-size: 14px!important;
  }

  .balance .textlink {
    display: none;
  }

  .balance .balancephoto {
    padding: 18px 24px 24px;
    width: 100%;
  }

  .balancephoto img {
    height: 355px;
    border-radius: 160px 160px 8px 8px;
    object-position: center 25%;
  }

  .balance .photocaption {
    bottom: 40px;
    left: 40px;
    padding: 10px 13px;
  }

  .balance .photocaption span {
    font-size: 19px;
  }

  .balance .photocaption small {
    font-size: 9px;
  }

  .balancebadge {
    right: 13px;
    top: 20px;
    height: 95px;
    width: 95px;
    font-size: 20px;
  }

  .balancebadge em {
    font-size: 12px;
  }

  .balancesteps {
    width: 100%;
    display: block;
  }

  .balancesteps a {
    display: block;
    border: 0;
    border-top: 1px solid #ffffff30;
    padding: 14px 25px;
    font-size: 15px;
  }
}

/* =====================================================================
   Kurskalender (kurse.html)
   Seitenkopf, Filter, Monatskalender, Detailpanel, Kursliste und
   Anmelde-Dialog. Status-Farben stehen oben unter :root (--status-…).
   ===================================================================== */

nav a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 6px;
}

/* Seitenkopf im Stil des Hero */
.pagehead {
  position: relative;
  max-width: 1280px;
  margin: 28px auto 0;
  background: var(--soft);
  border-radius: 10px 10px 0 0;
  overflow: hidden;
}

.pagehead::after {
  content: '✳';
  position: absolute;
  right: 7%;
  top: 40px;
  font: 220px/1 var(--serif),Georgia,serif;
  color: var(--terra);
  opacity: .14;
  pointer-events: none;
}

.pagehead .copy {
  padding: 56px 9% 44px;
  max-width: 820px;
}

.pagehead .intro {
  font-size: 16px;
  max-width: 560px;
}

.pagehead .balancesteps {
  grid-template-columns: repeat(3,1fr);
}

.pagehead .balancesteps small {
  font-weight: 700;
  letter-spacing: 1px;
}

/* Filter und Legende */
.kursecal {
  padding-top: 72px;
}

.kursecal-intro {
  margin-bottom: 32px;
}

.ktoolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 40px;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.kfilters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.kchip {
  min-height: 44px;
  padding: 9px 18px;
  border: 1px solid color-mix(in srgb,var(--ink) 30%,transparent);
  border-radius: 30px;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.kchip:hover {
  border-color: var(--ink);
}

.kchip[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}

.klegend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 12px;
}

.klegend li {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

/* Typ-Kennzeichnung (Palette, bewusst ohne Grün/Rot):
   GV = dunkel gefüllt, RB = Rosé, WE = Kontur */
.ktype {
  display: inline-block;
  padding: 1px 7px;
  border: 1px solid var(--ink);
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .8px;
  line-height: 1.6;
}

.ktype--gv {
  background: var(--ink);
  color: var(--bg);
}

.ktype--rb {
  background: var(--soft);
  color: var(--ink);
  border-color: color-mix(in srgb,var(--ink) 35%,transparent);
}

.ktype--we {
  background: transparent;
  color: var(--ink);
}

.ktypeline {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--terra-text);
}

/* Layout: Kalender links, Detailpanel rechts */
.klayout {
  display: grid;
  grid-template-columns: minmax(0,1.6fr) minmax(300px,1fr);
  gap: 28px;
  align-items: start;
}

.kcal {
  background: color-mix(in srgb,var(--bg) 35%,#fff);
  border: 1px solid color-mix(in srgb,var(--ink) 12%,transparent);
  border-radius: 10px;
  padding: 22px;
}

.kcal-head {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.kcal-title {
  font-size: 32px;
}

.kcal-nav {
  display: flex;
  gap: 6px;
}

.kcal-today,
.kcal-arrow {
  min-width: 44px;
  min-height: 44px;
  border: 1px solid color-mix(in srgb,var(--ink) 30%,transparent);
  border-radius: 30px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.kcal-today {
  padding: 0 16px;
  font-size: 13px;
  font-weight: 500;
}

.kcal-arrow {
  font-size: 22px;
  line-height: 1;
}

.kcal-today:hover,
.kcal-arrow:hover:not(:disabled) {
  border-color: var(--ink);
}

.kcal-arrow:disabled {
  opacity: .3;
  cursor: default;
}

.kcal-weekdays,
.kcal-grid {
  display: grid;
  grid-template-columns: repeat(7,minmax(0,1fr));
  gap: 4px;
}

.kcal-weekdays {
  padding-bottom: 8px;
  border-bottom: 1px solid color-mix(in srgb,var(--ink) 15%,transparent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-align: center;
  color: color-mix(in srgb,var(--ink) 75%,transparent);
}

.kcal-grid {
  margin-top: 6px;
}

.kday {
  min-width: 0;
  min-height: 92px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px 4px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  cursor: pointer;
}

.kday--blank {
  pointer-events: none;
}

.kday:hover {
  background: color-mix(in srgb,var(--soft) 60%,transparent);
}

.kday-num {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-weight: 500;
}

.kday--past .kday-num {
  opacity: .45;
}

.kday[aria-current="date"] .kday-num {
  background: var(--ink);
  color: var(--bg);
  opacity: 1;
}

.kday--selected {
  background: var(--soft);
  box-shadow: inset 0 0 0 2px var(--ink);
}

.kday-events {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 3px;
  width: 100%;
}

/* Termin-Markierung: Status-Farbe ist dominant, das Kürzel trägt die Typ-Kennzeichnung */
.kev {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  justify-content: center;
  padding: 2px 4px;
  border-radius: 5px;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
  white-space: nowrap;
}

.kev--free,
.kev--few {
  background: var(--status-free);
}

.kev--full {
  background: var(--status-full);
}

.kev--closed {
  background: var(--status-closed);
}

.klegend .kev {
  width: 22px;
  height: 22px;
  padding: 0;
}

.kev-code {
  padding: 0 4px;
  border-radius: 3px;
  font-size: 10px;
  letter-spacing: .5px;
}

.kev--gv .kev-code {
  background: var(--ink);
  color: var(--bg);
}

.kev--rb .kev-code {
  background: var(--soft);
  color: var(--ink);
}

.kev--we .kev-code {
  box-shadow: inset 0 0 0 1px #fff;
}

.kev-label {
  font-weight: 500;
}

.kcal-hint {
  margin-top: 16px;
  font-size: 12px;
  opacity: .8;
}

/* Detailpanel (Desktop: neben dem Kalender, Handy: Bottom-Sheet) */
.kpanel {
  position: sticky;
  top: 20px;
  max-height: calc(100vh - 40px);
  overflow: auto;
  background: var(--soft);
  border-radius: 10px;
  padding: 28px;
}

.kpanel:focus {
  outline: none;
}

.kpanel:focus-visible {
  outline: 3px solid var(--accent);
}

.kpanel-close {
  display: none;
}

.kpanel-backdrop {
  display: none;
}

.kpanel-title {
  font-size: 28px;
  margin-bottom: 18px;
}

.kpanel-empty {
  font-size: 14px;
}

.kdetail+.kdetail {
  margin-top: 26px;
  padding-top: 26px;
  border-top: 1px solid color-mix(in srgb,var(--ink) 20%,transparent);
}

.kdetail-title {
  margin: 12px 0 14px;
  font: 400 23px/1.15 var(--serif),Georgia,serif;
  letter-spacing: -.03em;
}

.kstatus {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 6px 14px;
  border-radius: 30px;
  font-size: 13px;
  font-weight: 700;
}

.kstatus--free,
.kstatus--few {
  background: var(--status-free-bg);
  color: var(--status-free);
}

.kstatus--full {
  background: var(--status-full-bg);
  color: var(--status-full);
}

.kstatus--closed {
  background: var(--status-closed-bg);
  color: var(--status-closed);
}

.kfacts {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 16px;
  margin: 18px 0;
  font-size: 14px;
}

.kfacts dt {
  font-weight: 600;
}

.kfacts dd {
  margin: 0;
}

.kdates {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 4px 12px;
  margin: 0 0 20px;
  padding: 14px 0 0;
  border-top: 1px solid color-mix(in srgb,var(--ink) 15%,transparent);
  list-style: none;
  font-size: 13px;
}

.kdates--past {
  opacity: .55;
}

.kdates--current {
  font-weight: 700;
  color: var(--terra-text);
}

/* Warteliste: klar anders als „Anmelden“ – Kontur statt Fläche */
.button.kwait {
  background: transparent;
  color: var(--ink);
  border: 1.5px dashed var(--ink);
}

button.button {
  cursor: pointer;
}

/* Kursliste */
.klist {
  background: var(--soft);
}

.klist-count {
  margin-top: 18px;
  font-size: 13px;
}

.kcards {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 22px;
  margin-top: 30px;
}

.kcard {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 28px;
  background: var(--bg);
  border-top: 4px solid var(--status-free);
}

.kcard--full {
  border-top-color: var(--status-full);
}

.kcard--closed {
  border-top-color: var(--status-closed);
}

.kcard-type {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.4px;
  color: var(--terra-text);
}

.kcard h3 {
  margin: 20px 0 12px;
  font-size: 25px;
}

.kcard-meta {
  font-size: 14px;
  margin-bottom: 16px;
}

.kcard-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  align-items: center;
  margin-top: auto;
  padding-top: 22px;
}

.kursecontact h2 {
  font-size: 52px;
}

/* MyMiya: Laden, Fehler, Kursbeschreibung */
.kloading {
  margin: 0 0 24px;
  color: color-mix(in srgb,var(--ink) 75%,transparent);
  font-size: 14px;
}

.kerror {
  max-width: 620px;
  padding: 22px 24px;
  background: var(--bg);
  border-left: 3px solid var(--terra);
  border-radius: 4px;
}

.kerror p {
  margin: 0 0 18px;
}

.kurse-error .ktoolbar,
.kurse-error .klayout,
.kurse-error .kcal-hint,
.kurse-error #kommende {
  display: none;
}

.kdetail-text {
  margin: 10px 0 0;
  font-size: 14px;
  white-space: pre-line;
}

/* Tablet: Panel unter dem Kalender */
@media(max-width:1050px) {
  .klayout {
    grid-template-columns: minmax(0,1fr);
  }

  .kpanel {
    position: static;
    max-height: none;
  }

  .kcards {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }

  .kday {
    min-height: 80px;
  }
}

@media(max-width:1050px) and (min-width:701px) {
  .pagehead {
    margin: 25px;
  }

  .pagehead .copy {
    padding: 40px 35px;
  }
}

/* Handy */
@media(max-width:700px) {
  .pagehead {
    margin: 18px;
    border-radius: 8px;
  }

  .pagehead::after {
    font-size: 120px;
    top: 18px;
    right: 16px;
  }

  .pagehead .copy {
    padding: 28px 24px 26px;
  }

  .pagehead .balancesteps {
    display: block;
  }

  .kursecal {
    padding-top: 48px;
  }

  .ktoolbar {
    margin-bottom: 18px;
  }

  .klegend {
    font-size: 11px;
    gap: 6px 14px;
  }

  .kcal {
    margin: 0 -12px;
    padding: 14px 8px;
  }

  .kcal-head {
    padding: 0 4px;
  }

  .kcal-title {
    font-size: 22px!important;
    white-space: nowrap;
  }

  .kcal-head {
    gap: 8px;
  }

  .kcal-today {
    padding: 0 12px;
  }

  .kcal-weekdays,
  .kcal-grid {
    gap: 2px;
  }

  .kcal-weekdays {
    font-size: 10px;
    letter-spacing: .5px;
  }

  .kday {
    min-height: 54px;
    padding: 4px 1px;
    gap: 2px;
    border-radius: 6px;
  }

  .kday-num {
    width: 26px;
    height: 26px;
  }

  .kev {
    gap: 2px;
    padding: 1px 2px;
    font-size: 9px;
    border-radius: 4px;
  }

  .kev-code {
    font-size: 8.5px;
    padding: 0 2px;
    letter-spacing: 0;
  }

  .kev-label {
    display: none;
  }

  .kcal-hint {
    padding: 0 4px;
  }

  /* Bottom-Sheet */
  .kpanel {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    z-index: 60;
    max-height: 85vh;
    padding: 34px 22px 28px;
    border-radius: 18px 18px 0 0;
    box-shadow: 0 -10px 40px #0003;
    transform: translateY(100%);
    visibility: hidden;
    transition: transform .28s ease,visibility 0s linear .28s;
  }

  .kpanel::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 50%;
    width: 44px;
    height: 4px;
    margin-left: -22px;
    border-radius: 4px;
    background: color-mix(in srgb,var(--ink) 25%,transparent);
  }

  .kpanel--open {
    transform: none;
    visibility: visible;
    transition: transform .28s ease;
  }

  .kpanel-close {
    display: block;
    position: absolute;
    top: 18px;
    right: 16px;
  }

  .kpanel-title {
    font-size: 24px;
    padding-right: 50px;
  }

  .kpanel-backdrop:not([hidden]) {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 55;
    background: color-mix(in srgb,var(--ink) 45%,transparent);
  }

  body.ksheet-open {
    overflow: hidden;
  }

  .kcards {
    display: block;
    margin-top: 24px;
  }

  .kcard {
    margin-top: 12px;
    padding: 24px;
  }

  .kcard h3 {
    font-size: 23px;
  }

  .kcard-actions .button {
    width: 100%;
  }

  .kursecontact h2 {
    font-size: 38px;
  }
}

/* Impressum, Datenschutz, 404 */
.footerlinks {
  display: inline-flex;
  gap: 22px;
}

.legal {
  max-width: 820px;
  padding-top: 64px;
}

.legal h2 {
  margin: 44px 0 14px;
  font-size: 28px;
}

.legal h2:first-child {
  margin-top: 0;
}

.legal p {
  margin: 0 0 14px;
  max-width: 68ch;
  line-height: 1.65;
}

.legal p a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal .actions {
  margin-top: 24px;
}

.legalintro {
  font-size: 17px;
  margin-bottom: 40px!important;
}

.legalnote {
  margin-top: 44px!important;
  font-size: 13px;
  opacity: .75;
}

@media(max-width:700px) {
  .legal {
    padding-top: 40px;
  }

  .legal h2 {
    font-size: 25px!important;
  }
}

@media(prefers-reduced-motion:reduce) {
  html {
    scroll-behavior: auto;
  }

  .kpanel,
  .kpanel--open {
    transition: none;
  }
}
