:root {
  --app-height: 100vh;
}
@supports (height: 100dvh) {
  :root {
    --app-height: 100dvh;
  }
}
:root {
  color-scheme: light;
  --bg: #ede5d1;
  --panel: #ece4cf;
  --panel-light: #ebe2ce;
  --ink: #3b4a33;
  --muted: #5c6e52;
  --line: #eae1cc;
  --accent: #5c6e52;
  --orange: #b0663d;
  --serif: Georgia, "Songti SC", serif;
  --mono: "SFMono-Regular", Consolas, monospace;
  font-family:
    -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
    sans-serif;
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.6;
  background-image: radial-gradient(
    ellipse at 80% 0,
    #ebe3ce80,
    transparent 50%
  );
  min-height: var(--app-height, 100vh);
}
button,
input {
  font: inherit;
}
button {
  cursor: pointer;
  color: inherit;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.4;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
canvas:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
button {
  transition:
    background 0.16s,
    border-color 0.16s,
    transform 0.16s;
}
button:active:not(:disabled) {
  transform: translateY(1px);
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 36px;
  font-weight: 650;
  line-height: 1.28;
  letter-spacing: -1.2px;
}
h2 {
  font-size: 22px;
  line-height: 1.4;
  letter-spacing: -0.5px;
}
h3 {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
}
p {
  line-height: 1.85;
}
small {
  font-size: 11px;
}
a {
  color: var(--accent);
}
[hidden] {
  display: none !important;
}
.icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  vertical-align: middle;
}
.mono,
.eyebrow {
  font-family: var(--mono);
}
.eyebrow {
  font-size: 10px;
  line-height: 1.6;
  letter-spacing: 2px;
  color: var(--accent);
  font-weight: 500;
}
.muted {
  color: var(--muted);
}
.accent {
  color: var(--accent);
}
.full {
  width: 100%;
  margin-top: 14px;
}
.centered {
  justify-content: center;
}
.back-arrow {
  transform: rotate(180deg);
  width: 16px;
}
.skip-link {
  position: fixed;
  z-index: 100;
  top: -80px;
  left: 16px;
  background: var(--accent);
  color: var(--bg);
  padding: 10px;
}
.skip-link:focus {
  top: 8px;
}
#app {
  max-width: 1160px;
  margin: auto;
  padding: 0 40px;
}
#topbar {
  height: 91px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  gap: 12px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  background: none;
  border: 0;
  padding: 0;
  font-size: 17px;
  font-weight: 650;
  letter-spacing: 1px;
}
.brand > .icon {
  width: 35px;
  height: 35px;
  color: var(--accent);
}
.brand small {
  display: block;
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 400;
  letter-spacing: 2.1px;
  color: var(--muted);
  margin-top: 1px;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.wallet {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 13px;
  padding: 8px 15px;
  border: 1px solid var(--line);
  border-radius: 30px;
}
.wallet .icon {
  width: 17px;
  color: var(--accent);
}
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid transparent;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--muted);
}
.icon-button:hover {
  background: var(--panel-light);
  color: var(--ink);
}
#view {
  min-height: calc(var(--app-height, 100vh) - 174px);
  outline: none !important;
  padding-bottom: 32px;
}
#nav {
  display: flex;
  gap: 40px;
  justify-content: center;
  align-items: center;
  border-top: 1px solid var(--line);
  height: 82px;
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--bg);
}
.nav-item {
  border: 0;
  display: flex;
  gap: 9px;
  align-items: center;
  background: none;
  color: var(--muted);
  font-size: 12px;
  padding: 15px 0;
}
.nav-item.active {
  color: var(--accent);
}
.nav-item .icon {
  width: 19px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  padding: 12px 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-light);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
}
.button:hover:not(:disabled) {
  background: #eae1cc;
  border-color: #b7af9a;
}
.button.primary {
  background: var(--orange);
  border-color: var(--orange);
  color: #ece3cf;
  box-shadow: 0 4px 20px #b0663d10;
}
.button.primary:hover:not(:disabled) {
  background: #3b4a33;
}
.button.outline {
  background: transparent;
  border-color: #b9b19b;
  color: var(--accent);
}
.button.subtle {
  background: #ebe3ce;
  border-color: #e9e0cc;
  font-weight: 500;
}
.button.large {
  min-height: 66px;
  padding: 15px 22px;
}
.button.compact {
  min-height: 32px;
  font-size: 11px;
  padding: 5px 10px;
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
}
.button .icon {
  width: 18px;
  height: 18px;
}
.text-button {
  border: 0;
  background: none;
  color: var(--muted);
  padding: 8px 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  line-height: 1.5;
}
.text-button:hover {
  color: var(--accent);
}
.text-button.danger {
  color: #3b4a33;
}
.button-row {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}
.button-row > * {
  flex: 1;
}
.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid #bcb49e;
  border-radius: 5px;
  padding: 4px 9px;
  font-size: 10px;
  color: #5c6e52;
  line-height: 1.5;
}
.caption {
  color: var(--muted);
  font-size: 11px;
  text-align: center;
  margin-top: 17px;
  line-height: 1.7;
}
.section-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 30px 0 15px;
}
.section-label h2,
.section-label h3 {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0;
}
.section-label > span {
  color: var(--muted);
  font-size: 10px;
}
.section-label > .mono {
  font-size: 9px;
  letter-spacing: 1.5px;
}
/* The station is an editorial dashboard, distinct from the combat instrument panel. */
.station-line {
  display: flex;
  justify-content: space-between;
  padding: 24px 0 5px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.3px;
}
.station-line > .mono {
  font-size: 10px;
  letter-spacing: 1.5px;
}
.status-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 100%;
  background: var(--accent);
  margin-right: 7px;
  box-shadow: 0 0 8px #5c6e5255;
}
.hero-panel {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  padding: 35px 0 25px;
  min-height: 410px;
}
.hero-copy {
  position: relative;
  z-index: 1;
}
.hero-copy > .eyebrow {
  font-size: 9px;
  letter-spacing: 1.6px;
  margin-bottom: 22px;
}
.hero-copy h1 {
  font-family: var(--serif);
  font-size: 49px;
  line-height: 1.32;
  letter-spacing: -1px;
  font-weight: 600;
}
.hero-copy h1 em {
  font-style: normal;
  color: var(--accent);
}
.hero-description {
  color: #5c6e52;
  font-size: 12px;
  margin-top: 20px;
  line-height: 1.9;
}
.hero-cta {
  margin-top: 28px;
  max-width: 370px;
}
.hero-cta .button {
  width: 100%;
  justify-content: flex-start;
  text-align: left;
}
.hero-cta .button > span {
  flex: 1;
}
.hero-cta small {
  display: block;
  font-size: 9px;
  opacity: 0.7;
  font-weight: 400;
  margin-top: 2px;
}
.pilot-note {
  display: flex;
  gap: 9px;
  align-items: center;
  margin-top: 20px;
  font-size: 12px;
}
.pilot-note > svg {
  width: 35px;
  height: 35px;
}
.pilot-note small {
  display: block;
  color: var(--muted);
  font-size: 9px;
}
.pilot-note .text-button {
  margin-left: 14px;
  font-size: 10px;
}
.hero-art {
  position: relative;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.hero-art canvas {
  width: 150%;
  height: auto;
  max-width: none;
  flex-shrink: 0;
  transform: translate(-8%, 12px);
}
.hero-coordinate {
  position: absolute;
  top: 28px;
  right: 6px;
  font-size: 10px;
  line-height: 1.6;
  color: var(--muted);
  text-align: right;
}
.hero-coordinate b {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 2px;
  font-weight: 400;
}
.art-caption {
  position: absolute;
  bottom: 20px;
  right: 0;
  left: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  color: #5c6e52;
}
.art-caption > span:last-child {
  margin-left: auto;
  color: #b5ad98;
  font-family: var(--mono);
}
.sonar-dot {
  display: block;
  width: 6px;
  height: 6px;
  border: 1px solid var(--accent);
  border-radius: 50%;
}
.station-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 24px 0;
  margin-top: 8px;
}
.station-stats > div {
  padding-left: 26px;
  border-left: 1px solid var(--line);
}
.station-stats > div:first-child {
  padding-left: 0;
  border: 0;
}
.station-stats .eyebrow {
  color: var(--muted);
  letter-spacing: 1.2px;
  font-size: 10px;
}
.station-stats strong {
  display: block;
  font-family: var(--mono);
  font-size: 33px;
  line-height: 1.3;
  margin-top: 9px;
  font-weight: 400;
}
.station-stats strong small {
  font: 11px sans-serif;
  margin-left: 10px;
  color: var(--muted);
}
.mode-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.mode-card {
  display: flex;
  align-items: center;
  gap: 17px;
  min-width: 0;
  text-align: left;
  background: linear-gradient(115deg, #ebe2ce, #ece4cf);
  border: 1px solid #bdb59e;
  border-radius: 12px;
  padding: 23px;
}
.mode-card > .icon:first-child {
  width: 27px;
  height: 27px;
  color: var(--accent);
}
.mode-card > .icon:last-child {
  margin-left: auto;
  width: 18px;
  color: var(--muted);
}
.mode-card .eyebrow {
  font-size: 8px;
  letter-spacing: 1.8px;
  color: #5c6e52;
}
.mode-card h3 {
  font-size: 17px;
  margin: 5px 0;
}
.mode-card p {
  font-size: 11px;
  color: var(--muted);
}
.mode-card:hover {
  border-color: #b5ae99;
  background: #eae2cd;
}
.field-note {
  margin: 27px 0 4px;
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--muted);
  font-size: 11px;
}
.field-note > .icon {
  color: var(--accent);
}
.field-note b {
  font-size: 12px;
  color: #3b4a33;
  font-weight: 500;
}
.field-note p {
  font-size: 10px;
  margin-top: 3px;
}
.field-note > .mono {
  margin-left: auto;
  white-space: nowrap;
  font-size: 8px;
  letter-spacing: 1px;
  color: #b8b09a;
}
/* Shared expedition pages */
.narrow-page {
  max-width: 610px;
  margin: auto;
  padding: 38px 0 20px;
}
.wide-page {
  padding: 38px 0 20px;
}
.section-head {
  margin: 0 0 28px;
}
.section-head h1 {
  margin: 12px 0;
}
.section-head .muted {
  font-size: 12px;
  max-width: 660px;
}
.brief-title {
  margin-top: 24px;
}
.brief-title h1 {
  margin: 8px 0 12px;
}
.brief-title > p:last-child {
  font-size: 12px;
  color: var(--muted);
}
.depth-illustration {
  position: relative;
  height: 180px;
  border: 1px solid var(--line);
  margin: 25px 0 20px;
  border-radius: 14px;
  overflow: hidden;
  background:
    radial-gradient(circle at 27% 50%, #bcb49d99, transparent 48%),
    linear-gradient(120deg, #ebe3ce, #ede4d0);
  display: flex;
  align-items: center;
  justify-content: space-around;
  color: var(--biome);
}
.depth-illustration > .icon {
  width: 55px;
  height: 55px;
  z-index: 1;
}
.depth-orbit {
  position: absolute;
  left: calc(25% - 70px);
  top: 20px;
  border: 1px solid #5c6e5233;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  box-shadow:
    0 0 0 25px #5c6e5208,
    0 0 0 50px #5c6e5208;
}
.depth-label {
  font-family: var(--mono);
  font-size: 45px;
  line-height: 1;
}
.depth-label small {
  display: block;
  letter-spacing: 2px;
  color: #5c6e52;
  font-size: 9px;
  margin-top: 14px;
}
.brief-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 24px 0;
  gap: 10px;
}
.metrics > div {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  border-left: 1px solid var(--line);
  padding-left: 20px;
}
.metrics > div:first-child {
  border: 0;
  padding-left: 0;
}
.metrics .icon {
  width: 16px;
  height: 16px;
  color: var(--accent);
  margin-bottom: 8px;
}
.metrics small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}
.metrics b {
  font-family: var(--mono);
  font-size: 27px;
  font-weight: 400;
  line-height: 1.5;
  margin-top: 5px;
}
.metrics em {
  font-size: 10px;
  color: var(--muted);
  font-family: inherit;
  font-style: normal;
  margin-left: 4px;
}
.info-panel {
  padding: 17px 19px;
  border: 1px solid var(--line);
  border-left: 2px solid #b6ae99;
  background: #ece4cf;
  border-radius: 8px;
  font-size: 12px;
}
.info-panel b {
  font-weight: 500;
  color: #3b4a33;
}
.info-panel p {
  color: var(--muted);
  font-size: 11px;
  margin-top: 6px;
}
.brief-footer {
  display: flex;
  justify-content: space-between;
  padding: 24px 0 6px;
  color: var(--muted);
  font-size: 11px;
}
.brief-footer > span {
  display: flex;
  gap: 7px;
  align-items: center;
}
.brief-footer .icon {
  width: 15px;
  height: 15px;
}
.tokens {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}
.module-token {
  display: inline-block;
  border: 1px solid #bbb49d;
  background: #ebe3ce;
  border-radius: 5px;
  font-size: 10px;
  color: #3b4a33;
  padding: 4px 8px;
}
.choice-card {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 17px;
  text-align: left;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 11px;
  padding: 20px;
  margin: 12px 0;
}
.choice-card:hover {
  border-color: var(--accent);
  background: #ebe3ce;
}
.choice-card > div {
  flex: 1;
  min-width: 0;
}
.choice-card p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 5px;
}
.choice-card > .icon:last-child {
  color: var(--accent);
  width: 18px;
}
.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  background: #ebe2cd;
  color: var(--accent);
  border: 1px solid #bcb49d;
  border-radius: 11px;
  flex-shrink: 0;
}
.card-icon .icon {
  width: 23px;
  height: 23px;
}
.reward-ledger {
  display: flex;
  align-items: center;
  justify-content: space-around;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  padding: 22px 16px;
}
.reward-ledger small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}
.reward-ledger strong {
  font-family: var(--mono);
  font-weight: 400;
  font-size: 30px;
  display: block;
  margin-top: 5px;
}
.reward-ledger > span {
  color: #b9b19b;
}
.perk-choice {
  display: flex;
  align-items: flex-start;
  text-align: left;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(130deg, #ebe2ce, #ece4cf);
  padding: 23px 20px;
  gap: 18px;
  margin: 13px 0;
}
.perk-choice:hover {
  border-color: var(--accent);
  background: #eae2cd;
}
.perk-number {
  font-family: var(--mono);
  font-size: 24px;
  font-weight: 300;
  color: #b5ad98;
  line-height: 1;
}
.perk-choice > div {
  flex: 1;
  min-width: 0;
}
.perk-choice h3 {
  font-size: 19px;
  margin: 5px 0 8px;
}
.perk-choice p {
  font-size: 12px;
  color: var(--muted);
}
.perk-choice .eyebrow {
  font-size: 9px;
}
.choice-arrow {
  align-self: center;
  color: var(--accent);
}
.choice-arrow .icon {
  width: 18px;
}
.return-ledger {
  padding: 25px;
  border: 1px solid #b9b29b;
  background:
    radial-gradient(ellipse at 100% 0, #e9e1cc66, transparent 70%), #ece3cf;
  border-radius: 12px;
  margin-bottom: 25px;
}
.return-ledger small {
  color: #5c6e52;
  font-size: 12px;
}
.return-ledger strong {
  display: flex;
  gap: 12px;
  align-items: center;
  font-family: var(--mono);
  font-size: 42px;
  font-weight: 400;
  margin: 7px 0;
}
.return-ledger strong .icon {
  color: var(--accent);
  width: 25px;
  height: 25px;
}
.return-ledger p {
  font-size: 11px;
  color: var(--muted);
}
.event-art {
  height: 170px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: radial-gradient(ellipse at center, #bdb59e88, transparent 70%);
}
.event-art > .icon {
  width: 48px;
  height: 48px;
  color: var(--accent);
}
.event-art .mono {
  font-size: 9px;
  letter-spacing: 2px;
  color: #5c6e52;
}
.signal-line {
  position: absolute;
  top: 70px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, #5c6e5233, transparent);
}
.event-story {
  font-size: 14px;
  line-height: 2.2;
  color: #5c6e52;
  padding: 25px 12px;
}
.balance-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 17px 20px;
  background: #ebe2ce;
  border: 1px solid #bbb39d;
  border-radius: 10px;
  margin-bottom: 20px;
  font-size: 12px;
  color: var(--muted);
}
.balance-banner strong {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 24px;
  color: var(--ink);
  font-weight: 400;
}
.balance-banner .icon {
  color: var(--accent);
}
.shop-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 23px 0;
  border-bottom: 1px solid var(--line);
}
.shop-item > div {
  flex: 1;
  min-width: 0;
}
.shop-item p {
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}
/* Combat instruments */
.battle-view {
  padding-top: 22px !important;
  padding-bottom: 12px !important;
  min-height: 0 !important;
}
.dive-layout {
  display: grid;
  grid-template-columns: minmax(0, 440px) 240px;
  gap: 35px;
  justify-content: center;
}
.game-shell {
  min-width: 0;
  background: #ede4d0;
  border: 1px solid #bcb59e;
  border-radius: 13px;
  overflow: hidden;
  padding: 12px 16px 0;
}
.game-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.game-top > div {
  display: flex;
  gap: 4px;
  align-items: center;
}
.game-top > .eyebrow {
  font-size: 10px;
  letter-spacing: 0.7px;
}
.dive-hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0 9px;
}
.dive-hud > div > small {
  font-size: 10px;
  color: var(--muted);
}
.dive-hud strong {
  display: block;
  font-family: var(--mono);
  font-size: 30px;
  line-height: 1.15;
  margin-top: 4px;
  font-weight: 400;
}
.oxygen {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}
.oxygen > span {
  display: flex;
  align-items: center;
  gap: 5px;
}
.oxygen b {
  font-family: var(--mono);
  font-size: 28px;
  font-weight: 400;
}
.oxygen .icon {
  width: 15px;
  color: var(--accent);
}
.oxygen small {
  font-size: 9px;
  color: var(--muted);
}
.oxygen.urgent b {
  color: #b0663d;
}
.progress-track {
  height: 3px;
  background: #eae1cd;
  border-radius: 4px;
  margin-bottom: 10px;
  overflow: hidden;
}
.progress-track > div {
  height: 100%;
  width: 0;
  background: var(--accent);
}
.sea-frame {
  position: relative;
  margin: 0 -16px;
  display: flex;
  justify-content: center;
  background: #ede5d0;
  height: min(55dvh, 560px);
  min-height: 260px;
  border-top: 1px solid #eae1cc;
  border-bottom: 1px solid #eae1cc;
}
.sea-frame canvas {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  touch-action: manipulation;
  outline-offset: -3px;
}
.sea-caption {
  position: absolute;
  left: 9px;
  top: 8px;
  font-size: 8px;
  color: #5c6e52;
  pointer-events: none;
  background: #ede4d0aa;
  padding: 3px 6px;
  border-radius: 4px;
}
.combo-label {
  position: absolute;
  right: 11px;
  top: 12px;
  font-size: 10px;
  color: #3b4a33;
  pointer-events: none;
}
.game-status {
  font-size: 10px;
  color: #5c6e52;
  text-align: center;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  min-height: 30px;
  padding: 8px 0 5px;
}
.game-controls {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 9px;
  padding: 3px 0 0;
}
.game-controls .button {
  min-height: 48px;
  font-size: 14px;
}
.pulse {
  padding: 10px;
  color: var(--accent);
  font-size: 11px !important;
}
.pulse span {
  display: flex;
  gap: 8px;
  align-items: center;
}
.pulse b {
  font: 16px var(--mono);
}
.game-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #5c6e52;
  font-size: 9px;
  min-height: 33px;
}
.keyboard-note {
  border: 0;
  background: none;
  color: #5c6e52;
  font-size: 9px;
  padding: 4px 0;
}
.dive-aside {
  padding-top: 27px;
}
.dive-aside h2 {
  font-size: 23px;
  margin: 9px 0 14px;
}
.dive-aside > p:not(.eyebrow) {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.9;
  margin-bottom: 22px;
}
.dive-aside .tokens {
  gap: 9px;
}
.aside-note {
  border-top: 1px solid var(--line);
  margin-top: 30px;
  padding-top: 25px;
  display: flex;
  gap: 11px;
  color: #5c6e52;
}
.aside-note p {
  font-size: 11px;
}
.aside-note .icon {
  color: var(--accent);
  width: 18px;
}
.in-dive #topbar {
  height: 68px;
}
/* Crew and archive */
.crew-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.crew-card {
  position: relative;
  padding: 25px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(150deg, #ebe2ce, #ece4cf);
  overflow: hidden;
}
.crew-card.selected {
  border-color: var(--crew-color);
}
.crew-portrait {
  width: 90px;
  height: 90px;
  margin-bottom: 23px;
}
.crew-number {
  position: absolute;
  top: 27px;
  right: 20px;
  font-size: 9px;
  color: #5c6e52;
  writing-mode: vertical-rl;
  letter-spacing: 2px;
}
.crew-card h2 {
  font-size: 22px;
}
.crew-card h2 small {
  display: block;
  font-size: 10px;
  color: var(--crew-color);
  margin-top: 7px;
  letter-spacing: 1px;
}
.crew-card > p {
  min-height: 46px;
  margin: 16px 0 5px;
  color: var(--muted);
  font-size: 11px;
}
.crew-card .button {
  font-size: 11px;
  padding: 10px;
  gap: 6px;
}
.workshop-banner {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-top: 25px;
  background: #ece3cf;
}
.workshop-banner > div {
  flex: 1;
}
.workshop-banner h2 {
  font-size: 18px;
}
.workshop-banner p {
  color: var(--muted);
  font-size: 11px;
  margin-top: 6px;
}
.supply-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.supply-card {
  position: relative;
  background: #ebe3cf;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 24px;
}
.supply-card .stock {
  float: right;
  margin-top: 10px;
}
.supply-card h3 {
  margin-top: 22px;
  font-size: 19px;
}
.supply-card > p {
  color: var(--muted);
  font-size: 11px;
  min-height: 43px;
  margin-top: 8px;
}
.supply-card .button {
  font-size: 11px;
  padding: 10px;
}
.skin-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.skin-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #ece4cf;
}
.skin-preview {
  border: 1px solid var(--swatch);
  border-radius: 9px;
  padding: 24px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--swatch);
  background: linear-gradient(120deg, #3b4a3308, transparent);
}
.skin-preview .icon {
  width: 30px;
  height: 30px;
}
.skin-preview span {
  font: 23px var(--mono);
  opacity: 0.6;
}
.skin-card h3 {
  margin-top: 15px;
  font-size: 13px;
}
.skin-card .button {
  padding: 8px;
  font-size: 11px;
  min-height: 36px;
}
.tab-bar {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 17px;
  margin-bottom: 25px;
}
.tab {
  border: 1px solid transparent;
  border-radius: 7px;
  background: none;
  padding: 9px 17px;
  font-size: 12px;
  color: var(--muted);
}
.tab.active {
  background: #ebe2cd;
  border-color: #bab29c;
  color: var(--accent);
}
.archive-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
}
.archive-card {
  position: relative;
  padding: 20px;
  border: 1px solid #eae1cd;
  border-radius: 10px;
  background: #ece4cf;
}
.archive-card.discovered {
  border-color: #bab29c;
  background: #ece3cf;
}
.archive-card > .mono {
  font-size: 9px;
  color: #5c6e52;
}
.discovery {
  position: absolute;
  right: 15px;
  top: 17px;
  color: #b5ae99;
}
.discovery .icon {
  width: 14px;
  height: 14px;
}
.discovered .discovery {
  color: var(--accent);
}
.archive-card h3 {
  font-size: 16px;
  margin: 15px 0 9px;
}
.archive-card p {
  font-size: 11px;
  color: var(--muted);
  min-height: 45px;
}
.archive-card > small {
  display: block;
  font-size: 8px;
  margin-top: 17px;
  color: #5c6e52;
}
.discovered > small {
  color: #5c6e52;
}
.item-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
}
.catalog-item {
  display: flex;
  gap: 16px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px;
  background: #ece4cf;
}
.catalog-item canvas {
  width: 70px;
  height: 70px;
  flex-shrink: 0;
}
.catalog-item p {
  font-size: 10px;
  color: var(--muted);
  margin: 5px 0;
}
.catalog-item span {
  display: block;
  font-size: 10px;
  color: #5c6e52;
}
.catalog-item small {
  font-size: 9px;
  color: #5c6e52;
}
.achievement-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
}
.achievement {
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 19px;
  color: #5c6e52;
}
.achievement.earned {
  background: #ebe3ce;
  color: var(--accent);
  border-color: #b9b19b;
}
.achievement div {
  flex: 1;
}
.achievement h3 {
  font-size: 13px;
  color: #5c6e52;
}
.achievement p {
  font-size: 10px;
  margin-top: 4px;
}
.achievement > .icon {
  width: 22px;
}
.history-row {
  display: flex;
  align-items: center;
  gap: 15px;
  justify-content: space-between;
  padding: 17px 5px;
  border-bottom: 1px solid var(--line);
}
.history-row b {
  font-size: 12px;
}
.history-row small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-top: 4px;
}
.history-row > span {
  color: #5c6e52;
  font-size: 10px;
}
.history-row strong {
  font: 18px var(--mono);
  color: var(--accent);
}
.empty-state {
  text-align: center;
  padding: 45px 15px;
  background: #ece4cf;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.empty-state > .icon {
  color: var(--accent);
  width: 50px;
  height: 50px;
  margin-bottom: 20px;
}
.empty-state h3 {
  font-size: 17px;
}
.empty-state p {
  font-size: 12px;
  color: var(--muted);
  margin: 10px 0 20px;
}
.map-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 50px;
}
.sea-chart {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
  align-content: start;
}
.chart-node {
  display: flex;
  gap: 13px;
  align-items: center;
  padding: 18px 13px;
  background: #ece4cf;
  border: 1px solid var(--line);
  border-radius: 10px;
  min-width: 0;
}
.chart-node.current {
  background: #ebe2ce;
  border-color: var(--accent);
}
.chart-node.complete {
  border-color: #bab29c;
}
.node-dot {
  color: #5c6e52;
  font: 20px var(--mono);
  width: 26px;
  flex-shrink: 0;
}
.chart-node b {
  font-size: 12px;
  font-weight: 500;
}
.chart-node small {
  display: block;
  font-size: 9px;
  color: #5c6e52;
  margin-top: 5px;
}
.chart-node > .icon {
  width: 13px;
  margin-left: auto;
  color: var(--accent);
}
.chart-legend {
  border-left: 1px solid var(--line);
  padding-left: 30px;
}
.chart-legend > h2 {
  font-size: 24px;
  margin: 12px 0;
}
.chart-legend > p {
  font-size: 12px;
  color: var(--muted);
}
.legend-item {
  display: flex;
  gap: 10px;
  margin-top: 19px;
}
.legend-item > .icon {
  color: var(--accent);
  width: 16px;
  margin-top: 3px;
}
.legend-item b {
  font-size: 11px;
}
.legend-item p {
  font-size: 10px;
  color: var(--muted);
  margin-top: 3px;
}
/* Return log and modal surfaces */
.result-page {
  text-align: center;
}
.result-page > h1 {
  font-size: 32px;
  margin: 20px 0 13px;
}
.result-page > .muted {
  font-size: 12px;
}
.result-emblem {
  height: 82px;
  width: 82px;
  border: 1px solid #b9b19b;
  display: grid;
  place-items: center;
  border-radius: 50%;
  margin: 30px auto;
  background: radial-gradient(circle, #bcb59e55, transparent);
  box-shadow: 0 0 0 11px #5c6e5208;
}
.result-emblem .icon {
  width: 33px;
  height: 33px;
  color: var(--accent);
}
.result-receipt {
  border: 1px solid #bbb39d;
  background: #ece3cf;
  border-radius: 14px;
  padding: 28px 30px 7px;
  margin: 30px 0 20px;
  position: relative;
}
.result-receipt > strong {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  font: 50px var(--mono);
  margin: 17px 0 10px;
  color: var(--accent);
}
.result-receipt > strong .icon {
  width: 27px;
  height: 27px;
}
.result-receipt > p {
  font-size: 11px;
  color: var(--muted);
  padding-bottom: 16px;
  border-bottom: 1px dashed var(--line);
}
.result-receipt .metrics > div {
  align-items: center;
}
.result-receipt .metrics b {
  font-size: 25px;
}
.result-page > .tokens {
  margin-bottom: 25px;
}
dialog {
  border: 1px solid #bab29c;
  border-radius: 18px;
  background: #ece3cf;
  color: var(--ink);
  padding: 0;
  width: min(94vw, 480px);
  max-height: calc(var(--app-height, 100vh) - 40px);
  overflow: auto;
  box-shadow: 0 30px 120px #f0e8d499;
}
dialog::backdrop {
  background: #eee6d2c7;
  backdrop-filter: blur(7px);
}
.dialog-content {
  padding: 28px;
}
.dialog-content > h2 {
  margin: 10px 0 18px;
}
.dialog-heading {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 23px;
}
.dialog-heading > div {
  flex: 1;
  min-width: 0;
}
.dialog-heading h2 {
  font-size: 23px;
  margin-top: 7px;
}
.dialog-heading > .icon-button {
  margin-top: -7px;
  margin-right: -10px;
  flex-shrink: 0;
}
.dialog-content > .muted {
  font-size: 12px;
  margin-bottom: 22px;
}
.dialog-content .choice-card {
  padding: 17px;
}
.dialog-content .choice-card h3 {
  font-size: 16px;
}
.dialog-content .choice-card p {
  font-size: 11px;
}
.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 20px;
  margin-bottom: 20px;
}
.setting-row b {
  font-size: 13px;
  font-weight: 500;
}
.setting-row small {
  display: block;
  font-size: 9px;
  color: var(--muted);
  margin-top: 5px;
}
.setting-row .button {
  font-size: 11px;
  white-space: nowrap;
  padding: 10px;
}
.setting-row .icon {
  width: 16px;
}
.volume-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
}
#volume {
  width: 100%;
  margin: 18px 0 23px;
  accent-color: var(--accent);
  height: 24px;
}
.danger-button {
  color: #3b4a33;
  background: #bab39c;
  border-color: #b0663d;
}
.danger-button:hover:not(:disabled) {
  background: #b8b19b;
}
.pause-stats {
  display: flex;
  gap: 7px;
  margin: 20px 0;
}
.detail-row {
  border-bottom: 1px solid var(--line);
  padding: 15px 0;
  font-size: 13px;
}
.detail-row p {
  font-size: 11px;
  color: var(--muted);
  margin-top: 5px;
}
.instruction-list {
  padding-left: 20px;
  margin: 20px 0;
  color: #5c6e52;
  font-size: 12px;
  line-height: 1.9;
}
.instruction-list li {
  padding-left: 5px;
  margin-bottom: 14px;
}
.instruction-list b {
  display: block;
  color: var(--ink);
  font-weight: 600;
  margin-bottom: 3px;
}
.tutorial-visual {
  display: flex;
  align-items: center;
  justify-content: space-around;
  border: 1px solid var(--line);
  background: #ebe3ce;
  border-radius: 10px;
  height: 82px;
  margin: 25px 0;
  color: var(--accent);
}
.tutorial-visual > .icon {
  width: 30px;
  height: 30px;
}
.share-canvas {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.dialog-content:has(.share-canvas) {
  max-width: 430px;
}
.dialog-content:has(.share-canvas) .share-canvas {
  max-height: 55dvh;
  object-fit: contain;
  background: #ede5d0;
}
#toast {
  position: fixed;
  z-index: 99;
  bottom: 90px;
  left: 50%;
  transform: translate(-50%, 10px);
  background: #3b4a33;
  color: #ece3cf;
  border: 1px solid #5c6e52;
  border-radius: 10px;
  padding: 12px 20px;
  max-width: min(90vw, 500px);
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.2s,
    transform 0.2s;
  box-shadow: 0 8px 30px #f0e8d455;
}
#toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
@media (min-width: 1300px) {
  .hero-panel {
    min-height: 440px;
  }
  .hero-copy h1 {
    font-size: 54px;
  }
}
@media (max-width: 850px) {
  #app {
    padding: 0 25px;
  }
  .hero-copy h1 {
    font-size: 40px;
  }
  .hero-panel {
    grid-template-columns: 1.1fr 1fr;
  }
  .hero-art canvas {
    width: 180%;
    transform: translate(-10%, 0);
  }
  .hero-coordinate {
    top: 50px;
  }
  .hero-copy > .eyebrow {
    font-size: 7px;
  }
  .crew-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .archive-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .supply-grid {
    gap: 10px;
  }
  .supply-card {
    padding: 18px;
  }
  .map-layout {
    grid-template-columns: 1fr 240px;
    gap: 22px;
  }
  .sea-chart {
    grid-template-columns: 1fr;
  }
  .dive-layout {
    grid-template-columns: minmax(0, 440px);
  }
  .dive-aside {
    display: none;
  }
  .workshop-banner {
    flex-wrap: wrap;
  }
  .workshop-banner .button {
    margin-left: 65px;
  }
  .mode-card {
    padding: 18px;
    gap: 12px;
  }
  .mode-card > .icon:first-child {
    width: 22px;
  }
  .mode-card h3 {
    font-size: 16px;
  }
}
@media (max-width: 600px) {
  #app {
    padding: 0 20px;
  }
  #topbar {
    height: 76px;
  }
  .brand {
    font-size: 15px;
    gap: 9px;
  }
  .brand > .icon {
    width: 29px;
    height: 29px;
  }
  .brand small {
    font-size: 7px;
    letter-spacing: 1.7px;
  }
  .top-actions {
    gap: 3px;
  }
  .wallet {
    font-size: 11px;
    padding: 6px 10px;
    gap: 5px;
  }
  .wallet .icon {
    width: 14px;
    height: 14px;
  }
  .top-actions .icon-button {
    width: 30px;
    height: 32px;
  }
  .top-actions .icon-button .icon {
    width: 19px;
    height: 19px;
  }
  #nav {
    position: sticky;
    bottom: 0;
    z-index: 3;
    gap: 0;
    justify-content: space-between;
    height: 72px;
    margin: 0 -20px;
    padding: 7px 13px calc(7px + env(safe-area-inset-bottom));
    background: #ede5d0f5;
    backdrop-filter: blur(12px);
  }
  .nav-item {
    flex: 1;
    flex-direction: column;
    gap: 4px;
    padding: 8px 0;
    font-size: 9px;
  }
  .nav-item .icon {
    width: 20px;
    height: 20px;
  }
  #view {
    padding-bottom: 25px;
    min-height: calc(var(--app-height, 100vh) - 148px);
  }
  .station-line {
    padding: 19px 0 0;
    font-size: 8px;
  }
  .station-line > .mono {
    font-size: 8px;
  }
  .hero-panel {
    display: flex;
    flex-direction: column;
    padding: 26px 0 0;
    min-height: 0;
  }
  .hero-copy > .eyebrow {
    font-size: 7px;
    letter-spacing: 1.2px;
    margin-bottom: 17px;
  }
  .hero-copy h1 {
    font-size: 39px;
    line-height: 1.3;
  }
  .hero-description {
    font-size: 11px;
    line-height: 1.8;
    margin-top: 15px;
  }
  .hero-art {
    height: 230px;
    order: 1;
    margin: -5px -20px 0;
    flex-shrink: 0;
  }
  .hero-art canvas {
    width: 130%;
    max-width: none;
    transform: translate(-6%, 0);
  }
  .hero-coordinate {
    top: 20px;
    right: 23px;
    font-size: 8px;
  }
  .hero-coordinate b {
    font-size: 6px;
    letter-spacing: 1.3px;
  }
  .art-caption {
    bottom: 23px;
    left: 22px;
    right: 22px;
    font-size: 8px;
  }
  .hero-cta {
    max-width: none;
    margin-top: 23px;
  }
  .hero-cta .button.large {
    min-height: 59px;
    padding: 12px 18px;
    font-size: 13px;
  }
  .hero-cta small {
    font-size: 8px;
  }
  .pilot-note {
    margin-top: 16px;
    font-size: 11px;
  }
  .pilot-note > svg {
    width: 30px;
    height: 30px;
  }
  .pilot-note small {
    font-size: 8px;
  }
  .pilot-note .text-button {
    font-size: 9px;
    margin-left: auto;
  }
  .station-stats {
    margin-top: 0;
    padding: 19px 0;
  }
  .station-stats > div {
    padding-left: 18px;
  }
  .station-stats strong {
    font-size: 28px;
    margin-top: 8px;
  }
  .station-stats .eyebrow {
    font-size: 9px;
    letter-spacing: 0.5px;
  }
  .station-stats strong small {
    font-size: 9px;
    margin-left: 6px;
  }
  .section-label {
    margin-top: 25px;
  }
  .section-label h2 {
    font-size: 14px;
  }
  .section-label > .mono {
    font-size: 7px;
    letter-spacing: 0.6px;
  }
  .mode-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .mode-card {
    padding: 18px;
    gap: 15px;
  }
  .mode-card h3 {
    font-size: 16px;
    margin: 4px 0;
  }
  .mode-card p {
    font-size: 10px;
  }
  .mode-card > .icon:first-child {
    width: 25px;
    height: 25px;
  }
  .mode-card .eyebrow {
    font-size: 7px;
  }
  .field-note {
    align-items: flex-start;
    margin-top: 23px;
  }
  .field-note > .icon {
    width: 18px;
    margin-top: 3px;
  }
  .field-note b {
    font-size: 11px;
  }
  .field-note p {
    font-size: 9px;
  }
  .field-note > .mono {
    display: none;
  }
  h1 {
    font-size: 29px;
  }
  .narrow-page,
  .wide-page {
    padding-top: 27px;
  }
  .section-head {
    margin-bottom: 23px;
  }
  .section-head .muted {
    font-size: 11px;
  }
  .section-head .eyebrow {
    font-size: 8px;
    letter-spacing: 1.4px;
  }
  .section-head h1 {
    font-size: 29px;
  }
  .brief-title h1 {
    font-size: 30px;
  }
  .brief-title .eyebrow {
    font-size: 9px;
  }
  .depth-illustration {
    height: 150px;
    margin-top: 20px;
  }
  .depth-label {
    font-size: 38px;
  }
  .depth-orbit {
    top: 5px;
  }
  .metrics {
    padding: 21px 0;
  }
  .metrics > div {
    padding-left: 14px;
  }
  .metrics b {
    font-size: 24px;
  }
  .metrics small {
    font-size: 9px;
  }
  .brief-footer {
    font-size: 10px;
  }
  .choice-card {
    padding: 17px;
    gap: 13px;
  }
  .choice-card h3 {
    font-size: 15px;
  }
  .choice-card p {
    font-size: 11px;
  }
  .card-icon {
    width: 39px;
    height: 39px;
  }
  .card-icon .icon {
    width: 20px;
    height: 20px;
  }
  .perk-choice {
    padding: 20px 16px;
    gap: 13px;
  }
  .perk-choice h3 {
    font-size: 18px;
  }
  .perk-choice p {
    font-size: 11px;
  }
  .perk-number {
    font-size: 21px;
  }
  .reward-ledger strong {
    font-size: 27px;
  }
  .return-ledger {
    padding: 22px;
  }
  .return-ledger strong {
    font-size: 37px;
  }
  .return-ledger p {
    font-size: 10px;
  }
  .section-label > .tag {
    font-size: 8px;
  }
  .shop-item {
    gap: 11px;
  }
  .shop-item .button {
    padding: 8px 11px;
    font-size: 11px;
  }
  .shop-item h3 {
    font-size: 14px;
  }
  .shop-item p {
    font-size: 10px;
  }
  .shop-item .card-icon {
    width: 34px;
    height: 34px;
  }
  .crew-grid {
    gap: 12px;
  }
  .crew-card {
    padding: 18px 15px;
  }
  .crew-portrait {
    width: 73px;
    height: 73px;
    margin-bottom: 17px;
  }
  .crew-number {
    top: 20px;
    right: 13px;
    font-size: 7px;
  }
  .crew-card h2 {
    font-size: 20px;
  }
  .crew-card h2 small {
    font-size: 9px;
  }
  .crew-card > p {
    font-size: 10px;
    min-height: 50px;
  }
  .crew-card .button {
    font-size: 9px;
    gap: 4px;
    padding: 10px 5px;
  }
  .crew-card .button .icon {
    width: 13px;
    height: 13px;
  }
  .workshop-banner {
    padding: 18px;
    gap: 13px;
  }
  .workshop-banner h2 {
    font-size: 15px;
  }
  .workshop-banner p {
    font-size: 10px;
  }
  .workshop-banner .button {
    width: 100%;
    margin: 4px 0 0;
  }
  .supply-grid {
    grid-template-columns: 1fr;
  }
  .supply-card {
    padding: 22px;
  }
  .supply-card h3 {
    margin-top: 17px;
  }
  .supply-card > p {
    min-height: 0;
    font-size: 11px;
  }
  .supply-card .button {
    font-size: 12px;
  }
  .supply-card .caption {
    margin-top: 13px;
  }
  .skin-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .skin-card {
    padding: 15px;
  }
  .skin-preview {
    padding: 19px 12px;
  }
  .archive-grid {
    gap: 10px;
  }
  .archive-card {
    padding: 17px 13px;
  }
  .archive-card h3 {
    font-size: 14px;
  }
  .archive-card p {
    font-size: 10px;
    min-height: 58px;
  }
  .archive-card > .mono {
    font-size: 8px;
  }
  .archive-card > small {
    font-size: 7px;
    line-height: 1.8;
  }
  .discovery {
    right: 10px;
    top: 13px;
  }
  .discovery .icon {
    width: 12px;
  }
  .tab-bar {
    gap: 3px;
  }
  .tab {
    font-size: 11px;
    padding: 9px 12px;
  }
  .item-grid {
    grid-template-columns: 1fr;
  }
  .catalog-item {
    padding: 15px;
    gap: 13px;
  }
  .catalog-item canvas {
    width: 65px;
    height: 65px;
  }
  .achievement-grid {
    grid-template-columns: 1fr;
  }
  .achievement {
    padding: 17px;
  }
  .history-row {
    gap: 9px;
  }
  .history-row > span {
    font-size: 8px;
  }
  .history-row b {
    font-size: 11px;
  }
  .history-row small {
    font-size: 8px;
  }
  .history-row strong {
    font-size: 16px;
  }
  .map-layout {
    display: flex;
    flex-direction: column-reverse;
    gap: 25px;
  }
  .chart-legend {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 22px;
  }
  .chart-legend .section-label,
  .chart-legend .legend-item {
    display: none;
  }
  .sea-chart {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .chart-node {
    padding: 14px 10px;
    gap: 8px;
  }
  .chart-node b {
    font-size: 10px;
  }
  .chart-node small {
    font-size: 8px;
  }
  .node-dot {
    font-size: 18px;
    width: 24px;
  }
  .chart-node > .icon {
    width: 10px;
  }
  .result-page > h1 {
    font-size: 27px;
  }
  .result-receipt {
    padding: 25px 20px 2px;
  }
  .result-receipt > strong {
    font-size: 43px;
  }
  .result-receipt .metrics > div {
    padding-left: 10px;
  }
  .dialog-content {
    padding: 24px;
  }
  .dialog-heading h2 {
    font-size: 21px;
  }
  .dialog-heading .eyebrow {
    font-size: 8px;
  }
  .dialog-heading {
    margin-bottom: 20px;
  }
  .dialog-content > .muted {
    font-size: 11px;
  }
  .instruction-list {
    font-size: 11px;
  }
  .dialog-content .button {
    font-size: 12px;
  }
  .setting-row .button {
    font-size: 10px;
  }
  .setting-row small {
    font-size: 8px;
  }
  #toast {
    bottom: 85px;
    width: max-content;
    max-width: 88vw;
    font-size: 11px;
  }
  .battle-view {
    padding-top: 12px !important;
  }
  .dive-layout {
    gap: 0;
    display: block;
  }
  .game-shell {
    border-radius: 11px;
    padding: 9px 12px 0;
  }
  .game-top > .eyebrow {
    font-size: 9px;
  }
  .game-top .icon-button {
    width: 28px;
    height: 29px;
  }
  .game-top .button {
    font-size: 10px;
    min-height: 27px;
  }
  .sea-frame {
    margin: 0 -12px;
    height: calc(var(--app-height, 100vh) - 330px);
    min-height: 240px;
    max-height: 570px;
  }
  .game-controls {
    grid-template-columns: 96px 1fr;
  }
  .game-controls .button {
    min-height: 47px;
    padding: 10px;
  }
  .game-status {
    min-height: 28px;
    font-size: 9px;
  }
  .game-bottom {
    min-height: 30px;
    font-size: 8px;
  }
  .keyboard-note {
    font-size: 8px;
  }
  .in-dive #topbar {
    height: 65px;
  }
  .in-dive #view {
    min-height: 0;
  }
  .dive-hud strong {
    font-size: 28px;
  }
  .oxygen b {
    font-size: 25px;
  }
}
@media (max-width: 350px) {
  #app {
    padding: 0 14px;
  }
  #nav {
    margin: 0 -14px;
  }
  .brand {
    font-size: 13px;
    gap: 7px;
  }
  .brand small {
    font-size: 6px;
    letter-spacing: 1.2px;
  }
  .brand > .icon {
    width: 25px;
  }
  .wallet {
    padding: 5px 8px;
    font-size: 10px;
  }
  .top-actions .icon-button {
    width: 27px;
  }
  .hero-copy h1 {
    font-size: 34px;
  }
  .hero-copy > .eyebrow {
    font-size: 6px;
  }
  .station-line {
    font-size: 7px;
  }
  .hero-art {
    margin-left: -14px;
    margin-right: -14px;
    height: 210px;
  }
  .station-stats strong {
    font-size: 25px;
  }
  .station-stats > div {
    padding-left: 12px;
  }
  .section-label > .mono {
    display: none;
  }
  .crew-card {
    padding: 16px 12px;
  }
  .crew-card h2 {
    font-size: 18px;
  }
  .tab {
    padding: 8px 9px;
    font-size: 10px;
  }
  .metrics b {
    font-size: 21px;
  }
  .metrics small {
    font-size: 8px;
  }
  .chart-node {
    gap: 5px;
  }
  .chart-node .node-dot {
    width: 20px;
    font-size: 16px;
  }
}
@media (max-height: 550px) and (orientation: landscape) {
  .in-dive #topbar {
    height: 55px;
  }
  .sea-frame {
    height: 330px;
    min-height: 0;
  }
  .dive-layout {
    grid-template-columns: minmax(0, 420px) 210px;
    display: grid;
    gap: 20px;
  }
  .dive-aside {
    display: block;
    padding-top: 20px;
  }
  dialog {
    max-height: calc(var(--app-height, 100vh) - 20px);
  }
  .dialog-content {
    padding: 20px;
  }
  .hero-art {
    min-height: 280px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}

