html:has(#lichtung:target, #wisent:target) { scroll-behavior: auto; }
header.top { background-color: #152a20; }

.clearing {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(230px, 1fr);
  overflow: hidden;
  border-radius: 24px;
  background: #173327;
  color: #f8efdd;
  box-shadow: 0 16px 36px -28px #152a20;
}

.clearing-scene {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  aspect-ratio: 390 / 250;
  background: #405538;
}

.clearing-map, .clearing-fog { position: absolute; inset: 0; width: 100%; height: 100%; }
.clearing-map { display: block; object-fit: cover; }
.clearing-fog {
  pointer-events: none;
  background: radial-gradient(ellipse at 51% 44%, #ebeede 0 15%, #eef0dfef 27%, #eef3de85 45%, transparent 70%);
  opacity: 0;
}
.clearing-fog--near {
  background: radial-gradient(ellipse at 37% 49%, #f5f1e4f5, #f4f4e2a8 33%, transparent 64%);
}
.clearing[data-ready][data-state='waiting'] .clearing-fog { opacity: 1; }
.clearing-light {
  position: absolute;
  inset: 10% 7% 11% 23%;
  pointer-events: none;
  background: radial-gradient(ellipse at 43% 45%, #ffdc83b5 0 4%, #ffe7aa5e 20%, transparent 59%);
  opacity: 0;
}
.clearing-lux {
  position: absolute;
  width: 21%;
  height: auto;
  bottom: 6%;
  left: 7%;
  filter: drop-shadow(0 4px 8px #152a2066);
  transform-origin: 66% 90%;
}
.clearing[data-state='playing'] .clearing-lux { animation: lux-clears 1.15s ease-in-out both; }
.clearing[data-state='playing'] .clearing-fog { animation: fog-clears 1.65s .32s cubic-bezier(.32,.12,.32,1) both; }
.clearing[data-state='playing'] .clearing-fog--near { animation-name: near-fog-clears; animation-delay: .49s; }
.clearing[data-state='playing'] .clearing-light { animation: clearing-light 1.65s .95s ease-out both; }

@keyframes lux-clears {
  0%, 100% { transform: none; }
  27% { transform: translateX(-4%) rotate(-6deg) scale(.97); }
  64% { transform: translateX(18%) rotate(8deg) scale(1.07); }
}
@keyframes fog-clears {
  0% { opacity: 1; transform: none; }
  38% { opacity: .93; transform: translate(12%, -4%) scale(1.1); }
  100% { opacity: 0; transform: translate(49%, -29%) scale(1.25); }
}
@keyframes near-fog-clears {
  0% { opacity: 1; transform: none; }
  35% { opacity: .84; transform: translate(-13%, 0) scale(1.05); }
  100% { opacity: 0; transform: translate(-49%, 24%) scale(1.22); }
}
@keyframes clearing-light {
  0%, 100% { opacity: 0; }
  42% { opacity: 1; }
}
.clearing-copy {
  display: grid;
  justify-items: start;
  align-content: center;
  gap: 14px;
  padding: clamp(20px, 4vw, 42px);
}
.clearing-copy h3 { margin: 0; font: 700 clamp(25px, 3vw, 36px)/1.04 'Baloo 2', sans-serif; }
.sl3 #reise .clearing-copy h3 { color: inherit; }
.clearing-copy p { min-block-size: 4.5em; margin: 0; line-height: 1.5; color: #e2dbc2; }
.clearing-copy button { min-height: 44px; }
.clearing-copy button[aria-disabled='true'] { cursor: wait; }

.sl3 #reise ol > li > .wisent-portrait { object-position: center; }
#reise .reise-lernziel { color: #3f4935; }
#reise .reise-umfang { font-size: .82rem !important; color: #664b24 !important; }

.chapter-rail { display: none; }

.text-accent {
  display: inline-block;
  position: relative;
  isolation: isolate;
  z-index: 0;
}
.text-accent::after {
  content: '';
  position: absolute;
  z-index: -1;
  inset: auto 0 .04em;
  height: .14em;
  border-radius: 999px;
  background: #f0aa3e;
  opacity: .74;
}
.text-accent--ink::after { background: #8fb884; }
.text-accent--soft::after { height: .29em; opacity: .44; }
.text-motion-ready .text-accent:not([data-accent-shown])::after {
  transform: scaleX(0);
}
.text-motion-ready .text-accent[data-accent-shown]::after {
  animation: mark-text .65s cubic-bezier(.22,.65,.19,1) both;
  transform-origin: left;
}
.text-motion-ready .text-accent--soft[data-accent-shown]::after {
  transform-origin: center;
}
.text-motion-ready .text-accent--ink[data-accent-shown] {
  animation: settle-text .6s cubic-bezier(.22,.65,.19,1) both;
}
@keyframes mark-text {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}
@keyframes settle-text {
  from { transform: translateY(.10em); }
  to { transform: none; }
}

@media (max-width: 760px) {
  header.top { padding-block: 6px; }
  header.top.scrolled { background: #152a20; backdrop-filter: none; }
  .js header.top .topbar { flex-wrap: nowrap; }
  header.top .topbar { gap: 8px; }
  header.top .top-actions { margin-inline-start: auto; gap: 6px; }
  header.top .top-actions > button { min-height: 44px; padding-inline: 10px; white-space: nowrap; }
  header.top .lang-switch { min-height: 44px; padding: 0 7px; }
  header.top .lang-switch select { min-height: 42px; }
  header.top .lang-switch .flag { display: none; }
  .js header.top nav.toplinks { flex: 0 0 auto; }
  .js header.top nav.toplinks:not(.nav-overflow-ready) > a { display: none; }
  .js header.top nav.toplinks:not(.nav-overflow-ready) > .nav-more[hidden] { display: block; pointer-events: none; }
  header.top .nav-more summary { padding-inline: 8px; }
  header.top .nav-more summary::after { content: none; }

  .chapter-rail[data-visible] {
    display: flex;
    flex-direction: column;
    position: fixed;
    z-index: 85;
    right: max(1px, env(safe-area-inset-right));
    top: 50%;
    transform: translateY(-50%);
    border-radius: 999px;
    background: #193328;
    box-shadow: 0 0 0 1px #fff0cc55;
  }
  body:has(.nav-more[open]) .chapter-rail,
  body:has(#vm-dialog.open, #vm-dialog[open], #vm-dialog[aria-hidden='false']) .chapter-rail { visibility: hidden; }
  .chapter-rail a {
    position: relative;
    display: grid;
    width: 24px;
    height: 34px;
    place-items: center;
    color: #fff0cc;
    text-decoration: none;
  }
  .chapter-rail a::before {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #fff0cc9c;
  }
  .chapter-rail a[aria-current='location']::before {
    width: 8px;
    height: 13px;
    border-radius: 5px;
    background: #f0aa3e;
  }
  .chapter-rail span {
    position: absolute;
    right: calc(100% + 5px);
    z-index: 1;
    width: max-content;
    max-width: 190px;
    padding: 5px 9px;
    border-radius: 7px;
    background: #193328;
    font-size: .85rem;
    visibility: hidden;
  }
  .chapter-rail a:focus-visible span { visibility: visible; }
}

@media (max-width: 760px) and (hover: hover) {
  .chapter-rail a:hover span { visibility: visible; }
}

@media (max-width: 450px) {
  header.top .brandmark { font-size: 0; gap: 0; min-height: 44px; }
}

@media (max-width: 350px) {
  header.top .topbar { padding-inline: 14px; }
}

@media (761px <= width <= 1040px) {
  header.top nav.toplinks { gap: 12px; }
}

@media (max-width: 640px) {
  .clearing { grid-template-columns: minmax(0, 1fr); border-radius: 18px; }
  .clearing-copy { padding: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .clearing *, .clearing *::before, .clearing *::after,
  .text-motion-ready .text-accent, .text-motion-ready .text-accent::after {
    animation: none;
    transition: none;
    transform: none;
  }
}
