:root {
  --bg: #f6f2e8;
  --bg-soft: #f7fbfb;
  --surface: rgba(255, 255, 255, 0.88);
  --surface-strong: rgba(255, 255, 255, 0.96);
  --line: rgba(27, 105, 113, 0.14);
  --line-strong: rgba(27, 105, 113, 0.28);
  --text: #17373d;
  --text-soft: #5b7679;
  --accent: #3db8ab;
  --accent-strong: #1f7a78;
  --sky: #dff3fb;
  --solar: #ffd66b;
  --field: #d8efe8;
  --hydro: #6bb8d6;
  --warm: #f5c4a6;
  --danger: #d87457;
  --danger-soft: #eaa37c;
  --shadow-lg: 0 28px 70px rgba(57, 93, 90, 0.12);
  --shadow-md: 0 16px 36px rgba(57, 93, 90, 0.1);
  --radius-lg: 34px;
  --radius-md: 26px;
  --radius-sm: 18px;
  --container: 1260px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Avenir Next", "Segoe UI Variable", "Segoe UI", "Trebuchet MS",
    sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 0%, rgba(255, 255, 255, 0.74), transparent 30%),
    radial-gradient(circle at 88% 10%, rgba(255, 214, 107, 0.28), transparent 26%),
    linear-gradient(180deg, #f9f6ef 0%, #f4fbfb 36%, #eef8f9 100%);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    linear-gradient(to right, rgba(27, 105, 113, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(27, 105, 113, 0.03) 1px, transparent 1px);
  background-size: 88px 88px;
  opacity: 0.55;
  pointer-events: none;
  mask-image: radial-gradient(circle at center, black, transparent 85%);
  -webkit-mask-image: radial-gradient(circle at center, black, transparent 85%);
}

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

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

button {
  cursor: pointer;
  border: 0;
}

.hidden {
  display: none !important;
}

.page-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}

.page-glow-sky {
  width: 28rem;
  height: 28rem;
  top: -10rem;
  left: -6rem;
  background: rgba(160, 223, 247, 0.42);
}

.page-glow-sun {
  width: 26rem;
  height: 26rem;
  top: -8rem;
  right: -6rem;
  background: rgba(255, 214, 107, 0.3);
}

.page-glow-field {
  width: 34rem;
  height: 24rem;
  bottom: -7rem;
  right: 4rem;
  background: rgba(184, 231, 205, 0.36);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  width: min(calc(100% - 1.4rem), calc(var(--container) + 5rem));
  margin: 1rem auto 0;
  padding: 1rem 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(18px);
  box-shadow: 0 20px 35px rgba(90, 126, 123, 0.08);
}

.site-header-game {
  width: min(calc(100% - 1.4rem), calc(100vw - 1.4rem));
  border-radius: 30px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
}

.brand-mark {
  width: 3.2rem;
  height: 3.2rem;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: linear-gradient(180deg, #ffffff, #eef8f9);
  box-shadow: inset 0 0 0 1px rgba(27, 105, 113, 0.08), 0 10px 22px rgba(84, 122, 117, 0.08);
}

.brand-mark svg {
  width: 2.2rem;
  height: 2.2rem;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.brand-copy strong {
  font-size: 0.95rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.brand-copy span {
  font-size: 0.82rem;
  color: var(--text-soft);
}

.site-nav,
.game-header-status {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.game-header-status {
  justify-content: flex-end;
  flex: 1;
}

#soundToggleButton {
  min-width: 7.5rem;
}

.site-nav a,
.status-pill {
  padding: 0.72rem 0.98rem;
  border-radius: 999px;
  color: var(--text-soft);
  background: rgba(245, 250, 250, 0.9);
  border: 1px solid rgba(27, 105, 113, 0.08);
}

.nav-cta {
  color: var(--accent-strong) !important;
  background: #ecfaf7 !important;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 3.35rem;
  padding: 0.95rem 1.35rem;
  border-radius: 999px;
  font-weight: 650;
  transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

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

.button-primary {
  color: #103c40;
  background: linear-gradient(135deg, #67d4c5, #ffd66b);
  box-shadow: 0 18px 28px rgba(95, 184, 175, 0.28);
}

.button-secondary {
  color: var(--accent-strong);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(27, 105, 113, 0.12);
}

.button-small {
  min-height: 2.9rem;
  padding: 0.7rem 1rem;
}

.page-section {
  position: relative;
  z-index: 1;
  width: min(calc(100% - 1.6rem), var(--container));
  margin: 0 auto;
  padding: 4.8rem 0 0;
}

.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(460px, 0.95fr);
  gap: 2rem;
  align-items: center;
  padding-top: 3.4rem;
}

.eyebrow,
.info-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-strong);
}

.hero-copy h1,
.section-heading h2,
.panel-heading h2,
.overlay-panel h3,
.impact-story h2 {
  margin: 1rem 0 0;
  font-family: "Avenir Next Condensed", "Avenir Next", "Arial Narrow", sans-serif;
  letter-spacing: -0.05em;
  line-height: 0.96;
}

.hero-copy h1 {
  font-size: clamp(3.4rem, 8vw, 6.6rem);
  max-width: 10ch;
}

.hero-lead,
.section-heading p,
.impact-story p,
.overlay-panel p,
.panel-footnote,
.storage-panel p,
.preview-status,
.save-status {
  color: var(--text-soft);
  line-height: 1.72;
}

.hero-lead {
  margin-top: 1.4rem;
  max-width: 38rem;
  font-size: 1.05rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 2rem;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  margin-top: 2rem;
}

.metric-chip,
.card-soft,
.card-strong,
.hud-card,
.plant-card,
.storage-panel,
.board-footer,
.score-preview-list li,
.leaderboard-list li,
.weather-card {
  border: 1px solid rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-md);
}

.metric-chip {
  padding: 1rem 1.1rem;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.82);
}

