:root {
  --bg: #eef7d8;
  --bg-deep: #d8f0c7;
  --ink: #102618;
  --ink-soft: #2f4a38;
  --panel: rgba(255, 254, 246, 0.95);
  --panel-strong: rgba(255, 255, 250, 0.98);
  --accent: #4da75a;
  --accent-dark: #296a37;
  --accent-light: #a7ea7b;
  --sun: #ffd86f;
  --rose: #f7a8b8;
  --lake: #91cfe7;
  --shadow: 0 22px 60px rgba(43, 84, 39, 0.18);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--ink);
  font-family: "Aptos", "Segoe UI", "Tahoma", sans-serif;
  -webkit-tap-highlight-color: transparent;
  background:
    radial-gradient(circle at top left, rgba(255, 216, 111, 0.55), transparent 24%),
    radial-gradient(circle at top right, rgba(145, 207, 231, 0.48), transparent 22%),
    radial-gradient(circle at 15% 85%, rgba(247, 168, 184, 0.45), transparent 18%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%);
}

body::before,
body::after {
  content: "";
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

body::before {
  width: 320px;
  height: 320px;
  left: -120px;
  bottom: 10%;
  background: rgba(157, 242, 125, 0.25);
  filter: blur(10px);
}

body::after {
  width: 220px;
  height: 220px;
  right: -60px;
  top: 18%;
  background: rgba(255, 255, 255, 0.24);
}

.shell {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding:
    max(16px, env(safe-area-inset-top))
    0
    max(44px, env(safe-area-inset-bottom))
    0;
}

.view {
  display: none;
}

.view--active {
  display: block;
}

body.modal-open {
  overflow: hidden;
}

.panel {
  background: var(--panel);
  border: 1px solid rgba(23, 49, 29, 0.08);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

.game-hud {
  margin-top: 24px;
  padding: 20px 22px;
  background:
    radial-gradient(circle at top right, rgba(255, 216, 111, 0.24), transparent 24%),
    linear-gradient(135deg, rgba(18, 40, 25, 0.95), rgba(35, 77, 45, 0.94));
  color: #f7fff2;
}

.game-hud .eyebrow,
.game-hud h2,
.game-hud .mission-text,
.game-hud .hud-counter__label,
.game-hud .hud-counter__value {
  color: inherit;
}

.game-hud__top {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
}

.mission-text {
  max-width: 34ch;
  margin: 0;
  color: rgba(247, 255, 242, 0.86);
  line-height: 1.55;
  text-align: right;
}

.week-track {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.week-node {
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.week-node__day {
  display: block;
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.78;
}

.week-node__title {
  display: block;
  margin-top: 6px;
  font-size: 1rem;
  font-weight: 800;
}

.week-node__state {
  display: inline-flex;
  margin-top: 10px;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.12);
}

.week-node--done {
  background: rgba(167, 234, 123, 0.17);
  border-color: rgba(167, 234, 123, 0.28);
}

.week-node--active {
  background: linear-gradient(180deg, rgba(255, 216, 111, 0.24), rgba(247, 168, 184, 0.18));
  border-color: rgba(255, 216, 111, 0.4);
  transform: translateY(-2px);
}

.week-node--active .week-node__state {
  background: rgba(255, 216, 111, 0.26);
}

.hud-counters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.hud-counter {
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.hud-counter__label {
  display: block;
  font-size: 0.83rem;
  opacity: 0.82;
}

.hud-counter__value {
  display: block;
  margin-top: 4px;
  font-size: 1.45rem;
}

.panel--hero {
  display: grid;
  grid-template-columns: 1.35fr 0.95fr;
  gap: 24px;
  padding: 28px;
  background:
    radial-gradient(circle at top left, rgba(167, 234, 123, 0.45), transparent 34%),
    linear-gradient(135deg, rgba(255, 255, 245, 0.94), rgba(238, 247, 216, 0.92));
}

.hero__copy {
  align-self: center;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent-dark);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1,
.panel h2,
.panel h3,
.story-title {
  margin: 0;
  font-family: "Candara", "Trebuchet MS", "Segoe UI", sans-serif;
  font-weight: 800;
  line-height: 1.12;
}

.hero h1 {
  font-size: clamp(2.5rem, 4vw, 4.35rem);
  max-width: 10ch;
}

.hero h1 span {
  color: var(--accent-dark);
}

.hero__lead {
  max-width: 62ch;
  margin: 18px 0 0;
  font-size: 1.08rem;
  line-height: 1.72;
  color: var(--ink-soft);
}

.hero__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

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

.chip {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  color: var(--accent-dark);
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(41, 106, 55, 0.08);
}

.hero__frog {
  display: grid;
  place-items: center;
}

.frog-stage {
  position: relative;
  width: min(100%, 380px);
  aspect-ratio: 1 / 1;
  padding: 14px;
  border-radius: 36px;
  background:
    radial-gradient(circle at 50% 28%, rgba(255, 216, 111, 0.55), transparent 24%),
    linear-gradient(180deg, rgba(145, 207, 231, 0.9), rgba(104, 185, 127, 0.92));
  overflow: hidden;
}

.frog-stage::before,
.frog-stage::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
}

.frog-stage::before {
  width: 92px;
  height: 28px;
  top: 26px;
  left: 36px;
}

.frog-stage::after {
  width: 120px;
  height: 34px;
  top: 66px;
  right: 30px;
}

.frog-illustration {
  width: 100%;
  height: 100%;
  transform-origin: center;
  animation: floaty 4.8s ease-in-out infinite;
}

.frog-stage__bubble {
  position: absolute;
  right: 18px;
  bottom: 22px;
  width: 150px;
  padding: 12px 14px;
  border-radius: 18px 18px 6px 18px;
  background: rgba(255, 255, 245, 0.92);
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.35;
}

.menu-grid,
.game-grid {
  display: grid;
  gap: 22px;
  margin-top: 24px;
}

.menu-grid {
  grid-template-columns: 1.15fr 0.85fr;
}

.game-grid {
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.85fr);
  align-items: start;
}

.panel--menu,
.story-panel,
.sidebar .panel {
  padding: 24px;
}

.panel__title-wrap {
  display: grid;
  gap: 4px;
  margin-bottom: 16px;
}

.panel--menu p {
  line-height: 1.7;
  color: var(--ink-soft);
}

.menu-highlights {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.mini-card {
  padding: 16px;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(255, 255, 250, 0.92), rgba(227, 245, 213, 0.86));
  border: 1px solid rgba(23, 49, 29, 0.07);
}

.mini-card strong {
  display: block;
  margin-bottom: 8px;
  color: var(--accent-dark);
}

.mini-card p,
.menu-note,
.menu-save-hint {
  margin: 0;
  color: var(--ink-soft);
}

.panel--actions {
  background:
    radial-gradient(circle at top right, rgba(247, 168, 184, 0.32), transparent 24%),
    linear-gradient(180deg, rgba(255, 255, 248, 0.95), rgba(252, 245, 228, 0.94));
}

.menu-actions {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.button {
  border: 0;
  border-radius: 999px;
  padding: 14px 18px;
  min-height: 52px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button:active {
  transform: translateY(1px);
}

.button:focus-visible {
  outline: 3px solid rgba(255, 216, 111, 0.95);
  outline-offset: 3px;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
  transform: none;
}

.button--primary {
  color: #fdfdf8;
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-dark) 100%);
  box-shadow: 0 10px 24px rgba(41, 106, 55, 0.25);
}

.button--secondary {
  color: var(--accent-dark);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(245, 255, 236, 0.92));
  box-shadow: inset 0 0 0 1px rgba(41, 106, 55, 0.12);
}

.button--ghost {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.65);
  box-shadow: inset 0 0 0 1px rgba(23, 49, 29, 0.1);
}

