:root {
  color-scheme: dark;
  --background: #080e18;
  --surface: #101b2bdd;
  --surface-raised: #162337;
  --border: #263449;
  --accent: #76e4df;
  --accent-blue: #75b9ee;
  --text: #e4edf8;
  --muted: #8a9db6;
  --common: #bdc9d9;
  --uncommon: #88dba5;
  --rare: #77b7ff;
  --epic: #c89af3;
  --legendary: #f0c67d;
  --radius: 14px;
  --space: 20px;
  --header-height: 88px;
  font-family: Inter, "Segoe UI", ui-sans-serif, system-ui, sans-serif;
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(ellipse at 56% 4%, #16293f66, transparent 55%),
    var(--background);
  font-size: 14px;
  line-height: 1.5;
}
button,
input,
select {
  font: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}
button,
input,
select,
a {
  -webkit-tap-highlight-color: transparent;
}
button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  border: 1px solid #91e7de66;
  border-radius: 8px;
  background: linear-gradient(135deg, #80e6df, #55bfc7);
  color: #08252d;
  padding: 10px 16px;
  font-weight: 650;
  font-size: 12px;
  transition:
    background 0.18s,
    box-shadow 0.18s,
    transform 0.18s;
}
button:hover:enabled {
  box-shadow: 0 0 22px #70dce023;
  filter: brightness(1.08);
}
button:active:enabled {
  transform: translateY(1px);
}
.icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  vertical-align: middle;
}
.icon-button {
  width: 44px;
  padding: 10px;
  background: transparent;
  color: var(--muted);
  border-color: var(--border);
}
.icon-button:hover:enabled {
  color: var(--accent);
  background: #192b3b;
}
.secondary {
  color: #bacee2;
  background: #172539;
  border-color: #30435a;
}
.text-button {
  background: transparent;
  border: 0;
  color: var(--accent);
  font-size: 11px;
  justify-content: space-between;
  width: 100%;
  padding: 14px 0 0;
  min-height: 40px;
}
.text-button .icon {
  width: 16px;
}
.danger {
  background: #422a34;
  border-color: #835060;
  color: #f0b6bb;
}
.status-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px #76e4df66;
  flex-shrink: 0;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.starfield {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(1px 1px at 13% 22%, #abc6d999, transparent),
    radial-gradient(1px 1px at 40% 64%, #abc6d988, transparent),
    radial-gradient(1px 1px at 80% 38%, #abc6d955, transparent),
    radial-gradient(1px 1px at 63% 93%, #abc6d944, transparent);
  background-size:
    290px 270px,
    410px 370px,
    560px 480px,
    380px 360px;
  opacity: 0.5;
  z-index: -1;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 46px;
  line-height: 1.15;
  font-weight: 650;
  letter-spacing: -1.8px;
}
h2 {
  font-size: 19px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.3px;
}
h3 {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
}
p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}
small {
  font-size: 10px;
  color: var(--muted);
}
.muted {
  color: var(--muted);
  font-size: 11px;
}
.eyebrow {
  font-size: 9px;
  letter-spacing: 2px;
  font-weight: 650;
  color: var(--accent);
  display: block;
}
.tier-pill {
  display: inline-flex;
  padding: 4px 8px;
  border: 1px solid #5f9fa653;
  background: #315f641f;
  color: #a9d9de;
  line-height: 1;
  letter-spacing: 1px;
  font-size: 9px;
  border-radius: 5px;
  white-space: nowrap;
}
.panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(140deg, #152237e6, #0e1929e6);
  padding: 24px;
}
.topbar {
  height: var(--header-height);
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 0 30px;
  background: #0a121fef;
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(16px);
}
.top-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 220px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 750;
  font-size: 18px;
  letter-spacing: 2px;
  white-space: nowrap;
}
.brand-accent {
  color: var(--accent);
  font-weight: 500;
  letter-spacing: 2px;
}
.brand-symbol {
  color: var(--accent);
}
.brand-symbol .icon {
  width: 30px;
  height: 30px;
}
.brand small {
  display: block;
  letter-spacing: 2px;
  font-size: 8px;
  margin-top: 3px;
  color: #6a86a0;
}
.top-xp {
  display: flex;
  gap: 24px;
  max-width: 490px;
  flex: 1;
}
.xp-block {
  min-width: 0;
}
.top-xp .xp-block {
  flex: 1;
  max-width: 190px;
}
.xp-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 11px;
  color: #9eb1c8;
}
.xp-label b {
  font-size: 10px;
  color: var(--accent);
  font-weight: 600;
}
progress {
  appearance: none;
  display: block;
  border: 0;
  border-radius: 8px;
  background: #23344b;
  overflow: hidden;
  width: 100%;
  height: 4px;
  margin: 8px 0 5px;
}
progress::-webkit-progress-bar {
  background: #23344b;
}
progress::-webkit-progress-value {
  background: linear-gradient(90deg, #408baf, var(--accent));
  transition: width 0.12s linear;
}
progress::-moz-progress-bar {
  background: var(--accent);
}
.top-xp small {
  font-size: 8px;
  color: #607d99;
}
.top-tools {
  display: flex;
  align-items: center;
  gap: 25px;
}
.wallet {
  text-align: right;
  min-width: 80px;
}
.wallet > span {
  display: block;
  font-size: 8px;
  letter-spacing: 2px;
  color: #8c9db6;
}
.wallet strong {
  color: #eac991;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.5px;
}
.mobile-menu {
  display: none;
}
.app-shell {
  max-width: 1800px;
  margin: auto;
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr) 288px;
  gap: 26px;
  padding: 0 26px 0 0;
}
.sidebar {
  border-right: 1px solid var(--border);
  padding: 30px 18px;
  position: sticky;
  top: var(--header-height);
  height: calc(100dvh - var(--header-height));
  display: flex;
  flex-direction: column;
  background: #0b1320a0;
  min-width: 0;
}
.sidebar-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 8px;
  color: #667f9a;
  letter-spacing: 1.5px;
  margin: 5px 10px 16px;
}
.sidebar-label span {
  font-size: 8px;
  letter-spacing: 0;
  color: #465c73;
}
.planet-nav {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 10px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text);
  text-align: left;
  justify-content: flex-start;
  padding: 13px 10px;
  margin-bottom: 9px;
  min-height: 67px;
  box-shadow: none !important;
}
.planet-nav > span:nth-child(2) {
  flex: 1;
}
.planet-nav strong {
  display: block;
  font-size: 12px;
  font-weight: 600;
}
.planet-nav small {
  display: block;
  font-size: 9px;
  margin-top: 4px;
}
.planet-nav.active {
  border-color: #427282;
  background: linear-gradient(100deg, #17354588, #14253555);
}
.planet-nav.locked {
  opacity: 0.45;
  border-color: #25334750;
  background: #101a2870;
}
.planet-nav.locked .icon {
  width: 13px;
}
.mini-planet {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  flex-shrink: 0;
  background: radial-gradient(
    circle at 28% 25%,
    #8cd2c9,
    #3f7a90 45%,
    #142d41 74%,
    #080f1d
  );
  box-shadow:
    0 0 15px #4b999722,
    inset -3px -2px 6px #0008;
}
.ice {
  background: radial-gradient(
    circle at 25% 25%,
    #a7c2df,
    #54769b 45%,
    #192e4b 75%
  );
}
.lava {
  background: radial-gradient(
    circle at 25% 25%,
    #d1a087,
    #9e6155 45%,
    #371f31 75%
  );
}
.sidebar-divider {
  height: 1px;
  background: var(--border);
  margin: 18px 10px 24px;
}
.desktop-navigation {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.nav-button {
  display: flex;
  justify-content: flex-start;
  gap: 13px;
  width: 100%;
  padding: 12px;
  border: 1px solid transparent;
  background: transparent;
  color: #859bb5;
  font-size: 12px;
  font-weight: 500;
  text-align: left;
  min-height: 45px;
  box-shadow: none !important;
}
.nav-button .icon {
  width: 18px;
}
.nav-button.active {
  background: #19344370;
  color: var(--accent);
  border-color: #2b505e50;
}
.nav-button:hover:enabled {
  background: #17273a;
  color: #d3e6f4;
}
.nav-badge {
  margin-left: auto;
  font-size: 8px;
  color: #8cb0b9;
  background: #23394466;
  border-radius: 3px;
  padding: 2px 5px;
}
.sidebar-bottom {
  margin: auto 10px 0;
  padding-top: 30px;
}
.sidebar-bottom > div {
  color: #66939a;
  letter-spacing: 1.2px;
  font-size: 8px;
  display: flex;
  gap: 6px;
  align-items: center;
}
.sidebar-bottom p {
  color: #71879f;
  margin-top: 17px;
  font-size: 13px;
  line-height: 1.8;
}
.sidebar-bottom > span {
  font-size: 7px;
  letter-spacing: 1px;
  color: #43596e;
  display: block;
  margin-top: 18px;
}
.drawer-title,
.drawer-settings {
  display: none;
}
.main-content {
  min-width: 0;
  padding: 28px 0 20px;
}
.breadcrumb {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 8px;
  color: #6d859f;
  letter-spacing: 1.5px;
  margin-bottom: 20px;
}
.connection {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #688f96;
  letter-spacing: 1px;
  font-size: 7px;
}
.planet-hero {
  display: flex;
  position: relative;
  align-items: center;
  justify-content: space-between;
  height: 300px;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 85% 25%, #214a6155, transparent 65%),
    linear-gradient(130deg, #132339, #101b2b);
  padding: 32px;
}
.planet-copy {
  position: relative;
  z-index: 2;
}
.planet-copy .eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
}
.planet-copy h1 {
  margin-top: 21px;
  font-size: 52px;
  letter-spacing: -2px;
}
.planet-copy p {
  margin-top: 15px;
  font-size: 12px;
  line-height: 1.8;
  color: #94a9c1;
}
.planet-tags {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 23px;
  flex-wrap: wrap;
}
.planet-tags span {
  font-size: 8px;
  color: #a7bfca;
  border-radius: 5px;
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 5px 8px;
  border: 1px solid #46606c50;
  background: #0b202866;
}
.planet-coordinates {
  font-family: ui-monospace, monospace;
  letter-spacing: 1px;
  font-size: 7px;
  color: #526f87;
  margin-top: 23px;
}
.planet-coordinates span {
  margin-left: 20px;
  color: #3f596e;
}
.planet-scene {
  position: absolute;
  right: 0;
  top: 0;
  width: 48%;
  height: 100%;
  display: grid;
  place-items: center;
}
.hero-planet {
  position: relative;
  width: 196px;
  height: 196px;
  border-radius: 50%;
  background: radial-gradient(
    ellipse at 22% 20%,
    #addcc9 0,
    #6ba4a6 18%,
    #396b86 42%,
    #203d56 62%,
    #090f1f 84%
  );
  box-shadow:
    inset -24px -18px 28px #020813cc,
    0 0 50px #5db7c11a,
    inset 2px 2px 8px #c4dcd044;
  transform: rotate(-18deg);
  z-index: 1;
}
.hero-planet:before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(ellipse at 25% 29%, #53745f99 0 12%, transparent 15%),
    radial-gradient(ellipse at 35% 45%, #57827090 0 16%, transparent 18%),
    radial-gradient(ellipse at 63% 65%, #46747580 0 12%, transparent 15%),
    repeating-linear-gradient(
      14deg,
      transparent 0 15px,
      #b5d2ba15 18px 24px,
      transparent 28px 37px
    );
  box-shadow: inset -20px -10px 45px #030b1cc0;
}
.planet-orbit {
  position: absolute;
  border: 1px solid #70aeb32b;
  border-radius: 50%;
  width: 290px;
  height: 118px;
  transform: rotate(-28deg);
}
.orbit-two {
  width: 250px;
  height: 250px;
  border-color: #71a6b018;
  transform: none;
}
.orbit-two:after {
  content: "";
  position: absolute;
  left: 20px;
  top: 40px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #79c9cd;
  box-shadow: 0 0 8px #84e9e7;
}
.planet-crosshair {
  position: absolute;
  width: 290px;
  height: 1px;
  border-top: 1px dashed #63899020;
  transform: rotate(30deg);
}
.planet-marker {
  position: absolute;
  bottom: 27px;
  right: 30px;
  letter-spacing: 4px;
  color: #557889;
  font-size: 7px;
}
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}
.section-heading h2 {
  margin-top: 5px;
}
.section-note {
  font-size: 9px;
  color: #6e859e;
  white-space: nowrap;
}
.planet-hero + .section-heading {
  margin: 28px 0 18px;
}
.resource-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.resource-card {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 16px;
  background: linear-gradient(130deg, #132239dc, #0d192bdc);
  min-width: 0;
  transition:
    border-color 0.25s,
    box-shadow 0.25s;
}
.resource-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 7px;
  margin-bottom: 15px;
}
.material-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border: 1px solid #758dad30;
  background: #829ec014;
  border-radius: 10px;
  color: #b7cadb;
}
.material-icon .icon {
  width: 24px;
  height: 24px;
}
.material-icon.copper {
  color: #d8b296;
  background: #9a603a1f;
  border-color: #a97e5540;
}
.material-icon.uranium {
  color: #b1d98c;
  background: #718d3b1c;
  border-color: #9aab5740;
}
.resource-status {
  font-size: 6px;
  letter-spacing: 1px;
  color: #536e87;
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}
.resource-card.is-mining {
  border-color: #4e8c9d;
  background: linear-gradient(145deg, #183644c0, #102337c0);
  box-shadow: 0 0 25px #61d6dd0b;
}
.is-mining .resource-status {
  color: var(--accent);
}
.is-mining .status-dot {
  animation: soft-pulse 3s ease-in-out infinite;
}
.resource-card h3 {
  font-size: 16px;
  letter-spacing: -0.4px;
}
.resource-card > p {
  font-size: 10px;
  min-height: 36px;
  margin-top: 6px;
  line-height: 1.6;
  color: #7e94ac;
}
.resource-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 16px 0;
  padding: 12px 0;
  border-top: 1px solid #2d405850;
  border-bottom: 1px solid #2d405850;
}
.resource-stats > span {
  font-size: 8px;
  color: #738ca6;
}
.resource-stats b {
  display: block;
  margin-top: 3px;
  font-weight: 550;
  font-size: 16px;
  color: #c8d7e9;
}
.resource-stats small {
  font-weight: 400;
  font-size: 9px;
}
.resource-card .xp-label {
  font-size: 9px;
}
.resource-card .xp-label b {
  font-size: 8px;
}
.resource-card .xp-block small {
  font-size: 8px;
}
.resource-card > button {
  margin-top: 17px;
  width: 100%;
  font-size: 11px;
  min-height: 41px;
  padding: 9px;
}
.resource-card > button .icon {
  width: 15px;
}
.resource-card > button:disabled {
  opacity: 1;
  border-color: #37748566;
  color: #a1d7dd;
  background: #25485844;
}
.activity-panel {
  margin-top: 22px;
  background: linear-gradient(120deg, #1632436b, #142136dc);
  border-color: #315361;
  padding: 22px 24px;
}
.activity-header {
  display: flex;
  align-items: center;
  gap: 13px;
}
.activity-header .eyebrow {
  font-size: 8px;
}
.activity-header h2 {
  font-size: 18px;
  margin-top: 4px;
}
.activity-icon {
  display: grid;
  place-items: center;
  border-radius: 9px;
  border: 1px solid #58859144;
  background: #3a829216;
  color: var(--accent);
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}
.live-badge {
  margin-left: auto;
  padding: 4px 7px;
  border: 1px solid #35485c;
  color: #70859f;
  font-size: 7px;
  letter-spacing: 1px;
  border-radius: 4px;
}
.live-badge.running {
  border-color: #599c9344;
  color: var(--accent);
  background: #52b6a512;
}
.activity-progress-row {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 22px;
}
.activity-progress-row progress {
  height: 7px;
  margin: 0;
}
.activity-progress-row > span {
  white-space: nowrap;
  width: 64px;
  text-align: right;
  color: #b8dce3;
  font-family: ui-monospace, monospace;
  font-size: 13px;
}
.activity-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-top: 13px;
}
.activity-bottom p {
  font-size: 10px;
}
.activity-bottom button {
  font-size: 10px;
  min-height: 36px;
  padding: 7px 12px;
}
.activity-bottom .icon {
  width: 13px;
}
.activity-rewards {
  display: flex;
  gap: 8px 16px;
  flex-wrap: wrap;
  border-top: 1px solid #34556950;
  padding-top: 14px;
  margin-top: 17px;
  font-size: 9px;
  color: #7fadb9;
}
.activity-rewards span:before {
  content: "";
  display: inline-block;
  width: 3px;
  height: 3px;
  background: #5da9b2;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}
.guide-panel {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 16px;
  padding: 19px 22px;
  border-color: #42534477;
  background: #16312733;
}
.guide-icon {
  display: grid;
  place-items: center;
  border: 1px solid #51644f55;
  border-radius: 50%;
  color: #a7c59b;
  width: 33px;
  height: 33px;
  flex-shrink: 0;
}
.guide-icon .icon {
  width: 16px;
}
.guide-panel .eyebrow {
  color: #90b294;
  font-size: 7px;
  letter-spacing: 1.4px;
}
.guide-panel h2 {
  font-size: 14px;
  margin-top: 3px;
}
.guide-panel p {
  font-size: 10px;
  margin-top: 4px;
  line-height: 1.7;
}
.guide-panel > div {
  flex: 1;
}
.guide-panel .icon-button {
  background: transparent;
  border-color: #41544955;
  color: #a5cbb2;
  width: 33px;
  min-height: 33px;
  padding: 7px;
}
.guide-panel .icon-button .icon {
  width: 14px;
}
.main-footer {
  font-size: 7px;
  letter-spacing: 0.6px;
  color: #536e85;
  display: flex;
  justify-content: space-between;
  gap: 15px;
  margin-top: 22px;
  padding: 8px 0 10px;
}
.main-footer i {
  font-style: normal;
  margin: 0 6px;
}
.right-panel {
  position: sticky;
  top: var(--header-height);
  height: calc(100dvh - var(--header-height));
  overflow-y: auto;
  padding: 28px 0 20px;
  scrollbar-width: thin;
  scrollbar-color: #263c51 transparent;
}
.right-panel .panel {
  padding: 20px;
  margin-bottom: 17px;
  background: linear-gradient(120deg, #132035d9, #0d1828d9);
}
.right-panel h2 {
  font-size: 13px;
}
.right-panel .section-heading {
  margin-bottom: 18px;
}
.right-panel .section-heading > span {
  font-size: 8px;
  color: #738aa3;
}
.quick-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 0;
  border-bottom: 1px solid #2a3b4f66;
}
.quick-item-icon {
  color: var(--quality, var(--common));
  background: color-mix(in srgb, var(--quality, var(--common)) 8%, transparent);
  border: 1px solid
    color-mix(in srgb, var(--quality, var(--common)) 20%, transparent);
  display: grid;
  place-items: center;
  border-radius: 7px;
  width: 31px;
  height: 31px;
  flex-shrink: 0;
}
.quick-item .icon {
  width: 16px;
}
.quick-item > div {
  min-width: 0;
  flex: 1;
}
.quick-item strong {
  display: block;
  font-size: 10px;
  font-weight: 500;
  color: var(--quality, var(--common));
}
.quick-item small {
  font-size: 8px;
  color: var(--quality, var(--muted));
  opacity: 0.75;
}
.quick-item > b {
  font-size: 12px;
  color: #c3d5e4;
  font-weight: 550;
}
.empty-quick {
  font-size: 10px;
  color: #637e96;
  line-height: 1.9;
  padding: 16px 0;
}
.quick-ship .eyebrow {
  font-size: 7px;
  color: #6c8a9c;
  margin-bottom: 15px;
}
#quick-laser,
.ship-equipped {
  display: flex;
  gap: 10px;
  align-items: center;
}
#quick-laser .material-icon {
  width: 34px;
  height: 34px;
}
#quick-laser .material-icon .icon {
  width: 19px;
}
#quick-laser strong {
  display: block;
  font-size: 10px;
  font-weight: 500;
}
#quick-laser small {
  font-size: 8px;
  display: block;
  margin-top: 3px;
}
.feed-dot {
  width: 4px;
  height: 4px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 8px #79e7d866;
}
.afk-note {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-top: 25px;
  padding: 15px;
  opacity: 0.75;
}
.afk-note > .icon,
.afk-note > span {
  color: #638a9d;
  margin-bottom: 12px;
}
.afk-note p {
  font-size: 11px;
  color: #6f8ba3;
}
.afk-note strong {
  color: #9ab5c6;
  font-weight: 500;
}
.afk-note small {
  font-size: 8px;
  margin-top: 11px;
  color: #546e88;
}
.page-heading {
  padding: 14px 0 28px;
}
.page-heading h1 {
  font-size: 36px;
  letter-spacing: -1.2px;
  margin: 14px 0;
}
.page-heading p {
  font-size: 12px;
}
.tab-row {
  display: flex;
  gap: 6px;
  padding: 5px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #0d1826;
  margin-bottom: 20px;
  max-width: 420px;
}
.tab {
  flex: 1;
  color: #849bb6;
  background: transparent;
  border-color: transparent;
  font-size: 12px;
}
.tab.active {
  background: #1b3a48;
  color: var(--accent);
  border-color: #3e6b7566;
}
.processing-intro {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 18px;
}
.processing-intro h2 {
  font-size: 17px;
}
.processing-intro p {
  font-size: 11px;
  margin-top: 6px;
}
.quality-select {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 9px;
  color: var(--muted);
  min-width: 130px;
}
select {
  padding: 10px 12px;
  min-height: 44px;
  color: var(--text);
  background: #0a1624;
  border: 1px solid #355068;
  border-radius: 7px;
  width: 100%;
  font-size: 12px;
}
.processing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.recipe-card {
  border: 1px solid
    color-mix(in srgb, var(--quality, var(--border)) 25%, var(--border));
  background: var(--surface);
  border-radius: 12px;
  padding: 18px;
  min-width: 0;
}
.recipe-card.is-processing {
  border-color: var(--accent);
  box-shadow: 0 0 15px #76e4df10;
}
.recipe-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 5px;
  margin-bottom: 16px;
}
.recipe-card h3 {
  color: var(--quality, var(--text));
  font-size: 14px;
}
.conversion {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  margin-top: 18px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
  font-size: 10px;
  color: #809cb4;
}
.conversion .icon {
  width: 15px;
  height: 15px;
  color: #568999;
  transform: rotate(90deg);
}
.conversion strong {
  color: #bacddd;
  font-weight: 500;
}
.recipe-meta {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 9px;
  margin: 18px 0;
  color: #7c94ad;
}
.recipe-card button {
  width: 100%;
  font-size: 10px;
}
.recipe-card button .icon {
  width: 15px;
}
.quality {
  display: inline-flex;
  align-items: center;
  border: 1px solid
    color-mix(in srgb, var(--quality, var(--common)) 35%, transparent);
  background: color-mix(in srgb, var(--quality, var(--common)) 7%, transparent);
  border-radius: 4px;
  padding: 3px 6px;
  font-size: 8px;
  line-height: 1.4;
  color: var(--quality, var(--common));
  width: fit-content;
}
.Common {
  --quality: var(--common);
  color: var(--common);
}
.Uncommon {
  --quality: var(--uncommon);
  color: var(--uncommon);
}
.Rare {
  --quality: var(--rare);
  color: var(--rare);
}
.Epic {
  --quality: var(--epic);
  color: var(--epic);
}
.Legendary {
  --quality: var(--legendary);
  color: var(--legendary);
}
.available {
  color: var(--uncommon);
}
.missing {
  color: #ba8e95;
}
.laser-comparison {
  display: grid;
  grid-template-columns: 1fr 40px 1fr;
  align-items: center;
  gap: 16px;
  margin: 24px 0;
}
.laser-card {
  border: 1px solid color-mix(in srgb, var(--quality) 33%, transparent);
  background: color-mix(in srgb, var(--quality) 5%, transparent);
  border-radius: 12px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.laser-card .material-icon {
  width: 64px;
  height: 64px;
  border-color: color-mix(in srgb, var(--quality) 30%, transparent);
  color: var(--quality);
  background: color-mix(in srgb, var(--quality) 7%, transparent);
  margin-bottom: 17px;
}
.laser-card .material-icon .icon {
  width: 35px;
  height: 35px;
}
.laser-card > small {
  font-size: 7px;
  letter-spacing: 1.2px;
  color: var(--quality);
  opacity: 0.7;
}
.laser-card h3 {
  margin-top: 9px;
  font-size: 19px;
  color: var(--quality);
}
.laser-card p {
  font-size: 10px;
  margin-top: 3px;
}
.laser-card strong {
  font-size: 21px;
  font-weight: 500;
  color: var(--quality);
  margin-top: 16px;
}
.laser-card strong small {
  font-size: 9px;
  color: var(--quality);
}
.upgrade-arrow {
  text-align: center;
  color: #5b8d9b;
}
.ingredients {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 18px;
}
.ingredient {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid #3e53664d;
  background: #0d1c2c;
  border-radius: 7px;
  font-size: 11px;
}
.ingredient .icon {
  width: 17px;
}
.ingredient strong {
  margin-left: auto;
  white-space: nowrap;
  font-size: 10px;
}
.upgrade-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.upgrade-footer p {
  font-size: 11px;
  color: #8facb7;
}
.inventory-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.filter-row {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}
.filter {
  min-height: 40px;
  background: #101f30;
  color: #8b9eb6;
  border-color: var(--border);
  font-size: 11px;
  padding: 8px 13px;
  font-weight: 500;
}
.filter.active {
  background: #21414b55;
  border-color: #487888;
  color: var(--accent);
}
.inventory-toolbar > .secondary {
  font-size: 11px;
  min-height: 40px;
}
.inventory-toolbar .icon {
  width: 16px;
}
.inventory-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.item-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  border: 1px solid
    color-mix(in srgb, var(--quality, var(--common)) 25%, var(--border));
  border-radius: 11px;
  background: linear-gradient(
    140deg,
    color-mix(in srgb, var(--quality, var(--common)) 6%, #101b2b),
    #101b2b
  );
  padding: 18px;
  min-width: 0;
  box-shadow: 0 0 17px
    color-mix(in srgb, var(--quality, var(--common)) 3%, transparent);
}
.item-card .material-icon {
  color: var(--quality);
  border-color: color-mix(in srgb, var(--quality) 25%, transparent);
  background: color-mix(in srgb, var(--quality) 7%, transparent);
}
.item-card h3 {
  font-size: 12px;
  margin-top: 8px;
  color: var(--quality);
}
.item-count {
  font-size: 22px;
  font-weight: 500;
  margin-top: auto;
  color: #d3e2ee;
}
.item-count small {
  font-size: 10px;
}
.empty-state {
  grid-column: 1/-1;
  padding: 65px 20px;
  border: 1px dashed #30465b;
  border-radius: 12px;
  text-align: center;
  color: #6c8aa2;
  background: #0e1a2999;
}
.empty-state > .icon,
.empty-state > span > .icon {
  width: 36px;
  height: 36px;
  color: #587b94;
  margin-bottom: 18px;
}
.empty-state h3 {
  color: #a4b6cc;
  font-size: 16px;
}
.empty-state p {
  font-size: 12px;
  margin: 10px 0;
}
.empty-state button {
  margin-top: 16px;
}
.trader-banner {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 20px;
}
.trader-avatar {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  background: #61809a1c;
  border: 1px solid #55728b55;
  border-radius: 12px;
  color: #94b5c9;
  flex-shrink: 0;
}
.trader-avatar .icon {
  width: 26px;
  height: 26px;
}
.trader-banner h2 {
  font-size: 17px;
}
.trader-banner p {
  font-size: 10px;
  margin-top: 6px;
}
.open-badge {
  font-size: 7px;
  letter-spacing: 1px;
  color: #8fcbb4;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  margin-left: auto;
}
.trader-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.trader-card {
  display: grid;
  grid-template-columns: 1.2fr 0.7fr 1fr;
  align-items: center;
  gap: 20px;
  padding: 20px;
  border: 1px solid color-mix(in srgb, var(--quality) 18%, var(--border));
  background: var(--surface);
  border-radius: 12px;
}
.trader-item {
  display: flex;
  gap: 11px;
  align-items: center;
}
.trader-item .material-icon {
  color: var(--quality);
  width: 40px;
  height: 40px;
}
.trader-item h3 {
  font-size: 12px;
  margin-top: 6px;
  color: var(--quality);
}
.trader-item small {
  font-size: 9px;
  display: block;
  margin-top: 4px;
}
.trader-price > small {
  font-size: 6px;
  letter-spacing: 0.5px;
}
.trader-price strong {
  display: block;
  font-size: 20px;
  line-height: 1.6;
  font-weight: 500;
  color: #e6c78d;
}
.trader-price strong span {
  font-size: 13px;
}
.demand {
  display: block;
  font-size: 8px;
  color: #8aabb2;
}
.sell-controls label {
  font-size: 8px;
  display: block;
  margin-bottom: 5px;
  color: #7d9eb4;
}
.sell-controls > div {
  display: flex;
  gap: 5px;
}
.sell-controls input {
  width: 55px;
  min-width: 0;
  flex: 1;
  min-height: 40px;
  padding: 8px;
  color: #d2e1ee;
  border: 1px solid #37556b;
  border-radius: 6px;
  background: #0c1725;
  font-size: 12px;
}
.sell-controls button {
  padding: 8px 10px;
  font-size: 9px;
  min-height: 40px;
}
.sell-controls > small {
  font-size: 8px;
  display: block;
  margin-top: 6px;
}
.sell-controls input[aria-invalid="true"] {
  border-color: #b56976;
}
.coming-soon {
  text-align: center;
  padding: 60px 25px 45px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.coming-orbit {
  display: grid;
  place-items: center;
  width: 115px;
  height: 115px;
  border: 1px dashed #496e8055;
  border-radius: 50%;
  background: radial-gradient(circle, #1e4a5b33, transparent);
  margin-bottom: 30px;
}
.coming-orbit .icon {
  width: 45px;
  height: 45px;
  color: #7da9bf;
}
.coming-soon .eyebrow {
  font-size: 8px;
  color: #607f97;
}
.coming-soon h2 {
  font-size: 25px;
  margin-top: 15px;
}
.coming-soon p {
  font-size: 12px;
  margin: 15px 0 25px;
}
.coming-soon .icon {
  width: 17px;
}
.locked-caption {
  margin-top: 28px;
  color: #577187;
}
.ship-panel {
  padding-bottom: 25px;
}
.ship-blueprint {
  display: block;
  max-width: 570px;
  width: 100%;
  margin: 10px auto 15px;
}
.ship-equipped {
  border: 1px solid #4b675555;
  background: #37594017;
  border-radius: 9px;
  padding: 18px;
}
.ship-equipped strong {
  display: block;
  font-size: 13px;
  font-weight: 500;
}
.ship-equipped small {
  display: block;
  font-size: 10px;
  margin-top: 4px;
}
.equipped-badge {
  margin-left: auto;
  font-size: 7px;
  letter-spacing: 0.8px;
  color: #7bb293;
}
.ship-slots {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 15px 0 18px;
}
.locked-slot {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 6px;
  padding: 16px 8px;
  border: 1px dashed #38495c80;
  border-radius: 8px;
  background: #0b172766;
  color: #60748c;
}
.locked-slot > .icon {
  width: 15px;
  height: 15px;
  color: #50637b;
}
.locked-slot span {
  font-size: 11px;
}
.locked-slot small {
  font-size: 6px;
  letter-spacing: 0.6px;
  color: #4a6078;
}
.bottom-navigation {
  display: none;
}
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: #020712b3;
  backdrop-filter: blur(3px);
  z-index: 49;
}
.drop-toast {
  position: fixed;
  right: 30px;
  bottom: 25px;
  z-index: 70;
  border: 1px solid color-mix(in srgb, var(--quality) 55%, transparent);
  background: #122134f5;
  border-radius: 10px;
  padding: 17px 24px;
  color: var(--quality);
  box-shadow: 0 0 30px color-mix(in srgb, var(--quality) 12%, transparent);
  font-size: 13px;
  animation: drop-enter 0.3s ease-out;
  max-width: calc(100vw - 40px);
  pointer-events: none;
}
.settings-dialog {
  width: 460px;
  max-width: calc(100vw - 30px);
  max-height: calc(100dvh - 45px);
  overflow-y: auto;
  border: 1px solid #3c5368;
  border-radius: 16px;
  background: linear-gradient(135deg, #18273c, #0e192a);
  color: var(--text);
  padding: 25px;
  box-shadow: 0 30px 90px #0006;
}
.settings-dialog::backdrop {
  background: #030813b3;
  backdrop-filter: blur(5px);
}
.settings-dialog > .section-heading {
  margin-bottom: 25px;
}
.settings-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 16px;
}
.settings-option strong {
  display: block;
  font-size: 13px;
  font-weight: 500;
}
.settings-option small {
  display: block;
  font-size: 10px;
  margin-top: 5px;
}
.settings-option input {
  width: 20px;
  height: 20px;
  accent-color: var(--accent);
}
.settings-info {
  margin: 25px 0;
}
.settings-info h3,
.reset-section h3 {
  font-size: 13px;
}
.settings-info p,
.reset-section p {
  font-size: 11px;
  margin-top: 8px;
}
.reset-section {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  margin-bottom: 25px;
}
.reset-section button {
  margin-top: 15px;
  font-size: 11px;
}
.settings-dialog > small {
  font-size: 8px;
  color: #526f88;
  letter-spacing: 1px;
}
.drawer-visible {
  overflow: hidden;
}
[hidden] {
  display: none !important;
}
@keyframes soft-pulse {
  50% {
    opacity: 0.45;
  }
}
@keyframes drop-enter {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (min-width: 1600px) {
  .app-shell {
    grid-template-columns: 250px minmax(0, 1fr) 310px;
    gap: 30px;
  }
  .planet-hero {
    height: 340px;
  }
  .hero-planet {
    width: 235px;
    height: 235px;
  }
  .orbit-one {
    width: 350px;
    height: 145px;
  }
  .orbit-two {
    width: 295px;
    height: 295px;
  }
  .resource-card {
    padding: 24px;
  }
  .resource-card > p {
    min-height: 20px;
  }
  .resource-status {
    font-size: 8px;
  }
  .planet-copy h1 {
    font-size: 62px;
  }
}
@media (min-width: 1101px) and (max-width: 1300px) {
  .app-shell {
    grid-template-columns: 202px minmax(0, 1fr) 244px;
    gap: 18px;
    padding-right: 18px;
  }
  .sidebar {
    padding: 25px 12px;
  }
  .planet-hero {
    padding: 24px;
    height: 275px;
  }
  .planet-copy h1 {
    font-size: 44px;
  }
  .planet-scene {
    right: -20px;
    width: 43%;
  }
  .hero-planet {
    width: 153px;
    height: 153px;
  }
  .orbit-one {
    width: 235px;
    height: 110px;
  }
  .orbit-two {
    width: 205px;
    height: 205px;
  }
  .planet-coordinates span {
    display: none;
  }
  .planet-tags {
    gap: 6px;
  }
  .resource-grid,
  .processing-grid {
    gap: 9px;
  }
  .resource-card,
  .recipe-card {
    padding: 14px 12px;
  }
  .resource-card h3 {
    font-size: 14px;
  }
  .resource-status {
    font-size: 5px;
    letter-spacing: 0.6px;
  }
  .resource-heading .material-icon {
    width: 32px;
    height: 32px;
  }
  .top-xp {
    gap: 20px;
  }
  .right-panel .panel {
    padding: 16px;
  }
  .trader-card {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }
  .sell-controls {
    grid-column: 1/-1;
  }
  .sell-controls > div {
    max-width: 300px;
  }
  .resource-card > p {
    min-height: 34px;
  }
}
@media (max-width: 1100px) {
  :root {
    --header-height: 80px;
  }
  .topbar {
    padding: 0 24px;
    gap: 20px;
  }
  .top-brand {
    min-width: 190px;
  }
  .brand {
    font-size: 16px;
  }
  .brand small {
    font-size: 7px;
  }
  .mobile-menu {
    display: inline-flex;
  }
  .top-xp {
    gap: 16px;
    max-width: 350px;
  }
  .top-tools {
    gap: 15px;
  }
  .app-shell {
    display: block;
    padding: 0 28px;
    max-width: 920px;
  }
  .main-content {
    padding-top: 24px;
    padding-bottom: 85px;
  }
  .right-panel {
    display: none;
  }
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 50;
    width: 280px;
    height: 100dvh;
    padding: 25px 18px;
    background: #0b1525fa;
    backdrop-filter: blur(16px);
    transform: translateX(-100%);
    visibility: hidden;
    transition:
      transform 0.25s ease,
      visibility 0.25s;
  }
  .sidebar.drawer-open {
    transform: translateX(0);
    visibility: visible;
  }
  .drawer-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
  }
  .drawer-title .eyebrow {
    color: #6b97a6;
    font-size: 9px;
  }
  .drawer-title .icon-button {
    border: 0;
  }
  .drawer-settings {
    display: flex;
  }
  .drawer-visible .topbar {
    z-index: 30;
  }
  .planet-hero {
    height: 300px;
  }
  .hero-planet {
    width: 210px;
    height: 210px;
  }
  .planet-copy h1 {
    font-size: 50px;
  }
  .resource-grid {
    gap: 16px;
  }
  .resource-card {
    padding: 22px;
  }
  .resource-status {
    font-size: 7px;
  }
  .bottom-navigation {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 35;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 3px;
    padding: 8px max(18px, env(safe-area-inset-left))
      calc(8px + env(safe-area-inset-bottom));
    background: #0b1625f5;
    border-top: 1px solid #2e4257;
    backdrop-filter: blur(16px);
  }
  .bottom-navigation .nav-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 50px;
    border-radius: 8px;
    padding: 6px;
    color: #7e96b1;
    font-size: 9px;
    text-align: center;
  }
  .bottom-navigation .nav-button.active {
    color: var(--accent);
    background: #21495740;
    border-color: transparent;
  }
  .bottom-navigation .nav-button .icon {
    width: 20px;
    height: 20px;
  }
  .drop-toast {
    bottom: calc(95px + env(safe-area-inset-bottom));
    right: 20px;
  }
  .main-footer {
    font-size: 8px;
  }
  .trader-card {
    grid-template-columns: 1.1fr 0.8fr 1fr;
  }
  .trader-price > small {
    font-size: 7px;
  }
  .inventory-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 699px) {
  :root {
    --header-height: 116px;
  }
  .topbar {
    height: var(--header-height);
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: 62px 43px;
    padding: 4px 16px 7px;
    gap: 0 10px;
  }
  .top-brand {
    min-width: 0;
    gap: 9px;
  }
  .top-brand .icon-button {
    width: 36px;
    min-height: 36px;
    padding: 7px;
    border: 0;
  }
  .brand {
    font-size: 13px;
    letter-spacing: 1.3px;
    gap: 7px;
  }
  .brand-accent {
    letter-spacing: 1.3px;
  }
  .brand small {
    font-size: 5px;
    letter-spacing: 1.1px;
    margin-top: 2px;
  }
  .brand-symbol .icon {
    width: 22px;
    height: 22px;
  }
  .top-tools {
    gap: 9px;
  }
  .top-tools .icon-button {
    width: 34px;
    min-height: 34px;
    padding: 7px;
    border: 0;
  }
  .top-tools .icon-button .icon {
    width: 17px;
    height: 17px;
  }
  .wallet {
    min-width: 55px;
  }
  .wallet > span {
    font-size: 6px;
    letter-spacing: 1px;
  }
  .wallet strong {
    font-size: 17px;
  }
  .top-xp {
    grid-row: 2;
    grid-column: 1/-1;
    max-width: none;
    width: 100%;
    gap: 12px;
    align-self: center;
    padding: 0 4px;
  }
  .top-xp .xp-block {
    max-width: none;
  }
  .top-xp .xp-label {
    font-size: 8px;
  }
  .top-xp .xp-label b {
    font-size: 8px;
  }
  .top-xp progress {
    height: 3px;
    margin: 5px 0 0;
  }
  .top-xp small {
    display: none;
  }
  .app-shell {
    padding: 0 16px;
  }
  .main-content {
    padding-top: 17px;
    padding-bottom: calc(95px + env(safe-area-inset-bottom));
  }
  .breadcrumb {
    font-size: 6px;
    letter-spacing: 1.1px;
    margin-bottom: 15px;
  }
  .connection {
    font-size: 5px;
    letter-spacing: 0.5px;
  }
  .connection .status-dot {
    width: 3px;
    height: 3px;
  }
  .panel {
    padding: 20px;
    border-radius: 12px;
  }
  .planet-hero {
    height: 259px;
    padding: 24px 21px;
    align-items: center;
  }
  .planet-copy .eyebrow {
    font-size: 7px;
    gap: 10px;
    letter-spacing: 1.1px;
  }
  .tier-pill {
    font-size: 7px;
    padding: 4px 6px;
  }
  .planet-copy h1 {
    font-size: 43px;
    margin-top: 19px;
    letter-spacing: -1.7px;
  }
  .planet-copy p {
    font-size: 11px;
    line-height: 1.8;
    max-width: 200px;
    margin-top: 12px;
  }
  .planet-scene {
    right: -48px;
    top: -7px;
    width: 220px;
    opacity: 0.7;
    pointer-events: none;
  }
  .hero-planet {
    width: 140px;
    height: 140px;
  }
  .orbit-one {
    width: 200px;
    height: 100px;
  }
  .orbit-two {
    width: 185px;
    height: 185px;
  }
  .planet-marker {
    right: 52px;
    bottom: 22px;
    font-size: 5px;
    letter-spacing: 3px;
  }
  .planet-tags {
    gap: 6px;
    margin-top: 21px;
    max-width: 255px;
  }
  .planet-tags span {
    font-size: 6px;
    padding: 4px 6px;
    gap: 4px;
    background: #08182ec0;
  }
  .planet-coordinates {
    font-size: 5px;
    letter-spacing: 1px;
    margin-top: 17px;
  }
  .planet-coordinates span {
    display: none;
  }
  .planet-hero + .section-heading {
    margin: 24px 0 14px;
  }
  .section-heading {
    gap: 10px;
  }
  .section-heading .eyebrow {
    font-size: 7px;
    letter-spacing: 1.5px;
  }
  .section-heading h2 {
    font-size: 17px;
  }
  .section-note {
    font-size: 7px;
  }
  .resource-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 11px;
  }
  .resource-card {
    padding: 16px 13px;
  }
  .resource-heading {
    gap: 4px;
    margin-bottom: 13px;
  }
  .material-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
  }
  .material-icon .icon {
    width: 22px;
    height: 22px;
  }
  .resource-status {
    font-size: 5px;
    letter-spacing: 0.5px;
  }
  .resource-status .status-dot {
    width: 3px;
    height: 3px;
  }
  .resource-card h3 {
    font-size: 14px;
  }
  .resource-card > p {
    font-size: 9px;
    min-height: 32px;
    line-height: 1.7;
  }
  .resource-stats {
    margin: 14px 0;
    padding: 10px 0;
  }
  .resource-stats > span {
    font-size: 7px;
  }
  .resource-stats b {
    font-size: 15px;
  }
  .resource-card .xp-label {
    font-size: 8px;
    gap: 4px;
  }
  .resource-card .xp-label b {
    font-size: 7px;
  }
  .resource-card .xp-block small {
    font-size: 7px;
  }
  .resource-card > button {
    font-size: 10px;
    min-height: 44px;
    padding: 8px 5px;
    gap: 5px;
  }
  .resource-card > button .icon {
    width: 13px;
  }
  .resource-card.uranium {
    grid-column: 1/-1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 20px;
    row-gap: 3px;
    padding: 17px;
  }
  .resource-card.uranium .resource-heading {
    grid-column: 1;
    grid-row: 1;
    margin-bottom: 10px;
    justify-content: flex-start;
    gap: 12px;
  }
  .resource-card.uranium h3 {
    grid-column: 1;
    grid-row: 2;
  }
  .resource-card.uranium > p {
    grid-column: 1;
    grid-row: 3;
    min-height: 0;
  }
  .resource-card.uranium .resource-stats {
    grid-column: 2;
    grid-row: 1/3;
    margin: 0;
    padding: 7px 0;
    border-top: 0;
    border-bottom: 0;
  }
  .resource-card.uranium .xp-block {
    grid-column: 1;
    grid-row: 4;
    margin-top: 10px;
  }
  .resource-card.uranium > button {
    grid-column: 2;
    grid-row: 3/5;
    margin: 10px 0 0;
    align-self: end;
  }
  .activity-panel {
    margin-top: 18px;
    padding: 20px;
  }
  .activity-header {
    gap: 10px;
  }
  .activity-header h2 {
    font-size: 15px;
    letter-spacing: -0.3px;
    line-height: 1.5;
  }
  .activity-header .eyebrow {
    font-size: 6px;
    letter-spacing: 1.4px;
  }
  .activity-icon {
    width: 32px;
    height: 32px;
    min-width: 32px;
  }
  .activity-icon .icon {
    width: 17px;
  }
  .live-badge {
    font-size: 5px;
    letter-spacing: 0.6px;
    padding: 4px;
    margin-left: auto;
  }
  .activity-progress-row {
    margin-top: 20px;
    gap: 14px;
  }
  .activity-progress-row > span {
    font-size: 12px;
    width: 55px;
  }
  .activity-bottom {
    margin-top: 15px;
  }
  .activity-bottom p {
    font-size: 9px;
  }
  .activity-bottom button {
    min-height: 44px;
    font-size: 9px;
    white-space: nowrap;
    padding: 8px 10px;
  }
  .activity-rewards {
    font-size: 8px;
    gap: 7px 12px;
    padding-top: 14px;
    margin-top: 14px;
  }
  .guide-panel {
    padding: 17px;
    gap: 12px;
    margin-top: 14px;
  }
  .guide-icon {
    width: 28px;
    height: 28px;
  }
  .guide-panel h2 {
    font-size: 13px;
  }
  .guide-panel p {
    font-size: 9px;
  }
  .guide-panel .eyebrow {
    font-size: 6px;
  }
  .guide-panel .icon-button {
    width: 30px;
    min-height: 44px;
    border: 0;
  }
  .main-footer {
    flex-direction: column;
    gap: 6px;
    align-items: center;
    font-size: 7px;
    padding-bottom: 4px;
    margin-top: 20px;
  }
  .bottom-navigation {
    padding: 7px 12px calc(7px + env(safe-area-inset-bottom));
    gap: 2px;
  }
  .bottom-navigation .nav-button {
    font-size: 8px;
    min-height: 50px;
    gap: 5px;
  }
  .bottom-navigation .nav-button .icon {
    width: 19px;
    height: 19px;
  }
  .page-heading {
    padding: 8px 0 24px;
  }
  .page-heading .eyebrow {
    font-size: 7px;
    letter-spacing: 1.6px;
  }
  .page-heading h1 {
    font-size: 29px;
    letter-spacing: -1px;
    margin: 12px 0;
  }
  .page-heading p {
    font-size: 11px;
  }
  .processing-intro {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }
  .processing-intro h2 {
    font-size: 16px;
  }
  .processing-intro p {
    font-size: 10px;
  }
  .quality-select {
    font-size: 9px;
  }
  .quality-select select {
    font-size: 13px;
    padding: 10px 12px;
  }
  .processing-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .recipe-card {
    padding: 20px;
  }
  .recipe-heading {
    margin-bottom: 12px;
  }
  .recipe-card h3 {
    font-size: 16px;
  }
  .conversion {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    font-size: 10px;
    gap: 8px;
    margin-top: 14px;
    padding-top: 14px;
  }
  .conversion .icon {
    transform: none;
    flex-shrink: 0;
  }
  .conversion span,
  .conversion strong {
    max-width: 43%;
  }
  .recipe-meta {
    flex-direction: row;
    justify-content: space-between;
    font-size: 9px;
    margin: 16px 0;
  }
  .recipe-card button {
    min-height: 44px;
    font-size: 12px;
  }
  .tab-row {
    max-width: none;
  }
  .tab {
    min-height: 44px;
    font-size: 11px;
  }
  .laser-comparison {
    grid-template-columns: 1fr 16px 1fr;
    gap: 8px;
    margin: 20px 0;
  }
  .laser-card {
    padding: 17px 8px;
  }
  .laser-card .material-icon {
    width: 49px;
    height: 49px;
    margin-bottom: 13px;
  }
  .laser-card .material-icon .icon {
    width: 28px;
  }
  .laser-card > small {
    font-size: 5px;
    letter-spacing: 0.6px;
  }
  .laser-card h3 {
    font-size: 14px;
    margin-top: 7px;
  }
  .laser-card p {
    font-size: 9px;
  }
  .laser-card strong {
    font-size: 18px;
    margin-top: 14px;
  }
  .laser-card strong small {
    font-size: 7px;
    display: block;
  }
  .upgrade-arrow .icon {
    width: 16px;
  }
  .ingredients {
    grid-template-columns: 1fr;
    gap: 9px;
  }
  .ingredient {
    min-height: 44px;
    padding: 12px;
    font-size: 11px;
  }
  .upgrade-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 13px;
  }
  .upgrade-footer p {
    font-size: 10px;
  }
  .upgrade-footer button {
    min-height: 46px;
  }
  .inventory-toolbar {
    gap: 12px;
  }
  .filter-row {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
  }
  .filter {
    padding: 8px 5px;
    font-size: 10px;
    min-height: 44px;
  }
  .inventory-toolbar > .secondary {
    margin-left: auto;
    min-height: 44px;
  }
  .inventory-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .item-card {
    padding: 16px;
    gap: 12px;
  }
  .item-card h3 {
    font-size: 12px;
  }
  .item-count {
    font-size: 20px;
  }
  .trader-banner {
    padding: 18px;
    gap: 13px;
    align-items: flex-start;
    position: relative;
  }
  .trader-avatar {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
  }
  .trader-avatar .icon {
    width: 21px;
  }
  .trader-banner h2 {
    font-size: 15px;
  }
  .trader-banner p {
    font-size: 10px;
  }
  .open-badge {
    display: none;
  }
  .trader-card {
    grid-template-columns: 1fr auto;
    padding: 19px;
    gap: 17px 12px;
  }
  .trader-item h3 {
    font-size: 12px;
  }
  .trader-price > small {
    font-size: 5px;
  }
  .trader-price strong {
    font-size: 19px;
  }
  .demand {
    font-size: 7px;
  }
  .sell-controls {
    grid-column: 1/-1;
    padding-top: 14px;
    border-top: 1px solid #2c3f5466;
  }
  .sell-controls > div {
    gap: 8px;
  }
  .sell-controls input {
    min-height: 44px;
    font-size: 16px;
    max-width: none;
  }
  .sell-controls button {
    min-height: 44px;
    font-size: 11px;
    padding: 8px 14px;
  }
  .sell-controls > small {
    font-size: 9px;
    margin-top: 8px;
  }
  .ship-equipped {
    flex-wrap: wrap;
    padding: 15px;
    gap: 10px;
  }
  .ship-equipped strong {
    font-size: 11px;
  }
  .ship-equipped small {
    font-size: 9px;
  }
  .equipped-badge {
    font-size: 6px;
  }
  .ship-slots {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }
  .locked-slot {
    padding: 16px 8px;
  }
  .ship-blueprint {
    margin: 5px 0 20px;
  }
  .coming-soon {
    padding: 45px 20px;
  }
  .coming-soon h2 {
    font-size: 23px;
  }
  .coming-soon p {
    font-size: 11px;
  }
  .coming-soon button {
    font-size: 11px;
    width: 100%;
  }
  .empty-state {
    padding: 45px 20px;
  }
  .empty-state h3 {
    font-size: 14px;
  }
  .empty-state p {
    font-size: 11px;
  }
  .settings-dialog {
    padding: 21px;
  }
  .settings-option strong {
    font-size: 12px;
  }
  .settings-option small {
    font-size: 9px;
  }
  .settings-dialog .icon-button {
    min-height: 44px;
  }
  .drop-toast {
    font-size: 11px;
    padding: 15px;
    left: 16px;
    right: 16px;
    max-width: none;
    bottom: calc(85px + env(safe-area-inset-bottom));
  }
}
@media (max-width: 360px) {
  .topbar {
    padding-left: 10px;
    padding-right: 10px;
  }
  .brand {
    font-size: 11px;
  }
  .brand small {
    font-size: 4px;
  }
  .brand-symbol .icon {
    width: 18px;
  }
  .top-tools {
    gap: 3px;
  }
  .app-shell {
    padding: 0 12px;
  }
  .resource-card {
    padding: 14px 10px;
  }
  .resource-card h3 {
    font-size: 13px;
  }
  .resource-status {
    font-size: 4px;
  }
  .activity-panel {
    padding: 17px;
  }
  .activity-header h2 {
    font-size: 13px;
  }
  .trader-card {
    padding: 15px;
  }
  .trader-item .material-icon {
    width: 31px;
    height: 31px;
  }
  .trader-item {
    gap: 7px;
  }
  .trader-price strong {
    font-size: 17px;
  }
  .planet-hero {
    padding: 22px 18px;
  }
  .planet-scene {
    right: -70px;
    opacity: 0.55;
  }
  .section-note {
    font-size: 6px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
.reduce-motion *,
.reduce-motion *:before,
.reduce-motion *:after {
  animation: none !important;
  transition: none !important;
  scroll-behavior: auto !important;
}
/* Keep active work visible in the persistent top bar, even on another screen. */
.brand small.is-active {
  color: #8bcad2;
  letter-spacing: 1px;
}
@media (max-width: 699px) {
  .brand small {
    font-size: 6px;
    letter-spacing: 0.6px;
  }
  .brand small.is-active {
    font-size: 6px;
    letter-spacing: 0.3px;
  }
  .resource-card > p {
    font-size: 11px;
    min-height: 38px;
  }
  .resource-stats > span {
    font-size: 9px;
  }
  .resource-stats b {
    font-size: 17px;
  }
  .resource-card .xp-label {
    font-size: 9px;
  }
  .resource-card .xp-block small {
    font-size: 8px;
  }
  .resource-card > button {
    font-size: 11px;
  }
  .resource-status {
    font-size: 6px;
    letter-spacing: 0.3px;
  }
  .quality {
    font-size: 9px;
  }
  .bottom-navigation .nav-button {
    font-size: 10px;
  }
  .activity-detail,
  .activity-bottom p {
    font-size: 11px;
  }
  .activity-rewards {
    font-size: 9px;
  }
  .guide-panel p {
    font-size: 11px;
  }
  .guide-panel h2 {
    font-size: 14px;
  }
  .breadcrumb {
    font-size: 7px;
  }
  .connection {
    font-size: 6px;
  }
  .planet-tags span {
    font-size: 8px;
  }
  .main-footer {
    font-size: 8px;
  }
  .resource-card.uranium > p {
    min-height: 0;
  }
  .settings-option small {
    font-size: 11px;
  }
}
.sidebar {
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #273b50 transparent;
}
@media (max-width: 1100px) {
  .sidebar-bottom {
    padding-top: 25px;
    padding-bottom: 10px;
  }
  .sidebar {
    overscroll-behavior: contain;
  }
}
@media (max-width: 699px) {
  .top-brand .icon-button,
  .top-tools .icon-button {
    width: 44px;
    min-height: 44px;
  }
  .guide-panel .icon-button {
    width: 44px;
    min-height: 44px;
    flex-shrink: 0;
  }
}
/* Compact activity rows: consistent on phones and desktop. */
.resource-grid,
.processing-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.resource-grid .resource-card.resource-row {
  display: block;
  padding: 13px 16px;
  grid-column: auto;
}
.resource-row-top {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.resource-row-top h3 {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  margin: 0;
}
.resource-row-top .material-icon {
  width: 32px;
  height: 32px;
  border-radius: 7px;
}
.resource-row-top .material-icon .icon {
  width: 20px;
  height: 20px;
}
.resource-row-top .cycle-button {
  flex-shrink: 0;
  min-width: 96px;
  min-height: 40px;
  margin: 0;
  padding: 8px 12px;
  font-size: 11px;
}
.resource-row-bottom {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 9px;
}
.cycle-time {
  width: 32px;
  flex-shrink: 0;
  font-size: 10px;
  color: #91adc4;
  text-align: center;
  white-space: nowrap;
}
.quality-counts {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  flex: 1;
  min-width: 0;
}
.quality-count {
  display: flex;
  gap: 7px;
  align-items: center;
  padding: 3px 6px;
  border: 1px solid color-mix(in srgb, var(--quality) 18%, transparent);
  background: color-mix(in srgb, var(--quality) 5%, transparent);
  border-radius: 4px;
  min-width: 0;
}
.quality-count small {
  font-size: 8px;
  color: var(--quality);
  opacity: 0.8;
}
.quality-count b {
  font-size: 12px;
  font-weight: 550;
  overflow: hidden;
  text-overflow: ellipsis;
}
.row-mastery {
  margin: 9px 0 0 46px;
}
.row-mastery .xp-block {
  display: flex;
  align-items: center;
  gap: 10px;
}
.row-mastery .xp-label {
  font-size: 8px;
  min-width: 108px;
}
.row-mastery progress {
  flex: 1;
  margin: 0;
  height: 3px;
}
.row-mastery .xp-block > small {
  font-size: 8px;
  min-width: 80px;
  text-align: right;
}
.processing-grid .recipe-card.recipe-row {
  padding: 13px 16px;
}
.recipe-row .recipe-row-details {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 9px 0 0 44px;
  font-size: 10px;
  color: #7898b2;
  flex-wrap: wrap;
}
.recipe-row-details span:last-child {
  margin-left: auto;
}
.recipe-row .resource-row-top h3 {
  color: var(--quality);
}
.cycle-button {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  --cycle-progress: 0%;
  transition:
    border-color 0.2s,
    background 0.2s;
}
.cycle-button > span {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  pointer-events: none;
}
.cycle-button .icon {
  width: 14px;
  height: 14px;
}
.cycle-button:before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--cycle-progress);
  background: linear-gradient(90deg, #32738c77, #70ddcf77);
  transition: width 0.1s linear;
  z-index: 0;
}
.cycle-button.running {
  background: #183443;
  color: #bcf4ef;
  border-color: #58949d;
  opacity: 1 !important;
  box-shadow: inset 0 0 0 1px #7ac2c51a;
}
.cycle-drop {
  position: absolute;
  right: 110px;
  top: 2px;
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 6px;
  border: 1px solid color-mix(in srgb, var(--quality) 40%, transparent);
  border-radius: 5px;
  background: #142336;
  z-index: 3;
  pointer-events: none;
  animation: cycle-loot 1.4s ease-out forwards;
}
.cycle-drop .icon {
  width: 17px;
  height: 17px;
}
.cycle-drop b {
  font-size: 10px;
  font-weight: 500;
}
@keyframes cycle-loot {
  0% {
    opacity: 0;
    transform: translateY(5px);
  }
  15%,
  65% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(-12px);
  }
}
#ship-upgrade {
  margin-top: 18px;
  scroll-margin-top: calc(var(--header-height) + 16px);
}
.inventory-grid {
  grid-template-columns: repeat(auto-fill, minmax(135px, 1fr));
  gap: 9px;
}
.inventory-grid .item-card {
  display: grid;
  grid-template-columns: 25px minmax(0, 1fr);
  gap: 6px 8px;
  padding: 10px;
  border-radius: 8px;
  align-items: center;
}
.item-card .material-icon {
  width: 25px;
  height: 25px;
  border-radius: 5px;
  grid-row: 1/3;
}
.item-card .material-icon .icon {
  width: 17px;
  height: 17px;
}
.item-card h3 {
  font-size: 10px;
  margin-top: 4px;
  overflow-wrap: anywhere;
}
.item-card .quality {
  font-size: 7px;
  padding: 1px 4px;
}
.item-card .item-count {
  grid-column: 2;
  font-size: 15px;
  line-height: 1;
  justify-self: end;
}
.item-card small {
  font-size: 8px;
}
@media (max-width: 699px) {
  .resource-grid .resource-card.resource-row,
  .processing-grid .recipe-card.recipe-row {
    padding: 12px;
  }
  .resource-row-top {
    gap: 9px;
  }
  .resource-row-top h3 {
    font-size: 13px;
  }
  .resource-row-top .material-icon {
    width: 28px;
    height: 28px;
  }
  .resource-row-top .cycle-button {
    min-width: 77px;
    min-height: 44px;
    padding: 7px 9px;
    font-size: 10px;
  }
  .resource-row-bottom {
    gap: 9px;
    margin-top: 7px;
  }
  .cycle-time {
    width: 28px;
    font-size: 9px;
  }
  .quality-counts {
    gap: 5px;
  }
  .quality-count {
    padding: 3px 4px;
    gap: 4px;
  }
  .quality-count small {
    font-size: 7px;
  }
  .quality-count b {
    font-size: 11px;
  }
  .row-mastery {
    margin-left: 37px;
    margin-top: 8px;
  }
  .row-mastery .xp-block {
    gap: 7px;
  }
  .row-mastery .xp-label {
    font-size: 7px;
    min-width: 93px;
  }
  .row-mastery .xp-block > small {
    display: none;
  }
  .recipe-row .resource-row-top .quality {
    font-size: 7px;
    padding: 2px 4px;
  }
  .recipe-row .resource-row-details {
    margin-left: 37px;
    font-size: 9px;
    gap: 6px 10px;
  }
  .recipe-row-details span:first-child {
    flex-basis: 100%;
  }
  .recipe-row-details span:last-child {
    margin-left: auto;
  }
  .cycle-drop {
    right: 85px;
    padding: 5px;
    top: 4px;
  }
  .inventory-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
  }
  .inventory-grid .item-card {
    grid-template-columns: 1fr;
    padding: 9px;
    gap: 5px;
  }
  .item-card .material-icon {
    grid-row: auto;
  }
  .item-card .item-count {
    grid-column: 1;
    font-size: 14px;
  }
  .item-card h3 {
    font-size: 10px;
  }
  .item-card .quality {
    font-size: 7px;
  }
  .item-card > div > small {
    font-size: 7px;
  }
}
@media (max-width: 360px) {
  .quality-count {
    gap: 3px;
    padding: 3px;
  }
  .quality-count b {
    font-size: 10px;
  }
  .resource-row-top h3 {
    font-size: 12px;
  }
  .recipe-row .resource-row-top {
    gap: 6px;
  }
  .recipe-row .resource-row-top h3 {
    font-size: 11px;
  }
  .inventory-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
/* Recipe actions keep their own width within the compact flex row. */
.recipe-row .resource-row-top .cycle-button {
  width: auto;
}
.quality-count {
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
}
.quality-count small {
  white-space: nowrap;
}
@media (max-width: 699px) {
  .quality-count small {
    font-size: 6px;
    letter-spacing: -0.1px;
  }
  .quality-count b {
    font-size: 12px;
  }
}
/* Planet chain, automatic ship support and long-term deck progression. */
.planet-navigation {
  overflow-y: auto;
  max-height: 34dvh;
  flex-shrink: 1;
  scrollbar-width: thin;
}
.planet-navigation .planet-nav {
  width: 100%;
  min-height: 54px;
  padding: 8px;
  margin: 3px 0;
}
.planet-navigation .planet-nav .icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.planet-hero .hero-planet {
  background: radial-gradient(
    ellipse at 22% 20%,
    #eef7fd,
    var(--world-color, #6ba4a6) 28%,
    #16263b 70%,
    #080d18 90%
  );
}
.planet-hero[data-tier="3"] .hero-planet:before,
.planet-hero[data-tier="10"] .hero-planet:before {
  background: repeating-linear-gradient(
    25deg,
    transparent 0 13px,
    #f7af6255 15px 22px,
    transparent 26px 38px
  );
}
.planet-hero[data-tier="6"] .hero-planet:before {
  background: repeating-linear-gradient(
    -20deg,
    #19224544 0 18px,
    #cfb4e844 20px 30px
  );
}
.planet-hero[data-tier="8"] .hero-planet:before {
  background: radial-gradient(ellipse at 40% 40%, #efe2ff44, #080715cc 70%);
}
.support-panel,
.economy-panel,
.deck-panel,
.laser-equipment-panel {
  padding: 20px;
  margin: 18px 0;
}
.support-panel {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.support-cell {
  flex: 1 1 200px;
  min-width: 0;
}
.support-cell > span {
  color: #7898b2;
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
}
.support-cell .icon {
  width: 18px;
  height: 18px;
}
.support-cell strong,
.support-cell small {
  display: block;
  margin-top: 8px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
.support-cell strong {
  font-size: 12px;
  color: #8be5df;
}
.support-cell small,
.support-panel p,
.deck-panel p,
.economy-panel p {
  font-size: 11px;
  line-height: 1.9;
  color: #8097b0;
}
.support-panel > p {
  flex-basis: 100%;
  margin: 0;
}
.activity-tabs {
  margin: 22px 0;
  flex-wrap: wrap;
}
.galaxy-map {
  margin-top: 24px;
  padding: 16px;
}
.galaxy-map summary {
  cursor: pointer;
  font-size: 13px;
  padding: 4px;
  color: #99d4de;
}
.world-map {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}
.world-card {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  padding: 14px;
  border: 1px solid #25394d;
  border-radius: 10px;
  min-width: 0;
}
.world-orb {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 50%;
  background: radial-gradient(
    circle at 25% 20%,
    #def6ff,
    var(--world-color) 40%,
    #0a1320 90%
  );
  box-shadow: 0 0 20px color-mix(in srgb, var(--world-color) 20%, transparent);
}
.world-card > div {
  flex: 1 1 100px;
  min-width: 0;
}
.world-card h3 {
  font-size: 14px;
  margin: 4px 0;
}
.world-card p,
.world-card small {
  font-size: 10px;
  line-height: 1.8;
  color: #7e9ab1;
  overflow-wrap: anywhere;
}
.world-card button {
  width: 100%;
  padding: 8px;
  min-height: 36px;
  font-size: 11px;
}
.world-card.locked {
  background: #0b1421;
}
.craft-world-select {
  margin: 16px 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.recipe-row-details span {
  overflow-wrap: anywhere;
}
.deck-requirements {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 16px 0;
  font-size: 12px;
}
.deck-requirements p {
  flex-basis: 100%;
  margin: 0;
}
.equipment-line {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex-wrap: wrap;
  border-bottom: 1px solid #203246;
  padding: 12px 0;
  font-size: 12px;
}
.equipment-line .icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}
.equipment-line strong {
  flex: 1;
  min-width: 100px;
}
.equipment-line button {
  padding: 8px 12px;
  font-size: 11px;
}
.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.stat-grid small {
  display: block;
  color: #7996b2;
  font-size: 8px;
  letter-spacing: 1px;
}
.stat-grid strong {
  display: block;
  margin-top: 7px;
  font-size: 20px;
  color: #e5c388;
}
#world-recipes:empty:after {
  content: "Na této planetě nejsou další recepty.";
  font-size: 12px;
  color: #7898b2;
}
@media (max-width: 600px) {
  .world-map {
    grid-template-columns: minmax(0, 1fr);
  }
  .support-panel,
  .economy-panel,
  .deck-panel {
    padding: 14px;
  }
  .recipe-row .resource-row-top h3 {
    overflow-wrap: anywhere;
    font-size: 12px;
  }
  .equipment-line strong {
    font-size: 11px;
  }
  .planet-hero {
    height: auto;
    min-height: 160px;
    padding: 16px;
  }
  .planet-copy {
    width: 100%;
  }
  .planet-copy .eyebrow {
    gap: 8px;
  }
  .planet-copy h1 {
    max-width: calc(100% - 80px);
    margin-top: 8px;
    font-size: 28px;
    letter-spacing: -0.8px;
  }
  .planet-copy p {
    max-width: calc(100% - 80px);
    margin-top: 6px;
    font-size: 11px;
    line-height: 1.5;
  }
  .planet-scene {
    top: -12px;
    right: -15px;
    width: 130px;
    height: 140px;
  }
  .hero-planet {
    width: 90px;
    height: 90px;
  }
  .orbit-one {
    width: 125px;
    height: 65px;
  }
  .orbit-two {
    width: 115px;
    height: 115px;
  }
  .planet-crosshair {
    width: 135px;
  }
  .planet-marker,
  .planet-coordinates {
    display: none;
  }
  .planet-tags {
    max-width: 100%;
    margin-top: 10px;
  }
  .planet-tags span {
    font-size: 8px;
    padding: 3px 5px;
  }
}
@media (max-width: 699px) {
  .sidebar {
    padding: max(12px, env(safe-area-inset-top)) 16px
      max(12px, env(safe-area-inset-bottom));
  }
  .sidebar > :not(.planet-navigation) {
    flex-shrink: 0;
  }
  .sidebar .drawer-title {
    margin-bottom: 8px;
  }
  .sidebar .sidebar-label {
    margin: 6px 8px 8px;
  }
  .sidebar .sidebar-divider {
    margin: 10px 8px;
  }
  .sidebar .planet-navigation {
    flex: 1 1 auto;
    min-height: 140px;
    max-height: none;
    overscroll-behavior: contain;
  }
  .sidebar .desktop-navigation {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
  }
  .sidebar .nav-button {
    min-height: 44px;
    padding: 8px;
    gap: 6px;
    font-size: 11px;
  }
  .sidebar .nav-button .icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
  }
  .sidebar .sidebar-bottom {
    display: none;
  }
}
.planet-support {
  margin: 18px 0;
  padding: 14px 16px;
}
.planet-support summary {
  cursor: pointer;
  color: #9fc9d2;
  font-size: 11px;
  line-height: 1.8;
}
.planet-support .support-panel {
  padding: 12px 0 0;
  margin: 0;
}
.ship-professions {
  display: flex;
  gap: 24px;
  margin: 16px 0;
  padding: 16px;
}
.ship-professions .xp-block {
  flex: 1;
  min-width: 0;
}
.economy-detail {
  margin-top: 16px;
  font-size: 11px;
  color: #92afbd;
}
.economy-detail summary {
  cursor: pointer;
  line-height: 1.8;
}
.economy-detail table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
  table-layout: fixed;
}
.economy-detail th,
.economy-detail td {
  text-align: left;
  padding: 8px 4px;
  border-bottom: 1px solid #233348;
  overflow-wrap: anywhere;
}
.recipe-status {
  margin: 9px 0 0;
  font-size: 10px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
.source-shortcuts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-top: 8px;
}
button.ingredient-link {
  width: auto;
  max-width: 100%;
  min-width: 0;
  margin: 0;
  justify-content: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 0;
  min-height: 28px;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  color: inherit;
  font-size: inherit;
  line-height: inherit;
  text-align: left;
  white-space: normal;
}
.ingredient-link .icon {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}
.ingredient-link:hover,
.ingredient-link:focus-visible {
  color: #8be5df;
}
.source-shortcuts .ingredient-link {
  color: #86b8ca;
  font-size: 10px;
}
.ingredients .ingredient-link {
  font-size: 12px;
}
/* Planet atmosphere: decorative scenery stays behind the readable interface. */
body[data-planet] {
  background:
    radial-gradient(
      ellipse at 85% 0%,
      color-mix(in srgb, var(--world-color) 18%, transparent),
      transparent 65%
    ),
    linear-gradient(
      145deg,
      color-mix(in srgb, var(--world-color) 7%, #080e18),
      #080e18 75%
    );
}
body[data-planet] #view-planet .planet-hero {
  isolation: isolate;
  background:
    radial-gradient(
      ellipse at 80% 25%,
      color-mix(in srgb, var(--world-color) 28%, transparent),
      transparent 75%
    ),
    linear-gradient(
      135deg,
      #0d1927,
      color-mix(in srgb, var(--world-color) 12%, #0c1420)
    );
  border-color: color-mix(in srgb, var(--world-color) 30%, #263449);
}
#planet-atmosphere,
.planet-hero:after {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
#planet-atmosphere {
  z-index: 0;
  color: var(--world-color);
}
.planet-landscape {
  display: block;
  width: 100%;
  height: 100%;
}
.planet-hero:after {
  content: "";
  z-index: 1;
  background: linear-gradient(90deg, #0b1624ed, #0b162499 42%, transparent 75%);
}
.planet-hero .planet-copy {
  z-index: 3;
}
.planet-hero .planet-scene {
  z-index: 2;
}
.planet-hero .planet-copy p {
  color: #c2d3e3;
}
.planet-hero .planet-copy .eyebrow,
.planet-hero .planet-copy h1 {
  color: color-mix(in srgb, var(--world-color) 35%, #f1f6ff);
}
.planet-hero .planet-tags span {
  color: #c7d9e7;
  background: #081320d9;
  border-color: color-mix(in srgb, var(--world-color) 25%, #263449);
}
body[data-planet] #view-planet .resource-row,
body[data-planet] #view-planet .planet-support,
body[data-planet] #view-planet .galaxy-map {
  background: linear-gradient(
    115deg,
    #0e1a29f5,
    color-mix(in srgb, var(--world-color) 6%, #101b2b)
  );
  border-color: color-mix(in srgb, var(--world-color) 18%, #263449);
}
.planet-hero[data-tier="2"] .hero-planet:before {
  background:
    linear-gradient(155deg, #e5faffb3, transparent 48%),
    repeating-linear-gradient(
      65deg,
      transparent 0 17px,
      #b8ebff66 19px 21px,
      transparent 23px 35px
    );
}
.planet-hero[data-tier="3"] .hero-planet {
  background: radial-gradient(
    ellipse at 22% 20%,
    #ffd485,
    #cb632c 30%,
    #692123 62%,
    #210d15 90%
  );
  box-shadow:
    inset -20px -16px 26px #15050bcc,
    0 0 40px #ff693c33;
}
.planet-hero[data-tier="4"] .hero-planet:before {
  background:
    radial-gradient(ellipse at 60% 35%, #b9e47766, transparent 30%),
    repeating-linear-gradient(
      -30deg,
      transparent 0 20px,
      #a8d66a44 24px 32px,
      transparent 40px 50px
    );
}
.planet-hero[data-tier="5"] .hero-planet:before {
  background: repeating-linear-gradient(
    -15deg,
    #8fe5ee44 0 3px,
    transparent 6px 20px
  );
}
.planet-hero[data-tier="7"] .hero-planet:before {
  background:
    radial-gradient(ellipse at 30% 45%, #e1ed8180, transparent 20%),
    radial-gradient(ellipse at 70% 60%, #c3d84d80, transparent 25%);
}
.planet-hero[data-tier="9"] .hero-planet:before {
  background: repeating-radial-gradient(
    ellipse at 40% 45%,
    transparent 0 15px,
    #f5bbe144 18px 20px,
    transparent 23px 30px
  );
}
body[data-planet="3"] #view-planet .planet-hero {
  background:
    radial-gradient(ellipse at 75% 80%, #f26b3555, transparent 65%),
    linear-gradient(135deg, #21131d, #3d181a);
}
.planet-preview {
  margin-top: 14px;
  padding: 14px 16px;
  border-color: color-mix(in srgb, var(--world-color) 40%, #263449);
  background: #0d1929f0;
}
.planet-preview .eyebrow {
  color: var(--world-color);
  font-size: 9px;
}
.planet-preview p {
  margin-top: 6px;
  color: #b6cbdc;
  font-size: 11px;
  line-height: 1.7;
}
.preview-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin-top: 10px;
}
.sidebar .planet-nav.locked {
  opacity: 0.75;
}
.sidebar .planet-nav.locked.active {
  opacity: 1;
}
.planet-nav.locked:hover:enabled {
  border-color: #527d8d;
  background: #17354588;
}
/* Dense inventory slots; full item information appears on hover, focus or touch. */
.inventory-grid {
  grid-template-columns: repeat(auto-fill, 48px);
  gap: 6px;
}
.inventory-grid .item-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-direction: column;
  gap: 0;
  width: 48px;
  height: 48px;
  min-height: 48px;
  padding: 3px;
  border-radius: 5px;
  color: var(--quality);
  user-select: none;
  -webkit-touch-callout: none;
  touch-action: pan-y;
}
.inventory-grid .item-card .material-icon {
  width: 27px;
  height: 27px;
  margin-top: 1px;
  border: 0;
  background: transparent;
}
.inventory-grid .item-card .material-icon .icon {
  width: 22px;
  height: 22px;
}
.inventory-grid .item-count {
  position: absolute;
  bottom: 3px;
  right: 3px;
  max-width: 42px;
  margin: 0;
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  color: var(--quality, var(--common));
}
.item-code {
  position: absolute;
  top: 2px;
  left: 3px;
  font-size: 6px;
  line-height: 1;
  color: var(--quality);
}
.item-tooltip {
  position: fixed;
  z-index: 80;
  width: 340px;
  max-width: min(340px, calc(100vw - 16px));
  max-height: calc(100dvh - 16px);
  overflow-y: auto;
  padding: 12px 14px;
  border: 1px solid color-mix(in srgb, var(--quality) 50%, #263449);
  border-radius: 9px;
  background: #0b1627f5;
  box-shadow: 0 8px 30px #0009;
  pointer-events: auto;
  overflow-wrap: anywhere;
}
.item-tooltip strong,
.item-tooltip span,
.item-tooltip small {
  display: block;
}
.item-tooltip strong {
  font-size: 13px;
  color: #e4edf8;
}
.item-tooltip span {
  font-size: 11px;
  margin-top: 3px;
  color: #c0d2e2;
}
.item-tooltip #item-info-quality {
  color: var(--quality);
}
.item-tooltip small {
  margin-top: 7px;
  font-size: 10px;
  color: #9fb7ca;
}
.trader-info {
  margin-bottom: 8px;
  border: 1px solid #263449;
  border-radius: 7px;
  background: #0e1a29;
}
.trader-info > summary {
  padding: 9px 12px;
  color: #9ebdce;
  font-size: 11px;
  cursor: pointer;
}
.trader-info .trader-banner,
.trader-info .economy-panel {
  margin: 0;
  border: 0;
}
@media (max-width: 699px) {
  #view-inventory .page-heading,
  #view-trader .page-heading {
    margin-bottom: 14px;
  }
  #view-inventory .page-heading h1,
  #view-trader .page-heading h1 {
    font-size: 25px;
  }
  #view-inventory .page-heading p,
  #view-trader .page-heading p {
    display: none;
  }
  .trader-list {
    gap: 6px;
  }
  .trader-card {
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 8px 10px;
    gap: 5px 8px;
    border-radius: 7px;
  }
  .trader-card .trader-item {
    gap: 7px;
    min-width: 0;
  }
  .trader-card .trader-item .material-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
  }
  .trader-item .material-icon .icon {
    width: 17px;
    height: 17px;
  }
  .trader-card .trader-item h3 {
    margin-top: 2px;
    font-size: 11px;
    overflow-wrap: anywhere;
  }
  .trader-item .quality {
    font-size: 7px;
    padding: 0 4px;
  }
  .trader-card .trader-item small {
    font-size: 8px;
    margin-top: 2px;
  }
  .trader-price {
    text-align: right;
  }
  .trader-card .trader-price strong {
    font-size: 14px;
    line-height: 1.3;
  }
  .trader-price > small {
    font-size: 6px;
  }
  .trader-price .demand,
  .sell-controls label {
    display: none;
  }
  .trader-card .sell-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 90px;
    align-items: center;
    gap: 8px;
    padding: 0;
    border: 0;
    min-width: 0;
  }
  .sell-controls > div {
    gap: 4px;
    min-width: 0;
  }
  .trader-card .sell-controls input {
    min-height: 44px;
    width: 40px;
    padding: 5px;
    font-size: 16px;
  }
  .trader-card .sell-controls button {
    min-height: 44px;
    min-width: 44px;
    padding: 6px;
    font-size: 10px;
  }
  .trader-card .sell-controls > small {
    margin: 0;
    font-size: 8px;
    line-height: 1.4;
    overflow-wrap: anywhere;
  }
}
@media (max-width: 699px) {
  #view-inventory .page-heading,
  #view-trader .page-heading {
    padding: 0 0 8px;
    margin-bottom: 8px;
  }
  #view-inventory .page-heading h1,
  #view-trader .page-heading h1 {
    margin: 5px 0;
  }
  .inventory-toolbar {
    gap: 6px;
    margin-bottom: 12px;
  }
  .trader-item > div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1px 6px;
    min-width: 0;
  }
  .trader-item .quality {
    grid-column: 2;
    grid-row: 1;
    align-self: start;
    font-size: 6px;
  }
  .trader-card .trader-item h3 {
    grid-column: 1;
    grid-row: 1;
    margin: 0;
  }
  .trader-card .trader-item small {
    grid-column: 1 / -1;
    margin: 0;
  }
}
/* Item art keeps its material colours; Quality is shown by the slot border. */
.item-art {
  overflow: hidden;
}
.inventory-grid .item-card .material-icon .item-art {
  width: 34px;
  height: 34px;
}
.inventory-grid .item-card .material-icon {
  width: 34px;
  height: 34px;
  margin-top: 0;
}
.inventory-grid .item-code {
  display: none;
}
.inventory-grid .item-count {
  bottom: 2px;
  right: 2px;
  padding: 1px 2px;
  border-radius: 2px;
  background: #081320c9;
  text-shadow: 0 1px 2px #000;
}
.material-icon .item-art {
  width: 100%;
  height: 100%;
}
.item-tooltip #item-info-portrait {
  float: left;
  width: 54px;
  height: 54px;
  margin-right: 10px;
  margin-bottom: 4px;
}
#item-info-portrait .item-art {
  width: 54px;
  height: 54px;
}
[data-tooltip-item] {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}
svg[data-tooltip-item] {
  cursor: help;
  border-radius: 4px;
}
svg[data-tooltip-item]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
#item-info-stats { clear: both; }
.equipment-facts {
  min-width: 0;
  font-size: 11px;
}
.equipment-facts .item-effect {
  margin: 7px 0;
  color: #bed0df;
  line-height: 1.45;
}
.item-stat-list {
  margin: 8px 0;
  display: grid;
  gap: 5px;
}
.item-stat-list > div, .item-stat-delta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.item-stat-list dt { color: #99b3c9; }
.item-stat-list dd { margin: 0; color: #e7f3fa; font-weight: 600; }
.item-stat-list dd, .item-stat-delta b { flex-shrink: 0; }
.item-comparison {
  border-top: 1px solid #35516a;
  padding-top: 6px;
  margin-top: 7px;
}
.item-comparison > small { display: block; margin: 0 0 5px; color: #a9bed0; line-height: 1.4; }
.item-stat-delta { margin-top: 4px; font-size: 10px; }
.item-tooltip .item-stat-delta span { margin: 0; font-size: inherit; color: #adc3d7; }
.item-stat-delta.better b { color: #86e5b0; }
.item-stat-delta.worse b { color: #fa939a; }
.item-stat-delta.same b { color: #99b3c9; }
.item-stat-note { display: block; margin-top: 7px; color: #91a9bf; line-height: 1.4; }
.compact-facts {
  padding: 8px 9px;
  border: 1px solid #29465c;
  border-radius: 7px;
  background: #08162466;
}
.compact-facts .item-effect { margin: 0 0 6px; font-size: 10px; }
.compact-facts .item-stat-list { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0; }
.compact-facts .item-stat-list > div { display: block; font-size: 10px; }
.compact-facts .item-stat-list dt { font-size: 9px; margin-bottom: 2px; }
.compact-facts .item-comparison > small, .compact-facts .item-stat-note { font-size: 9px; }
.item-tooltip #item-info-description {
  clear: both;
}
.resource-row-top .material-icon .item-art,
.trader-card .trader-item .material-icon .item-art {
  width: 100%;
  height: 100%;
}

.offline-dialog {
  width: 620px;
  padding: 22px;
}
.offline-dialog h2 {
  margin: 8px 0 12px;
  font-size: 24px;
}
.offline-dialog p {
  color: #9eb1c8;
  font-size: 12px;
  line-height: 1.6;
}
.offline-dialog #offline-close {
  width: 100%;
  margin-top: 12px;
}
.offline-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 11px;
}
.offline-table caption {
  text-align: left;
  padding: 12px 0;
  font-weight: 600;
}
.offline-table th,
.offline-table td {
  padding: 10px 3px;
  border-bottom: 1px solid #263449;
  text-align: right;
  overflow-wrap: anywhere;
}
.offline-table th:first-child {
  width: 40%;
  text-align: left;
}
.offline-table th {
  font-weight: 500;
}
.offline-table abbr {
  text-decoration: none;
}
.offline-item {
  display: flex;
  gap: 7px;
  align-items: center;
}
.offline-item .item-art {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}
.offline-dialog .offline-legend {
  font-size: 9px;
}
#offline-xp h3 {
  font-size: 13px;
  margin-top: 18px;
}
#offline-xp dl {
  margin: 10px 0;
  font-size: 11px;
}
#offline-xp dl > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 5px 0;
}
#offline-xp dd {
  margin: 0;
  color: var(--accent);
  white-space: nowrap;
}
@media (max-width: 699px) {
  .offline-dialog {
    padding: 16px;
  }
  .offline-table {
    font-size: 10px;
  }
  .offline-item {
    gap: 4px;
  }
  .offline-item .item-art {
    width: 22px;
    height: 22px;
  }
}

/* Cinematic world environments, with quiet space behind the controls. */
body[data-planet] {
  isolation: isolate;
}
body[data-planet] .starfield {
  opacity: 1;
  background-image:
    radial-gradient(1px 1px at 13% 22%, #cee6ffb3, transparent),
    radial-gradient(1px 1px at 40% 64%, #a2d1df80, transparent),
    radial-gradient(1px 1px at 80% 38%, #ffe7c970, transparent),
    radial-gradient(1px 1px at 63% 93%, #bad1e066, transparent);
}
.starfield::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--space-art) center top / cover no-repeat;
  opacity: 0.32;
}
.starfield::after {
  content: "";
  position: absolute;
  inset: -10%;
  background: radial-gradient(
    ellipse at 80% 20%,
    color-mix(in srgb, var(--world-color) 13%, transparent),
    transparent 45%
  );
  animation: nebula-drift 50s ease-in-out infinite alternate;
}
@keyframes nebula-drift {
  to {
    transform: translate3d(-3%, 2%, 0);
    opacity: 0.55;
  }
}
body[data-planet] #view-planet .planet-hero {
  box-shadow:
    0 16px 36px #02071066,
    inset 0 0 0 1px #ffffff08;
  background: #091523;
}
.planet-landscape {
  object-fit: cover;
  object-position: 75% 50%;
}
.planet-hero:after {
  background:
    linear-gradient(
      90deg,
      #06111af5 0%,
      #06111ab3 34%,
      #06111a33 66%,
      transparent 100%
    ),
    linear-gradient(0deg, #07121c66, transparent 45%);
}
.planet-hero .planet-copy {
  max-width: 65%;
  text-shadow: 0 2px 12px #000b;
}
.planet-hero .planet-copy .eyebrow {
  color: #c0dfdf;
}
.planet-hero .planet-copy h1 {
  color: #f0f8ff;
}
.planet-hero .planet-copy p {
  color: #c8d9e3;
}
.planet-hero .planet-tags span {
  background: #061322bd;
  backdrop-filter: blur(8px);
  border-color: #c0def32b;
}
.planet-hero .planet-scene {
  pointer-events: none;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 1;
}
.planet-marker {
  right: 20px;
  bottom: 14px;
  color: #d3e6e680;
  letter-spacing: 2px;
  font-size: 7px;
  text-shadow: 0 1px 4px #000;
}
.planet-scan {
  position: absolute;
  inset: 16px;
  border: solid #d0eafa26;
  border-width: 0;
  border-radius: 2px;
}
.planet-scan::before,
.planet-scan::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  opacity: 0.65;
}
.planet-scan::before {
  top: 0;
  right: 0;
  border-top: 1px solid #cdeff2;
  border-right: 1px solid #cdeff2;
}
.planet-scan::after {
  bottom: 0;
  left: 0;
  border-bottom: 1px solid #cdeff2;
  border-left: 1px solid #cdeff2;
}
.mini-planet,
.world-orb {
  background: var(--planet-art) 80% 42% / auto 130% no-repeat;
  border: 1px solid color-mix(in srgb, var(--world-color) 55%, #263449);
  box-shadow:
    inset -4px -3px 10px #0008,
    0 0 12px color-mix(in srgb, var(--world-color) 18%, transparent);
}
.world-card {
  background:
    linear-gradient(110deg, #0a1524f5 25%, #0a1524b3),
    var(--planet-art) right center / cover no-repeat;
}
.planet-nav.active {
  box-shadow:
    inset 2px 0 0 var(--world-color),
    0 0 20px #68dfe810;
}
@media (max-width: 699px) {
  .planet-hero .planet-copy {
    max-width: 78%;
  }
  .planet-hero .planet-copy h1,
  .planet-hero .planet-copy p {
    max-width: none;
  }
  .planet-hero .planet-copy h1 {
    font-size: 28px;
  }
  .planet-hero .planet-tags {
    gap: 5px;
  }
  .planet-hero .planet-tags span {
    font-size: 7px;
    padding: 3px 5px;
  }
  .planet-hero:after {
    background:
      linear-gradient(90deg, #06111aea, #06111a80 47%, transparent 85%),
      linear-gradient(0deg, #06111a80, transparent 70%);
  }
  .planet-landscape {
    object-position: 75% 50%;
  }
  .planet-marker {
    display: none;
  }
  .planet-scan {
    inset: 10px;
  }
}
.account-dialog h2 {
  font-size: 24px;
  margin: 8px 0 12px;
}
.account-dialog p {
  color: #a5b9cd;
  font-size: 12px;
  line-height: 1.7;
  margin: 12px 0;
}
.account-dialog form {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}
.account-dialog form[hidden] {
  display: none;
}
.account-dialog label {
  color: #c7dae8;
  font-size: 12px;
}
.account-dialog input {
  width: 100%;
  min-width: 0;
  border: 1px solid #37546c;
  border-radius: 8px;
  color: #e4edf8;
  background: #091827;
  padding: 12px;
}
#account-code {
  font-size: 24px;
  letter-spacing: 7px;
}
#account-local {
  width: 100%;
}
#account-turnstile {
  min-width: 0;
  overflow: hidden;
}
.settings-info button {
  margin-top: 12px;
  max-width: 100%;
}
/* Locale-safe system fonts, long labels and narrow settings controls. */
body {
  font-family:
    "Segoe UI",
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Noto Sans",
    "PingFang SC",
    "Microsoft YaHei",
    sans-serif;
}
button,
select,
input {
  font: inherit;
}
.language-option {
  gap: 12px;
  flex-wrap: wrap;
}
.language-option select {
  min-width: 145px;
  max-width: 100%;
  color: var(--text);
  background: #132334;
  border: 1px solid #385067;
  border-radius: 8px;
  padding: 9px;
}
.nav-button span,
.resource-row-top h3,
.equipment-line strong,
.support-cell strong {
  overflow-wrap: anywhere;
  min-width: 0;
}
.resource-row-top .cycle-button {
  white-space: normal;
}
.quality-count small {
  overflow-wrap: anywhere;
  line-height: 1.2;
}
.ship-blueprint text {
  font-size: 8px;
}
@media (max-width: 600px) {
  .bottom-navigation .nav-button {
    font-size: 9px;
    padding: 4px 2px;
    white-space: normal;
    line-height: 1.1;
  }
  .bottom-navigation .nav-button span {
    overflow-wrap: normal;
  }
  .settings-dialog {
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
  }
}
/* Statistics use bounded cards and scrollable tables at narrow widths. */
.statistics-panel {
  padding: 24px;
  margin-bottom: 20px;
  min-width: 0;
}
.statistics-section {
  margin-top: 28px;
  border-top: 1px solid #2c4054;
  padding-top: 18px;
}
.statistics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr));
  gap: 12px;
  margin: 18px 0;
}
.statistics-grid > div {
  background: #122232;
  border: 1px solid #294255;
  border-radius: 8px;
  padding: 12px;
  min-width: 0;
}
.statistics-grid dt {
  color: #98b0c4;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.statistics-grid dd {
  margin: 7px 0 0;
  font-size: 17px;
  font-weight: 650;
  color: #a6e9e5;
  overflow-wrap: anywhere;
}
.statistics-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 18px 0;
}
.statistics-filter {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
  font-size: 13px;
  flex: 1;
}
.statistics-filter select,
.statistics-filter input,
.nickname-form input {
  width: 100%;
  max-width: 100%;
  padding: 10px;
  color: #dce9f4;
  background: #112132;
  border: 1px solid #365268;
  border-radius: 8px;
}
.statistics-table-wrap {
  max-width: 100%;
  overflow-x: auto;
}
.statistics-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.statistics-table th,
.statistics-table td {
  border-bottom: 1px solid #294155;
  padding: 10px;
  text-align: left;
  overflow-wrap: anywhere;
}
.statistics-table th {
  color: #a5bfd0;
}
.statistics-notice {
  border-left: 2px solid #efce8b;
  padding: 10px 12px;
  color: #b9c6d5;
  font-size: 12px;
  line-height: 1.7;
}
.statistics-search-results {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 16px 0;
}
.nickname-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 18px 0;
}
.nickname-form small {
  font-size: 11px;
  color: #98abc0;
}
@media (max-width: 600px) {
  .statistics-panel {
    padding: 16px;
  }
  .statistics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }
  .statistics-grid dt {
    font-size: 11px;
  }
  .statistics-grid dd {
    font-size: 14px;
  }
  .statistics-filters {
    flex-direction: column;
  }
  .statistics-table {
    font-size: 11px;
  }
}

