:root {
  color-scheme: dark;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-size: 18px;
  color: #eaf3ef;
  background: #090c12;
  --mint: #a9dec8;
  --muted: #b0c1bb;
  --line: rgba(188, 218, 210, .16);
  --panel: #111a20;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-width: 280px;
  background: radial-gradient(ellipse at 75% 22%, rgba(35, 75, 74, .22), transparent 38%),
    radial-gradient(ellipse at 10% 85%, rgba(34, 45, 59, .25), transparent 38%), #090c12;
}
button, input, select { font: inherit; }
button, input, select { min-height: 48px; border-radius: 6px; }
button { cursor: pointer; border: 1px solid #6d8980; background: #14231f; color: #e7f7ee; padding: 11px 20px; font-weight: 600; transition: background .2s, border-color .2s; }
button:hover { background: #203d34; border-color: #b1e6cd; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible { outline: 2px solid #c1f9da; outline-offset: 4px; }
button.primary { background: #b4e8d0; color: #10261e; border-color: #b4e8d0; }
button.primary:hover { background: #d3f8e6; }
button.primary span { margin-left: 18px; }
button:disabled { opacity: .5; cursor: not-allowed; }
input, select { width: 100%; padding: 10px 12px; border: 1px solid #677c75; background: #10191c; color: #f0f7f3; }
label { display: block; font-size: .9rem; font-weight: 600; }
label input, label select { margin-top: 8px; }
p { line-height: 1.55; }
h1, h2, h3 { color: #f0f5f2; }
h1 { margin: 10px 0; font-size: clamp(2.7rem, 5.4vw, 5rem); font-weight: 400; letter-spacing: -.065em; line-height: 1.04; }
h1 em { color: #a4d8c4; font-style: normal; }
h2 { font-size: clamp(1.7rem, 3vw, 2.2rem); font-weight: 400; letter-spacing: -.045em; margin: 0 0 12px; }
h3 { margin: 0; font-size: 1.1rem; }
.shell { max-width: 1480px; min-height: calc(100svh - 170px); margin: auto; padding: 0 56px 80px; }
.topbar-inner { max-width: 1368px; min-height: 96px; margin: auto; display: flex; justify-content: space-between; align-items: center; gap: 16px; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 12px; font-size: .82rem; font-weight: 600; letter-spacing: -.025em; }
.brand-mark { width: 24px; height: 24px; color: var(--mint); }
.brand-light { margin-left: 9px; color: #a7b5b3; font: 10px/1.4 "Courier New", monospace; letter-spacing: .12em; }
.tag { display: flex; align-items: center; gap: 9px; font: 10px/1.4 "Courier New", monospace; letter-spacing: .14em; color: #a7b5b3; }
.tag-dot { width: 6px; height: 6px; background: #a8e7c9; border-radius: 50%; box-shadow: 0 0 12px #80dab0; }
.top-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }
.nav-button { min-height: 44px; padding: 8px 12px; font-size: .82rem; }
a.nav-button { display: inline-flex; align-items: center; border: 1px solid #6d8980; border-radius: 6px; background: #14231f; color: #e7f7ee; font-weight: 600; text-decoration: none; }
a.nav-button:hover { background: #203d34; border-color: #b1e6cd; }
.footer { max-width: 1368px; min-height: 74px; margin: auto; padding: 22px 0; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; color: #a7b5b3; font: 10px/1.4 "Courier New", monospace; letter-spacing: .14em; }
.eyebrow, .item-label { margin: 0 0 12px; font: 11px/1.5 "Courier New", monospace; letter-spacing: .15em; text-transform: uppercase; color: #a9d8c5; }
.eyebrow > span { color: #bbf4d7; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.card { background: linear-gradient(145deg, rgba(28, 43, 45, .8), rgba(15, 23, 29, .95)); border: 1px solid var(--line); border-radius: 8px; padding: 24px; }
.stack { display: grid; gap: 16px; }
.actions, .tabs { display: flex; flex-wrap: wrap; gap: 10px; }
.landing-hero { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); align-items: center; min-height: min(700px, calc(100svh - 235px)); gap: 22px; padding: 34px 0 0; }
.landing-copy { max-width: 560px; position: relative; z-index: 1; }
.landing-copy h1 { max-width: 580px; }
.landing-lede { color: #bfcec8; max-width: 420px; margin: 25px 0 30px; }
.launch-actions { gap: 12px; }
.launch-actions button { min-height: 54px; }
.prototype-note { border-left: 1px solid #658e7b; padding-left: 14px; margin: 35px 0 0; max-width: 420px; color: #b0c1bb; font-size: .78rem; }
.prototype-note strong { color: #e1eee7; }
.hero-art { position: relative; width: min(100%, 700px); justify-self: center; }
.hero-art img { display: block; width: 100%; aspect-ratio: 1; }
.field-label, .art-caption { position: absolute; color: #a6bcb3; font: 10px/1.4 "Courier New", monospace; letter-spacing: .14em; }
.field-label { top: 10%; right: 7%; }
.art-caption { bottom: 10%; right: 5%; border-left: 1px solid #7ba995; padding: 10px 0 10px 14px; }
.journey-steps { display: flex; flex-wrap: wrap; gap: 18px 42px; border-top: 1px solid var(--line); padding: 25px 0 0; color: #c4d2cc; font-size: .83rem; }
.journey-steps b { color: #9ed5bd; margin-right: 10px; font: 11px "Courier New", monospace; }
.setup { max-width: 790px; margin: 60px auto 0; padding: clamp(24px, 4vw, 42px); }
.setup h1 { font-size: clamp(2.1rem, 4vw, 3.3rem); }
.section-heading { display: flex; justify-content: space-between; align-items: start; gap: 20px; }
.section-heading h1 { margin-bottom: 0; }
.section-number { color: #9aafa6; font: 11px "Courier New", monospace; white-space: nowrap; }
.setup-intro { margin: 0 0 4px; }
.field-help { margin: -8px 0 0; }
.setup-help { border: 1px solid var(--line); padding: 14px 16px; }
.setup-help summary { cursor: pointer; color: #d7f0e2; font-weight: 600; }
.setup-help summary:focus-visible { outline: 2px solid #c1f9da; outline-offset: 4px; }
.setup-help p { margin: 12px 0 0; color: #c1d1c9; }
.rules-page { max-width: 1050px; margin: 50px auto 0; padding: clamp(24px, 4vw, 42px); }
.rules-page h1 { font-size: clamp(2.4rem, 5vw, 4rem); }
.rules-intro { max-width: 700px; color: #c1d1c9; font-size: 1.05rem; }
.rules-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-top: 30px; }
.rules-grid section { border-top: 1px solid var(--line); padding-top: 18px; }
.rules-grid h2 { font-size: 1.35rem; }
.rules-grid p { color: #c1d1c9; font-size: .9rem; }
.rules-actions { margin-top: 28px; }
.form-grid, .stats, .market-grid, .planet-grid { display: grid; gap: 16px; }
.form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.setup-actions { padding-top: 4px; }
.ship-picker { border: 0; min-width: 0; margin: 4px 0; padding: 0; }
.ship-picker legend { padding: 0; font-weight: 600; }
.ship-picker > p { margin: 8px 0 16px; }
.ship-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.ship-option { position: relative; cursor: pointer; min-width: 0; }
.ship-option input { position: absolute; width: 1px; min-height: 0; height: 1px; margin: 0; opacity: 0; }
.ship-card { position: relative; display: block; height: 100%; overflow: hidden; border: 1px solid #536a62; border-radius: 6px; background: #0c151a; transition: border-color .2s, background .2s; }
.ship-card:hover { border-color: #b1e6cd; }
.ship-option input:checked + .ship-card { border: 2px solid #a9dec8; background: #1b302a; }
.ship-option input:focus-visible + .ship-card { outline: 2px solid #c1f9da; outline-offset: 4px; }
.ship-selection { display: none; position: absolute; top: 8px; left: 8px; padding: 4px 7px; border-radius: 3px; background: #b4e8d0; color: #10261e; font-size: .68rem; }
.ship-option input:checked + .ship-card .ship-selection { display: block; }
.ship-art { display: block; aspect-ratio: 1092 / 1088; background-image: url("./art/ships.webp"); background-repeat: no-repeat; background-size: 400% 300%; background-color: #030912; }
.ship-info { display: grid; gap: 4px; padding: 10px 12px 12px; }
.ship-info strong { color: #eef9f2; font-size: .95rem; }
.ship-info > span { color: #b8c9c0; font-size: .78rem; font-weight: 400; }
.replace-confirm { padding: 22px; background: #23332f; border: 1px solid #a9dec8; border-radius: 6px; }
.replace-confirm h2 { font-size: 1.35rem; letter-spacing: -.02em; }
.replace-confirm p { color: #d3e2d9; margin: 0 0 16px; }
.replace-confirm [data-action="replace-save"] { border-color: #dba99a; color: #ffe2d8; background: #49302b; }
.replace-confirm [data-action="replace-save"]:hover { background: #624039; }
.dashboard-hero {
  min-height: 250px; margin-top: 32px; padding: 36px 42px; display: flex; align-items: center; justify-content: space-between; gap: 20px;
  border: 1px solid var(--line); border-radius: 8px; overflow: hidden;
  background: radial-gradient(ellipse at 80% 50%, rgba(68, 127, 105, .22), transparent 40%), #10191f;
  color: #c6d9d0;
}
.dashboard-hero h1 { font-size: clamp(2.2rem, 4vw, 3.7rem); }
.dashboard-hero p:last-child { margin-bottom: 0; }
.dashboard-planet { position: relative; display: grid; place-items: center; min-width: 250px; }
.dashboard-planet::before, .dashboard-planet::after { content: ""; position: absolute; width: 215px; height: 215px; border: 1px solid #9edcc133; border-radius: 50%; transform: rotate(-24deg) scaleY(.65); }
.dashboard-planet::after { width: 275px; height: 275px; transform: rotate(25deg) scaleY(.6); }
.dashboard-planet > span:last-child { position: absolute; top: 0; left: 0; color: #bcebd7; }
.planet-orb { position: relative; display: inline-block; flex: none; width: 68px; height: 68px; border-radius: 50%; background: radial-gradient(circle at 30% 23%, #f8d6b7, #a7776c 38%, #31343e 78%, #151d25); box-shadow: inset -8px -10px 12px #09121c80, 0 0 28px #d7a98525; }
.planet-orb::after { content: ""; position: absolute; width: 135%; height: 28%; border: 1px solid #d5c1a8; border-radius: 50%; left: -18%; top: 40%; transform: rotate(-24deg); opacity: .65; }
.planet-orb-1 { background: radial-gradient(circle at 30% 23%, #d2faf0, #6ea6ad 38%, #293d57 78%, #151d25); box-shadow: inset -8px -10px 12px #09121c80, 0 0 28px #85d9d52b; }
.planet-orb-2 { background: radial-gradient(circle at 30% 23%, #e0efbd, #7ea789 38%, #2d4d47 78%, #151d25); }
.planet-orb-3 { background: radial-gradient(circle at 30% 23%, #ffdec1, #bd796e 38%, #543c4c 78%, #151d25); }
.planet-orb-4 { background: radial-gradient(circle at 30% 23%, #f1e4f6, #a49bc6 38%, #41405d 78%, #151d25); }
.planet-orb-5 { background: radial-gradient(circle at 30% 23%, #ede2c6, #aea68b 38%, #484c4a 78%, #151d25); }
.dashboard-planet .planet-orb { width: 145px; height: 145px; }
.stats { grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 16px 0; }
.stat { min-width: 0; background: #101a1e; border: 1px solid var(--line); border-radius: 6px; padding: 17px 19px; }
.stat span { display: block; font-size: .78rem; color: #b0c1bb; }
.stat strong { display: block; margin-top: 6px; font-size: 1.05rem; overflow-wrap: anywhere; color: #e5f7ed; }
.ship-manifest { display: flex; align-items: center; gap: 18px; margin: 16px 0; padding: 10px 16px; background: #10191e; border: 1px solid var(--line); border-radius: 6px; }
.manifest-art { width: 120px; flex: none; overflow: hidden; border-radius: 4px; }
.ship-manifest strong, .manifest-details { display: block; }
.ship-manifest strong { font-size: 1.1rem; }
.manifest-details { color: #b0c1bb; font-size: .85rem; margin-top: 5px; }
.notice { border-left: 3px solid #91d4b1; padding: 12px 16px; background: #172a26; margin: 16px 0; color: #def2e5; }
.error { border-left-color: #f1a794; background: #352323; color: #ffdbd2; }
.tabs { margin: 25px 0 34px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.tabs button { background: transparent; border-color: #526861; }
.tabs button:hover { background: #1b312a; }
.tabs button[aria-current="page"] { background: #284b3d; border-color: #9bceb6; color: #e7fff0; }
.content-heading { display: flex; justify-content: space-between; align-items: end; gap: 15px; margin-bottom: 22px; }
.content-heading p:last-child { margin: 0; }
.heading-badge { padding: 8px 10px; border: 1px solid var(--line); color: #b9ccc2; font: 10px "Courier New", monospace; letter-spacing: .1em; white-space: nowrap; }
.market-grid, .planet-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.market-card { display: grid; align-content: start; gap: 10px; }
.market-card p { margin: 0; }
.market-title { display: flex; align-items: center; gap: 14px; margin-bottom: 4px; }
.goods-icon { width: 66px; height: 66px; display: grid; place-items: center; border: 1px solid #a9dec83b; border-radius: 50%; background: radial-gradient(circle, #315c4d, #172b28); color: #b9f4d4; }
.goods-icon svg { width: 42px; height: 40px; }
.goods-icon-1, .goods-icon-4 { background: radial-gradient(circle, #554937, #302a25); color: #f0d7a2; }
.goods-icon-2 { background: radial-gradient(circle, #443d5e, #252336); color: #dbd1f6; }
.goods-icon-3 { background: radial-gradient(circle, #2c5361, #1a3039); color: #b8e4ed; }
.goods-icon-5 { background: radial-gradient(circle, #36543f, #1e3026); color: #d2ecc0; }
.item-label { display: block; margin-bottom: 4px; font-size: 10px; }
.market-price { color: #c6d5cd; font-size: .85rem; }
.market-price strong { font-size: 1.45rem; color: #b7ead2; }
.market-price span { color: #b0c1bb; }
.holding { padding: 10px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: #b7c8bf; font-size: .85rem; }
.holding strong { color: #e5f4eb; }
.market-card .actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: end; }
.market-card .actions label { grid-column: 1 / -1; }
.market-card .actions label input { display: block; width: 100%; }
.planet-heading { display: flex; align-items: center; gap: 22px; margin-bottom: 24px; }
.current-location { color: #b9ecd3; font-size: .8rem; font-weight: 700; }
.supply { display: grid; grid-template-columns: 1fr auto; gap: 9px 12px; font-size: .88rem; }
.supply span { color: #b8c9c0; }
.supply strong { color: #e1f4e9; }
.travel-card { max-width: 680px; margin: 0 auto; padding: clamp(24px, 4vw, 40px); }
.travel-illustration { display: flex; align-items: center; justify-content: center; gap: 18px; background: radial-gradient(ellipse at center, #254a40, #101a20 70%); border: 1px solid var(--line); padding: 36px; margin-bottom: 26px; }
.travel-illustration > span:first-child { color: #c6f7df; }
.travel-line { width: 100px; border-top: 1px dashed #9bcdb5; }
.handover { max-width: 660px; margin: 70px auto; text-align: center; padding: clamp(28px, 5vw, 48px); }
.handover h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
.handover p:not(.eyebrow) { color: #c1d1c9; max-width: 450px; margin: 20px auto 28px; }
.handover-art { display: flex; align-items: center; justify-content: center; gap: 16px; margin-bottom: 24px; color: #c9f5df; }
.handover-art .planet-orb { width: 100px; height: 100px; }
@media (max-width: 1480px) { .topbar-inner, .footer { margin-left: 56px; margin-right: 56px; } }
@media (max-width: 900px) {
  .landing-hero { gap: 10px; }
  .market-grid, .planet-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .shell { padding: 0 20px 55px; }
  .topbar-inner, .footer { margin-left: 20px; margin-right: 20px; }
  .topbar-inner { min-height: 72px; }
  .tag { font-size: 9px; letter-spacing: .05em; text-align: right; }
  .landing-hero { grid-template-columns: 1fr; min-height: 0; padding: 50px 0 0; }
  .landing-copy h1 { max-width: 500px; }
  .landing-lede { margin: 18px 0 24px; }
  .hero-art { width: min(100%, 550px); margin: -5px 0 10px; }
  .prototype-note { margin-top: 25px; }
  .dashboard-hero { margin-top: 22px; min-height: 180px; padding: 26px 22px; }
  .dashboard-planet { min-width: 90px; }
  .dashboard-planet .planet-orb { width: 75px; height: 75px; }
  .dashboard-planet::before { width: 110px; height: 110px; }
  .dashboard-planet::after { width: 150px; height: 150px; }
  .dashboard-planet > span:last-child { top: -15px; left: -8px; }
  .stat { padding: 14px; }
  .content-heading { align-items: start; flex-direction: column; }
  .tabs { gap: 6px; }
  .tabs button { padding: 10px 12px; }
}
@media (max-width: 600px) {
  .brand-light { display: none; }
  .footer { flex-direction: column; }
  .form-grid, .market-grid, .planet-grid, .rules-grid { grid-template-columns: 1fr; }
  .ship-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .journey-steps { gap: 12px 22px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: 0s !important; scroll-behavior: auto !important; } }
