:root {
  color-scheme: light;
  --white: #fff;
  --ink: #2f3337;
  --mist: #d9dee2;
  --cool: #b7c5cc;
  --sea: #5f7f86;
  --deep: #3e5e66;
  --paper: #f4f7f8;
  --muted: #576a72;
  --safe-top: max(
    env(safe-area-inset-top, 0px),
    var(--tg-content-safe-area-inset-top, 0px)
  );
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
html {
  background: var(--mist);
  scroll-behavior: smooth;
}
body {
  margin: 0;
  color: var(--ink);
  font:
    16px/1.65 -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  -webkit-font-smoothing: antialiased;
}
button,
input {
  font: inherit;
}
button {
  color: inherit;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
button:disabled {
  cursor: default;
}
a {
  color: var(--deep);
  text-underline-offset: 3px;
}
button:focus-visible,
a:focus-visible,
summary:focus-visible,
input:focus-visible,
[role="button"]:focus-visible {
  outline: 3px solid var(--sea);
  outline-offset: 4px;
}
button {
  transition:
    background 0.18s,
    border-color 0.18s,
    box-shadow 0.18s;
}
button:not(:disabled):active {
  filter: brightness(0.92);
}
.shell {
  width: min(100%, 760px);
  min-height: 100dvh;
  margin: auto;
  background: var(--paper);
}
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: calc(20px + var(--safe-top)) 24px 20px;
  border-bottom: 1px solid var(--mist);
}
.wordmark {
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.9px;
  line-height: 1;
}
.wordmark span {
  display: block;
  margin-top: 7px;
  font-size: 8px;
  letter-spacing: 1.4px;
  font-weight: 600;
}
header .text-button {
  font-size: 13px;
  padding: 10px 0;
}
main {
  padding: 32px 24px 48px;
  outline: none;
  animation: appear 0.35s ease both;
}
footer {
  margin: 0 24px;
  padding: 20px 0 calc(20px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--mist);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 1px;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1,
h2,
h3 {
  line-height: 1.08;
  font-weight: 750;
  letter-spacing: -0.045em;
  overflow-wrap: break-word;
}
h1 {
  font-size: clamp(46px, 12vw, 76px);
  margin: 16px 0 24px;
}
h1.page-title {
  font-size: clamp(36px, 9.2vw, 60px);
}
h2 {
  font-size: clamp(28px, 7vw, 40px);
  margin-bottom: 20px;
}
h3 {
  font-size: 20px;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  line-height: 1.25;
}
p {
  margin-bottom: 20px;
}
.eyebrow,
.block-label {
  color: var(--deep);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.8px;
}
.lead {
  font-size: 18px;
  line-height: 1.6;
  color: var(--muted);
  max-width: 540px;
}
.intro,
.opening {
  font-size: 17px;
  color: var(--muted);
}
.opening {
  color: var(--ink);
  font-weight: 500;
}
.muted,
.caption {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}
.caption {
  font-size: 11px;
}
.primary,
.secondary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 54px;
  padding: 16px 20px;
  border: 1px solid var(--deep);
  border-radius: 8px;
  font-size: 15px;
  font-weight: 650;
  text-align: left;
  margin: 12px 0;
}
.primary {
  background: var(--deep);
  color: var(--white);
}
.primary span {
  font-size: 22px;
  line-height: 1;
}
.primary:disabled {
  background: var(--mist);
  color: var(--muted);
  border-color: var(--mist);
}
.secondary {
  background: transparent;
  color: var(--deep);
  border-color: var(--cool);
}
.text-button {
  border: 0;
  background: none;
  min-height: 44px;
  padding: 12px 0;
  color: var(--deep);
  text-align: left;
  font-size: 14px;
}
.hero {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  margin: 28px 0 20px;
  aspect-ratio: 1.25;
  background: var(--cool);
}
.hero > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-tag {
  position: absolute;
  left: 18px;
  top: 18px;
  padding: 6px 9px;
  border: 1px solid #ffffffa6;
  border-radius: 3px;
  font-size: 8px;
  letter-spacing: 2px;
}
.hero-note {
  position: absolute;
  bottom: 16px;
  left: 18px;
  font-size: 20px;
  font-weight: 600;
  color: white;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 24px;
  border-bottom: 1px solid var(--mist);
  padding-bottom: 22px;
}
.stats div {
  display: grid;
  border-right: 1px solid var(--mist);
  text-align: center;
}
.stats div:last-child {
  border: 0;
}
.stats b {
  font-size: 24px;
  letter-spacing: -1px;
}
.stats span {
  font-size: 10px;
  color: var(--muted);
}
.intro-grid {
  margin: 48px 0 24px;
}
.intro-grid p {
  color: var(--muted);
}
details {
  border-top: 1px solid var(--mist);
  padding: 16px 0;
  font-size: 14px;
}
summary {
  cursor: pointer;
  min-height: 32px;
  font-weight: 600;
}
details p {
  margin: 16px 0 0;
}
#notice {
  padding: 14px 24px;
  background: #dce7eb;
  font-size: 13px;
}
.progress-label {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
}
progress {
  appearance: none;
  border: 0;
  display: block;
  width: 100%;
  height: 5px;
  margin: 12px 0 24px;
  color: var(--sea);
  background: var(--mist);
  border-radius: 8px;
  overflow: hidden;
}
progress::-webkit-progress-bar {
  background: var(--mist);
}
progress::-webkit-progress-value {
  background: var(--sea);
}
progress::-moz-progress-bar {
  background: var(--sea);
}
.route-map {
  display: block;
  width: 100%;
  max-height: 420px;
  border-radius: 12px;
  margin-bottom: 12px;
}
.map-pin {
  cursor: pointer;
}
.map-pin.locked {
  cursor: default;
}
.station-list {
  display: grid;
  gap: 10px;
}
.station-card {
  border: 1px solid var(--mist);
  border-radius: 10px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 16px;
  gap: 12px;
  padding: 18px 14px;
  background: white;
  text-align: left;
  width: 100%;
  align-items: center;
}
.station-number {
  font-size: 23px;
  color: var(--sea);
  font-weight: 400;
}
.station-card b {
  display: block;
  line-height: 1.25;
  margin: 5px 0;
  font-size: 17px;
}
.station-card small {
  display: block;
  font-size: 10px;
  color: var(--muted);
}
.station-card.locked {
  background: #ecf0f2;
  color: #6a787f;
}
.result-teaser {
  padding: 28px 20px 16px;
  margin-top: 28px;
  background: #dfe8eb;
  border-radius: 12px;
}
.teaser-icon {
  width: 76px;
  height: 70px;
  float: right;
}
.result-teaser h2 {
  font-size: 29px;
}
.station-art {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 16px 20px;
  border-radius: 10px;
  background: #e2eaed;
  margin: 26px 0;
}
.station-art img {
  width: 90px;
  height: 90px;
}
.station-art p {
  font-size: 12px;
  line-height: 1.5;
  color: var(--deep);
  margin: 0;
  max-width: 180px;
}
.block {
  border-top: 1px solid var(--mist);
  padding: 32px 0;
  scroll-margin-top: 20px;
  animation: appear 0.35s ease both;
}
.block-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
  font-size: 9px;
}
.block h2 {
  font-size: 31px;
}
.options {
  display: grid;
  gap: 10px;
  margin: 20px 0;
}
.option {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  border: 1px solid var(--mist);
  border-radius: 10px;
  background: white;
  padding: 17px 14px;
  text-align: left;
}
.option > span:nth-child(2) {
  flex: 1;
  min-width: 0;
}
.option b {
  display: block;
  line-height: 1.3;
  font-size: 16px;
}
.option small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  margin-top: 6px;
}
.option-letter {
  color: var(--sea);
  font-size: 12px;
  align-self: flex-start;
  padding-top: 4px;
}
.selected {
  background: #dfe9ec !important;
  border-color: var(--sea) !important;
  box-shadow: inset 0 0 0 1px var(--sea);
}
.tick {
  color: var(--sea);
}
.saved {
  font-size: 13px;
  color: var(--deep);
}
aside {
  background: #e3ebee;
  border-left: 2px solid var(--sea);
  border-radius: 0 8px 8px 0;
  padding: 22px 20px;
  margin: 24px 0;
}
aside p:last-child {
  margin-bottom: 0;
}
aside p,
aside li {
  font-size: 15px;
}
.article p {
  line-height: 1.85;
}
.article > p {
  margin-bottom: 26px;
}
ol,
ul {
  padding-left: 23px;
}
li {
  margin-bottom: 12px;
}
.hunt-grid {
  display: grid;
  gap: 18px;
}
.hunt-item {
  min-width: 0;
}
.hunt-grid .hunt-item {
  background: white;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--mist);
}
.hunt-grid .option {
  border-radius: 0;
  border-left: 0;
  border-right: 0;
}
.reference {
  margin: 0;
}
.reference img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  background: #e2eaed;
}
.reference figcaption {
  padding: 10px 14px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}
