:root {
  --gold: #f0c65d;
  --teal: #50c4d5;
  --ink: #071720;
  --panel: rgba(13, 37, 49, 0.78);
  --panel-strong: rgba(15, 45, 58, 0.92);
  --rim: rgba(255, 234, 172, 0.58);
  --safe: #4fc486;
  --warn: #d9a447;
  --danger: #dd5f59;
  --violet: #8c61d0;
}

* {
  box-sizing: border-box;
}

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

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  overflow-x: hidden;
  color: #fff7dd;
  font-family: Georgia, "Times New Roman", serif;
  touch-action: manipulation;
  user-select: none;
}

html {
  background: #06131b;
}

body {
  display: grid;
  place-items: center;
  position: relative;
  background: #06131b;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: -10%;
  pointer-events: none;
}

body::before {
  z-index: 0;
  background: url("assets/premium/home-bg.png") center / cover no-repeat;
  filter: blur(1.35rem) brightness(0.42) saturate(1.08);
  opacity: 0.88;
  transform: scale(1.1);
  animation: pageSeaBreath 18s ease-in-out infinite alternate;
}

body::after {
  z-index: 0;
  background: url("assets/overlays/water_drift.png") center bottom / 120% auto repeat-x;
  filter: blur(0.18rem) brightness(0.62) saturate(1.05);
  opacity: 0.18;
  transform: scale(1.02);
  animation: sideWaterDrift 7s ease-in-out infinite alternate;
}

button {
  font: inherit;
}

.shell {
  position: relative;
  z-index: 1;
  width: min(100vw, 56.25vh);
  height: min(177.78vw, 100vh);
  aspect-ratio: 9 / 16;
  overflow: hidden;
  overflow-x: hidden;
  background: #102938;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.58);
  isolation: isolate;
}

.scene,
.scene-bg,
.scene-drift,
.moon-glow,
.scene-weather,
.boat,
.vignette {
  position: absolute;
  inset: 0;
}

.scene {
  z-index: 0;
  overflow: hidden;
  transition: filter 260ms ease;
}

.scene-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.025);
  transition: opacity 520ms ease, transform 1800ms ease;
}

.scene-bg.is-visible {
  opacity: 1;
  transform: scale(1);
}

.scene-drift {
  width: 118%;
  height: 100%;
  left: -9%;
  object-fit: cover;
  pointer-events: none;
  opacity: 0.5;
  mix-blend-mode: screen;
}

.scene-clouds {
  animation: cloudDrift 24s linear infinite alternate;
}

.scene-water {
  top: 45%;
  height: 55%;
  opacity: 0.32;
  animation: waterDrift 13s ease-in-out infinite alternate;
}

.scene-weather {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  pointer-events: none;
  transition: opacity 420ms ease;
}

.scene-weather.is-visible {
  opacity: 0.62;
  animation: rainSweep 900ms linear infinite;
}

.moon-glow {
  display: none;
  pointer-events: none;
}

.boat {
  width: 58%;
  height: auto;
  inset: auto auto 37% 21%;
  filter: drop-shadow(0 24px 18px rgba(0, 0, 0, 0.38));
  transform-origin: 50% 80%;
  animation: boatBob 3.4s ease-in-out infinite;
  transition: transform 480ms ease, opacity 260ms ease;
}

.shell[data-screen] .boat {
  display: none;
}

.shell[data-screen="title"] .hud {
  display: none;
}

.shell[data-screen="title"] .scene-bg {
  object-fit: cover;
  object-position: center center;
  transform: none;
  animation: titlePosterBreath 9s ease-in-out infinite alternate;
}

.shell[data-screen="title"] .scene-weather,
.shell[data-screen="title"] .vignette {
  display: none;
}

.shell[data-screen="title"] .scene-clouds {
  display: none;
}

.shell[data-screen="title"] .scene-water {
  display: block;
  top: 58%;
  height: 42%;
  opacity: 0.48;
  mix-blend-mode: screen;
  animation: titleWaterShimmer 3.8s ease-in-out infinite alternate;
}

