:root {
  --ink: #e7f6ee;
  --ink-soft: #9cb9aa;
  --paper: #10281f;
  --paper-2: #16382c;
  --forest: #3ee08a;
  --forest-deep: #1f8a52;
  --sand: #f0c36a;
  --sky: #7eb8d4;
  --coral: #ff7a59;
  --leaf: #8dffb0;
  --line: rgba(141, 255, 176, 0.16);
  --shadow: 0 16px 40px rgba(6, 18, 14, 0.45);
  --radius: 18px;
  --header-h: 4.25rem;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --font: "Noto Sans TC", "Microsoft JhengHei", "PingFang TC", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 18px;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(900px 420px at 8% -10%, rgba(62, 224, 138, 0.18), transparent 50%),
    radial-gradient(800px 380px at 100% 0%, rgba(240, 195, 106, 0.12), transparent 46%),
    linear-gradient(180deg, #0b1c16 0%, var(--paper) 42%, #0a1813 100%);
  line-height: 1.65;
  font-size: 1.05rem;
}

#main {
  flex: 1 0 auto;
}

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

button,
a,
input {
  font-family: inherit;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 200;
  padding: 0.5rem 0.85rem;
  background: #04110c;
  color: #fff;
  border-radius: 8px;
}

.skip-link:focus {
  top: calc(var(--safe-top) + 0.6rem);
}

.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;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: var(--header-h);
  padding: calc(0.55rem + var(--safe-top)) 11.5rem 0.55rem 1rem;
  background: rgba(16, 40, 31, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.brand img,
.brand-photo {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 50%;
}

.brand-text {
  line-height: 1.25;
  min-width: 0;
}

.brand-text strong {
  display: block;
  font-size: 0.98rem;
  font-weight: 800;
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.xp-summary {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--sand);
  max-width: 16rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn,
.choice,
.biome-tile,
.mission-chip,
.drop-zone,
.drag-card,
.tactic-card,
.avatar-pick,
.alert-target {
  appearance: none;
  border: 0;
  cursor: pointer;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  background: var(--forest);
  color: #062015;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 8px 0 var(--forest-deep);
  transform: translateY(0);
  transition: transform 0.12s var(--ease);
}

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

.btn:active {
  transform: translateY(2px);
  box-shadow: 0 4px 0 var(--forest-deep);
}

.btn-hall {
  background: var(--sand);
  color: #2a1d08;
  box-shadow: 0 8px 0 #b48a32;
}

.btn-ghost {
  background: transparent;
  color: var(--leaf);
  box-shadow: none;
  border: 2px solid var(--forest);
}

.btn-sand {
  background: var(--sand);
  color: #2a1d08;
  box-shadow: 0 8px 0 #b48a32;
}

.btn-ghost.is-tab.is-on {
  background: var(--forest);
  color: #062015;
}

.view {
  width: min(1100px, calc(100% - 1.5rem));
  margin: 0 auto;
  padding: 1.1rem 0 calc(2rem + var(--safe-bottom));
}

.hero,
.panel,
.passport,
.overlay-card {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero {
  padding: 1.2rem 1.2rem 1.3rem;
  margin-bottom: 1rem;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 0.35rem;
  color: var(--forest);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
}

.hero h1,
.panel h1,
.panel h2,
.hall h2,
.overlay-card h2 {
  margin: 0 0 0.4rem;
  line-height: 1.3;
}

.hero h1,
.panel h1 {
  font-size: 1.85rem;
}

.overlay-card h2 {
  font-size: 2rem;
}

.overlay-card p,
.panel p,
.hero p,
.choice,
.tactic-card,
.btn {
  font-size: 1.08rem;
}

.muted {
  margin: 0;
  color: var(--ink-soft);
  font-size: 1.05rem;
}

h2 {
  margin: 1.2rem 0 0.4rem;
}

.map-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin: 1rem 0 1.25rem;
}

.biome-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 0;
  overflow: hidden;
  background: #10241c;
  border-radius: 16px;
  border: 3px solid rgba(62, 224, 138, 0.35);
  text-align: left;
  min-height: 148px;
  color: inherit;
}

.biome-tile.is-locked {
  opacity: 0.45;
}

.biome-tile img {
  width: 100%;
  height: 110px;
  object-fit: cover;
}

.biome-tile .biome-name {
  padding: 0.55rem 0.7rem 0.2rem;
  font-weight: 800;
}

.biome-tile .tagline {
  display: block;
  padding: 0 0.7rem 0.7rem;
  color: var(--ink-soft);
  font-size: 0.8rem;
  font-weight: 500;
}

.stamp-dot {
  position: absolute;
  top: 0.45rem;
  right: 0.45rem;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--forest);
  color: #062015;
  font-size: 0.72rem;
  font-weight: 900;
  display: grid;
  place-items: center;
}