.metric-chip span,
.hud-card span,
.plant-card span,
.storage-panel span,
.leaderboard-item .leaderboard-meta,
.score-preview-rank,
.score-preview-list strong,
.result-grid span,
.field span:first-child {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.metric-chip strong,
.info-card strong,
.hud-card strong,
.result-grid strong,
.leaderboard-score,
.score-preview-score {
  display: block;
  margin-top: 0.35rem;
  font-family: "SF Mono", "Segoe UI Mono", "Roboto Mono", monospace;
}

.metric-chip strong {
  font-size: 1.4rem;
}

.card-soft {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(248, 252, 252, 0.88));
}

.card-strong {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 252, 252, 0.96));
  box-shadow: var(--shadow-lg);
}

.hero-art {
  min-height: 39rem;
  padding: 1.2rem;
}

.hero-art::before {
  content: "";
  position: absolute;
  inset: 1.2rem;
  border-radius: 28px;
  background:
    radial-gradient(circle at 18% 18%, rgba(223, 243, 251, 0.76), transparent 30%),
    radial-gradient(circle at 82% 16%, rgba(255, 241, 189, 0.72), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.74), rgba(245, 251, 252, 0.6));
  pointer-events: none;
}

.hero-illustration {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: auto;
}

.floating-note {
  position: absolute;
  z-index: 2;
  display: grid;
  gap: 0.15rem;
  padding: 0.8rem 1rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(27, 105, 113, 0.08);
  box-shadow: 0 14px 24px rgba(91, 118, 121, 0.12);
  animation: noteFloat 5s ease-in-out infinite;
}

.floating-note strong {
  font-size: 0.88rem;
}

.floating-note span {
  color: var(--text-soft);
  font-size: 0.78rem;
}

.note-one {
  top: 5rem;
  left: 2rem;
}

.note-two {
  top: 12rem;
  right: 2rem;
  animation-delay: -2s;
}

.note-three {
  right: 4rem;
  bottom: 3rem;
  animation-delay: -1s;
}

.hero-launch-panel {
  position: absolute;
  z-index: 3;
  left: 2rem;
  right: 2rem;
  bottom: 1.8rem;
  display: grid;
  gap: 0.45rem;
  padding: 1rem 1.05rem 1.1rem;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(247, 252, 252, 0.92));
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 22px 36px rgba(87, 118, 121, 0.14);
  text-decoration: none;
  color: var(--text);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.hero-launch-panel strong {
  font-family: "Avenir Next Condensed", "Avenir Next", "Arial Narrow", sans-serif;
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  letter-spacing: -0.05em;
  line-height: 0.94;
}

.hero-launch-panel p {
  margin: 0;
  max-width: 34rem;
  color: var(--text-soft);
  line-height: 1.62;
}

.hero-launch-panel:hover {
  transform: translateY(-2px);
  box-shadow: 0 28px 40px rgba(87, 118, 121, 0.18);
  border-color: rgba(77, 194, 188, 0.24);
}

.hero-launch-panel:hover .hero-launch-button {
  transform: translateX(3px);
}

.hero-launch-button {
  width: fit-content;
  margin-top: 0.25rem;
  pointer-events: none;
  transition: transform 180ms ease;
}

.section-heading,
.panel-heading {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1.6rem;
}

.section-heading h2,
.panel-heading h2,
.impact-story h2 {
  font-size: clamp(2.4rem, 5vw, 4rem);
  max-width: 13ch;
}

.process-grid,
.impact-layout,
.flow-section {
  display: grid;
  gap: 1rem;
}

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

.process-card {
  padding: 1.4rem;
  min-height: 16rem;
}

.process-card::after,
.info-card::after,
.hud-card::after,
.weather-card::after {
  content: "";
  position: absolute;
  inset: auto 1.2rem 1rem 1.2rem;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(61, 184, 171, 0.12), rgba(255, 214, 107, 0.54));
}

.process-index {
  display: inline-flex;
  width: 2.5rem;
  height: 2.5rem;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #eaf7f5;
  color: var(--accent-strong);
  font-family: "SF Mono", "Segoe UI Mono", "Roboto Mono", monospace;
  font-weight: 700;
}

.process-card h3,
.overlay-panel h3 {
  margin: 1rem 0 0.55rem;
  font-size: 1.5rem;
}