.shell[data-screen="title"] .moon-glow {
  display: block;
  z-index: 1;
  width: 21%;
  height: auto;
  inset: 37.2% auto auto 61.4%;
  opacity: 0.34;
  mix-blend-mode: screen;
  transform-origin: 50% 50%;
  animation: moonRadiance 4.8s ease-in-out infinite alternate;
}

.boat.is-sailing {
  transform: translateX(7%) rotate(2deg);
}

.vignette {
  z-index: 1;
  pointer-events: none;
  background: var(--heat-tint, rgba(55, 146, 180, 0.08));
  transition: background-color 500ms ease;
}

.hud {
  position: absolute;
  z-index: 4;
  top: 2.2%;
  left: 3.2%;
  right: 3.2%;
  width: 93.6%;
  max-width: 93.6%;
  display: flex;
  flex-wrap: wrap;
  gap: 0.16rem;
  transition: filter 260ms ease, opacity 260ms ease;
}

.settings-button {
  position: absolute;
  z-index: 9;
  top: 8.4%;
  right: 1.2%;
  width: clamp(1.72rem, 5.1vw, 2.28rem);
  height: clamp(1.72rem, 5.1vw, 2.28rem);
  display: grid;
  place-items: center;
  padding: 0.28rem;
  border: 0;
  background: url("assets/premium/button-primary.png") center / 100% 100% no-repeat;
  opacity: 0.76;
  filter: brightness(1.05) saturate(0.96);
  transition: opacity 160ms ease, filter 160ms ease, transform 160ms ease;
}

.settings-button img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.shell[data-screen="title"] .settings-button {
  top: 4%;
  right: 4%;
  display: grid;
  width: clamp(1.55rem, 4.8vw, 2.08rem);
  height: clamp(1.55rem, 4.8vw, 2.08rem);
  opacity: 0.72;
}

.settings-button:active {
  opacity: 0.94;
  filter: brightness(1.22) saturate(1.08);
  transform: scale(0.96);
}

.stat-card {
  flex: 1 1 0;
  min-width: 0;
  min-height: clamp(1.88rem, 6.2vw, 2.28rem);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.04rem;
  padding: 0.1rem 0.04rem;
  border: 0;
  background-color: rgba(7, 24, 33, 0.72);
  border: 1px solid rgba(221, 184, 92, 0.52);
  box-shadow: 0 0.24rem 0.46rem rgba(0, 0, 0, 0.2);
  transition: border-color 260ms ease, box-shadow 260ms ease, filter 260ms ease;
}

.stat-card img {
  width: clamp(0.68rem, 2.62vw, 0.92rem);
  height: clamp(0.68rem, 2.62vw, 0.92rem);
  flex: 0 0 auto;
  filter: drop-shadow(0 0.15rem 0.15rem rgba(0, 0, 0, 0.32));
}

.stat-card span {
  min-width: 0;
  max-width: calc(100% - 0.72rem);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #fff9dc;
  font-size: clamp(0.46rem, 1.72vw, 0.66rem);
  font-weight: 800;
  line-height: 1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.68);
}

.stat-card.is-danger {
  border-color: rgba(255, 127, 102, 0.9);
  animation: dangerPulse 1.25s ease-in-out infinite alternate;
}

.title-screen,
.play-screen {
  position: absolute;
  z-index: 3;
  inset: 0;
  display: none;
}

.title-screen.is-active,
.play-screen.is-active {
  display: block;
}

.title-screen::after {
  content: "";
  position: absolute;
  left: -12%;
  right: -12%;
  bottom: -3%;
  height: 34%;
  pointer-events: none;
  background: url("assets/overlays/water_drift.png") center bottom / 130% auto repeat-x;
  opacity: 0.28;
  mix-blend-mode: screen;
  animation: titleForegroundWater 3.2s ease-in-out infinite alternate;
}

.location-card,
.main-panel,
.action-grid {
  transition: filter 260ms ease, opacity 260ms ease;
}