.stamp-dot.is-lock {
  background: #5a6a62;
  color: #d5e4dc;
}

.mission-path {
  display: grid;
  gap: 0.55rem;
}

.mission-chip {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.7rem;
  align-items: center;
  width: 100%;
  padding: 0.75rem 0.9rem;
  background: #10241c;
  border-radius: 14px;
  border: 2px solid var(--line);
  text-decoration: none;
  color: inherit;
  text-align: left;
}

.mission-chip .num {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--forest);
  color: #062015;
  font-weight: 900;
  font-size: 0.78rem;
}

.mission-chip.is-locked {
  opacity: 0.55;
  cursor: not-allowed;
}

.mission-chip.is-done .num {
  background: var(--sand);
}

.mission-chip .chip-flag {
  color: var(--sand);
  font-weight: 800;
  font-size: 0.82rem;
}

.panel {
  padding: 1.1rem;
}

.panel-head {
  margin-bottom: 1rem;
}

.progress-note {
  margin: 0.35rem 0 0.8rem;
  font-weight: 700;
  color: var(--leaf);
  font-size: 1.08rem;
}

.choice-grid,
.tactic-grid {
  display: grid;
  gap: 0.55rem;
}

.choice,
.tactic-card {
  min-height: 52px;
  padding: 0.8rem 1rem;
  border-radius: 14px;
  background: #10241c;
  border: 2px solid var(--line);
  text-align: left;
  font-weight: 700;
  color: inherit;
}

.tactic-card {
  display: grid;
  gap: 0.2rem;
}

.choice:hover,
.choice:focus-visible,
.drag-card.is-selected,
.tactic-card:hover,
.avatar-pick:focus-visible {
  outline: 3px solid var(--sand);
  outline-offset: 2px;
}

.choice.is-correct {
  border-color: var(--forest);
  background: #143d2a;
}

.choice.is-wrong {
  border-color: var(--coral);
  background: #3a1c16;
}

.feedback {
  margin-top: 0.9rem;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  background: #143d2a;
  border: 1px solid #2a6b4a;
}

.feedback.is-wrong {
  background: #3a2a14;
  border-color: #8a6a32;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1rem;
}

.overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: end center;
  padding: 1rem;
  background: rgba(6, 18, 14, 0.62);
}

.overlay-card {
  width: min(680px, 100%);
  max-height: min(92dvh, 860px);
  overflow: auto;
  background: var(--paper-2);
  border-radius: 22px 22px 18px 18px;
  padding: 1.15rem 1.15rem 1.3rem;
}

.compare {
  margin-top: 0.8rem;
  padding: 0.75rem 0.85rem;
  border-radius: 14px;
  background: #10241c;
}

.place-board {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.55rem;
}

.drop-zone {
  min-height: 118px;
  padding: 0.55rem;
  border-radius: 14px;
  border: 2px dashed rgba(62, 224, 138, 0.45);
  background: rgba(62, 224, 138, 0.08);
  text-align: left;
  color: inherit;
}