.process-card p,
.leaderboard-item .leaderboard-meta,
.preview-status,
.score-empty,
.leaderboard-empty {
  color: var(--text-soft);
  line-height: 1.65;
}

.flow-section {
  grid-template-columns: minmax(0, 1.1fr) minmax(330px, 0.75fr);
  align-items: stretch;
}

.flow-diagram {
  padding: 1.4rem;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.8rem;
  align-items: center;
}

.flow-diagram-cutaway {
  grid-template-columns: 1fr;
  gap: 1.2rem;
  align-content: start;
  padding: 1.55rem;
}

.cutaway-head {
  display: grid;
  gap: 0.5rem;
  max-width: 44rem;
}

.cutaway-head strong {
  font-family: "Avenir Next Condensed", "Avenir Next", "Arial Narrow", sans-serif;
  font-size: clamp(1.75rem, 3vw, 2.45rem);
  letter-spacing: -0.05em;
  line-height: 0.96;
}

.cutaway-head p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.72;
}

.keyboard-cutaway-stage {
  position: relative;
  min-height: 33rem;
  padding: 1rem;
  border-radius: 30px;
  background:
    radial-gradient(circle at 18% 18%, rgba(223, 243, 251, 0.62), transparent 26%),
    radial-gradient(circle at 84% 16%, rgba(255, 241, 189, 0.5), transparent 24%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(244, 250, 251, 0.76));
  border: 1px solid rgba(255, 255, 255, 0.84);
}

.keyboard-cutaway-stage::before {
  content: "";
  position: absolute;
  inset: 1.1rem;
  border-radius: 24px;
  background:
    linear-gradient(90deg, rgba(77, 194, 188, 0.06) 1px, transparent 1px),
    linear-gradient(180deg, rgba(77, 194, 188, 0.06) 1px, transparent 1px);
  background-size: 2.9rem 2.9rem;
  opacity: 0.3;
  pointer-events: none;
}

.keyboard-cutaway-figure {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: auto;
}

.trace-line {
  stroke-dasharray: 16 14;
  animation: traceFlow 2.8s linear infinite;
}

.trace-line-secondary {
  animation-duration: 3.4s;
  animation-direction: reverse;
  opacity: 0.92;
}

.cutaway-callout {
  position: absolute;
  z-index: 2;
  width: min(13rem, 34%);
  padding: 0.92rem 1rem 1rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(27, 105, 113, 0.1);
  box-shadow: 0 20px 32px rgba(95, 126, 131, 0.12);
  display: grid;
  gap: 0.28rem;
}

.cutaway-callout strong {
  font-size: 1rem;
  line-height: 1.08;
}

.cutaway-callout p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.84rem;
  line-height: 1.58;
}

.cutaway-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(77, 194, 188, 0.16), rgba(255, 214, 107, 0.24));
  color: var(--accent-strong);
  font-family: "SF Mono", "Segoe UI Mono", "Roboto Mono", monospace;
  font-size: 0.75rem;
  font-weight: 700;
}

.callout-press {
  top: 1rem;
  left: 1rem;
}

.callout-piezo {
  top: 1rem;
  right: 1rem;
}

.callout-trace {
  left: 1.4rem;
  bottom: 1.1rem;
}

.callout-buffer {
  right: 1.4rem;
  bottom: 1.1rem;
}

.cutaway-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.cutaway-step {
  padding: 0.95rem 1rem;
  border-radius: 18px;
  background: rgba(248, 252, 252, 0.9);
  border: 1px solid rgba(27, 105, 113, 0.08);
  display: grid;
  gap: 0.28rem;
}

.cutaway-step span {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.cutaway-step strong {
  font-size: 0.98rem;
  line-height: 1.18;
}

.flow-node {
  min-height: 11.5rem;
  padding: 1.1rem;
  border-radius: 24px;
  background: rgba(245, 251, 252, 0.85);
  border: 1px solid rgba(27, 105, 113, 0.08);
  display: grid;
  align-content: end;
  gap: 0.3rem;
}

.flow-node strong {
  font-size: 1.15rem;
}

.flow-node span {
  color: var(--text-soft);
}

.flow-link {
  position: relative;
  min-height: 2.8rem;
}

.flow-link span {
  position: absolute;
  top: 50%;
  width: 0.8rem;
  height: 0.8rem;
  margin-top: -0.4rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--solar));
  box-shadow: 0 0 0 8px rgba(77, 194, 188, 0.08);
  animation: dotTravel 2.8s linear infinite;
}

.flow-link span:nth-child(1) { left: 6%; }
.flow-link span:nth-child(2) { left: 34%; animation-delay: -0.8s; }
.flow-link span:nth-child(3) { left: 62%; animation-delay: -1.5s; }

.infographic-stack {
  display: grid;
  gap: 1rem;
}

.info-card {
  position: relative;
  padding: 1.3rem 1.3rem 1.8rem;
}

.info-card strong {
  font-size: 2.15rem;
  letter-spacing: -0.05em;
}

.impact-layout {
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 0.9fr);
  align-items: stretch;
}

.impact-story,
.impact-chart,
.leaderboard-preview,
.world-panel,
.board-footer {
  padding: 1.4rem;
}