.shell.has-focus-popup .scene,
.shell.has-focus-popup .hud,
.shell.has-focus-popup .location-card,
.shell.has-focus-popup .main-panel,
.shell.has-focus-popup .action-grid {
  filter: blur(0.22rem) brightness(0.72);
}

.shell.has-focus-popup .event-banner {
  filter: none;
}

.shell.has-intro .scene,
.shell.has-intro .title-screen {
  filter: blur(0.28rem) brightness(0.58) saturate(0.9);
}

.brand {
  position: absolute;
  left: 5%;
  right: 5%;
  top: 14%;
  text-align: center;
  text-transform: uppercase;
  text-shadow: 0 0.35rem 0.8rem rgba(0, 0, 0, 0.72), 0 0 1.5rem rgba(245, 204, 104, 0.45);
  overflow: visible;
}

.shell[data-screen="title"] .brand,
.shell[data-screen="title"] .caption {
  opacity: 0;
  pointer-events: none;
}

.brand p {
  margin: 0 0 0.3rem;
  color: #f6e6ad;
  font-size: clamp(2rem, 8.8vw, 3.65rem);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.04;
  overflow-wrap: break-word;
}

.brand h1 {
  margin: 0;
  color: var(--gold);
  font-size: clamp(1.08rem, 4.8vw, 2.1rem);
  letter-spacing: 0;
  line-height: 1.08;
  overflow-wrap: break-word;
}

.caption {
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 8%;
  margin: 0;
  color: rgba(231, 249, 250, 0.9);
  font-size: clamp(1rem, 3vw, 1.45rem);
  text-align: center;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.78);
  overflow-wrap: break-word;
}

.title-prompt {
  position: absolute;
  z-index: 4;
  left: 18%;
  right: 18%;
  bottom: 19.2%;
  margin: 0;
  color: rgba(255, 243, 191, 0.92);
  font-size: clamp(0.52rem, 1.68vw, 0.72rem);
  font-weight: 900;
  line-height: 1.1;
  text-align: center;
  text-transform: uppercase;
  text-shadow:
    0 0.12rem 0.28rem rgba(0, 0, 0, 0.95),
    0 0 0.5rem rgba(240, 198, 93, 0.46);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  animation: promptBreath 1.55s ease-in-out infinite alternate;
}

.location-card {
  position: absolute;
  top: 12.5%;
  left: 12%;
  right: 12%;
  padding: 0.5rem 0.78rem 0.56rem;
  border: 0;
  background: url("assets/premium/panel-card.png") center / 100% 100% no-repeat;
  box-shadow: none;
  text-align: center;
  overflow: visible;
}

.location-card p,
.location-card h2,
.location-card span {
  display: block;
  margin: 0;
  text-shadow: 0 0.12rem 0.24rem rgba(0, 0, 0, 0.78);
  max-width: 100%;
}

.location-card p {
  color: #8ee4ef;
  font-size: clamp(0.6rem, 1.95vw, 0.82rem);
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.location-card h2 {
  color: #fff3bf;
  font-size: clamp(1.1rem, 4.35vw, 1.86rem);
  line-height: 1.02;
  overflow-wrap: break-word;
}

.shell[data-screen="map"] .location-card h2,
.shell[data-screen="sail"] .location-card h2 {
  font-size: clamp(1.35rem, 4.8vw, 2.05rem);
  line-height: 1.02;
}

.location-card span {
  color: rgba(224, 247, 250, 0.88);
  font-size: clamp(0.58rem, 1.9vw, 0.78rem);
  font-weight: 700;
  overflow-wrap: break-word;
}

.event-banner {
  position: absolute;
  z-index: 8;
  top: 50%;
  left: 12%;
  right: 12%;
  min-height: clamp(3.4rem, 12vw, 4.65rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 0.78rem 1rem;
  border: 0;
  background: url("assets/premium/panel-card.png") center / 100% 100% no-repeat;
  box-shadow: none;
  opacity: 0;
  pointer-events: none;
  text-align: center;
  transform: translateY(-50%) scale(0.96);
  transition: opacity 260ms ease, transform 260ms ease;
}

.event-banner.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(-50%) scale(1);
}

.intro-overlay {
  position: absolute;
  z-index: 10;
  inset: 0;
  display: none;
  place-items: center;
  padding: 8%;
}

.intro-overlay::before,
.settings-overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(2, 10, 15, 0.28);
  pointer-events: none;
}