.production-queue {
  margin-top: 24px;
}
.production-queue form {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  margin: 16px 0;
}
.production-queue label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.production-queue select,
.production-queue input {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}
.production-queue li {
  margin: 12px 0;
  overflow-wrap: anywhere;
}
.production-queue li button {
  margin-left: 8px;
}
.production-queue > button {
  margin: 6px 8px 0 0;
}
@media (max-width: 650px) {
  .production-queue form {
    grid-template-columns: minmax(0, 1fr);
  }
}

.laser-slot-list,
.combat-skills {
  display: grid;
  gap: 12px;
}
.laser-slot,
.combat-loadout {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.laser-slot label,
.combat-loadout label {
  display: grid;
  grid-template-columns: minmax(100px, 1fr) minmax(0, 2fr);
  align-items: center;
  gap: 10px;
}
.laser-slot select,
.combat-loadout select {
  width: 100%;
  min-width: 0;
}
.laser-slot small,
.combat-loadout small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
}
.combat-health {
  display: grid;
  gap: 8px;
  width: 100%;
}
.combat-health label {
  display: grid;
  gap: 4px;
}
.combat-health progress {
  width: 100%;
}
.ship-slots {
  display: block;
}
.combat-skills {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 16px;
}
.vector-art {
  color: var(--cyan);
}