.fallback-note {
  display: block;
}
.checkbox {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  border: 1px solid var(--cool);
  display: grid;
  place-items: center;
  border-radius: 4px;
  color: var(--deep);
}
.photo-area {
  padding: 8px 14px;
}
.photo-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  cursor: pointer;
  font-size: 13px;
  color: var(--deep);
  position: relative;
}
.photo-button input {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  cursor: pointer;
}
.photo-button:focus-within {
  outline: 2px solid var(--sea);
}
.photo-area img {
  width: 100%;
  max-height: 260px;
  object-fit: contain;
  border-radius: 8px;
  margin: 10px 0;
}
.timer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  align-items: center;
  margin-bottom: 20px;
}
.timer > span {
  font-size: 24px;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}
.timer small {
  grid-column: 1/-1;
  color: var(--muted);
  font-size: 12px;
}
.timer button {
  font-size: 13px;
  padding: 12px;
}
.visual-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 20px 0;
}
.visual-option {
  background: white;
  border: 1px solid var(--mist);
  border-radius: 10px;
  padding: 10px;
  text-align: left;
}
.visual-option img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
}
.visual-option b {
  font-size: 14px;
  display: block;
  line-height: 1.3;
}
.visual-option small {
  font-size: 10px;
  display: block;
  color: var(--muted);
  line-height: 1.4;
  margin-top: 8px;
}
.quiz-item {
  padding: 22px 0;
  border-bottom: 1px solid var(--mist);
}
.quiz-item h3 {
  margin-top: 8px;
  font-size: 21px;
}
.binary {
  display: flex;
  gap: 12px;
}
.binary button {
  width: 50%;
  justify-content: center;
}
.quiz-explanation {
  background: #e3ebee;
  padding: 16px;
  border-radius: 8px;
  font-size: 14px;
}
.ship-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin: 24px 0 12px;
}
.ship-metrics > div {
  border: 1px solid var(--mist);
  border-radius: 6px;
  padding: 10px 5px;
  text-align: center;
}
.ship-metrics small {
  display: block;
  font-size: 9px;
  line-height: 1.4;
}
.ship-metrics b {
  display: block;
  font-size: 13px;
}
.ship-stage {
  position: relative;
  padding: 26px 10px 42px;
  border-radius: 12px;
  overflow: hidden;
  background: #e5ecef;
}
.water {
  position: absolute;
  bottom: 0;
  height: 40%;
  width: 120%;
  left: -10%;
  background: #9eb7be;
  border-radius: 40% 35% 0 0;
  animation: water 5s infinite ease-in-out alternate;
}
.hull {
  position: relative;
  padding: 10px 8px 24px;
  background: #5f7f86;
  border-radius: 8px 8px 42px 34px;
  transform: rotate(var(--angle));
  transition: transform 0.35s;
}
.slot-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}
.ship-slot {
  min-height: 65px;
  min-width: 0;
  border: 1px solid #d5e0e4;
  border-radius: 6px;
  background: #f4f7f8;
  padding: 6px 2px;
}
.ship-slot small {
  display: block;
  line-height: 1.2;
  font-size: 8px;
}
.ship-slot b {
  font-size: 20px;
  font-weight: 600;
}
.ship-slot:nth-child(n + 4) {
  background: #d8e3e7;
}
.ship-parts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 22px 0 14px;
}
.ship-part {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 68px;
  padding: 9px;
  border: 1px solid var(--mist);
  border-radius: 8px;
  background: white;
  text-align: left;
  touch-action: none;
  user-select: none;
}
.ship-part > b {
  background: #e5ecef;
  border-radius: 4px;
  font-size: 12px;
  padding: 5px;
}
.ship-part span {
  font-size: 11px;
  line-height: 1.4;
}
.ship-part small {
  display: block;
  color: var(--muted);
  font-size: 9px;
  margin-top: 4px;
}
.ship-part.dragging {
  z-index: 10;
  pointer-events: none;
  box-shadow: 0 6px 25px #2f33374d;
}
.ship-shortcuts {
  margin: 20px 0 8px;
}
.completion {
  padding-top: 40px;
}
.done-mark {
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  border: 1px solid var(--sea);
  border-radius: 50%;
  font-size: 42px;
  color: var(--sea);
  margin-bottom: 32px;
  animation: appear 0.5s;
}
.result-art {
  margin: 16px 0 28px;
  border-radius: 50% 50% 8px 8px;
  background: #dfe8eb;
  padding: 24px;
}
.result-art img {
  display: block;
  width: min(100%, 250px);
  height: 230px;
  margin: auto;
}
.score-card {
  border-block: 1px solid var(--mist);
  padding: 22px 0;
  margin: 26px 0 32px;
}
.score-card b {
  display: block;
  font-size: 22px;
}
.score-card span {
  font-size: 12px;
  color: var(--muted);
}
.trait-bars > div {
  display: grid;
  grid-template-columns: 1fr auto;
  font-size: 14px;
}
.trait-bars progress {
  grid-column: 1/-1;
  height: 6px;
  margin: 8px 0 20px;
}
@keyframes appear {
  from {
    opacity: 0;
    transform: translateY(7px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes water {
  to {
    transform: translateX(10px) translateY(5px);
  }
}
@media (min-width: 600px) {
  header,
  main {
    padding-left: 48px;
    padding-right: 48px;
  }
  footer {
    margin-inline: 48px;
  }
  .hero {
    aspect-ratio: 1.8;
  }
  .hunt-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .reference img {
    height: 200px;
  }
}
@media (max-width: 350px) {
  header,
  main {
    padding-left: 16px;
    padding-right: 16px;
  }
  .wordmark {
    font-size: 18px;
  }
  h1 {
    font-size: 43px;
  }
  h1.page-title {
    font-size: 34px;
  }
  .block h2 {
    font-size: 28px;
  }
  .station-card {
    gap: 8px;
    padding: 16px 10px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
