:root {
  color-scheme: dark;
  --ink: #e7eefc;
  --muted: #93a0bd;
  --cyan: #5ce1e6;
  --gold: #e8c66b;
  --line: rgba(255, 255, 255, 0.16);
  --long: #3d8bfd;
  --short: #d4554a;
  --neutral: #9aa3b2;
}
* { box-sizing: border-box; }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}
html, body {
  margin: 0;
  min-height: 100%;
  background: #050814;
  color: var(--ink);
  font: 15px/1.45 Inter, Segoe UI, sans-serif;
}
body {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  min-height: 100dvh;
}
header {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
  padding: calc(10px + env(safe-area-inset-top)) 16px 8px;
}
header h1 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}
header a, nav a {
  color: var(--cyan);
  text-decoration: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
#live {
  margin: 0;
  color: var(--gold);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin-left: auto;
}
#ticker {
  margin: 0;
  padding: 0 16px 12px;
  color: var(--gold);
  min-height: 2.8em;
}
main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  min-height: 0;
}
#galaxy {
  width: 100%;
  height: 100%;
  min-height: 320px;
  display: block;
  touch-action: manipulation;
  background:
    radial-gradient(circle at 50% 50%, rgba(232, 198, 107, 0.08), transparent 28%),
    #050814;
}
aside {
  border-left: 1px solid var(--line);
  padding: 8px 16px calc(88px + env(safe-area-inset-bottom));
  overflow: auto;
}
aside h2 {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 600;
}
aside section { margin-bottom: 18px; }
#bout-kicker, #bout-where, #bout-hands, #ring-hint, #pick-line, #weight, #ship-list, #log {
  margin: 0;
  color: var(--muted);
}
#bout-score {
  margin: 0 0 4px;
  font-size: 22px;
}
#ring {
  width: 100%;
  height: auto;
  margin-top: 8px;
  border-radius: 12px;
  background: #07101c;
  border: 1px solid var(--line);
  cursor: pointer;
  touch-action: manipulation;
}
#ring-hint { margin-top: 8px; }
#weather {
  margin: 8px 0 0;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}
#eyes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
#eyes button, #pick-close {
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}
#galaxy { cursor: pointer; touch-action: manipulation; }
#ship-list button {
  display: block;
  width: 100%;
  margin: 0 0 8px;
  padding: 8px 0;
  min-height: 44px;
  text-align: left;
  color: var(--ink);
  background: transparent;
  border: 0;
  font: inherit;
  cursor: pointer;
}
.bar {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 8px;
  align-items: center;
  margin: 6px 0;
  color: var(--muted);
}
.bar i {
  display: block;
  height: 8px;
  border-radius: 99px;
  background: var(--neutral);
  width: 0;
}
.bar b { font-weight: 600; color: var(--ink); }
#ship-list p, #log p { margin: 0 0 8px; }
#weight { font-size: 13px; }
@media (max-width: 800px) {
  nav { margin-left: 0; width: 100%; }
  main { grid-template-columns: 1fr; }
  #galaxy { height: 62dvh; }
  aside { border-left: 0; border-top: 1px solid var(--line); }
}