.bullet-list {
  margin: 1.2rem 0 0;
  padding-left: 1.2rem;
  color: var(--text-soft);
}

.bullet-list li {
  margin: 0.55rem 0;
}

.chart-head {
  display: grid;
  gap: 0.35rem;
}

.chart-head strong {
  font-size: 1.35rem;
}

.mix-bars {
  display: grid;
  gap: 0.85rem;
  margin-top: 1.6rem;
}

.mix-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 0.85rem;
  align-items: center;
}

.mix-row span {
  color: var(--text-soft);
  font-weight: 600;
}

.mix-track {
  height: 0.95rem;
  border-radius: 999px;
  background: rgba(208, 230, 229, 0.7);
  overflow: hidden;
}

.mix-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #77cfc2, #8ad5ef);
}

.mix-track-emphasis i {
  background: linear-gradient(90deg, #77cfc2, #ffd66b);
}

.chart-note {
  margin-top: 1rem;
  color: var(--text-soft);
}

.leaderboard-preview-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.score-preview-list,
.leaderboard-list {
  list-style: none;
  padding: 0;
  margin: 1.2rem 0 0;
  display: grid;
  gap: 0.75rem;
}

.score-preview-list li,
.leaderboard-list li {
  padding: 0.9rem 1rem;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.76);
}

.score-preview-item,
.leaderboard-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.8rem;
  align-items: center;
}

.score-preview-rank,
.leaderboard-rank {
  width: 2.3rem;
  height: 2.3rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #eef7f8;
  color: var(--accent-strong);
  font-family: "SF Mono", "Segoe UI Mono", "Roboto Mono", monospace;
  font-weight: 700;
}

.score-preview-meta strong,
.leaderboard-main strong {
  display: block;
  font-size: 1rem;
}

.score-preview-meta span,
.leaderboard-meta {
  color: var(--text-soft);
  font-size: 0.84rem;
}

.score-preview-score,
.leaderboard-score {
  font-size: 1.05rem;
  color: var(--accent-strong);
}

.preview-status,
.panel-footnote,
.save-status {
  margin-top: 1rem;
  font-size: 0.92rem;
}

.site-footer {
  width: min(calc(100% - 1.6rem), var(--container));
  margin: 4rem auto 2rem;
  padding: 1.1rem 1.2rem;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.86);
  color: var(--text-soft);
  text-align: center;
}

.site-footer p {
  margin: 0;
  line-height: 1.7;
  max-width: 52rem;
  margin-inline: auto;
}

.site-footer p + p {
  margin-top: 0.4rem;
}

.site-footer a {
  color: var(--accent-strong);
  font-weight: 700;
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

.site-footer-game {
  margin-top: 0;
  margin-bottom: 1.2rem;
}

.page-imprint .site-header {
  margin-top: 1rem;
}

.imprint-page {
  display: grid;
  gap: 1.4rem;
}

.imprint-intro,
.imprint-card {
  padding: 1.5rem;
}

.imprint-intro h1 {
  margin: 0.9rem 0 0.8rem;
  font-family: "Avenir Next Condensed", "Avenir Next", "Arial Narrow", sans-serif;
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  letter-spacing: -0.05em;
  line-height: 0.94;
}

.imprint-intro p,
.imprint-card p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.72;
}

.imprint-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.7fr);
  gap: 1rem;
}

.imprint-card h2 {
  margin: 0 0 1rem;
  font-family: "Avenir Next Condensed", "Avenir Next", "Arial Narrow", sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  letter-spacing: -0.04em;
  line-height: 0.98;
}

.imprint-card h3 {
  margin: 0 0 0.75rem;
  font-size: 1.02rem;
}

.imprint-block + .imprint-block {
  margin-top: 1rem;
}

.imprint-block address {
  font-style: normal;
  color: var(--text-soft);
  line-height: 1.72;
}

.imprint-card a,
.imprint-intro a {
  color: var(--accent-strong);
  font-weight: 700;
  text-decoration: none;
}

.imprint-card a:hover,
.imprint-intro a:hover {
  text-decoration: underline;
}

.imprint-meta {
  display: grid;
  gap: 0.72rem;
}

.imprint-meta div {
  padding: 0.9rem 1rem;
  border-radius: 18px;
  background: rgba(248, 252, 252, 0.9);
  border: 1px solid rgba(27, 105, 113, 0.08);
}