.settings-overlay {
  position: absolute;
  z-index: 11;
  inset: 0;
  display: none;
  place-items: center;
  padding: 9%;
}

.settings-overlay.is-visible {
  display: grid;
}

.settings-panel {
  position: relative;
  z-index: 1;
  width: 88%;
  min-height: 42%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.48rem;
  padding: 1.2rem 1rem;
  background: url("assets/premium/panel-card.png") center / 100% 100% no-repeat;
  text-align: center;
}

.settings-panel p {
  margin: 0 0 0.18rem;
  color: #8ee4ef;
  font-size: clamp(0.76rem, 2.5vw, 1rem);
  font-weight: 900;
  text-shadow: 0 0.1rem 0.22rem rgba(0, 0, 0, 0.82);
}

.settings-row {
  width: 72%;
  min-height: clamp(2.15rem, 6.8vw, 2.7rem);
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.8rem;
  border: 0;
  background: url("assets/premium/button-primary.png") center / 100% 100% no-repeat;
  color: #fff3bf;
  text-align: left;
}

.settings-row span,
.settings-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 0 0.1rem 0.2rem rgba(0, 0, 0, 0.82);
}

.settings-row span {
  font-size: clamp(0.72rem, 2.25vw, 0.92rem);
  font-weight: 900;
}

.settings-row strong {
  color: #8ee4ef;
  font-size: clamp(0.62rem, 1.9vw, 0.78rem);
}

.close-settings {
  width: 56%;
  margin-top: 0.24rem;
}

.intro-overlay.is-visible {
  display: grid;
}

.intro-panel {
  position: relative;
  z-index: 1;
  width: 82%;
  min-height: 36%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 1.52rem 1.54rem 1.1rem;
  background: url("assets/premium/panel-card.png") center / 100% 100% no-repeat;
  color: #fff3bf;
  text-align: center;
  box-shadow: none;
}

.intro-panel p,
.intro-panel h2,
.intro-panel span {
  width: 74%;
  margin: 0;
  text-shadow: 0 0.08rem 0.18rem rgba(0, 0, 0, 0.82);
  overflow-wrap: break-word;
}