.drop-zone strong {
  display: block;
}

.drop-zone.is-shake {
  animation: shake 0.4s var(--ease);
}

.placed-chip {
  display: inline-flex;
  margin: 0.2rem 0.2rem 0 0;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  background: #10241c;
  font-size: 0.78rem;
  font-weight: 700;
}

.pass-lab .place-board {
  gap: 0.75rem;
}

.pass-lab .drop-zone {
  min-height: 168px;
  padding: 0.8rem;
}

.pass-lab .drop-zone strong {
  font-size: 1.35rem;
  line-height: 1.25;
}

.pass-lab .drop-zone .muted {
  display: block;
  margin-top: 0.2rem;
  font-size: 1.12rem;
}

.pass-lab .placed-chip {
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.45rem;
  padding: 0.28rem 0.55rem 0.28rem 0.28rem;
  font-size: 1.05rem;
}

.pass-lab .placed-chip img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  border-radius: 8px;
  background: #0b1c16;
}

.pass-lab .tray {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-top: 1.1rem;
}

.pass-lab .drag-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  min-height: 0;
  padding: 0.55rem;
  font-size: 1.2rem;
  text-align: center;
}

.pass-lab .drag-card img {
  width: 100%;
  height: 118px;
  object-fit: contain;
  background: #0b1c16;
  border-radius: 10px;
}

.tray {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.9rem;
}

.drag-card {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 48px;
  padding: 0.4rem 0.7rem 0.4rem 0.4rem;
  border-radius: 14px;
  background: #10241c;
  border: 2px solid var(--line);
  font-weight: 800;
  color: inherit;
  touch-action: none;
}

.drag-card img {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 8px;
}

.drag-card.pass-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 0.55rem;
  font-size: 1.2rem;
  text-align: center;
}

.drag-card.pass-card img {
  width: 100%;
  height: 118px;
  object-fit: contain;
  background: #0b1c16;
  border-radius: 10px;
}

.drag-card.is-placed {
  display: none;
}

.drag-card.is-dragging {
  opacity: 0.35;
}

.drag-ghost {
  position: fixed;
  z-index: 80;
  pointer-events: none;
  margin: 0;
  opacity: 0.95;
  transform: scale(1.04);
}

.briefing-form label,
.avatar-label {
  display: block;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.briefing-form input {
  width: 100%;
  max-width: 22rem;
  min-height: 48px;
  margin-bottom: 1rem;
  padding: 0.45rem 0.75rem;
  border-radius: 12px;
  border: 2px solid var(--line);
  background: #10241c;
  color: var(--ink);
  font-weight: 700;
}

.avatar-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
}

.avatar-pick {
  display: grid;
  justify-items: center;
  gap: 0.35rem;
  padding: 0.7rem;
  border-radius: 16px;
  background: #10241c;
  border: 3px solid transparent;
  color: inherit;
  font-weight: 800;
}

.avatar-pick img {
  width: 88px;
  height: 88px;
  object-fit: cover;
  border-radius: 12px;
}

.avatar-pick.is-on {
  border-color: var(--forest);
}

.scene-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.4rem 0 0.7rem;
}

.hunt-scene {
  position: relative;
  height: 280px;
  border-radius: 16px;
  overflow: hidden;
  margin: 0.4rem 0 0.8rem;
  touch-action: none;
  background-size: cover;
  background-position: center;
}

.hunt-lens {
  position: absolute;
  z-index: 3;
  width: 108px;
  height: 108px;
  margin: -54px 0 0 -54px;
  border: 4px solid var(--sand);
  border-radius: 50%;
  box-shadow: 0 0 0 999px rgba(6, 18, 14, 0.28), inset 0 0 18px rgba(255, 255, 255, 0.2);
  pointer-events: none;
}

.hunt-critter {
  position: absolute;
  z-index: 2;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  appearance: none;
  border: 0;
  cursor: pointer;
  background: transparent;
  opacity: 0.22;
}

