@font-face {
  font-family: "Expedition Display";
  src: local("Georgia");
  font-display: swap;
}


:root {
  color-scheme: dark;
  font-family: var(--type-font-sans);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --content-width: 1320px;
  --header-height: 76px;
  --radius-small: 8px;
  --radius-medium: 16px;
  --radius-large: 28px;
  --transition-fast: 160ms ease;
  --transition-medium: 280ms ease;
  --hero-inline-padding: max(24px, calc((100vw - var(--content-width)) / 2 + 24px));
  --type-font-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --type-font-display: "Expedition Display", Georgia, "Times New Roman", serif;
  --type-font-serif: Georgia, "Times New Roman", serif;
  --type-display-size: clamp(2.8rem, 6.5vw, 5.8rem);
  --type-heading-size: clamp(1.75rem, 2.8vw, 2.65rem);
  --type-subheading-size: 1.12rem;
  --type-kicker-size: 0.68rem;
  --type-label-size: 0.64rem;
  --type-meta-size: 0.62rem;
  --type-value-size: 1rem;
  --type-count-size: 2.8rem;
  --type-body-size: 0.9rem;
  --type-lead-size: 1.05rem;
  --type-stream-title-size: 0.875rem;
  --type-stream-title-weight: 400;
  --type-stream-title-leading: 1.35;
  --type-body-leading: 1.42;
  --type-lead-leading: 1.5;
  --type-kicker-heading-gap: 8px;
  --type-heading-after-gap: 0;
  --solution-quote-size: 1.2rem;
  --footer-text-size: 0.72rem;
  --site-keyvisual-image: none;
  --site-keyvisual-position: center top;
  --site-keyvisual-size: clamp(1080px, 100vw, 1920px) auto;
  --site-keyvisual-opacity: 0;
  --site-keyvisual-filter: none;
  --site-keyvisual-blend-mode: normal;
  --site-keyvisual-mask: none;
}

[data-theme="pirate"] {
  --transparent: transparent;
  --mask-solid: #000;
  --page: #120d09;
  --page-soft: #21170f;
  --surface: #291c12;
  --surface-raised: #352317;
  --paper: #e5d2a5;
  --paper-light: #f1e3bf;
  --paper-shadow: #a98550;
  --ink: #261b12;
  --ink-soft: #624b33;
  --text: #f2e7cf;
  --text-muted: #c4ad88;
  --type-heading-color: var(--text);
  --type-kicker-color: var(--gold-light);
  --type-heading-color-paper: var(--ink);
  --type-kicker-color-paper: var(--gold-dark);
  --intro-heading: var(--text);
  --intro-text: var(--text-muted);
  --intro-accent: var(--gold-light);
  --line: rgba(230, 199, 139, 0.2);
  --gold: #d9a84e;
  --gold-light: #f1cf79;
  --gold-dark: #8f5a20;
  --danger: #d97759;
  --twitch: #9146ff;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
  --page-deep: #171009;
  --page-black: #0c0907;
  --surface-map: #19130e;
  --map-canvas: #d4c39a;
  --paper-header: #f0dfb4;
  --wood-light: #7a512d;
  --wood-dark: #39261a;
  --wood-red: #5e2918;
  --wood-red-dark: #32140f;
  --wood-border: #6d3b22;
  --danger-deep: #5e2918;
  --hint-fact: #557e58;
  --hint-rumour: #9a633b;
  --hint-myth: #7b5c94;
  --hint-history: #8b6b31;
  --hint-legendary: #b77a1f;
  --hint-abstract: #526f80;
  --hint-popculture: #8a5273;
  --rarity-common: var(--hint-fact);
  --rarity-rare: var(--hint-abstract);
  --rarity-epic: var(--hint-myth);
  --rarity-legendary: var(--hint-legendary);
  --rarity-special: var(--silver);
  --mechanics-card-background: var(--overlay-white-025);
  --mechanics-support-background: var(--overlay-gold-012);
  --mechanics-special-background: var(--overlay-twitch-18);
  --solution-card-background: var(--paper-light);
  --solution-card-background-active: var(--overlay-paper-54);
  --solution-card-border: var(--overlay-ink-line-strong);
  --solution-card-accent: var(--gold-dark);
  --paper-button-text: var(--ink);
  --paper-button-border: var(--overlay-ink-24);
  --paper-button-background: var(--overlay-paper-54);
  --paper-button-background-hover: var(--paper-light);
  --paper-button-text-disabled: var(--ink-soft);
  --twitch-light: #b584ff;
  --twitch-status-live: #63d483;
  --twitch-status-offline: var(--text-muted);
  --twitch-status-background: var(--overlay-white-025);
  --twitch-status-live-background: var(--overlay-twitch-18);
  --twitch-vod-background: var(--overlay-surface-96);
  --twitch-vod-media-background: var(--page-black);
  --twitch-vod-border: var(--overlay-twitch-28);
  --twitch-vod-badge-background: var(--twitch);
  --twitch-vod-badge-text: var(--text);
  --twitch-vod-poster-overlay: var(--overlay-black-30);
  --silver: #b9c0c5;
  --overlay-page-86: rgba(18, 13, 9, 0.86);
  --overlay-page-97: rgba(18, 13, 9, 0.97);
  --overlay-surface-96: rgba(35, 23, 15, 0.96);
  --overlay-surface-light-96: rgba(53, 35, 23, 0.96);
  --overlay-surface-dark-96: rgba(34, 23, 15, 0.96);
  --overlay-surface-light-98: rgba(53, 35, 23, 0.98);
  --overlay-surface-dark-98: rgba(34, 23, 15, 0.98);
  --overlay-white-015: rgba(255, 255, 255, 0.015);
  --overlay-white-025: rgba(255, 255, 255, 0.025);
  --overlay-gold-012: rgba(217, 168, 78, 0.12);
  --overlay-gold-018: rgba(217, 168, 78, 0.18);
  --overlay-gold-20: rgba(217, 168, 78, 0.2);
  --overlay-gold-28: rgba(217, 168, 78, 0.28);
  --overlay-gold-30: rgba(217, 168, 78, 0.3);
  --overlay-gold-50: rgba(217, 168, 78, 0.5);
  --overlay-gold-012-faint: rgba(217, 168, 78, 0.012);
  --overlay-gold-018-faint: rgba(217, 168, 78, 0.018);
  --overlay-gold-025: rgba(217, 168, 78, 0.025);
  --overlay-gold-08: rgba(217, 168, 78, 0.08);
  --overlay-gold-glow: rgba(214, 158, 59, 0.13);
  --overlay-gold-border-faint: rgba(221, 170, 75, 0.08);
  --overlay-gold-art: rgba(218, 172, 79, 0.2);
  --overlay-paper-26: rgba(255, 248, 225, 0.26);
  --overlay-paper-54: rgba(255, 248, 225, 0.54);
  --overlay-paper-light-86: rgba(241, 227, 191, 0.86);
  --overlay-paper-light-92: rgba(241, 227, 191, 0.92);
  --overlay-paper-light-94: rgba(241, 227, 191, 0.94);
  --overlay-paper-border: rgba(255, 239, 197, 0.45);
  --overlay-paper-border-strong: rgba(255, 239, 197, 0.48);
  --overlay-ink-line: rgba(77, 50, 23, 0.15);
  --overlay-ink-line-strong: rgba(77, 50, 23, 0.17);
  --overlay-ink-13: rgba(77, 50, 23, 0.13);
  --overlay-ink-14: rgba(68, 45, 22, 0.14);
  --overlay-ink-16: rgba(78, 51, 23, 0.16);
  --overlay-ink-18: rgba(76, 49, 22, 0.18);
  --overlay-ink-20: rgba(82, 52, 23, 0.2);
  --overlay-ink-24: rgba(86, 54, 21, 0.24);
  --overlay-map-border: rgba(75, 48, 21, 0.16);
  --overlay-map-shadow-light: rgba(255, 246, 214, 0.8);
  --overlay-brown-fold: rgba(104, 76, 39, 0.045);
  --overlay-brown-rule: rgba(114, 77, 32, 0.06);
  --overlay-brown-scroll-top: rgba(94, 65, 31, 0.035);
  --overlay-brown-scroll-base: rgba(122, 87, 43, 0.045);
  --hints-panel-background: rgba(122, 87, 43, 0.18);
  --overlay-brown-scroll-thumb: rgba(105, 67, 28, 0.45);
  --overlay-backdrop-warm: rgba(146, 88, 29, 0.22);
  --overlay-backdrop-cool: rgba(87, 53, 25, 0.22);
  --overlay-hero-left: rgba(12, 9, 7, 0.9);
  --overlay-hero-center: rgba(12, 9, 7, 0.7);
  --overlay-hero-right: rgba(12, 9, 7, 0.56);
  --overlay-paper-art-22: rgba(239, 218, 166, 0.22);
  --overlay-paper-art-42: rgba(239, 218, 166, 0.42);
  --overlay-paper-art-05: rgba(239, 218, 166, 0.05);
  --overlay-paper-text-82: rgba(249, 235, 198, 0.82);
  --overlay-stream-shadow: rgba(48, 27, 15, 0.3);
  --overlay-stream-inset: rgba(230, 181, 80, 0.2);
  --overlay-stream-border: rgba(232, 185, 88, 0.38);
  --overlay-twitch-18: rgba(145, 70, 255, 0.18);
  --overlay-twitch-28: rgba(145, 70, 255, 0.28);
  --overlay-twitch-55: rgba(145, 70, 255, 0.55);
  --overlay-black-12: rgba(0, 0, 0, 0.12);
  --overlay-black-26: rgba(0, 0, 0, 0.26);
  --overlay-black-30: rgba(0, 0, 0, 0.3);
  --shadow-card: 0 10px 28px rgba(75, 49, 22, 0.06);
  --shadow-map-control: 0 8px 24px rgba(40, 25, 12, 0.22);
  --shadow-map-marker: 0 9px 18px rgba(42, 27, 13, 0.38);
  --shadow-map-ship: 0 8px 22px rgba(42, 27, 13, 0.42);
  --shadow-popup: 0 16px 36px rgba(43, 28, 15, 0.26);
  --gradient-page: linear-gradient(145deg, var(--page-deep) 0%, var(--page) 52%, var(--page-black) 100%);
  --gradient-surface: linear-gradient(145deg, var(--overlay-surface-light-96), var(--overlay-surface-dark-96));
  --gradient-surface-strong: linear-gradient(145deg, var(--overlay-surface-light-98), var(--overlay-surface-dark-98));
  --gradient-journal: linear-gradient(135deg, var(--paper-header), var(--paper));
  --gradient-journal-art: linear-gradient(150deg, var(--wood-light), var(--wood-dark));
  --gradient-stream: linear-gradient(145deg, var(--wood-red), var(--wood-red-dark));
  --gradient-legendary: linear-gradient(135deg, rgba(255, 241, 193, 0.82), rgba(235, 205, 139, 0.68));
  --gradient-hero-overlay: linear-gradient(90deg, var(--overlay-hero-left) 0%, var(--overlay-hero-center) 52%, var(--overlay-hero-right) 100%);
  --hero-background-image: url("./images/pirate-ship-hero-bg.jpg");
  --site-keyvisual-image: url("./images/gugalive-keyvisual.png");
  --site-keyvisual-position: center 30px;
  --site-keyvisual-opacity: 0.28;
  --site-keyvisual-filter: grayscale(1) sepia(1) saturate(1.25) hue-rotate(-8deg) brightness(0.58) contrast(1.2);
  --site-keyvisual-blend-mode: screen;
  --site-keyvisual-mask: radial-gradient(ellipse 68% 64% at 50% 42%, var(--mask-solid) 36%, var(--overlay-keyvisual-mask) 68%, var(--transparent) 100%);
  --overlay-keyvisual-mask: rgba(0, 0, 0, 0.82);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 20px);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background: var(--page);
}