.intro-panel p {
  color: #8ee4ef;
  font-size: clamp(0.48rem, 1.55vw, 0.64rem);
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.intro-panel h2 {
  margin-top: 0.34rem;
  color: #fff3bf;
  font-size: clamp(0.76rem, 2.45vw, 1.02rem);
  line-height: 1.12;
}

.intro-panel span {
  margin-top: 0.46rem;
  color: rgba(224, 247, 250, 0.9);
  font-size: clamp(0.48rem, 1.46vw, 0.6rem);
  line-height: 1.24;
}

.intro-button {
  width: 52%;
  min-height: clamp(1.85rem, 5.6vw, 2.4rem);
  margin-top: 0.78rem;
  display: grid;
  grid-template-columns: clamp(0.92rem, 2.7vw, 1.12rem) minmax(0, 1fr);
  gap: 0.16rem;
  padding: 0.22rem 0.5rem 0.34rem;
  align-items: center;
  justify-content: center;
  font-size: clamp(0.58rem, 1.85vw, 0.78rem);
}

.intro-button img {
  width: clamp(0.82rem, 2.6vw, 1.08rem);
  height: clamp(0.82rem, 2.6vw, 1.08rem);
  justify-self: center;
}

.intro-button span {
  display: block;
  justify-self: center;
  transform: translateY(0.03rem);
  width: auto;
  max-width: 100%;
  text-align: center;
}

.event-banner strong {
  color: #fff0ba;
  width: 100%;
  font-size: clamp(0.9rem, 3vw, 1.22rem);
  line-height: 1.08;
  text-shadow: 0 0.1rem 0.22rem rgba(0, 0, 0, 0.82);
  overflow-wrap: break-word;
  white-space: normal;
}

.event-banner span {
  color: #d6f3f4;
  width: 100%;
  margin-top: 0.12rem;
  font-size: clamp(0.66rem, 2.05vw, 0.86rem);
  line-height: 1.12;
  overflow-wrap: break-word;
  white-space: normal;
}

.main-panel {
  position: absolute;
  z-index: 2;
  left: 8%;
  right: 8%;
  bottom: 31%;
  height: 33%;
  min-height: 23%;
  border: 0;
  background-color: rgba(7, 24, 33, 0.78);
  border: 1px solid rgba(221, 184, 92, 0.48);
  box-shadow: none;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(240, 198, 93, 0.65) rgba(7, 24, 33, 0.28);
  overscroll-behavior: contain;
}

.main-panel::-webkit-scrollbar {
  width: 0.28rem;
}

.main-panel::-webkit-scrollbar-track {
  background: rgba(7, 24, 33, 0.28);
}

.main-panel::-webkit-scrollbar-thumb {
  background: rgba(240, 198, 93, 0.58);
}

.shell[data-screen="map"] .main-panel,
.shell[data-screen="sail"] .main-panel {
  top: 32.8%;
  bottom: 13.8%;
  height: auto;
}

.shell[data-screen="market"] .main-panel {
  top: 36.5%;
  bottom: 30.5%;
  height: auto;
}

.panel-inner {
  padding: 0.58rem;
}

.summary-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.34rem;
}

.summary-tile,
.good-row,
.route-row {
  min-width: 0;
  border: 1px solid rgba(221, 184, 92, 0.34);
  background-color: rgba(6, 23, 31, 0.66);
  box-shadow: 0 0.18rem 0.42rem rgba(0, 0, 0, 0.16);
}

.summary-tile {
  display: grid;
  grid-template-columns: minmax(4.1rem, 35%) minmax(0, 1fr);
  align-items: center;
  min-height: 2.48rem;
  padding: 0.32rem 0.54rem;
}

.summary-tile small,
.good-row small,
.route-row small {
  display: block;
  color: #9fd5dc;
  font-size: clamp(0.58rem, 1.78vw, 0.78rem);
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.summary-tile strong,
.good-row strong,
.route-row strong {
  color: #fff3bf;
  font-size: clamp(0.74rem, 2.62vw, 1.03rem);
  text-shadow: 0 0.1rem 0.22rem rgba(0, 0, 0, 0.76);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.route-row strong {
  font-size: clamp(0.7rem, 2.25vw, 0.92rem);
}

.route-row small {
  font-size: clamp(0.5rem, 1.45vw, 0.62rem);
}

.good-list,
.route-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.36rem;
}

.route-copy {
  min-width: 0;
  display: block;
}

.good-row,
.route-row {
  width: 100%;
  min-height: 2.44rem;
  display: grid;
  grid-template-columns: minmax(1.55rem, 1.86rem) minmax(0, 1fr) minmax(3.35rem, 4.1rem);
  align-items: center;
  gap: 0.26rem;
  padding: 0.2rem 0.34rem;
  color: inherit;
  text-align: left;
}

.good-row.is-selected,
.route-row.is-selected {
  filter: brightness(1.18) saturate(1.08);
}

.good-icon {
  width: clamp(1.35rem, 4.9vw, 1.68rem);
  height: clamp(1.35rem, 4.9vw, 1.68rem);
  display: grid;
  place-items: center;
  background: url("assets/premium/button-primary.png") center / 100% 100% no-repeat;
  color: #fff9de;
  font-weight: 900;
  box-shadow: 0 0.18rem 0.38rem rgba(0, 0, 0, 0.24);
}

.price-block {
  grid-column: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  color: #f4ce64;
  font-size: clamp(0.56rem, 1.95vw, 0.76rem);
  font-weight: 900;
  min-width: 0;
  white-space: nowrap;
}

.price-block em {
  color: #bddde2;
  font-size: clamp(0.46rem, 1.45vw, 0.6rem);
  font-style: normal;
}

.action-grid {
  position: absolute;
  z-index: 6;
  left: 7%;
  right: 7%;
  bottom: 4.2%;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.44rem;
}

.shell[data-screen="map"] .action-grid,
.shell[data-screen="sail"] .action-grid {
  bottom: 3.4%;
}

.upgrade-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.2rem;
}