.hunt-critter img {
  display: block;
  width: 86px;
  height: auto;
  border-radius: 10px;
  filter: saturate(0.7) brightness(0.82);
}

.hunt-stick-insect img {
  width: 118px;
}

.hunt-arctic-fox img {
  width: 104px;
}

.hunt-critter.is-in-lens,
.hunt-critter.is-found {
  opacity: 1;
}

.hunt-critter.is-in-lens img,
.hunt-critter.is-found img {
  filter: none;
  box-shadow: 0 0 0 3px var(--sand);
}

.find-photo-wrap {
  margin: 0.45rem 0 0.85rem;
  padding: 0.45rem;
  border-radius: 14px;
  background: #0b1c16;
  text-align: center;
}

.find-photo {
  display: inline-block;
  width: auto;
  max-width: 100%;
  max-height: min(52vh, 420px);
  margin: 0 auto;
  object-fit: contain;
  border-radius: 10px;
}

.alert-stage {
  position: relative;
  min-height: 280px;
  border-radius: 16px;
  background: #0c241c center / cover no-repeat;
  overflow: hidden;
  margin-bottom: 0.8rem;
}

.alert-stage.is-poison {
  animation: poison 0.8s var(--ease);
  filter: hue-rotate(70deg) saturate(1.6);
}

.alert-target {
  position: absolute;
  min-width: 52px;
  padding: 0;
  background: transparent;
  color: #fff8e4;
  font-weight: 800;
}

.alert-target img {
  display: block;
  width: 120px;
  height: 90px;
  object-fit: cover;
  border-radius: 12px;
  border: 3px solid rgba(255, 248, 228, 0.7);
}

.alert-target span {
  display: block;
  margin-top: 0.2rem;
  text-shadow: 0 1px 4px #04110c;
}

.dart-frog {
  left: 8%;
  top: 36%;
}

.meerkat-pack {
  position: absolute;
  right: 6%;
  bottom: 12%;
  width: auto;
}

.meerkat.sentry {
  position: relative;
  left: auto;
  bottom: auto;
  height: auto;
  background: transparent;
}

.meerkat.sentry img {
  width: 150px;
  height: 110px;
}

.meerkat-sentry-pic {
  display: none;
}

.alert-stage.is-alarm .meerkat-family {
  display: none;
}

.alert-stage.is-alarm .meerkat-sentry-pic {
  display: block;
}

.herd-tools {
  display: grid;
  gap: 0.55rem;
  margin-bottom: 0.7rem;
}

.herd-slider-labels {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  font-weight: 800;
  font-size: 1.02rem;
}

.herd-now {
  margin: 0;
  font-size: 1.08rem;
}

.herd-tools input[type="range"] {
  width: 100%;
}

.herd-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 240px;
  padding: 0;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(#d4b56a, #c49a45);
}