.imprint-meta span {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.imprint-meta strong {
  display: block;
  margin-top: 0.28rem;
  font-size: 0.98rem;
  line-height: 1.38;
}

.page-game {
  min-height: 100vh;
}

.game-shell-main {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 182px minmax(0, 1fr) 198px;
  gap: 0.6rem;
  width: min(calc(100% - 1.4rem), calc(100vw - 1.4rem));
  margin: 0.75rem auto 0.8rem;
  height: calc(100svh - 8.2rem);
  min-height: 0;
  align-items: stretch;
}

.energy-map-layer {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.energy-map {
  width: 100%;
  height: 100%;
}

.grid-segment {
  fill: none;
  stroke: rgba(88, 150, 152, 0.22);
  stroke-linecap: round;
  stroke-width: 10;
  stroke-dasharray: 18 18;
  transition: stroke 220ms ease, opacity 220ms ease, filter 220ms ease;
}

.grid-segment.is-active {
  stroke: url(#mapFlowGradient);
  opacity: 1;
  filter: drop-shadow(0 0 8px rgba(74, 176, 168, 0.28));
  animation: segmentFlow 2.8s linear infinite;
}

.grid-node {
  fill: rgba(255, 255, 255, 0.72);
  stroke: rgba(88, 150, 152, 0.34);
  stroke-width: 8;
  transition: fill 220ms ease, stroke 220ms ease, transform 220ms ease;
}

.grid-node.is-active {
  fill: #fff8d8;
  stroke: #59c9b8;
}

.plant-path,
.turbine-tower,
.turbine-blade,
.solar-grid,
.substation-line,
.substation-pole {
  fill: none;
  stroke: rgba(88, 150, 152, 0.36);
  stroke-linecap: round;
  stroke-linejoin: round;
}

.turbine-tower { stroke-width: 7; }
.turbine-blade { stroke-width: 6; }
.plant-path { stroke-width: 7; }
.solar-grid { stroke-width: 5; }
.substation-line,
.substation-pole { stroke-width: 6; }

.solar-panel,
.hydro-house,
.bio-tank,
.substation-box,
.city-block {
  fill: rgba(255, 255, 255, 0.58);
  stroke: rgba(88, 150, 152, 0.28);
  stroke-width: 6;
}

.bio-top {
  fill: rgba(216, 239, 232, 0.72);
  stroke: rgba(88, 150, 152, 0.28);
  stroke-width: 6;
}

.water-ribbon {
  fill: none;
  stroke: rgba(107, 184, 214, 0.68);
  stroke-width: 14;
  stroke-linecap: round;
}

.city-window {
  fill: rgba(255, 255, 255, 0.35);
  transition: fill 220ms ease;
}

.city-window.is-lit {
  fill: #ffe08a;
}

.turbine-rotor {
  transform-origin: center;
  animation: rotorSpin var(--rotor-duration, 5s) linear infinite;
}

.world-panel {
  position: relative;
  z-index: 1;
  align-self: stretch;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(248, 252, 252, 0.8));
  min-height: 0;
}

.page-game .world-panel {
  padding: 1rem;
}

.world-panel-left,
.world-panel-right {
  display: grid;
  align-content: start;
  gap: 0.55rem;
  min-width: 0;
  overflow: auto;
  scrollbar-width: thin;
}

.world-panel-right {
  gap: 0.72rem;
}

.page-game .world-panel .panel-heading {
  gap: 0.24rem;
  margin-bottom: 0.4rem;
}

.page-game .world-panel .panel-heading h2 {
  font-size: clamp(0.96rem, 1vw, 1.14rem);
  max-width: none;
  line-height: 1.04;
}

.plant-card,
.storage-panel {
  padding: 0.72rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.84);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.6rem;
  align-items: center;
}

.plant-card strong,
.storage-panel strong,
.weather-copy strong {
  display: block;
  margin-top: 0.12rem;
  font-size: 0.82rem;
  line-height: 1.12;
}

.page-game .eyebrow,
.page-game .info-label {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
}

.page-game .plant-card span,
.page-game .storage-panel span,
.page-game .weather-copy span,
.page-game .leaderboard-meta,
.page-game .panel-footnote,
.page-game .field-static-value,
.page-game .field span:first-child {
  font-size: 0.68rem;
  line-height: 1.45;
}

.page-game .storage-panel p,
.page-game .leaderboard-empty {
  font-size: 0.74rem;
  line-height: 1.5;
}

.plant-icon {
  width: 2.3rem;
  height: 2.3rem;
  border-radius: 14px;
  background: #f2fbfb;
  position: relative;
  box-shadow: inset 0 0 0 1px rgba(27, 105, 113, 0.08);
}

.plant-icon::before,
.plant-icon::after {
  content: "";
  position: absolute;
}

.plant-icon-wind::before {
  inset: 0.5rem 1.38rem 0.45rem;
  background: #84cbc3;
  border-radius: 999px;
}

.plant-icon-wind::after {
  inset: 0.7rem;
  border-top: 0.25rem solid #84cbc3;
  border-left: 0.25rem solid transparent;
  border-right: 0.25rem solid transparent;
  border-radius: 50%;
}

.plant-icon-solar::before {
  inset: 0.65rem 0.55rem 0.95rem;
  background: #fff1bd;
  border-radius: 14px;
  box-shadow: inset 0 0 0 1px rgba(228, 187, 69, 0.28);
}

.plant-icon-solar::after {
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 50%;
  top: 0.45rem;
  right: 0.45rem;
  background: #ffd66b;
}

.plant-icon-hydro::before {
  left: 0.55rem;
  right: 0.55rem;
  top: 0.95rem;
  bottom: 0.7rem;
  background: linear-gradient(180deg, #dff3fb, #8ed0e4);
  border-radius: 20px 20px 16px 16px;
  transform: skewX(-18deg);
}

.plant-icon-bio::before {
  inset: 0.65rem;
  background: #d8efe8;
  border-radius: 50%;
}

.plant-icon-bio::after {
  inset: 1rem 1.2rem 1.4rem;
  background: #4ab07a;
  border-radius: 999px 999px 0 999px;
  transform: rotate(-20deg);
}

.storage-panel {
  align-items: stretch;
}

.storage-visual {
  display: flex;
  gap: 0.45rem;
  align-items: end;
}

.storage-battery {
  width: 2.35rem;
  height: 5.8rem;
  padding: 0.26rem;
  border-radius: 14px;
  background: #ebf7f9;
  position: relative;
  overflow: hidden;
}

.storage-battery::before {
  content: "";
  position: absolute;
  top: -0.32rem;
  left: 1rem;
  width: 1.3rem;
  height: 0.5rem;
  border-radius: 999px;
  background: #d3e8ea;
}

.storage-battery-small {
  width: 1.65rem;
  height: 4.25rem;
}

.storage-fill {
  position: absolute;
  inset: auto 0.35rem 0.35rem 0.35rem;
  height: 0;
  border-radius: 14px;
  background: linear-gradient(180deg, #77d3c3, #6bb8d6);
  transition: height 220ms ease;
}

.board-stage {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0.85rem;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-width: 0;
  min-height: 0;
  height: 100%;
}

.hud-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.65rem;
}

.hud-card {
  position: relative;
  padding: 0.9rem 0.95rem 1.2rem;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.8);
}

.hud-card strong {
  font-size: 1.02rem;
}

.board-wrap {
  min-height: 0;
  height: 100%;
  aspect-ratio: auto;
  padding: 0.75rem;
}

#breakoutCanvas {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 28px;
  border: 1px solid rgba(35, 103, 111, 0.16);
  background: linear-gradient(180deg, #fbf6ec 0%, #f6fbfb 50%, #eef6f8 100%);
  box-shadow:
    inset 0 0 0 2px rgba(27, 105, 113, 0.12),
    inset 0 0 0 10px rgba(255, 255, 255, 0.16),
    0 18px 40px rgba(101, 139, 142, 0.08);
}

.game-overlay {
  position: absolute;
  inset: 0.95rem;
  display: grid;
  place-items: center;
  padding: 1rem;
  border-radius: 28px;
  background: rgba(245, 250, 250, 0.72);
  backdrop-filter: blur(12px);
  transition: opacity 180ms ease, visibility 180ms ease;
}

.game-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.overlay-panel {
  width: min(38rem, 100%);
  padding: 1.5rem;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 30px 48px rgba(79, 112, 108, 0.12);
}

.overlay-panel-compact {
  width: min(24rem, 100%);
  text-align: center;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
  margin-top: 1.35rem;
}

.field {
  display: grid;
  gap: 0.45rem;
}

.field input,
.field select {
  width: 100%;
  min-height: 3.2rem;
  padding: 0.85rem 1rem;
  border-radius: 18px;
  border: 1px solid rgba(27, 105, 113, 0.16);
  background: rgba(248, 252, 252, 0.96);
  color: var(--text);
  outline: none;
}

.field input:focus,
.field select:focus {
  border-color: rgba(61, 184, 171, 0.6);
  box-shadow: 0 0 0 4px rgba(61, 184, 171, 0.12);
}

.field-compact {
  margin-top: 1rem;
}

.field-static-value {
  min-height: 3.2rem;
  display: flex;
  align-items: center;
  padding: 0.85rem 1rem;
  border-radius: 18px;
  border: 1px solid rgba(27, 105, 113, 0.12);
  background: rgba(248, 252, 252, 0.96);
  color: var(--text-soft);
  line-height: 1.5;
}

.hero-actions-compact {
  margin-top: 1rem;
}

.overlay-instructions {
  display: grid;
  gap: 0.45rem;
  margin-top: 1.1rem;
  color: var(--text-soft);
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
  margin-top: 1.3rem;
}

.result-grid div {
  padding: 0.95rem 1rem;
  border-radius: 20px;
  background: #f6fbfb;
  border: 1px solid rgba(27, 105, 113, 0.08);
}

.toast-layer {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  width: min(25rem, calc(100% - 2.4rem));
  display: grid;
  gap: 0.65rem;
  pointer-events: none;
}

.brick-tooltip {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 4;
  width: min(16rem, calc(100% - 2rem));
  padding: 0.75rem 0.85rem;
  border-radius: 16px;
  background: rgba(18, 62, 68, 0.94);
  box-shadow: 0 18px 32px rgba(44, 75, 79, 0.18);
  pointer-events: none;
  transition: opacity 140ms ease, visibility 140ms ease;
}

.brick-tooltip.is-hidden {
  opacity: 0;
  visibility: hidden;
}

.brick-tooltip strong {
  display: block;
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #98e4d9;
}

.brick-tooltip span {
  display: block;
  margin-top: 0.28rem;
  font-size: 0.8rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.94);
}