body::selection {
  color: var(--ink);
  background: var(--gold-light);
}

button,
a {
  -webkit-tap-highlight-color: var(--transparent);
}

button,
input,
textarea,
select {
  font: inherit;
}

a {
  color: inherit;
}

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

h1,
h2,
p {
  margin-top: 0;
}

h1,
h2 {
  font-family: "Expedition Display", Georgia, "Times New Roman", serif;
  letter-spacing: -0.025em;
}

h1 {
  max-width: 780px;
  margin-bottom: 18px;
  font-size: clamp(2.8rem, 6.5vw, 5.8rem);
  line-height: 0.88;
  text-wrap: balance;
}

h2 {
  margin-bottom: 16px;
  font-size: clamp(1.75rem, 3.2vw, 2.8rem);
  line-height: 1;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.is-hidden {
  display: none !important;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  color: var(--ink);
  background: var(--paper-light);
  border-radius: var(--radius-small);
  transform: translateY(-160%);
  transition: transform var(--transition-fast);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-backdrop {
  position: fixed;
  z-index: -1;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(circle at 12% 16%, var(--overlay-backdrop-warm), var(--transparent) 32%),
    radial-gradient(circle at 88% 40%, var(--overlay-backdrop-cool), var(--transparent) 36%),
    var(--gradient-page);
}

.site-backdrop::before {
  position: absolute;
  z-index: 0;
  inset: 0;
  content: "";
  opacity: var(--site-keyvisual-opacity);
  background-image: var(--site-keyvisual-image);
  background-repeat: no-repeat;
  background-position: var(--site-keyvisual-position);
  background-size: var(--site-keyvisual-size);
  filter: var(--site-keyvisual-filter);
  mix-blend-mode: var(--site-keyvisual-blend-mode);
  -webkit-mask-image: var(--site-keyvisual-mask);
  mask-image: var(--site-keyvisual-mask);
}

.site-backdrop__glow {
  position: absolute;
  z-index: 1;
  width: 620px;
  aspect-ratio: 1;
  top: -280px;
  left: 50%;
  border: 1px solid var(--overlay-gold-border-faint);
  border-radius: 50%;
  box-shadow:
    0 0 0 90px var(--overlay-gold-018-faint),
    0 0 0 180px var(--overlay-gold-012-faint);
  transform: translateX(-50%);
}

.site-backdrop__grid {
  position: absolute;
  z-index: 2;
  inset: 0;
  opacity: 0.22;
  background-image:
    linear-gradient(var(--overlay-white-015) 1px, var(--transparent) 1px),
    linear-gradient(90deg, var(--overlay-white-015) 1px, var(--transparent) 1px);
  background-size: 70px 70px;
  mask-image: linear-gradient(to bottom, var(--mask-solid), var(--transparent) 75%);
}

.site-header {
  position: sticky;
  z-index: 100;
  top: 0;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  min-height: var(--header-height);
  padding: 0 max(24px, calc((100vw - var(--content-width)) / 2));
  border-bottom: 1px solid var(--line);
  background: var(--overlay-page-86);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand__logo {
  display: block;
  width: 52px;
  height: 40px;
  object-fit: contain;
}

.brand__copy {
  display: grid;
  gap: 2px;
  line-height: 1;
}

.brand__copy strong {
  font-size: 0.82rem;
  letter-spacing: 0.16em;
}

.brand__copy small {
  color: var(--text-muted);
  font-family: Georgia, serif;
  font-size: 0.82rem;
}

.site-navigation {
  display: flex;
  justify-content: center;
  gap: clamp(18px, 3vw, 38px);
}

.site-navigation a {
  position: relative;
  padding: 27px 0 25px;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
  transition: color var(--transition-fast);
}

.site-navigation a::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  content: "";
  background: var(--gold);
  transform: scaleX(0);
  transition: transform var(--transition-fast);
}

.site-navigation a:hover,
.site-navigation a:focus-visible {
  color: var(--text);
}

.site-navigation a:hover::after,
.site-navigation a:focus-visible::after {
  transform: scaleX(1);
}

.header-live-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 15px;
  font-size: 0.82rem;
  font-weight: 800;
  text-decoration: none;
  border: 1px solid var(--overlay-twitch-55);
  border-radius: 999px;
}

.header-live-link span {
  width: 7px;
  aspect-ratio: 1;
  background: var(--twitch-light);
  border-radius: 50%;
  box-shadow: 0 0 12px var(--twitch);
}

.nav-toggle {
  display: none;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 42px;
  align-items: center;
  min-height: 540px;
  max-width: none;
  padding: 66px var(--hero-inline-padding) 112px;
  margin: 0;
  overflow: clip;
  /* background-image: var(--gradient-hero-overlay), var(--hero-background-image); */
  background-position: center;
  background-size: cover;
}

.eyebrow {
  margin-bottom: 14px;
  color: var(--gold-light);
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.hero__subtitle {
  max-width: 620px;
  margin-bottom: 24px;
  color: var(--text-muted);
  font-family: Georgia, serif;
  font-size: clamp(1.05rem, 1.6vw, 1.35rem);
  line-height: 1.5;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 850;
  letter-spacing: 0.035em;
  text-decoration: none;
  border: 1px solid var(--transparent);
  border-radius: 999px;
  cursor: pointer;
  transition:
    transform var(--transition-fast),
    background var(--transition-fast),
    border-color var(--transition-fast);
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
}

.button--primary {
  color: var(--ink);
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  box-shadow: 0 10px 30px var(--overlay-gold-018);
}

.button--ghost {
  border-color: var(--line);
  background: var(--overlay-white-025);
}

.button--twitch {
  background: var(--twitch);
}

.button--small {
  min-height: 38px;
  padding: 0 16px;
}

.hero__emblem {
  position: relative;
  display: grid;
  width: min(100%, 300px);
  aspect-ratio: 1;
  place-items: center;
  justify-self: end;
  color: var(--gold);
  display: none;
}

.hero__emblem::before,
.hero__emblem::after {
  position: absolute;
  content: "";
  border: 1px solid var(--overlay-gold-28);
  border-radius: 50%;
}

.hero__emblem::before {
  inset: 0;
  box-shadow: inset 0 0 0 12px var(--overlay-gold-025);
}

.hero__emblem::after {
  inset: 32px;
  border-style: dashed;
  animation: compass-spin 42s linear infinite;
}

.hero__emblem-ring {
  position: absolute;
  inset: 16px 50%;
  width: 1px;
  background: linear-gradient(var(--transparent), var(--gold), var(--transparent));
  transform: rotate(45deg);
}

.hero__emblem-ring::after {
  position: absolute;
  inset: 0;
  content: "";
  background: inherit;
  transform: rotate(90deg);
}

.hero__emblem-compass {
  font-size: 6.5rem;
  text-shadow: 0 0 44px var(--overlay-gold-30);
}

.hero__emblem-label {
  position: absolute;
  bottom: 44px;
  color: var(--text-muted);
  font-size: 0.62rem;
  font-weight: 900;
  line-height: 1.45;
  letter-spacing: 0.24em;
  text-align: center;
}

.hero__progress {
  position: absolute;
  right: var(--hero-inline-padding);
  bottom: 28px;
  left: var(--hero-inline-padding);
  display: grid;
  grid-template-columns: 180px 180px minmax(240px, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.progress-card {
  display: grid;
  gap: 6px;
  padding: 14px 20px;
  border-right: 1px solid var(--line);
}

.progress-card:last-child {
  border-right: 0;
}

.progress-card__value {
  font-family: Georgia, serif;
  font-size: 1.65rem;
  line-height: 1;
}

.progress-card__value--small {
  font-family: inherit;
  font-size: 0.98rem;
  font-weight: 750;
}

.progress-card__label {
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.page-shell {
  display: grid;
  gap: 0;
  max-width: var(--content-width);
  padding: 0 24px 64px;
  margin: 0 auto;
}

.section {
  margin-block: 2rem;
}

.paper-panel {
  position: relative;
  padding: clamp(28px, 4vw, 48px);
  overflow: hidden;
  color: var(--ink);
  background:
    linear-gradient(105deg, var(--transparent) 0 48%, var(--overlay-brown-fold) 49%, var(--transparent) 51%),
    linear-gradient(135deg, var(--paper-light), var(--paper));
  border: 1px solid var(--overlay-paper-border);
  border-radius: var(--radius-large);
  box-shadow: var(--shadow);
}

.paper-panel::after {
  position: absolute;
  inset: 12px;
  content: "";
  pointer-events: none;
  border: 1px solid var(--overlay-ink-14);
  border-radius: calc(var(--radius-large) - 8px);
}

.paper-panel .eyebrow {
  color: var(--gold-dark);
}

.section-heading {
  max-width: 640px;
}

/* Die Einführung bleibt bewusst offen und frei von einer Karten-/Paper-Box. */
.introduction {
  padding: 2rem 0;
  color: var(--intro-text);
}

.introduction .type-heading {
  color: var(--intro-heading);
}

.introduction__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(36px, 8vw, 100px);
  align-items: start;
  margin-top: 24px;
}

.introduction__lead {
  margin: 0;
  color: var(--intro-text);
  font-family: Georgia, serif;
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  line-height: 1.65;
}

.introduction__invitation {
  --type-heading-after-gap: 16px;
  max-width: 920px;
  padding-top: 0;
  margin-top: 0;
}

.introduction__invitation .type-lead {
  margin: 0;
  color: var(--intro-text);
}

.introduction__invitation .type-body {
  max-width: 820px;
  margin: 12px 0 0;
  color: var(--intro-text);
}

.introduction__invitation .type-subheading {
  margin: 12px 0 0;
  color: var(--intro-accent);
}

.rule-list {
  display: grid;
  gap: 14px;
  padding: 0;
  margin: 0;
  list-style: none;
  counter-reset: rules;
}

.rule-list li {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 14px;
  align-items: start;
  color: var(--intro-text);
  line-height: 1.55;
  counter-increment: rules;
}

.rule-list li::before {
  display: grid;
  width: 34px;
  aspect-ratio: 1;
  place-items: center;
  color: var(--intro-accent);
  font-family: Georgia, serif;
  font-weight: 800;
  content: counter(rules, decimal-leading-zero);
  border: 1px solid var(--overlay-ink-24);
  border-radius: 50%;
}

.module-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(360px, 0.85fr);
  gap: 0;
  align-items: stretch;
}

.module-card {
  position: relative;
  display: grid;
  grid-template-columns: 150px 1fr;
  min-height: 320px;
  overflow: hidden;
  background: var(--gradient-surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-large);
  box-shadow: var(--shadow);
}

.module-card--featured {
  grid-column: 1 / -1;
  grid-template-columns: minmax(280px, 0.9fr) 1.1fr;
}

.module-card--featured {
  min-height: 380px;
  color: var(--ink);
  background: linear-gradient(135deg, var(--paper-light), var(--paper));
}

.module-card__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(28px, 5vw, 60px);
}

.module-card__body h2 {
  margin-bottom: 14px;
  font-size: clamp(2rem, 4vw, 3.5rem);
}

.module-card__body>p:not(.eyebrow) {
  max-width: 520px;
  margin-bottom: 24px;
  color: var(--text-muted);
  font-family: Georgia, serif;
  font-size: 1.08rem;
  line-height: 1.65;
}

.module-card--featured .module-card__body>p:not(.eyebrow) {
  color: var(--ink-soft);
}

.module-card--featured .eyebrow {
  color: var(--gold-dark);
}

.module-card__status {
  display: inline-flex;
  gap: 6px;
  padding: 8px 12px;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.module-card--featured .module-card__status {
  color: var(--ink-soft);
  border-color: var(--overlay-ink-18);
}

.module-card__number {
  display: grid;
  place-items: center;
  color: var(--gold);
  font-family: Georgia, serif;
  font-size: clamp(4rem, 8vw, 7rem);
  background: var(--overlay-black-12);
  border-right: 1px solid var(--line);
}

.map-module {
  grid-column: 1;
  overflow: hidden;
  background: var(--gradient-surface-strong);
  border: 1px solid var(--line);
  border-radius: var(--radius-large);
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
}

.map-module__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 48px;
  padding: clamp(16px);
  border-bottom: 1px solid var(--line);
}

.map-module__header>div:first-child {
  max-width: 660px;
}

.map-module__header h2 {
  margin-bottom: 12px;
}

.map-module__header p:last-child {
  margin-bottom: 0;
  color: var(--text-muted);
  font-family: Georgia, serif;
  font-size: 1.08rem;
  line-height: 1.55;
}

.map-module__actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 18px;
}

.map-module__position {
  display: grid;
  gap: 3px;
  min-width: 160px;
}

.map-module__position small {
  color: var(--text-muted);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.map-module__position strong {
  font-family: Georgia, serif;
  font-size: 1.05rem;
}

.map-stage {
  position: relative;
  min-height: 420px;
  background:
    radial-gradient(circle at 30% 30%, var(--overlay-gold-012), var(--transparent) 36%),
    var(--surface-map);
}

.expedition-map {
  position: absolute;
  z-index: 1;
  inset: 0;
  min-height: 420px;
  font-family: inherit;
  background: var(--map-canvas);
}

.map-empty {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  padding: 40px;
  text-align: center;
}

.map-empty>span {
  margin-bottom: 18px;
  color: var(--gold);
  font-size: 3rem;
}

.map-empty strong {
  margin-bottom: 8px;
  font-family: Georgia, serif;
  font-size: 1.6rem;
}

.map-empty p {
  max-width: 360px;
  margin: 0;
  color: var(--text-muted);
}

.leaflet-container {
  color: var(--ink);
}

.leaflet-tile-pane {
  filter: sepia(0.45) saturate(0.72) contrast(0.9) brightness(0.94);
}

.leaflet-control-zoom,
.leaflet-control-attribution {
  border: 0 !important;
  box-shadow: var(--shadow-map-control) !important;
}

.leaflet-control-zoom a {
  color: var(--ink) !important;
  background: var(--overlay-paper-light-94) !important;
  border-color: var(--overlay-map-border) !important;
}

.leaflet-control-attribution {
  color: var(--ink-soft) !important;
  background: var(--overlay-paper-light-86) !important;
}

.leaflet-control-attribution a {
  color: var(--gold-dark) !important;
}

.expedition-map__route {
  filter: drop-shadow(0 2px 1px var(--overlay-map-shadow-light));
}

.expedition-marker-wrapper,
.expedition-ship-wrapper {
  background: var(--transparent);
  border: 0;
}

.expedition-marker {
  position: relative;
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  color: var(--ink);
  background: linear-gradient(145deg, var(--gold-light), var(--gold));
  border: 3px solid var(--paper-light);
  border-radius: 50% 50% 50% 8px;
  box-shadow: var(--shadow-map-marker);
  transform: rotate(-45deg);
}

.expedition-marker strong {
  font-family: Georgia, serif;
  font-size: 0.9rem;
  transform: rotate(45deg);
}

.expedition-ship {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  font-size: 1.9rem;
  background: var(--overlay-paper-light-94);
  border: 2px solid var(--gold-dark);
  border-radius: 50%;
  box-shadow: var(--shadow-map-ship);
}

.expedition-popup .leaflet-popup-content-wrapper,
.expedition-popup .leaflet-popup-tip {
  color: var(--ink);
  background: var(--paper-light);
}

.expedition-popup .leaflet-popup-content-wrapper {
  border: 1px solid var(--overlay-ink-20);
  border-radius: 12px;
  box-shadow: var(--shadow-popup);
}

.expedition-popup .leaflet-popup-content {
  margin: 16px 18px;
}

.map-popup {
  display: grid;
  gap: 5px;
  min-width: 160px;
}

.map-popup__eyebrow {
  color: var(--gold-dark);
  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.map-popup strong {
  font-family: Georgia, serif;
  font-size: 1.18rem;
}

.map-popup p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.4;
}

.hints-module {
  grid-column: 2;
  grid-row: 1;
  display: grid;
  grid-template-columns: 1fr;
  min-height: 100%;
  overflow: hidden;
  color: var(--ink);
  background: var(--gradient-surface-strong);
  border: 1px solid var(--line);
  border-radius: var(--radius-large);
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
}

.hints-module__header {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  padding: 16px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  color: var(--page);
  background: var(--gradient-surface-strong);
}

.hints-module__header>div {
  position: relative;
  z-index: 1;
}

.hints-module__header .eyebrow {
  color: var(--gold-light);
}

.hints-module__header h2 {
  max-width: 380px;
}

.hints-module__header p:last-child {
  max-width: 360px;
  margin-bottom: 0;
  color: var(--ink-soft);
  font-family: Georgia, serif;
  font-size: 1.08rem;
  line-height: 1.6;
}

.hints-module__header h2 {
  color: var(--text);
}

.hints-module__count {
  position: absolute;
  top: clamp(24px, 5vw, 60px);
  right: clamp(24px, 5vw, 60px);
  z-index: 1;
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0;
}

.hints-module__count strong {
  color: var(--gold-light);
  font-family: Georgia, serif;
  font-size: clamp(3rem, 6vw, 5rem);
  font-weight: 400;
  line-height: 0.8;
}

.hints-module__count small {
  color: var(--paper-light);
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hints-module__window {
  position: relative;
  max-height: 460px;
  padding: 24px;
  overflow-y: auto;
  overscroll-behavior: contain;
  background:
    linear-gradient(to bottom, var(--overlay-brown-scroll-top), var(--transparent) 80px),
    var(--hints-panel-background);
  scrollbar-color: var(--overlay-brown-scroll-thumb) var(--transparent);
  scrollbar-width: thin;
}

.hints-module__window:focus-visible {
  outline: 3px solid var(--gold-dark);
  outline-offset: -4px;
}

.hint-list {
  display: grid;
  gap: 12px;
}

.hint-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  align-items: start;
  padding: 16px 18px;
  color: var(--ink);
  background: var(--paper-light);
  border: 1px solid var(--hint-accent, var(--gold-dark));
  border-left: 4px solid var(--hint-accent, var(--gold-dark));
  border-radius: 12px;
  box-shadow: var(--shadow-card);
  scroll-snap-align: start;
}

.hint-card--fact {
  --hint-accent: var(--hint-fact);
}

.hint-card--rumour {
  --hint-accent: var(--hint-rumour);
}

.hint-card--myth {
  --hint-accent: var(--hint-myth);
}

.hint-card--history {
  --hint-accent: var(--hint-history);
}

.hint-card--legendary {
  --hint-accent: var(--hint-legendary);
  background: var(--gradient-legendary);
}

.hint-card--abstract,
.hint-card--riddle {
  --hint-accent: var(--hint-abstract);
}

.hint-card--popculture {
  --hint-accent: var(--hint-popculture);
}

.hint-card__content {
  min-width: 0;
}

.hint-card__meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 16px;
  margin-bottom: 8px;
  color: var(--ink-soft);
  font-size: 0.63rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hint-card__type {
  color: var(--hint-accent, var(--gold-dark));
}

.hint-card h3 {
  margin: 0 0 7px;
  font-family: Georgia, serif;
  font-size: 1.2rem;
  line-height: 1.15;
}

.hint-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.94rem;
  line-height: 1.42;
  white-space: pre-line;
}

.hints-empty {
  display: grid;
  min-height: 100%;
  place-content: center;
  justify-items: center;
  padding: 48px;
  text-align: center;
}

.hints-empty>span {
  margin-bottom: 16px;
  color: var(--gold-dark);
  font-size: 2.6rem;
}

.hints-empty strong {
  margin-bottom: 8px;
  font-family: Georgia, serif;
  font-size: 1.5rem;
}

.hints-empty p {
  max-width: 360px;
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.55;
}

.journal-module {
  grid-column: 1 / -1;
  overflow: visible;
  color: var(--text);
  background: var(--transparent);
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.journal-module__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 36px;
  padding: 0 0 16px;
  border: 0;
}

.journal-module__header>div {
  max-width: 720px;
}

.journal-module__header .eyebrow {
  color: var(--gold-dark);
}

.journal-module__header h2 {
  margin-bottom: 0;
  color: var(--text);
}

.journal-module__header p:last-child {
  max-width: 600px;
  margin-bottom: 0;
  color: var(--ink-soft);
  font-family: Georgia, serif;
  font-size: 1.08rem;
  line-height: 1.6;
}

.journal-module__count {
  display: none;
  flex: 0 0 auto;
  justify-items: end;
  gap: 5px;
}

.journal-module__count strong {
  color: var(--gold-dark);
  font-family: Georgia, serif;
  font-size: 4.6rem;
  font-weight: 400;
  line-height: 0.7;
}

.journal-module__count small {
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.journal-module__body {
  overflow: hidden;
  color: var(--ink);
  background: var(--gradient-journal);
  border: 1px solid var(--overlay-paper-border-strong);
  border-radius: var(--radius-large);
  box-shadow: var(--shadow);
}

.journal-module__body .button--ghost {
  color: var(--paper-button-text);
  background: var(--paper-button-background);
  border-color: var(--paper-button-border);
}

.journal-module__body .button--ghost:hover,
.journal-module__body .button--ghost:focus-visible {
  background: var(--paper-button-background-hover);
  border-color: var(--gold-dark);
}

.journal-module__body .button--ghost:disabled {
  color: var(--paper-button-text-disabled);
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

.solution-book__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 18px;
}

.solution-card {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 156px;
  flex-direction: column;
  align-items: stretch;
  padding: 16px;
  overflow: hidden;
  color: var(--ink);
  text-align: left;
  background: var(--solution-card-background);
  border: 1px solid var(--solution-card-border);
  border-radius: 14px;
  box-shadow: var(--shadow-card);
  cursor: pointer;
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    transform var(--transition-fast);
}

.solution-card::before {
  position: absolute;
  width: 4px;
  top: 0;
  bottom: 0;
  left: 0;
  content: "";
  background: var(--solution-card-accent);
  opacity: 0;
}

.solution-card:hover {
  transform: translateY(-2px);
}

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

.solution-card.is-active {
  background: var(--solution-card-background-active);
  border-color: var(--solution-card-accent);
  box-shadow: inset 0 0 0 1px var(--solution-card-accent), var(--shadow-card);
}

.solution-card.is-active::before {
  opacity: 1;
}

.solution-card__meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  color: var(--gold-dark);
}

.solution-card__meta span:last-child {
  overflow: hidden;
  color: var(--ink-soft);
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.solution-card__quote {
  display: block;
  margin: 0 0 18px;
  font-size: var(--solution-quote-size);
  line-height: 1.35;
}

.solution-card__footer {
  margin-top: auto;
  color: var(--gold-dark);
}

.journal-detail {
  border-top: 1px solid var(--overlay-ink-line);
}

.journal-page {
  display: grid;
  grid-template-columns: minmax(280px, 0.84fr) minmax(0, 1.16fr);
  min-height: 430px;
  background:
    linear-gradient(90deg, var(--overlay-brown-rule), var(--transparent) 18%),
    var(--overlay-paper-26);
}

.journal-page__art {
  position: relative;
  display: grid;
  min-height: 430px;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 45% 40%, var(--overlay-gold-art), var(--transparent) 33%),
    var(--gradient-journal-art);
  border-right: 1px solid var(--overlay-ink-line-strong);
}

.journal-page__art::before,
.journal-page__art::after {
  position: absolute;
  content: "";
  border: 1px solid var(--overlay-paper-art-22);
  border-radius: 50%;
}

.journal-page__art::before {
  width: 78%;
  aspect-ratio: 1;
}

.journal-page__art::after {
  width: 56%;
  aspect-ratio: 1;
  border-style: dashed;
}

.journal-art-placeholder {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 18px;
  color: var(--gold-light);
  text-align: center;
}

.journal-art-placeholder span {
  display: grid;
  width: 120px;
  aspect-ratio: 1;
  place-items: center;
  color: var(--gold-light);
  font-family: Georgia, serif;
  font-size: 5rem;
  border: 1px solid var(--overlay-paper-art-42);
  border-radius: 50%;
  box-shadow: 0 0 0 12px var(--overlay-paper-art-05);
}

.journal-art-placeholder small {
  max-width: 260px;
  color: var(--overlay-paper-text-82);
  font-family: Georgia, serif;
  font-size: 1.4rem;
}

.journal-page__image {
  position: absolute;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: sepia(0.42) saturate(0.8);
}

.journal-page__station {
  position: absolute;
  z-index: 3;
  top: 22px;
  left: 22px;
  padding: 8px 11px;
  color: var(--ink);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--overlay-paper-light-92);
  border-radius: 999px;
}