.herd-stage[data-kind="sardine"] {
  background: radial-gradient(circle at 40% 30%, #2a6a86, #0d2a3a 72%);
}

.herd-stripes {
  display: block;
  width: 100%;
  height: 240px;
}

.sardine-svg {
  display: block;
  max-width: min(100%, 320px);
  height: auto;
  filter: drop-shadow(0 10px 16px rgba(0, 0, 0, 0.38));
}

.herd-stage.is-lock::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 78px;
  height: 78px;
  border: 4px solid var(--coral);
  border-radius: 8px;
  box-shadow: 0 0 0 2px rgba(6, 18, 14, 0.45);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.herd-stage[data-kind="sardine"].is-lock::after {
  display: none;
}

.herd-stage.is-lock .sardine-svg {
  outline: 4px solid var(--coral);
  outline-offset: 2px;
  border-radius: 50%;
}

.herd-stage.is-dazzle .herd-stripes {
  animation: stripe-shift 0.8s var(--ease);
}

.herd-stage.is-dazzle {
  animation: dazzle 0.8s var(--ease);
}

.battle-hud {
  display: grid;
  gap: 0.45rem;
  margin-bottom: 0.9rem;
}

.stat-meter,
.radar-row {
  display: grid;
  grid-template-columns: 3rem 1fr auto;
  gap: 0.5rem;
  align-items: center;
}

.stat-track,
.radar-track {
  height: 10px;
  border-radius: 99px;
  background: #0b1c16;
  overflow: hidden;
}

.stat-track i,
.radar-track i {
  display: block;
  height: 100%;
  background: var(--forest);
}

.stat-meter[data-kind="HP"] .stat-track i {
  background: var(--coral);
}

.stat-meter[data-kind="EP"] .stat-track i {
  background: #5aa8c9;
}

.threat-card {
  padding: 0;
  overflow: hidden;
  border-radius: 14px;
  background: #10241c;
  border: 1px solid var(--line);
}

.threat-card .find-photo-wrap {
  margin: 0;
  border-radius: 0;
}

.threat-card .find-photo {
  max-height: min(62vh, 520px);
}

.threat-card .eyebrow,
.threat-card p {
  padding: 0 0.95rem;
}

.threat-card .eyebrow {
  margin-top: 0.75rem;
}

.threat-card p:last-child {
  padding-bottom: 0.9rem;
}

.passport {
  padding: 0;
  overflow: hidden;
  background:
    linear-gradient(#0b1c16, #0b1c16) top / 100% 5.4rem no-repeat,
    var(--paper-2);
}

.passport-band {
  padding: 0.85rem 1.1rem 0.7rem;
  color: var(--sand);
  text-align: center;
  letter-spacing: 0.18em;
}

.passport-band p {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
}

.passport-band h1 {
  margin: 0.15rem 0 0;
  color: #fff8e4;
  letter-spacing: 0.12em;
}

.passport-spread {
  display: grid;
  gap: 0;
}

.passport-page {
  padding: 1rem 1.1rem 1.15rem;
}

.passport-id {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.85rem;
  align-items: start;
  border-bottom: 1px dashed var(--line);
}

.passport-photo {
  width: 88px;
  height: 110px;
  display: grid;
  place-items: center;
  border: 2px solid #8dffb0;
  background: #10241c;
}

.passport-photo img {
  width: 80px;
  height: 100px;
  object-fit: cover;
}

.passport-id dl {
  margin: 0;
}

.passport-id dt {
  margin-top: 0.35rem;
  color: var(--ink-soft);
  font-size: 0.75rem;
}

.passport-id dt:first-child {
  margin-top: 0;
}

.passport-id dd {
  margin: 0.1rem 0 0;
  font-weight: 700;
}

.passport-lower {
  display: grid;
  gap: 0.85rem;
  padding: 0.2rem 1.1rem 1.2rem;
}

.stamp-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.55rem;
  margin: 0.8rem 0 0.2rem;
}

.stamp {
  min-height: 92px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 0.5rem;
  border-radius: 16px;
  border: 3px dashed #3a5a4a;
  background: #10241c;
  font-weight: 800;
  font-size: 0.82rem;
}

.stamp span {
  display: block;
  margin-top: 0.2rem;
  color: var(--ink-soft);
  font-size: 0.75rem;
}

.stamp.is-on {
  border-style: solid;
  border-color: var(--sand);
  color: var(--leaf);
}

.codex-wrap {
  padding: 0 1.1rem 1.2rem;
}

.codex-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.55rem;
}

.codex-card {
  padding: 0;
  overflow: hidden;
  border-radius: 14px;
  background: #10241c;
  border: 1px solid var(--line);
}

.codex-photo {
  height: 110px;
  overflow: hidden;
  background: #0b1c16;
}

.codex-photo img {
  width: 100%;
  height: 110px;
  object-fit: cover;
}

.codex-card h3,
.codex-card .eyebrow,
.codex-card p {
  padding-left: 0.8rem;
  padding-right: 0.8rem;
}