/* Compact ship support and the persistent header activity indicator. */
.top-cycle-progress {
  display: block;
  width: 100%;
  height: 2px;
  margin-top: 4px;
}
.topbar #stop {
  border: 0;
  color: var(--accent);
}
.beta-notice {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 10px 12px;
  margin: 0 0 18px;
  border: 1px solid #c4a06a35;
  border-radius: 10px;
  background: #c4a06a08;
  color: #9caec2;
  font-size: 11px;
  line-height: 1.6;
}
.beta-notice strong {
  flex-shrink: 0;
  color: #e5c388;
  font-size: 9px;
  letter-spacing: 1px;
}
.planet-support summary {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}
.planet-support summary::before {
  content: "▸";
  color: #9fc9d2;
}
.planet-support[open] summary::before {
  content: "▾";
}
.planet-support summary small {
  margin-left: auto;
  color: var(--accent);
  font-size: 10px;
  font-weight: 400;
  text-align: right;
}
.support-panel {
  gap: 0;
}
.support-reserves {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
  margin-bottom: 12px;
}
.support-reserves:has(> :only-child) {
  grid-template-columns: minmax(0, 1fr);
}
.support-reserve {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  align-items: center;
  gap: 5px 8px;
  padding: 12px;
  border: 1px solid #387482;
  border-radius: 9px;
  background: linear-gradient(140deg, #10323f80, #16273850);
  min-width: 0;
}
.support-reserve-icon .icon {
  width: 26px;
  height: 26px;
  color: var(--accent);
}
.support-reserve-icon.flame .icon {
  color: #ffb553;
}
.support-reserve > div > span {
  color: #c6d7e2;
  font-size: 11px;
  overflow-wrap: anywhere;
}
.support-reserve > div {
  line-height: 1.2;
}
.support-reserve strong {
  display: block;
  color: var(--accent);
  font-size: 22px;
  line-height: 1.3;
}
.support-reserve progress {
  grid-column: 1/-1;
  width: 100%;
  height: 5px;
  margin: 0;
}
.support-reserve small {
  grid-column: 1/-1;
  font-size: 9px;
}
.support-row {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-basis: 100%;
  padding: 11px 0;
  border-top: 1px solid #294354;
  color: #bacee2;
  font-size: 12px;
  line-height: 1.5;
}
.support-row > .icon,
.support-row b {
  color: var(--accent);
}
.support-row small {
  color: #829db2;
}
@media (max-width: 699px) {
  .beta-notice {
    display: block;
    font-size: 10px;
    padding: 8px 10px;
  }
  .beta-notice strong {
    margin-right: 8px;
  }
  .support-reserve {
    padding: 10px;
    grid-template-columns: 22px minmax(0, 1fr);
    gap: 4px 6px;
  }
  .support-reserve-icon .icon {
    width: 22px;
    height: 22px;
  }
  .support-reserve strong {
    font-size: 20px;
  }
  .topbar #stop {
    width: 30px;
    min-height: 36px;
    padding: 6px;
  }
}