.game-button {
  position: relative;
  z-index: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.22rem;
  padding: 0.24rem 0.28rem;
  border: 0;
  color: #fff9df;
  font-weight: 950;
  letter-spacing: 0;
  text-shadow: 0 0.1rem 0.22rem rgba(0, 0, 0, 0.82);
  background: url("assets/premium/button-primary.png") center / 100% 100% no-repeat;
  box-shadow: 0 0.32rem 0.74rem rgba(0, 0, 0, 0.28);
  transition: transform 135ms ease-out, filter 135ms ease-out, box-shadow 135ms ease-out;
  transform: translateZ(0);
  overflow: visible;
}

.game-button:active,
.game-button.is-pressed {
  transform: scale(0.97);
  filter: brightness(1.14);
}

.game-button img {
  width: clamp(0.92rem, 3.55vw, 1.28rem);
  height: clamp(0.92rem, 3.55vw, 1.28rem);
  flex: 0 0 auto;
  object-fit: contain;
  filter: drop-shadow(0 0.14rem 0.14rem rgba(0, 0, 0, 0.28));
}

.game-button span {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1;
}

.tier-1 {
  min-height: clamp(2.84rem, 8.8vw, 3.35rem);
  background-image: url("assets/premium/button-primary.png");
  font-size: clamp(0.78rem, 2.62vw, 1.02rem);
}

.tier-1.sail {
  background-image: url("assets/premium/button-primary.png");
  filter: hue-rotate(150deg) saturate(0.95);
}

.tier-2 {
  min-height: clamp(2.55rem, 7.55vw, 3rem);
  border-color: rgba(255, 203, 184, 0.58);
  font-size: clamp(0.72rem, 2.42vw, 0.9rem);
}

.black { filter: hue-rotate(230deg) saturate(1.08); }

.raid { filter: hue-rotate(310deg) saturate(1.1); }

.tier-3 {
  min-height: clamp(1.92rem, 5.85vw, 2.28rem);
  background-image: url("assets/premium/button-primary.png");
  color: #e6f5f7;
  font-size: clamp(0.36rem, 1.25vw, 0.52rem);
  box-shadow:
    0 0.24rem 0.55rem rgba(0, 0, 0, 0.22),
    inset 0 1px rgba(255, 255, 255, 0.24);
}

.tier-3 img {
  width: clamp(0.58rem, 2.25vw, 0.82rem);
  height: clamp(0.58rem, 2.25vw, 0.82rem);
}

.start-button {
  position: absolute;
  left: 24%;
  right: 24%;
  bottom: 11.2%;
  min-height: clamp(3.3rem, 10vw, 4.5rem);
  opacity: 0.18;
  box-shadow: none;
  filter: brightness(1.18) saturate(1.08);
  animation: startBeacon 1.45s ease-in-out infinite alternate;
}

.shell[data-screen="title"] .start-button img,
.shell[data-screen="title"] .start-button span {
  opacity: 0;
}

.start-button:active,
.start-button.is-pressed {
  opacity: 0.44;
  filter: brightness(1.64) saturate(1.22);
  transform: scale(0.985);
}

@keyframes cloudDrift {
  from { transform: translateX(-3%) translateY(-1%); }
  to { transform: translateX(3%) translateY(1%); }
}

@keyframes waterDrift {
  from { transform: translateX(-4%) translateY(1%); }
  to { transform: translateX(4%) translateY(-1%); }
}