.codex-card .eyebrow {
  margin: 0.55rem 0 0;
}

.codex-card p:last-child {
  padding-bottom: 0.75rem;
}

.codex-card h3 {
  margin: 0.15rem 0 0.35rem;
}

.codex-card:not(.is-on) {
  opacity: 1;
}

.codex-card:not(.is-on) .codex-photo img {
  filter: brightness(0.12) grayscale(1);
}

.discoveries {
  background: #143d2a;
  border-radius: 14px;
  padding: 0.9rem 1rem;
}

.discoveries ol {
  margin: 0.4rem 0 0;
  padding-left: 1.2rem;
}

.passport-actions {
  justify-content: center;
  margin: 0 1.1rem 1.2rem;
}

.hub-reset {
  margin-top: 1.4rem;
}

.site-footer {
  flex-shrink: 0;
  text-align: center;
  padding: 0.85rem 1rem calc(0.85rem + var(--safe-bottom));
  font-size: 0.82rem;
  color: var(--ink-soft);
  border-top: 1px solid var(--line);
  background: rgba(16, 40, 31, 0.92);
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: var(--leaf);
  font-weight: 700;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(4rem + var(--safe-bottom));
  transform: translateX(-50%);
  z-index: 90;
  max-width: min(92vw, 420px);
  padding: 0.7rem 1rem;
  border-radius: 999px;
  background: #04110c;
  color: #fff;
  font-weight: 700;
  box-shadow: var(--shadow);
}

@keyframes shake {
  25% {
    transform: translateX(-6px);
  }
  75% {
    transform: translateX(6px);
  }
}

@keyframes poison {
  50% {
    transform: scale(1.02);
  }
}

@keyframes dazzle {
  25% {
    filter: contrast(1.4) blur(0.4px);
  }
  75% {
    filter: contrast(1.1);
  }
}

@keyframes stripe-shift {
  25% {
    transform: translateX(-14px);
  }
  75% {
    transform: translateX(14px);
  }
}

.btn-hall .label-short {
  display: none;
}

@media (max-width: 640px) {
  .site-header {
    padding-right: 4.75rem;
  }

  .brand img {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
  }

  .brand-text strong {
    font-size: 0.78rem;
  }

  .btn-hall .label-full {
    display: none;
  }

  .btn-hall .label-short {
    display: inline;
  }

  .xp-summary {
    font-size: 0.78rem;
    max-width: 8.5rem;
  }
}

@media (min-width: 720px) {
  .map-grid,
  .avatar-grid,
  .codex-grid,
  .tactic-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .place-board {
    grid-template-columns: repeat(4, 1fr);
  }

  .pass-lab .tray {
    grid-template-columns: repeat(4, 1fr);
  }

  .pass-lab .drag-card img,
  .drag-card.pass-card img {
    height: 132px;
  }

  .passport-spread {
    grid-template-columns: 1.05fr 1fr;
  }

  .passport-id {
    border-bottom: 0;
    border-right: 1px dashed var(--line);
  }

  .passport-lower {
    grid-template-columns: 1fr 1fr;
    align-items: start;
    border-top: 1px dashed var(--line);
    padding-top: 0.9rem;
  }

  .overlay {
    place-items: center;
  }

  .overlay-card {
    border-radius: 22px;
  }

  .hunt-scene {
    height: 320px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

@media print {
  @page {
    size: A4 landscape;
    margin: 8mm;
  }

  html,
  body {
    background: #fff !important;
    color: #111 !important;
    min-height: 0 !important;
    height: auto !important;
    overflow: hidden;
  }

  .site-header,
  .site-footer,
  .actions,
  .toast,
  .skip-link,
  .edu-account {
    display: none !important;
  }

  #main,
  .view {
    width: 100% !important;
    max-width: none;
    margin: 0;
    padding: 0;
  }

  .passport {
    box-shadow: none;
    border: 1px solid #ccc;
    background: #fff;
  }
}