/* Golden Days: warm paper, illustrated mine, responsive tactile controls. */
:root {
  --bg: #f7f2e6;
  --panel: #fffaf0;
  --panel-light: #eee5cf;
  --ink: #34482f;
  --muted: #84795f;
  --line: #ddd2b5;
  --accent: #456745;
  --orange: #edbd58;
  color-scheme: light;
}
body {
  background-color: var(--bg);
  background-image: radial-gradient(
    ellipse at 70% 0,
    #e7d5a333,
    transparent 65%
  );
}
#app {
  max-width: 1100px;
  padding: 0 36px;
}
#topbar {
  height: 78px;
  border-bottom: 1px solid #d8ceb4;
}
.brand {
  font-family: var(--serif);
  font-size: 21px;
  letter-spacing: 1px;
}
.brand > .icon {
  color: #647b4f;
}
.wallet {
  background: #fff8e7;
  border-color: #d9c596;
  color: #8b6b2b;
  box-shadow: inset 0 1px #fff;
}
#view > div {
  animation: page-arrive 0.28s ease-out both;
}
#boot {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  align-content: center;
  justify-items: center;
  background: #f7f2e6;
  font: 30px var(--serif);
  color: #456745;
  gap: 15px;
}
#boot span {
  font: 13px sans-serif;
  color: #8d7d57;
}
#view {
  min-height: calc(var(--app-height, 100vh) - 154px);
}
#nav {
  height: 76px;
  background: #f7f2e6f5;
}
.button {
  border-radius: 12px;
  box-shadow:
    0 2px 0 #cabc9b55,
    inset 0 1px #fff8;
  transition:
    transform 0.14s,
    box-shadow 0.16s,
    background 0.18s;
}
.button:hover:not(:disabled) {
  background: #e7ddc2;
  border-color: #b6a77b;
  transform: translateY(-1px);
}
.button.primary {
  color: #55421f;
  background: linear-gradient(#f7d680, #eabb53);
  border-color: #cea344;
  box-shadow:
    0 4px 0 #b88e3555,
    0 7px 16px #ac833518,
    inset 0 1px #fff8;
}
.button.primary:hover:not(:disabled) {
  background: linear-gradient(#ffe29a, #efc261);
}
.button:active:not(:disabled) {
  transform: translateY(2px) scale(0.985);
  box-shadow: inset 0 2px 4px #72511822;
}
.button.compact {
  background: #52764b;
  color: #fff7e8;
  border-color: #466640;
  box-shadow: none;
}
.button.subtle {
  background: #eee5d0;
  color: #5d6547;
  border-color: #d3c6a7;
}
.button.outline {
  background: #fffaf1;
  color: #52704c;
  border-color: #b5bf9c;
}
.text-button.danger {
  color: #ac5e42;
}
.tag {
  background: #ebe6d4;
  color: #687452;
  border-color: #d7cfb5;
}
.station-line {
  padding-top: 21px;
  margin-bottom: 0;
  color: #8c836b;
}
.hero-panel {
  gap: 22px;
  padding: 28px 0 24px;
  grid-template-columns: 0.85fr 1.15fr;
}
.hero-copy h1 {
  font-family: var(--serif);
  font-size: 43px;
  line-height: 1.38;
  font-weight: 750;
  letter-spacing: 0;
}
.hero-copy h1 em {
  font-style: normal;
  color: #76814d;
}
.hero-copy .eyebrow {
  color: #a58b4e;
  letter-spacing: 1.5px;
  font-size: 9px;
}
.hero-description {
  font-size: 13px;
  line-height: 2;
  color: #8b8064;
  margin: 15px 0 20px;
}
.hero-cta .button {
  width: 100%;
  min-height: 61px;
}
.hero-art {
  border: 7px solid #fff9ed;
  border-radius: 18px;
  box-shadow:
    0 6px 22px #6b512224,
    0 0 0 1px #d5c5a6;
  min-height: 300px;
  align-self: center;
  transform: rotate(1deg);
  background: #bda778;
}
.hero-art canvas {
  width: 100%;
  height: 100%;
  min-height: 300px;
  object-fit: cover;
  transform: none;
}
.hero-coordinate {
  top: 13px;
  right: 13px;
  background: #fff4d4dd;
  color: #665b39;
  padding: 6px 9px;
  border-radius: 6px;
  font-size: 9px;
}
.art-caption {
  left: 12px;
  right: 12px;
  bottom: 10px;
  background: #45341dcc;
  color: #fff3d0;
  padding: 6px 10px;
  border-radius: 6px;
}
.art-caption > span:last-child {
  color: #ead4a8;
}
.station-stats {
  background: #eee8d6;
  border: 1px solid #ded3b6;
  border-radius: 12px;
  padding: 18px 20px;
  margin: 2px 0 22px;
}
.station-stats strong {
  font-family: Georgia, serif;
  color: #65724b;
  font-size: 30px;
}
.station-stats .eyebrow {
  color: #9b8b67;
}
.mode-card {
  background: linear-gradient(120deg, #fcf8e9, #ede8d5);
  border-color: #dcd0ad;
  box-shadow: 0 2px 0 #dacda855;
  border-radius: 12px;
  padding: 20px;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}
.mode-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 14px #a3926b24;
  border-color: #b6ba89;
  background: #f8f2df;
}
.field-note {
  color: #8e8161;
}
.narrow-page {
  max-width: 580px;
}
.depth-illustration {
  background: linear-gradient(120deg, #f1e5c7, #e8dfc3);
  border-color: #cfc09c;
}
.depth-illustration > .icon {
  color: #8c915b;
}
.depth-label {
  color: #7c8054;
}
.info-panel,
.balance-banner,
.shop-row,
.supply-card {
  background: #f0ead9;
  border-color: #d5ccb1;
}
.crew-card,
.catalog-item,
.chart-node,
.empty-state {
  background: #fdf8ec;
  border-color: #dcd1b3;
  box-shadow: 0 2px 8px #7a67360a;
}
.crew-card.selected {
  background: #edf0df;
  border-color: #85976c;
}
.crew-card:hover {
  border-color: #a6ac80;
}
.crew-card p,
.crew-card h3,
.crew-info p,
.catalog-item p,
.catalog-item small {
  color: var(--muted);
}
.crew-card h3,
.catalog-item h3 {
  color: var(--ink);
}
.crew-card .portrait {
  filter: drop-shadow(0 3px 3px #725b2920);
}
.catalog-item canvas {
  width: 56px;
  height: 56px;
}
.perk-choice {
  background: linear-gradient(120deg, #fffbed, #f1ead6);
  border-color: #d9cba7;
  box-shadow: 0 3px 0 #d6c8a141;
  position: relative;
  overflow: hidden;
  animation: card-arrive 0.36s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.perk-choice:nth-child(2) {
  animation-delay: 0.07s;
}
.perk-choice:nth-child(3) {
  animation-delay: 0.14s;
}
.perk-choice:hover {
  background: #f9f3dc;
  border-color: #9da97d;
  transform: translateX(3px);
}
.perk-number {
  color: #b59a5a;
  font-family: Georgia, serif;
}
.return-ledger,
.reward-ledger,
.result-receipt {
  background: linear-gradient(130deg, #f2ecd5, #e4e9d5);
  border-color: #c9c99e;
}
.return-ledger small,
.return-ledger strong,
.reward-ledger strong {
  color: #526847;
}
.event-art {
  background: radial-gradient(ellipse, #e0e6c7, transparent 70%);
  border-color: #d8ceb2;
}
.event-story {
  color: #7e745c;
}
.event-art .mono {
  color: #9d956e;
}
.game-shell {
  background: #fff8e7;
  border: 1px solid #bb9c64;
  border-radius: 16px;
  box-shadow:
    0 8px 24px #75542523,
    0 0 0 5px #eee3c8;
  overflow: hidden;
}
.game-top {
  background: #ede3c9;
  border-bottom: 1px solid #dbcdad;
  padding: 10px 14px;
}
.game-top > .eyebrow {
  color: #8d7750;
}
.dive-hud {
  padding: 10px 16px 8px;
  background: #fff7e6;
}
.dive-hud strong {
  color: #70552d;
  font-family: Georgia, serif;
  font-weight: 700;
}
.oxygen {
  color: #67734d;
}
.oxygen.urgent {
  color: #bc5138;
}
.progress-track {
  background: #e2d7bc;
  margin: 0 14px 10px;
  height: 6px;
  border-radius: 5px;
}
#progress {
  background: linear-gradient(90deg, #82975d, #c7bc63);
  border-radius: 5px;
  transition: width 0.35s ease-out;
}
.sea-frame {
  background: #6b4b2e;
  height: calc(var(--app-height, 100vh) - 374px);
  min-height: 200px;
  max-height: 600px;
}
.sea-frame canvas {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.sea-caption {
  top: 9px;
  left: 9px;
  background: #49331b9c;
  border: 1px solid #e0c59c44;
  color: #fff0cd;
  border-radius: 4px;
  padding: 3px 7px;
}
.combo-label {
  background: #f0bf50;
  color: #65421e;
  text-shadow: 0 1px #fff6;
  border: 1px solid #ffe39b;
  border-radius: 7px;
  padding: 3px 8px;
  box-shadow: 0 3px 8px #53371c30;
}
.combo-label:empty {
  display: none;
}
.game-status {
  background: #eee2c4;
  color: #8c6d37;
  border-top: 1px solid #cdb785;
}
.game-controls {
  background: #faf1db;
  padding: 10px 12px;
  gap: 10px;
}
.game-controls .button.primary {
  min-height: 48px;
  font-size: 16px;
}
.game-controls .pulse {
  background: #e9ddc1;
  color: #8c6940;
  border-color: #ceb789;
}
.game-bottom {
  background: #faf1db;
  color: #9b8358;
  padding: 0 13px 10px;
}
.keyboard-note {
  color: #9b8358;
}
.dive-aside {
  background: #f0e8d4;
  border: 1px solid #d4c5a4;
  border-radius: 13px;
  padding: 22px;
  align-self: start;
}
.aside-note {
  color: #9a865e;
  border-color: #c7b98e;
}
.tokens .token {
  background: #e8e5cc;
  color: #68724f;
}
.achievement.earned {
  background: #e9efdc;
  color: #60784e;
  border-color: #bac49c;
}
.achievement h3 {
  color: var(--ink);
}
.tab.active {
  background: #dae3c6;
  color: #46613d;
  border-color: #a7b78b;
}
.result-emblem {
  background: #e4e9cc;
  color: #7a9150;
  border-color: #b4c28c;
  box-shadow: 0 0 36px #a6ae4925;
}
.result-page h1 {
  font-family: var(--serif);
}
#toast {
  background: #49633e;
  color: #fff8e4;
  border-color: #6f8155;
  box-shadow: 0 6px 22px #4c4f3126;
}
dialog {
  background: #fff8e9;
  border: 1px solid #cdbc95;
  border-radius: 19px;
  color: #3d4e33;
  box-shadow: 0 24px 80px #33260d50;
}
dialog[open] {
  animation: dialog-arrive 0.2s ease-out;
}
dialog::backdrop {
  background: #292c2060;
  backdrop-filter: blur(5px);
}
.dialog-content {
  background: radial-gradient(ellipse at 0 0, #e6e3c433, transparent 70%);
}
.share-preview {
  background: #eee2c5;
  border-color: #d1bb8e;
}
.setting-row,
.detail-row {
  border-color: #ddd0ad;
}
@keyframes page-arrive {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes card-arrive {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes dialog-arrive {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (max-width: 850px) {
  .hero-panel {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 24px 0;
  }
  .hero-art {
    min-height: 200px;
    grid-row: 2;
    transform: rotate(0.5deg);
    width: 100%;
  }
  .hero-art canvas {
    min-height: 200px;
    width: 100%;
    height: auto;
  }
  .hero-copy h1 {
    font-size: 34px;
  }
  .hero-cta {
    max-width: none;
  }
  .dive-aside {
    display: none;
  }
}
@media (max-width: 600px) {
  #app {
    padding: 0 18px;
  }
  #topbar {
    height: 66px;
  }
  .brand {
    font-size: 17px;
    gap: 8px;
  }
  .brand > .icon {
    width: 28px;
  }
  .wallet {
    padding: 6px 9px;
  }
  .top-actions {
    gap: 3px;
  }
  #view {
    padding-bottom: 90px;
  }
  #nav {
    background: #f7f2e6f5;
    height: 68px;
    backdrop-filter: blur(12px);
  }
  .station-line {
    font-size: 9px;
    padding-top: 13px;
  }
  .station-line .mono {
    font-size: 8px;
  }
  .hero-panel {
    padding-top: 18px;
    gap: 20px;
  }
  .hero-description {
    margin: 10px 0 16px;
  }
  .hero-copy h1 {
    font-size: 31px;
  }
  .hero-art {
    border-width: 5px;
    min-height: 180px;
    border-radius: 13px;
  }
  .hero-art canvas {
    min-height: 180px;
  }
  .hero-coordinate {
    font-size: 8px;
    top: 7px;
    right: 7px;
  }
  .art-caption {
    font-size: 8px;
    padding: 4px 7px;
    left: 8px;
    right: 8px;
    bottom: 8px;
  }
  .station-stats {
    padding: 16px 14px;
    margin-top: 0;
  }
  .station-stats strong {
    font-size: 25px;
  }
  .station-stats > div {
    padding-left: 14px;
  }
  .station-stats .eyebrow {
    font-size: 9px;
  }
  .mode-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .mode-card {
    padding: 16px 12px;
    flex-wrap: wrap;
    gap: 8px;
  }
  .mode-card > div {
    flex: 1 1 80%;
  }
  .mode-card > .icon:last-child {
    display: none;
  }
  .mode-card h3 {
    font-size: 14px;
  }
  .mode-card p {
    font-size: 10px;
  }
  .mode-card .eyebrow {
    font-size: 7px;
    letter-spacing: 1px;
  }
  .field-note {
    margin-top: 18px;
  }
  .game-shell {
    box-shadow: 0 0 0 3px #e7d9b8;
  }
  .battle-view {
    padding-top: 16px !important;
    padding-bottom: 12px !important;
  }
  .dive-layout {
    padding-top: 0;
  }
  .game-top {
    padding: 8px 12px;
  }
  .dive-hud {
    padding: 7px 14px;
  }
  .game-controls {
    padding: 8px 10px;
  }
  .game-bottom {
    font-size: 9px;
  }
  .game-status {
    padding: 5px;
    font-size: 10px;
  }
  .game-top .eyebrow {
    font-size: 9px;
    letter-spacing: 1px;
  }
  .narrow-page {
    padding-top: 22px;
  }
  .crew-grid {
    gap: 12px;
  }
  .info-panel {
    padding: 15px;
  }
  .brief-title {
    margin-top: 24px;
  }
  .brief-title h1 {
    font-size: 29px;
  }
  .chart-node {
    padding: 14px 10px;
  }
}
@media (max-width: 350px) {
  #app {
    padding: 0 12px;
  }
  .brand {
    font-size: 15px;
  }
  .brand small {
    font-size: 6px;
  }
  .wallet {
    font-size: 11px;
    padding: 5px 6px;
  }
  .icon-button {
    width: 30px;
  }
  .hero-copy h1 {
    font-size: 28px;
  }
  .mode-card {
    padding: 12px 9px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
@media (max-width: 600px) {
  #nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    margin: 0;
    width: auto;
  }
}