.story-panel {
  background: var(--panel-strong);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(41, 106, 55, 0.16);
}

.story-panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 6px;
  background: linear-gradient(90deg, var(--accent-dark), var(--sun), var(--rose));
}

.scene-console {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 16px;
  padding: 10px 12px;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(23, 49, 29, 0.94), rgba(34, 71, 41, 0.9));
  color: #f4fff0;
}

.scene-console__badge,
.scene-console__status {
  font-size: 0.84rem;
  font-weight: 800;
}

.scene-console__badge {
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.story-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.story-badge,
.story-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 800;
}

.story-badge {
  color: #fffef9;
  background: linear-gradient(180deg, var(--accent-dark), #1e4c29);
}

.story-pill {
  background: rgba(167, 234, 123, 0.28);
  color: var(--accent-dark);
}

.story-pill--status {
  background: rgba(255, 216, 111, 0.36);
}

.story-title {
  margin-top: 18px;
  font-size: clamp(1.85rem, 2.8vw, 2.7rem);
}

.story-body {
  display: grid;
  gap: 14px;
  margin-top: 18px;
  color: var(--ink-soft);
  line-height: 1.76;
  font-size: 1.02rem;
}

.story-body p {
  margin: 0;
}

.result-banner {
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, rgba(255, 216, 111, 0.22), rgba(247, 168, 184, 0.2));
  color: var(--ink);
  border: 1px solid rgba(23, 49, 29, 0.08);
  font-weight: 700;
  line-height: 1.6;
}