@keyframes pageSeaBreath {
  from { transform: scale(1.08) translateX(-1.1%) translateY(0); }
  to { transform: scale(1.13) translateX(1.1%) translateY(-0.8%); }
}

@keyframes sideWaterDrift {
  from { transform: scale(1.02) translateX(-2.5%) translateY(1.2%); opacity: 0.12; }
  to { transform: scale(1.04) translateX(2.5%) translateY(-1.2%); opacity: 0.24; }
}

@keyframes titlePosterBreath {
  from { transform: scale(1.006) translateY(0) translateX(-0.18%); filter: brightness(0.98) saturate(1); }
  to { transform: scale(1.028) translateY(-0.58%) translateX(0.18%); filter: brightness(1.08) saturate(1.07); }
}

@keyframes titleWaterShimmer {
  from { transform: translateX(-8%) translateY(1%) scale(1.05); opacity: 0.32; }
  to { transform: translateX(8%) translateY(-1.8%) scale(1.1); opacity: 0.58; }
}

@keyframes titleForegroundWater {
  from { transform: translateX(-6%) translateY(1.2%); opacity: 0.14; }
  to { transform: translateX(6%) translateY(-2.2%); opacity: 0.32; }
}

@keyframes moonRadiance {
  0% { transform: scale(0.94); opacity: 0.24; filter: brightness(0.9) saturate(0.95); }
  45% { transform: scale(1.04); opacity: 0.42; filter: brightness(1.12) saturate(1.02); }
  100% { transform: scale(1.1); opacity: 0.36; filter: brightness(1.02) saturate(1); }
}

@keyframes startBeacon {
  0% { opacity: 0.08; filter: brightness(1.02) saturate(1); transform: translateZ(0) scale(0.994); }
  72% { opacity: 0.24; filter: brightness(1.48) saturate(1.18); transform: translateZ(0) scale(1.012); }
  100% { opacity: 0.18; filter: brightness(1.22) saturate(1.08); transform: translateZ(0) scale(1.004); }
}

@keyframes promptBreath {
  from { opacity: 0.34; transform: translateY(0); }
  to { opacity: 0.72; transform: translateY(-0.08rem); }
}

@keyframes rainSweep {
  from { transform: translateX(-2%) translateY(-2%); }
  to { transform: translateX(2%) translateY(2%); }
}

@keyframes boatBob {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-0.45rem) rotate(1deg); }
}

@keyframes dangerPulse {
  from {
    box-shadow:
      0 0.7rem 1.25rem rgba(0, 0, 0, 0.26),
      0 0 0 rgba(255, 97, 80, 0),
      inset 0 1px 0 rgba(255, 255, 255, 0.26);
  }
  to {
    box-shadow:
      0 0.7rem 1.25rem rgba(0, 0, 0, 0.26),
      0 0 1.2rem rgba(255, 97, 80, 0.65),
      inset 0 1px 0 rgba(255, 255, 255, 0.26);
  }
}

@media (max-height: 760px) {
  .stat-card {
    min-height: 1.9rem;
  }

  .main-panel {
    bottom: 31%;
    height: 33%;
  }

  .location-card {
    top: 12.4%;
    padding: 0.46rem 0.72rem 0.52rem;
  }

  .event-banner {
    top: 50%;
    min-height: clamp(3.15rem, 11vw, 4.2rem);
    padding: 0.66rem 0.9rem;
  }

  .intro-panel {
    width: 82%;
    min-height: 33%;
    padding: 1.4rem 1.16rem 0.95rem;
  }

  .intro-panel h2 {
    font-size: clamp(0.76rem, 2.45vw, 1rem);
  }

  .intro-panel span {
    font-size: clamp(0.48rem, 1.45vw, 0.6rem);
  }

  .intro-button {
    width: 52%;
    min-height: 1.86rem;
    margin-top: 0.66rem;
  }

  .title-prompt {
    display: none;
  }

  .tier-1 {
    min-height: 2.84rem;
  }

  .tier-2 {
    min-height: 2.55rem;
  }

  .tier-3 {
    min-height: 1.92rem;
  }
}