.touch-zone-hints {
  display: none;
}

.toast {
  padding: 0.95rem 1.1rem;
  border-radius: 18px;
  color: #103c40;
  background: linear-gradient(135deg, rgba(103, 212, 197, 0.98), rgba(255, 214, 107, 0.98));
  box-shadow: 0 18px 32px rgba(79, 112, 108, 0.12);
  animation: toastInOut 4.8s ease forwards;
}

.toast.warning {
  background: linear-gradient(135deg, rgba(234, 163, 124, 0.98), rgba(216, 116, 87, 0.96));
  color: #fffdf8;
}

.board-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  background: rgba(255, 255, 255, 0.82);
}

.board-footer strong {
  display: block;
  margin-top: 0.2rem;
  font-size: 1.05rem;
}

.ball-reserve-panel {
  display: grid;
  gap: 0.35rem;
  min-width: 16.5rem;
}

.ball-reserve-readout {
  display: grid;
  justify-items: end;
  gap: 0.32rem;
}

.ball-reserve-readout strong {
  margin: 0;
  font-family: "SF Mono", "Segoe UI Mono", "Roboto Mono", monospace;
  font-size: 0.95rem;
}

.ball-reserve-shell {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  padding: 0.38rem 0.48rem;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(234, 245, 247, 0.96), rgba(255, 255, 255, 0.92));
  border: 1px solid rgba(27, 105, 113, 0.12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.75);
}