/* Global professions and one compact activity strip below their XP bars. */
:root {
  --header-height: 112px;
}
.topbar {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) minmax(0, 600px) auto;
  grid-template-rows: 60px 38px;
  gap: 0 24px;
  padding: 7px 30px;
}
.top-brand {
  grid-column: 1;
  grid-row: 1 / 3;
}
.top-tools {
  grid-column: 3;
  grid-row: 1 / 3;
}
.top-xp {
  grid-column: 2;
  grid-row: 1;
  max-width: none;
  width: 100%;
  gap: 18px;
}
.top-xp .xp-block {
  min-width: 0;
  max-width: none;
}
.top-xp .xp-label {
  gap: 4px;
}
.top-activity-strip {
  grid-column: 2;
  grid-row: 2;
  min-width: 0;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 0 8px;
  position: relative;
  padding: 0 0 5px;
  font-size: 11px;
}
.top-activity-strip .material-icon {
  width: 28px;
  height: 28px;
}
.top-activity-strip .material-icon svg {
  width: 100%;
  height: 100%;
}
.top-activity-strip #top-activity-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--cyan);
}
.top-activity-strip #activity-countdown {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
  min-inline-size: 7ch;
  text-align: right;
  color: var(--muted);
}
.top-activity-strip #activity-progress {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 3px;
  margin: 0;
}
.top-activity-strip #stop {
  width: 28px;
  min-height: 28px;
  padding: 5px;
}

/* Progress reports stay beside the brand; mobile notices live outside the header. */
#offline-desktop-slot {
  display: contents;
}
.offline-notification {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  min-width: 32px;
}
.offline-notification.is-toast {
  flex: 1 1 240px;
  min-width: 0;
  max-width: 280px;
}
.offline-toast {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid #366773;
  border-radius: 10px;
  background: #0c2330f5;
  box-shadow: 0 5px 22px #0005;
  min-width: 0;
}
.offline-toast-copy {
  display: grid;
  gap: 4px;
  flex: 1;
  min-width: 0;
  font-size: 10px;
  color: var(--muted);
}
.offline-toast-copy strong {
  color: var(--accent);
  font-size: 11px;
}
.offline-toast-copy span {
  overflow-wrap: anywhere;
}
.offline-toast-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.offline-toast-actions .secondary {
  padding: 6px 8px;
  min-height: 32px;
  font-size: 10px;
}
.offline-notification .icon-button {
  width: 32px;
  min-height: 32px;
  padding: 6px;
  color: var(--accent);
}
@media (min-width: 700px) and (max-width: 1279px) {
  .topbar:has(#offline-notification:not([hidden])) {
    grid-template-columns: 240px minmax(0, 1fr) auto;
  }
  .offline-notification.is-toast {
    flex: 0 0 32px;
    min-width: 32px;
  }
  .offline-toast {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 300px;
  }
}
@media (max-width: 699px) {
  .offline-notification,
  .offline-notification.is-toast {
    position: fixed;
    bottom: var(--offline-bottom, calc(90px + env(safe-area-inset-bottom)));
    left: 12px;
    right: 12px;
    z-index: 45;
    display: flex;
    justify-content: flex-end;
    max-width: none;
    pointer-events: none;
  }
  .offline-toast {
    width: 100%;
  }
  .offline-toast,
  #offline-reopen {
    pointer-events: auto;
  }
  #offline-reopen {
    background: #0c2330f5;
    border: 1px solid #366773;
  }
}
@media (min-width: 700px) and (max-width: 1100px) {
  .topbar {
    grid-template-columns: 190px minmax(0, 1fr) auto;
    padding: 7px 18px;
    gap: 0 14px;
  }
  .top-xp {
    gap: 8px;
  }
  .top-xp .xp-label {
    font-size: 9px;
  }
}
@media (max-width: 699px) {
  :root {
    --header-height: 142px;
  }
  .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: 54px 35px 38px;
    padding: 4px 16px 11px;
    gap: 0 10px;
  }
  .top-brand {
    grid-column: 1;
    grid-row: 1;
  }
  .top-tools {
    grid-column: 2;
    grid-row: 1;
  }
  .top-xp {
    grid-column: 1 / -1;
    grid-row: 2;
    gap: 8px;
    padding: 0;
  }
  .top-xp .xp-label {
    font-size: 8px;
  }
  .top-xp .xp-label b {
    font-size: 8px;
    white-space: nowrap;
  }
  .top-activity-strip {
    grid-column: 1 / -1;
    grid-row: 3;
  }
}