.scene-actions {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.choice-button {
  position: relative;
  overflow: hidden;
  text-align: left;
  padding: 16px 18px;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(236, 247, 223, 0.92));
  box-shadow:
    inset 0 0 0 1px rgba(23, 49, 29, 0.08),
    0 10px 20px rgba(44, 94, 49, 0.08);
  color: var(--ink);
}

.choice-button::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 10px;
  background: linear-gradient(180deg, var(--accent-dark), var(--sun));
}

.choice-button span {
  display: block;
}

.choice-button__label {
  font-weight: 800;
  padding-left: 8px;
}

.choice-button__hint {
  margin-top: 6px;
  color: #355240;
  font-size: 0.92rem;
  font-weight: 500;
  padding-left: 8px;
}

.story-footer {
  margin-top: 20px;
}

.sidebar {
  display: grid;
  gap: 22px;
}

.panel--stats,
.panel--oracle,
.panel--history {
  overflow: hidden;
}

.stats-list {
  display: grid;
  gap: 14px;
}

.stat-row {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(239, 249, 229, 0.9));
  border: 1px solid rgba(41, 106, 55, 0.1);
  box-shadow: 0 12px 28px rgba(44, 94, 49, 0.08);
}

.stat-row__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.stat-row__meta {
  display: flex;
  gap: 12px;
  align-items: center;
}

.stat-row__icon {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 16px;
  font-size: 1.35rem;
  background: linear-gradient(180deg, rgba(255, 216, 111, 0.3), rgba(167, 234, 123, 0.22));
  box-shadow: inset 0 0 0 1px rgba(41, 106, 55, 0.08);
}

.stat-row__label {
  display: block;
  font-size: 1rem;
}

.stat-row__status {
  display: block;
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 0.84rem;
  font-weight: 700;
}

.stat-row__score {
  display: grid;
  justify-items: end;
}

.stat-row__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.stat-row__top strong {
  font-size: 0.96rem;
}

.stat-row__top span {
  color: var(--ink-soft);
  font-size: 0.9rem;
  font-weight: 700;
}

.stat-row__value {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--accent-dark);
  line-height: 1;
}

.stat-row__value-note {
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 0.84rem;
  font-weight: 700;
}

.stat-bar {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  background: rgba(23, 49, 29, 0.08);
  overflow: hidden;
}

.stat-bar__fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-light), var(--accent-dark));
  transition: width 280ms ease;
}