.journal-page__content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(30px, 4vw, 52px);
}

.journal-page__topline {
  display: flex;
  justify-content: space-between;
  width: 100%;
  margin-bottom: 30px;
  color: var(--gold-dark);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.journal-page__topline span:last-child {
  color: var(--ink-soft);
}

.journal-page__content .eyebrow {
  margin-bottom: 12px;
  color: var(--gold-dark);
}

.journal-page__content h3 {
  max-width: 650px;
  margin: 0 0 22px;
  font-family: Georgia, serif;
  font-size: clamp(2.2rem, 5vw, 4.5rem);
  font-weight: 400;
  line-height: 0.98;
}

.journal-page__story {
  max-width: 610px;
  margin-bottom: 28px;
  color: var(--ink-soft);
  font-family: Georgia, serif;
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  line-height: 1.65;
}

.journal-page__discovery {
  max-width: 620px;
  padding: 0 0 0 20px;
  margin: 0 0 28px;
  color: var(--ink);
  background: var(--transparent);
  border: 0;
  border-left: 3px solid var(--ink);
}

.journal-page__discovery-label {
  display: block;
  margin-bottom: 8px;
  color: var(--gold-dark);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.journal-page__discovery .type-subheading {
  margin: 0;
  color: var(--ink);
  font-family: var(--type-font-serif);
  font-size: var(--solution-quote-size);
  font-weight: 700;
  line-height: 1.35;
}

.journal-page__discovery .type-subheading::before {
  content: "„";
}

.journal-page__discovery .type-subheading::after {
  content: "“";
}

.journal-module__footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 18px;
  align-items: center;
  padding: 16px clamp(20px, 4vw, 42px);
  border-top: 1px solid var(--overlay-ink-line);
}

.journal-module__footer .button:last-child {
  justify-self: end;
}

.journal-module__footer>span {
  color: var(--ink-soft);
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.1em;
}

.journal-empty {
  display: grid;
  min-height: 460px;
  place-content: center;
  justify-items: center;
  padding: 48px;
  text-align: center;
}

.journal-empty>span {
  margin-bottom: 18px;
  color: var(--gold-dark);
  font-size: 3rem;
}

.journal-empty strong {
  margin-bottom: 8px;
  font-family: Georgia, serif;
  font-size: 1.7rem;
}

.journal-empty p {
  max-width: 420px;
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.55;
}

.module-card__book {
  position: relative;
  display: grid;
  width: 210px;
  height: 270px;
  place-items: center;
  align-self: center;
  justify-self: center;
  color: var(--gold-light);
  font-size: 3rem;
  background:
    linear-gradient(90deg, var(--overlay-black-26), var(--transparent) 12%),
    var(--gradient-stream);
  border: 4px solid var(--wood-border);
  border-radius: 8px 18px 18px 8px;
  box-shadow:
    -14px 18px 30px var(--overlay-stream-shadow),
    inset 0 0 0 2px var(--overlay-stream-inset);
  transform: rotate(-4deg);
}

.module-card__book::after {
  position: absolute;
  inset: 16px;
  content: "";
  border: 1px solid var(--overlay-stream-border);
  border-radius: 4px 12px 12px 4px;
}

.mechanics-section {
  padding: clamp(24px, 4vw, 44px);
  overflow: hidden;
  background: var(--gradient-surface-strong);
  border: 1px solid var(--line);
  border-radius: var(--radius-large);
  box-shadow: var(--shadow);
  opacity: 0.9;
}

.mechanics-section__header {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: end;
}

.mechanics-section__lead {
  max-width: 760px;
  margin: 18px 0 0;
  color: var(--text-muted);
}

.support-note {
  display: grid;
  gap: 0;
  padding: 20px;
  background: var(--mechanics-support-background);
  border: 1px solid var(--overlay-gold-28);
  border-radius: var(--radius-medium);
}

.support-note .type-kicker {
  display: block;
  margin: 0 0 var(--type-kicker-heading-gap);
}

.support-note .type-subheading {
  display: block;
  margin: 0;
}

.support-note .type-body {
  margin: 10px 0 0;
  color: var(--text-muted);
}

.mechanics-flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 32px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.mechanics-step {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  padding: 20px;
  border-right: 1px solid var(--line);
}

.mechanics-step:not(:last-child)::after {
  position: absolute;
  z-index: 1;
  top: 50%;
  right: 0;
  display: grid;
  width: 30px;
  aspect-ratio: 1;
  place-items: center;
  content: "→";
  color: var(--gold-light);
  font-family: var(--type-font-sans);
  font-size: 1rem;
  font-weight: 800;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 50%;
  transform: translate(50%, -50%);
}

.mechanics-step:last-child {
  border-right: 0;
}

.mechanics-step__number {
  color: var(--gold-light);
}

.mechanics-step .type-subheading,
.mechanics-step .type-body {
  margin: 0;
}

.mechanics-step .type-body {
  margin-top: 6px;
  color: var(--text-muted);
}

.mechanics-block {
  margin-top: 36px;
}

.mechanics-block__heading {
  max-width: 780px;
  margin-bottom: 18px;
}

.mechanics-block__heading .type-body {
  margin: 12px 0 0;
  color: var(--text-muted);
}

.rarity-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.rarity-card {
  --rarity-accent: var(--rarity-common);
  min-width: 0;
  padding: 16px;
  background: var(--mechanics-card-background);
  border: 1px solid var(--line);
  border-top: 4px solid var(--rarity-accent);
  border-radius: var(--radius-small);
}

.rarity-card--rare {
  --rarity-accent: var(--rarity-rare);
}

.rarity-card--epic {
  --rarity-accent: var(--rarity-epic);
}

.rarity-card--legendary {
  --rarity-accent: var(--rarity-legendary);
}

.rarity-card--special {
  --rarity-accent: var(--rarity-special);
}

.rarity-card .type-label {
  color: var(--rarity-accent);
}

.rarity-card .type-body {
  margin: 10px 0 0;
  color: var(--text-muted);
}

.trigger-overview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.trigger-group {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 14px;
  align-items: start;
  padding: 18px;
  background: var(--mechanics-card-background);
  border: 1px solid var(--line);
  border-radius: var(--radius-medium);
}

.trigger-group--special {
  background: var(--mechanics-special-background);
  border-color: var(--overlay-twitch-28);
}

.trigger-group__icon {
  display: grid;
  width: 42px;
  aspect-ratio: 1;
  place-items: center;
  color: var(--gold-light);
  border: 1px solid var(--overlay-gold-28);
  border-radius: 50%;
}

.trigger-group .type-subheading,
.trigger-group .type-body {
  margin: 0;
}

.trigger-group .type-body {
  margin-top: 6px;
  color: var(--text-muted);
}

.mechanics-cta {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  padding: 20px;
  margin-top: 36px;
  background: var(--mechanics-special-background);
  border: 1px solid var(--overlay-twitch-28);
  border-radius: var(--radius-medium);
}

.mechanics-cta .type-subheading,
.mechanics-cta .type-body {
  margin: 0;
}

.mechanics-cta .type-body {
  margin-top: 5px;
  color: var(--text-muted);
}

@media (max-width: 1050px) {
  .mechanics-section__header {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }

  .mechanics-flow {
    grid-template-columns: minmax(0, 1fr);
  }

  .mechanics-step {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .mechanics-step:not(:last-child)::after {
    top: auto;
    right: 50%;
    bottom: 0;
    content: "↓";
    transform: translate(50%, 50%);
  }

  .mechanics-step:last-child {
    border-bottom: 0;
  }

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

@media (max-width: 650px) {
  .mechanics-section {
    padding: 22px 16px;
    border-radius: 20px;
  }

  .mechanics-section__header {
    gap: 20px;
  }

  .mechanics-section__lead {
    margin-top: 12px;
  }

  .support-note,
  .mechanics-step,
  .trigger-group,
  .mechanics-cta {
    padding: 16px;
  }

  .mechanics-flow {
    margin-top: 24px;
  }

  .mechanics-block,
  .mechanics-cta {
    margin-top: 28px;
  }

  .rarity-grid,
  .trigger-overview {
    grid-template-columns: minmax(0, 1fr);
  }

  .mechanics-cta {
    align-items: stretch;
    flex-direction: column;
  }

  .mechanics-cta .button {
    width: 100%;
  }
}

.stream-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: clamp(30px, 5vw, 52px);
  background:
    radial-gradient(circle at 80% 20%, var(--overlay-twitch-18), var(--transparent) 28%),
    var(--surface);
  border: 1px solid var(--overlay-twitch-28);
  border-radius: var(--radius-large);
}

.stream-panel h2 {
  margin-bottom: 10px;
  font-size: clamp(1.8rem, 4vw, 3rem);
}

.stream-panel p:last-child {
  margin-bottom: 0;
  color: var(--text-muted);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  max-width: var(--content-width);
  padding: 32px 24px 50px;
  margin: 0 auto;
  color: var(--text-muted);
  font-size: 0.48rem;
  border-top: 1px solid var(--line);
}

.site-footer p {
  margin: 0;
}

.app-status {
  position: fixed;
  z-index: 500;
  right: 22px;
  bottom: 22px;
}

.app-status__loading,
.app-status__error {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: min(440px, calc(100vw - 44px));
  padding: 16px 18px;
  background: var(--overlay-surface-96);
  border: 1px solid var(--line);
  border-radius: var(--radius-medium);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.app-status__loading p,
.app-status__error p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.app-status__error>span {
  display: grid;
  flex: 0 0 auto;
  width: 34px;
  aspect-ratio: 1;
  place-items: center;
  color: var(--page);
  font-weight: 900;
  background: var(--danger);
  border-radius: 50%;
}

.loader {
  width: 24px;
  aspect-ratio: 1;
  border: 2px solid var(--overlay-gold-20);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: loader-spin 900ms linear infinite;
}

.noscript-message {
  position: fixed;
  z-index: 1000;
  right: 20px;
  bottom: 20px;
  left: 20px;
  padding: 18px;
  color: var(--ink);
  text-align: center;
  background: var(--paper-light);
  border-radius: var(--radius-medium);
}

@keyframes loader-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes compass-spin {
  to {
    transform: rotate(360deg);
  }
}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (min-width: 1051px) {

  /* Beide Teilbereiche teilen sich eine gemeinsame, gleich hohe Kopfzeile. */
  .module-grid {
    gap: 0;
  }

  .map-module {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    border-right: 0;
    border-radius: var(--radius-large) 0 0 var(--radius-large);
  }

  .hints-module {
    border-radius: 0 var(--radius-large) var(--radius-large) 0;
  }

  .map-module__header,
  .hints-module__header {
    min-height: 0;
  }

  .map-stage {
    min-height: 0;
  }
}

/* Kompakte Desktopansicht für Laptop-Viewporten, z. B. 14-Zoll-MacBooks. */
@media (min-width: 1051px) and (max-height: 950px) {
  .site-header {
    min-height: 60px;
    padding-inline: 38px;
  }

  .hero {
    min-height: 360px;
    padding-top: 34px;
    padding-bottom: 68px;
  }

  .hero__emblem {
    width: 170px;
  }

  .hero__progress {
    bottom: 16px;
  }

  .paper-panel {
    padding: 22px 30px;
  }

  /* Karte und Hinweise bilden auf Desktop eine zusammenhängende Fläche. */
  .module-grid {
    gap: 0;
  }

  .map-module {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    border-right: 0;
    border-radius: var(--radius-large) 0 0 var(--radius-large);
  }

  .hints-module {
    border-radius: 0 var(--radius-large) var(--radius-large) 0;
  }

  .introduction__grid {
    gap: 24px;
    margin-top: 14px;
  }

  .introduction__lead {
    font-size: 1rem;
    line-height: 1.48;
  }

  .rule-list {
    gap: 8px;
  }

  .rule-list li {
    grid-template-columns: 30px 1fr;
    gap: 9px;
    line-height: 1.35;
  }

  .rule-list li::before {
    width: 28px;
  }

  .map-stage,
  .expedition-map {
    min-height: 300px;
  }

  .map-stage {
    min-height: 0;
  }

  .map-module__header {
    align-items: center;
    gap: 18px;
    padding: 16px;
  }

  .map-module__header h2 {
    margin-bottom: 6px;
  }

  .map-module__header p:last-child {
    font-size: 0.92rem;
    line-height: 1.4;
  }

  .map-module__actions {
    gap: 10px;
  }

  .map-module__position strong {
    font-size: 0.92rem;
  }

  .hints-module__header {
    height: 150px;
    min-height: 150px;
    padding: 16px;
  }

  .hints-module__header p:last-child {
    font-size: 0.92rem;
    line-height: 1.4;
  }

  .hints-module__count {
    position: absolute;
    top: 22px;
    right: 24px;
    margin: 0;
  }

  .hints-module__count strong {
    font-size: 2.5rem;
  }

  .hints-module__window {
    max-height: 380px;
    padding: 12px;
  }

  .hint-card {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    padding: 12px 14px;
  }

  .hint-card h3 {
    margin-bottom: 4px;
    font-size: 1.1rem;
  }

  .hint-card p {
    font-size: 0.88rem;
    line-height: 1.35;
  }


  .journal-page,
  .journal-page__art {
    min-height: 360px;
  }

  .journal-page__content {
    padding: 34px 44px;
  }
}

@media (max-width: 1050px) {
  .site-header {
    grid-template-columns: 1fr auto;
    padding: 0 22px;
  }

  .nav-toggle {
    display: grid;
    width: 44px;
    aspect-ratio: 1;
    place-items: center;
    color: var(--text);
    background: var(--transparent);
    border: 1px solid var(--line);
    border-radius: 50%;
  }

  .nav-toggle__icon,
  .nav-toggle__icon::before,
  .nav-toggle__icon::after {
    width: 18px;
    height: 1px;
    content: "";
    background: currentColor;
    transition: transform var(--transition-fast);
  }

  .nav-toggle__icon {
    position: relative;
  }

  .nav-toggle__icon::before {
    position: absolute;
    top: -6px;
    left: 0;
  }

  .nav-toggle__icon::after {
    position: absolute;
    top: 6px;
    left: 0;
  }

  .nav-toggle[aria-expanded="true"] .nav-toggle__icon {
    background: var(--transparent);
  }

  .nav-toggle[aria-expanded="true"] .nav-toggle__icon::before {
    top: 0;
    transform: rotate(45deg);
  }

  .nav-toggle[aria-expanded="true"] .nav-toggle__icon::after {
    top: 0;
    transform: rotate(-45deg);
  }

  .site-navigation {
    position: absolute;
    top: calc(100% + 1px);
    right: 0;
    left: 0;
    display: none;
    flex-direction: column;
    gap: 0;
    padding: 10px 22px 18px;
    background: var(--overlay-page-97);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 40px var(--overlay-black-30);
  }

  .site-navigation.is-open {
    display: flex;
  }

  .site-navigation a {
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
  }

  .header-live-link {
    display: none !important;
  }

  .hero {
    grid-template-columns: 1fr 220px;
    gap: 24px;
    padding-top: 80px;
  }

  .hero__emblem {
    opacity: 0.72;
  }

  .hero__progress {
    grid-template-columns: 1fr 1fr;
  }

  .progress-card--wide {
    grid-column: 1 / -1;
    border-top: 1px solid var(--line);
  }

  .introduction__grid {
    grid-template-columns: 1fr;
  }

  .module-card,
  .module-card--featured {
    grid-template-columns: 1fr;
  }

  .map-module,
  .hints-module {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .journal-page {
    grid-template-columns: 1fr;
  }

  .journal-page__art {
    min-height: 380px;
    border-right: 0;
    border-bottom: 1px solid var(--overlay-ink-line-strong);
  }

  .journal-page__content {
    min-height: 540px;
  }

  .hints-module {
    grid-template-columns: 1fr;
  }

  .hints-module__header {
    min-height: 360px;
    border-right: 0;
    border-bottom: 1px solid var(--overlay-ink-16);
  }

  .hints-module__window {
    max-height: 560px;
  }

  .map-module__header {
    align-items: flex-start;
    flex-direction: column;
    gap: 28px;
  }

  .map-module__actions {
    width: 100%;
    justify-content: space-between;
  }

  .module-card__number {
    min-height: 150px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .module-card__book {
    margin: 50px auto 10px;
  }
}

@media (max-width: 640px) {
  :root {
    --header-height: 66px;
  }

  .brand__copy small {
    display: none;
  }

  .hero {
    display: block;
    min-height: auto;
    padding: 74px 20px 260px;
  }

  h1 {
    font-size: clamp(3.2rem, 18vw, 5.6rem);
  }

  .hero__emblem {
    position: absolute;
    z-index: -1;
    width: 200px;
    top: 36px;
    right: -60px;
    opacity: 0.24;
  }

  .hero__progress {
    right: 20px;
    bottom: 34px;
    left: 20px;
  }

  .progress-card {
    padding: 16px;
  }

  .page-shell {
    gap: 0;
    padding: 0 1rem 4rem;
  }

  .paper-panel,
  .module-card,
  .map-module,
  .hints-module,
  .journal-module,
  .stream-panel {
    border-radius: 20px;
  }

  .paper-panel {
    padding: 34px 26px;
  }

  .module-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .module-card__body {
    padding: 30px 24px 36px;
  }

  .map-module__header {
    padding: 30px 24px;
  }

  .map-module__actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .map-stage,
  .expedition-map {
    min-height: 430px;
  }

  .hints-module__header {
    min-height: 310px;
    padding: 30px 24px;
  }

  .hints-module__window {
    max-height: 500px;
    padding: 14px;
  }

  .journal-module__header {
    align-items: flex-start;
    flex-direction: column;
    gap: 26px;
    padding: 30px 24px;
  }

  .journal-module__count {
    justify-items: start;
  }

  .journal-module__count strong {
    font-size: 3.6rem;
  }

  .journal-page__art {
    min-height: 300px;
  }

  .journal-page__content {
    min-height: 0;
    padding: 34px 24px 40px;
  }

  .journal-page__topline {
    margin-bottom: 24px;
  }

  .journal-page__content h3 {
    font-size: 2.5rem;
  }

  .journal-module__footer {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 16px 14px;
  }

  .journal-module__footer>span {
    grid-column: 1 / -1;
    grid-row: 1;
    justify-self: center;
  }

  .journal-module__footer .button:last-child {
    grid-column: 2;
    grid-row: 2;
  }

  .hint-card {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    padding: 17px 14px;
  }

  .hint-card__meta {
    justify-content: flex-start;
  }

  .hint-card h3 {
    font-size: 1.18rem;
  }

  .stream-panel {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    padding-right: 20px;
    padding-left: 20px;
  }

  .app-status {
    right: 12px;
    bottom: 12px;
    left: 12px;
  }

  .app-status__loading,
  .app-status__error {
    max-width: none;
  }
}

/* Zentrale Textrollen. Komponenten steuern Farbe und Layout, diese Klassen
   steuern ausschließlich die gemeinsame Typografie über Variablen. */
.type-display.type-display {
  font-family: var(--type-font-display);
  font-size: var(--type-display-size);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 0.88;
}

.type-heading.type-heading {
  margin: 0 0 var(--type-heading-after-gap);
  color: var(--type-heading-color);
  font-family: var(--type-font-display);
  font-size: var(--type-heading-size);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1;
}

.type-subheading.type-subheading {
  font-family: var(--type-font-serif);
  font-size: var(--type-subheading-size);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.15;
}

.type-kicker.type-kicker {
  margin: 0 0 var(--type-kicker-heading-gap);
  color: var(--type-kicker-color);
  font-family: var(--type-font-sans);
  font-size: var(--type-kicker-size);
  font-weight: 900;
  letter-spacing: 0.16em;
  line-height: 1;
  text-transform: uppercase;
}

.type-heading.type-heading--paper {
  color: var(--type-heading-color-paper);
}

.type-kicker.type-kicker--paper {
  color: var(--type-kicker-color-paper);
}

.type-label.type-label {
  font-family: var(--type-font-sans);
  font-size: var(--type-label-size);
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.type-meta.type-meta {
  font-family: var(--type-font-sans);
  font-size: var(--type-meta-size);
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.type-value.type-value {
  font-family: var(--type-font-serif);
  font-size: var(--type-value-size);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.1;
}

.type-count.type-count {
  font-family: var(--type-font-serif);
  font-size: var(--type-count-size);
  font-weight: 400;
  letter-spacing: 0;
  line-height: 0.8;
}

.type-body.type-body {
  font-family: var(--type-font-serif);
  font-size: var(--type-body-size);
  font-weight: 400;
  letter-spacing: 0;
  line-height: var(--type-body-leading);
}

.type-lead.type-lead {
  font-family: var(--type-font-serif);
  font-size: var(--type-lead-size);
  font-weight: 400;
  letter-spacing: 0;
  line-height: var(--type-lead-leading);
}

@media (max-width: 1050px) {
  .solution-book__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 650px) {
  .solution-book__grid {
    grid-template-columns: minmax(0, 1fr);
    padding: 14px;
  }

  .solution-card {
    min-height: 0;
  }
}

.site-footer .type-body {
  font-size: var(--footer-text-size);
}


/* Karte und Hinweise sind ein gemeinsames Modul. Die beiden Kopfbereiche teilen
   sich dieselbe Grid-Zeile und erhalten ihre Typografie aus denselben Variablen. */
.expedition-module {
  --module-space: 16px;
  --module-kicker-size: var(--type-kicker-size);
  --module-heading-size: var(--type-heading-size);
  --module-label-size: var(--type-label-size);
  --module-value-size: var(--type-value-size);
  --module-count-size: var(--type-count-size);
  --hint-meta-size: var(--type-meta-size);
  --hint-heading-size: var(--type-subheading-size);
  --hint-text-size: var(--type-body-size);
  --hint-text-leading: var(--type-body-leading);
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(360px, 0.85fr);
  grid-template-rows: auto 400px;
  grid-template-areas:
    "map-header hints-header"
    "map hints";
  overflow: hidden;
  background: var(--gradient-surface-strong);
  border: 1px solid var(--line);
  border-radius: var(--radius-large);
  box-shadow: var(--shadow);
}

.expedition-module .map-module__header {
  grid-area: map-header;
}

.expedition-module .hints-module__header {
  grid-area: hints-header;
  border-left: 1px solid var(--line);
}

.expedition-module .map-stage {
  grid-area: map;
  min-height: 400px;
}

.expedition-module .expedition-map {
  min-height: 400px;
}

.expedition-module .hints-module__window {
  grid-area: hints;
  min-height: 0;
  max-height: none;
  box-sizing: border-box;
  padding: var(--module-space);
  padding-bottom: calc(var(--module-space) * 1.5);
  border-left: 1px solid var(--line);
}

.expedition-module .map-module__header,
.expedition-module .hints-module__header {
  box-sizing: border-box;
  width: 100%;
  height: auto;
  min-height: 0;
  padding: var(--module-space);
  align-self: stretch;
}

.expedition-module .hints-module__header {
  flex-direction: row;
  align-items: center;
}

.module-kicker {
  margin: 0 0 8px;
  color: var(--gold-light);
  font-size: var(--module-kicker-size);
  font-weight: 900;
  letter-spacing: 0.16em;
  line-height: 1;
  text-transform: uppercase;
}

.module-heading {
  margin: 0;
  color: var(--text);
  font-size: var(--module-heading-size);
  line-height: 0.95;
}

.expedition-module .module-heading {
  margin: 0;
  font-size: var(--module-heading-size);
}

.module-label {
  color: var(--text-muted);
  font-size: var(--module-label-size);
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.module-value {
  color: var(--text);
  font-family: Georgia, serif;
  font-size: var(--module-value-size);
  line-height: 1.1;
}

.module-count {
  color: var(--gold-light);
  font-family: Georgia, serif;
  font-size: var(--module-count-size);
  font-weight: 400;
  line-height: 0.8;
}

.expedition-module .hints-module__count {
  position: static;
  flex: 0 0 auto;
  margin: 0 0 0 auto;
}

.expedition-module .hints-module__count strong {
  font-size: var(--module-count-size);
}

.expedition-module .hints-module__count small,
.expedition-module .map-module__position small {
  font-size: var(--module-label-size);
}

.expedition-module .map-module__position strong {
  font-size: var(--module-value-size);
}

.expedition-module .hint-card__meta {
  font-size: var(--hint-meta-size);
}

.expedition-module .hint-card__heading {
  margin: 0 0 5px;
  font-size: var(--hint-heading-size);
  line-height: 1.15;
}

.expedition-module .hint-card__text {
  margin: 0;
  font-size: var(--hint-text-size);
  line-height: var(--hint-text-leading);
}

@media (max-width: 1050px) {
  .expedition-module {
    --module-space: 14px;
    --module-heading-size: clamp(1.8rem, 8vw, 2.3rem);
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(360px, 52vh) auto auto;
    grid-template-areas:
      "map-header"
      "map"
      "hints-header"
      "hints";
    border-radius: 20px;
  }

  .expedition-module .hints-module__header,
  .expedition-module .hints-module__window {
    border-left: 0;
  }

  .expedition-module .map-module__header,
  .expedition-module .hints-module__header {
    height: auto;
    min-height: 0;
    padding: var(--module-space);
  }

  .expedition-module .hints-module__header {
    margin-top: 1rem;
  }

  .expedition-module .hints-module__window {
    height: clamp(320px, 52vh, 480px);
    max-height: 480px;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .expedition-module .map-module__actions {
    align-items: center;
    flex-direction: row;
  }
}

@media (max-width: 650px) {
  .expedition-module .hints-module__window {
    height: clamp(300px, 50vh, 400px);
    max-height: 400px;
  }
}

.leaflet-control-attribution.leaflet-control {
  display: none !important;
}

/* Twitch-Status und VOD verwenden ausschließlich die globalen Theme-Rollen. */
.site-header {
  grid-template-areas: "brand nav live";
}

.brand {
  grid-area: brand;
}

.site-navigation {
  grid-area: nav;
}

.nav-toggle {
  grid-area: toggle;
}

.header-live-link {
  grid-area: live;
  max-width: min(320px, 30vw);
  color: var(--text-muted);
  white-space: nowrap;
  background: var(--twitch-status-background);
}

.header-live-link > span {
  width: auto;
  aspect-ratio: auto;
  background: none;
  border-radius: 0;
  box-shadow: none;
}

.header-live-link .header-live-link__dot {
  flex: 0 0 auto;
  width: 7px;
  aspect-ratio: 1;
  background: var(--twitch-status-offline);
  border-radius: 50%;
  box-shadow: none;
}

.header-live-link__countdown {
  overflow: hidden;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
}

.header-live-link.is-live {
  color: var(--text);
  background: var(--twitch-status-live-background);
  border-color: var(--twitch);
}

.header-live-link.is-live .header-live-link__dot {
  background: var(--twitch-status-live);
  box-shadow: 0 0 12px var(--twitch-status-live);
  animation: twitch-live-pulse 1.6s ease-in-out infinite;
}

.hero {
  grid-template-columns: minmax(0, 1fr) minmax(400px, 520px);
}

.hero__vod {
  width: 100%;
  min-width: 400px;
  overflow: hidden;
  color: var(--text);
  background: var(--twitch-vod-background);
  border: 1px solid var(--twitch-vod-border);
  border-radius: var(--radius-medium);
  box-shadow: var(--shadow);
}

.hero__vod-header,
.hero__vod-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
}

.hero__vod-header .type-kicker,
.hero__vod-header .type-stream-title {
  margin: 0;
}

.hero__vod-header .type-kicker {
  margin-bottom: var(--type-kicker-heading-gap);
}

.hero__vod-header .type-stream-title {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.type-stream-title.type-stream-title {
  color: var(--text);
  font-family: var(--type-font-serif);
  font-size: var(--type-stream-title-size);
  font-weight: var(--type-stream-title-weight);
  letter-spacing: 0;
  line-height: var(--type-stream-title-leading);
}

.hero__vod-badge {
  flex: 0 0 auto;
  padding: 6px 8px;
  color: var(--twitch-vod-badge-text);
  background: var(--twitch-vod-badge-background);
  border-radius: 999px;
}

.hero__vod-media {
  background: var(--twitch-vod-media-background);
  border-top: 1px solid var(--twitch-vod-border);
  border-bottom: 1px solid var(--twitch-vod-border);
}

.hero__vod-frame {
  display: block;
  width: 100%;
  height: 300px;
  border: 0;
}

.hero__vod-poster {
  position: relative;
  display: none;
  aspect-ratio: 16 / 9;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  text-decoration: none;
  background: var(--twitch-vod-media-background);
}

.hero__vod-poster::after {
  position: absolute;
  inset: 0;
  content: "";
  background: var(--twitch-vod-poster-overlay);
}

.hero__vod-poster img {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__vod-play {
  position: relative;
  z-index: 1;
  padding: 10px 14px;
  color: var(--twitch-vod-badge-text);
  background: var(--twitch-vod-badge-background);
  border-radius: 999px;
}

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

.hero__vod-footer a {
  color: var(--text);
  text-decoration: none;
}

@keyframes twitch-live-pulse {
  50% {
    opacity: 0.55;
    transform: scale(0.82);
  }
}

@media (max-width: 1050px) {
  .site-header {
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-areas: "brand live toggle";
    gap: 10px;
  }

  .header-live-link:not(.is-hidden) {
    display: inline-flex !important;
    max-width: 260px;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(400px, 46vw);
  }
}

@media (max-width: 850px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }

  .hero__vod {
    width: min(100%, 640px);
    justify-self: start;
  }
}

@media (min-width: 851px) {
  .hero {
    padding-bottom: 112px;
  }
}

@media (max-width: 640px) {
  .header-live-link:not(.is-hidden) {
    max-width: 118px;
    padding: 8px 10px;
  }

  .header-live-link__label {
    display: none;
  }

  .header-live-link__countdown {
    max-width: 82px;
  }

  .hero {
    display: grid;
    gap: 28px;
  }

  .hero__vod {
    min-width: 0;
  }

  .hero__vod-frame {
    display: none;
  }

  .hero__vod-poster {
    display: flex;
  }
}

@media (max-width: 420px) {
  .brand__copy {
    display: none;
  }
}