/* Ship hangar: combat and mining side by side, environment below. */
.app-shell:has(#view-ship:not([hidden])) {
  grid-template-columns: 232px minmax(0, 1fr);
}
.app-shell:has(#view-ship:not([hidden])) > .right-panel {
  display: none;
}
.ship-hangar-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  gap: 20px;
  margin-bottom: 20px;
}
.ship-hangar-grid > .panel {
  min-width: 0;
  margin: 0;
  padding: 20px;
  border-color: #3cbbcd50;
  background: linear-gradient(135deg, #0d2031ef, #0a1524ed);
}
.hangar-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 18px;
  margin-bottom: 20px;
  border-bottom: 1px solid #4b829533;
}
.hangar-heading h2 {
  margin: 0;
  color: #9cdef0;
  font-size: 18px;
  letter-spacing: 1px;
}
.hangar-heading p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}
.hangar-symbol {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border: 1px solid #3cbbcd50;
  border-radius: 10px;
  color: var(--cyan);
  background: #1aa6b30a;
}
.hangar-symbol .icon {
  width: 27px;
  height: 27px;
}
.ship-identity {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
  max-width: 200px;
}
.ship-identity #ship-blueprint {
  width: 65px;
}
.ship-identity .ship-blueprint {
  width: 65px;
  height: 65px;
  margin: 0;
}
.ship-identity .ship-blueprint text {
  display: none;
}
.ship-identity strong {
  font-size: 12px;
  color: var(--cyan);
}
.ship-identity small {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin: 4px 0;
}
.ship-identity .tier-pill {
  font-size: 9px;
  padding: 3px 6px;
}
.ship-combat-panel .combat-health {
  margin-bottom: 22px;
  gap: 12px;
}
.ship-combat-panel .combat-health label {
  font-size: 13px;
}
.ship-combat-panel .combat-health progress {
  height: 9px;
  margin: 0;
}
.ship-combat-panel .combat-loadout {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 6px 12px;
  border: 1px solid #397b9540;
  border-radius: 10px;
  padding: 12px;
  margin-top: 9px;
  background: #050f1c50;
}
.ship-combat-panel .combat-loadout .material-icon,
.ship-combat-panel .combat-loadout .hangar-symbol {
  grid-column: 1;
  grid-row: 1 / 3;
  width: 46px;
  height: 46px;
  align-self: center;
}
.ship-combat-panel .combat-loadout .material-icon .icon {
  width: 40px;
  height: 40px;
}
.ship-combat-panel .combat-loadout label {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  align-items: center;
  gap: 8px;
  font-size: 13px;
}
.ship-combat-panel .combat-loadout select {
  width: 100%;
  min-width: 0;
  margin: 0;
  font-size: 11px;
  padding: 9px;
  background-color: #071525;
}
.ship-combat-panel .combat-loadout > small {
  grid-column: 2;
  margin: 0;
  font-size: 10px;
  line-height: 1.5;
}
.ship-combat-panel .planned-slot {
  grid-template-columns: 46px minmax(0, 1fr) auto;
}
.planned-slot strong {
  font-size: 13px;
}
.planned-slot .tier-pill {
  align-self: center;
  font-size: 8px;
  white-space: nowrap;
}
.combat-mastery-heading {
  margin: 24px 0 12px;
  font-size: 13px;
  color: #67dce1;
  letter-spacing: 1px;
}
.ship-combat-panel .combat-skills {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  margin-top: 0;
}
.ship-combat-panel .combat-skills .xp-block {
  min-width: 0;
}
.laser-equipment-panel .laser-slot-list {
  display: grid;
  gap: 8px;
}
.laser-equipment-panel .laser-slot {
  padding: 10px;
  border: 1px solid #397b9540;
  border-radius: 9px;
  background: #050f1c50;
}
.laser-equipment-panel .has-equipped-laser {
  border-color: #4dd3b480;
  background: #14b89e0b;
}
.laser-overview {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}
.laser-overview .material-icon {
  width: 38px;
  height: 38px;
}
.laser-overview .material-icon .icon {
  width: 34px;
  height: 34px;
}
.laser-overview strong {
  font-size: 13px;
  color: #7ee1e8;
}
.laser-overview small {
  font-size: 10px;
}
.laser-ownership {
  font-size: 10px;
  white-space: nowrap;
}
.laser-slot .laser-assignment {
  display: block;
  margin-top: 8px;
}
.laser-slot .laser-assignment select {
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 8px;
  font-size: 10px;
}
.laser-performance {
  font-size: 9px;
  line-height: 1.5;
}
.laser-tier-warning,
.laser-slot .laser-tier-warning,
#quick-laser .laser-tier-warning,
#ship-laser .laser-tier-warning {
  display: block;
  color: #f2c578;
  font-size: 11px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.laser-equipment-panel .laser-slot:has(.laser-tier-warning) {
  border-color: #b78c4c;
}
.laser-owned-copies {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 12px;
  margin-top: 7px;
}
.laser-copy {
  min-width: 0;
  font-size: 9px;
}
.laser-copy small {
  overflow-wrap: anywhere;
  font-size: 9px;
}
.ship-support-panel {
  grid-column: 1 / -1;
}
.ship-support-panel .support-panel {
  display: block;
}
.ship-support-panel .support-reserves {
  max-width: 550px;
}
.environment-module-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}
.environment-module {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 12px;
  border: 1px solid #397b9540;
  border-radius: 10px;
  background: #050f1c50;
}
.environment-module.module-owned {
  border-color: #4dd3b460;
}
.environment-module .material-icon {
  width: 42px;
  height: 42px;
}
.environment-module .material-icon .icon {
  width: 36px;
  height: 36px;
}
.environment-module strong {
  font-size: 11px;
}
.environment-module small {
  display: block;
  font-size: 9px;
  color: var(--muted);
  line-height: 1.5;
}
.environment-module .quality-badge {
  margin-top: 4px;
}
.module-state .tier-pill,
.module-state button {
  font-size: 9px;
  padding: 5px;
}
.module-supply {
  grid-column: 1 / -1;
  border-top: 1px solid #397b9530;
  padding-top: 7px;
}
@media (max-width: 1400px) {
  .ship-identity {
    max-width: 150px;
  }
  .ship-identity #ship-blueprint {
    display: none;
  }
  .hangar-heading h2 {
    font-size: 15px;
  }
  .environment-module-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 1100px) {
  .app-shell:has(#view-ship:not([hidden])) {
    display: block;
  }
  .ship-combat-panel .combat-loadout label {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 800px) {
  .ship-hangar-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .ship-identity #ship-blueprint {
    display: block;
  }
  .ship-identity {
    max-width: 200px;
  }
  .ship-combat-panel .combat-loadout label {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  }
}
@media (max-width: 480px) {
  .ship-hangar-grid > .panel {
    padding: 14px;
  }
  .hangar-heading {
    flex-wrap: wrap;
    gap: 9px;
  }
  .ship-identity {
    width: 100%;
    max-width: none;
    margin-left: 0;
    padding-left: 49px;
  }
  .ship-identity #ship-blueprint {
    width: 48px;
  }
  .ship-identity .ship-blueprint {
    width: 48px;
    height: 48px;
  }
  .environment-module-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .ship-combat-panel .combat-loadout label {
    grid-template-columns: minmax(0, 1fr);
  }
  .ship-combat-panel .combat-loadout {
    gap: 5px 8px;
    padding: 10px;
  }
  .planned-slot .tier-pill {
    white-space: normal;
    max-width: 82px;
    text-align: center;
  }
}
@media (min-width: 801px) {
  .laser-equipment-panel .laser-slot {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    gap: 4px 10px;
  }
  .laser-overview {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 2px 8px;
  }
  .laser-ownership {
    grid-column: 2;
    font-size: 9px;
  }
  .laser-slot .laser-assignment {
    margin-top: 0;
    align-self: center;
  }
  .laser-performance,
  .laser-tier-warning,
  .laser-owned-copies {
    grid-column: 1 / -1;
  }
  .laser-slot .laser-owned-copies {
    margin-top: 0;
  }
  .laser-copy {
    display: flex;
    align-items: center;
    gap: 5px;
  }
  .laser-copy small {
    margin: 0;
  }
}

.top-activity-strip #top-activity-label {
  grid-column: 2;
}
.top-activity-strip #activity-countdown {
  grid-column: 3;
}
.top-activity-strip #stop {
  grid-column: 4;
}
.top-activity-strip:has(#activity-icon[hidden]) #top-activity-label {
  grid-column: 1 / 3;
}

/* Central production catalogue. Planet badges describe origin, never location gates. */
.app-shell:has(#view-craft:not([hidden])) {
  grid-template-columns: 232px minmax(0, 1fr);
}
.app-shell:has(#view-craft:not([hidden])) > .right-panel {
  display: none;
}
.catalog-toolbar {
  display: grid;
  grid-template-columns: minmax(210px, 1fr) minmax(0, 2.5fr);
  gap: 12px;
  padding: 15px;
  margin-bottom: 18px;
  border-color: #3cbbcd50;
}
.catalog-toolbar input[type="search"] {
  width: 100%;
  min-width: 0;
  height: 42px;
  align-self: end;
  font-size: 12px;
}
.catalog-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.catalog-filters label {
  display: grid;
  gap: 4px;
  min-width: 0;
  font-size: 9px;
  color: var(--muted);
}
.catalog-filters select {
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 10px 7px;
  font-size: 10px;
}
.catalog-toggles {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 22px;
}
.catalog-toggles label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  cursor: pointer;
}
.catalog-toggles input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--cyan);
}
.catalog-toggles .text-button {
  margin: 0 0 0 auto;
  font-size: 10px;
  padding: 6px;
}
.catalog-overview {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}
.catalog-categories {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}
.catalog-categories .filter {
  font-size: 11px;
  min-height: 35px;
  padding: 8px 13px;
}
.catalog-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 15px;
  font-size: 10px;
  color: var(--muted);
  margin-left: auto;
}
.catalog-summary b {
  color: var(--cyan);
  font-size: 14px;
  margin-left: 4px;
}
.catalog-result-count,
.catalog-unlock-note {
  font-size: 10px;
  color: var(--muted);
  margin: 0 0 12px;
}
.catalog-grid {
  overflow-anchor: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 22px;
  align-items: start;
}
.catalog-card {
  min-width: 0;
  padding: 13px;
  border: 1px solid #398ba650;
  border-radius: 12px;
  background: linear-gradient(135deg, #0e2132ed, #081523ed);
}
.catalog-card.is-crafting {
  border-color: #62e4df;
  box-shadow: inset 0 0 20px #54d5ca0a;
}
.catalog-card-heading {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
}
.catalog-card-heading .material-icon {
  width: 42px;
  height: 42px;
}
.catalog-card-heading .material-icon .icon {
  width: 36px;
  height: 36px;
}
.catalog-card-heading h3 {
  margin: 0 0 4px;
  font-size: 13px;
  overflow-wrap: anywhere;
}
.catalog-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 3px 6px;
}
.catalog-badges .tier-pill {
  font-size: 8px;
  padding: 2px 4px;
}
.catalog-badges small,
.catalog-badges .quality-badge {
  font-size: 8px;
}
.catalog-time {
  align-self: start;
  color: var(--muted);
  font-size: 9px;
  white-space: nowrap;
}
.catalog-card.is-crafting .catalog-time {
  max-width: 85px;
  white-space: normal;
  text-align: right;
}
.catalog-owned-count {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.catalog-owned-equipment {
  display: flex;
  flex-wrap: wrap;
  gap: 3px 6px;
  align-items: center;
  margin: 3px 0 5px;
}
.catalog-owned-equipment > small {
  color: var(--muted);
  font-size: 9px;
}
.catalog-owned-qualities {
  display: inline-flex;
  gap: 3px;
}
.catalog-owned-quality {
  min-width: 20px;
  padding: 2px 4px;
  border: 1px solid transparent;
  border-radius: 4px;
  text-align: center;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}
.catalog-owned-quality.is-zero {
  opacity: 0.5;
}
.catalog-owned-quality.selected {
  border-color: var(--quality);
  opacity: 1;
}
.catalog-owned-quality:focus-visible {
  outline: 1px solid var(--quality);
}
.catalog-run-summary {
  margin-top: 7px;
  color: var(--cyan);
  font-size: 10px;
  line-height: 1.5;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}
.top-activity-strip #activity-countdown {
  max-width: 135px;
  text-align: right;
  line-height: 1.35;
}
@media (max-width: 700px) {
  .top-activity-strip.has-production-run #activity-icon {
    grid-column: 1;
    grid-row: 1 / 3;
  }
  .top-activity-strip.has-production-run #top-activity-label {
    grid-column: 2 / 4;
    grid-row: 1;
  }
  .top-activity-strip.has-production-run #activity-countdown {
    grid-column: 2 / 4;
    grid-row: 2;
    max-width: none;
    font-size: 9px;
    text-align: left;
  }
  .top-activity-strip.has-production-run #stop {
    grid-row: 1 / 3;
  }
}
.catalog-quality {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
  margin: 10px 0;
}
.catalog-quality .quality-choice {
  padding: 4px 2px;
  min-height: 26px;
  min-width: 0;
  font-size: 9px;
  font-weight: 500;
  background: #06121c60;
  border-color: #324859;
  overflow-wrap: anywhere;
}
.catalog-quality .quality-choice.selected {
  background: #52d4c51a;
  border-color: var(--cyan);
  box-shadow: inset 0 0 0 1px #52d4c52a;
}
.catalog-materials {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 10px;
  border-top: 1px solid #397b9530;
  padding-top: 8px;
}
.catalog-material {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 5px;
  min-width: 0;
  font-size: 9px;
  line-height: 1.35;
}
.catalog-material-copy {
  color: inherit;
}
.catalog-material-copy b {
  margin-left: 4px;
}
.catalog-material.available {
  color: var(--uncommon);
}
.catalog-material .ingredient-art .icon {
  width: 22px;
  height: 22px;
}
.catalog-material > span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.catalog-material .ingredient-link {
  font-size: inherit;
  padding: 0;
  text-align: left;
  color: inherit;
  white-space: normal;
  overflow-wrap: anywhere;
}
.catalog-material .ingredient-link .icon {
  width: 9px;
  height: 9px;
}
.catalog-material b {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-size: 9px;
}
.catalog-material.missing {
  color: #fa939a;
}
.catalog-card-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  margin-top: 10px;
}
.catalog-card-footer .recipe-status {
  display: block;
  margin: 0;
  font-size: 10px;
  line-height: 1.45;
}
.catalog-card-footer small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
}
.catalog-card-footer button {
  min-width: 86px;
  min-height: 38px;
  padding: 9px 13px;
  font-size: 11px;
}
.catalog-progress {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
  font-size: 9px;
  color: var(--cyan);
}
.catalog-progress progress {
  width: 100%;
  height: 5px;
  margin: 0;
}
.catalog-empty {
  grid-column: 1 / -1;
  padding: 30px;
  text-align: center;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--muted);
}
.catalog-empty h3 {
  font-size: 16px;
}
.catalog-empty p {
  font-size: 12px;
}
@media (max-width: 1100px) {
  .app-shell:has(#view-craft:not([hidden])) {
    display: block;
  }
  .catalog-toolbar {
    grid-template-columns: minmax(0, 1fr);
  }
  .catalog-summary {
    margin-left: 0;
  }
}
@media (max-width: 699px) {
  .catalog-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }
  .catalog-toolbar {
    padding: 12px;
  }
  .catalog-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .catalog-card {
    padding: 12px;
  }
  .catalog-categories {
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
  }
  .catalog-categories .filter {
    flex: 0 0 auto;
    font-size: 10px;
    padding: 7px 10px;
  }
  .catalog-overview {
    min-width: 0;
  }
  .catalog-card-footer button {
    min-height: 42px;
  }
  .catalog-materials {
    gap: 6px;
  }
  .catalog-card-heading h3 {
    font-size: 12px;
  }
  .catalog-quality .quality-choice {
    font-size: 8px;
  }
}
@media (max-width: 360px) {
  .catalog-materials {
    grid-template-columns: minmax(0, 1fr);
  }
  .catalog-card-heading {
    grid-template-columns: 36px minmax(0, 1fr) auto;
    gap: 6px;
  }
  .catalog-card-heading .material-icon {
    width: 36px;
    height: 36px;
  }
  .catalog-card-heading .material-icon .icon {
    width: 30px;
    height: 30px;
  }
}
.catalog-blocker-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 10px;
}
.catalog-blocker-actions:empty {
  display: none;
}
.catalog-blocker-actions .ingredient-link {
  font-size: 9px;
  padding: 5px 0 0;
}
.catalog-blocker-actions .ingredient-link .icon {
  width: 10px;
  height: 10px;
}
.catalog-toolbar input[type="search"] {
  background: #081725;
  border: 1px solid #3c789650;
  color: var(--text);
  border-radius: 8px;
  padding: 10px 12px;
  outline: none;
}
.catalog-toolbar input[type="search"]:focus {
  border-color: var(--cyan);
}
.catalog-toggles .text-button {
  width: auto;
  min-height: 26px;
}
@media (max-width: 699px) {
  .catalog-filters {
    display: flex;
    overflow-x: auto;
    max-width: 100%;
    padding-bottom: 5px;
  }
  .catalog-filters label {
    flex: 0 0 128px;
  }
  .catalog-toolbar {
    min-width: 0;
    gap: 10px;
  }
  .catalog-toggles {
    gap: 8px 12px;
  }
  .catalog-toggles label {
    font-size: 10px;
  }
}

/* A precursor is a physical piece, shown independently of stack inputs. */
.catalog-precursor { display:flex; align-items:center; gap:.7rem; padding:.55rem .7rem; border:1px solid currentColor; border-radius:.55rem; font-size:.8rem; }
.catalog-precursor > div { flex:1; min-width:0; }
.catalog-precursor strong, .catalog-precursor small { display:block; overflow-wrap:anywhere; }
.precursor-choice { display:flex; align-items:center; gap:.5rem; font-size:.75rem; }
.precursor-choice select { min-width:0; flex:1; }
.equipment-upgrade-note { margin:.25rem 0; font-size:.72rem; color:var(--muted); }
.environment-module select { max-width:100%; min-width:0; font-size:.75rem; }