.ball-reserve-strip {
  display: inline-flex;
  gap: 0.28rem;
}

.ball-reserve-bar {
  width: 1.38rem;
  height: 0.7rem;
  border-radius: 999px;
  background: rgba(202, 220, 224, 0.88);
  transition: background-color 180ms ease, transform 180ms ease, opacity 180ms ease;
}

.ball-reserve-bar.is-active {
  background: linear-gradient(90deg, #69d4c6, #ffd66b);
  transform: scaleX(1.04);
}

.ball-reserve-cap {
  width: 0.54rem;
  height: 1.1rem;
  border-radius: 0.3rem;
  background: rgba(198, 218, 223, 0.95);
}

.leaderboard-list li.is-latest {
  border-color: rgba(61, 184, 171, 0.34);
  background: linear-gradient(180deg, rgba(239, 251, 247, 0.96), rgba(255, 255, 255, 0.94));
}

.leaderboard-list li.is-podium {
  background: linear-gradient(180deg, rgba(255, 250, 232, 0.96), rgba(255, 255, 255, 0.94));
}

.leaderboard-list {
  max-height: none;
  overflow: auto;
  padding-right: 0.2rem;
}

.world-panel-right .leaderboard-list {
  overflow-x: hidden;
  padding-right: 0;
}

.world-panel-right .leaderboard-list li {
  padding: 0.78rem 0.82rem;
  overflow: hidden;
}

.leaderboard-item {
  align-items: center;
  gap: 0.5rem;
}

.world-panel-right .leaderboard-item {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 0.52rem 0.58rem;
}

.world-panel-right .leaderboard-main,
.world-panel-right .weather-copy {
  min-width: 0;
}

.leaderboard-main strong {
  margin-bottom: 0.12rem;
  font-size: 0.82rem;
  line-height: 1.12;
}

.world-panel-right .leaderboard-main strong,
.world-panel-right .weather-copy strong {
  font-size: 0.78rem;
  line-height: 1.22;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.leaderboard-rank {
  width: 1.8rem;
  height: 1.8rem;
  font-size: 0.68rem;
}

.leaderboard-score {
  font-size: 0.8rem;
}

.world-panel-right .leaderboard-score {
  grid-column: 2;
  justify-self: start;
  font-size: 0.74rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.weather-card {
  position: relative;
  overflow: hidden;
  padding: 0.72rem;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(226, 243, 251, 0.84), rgba(255, 255, 255, 0.86));
  display: grid;
  gap: 0.65rem;
}

.weather-visual {
  position: relative;
  height: 5.15rem;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(231, 244, 252, 0.96), rgba(255, 255, 255, 0.78));
  overflow: hidden;
}

.weather-sun {
  position: absolute;
  top: 1rem;
  right: 1.4rem;
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 50%;
  background: #ffd66b;
  box-shadow: 0 0 0 18px rgba(255, 214, 107, 0.14);
}

.weather-cloud {
  position: absolute;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 1.2rem 0.25rem 0 rgba(255, 255, 255, 0.92), 0.5rem -0.55rem 0 rgba(255, 255, 255, 0.92);
  animation: cloudDrift 10s ease-in-out infinite;
}

.weather-cloud-one {
  width: 3.2rem;
  height: 1.25rem;
  left: 1.1rem;
  top: 2rem;
}

.weather-cloud-two {
  width: 2.6rem;
  height: 1.1rem;
  left: 4.7rem;
  top: 3.5rem;
  animation-delay: -4s;
}

.weather-copy span {
  color: var(--text-soft);
}

.world-panel-right .weather-card {
  padding: 0.68rem;
  gap: 0.52rem;
}

.world-panel-right .weather-visual {
  height: 4.8rem;
}

.world-panel-right .weather-copy span,
.world-panel-right .leaderboard-meta,
.world-panel-right .panel-footnote,
.world-panel-right .field-static-value {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.world-panel-right .field-static-value {
  align-items: flex-start;
  min-height: auto;
  padding: 0.72rem 0.82rem;
}

.weather-windy .weather-sun {
  background: #ffe389;
}

.weather-rainy .weather-visual {
  background: linear-gradient(180deg, rgba(222, 236, 248, 0.96), rgba(242, 247, 252, 0.9));
}

.weather-rainy .weather-cloud,
.weather-mixed .weather-cloud {
  background: rgba(255, 255, 255, 0.96);
}

.weather-rainy .weather-cloud::after {
  content: "";
  position: absolute;
  inset: 1.3rem auto auto 0.7rem;
  width: 0.16rem;
  height: 1.8rem;
  background: rgba(107, 184, 214, 0.7);
  box-shadow: 0.55rem 0 0 rgba(107, 184, 214, 0.7), 1.1rem 0 0 rgba(107, 184, 214, 0.7);
}

.weather-loading .weather-sun {
  background: #d6ecf3;
  box-shadow: 0 0 0 18px rgba(169, 208, 221, 0.14);
}

.weather-night .weather-visual {
  background: linear-gradient(180deg, rgba(224, 235, 247, 0.96), rgba(247, 250, 253, 0.9));
}

.weather-night .weather-sun {
  background: #dfe9f6;
  box-shadow: 0 0 0 18px rgba(194, 213, 237, 0.2);
}

@keyframes noteFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

@keyframes dotTravel {
  0%,
  100% {
    transform: translateX(0) scale(0.88);
    opacity: 0.48;
  }
  50% {
    transform: translateX(20px) scale(1.08);
    opacity: 1;
  }
}

@keyframes traceFlow {
  to {
    stroke-dashoffset: -60;
  }
}

@keyframes segmentFlow {
  to {
    stroke-dashoffset: -72;
  }
}

@keyframes rotorSpin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes cloudDrift {
  0%,
  100% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(10px);
  }
}

@keyframes toastInOut {
  0% {
    opacity: 0;
    transform: translateY(-10px) scale(0.96);
  }
  10%,
  86% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
  }
}

