.content-area {
  min-height: calc(100dvh - 150px);
  padding: 32px 0;
}

.view {
  min-height: 100%;
}

.login-view,
.register-view,
.profile-view {
  display: grid;
  place-items: center;
}

.access-card {
  width: min(100%, 560px);
  padding: clamp(24px, 6vw, 52px);
  border: 1px solid var(--border);
  border-radius: 22px;
  background: linear-gradient(135deg, #1d3150 0%, var(--surface) 62%, #15243a 100%);
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .16em;
}

h1 {
  margin: 0;
  font-size: clamp(36px, 7vw, 64px);
  line-height: .98;
  letter-spacing: -.05em;
}

.lead {
  max-width: 580px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.55;
}

.access-form {
  display: grid;
  gap: 18px;
  margin-top: 30px;
}

.access-form label {
  display: grid;
  gap: 8px;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
}

.access-form input {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #0d1524;
  color: var(--text);
  font: inherit;
}

.access-form input:focus {
  border-color: var(--accent);
  outline: 2px solid #63d4aa55;
}
.access-form .legal-choice { grid-template-columns: auto 1fr; align-items: start; gap: 10px; color: var(--muted); font-size: 13px; font-weight: 500; line-height: 1.45; }
.access-form .legal-choice input { width: 18px; min-height: 18px; margin-top: 1px; accent-color: var(--accent); }
.legal-choice a, .app-footer a { color: var(--accent); font-weight: 700; }
.legal-note { margin: -4px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.account-management { margin-top: 26px; padding: 20px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }.account-management h2 { margin: 0; }.account-management p { color: var(--muted); }
.privacy-export { display: grid; gap: 12px; margin: 18px 0; padding: 16px; border: 1px solid color-mix(in srgb, var(--accent) 42%, var(--border)); border-radius: 12px; background: color-mix(in srgb, var(--accent) 7%, var(--surface)); }.privacy-export h3 { margin: 0; }.privacy-actions { display: flex; flex-wrap: wrap; gap: 10px; }.privacy-status { min-height: 22px; margin: 0; color: #7df0b9 !important; font-size: 13px; font-weight: 800; }.privacy-status.is-error { color: var(--danger) !important; }.privacy-status.is-pending { color: var(--accent) !important; }

.switch-text {
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.pwa-install { display: grid; gap: 10px; margin-top: 24px; padding: 16px; border: 1px solid #3d7b70; border-radius: 12px; background: #102c2a; }.pwa-install strong { color: var(--accent); }.pwa-install p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.45; }.pwa-install .button { justify-self: start; min-height: 42px; }

.access-status { min-height: 20px; margin: 14px 0 0; color: var(--accent); font-size: 13px; font-weight: 700; }
.access-status.is-error { color: var(--danger); }
.registration-confirmation { margin-top: 22px; padding: 16px; border: 1px solid #46bd8b; border-radius: 12px; background: #123528; color: #dcffed; line-height: 1.5; }
.registration-confirmation strong { display: block; color: #7df0b9; font-size: 16px; }
.registration-confirmation p { margin: 7px 0 11px; }
.registration-confirmation span { overflow-wrap: anywhere; color: #fff; font-weight: 700; }
.recovery-dialog { width: min(100% - 32px, 600px); padding: 0; border: 1px solid var(--border); border-radius: 20px; background: var(--surface); color: var(--text); box-shadow: 0 28px 100px #000b; }
.recovery-dialog::backdrop { background: #030711cc; }
.recovery-card { display: grid; gap: 16px; padding: clamp(24px, 5vw, 40px); }
.recovery-card h2 { margin: 0; font-size: clamp(28px, 6vw, 42px); letter-spacing: -.04em; }
.recovery-card p { margin: 0; color: var(--muted); line-height: 1.5; }
.recovery-codes-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 0; padding: 16px; border: 1px solid var(--border); border-radius: 12px; background: #0b1321; color: var(--accent); font: 700 15px/1.5 ui-monospace, monospace; white-space: pre-wrap; }
.recovery-card label { display: grid; gap: 8px; font-weight: 700; }
.recovery-card input[type="text"] { min-height: 44px; padding: 9px 12px; border: 1px solid var(--border); border-radius: 10px; background: #0d1524; color: var(--text); font: inherit; }
.recovery-confirmation { grid-template-columns: auto 1fr; align-items: center; }
.cookie-consent-dialog { width: min(100% - 28px, 620px); padding: 0; border: 1px solid var(--border); border-radius: 18px; background: var(--surface); color: var(--text); box-shadow: 0 28px 100px #000b; }.cookie-consent-dialog::backdrop { background: #030711e6; }.cookie-consent-card { display: grid; gap: 13px; padding: clamp(20px, 5vw, 32px); }.cookie-consent-card h2, .cookie-consent-card p { margin: 0; }.cookie-consent-card > p:not(.eyebrow) { color: var(--muted); line-height: 1.5; }.cookie-choice { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: #0d1524; color: var(--text); font-size: 13px; }.cookie-choice input { width: 17px; height: 17px; margin: 0; accent-color: var(--accent); }.cookie-choice.is-unavailable { color: var(--muted); }.cookie-consent-card .legal-note { margin: 0; }

.ad-slot { box-sizing: border-box; width: min(728px, 100%); aspect-ratio: 728 / 90; height: auto; margin: 28px auto 0; }
.ad-slot--public { display: grid; place-items: start center; overflow: hidden; border: 1px dashed #5e7198; border-radius: 8px; background: repeating-linear-gradient(135deg, #16243b, #16243b 10px, #132037 10px, #132037 20px); }
.ad-slot--authenticated { display: none; }
.ad-slot__label { color: var(--accent); font-size: 10px; font-weight: 800; letter-spacing: .14em; }

.view-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.view-heading .lead {
  max-width: 330px;
  margin: 0;
}

.galaxy-map {
  position: relative;
  min-height: clamp(440px, 68vh, 720px);
  overflow: hidden;
  border: 1px solid #243149;
  border-radius: 18px;
  background:
    radial-gradient(circle at 20% 30%, #17253c 0, transparent 23%),
    radial-gradient(circle at 73% 63%, #151f34 0, transparent 28%),
    #030508;
  box-shadow: inset 0 0 80px #000000;
}

.galaxy-point {
  position: absolute;
  width: 9px;
  height: 9px;
  padding: 0;
  border: 1px solid #dfe9ff;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 8px #ffffffcc;
  transform: translate(-50%, -50%);
}

.galaxy-point:hover,
.galaxy-point:focus-visible {
  width: 14px;
  height: 14px;
  background: var(--accent);
  border-color: #ffffff;
  box-shadow: 0 0 14px var(--accent);
  outline: none;
}

.online-notice {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 680px) {
  .content-area { padding: 22px 0; }

  .view-heading {
    display: block;
  }

  .view-heading .lead {
    margin-top: 16px;
  }

  .galaxy-map {
    min-height: 520px;
  }
}

@media (max-width: 520px) {
  .ad-slot--public { margin-top: 22px; }
}

.property-view,
.experience-view {
  width: min(100%, 900px);
  margin: 0 auto;
}

.back-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  margin-bottom: 30px;
  padding: 8px 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  font-weight: 700;
}

.property-heading {
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}

.property-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 24px;
}

.rankings-view { width: min(100%, 820px); margin: 0 auto; }
.ranking-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0 14px; }
.ranking-filter { min-height: 38px; padding: 7px 13px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--muted); font-weight: 700; }
.ranking-filter.is-active { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 12px #7ed8bd33; }
.ranking-me { margin: 0 0 12px; padding: 13px 16px; border: 1px solid #4a836f; border-radius: 12px; background: #19372f; color: var(--text); font-weight: 700; }
.ranking-list { display: grid; gap: 8px; }
.ranking-entry { display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 13px 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.ranking-entry.is-you { border-color: var(--accent); background: #19372f; }
.ranking-entry strong, .ranking-entry b { color: var(--accent); }
.ranking-entry span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.ranking-entry small { grid-column: 2 / -1; color: var(--muted); }
.ranking-chat { grid-column: 2 / -1; justify-self: start; padding-left: 0; }
.ranking-report, .alliance-report, .report-reason { justify-self: start; font-size: 12px; }
.report-reason { grid-column: 2; min-height: 32px; border: 1px solid var(--border); border-radius: 8px; background: #0d1524; color: var(--text); }
.ranking-report, .alliance-report { grid-column: 2 / -1; color: var(--muted); }
.event-chat { margin-top: 10px; padding-left: 0; }
.onboarding-card, .alliance-content { margin: 20px 0; padding: 18px; border: 1px solid #4a836f; border-radius: 14px; background: linear-gradient(130deg, #19372f, var(--surface)); }.onboarding-card h2, .onboarding-card p { margin: 6px 0; }.onboarding-card ol { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin: 16px 0 0; padding-left: 20px; }.onboarding-card li { color: var(--muted); }.onboarding-card li.is-done { color: var(--accent); text-decoration: line-through; }.alliances-view { width: min(100%, 820px); margin: 0 auto; }.alliance-content { display: grid; gap: 15px; }.alliance-content h2, .alliance-content h3, .alliance-content p { margin: 0; }.alliance-form { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; }.alliance-form label { display: grid; gap: 5px; min-width: 120px; color: var(--muted); font-size: 13px; }.alliance-form input, .alliance-form select { min-height: 38px; padding: 7px; border: 1px solid var(--border); border-radius: 8px; background: #0d1524; color: var(--text); }.alliance-members, .alliance-orders, .alliance-rankings { display: grid; gap: 8px; }.alliance-row { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }.alliance-row strong { color: var(--accent); }.alliance-row small { color: var(--muted); }.alliance-row .text-button { margin-left: auto; }.alliance-status { min-height: 20px; color: var(--muted); }

.onboarding-card ol { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); padding: 0; list-style: none; }
.onboarding-card li { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 8px; align-items: start; min-width: 0; line-height: 1.35; }
.onboarding-step-indicator { color: var(--accent); font-weight: 900; line-height: 1.35; }
.onboarding-card li.is-done { text-decoration: none; }
.onboarding-card li.is-done > span:last-child { text-decoration: line-through; }
.chat-dialog { width: min(100% - 28px, 700px); max-height: min(820px, calc(100dvh - 28px)); padding: 0; border: 1px solid var(--border); border-radius: 18px; background: var(--surface); color: var(--text); box-shadow: 0 28px 100px #000b; }.chat-dialog::backdrop { background: #030711d9; }.chat-card { display: grid; gap: 16px; padding: clamp(18px, 4vw, 30px); }.chat-card header { display: flex; justify-content: space-between; gap: 16px; }.chat-card .eyebrow { margin: 0 0 6px; }.chat-card h2, .chat-card header p { margin: 0; }.chat-card header p:last-child { margin-top: 5px; color: var(--muted); }.chat-rule { margin: 0; padding: 10px 12px; border-left: 3px solid var(--accent); border-radius: 0 8px 8px 0; background: #14342d; color: #d5fff0; font-size: 13px; }.chat-messages { display: grid; gap: 9px; max-height: 310px; min-height: 104px; overflow: auto; padding: 12px; border: 1px solid var(--border); border-radius: 12px; background: #0b1423; color: var(--muted); font-size: 13px; }.chat-message { justify-self: start; max-width: 90%; padding: 10px 12px; border: 1px solid #314a68; border-radius: 12px 12px 12px 3px; background: #17253a; color: var(--text); }.chat-message.is-mine { justify-self: end; border-color: #347d64; border-radius: 12px 12px 3px 12px; background: #153a31; }.chat-message small { display: block; margin-bottom: 5px; color: var(--muted); font-size: 11px; }.chat-message p { display: flex; align-items: center; gap: 7px; margin: 0; line-height: 1.35; }.chat-form { display: grid; gap: 13px; }.chat-form fieldset { min-width: 0; margin: 0; padding: 10px; border: 1px solid var(--border); border-radius: 11px; }.chat-form legend { padding: 0 6px; color: var(--muted); font-size: 12px; font-weight: 700; }.chat-phrase-picker { display: flex; flex-wrap: wrap; gap: 7px; }.chat-emoji-picker { display: flex; flex-wrap: wrap; gap: 8px; }.chat-choice { display: inline-flex; align-items: center; justify-content: center; min-height: 37px; padding: 7px 10px; border: 1px solid var(--border); border-radius: 9px; background: #101a2b; color: var(--text); font: inherit; font-size: 12px; }.chat-choice.is-active { border-color: var(--accent); background: #173d32; color: var(--accent); }.chat-emoji-picker .chat-choice { width: 42px; padding: 6px; }.chat-emoji-svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }

@media (max-width: 500px) {
  .ranking-entry { grid-template-columns: 46px minmax(0, 1fr); }
  .ranking-entry b { grid-column: 2; }
  .chat-card { padding: 17px; }.chat-messages { max-height: 250px; }.chat-choice { width: 100%; justify-content: flex-start; }.chat-emoji-picker .chat-choice { width: 42px; }
}

.portfolio-section { margin-top: 34px; }
.portfolio-section h2 { margin: 0; font-size: 20px; }
.portfolio-section .property-grid { margin-top: 14px; }

.property-card {
  min-height: 130px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
}

.popularity-panel {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(150px, .7fr) 2fr;
  gap: 22px;
  padding: 22px;
  border: 1px solid #4a836f;
  border-radius: 16px;
  background: linear-gradient(120deg, #19372f, var(--surface));
}

.popularity-panel h2 { margin: 8px 0 0; font-size: 24px; }
.popularity-panel dl { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 0; }
.popularity-panel dl div { padding: 8px; border-radius: 8px; background: #09151055; }
.popularity-panel dt { color: var(--muted); font-size: 12px; }
.popularity-panel dd { margin: 6px 0 0; color: var(--accent); font-size: 17px; font-weight: 800; }

.property-label {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.property-value {
  display: block;
  margin-top: 14px;
  color: var(--text);
  font-size: clamp(20px, 3vw, 30px);
}

.property-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.market-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.market-card {
  display: grid;
  gap: 14px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
}

.market-card h2,
.market-card p {
  margin: 0;
}

.market-card p { color: var(--muted); }

#market-location {
  max-width: none;
  overflow-x: auto;
  font-size: clamp(12px, 3.4vw, 17px);
  white-space: nowrap;
}

.market-balance,
.market-balance__amount { white-space: nowrap; }

.units-view { width: min(100%, 900px); margin: 0 auto; }
.unit-summary, .unit-tabs, .unit-order { display: flex; flex-wrap: wrap; gap: 12px; }
.unit-summary { justify-content: space-between; margin: 24px 0; padding: 16px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); color: var(--muted); }
.unit-summary strong { color: var(--accent); font-size: 22px; }
.cosmic-registration-note, .cosmic-dust-panel { border: 1px solid #8c73c7; border-radius: 14px; background: linear-gradient(120deg, #211a3a, var(--surface)); }.cosmic-registration-note { padding: 12px; color: #d8c9ff; font-size: 13px; }.cosmic-dust-panel { margin: 18px 0; padding: 18px; }.cosmic-dust-panel h2, .cosmic-dust-panel p { margin: 0 0 9px; }.cosmic-dust-rule, #cosmic-dust-initial, #cosmic-dust-conversion-cost { color: var(--muted); font-size: 13px; }.cosmic-dust-form { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; align-items: end; }.cosmic-dust-form label { display: grid; gap: 5px; color: var(--muted); font-size: 12px; }.cosmic-dust-form input, .cosmic-dust-form select { min-width: 0; min-height: 40px; padding: 8px; border: 1px solid var(--border); border-radius: 8px; background: #0c1524; color: var(--text); font: inherit; } @media (max-width: 680px) { .cosmic-dust-form { grid-template-columns: 1fr; } }
.unit-stations { margin: 0 0 18px; border: 1px solid #6a5aa3; border-radius: 14px; background: linear-gradient(120deg, #211c3c, var(--surface)); }.unit-stations-details { padding: 18px; }.unit-stations-details summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; color: var(--text); font-size: 20px; font-weight: 800; list-style: none; }.unit-stations-details summary::-webkit-details-marker { display: none; }.unit-stations-toggle::before { content: "+"; display: grid; width: 25px; height: 25px; place-items: center; border: 1px solid #8572bd; border-radius: 50%; color: var(--accent); font-size: 19px; line-height: 1; }.unit-stations-details[open] .unit-stations-toggle::before { content: "−"; }.unit-stations-details > p { margin: 14px 0 0; color: var(--muted); font-size: 13px; }.unit-stations-list { display: grid; gap: 8px; margin-top: 14px; }.unit-stations-list article { display: grid; gap: 5px; padding: 11px; border-radius: 9px; background: #0c1524; }.unit-stations-list strong { font-size: 13px; }.unit-stations-list span { color: var(--accent); font-size: 12px; }
.garrison-manifest { margin: 0 0 18px; padding: 18px; border: 1px solid #496b8d; border-radius: 14px; background: linear-gradient(120deg, #142536, var(--surface)); }.garrison-manifest h2, .garrison-manifest p { margin: 0 0 8px; }.garrison-manifest > p:not(.eyebrow) { color: var(--muted); font-size: 13px; }.garrison-manifest-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 9px; margin-top: 14px; }.garrison-manifest-list article { display: grid; gap: 4px; padding: 11px; border-radius: 9px; background: #0c1524; }.garrison-manifest-list span { color: var(--muted); font-size: 12px; }.garrison-manifest-list small { color: var(--accent); font-size: 11px; }.garrison-open { justify-self: start; margin-top: 10px; padding: 0; font-size: 12px; text-align: left; }
.unit-tab { padding: 10px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); font: inherit; font-weight: 700; }
.unit-tab.is-active { border-color: var(--accent); background: #173d32; color: var(--accent); }
.unit-production { display: grid; grid-template-columns: 1fr auto; gap: 24px; margin-top: 14px; padding: 24px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); }
.unit-production h2 { margin: 0 0 18px; }
.unit-production dl { display: grid; grid-template-columns: repeat(3, minmax(100px, 1fr)); gap: 12px; margin: 0; }
.unit-production dl div { min-width: 0; padding: 10px; border-radius: 9px; background: #0c1524; }
.unit-production dt { color: var(--muted); font-size: 12px; }
.unit-production dd { margin: 6px 0 0; font-weight: 800; }
.unit-order { align-content: start; }
.unit-order label { display: grid; gap: 8px; font-size: 13px; font-weight: 700; }
.unit-order input { width: 130px; min-height: 44px; padding: 8px; border: 1px solid var(--border); border-radius: 9px; background: #0c1524; color: var(--text); font: inherit; }
.unit-logistics { margin-top: 18px; padding: 24px; border: 1px solid #6372a5; border-radius: 16px; background: linear-gradient(120deg, #1a2341, var(--surface)); }.unit-logistics h2, .unit-logistics p { margin: 0 0 10px; }.unit-logistics > p:not(.eyebrow) { color: var(--muted); }.logistics-status { padding: 14px; border-radius: 10px; background: #10172d; color: var(--muted); }.logistics-status strong { color: var(--accent); }.logistics-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }.logistics-form label { display: grid; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 700; }.logistics-form input, .logistics-form select { min-width: 0; min-height: 42px; padding: 8px; border: 1px solid var(--border); border-radius: 8px; background: #0c1524; color: var(--text); font: inherit; }.logistics-form [data-stock] { color: var(--accent); }.logistics-form .button { grid-column: 1 / -1; }
.exploration-console { margin-top: 18px; padding: 24px; border: 1px solid #4a836f; border-radius: 16px; background: linear-gradient(120deg, #132f38, var(--surface)); }
.exploration-console h2, .exploration-console p { margin: 0 0 10px; }.exploration-console > p:not(.eyebrow) { color: var(--muted); }
.exploration-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; }.exploration-form label { display: grid; gap: 6px; min-width: 220px; color: var(--muted); font-size: 12px; font-weight: 700; }.exploration-form input, .exploration-form select { min-width: 0; min-height: 42px; padding: 8px; border: 1px solid var(--border); border-radius: 8px; background: #0c1524; color: var(--text); font: inherit; }.exploration-form .button { min-height: 42px; }

.war-view { width: min(100%, 900px); margin: 0 auto; }.war-console { margin-top: 24px; padding: 24px; border: 1px solid #a75353; border-radius: 16px; background: linear-gradient(120deg, #351c27, var(--surface)); }.war-console h2, .war-console p { margin: 0 0 10px; }.war-console > p { color: var(--muted); }.war-form { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }.war-form label { display: grid; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 700; }.war-form label:first-child { grid-column: span 2; }.war-form input, .war-form select { min-width: 0; min-height: 42px; padding: 8px; border: 1px solid var(--border); border-radius: 8px; background: #0c1524; color: var(--text); font: inherit; }.war-form .button { align-self: end; }.war-status { margin-top: 18px; padding: 14px; border-radius: 10px; background: #160f17; color: var(--muted); }.war-status strong { color: #ff9a9a; }

.events-view { width: min(100%, 900px); margin: 0 auto; }
.event-filters { display: flex; flex-wrap: wrap; gap: 9px; margin: 26px 0 16px; }
.event-filter { padding: 9px 13px; border: 1px solid var(--border); border-radius: 20px; background: var(--surface); color: var(--text); font: inherit; font-size: 13px; font-weight: 700; }
.event-filter.is-active { border-color: var(--accent); background: #173d32; color: var(--accent); }
.event-log { display: grid; gap: 10px; color: var(--muted); }
.event-more { justify-self: center; margin-top: 8px; }
.event-item { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; padding: 15px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.event-item strong { align-self: center; }.event-item p, .event-item small { grid-column: 2; margin: 7px 0 0; }.event-item p { color: var(--muted); }.event-item small { font-size: 11px; }.event-category { align-self: start; padding: 4px 7px; border-radius: 5px; background: #0c1524; color: var(--accent); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.event-report { grid-column: 2; margin-top: 12px; border-top: 1px solid var(--border); color: var(--text); }
.event-report summary { padding: 10px 0 0; cursor: pointer; color: var(--accent); font-size: 13px; font-weight: 800; }
.event-report dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 12px 0 0; }
.event-report dl div { padding: 9px; border-radius: 8px; background: #0c1524; }.event-report dt { color: var(--muted); font-size: 11px; }.event-report dd { margin: 4px 0 0; font-size: 13px; font-weight: 700; }
@media (max-width: 520px) { .event-report { grid-column: 1 / -1; }.event-report dl { grid-template-columns: 1fr; } }

.jobs-notice { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: 13px; }

.job-manager {
  grid-column: 1 / -1;
  margin-top: 10px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
}

.job-manager h2, .job-manager p { margin: 0 0 10px; }
.job-manager > p { color: var(--muted); }
.job-manager-list { color: var(--accent); font-size: 14px; }
.job-offer-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--border); }
.job-offer-row p { margin: 0; }
.job-offer-row .button { min-height: 34px; padding: 6px 10px; font-size: 12px; }
.job-offer-form { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 18px; }
.job-offer-form label { display: grid; gap: 6px; color: var(--muted); font-size: 13px; }
.job-offer-form input, .job-offer-form select { min-width: 0; min-height: 42px; padding: 8px; border: 1px solid var(--border); border-radius: 8px; background: #0d1524; color: var(--text); font: inherit; }

.garrison-manager { grid-column: 1 / -1; margin-top: 10px; padding: 22px; border: 1px solid #496b8d; border-radius: 16px; background: linear-gradient(120deg, #142536, var(--surface)); }
.garrison-manager h2, .garrison-manager p { margin: 0 0 10px; }.garrison-manager > p { color: var(--muted); }
.garrison-form { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 18px; align-items: end; }.garrison-form label { display: grid; gap: 6px; color: var(--muted); font-size: 13px; font-weight: 700; }.garrison-form small { color: var(--accent); font-size: 11px; }.garrison-form input { min-width: 0; min-height: 42px; padding: 8px; border: 1px solid var(--border); border-radius: 8px; background: #0d1524; color: var(--text); font: inherit; }
.maintenance-panel { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr auto; gap: 22px; margin-top: 10px; padding: 22px; border: 1px solid #987c3a; border-radius: 16px; background: linear-gradient(120deg, #302816, var(--surface)); }.maintenance-panel h2, .maintenance-panel p { margin: 8px 0 0; }.maintenance-panel > div > p { color: var(--muted); }.maintenance-status { align-self: center; color: var(--accent); font-weight: 700; }.maintenance-form { display: grid; grid-template-columns: minmax(130px, 180px) auto; gap: 10px; align-items: end; }.maintenance-form label { display: grid; gap: 6px; color: var(--muted); font-size: 13px; font-weight: 700; }.maintenance-form input { min-height: 42px; padding: 8px; border: 1px solid var(--border); border-radius: 8px; background: #0d1524; color: var(--text); font: inherit; }.maintenance-form p { grid-column: 1 / -1; color: var(--muted); font-size: 12px; }.maintenance-form .button { min-height: 42px; }
@media (max-width: 620px) { .garrison-form { grid-template-columns: 1fr; } }
@media (max-width: 680px) { .maintenance-panel { grid-template-columns: 1fr; }.maintenance-form { grid-template-columns: 1fr; } }
.job-offer-form .button { align-self: end; }

.building-slot.is-occupied {
  background: #516371;
  border-color: #ffffff;
}

@media (max-width: 680px) {
  .market-grid { grid-template-columns: 1fr; }
  .unit-production { grid-template-columns: 1fr; }
  .unit-production dl { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .logistics-form { grid-template-columns: 1fr; }
  .job-offer-form { grid-template-columns: repeat(2, 1fr); }
  .exploration-form label, .exploration-form .button { width: 100%; }
  .war-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }.war-form label:first-child, .war-form .button { grid-column: span 2; }
  .job-offer-row { align-items: flex-start; }
  .popularity-panel { grid-template-columns: 1fr; }
  .popularity-panel dl { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 520px) {
  .property-grid { grid-template-columns: 1fr; }
  .unit-production dl { grid-template-columns: 1fr; }
  .property-actions .button { width: 100%; }
  .job-offer-form { grid-template-columns: 1fr; }
  .popularity-panel dl { grid-template-columns: repeat(2, 1fr); }
  .access-card { padding: 24px 18px; border-radius: 16px; }
  .access-card .button, .pwa-install .button { width: 100%; }
}

.topbar-actions {
  display: flex;
  gap: 8px;
}

.space-map {
  position: relative;
  min-height: clamp(440px, 68vh, 720px);
  overflow: hidden;
  border: 1px solid #243149;
  border-radius: 18px;
  background:
    radial-gradient(circle at 20% 30%, #17253c 0, transparent 23%),
    radial-gradient(circle at 73% 63%, #151f34 0, transparent 28%),
    #030508;
  box-shadow: inset 0 0 80px #000000;
}

.system-point {
  position: absolute;
  width: 8px;
  height: 8px;
  padding: 0;
  border: 1px solid #dfe9ff;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 8px #ffffffcc;
  transform: translate(-50%, -50%);
}

.system-point:hover,
.system-point:focus-visible {
  width: 14px;
  height: 14px;
  background: var(--accent);
  box-shadow: 0 0 16px var(--accent);
  outline: none;
}

#universe-map .system-point.is-home-galaxy {
  z-index: 2;
  width: 22px !important;
  height: 22px !important;
  border: 3px solid #ffffff;
  background: var(--accent);
  box-shadow: 0 0 0 6px #63d4aa33, 0 0 22px var(--accent);
  opacity: 1 !important;
}

.system-point__label {
  position: absolute;
  top: calc(100% + 9px);
  left: 50%;
  padding: 5px 8px;
  border: 1px solid #63d4aa88;
  border-radius: 7px;
  background: #09131ee6;
  color: #effff8;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  transform: translateX(-50%);
}

@media (max-width: 680px) {
  .space-map { min-height: 520px; }
  #universe-map .system-point.is-home-galaxy { width: 32px !important; height: 32px !important; }
  .system-point__label { font-size: 13px; }
}

.system-heading {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.star-info {
  min-width: 130px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  text-align: right;
}

.star-info strong {
  display: block;
  color: var(--accent);
  font-size: 28px;
}

.star-info span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.planetary-map {
  position: relative;
  min-height: clamp(470px, 68vh, 690px);
  overflow: hidden;
  border: 1px solid #243149;
  border-radius: 18px;
  background: radial-gradient(circle, #283957 0 3%, #131e32 4%, #05080e 54%);
}

.planet-orbit {
  position: absolute;
  top: 50%;
  left: 50%;
  border: 1px solid #42526c66;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.planet-button {
  position: absolute;
  z-index: 2;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 2px solid #ffffff99;
  border-radius: 50%;
  box-shadow: 0 0 12px #000;
  transform: translate(-50%, -50%);
}

.planet-button:hover,
.planet-button:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.planet-rocky { background: #9b725a; }
.planet-volcanic { background: #c75b41; }
.planet-desert { background: #d1aa5c; }
.planet-oceanic { background: #478ac3; }
.planet-ice { background: #b5e0ed; }
.planet-gas { background: #af7ec4; }

@media (max-width: 680px) {
  .system-heading { display: block; }
  .star-info { width: fit-content; margin-top: 20px; text-align: left; }
}

/* Stellar classes shared by galaxy maps and planetary systems. */
.system-point.star-red,
.central-star.star-red {
  background: #ef5960;
  border-color: #ffd7d8;
  box-shadow: 0 0 10px #ef5960, 0 0 22px #ef596099;
}

.system-point.star-yellow,
.central-star.star-yellow {
  background: #ffd95b;
  border-color: #fff4bd;
  box-shadow: 0 0 10px #ffd95b, 0 0 22px #ffd95b99;
}

.system-point.star-orange,
.central-star.star-orange {
  background: #ff9c4a;
  border-color: #ffe0bd;
  box-shadow: 0 0 10px #ff9c4a, 0 0 22px #ff9c4a99;
}

.system-point.star-blue,
.central-star.star-blue {
  background: #6eaaff;
  border-color: #d8e8ff;
  box-shadow: 0 0 10px #6eaaff, 0 0 22px #6eaaff99;
}

.system-point.star-white,
.central-star.star-white {
  background: #f4f7ff;
  border-color: #ffffff;
  box-shadow: 0 0 10px #f4f7ff, 0 0 22px #f4f7ff99;
}

.system-point.star-yellow-white,
.central-star.star-yellow-white {
  background: #fff3b0;
  border-color: #fffde6;
  box-shadow: 0 0 10px #fff3b0, 0 0 22px #fff3b099;
}

.central-star {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: 50%;
  width: clamp(32px, 5vw, 54px);
  aspect-ratio: 1;
  border: 2px solid;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.planet-orbit {
  width: var(--orbit-width);
  height: var(--orbit-height);
}

.planet-view,
.city-view {
  width: min(100%, 900px);
  margin: 0 auto;
}

.city-map {
  position: relative;
  min-height: clamp(470px, 68vh, 700px);
  overflow: hidden;
  border: 1px solid #243149;
  border-radius: 18px;
  background:
    radial-gradient(ellipse at 50% 50%, #355e6d 0%, #1b3f50 31%, #0b202e 61%, #050a12 100%);
  box-shadow: inset 0 0 90px #000000aa;
}

.city-map::before,
.city-map::after {
  position: absolute;
  content: "";
  inset: 12% 8%;
  border: 1px solid #7db8c344;
  border-radius: 46% 54% 51% 49% / 53% 45% 55% 47%;
  transform: rotate(-14deg);
}

.city-map::after {
  inset: 24% 18%;
  border-color: #8ce0c855;
  transform: rotate(21deg);
}

.city-point {
  position: absolute;
  z-index: 2;
  width: 13px;
  height: 13px;
  padding: 0;
  border: 2px solid #d8fff4;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px #63d4aacc;
  transform: translate(-50%, -50%);
}

.city-point:hover,
.city-point:focus-visible {
  width: 19px;
  height: 19px;
  background: #ffffff;
  outline: none;
}

.city-overview {
  padding: clamp(24px, 5vw, 46px);
  border: 1px solid var(--border);
  border-radius: 20px;
  background: linear-gradient(135deg, #1d3150, var(--surface));
}

.city-data-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 30px;
}

.city-data-card {
  display: grid;
  gap: 12px;
  min-height: 110px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #0d1524;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.city-data-card strong {
  color: var(--text);
  font-size: 16px;
  overflow-wrap: anywhere;
}

@media (max-width: 520px) {
  .city-data-grid { grid-template-columns: 1fr; }
}

/* Shared oval planet-map style. Each planet type changes only its terrain layers. */
.planet-heading {
  align-items: flex-start;
}

.planet-heading .lead {
  max-width: 580px;
  margin-top: 18px;
}

.planet-meta {
  display: grid;
  grid-template-columns: auto auto;
  gap: 7px 14px;
  min-width: 190px;
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.planet-meta strong {
  color: var(--text);
  text-align: right;
  font-size: 14px;
}

.planet-map-frame {
  position: relative;
  min-height: clamp(390px, 58vw, 620px);
  overflow: hidden;
  border: 1px solid #314761;
  border-radius: 50%;
  background: #02050a;
  box-shadow: inset 0 0 70px #000, 0 18px 45px #00000055;
}

.planet-map {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 50%;
  isolation: isolate;
}

/* Rocky: separate irregular continents with plains, mountains, rivers and lakes. */
.planet-map-rocky {
  background:
    radial-gradient(ellipse at 16% 13%, #8cdeeb99 0 2%, transparent 3%),
    radial-gradient(ellipse at 78% 22%, #84d9e799 0 1.7%, transparent 2.7%),
    radial-gradient(ellipse at 62% 77%, #91dfeb88 0 1.5%, transparent 2.5%),
    repeating-linear-gradient(28deg, #1a628c 0 5%, #217ba1 6% 11%, #185d86 12% 17%);
}

.rocky-landmass {
  position: absolute;
  z-index: 1;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  filter: drop-shadow(2px 3px 1px #071d2aaa);
}

.rocky-landmass::before {
  position: absolute;
  inset: 0;
  content: "";
  background:
    radial-gradient(ellipse at 29% 32%, #477342 0 2%, transparent 2.8%),
    radial-gradient(ellipse at 37% 27%, #3c653c 0 2.2%, transparent 3%),
    radial-gradient(ellipse at 64% 45%, #4c743d 0 2.4%, transparent 3.2%),
    radial-gradient(ellipse at 72% 39%, #3d6239 0 2%, transparent 2.8%),
    radial-gradient(ellipse at 48% 68%, #4e793e 0 2.1%, transparent 3%),
    linear-gradient(145deg, #9ebd62 0%, #87a953 47%, #6f9148 100%);
}

.rocky-landmass::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    radial-gradient(ellipse at 34% 43%, #236f9a 0 1.8%, transparent 2.4%),
    radial-gradient(ellipse at 69% 57%, #2a7ba3 0 1.4%, transparent 2%),
    linear-gradient(112deg, transparent 0 43%, #3b90b2 43.4% 44.1%, transparent 44.6% 100%),
    linear-gradient(71deg, transparent 0 60%, #3b90b2 60.4% 61%, transparent 61.5% 100%);
  opacity: .9;
}

/* Continents are non-overlapping and distributed across the ocean. */
.continent-1 {
  clip-path: polygon(12% 22%, 20% 15%, 31% 16%, 40% 23%, 42% 34%, 37% 43%, 29% 49%, 18% 45%, 11% 37%);
}

.continent-2 {
  clip-path: polygon(47% 33%, 57% 25%, 70% 28%, 78% 38%, 76% 51%, 68% 61%, 56% 59%, 47% 50%, 43% 41%);
}

.continent-3 {
  clip-path: polygon(20% 61%, 29% 55%, 39% 60%, 42% 72%, 36% 82%, 25% 84%, 16% 76%);
}

.continent-4 {
  clip-path: polygon(68% 67%, 78% 61%, 87% 67%, 89% 77%, 82% 85%, 71% 83%, 64% 76%);
}

/* Gas: colored atmospheric bands and cloud vortices. */
.planet-map-gas {
  background:
    radial-gradient(ellipse at 71% 52%, #f5d9ad 0 5%, transparent 6%),
    radial-gradient(ellipse at 27% 27%, #e5b67f99 0 10%, transparent 17%),
    repeating-linear-gradient(
      172deg,
      #7154aa 0 8%,
      #ae7ac4 9% 17%,
      #e5ae83 18% 27%,
      #d48770 28% 37%,
      #8057a2 38% 47%
    );
}

.planet-map-gas::before {
  position: absolute;
  inset: 12% 7%;
  content: "";
  border: 18px solid #fff0d466;
  border-right-color: transparent;
  border-radius: 48%;
  transform: rotate(-17deg);
  filter: blur(7px);
}

/* Ice: no land, only layered frozen surfaces. */
.planet-map-ice {
  background:
    repeating-linear-gradient(23deg, transparent 0 8%, #ffffff33 9% 10%, transparent 11% 18%),
    radial-gradient(ellipse at 25% 35%, #f4ffff 0 9%, transparent 19%),
    radial-gradient(ellipse at 76% 68%, #c9f4ff 0 12%, transparent 22%),
    linear-gradient(135deg, #b6e9f1, #74c5dd 48%, #d9fbff);
}

.planet-map-ice::before {
  position: absolute;
  inset: 8%;
  content: "";
  border: 3px solid #ffffff88;
  border-radius: 44% 56% 53% 47%;
  transform: rotate(16deg);
}

/* Oceanic: exclusively water, currents and bright wave caps. */
.planet-map-oceanic {
  background:
    repeating-radial-gradient(ellipse at 40% 55%, #9eeaff22 0 2%, transparent 3% 10%),
    linear-gradient(145deg, #075a94, #1599c4 47%, #064b82);
}

.planet-map-oceanic::before,
.planet-map-oceanic::after {
  position: absolute;
  content: "";
  width: 65%;
  height: 25%;
  border-top: 5px solid #c9f8ff88;
  border-radius: 50%;
  transform: rotate(-18deg);
}

.planet-map-oceanic::before { top: 26%; left: -9%; }
.planet-map-oceanic::after { top: 59%; right: -12%; transform: rotate(13deg); }

.planet-map .city-point {
  z-index: 4;
  width: 14px;
  height: 14px;
  border: 2px solid #101827;
  background: #fff;
  box-shadow: 0 1px 4px #000000cc;
}

.planet-map .city-point:hover,
.planet-map .city-point:focus-visible {
  width: 19px;
  height: 19px;
  background: var(--accent);
  outline: 2px solid #fff;
  outline-offset: 2px;
}

@media (max-width: 680px) {
  .planet-heading { display: block; }
  .planet-meta { width: fit-content; margin-top: 22px; }
  .planet-map-frame { min-height: 360px; border-radius: 46%; }
}

/* Seeded visual overlays: every planet receives its own terrain composition. */
.planet-surface-details {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.planet-map-rocky .planet-surface-details {
  clip-path: inset(0 round 50%);
}

.terrain-river {
  fill: none;
  stroke: #2a91b9;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.05;
  opacity: .92;
}

.terrain-river-branch {
  fill: none;
  stroke: #64b9cf;
  stroke-linecap: round;
  stroke-width: .58;
  opacity: .85;
}

.terrain-lake {
  fill: #2c87ad;
  stroke: #87cfe1;
  stroke-width: .34;
  opacity: .96;
}

.terrain-mountain {
  stroke: #314536;
  stroke-width: .38;
  stroke-linejoin: round;
}

.terrain-snow {
  fill: #f3fbf4;
  opacity: .92;
}

.terrain-hill {
  fill: #6d964d;
  stroke: #4d713e;
  stroke-width: .3;
  opacity: .9;
}

.terrain-volcano {
  fill: #4d3832;
  stroke: #281d1c;
  stroke-width: .45;
}

.terrain-lava {
  fill: #e5673f;
}

.planet-map-gas.variant-1 {
  background:
    radial-gradient(ellipse at 70% 56%, #f3d5a1 0 4%, transparent 7%),
    repeating-linear-gradient(173deg, #5c6aab 0 8%, #94a7d0 9% 16%, #e5bd88 17% 25%, #b47371 26% 35%);
}

.planet-map-gas.variant-2 {
  background:
    radial-gradient(ellipse at 28% 42%, #eab9a4 0 5%, transparent 8%),
    repeating-linear-gradient(170deg, #856346 0 7%, #d49a5b 8% 16%, #efd18c 17% 25%, #ad604d 26% 34%);
}

.planet-map-gas.variant-3 {
  background:
    radial-gradient(ellipse at 74% 26%, #d9e5fb 0 4%, transparent 7%),
    repeating-linear-gradient(174deg, #456d8e 0 8%, #75a6bc 9% 16%, #d2d9cf 17% 23%, #668997 24% 32%);
}

.planet-map-ice.variant-1 {
  background:
    repeating-linear-gradient(142deg, transparent 0 7%, #ffffff55 8% 9%, transparent 10% 18%),
    radial-gradient(ellipse at 34% 55%, #eaffff 0 13%, transparent 25%),
    linear-gradient(130deg, #8dd3e5, #d8fbff 49%, #6db6d2);
}

.planet-map-ice.variant-2 {
  background:
    repeating-linear-gradient(35deg, #ffffff22 0 4%, transparent 5% 12%),
    radial-gradient(ellipse at 75% 30%, #f1ffff 0 11%, transparent 22%),
    linear-gradient(150deg, #d9fbff, #88cfe1 52%, #c4f1f6);
}

.planet-map-ice.variant-3 {
  background:
    radial-gradient(ellipse at 20% 70%, #ffffffaa 0 12%, transparent 24%),
    repeating-linear-gradient(160deg, #a7dfeb 0 8%, #dffcff 9% 14%, #83c6dc 15% 22%);
}

.planet-map-oceanic.variant-1 {
  background:
    repeating-radial-gradient(ellipse at 72% 30%, #b9f7ff33 0 2%, transparent 3% 9%),
    linear-gradient(155deg, #0875aa, #21a8ce 50%, #075986);
}

.planet-map-oceanic.variant-2 {
  background:
    repeating-radial-gradient(ellipse at 24% 67%, #ccfaff22 0 2%, transparent 3% 10%),
    linear-gradient(135deg, #053f81, #0876b6 48%, #1698c1);
}

.planet-map-oceanic.variant-3 {
  background:
    repeating-linear-gradient(20deg, #c6fbff22 0 2%, transparent 3% 10%),
    linear-gradient(155deg, #0b6c8d, #16a0ae 48%, #075c87);
}

.planet-map-rocky.variant-1 {
  filter: saturate(1.14) hue-rotate(8deg);
}

.planet-map-rocky.variant-2 {
  filter: saturate(.82) hue-rotate(-12deg) brightness(.94);
}

.planet-map-rocky.variant-3 {
  filter: saturate(1.2) hue-rotate(17deg) brightness(1.05);
}

/* Dynamic rocky terrain overrides. */
.rocky-landmass::after {
  background: none;
}

.rocky-landmass::before {
  background:
    radial-gradient(circle at 22% 26%, #c2cf75 0 2%, transparent 2.6%),
    radial-gradient(circle at 64% 34%, #6f9147 0 2%, transparent 2.8%),
    radial-gradient(circle at 43% 73%, #a2bd62 0 2.4%, transparent 3.1%),
    repeating-linear-gradient(137deg, #91ad58 0 7%, #789a4d 8% 14%, #9ab65d 15% 22%);
}

.terrain-river {
  stroke: #1d7ea9;
  stroke-width: .82;
  opacity: .88;
}

.terrain-river-branch {
  stroke: #4fa8c3;
  stroke-width: .42;
}

.terrain-lake {
  fill: #277da3;
  stroke: #8bd0df;
  stroke-width: .28;
}

.bank-view { width: min(100%, 760px); margin: 0 auto; }

.bank-balance {
  display: grid;
  gap: 8px;
  margin: 26px 0;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  color: var(--muted);
}

.bank-balance strong { color: var(--accent); font-size: clamp(28px, 5vw, 44px); }

.transaction-list { display: grid; gap: 10px; }

.transaction-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 16px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.transaction-item span { color: var(--danger); font-weight: 800; }
.transaction-item small { grid-column: 1 / -1; color: var(--muted); }

.robot-view { width: min(100%, 620px); margin: 0 auto; text-align: center; }

.robot-stage {
  position: relative;
  width: 300px;
  height: 440px;
  margin: 32px auto 0;
}

.component {
  position: absolute;
  border: 4px solid #79b6c8;
  background: linear-gradient(145deg, #386377, #17303e);
  box-shadow: inset 0 0 18px #9ce7ff44, 0 8px 18px #0007;
}

.component-level {
  position: absolute;
  z-index: 2;
  top: -13px;
  right: -13px;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 2px solid #dffaff;
  border-radius: 5px;
  background: #142431;
  color: var(--accent);
  font-weight: 800;
}

.robot-head { top: 0; left: 85px; width: 130px; height: 105px; border-radius: 34px 34px 22px 22px; }
.robot-torso { top: 116px; left: 68px; width: 164px; height: 156px; border-radius: 28px; }
.robot-arm { top: 132px; width: 48px; height: 140px; border-radius: 24px; }
.robot-arm.left { left: 10px; } .robot-arm.right { right: 10px; }
.robot-leg { top: 282px; width: 58px; height: 142px; border-radius: 20px; }
.robot-leg.left { left: 78px; } .robot-leg.right { right: 78px; }
.robot-eye { position: absolute; top: 32px; width: 20px; height: 16px; border-radius: 50%; background: #70e3ff; box-shadow: 0 0 12px #70e3ff; }
.robot-eye.left { left: 28px; } .robot-eye.right { right: 28px; }
.robot-nose { position: absolute; top: 52px; left: 58px; width: 12px; height: 18px; background: #a2c7d0; }
.robot-speaker { position: absolute; right: 43px; bottom: 15px; width: 44px; height: 10px; border-radius: 8px; background: repeating-linear-gradient(90deg, #9dd4dd 0 3px, #233d49 4px 6px); }
.brain { position: absolute; top: 10px; left: 20px; color: #d3f4ff; font-size: 9px; } .mind { position: absolute; top: 8px; right: 18px; color: #b889ff; }
.robot-heart { position: absolute; top: 47px; left: 57px; width: 44px; height: 44px; border-radius: 50%; background: #8ff0b4; box-shadow: 0 0 18px #8ff0b4; }

.robot-stage {
  overflow: hidden;
  border: 1px solid #426477;
  border-radius: 38px;
  background:
    radial-gradient(circle at 50% 38%, #477b8c55 0 8%, transparent 31%),
    linear-gradient(145deg, #08131f, #14283a 50%, #07111d);
  box-shadow: inset 0 0 80px #0009, 0 24px 50px #0008;
}

.robot-stage::before,
.robot-stage::after {
  position: absolute;
  z-index: 0;
  content: "";
  border: 1px solid #6bd2eb33;
  border-radius: 50%;
}

.robot-stage::before { inset: 42px 26px; }
.robot-stage::after { inset: 88px 54px; }

.component {
  z-index: 1;
  border-color: #8ed9e9;
  background:
    linear-gradient(90deg, #ffffff22 0 8%, transparent 9% 91%, #0008 92%),
    linear-gradient(145deg, #5c9aab, #234a60 45%, #102838);
}

.robot-head::before {
  position: absolute;
  top: -28px;
  left: 54px;
  width: 18px;
  height: 28px;
  content: "";
  border: 3px solid #8ed9e9;
  border-bottom: 0;
  border-radius: 12px 12px 0 0;
  background: #173747;
}

.robot-head::after {
  position: absolute;
  top: -38px;
  left: 58px;
  width: 10px;
  height: 10px;
  content: "";
  border-radius: 50%;
  background: #bd85ff;
  box-shadow: 0 0 15px #bd85ff;
}

.robot-torso::before {
  position: absolute;
  inset: 18px;
  content: "";
  border: 1px solid #aaf2ff77;
  border-radius: 18px;
  background: repeating-linear-gradient(0deg, transparent 0 14px, #99dceb22 15px 16px);
}

.robot-arm::before,
.robot-leg::before {
  position: absolute;
  top: 18%;
  right: 8px;
  bottom: 18%;
  left: 8px;
  content: "";
  border-radius: 12px;
  background: linear-gradient(90deg, #0b1d2a, #78b4c4, #102737);
}

.robot-eye {
  border: 2px solid #d5fbff;
  background: radial-gradient(circle at 35% 35%, #fff, #58d7ff 38%, #06344c 75%);
}

.robot-heart::after {
  position: absolute;
  inset: 11px;
  content: "";
  border: 2px solid #e5fff1;
  border-radius: 50%;
  animation: robot-pulse 1.8s ease-in-out infinite;
}

.robot-nose {
  top: 50px;
  left: 54px;
  width: 22px;
  height: 24px;
  border: 2px solid #d3f8ff;
  border-radius: 45% 45% 60% 60%;
  background: linear-gradient(90deg, #0d2735, #a5d9e3 48%, #173542);
  box-shadow: 0 2px 5px #0008;
}

.robot-nose::before,
.robot-nose::after {
  position: absolute;
  bottom: 4px;
  width: 4px;
  height: 4px;
  content: "";
  border-radius: 50%;
  background: #06131b;
}

.robot-nose::before { left: 4px; }
.robot-nose::after { right: 4px; }

.robot-speaker {
  right: 30px;
  bottom: 13px;
  width: 68px;
  height: 19px;
  border: 2px solid #8ddbe8;
  border-radius: 5px 5px 12px 12px;
  background:
    radial-gradient(ellipse at 50% 100%, #62d7ec88 0 22%, transparent 23%),
    repeating-linear-gradient(90deg, #07151e 0 3px, #83cbd6 4px 6px);
  box-shadow: inset 0 -3px 6px #0008, 0 2px 4px #0008;
}

.robot-speaker::after {
  position: absolute;
  right: 14px;
  bottom: -7px;
  left: 14px;
  height: 5px;
  content: "";
  border-radius: 0 0 10px 10px;
  background: #60d8ee;
  box-shadow: 0 0 8px #60d8ee;
}

.research-view { width: min(100%, 900px); margin: 0 auto; }

.research-balance {
  margin: 24px 0;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--muted);
}

.research-balance strong { margin-left: 8px; color: var(--accent); font-size: 22px; }

.active-play-summary { display: grid; gap: 4px; margin: 16px 0 24px; padding: 12px 14px; border: 1px solid var(--line); border-left: 3px solid var(--accent); background: var(--panel); color: var(--muted); font-size: 13px; }
.active-play-summary strong { margin-left: 6px; color: var(--accent); font-size: 16px; }
.active-play-summary span { font-size: 12px; }
.research-conversion { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin: -8px 0 16px; }
.research-conversion label { display: grid; gap: 6px; color: var(--muted); font-size: 13px; }
.research-conversion input,
.research-card input { width: 100%; min-height: 40px; padding: 8px; border: 1px solid var(--border); border-radius: 8px; background: #0d1828; color: var(--text); }
.research-conversion .button { min-height: 40px; }
.research-status { min-height: 24px; margin: 0 0 16px; color: var(--accent); font-size: 14px; }

.research-groups { display: grid; gap: 30px; }
.research-group { width: 100%; }
.research-group header { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; margin-bottom: 12px; }
.research-group h2, .research-group p { margin: 0; }
.research-group h2 { font-size: 22px; }
.research-group header p { color: var(--muted); font-size: 13px; }
.research-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.research-card {
  flex: 1 1 250px;
  max-width: 320px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}

.research-card h2,
.research-card h3,
.research-card p { margin: 0; }

.research-card h2,
.research-card h3 { font-size: 18px; }
.research-card strong { display: block; margin: 12px 0; color: var(--accent); }
.research-card.is-researching { border-color: var(--accent); box-shadow: 0 0 20px #60d5bc22; }
.research-card input { margin-bottom: 10px; }

.research-progress {
  height: 10px;
  overflow: hidden;
  border-radius: 8px;
  background: #0b1524;
}

.research-progress span { display: block; height: 100%; background: var(--accent); }
.research-card p { margin: 10px 0 14px; color: var(--muted); font-size: 13px; }

@media (max-width: 620px) {
  .research-card { flex-basis: 100%; max-width: none; }
  .research-group header { display: block; }
  .research-group header p { margin-top: 5px; }
}

@keyframes robot-pulse {
  50% { transform: scale(.62); opacity: .35; }
}