.source-highlight { outline: 3px solid var(--accent, #64e4e4); outline-offset: 3px; box-shadow: 0 0 22px #64e4e44; }
.source-location-label { display: block; color: #83eeee; font-size: .75rem; font-weight: 700; margin-bottom: .5rem; }
#source-choice { width: min(32rem, calc(100vw - 2rem)); max-height: 85dvh; overflow: auto; }
#source-choices { display: grid; gap: .75rem; margin: 1rem 0; }
#source-choices button { white-space: normal; text-align: left; }

/* Single-stack NPC fallback. Reusable item/quantity/price/action vocabulary. */
#view-trader .npc-toolbar { display:grid; grid-template-columns:minmax(0,1fr) minmax(160px,.55fr); gap:12px; margin:12px 0; }
#view-trader .npc-toolbar label { display:grid; gap:5px; min-width:0; font-size:12px; color:var(--muted); }
#view-trader .npc-toolbar input, #view-trader .npc-toolbar select { width:100%; min-width:0; min-height:40px; }
#view-trader .npc-filters { display:flex; flex-wrap:wrap; gap:6px; }
#view-trader .npc-filters button { padding:8px 12px; min-height:38px; font-size:12px; }
#view-trader .npc-filters [aria-pressed="true"] { border-color:var(--accent); color:var(--accent); background:#15343e; }
#view-trader #npc-summary { font-size:12px; margin:10px 0; }
#view-trader .trader-list { gap:8px; }
#view-trader .npc-row { display:grid; grid-template-columns:minmax(130px,1fr) 56px 76px minmax(170px,1fr) minmax(90px,.8fr) 68px; gap:8px; align-items:center; padding:12px; min-width:0; border-radius:10px; }
#view-trader .npc-row > * { min-width:0; }
#view-trader .trader-item { display:flex; gap:8px; }
#view-trader .trader-item > div { display:block; min-width:0; flex:1; }
#view-trader .trader-item .material-icon { width:40px; height:40px; flex:0 0 40px; }
#view-trader .trader-item .material-icon .item-art { width:100%; height:100%; }
#view-trader .trader-item h3 { font-size:13px; margin:0 0 5px; overflow-wrap:anywhere; }
#view-trader .npc-badges { display:flex; flex-wrap:wrap; align-items:center; gap:5px; font-size:10px; color:var(--muted); }
#view-trader .npc-badges .quality-badge { margin:0; font-size:10px; }
#view-trader .npc-owned { display:grid; gap:5px; }
#view-trader .npc-owned strong { font-size:14px; color:var(--quality); overflow-wrap:anywhere; }
#view-trader .npc-owned small, #view-trader .trader-price small, #view-trader .npc-result small { font-size:10px; color:var(--muted); }
#view-trader .trader-price strong { font-size:14px; line-height:1.4; overflow-wrap:anywhere; }
#view-trader .sell-controls { grid-column:auto; width:auto; padding:0; display:grid; grid-template-columns:minmax(0,1fr); gap:6px; }
#view-trader .npc-quick { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:4px; }
#view-trader .npc-quick button { min-width:0; min-height:34px; padding:5px 2px; font-size:11px; white-space:nowrap; }
#view-trader .npc-quick .npc-half { color:#a7ffff; border-color:#51bdc9; background:#16434d; box-shadow:inset 0 0 8px #66eeee22; }
#view-trader .npc-quick [aria-pressed="true"] { outline:2px solid var(--accent); outline-offset:1px; }
#view-trader .npc-exact { display:flex; align-items:center; gap:6px; }
#view-trader .npc-exact label { margin:0; font-size:10px; }
#view-trader .npc-exact input { flex:1; width:65px; min-width:0; min-height:32px; font-size:12px; padding:5px 7px; }
#view-trader .npc-result { display:grid; gap:5px; }
#view-trader .npc-result .npc-daily-cap { cursor:help; -webkit-user-select:none; user-select:none; color:#ebc887; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
#view-trader .npc-instance { display:grid; gap:5px; color:var(--muted); font-size:11px; overflow-wrap:anywhere; }
#view-trader .npc-result strong { font-size:11px; color:#ebc887; overflow-wrap:anywhere; }
#view-trader [data-sell] { min-height:42px; padding:8px; font-size:12px; }
@media(max-width:1100px) {
 #view-trader .npc-toolbar { grid-template-columns:minmax(0,1fr); gap:8px; }
 #view-trader .npc-row { grid-template-columns:minmax(0,1fr) auto; gap:9px; }
 #view-trader .trader-item { grid-column:1; grid-row:1; }
 #view-trader .npc-owned { grid-column:2; grid-row:1; text-align:right; max-width:85px; }
 #view-trader .trader-price { grid-column:1 / -1; grid-row:2; display:flex; align-items:center; gap:8px; }
 #view-trader .sell-controls { grid-column:1 / -1; grid-row:3; }
 #view-trader .npc-instance { grid-column:1 / -1; grid-row:3; }
 #view-trader .npc-quick button { min-height:40px; font-size:12px; }
 #view-trader .npc-exact label { display:block; }
 #view-trader .npc-exact input { min-height:44px; font-size:16px; }
 #view-trader .npc-result { grid-column:1; grid-row:4; }
 #view-trader [data-sell] { grid-column:2; grid-row:4; min-width:78px; }
}
#view-trader .npc-toolbar input { color:var(--text); background:#0b1b2a; border:1px solid #345064; border-radius:8px; padding:9px 12px; }
#view-trader .npc-filters button { color:#a7becf; background:#0d2030; border-color:#2c465b; }
#view-trader .npc-filters [aria-pressed="true"] { color:#a7ffff; background:#16434d; border-color:#51bdc9; box-shadow:inset 0 0 8px #66eeee22; }

/* Statistics V1: lifetime records, compact podium and server-owned ranking. */
.app-shell:has(#view-statistics:not([hidden])) { grid-template-columns: 232px minmax(0, 1fr); }
.app-shell:has(#view-statistics:not([hidden])) > .right-panel { display: none; }
.statistics-heading { display:flex; align-items:center; gap:12px; margin-bottom:14px; }
.statistics-heading-icon { color:var(--accent); padding:12px; border:1px solid #397b9560; border-radius:10px; background:#0c202d; }
.statistics-heading-icon .icon { width:27px; height:27px; }
.statistics-heading h1 { font-size:27px; margin:0 0 4px; }
.statistics-heading p { font-size:12px; color:var(--muted); margin:0; }
.statistics-heading > button { margin-left:auto; padding:9px 12px; font-size:11px; }
.statistics-categories { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:8px; margin-bottom:12px; }
.statistics-category { display:flex; justify-content:center; align-items:center; gap:8px; padding:11px 8px; border:1px solid #2b4b60; border-radius:8px; background:#0b1a28; color:#9cb6ca; font-size:12px; min-width:0; }
.statistics-category .icon { width:19px; height:19px; flex-shrink:0; }
.statistics-category.active { color:#82eeec; border-color:#5de4e7; background:#143744; box-shadow:inset 0 0 16px #39d3df13; }
.statistics-toolbar { display:flex; flex-wrap:wrap; align-items:end; gap:12px; padding:12px; border:1px solid #33576b; border-radius:10px; background:#0b1d2bea; }
.statistics-toolbar .statistics-filter { flex:1 1 150px; gap:6px; font-size:11px; }
.statistics-toolbar .statistics-search { flex:1.3 1 210px; }
.statistics-toolbar input, .statistics-toolbar select { padding:9px 10px; font-size:12px; min-width:0; height:37px; }
.statistics-lifetime { padding:10px 3px; font-size:10px; color:#72ddd8; }
#statistics-message { margin:8px 0; font-size:11px; color:#93afc3; }
#statistics-message:empty { display:none; }
.statistics-search-results { margin:0; }
.statistics-search-results:not(:empty) { margin:10px 0; }
.statistics-search-results button { padding:7px 11px; font-size:11px; }
.statistics-search-results p { font-size:12px; margin:5px; }
.statistics-layout { display:grid; grid-template-columns:minmax(0,1fr) minmax(260px,310px); gap:12px; align-items:start; margin-top:14px; }
.statistics-main, .statistics-personal { min-width:0; }
.statistics-personal { display:grid; gap:10px; }
.statistics-personal .panel { margin:0; }
.statistics-personal .panel, .statistics-ranking, .statistics-profile { padding:14px; border:1px solid #2e566d; border-radius:10px; background:linear-gradient(135deg,#0b2231ed,#071421f5); }
.statistics-personal h2, .statistics-ranking h2, .statistics-profile h2 { font-size:14px; margin:0 0 10px; }
.statistics-panel-heading { display:flex; justify-content:space-between; gap:12px; align-items:center; }
.statistics-panel-heading h2 { margin:0; }
#leaderboard-context { font-size:10px; color:#83b3c9; text-align:right; overflow-wrap:anywhere; }
.statistics-podium { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; align-items:end; margin:10px 0 12px; }
.statistics-podium:empty { display:none; }
.statistics-podium-card { --podium-colour:#b8d0e2; display:flex; flex-direction:column; align-items:center; gap:5px; padding:23px 8px 10px; min-width:0; min-height:138px; border:1px solid var(--podium-colour); border-radius:10px; background:linear-gradient(140deg,#051d32b0,#061725ed),url("assets/planets/space-blue.webp") center/cover; box-shadow:inset 0 0 24px #87cce619,0 0 10px #aedcf312; position:relative; text-align:center; line-height:1.2; }
.statistics-podium-card.rank-1 { --podium-colour:#efc65a; min-height:152px; background:radial-gradient(ellipse at top,#d19b3435,transparent 75%),linear-gradient(140deg,#1e180c99,#0d1825eb),url("assets/planets/space-violet.webp") center/cover; box-shadow:inset 0 0 24px #ffcc4120,0 0 14px #dfb33c30; }
.statistics-podium-card.rank-3 { --podium-colour:#cd936f; background:linear-gradient(140deg,#381c13bb,#081724ef),url("assets/planets/space-violet.webp") center/cover; box-shadow:inset 0 0 24px #de8a5b1c,0 0 10px #c7886b12; }
.statistics-medal { position:absolute; top:-11px; left:50%; transform:translateX(-50%); display:grid; place-items:center; width:34px; height:34px; border:1px solid var(--podium-colour); border-radius:9px 9px 14px 14px; color:var(--podium-colour); background:linear-gradient(135deg,#24405a,#071725); box-shadow:0 0 12px color-mix(in srgb,var(--podium-colour) 35%,transparent); font-size:15px; font-weight:800; }
.statistics-podium-card.rank-1 .statistics-medal { background:linear-gradient(135deg,#ffe293,#c9932f); color:#2b200b; border-color:#ffe49c; }
.statistics-avatar { display:grid; place-items:center; width:38px; height:38px; flex-shrink:0; border:1px solid var(--podium-colour); border-radius:50%; color:var(--podium-colour); background:radial-gradient(circle at 30% 25%,#76c5dd66,#0b243d 60%,#020b19); box-shadow:0 0 12px color-mix(in srgb,var(--podium-colour) 30%,transparent),inset -7px -5px 10px #0008; font-size:17px; font-weight:700; }
.statistics-player-name { min-height:0; background:none; border:0; border-radius:0; color:inherit; padding:0; font:inherit; text-align:left; min-width:0; overflow-wrap:anywhere; }
.statistics-player-name:hover { color:#72ece9; text-decoration:underline; }
.statistics-podium-card .statistics-player-name { max-width:100%; text-align:center; font-size:12px; font-weight:650; }
.statistics-podium-card > strong { font-size:20px; color:var(--podium-colour); overflow-wrap:anywhere; max-width:100%; }
.statistics-podium-card small { font-size:10px; color:#9aafc0; overflow-wrap:anywhere; }
.statistics-podium-empty { font-size:11px; color:#8eacbf; margin:auto 0; }
.statistics-ranking { margin-bottom:0; }
.statistics-leaderboard { table-layout:fixed; font-size:12px; margin-top:10px; }
.statistics-leaderboard th, .statistics-leaderboard td { padding:7px 7px; }
.statistics-leaderboard th:first-child { width:45px; }
.statistics-leaderboard th:last-child { width:36%; }
.statistics-leaderboard th:last-child, .statistics-leaderboard td:last-child { text-align:right; font-variant-numeric:tabular-nums; }
.statistics-leaderboard td:first-child { color:#aac0d0; font-weight:700; }
.statistics-leaderboard .rank-1 { color:#efc65a !important; }
.statistics-leaderboard .rank-2 { color:#c3deed !important; }
.statistics-leaderboard .rank-3 { color:#cd936f !important; }
.statistics-leaderboard .is-own { background:#174a5560; color:#81eeea; box-shadow:inset 3px 0 #53dddf; }
.statistics-you { display:inline-block; color:#79e4df; font-size:9px; margin-left:7px; }
.statistics-podium-card .statistics-you { margin:0; }
.statistics-summary { display:grid; gap:0; margin:8px 0 0; }
.statistics-summary > div { display:flex; justify-content:space-between; align-items:baseline; gap:12px; min-width:0; padding:9px 0; border-bottom:1px solid #35536a50; }
.statistics-summary > div:last-child { border-bottom:0; }
.statistics-summary dt { font-size:11px; color:#a1b6ca; min-width:0; overflow-wrap:anywhere; }
.statistics-summary dd { font-size:13px; font-weight:650; color:#dcf3f4; margin:0; text-align:right; overflow-wrap:anywhere; min-width:0; }
.statistics-pilot { color:#7ae3dd; margin:0; font-size:12px; overflow-wrap:anywhere; }
.statistics-tracking, .statistics-position > div > small { display:block; color:#91aabd; font-size:10px; line-height:1.5; margin-top:10px; }
.statistics-own-rank { display:grid; gap:2px; min-width:0; }
.statistics-own-rank > strong { color:#72e5e1; font-size:36px; font-weight:800; text-shadow:0 0 18px #46dade40; }
.statistics-own-rank b { font-size:12px; overflow-wrap:anywhere; }
.statistics-own-rank small { display:block; color:#92afc3; font-size:10px; line-height:1.4; }
.statistics-position-value { display:block; margin:3px 0; font-size:18px; color:#dceaf2; font-weight:650; }
.statistics-data-note, .statistics-time-note { font-size:10px; color:#8da9bf; line-height:1.6; margin:0; }
.statistics-time-note { margin-top:10px; }
.statistics-own-panel .statistics-notice { margin:10px 0 0; font-size:10px; padding:4px 8px; line-height:1.5; }
.statistics-empty { color:#9cb4c6; font-size:12px; padding:24px 4px; }
.statistics-profile { margin:0 0 14px; }
.statistics-profile .statistics-summary { grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 18px; }
.statistics-profile small { font-size:11px; color:#93b2c5; }
.statistics-profile button.secondary { padding:7px 10px; font-size:11px; }

.statistics-category.active { background:linear-gradient(135deg,#124657,#071d2c); box-shadow:inset 0 0 20px #39d3df20,0 0 8px #39d3df22; }
.statistics-own-panel, .statistics-position { border-color:#39959a !important; box-shadow:inset 0 1px #6ae9e62b,0 0 18px #16a9b40d; }
.statistics-own-panel h2, .statistics-position h2 { display:flex; align-items:center; gap:8px; color:#e5faff; }
.statistics-own-panel h2 .icon, .statistics-position h2 .icon { width:20px; height:20px; color:#6ee8e4; }
.statistics-own-panel .statistics-summary > div:first-child { padding:11px 0; }
.statistics-own-panel .statistics-summary > div:first-child dd { color:#76eeeb; font-size:20px; }
.statistics-position > div { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:12px; align-items:center; }
.statistics-position-score { border-left:1px solid #33566c; padding-left:14px; min-width:0; }
.statistics-position-score small { display:block; font-size:10px; color:#90b7c9; overflow-wrap:anywhere; line-height:1.4; }
.statistics-position-value { overflow-wrap:anywhere; font-variant-numeric:tabular-nums; }
.statistics-crown { position:absolute; top:-14px; left:3px; width:26px; height:17px; fill:#efc65a; stroke:#ffdf86; stroke-width:1; filter:drop-shadow(0 0 5px #eac25288); }
.statistics-position { background:radial-gradient(ellipse at top left,#17485770,transparent 80%),#081b29 !important; }
.statistics-row-avatar { display:inline-grid; place-items:center; width:23px; height:23px; margin-right:9px; border:1px solid #366580; border-radius:50%; background:radial-gradient(circle at 30% 25%,#42667b,#081b2b 70%); color:#9ddae6; font-size:10px; vertical-align:middle; }
.statistics-leaderboard tr.is-own .statistics-row-avatar { border-color:#6af0e7; color:#6af0e7; }
.statistics-leaderboard tbody tr:hover { background:#25445544; }
.statistics-leaderboard td:last-child { font-weight:650; color:#d2e8f1; }
.statistics-leaderboard .is-own td:last-child { color:#75eee8; }
.statistics-leaderboard .is-own { outline:1px solid #49d6d780; outline-offset:-1px; }
.statistics-leaderboard thead { color:#85adc5; font-size:10px; letter-spacing:.05em; }
.statistics-podium:has(> :only-child) { grid-template-columns:minmax(0,1fr); }
.statistics-podium:has(> :only-child) .statistics-podium-card { display:grid; grid-template-columns:42px minmax(0,1fr) auto; grid-template-rows:auto auto; min-height:84px; padding:16px 16px 12px 54px; gap:4px 12px; text-align:left; }
.statistics-podium:has(> :only-child) .statistics-medal { left:23px; top:25px; }
.statistics-podium:has(> :only-child) .statistics-avatar { grid-row:1 / 3; }
.statistics-podium:has(> :only-child) .statistics-player-name { text-align:left; }
.statistics-podium:has(> :only-child) strong { grid-column:3; grid-row:1 / 3; }
.statistics-podium:has(> :only-child) small { grid-column:2; }
.statistics-podium:has(> :only-child) .statistics-you { grid-column:2; }
.statistics-podium:has(> :nth-child(2):last-child) { grid-template-columns:repeat(2,minmax(0,1fr)); }
@media (max-width:1100px) {
 .app-shell:has(#view-statistics:not([hidden])) { display:block; }
}
@media (max-width:800px) {
 .statistics-layout { grid-template-columns:minmax(0,1fr); gap:12px; }
 .statistics-main { display:contents; }
 .statistics-podium { grid-row:1; margin-bottom:0; }
 .statistics-personal { grid-row:2; gap:8px; }
 .statistics-ranking { grid-row:3; }
 .statistics-own-panel .statistics-summary { grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 14px; }
 .statistics-own-panel .statistics-summary > div { display:block; padding:7px 0; }
 .statistics-own-panel .statistics-summary dd { text-align:left; margin-top:4px; }
 .statistics-personal .panel, .statistics-ranking, .statistics-profile { padding:12px; }
 .statistics-position > div { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); align-items:center; gap:12px; }
 .statistics-position h2 { font-size:12px; }
 .statistics-position > div > small { flex-basis:100%; margin-top:3px; }
 .statistics-position-value { margin:0; }
 .statistics-data-note { padding:0 4px; }
 .statistics-heading-icon { padding:9px; }
 .statistics-heading h1 { font-size:22px; }
 .statistics-heading p { font-size:11px; }
 .statistics-heading > button { padding:7px; font-size:10px; max-width:80px; }
 .statistics-categories { gap:5px; }
 .statistics-category { flex-direction:column; gap:5px; padding:8px 3px; font-size:10px; overflow-wrap:anywhere; }
 .statistics-toolbar { gap:9px; padding:10px; }
 .statistics-toolbar .statistics-filter { flex-basis:120px; }
 .statistics-toolbar .statistics-search { flex-basis:100%; }
 .statistics-lifetime { padding:0; }
 .statistics-podium { gap:6px; }
 .statistics-podium-card { padding:22px 5px 9px; min-height:126px; gap:4px; }
 .statistics-podium-card.rank-1 { min-height:138px; }
 .statistics-podium-card > strong { font-size:14px; }
 .statistics-podium-card .statistics-player-name { font-size:11px; }
 .statistics-podium-card small { font-size:9px; }
 .statistics-leaderboard { font-size:11px; }
 .statistics-leaderboard .statistics-player-name { min-height:32px; }
 .statistics-leaderboard th:first-child { width:33px; }
 .statistics-leaderboard th:last-child { width:38%; }
 .statistics-leaderboard th, .statistics-leaderboard td { padding:7px 4px; }
 .statistics-profile .statistics-summary { grid-template-columns:minmax(0,1fr); }
}

@media (max-width:800px) {
 .statistics-row-avatar { width:19px; height:19px; margin-right:5px; }
 .statistics-leaderboard .statistics-you { display:block; margin:0 0 2px 24px; }
 .statistics-podium:has(> :only-child) .statistics-podium-card { grid-template-columns:30px minmax(0,1fr); padding:14px 10px 10px 42px; gap:3px 8px; min-height:78px; }
 .statistics-podium:has(> :only-child) .statistics-medal { left:19px; width:28px; height:30px; top:23px; }
 .statistics-podium:has(> :only-child) .statistics-avatar { width:30px; height:30px; }
 .statistics-podium:has(> :only-child) strong { grid-column:2; grid-row:2; font-size:17px; }
 .statistics-podium:has(> :only-child) small { grid-row:3; }
 .statistics-podium:has(> :only-child) .statistics-avatar { grid-row:1 / 4; }
 .statistics-own-panel .statistics-summary > div:first-child dd { font-size:16px; }
}

/* Statistics production scopes share the existing compact control language. */
.statistics-production-sections { display:flex; flex-wrap:wrap; gap:6px; margin:0 0 10px; }
.statistics-production-sections[hidden] { display:none; }
.statistics-production-sections button { display:flex; align-items:center; gap:7px; padding:8px 14px; font-size:12px; }
.statistics-production-sections .icon { width:17px; height:17px; }
.statistics-production-sections button.active { color:#83efeb; border-color:#57d6d8; background:#123440; box-shadow:inset 0 0 12px #39d3df16; }

/* Public server counts sit below the wordmark without widening the header. */
.brand-block { min-width: 0; flex: 0 1 auto; }
.server-population { margin: 3px 0 0 40px; color: var(--muted); font-size: 10px; line-height: 1.3; letter-spacing: 0; white-space: nowrap; }
.server-population .population-online { color: var(--accent); }
@media (max-width: 699px) {
  .server-population { margin-left: 30px; font-size: 8px; }
}

.offline-toast-items { display: grid; gap: 3px; max-height: 96px; overflow-y: auto; min-width: 0; }
.offline-toast-item { display: grid; grid-template-columns: 20px minmax(0, 1fr); align-items: center; gap: 5px; color: var(--text); }
.offline-toast-item-icon { display: flex; width: 20px; height: 20px; }
.offline-toast-item-icon > * { width: 20px; height: 20px; }

/* Player Market uses the same compact item/price/quantity language as NPC buyback. */
.app-shell:has(#view-market:not([hidden])) { grid-template-columns:232px minmax(0,1fr); }
.app-shell:has(#view-market:not([hidden])) > .right-panel { display:none; }
#view-market { min-width:0; }
.market-heading { display:flex; align-items:center; gap:10px; margin-bottom:14px; }
.market-heading-icon { color:var(--accent); border:1px solid #397b9560; border-radius:10px; padding:12px; background:#0c202d; }
.market-heading-icon .icon { width:26px; height:26px; }
.market-heading h1 { font-size:27px; margin:0 0 4px; }
.market-heading p { margin:0; color:var(--muted); font-size:12px; }
.market-heading > button { margin-left:auto; padding:9px 12px; font-size:12px; }
.market-summary { display:flex; justify-content:space-between; gap:8px; flex-wrap:wrap; color:var(--muted); font-size:12px; margin:12px 0; }
.market-summary strong { color:#ebc887; }
.market-tabs, .market-filter-pills { display:flex; flex-wrap:wrap; gap:6px; }
.market-tabs { margin-bottom:12px; }
.market-tabs button { display:flex; align-items:center; gap:7px; min-height:40px; padding:8px 14px; font-size:12px; }
.market-tabs .icon { width:17px; height:17px; }
.market-tabs [aria-pressed="true"], .market-filter-pills [aria-pressed="true"] { color:#a7ffff; background:#16434d; border-color:#51bdc9; box-shadow:inset 0 0 8px #66eeee22; }
.market-filter-pills button { min-height:36px; padding:7px 12px; font-size:12px; color:#a7becf; background:#0d2030; border-color:#2c465b; }
.market-toolbar { display:grid; grid-template-columns:minmax(160px,1.7fr) repeat(2,minmax(95px,.7fr)) minmax(150px,1fr); gap:9px; margin:12px 0; }
.market-toolbar label, .market-order-controls { display:grid; gap:5px; min-width:0; color:var(--muted); font-size:11px; }
.market-toolbar input, .market-toolbar select, .market-order-controls input { width:100%; min-width:0; min-height:38px; padding:8px 10px; border:1px solid #345064; border-radius:8px; color:var(--text); background:#0b1b2a; font:inherit; }
.market-toolbar input, .market-toolbar select { font-size:12px; }
.market-list-heading { display:flex; justify-content:space-between; align-items:center; gap:8px; font-size:12px; color:var(--muted); margin:12px 0 9px; }
#market-list { gap:8px; }
#view-market .market-row { display:grid; grid-template-columns:minmax(165px,1.3fr) 80px minmax(100px,.75fr) minmax(100px,.8fr) minmax(140px,1fr) 76px; align-items:center; gap:12px; padding:12px; min-width:0; border-radius:10px; background:linear-gradient(110deg,#142337e6,#0a1c2bec); border:1px solid #345064; box-shadow:inset 0 1px 0 #ffffff03; }
#view-market .market-row > * { min-width:0; }
#view-market .trader-item, .market-confirm .trader-item { display:flex; align-items:center; gap:9px; min-width:0; }
#view-market .trader-item > div, .market-confirm .trader-item > div { display:block; min-width:0; }
#view-market .trader-item .material-icon, .market-confirm .material-icon { width:40px; height:40px; flex:0 0 40px; }
#view-market .trader-item .item-art, .market-confirm .item-art { width:100%; height:100%; }
#view-market .trader-item h3, .market-confirm h3 { font-size:13px; margin:0 0 5px; overflow-wrap:anywhere; }
#view-market .npc-badges, .market-confirm .npc-badges { display:flex; align-items:center; flex-wrap:wrap; gap:5px; font-size:10px; color:var(--muted); }
#view-market .quality-badge, .market-confirm .quality-badge { margin:0; font-size:10px; }
.market-field, .market-seller, .market-total, .market-history-kind { display:grid; gap:5px; font-size:12px; min-width:0; }
.market-field small, .market-seller small, .market-total small, .market-history-kind time { color:var(--muted); font-size:10px; }
.market-field strong, .market-order-controls > strong { overflow-wrap:anywhere; font-variant-numeric:tabular-nums; }
.market-price strong, .market-total strong, .market-order-controls > strong { color:#ebc887; font-size:13px; }
.market-seller strong { overflow-wrap:anywhere; font-size:12px; }
.market-seller > span { color:var(--accent); font-size:10px; }
.market-input-action { display:flex; gap:5px; min-width:0; }
.market-input-action input { flex:1; width:75px; }
.market-input-action button { min-width:40px; min-height:38px; font-size:11px; padding:5px 7px; }
#view-market [data-market-action] { min-height:42px; font-size:12px; padding:8px; }
#view-market .market-sell { grid-template-columns:minmax(165px,1.4fr) 80px minmax(110px,1fr) minmax(115px,1fr) minmax(100px,.9fr) 86px; }
#view-market .market-mine { grid-template-columns:minmax(165px,1.4fr) minmax(150px,1fr) minmax(100px,.8fr) minmax(100px,.8fr) 90px; }
.market-order-counts, .market-history-amounts { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
#view-market .market-history { grid-template-columns:minmax(165px,1.4fr) minmax(125px,.8fr) 70px minmax(105px,.75fr) minmax(210px,1.7fr); }
.market-history-kind strong { color:var(--accent); }
.market-note { margin:12px 0; color:var(--muted); font-size:12px; }
.market-empty { padding:25px 15px; }
.market-empty h3 { margin:8px 0; font-size:15px; }
#market-status { font-size:12px; color:var(--accent); overflow-wrap:anywhere; }
#market-status:empty { display:none; }
#market-status.market-error { color:#ffa0a7; }
.market-closed { padding:22px; text-align:center; margin-top:16px; }
.market-closed > .icon { color:var(--muted); width:30px; height:30px; }
.market-closed h2 { margin:12px 0 8px; font-size:18px; }
.market-closed p { color:var(--muted); font-size:13px; }
.market-pending { padding:12px; margin:12px 0; border-color:#a68340; }
.market-pending p { margin:0 0 8px; font-size:12px; color:#ebc887; }
.market-pending > div { display:flex; flex-wrap:wrap; gap:6px; }
.market-pending button { font-size:12px; min-height:40px; }
#market-more { margin-top:12px; width:100%; min-height:40px; }
.market-confirm h2 { font-size:20px; margin:0 0 18px; }
.market-confirm p { font-size:13px; overflow-wrap:anywhere; }
.market-breakdown { display:grid; gap:8px; border-block:1px solid #345064; padding:12px 0; margin:12px 0; }
.market-breakdown > div { display:flex; justify-content:space-between; gap:12px; }
.market-breakdown dd.market-price-up { color:#ffa0a7; }
.market-breakdown dd.market-price-down { color:#80dfb2; }
.market-breakdown dt { color:var(--muted); font-size:12px; }
.market-breakdown dd { margin:0; color:#ebc887; font-size:13px; font-weight:bold; text-align:right; }
.market-confirm-note { color:var(--muted); line-height:1.5; }
.market-confirm-actions { display:flex; justify-content:flex-end; gap:8px; margin-top:18px; }
.market-confirm-actions button { min-height:44px; font-size:13px; }
@media(max-width:1200px) {
 #view-market .market-row, #view-market .market-sell, #view-market .market-mine, #view-market .market-history { grid-template-columns:minmax(0,1fr) minmax(90px,.6fr); gap:10px; }
 #view-market .trader-item { grid-column:1; }
 #view-market .market-row > .market-price { grid-column:1; }
 #view-market .market-buy > .market-order-controls, #view-market .market-history-amounts, #view-market .market-order-counts { grid-column:1 / -1; }
 #view-market .market-row > [data-market-action] { grid-column:2; justify-self:end; min-width:86px; }
 #view-market .market-mine > .market-order-counts { grid-row:2; }
 .market-toolbar { grid-template-columns:minmax(0,1fr) minmax(0,1fr); }
 .market-toolbar > label:first-child { grid-column:1 / -1; }
 .market-toolbar > label:last-child { grid-column:1 / -1; }
 .market-order-controls input { min-height:42px; font-size:16px; }
}
@media(max-width:1100px) { .app-shell:has(#view-market:not([hidden])) { grid-template-columns:minmax(0,1fr); } }
@media(max-width:480px) {
 .market-heading { gap:8px; }
 .market-heading-icon { display:none; }
 .market-heading h1 { font-size:23px; }
 .market-heading p { font-size:11px; }
 .market-heading > button { padding:8px; font-size:11px; }
 #view-market .market-row { padding:10px; gap:9px; }
 .market-summary { font-size:11px; }
 .market-tabs { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
 .market-tabs button { padding:8px 10px; justify-content:center; }
 .market-confirm { padding:16px; }
 .market-confirm-actions { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); }
}

.market-alpha { display: grid; grid-template-columns: auto minmax(0,1fr); gap: 1rem; max-width: 640px; padding: 1rem; }
.market-alpha h2 { margin: 0 0 .5rem; }
.market-alpha p { color: var(--muted); margin: 0 0 .75rem; }
.market-alpha label { display: block; margin-bottom: .35rem; font-size: .8rem; }
.market-alpha-controls { display: flex; gap: .5rem; }
.market-alpha-controls input { flex: 1; min-width: 0; min-height: 44px; padding: 10px 12px; color: var(--text); background: #0b1c2a; border: 1px solid #315067; border-radius: 8px; }
.market-alpha-controls button { flex-shrink: 0; }
@media (max-width: 390px) { .market-alpha { grid-template-columns: minmax(0,1fr); } .market-alpha .market-heading-icon { display:none; } }

/* Market Buy/Sell share the inventory's selection-first flow on desktop and mobile. */
#market-list.market-stock-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(128px,1fr)); gap:8px; }
#market-list.market-stock-grid .market-stock { display:grid; grid-template-columns:36px minmax(0,1fr); align-items:center; gap:6px; width:auto; height:auto; min-height:100px; padding:8px; border-radius:8px; text-align:left; }
.market-stock-grid .market-stock .material-icon { width:36px; height:36px; margin:0; grid-column:1; grid-row:1; }
.market-stock-name { font-size:11px; line-height:1.3; color:var(--text); overflow-wrap:anywhere; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.market-stock-badges { grid-column:1 / -1; display:flex; flex-wrap:wrap; gap:5px; align-items:center; font-size:10px; color:var(--muted); }
.market-stock-badges .quality-badge { margin:0; font-size:9px; }
.market-stock-free { grid-column:1 / -1; color:var(--muted); font-size:10px; }
.market-stock-count { color:var(--quality,var(--common)); font-size:12px; font-variant-numeric:tabular-nums; }
#market-list.market-buy-grid { grid-template-columns:repeat(auto-fill,minmax(172px,1fr)); }
.market-buy-grid .market-seller, .market-stock-price { grid-column:1 / -1; gap:3px; min-width:0; }
.market-buy-grid .market-seller strong { font-size:11px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.market-stock-price { display:grid; color:#ebc887; font-size:12px; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.market-stock-price small { color:var(--muted); font-size:9px; }
.market-purchase-meta { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin:14px 0; }
.market-purchase-meta > :first-child { grid-column:1 / -1; }
.market-purchase-controls, .market-sale-controls { display:flex; align-items:center; flex-wrap:wrap; gap:8px; }
.market-purchase-controls input, .market-sale-controls input { width:96px; min-height:44px; font-size:16px; flex:0 1 96px; }
.market-quick { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:5px; flex:1 0 216px; }
.market-quick button { min-width:0; min-height:44px; padding:6px; font-size:12px; }
.market-quick .market-quick-main { border-color:#4eaeb7; color:#a7ffff; background:#16434d; }
.market-quick [aria-pressed="true"] { color:#a7ffff; border-color:#64dbdf; box-shadow:inset 0 0 8px #66eeee33; }
.market-purchase-total { display:block; margin:12px 0; color:#ebc887; font-size:15px; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.market-sale-fields { display:grid; grid-template-columns:minmax(0,1fr); gap:12px; }
.market-sale-fields > label:last-child { width:100%; max-width:220px; }
.market-sale-fields input { min-height:44px; font-size:16px; }
.market-price-controls { display:grid; grid-template-columns:minmax(0,1fr) 28px; gap:4px; }
.market-price-controls input { width:100%; min-width:0; }
.market-price-stepper { display:grid; grid-template-rows:1fr 1fr; gap:2px; }
.market-price-stepper button { min-height:20px; min-width:28px; padding:0; line-height:1; border-radius:4px; font-size:10px; }

#market-equipment-note { font-size:10px; margin:6px 0; }
@media(max-width:600px) {
 #market-list.market-buy-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .market-sale-fields { grid-template-columns:minmax(0,1fr); }
 .market-confirm { max-height:calc(100dvh - 24px); overflow-y:auto; scroll-padding-bottom:72px; }
 .market-confirm:has(.market-order-controls) .market-confirm-actions { position:sticky; bottom:-16px; padding:10px 0; background:#101b2b; }
}

/* Aggregated stack Buy: exact quoted allocation and a secondary order list. */
.market-confirm { max-height:calc(100dvh - 24px); overflow-y:auto; }
.market-confirm:has(#market-purchase-allocation) .market-purchase-meta > :first-child { grid-column:auto; }
.market-stock-offers { grid-column:1 / -1; color:var(--muted); font-size:10px; }
.market-allocation-title { margin:12px 0 8px; color:var(--accent); font-size:12px; }
.market-allocation, .market-orders-list { list-style:none; padding:0; margin:8px 0; display:grid; gap:6px; }
.market-allocation li, .market-orders-list li { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:5px 10px; padding:8px; border:1px solid #2c465b; border-radius:7px; font-size:11px; background:#0b1b2a; }
.market-allocation li > span, .market-orders-list li > span { grid-column:1 / -1; overflow-wrap:anywhere; color:var(--text); }
.market-allocation strong, .market-allocation b, .market-orders-list strong { color:#ebc887; font-size:11px; overflow-wrap:anywhere; font-variant-numeric:tabular-nums; }
.market-orders-list small { display:block; margin-top:4px; color:var(--accent); }
.market-own-order { opacity:.65; }
#market-orders { margin-top:14px; border-top:1px solid #345064; padding-top:12px; }
#market-orders summary { cursor:pointer; color:var(--accent); font-size:12px; }
#market-purchase-error { color:#ffa0a7; font-size:12px; }
#market-purchase-error:empty { display:none; }
#market-purchase-requote, #market-orders-more { min-height:40px; font-size:12px; }

/* Compact physical laser picker; native mobile select no longer exposes every copy. */
.laser-picker-trigger { display:flex; align-items:center; justify-content:space-between; gap:10px; width:100%; min-height:44px; padding:9px 12px; text-align:left; font-size:12px; }
.laser-picker-trigger span { min-width:0; overflow-wrap:anywhere; }
.laser-copy small { display:block; color:var(--muted); margin-top:3px; }
.laser-picker-dialog { width: min(460px, calc(100vw - 24px)); max-width:calc(100vw - 24px); max-height:calc(100dvh - 24px); overflow:auto; padding:20px; }
.laser-picker-dialog h2 { font-size:19px; margin:0; }
.laser-picker-dialog .section-heading { gap:8px; margin-bottom:12px; }
#laser-picker-close { flex:0 0 40px; min-height:40px; padding:6px; font-size:22px; }
.laser-picker-current { display:grid; gap:4px; padding:10px 12px; border:1px solid var(--border); border-radius:8px; background:#081725; margin-bottom:12px; }
.laser-picker-current small, .laser-picker-option small { color:var(--muted); font-size:11px; line-height:1.5; }
.laser-picker-current strong { font-size:13px; overflow-wrap:anywhere; }
.laser-picker-options { display:grid; gap:7px; }
.laser-picker-option { display:flex; align-items:center; gap:10px; width:100%; padding:10px; min-height:64px; text-align:left; }
.laser-picker-option > span:nth-child(2) { display:grid; gap:2px; min-width:0; flex:1; }
.laser-picker-option strong { font-size:13px; overflow-wrap:anywhere; }
.laser-picker-option .material-icon { width:38px; height:38px; flex:0 0 38px; }
.laser-picker-option.is-selected { opacity:1; border-color:var(--accent); background:#1aa3a71a; }
.laser-picker-check { color:var(--accent); font-size:18px; }
.laser-picker-option .laser-picker-move { color:#f2c578; }
.laser-picker-option .laser-tier-warning { color:#f2c578; }
.laser-picker-section { margin:9px 0 0; font-size:12px; color:#f2c578; }
.laser-picker-transfer { margin-top:12px; padding:12px; border:1px solid #b78c4c; border-radius:8px; background:#b78c4c0d; }
.laser-picker-transfer p { margin:0 0 10px; font-size:12px; line-height:1.5; overflow-wrap:anywhere; }
.laser-picker-transfer > div { display:flex; justify-content:flex-end; flex-wrap:wrap; gap:8px; }
.laser-picker-transfer button, #laser-picker-remove { min-height:44px; font-size:12px; }
#laser-picker-remove { width:100%; margin-top:12px; }
#laser-picker-status:empty { display:none; }

/* Guide: one progression page, compact overview only beside Planet/Inventory/NPC. */
.app-shell:has(#view-guide:not([hidden])) { grid-template-columns:232px minmax(0,1fr); }
.app-shell:has(#view-guide:not([hidden])) > .right-panel { display:none; }
#view-guide { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,420px),1fr)); gap:12px; align-items:start; }
.guide-heading { display:flex; align-items:center; gap:10px; grid-column:1 / -1; margin-bottom:0; }
.guide-heading-icon { display:grid; place-items:center; width:48px; height:48px; flex-shrink:0; border:1px solid #397b9560; border-radius:10px; background:#0c202d; color:var(--accent); }
.guide-heading h1 { font-size:26px; margin:0 0 4px; }
.guide-heading p { font-size:12px; color:var(--muted); margin:0; }
#view-guide > .guide-panel { display:block; position:relative; margin:0; padding:14px; min-width:0; }
#view-guide .guide-icon { display:none; }
#view-guide .guide-panel h2 { font-size:16px; padding-right:44px; }
#view-guide .guide-panel p { font-size:12px; }
#view-guide .guide-panel .eyebrow { font-size:10px; }
#view-guide .guide-panel .icon-button { position:absolute; top:10px; right:10px; width:44px; min-height:44px; }
#view-guide .deck-panel { margin:0; padding:14px; min-width:0; }
#view-guide .deck-panel > button { font-size:12px; min-height:44px; padding:8px 12px; }
#view-guide .deck-panel h2 { font-size:16px; }
#view-guide .deck-requirements { margin:10px 0; }
#view-guide .deck-requirements { overflow-wrap:anywhere; }
.guide-sidebar { border-color:#3cbbcd50; }
.guide-sidebar .section-heading h2 { display:flex; align-items:center; gap:8px; color:var(--accent); }
.guide-sidebar .section-heading .icon { width:20px; }
.guide-sidebar .eyebrow { font-size:10px; color:var(--accent); letter-spacing:1px; }
.guide-sidebar .side-goal { margin:8px 0 18px; font-size:14px; line-height:1.5; color:var(--text); font-weight:600; overflow-wrap:anywhere; }
#side-deck { padding-top:16px; border-top:1px solid #2b4b60; }
#side-deck h3 { font-size:16px; margin:0 0 6px; }
#side-deck p { font-size:11px; color:var(--muted); line-height:1.5; margin:0 0 10px; }
#side-deck progress { width:100%; height:5px; margin-bottom:12px; }
.side-requirements { display:grid; gap:6px; font-size:11px; line-height:1.5; overflow-wrap:anywhere; }
.side-requirements .ingredient-link { text-align:left; font-size:inherit; white-space:normal; }
.side-requirements .ingredient-link .icon { width:12px; height:12px; }
.guide-open { width:100%; margin-top:18px; min-height:44px; font-size:12px; }
@media(max-width:1100px) {
 .app-shell > .right-panel { display:none; }
}
@media(max-width:699px) {
 .guide-heading h1 { font-size:22px; }
 #view-guide > .guide-panel { padding:16px 12px; gap:10px; flex-wrap:wrap; }
 #view-guide .guide-panel > div { min-width:0; flex-basis:calc(100% - 44px); }
 #view-guide .guide-icon { display:none; }
 #view-guide .guide-panel p { overflow-wrap:anywhere; }
 #view-guide .deck-panel { padding:16px 12px; }
 #view-guide .deck-panel > button { width:100%; white-space:normal; min-height:44px; }
}

/* Compact Guide material rows; other recipe/material layouts remain unchanged. */
#view-guide .guide-material-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,210px),1fr)); gap:4px 10px; margin:6px 0; }
#view-guide .guide-material { display:flex; align-items:center; gap:6px; min-width:0; padding:3px 0; font-size:12px; line-height:1.5; }
#view-guide .guide-material-icon { display:grid; place-items:center; width:18px; flex-shrink:0; }
#view-guide .guide-material-icon .icon { width:18px; height:18px; }
#view-guide .guide-material > span:last-child { min-width:0; overflow-wrap:anywhere; }
#view-guide .guide-material .ingredient-link { font-size:inherit; text-align:left; white-space:normal; line-height:inherit; padding:0; }
#view-guide .guide-material .ingredient-link .icon { width:12px; height:12px; }
#view-guide .deck-requirements { padding:0; border:0; background:none; }

/* Public plans: compact informational cards, no gameplay controls. */
.app-shell:has(#view-upcoming:not([hidden])) { grid-template-columns:232px minmax(0,1fr); }
.app-shell:has(#view-upcoming:not([hidden])) > .right-panel { display:none; }
#view-upcoming .guide-heading { margin-bottom:16px; }
.upcoming-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr)); gap:12px; max-width:1100px; }
.upcoming-card { display:flex; align-items:flex-start; gap:12px; margin:0; padding:16px; min-width:0; }
.upcoming-icon { color:var(--accent); flex-shrink:0; padding-top:4px; }
.upcoming-icon .icon { width:26px; height:26px; }
.upcoming-card h2 { font-size:16px; margin:6px 0; }
.upcoming-card p { color:var(--muted); font-size:13px; line-height:1.6; margin:0; overflow-wrap:anywhere; }
.upcoming-status { font-size:10px; letter-spacing:.06em; color:var(--muted); }
.upcoming-status.next { color:var(--accent); }
.upcoming-note { font-size:12px; line-height:1.6; color:var(--muted); margin:14px 0 0; }
@media(max-width:1100px) { .app-shell:has(#view-upcoming:not([hidden])) { grid-template-columns:minmax(0,1fr); } }

/* Planet navigation keeps its own space instead of shrinking to one row. */
.planet-list-shell { flex:0 0 auto; min-width:0; }
.sidebar .planet-navigation { height:180px; min-height:180px; max-height:180px; overflow-y:scroll; overscroll-behavior:contain; scrollbar-gutter:stable; scrollbar-width:thin; scrollbar-color:#51bec7 #102130; }
.planet-navigation::-webkit-scrollbar { width:8px; }
.planet-navigation::-webkit-scrollbar-track { background:#102130; border-radius:8px; }
.planet-navigation::-webkit-scrollbar-thumb { background:#51bec7; border:2px solid #102130; border-radius:8px; }
.sidebar .planet-navigation .planet-nav { min-height:44px; height:44px; margin:0 0 3px; padding:5px 8px; gap:8px; }
.planet-navigation .mini-planet { width:26px; height:26px; }
.planet-navigation .planet-nav small { margin-top:2px; }
.planet-scroll-control { width:100%; min-height:24px; padding:2px 6px; border:0; background:transparent; color:var(--accent); font-size:11px; box-shadow:none; }
.planet-scroll-control:disabled { opacity:.25; cursor:default; }
.sidebar .nav-button { min-height:44px; padding:8px 10px; }
.sidebar .desktop-navigation { gap:2px; }
.sidebar .sidebar-label { margin:5px 8px 8px; }
.sidebar .sidebar-divider { flex-shrink:0; margin:10px 8px 14px; }
@media(min-width:1101px) { .sidebar { padding:14px 12px; } }
@media(max-height:1000px) { .sidebar .sidebar-bottom { display:none; } }
@media(max-width:1100px) { .planet-scroll-control { min-height:44px; } }
/* Persistent rail also stays visible on systems with hidden overlay scrollbars. */
.planet-scroll-window { position:relative; }
.sidebar .planet-navigation { padding-right:12px; scrollbar-width:none; }
.planet-navigation::-webkit-scrollbar { display:none; }
.planet-scroll-track { position:absolute; right:0; top:0; bottom:0; width:10px; background:#142a38; border-radius:5px; touch-action:none; cursor:pointer; }
#planet-scroll-thumb { position:absolute; left:2px; right:2px; min-height:24px; background:#51bec7; border-radius:5px; cursor:grab; }
#planet-scroll-thumb:active { cursor:grabbing; background:#8ce7e9; }

/* Chat V1: floating on desktop, modal fullscreen on a phone. */
.chat-launcher { position:fixed; right:20px; bottom:20px; z-index:40; width:48px; height:48px; padding:10px; border:1px solid #4cbbc8; background:#102c3ded; color:var(--accent); box-shadow:0 4px 22px #0008; }
.chat-launcher .icon { width:26px; height:26px; }
.chat-unread { position:absolute; top:-8px; right:-8px; min-width:22px; padding:3px 6px; border-radius:10px; background:var(--accent); color:#04202b; font-size:11px; font-weight:700; white-space:nowrap; }
.chat-panel { position:fixed; inset:auto 20px 78px auto; z-index:45; margin:0; width:min(440px,calc(100vw - 24px)); height:min(590px,calc(100dvh - 120px)); max-width:none; max-height:none; padding:14px; background:#0b1929f5; border:1px solid #3e879b; border-radius:14px; color:var(--text); box-shadow:0 10px 50px #000a; }
.chat-panel[open] { display:flex; flex-direction:column; gap:8px; }
.chat-heading { display:flex; align-items:center; gap:10px; flex-shrink:0; }
.chat-heading > .icon, .chat-heading > span > .icon { width:26px; height:26px; color:var(--accent); }
.chat-heading h2 { flex:1; font-size:20px; margin:0; }
.chat-heading .icon-button { width:44px; min-height:44px; }
.chat-tabs { display:flex; gap:6px; flex-shrink:0; }
.chat-tab { flex:1; min-width:0; min-height:40px; padding:8px 4px; font-size:12px; color:var(--muted); background:#102337; border:1px solid #29475c; }
.chat-tab.active { color:var(--accent); border-color:#5ed9df; background:#143443; }
.chat-tools { display:flex; gap:6px; justify-content:space-between; flex-shrink:0; }
.chat-tools:has(> [hidden]):not(:has(> :not([hidden]))) { display:none; }
.chat-small-button { min-height:32px; padding:5px 8px; font-size:11px; color:var(--accent); background:#10283a; border:1px solid #32566c; }
.chat-messages { flex:1; min-height:60px; overflow-y:auto; overscroll-behavior:contain; scrollbar-width:thin; border:1px solid #253e52; border-radius:8px; padding:4px 8px; }
.chat-message { display:flex; gap:8px; padding:10px 0; border-bottom:1px solid #29405070; }
.chat-avatar { flex-shrink:0; display:grid; place-items:center; width:30px; height:30px; border:1px solid #355669; border-radius:8px; background:#132d3d; color:#c9dce9; font-size:13px; }
.chat-message-content { flex:1; min-width:0; }
.chat-message-head { display:flex; align-items:center; gap:8px; }
.chat-nickname { color:#c9dce9; font-size:12px; overflow-wrap:anywhere; }
.chat-message-head time { margin-left:auto; font-size:10px; color:var(--muted); white-space:nowrap; }
.chat-message-text { margin:4px 0 0; color:#bfd0df; font-size:13px; line-height:1.5; overflow-wrap:anywhere; white-space:pre-wrap; }
.chat-system-message .chat-message-content { display:flex; align-items:flex-start; gap:8px; }
.chat-system-message .chat-message-text { flex:1; min-width:0; margin:0; }
.chat-system-message .chat-message-head { margin-left:auto; flex-shrink:0; }
.chat-message-menu { position:relative; flex-shrink:0; }
.chat-message-menu summary { cursor:pointer; min-width:24px; text-align:center; color:var(--muted); list-style:none; }
.chat-message-menu[open] { background:#0d2335; border:1px solid #365b70; border-radius:6px; padding:4px; }
.chat-message-menu button { display:block; width:100%; margin-top:4px; white-space:nowrap; }
.chat-form { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:6px; flex-shrink:0; }
.chat-form textarea { width:100%; min-width:0; min-height:54px; max-height:110px; resize:none; background:#091727; color:var(--text); border:1px solid #36576d; border-radius:8px; padding:9px; font:inherit; font-size:13px; }
.chat-form button { font-size:12px; padding:8px 12px; }
.chat-form small { grid-column:1 / -1; font-size:10px; color:var(--muted); text-align:right; }
.chat-status:empty, .chat-write-note:empty { display:none; }
.chat-status, .chat-write-note, .chat-empty { margin:0; font-size:12px; line-height:1.4; color:var(--muted); }
.chat-status { color:#e4bb8d; }
.chat-recovery { padding:6px; border:1px solid #9b7f50; border-radius:6px; font-size:12px; }
.chat-blocked { flex-shrink:0; font-size:11px; color:var(--muted); }
.chat-blocked-row { display:flex; gap:8px; align-items:center; justify-content:space-between; padding:4px; }
.chat-reports { max-height:150px; overflow:auto; flex-shrink:0; border:1px solid #39566a; border-radius:8px; }
.chat-report-row { padding:8px; border-bottom:1px solid #294050; }
.chat-report-row p, .chat-report-row small { font-size:12px; overflow-wrap:anywhere; white-space:pre-wrap; }
.chat-report-row button { margin:4px; }
.chat-panel::backdrop { background:#030b15b0; }
@media(max-width:699px) {
 .chat-launcher { right:68px; bottom:calc(82px + env(safe-area-inset-bottom)); width:44px; height:44px; }
 .chat-panel { inset:var(--chat-top,0px) 0 auto; width:100%; height:var(--chat-height,100dvh); border-radius:0; padding:max(10px,env(safe-area-inset-top)) 10px max(10px,env(safe-area-inset-bottom)); }
 .chat-message-menu summary { min-width:32px; min-height:32px; }
 .chat-small-button { min-height:40px; }
 .chat-form textarea { font-size:16px; }
}
.chat-form .sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.upcoming-card [data-chat-open] { margin-top:10px; }

/* Small, fixed-slot cosmetic appearance editor. */
.appearance-tabs { display:flex; gap:8px; margin:0 0 18px; }
.appearance-tabs button { background:#101f30; color:var(--muted); border:1px solid #304b62; padding:10px 16px; }
.appearance-tabs button[aria-pressed="true"] { color:#89e9e4; border-color:#61cbd0; background:#153340; }
.appearance-layout { display:grid; grid-template-columns:minmax(230px,1fr) minmax(280px,1.65fr) minmax(210px,.85fr); gap:12px; margin-top:12px; }
.appearance-layout .panel { padding:16px; min-width:0; }
.appearance-layout h2 { font-size:15px; margin:0 0 18px; }
.appearance-layout h3 { font-size:12px; color:#aec4d4; margin:18px 0 8px; }
.appearance-options { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:7px; }
.appearance-option { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:5px; min-width:0; padding:6px 3px; background:#0a1725; border:1px solid #2f495e; border-radius:7px; color:#acc1d2; font-size:10px; overflow-wrap:anywhere; }
.appearance-option[aria-pressed="true"] { color:#d5ffff; border-color:#6de4e2; box-shadow:inset 0 0 12px #5edbd022; background:#15323e; }
.appearance-sample { display:block; width:100%; height:64px; }
.appearance-sample svg { width:100%; height:100%; }
.appearance-swatch { width:36px; height:36px; border-radius:5px; border:1px solid #9eafbc70; }
.appearance-stage { display:flex; flex-direction:column; background:radial-gradient(ellipse at 55% 40%,#1c506766,#08152288 70%),url('./assets/planets/space-blue.webp') center/cover; }
#appearance-preview { display:flex; align-items:center; justify-content:center; flex:1; min-height:360px; }
#appearance-preview svg { width:100%; max-height:510px; filter:drop-shadow(0 10px 12px #020a12); }
#appearance-save { width:100%; margin-top:25px; }
#appearance-status { min-height:2.5em; font-size:12px; color:#92ded5; overflow-wrap:anywhere; }
@media(max-width:1100px) { .appearance-layout { grid-template-columns:minmax(0,1fr) minmax(0,1fr); } .appearance-stage { grid-column:1/-1; grid-row:1; } #appearance-preview { min-height:250px; } #appearance-preview svg { max-height:320px; } }
@media(max-width:600px) { .appearance-layout { grid-template-columns:minmax(0,1fr); } .appearance-stage { grid-column:auto; } .appearance-layout .panel { padding:12px; } #appearance-preview { min-height:210px; } #appearance-preview svg { max-height:260px; } .appearance-tabs button { flex:1; padding:10px 8px; } }

/* Combat phase 2: a static bridge display. No projectile or impact animations. */
.combat-visual-panel {
  padding: 0;
  overflow: hidden;
  border-color: rgba(85, 207, 214, .27);
  background: #0a1825;
  box-shadow: inset 0 1px rgba(177, 235, 246, .035), 0 12px 35px rgba(0, 0, 0, .12);
}
.combat-visual-panel .battle-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 15px 19px;
  list-style: none;
  cursor: pointer;
  background: linear-gradient(100deg, rgba(35, 87, 104, .21), transparent 75%);
}
.battle-summary::-webkit-details-marker { display: none; }
.battle-heading, .battle-summary-info { display: flex; align-items: center; gap: 11px; }
.battle-heading { font-size: 13px; font-weight: 700; }
.battle-heading svg { width: 20px; height: 20px; color: var(--cyan); }
.battle-summary-info { color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.battle-chevron { font-size: 21px; color: var(--cyan); }
.combat-visual-panel:not([open]) .battle-chevron { transform: rotate(-90deg); }
.battle-stage {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  gap: 36px;
  padding: 22px;
  border-top: 1px solid rgba(104, 176, 202, .15);
  background:
    radial-gradient(ellipse at 23% 65%, rgba(36, 143, 169, .14), transparent 46%),
    radial-gradient(ellipse at 85% 60%, rgba(180, 88, 58, .07), transparent 44%),
    linear-gradient(rgba(96, 171, 194, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(96, 171, 194, .035) 1px, transparent 1px);
  background-size: auto, auto, 38px 38px, 38px 38px;
}
.battle-player, .battle-opponents { min-width: 0; }
.battle-side-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}
.battle-side-heading .eyebrow { font-size: 10px; letter-spacing: .12em; }
.battle-identifier { color: var(--muted); font-size: 9px; white-space: nowrap; }
.battle-player-health { display: grid; gap: 9px; }
.battle-meter { display: grid; gap: 6px; min-width: 0; }
.battle-meter > span { display: flex; justify-content: space-between; gap: 5px; color: var(--muted); font-size: 10px; }
.battle-meter b { color: #c7d7e2; font-size: 10px; font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.battle-meter progress { display: block; width: 100%; height: 5px; margin: 0; border: 0; background: #192a3a; border-radius: 2px; accent-color: #65d2d6; }
.battle-meter progress::-webkit-progress-bar { background: #192a3a; border-radius: 2px; }
.battle-meter progress::-webkit-progress-value { background: #65d2d6; border-radius: 2px; }
.battle-meter progress::-moz-progress-bar { background: #65d2d6; border-radius: 2px; }
.battle-meter [data-battle-meter="hull"] { accent-color: #8bbca6; }
.battle-meter [data-battle-meter="hull"]::-webkit-progress-value { background: #8bbca6; }
.battle-meter [data-battle-meter="hull"]::-moz-progress-bar { background: #8bbca6; }
.battle-player-art { display: flex; align-items: center; justify-content: center; height: 170px; }
.battle-player-art svg { width: 225px; max-width: 100%; height: 170px; transform: rotate(58deg); filter: drop-shadow(0 13px 12px #020c15); }
.battle-player-caption { display: flex; align-items: center; justify-content: center; gap: 8px; color: #749aa8; font-size: 9px; letter-spacing: .08em; }
.battle-caption-line { width: 23px; height: 1px; background: #4d8b99; }
.battle-targets { display: grid; grid-template-columns: repeat(var(--battle-target-count), minmax(0, 1fr)); gap: 10px; }
.battle-target {
  min-width: 0;
  padding: 12px 10px;
  border: 1px solid rgba(102, 145, 168, .19);
  border-radius: 10px;
  background: rgba(9, 22, 33, .68);
}
.battle-target.is-target { border-color: rgba(198, 146, 110, .45); background: linear-gradient(160deg, rgba(139, 86, 57, .12), rgba(9, 22, 33, .7)); }
.battle-target.is-defeated { opacity: .38; }
.battle-target-heading { display: flex; justify-content: space-between; gap: 3px; color: #c7b5a6; font-size: 9px; margin-bottom: 13px; }
.battle-target-marker { color: #dfad81; }
.battle-target progress { accent-color: #cc947c; }
.battle-target progress::-webkit-progress-value { background: #cc947c; }
.battle-target progress::-moz-progress-bar { background: #cc947c; }
.battle-enemy-art { display: flex; align-items: center; justify-content: center; height: 139px; }
.enemy-visual { display: inline-block; position: relative; vertical-align: middle; }
.enemy-visual > img, .enemy-visual > svg { display: block; width: 100%; height: 100%; object-fit: contain; }
.enemy-visual > [hidden] { display: none; }
.battle-enemy-art .enemy-visual { width: 150px; height: 112.5px; max-width: 100%; max-height: 125px; filter: drop-shadow(0 10px 7px #020b13); }
.combat-enemy-title { display: flex; align-items: center; gap: 7px; }
.combat-enemy-title > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.combat-enemy-title .enemy-visual { width: 48px; height: 36px; flex-shrink: 0; }
.combat-enemy-copy { display: grid; gap: 4px; }
.combat-drop { display: flex; align-items: center; gap: 5px; color: #8fbac5; font-size: 11px; font-weight: 500; line-height: 1.4; }
.combat-drop > span:first-child { flex-shrink: 0; }
.combat-drop > span:last-child { min-width: 0; }
.resource-row-top .combat-drop .material-icon { width: 18px; height: 18px; flex-shrink: 0; border: 0; border-radius: 0; background: none; }
@media (max-width: 699px) { .combat-enemy-title .enemy-visual { width: 40px; height: 30px; } }
@media (max-width: 360px) { .combat-enemy-title .enemy-visual { width: 32px; height: 24px; } }
.battle-target small { display: block; text-align: center; color: var(--muted); font-size: 9px; }
.battle-target.is-target small { color: #c8a68c; }
.battle-targets:has(.battle-target:only-child) { max-width: 300px; margin-inline: auto; }
@media (max-width: 900px) {
  .battle-stage { gap: 20px; padding: 17px; }
  .battle-side-heading { flex-wrap: wrap; }
  .battle-target { padding: 10px 7px; }
}
@media (max-width: 600px) {
  .battle-summary-info { font-size: 10px; }
  .combat-visual-panel .battle-summary { padding: 13px; }
  .battle-stage { grid-template-columns: minmax(0, 1fr); gap: 18px; padding: 14px; }
  .battle-player { display: grid; grid-template-columns: minmax(0, 1fr) 104px; align-items: center; column-gap: 12px; }
  .battle-player .battle-side-heading { grid-column: 1 / -1; margin-bottom: 8px; }
  .battle-player-art { height: 97px; }
  .battle-player-art svg { width: 120px; height: 97px; }
  .battle-player-caption { grid-column: 1 / -1; margin-top: 4px; }
  .battle-enemy-art { height: 92px; }
  .battle-enemy-art .enemy-visual { max-height: 86px; }
  .battle-meter b { font-size: 9px; }
  .battle-opponents .battle-side-heading { margin-bottom: 10px; }
}

/* Optional guided tour. Highlights follow visible content, including mobile. */
.guide-basics { padding: 20px; margin-top: 20px; }
.guide-basics > p, .onboarding-card p { color: var(--muted); }
.onboarding-topics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.onboarding-topics details { border: 1px solid var(--border); border-radius: 10px; padding: 12px; min-width: 0; }
.onboarding-topics summary { cursor: pointer; color: var(--text); }
.onboarding-topics p { line-height: 1.5; margin-bottom: 0; }
.onboarding-card { position: fixed; z-index: 90; bottom: max(24px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); width: min(480px, calc(100% - 24px)); box-sizing: border-box; padding: 18px; background: #101b2bf5; border: 1px solid var(--accent); box-shadow: 0 12px 48px #0009; max-height: 65dvh; overflow-y: auto; overflow-wrap: anywhere; }
.onboarding-card[hidden] { display: none; }
.onboarding-card h2 { font-size: 20px; margin: 8px 0; }
.onboarding-card p { margin: 8px 0 14px; line-height: 1.45; }
.onboarding-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.onboarding-actions button { flex: 1; min-width: 0; padding: 10px 12px; }
.onboarding-actions button[data-tutorial-action="next"], [data-welcome-start] { background: var(--accent); color: var(--background); }
.onboarding-upcoming { margin-bottom: 12px; width: 100%; }
.onboarding-highlight { outline: 2px solid var(--accent); outline-offset: 5px; border-radius: 8px; scroll-margin: 140px 0 280px; }
body.onboarding-active { padding-bottom: 280px; }
@media (max-width: 700px) {
  .onboarding-topics { grid-template-columns: minmax(0, 1fr); }
  .onboarding-card { bottom: calc(84px + env(safe-area-inset-bottom)); padding: 14px; }
}
@media (prefers-reduced-motion: reduce) { .onboarding-highlight, .onboarding-card { animation: none; transition: none; } }
.onboarding-actions button[data-tutorial-action="back"], .onboarding-actions button[data-tutorial-action="end"], .onboarding-actions [data-welcome-skip] { background: transparent; color: var(--text); border: 1px solid var(--border); }

/* Equipment V2: a single category at a time, without replacing slot controls. */
#ship-equipment-content .ship-hangar-grid { grid-template-columns: minmax(0, 1fr); }
[data-equipment-panel][hidden] { display: none !important; }
.equipment-tabs { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; margin: 16px 0; }
.equipment-tabs button { min-height: 46px; padding: 10px 8px; background: #0d1b2c; color: var(--muted); border: 1px solid var(--border); }
.equipment-tabs button[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); background: #15343c; }
.equipment-art { display: block; width: 48px; height: 48px; object-fit: contain; max-width: 100%; }
#ship-slots { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
#ship-slots .combat-loadout { margin-top: 0; }
#ship-slots .combat-loadout label { grid-template-columns: minmax(0,1fr); }
.equipment-ship-details { grid-column: 1/-1; margin-top: 10px; padding: 14px; border: 1px solid var(--border); border-radius: 10px; }
.equipment-ship-details summary, .laser-planet-group > summary { cursor: pointer; min-height: 44px; align-content: center; color: var(--text); }
.equipment-ship-details[open] summary { margin-bottom: 16px; }
.laser-planet-group { border: 1px solid var(--border); border-radius: 10px; min-width: 0; background: #0b1928; }
.laser-planet-group > summary { padding: 12px; font-weight: 600; }
.laser-planet-group > summary span { font-size: 11px; font-weight: 400; color: var(--muted); margin-left: 12px; }
.laser-planet-group .laser-slot { border: 0; margin: 0; }
.equipment-placeholder { display: flex; align-items: flex-start; gap: 18px; max-width: 580px; }
.equipment-placeholder img { flex-shrink: 0; }
.equipment-placeholder h2 { margin-top: 0; }
.equipment-placeholder p { color: var(--muted); line-height: 1.5; }
@media (max-width: 700px) {
  .equipment-tabs { grid-template-columns: repeat(2,minmax(0,1fr)); }
  #ship-slots { grid-template-columns: minmax(0,1fr); }
  .equipment-placeholder { gap: 12px; }
}
.equipment-picker-close { flex:0 0 40px; min-height:40px; padding:6px; font-size:22px; }
.equipment-picker-remove { width:100%; margin-top:12px; min-height:44px; }
#equipment-picker-status:empty { display:none; }
#ship-equipment-content select[hidden] { display:none !important; }
.equipment-picker-dialog .material-icon .item-art { width:100%; height:100%; }
.module-supply-link { min-height:32px; max-width:100%; white-space:normal; text-align:left; }
.module-supply-link .icon { flex-shrink:0; }
.ship-support-panel .support-reserves.support-overview { max-width:none; grid-template-columns:repeat(auto-fit,minmax(210px,1fr)); }
.support-overview .support-module-label { display:block; color:var(--muted); margin-top:3px; line-height:1.4; overflow-wrap:anywhere; }
.support-overview .support-reserve strong { overflow-wrap:anywhere; }
@media (max-width:700px) {
  .ship-support-panel .support-reserves.support-overview { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .support-overview .support-reserve strong { font-size:18px; }
}
@media (max-width:359px) {
  .ship-support-panel .support-reserves.support-overview { grid-template-columns:minmax(0,1fr); }
}

/* Equipment-to-production navigation keeps a compact, touch-friendly footer. */
.equipment-picker-craft { display:block; width:100%; min-height:44px; margin-top:8px; font-size:12px; text-align:center; }
.craft-equipment-filter { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:8px; padding:8px 12px; margin-bottom:12px; border:1px solid var(--border); border-radius:8px; font-size:12px; color:var(--accent); }
.craft-equipment-filter .text-button { min-height:44px; font-size:12px; }
.catalog-grid.equipment-family-grid { grid-template-columns:minmax(0,1fr); }

/* Private Solo prototype reuses the existing Combat stage and picker visuals. */
#view-wormhole { min-width: 0; }
.wormhole-form { padding: 18px; margin-block: 14px; min-width: 0; }
.wormhole-form form { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; }
.wormhole-form form label { display: grid; gap: 7px; max-width: 100%; }
.wormhole-form input { max-width: 100%; min-width: 0; }
.wormhole-form input[type=checkbox] { width: 20px; height: 20px; }
.wormhole-loadout { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.wormhole-slot { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 12px; text-align: left; }
.wormhole-slot > span { min-width: 0; }
.wormhole-slot small { display: block; overflow-wrap: anywhere; }
.wormhole-slot .material-icon { width: 40px; height: 40px; flex-shrink: 0; }
.wormhole-stats { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); align-items:start; gap: 10px; }
/* Final dungeon values use the same restrained equipment cards as Ship. */
.wormhole-stat-card { min-width:0; padding:0; border:1px solid #294253; border-radius:10px; background:linear-gradient(145deg,#142b3a80,#0b192680); }
.wormhole-stat-card > summary { display:block; padding:10px 12px; list-style:none; cursor:pointer; border-radius:9px; }
.wormhole-stat-card > summary::-webkit-details-marker { display:none; }
.wormhole-stat-card > summary:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
.wormhole-stat-heading { display:flex; align-items:center; gap:8px; margin-bottom:6px; }
.wormhole-stat-heading > strong { font-size:12px; line-height:1.4; }
.wormhole-stat-chevron { margin-left:auto; color:var(--muted); transition:transform .15s; }
.wormhole-stat-card[open] .wormhole-stat-chevron { transform:rotate(180deg); }
.wormhole-stat-details { padding:0 12px 10px; }
.wormhole-stat-card .material-icon { width:28px; height:28px; flex:0 0 28px; }
.wormhole-stat-card .material-icon .item-art { width:100%; height:100%; }
.wormhole-stat-card .material-icon > .icon { width:24px; height:24px; color:var(--accent); }
.wormhole-stat-type { margin-left:auto; padding:3px 5px; border:1px solid #387482; border-radius:4px; font-size:9px; color:var(--accent); }
.wormhole-stat-value { display:flex; flex-wrap:wrap; align-items:baseline; gap:6px; color:var(--accent); font-size:24px; font-weight:700; line-height:1.3; overflow-wrap:anywhere; }
.wormhole-stat-value small { font-size:10px; color:var(--muted); font-weight:500; }
.wormhole-stat-caption { display:block; margin:3px 0 10px; font-size:10px; color:var(--muted); }
.wormhole-stat-breakdown { margin:0; padding-top:8px; border-top:1px solid #294253; display:grid; gap:5px; }
.wormhole-stat-breakdown > div { display:flex; flex-wrap:wrap; justify-content:space-between; gap:3px 8px; min-width:0; font-size:10px; line-height:1.5; }
.wormhole-stat-breakdown dt { color:var(--muted); }
.wormhole-stat-breakdown dd { margin:0; overflow-wrap:anywhere; }
.wormhole-stat-breakdown .has-bonus { color:var(--accent); }
.wormhole-stat-interval { display:flex; flex-wrap:wrap; justify-content:space-between; gap:4px 8px; margin-top:9px; padding-top:8px; border-top:1px solid #294253; font-size:10px; line-height:1.5; }
.wormhole-stat-interval strong { color:var(--text); font-size:12px; }
.wormhole-stat-interval small { flex-basis:100%; color:var(--muted); font-size:9px; }
@media(max-width:359px) { .wormhole-stats { grid-template-columns:minmax(0,1fr); } }
.wormhole-upgrade { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-block: 12px; border-bottom: 1px solid var(--border); }
.wormhole-upgrade > div { min-width: 0; }
.wormhole-upgrade small { display: block; margin-top: 4px; overflow-wrap: anywhere; }
.wormhole-upgrade button { flex-shrink: 0; }
.wormhole-battle .battle-targets { grid-template-columns: repeat(auto-fit,minmax(100px,1fr)); }
#wh-message:empty { display: none; }
@media(max-width:540px) {
 .wormhole-loadout { grid-template-columns: minmax(0,1fr); }
 .wormhole-form { padding: 13px; }
 .wormhole-form input { width: 100%; }
 .wormhole-form form label { flex: 1 1 180px; }
 .wormhole-form form button { flex: 1 1 130px; }
 .wormhole-upgrade strong { font-size: 13px; }
 .wormhole-upgrade small { font-size: 11px; }
}
#view-wormhole > .section-heading { flex-wrap: wrap; }
#view-wormhole h1 { min-width: 0; overflow-wrap: anywhere; }
#view-wormhole .section-note { white-space: normal; line-height: 1.6; overflow-wrap: anywhere; }
#view-wormhole h1 { font-size: clamp(24px,7vw,34px); }
.wormhole-form input:not([type=checkbox]) { min-height: 44px; border: 1px solid #294253; border-radius: 8px; padding: 10px 12px; background: #102032; color: var(--text); font: inherit; font-size: 16px; }

/* Same compact controls and dialog skin as Ship equipment. */
.wormhole-slot { min-height:64px; padding:10px; gap:10px; font-size:12px; }
.wormhole-slot .material-icon { width:38px; height:38px; flex:0 0 38px; }
.wormhole-slot .wormhole-slot-copy { flex:1; display:grid; gap:3px; }
.wormhole-slot strong { font-size:13px; }
.wormhole-slot small { color:var(--muted); font-size:11px; line-height:1.5; }
.wormhole-form button:not(.wormhole-slot):not(.ingredient-link) { min-height:40px; padding:9px 12px; font-size:12px; }

.support-reserve .support-obtain { grid-column:1/-1; font-size:11px; color:var(--accent); }

@media(max-width:640px) { .statistics-categories { grid-template-columns:repeat(3,minmax(0,1fr)); } }

/* Owner UI preview: remove compact-info-headers from body to restore all page intros. */
body.compact-info-headers .view > .page-heading,
body.compact-info-headers .view > .guide-heading,
body.compact-info-headers .statistics-heading > :not(button),
body.compact-info-headers .market-heading > :not(button),
body.compact-info-headers #view-wormhole > .section-heading:first-child h1,
body.compact-info-headers #view-wormhole > .section-heading:first-child + p {
  display:none;
}
body.compact-info-headers .statistics-heading,
body.compact-info-headers .market-heading {
  justify-content:flex-end;
  gap:0;
  margin-bottom:10px;
}
body.compact-info-headers #view-wormhole > .section-heading:first-child {
  justify-content:flex-end;
}

.support-reserve .support-effect { grid-column:1/-1; font-size:10px; line-height:1.5; color:var(--muted); }

/* Equipment families occupy separate wrapping rows, retaining dense inventory tiles. */
.inventory-group-toggle { display:inline-flex; align-items:center; gap:7px; margin:0 0 0 6px; font-size:12px; color:var(--muted); cursor:pointer; }
.inventory-group-toggle input { width:16px; height:16px; margin:0; accent-color:var(--accent); }
.inventory-grid.inventory-grouped { display:flex; flex-direction:column; gap:12px; }
.inventory-equipment-row { display:grid; grid-template-columns:repeat(auto-fill,48px); gap:6px; width:100%; min-width:0; }

/* Compact combat HUD: actual equipment cards left, ship/opponent artwork right. */
.combat-visual-panel .battle-stage { gap:22px; padding:16px; align-items:start; }
.combat-visual-panel .battle-player { display:grid; grid-template-columns:minmax(0,1fr) clamp(64px,26%,120px); align-items:center; gap:8px; }
.combat-visual-panel .battle-player > .battle-side-heading { grid-column:1 / -1; margin-bottom:4px; }
.combat-visual-panel .battle-player-stats, .battle-target-stats { display:grid; gap:6px; min-width:0; }
.battle-stat-card { display:flex; align-items:center; gap:7px; padding:7px 8px; min-width:0; border:1px solid #397b9552; border-radius:9px; background:#07172580; }
.battle-stat-icon { display:flex; align-items:center; justify-content:center; width:26px; height:26px; flex:0 0 26px; }
.battle-stat-icon > .icon, .battle-stat-icon > img { width:26px; height:26px; object-fit:contain; }
.battle-stat-copy { min-width:0; flex:1; }
.battle-stat-line { display:flex; align-items:baseline; justify-content:space-between; flex-wrap:wrap; gap:2px 6px; font-size:10px; color:var(--muted); }
.battle-stat-line b { color:#70dcdb; font-size:12px; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.battle-stat-copy .battle-shot { display:block; text-align:left; font-size:9px; color:var(--muted); line-height:1.4; margin-top:2px; overflow-wrap:anywhere; }
.battle-stat-copy .battle-meter { gap:4px; }
.battle-stat-copy .battle-meter > span { flex-wrap:wrap; }
.battle-stat-copy .battle-meter b { white-space:normal; overflow-wrap:anywhere; }
.combat-visual-panel .battle-player-art { height:auto; min-height:130px; border-left:1px solid #397b9540; }
.combat-visual-panel .battle-player-art svg { width:100%; height:125px; }
.combat-visual-panel .battle-targets { grid-template-columns:repeat(auto-fit,minmax(min(100%,230px),1fr)); gap:8px; max-width:none; margin:0; }
.combat-visual-panel .battle-target { padding:8px; }
.combat-visual-panel .battle-target-heading { margin-bottom:6px; }
.battle-target-body { display:grid; grid-template-columns:minmax(0,1fr) clamp(58px,26%,96px); gap:7px; align-items:center; }
.battle-target-visual { min-width:0; border-left:1px solid #397b9540; padding-left:5px; }
.combat-visual-panel .battle-enemy-art { height:68px; }
.combat-visual-panel .battle-enemy-art .enemy-visual { width:100%; height:auto; aspect-ratio:4 / 3; max-height:68px; }
.battle-attack-card .battle-stat-line b { color:#e9a083; }
.battle-attack-card .battle-stat-icon { color:#e9a083; }
@media(max-width:600px) {
 .combat-visual-panel .battle-stage { grid-template-columns:minmax(0,1fr); padding:12px; gap:16px; }
 .battle-stat-card { padding:6px; gap:5px; }
 .battle-stat-icon, .battle-stat-icon > .icon, .battle-stat-icon > img { width:24px; height:24px; flex-basis:24px; }
 .battle-stat-line { font-size:9px; }
 .battle-stat-line b { font-size:11px; }
 .battle-stat-copy .battle-shot { font-size:9px; }
}

/* The All inventory overview stacks broad sections without changing item tiles. */
.inventory-section { display:grid; gap:8px; min-width:0; }
.inventory-section > h3 { margin:0; color:var(--muted); font-size:11px; font-weight:600; }
.inventory-grid.inventory-grouped:has(.inventory-section) { gap:18px; }

/* Dense production catalogue: quick Tier chips and actions in the item heading. */
.catalog-tiers { display:flex; flex-wrap:wrap; gap:4px; margin:0 0 8px; }
.catalog-tiers .filter { min-width:36px; min-height:28px; padding:4px 8px; font-size:10px; }
.catalog-tiers .filter:disabled { opacity:.35; }
.catalog-toolbar { padding:10px 12px; margin-bottom:10px; }
.catalog-toolbar input:not([type=checkbox]), .catalog-toolbar select { min-height:34px; padding:7px 9px; }
.catalog-card { padding:9px; border-radius:9px; }
.catalog-grid { gap:8px; }
.catalog-card-heading { grid-template-columns:30px minmax(0,1fr) auto; gap:6px; }
.catalog-card-heading .material-icon, .catalog-card-heading .material-icon .icon { width:28px; height:28px; }
.catalog-card-heading h3 { margin:0 0 2px; font-size:12px; line-height:1.35; }
.catalog-heading-action { display:flex; flex-direction:column; align-items:flex-end; gap:3px; min-width:0; }
.catalog-heading-action > button { min-height:30px; min-width:76px; max-width:110px; padding:5px 8px; font-size:10px; line-height:1.3; }
.catalog-heading-action .catalog-time { font-size:8px; }
.catalog-owned-equipment { gap:2px 4px; margin:2px 0; }
.catalog-owned-equipment > small { font-size:8px; }
.catalog-owned-qualities { gap:1px; }
.catalog-owned-quality { min-width:15px; padding:1px 2px; font-size:9px; }
.catalog-badges { gap:2px 4px; }
.catalog-quality { gap:3px; margin:6px 0; }
.catalog-quality .quality-choice { min-height:24px; padding:3px 2px; font-size:8px; }
.catalog-materials { gap:3px 8px; padding-top:5px; grid-template-columns:repeat(2,minmax(0,1fr)); }
.catalog-material { grid-template-columns:18px minmax(0,1fr); font-size:9px; }
.catalog-material .ingredient-link { min-height:20px; padding:0; }
.catalog-material .ingredient-art, .catalog-material .ingredient-art .icon { width:18px; height:18px; }
.catalog-card-footer { display:block; margin-top:5px; }
.catalog-card-footer > div { display:flex; flex-wrap:wrap; justify-content:space-between; gap:2px 6px; align-items:baseline; }
.catalog-card-footer .recipe-status { font-size:9px; }
.catalog-card-footer small { margin:0; font-size:8px; }
.catalog-details { margin:4px 0; }
.catalog-details > summary { color:var(--muted); cursor:pointer; font-size:9px; padding:3px 0; }
.catalog-details .compact-facts { margin:4px 0; }
.catalog-precursor { margin:5px 0; padding:5px; }
.equipment-upgrade-note { margin:4px 0; font-size:9px; }
@media(min-width:1200px) { .catalog-grid:not(.equipment-family-grid) { grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media(max-width:699px) {
 .catalog-card { padding:8px; }
 .catalog-card-heading { grid-template-columns:26px minmax(0,1fr) auto; gap:5px; }
 .catalog-card-heading .material-icon, .catalog-card-heading .material-icon .icon { width:26px; height:26px; }
 .catalog-card-heading h3 { font-size:11px; }
 .catalog-heading-action > button { min-height:32px; min-width:72px; max-width:94px; padding:5px 6px; }
 .catalog-quality .quality-choice { min-height:28px; }
 .catalog-material .ingredient-link { min-height:24px; }
}

/* Fixed production batches: one, custom quantity, then MAX on every recipe. */
.catalog-batch{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin:7px 0}
.catalog-batch button{min-height:28px;padding:3px 10px;font-size:11px}
.catalog-batch button.selected{border-color:var(--accent,#6bd7d8);color:var(--accent,#6bd7d8)}
.catalog-batch label{display:flex;align-items:center;gap:5px;font-size:10px;color:var(--muted)}
.catalog-batch input{width:72px;min-height:28px;padding:3px 6px;font-size:16px;background:#0b1b2b;border:1px solid var(--border);border-radius:7px;color:var(--text)}
.catalog-batch small,.catalog-batch-note{font-size:10px;color:var(--muted)}
.catalog-batch input:invalid{border-color:#dc908a}