@media (max-width: 1480px) {
  .game-shell-main {
    grid-template-columns: 170px minmax(0, 1fr) 186px;
  }

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

@media (pointer: coarse) {
  .board-wrap {
    touch-action: none;
  }

  .touch-zone-hints {
    position: absolute;
    inset: 0.75rem;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    pointer-events: none;
  }

  .touch-zone-hint {
    display: flex;
    align-items: end;
    padding: 1rem 1rem 1.2rem;
    border-radius: 24px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(38, 79, 85, 0.5);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.28));
  }

  .touch-zone-hint-left {
    justify-content: start;
    background:
      linear-gradient(90deg, rgba(74, 176, 168, 0.08), rgba(255, 255, 255, 0)),
      linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.28));
  }

  .touch-zone-hint-right {
    justify-content: end;
    background:
      linear-gradient(270deg, rgba(255, 214, 107, 0.08), rgba(255, 255, 255, 0)),
      linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.28));
  }
}

@media (max-width: 1220px) {
  .home-hero,
  .flow-section,
  .impact-layout,
  .imprint-grid {
    grid-template-columns: 1fr;
  }

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

  .game-shell-main {
    grid-template-columns: 1fr;
    height: auto;
    min-height: calc(100vh - 8rem);
  }

  .world-panel-left,
  .world-panel-right {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: visible;
  }

  .board-stage {
    order: -1;
    height: auto;
  }

  .keyboard-cutaway-stage {
    min-height: 31rem;
  }
}

@media (max-width: 900px) {
  .site-header {
    border-radius: 30px;
    position: relative;
  }

  .site-nav {
    display: none;
  }

  .hero-metrics,
  .form-grid,
  .result-grid,
  .world-panel-left,
  .world-panel-right,
  .hud-grid,
  .cutaway-steps {
    grid-template-columns: 1fr;
  }

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

  .flow-diagram {
    grid-template-columns: 1fr;
  }

  .flow-link {
    min-height: 2rem;
  }

  .leaderboard-preview-head,
  .board-footer {
    flex-direction: column;
    align-items: start;
  }

  .board-wrap {
    min-height: 30rem;
  }

  .keyboard-cutaway-stage {
    min-height: auto;
    display: grid;
    gap: 0.9rem;
    padding: 0.9rem;
  }

  .cutaway-callout {
    position: static;
    width: auto;
  }
}

@media (max-width: 640px) {
  .page-section,
  .site-footer {
    width: calc(100% - 1rem);
  }

  .hero-copy h1 {
    font-size: clamp(3rem, 15vw, 4.8rem);
  }

  .section-heading h2,
  .panel-heading h2,
  .impact-story h2 {
    max-width: 100%;
  }

  .button,
  .button-small {
    width: 100%;
  }

  .hero-actions {
    flex-direction: column;
  }

  .game-header-status {
    width: 100%;
  }

  .status-pill {
    width: 100%;
  }

  .board-wrap {
    min-height: 26rem;
  }
}