.oracle-text {
  margin: 0;
  line-height: 1.7;
  color: var(--ink-soft);
  font-size: 1rem;
}

.history-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.history-item {
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(23, 49, 29, 0.06);
}

.history-item strong {
  display: block;
  margin-bottom: 4px;
  color: var(--accent-dark);
}

.history-item span {
  color: var(--ink-soft);
  line-height: 1.5;
  font-size: 0.94rem;
}

.event-modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 18px;
}

.event-modal[hidden] {
  display: none !important;
}

.event-modal__scrim {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: rgba(9, 17, 12, 0.62);
  backdrop-filter: blur(6px);
  pointer-events: auto;
}

.event-modal__card {
  position: relative;
  z-index: 1;
  width: min(560px, calc(100vw - 28px));
  padding: 24px;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background:
    radial-gradient(circle at top right, rgba(255, 216, 111, 0.28), transparent 26%),
    linear-gradient(180deg, rgba(255, 255, 248, 0.98), rgba(245, 252, 235, 0.98));
  box-shadow: 0 24px 80px rgba(6, 17, 10, 0.34);
}

.event-modal__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.event-modal__header-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.event-modal__tag,
.event-modal__stamp {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 800;
}

.event-modal__tag {
  color: #fffef8;
  background: linear-gradient(180deg, var(--accent-dark), #183f22);
}

.event-modal__stamp {
  color: var(--accent-dark);
  background: rgba(255, 216, 111, 0.3);
}

.event-modal__close {
  border: 0;
  border-radius: 999px;
  min-height: 38px;
  padding: 8px 14px;
  font: inherit;
  font-weight: 800;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: inset 0 0 0 1px rgba(23, 49, 29, 0.08);
  cursor: pointer;
}

.event-modal__title {
  margin: 0;
  font-family: "Candara", "Trebuchet MS", "Segoe UI", sans-serif;
  font-size: clamp(1.8rem, 4.2vw, 2.5rem);
  line-height: 1.08;
}

.event-modal__hero {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: center;
  margin-top: 16px;
}

.event-modal__icon {
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  border-radius: 24px;
  font-size: 2rem;
  background:
    radial-gradient(circle at top left, rgba(255, 216, 111, 0.6), transparent 38%),
    linear-gradient(180deg, rgba(59, 116, 63, 0.15), rgba(255, 255, 255, 0.9));
  box-shadow:
    0 12px 28px rgba(44, 94, 49, 0.12),
    inset 0 0 0 1px rgba(41, 106, 55, 0.08);
}

.event-modal__kicker {
  margin: 0 0 8px;
  color: var(--accent-dark);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.event-modal__lead,
.event-modal__flavor {
  margin: 14px 0 0;
  color: var(--ink-soft);
  line-height: 1.68;
}

.event-modal__lead {
  font-size: 1.03rem;
}

.event-modal__effects {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.event-modal__actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.event-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(23, 49, 29, 0.09);
}

.event-chip--good {
  color: var(--accent-dark);
}

.event-chip--bad {
  color: #9e3b42;
}

.event-chip--neutral {
  color: #495c51;
}

.event-modal__button {
  width: 100%;
}

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

@media (max-width: 960px) {
  .game-hud__top {
    flex-direction: column;
    align-items: start;
  }

  .mission-text {
    max-width: none;
    text-align: left;
  }

  .week-track,
  .hud-counters {
    grid-template-columns: 1fr;
  }

  .panel--hero,
  .menu-grid,
  .game-grid {
    grid-template-columns: 1fr;
  }

  .panel--actions {
    order: -1;
  }

  .panel--hero {
    gap: 20px;
  }

  .hero h1 {
    max-width: 100%;
  }

  .frog-stage {
    width: min(100%, 320px);
  }

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

  .panel--history {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .shell {
    width: min(100% - 20px, 100%);
    padding-top: max(12px, env(safe-area-inset-top));
  }

  .panel--hero,
  .panel--menu,
  .story-panel,
  .sidebar .panel,
  .game-hud {
    padding: 18px 16px;
    border-radius: 22px;
  }

  .panel--hero {
    grid-template-columns: minmax(0, 1fr) 132px;
    gap: 14px;
    align-items: start;
  }

  .hero__lead {
    margin-top: 12px;
    font-size: 0.98rem;
    line-height: 1.62;
  }

  .hero__chips {
    gap: 8px;
    margin-top: 14px;
  }

  .hero__actions {
    display: grid;
    gap: 10px;
    margin-top: 14px;
  }

  .hero__actions .button {
    width: 100%;
  }

  .chip,
  .story-badge,
  .story-pill {
    font-size: 0.86rem;
  }

  .frog-stage {
    width: 132px;
    padding: 8px;
    border-radius: 24px;
  }

  .frog-stage__bubble {
    display: none;
  }

  .menu-grid,
  .game-grid {
    gap: 16px;
    margin-top: 16px;
  }

  .game-hud {
    margin-top: 16px;
  }

  .panel__title-wrap {
    margin-bottom: 14px;
  }

  .story-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
  }

  .scene-console {
    flex-direction: column;
    align-items: start;
  }

  .story-badge,
  .story-pill {
    width: 100%;
    justify-content: flex-start;
    padding-inline: 12px;
  }

  .story-pill--status {
    grid-column: 1 / -1;
  }

  .story-title {
    font-size: clamp(1.55rem, 7vw, 2rem);
    line-height: 1.1;
  }

  .story-body {
    gap: 12px;
    font-size: 1rem;
    line-height: 1.68;
  }

  .result-banner {
    padding: 14px 15px;
    line-height: 1.5;
  }

  .scene-actions {
    gap: 10px;
    margin-top: 18px;
  }

  .choice-button {
    padding: 15px 16px;
    border-radius: 18px;
  }

  .choice-button__hint {
    font-size: 0.9rem;
    line-height: 1.45;
  }

  .story-footer .button,
  .menu-actions .button {
    width: 100%;
  }

  .stat-row {
    padding: 12px;
    border-radius: 18px;
  }

  .stat-row__icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    font-size: 1.2rem;
  }

  .stat-row__value {
    font-size: 1.35rem;
  }

  .sidebar {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .panel--history {
    grid-column: auto;
  }

  .stats-list,
  .history-list {
    gap: 10px;
  }

  .history-item {
    padding: 12px;
  }
}

@media (max-width: 420px) {
  body::before {
    width: 220px;
    height: 220px;
    left: -100px;
  }

  body::after {
    width: 140px;
    height: 140px;
    right: -40px;
  }

  .shell {
    width: min(100% - 14px, 100%);
  }

  .panel--hero,
  .panel--menu,
  .story-panel,
  .sidebar .panel,
  .game-hud {
    padding: 15px 14px;
    border-radius: 18px;
  }

  .eyebrow {
    font-size: 0.74rem;
    letter-spacing: 0.1em;
  }

  .hero h1 {
    font-size: clamp(1.85rem, 9vw, 2.4rem);
  }

  .chip {
    padding: 8px 12px;
  }

  .hero__lead {
    font-size: 0.94rem;
  }

  .story-meta {
    grid-template-columns: 1fr;
  }

  .story-pill--status {
    grid-column: auto;
  }

  .story-title {
    margin-top: 14px;
  }

  .frog-stage {
    width: 112px;
  }

  .event-modal {
    padding: 10px;
  }

  .event-modal__card {
    padding: 18px 16px;
    border-radius: 22px;
  }

  .event-modal__header {
    align-items: start;
    flex-direction: column;
  }

  .event-modal__actions {
    grid-template-columns: 1fr;
  }

  .event-modal__hero {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .event-modal__icon {
    width: 64px;
    height: 64px;
    border-radius: 20px;
    font-size: 1.7rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
