:root {
  --app-height: 100vh;
}
@supports (height: 100dvh) {
  :root {
    --app-height: 100dvh;
  }
}
:root {
  color-scheme: dark;
  --bg: #091827;
  --panel: #10263a;
  --panel-light: #173247;
  --ink: #e6f0ed;
  --muted: #91aab4;
  --line: #284252;
  --accent: #78dfcc;
  --orange: #ffb278;
  --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,
    #12314780,
    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: #244258;
  border-color: #4e6c77;
}
.button.primary {
  background: var(--orange);
  border-color: var(--orange);
  color: #172735;
  box-shadow: 0 4px 20px #ffac6510;
}
.button.primary:hover:not(:disabled) {
  background: #ffc499;
}
.button.outline {
  background: transparent;
  border-color: #46616b;
  color: var(--accent);
}
.button.subtle {
  background: #172c3f;
  border-color: #2c4352;
  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: #fa9f99;
}
.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 #2f4d5a;
  border-radius: 5px;
  padding: 4px 9px;
  font-size: 10px;
  color: #b6ced0;
  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 #78dfcc55;
}
.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: #9eb6bd;
  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: #9bb9bf;
}
.art-caption > span:last-child {
  margin-left: auto;
  color: #587a89;
  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, #173246, #102638);
  border: 1px solid #2b4755;
  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: #7da3ab;
}
.mode-card h3 {
  font-size: 17px;
  margin: 5px 0;
}
.mode-card p {
  font-size: 11px;
  color: var(--muted);
}
.mode-card:hover {
  border-color: #58847d;
  background: #1c394c;
}
.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: #c1d2d5;
  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: #496777;
}
/* 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%, #27516699, transparent 48%),
    linear-gradient(120deg, #163346, #0a2033);
  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 #649a9b33;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  box-shadow:
    0 0 0 25px #8bc1c608,
    0 0 0 50px #8bc1c608;
}
.depth-label {
  font-family: var(--mono);
  font-size: 45px;
  line-height: 1;
}
.depth-label small {
  display: block;
  letter-spacing: 2px;
  color: #70929e;
  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 #508278;
  background: #102b3b;
  border-radius: 8px;
  font-size: 12px;
}
.info-panel b {
  font-weight: 500;
  color: #c4dcd9;
}
.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 #34515d;
  background: #173444;
  border-radius: 5px;
  font-size: 10px;
  color: #b9d5d5;
  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: #173143;
}
.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: #1b3e4c;
  color: var(--accent);
  border: 1px solid #2e5660;
  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: #416472;
}
.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, #193747, #112638);
  padding: 23px 20px;
  gap: 18px;
  margin: 13px 0;
}
.perk-choice:hover {
  border-color: var(--accent);
  background: #1c3e4d;
}
.perk-number {
  font-family: var(--mono);
  font-size: 24px;
  font-weight: 300;
  color: #597f88;
  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 #3f6c68;
  background:
    radial-gradient(ellipse at 100% 0, #28554866, transparent 70%), #142e3d;
  border-radius: 12px;
  margin-bottom: 25px;
}
.return-ledger small {
  color: #b5d6d2;
  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, #28585288, transparent 70%);
}
.event-art > .icon {
  width: 48px;
  height: 48px;
  color: var(--accent);
}
.event-art .mono {
  font-size: 9px;
  letter-spacing: 2px;
  color: #729f9f;
}
.signal-line {
  position: absolute;
  top: 70px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, #7cdac633, transparent);
}
.event-story {
  font-size: 14px;
  line-height: 2.2;
  color: #b7cdd0;
  padding: 25px 12px;
}
.balance-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 17px 20px;
  background: #193847;
  border: 1px solid #315663;
  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: #0b2032;
  border: 1px solid #2a4d5a;
  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: #ff9d85;
}
.progress-track {
  height: 3px;
  background: #244552;
  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: #081c2e;
  height: min(55dvh, 560px);
  min-height: 260px;
  border-top: 1px solid #274755;
  border-bottom: 1px solid #274755;
}
.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: #99c4ca;
  pointer-events: none;
  background: #072237aa;
  padding: 3px 6px;
  border-radius: 4px;
}
.combo-label {
  position: absolute;
  right: 11px;
  top: 12px;
  font-size: 10px;
  color: #c9fff1;
  pointer-events: none;
}
.game-status {
  font-size: 10px;
  color: #9cb9bf;
  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: #7695a3;
  font-size: 9px;
  min-height: 33px;
}
.keyboard-note {
  border: 0;
  background: none;
  color: #638292;
  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: #92b3ba;
}
.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, #173447, #102537);
  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: #648595;
  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: #132b3d;
}
.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: #142d40;
  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: #102739;
}
.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, #ffffff08, 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: #204447;
  border-color: #3c6863;
  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 #263e4f;
  border-radius: 10px;
  background: #102537;
}
.archive-card.discovered {
  border-color: #3b6b65;
  background: #142e3d;
}
.archive-card > .mono {
  font-size: 9px;
  color: #7896a2;
}
.discovery {
  position: absolute;
  right: 15px;
  top: 17px;
  color: #567c84;
}
.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: #5e8490;
}
.discovered > small {
  color: #80b9ae;
}
.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: #102537;
}
.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: #acd0cc;
}
.catalog-item small {
  font-size: 9px;
  color: #658a97;
}
.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: #6d8f9c;
}
.achievement.earned {
  background: #173b41;
  color: var(--accent);
  border-color: #397369;
}
.achievement div {
  flex: 1;
}
.achievement h3 {
  font-size: 13px;
  color: #b5cbd0;
}
.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: #7d9da9;
  font-size: 10px;
}
.history-row strong {
  font: 18px var(--mono);
  color: var(--accent);
}
.empty-state {
  text-align: center;
  padding: 45px 15px;
  background: #102739;
  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: #102638;
  border: 1px solid var(--line);
  border-radius: 10px;
  min-width: 0;
}
.chart-node.current {
  background: #1c4148;
  border-color: var(--accent);
}
.chart-node.complete {
  border-color: #3e6967;
}
.node-dot {
  color: #7ea8b0;
  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: #6d95a0;
  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 #38796e;
  display: grid;
  place-items: center;
  border-radius: 50%;
  margin: 30px auto;
  background: radial-gradient(circle, #2b5b5355, transparent);
  box-shadow: 0 0 0 11px #73dbc708;
}
.result-emblem .icon {
  width: 33px;
  height: 33px;
  color: var(--accent);
}
.result-receipt {
  border: 1px solid #345866;
  background: #122c3d;
  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 #3b5968;
  border-radius: 18px;
  background: #12293b;
  color: var(--ink);
  padding: 0;
  width: min(94vw, 480px);
  max-height: calc(var(--app-height, 100vh) - 40px);
  overflow: auto;
  box-shadow: 0 30px 120px #0009;
}
dialog::backdrop {
  background: #030e1bc7;
  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: #ffd2c7;
  background: #643b42;
  border-color: #9a5354;
}
.danger-button:hover:not(:disabled) {
  background: #75414a;
}
.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: #a8c2ca;
  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: #143342;
  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: #0a1c2f;
}
#toast {
  position: fixed;
  z-index: 99;
  bottom: 90px;
  left: 50%;
  transform: translate(-50%, 10px);
  background: #c7f0e7;
  color: #143a3a;
  border: 1px solid #89bfb2;
  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 #0005;
}
#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: #0a1c2ff5;
    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;
  }
}
