@import url('https://fonts.googleapis.com/css2?family=Exo+2:wght@400;500;600;700;800&family=Orbitron:wght@500;600;700;800&display=swap');

:root {
  --bg: #050914;
  --panel: rgba(10, 19, 38, .88);
  --panel-2: rgba(15, 29, 53, .82);
  --line: rgba(86, 218, 255, .18);
  --cyan: #46dcff;
  --cyan-2: #119bbb;
  --green: #37f3b1;
  --gold: #ffbf42;
  --red: #ff5e73;
  --text: #eaf8ff;
  --muted: #7992a9;
  --shadow: 0 22px 70px rgba(0, 0, 0, .42);
  font-family: "Exo 2", system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
}

* { box-sizing: border-box; }
html, body { height: 100%; min-height: 100%; margin: 0; }
body {
  background:
    radial-gradient(circle at 80% 15%, rgba(25, 100, 148, .16), transparent 28rem),
    radial-gradient(circle at 32% 90%, rgba(77, 34, 120, .18), transparent 34rem),
    linear-gradient(135deg, #040711, #071020 55%, #050812);
  overflow-x: hidden;
}
body.auth-view-active { overflow: hidden; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
.is-hidden { display: none !important; }
.starfield {
  position: fixed; inset: 0; pointer-events: none; opacity: .55;
  background-image:
    radial-gradient(circle, #fff 0 1px, transparent 1.4px),
    radial-gradient(circle, #5cdbff 0 1px, transparent 1.5px);
  background-position: 0 0, 47px 73px;
  background-size: 91px 91px, 137px 137px;
  mask-image: linear-gradient(to bottom, #000, transparent 85%);
}

.eyebrow {
  margin: 0 0 .55rem; color: var(--cyan); font-family: Orbitron, sans-serif;
  font-size: .67rem; font-weight: 700; letter-spacing: .23em;
}
.login-view {
  position: relative; z-index: 1; width: 100%; height: 100vh; height: 100dvh;
  min-height: 0; max-height: 100dvh; display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 500px);
  align-content: center; align-items: center; gap: clamp(1.25rem, 4vw, 4.5rem);
  padding: clamp(.75rem, 2.5vh, 2rem) clamp(1rem, 4vw, 4.5rem);
  overflow: hidden;
}
.login-view::before {
  content: ""; position: absolute; z-index: -1; left: -12vw; top: 10vh;
  width: 65vw; height: 65vw; max-width: 900px; max-height: 900px;
  border: 1px solid rgba(70, 220, 255, .15); border-radius: 50%;
  box-shadow: inset 0 0 120px rgba(21, 155, 187, .07);
}
.login-copy { position: relative; width: 100%; max-width: 1020px; min-height: 0; }
.login-brand-frame { position: relative; width: min(810px,94%); margin-bottom: clamp(1rem,2.3vh,1.9rem); padding: clamp(.85rem,2vh,1.35rem) 1.65rem; border: 1px solid rgba(55,243,177,.14); border-radius: 1.1rem; background: linear-gradient(145deg,rgba(5,23,29,.72),rgba(3,9,18,.3)); overflow: hidden; }
.login-game-logo { display: block; width: 100%; max-height: clamp(120px,20vh,195px); object-fit: contain; filter: drop-shadow(0 0 20px rgba(38,232,156,.2)); }
.brand-scanline { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(to bottom,transparent 48%,rgba(104,255,209,.14) 50%,transparent 52%); background-size: 100% 12px; opacity: .18; }
.login-copy h1 {
  margin: 0; font-family: Orbitron, sans-serif; font-size: clamp(2.8rem, 5.35vw, 5.8rem);
  line-height: 1.02; letter-spacing: -.045em; text-shadow: 0 0 45px rgba(70, 220, 255, .22);
}
.login-copy h1 span { color: transparent; -webkit-text-stroke: 1px var(--cyan); }
.lead { max-width: 52rem; color: #b7cad8; font-size: clamp(1.05rem, 1.45vw, 1.38rem); line-height: 1.45; }
.feature-row { display: flex; flex-wrap: wrap; gap: .7rem; }
.feature-row span, .soft-badge {
  padding: .55rem .75rem; color: #a9c3d5; border: 1px solid var(--line);
  border-radius: 999px; background: rgba(8, 21, 41, .58); font-size: .76rem;
  letter-spacing: .06em;
}
.login-card {
  position: relative; width: 100%; padding: 1.25rem 1.7rem 1.5rem; border: 1px solid rgba(70, 220, 255, .24);
  border-radius: 1.5rem; background: linear-gradient(145deg, rgba(15, 31, 57, .95), rgba(6, 12, 25, .96));
  box-shadow: var(--shadow), inset 0 1px rgba(255,255,255,.04);
}
.login-card::after {
  content: ""; position: absolute; inset: .55rem; pointer-events: none;
  border: 1px solid rgba(70, 220, 255, .08); border-radius: 1.15rem;
}
.login-card h2 { margin: .15rem 0 .3rem; font-family: Orbitron; font-size: 1.35rem; }
.login-card label { position: relative; z-index: 1; display: block; margin: .8rem 0; color: #a9c1d2; font-size: .72rem; letter-spacing: .08em; }
.login-card input {
  width: 100%; margin-top: .42rem; padding: .78rem .9rem; color: var(--text);
  border: 1px solid rgba(111, 156, 187, .25); border-radius: .7rem;
  outline: none; background: rgba(2, 8, 18, .76);
}
.login-card input:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(70, 220, 255, .08); }
.brand-mark { display: flex; align-items: center; justify-content: center; width: 3.2rem; height: 3.2rem; margin-bottom: 1.5rem; border: 1px solid var(--cyan); border-radius: 50%; box-shadow: 0 0 24px rgba(70,220,255,.25); }
.brand-mark i { position: absolute; width: .36rem; height: 1.45rem; border-radius: 1rem; background: var(--cyan); transform: rotate(0deg); }
.brand-mark i:nth-child(2) { transform: rotate(60deg); }
.brand-mark i:nth-child(3) { transform: rotate(-60deg); }
.auth-status-line { display: flex; align-items: center; gap: .5rem; margin-bottom: .85rem; color: #6c879a; font: 600 .55rem Orbitron; letter-spacing: .12em; }
.auth-status-line span { width: .48rem; height: .48rem; border-radius: 50%; background: var(--green); box-shadow: 0 0 9px var(--green); }
.auth-tabs { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1fr; gap: .3rem; margin-bottom: 1.1rem; padding: .28rem; border: 1px solid rgba(85,151,183,.18); border-radius: .72rem; background: rgba(1,7,16,.55); }
.auth-tabs button { padding: .65rem; color: #6d899d; border: 0; border-radius: .5rem; background: transparent; cursor: pointer; font: 700 .62rem Orbitron; letter-spacing: .09em; }
.auth-tabs button.active { color: #00151d; background: linear-gradient(135deg,#72edff,#35c3de); box-shadow: 0 6px 18px rgba(53,195,222,.14); }
.auth-form { position: relative; z-index: 1; }
.auth-intro { margin: 0 0 .7rem; color: #7891a4; font-size: .78rem; }
.register-passwords { display: grid; grid-template-columns: 1fr 1fr; gap: .65rem; }
.faction-selector { display: grid; grid-template-columns: 1fr 1fr; gap: .55rem; margin: .85rem 0 0; padding: 0; border: 0; }
.faction-selector legend { grid-column: 1/-1; margin-bottom: .2rem; color: #a9c1d2; font-size: .7rem; letter-spacing: .08em; }
.faction-choice { position: relative; display: grid !important; grid-template-columns: 38px 1fr; align-items: center; gap: .55rem; min-height: 66px; margin: 0 !important; padding: .6rem; border: 1px solid rgba(92,158,188,.18); border-radius: .7rem; background: rgba(2,9,19,.63); cursor: pointer; overflow: hidden; }
.faction-choice input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.faction-choice:has(input:checked) { border-color: var(--faction-color); box-shadow: inset 0 0 20px color-mix(in srgb,var(--faction-color) 10%,transparent),0 0 14px color-mix(in srgb,var(--faction-color) 12%,transparent); }
.faction-choice.terra { --faction-color:#46dbff; }
.faction-choice.marte { --faction-color:#ff6a52; }
.faction-planet { width: 34px; height: 34px; border-radius: 50%; background: radial-gradient(circle at 34% 28%,#ddfbff 0 5%,var(--faction-color) 21%,#194b70 62%,#071321 100%); box-shadow: inset -8px -5px 10px rgba(0,0,0,.38),0 0 10px color-mix(in srgb,var(--faction-color) 38%,transparent); }
.marte .faction-planet { background: radial-gradient(circle at 34% 28%,#ffd2a5 0 5%,#ee6d45 21%,#753020 62%,#170a08 100%); }
.faction-choice strong { display: block; color: var(--faction-color); font: 700 .65rem Orbitron; }
.faction-choice small { display: block; margin-top: .2rem; color: #718b9e; font-size: .58rem; line-height: 1.25; letter-spacing: 0; }
.guest-access { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: .6rem; margin-top: .8rem; }
.guest-access::before,.guest-access::after { content: ""; height: 1px; background: rgba(100,156,184,.13); }
.guest-access span { color: #4e6a7e; font-size: .55rem; }
.guest-access .ghost-link { grid-column: 1/-1; margin: -.15rem auto 0; }
.login-faction-orbits { position: relative; width: min(900px,97%); height: clamp(68px,11vh,112px); margin-top: clamp(.65rem,1.8vh,1.2rem); overflow: hidden; }
.login-orbit-line { position: absolute; left: 4%; right: 4%; top: 60%; height: 80px; border: 1px solid rgba(71,218,255,.16); border-radius: 50%; transform: rotate(-4deg); }
.login-planet { position: absolute; border-radius: 50%; }
.login-planet.earth { left: 11%; top: 31%; width: 43px; height: 43px; background: radial-gradient(circle at 32% 27%,#e5ffff 0 4%,#28aede 25%,#176b78 47%,#062337 77%); box-shadow: 0 0 20px rgba(57,205,255,.35); }
.login-planet.mars { right: 10%; top: 13%; width: 58px; height: 58px; background: radial-gradient(circle at 31% 25%,#ffd7ad,#d8643d 27%,#7a2c22 62%,#190b0a 82%); box-shadow: 0 0 22px rgba(255,92,55,.3); }
.login-ship-signal { position: absolute; left: 48%; top: 48%; width: 44px; height: 22px; clip-path: polygon(100% 50%,0 0,24% 50%,0 100%); background: var(--green); filter: drop-shadow(0 0 8px var(--green)); transform: rotate(-8deg); }
.form-message { min-height: 1.2rem; color: var(--red); font-size: .84rem; }
.primary, .secondary, .danger {
  border: 0; border-radius: .7rem; cursor: pointer; font-family: Orbitron, sans-serif;
  font-size: .72rem; font-weight: 700; letter-spacing: .08em; transition: .2s ease;
}
.primary {
  padding: .9rem 1.2rem; color: #00121b;
  background: linear-gradient(135deg, #7ceaff, #25badc); box-shadow: 0 8px 28px rgba(37,186,220,.2);
}
.primary:hover { transform: translateY(-2px); filter: brightness(1.08); }
.wide { position: relative; z-index: 1; width: 100%; }
.ghost-link { position: relative; z-index: 1; display: block; margin: 1rem auto 0; color: #8ca8bc; text-align: center; text-decoration: none; font-size: .8rem; }

.app-shell { position: relative; z-index: 1; min-height: 100vh; display: grid; grid-template-columns: 230px 1fr; }
.sidebar {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
  padding: 1.4rem 1rem; border-right: 1px solid var(--line);
  background: rgba(3, 8, 18, .86); backdrop-filter: blur(18px);
}
.logo { display: flex; align-items: center; min-height: 86px; padding: .35rem .4rem 1.55rem; color: var(--text); text-decoration: none; }
.logo img { display: block; width: 100%; max-height: 66px; object-fit: contain; filter: drop-shadow(0 0 11px rgba(55,243,177,.17)); }
.sidebar nav { display: grid; gap: .35rem; }
.nav-item {
  display: flex; align-items: center; gap: .85rem; padding: .85rem .9rem; color: #829bb0;
  border: 1px solid transparent; border-radius: .7rem; background: transparent; cursor: pointer; text-align: left;
}
.nav-item span { width: 1.6rem; color: #86a7bc; font-size: 1.15rem; text-align: center; }
.nav-item:hover, .nav-item.active { color: #e9fbff; border-color: rgba(70,220,255,.17); background: linear-gradient(90deg, rgba(70,220,255,.12), transparent); }
.nav-item.active span { color: var(--cyan); text-shadow: 0 0 12px var(--cyan); }
.sidebar-bottom { display: flex; gap: .7rem; align-items: center; margin-top: auto; padding: .8rem; border-top: 1px solid var(--line); }
.sidebar-bottom small, .pilot-chip small { display: block; color: #6e879b; font-size: .62rem; letter-spacing: .15em; }
.sidebar-bottom strong { color: var(--green); font-size: .72rem; }
.server-dot { width: .55rem; height: .55rem; border-radius: 50%; background: var(--green); box-shadow: 0 0 12px var(--green); }
.main { min-width: 0; padding: 0 clamp(1rem, 3vw, 3.3rem) 3rem; }
.topbar {
  min-height: 100px; display: grid; grid-template-columns: 1fr auto auto; gap: 1.2rem;
  align-items: center; border-bottom: 1px solid var(--line);
}
.topbar h2 { margin: 0; font-family: Orbitron; font-size: 1.15rem; }
.pilot-chip { display: flex; align-items: center; gap: .7rem; }
.pilot-chip strong { display: block; font-size: .84rem; }
.avatar {
  display: grid; place-items: center; width: 2.5rem; height: 2.5rem; color: var(--cyan);
  border: 1px solid rgba(70,220,255,.45); border-radius: .65rem; background: rgba(70,220,255,.08); font-family: Orbitron; font-size: .72rem;
}
.play-button { color: #00121b; text-decoration: none; }
.play-button span { margin-left: .6rem; font-size: 1.1rem; }
.topbar-actions { display: flex; align-items: center; gap: .55rem; }
.header-logout { padding: .82rem .9rem; color: #ff9cab; border: 1px solid rgba(255,94,115,.24); border-radius: .7rem; background: rgba(255,94,115,.055); cursor: pointer; font: 700 .62rem Orbitron; letter-spacing: .08em; }
.header-logout:hover { color: #fff; border-color: rgba(255,94,115,.55); background: rgba(255,94,115,.12); }
.page { display: none; padding-top: 2rem; animation: reveal .28s ease; }
.page.active { display: block; }
@keyframes reveal { from { opacity: 0; transform: translateY(8px); } }
.panel {
  border: 1px solid var(--line); border-radius: 1rem;
  background: linear-gradient(145deg, rgba(12,24,46,.9), rgba(5,12,26,.88));
  box-shadow: 0 18px 50px rgba(0,0,0,.18), inset 0 1px rgba(255,255,255,.025);
}
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.panel-head h3, .inventory-toolbar h3, .store-intro h3, .account-card h3, .security-card h3 { margin: 0; font-family: Orbitron; font-size: 1.05rem; }
.inventory-capacity-widget { display:flex; align-items:center; justify-content:flex-end; gap:.45rem; flex-wrap:wrap; }
.inventory-capacity-widget small { color:#7897aa; font:700 .5rem Orbitron; letter-spacing:.06em; }
.inventory-capacity-widget button {
  padding:.5rem .7rem; color:#dffbff; border:1px solid rgba(70,220,255,.34);
  border-radius:.55rem; background:linear-gradient(135deg,rgba(20,111,143,.42),rgba(7,29,48,.88));
  font:700 .52rem Orbitron; letter-spacing:.08em; cursor:pointer;
}
.inventory-capacity-widget button:hover:not(:disabled) { border-color:var(--cyan); box-shadow:0 0 14px rgba(70,220,255,.16); }
.inventory-capacity-widget button:disabled { opacity:.45; cursor:default; }
.hero-grid { display: grid; grid-template-columns: minmax(420px, .92fr) minmax(390px, 1.08fr); gap: 1.25rem; }
.ship-stage { min-height: 570px; padding: 1.4rem; overflow: hidden; }
.role-badge { padding: .45rem .65rem; color: var(--green); border: 1px solid rgba(55,243,177,.35); border-radius: 999px; background: rgba(55,243,177,.07); font: 600 .62rem Orbitron; letter-spacing: .09em; }
.ship-visual-wrap { position: relative; display: grid; place-items: center; height: 330px; }
.orbit-ring { position: absolute; border: 1px solid rgba(70,220,255,.13); border-radius: 50%; }
.ring-one { width: 300px; height: 165px; transform: rotate(-10deg); }
.ring-two { width: 230px; height: 270px; transform: rotate(58deg); }
.portal-ship-visual { position: relative; z-index: 3; width: 210px; height: 240px; display: grid; place-items: center; }
.game-ship { position: relative; width: 100%; aspect-ratio: 1.25; display: grid; place-items: center; }
.game-ship svg {
  position: relative; z-index: 2; width: 100%; height: 100%;
  filter: drop-shadow(0 0 9px var(--ship-glow)) drop-shadow(0 0 24px color-mix(in srgb,var(--ship-glow) 48%,transparent));
}
.game-ship .ship-engine {
  position: absolute; z-index: 1; left: 50%; top: 76%; width: 22%; height: 46%;
  transform: translateX(-50%); border-radius: 50%;
  background: linear-gradient(to bottom, rgba(255,255,255,.95), var(--ship-glow) 24%, rgba(31,87,255,.5) 55%, transparent);
  filter: blur(2px) drop-shadow(0 0 8px var(--ship-glow));
  animation: enginePulse 1.2s ease-in-out infinite alternate;
}
.home-ship { transform: rotate(7deg); animation: shipFloat 4s ease-in-out infinite; }
@keyframes shipFloat { 50% { transform: translateY(-9px) rotate(4deg); } }
@keyframes enginePulse { to { height: 53%; opacity: .72; } }
.ship-vant-orbit { position: absolute; z-index: 4; inset: 25px; pointer-events: none; }
.orbit-vant { position: absolute; display: grid; place-items: center; width: 48px; height: 48px; padding: 7px; border: 1px solid rgba(86,218,255,.16); border-radius: 50%; background: rgba(4,13,27,.72); box-shadow: 0 0 18px rgba(77,218,255,.09); }
.orbit-vant .pve-vector-icon, .orbit-vant svg { display: block; width: 100%; height: 100%; }
.orbit-vant-1 { left: 4%; top: 43%; }
.orbit-vant-2 { right: 3%; top: 27%; }
.orbit-vant-3 { left: 22%; bottom: 2%; }
.orbit-vant-4 { right: 17%; bottom: 4%; }
.ship-shadow { position: absolute; width: 190px; height: 28px; bottom: 28px; border-radius: 50%; background: rgba(0,0,0,.6); filter: blur(12px); }
.ship-description { min-height: 2.5rem; color: #88a0b4; text-align: center; }
.ship-stats { display: grid; grid-template-columns: repeat(4,1fr); gap: .55rem; }
.ship-stats div { padding: .8rem .65rem; border: 1px solid rgba(70,220,255,.1); border-radius: .65rem; background: rgba(4,10,22,.7); text-align: center; }
.ship-stats small, .metric-card small, .status-strip small { display: block; color: #69849a; font-size: .6rem; letter-spacing: .13em; }
.ship-stats strong { color: #c9f6ff; font-family: Orbitron; font-size: .8rem; }
.overview-column { display: grid; gap: 1.25rem; }
.wallet-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; }
.metric-card { display: flex; align-items: center; gap: .8rem; min-width: 0; padding: 1rem; border: 1px solid var(--line); border-radius: .85rem; background: rgba(8,18,35,.76); }
.metric-card > span { font-size: 1.35rem; }
.metric-card strong { display: block; overflow: hidden; margin-top: .25rem; font-family: Orbitron; font-size: .8rem; text-overflow: ellipsis; }
.metric-card.honor > span, .metric-card.honor strong { color: var(--gold); }
.metric-card.credits > span, .metric-card.credits strong { color: var(--cyan); }
.metric-card.cargo > span, .metric-card.cargo strong { color: #ff826e; }
.quick-panel { padding: 1.4rem; }
.quick-actions { display: grid; gap: .7rem; margin-top: 1.3rem; }
.quick-actions button { display: flex; align-items: center; gap: 1rem; padding: 1rem; color: #d8eff7; border: 1px solid rgba(89,150,184,.14); border-radius: .75rem; background: rgba(2,8,18,.54); cursor: pointer; text-align: left; }
.quick-actions button:hover { border-color: rgba(70,220,255,.38); transform: translateX(3px); }
.quick-actions b { display: grid; place-items: center; width: 2.2rem; height: 2.2rem; color: var(--cyan); border: 1px solid rgba(70,220,255,.25); border-radius: .55rem; }
.quick-actions span { font-weight: 600; }
.quick-actions small { display: block; margin-top: .2rem; color: #6f899d; font-weight: 400; }
.status-strip { display: grid; grid-template-columns: repeat(4,1fr); gap: 1px; margin-top: 1.25rem; overflow: hidden; }
.status-strip div { padding: 1rem 1.2rem; background: rgba(6,15,29,.7); }
.status-strip strong { display: block; margin-top: .3rem; color: #bfeeff; font-size: .78rem; }

.page#page-ranking.active { display: grid; gap: 1rem; }
.ranking-panel { width: min(980px,100%); margin: 0 auto; padding: 1.5rem; }
.pvp-ranking-panel { border-color: rgba(255,91,105,.24); }
.panel-description { margin: .45rem 0 0; color: #708ba0; font-size: .82rem; }
.pvp-period-tabs { display: flex; gap: .35rem; padding: .25rem; border: 1px solid rgba(255,91,105,.17); border-radius: .65rem; background: rgba(9,4,15,.6); }
.pvp-period-tabs button { padding: .6rem .72rem; color: #7c91a4; border: 0; border-radius: .45rem; background: transparent; cursor: pointer; font: 700 .57rem Orbitron; letter-spacing: .08em; }
.pvp-period-tabs button:hover { color: #ffc3ca; }
.pvp-period-tabs button.active { color: #fff; background: linear-gradient(135deg,#a7253a,#ff526b); box-shadow: 0 0 16px rgba(255,62,91,.22); }
.secondary { padding: .65rem .85rem; color: var(--cyan); border: 1px solid rgba(70,220,255,.25); background: rgba(70,220,255,.07); }
.ranking-list { display: grid; gap: .55rem; margin-top: 1.4rem; }
.rank-row { display: grid; grid-template-columns: 55px 1fr auto auto; align-items: center; gap: 1rem; padding: .9rem 1rem; border: 1px solid rgba(87,144,178,.12); border-radius: .75rem; background: rgba(3,10,22,.6); }
.rank-row:first-child { border-color: rgba(255,191,66,.35); background: linear-gradient(90deg, rgba(255,191,66,.09), transparent); }
.rank-position { color: #607d91; font: 700 .82rem Orbitron; }
.rank-row:first-child .rank-position { color: var(--gold); }
.rank-name { font-weight: 700; }
.rank-name small { display: block; margin-top: .22rem; color: #607d91; font: 500 .56rem Orbitron; letter-spacing: .06em; }
.rank-honor { color: var(--gold); font: 700 .78rem Orbitron; }
.pvp-rank-row { grid-template-columns: 55px minmax(180px,1fr) auto auto; }
.pvp-rank-row:first-child { border-color: rgba(255,82,107,.42); background: linear-gradient(90deg,rgba(255,55,88,.11),transparent); }
.rank-pvp-points { color: #ff6f83; font: 800 .78rem Orbitron; text-shadow: 0 0 12px rgba(255,61,91,.28); }
.rank-pvp-record { min-width: 68px; color: #91a9ba; font: 600 .64rem Orbitron; text-align: right; }
.online-tag { width: .5rem; height: .5rem; border-radius: 50%; background: #345064; }
.online-tag.yes { background: var(--green); box-shadow: 0 0 8px var(--green); }

.inventory-toolbar, .store-intro { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-end; margin-bottom: 1.2rem; }
.inventory-toolbar p:not(.eyebrow), .store-intro p:not(.eyebrow) { margin: .55rem 0 0; color: #748fa4; }
.config-switch { display: flex; padding: .25rem; border: 1px solid var(--line); border-radius: .75rem; background: rgba(3,9,20,.7); }
.config-switch button { padding: .65rem .8rem; color: #6e899f; border: 0; border-radius: .55rem; background: transparent; cursor: pointer; font: 600 .65rem Orbitron; }
.config-switch button.active { color: #00131d; background: var(--cyan); }
.inventory-ship-banner {
  position: relative; min-height: 128px; display: grid; grid-template-columns: 180px minmax(220px,1fr) auto;
  align-items: center; gap: 1.1rem; margin-bottom: 1rem; padding: .7rem 1.3rem; overflow: hidden;
}
.inventory-ship-banner::after {
  content: ""; position: absolute; inset: 50% auto auto -2%; width: 55%; height: 1px;
  background: linear-gradient(90deg,transparent,var(--cyan),transparent); opacity: .24;
}
.inventory-ship-visual { position: relative; z-index: 1; height: 112px; display: grid; place-items: center; }
.inventory-ship { width: 128px; transform: rotate(90deg); }
.inventory-ship-copy { position: relative; z-index: 1; }
.inventory-ship-copy h3 { margin: 0; font: 700 1.2rem Orbitron; }
.inventory-ship-copy > span { display: inline-block; margin-top: .45rem; color: var(--green); font: 700 .63rem Orbitron; letter-spacing: .13em; }
.drag-legend { position: relative; z-index: 1; display: grid; gap: .6rem; color: #7893a7; font: 600 .58rem Orbitron; letter-spacing: .08em; }
.drag-legend span { display: flex; align-items: center; gap: .55rem; }
.drag-dot, .double-dot { width: .55rem; height: .55rem; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.double-dot { background: var(--gold); box-shadow: 0 0 8px var(--gold); }
.inventory-layout { display: grid; grid-template-columns: minmax(480px, 1.18fr) minmax(330px, .82fr); gap: 1rem; }
.loadout-panel, .storage-panel { min-height: 650px; padding: 1.2rem; }
.slot-section { margin-bottom: 1.1rem; }
.slot-title { display: flex; justify-content: space-between; color: #9bb7c9; font: 600 .65rem Orbitron; letter-spacing: .12em; }
.slot-row { display: grid; grid-template-columns: repeat(5,minmax(66px,1fr)); gap: .55rem; margin-top: .55rem; }
.slot {
  position: relative; min-height: 96px; display: grid; grid-template-columns: 42px minmax(0,1fr);
  align-items: center; gap: .45rem; padding: .55rem; color: #7e98aa; border: 1px dashed rgba(87,158,191,.22);
  border-radius: .65rem; background: rgba(3,9,19,.54); cursor: pointer; overflow: hidden;
}
.slot:hover { border-color: rgba(70,220,255,.55); }
.slot.filled { color: #dcf6ff; border-style: solid; border-color: rgba(70,220,255,.22); background: linear-gradient(145deg, rgba(28,78,104,.28), rgba(5,12,24,.7)); }
.slot.locked { opacity: .32; cursor: not-allowed; }
.slot-copy { min-width: 0; text-align: left; }
.slot small { display: block; color: #5f7b90; font-size: .52rem; }
.slot strong { display: block; overflow: hidden; margin-top: .28rem; font-size: .64rem; text-overflow: ellipsis; }
.slot-item-art { display: grid; place-items: center; width: 40px; height: 40px; padding: 2px; border: 1px solid transparent; border-radius: .55rem; background: transparent; box-shadow: none; }
.slot-item-art .pve-vector-icon, .slot-item-art svg { display: block; width: 100%; height: 100%; }
.slot-empty-mark { display: grid; place-items: center; width: 38px; height: 38px; color: #31566b; border: 1px dashed rgba(82,151,183,.22); border-radius: .55rem; font-size: 1.1rem; }
.tier { position: absolute; right: .4rem; top: .35rem; color: var(--gold); font: 600 .55rem Orbitron; }
.slot.drop-ready { border-color: rgba(55,243,177,.5); background: rgba(55,243,177,.06); }
.slot.drop-denied { opacity: .35; }
.slot.drag-over { border-color: var(--green); background: rgba(55,243,177,.14); box-shadow: inset 0 0 22px rgba(55,243,177,.08),0 0 13px rgba(55,243,177,.18); transform: translateY(-2px); }
.dragging { opacity: .38 !important; }
.vant-divider { display: flex; align-items: center; gap: .7rem; color: var(--cyan); font: 600 .63rem Orbitron; letter-spacing: .2em; }
.vant-divider::before, .vant-divider::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.vant-loadout { display: grid; grid-template-columns: repeat(2,1fr); gap: .7rem; margin-top: .8rem; }
.vant-card { padding: .75rem; border: 1px solid rgba(70,220,255,.13); border-radius: .7rem; background: rgba(4,11,23,.65); }
.vant-card.elite { border-color: rgba(192,138,255,.36); background: linear-gradient(145deg,rgba(86,44,126,.18),rgba(3,13,28,.78)); }
.vant-card-head { display: flex; align-items: center; gap: .65rem; margin-bottom: .55rem; font-size: .7rem; }
.vant-card-head > div { min-width: 0; flex: 1; }
.vant-card-head strong, .vant-card-head span { display: block; }
.vant-card-head > div > span { margin-top: .2rem; color: #7995aa; font-size: .58rem; }
.vant-card-art { display: grid; place-items: center; width: 42px; height: 42px; flex: 0 0 42px; padding: 5px; color: #bd8cff; border: 1px solid rgba(183,112,255,.25); border-radius: .55rem; background: rgba(84,38,125,.12); }
.vant-card-art .pve-vector-icon, .vant-card-art svg { width: 100%; height: 100%; }
.empty-vant { color: #496377; border-style: dashed; }
.vant-slots { display: grid; grid-template-columns: repeat(2,1fr); gap: .4rem; }
.storage-panel { min-width: 0; }
.inventory-drop-zone {
  display: grid; place-items: center; min-height: 42px; margin-top: .9rem; padding: .6rem;
  color: #5e7d90; border: 1px dashed rgba(80,170,204,.2); border-radius: .6rem;
  background: rgba(2,8,17,.5); font: 600 .55rem Orbitron; letter-spacing: .1em; transition: .18s ease;
}
.inventory-dragging .inventory-drop-zone { color: #9bc5d7; border-color: rgba(70,220,255,.4); }
.inventory-drop-zone.drag-over { color: var(--green); border-color: var(--green); background: rgba(55,243,177,.09); box-shadow: inset 0 0 20px rgba(55,243,177,.06); }
.storage-panel.receiving-equipped-item { border-color: rgba(55,243,177,.58); box-shadow: 0 0 0 1px rgba(55,243,177,.16), inset 0 0 32px rgba(55,243,177,.045), 0 18px 42px rgba(0,0,0,.24); }
.storage-panel.receiving-equipped-item .item-grid { background: rgba(55,243,177,.018); border-radius: .85rem; }
.filter-row { display: flex; gap: .4rem; margin: 1rem 0; overflow-x: auto; }
.filter-row button, .store-tabs button, .store-category-tabs button { padding: .55rem .7rem; color: #708da2; border: 1px solid transparent; border-radius: .55rem; background: transparent; cursor: pointer; white-space: nowrap; }
.filter-row button.active, .store-tabs button.active, .store-category-tabs button.active { color: var(--cyan); border-color: rgba(70,220,255,.22); background: rgba(70,220,255,.07); }
.item-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .6rem; max-height: 540px; overflow: auto; padding-right: .25rem; }
.item-card {
  position: relative; min-width: 0; display: grid; grid-template-columns: 64px minmax(0,1fr);
  column-gap: .75rem; padding: .8rem; border: 1px solid rgba(91,150,183,.16);
  border-radius: .7rem; background: rgba(3,10,21,.68); cursor: grab;
}
.item-card:hover { border-color: rgba(70,220,255,.45); transform: translateY(-1px); }
.item-card:active { cursor: grabbing; }
.item-card.is-equipped { border-color: rgba(55,243,177,.2); background: linear-gradient(145deg,rgba(25,79,71,.14),rgba(3,10,21,.72)); }
.item-card-visual { display: grid; place-items: center; width: 64px; height: 64px; padding: 3px; border: 1px solid transparent; border-radius: .75rem; background: transparent; box-shadow: none; }
.item-card-visual .pve-vector-icon, .item-card-visual svg { display: block; width: 100%; height: 100%; }
.item-card-copy { min-width: 0; }
.item-card h4 { overflow: hidden; margin: .8rem 2.6rem .25rem 0; font-size: .76rem; text-overflow: ellipsis; white-space: nowrap; }
.item-card p { margin: 0; color: #6e889b; font-size: .66rem; line-height: 1.35; }
.item-card .item-actions { grid-column: 1/-1; display: flex; gap: .35rem; margin-top: .7rem; }
.mini-action { padding: .35rem .48rem; color: #9dc7d8; border: 1px solid rgba(87,154,186,.18); border-radius: .4rem; background: rgba(18,48,67,.22); cursor: pointer; font-size: .58rem; }
.mini-action.sell { color: #ffad77; }
.equipped-badge { grid-column: 1/-1; display: inline-block; margin-top: .5rem; color: var(--green); font-size: .57rem; }

.balance-pill { padding: .8rem 1rem; color: var(--cyan); border: 1px solid rgba(70,220,255,.22); border-radius: .8rem; background: rgba(70,220,255,.06); font: .7rem Orbitron; }
.store-balances { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .5rem; }
.balance-pill.stellar { color: #d0adff; border-color: rgba(164,105,255,.3); background: rgba(142,89,255,.08); }
.store-tabs { display: grid; grid-template-columns: repeat(5,minmax(110px,1fr)); gap: .35rem; padding: .35rem; border: 1px solid var(--line); border-radius: .85rem; background: rgba(4,10,22,.72); }
.store-tabs button { min-height: 42px; font: 700 .64rem Orbitron; letter-spacing: .06em; }
.store-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-top: 1rem; padding: 1rem 1.1rem; border: 1px solid rgba(84,153,185,.13); border-radius: .8rem; background: linear-gradient(135deg,rgba(10,25,44,.66),rgba(4,10,21,.5)); }
.store-section-head h4 { margin: 0; font: 700 .9rem Orbitron; }
.store-section-head p:not(.eyebrow) { margin: .35rem 0 0; color: #6e879a; font-size: .72rem; }
.store-category-tabs { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .3rem; }
.store-category-tabs button { display: inline-flex; align-items: center; gap: .38rem; padding: .48rem .58rem; font-size: .65rem; }
.store-category-tabs small { min-width: 19px; padding: .12rem .28rem; color: #7894a7; border-radius: .35rem; background: rgba(255,255,255,.055); font-size: .55rem; text-align: center; }
.store-category-tabs button.active small { color: #d9fbff; background: rgba(70,220,255,.12); }
.store-grid { display: grid; grid-template-columns: repeat(4,minmax(210px,1fr)); gap: .8rem; margin-top: 1rem; }
.store-extra-section {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 42px minmax(0,1fr) auto;
  align-items: center;
  gap: .72rem;
  margin: .8rem 0 -.15rem;
  padding: .62rem .7rem;
  border: 1px solid rgba(80,184,224,.16);
  border-left: 3px solid rgba(70,220,255,.65);
  border-radius: .62rem;
  background: linear-gradient(90deg,rgba(28,83,112,.18),rgba(5,13,27,.28) 72%);
}
.store-extra-section:first-child { margin-top: 0; }
.store-extra-section-code {
  display: grid;
  place-items: center;
  width: 42px;
  height: 32px;
  color: #9cecff;
  border: 1px solid rgba(70,220,255,.24);
  border-radius: .45rem;
  background: rgba(70,220,255,.07);
  font: 700 .58rem Orbitron;
  letter-spacing: .09rem;
}
.store-extra-section-copy { min-width: 0; display: flex; flex-direction: column; gap: .14rem; }
.store-extra-section-copy strong { color: #c8f6ff; font: 700 .67rem Orbitron; letter-spacing: .055rem; text-transform: uppercase; }
.store-extra-section-copy small { color: #67889d; font-size: .62rem; line-height: 1.35; }
.store-extra-section > b {
  min-width: 28px;
  padding: .25rem .42rem;
  color: #8eafc1;
  border-radius: .38rem;
  background: rgba(255,255,255,.045);
  font: 600 .58rem Orbitron;
  text-align: center;
}
.store-extra-section-repair { border-left-color: #45e39a; }
.store-extra-section-energy { border-left-color: #ffd05a; }
.store-extra-section-hull { border-left-color: #ff8e62; }
.store-extra-section-shield { border-left-color: #4fc7ff; }
.store-extra-section-refractor { border-left-color: #e184ff; }
.store-extra-section-boss { border-left-color: #ff5d75; }
.store-extra-section-vant { border-left-color: #74f0df; }
.store-extra-section-teleport { border-left-color: #9e8cff; }
.store-extra-section-collection { border-left-color: #63d9b0; }
.store-extra-section-cargo { border-left-color: #e9b654; }
.store-card { position: relative; min-height: 260px; display: flex; flex-direction: column; padding: 1rem; border: 1px solid rgba(80,142,175,.16); border-radius: .85rem; background: linear-gradient(145deg, rgba(12,26,48,.78), rgba(4,10,21,.82)); overflow: hidden; }
.store-card::before { content: ""; position: absolute; width: 120px; height: 120px; right: -50px; top: -50px; border-radius: 50%; background: rgba(70,220,255,.05); }
.store-icon { display: grid; place-items: center; width: 3rem; height: 3rem; color: var(--cyan); border: 1px solid rgba(70,220,255,.28); border-radius: .75rem; background: rgba(70,220,255,.07); font: 700 1rem Orbitron; }
.store-visual { position: relative; z-index: 1; height: 94px; display: grid; place-items: center; border: 1px solid rgba(70,220,255,.1); border-radius: .7rem; background: radial-gradient(circle,rgba(70,220,255,.08),transparent 67%); overflow: hidden; }
.store-equipment-art { display: grid; place-items: center; width: 72px; height: 72px; padding: 10px; }
.store-equipment-art .pve-vector-icon, .store-equipment-art svg { display: block; width: 100%; height: 100%; }
.store-ship { width: 110px; transform: rotate(90deg); }
.store-ship .ship-engine { display: none; }
.store-status { position: absolute; z-index: 2; right: .7rem; top: .7rem; max-width: calc(100% - 1.4rem); padding: .28rem .45rem; color: var(--green); border: 1px solid rgba(55,243,177,.25); border-radius: .4rem; background: rgba(2,15,22,.86); font: 700 .5rem Orbitron; letter-spacing: .07em; }
.store-card-workshop { border-color: rgba(170,119,255,.18); }
.store-card-workshop .store-visual { background: radial-gradient(circle,rgba(168,116,255,.1),transparent 67%); }
.store-card-refinery { border-color: rgba(255,191,66,.17); }
.store-card-refinery .store-visual { background: radial-gradient(circle,rgba(70,220,255,.055),transparent 67%); }
.store-card-refinery .store-visual .refinery-mineral-visual { width:58px; height:54px; }
.refinery-core { display: grid; place-items: center; width: 62px; height: 62px; color: var(--gold); border: 1px solid rgba(255,191,66,.35); border-radius: 50%; background: rgba(255,191,66,.07); box-shadow: 0 0 22px rgba(255,191,66,.14),inset 0 0 15px rgba(255,191,66,.08); font-size: 1.5rem; }

.mineral-sale-control { display:grid; gap:.5rem; margin-top:.75rem; padding:.65rem; border:1px solid rgba(255,191,66,.16); border-radius:.65rem; background:rgba(255,191,66,.035); }
.mineral-sale-label { color:#8098aa; font:600 .5rem Orbitron; letter-spacing:.08em; }
.mineral-sale-stepper { display:grid; grid-template-columns:auto minmax(42px,1fr) auto auto auto; align-items:center; overflow:hidden; border:1px solid rgba(80,180,220,.18); border-radius:.55rem; background:rgba(2,10,19,.72); }
.mineral-sale-stepper button { margin:0; min-width:30px; height:32px; padding:.25rem .45rem; border:0; border-right:1px solid rgba(80,180,220,.12); border-radius:0; background:rgba(70,220,255,.05); }
.mineral-sale-stepper button:last-child { border-right:0; border-left:1px solid rgba(255,191,66,.12); color:var(--gold); }
.mineral-sale-stepper input { min-width:0; height:32px; padding:0 .35rem; border:0; outline:0; color:#edfaff; background:transparent; text-align:right; font:700 .62rem Orbitron; appearance:textfield; -moz-appearance:textfield; }
.mineral-sale-stepper input::-webkit-inner-spin-button,.mineral-sale-stepper input::-webkit-outer-spin-button { margin:0; -webkit-appearance:none; }
.mineral-sale-stepper span { padding:0 .35rem; color:#637e91; font:600 .53rem Orbitron; white-space:nowrap; }
.mineral-sale-total { display:flex; align-items:end; justify-content:space-between; gap:.5rem; }
.mineral-sale-total small { color:#607789; font:600 .48rem Orbitron; letter-spacing:.06em; }
.mineral-sale-total strong { color:#ffe39b; font:700 .6rem Orbitron; }
.mineral-sale-control > button[data-mineral-sell] { margin-top:0; color:#c9f8df; border-color:rgba(61,255,139,.25); background:rgba(61,255,139,.07); }
.mineral-sale-empty { margin-top:auto; padding:.65rem; color:#5f7586; border:1px dashed rgba(255,255,255,.08); border-radius:.55rem; text-align:center; font:600 .52rem Orbitron; letter-spacing:.06em; }
.refinery-workspace { display:block; }
.refinery-subtabs { display:grid; grid-template-columns:1fr 1fr; gap:.4rem; margin-bottom:.8rem; padding:.35rem; border:1px solid var(--line); border-radius:.8rem; background:rgba(3,10,20,.75); }
.refinery-subtabs button { min-height:40px; border:1px solid transparent; border-radius:.55rem; color:#718da0; background:transparent; font:700 .62rem Orbitron; letter-spacing:.08em; cursor:pointer; }
.refinery-subtabs button.active { color:var(--cyan); border-color:rgba(70,220,255,.25); background:rgba(70,220,255,.07); }
.refinery-logistics-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:.75rem; }
.refinery-fusion-workspace { display:grid; gap:.8rem; }
.refinery-level-panel,.refinery-active-job { display:flex; align-items:center; justify-content:space-between; gap:1rem; padding:1rem 1.1rem; border:1px solid rgba(70,220,255,.16); border-radius:.9rem; background:linear-gradient(135deg,rgba(18,87,119,.10),rgba(4,11,21,.8)); }
.refinery-active-job { border-color:rgba(255,191,66,.20); background:rgba(255,191,66,.04); }
.refinery-active-job.available { border-color:rgba(61,255,139,.16); background:rgba(61,255,139,.025); }
.refinery-active-job.ready { border-color:rgba(61,255,139,.28); background:rgba(61,255,139,.045); }
.refinery-level-panel h4,.refinery-active-job h4 { margin:.15rem 0 .25rem; color:#e9faff; font:700 .85rem Orbitron; }
.refinery-level-panel p,.refinery-active-job p { margin:0; color:#718a9c; font-size:.72rem; }
.refinery-active-job small { display:block; margin-top:.35rem; color:#607b8e; font-size:.63rem; line-height:1.45; }
.refinery-level-panel button,.refinery-active-job button,.refinery-start-button { min-height:38px; padding:.55rem .75rem; border:1px solid rgba(70,220,255,.22); border-radius:.55rem; color:#bcefff; background:rgba(70,220,255,.07); font:700 .58rem Orbitron; cursor:pointer; }
.refinery-level-panel button:disabled,.refinery-active-job button:disabled,.refinery-start-button:disabled { opacity:.38; cursor:not-allowed; }
.refinery-tree-layout { display:grid; grid-template-columns:minmax(0,1.15fr) minmax(320px,.85fr); gap:.8rem; align-items:stretch; }
.refinery-tree-panel,.refinery-detail-panel { min-width:0; padding:1rem; border:1px solid rgba(70,220,255,.13); border-radius:.95rem; background:linear-gradient(145deg,rgba(5,17,30,.92),rgba(2,9,18,.88)); }
.refinery-tree-panel.busy { border-color:rgba(255,191,66,.20); }
.refinery-tree-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:1rem; margin-bottom:.65rem; padding-bottom:.75rem; border-bottom:1px solid rgba(255,255,255,.06); }
.refinery-tree-heading h4 { margin:.12rem 0 .2rem; color:#eaf8ff; font:700 .82rem Orbitron; }
.refinery-tree-heading p { margin:0; color:#698497; font-size:.66rem; }
.refinery-tree-heading>b { padding:.35rem .5rem; border:1px solid rgba(61,255,139,.22); border-radius:.48rem; color:#7af0ad; background:rgba(61,255,139,.05); font:700 .52rem Orbitron; letter-spacing:.08em; }
.refinery-tree-panel.busy .refinery-tree-heading>b { color:#ffd67d; border-color:rgba(255,191,66,.27); background:rgba(255,191,66,.05); }
.refinery-tree { display:grid; gap:.15rem; }
.refinery-tree-tier { position:relative; display:grid; gap:.55rem; padding-top:1.35rem; }
.refinery-tree-tier.common { grid-template-columns:repeat(4,minmax(0,1fr)); }
.refinery-tree-tier.rare { grid-template-columns:repeat(2,minmax(0,1fr)); padding-inline:12%; }
.refinery-tree-tier.final { grid-template-columns:minmax(0,1fr); padding-inline:31%; }
.refinery-tree-tier>label { position:absolute; top:.25rem; left:0; color:#4f6b7e; font:700 .47rem Orbitron; letter-spacing:.11em; }
.refinery-tree-node { position:relative; min-width:0; min-height:98px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:.28rem; padding:.65rem .4rem; border:1px solid rgba(255,255,255,.075); border-radius:.7rem; color:#dceff7; background:rgba(255,255,255,.025); text-align:center; }
.refinery-tree-node::before { content:""; position:absolute; inset:0; pointer-events:none; border-radius:inherit; background:radial-gradient(circle at 50% 0,var(--mineral-color),transparent 62%); opacity:.07; }
.refinery-tree-node>strong { max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font:700 .56rem Orbitron; }
.refinery-tree-node>small { color:#638095; font-size:.54rem; }
.refinery-tree-node>em { color:#ffd77e; font:700 .45rem Orbitron; font-style:normal; letter-spacing:.07em; }
.refinery-tree-node.static:disabled { opacity:1; cursor:default; }
.refinery-tree-node.clickable { cursor:pointer; transition:.16s ease; }
.refinery-tree-node.clickable:hover { transform:translateY(-2px); border-color:color-mix(in srgb,var(--mineral-color) 48%,transparent); }
.refinery-tree-node.selected { border-color:color-mix(in srgb,var(--mineral-color) 66%,transparent); box-shadow:0 0 20px color-mix(in srgb,var(--mineral-color) 14%,transparent),inset 0 0 18px color-mix(in srgb,var(--mineral-color) 6%,transparent); }
.refinery-tree-node.producing { outline:1px solid rgba(255,205,83,.36); outline-offset:2px; }
.refinery-mineral-visual { position:relative; width:42px; height:38px; display:block; flex:0 0 auto; }
.refinery-mineral-visual.compact { width:24px; height:22px; }
.refinery-mineral-visual i { position:absolute; display:block; box-sizing:border-box; }
.refinery-mineral-visual .back { inset:2px; border-radius:50%; opacity:.34; filter:blur(6px); }
.refinery-mineral-visual .core { inset:4px 6px 4px; }
.refinery-mineral-visual .accent { opacity:.92; }
.refinery-mineral-visual .ring { opacity:.72; }
.refinery-mineral-visual .spark { width:5px; height:5px; border-radius:50%; background:rgba(255,255,255,.95); box-shadow:0 0 8px rgba(255,255,255,.72); }
.refinery-mineral-visual .spark.one { top:2px; right:4px; }
.refinery-mineral-visual .spark.two { bottom:4px; left:4px; width:4px; height:4px; opacity:.8; }
.refinery-mineral-visual.compact .spark.one { top:0; right:1px; }
.refinery-mineral-visual.compact .spark.two { bottom:2px; left:1px; }
.refinery-mineral-visual.type-ferrita .back { background:radial-gradient(circle,rgba(215,230,242,.54),transparent 70%); }
.refinery-mineral-visual.type-ferrita .core { clip-path:polygon(20% 12%,57% 4%,88% 28%,80% 78%,48% 95%,14% 74%,7% 36%); background:linear-gradient(150deg,#eef7ff 0,#c7d4e0 33%,#8393a5 68%,#495569 100%); box-shadow:inset 0 0 0 1px rgba(255,255,255,.24), inset -8px -6px 10px rgba(43,51,63,.35), 0 0 10px rgba(193,219,235,.16); }
.refinery-mineral-visual.type-ferrita .accent { inset:10px 14px 13px 12px; clip-path:polygon(12% 20%,78% 0,100% 38%,48% 100%,0 64%); background:linear-gradient(180deg,rgba(255,255,255,.85),rgba(255,255,255,0)); }
.refinery-mineral-visual.type-cobalto .back { background:radial-gradient(circle,rgba(106,182,255,.58),transparent 72%); }
.refinery-mineral-visual.type-cobalto .core { clip-path:polygon(20% 12%,57% 4%,88% 28%,80% 78%,48% 95%,14% 74%,7% 36%); background:linear-gradient(150deg,#e6f7ff 0,#8bd6ff 24%,#3f86d8 63%,#203763 100%); box-shadow:inset 0 0 0 1px rgba(255,255,255,.24), inset -8px -6px 10px rgba(17,37,87,.34), 0 0 11px rgba(81,177,255,.24); }
.refinery-mineral-visual.type-cobalto .accent { inset:10px 14px 13px 12px; clip-path:polygon(10% 18%,80% 0,100% 44%,46% 100%,0 60%); background:linear-gradient(180deg,rgba(255,255,255,.82),rgba(255,255,255,0)); }
.refinery-mineral-visual.type-iridio .back { background:radial-gradient(circle,rgba(180,114,255,.54),transparent 72%); }
.refinery-mineral-visual.type-iridio .core { clip-path:polygon(20% 12%,57% 4%,88% 28%,80% 78%,48% 95%,14% 74%,7% 36%); background:linear-gradient(150deg,#f7ecff 0,#c390ff 30%,#7568dd 58%,#2b3e7f 100%); box-shadow:inset 0 0 0 1px rgba(255,255,255,.2), inset -8px -6px 10px rgba(44,33,89,.35), 0 0 11px rgba(181,117,255,.22); }
.refinery-mineral-visual.type-iridio .accent { inset:10px 14px 13px 12px; clip-path:polygon(10% 18%,80% 0,100% 44%,46% 100%,0 60%); background:linear-gradient(180deg,rgba(255,255,255,.82),rgba(255,255,255,0)); }
.refinery-mineral-visual.type-cristal_plasma .back { background:radial-gradient(circle,rgba(255,124,239,.52),transparent 70%), radial-gradient(circle at 62% 60%,rgba(87,227,255,.34),transparent 72%); }
.refinery-mineral-visual.type-cristal_plasma .core { inset:1px 10px 0; clip-path:polygon(50% 0,86% 24%,72% 92%,50% 100%,28% 92%,14% 24%); background:linear-gradient(160deg,#effdff 0,#79f4ff 26%,#dc6fff 58%,#5a3da6 100%); box-shadow:inset 0 0 0 1px rgba(255,255,255,.26), 0 0 12px rgba(113,233,255,.25); }
.refinery-mineral-visual.type-cristal_plasma .accent { inset:6px 16px 8px 14px; clip-path:polygon(50% 0,88% 22%,72% 90%,50% 100%,28% 90%,12% 22%); background:linear-gradient(180deg,rgba(255,255,255,.82),rgba(255,255,255,0)); }
.refinery-mineral-visual.type-cristal_azul .back { background:radial-gradient(circle,rgba(79,196,255,.55),transparent 70%); }
.refinery-mineral-visual.type-cristal_azul .core { inset:1px 10px 0; clip-path:polygon(50% 0,86% 24%,72% 92%,50% 100%,28% 92%,14% 24%); background:linear-gradient(160deg,#eefeff 0,#9ce6ff 22%,#4aa0ff 60%,#20479a 100%); box-shadow:inset 0 0 0 1px rgba(255,255,255,.26), 0 0 12px rgba(79,196,255,.28); }
.refinery-mineral-visual.type-cristal_azul .accent { inset:6px 16px 8px 14px; clip-path:polygon(50% 0,88% 22%,72% 90%,50% 100%,28% 90%,12% 22%); background:linear-gradient(180deg,rgba(255,255,255,.84),rgba(255,255,255,0)); }
.refinery-mineral-visual.type-nucleo_estelar .back { background:radial-gradient(circle,rgba(255,206,87,.55),transparent 70%), radial-gradient(circle at 70% 72%,rgba(142,92,255,.38),transparent 75%); }
.refinery-mineral-visual.type-nucleo_estelar .core { inset:6px; border-radius:50%; background:radial-gradient(circle at 32% 30%,#fffbe5 0,#ffe783 25%,#ff9a61 50%,#7e4cff 78%,#191f46 100%); box-shadow:inset 0 0 0 1px rgba(255,255,255,.18), 0 0 14px rgba(255,201,97,.28); }
.refinery-mineral-visual.type-nucleo_estelar .accent { inset:11px; border-radius:50%; background:radial-gradient(circle at 34% 34%,rgba(255,255,255,.95),rgba(255,248,181,.55) 44%,transparent 72%); }
.refinery-mineral-visual.type-nucleo_estelar .ring { inset:2px; border:1px solid rgba(255,219,124,.68); border-radius:50%; transform:rotate(-18deg); }
.refinery-mineral-visual.type-metralins .back { background:radial-gradient(circle,rgba(111,255,207,.52),transparent 70%), radial-gradient(circle at 65% 70%,rgba(63,184,149,.28),transparent 75%); }
.refinery-mineral-visual.type-metralins .core { inset:3px 6px 2px; clip-path:polygon(50% 0,82% 16%,98% 50%,82% 84%,50% 100%,18% 84%,2% 50%,18% 16%); background:linear-gradient(145deg,#e4fff3 0,#90ffd8 28%,#2bb58b 62%,#0c5847 100%); box-shadow:inset 0 0 0 1px rgba(255,255,255,.22), 0 0 13px rgba(111,255,207,.24); }
.refinery-mineral-visual.type-metralins .accent { inset:10px 14px 12px; clip-path:polygon(50% 0,78% 50%,50% 100%,22% 50%); background:linear-gradient(180deg,rgba(255,255,255,.86),rgba(255,255,255,0)); }
.refinery-mineral-visual.type-metralins .ring { inset:8px 11px; border:1px solid rgba(219,255,241,.7); border-radius:50%; }
.refinery-tree-link { position:relative; height:28px; }
.refinery-tree-link i { position:absolute; left:50%; top:4px; width:1px; height:18px; background:linear-gradient(#2f718f,#61dfff); opacity:.5; }
.refinery-tree-link i::after { content:"▼"; position:absolute; left:50%; bottom:-8px; transform:translateX(-50%); color:#61dfff; font-size:.5rem; }
.refinery-detail-panel { display:flex; flex-direction:column; }
.refinery-detail-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:1rem; padding-bottom:.8rem; border-bottom:1px solid rgba(255,255,255,.06); }
.refinery-detail-heading h4 { margin:.15rem 0 .25rem; color:#effbff; font:700 .9rem Orbitron; }
.refinery-detail-heading p { margin:0; color:#6b8799; font-size:.67rem; line-height:1.45; }
.refinery-detail-heading>strong { flex:0 0 auto; min-width:48px; padding:.45rem .55rem; border:1px solid rgba(61,255,139,.2); border-radius:.55rem; color:#8df0b7; background:rgba(61,255,139,.05); text-align:center; font:700 .68rem Orbitron; }
.refinery-lock-banner { margin-top:.75rem; padding:.65rem .7rem; border:1px solid rgba(255,191,66,.22); border-radius:.6rem; color:#ffd77f; background:rgba(255,191,66,.045); font:700 .52rem Orbitron; line-height:1.5; }
.refinery-detail-section { display:grid; gap:.55rem; padding:.8rem 0; border-bottom:1px solid rgba(255,255,255,.05); }
.refinery-detail-section>span { color:#648194; font:700 .5rem Orbitron; letter-spacing:.09em; }
.refinery-requirements { display:grid; gap:.38rem; }
.refinery-requirement { display:grid; grid-template-columns:auto minmax(0,1fr) auto; gap:.55rem; align-items:center; padding:.5rem .55rem; border:1px solid rgba(255,255,255,.055); border-radius:.55rem; background:rgba(255,255,255,.02); }
.refinery-requirement.missing { border-color:rgba(255,71,102,.18); background:rgba(255,71,102,.035); }
.refinery-requirement .refinery-mineral-visual { margin-right:.05rem; }
.refinery-requirement span strong { display:block; color:#cfe6f1; font-size:.64rem; }
.refinery-requirement span small { display:block; color:#5e7789; font-size:.53rem; }
.refinery-requirement>b { color:#86efb4; font:700 .58rem Orbitron; }
.refinery-requirement.missing>b { color:#ff96a7; }
.refinery-detail-summary { display:grid; grid-template-columns:1fr 1fr; gap:.5rem; padding:.8rem 0; }
.refinery-detail-summary>div { padding:.6rem; border:1px solid rgba(255,255,255,.055); border-radius:.55rem; background:rgba(255,255,255,.02); }
.refinery-detail-summary small { display:block; color:#5d778a; font:700 .48rem Orbitron; letter-spacing:.07em; }
.refinery-detail-summary strong { display:block; margin-top:.25rem; color:#e3f5fc; font:700 .6rem Orbitron; }
.refinery-start-button { width:100%; margin-top:auto; color:#d8f8e8; border-color:rgba(61,255,139,.24); background:rgba(61,255,139,.07); }
.refinery-detail-empty { display:grid; min-height:320px; place-items:center; color:#688396; border:1px dashed rgba(255,255,255,.08); border-radius:.7rem; }
.refinery-quantity { display:grid; grid-template-columns:auto minmax(44px,1fr) auto auto auto; align-items:center; gap:.3rem; }
.refinery-quantity button { height:32px; min-width:32px; padding:.3rem .45rem; border:1px solid rgba(70,220,255,.16); border-radius:.5rem; color:#9fdef5; background:rgba(70,220,255,.05); cursor:pointer; }
.refinery-quantity input { min-width:0; height:32px; border:1px solid rgba(70,220,255,.14); border-radius:.5rem; outline:0; color:#fff; background:rgba(1,8,16,.72); text-align:center; font:700 .62rem Orbitron; }
.refinery-quantity small { color:#637b8c; font-size:.55rem; white-space:nowrap; }
@media (max-width:1050px) { .refinery-logistics-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } .refinery-tree-layout { grid-template-columns:1fr; } }
@media (max-width:680px) { .refinery-logistics-grid { grid-template-columns:1fr; } .refinery-level-panel,.refinery-active-job { align-items:flex-start; flex-direction:column; } .refinery-tree-tier.common { grid-template-columns:repeat(2,minmax(0,1fr)); } .refinery-tree-tier.rare,.refinery-tree-tier.final { padding-inline:0; } }
.mineral-crystal { position: relative; width: 42px; height: 56px; clip-path: polygon(50% 0,92% 31%,76% 91%,50% 100%,24% 91%,8% 31%); background: linear-gradient(135deg,#e9fdff 5%,#61d9ff 35%,#5140a2 85%); filter: drop-shadow(0 0 12px rgba(88,216,255,.6)); }
.mineral-crystal i { position: absolute; inset: 8px 13px 15px 11px; clip-path: inherit; background: rgba(255,255,255,.42); }
.store-card h4 { margin: .9rem 0 .35rem; font-family: Orbitron; font-size: .75rem; }
.store-card p { margin: 0; color: #718a9d; font-size: .7rem; line-height: 1.45; }
.price { margin-top: auto; padding-top: .9rem; color: var(--gold); font: 700 .75rem Orbitron; }
.store-card button { margin-top: .7rem; padding: .6rem; color: var(--cyan); border: 1px solid rgba(70,220,255,.25); border-radius: .55rem; background: rgba(70,220,255,.07); cursor: pointer; font: 600 .62rem Orbitron; }
.store-card button:disabled { opacity: .35; cursor: not-allowed; }

.account-grid { display: grid; grid-template-columns: minmax(320px,.62fr) minmax(560px,1.38fr); align-items: start; gap: 1rem; max-width: 1220px; margin: 0 auto; }
.account-card, .security-card { padding: 1.5rem; }
.account-hangar {
  position: relative; height: 230px; display: grid; place-items: center; margin: -1.5rem -1.5rem 1.5rem;
  border-bottom: 1px solid var(--line); border-radius: 1rem 1rem 0 0;
  background: radial-gradient(circle at 50% 45%,rgba(70,220,255,.12),transparent 45%),linear-gradient(160deg,rgba(9,29,53,.65),rgba(2,8,17,.9));
  overflow: hidden;
}
.account-hangar::before { content: ""; position: absolute; width: 280px; height: 105px; border: 1px solid rgba(70,220,255,.15); border-radius: 50%; transform: rotate(-8deg); }
.account-ship-visual { width: 145px; display: grid; place-items: center; }
.account-ship { transform: rotate(90deg); }
.account-emblem { position: absolute; right: 1rem; bottom: 1rem; display: grid; place-items: center; width: 3.4rem; height: 3.4rem; color: var(--cyan); border: 1px solid var(--cyan); border-radius: .9rem; background: rgba(3,14,28,.92); box-shadow: 0 0 25px rgba(70,220,255,.16); font: 700 .78rem Orbitron; }
.account-card > p:not(.eyebrow), .security-card > p:not(.eyebrow) { color: #7d96a9; }
.account-card dl { margin: 1.5rem 0 0; }
.account-card dl div { display: flex; justify-content: space-between; padding: .75rem 0; border-top: 1px solid rgba(85,144,175,.13); }
.account-card dt { color: #70899c; }
.account-card dd { margin: 0; color: #caeff8; font-weight: 700; }
.account-settings { min-height: 640px; }
.account-settings-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.account-settings-header > div > p:last-child { max-width: 620px; margin: .55rem 0 0; color: #7d96a9; line-height: 1.55; }
.account-security-state {
  flex: 0 0 auto; padding: .45rem .65rem; color: var(--cyan);
  border: 1px solid rgba(70,220,255,.24); border-radius: 999px;
  background: rgba(70,220,255,.06); font: 700 .52rem Orbitron; letter-spacing: .08em;
}
.account-security-state.online { color: var(--gold); border-color: rgba(255,191,66,.26); background: rgba(255,191,66,.06); }
.account-settings-tabs {
  display: grid; grid-template-columns: repeat(3,1fr); gap: .4rem;
  margin: 1.35rem 0 1.15rem; padding: .35rem; border: 1px solid rgba(70,220,255,.12);
  border-radius: .75rem; background: rgba(1,8,18,.48);
}
.account-settings-tabs button {
  min-height: 40px; padding: .55rem; color: #6e879b; border: 0; border-radius: .5rem;
  background: transparent; cursor: pointer; font: 700 .57rem Orbitron; letter-spacing: .08em;
}
.account-settings-tabs button:hover { color: #cbedf5; }
.account-settings-tabs button.active {
  color: #00131c; background: linear-gradient(135deg,#71eaff,#32bedb);
  box-shadow: 0 7px 18px rgba(50,190,219,.14);
}
.account-settings-panel { display: none; }
.account-settings-panel.active { display: grid; gap: 1rem; animation: account-panel-in .2s ease both; }
@keyframes account-panel-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
.account-facts { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: .55rem; }
.account-facts > div {
  min-width: 0; display: grid; gap: .38rem; padding: .8rem;
  border: 1px solid rgba(88,151,184,.13); border-radius: .65rem; background: rgba(3,12,25,.52);
}
.account-facts span { color: #59778c; font: 700 .49rem Orbitron; letter-spacing: .08em; }
.account-facts strong { overflow: hidden; color: #d8f5fc; font-size: .76rem; text-overflow: ellipsis; white-space: nowrap; }
.account-form {
  display: grid; gap: .8rem; padding: 1rem; border: 1px solid rgba(73,151,191,.16);
  border-radius: .8rem; background: linear-gradient(145deg,rgba(6,18,35,.84),rgba(4,12,25,.65));
}
.account-form-heading { display: flex; align-items: center; gap: .8rem; padding-bottom: .2rem; }
.account-form-heading h4, .account-session-card h4, .account-danger-intro h4 { margin: 0; font-family: Orbitron; font-size: .78rem; }
.account-form-heading p, .account-session-card p, .account-danger-intro p { margin: .3rem 0 0; color: #7890a4; font-size: .72rem; line-height: 1.45; }
.account-form-icon {
  display: grid; place-items: center; flex: 0 0 42px; width: 42px; height: 42px; color: var(--cyan);
  border: 1px solid rgba(70,220,255,.27); border-radius: .65rem; background: rgba(70,220,255,.07);
  font: 700 .75rem Orbitron;
}
.account-form label { display: grid; gap: .4rem; color: #8ca6b9; font-size: .7rem; }
.account-form input[type="email"],
.account-form input[type="password"],
.account-form input[type="text"] {
  width: 100%; padding: .72rem .8rem; color: #eafaff; outline: 0;
  border: 1px solid rgba(88,151,184,.24); border-radius: .6rem; background: rgba(1,8,18,.72);
}
.account-form input:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(70,220,255,.07); }
.account-form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .75rem; }
.account-form-message { min-height: .95rem; margin: -.15rem 0 0; color: #ff9eac; font-size: .68rem; }
.account-form-message.success { color: var(--green); }
.account-action { justify-self: start; min-width: 180px; }
.account-session-card {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem;
  border: 1px solid rgba(70,220,255,.14); border-radius: .8rem; background: rgba(4,15,29,.6);
}
.account-session-card .eyebrow { margin-bottom: .35rem; }
.account-session-actions {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .85rem 1rem; border-top: 1px solid rgba(85,144,175,.13);
}
.account-session-actions p { margin: 0; color: #718a9d; font-size: .72rem; }
.account-danger-intro {
  display: flex; gap: 1rem; padding: 1rem; border: 1px solid rgba(255,94,115,.25);
  border-radius: .8rem; background: rgba(255,94,115,.055);
}
.account-danger-intro > span {
  display: grid; place-items: center; flex: 0 0 44px; width: 44px; height: 44px;
  color: #ff9cab; border: 1px solid rgba(255,94,115,.35); border-radius: 50%;
  background: rgba(255,94,115,.08); font: 800 1rem Orbitron;
}
.account-danger-intro .eyebrow { color: #ff8293; }
.account-delete-form { border-color: rgba(255,94,115,.19); }
.account-delete-check { grid-template-columns: auto 1fr; align-items: center; }
.account-delete-check input { accent-color: var(--red); }
.account-delete-check span { color: #8fa4b4; line-height: 1.45; }
.notice { display: grid; gap: .35rem; margin: 1.5rem 0; padding: 1rem; border: 1px solid rgba(255,191,66,.2); border-radius: .7rem; background: rgba(255,191,66,.05); }
.notice b { color: var(--gold); }
.notice span { color: #8ba2b3; font-size: .78rem; }
.danger { padding: .75rem 1rem; color: #ff8c9b; border: 1px solid rgba(255,94,115,.25); background: rgba(255,94,115,.07); }
.toast { position: fixed; z-index: 20; right: 2rem; bottom: 2rem; max-width: 390px; padding: .85rem 1rem; border: 1px solid rgba(70,220,255,.28); border-radius: .7rem; background: rgba(6,17,32,.96); box-shadow: var(--shadow); opacity: 0; pointer-events: none; transform: translateY(12px); transition: .25s ease; }
.toast.show { opacity: 1; transform: none; }
.toast.error { border-color: rgba(255,94,115,.45); color: #ffb2bd; }
.empty-state { grid-column: 1/-1; padding: 3rem 1rem; color: #627d90; text-align: center; }

@media (max-height: 820px) {
  .login-brand-frame { margin-bottom: .8rem; padding-block: .65rem; }
  .login-game-logo { max-height: 125px; }
  .login-copy h1 { font-size: clamp(2.5rem,7.2vh,3.85rem); }
  .lead { margin-block: .65rem; font-size: 1rem; }
  .feature-row { gap: .4rem; }
  .feature-row span { padding: .42rem .62rem; font-size: .7rem; }
  .login-faction-orbits { height: 68px; margin-top: .55rem; }
  .login-planet.earth { width: 38px; height: 38px; }
  .login-planet.mars { width: 49px; height: 49px; }
  .login-ship-signal { width: 40px; height: 20px; }

  .login-card { padding: .8rem 1.15rem .9rem; }
  .auth-status-line { margin-bottom: .48rem; }
  .auth-tabs { margin-bottom: .52rem; }
  .auth-tabs button { padding: .5rem; }
  .login-card h2 { font-size: 1.12rem; }
  .login-card label { margin: .4rem 0; }
  .login-card input { margin-top: .24rem; padding: .56rem .7rem; }
  .auth-intro { margin-bottom: .4rem; }
  .faction-selector { margin-top: .42rem; }
  .faction-choice { min-height: 50px; padding: .38rem; }
  .faction-choice small { display: none; }
  .form-message { min-height: .82rem; margin-block: .2rem; font-size: .72rem; }
  .primary { padding: .7rem 1rem; }
  .guest-access { margin-top: .42rem; }

  .login-view[data-auth-mode="register"] .login-card {
    padding-top: .7rem;
    padding-bottom: .75rem;
  }
}

@media (max-width: 1180px) {
  .hero-grid { grid-template-columns: 1fr; }
  .ship-stage { min-height: 500px; }
  .inventory-layout { grid-template-columns: 1fr; }
  .store-grid { grid-template-columns: repeat(3,minmax(190px,1fr)); }
  .store-section-head { align-items: stretch; flex-direction: column; }
  .store-category-tabs { justify-content: flex-start; }
}
@media (max-width: 850px) {
  .login-view {
    grid-template-columns: 1fr; grid-template-rows: auto auto;
    align-content: center; gap: .55rem; padding: .65rem;
  }
  .login-copy { width: min(100%,520px); margin-inline: auto; text-align: center; }
  .login-brand-frame {
    width: min(270px,62vw); margin: 0 auto .3rem; padding: .3rem .65rem;
  }
  .login-game-logo { max-height: clamp(46px,8vh,72px); }
  .login-copy h1 {
    font-size: clamp(1.12rem,4.8vw,1.65rem); line-height: 1.05;
  }
  .login-copy > .eyebrow,
  .login-copy > .lead,
  .feature-row,
  .login-faction-orbits { display: none; }
  .login-card { width: min(100%,520px); margin-inline: auto; }
  .login-view[data-auth-mode="register"] .login-copy h1 { display: none; }
  .app-shell { grid-template-columns: 74px 1fr; }
  .sidebar { padding-inline: .55rem; }
  .logo b, .nav-item:not(.active)::after, .nav-item { font-size: 0; }
  .logo { justify-content: center; padding-inline: 0; }
  .logo img { width: 58px; max-width: none; }
  .nav-item { justify-content: center; padding: .8rem; }
  .nav-item span { font-size: 1.15rem; }
  .sidebar-bottom div { display: none; }
  .sidebar-bottom { justify-content: center; }
  .topbar { grid-template-columns: 1fr auto; }
  .pilot-chip { display: none; }
  .header-logout { display: none; }
  .wallet-grid, .status-strip { grid-template-columns: repeat(2,1fr); }
  .store-grid { grid-template-columns: repeat(2,minmax(180px,1fr)); }
  .store-tabs { grid-template-columns: repeat(3,1fr); }
  .account-grid { grid-template-columns: 1fr; }
  .account-settings { min-height: 0; }
  .account-facts { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .inventory-ship-banner { grid-template-columns: 150px 1fr; }
  .drag-legend { grid-column: 1/-1; display: flex; flex-wrap: wrap; }
}
@media (max-width: 590px) {
  .app-shell { display: block; }
  .sidebar { position: fixed; z-index: 10; top: auto; bottom: 0; width: 100%; height: 68px; flex-direction: row; padding: .4rem; border: 0; border-top: 1px solid var(--line); }
  .logo, .sidebar-bottom { display: none; }
  .sidebar nav { width: 100%; grid-template-columns: repeat(5,1fr); }
  .nav-item { padding: .5rem; }
  .main { padding: 0 .75rem 5.5rem; }
  .topbar { min-height: 82px; }
  .play-button { padding: .7rem; font-size: .6rem; }
  .login-card { padding: .75rem .85rem; }
  .register-passwords, .faction-selector { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .faction-choice { grid-template-columns: 28px minmax(0,1fr); min-height: 48px; gap: .4rem; }
  .faction-planet { width: 28px; height: 28px; }
  .faction-choice strong { font-size: .58rem; }
  .login-faction-orbits { display: none; }
  .hero-grid { grid-template-columns: 1fr; }
  .ship-stage { min-height: auto; }
  .ship-visual-wrap { height: 270px; }
  .portal-ship-visual { width: 160px; height: 190px; }
  .ship-stats { grid-template-columns: repeat(2,1fr); }
  .inventory-toolbar, .store-intro { align-items: stretch; flex-direction: column; }
  .inventory-ship-banner { grid-template-columns: 105px 1fr; padding: .7rem; }
  .inventory-ship-visual { height: 90px; }
  .inventory-ship { width: 92px; }
  .drag-legend { display: none; }
  .inventory-layout { display: block; }
  .storage-panel { margin-top: .8rem; }
  .slot-row { grid-template-columns: repeat(3,1fr); }
  .item-grid, .vant-loadout, .store-grid { grid-template-columns: 1fr; }
  .store-tabs { grid-template-columns: repeat(2,1fr); }
  .store-category-tabs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: .2rem; }
  .item-card { grid-template-columns: 54px minmax(0,1fr); }
.item-card-visual { width: 54px; height: 54px; padding: 3px; }
  .wallet-grid, .status-strip { grid-template-columns: 1fr; }
  .account-settings-header, .account-session-card, .account-session-actions { align-items: stretch; flex-direction: column; }
  .account-settings-tabs { grid-template-columns: 1fr; }
  .account-form-grid, .account-facts { grid-template-columns: 1fr; }
  .account-form-grid > span { display: none; }
  .account-action, .account-session-card button { width: 100%; justify-self: stretch; }
  .rank-row { grid-template-columns: 38px 1fr auto; }
  .rank-row .online-tag { display: none; }
}

@media (max-height: 600px) {
  .login-view { gap: .35rem; padding-block: .35rem; }
  .login-brand-frame {
    width: min(220px,52vw); margin-bottom: 0; padding-block: .2rem;
  }
  .login-game-logo { max-height: 42px; }
  .login-copy h1,
  .auth-status-line,
  .auth-intro { display: none; }
  .login-card { padding: .55rem .8rem .62rem; border-radius: 1rem; }
  .login-card::after { inset: .35rem; border-radius: .78rem; }
  .auth-tabs { margin-bottom: .32rem; padding: .2rem; }
  .auth-tabs button { padding: .4rem; }
  .login-card .eyebrow { margin-bottom: .25rem; font-size: .56rem; }
  .login-card h2 { margin-block: .05rem .18rem; font-size: .95rem; }
  .login-card label { margin: .25rem 0; font-size: .62rem; }
  .login-card input { margin-top: .14rem; padding: .42rem .58rem; }
  .faction-selector { margin-top: .25rem; }
  .faction-selector legend { margin-bottom: 0; font-size: .58rem; }
  .faction-choice { min-height: 40px; padding: .25rem .34rem; }
  .faction-planet { width: 24px; height: 24px; }
  .form-message { min-height: .65rem; margin: .08rem 0; font-size: .62rem; }
  .primary { padding: .54rem .8rem; font-size: .62rem; }
  .guest-access { margin-top: .25rem; gap: .32rem; }
  .guest-access .ghost-link { margin-top: -.2rem; font-size: .68rem; }
}

/* Portal 2.1 — hierarquia visual do hangar, VANTs e catálogo */
.pilot-chip {
  min-width: 240px;
  padding: .5rem .65rem;
  border: 1px solid rgba(70,220,255,.13);
  border-radius: .8rem;
  background: linear-gradient(120deg,rgba(70,220,255,.055),rgba(4,11,23,.7));
}
.pilot-identity { min-width: 0; }
.pilot-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .5rem; margin-top: .24rem; }
.pilot-meta > small:first-child { padding-right: .5rem; border-right: 1px solid rgba(110,160,188,.2); }
.pilot-chip .pilot-balance {
  color: #7cecff; letter-spacing: .04em; white-space: nowrap;
}
.pilot-balance b { color: #e7fcff; font: 700 .66rem Orbitron; text-shadow: 0 0 9px rgba(70,220,255,.42); }
.pilot-chip .stellar-balance { color: #c8a7ff; }
.stellar-balance b { color: #f0e7ff; text-shadow: 0 0 9px rgba(164,105,255,.62); }
.wallet-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }

.inventory-control-stack { display: grid; gap: .5rem; justify-items: end; }
.inventory-view-tabs {
  display: grid; grid-template-columns: 1fr 1fr; min-width: 100%;
  padding: .25rem; border: 1px solid var(--line); border-radius: .75rem;
  background: rgba(3,9,20,.7);
}
.inventory-view-tabs button {
  display: flex; align-items: center; justify-content: center; gap: .45rem;
  padding: .62rem .8rem; color: #708da2; border: 0; border-radius: .55rem;
  background: transparent; cursor: pointer; font: 700 .62rem Orbitron; letter-spacing: .09em;
}
.inventory-view-tabs button span { color: #4d7188; }
.inventory-view-tabs button.active {
  color: #dffaff; background: linear-gradient(135deg,rgba(38,164,194,.32),rgba(43,110,154,.16));
  box-shadow: inset 0 0 0 1px rgba(70,220,255,.28);
}
.inventory-view-tabs button.active span { color: var(--cyan); text-shadow: 0 0 8px var(--cyan); }
.hangar-subhead {
  display: flex; align-items: center; justify-content: space-between; gap: .8rem;
  margin-bottom: 1rem; padding-bottom: .8rem; border-bottom: 1px solid rgba(78,149,183,.13);
}
.hangar-subhead h4 { margin: 0; font: 700 .88rem Orbitron; }
.hangar-subhead > span {
  padding: .35rem .5rem; color: #7595aa; border: 1px solid rgba(93,164,194,.16);
  border-radius: .42rem; background: rgba(5,17,30,.7); font: 600 .5rem Orbitron; letter-spacing: .08em;
}
.inventory-layout { grid-template-columns: minmax(430px,.86fr) minmax(520px,1.14fr); }
.loadout-panel, .storage-panel { min-height: 590px; padding: 1rem; }
.slot-section { margin-bottom: .8rem; }
.slot-row { gap: .4rem; margin-top: .42rem; }
.slot {
  min-height: 72px; grid-template-columns: 31px minmax(0,1fr); gap: .38rem;
  padding: .42rem; border-radius: .56rem;
}
.slot-item-art { width: 30px; height: 30px; padding: 1px; border-radius: .42rem; }
.slot-empty-mark { width: 29px; height: 29px; border-radius: .42rem; font-size: .86rem; }
.slot strong { margin-top: .18rem; font-size: .56rem; }
.slot small { font-size: .46rem; }
.item-grade {
  position: absolute; z-index: 3; right: .38rem; top: .34rem; display: inline-flex;
  align-items: center; gap: .22rem; max-width: calc(100% - .75rem); padding: .18rem .3rem;
  color: #ebc45b; border: 1px solid rgba(231,188,73,.24); border-radius: .32rem;
  background: rgba(24,19,6,.82); font: 700 .46rem Orbitron; letter-spacing: .04em; line-height: 1;
}
.item-grade b { color: #fff3ad; font-size: .44rem; }
.item-grade.elite {
  color: #e6c7ff; border-color: rgba(194,123,255,.37);
  background: linear-gradient(120deg,rgba(108,50,152,.7),rgba(31,15,56,.9));
  box-shadow: 0 0 9px rgba(179,94,255,.13);
}
.item-grade.elite i { color: #ffdb78; font-style: normal; font-size: .5rem; }
.pve-vector-icon.elite .item-svg-tier,
.item-card .item-svg-tier,
.slot .item-svg-tier,
.store-card .item-svg-tier { display: none !important; }

.item-grid {
  grid-template-columns: repeat(auto-fill,minmax(185px,1fr)); gap: .45rem;
  max-height: 530px;
}
.item-card {
  grid-template-columns: 43px minmax(0,1fr); column-gap: .55rem;
  min-height: 106px; padding: .58rem; border-radius: .58rem;
}
.item-card-visual { width: 43px; height: 43px; padding: 2px; border-radius: .52rem; }
.item-card h4 { margin: .52rem 2.3rem .18rem 0; font-size: .67rem; }
.item-card p {
  display: -webkit-box; overflow: hidden; font-size: .59rem; line-height: 1.3;
  -webkit-box-orient: vertical; -webkit-line-clamp: 2;
}
.item-card .item-actions { gap: .28rem; margin-top: .45rem; }
.mini-action { padding: .3rem .4rem; font-size: .51rem; }

/* Bancada inferior do inventário: os cards ficam dedicados à seleção e a
   receita completa permanece visível sem disputar espaço com o nome. */
.storage-panel { display: flex; flex-direction: column; }
.filter-row { flex: 0 0 auto; flex-wrap: wrap; overflow: visible; }
.filter-row button {
  display: inline-flex; align-items: center; gap: .38rem; padding: .48rem .58rem;
  border-color: rgba(80,151,184,.09); background: rgba(4,13,25,.44); font-size: .62rem;
}
.filter-row button small {
  min-width: 20px; padding: .12rem .28rem; color: #66869a; border-radius: .34rem;
  background: rgba(255,255,255,.045); font: 700 .5rem Orbitron; text-align: center;
}
.filter-row button.active small { color: #dffbff; background: rgba(70,220,255,.13); }
.filter-row button.is-context-hidden { display: none; }
.item-grid {
  flex: 1 1 auto; min-height: 210px; max-height: 355px; align-content: start;
  scrollbar-width: thin; scrollbar-color: #28c9e8 rgba(3,13,25,.72);
  scrollbar-gutter: stable;
}
.item-grid::-webkit-scrollbar { width: 10px; height: 10px; }
.item-grid::-webkit-scrollbar-track {
  border: 1px solid rgba(70,220,255,.11); border-radius: 10px;
  background: linear-gradient(180deg,rgba(2,8,18,.92),rgba(7,24,38,.88));
  box-shadow: inset 0 0 8px rgba(0,0,0,.55);
}
.item-grid::-webkit-scrollbar-thumb {
  min-height: 42px; border: 2px solid #061421; border-radius: 10px;
  background: linear-gradient(180deg,#6feaff 0%,#1cb7df 48%,#13799d 100%);
  box-shadow: inset 0 0 0 1px rgba(220,252,255,.22),0 0 8px rgba(39,207,239,.25);
}
.item-grid::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg,#a2f5ff 0%,#39d7ef 48%,#1793b8 100%);
  box-shadow: inset 0 0 0 1px rgba(240,255,255,.32),0 0 11px rgba(55,224,248,.42);
}
.item-grid::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
.item-grid::-webkit-scrollbar-corner { background: transparent; }
.item-card { min-height: 90px; align-content: center; cursor: pointer; transition: border-color .16s, background .16s, transform .16s, box-shadow .16s; }
.item-card:hover { transform: translateY(-1px); }
.item-card.selected {
  border-color: rgba(70,220,255,.7); background: linear-gradient(145deg,rgba(20,91,119,.3),rgba(3,10,21,.78));
  box-shadow: inset 0 0 0 1px rgba(70,220,255,.1), 0 0 18px rgba(29,184,224,.09);
}
.item-card.selected::before {
  content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 2px;
  border-radius: 2px; background: var(--cyan); box-shadow: 0 0 9px var(--cyan);
}
.item-card:focus-visible { outline: 1px solid var(--cyan); outline-offset: 2px; }

.inventory-action-dock {
  position: relative; flex: 0 0 auto; min-height: 176px; margin-top: .8rem; padding: .85rem;
  border: 1px solid rgba(70,220,255,.22); border-radius: .8rem;
  background: linear-gradient(135deg,rgba(10,32,50,.96),rgba(3,10,21,.98)); overflow: hidden;
  box-shadow: inset 0 1px rgba(255,255,255,.025), 0 -8px 24px rgba(0,0,0,.17);
}
.inventory-action-dock::after {
  content: ""; position: absolute; right: -54px; top: -68px; width: 190px; height: 190px;
  border: 1px solid rgba(70,220,255,.1); border-radius: 50%; pointer-events: none;
}
.inventory-action-dock.empty { display: grid; place-items: center; border-style: dashed; }
.inventory-action-empty { display: flex; align-items: center; gap: .7rem; color: #557487; }
.inventory-action-empty > span {
  display: grid; place-items: center; width: 36px; height: 36px; color: #4a839b;
  border: 1px solid rgba(70,220,255,.16); border-radius: .55rem; background: rgba(70,220,255,.04);
}
.inventory-action-empty strong,.inventory-action-empty small { display: block; }
.inventory-action-empty strong { font: 700 .58rem Orbitron; letter-spacing: .08em; }
.inventory-action-empty small { margin-top: .25rem; color: #506c7f; font-size: .58rem; }
.inventory-action-shell { position: relative; z-index: 1; display: grid; grid-template-columns: 60px minmax(155px,.8fr) minmax(250px,1.2fr); gap: .8rem; }
.inventory-action-visual {
  display: grid; place-items: center; width: 60px; height: 60px; padding: 3px;
  border: 1px solid rgba(70,220,255,.17); border-radius: .7rem; background: radial-gradient(circle,rgba(70,220,255,.08),transparent 68%);
}
.inventory-action-visual .pve-vector-icon,.inventory-action-visual svg { width: 100%; height: 100%; }
.inventory-action-copy { min-width: 0; }
.inventory-action-copy .item-grade { position: static; margin-bottom: .35rem; }
.inventory-action-copy h4 { margin: 0; color: #e0f8ff; font: 700 .78rem Orbitron; }
.inventory-action-copy p { margin: .35rem 0 0; color: #718da0; font-size: .61rem; line-height: 1.35; }
.inventory-level-line { display: flex; align-items: center; gap: .45rem; margin-top: .6rem; color: #628196; font: 600 .52rem Orbitron; }
.inventory-level-line b { color: var(--cyan); }
.inventory-level-line i { flex: 1; height: 2px; border-radius: 2px; background: rgba(83,130,153,.18); overflow: hidden; }
.inventory-level-line i::before { content: ""; display: block; width: var(--upgrade-progress,0%); height: 100%; background: linear-gradient(90deg,var(--cyan),var(--green)); box-shadow: 0 0 7px var(--cyan); }
.inventory-upgrade-box { min-width: 0; padding-left: .8rem; border-left: 1px solid rgba(82,148,179,.14); }
.inventory-upgrade-head { display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.inventory-upgrade-head strong { color: #a8dcea; font: 700 .58rem Orbitron; letter-spacing: .08em; }
.inventory-upgrade-head span { color: #6f8c9e; font: 600 .51rem Orbitron; }
.inventory-upgrade-head span.ready { color: var(--green); }
.inventory-upgrade-head span.missing { color: #ff8a79; }
.inventory-recipe { display: flex; flex-wrap: wrap; gap: .38rem; margin-top: .48rem; }
.inventory-mineral-cost {
  display: grid; grid-template-columns: 30px minmax(74px,1fr) auto; align-items: center; gap: .4rem;
  min-width: 132px; padding: .36rem .42rem; border: 1px solid rgba(86,151,180,.13);
  border-radius: .5rem; background: rgba(2,8,17,.57);
}
.inventory-mineral-thumb {
  position: relative; display: block; width: 30px; height: 32px;
  overflow: visible; pointer-events: none;
}
.inventory-mineral-thumb .mineral-art {
  position: absolute; left: 50%; top: 50%; width: 62px; height: 58px;
  transform: translate(-50%,-50%) scale(.38); transform-origin: center;
}
.inventory-mineral-thumb .mineral-art.mineral-ferrita {
  transform: translate(-50%,-50%) scale(.34);
}
.inventory-mineral-cost strong,.inventory-mineral-cost small { display: block; }
.inventory-mineral-cost strong { overflow: hidden; color: #cceef6; font-size: .54rem; text-overflow: ellipsis; white-space: nowrap; }
.inventory-mineral-cost small { margin-top: .12rem; color: #607d90; font-size: .48rem; }
.inventory-mineral-cost > b { color: var(--green); font: 700 .58rem Orbitron; }
.inventory-mineral-cost.missing { border-color: rgba(255,102,91,.25); background: rgba(78,21,24,.2); }
.inventory-mineral-cost.missing > b,.inventory-mineral-cost.missing small { color: #ff8a79; }
.inventory-max-level { margin-top: .55rem; color: #b8eaff; font: 700 .57rem Orbitron; letter-spacing: .08em; }
.inventory-action-buttons { display: flex; justify-content: flex-end; gap: .45rem; margin-top: .65rem; }
.inventory-action-buttons button {
  min-height: 34px; padding: .5rem .75rem; border: 1px solid rgba(70,220,255,.24);
  border-radius: .48rem; background: rgba(70,220,255,.08); color: #c9f6ff;
  cursor: pointer; font: 700 .55rem Orbitron; letter-spacing: .06em;
}
.inventory-action-buttons .primary { color: #03131a; border-color: rgba(78,242,202,.52); background: linear-gradient(135deg,#42e8d4,#43c7ef); }
.inventory-action-buttons .sell { color: #ffb07d; border-color: rgba(255,135,83,.24); background: rgba(110,45,21,.16); }
.inventory-action-buttons button:disabled { opacity: .38; cursor: default; filter: saturate(.45); }
.inventory-sell-value { margin-right: auto; align-self: center; color: #708da0; font-size: .54rem; }
.inventory-sell-value b { color: var(--gold); }

.vant-loadout { grid-template-columns: 1fr; gap: .72rem; margin-top: 0; }
.vant-card {
  position: relative; min-height: 166px; padding: .8rem;
  border-radius: .8rem; overflow: hidden;
}
.vant-card.standard { --vant-accent: #38d8ff; }
.vant-card.elite { --vant-accent: #f06cff; }
.vant-card::after {
  content: ""; position: absolute; right: -38px; top: -45px; width: 135px; height: 135px;
  border: 1px solid rgba(57,237,137,.11); border-radius: 50%;
}
.vant-card.elite::after { border-color: rgba(205,105,255,.2); }
.vant-card-head {
  position: relative; z-index: 1; display: grid; grid-template-columns: 82px minmax(0,1fr) auto;
  align-items: center; gap: .75rem; margin-bottom: .55rem;
}
.vant-card-art {
  width: 82px; height: 76px; padding: 6px; border-radius: .65rem;
  background: radial-gradient(circle,rgba(45,255,119,.13),rgba(1,11,19,.78) 68%);
}
.vant-card.elite .vant-card-art { background: radial-gradient(circle,rgba(190,95,255,.16),rgba(1,11,19,.78) 68%); }
.vant-card-head > div > span { font-size: .52rem; letter-spacing: .05em; }
.vant-card-head .item-grade { position: static; display: inline-flex; align-self: start; }
.vant-empty-copy { margin: .3rem 0 0; color: #5c788d; font-size: .64rem; }
.vant-spec-row { display: flex; gap: .9rem; margin: .45rem 0 .65rem; color: #65859a; font: 600 .5rem Orbitron; }
.vant-spec-row b { color: #c6f5ff; }
.vant-level-track { display: grid; grid-template-columns: repeat(5,1fr); gap: 3px; margin: .25rem 0; }
.vant-level-track i { height: 3px; border-radius: 2px; background: rgba(87,129,150,.2); }
.vant-level-track i.active { background: var(--vant-accent,#38d8ff); box-shadow: 0 0 6px var(--vant-accent,#38d8ff); }
.vant-slots { grid-template-columns: repeat(2,minmax(0,1fr)); gap: .4rem; }
.vant-actions { display: flex; justify-content: flex-end; gap: .35rem; margin-top: .5rem; }
.vant-actions button:disabled { opacity: .38; cursor: default; }
.portal-vant { position: relative; display: inline-grid; place-items: center; width: 100%; height: 100%; color: var(--vant-accent); }
.portal-vant svg { width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 0 5px var(--vant-accent)); }
.portal-vant-sprite {
  display: block; width: 100%; height: 100%; object-fit: contain; user-select: none;
  filter: drop-shadow(0 0 5px color-mix(in srgb,var(--vant-accent) 72%,transparent));
}
.portal-vant.elite .portal-vant-sprite {
  filter: drop-shadow(0 0 7px color-mix(in srgb,var(--vant-accent) 82%,transparent));
}
.portal-vant .vant-hull { stroke: rgba(232,255,244,.84); stroke-width: .9; stroke-linejoin: round; }
.portal-vant.elite .vant-hull { stroke: #f7c5ff; stroke-width: 1.15; }
.portal-vant .vant-energy,.portal-vant .vant-ring { fill: none; stroke: var(--vant-accent); stroke-width: 1.3; stroke-linejoin: round; filter: drop-shadow(0 0 3px var(--vant-accent)); }
.portal-vant .vant-cannons { fill: none; stroke: #ecfff3; stroke-width: 2.1; stroke-linecap: round; }
.portal-vant.elite .vant-cannons { stroke: #fff; }
.portal-vant .vant-pods,.portal-vant .vant-core { fill: #edfff3; filter: drop-shadow(0 0 3px var(--vant-accent)); }
.portal-vant.elite .vant-pods,.portal-vant.elite .vant-core { fill: #fff1ff; }
.portal-vant > small {
  position: absolute; right: 0; bottom: 0; display: grid; place-items: center; width: 16px; height: 16px;
  color: #dffcff; border: 1px solid rgba(99,226,255,.35); border-radius: 50%;
  background: #06121e; font: 700 .48rem Orbitron;
}
.orbit-vant { padding: 5px; }
.orbit-vant .portal-vant > small { display: none; }

.store-grid { grid-template-columns: repeat(auto-fill,minmax(205px,1fr)); gap: .62rem; }
.store-card { min-height: 218px; padding: .72rem; border-radius: .72rem; }
.store-visual { height: 70px; border-radius: .58rem; }
.store-equipment-art { width: 52px; height: 52px; padding: 6px; }
.store-card h4 { margin: .62rem 0 .25rem; font-size: .66rem; }
.store-card p {
  display: -webkit-box; overflow: hidden; font-size: .62rem; line-height: 1.35;
  -webkit-box-orient: vertical; -webkit-line-clamp: 2;
}
.store-card .price { padding-top: .65rem; font-size: .64rem; }
.store-card button { margin-top: .5rem; padding: .5rem; font-size: .55rem; }
.store-card > .item-grade { top: .48rem; right: .48rem; }
.store-card .store-status { right: .48rem; top: .48rem; }
.store-card:has(.store-status) > .item-grade { left: .48rem; right: auto; }
.store-vant { width: 61px; height: 61px; }
.store-vant > small { display: none; }
.vant-progression {
  display: grid; grid-template-columns: repeat(5,1fr); gap: .2rem; margin-top: .55rem;
  padding: .35rem; border: 1px solid rgba(90,161,193,.12); border-radius: .5rem; background: rgba(1,8,17,.55);
}
.progress-vant { width: 100%; height: 25px; }
.progress-vant > small { width: 11px; height: 11px; font-size: .35rem; }

.mineral-art { position: relative; display: block; width: 62px; height: 58px; filter: drop-shadow(0 0 9px color-mix(in srgb,var(--mineral-color) 55%,transparent)); }
.mineral-art i,.mineral-art b { position: absolute; display: block; }
.mineral-ferrita i { width: 27px; height: 25px; border: 1px solid #d7e0e7; background: linear-gradient(145deg,#d9e0e5,#727c87 53%,#303a45); clip-path: polygon(25% 0,82% 8%,100% 48%,71% 100%,18% 88%,0 38%); }
.mineral-ferrita i:nth-child(1) { left: 7px; top: 22px; transform: rotate(-16deg); }
.mineral-ferrita i:nth-child(2) { left: 27px; top: 8px; transform: scale(.82) rotate(18deg); }
.mineral-ferrita i:nth-child(3) { left: 31px; top: 31px; transform: scale(.65) rotate(42deg); }
.mineral-cobalto i { width: 18px; height: 45px; top: 6px; background: linear-gradient(100deg,#103783,#5aa9ff 47%,#183d91); clip-path: polygon(50% 0,100% 21%,83% 88%,50% 100%,17% 88%,0 21%); }
.mineral-cobalto i:nth-child(1) { left: 21px; }
.mineral-cobalto i:nth-child(2) { left: 7px; top: 20px; transform: scale(.68) rotate(-20deg); }
.mineral-cobalto i:nth-child(3) { left: 39px; top: 18px; transform: scale(.64) rotate(18deg); }
.mineral-iridio i { left: 26px; top: 3px; width: 12px; height: 50px; background: linear-gradient(90deg,#e9cbff,#a653ff 52%,#481081); clip-path: polygon(50% 0,100% 22%,72% 100%,24% 91%,0 24%); transform-origin: 50% 92%; }
.mineral-iridio i:nth-child(2) { transform: rotate(-31deg) scale(.78); }
.mineral-iridio i:nth-child(3) { transform: rotate(31deg) scale(.78); }
.mineral-cristal_plasma i:first-child { inset: 10px; border-radius: 50%; background: radial-gradient(circle at 35% 30%,#fff,#ff94eb 18%,#ff36c7 42%,#5d0f71 76%,transparent 78%); box-shadow: 0 0 13px #ff4fd8; }
.mineral-cristal_plasma i:nth-child(2),.mineral-cristal_plasma i:nth-child(3) { inset: 7px 2px; border: 2px solid #ff8ee8; border-radius: 50%; transform: rotate(56deg); }
.mineral-cristal_plasma i:nth-child(3) { transform: rotate(-56deg); }
.mineral-nucleo_estelar i:first-child { inset: 13px; border-radius: 50%; background: radial-gradient(circle,#fff 0 8%,#ffd875 26%,#ff7b1e 58%,#7a2605 80%); box-shadow: 0 0 18px #ff9b2e; }
.mineral-nucleo_estelar i:nth-child(2) { inset: 8px 1px; border: 2px solid #ffca66; border-radius: 50%; transform: rotate(-20deg); }
.mineral-nucleo_estelar i:nth-child(3) { left: 1px; right: 1px; top: 28px; height: 2px; background: linear-gradient(90deg,transparent,#fff0ad,transparent); transform: rotate(-20deg); }
.mineral-cristal_azul i:first-child { inset: 3px 11px; background: linear-gradient(145deg,#ebffff,#50ddff 45%,#1269ba); clip-path: polygon(50% 0,63% 30%,100% 22%,74% 50%,100% 79%,64% 70%,50% 100%,36% 70%,0 79%,26% 50%,0 22%,37% 30%); }
.mineral-cristal_azul i:nth-child(2) { inset: 16px 23px; background: #fff; transform: rotate(45deg); box-shadow: 0 0 10px #43d9ff; }
.mineral-cristal_azul i:nth-child(3) { display: none; }
.mineral-metralins i:first-child { inset: 6px; border: 2px solid #9fffc2; background: linear-gradient(145deg,rgba(173,255,205,.5),#15905a 55%,#052c22); clip-path: polygon(50% 0,92% 24%,92% 75%,50% 100%,8% 75%,8% 24%); }
.mineral-metralins i:nth-child(2) { inset: 15px; border: 2px solid #d9ffe6; clip-path: polygon(50% 0,100% 50%,50% 100%,0 50%); transform: rotate(45deg); }
.mineral-metralins i:nth-child(3) { left: 29px; top: 8px; width: 3px; height: 42px; background: #baffd2; box-shadow: 0 0 8px #82ffb4; }

.store-grid-ships { grid-template-columns: 1fr; }
.ship-catalog-card {
  min-height: 300px; display: grid; grid-template-columns: minmax(220px,.72fr) minmax(430px,1.28fr);
  gap: 1rem; padding: .9rem;
}
.ship-catalog-stage {
  position: relative; min-height: 278px; display: grid; place-items: center;
  border: 1px solid rgba(70,220,255,.12); border-radius: .72rem;
  background: radial-gradient(circle,rgba(70,220,255,.11),transparent 53%),linear-gradient(160deg,rgba(8,26,47,.86),rgba(2,7,16,.9)); overflow: hidden;
}
.ship-catalog-stage::before,.ship-catalog-stage::after {
  content: ""; position: absolute; width: 78%; height: 38%; border: 1px solid rgba(70,220,255,.12); border-radius: 50%;
}
.ship-catalog-stage::after { width: 52%; height: 24%; border-color: rgba(55,243,177,.11); transform: rotate(28deg); }
.ship-orbit-line { position: absolute; left: 10%; right: 10%; bottom: 17%; height: 1px; background: linear-gradient(90deg,transparent,rgba(70,220,255,.55),transparent); }
.rotating-ship { position: relative; z-index: 2; width: 152px; height: 152px; display: grid; place-items: center; }
.rotating-ship .store-ship { width: 142px; animation: catalogShipRotate 13s linear infinite; }
@keyframes catalogShipRotate { from { transform: rotate(90deg); } to { transform: rotate(450deg); } }
.ship-role-chip {
  position: absolute; z-index: 3; left: .7rem; bottom: .7rem; padding: .32rem .5rem;
  color: var(--green); border: 1px solid rgba(55,243,177,.26); border-radius: .4rem;
  background: rgba(2,14,21,.84); font: 700 .5rem Orbitron; letter-spacing: .08em;
}
.ship-catalog-copy { position: relative; min-width: 0; display: flex; flex-direction: column; padding: .45rem .35rem; }
.ship-catalog-copy h4 { margin: .2rem 0 .45rem; font-size: 1rem; }
.ship-catalog-copy > p:not(.eyebrow) { display: block; min-height: 0; color: #8ba4b5; font-size: .7rem; -webkit-line-clamp: initial; }
.ship-catalog-stats { display: grid; grid-template-columns: repeat(4,1fr); gap: .38rem; margin-top: .8rem; }
.ship-catalog-stats span { padding: .48rem; border: 1px solid rgba(76,147,180,.13); border-radius: .48rem; background: rgba(2,9,18,.58); }
.ship-catalog-stats small { display: block; color: #5d7a8f; font-size: .44rem; letter-spacing: .07em; }
.ship-catalog-stats b { display: block; margin-top: .22rem; color: #d5f8ff; font: 700 .62rem Orbitron; }
.ship-requirements { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: auto; padding-top: .75rem; color: #708da1; font-size: .61rem; }
.ship-requirements span:first-child,.ship-requirements span:first-child b { color: var(--cyan); }
.ship-requirements span:last-child,.ship-requirements span:last-child b { color: var(--gold); }
.ship-catalog-copy > button { width: min(290px,100%); }

@media (max-width: 1180px) {
  .inventory-layout { grid-template-columns: 1fr; }
  .loadout-panel,.storage-panel { min-height: 0; }
  .item-grid { max-height: 430px; }
  .ship-catalog-card { grid-template-columns: minmax(190px,.62fr) minmax(380px,1.38fr); }
}
@media (max-width: 850px) {
  .ship-catalog-card { grid-template-columns: 1fr; }
  .ship-catalog-stage { min-height: 220px; }
  .ship-catalog-stats { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 590px) {
  .inventory-control-stack { width: 100%; justify-items: stretch; }
  .config-switch { display: grid; grid-template-columns: 1fr 1fr; }
  .slot-row { grid-template-columns: repeat(2,1fr); }
  .item-grid { grid-template-columns: 1fr; }
  .inventory-action-shell { grid-template-columns: 50px minmax(0,1fr); }
  .inventory-action-visual { width: 50px; height: 50px; }
  .inventory-upgrade-box { grid-column: 1 / -1; padding: .7rem 0 0; border-left: 0; border-top: 1px solid rgba(82,148,179,.14); }
  .inventory-action-buttons { flex-wrap: wrap; }
  .inventory-sell-value { width: 100%; }
  .vant-card-head { grid-template-columns: 66px minmax(0,1fr); }
  .vant-card-art { width: 66px; height: 62px; }
  .vant-card-head .item-grade { position: absolute; right: 0; top: 0; }
  .pilot-chip { display: none; }
}

/* Hierarquia dinâmica e Central de Clãs */
.rank-crest,.rank-emblem {
  --rank-color:#7c93a6; position: relative; display: grid; place-items: center;
  color: var(--rank-color); border: 0;
  background: transparent;
  box-shadow: none;
  text-shadow: 0 0 7px var(--rank-color); font: 700 .9rem Orbitron;
}
.rank-crest { width: 2.8rem; height: 3.15rem; flex: 0 0 2.8rem; }
.space-rank-host { overflow: visible; }
.space-rank-insignia {
  display:block; width:100%; height:100%; overflow:visible;
  color:var(--rank-color); filter:drop-shadow(0 2px 4px rgba(0,0,0,.7)) drop-shadow(0 0 3px color-mix(in srgb,var(--rank-color) 38%,transparent));
}
.rank-crest .space-rank-insignia { width:2.8rem; height:3.15rem; }
.rank-emblem .space-rank-insignia { width:30px; height:34px; }
#homeRankSymbol.space-rank-host {
  width:2.55rem; height:2.9rem; flex:0 0 2.55rem;
  color:var(--rank-color);
}
#homeRankSymbol .space-rank-insignia { width:100%; height:100%; }
.metric-card.hierarchy > span,.metric-card.hierarchy strong { color: #8feeff; }
.wallet-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
.rank-row { grid-template-columns: 55px 34px minmax(0,1fr) auto auto; }
.rank-emblem { width: 30px; height: 30px; border-radius: 50%; font-size: .72rem; }
.rank-name small { display:block; margin-top:.18rem; color:#657f93; font-size:.56rem; font-weight:500; letter-spacing:.06em; }

.clan-page-head {
  display:flex; align-items:flex-end; justify-content:space-between; gap:1rem; margin-bottom:1rem;
}
.clan-page-head h3 { margin:0; font:700 1.1rem Orbitron; }
.clan-page-head p:not(.eyebrow) { margin:.45rem 0 0; color:#748fa4; }
.clan-own-panel { min-height:156px; margin-bottom:1rem; padding:1rem; }
.clan-own-panel.no-clan {
  display:flex; align-items:center; gap:1rem; border-style:dashed;
  background:linear-gradient(120deg,rgba(15,31,54,.72),rgba(5,12,25,.78));
}
.clan-own-panel.no-clan h3 { margin:0; font:700 .9rem Orbitron; }
.clan-own-panel.no-clan p:not(.eyebrow) { margin:.45rem 0 0; max-width:760px; color:#718ca0; font-size:.72rem; }
.clan-empty-emblem,.clan-large-emblem,.clan-directory-emblem {
  display:grid; place-items:center; color:#6ee6ff; border:1px solid rgba(70,220,255,.35);
  background:linear-gradient(145deg,rgba(34,136,170,.22),rgba(5,18,31,.92));
  box-shadow:inset 0 0 16px rgba(70,220,255,.08),0 0 16px rgba(70,220,255,.08);
  font:800 .72rem Orbitron; letter-spacing:.05em;
}
.clan-empty-emblem { width:72px; height:72px; flex:0 0 72px; border-radius:1rem; }
.clan-own-panel.has-clan {
  display:grid; grid-template-columns:minmax(280px,.75fr) minmax(430px,1.25fr);
  gap:1rem; overflow:hidden;
}
.clan-own-identity { display:flex; align-items:center; gap:1rem; padding:.5rem; }
.clan-large-emblem { width:92px; height:92px; flex:0 0 92px; border-radius:1.15rem; font-size:1rem; }
.clan-own-identity h3 { margin:0; font:700 1.12rem Orbitron; }
.clan-own-identity p:not(.eyebrow) { margin:.42rem 0 0; color:#7894a7; font-size:.67rem; }
.clan-own-metrics {
  display:grid; grid-template-columns:repeat(5,1fr); align-items:stretch; gap:.35rem;
}
.clan-own-metrics span {
  display:flex; flex-direction:column; justify-content:center; min-width:0; padding:.65rem;
  border:1px solid rgba(78,150,182,.12); border-radius:.62rem; background:rgba(2,9,19,.58); text-align:center;
}
.clan-own-metrics b { overflow:hidden; color:#d6f8ff; font:700 .67rem Orbitron; text-overflow:ellipsis; }
.clan-own-metrics small { margin-top:.25rem; color:#607d91; font-size:.47rem; letter-spacing:.08em; }
.clan-own-detail {
  grid-column:1/-1; display:grid; grid-template-columns:1.35fr .65fr; gap:.7rem;
  padding-top:.75rem; border-top:1px solid rgba(78,150,182,.12);
}
.clan-own-detail h4 { margin:0 0 .5rem; color:#7897aa; font:700 .57rem Orbitron; letter-spacing:.1em; }
.clan-member-list { display:grid; grid-template-columns:repeat(2,1fr); gap:.32rem; }
.clan-member-row {
  display:grid; grid-template-columns:28px minmax(0,1fr) auto; align-items:center; gap:.5rem;
  padding:.45rem .55rem; border:1px solid rgba(77,143,174,.11); border-radius:.5rem; background:rgba(2,9,18,.48);
}
.clan-member-row > span { color:#4e7187; font:700 .51rem Orbitron; }
.clan-member-row strong { overflow:hidden; font-size:.64rem; text-overflow:ellipsis; white-space:nowrap; }
.clan-member-row strong small { display:block; margin-top:.1rem; color:#607d91; font-size:.46rem; }
.clan-member-row > b { color:var(--gold); font:700 .52rem Orbitron; }
.clan-diplomacy-summary { display:grid; align-content:start; gap:.35rem; }
.clan-diplomacy-summary span {
  display:flex; justify-content:space-between; gap:.5rem; padding:.55rem;
  color:#6e899c; border:1px solid rgba(79,144,175,.11); border-radius:.5rem;
  background:rgba(2,9,18,.48); font-size:.56rem;
}
.clan-diplomacy-summary b { color:#d6f8ff; font-family:Orbitron; }
.clan-site-layout { display:grid; grid-template-columns:minmax(520px,1.25fr) minmax(300px,.75fr); gap:1rem; }
.clan-directory-panel,.clan-rank-panel { padding:1rem; }
.clan-search { display:block; margin:.85rem 0; color:#7894a7; font-size:.58rem; letter-spacing:.06em; }
.clan-search input {
  width:100%; margin-top:.35rem; padding:.7rem .8rem; color:#d9f7ff;
  border:1px solid rgba(84,154,185,.2); border-radius:.6rem; outline:none; background:rgba(2,9,19,.68);
}
.clan-search input:focus { border-color:rgba(70,220,255,.55); box-shadow:0 0 0 3px rgba(70,220,255,.06); }
.clan-site-list { display:grid; gap:.42rem; max-height:610px; overflow:auto; padding-right:.18rem; }
.clan-directory-card {
  position:relative; display:grid; grid-template-columns:48px minmax(0,1fr) auto; align-items:center;
  gap:.7rem; min-height:72px; padding:.55rem .65rem; border:1px solid rgba(78,144,175,.12);
  border-radius:.62rem; background:rgba(2,9,19,.54);
}
.clan-directory-card.current { border-color:rgba(55,243,177,.35); background:linear-gradient(110deg,rgba(55,243,177,.08),rgba(2,9,19,.64)); }
.clan-directory-emblem { width:45px; height:45px; border-radius:.62rem; font-size:.58rem; }
.clan-directory-card h4 { margin:0; font-size:.68rem; }
.clan-directory-card p,.clan-directory-card div > small { display:block; margin:.2rem 0 0; color:#657f93; font-size:.55rem; }
.clan-directory-card > strong { color:var(--gold); font:700 .63rem Orbitron; text-align:right; }
.clan-directory-card > strong small { display:block; margin-top:.15rem; color:#6e8798; font-size:.44rem; }
.clan-directory-card > i {
  position:absolute; right:.55rem; bottom:.38rem; color:#58d99a; font:700 .42rem Orbitron; font-style:normal;
}
.clan-directory-card > i.closed { color:#8a7180; }
.clan-rank-tabs { display:grid; grid-template-columns:repeat(3,1fr); gap:.25rem; margin:.8rem 0; padding:.25rem; border:1px solid var(--line); border-radius:.58rem; background:rgba(2,8,17,.55); }
.clan-rank-tabs button { padding:.5rem .25rem; color:#607d91; border:0; border-radius:.42rem; background:transparent; cursor:pointer; font:700 .49rem Orbitron; }
.clan-rank-tabs button.active { color:var(--cyan); background:rgba(70,220,255,.09); }
.clan-ranking-list { display:grid; gap:.35rem; }
.clan-rank-row {
  display:grid; grid-template-columns:26px 46px minmax(0,1fr) auto; align-items:center; gap:.45rem;
  padding:.58rem; border:1px solid rgba(79,144,175,.11); border-radius:.52rem; background:rgba(2,9,18,.5);
}
.clan-rank-row:first-child { border-color:rgba(255,191,66,.28); background:linear-gradient(90deg,rgba(255,191,66,.08),rgba(2,9,18,.55)); }
.clan-rank-row > span { color:#57758a; font:700 .53rem Orbitron; }
.clan-rank-row > b { color:#65dff7; font:.56rem Orbitron; }
.clan-rank-row > strong { overflow:hidden; font-size:.61rem; text-overflow:ellipsis; white-space:nowrap; }
.clan-rank-row > strong small,.clan-rank-row > em small { display:block; margin-top:.12rem; color:#5e7a8f; font-size:.43rem; font-style:normal; }
.clan-rank-row > em { color:var(--gold); font:700 .56rem Orbitron; font-style:normal; text-align:right; }

@media (max-width:1180px) {
  .clan-own-panel.has-clan { grid-template-columns:1fr; }
  .clan-own-metrics { grid-row:2; }
  .clan-site-layout { grid-template-columns:1fr; }
}
@media (max-width:850px) {
  .wallet-grid { grid-template-columns:repeat(2,1fr); }
  .clan-own-metrics { grid-template-columns:repeat(3,1fr); }
  .clan-own-detail { grid-template-columns:1fr; }
}
@media (max-width:590px) {
  .wallet-grid { grid-template-columns:1fr; }
  .sidebar nav { grid-template-columns:repeat(6,1fr); }
  .clan-page-head { align-items:stretch; flex-direction:column; }
  .clan-own-panel.no-clan { align-items:flex-start; }
  .clan-empty-emblem { width:54px; height:54px; flex-basis:54px; }
  .clan-own-identity { align-items:flex-start; }
  .clan-large-emblem { width:68px; height:68px; flex-basis:68px; }
  .clan-own-metrics { grid-template-columns:repeat(2,1fr); }
  .clan-member-list { grid-template-columns:1fr; }
  .clan-directory-card { grid-template-columns:42px minmax(0,1fr); }
  .clan-directory-emblem { width:39px; height:39px; }
  .clan-directory-card > strong { grid-column:2; text-align:left; }
  .rank-row { grid-template-columns:34px 28px minmax(0,1fr) auto; }
  .rank-row .online-tag { display:none; }
}

body.confirmation-open { overflow: hidden; }
.portal-confirm {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(1,5,13,.76);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .18s ease, visibility .18s ease;
}
.portal-confirm.show { opacity: 1; visibility: visible; pointer-events: auto; }
.portal-confirm-card {
  position: relative;
  width: min(440px,100%);
  padding: 1.45rem;
  border: 1px solid rgba(91,213,255,.3);
  border-radius: 1rem;
  background:
    radial-gradient(circle at 16% 0,rgba(70,220,255,.11),transparent 34%),
    linear-gradient(145deg,rgba(12,27,49,.99),rgba(4,10,22,.99));
  box-shadow: 0 28px 90px rgba(0,0,0,.6),inset 0 1px rgba(255,255,255,.035);
  overflow: hidden;
  transform: translateY(12px) scale(.98);
  transition: transform .2s ease;
}
.portal-confirm.show .portal-confirm-card { transform: none; }
.portal-confirm-card::after {
  content: "";
  position: absolute;
  inset: .55rem;
  pointer-events: none;
  border: 1px solid rgba(70,220,255,.055);
  border-radius: .72rem;
}
.portal-confirm-orbit {
  position: absolute;
  right: -48px;
  top: -63px;
  width: 180px;
  height: 180px;
  border: 1px solid rgba(70,220,255,.1);
  border-radius: 50%;
  box-shadow: 0 0 0 26px rgba(70,220,255,.025),0 0 0 54px rgba(70,220,255,.018);
}
.portal-confirm-symbol {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 45px;
  height: 45px;
  margin-bottom: 1rem;
  color: #ffbf69;
  border: 1px solid rgba(255,176,85,.34);
  border-radius: 50%;
  background: rgba(255,140,63,.08);
  box-shadow: 0 0 22px rgba(255,139,69,.12);
  font: 700 1rem Orbitron;
}
.portal-confirm-card h3 { position: relative; z-index: 1; margin: 0; font: 700 1rem Orbitron; }
.portal-confirm-message { position: relative; z-index: 1; margin: .65rem 0 0; color: #b5cad8; font-size: .82rem; line-height: 1.45; }
.portal-confirm-detail {
  position: relative;
  z-index: 1;
  margin: .7rem 0 0;
  padding: .7rem .8rem;
  color: #819cad;
  border-left: 2px solid rgba(255,176,85,.48);
  border-radius: .25rem .55rem .55rem .25rem;
  background: rgba(255,176,85,.045);
  font-size: .72rem;
  line-height: 1.4;
}
.portal-confirm-actions { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1.25fr; gap: .55rem; margin-top: 1.25rem; }
.portal-confirm-actions button { min-height: 42px; }
.confirmation-accept {
  color: #00141b;
  border: 0;
  border-radius: .7rem;
  background: linear-gradient(135deg,#72edff,#35c3de);
  cursor: pointer;
  font: 700 .62rem Orbitron;
  letter-spacing: .06em;
}
.confirmation-accept.danger {
  color: #fff1f3;
  border: 1px solid rgba(255,94,115,.42);
  background: linear-gradient(135deg,rgba(196,43,67,.92),rgba(123,23,43,.96));
}

@media (max-width:590px) {
  .store-extra-section { grid-template-columns:36px minmax(0,1fr) auto; gap:.55rem; padding:.55rem; }
  .store-extra-section-code { width:36px; height:30px; font-size:.52rem; }
  .store-extra-section-copy small { display:none; }
  .portal-confirm-card { padding:1.15rem; }
  .portal-confirm-actions { grid-template-columns:1fr; }
}
/* Engenharia estelar ----------------------------------------------------- */
.stellar-hero{display:grid;grid-template-columns:150px minmax(0,1fr) auto;gap:28px;align-items:center;padding:28px;overflow:hidden;position:relative}
.stellar-hero:before{content:"";position:absolute;inset:0;background:radial-gradient(circle at 8% 50%,rgba(142,89,255,.2),transparent 32%),radial-gradient(circle at 82% 10%,rgba(54,223,255,.1),transparent 34%);pointer-events:none}
.stellar-hero>div{position:relative;z-index:1}.stellar-hero h3{font-size:clamp(22px,2.5vw,38px);margin:5px 0 9px}.stellar-hero p{max-width:760px;color:var(--muted);line-height:1.55}
.stellar-reactor,.stellar-gate-art{--gate:#24dcff;position:relative;display:grid;place-items:center;aspect-ratio:1;border-radius:50%;filter:drop-shadow(0 0 18px color-mix(in srgb,var(--gate),transparent 45%))}
.stellar-reactor:before{content:"";position:absolute;inset:15%;border-radius:50%;background:radial-gradient(circle,#f7fbff 0 5%,var(--gate) 7% 18%,transparent 22% 42%,color-mix(in srgb,var(--gate),transparent 45%) 44% 48%,transparent 50%)}
.stellar-reactor i{position:absolute;inset:5%;border:2px solid color-mix(in srgb,var(--gate),transparent 20%);border-left-color:transparent;border-radius:50%;animation:stellar-spin 9s linear infinite}
.stellar-reactor i:nth-child(2){inset:17%;animation-duration:6s;animation-direction:reverse;border-style:dashed}
.stellar-reactor i:nth-child(3){inset:28%;animation-duration:4s}
.stellar-reactor>b{position:relative;color:#fff;text-shadow:0 0 14px var(--gate);font:900 22px Orbitron,sans-serif}
@keyframes stellar-spin{to{transform:rotate(360deg)}}
.stellar-wallet{display:grid;gap:9px;min-width:210px}.stellar-wallet span{display:flex;justify-content:space-between;gap:20px;padding:10px 13px;border:1px solid rgba(118,220,255,.14);border-radius:10px;background:rgba(2,11,26,.58);font:700 10px Orbitron,sans-serif;color:var(--muted)}.stellar-wallet strong{color:#8ff6ff;font-size:13px}
.stellar-difficulty-guide{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:16px;padding:9px}.stellar-difficulty-guide span{--guide:#24dcff;display:grid;gap:3px;padding:9px 12px;border:1px solid color-mix(in srgb,var(--guide),transparent 77%);border-radius:9px;background:linear-gradient(90deg,color-mix(in srgb,var(--guide),transparent 92%),transparent)}.stellar-difficulty-guide span.beater{--guide:#72ff38}.stellar-difficulty-guide span.cinex{--guide:#ff5038}.stellar-difficulty-guide b{color:var(--guide);font:800 9px Orbitron,sans-serif;letter-spacing:.08em}.stellar-difficulty-guide small{color:var(--muted);font-size:10px}
.stellar-portal-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;margin-top:20px}
.stellar-portal-card{--gate:#24dcff;position:relative;display:grid;grid-template-rows:208px 1fr;border:1px solid color-mix(in srgb,var(--gate),transparent 58%);border-radius:18px;background:linear-gradient(155deg,color-mix(in srgb,var(--gate),transparent 90%),rgba(3,10,24,.94) 42%);overflow:hidden;box-shadow:0 20px 60px rgba(0,0,0,.24)}
.stellar-portal-card:before{content:"";position:absolute;inset:0;background:radial-gradient(circle at 50% 18%,color-mix(in srgb,var(--gate),transparent 79%),transparent 30%);pointer-events:none}
.stellar-portal-card.portal-beater{--gate:#72ff38}.stellar-portal-card.portal-cinex{--gate:#ff5038}.stellar-portal-card.complete{box-shadow:0 0 34px color-mix(in srgb,var(--gate),transparent 76%)}.stellar-portal-card.active{border-color:color-mix(in srgb,var(--gate),#fff 28%)}
.stellar-gate-art{width:180px;margin:10px auto 4px}
.stellar-gate-art.portal-build{isolation:isolate;filter:drop-shadow(0 0 12px color-mix(in srgb,var(--gate),transparent 62%))}
.stellar-gate-art.portal-build:before{content:"";position:absolute;z-index:-2;inset:7%;border-radius:50%;background:radial-gradient(circle,rgba(244,251,255,.08) 0 13%,color-mix(in srgb,var(--gate),transparent 86%) 14% 34%,transparent 58%);border:1px solid color-mix(in srgb,var(--gate),transparent 82%)}
.stellar-gate-art.portal-build:after{content:"";position:absolute;z-index:-1;inset:1%;border:1px solid color-mix(in srgb,var(--gate),transparent 76%);border-radius:50%;opacity:.7}
.stellar-gate-art.portal-build-beater:after,.stellar-gate-art.portal-build-cinex:after{inset:1%;border:1px solid color-mix(in srgb,var(--gate),transparent 76%);border-radius:50%;background:none;clip-path:none;transform:none;box-shadow:inset 0 0 22px color-mix(in srgb,var(--gate),transparent 88%);opacity:.7}
.stellar-blueprint{position:absolute;inset:0;width:100%;height:100%;display:block}
.stellar-difficulty{position:absolute;top:7px;right:4px;display:grid;place-items:center;min-width:34px;height:28px;padding:0 7px;border:1px solid color-mix(in srgb,var(--gate),#fff 14%);border-radius:9px;background:rgba(2,10,24,.84);box-shadow:0 0 14px color-mix(in srgb,var(--gate),transparent 72%);color:#fff;font:900 11px Orbitron,sans-serif;letter-spacing:.04em}
.stellar-build-readout{position:relative;z-index:2;display:grid;place-items:center;gap:1px;pointer-events:none;text-align:center;text-shadow:0 0 12px var(--gate)}
.stellar-build-readout b{color:#fff;font:900 19px Orbitron,sans-serif;line-height:1}.stellar-build-readout small{color:color-mix(in srgb,var(--gate),#fff 48%);font:800 6px Orbitron,sans-serif;letter-spacing:.15em}
.stellar-portal-card.complete .stellar-gate-art{filter:drop-shadow(0 0 21px color-mix(in srgb,var(--gate),transparent 32%));animation:stellar-complete-pulse 2.8s ease-in-out infinite}
@keyframes stellar-complete-pulse{50%{transform:scale(1.025);filter:drop-shadow(0 0 28px color-mix(in srgb,var(--gate),transparent 18%))}}@keyframes stellar-portal-ring{from{transform:rotate(0deg) scale(1)}to{transform:rotate(360deg) scale(1.025)}}@keyframes stellar-portal-ring-reverse{from{transform:rotate(0deg) scale(.92)}to{transform:rotate(-360deg) scale(.98)}}@keyframes stellar-portal-core-pulse{0%,100%{opacity:.78;transform:scale(1)}50%{opacity:1;transform:scale(1.11)}}@keyframes stellar-portal-emerge{0%{filter:brightness(1);box-shadow:0 0 0 color-mix(in srgb,var(--gate),transparent 100%)}50%{filter:brightness(1.18);box-shadow:0 0 26px color-mix(in srgb,var(--gate),transparent 82%)}100%{filter:brightness(1);box-shadow:0 0 8px color-mix(in srgb,var(--gate),transparent 95%)}}@keyframes stellar-portal-shell{0%,100%{opacity:.55;transform:scale(1)}50%{opacity:.95;transform:scale(1.04)}}@keyframes stellar-portal-readout{from{opacity:.72;filter:brightness(1)}to{opacity:1;filter:brightness(1.45)}}@keyframes stellar-portal-arc-spin{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}@keyframes stellar-portal-arc-spin-rev{from{transform:rotate(0deg)}to{transform:rotate(-360deg)}}@keyframes stellar-portal-halo-spin{from{transform:rotate(0deg) scale(1)}to{transform:rotate(360deg) scale(1.04)}}@keyframes stellar-portal-halo-spin-reverse{from{transform:rotate(0deg) scale(.96)}to{transform:rotate(-360deg) scale(1.02)}}@keyframes stellar-portal-energy-sweep{from{transform:rotate(0deg) scale(1)}to{transform:rotate(360deg) scale(1.03)}}@keyframes stellar-portal-energy-bloom{0%,100%{opacity:.32;transform:scale(.9)}50%{opacity:.96;transform:scale(1.1)}}@keyframes stellar-portal-stream{0%{opacity:0;transform:rotate(0deg) translateX(168px) scale(.18)}8%{opacity:1}55%{opacity:.95}100%{opacity:0;transform:rotate(360deg) translateX(168px) scale(1.18)}}
.stellar-card-copy{position:relative;z-index:1;padding:0 20px 20px}.stellar-tier{display:inline-flex;padding:5px 8px;border:1px solid color-mix(in srgb,var(--gate),transparent 45%);border-radius:99px;color:var(--gate);font:800 9px Orbitron,sans-serif;letter-spacing:.13em}.stellar-card-copy h3{font-size:24px;margin:10px 0 3px}.stellar-card-copy>p{color:var(--muted);margin:0 0 12px}
.stellar-progress{height:8px;background:#081427;border-radius:99px;overflow:hidden;border:1px solid rgba(255,255,255,.07)}.stellar-progress i{display:block;height:100%;background:linear-gradient(90deg,var(--gate),#fff);box-shadow:0 0 12px var(--gate)}
.stellar-combat-scale{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin-top:10px;padding:7px;border:1px solid color-mix(in srgb,var(--gate),transparent 78%);border-radius:11px;background:color-mix(in srgb,var(--gate),transparent 94%)}
.stellar-combat-scale span{display:grid;place-items:center;gap:3px;min-width:0;padding:5px 3px;border-right:1px solid rgba(255,255,255,.07)}.stellar-combat-scale span:last-child{border-right:0}.stellar-combat-scale small{color:var(--muted);font:700 7px Orbitron,sans-serif;white-space:nowrap}.stellar-combat-scale b{color:var(--gate);font:900 14px Orbitron,sans-serif;text-shadow:0 0 10px color-mix(in srgb,var(--gate),transparent 45%)}
.stellar-portal-metrics{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin:9px 0 14px}.stellar-portal-metrics span{padding:8px;border-radius:9px;background:rgba(255,255,255,.035);min-width:0}.stellar-portal-metrics small,.stellar-portal-metrics b{display:block}.stellar-portal-metrics small{font:700 8px Orbitron;color:var(--muted)}.stellar-portal-metrics b{margin-top:4px;color:#eafcff;font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.stellar-actions{display:grid;grid-template-columns:1fr 1fr;gap:7px}.stellar-actions button{min-height:38px;border-radius:9px;border:1px solid color-mix(in srgb,var(--gate),transparent 44%);background:color-mix(in srgb,var(--gate),transparent 88%);color:#effcff;font:800 9px Orbitron;cursor:pointer}.stellar-actions button.activate{grid-column:1/-1;background:linear-gradient(90deg,color-mix(in srgb,var(--gate),#06152b 32%),color-mix(in srgb,var(--gate),#06152b 60%))}.stellar-actions button:disabled{opacity:.38;cursor:not-allowed}
.stellar-portal-console-host{margin-top:18px}
.stellar-project-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;padding:8px;border:1px solid rgba(98,203,244,.15);border-radius:14px;background:rgba(2,9,21,.78)}
.stellar-project-tab{--tab-gate:#24dcff;display:grid;gap:5px;padding:12px 14px;text-align:left;border:1px solid color-mix(in srgb,var(--tab-gate),transparent 78%);border-radius:10px;background:linear-gradient(120deg,color-mix(in srgb,var(--tab-gate),transparent 94%),rgba(4,12,27,.85));color:#d9eaf5;cursor:pointer;transition:border-color .18s,background .18s,transform .18s}
.stellar-project-tab.portal-beater{--tab-gate:#72ff38}.stellar-project-tab.portal-cinex{--tab-gate:#ff5038}.stellar-project-tab:hover{transform:translateY(-1px);border-color:color-mix(in srgb,var(--tab-gate),transparent 45%)}.stellar-project-tab.active{border-color:var(--tab-gate);background:linear-gradient(120deg,color-mix(in srgb,var(--tab-gate),transparent 84%),rgba(4,12,27,.93));box-shadow:0 0 20px color-mix(in srgb,var(--tab-gate),transparent 84%)}
.stellar-project-tab span{font:800 11px Orbitron,sans-serif;letter-spacing:.09em;color:var(--tab-gate)}.stellar-project-tab small{font:700 8px Orbitron,sans-serif;color:var(--muted)}.stellar-project-tab>i{display:block;height:3px;border-radius:99px;background:#09182b;overflow:hidden}.stellar-project-tab>i>b{display:block;height:100%;box-shadow:0 0 8px currentColor}
.stellar-console{--gate:#24dcff;display:grid;grid-template-columns:minmax(500px,1.3fr) minmax(280px,.7fr);gap:16px;margin-top:10px}.stellar-console.portal-beater{--gate:#72ff38}.stellar-console.portal-cinex{--gate:#ff5038}
.stellar-viewer,.stellar-generator{border:1px solid color-mix(in srgb,var(--gate),transparent 66%);border-radius:18px;background:linear-gradient(150deg,color-mix(in srgb,var(--gate),transparent 92%),rgba(2,9,22,.97) 48%);box-shadow:0 22px 54px rgba(0,0,0,.26)}
.stellar-viewer{display:grid;grid-template-columns:minmax(300px,1fr) minmax(240px,.82fr);gap:20px;padding:20px;align-items:center;overflow:hidden;position:relative}.stellar-viewer:before{content:"";position:absolute;inset:0;background:radial-gradient(circle at 28% 48%,color-mix(in srgb,var(--gate),transparent 82%),transparent 42%);pointer-events:none}.stellar-visual-column{position:relative;z-index:1;display:grid;justify-items:center;align-content:start;gap:14px;min-width:0;width:100%}
.stellar-puzzle-frame{position:relative;z-index:1;display:grid;place-items:center;width:min(100%,520px);aspect-ratio:1;margin:auto;border:1px solid color-mix(in srgb,var(--gate),transparent 78%);border-radius:16px;background:radial-gradient(circle,rgba(241,250,255,.04),rgba(1,7,18,.58) 58%,rgba(1,6,16,.93));overflow:hidden}
.stellar-puzzle-frame:before,.stellar-puzzle-frame:after{content:"";position:absolute;inset:6%;border:1px solid color-mix(in srgb,var(--gate),transparent 89%);border-radius:50%;pointer-events:none}.stellar-puzzle-frame:after{inset:18%;border-style:dashed}.stellar-portal-energy{position:absolute;inset:2%;z-index:0;pointer-events:none;opacity:0;transition:opacity .25s ease;filter:saturate(1.15)}.stellar-portal-energy:before,.stellar-portal-energy:after{content:"";position:absolute;inset:10%;border-radius:50%;opacity:0}.stellar-portal-energy:before{background:conic-gradient(from 0deg,transparent 0 8%,color-mix(in srgb,var(--gate),transparent 60%) 14%,transparent 22%,transparent 36%,color-mix(in srgb,var(--gate),transparent 66%) 48%,transparent 56%,transparent 72%,color-mix(in srgb,var(--gate),transparent 62%) 82%,transparent 92%);filter:blur(10px)}.stellar-portal-energy:after{inset:18%;background:radial-gradient(circle,color-mix(in srgb,var(--gate),transparent 90%) 0 24%,color-mix(in srgb,var(--gate),transparent 97%) 36%,transparent 58%);filter:blur(4px)}.stellar-portal-energy .energy-halo{position:absolute;border-radius:50%;border:1px solid transparent;opacity:0}.stellar-portal-energy .halo-1{inset:5%;border-top-color:color-mix(in srgb,var(--gate),#fff 18%);border-left-color:color-mix(in srgb,var(--gate),transparent 18%);box-shadow:0 0 22px color-mix(in srgb,var(--gate),transparent 76%), inset 0 0 24px color-mix(in srgb,var(--gate),transparent 88%)}.stellar-portal-energy .halo-2{inset:12%;border-right-color:color-mix(in srgb,var(--gate),#fff 18%);border-bottom-color:color-mix(in srgb,var(--gate),transparent 18%);box-shadow:0 0 18px color-mix(in srgb,var(--gate),transparent 80%)}.stellar-portal-energy .energy-arc{position:absolute;inset:0;border-radius:50%;border:2px solid transparent;filter:drop-shadow(0 0 14px color-mix(in srgb,var(--gate),transparent 18%));opacity:.92}.stellar-portal-energy .arc-1{inset:6%;border-top-color:color-mix(in srgb,var(--gate),#fff 22%);border-right-color:color-mix(in srgb,var(--gate),transparent 28%)}.stellar-portal-energy .arc-2{inset:11%;border-left-color:color-mix(in srgb,var(--gate),#fff 20%);border-bottom-color:color-mix(in srgb,var(--gate),transparent 24%)}.stellar-portal-energy .arc-3{inset:18%;border-top-color:color-mix(in srgb,var(--gate),#fff 16%);border-left-color:color-mix(in srgb,var(--gate),transparent 18%)}.stellar-portal-energy .arc-4{inset:26%;border-bottom-color:color-mix(in srgb,var(--gate),#fff 16%);border-right-color:color-mix(in srgb,var(--gate),transparent 20%)}.stellar-portal-energy .energy-stream{position:absolute;left:50%;top:50%;width:12px;height:12px;margin:-6px 0 0 -6px;border-radius:50%;background:radial-gradient(circle,#fff 0 24%,color-mix(in srgb,var(--gate),#fff 34%) 36%,rgba(255,255,255,0) 72%);box-shadow:0 0 12px color-mix(in srgb,var(--gate),#fff 24%),0 0 24px color-mix(in srgb,var(--gate),transparent 14%);opacity:0;transform:rotate(0deg) translateX(168px) scale(.42)}
.stellar-portal-reward{position:relative;left:auto;bottom:auto;z-index:2;display:grid;grid-template-columns:40px 1fr;gap:10px;align-items:center;min-width:220px;max-width:320px;width:min(82%,320px);margin:0 auto;padding:8px 10px;border:1px solid color-mix(in srgb,var(--gate),transparent 72%);border-radius:12px;background:linear-gradient(150deg,rgba(3,11,23,.94),color-mix(in srgb,var(--gate),transparent 92%));box-shadow:0 10px 24px rgba(0,0,0,.24);transform:translateY(10px) scale(.94);opacity:0;pointer-events:none;transition:opacity .24s ease,transform .28s cubic-bezier(.2,.8,.2,1)}.stellar-portal-reward.has-reward{opacity:.78;transform:translateY(0) scale(.98)}.stellar-portal-reward.is-visible{opacity:1;transform:translateY(0) scale(1);box-shadow:0 14px 30px rgba(0,0,0,.28),0 0 18px color-mix(in srgb,var(--gate),transparent 80%)}.stellar-portal-reward[data-reward-theme="portal-part"]{--gate:#5df0ff}.stellar-portal-reward[data-reward-theme="ammo"]{--gate:#77ff62}.stellar-portal-reward[data-reward-theme="ammo-rare"]{--gate:#ffc44a}.stellar-portal-reward[data-reward-theme="credits"]{--gate:#65ffbd}.stellar-portal-reward[data-reward-theme="stellar"]{--gate:#d980ff}.stellar-portal-reward[data-reward-theme="energy"]{--gate:#64b7ff}.stellar-portal-reward[data-reward-theme="charging"]{--gate:#7bd7ff}.portal-reward-icon{display:grid;place-items:center;width:40px;height:40px;border-radius:11px;border:1px solid color-mix(in srgb,var(--gate),transparent 56%);background:radial-gradient(circle,color-mix(in srgb,var(--gate),#fff 24%),color-mix(in srgb,var(--gate),transparent 72%));color:#fff;font:900 13px Orbitron,sans-serif;text-shadow:0 0 8px var(--gate)}.portal-reward-copy{display:grid;gap:2px;min-width:0}.portal-reward-copy small{color:color-mix(in srgb,var(--gate),#fff 32%);font:800 5.3px Orbitron,sans-serif;letter-spacing:.14em}.portal-reward-copy b{color:#eefcff;font:800 9px Orbitron,sans-serif;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.portal-reward-copy span{color:#87a8bc;font:700 7px Orbitron,sans-serif;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

.stellar-console.portal-beater .stellar-puzzle-frame:before,.stellar-console.portal-cinex .stellar-puzzle-frame:before{inset:6%;border:1px solid color-mix(in srgb,var(--gate),transparent 89%);border-radius:50%;background:none;clip-path:none;transform:none}.stellar-console.portal-beater .stellar-puzzle-frame:after,.stellar-console.portal-cinex .stellar-puzzle-frame:after{inset:18%;border:1px dashed color-mix(in srgb,var(--gate),transparent 89%);border-radius:50%;background:none;clip-path:none;transform:none}
.stellar-puzzle-frame .stellar-gate-art{width:88%;margin:0;--gate:#24dcff}.stellar-console.portal-beater .stellar-gate-art{--gate:#72ff38}.stellar-console.portal-cinex .stellar-gate-art{--gate:#ff5038}.stellar-viewer.complete .stellar-gate-art{filter:drop-shadow(0 0 24px color-mix(in srgb,var(--gate),transparent 30%));animation:stellar-complete-pulse 2.8s ease-in-out infinite}.stellar-viewer.portal-energizing{box-shadow:0 0 0 1px color-mix(in srgb,var(--gate),transparent 58%),0 22px 54px rgba(0,0,0,.26),0 0 38px color-mix(in srgb,var(--gate),transparent 82%)}.stellar-viewer.portal-energizing .stellar-puzzle-frame{box-shadow:inset 0 0 42px color-mix(in srgb,var(--gate),transparent 92%),0 0 24px color-mix(in srgb,var(--gate),transparent 92%)}.stellar-viewer.portal-energizing .stellar-portal-energy{opacity:1}.stellar-viewer.portal-energizing .stellar-portal-energy:before{opacity:1;animation:stellar-portal-energy-sweep .48s linear infinite}.stellar-viewer.portal-energizing .stellar-portal-energy:after{opacity:1;animation:stellar-portal-energy-bloom .42s ease-in-out infinite}.stellar-viewer.portal-energizing .stellar-portal-energy .halo-1{opacity:1;animation:stellar-portal-halo-spin .50s linear infinite}.stellar-viewer.portal-energizing .stellar-portal-energy .halo-2{opacity:1;animation:stellar-portal-halo-spin-reverse .44s linear infinite}.stellar-viewer.portal-energizing .stellar-portal-energy .arc-1{animation:stellar-portal-arc-spin .46s linear infinite}.stellar-viewer.portal-energizing .stellar-portal-energy .arc-2{animation:stellar-portal-arc-spin-rev .38s linear infinite}.stellar-viewer.portal-energizing .stellar-portal-energy .arc-3{animation:stellar-portal-arc-spin .52s linear infinite reverse}.stellar-viewer.portal-energizing .stellar-portal-energy .arc-4{animation:stellar-portal-arc-spin-rev .34s linear infinite reverse}.stellar-viewer.portal-energizing .stellar-portal-energy .stream-1{animation:stellar-portal-stream .48s linear infinite}.stellar-viewer.portal-energizing .stellar-portal-energy .stream-2{animation:stellar-portal-stream .48s linear infinite .08s}.stellar-viewer.portal-energizing .stellar-portal-energy .stream-3{animation:stellar-portal-stream .48s linear infinite .16s}.stellar-viewer.portal-energizing .stellar-portal-energy .stream-4{animation:stellar-portal-stream .48s linear infinite .24s}.stellar-viewer.portal-energizing .stellar-portal-energy .stream-5{animation:stellar-portal-stream .48s linear infinite .32s}.stellar-viewer.portal-energizing .stellar-portal-energy .stream-6{animation:stellar-portal-stream .48s linear infinite .40s}.stellar-viewer.portal-energizing .stellar-portal-energy .stream-7{animation:stellar-portal-stream .48s linear infinite .48s}.stellar-viewer.portal-energizing .stellar-portal-energy .stream-8{animation:stellar-portal-stream .48s linear infinite .56s}.stellar-viewer.portal-energizing .stellar-puzzle-frame:before{animation:stellar-portal-ring .48s linear infinite;border-color:color-mix(in srgb,var(--gate),transparent 68%)}.stellar-viewer.portal-energizing .stellar-puzzle-frame:after{animation:stellar-portal-ring-reverse .42s linear infinite;border-color:color-mix(in srgb,var(--gate),transparent 70%)}.stellar-viewer.portal-energizing .stellar-gate-art{filter:drop-shadow(0 0 34px color-mix(in srgb,var(--gate),transparent 12%)) saturate(1.22)}.stellar-viewer.portal-energizing .stellar-gate-art:before{animation:stellar-portal-core-pulse .42s ease-in-out infinite,stellar-portal-emerge .48s ease-in-out infinite}.stellar-viewer.portal-energizing .stellar-gate-art:after{animation:stellar-portal-shell .44s ease-in-out infinite}.stellar-viewer.portal-energizing .stellar-build-readout{animation:stellar-portal-readout .40s ease-in-out infinite alternate}
.stellar-piece-legend{position:absolute;left:50%;bottom:2%;transform:translateX(-50%);z-index:3;padding:5px 8px;border:1px solid color-mix(in srgb,var(--gate),transparent 74%);border-radius:99px;background:rgba(2,9,22,.82);color:color-mix(in srgb,var(--gate),#fff 45%);font:800 6px Orbitron,sans-serif;letter-spacing:.12em;white-space:nowrap}
.stellar-viewer-copy{position:relative;z-index:1;min-width:0}.stellar-viewer-copy h3{margin:10px 0 4px;font:800 clamp(22px,2vw,31px) Orbitron,sans-serif}.stellar-part-count{margin:0 0 12px;color:var(--muted);font-size:12px}.stellar-part-count b{color:#eefbff}
.stellar-activate{width:100%;min-height:42px;border:1px solid color-mix(in srgb,var(--gate),transparent 42%);border-radius:10px;background:linear-gradient(90deg,color-mix(in srgb,var(--gate),#07152b 30%),color-mix(in srgb,var(--gate),#07152b 62%));color:#fff;font:800 10px Orbitron,sans-serif;letter-spacing:.08em;cursor:pointer}.stellar-activate:disabled{opacity:.38;cursor:not-allowed}
.stellar-generator{align-self:stretch;padding:18px 18px 16px;display:flex;flex-direction:column;justify-content:center}.stellar-generator h3{margin:4px 0 8px;font:800 18px Orbitron,sans-serif}.stellar-generator>p:not(.eyebrow){margin:0;color:var(--muted);font-size:11px;line-height:1.5}.stellar-generator>p strong{color:#e9dcff}
.stellar-generator-costs{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:14px 0 8px}.stellar-generator-costs span{padding:9px 10px;border:1px solid rgba(126,208,241,.13);border-radius:10px;background:rgba(255,255,255,.025)}.stellar-generator-costs small,.stellar-generator-costs b{display:block}.stellar-generator-costs small{color:var(--muted);font:700 7px Orbitron,sans-serif}.stellar-generator-costs b{margin-top:4px;color:#eafcff;font:800 12px Orbitron,sans-serif}
.stellar-reward-stage{position:relative;display:grid;grid-template-columns:46px minmax(54px,1fr) 58px;grid-template-areas:"source transfer core" "copy copy copy" "card card card";align-items:center;gap:8px;margin:4px 0 10px;padding:10px;border:1px solid color-mix(in srgb,var(--gate),transparent 74%);border-radius:14px;background:radial-gradient(circle at 80% 16%,color-mix(in srgb,var(--gate),transparent 91%),transparent 32%),linear-gradient(150deg,rgba(4,10,23,.92),rgba(1,8,20,.86));overflow:hidden;transition:border-color .24s,box-shadow .24s,transform .24s;isolation:isolate}
.stellar-reward-stage:after{content:"";position:absolute;inset:-24%;background:radial-gradient(circle,color-mix(in srgb,var(--gate),transparent 77%),transparent 24%);opacity:0;pointer-events:none}
.stellar-reward-backdrop{position:absolute;inset:0;z-index:0;background:radial-gradient(circle at 50% 50%,color-mix(in srgb,var(--gate),transparent 88%),transparent 36%),linear-gradient(90deg,transparent,rgba(255,255,255,.02),transparent)}
.stellar-reward-stage[data-reward-theme="portal-part"]{--gate:#5df0ff}.stellar-reward-stage[data-reward-theme="ammo"]{--gate:#77ff62}.stellar-reward-stage[data-reward-theme="ammo-rare"]{--gate:#ffc44a}.stellar-reward-stage[data-reward-theme="credits"]{--gate:#65ffbd}.stellar-reward-stage[data-reward-theme="stellar"]{--gate:#d980ff}.stellar-reward-stage[data-reward-theme="energy"]{--gate:#64b7ff}.stellar-reward-stage[data-reward-theme="charging"]{--gate:#7bd7ff}
.stellar-energy-source{grid-area:source;display:grid;place-items:center;gap:4px;position:relative;z-index:2}.stellar-energy-source>span{display:grid;place-items:center;width:34px;height:34px;border:1px solid rgba(120,222,255,.45);border-radius:10px;background:linear-gradient(145deg,rgba(40,197,255,.18),rgba(107,76,255,.12));color:#a9efff;font-size:16px;box-shadow:inset 0 0 12px rgba(55,207,255,.12)}.stellar-energy-source small{max-width:48px;color:#7294a9;font:700 4.6px Orbitron,sans-serif;line-height:1.2;text-align:center}
.stellar-energy-transfer{grid-area:transfer;position:relative;height:24px;overflow:hidden}.stellar-energy-transfer:before{content:"";position:absolute;left:0;right:0;top:50%;height:2px;border-radius:99px;background:linear-gradient(90deg,rgba(65,208,255,.05),color-mix(in srgb,var(--gate),#fff 20%),rgba(255,255,255,.85));box-shadow:0 0 8px color-mix(in srgb,var(--gate),transparent 30%)}.stellar-energy-transfer i{position:absolute;left:-10px;top:calc(50% - 3px);width:6px;height:6px;border-radius:50%;background:#e8fcff;box-shadow:0 0 6px #6de5ff,0 0 12px var(--gate);opacity:0}
.stellar-reward-core{grid-area:core;position:relative;z-index:2;display:grid;place-items:center;width:48px;height:48px;border:1px solid color-mix(in srgb,var(--gate),#fff 20%);border-radius:50%;background:radial-gradient(circle,#eefeff 0 8%,color-mix(in srgb,var(--gate),#fff 28%) 10%,color-mix(in srgb,var(--gate),transparent 55%) 34%,rgba(2,9,22,.94) 68%);box-shadow:inset 0 0 14px color-mix(in srgb,var(--gate),transparent 55%),0 0 14px color-mix(in srgb,var(--gate),transparent 72%)}.stellar-reward-core:before,.stellar-reward-core:after{content:"";position:absolute;inset:-5px;border:1px dashed color-mix(in srgb,var(--gate),transparent 35%);border-radius:50%}.stellar-reward-core:after{inset:7px;border-style:solid;opacity:.45}.stellar-reward-core span{position:relative;z-index:2;color:#fff;font:900 10px Orbitron,sans-serif;text-shadow:0 0 8px var(--gate)}
.stellar-reward-burst{position:absolute;inset:0;z-index:1;pointer-events:none}.stellar-reward-burst i{position:absolute;left:50%;top:50%;width:2px;height:42px;border-radius:99px;background:linear-gradient(180deg,rgba(255,255,255,.02),color-mix(in srgb,var(--gate),#fff 26%),rgba(255,255,255,0));opacity:0;transform:translate(-50%,-50%) scale(.25)}.stellar-reward-burst i:nth-child(1){--burst-rot:0deg;transform:translate(-50%,-50%) rotate(0deg) scale(.25)}.stellar-reward-burst i:nth-child(2){--burst-rot:30deg;transform:translate(-50%,-50%) rotate(30deg) scale(.25)}.stellar-reward-burst i:nth-child(3){--burst-rot:60deg;transform:translate(-50%,-50%) rotate(60deg) scale(.25)}.stellar-reward-burst i:nth-child(4){--burst-rot:90deg;transform:translate(-50%,-50%) rotate(90deg) scale(.25)}.stellar-reward-burst i:nth-child(5){--burst-rot:120deg;transform:translate(-50%,-50%) rotate(120deg) scale(.25)}.stellar-reward-burst i:nth-child(6){--burst-rot:150deg;transform:translate(-50%,-50%) rotate(150deg) scale(.25)}
.stellar-reward-copy{grid-area:copy;display:grid;gap:3px;position:relative;z-index:2;padding-top:8px;border-top:1px solid rgba(126,208,241,.1)}.stellar-reward-copy small{display:inline-flex;align-items:center;width:max-content;padding:3px 7px;border:1px solid color-mix(in srgb,var(--gate),transparent 58%);border-radius:999px;color:color-mix(in srgb,var(--gate),#fff 30%);font:800 5.4px Orbitron,sans-serif;letter-spacing:.14em}.stellar-reward-copy b{color:#dff8ff;font:800 9.5px Orbitron,sans-serif;letter-spacing:.04em}.stellar-reward-copy span{color:var(--muted);font-size:9px;line-height:1.35}
.stellar-reward-item-card{grid-area:card;position:relative;z-index:2;display:grid;grid-template-columns:auto 1fr;gap:10px;align-items:center;padding:8px 10px;border:1px solid color-mix(in srgb,var(--gate),transparent 72%);border-radius:11px;background:linear-gradient(145deg,color-mix(in srgb,var(--gate),transparent 94%),rgba(5,13,28,.86))}.stellar-item-type small,.stellar-item-type b{display:block}.stellar-item-type small{color:#6f91a7;font:700 5.3px Orbitron,sans-serif;letter-spacing:.12em}.stellar-item-type b{margin-top:4px;color:#f1fcff;font:900 10px Orbitron,sans-serif;white-space:nowrap}.stellar-item-chips{display:flex;flex-wrap:wrap;gap:5px}.stellar-item-chips span{padding:4px 6px;border:1px solid color-mix(in srgb,var(--gate),transparent 70%);border-radius:999px;background:rgba(255,255,255,.03);color:#cfefff;font:700 6px Orbitron,sans-serif;letter-spacing:.04em}
.stellar-reward-stage.is-charging{border-color:color-mix(in srgb,var(--gate),transparent 38%);box-shadow:0 0 25px color-mix(in srgb,var(--gate),transparent 82%);transform:translateY(-1px)}.stellar-reward-stage.is-charging .stellar-energy-source>span{animation:stellar-source-charge .7s ease-in-out infinite alternate}.stellar-reward-stage.is-charging .stellar-energy-transfer i{animation:stellar-energy-flight .8s cubic-bezier(.2,.7,.2,1) infinite}.stellar-reward-stage.is-charging .stellar-energy-transfer i:nth-child(2){animation-delay:.14s}.stellar-reward-stage.is-charging .stellar-energy-transfer i:nth-child(3){animation-delay:.28s}.stellar-reward-stage.is-charging .stellar-energy-transfer i:nth-child(4){animation-delay:.42s}.stellar-reward-stage.is-charging .stellar-energy-transfer i:nth-child(5){animation-delay:.56s}.stellar-reward-stage.is-charging .stellar-reward-core:before{animation:stellar-core-spin 1.15s linear infinite}.stellar-reward-stage.is-charging .stellar-reward-backdrop{animation:stellar-backdrop-pulse 1.1s ease-in-out infinite}
.stellar-reward-stage.is-revealed{border-color:#eafcff;box-shadow:0 0 34px color-mix(in srgb,var(--gate),transparent 42%)}.stellar-reward-stage.is-revealed:after{animation:stellar-reward-flash .72s ease-out}.stellar-reward-stage.is-revealed .stellar-reward-core{animation:stellar-core-reveal .7s cubic-bezier(.2,.8,.2,1)}.stellar-reward-stage.is-revealed .stellar-reward-copy{animation:stellar-copy-reveal .55s ease-out}.stellar-reward-stage.is-revealed .stellar-reward-item-card{animation:stellar-card-rise .62s cubic-bezier(.2,.8,.2,1)}.stellar-reward-stage.is-revealed .stellar-reward-burst i{animation:stellar-burst-line .65s ease-out}.stellar-reward-stage.has-result .stellar-reward-copy b,.stellar-reward-stage.has-result .stellar-item-type b{color:color-mix(in srgb,var(--gate),#fff 46%)}
@keyframes stellar-energy-flight{0%{left:-10px;transform:translate3d(0,-7px,0) scale(.45);opacity:0}18%{opacity:1}70%{opacity:1}100%{left:calc(100% - 6px);transform:translate3d(0,5px,0) scale(1.35);opacity:0}}
@keyframes stellar-source-charge{to{transform:scale(1.07);filter:brightness(1.45);box-shadow:inset 0 0 18px rgba(55,207,255,.28),0 0 18px rgba(55,207,255,.3)}}
@keyframes stellar-core-spin{to{transform:rotate(360deg)}}
@keyframes stellar-reward-flash{0%{opacity:0;transform:scale(.25) rotate(0)}35%{opacity:.85}100%{opacity:0;transform:scale(1.25) rotate(100deg)}}
@keyframes stellar-core-reveal{0%{transform:scale(.55);filter:brightness(2.8)}55%{transform:scale(1.18);filter:brightness(2)}100%{transform:scale(1);filter:brightness(1)}}
@keyframes stellar-copy-reveal{from{opacity:0;transform:translateY(9px)}to{opacity:1;transform:none}}
@keyframes stellar-card-rise{from{opacity:0;transform:translateY(12px) scale(.96)}to{opacity:1;transform:none}}
@keyframes stellar-burst-line{0%{opacity:0}35%{opacity:.95}100%{opacity:0;transform:translate(-50%,-50%) rotate(var(--burst-rot,0deg)) scale(1.22)}}
@keyframes stellar-backdrop-pulse{0%,100%{opacity:.45;transform:scale(1)}50%{opacity:.95;transform:scale(1.05)}}
.stellar-global-actions{display:grid;gap:7px}.stellar-global-actions button{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:44px;padding:8px 10px;border:1px solid color-mix(in srgb,var(--gate),transparent 55%);border-radius:10px;background:color-mix(in srgb,var(--gate),transparent 91%);color:#eafcff;cursor:pointer}.stellar-global-actions button small{font:700 6px Orbitron,sans-serif;color:var(--muted);text-align:left}.stellar-global-actions button b{font:800 9px Orbitron,sans-serif;white-space:nowrap}.stellar-global-actions button:hover:not(:disabled){border-color:var(--gate);background:color-mix(in srgb,var(--gate),transparent 84%)}.stellar-global-actions button:disabled{opacity:.35;cursor:not-allowed}
.stellar-reward-pool{display:flex;flex-wrap:wrap;gap:5px;margin-top:14px}.stellar-reward-pool span{padding:5px 7px;border:1px solid rgba(145,206,232,.12);border-radius:99px;color:#718da1;font:700 7px Orbitron,sans-serif}
.stellar-rules{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-top:18px;padding:18px}.stellar-rules div{padding:12px;border-left:2px solid #6dceff;background:rgba(255,255,255,.025)}.stellar-rules b,.stellar-rules span{display:block}.stellar-rules b{font:800 10px Orbitron;color:#a9ecff}.stellar-rules span{margin-top:5px;color:var(--muted);font-size:12px;line-height:1.35}
@media(max-width:1250px){.stellar-console{grid-template-columns:1fr}.stellar-generator{min-height:unset}.stellar-viewer{grid-template-columns:minmax(300px,.9fr) minmax(260px,1fr)}}
@media(max-width:1100px){.stellar-portal-grid{grid-template-columns:1fr}.stellar-hero{grid-template-columns:110px 1fr}.stellar-wallet{grid-column:1/-1;grid-template-columns:repeat(3,1fr)}.stellar-rules{grid-template-columns:1fr 1fr}}
@media(max-width:760px){.stellar-project-tabs{grid-template-columns:1fr}.stellar-viewer{grid-template-columns:1fr}.stellar-visual-column{gap:10px}.stellar-puzzle-frame{max-width:430px}.stellar-generator-costs{grid-template-columns:1fr}.stellar-generator{padding:16px 14px 14px}.stellar-portal-reward{min-width:170px;max-width:240px;width:min(95%,240px);padding:7px 9px}.stellar-reward-stage{grid-template-columns:1fr;grid-template-areas:"source" "transfer" "core" "copy" "card";justify-items:center;text-align:center}.stellar-reward-copy{justify-items:center}.stellar-reward-item-card{grid-template-columns:1fr;justify-items:center}.stellar-item-chips{justify-content:center}}
@media(max-width:650px){.stellar-hero{grid-template-columns:1fr}.stellar-reactor{width:110px}.stellar-wallet,.stellar-rules,.stellar-difficulty-guide{grid-template-columns:1fr}.stellar-portal-metrics{grid-template-columns:1fr 1fr}.stellar-combat-scale small{font-size:6px}.stellar-card-copy{padding-inline:15px}}
@media(prefers-reduced-motion:reduce){.stellar-reactor i,.stellar-portal-card.complete .stellar-gate-art,.stellar-viewer.complete .stellar-gate-art,.stellar-reward-stage *,.stellar-reward-stage:after,.stellar-reward-backdrop,.stellar-portal-energy *,.stellar-portal-energy:before,.stellar-portal-energy:after,.stellar-portal-reward{animation:none!important;transition:none!important}}
.stellar-portal-reward[data-reward-theme="ammo-ref"],.stellar-reward-stage[data-reward-theme="ammo-ref"]{--gate:#e879ff}


/* ============================================================
   INTERFACE LOGADA — HANGAR 3D E PALETA DINÂMICA
   A tela de login permanece sem alterações visuais.
   ============================================================ */
:root {
  --active-ship-dark: #078bc7;
  --active-ship-light: #62dcff;
  --active-ship-glow: #21c9ff;
}
body:not(.auth-view-active) {
  background:
    radial-gradient(circle at 76% 10%, color-mix(in srgb,var(--active-ship-glow) 16%,transparent), transparent 31rem),
    radial-gradient(circle at 18% 88%, color-mix(in srgb,var(--active-ship-dark) 20%,transparent), transparent 38rem),
    linear-gradient(135deg,#030711,#07101e 52%,#040812);
}
body:not(.auth-view-active) .starfield {
  opacity: .68;
  background-image:
    radial-gradient(circle,#fff 0 1px,transparent 1.35px),
    radial-gradient(circle,var(--active-ship-light) 0 1px,transparent 1.45px);
}
body:not(.auth-view-active) .app-shell {
  --cyan: var(--active-ship-light);
  --cyan-2: var(--active-ship-dark);
  --line: color-mix(in srgb,var(--active-ship-light) 20%,transparent);
}
body:not(.auth-view-active) .sidebar {
  border-right-color: color-mix(in srgb,var(--active-ship-light) 18%,transparent);
  background:
    linear-gradient(180deg,rgba(7,17,31,.98),rgba(3,9,18,.98)),
    radial-gradient(circle at 50% 4%,color-mix(in srgb,var(--active-ship-glow) 13%,transparent),transparent 24rem);
  box-shadow: 14px 0 44px rgba(0,0,0,.22), inset -1px 0 color-mix(in srgb,var(--active-ship-light) 8%,transparent);
}
body:not(.auth-view-active) .sidebar .logo {
  filter: drop-shadow(0 0 18px color-mix(in srgb,var(--active-ship-glow) 28%,transparent));
}
body:not(.auth-view-active) .nav-item.active {
  color: #effcff;
  border-color: color-mix(in srgb,var(--active-ship-light) 35%,transparent);
  background: linear-gradient(90deg,color-mix(in srgb,var(--active-ship-dark) 26%,transparent),rgba(7,17,31,.34));
  box-shadow: inset 3px 0 var(--active-ship-light),0 0 20px color-mix(in srgb,var(--active-ship-glow) 8%,transparent);
}
body:not(.auth-view-active) .topbar {
  border-bottom-color: color-mix(in srgb,var(--active-ship-light) 13%,transparent);
  background: linear-gradient(180deg,rgba(5,13,25,.94),rgba(5,13,25,.74));
  backdrop-filter: blur(18px);
}
body:not(.auth-view-active) .panel {
  border-color: color-mix(in srgb,var(--active-ship-light) 17%,transparent);
  background:
    linear-gradient(145deg,rgba(11,24,43,.94),rgba(4,11,22,.92)),
    radial-gradient(circle at top left,color-mix(in srgb,var(--active-ship-glow) 7%,transparent),transparent 40%);
  box-shadow: 0 22px 58px rgba(0,0,0,.24),inset 0 1px rgba(255,255,255,.035);
}
body:not(.auth-view-active) .panel::after {
  content:"";
  position:absolute;
  left:0;top:0;
  width:130px;height:1px;
  background:linear-gradient(90deg,var(--active-ship-light),transparent);
  pointer-events:none;
}
body:not(.auth-view-active) .metric-card,
body:not(.auth-view-active) .quick-actions button,
body:not(.auth-view-active) .ship-stats div {
  border-color: color-mix(in srgb,var(--active-ship-light) 13%,transparent);
  background: linear-gradient(145deg,rgba(5,15,29,.82),rgba(3,9,18,.72));
}
body:not(.auth-view-active) .quick-actions button:hover {
  border-color: color-mix(in srgb,var(--active-ship-light) 48%,transparent);
  box-shadow: 0 10px 26px color-mix(in srgb,var(--active-ship-glow) 8%,transparent);
}
body:not(.auth-view-active) .primary.play-button {
  background: linear-gradient(135deg,var(--active-ship-light),var(--active-ship-dark));
  box-shadow: 0 10px 30px color-mix(in srgb,var(--active-ship-glow) 20%,transparent);
}

body:not(.auth-view-active) .ship-stage {
  position:relative;
  min-height:600px;
  background:
    radial-gradient(circle at 50% 42%,color-mix(in srgb,var(--active-ship-glow) 16%,transparent),transparent 28%),
    linear-gradient(155deg,rgba(11,25,44,.97),rgba(3,10,20,.97));
}
body:not(.auth-view-active) .ship-stage::before {
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background:linear-gradient(125deg,color-mix(in srgb,var(--active-ship-light) 6%,transparent),transparent 32%,transparent 72%,color-mix(in srgb,var(--active-ship-dark) 7%,transparent));
}
body:not(.auth-view-active) .ship-visual-wrap {
  height:308px;
  perspective:1450px;
  isolation:isolate;
}
.ship-stage-grid {
  position:absolute;
  inset:8% 5% 10%;
  opacity:.52;
  border-radius:50%;
  transform:rotateX(66deg) translateZ(-44px);
  background-image:
    linear-gradient(color-mix(in srgb,var(--active-ship-light) 10%,transparent) 1px,transparent 1px),
    linear-gradient(90deg,color-mix(in srgb,var(--active-ship-light) 10%,transparent) 1px,transparent 1px);
  background-size:28px 28px;
  mask-image:radial-gradient(circle,#000 22%,transparent 72%);
}
.ship-stage-axis {
  position:absolute;
  z-index:0;
  opacity:.2;
  background:linear-gradient(90deg,transparent,var(--active-ship-light),transparent);
}
.ship-stage-axis.axis-x { width:78%;height:1px; }
.ship-stage-axis.axis-y { width:1px;height:73%;background:linear-gradient(180deg,transparent,var(--active-ship-light),transparent); }
body:not(.auth-view-active) .orbit-ring {
  border-color:color-mix(in srgb,var(--active-ship-light) 25%,transparent);
  box-shadow:0 0 20px color-mix(in srgb,var(--active-ship-glow) 8%,transparent),inset 0 0 18px color-mix(in srgb,var(--active-ship-glow) 5%,transparent);
}
body:not(.auth-view-active) .ring-one {
  width:250px;height:148px;
  animation:logged-ring-one 15s linear infinite;
}
body:not(.auth-view-active) .ring-two {
  width:190px;height:226px;
  animation:logged-ring-two 12s linear infinite reverse;
}
body:not(.auth-view-active) .ring-three {
  width:112px;height:112px;
  border-style:dashed;
  opacity:.55;
  animation:logged-ring-three 8s linear infinite;
}
.ship-model-platform {
  position:absolute;
  z-index:1;
  bottom:30px;
  width:204px;height:62px;
  transform:rotateX(72deg);
  border:1px solid color-mix(in srgb,var(--active-ship-light) 25%,transparent);
  border-radius:50%;
  background:radial-gradient(circle,color-mix(in srgb,var(--active-ship-glow) 22%,transparent),rgba(2,8,17,.08) 62%,transparent 70%);
  box-shadow:0 0 44px color-mix(in srgb,var(--active-ship-glow) 14%,transparent),inset 0 0 30px color-mix(in srgb,var(--active-ship-glow) 10%,transparent);
}
.ship-model-platform span {
  position:absolute;inset:11px;
  border:1px dashed color-mix(in srgb,var(--active-ship-light) 19%,transparent);
  border-radius:50%;
}
.ship-model-platform span:last-child { inset:25px; }
body:not(.auth-view-active) .portal-ship-visual {
  width:244px;height:232px;
  transform-style:preserve-3d;
  animation:logged-model-float 5.8s ease-in-out infinite;
}
body:not(.auth-view-active) .portal-ship-visual .home-ship {
  width:202px;
  transform-origin:50% 52%;
  transform-style:preserve-3d;
  animation:logged-model-rotate-side 8.8s cubic-bezier(.42,.08,.24,.98) infinite;
}
body:not(.auth-view-active) .portal-ship-visual.ship-model-live {
  display:grid;
  place-items:center;
  overflow:visible;
}
.ship-model-shell {
  position:relative;
  width:100%;
  height:100%;
  display:grid;
  place-items:center;
}
.ship-model-shell::before {
  content:"";
  position:absolute;
  inset:10% 18% 18%;
  border-radius:50%;
  background:radial-gradient(circle,color-mix(in srgb,var(--active-ship-glow) 12%,transparent),rgba(0,0,0,0) 68%);
  filter:blur(18px);
  opacity:.95;
}
.ship-model-canvas {
  position:relative;
  z-index:2;
  width:min(100%,220px);
  height:auto;
  aspect-ratio:1;
  max-width:220px;
  display:block;
  image-rendering:auto;
  filter:drop-shadow(0 18px 30px rgba(0,0,0,.44)) saturate(1.08);
}

.ship-model-loading {
  position:absolute;
  z-index:4;
  left:50%;
  bottom:32px;
  transform:translateX(-50%);
  color:color-mix(in srgb,var(--active-ship-light) 78%,#fff);
  font-size:9px;
  letter-spacing:.22em;
  white-space:nowrap;
  text-shadow:0 0 12px var(--active-ship-glow);
  opacity:.85;
}
.ship-model-loading::before {
  content:"";
  display:block;
  width:96px;
  height:2px;
  margin:0 auto 8px;
  background:linear-gradient(90deg,transparent,var(--active-ship-glow),transparent);
  animation:ship-model-loading-pulse 1.25s ease-in-out infinite;
}
.ship-model-loading-active .ship-model-canvas { opacity:.12; }
@keyframes ship-model-loading-pulse { 0%,100%{transform:scaleX(.28);opacity:.35} 50%{transform:scaleX(1);opacity:1} }

.game-ship .ship-depth-layer,
.game-ship .ship-main-layer {
  position:absolute;
  inset:0;
  display:grid;
  place-items:center;
  transform-style:preserve-3d;
}
.game-ship .ship-depth-layer {
  z-index:1;
  transform:translate3d(0,7px,-22px) scale(.97);
  filter:drop-shadow(0 18px 14px rgba(0,0,0,.48));
  opacity:.72;
}
.game-ship .ship-main-layer { z-index:3; transform:translateZ(8px); }
.game-ship .ship-depth-layer svg,
.game-ship .ship-main-layer svg {
  width:100%;height:100%;overflow:visible;
}
.game-ship .ship-main-layer svg {
  filter:drop-shadow(0 0 12px var(--ship-glow)) drop-shadow(0 0 32px color-mix(in srgb,var(--ship-glow) 42%,transparent));
}
.game-ship .ship-specular {
  position:absolute;
  z-index:4;
  left:24%;top:18%;
  width:17%;height:42%;
  border-radius:60%;
  transform:rotate(-18deg) translateZ(16px);
  background:linear-gradient(180deg,rgba(255,255,255,.78),rgba(255,255,255,0));
  filter:blur(3px);
  opacity:.58;
  animation:ship-specular-sweep 3.8s ease-in-out infinite;
}
.game-ship .ship-core-light {
  position:absolute;
  z-index:5;
  left:50%;top:37%;
  width:9%;aspect-ratio:1;
  transform:translate(-50%,-50%);
  border-radius:50%;
  background:#fff;
  box-shadow:0 0 8px #fff,0 0 21px var(--ship-glow),0 0 42px var(--ship-glow);
  animation:ship-core-pulse 1.7s ease-in-out infinite;
}
.game-ship .ship-hull-lines {
  position:absolute;
  z-index:6;
  inset:0;
  pointer-events:none;
}
.game-ship .ship-hull-lines i {
  position:absolute;
  left:50%;top:47%;
  height:1px;
  width:32%;
  background:linear-gradient(90deg,transparent,var(--ship-light),transparent);
  opacity:.5;
}
.game-ship .ship-hull-lines i:first-child { transform:translateX(-100%) rotate(-22deg); }
.game-ship .ship-hull-lines i:nth-child(2) { transform:rotate(22deg); }
.game-ship .ship-hull-lines i:last-child { width:20%;top:64%;transform:translateX(-50%); }
.game-ship .ship-engine-side {
  width:9%;height:29%;top:72%;opacity:.72;
}
.game-ship .engine-left { left:38%; }
.game-ship .engine-right { left:62%; }
body:not(.auth-view-active) .ship-vant-orbit {
  inset:14px;
  animation:none;
  transform:none;
}
body:not(.auth-view-active) .ship-vant-orbit .orbit-vant {
  border-color:color-mix(in srgb,var(--active-ship-light) 23%,transparent);
  background:rgba(3,12,24,.84);
  box-shadow:0 0 24px color-mix(in srgb,var(--active-ship-glow) 12%,transparent);
  animation:none;
  transform:none;
}
.ship-stage-labels {
  position:absolute;
  z-index:7;
  left:0;right:0;bottom:3px;
  display:flex;
  justify-content:space-between;
  gap:1rem;
  color:#65879b;
  font:700 .48rem Orbitron;
  letter-spacing:.12em;
}
body:not(.auth-view-active) .ship-shadow {
  width:190px;height:34px;bottom:34px;
  background:radial-gradient(circle,color-mix(in srgb,var(--active-ship-glow) 24%,rgba(0,0,0,.72)),rgba(0,0,0,0) 72%);
  filter:blur(13px);
}
body:not(.auth-view-active) .role-badge {
  color:var(--active-ship-light);
  border-color:color-mix(in srgb,var(--active-ship-light) 36%,transparent);
  background:color-mix(in srgb,var(--active-ship-dark) 12%,transparent);
}
body:not(.auth-view-active) .ship-stats strong { color:var(--active-ship-light); }

@keyframes logged-model-rotate-side {
  0% { transform:rotateX(14deg) rotateY(-68deg) rotateZ(90deg) translateY(0) scale(1); }
  20% { transform:rotateX(12deg) rotateY(-36deg) rotateZ(90deg) translateY(-5px) scale(1.015); }
  50% { transform:rotateX(10deg) rotateY(0deg) rotateZ(90deg) translateY(-10px) scale(1.035); }
  80% { transform:rotateX(12deg) rotateY(36deg) rotateZ(90deg) translateY(-5px) scale(1.015); }
  100% { transform:rotateX(14deg) rotateY(68deg) rotateZ(90deg) translateY(0) scale(1); }
}
@keyframes logged-model-float { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-7px)} }
@keyframes logged-ring-one { to{transform:rotate(350deg)} }
@keyframes logged-ring-two { to{transform:rotate(-302deg)} }
@keyframes logged-ring-three { to{transform:rotate(360deg)} }
@keyframes logged-vant-field { to{transform:rotate(360deg)} }
@keyframes logged-vant-counterspin { to{transform:rotate(-360deg)} }
@keyframes ship-specular-sweep { 0%,100%{opacity:.18;transform:translateX(-8px) rotate(-16deg)} 50%{opacity:.68;transform:translateX(18px) rotate(-16deg)} }
@keyframes ship-core-pulse { 50%{transform:translate(-50%,-50%) scale(1.25);opacity:.82} }


@media (max-width: 980px) {
  body:not(.auth-view-active) .ship-visual-wrap { height:292px; }
  body:not(.auth-view-active) .portal-ship-visual { width:214px; height:192px; }
  body:not(.auth-view-active) .portal-ship-visual .home-ship { width:188px; }
  .ship-model-canvas { width:min(100%,198px); max-width:198px; height:auto; }
  .ship-model-platform { width:188px; height:58px; }
  body:not(.auth-view-active) .ship-shadow { width:176px; }
}
@media (prefers-reduced-motion: reduce) {
  body:not(.auth-view-active) .portal-ship-visual,
  body:not(.auth-view-active) .portal-ship-visual .home-ship,
  body:not(.auth-view-active) .orbit-ring,
  body:not(.auth-view-active) .ship-vant-orbit,
  body:not(.auth-view-active) .ship-vant-orbit .orbit-vant,
  .game-ship .ship-specular,
  .game-ship .ship-core-light { animation:none!important; }
}

/* ============================================================
   LANDING / ACESSO — acabamento visual leve e responsivo
   Mantém a estrutura e o fluxo de autenticação intactos.
   ============================================================ */
body.auth-view-active {
  background:
    radial-gradient(ellipse at 16% 52%, rgba(24, 112, 151, .14), transparent 36rem),
    radial-gradient(ellipse at 88% 24%, rgba(42, 105, 157, .12), transparent 29rem),
    linear-gradient(135deg, #030711, #07111f 55%, #040812);
}

body.auth-view-active .starfield {
  opacity: .66;
  mask-image: linear-gradient(to bottom, #000 0%, #000 58%, transparent 96%);
}

.login-view {
  grid-template-columns: minmax(520px, 1.2fr) minmax(390px, 510px);
  max-width: 1920px;
  margin-inline: auto;
}

.login-copy {
  isolation: isolate;
  padding-left: clamp(0rem, 1.2vw, 1.15rem);
}

.login-copy::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: -4%;
  top: 8%;
  width: min(42vw, 690px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(38, 185, 217, .09), transparent 66%);
  pointer-events: none;
}

.login-brand-frame {
  border-color: rgba(55, 243, 177, .2);
  background:
    linear-gradient(90deg, rgba(55, 243, 177, .045) 1px, transparent 1px),
    linear-gradient(rgba(55, 243, 177, .035) 1px, transparent 1px),
    linear-gradient(145deg, rgba(5, 25, 31, .82), rgba(3, 9, 18, .38));
  background-size: 34px 34px, 34px 34px, auto;
  box-shadow: inset 0 1px rgba(255,255,255,.025), 0 18px 55px rgba(0,0,0,.2);
}

.login-brand-frame::before,
.login-brand-frame::after {
  content: "";
  position: absolute;
  z-index: 2;
  width: 52px;
  height: 1px;
  background: linear-gradient(90deg, var(--green), transparent);
  box-shadow: 0 0 9px rgba(55,243,177,.45);
}
.login-brand-frame::before { left: 0; top: 0; }
.login-brand-frame::after { right: 0; bottom: 0; transform: rotate(180deg); }

.login-game-logo {
  filter: drop-shadow(0 0 16px rgba(38,232,156,.22)) drop-shadow(0 16px 24px rgba(0,0,0,.22));
}

.login-copy > .eyebrow {
  display: flex;
  align-items: center;
  gap: .72rem;
}
.login-copy > .eyebrow::before {
  content: "";
  width: 25px;
  height: 1px;
  background: var(--cyan);
  box-shadow: 0 0 8px rgba(70,220,255,.55);
}

.login-copy h1 {
  max-width: 980px;
  text-wrap: balance;
}
.login-copy h1 span {
  text-shadow: 0 0 28px rgba(70,220,255,.12);
}

.lead {
  text-wrap: pretty;
}

.feature-row span {
  display: inline-flex;
  align-items: center;
  gap: .48rem;
  border-color: rgba(84, 178, 211, .2);
  background: linear-gradient(135deg, rgba(12, 31, 52, .74), rgba(5, 15, 29, .58));
  box-shadow: inset 0 1px rgba(255,255,255,.025);
}
.feature-row span::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 7px rgba(55,243,177,.72);
}

.login-card {
  isolation: isolate;
  border-color: rgba(70, 220, 255, .32);
  background:
    radial-gradient(circle at 88% 4%, rgba(70,220,255,.09), transparent 13rem),
    linear-gradient(145deg, rgba(14, 31, 57, .98), rgba(5, 12, 25, .98));
  box-shadow: 0 26px 80px rgba(0,0,0,.5), inset 0 1px rgba(255,255,255,.055);
}
.login-card::before {
  content: "";
  position: absolute;
  z-index: 0;
  left: 1.7rem;
  right: 1.7rem;
  top: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  opacity: .72;
  box-shadow: 0 0 11px rgba(70,220,255,.55);
}

.auth-status-line span {
  animation: auth-status-pulse 2.4s ease-in-out infinite;
}

.auth-tabs button {
  transition: color .18s ease, background .18s ease, box-shadow .18s ease;
}
.auth-tabs button:hover:not(.active) {
  color: #b4d7e5;
  background: rgba(70,220,255,.045);
}

.login-card input {
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.login-card input:hover {
  border-color: rgba(111, 188, 219, .4);
  background: rgba(2, 10, 21, .88);
}
.login-card input:focus {
  background: rgba(2, 11, 23, .96);
  box-shadow: 0 0 0 3px rgba(70,220,255,.075), 0 10px 25px rgba(0,0,0,.15);
}

.login-card .primary {
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(37,186,220,.2), inset 0 1px rgba(255,255,255,.38);
}
.login-card .primary::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 25%, rgba(255,255,255,.27) 48%, transparent 70%);
  transform: translateX(-125%);
  transition: transform .55s ease;
}
.login-card .primary:hover::after { transform: translateX(125%); }
.login-card .primary:active { transform: translateY(0) scale(.995); }

.guest-access .ghost-link {
  transition: color .18s ease, text-shadow .18s ease;
}
.guest-access .ghost-link:hover {
  color: #d5f5ff;
  text-shadow: 0 0 12px rgba(70,220,255,.3);
}

.faction-choice {
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease, transform .18s ease;
}
.faction-choice:hover { transform: translateY(-1px); }

.login-card button:focus-visible,
.login-card input:focus-visible,
.guest-access .ghost-link:focus-visible,
.faction-choice:focus-within {
  outline: 1px solid var(--cyan);
  outline-offset: 3px;
}

@keyframes auth-status-pulse {
  0%, 100% { opacity: .72; transform: scale(.9); }
  50% { opacity: 1; transform: scale(1.08); }
}

@media (max-width: 1180px) and (min-width: 851px) {
  .login-view {
    grid-template-columns: minmax(420px, 1fr) minmax(370px, 455px);
    gap: clamp(1rem, 2.5vw, 2.2rem);
    padding-inline: clamp(1rem, 2.6vw, 2.5rem);
  }
  .login-brand-frame { width: min(720px, 96%); }
  .login-copy h1 { font-size: clamp(2.65rem, 5.3vw, 4.6rem); }
}

@media (max-width: 850px) {
  .login-view { grid-template-columns: 1fr; }
  .login-copy { padding-left: 0; }
  .login-copy::before { left: 50%; top: -20%; width: 80vw; transform: translateX(-50%); }
  .login-brand-frame { box-shadow: inset 0 1px rgba(255,255,255,.025), 0 10px 30px rgba(0,0,0,.18); }
  .login-card { box-shadow: 0 18px 50px rgba(0,0,0,.42), inset 0 1px rgba(255,255,255,.045); }
}

@media (max-width: 590px) {
  .login-view { padding-inline: .55rem; }
  .login-card { border-radius: 1.1rem; }
  .login-card::before { left: 1rem; right: 1rem; }
  .login-card::after { border-radius: .82rem; }
}

@media (prefers-reduced-motion: reduce) {
  .auth-status-line span,
  .login-card .primary::after { animation: none; transition: none; }
}

.mineral-sale-control.is-empty { opacity:.72; }
.mineral-sale-control.is-empty .mineral-sale-total strong { color:#70889a; }
.mineral-sale-control button:disabled,.mineral-sale-control input:disabled { opacity:.38; cursor:not-allowed; }
