:root{
  --bg:#0b0614;
  --panel:#140c24;
  --panel2:#1c1230;
  --border:#3b2a66;
  --violet:#7c3aed;
  --violet2:#a78bfa;
  --text:#e9e7ff;
  --text2:#b9b3d9;
}

*{box-sizing:border-box}

body{
  margin:0;
  background:
    radial-gradient(circle at 20% 20%, #1a1033 0%, transparent 40%),
    radial-gradient(circle at 80% 10%, #2a1450 0%, transparent 35%),
    var(--bg);
  font-family:Inter, sans-serif;
  color:var(--text);
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
}

.grid-overlay{
  position:fixed;
  inset:0;
  background-image:
    linear-gradient(rgba(124,58,237,0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124,58,237,0.08) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events:none;
}

.container{
  width:100%;
  max-width:420px;
  padding:24px;
}

.logo{
  text-align:center;
  margin-bottom:28px;
}

.logo-title{
  font-family:Orbitron, sans-serif;
  font-size:34px;
  letter-spacing:3px;
  font-weight:600;
  background:linear-gradient(90deg,var(--violet2),#ffffff);
  -webkit-background-clip:text;
  -webkit-text-fill-color:transparent;
}

.logo-sub{
  font-size:12px;
  letter-spacing:4px;
  color:var(--text2);
  margin-top:6px;
}

.panel{
  background:linear-gradient(180deg,var(--panel),var(--panel2));
  border:1px solid var(--border);
  border-radius:14px;
  padding:26px;
  box-shadow:
    0 0 0 1px rgba(124,58,237,0.15) inset,
    0 20px 60px rgba(0,0,0,0.6);
}

.panel h2{
  font-family:Orbitron;
  font-size:18px;
  letter-spacing:2px;
  margin:0 0 18px 0;
  color:var(--violet2);
}

.field{
  margin-bottom:16px;
}

.label{
  font-size:12px;
  color:var(--text2);
  margin-bottom:6px;
  display:block;
}

.input{
  width:100%;
  padding:12px 14px;
  background:#0e0a1a;
  border:1px solid #2a1e4a;
  border-radius:8px;
  color:var(--text);
  font-size:14px;
  outline:none;
}

.input:focus{
  border-color:var(--violet);
  box-shadow:0 0 0 1px var(--violet);
}

.btn{
  width:100%;
  padding:13px;
  border-radius:10px;
  border:none;
  font-family:Orbitron;
  letter-spacing:2px;
  font-size:13px;
  cursor:pointer;
  transition:.2s;
}

.btn-primary{
  background:linear-gradient(90deg,var(--violet),#9333ea);
  color:white;
  margin-top:10px;
}

.btn-primary:hover{
  transform:translateY(-1px);
  box-shadow:0 6px 20px rgba(124,58,237,.4);
}

.btn-secondary{
  background:#0e0a1a;
  border:1px solid rgba(167,139,250,.28);
  color:var(--violet2);
  margin-top:0;
}

.btn-secondary:hover{
  border-color:var(--violet2);
  color:var(--text);
}

.btn:disabled{
  cursor:not-allowed;
  opacity:.55;
  transform:none;
  box-shadow:none;
}

.divider{
  text-align:center;
  margin:18px 0;
  font-size:12px;
  color:var(--text2);
  position:relative;
}

.divider:before,
.divider:after{
  content:"";
  position:absolute;
  top:50%;
  width:40%;
  height:1px;
  background:#2a1e4a;
}

.divider:before{left:0}
.divider:after{right:0}

.btn-google{
  background:#ffffff;
  color:#111;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  font-weight:600;
}

.btn-google:hover{
  background:#f3f3f3;
}

.auth-actions{
  display:flex;
  flex-direction:column;
  gap:14px;
  margin-top:4px;
}

.auth-actions a{
  display:block;
  text-decoration:none;
}

.auth-actions .btn{
  width:100%;
  margin:0;
}

.text-link{
  display:inline-block;
  margin-top:12px;
  color:var(--violet2);
  font-size:13px;
  text-decoration:none;
}

.text-link:hover{
  color:var(--text);
}

.copy-address{
  padding:10px 12px;
  border:1px solid rgba(167,139,250,.24);
  border-radius:8px;
  background:#0e0a1a;
  color:var(--text);
  font-family:monospace;
  font-size:12px;
  line-height:1.45;
  overflow-wrap:anywhere;
  cursor:pointer;
}

.copy-address.copied{
  border-color:rgba(34,197,94,.6);
  color:#86efac;
}

.footer{
  text-align:center;
  margin-top:18px;
  font-size:12px;
  color:var(--text2);
}

@media (max-width:480px){
  .logo-title{font-size:26px}
  .panel{padding:20px}
}

/* ===== Dashboard mode ===== */

body.dashboard{
  display:block;
  align-items:unset;
  justify-content:unset;
  padding:20px;
}

.game-nav{
  display:flex;
  flex-wrap:wrap;
  gap:14px;
  align-items:center;
  justify-content:space-between;
}

.nav-logo{
  font-family:Orbitron;
  letter-spacing:2px;
}

.nav-links{
  display:flex;
  gap:18px;
  flex-wrap:wrap;
}

.nav-links a{
  color:var(--text2);
  text-decoration:none;
  font-size:14px;
}

.nav-links a:hover{
  color:var(--violet2);
}

.nav-res{
  font-size:14px;
  display:flex;
  flex-wrap:wrap;
  gap:12px;
}

body.energy-deficit #energy{
  color:#f87171;
  font-weight:700;
}

.build-card{
  display:flex;
  gap:14px;
  align-items:center;
}

.build-icon{
  width:64px;
  height:64px;
  border-radius:12px;
  background:linear-gradient(135deg,#2a1e4a,#140c24);
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:28px;
  position:relative;
}

.build-level{
  position:absolute;
  bottom:-6px;
  right:-6px;
  background:var(--violet);
  border-radius:10px;
  padding:2px 6px;
  font-size:11px;
}

.game-grid{
  display:grid;
  grid-template-columns: 1fr 320px;
  gap:16px;
}

.dashboard-grid{
  display:grid;
  grid-template-columns:minmax(0,1fr) 320px;
  gap:16px;
  max-width:1280px;
  margin:0 auto;
}

.side-stack{
  display:flex;
  flex-direction:column;
  gap:16px;
}

.timer-panel{
  color:var(--text2);
  line-height:1.6;
}

.timer-entry{
  margin-top:12px;
  padding-top:12px;
  border-top:1px solid var(--border);
}

.planet-scene{
  position:relative;
  display:grid;
  place-items:center;
  width:100%;
  overflow:hidden;
  border:1px solid #2a1e4a;
  border-radius:12px;
  background:
    radial-gradient(circle at 50% 52%, rgba(124,58,237,.16), transparent 36%),
    radial-gradient(circle at 18% 18%, rgba(56,189,248,.08), transparent 28%),
    #07040d;
}

.planet-tier-image{
  position:relative;
  z-index:2;
  display:block;
  width:100%;
  height:auto;
  object-fit:contain;
  object-position:center center;
  filter:drop-shadow(0 0 34px rgba(56,189,248,.22));
}

.star-field{
  position:absolute;
  inset:0;
  background-image:
    radial-gradient(circle, rgba(255,255,255,.9) 0 1px, transparent 1px),
    radial-gradient(circle, rgba(167,139,250,.9) 0 1px, transparent 1px);
  background-position:0 0, 34px 48px;
  background-size:86px 86px, 120px 120px;
  opacity:.42;
  animation:star-drift 36s linear infinite;
}

.dashboard-chat{
  margin-top:18px;
  border-top:1px solid rgba(167,139,250,.14);
  padding-top:18px;
}

.compact-title{
  margin-bottom:12px;
}

.dashboard-chat-log{
  max-height:220px;
  overflow-y:auto;
}

.system-switcher{
  margin-bottom:14px;
  max-width:360px;
}

.system-switcher label{
  display:grid;
  gap:6px;
  color:var(--text2);
  font-size:12px;
}

@keyframes star-drift{
  to{background-position:86px 86px,154px 168px}
}

@media (max-width: 900px){
  .game-grid{
    grid-template-columns:1fr;
  }

  .dashboard-grid{
    grid-template-columns:1fr;
  }
}

@media (max-width:600px){
  .nav-links{
    width:100%;
    justify-content:space-around;
  }
}


.countdown{
  color: var(--violet2);
  font-weight: bold;
}

.page-panel{
  max-width:1280px;
  margin:0 auto;
}

.section-title{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
  margin-bottom:20px;
}

.section-title h2{
  margin-bottom:8px;
}

.section-title p{
  max-width:720px;
  margin:0;
  color:var(--text2);
  line-height:1.5;
}

.active-chip{
  flex:0 0 auto;
  border:1px solid var(--border);
  border-radius:10px;
  padding:10px 12px;
  background:#0e0a1a;
  color:var(--text2);
  font-size:13px;
}

.inline-form{
  margin-top:8px;
}

.inline-form .btn,
.premium-strip .btn{
  width:auto;
  padding:9px 11px;
  font-size:11px;
}

.premium-strip{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  margin-bottom:18px;
  border:1px solid rgba(167,139,250,.24);
  border-radius:10px;
  padding:12px 14px;
  background:#0e0a1a;
  color:var(--text2);
}

.premium-strip strong{
  display:block;
  color:var(--violet2);
  margin-bottom:4px;
}

.premium-strip span{
  font-size:13px;
}

.colony-bonus-strip{
  margin-top:14px;
}

.buildings-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(290px,1fr));
  gap:16px;
}

.building-card{
  display:flex;
  flex-direction:column;
  overflow:hidden;
  min-height:100%;
  border:1px solid var(--border);
  border-radius:14px;
  background:linear-gradient(180deg,#180f2b,#10091d);
}

.highlight-card{
  border-color:#facc15;
  box-shadow:0 0 0 1px rgba(250,204,21,.45),0 0 34px rgba(250,204,21,.18);
}

.building-visual{
  position:relative;
  display:grid;
  place-items:center;
  height:190px;
  overflow:hidden;
  background:
    radial-gradient(circle at 50% 65%, rgba(124,58,237,.18), transparent 42%),
    linear-gradient(180deg,#10091d,#080511);
}

.building-visual:before{
  content:"";
  position:absolute;
  inset:auto 18px 24px;
  height:34px;
  border:1px solid rgba(167,139,250,.18);
  border-radius:50%;
  background:rgba(0,0,0,.24);
}

.building-visual-image{
  display:flex;
  align-items:center;
  justify-content:center;
  background:#080511;
}

.building-visual-image:before{
  display:none;
}

.building-art{
  width:100%;
  max-width:100%;
  height:auto;
  max-height:100%;
  object-fit:contain;
  display:block;
}

.building-core{
  position:relative;
  width:86px;
  height:104px;
  border:1px solid rgba(233,231,255,.28);
  border-radius:12px 12px 6px 6px;
  background:linear-gradient(160deg,#2b1d48,#4c1d95);
  box-shadow:0 0 28px rgba(124,58,237,.34);
  z-index:2;
}

.building-core:before,
.building-core:after{
  content:"";
  position:absolute;
  background:rgba(167,139,250,.34);
}

.building-core:before{
  left:14px;
  right:14px;
  top:18px;
  height:10px;
  border-radius:8px;
}

.building-core:after{
  left:24px;
  right:24px;
  bottom:16px;
  height:42px;
  border-radius:7px 7px 0 0;
}

.building-ring{
  position:absolute;
  width:128px;
  height:128px;
  border:1px solid rgba(167,139,250,.24);
  border-radius:50%;
  animation:slow-spin 18s linear infinite;
}

.building-ring:before,
.building-ring:after{
  content:"";
  position:absolute;
  width:12px;
  height:12px;
  border-radius:50%;
  background:var(--violet2);
  box-shadow:0 0 18px rgba(167,139,250,.8);
}

.building-ring:before{top:7px;left:58px}
.building-ring:after{bottom:7px;right:58px}

.building-tier{
  position:absolute;
  right:12px;
  bottom:12px;
  border:1px solid rgba(233,231,255,.22);
  border-radius:999px;
  padding:4px 8px;
  background:rgba(11,6,20,.72);
  color:var(--text2);
  font-size:12px;
}

.building-content{
  display:flex;
  flex:1;
  flex-direction:column;
  gap:14px;
  padding:18px;
}

.building-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}

.building-head h3{
  margin:0 0 8px;
  font-family:Orbitron;
  color:var(--text);
  font-size:16px;
  letter-spacing:1px;
}

.building-head p{
  margin:0;
  color:var(--text2);
  font-size:13px;
  line-height:1.45;
}

.level-pill{
  flex:0 0 auto;
  border:1px solid rgba(167,139,250,.24);
  border-radius:999px;
  padding:5px 8px;
  color:var(--violet2);
  font-size:12px;
}

.stat-list{
  flex:1;
  display:grid;
  gap:8px;
  color:var(--text2);
  font-size:13px;
  line-height:1.45;
}

.tier-2 .building-core{height:116px;background:linear-gradient(160deg,#293356,#5b21b6)}
.tier-3 .building-core{width:98px;height:124px;background:linear-gradient(160deg,#164e63,#7c3aed)}
.tier-4 .building-core{width:110px;height:132px;background:linear-gradient(160deg,#14532d,#6d28d9)}
.tier-5 .building-core{width:122px;height:140px;background:linear-gradient(160deg,#7c2d12,#7c3aed)}
.tier-6 .building-core{width:134px;height:148px;background:linear-gradient(160deg,#f8fafc,#7c3aed)}
.tier-4 .building-ring,
.tier-5 .building-ring,
.tier-6 .building-ring{width:154px;height:154px}

.category-energy .building-core{box-shadow:0 0 34px rgba(250,204,21,.35)}
.category-logistics .building-core{box-shadow:0 0 34px rgba(34,197,94,.25)}
.category-fleet .building-core{box-shadow:0 0 34px rgba(56,189,248,.26)}
.category-science .building-core{box-shadow:0 0 34px rgba(244,114,182,.28)}
.category-diplomacy .building-core{box-shadow:0 0 34px rgba(34,197,94,.28)}

.ship-visual{
  position:relative;
  display:grid;
  place-items:center;
  height:190px;
  overflow:hidden;
  background:
    radial-gradient(circle at 50% 55%, rgba(56,189,248,.16), transparent 38%),
    linear-gradient(180deg,#0b1020,#07040d);
}

.ship-visual:before{
  content:"";
  position:absolute;
  inset:28px;
  border:1px solid rgba(56,189,248,.16);
  border-radius:50%;
  transform:skewY(-10deg);
}

.ship-visual-image{
  align-items:center;
}

.ship-visual-image:before{
  display:none;
}

.ship-art{
  position:relative;
  z-index:2;
  display:block;
  width:100%;
  height:100%;
  object-fit:contain;
  object-position:center center;
  filter:drop-shadow(0 0 24px rgba(56,189,248,.24));
}

.ship-hull{
  position:relative;
  width:138px;
  height:42px;
  border:1px solid rgba(233,231,255,.34);
  border-radius:70% 18% 18% 70%;
  background:linear-gradient(135deg,#1e293b,#7c3aed);
  box-shadow:0 0 34px rgba(56,189,248,.22);
  transform:rotate(-8deg);
  z-index:2;
}

.ship-hull:before{
  content:"";
  position:absolute;
  left:42px;
  top:-18px;
  width:48px;
  height:22px;
  border:1px solid rgba(233,231,255,.22);
  border-radius:12px 12px 0 0;
  background:linear-gradient(135deg,#334155,#111827);
}

.ship-engine{
  position:absolute;
  width:46px;
  height:10px;
  border-radius:999px;
  background:linear-gradient(90deg,rgba(56,189,248,.9),transparent);
  filter:blur(.2px);
  transform:translate(78px,18px) rotate(-8deg);
  animation:engine-pulse 1.4s ease-in-out infinite;
}

.ship-logistics .ship-hull{
  width:150px;
  height:52px;
  background:linear-gradient(135deg,#164e63,#22c55e);
}

.ship-combat .ship-hull{
  width:158px;
  height:38px;
  border-radius:80% 12% 12% 80%;
  background:linear-gradient(135deg,#7f1d1d,#7c3aed);
}

.ship-form{
  display:grid;
  gap:10px;
}

.ship-form label{
  display:grid;
  gap:6px;
  color:var(--text2);
  font-size:12px;
}

.ship-colony .ship-hull{
  width:146px;
  height:58px;
  border-radius:58% 24% 24% 58%;
  background:linear-gradient(135deg,#475569,#f8fafc);
  box-shadow:0 0 36px rgba(250,204,21,.22);
}

.notice{
  margin-bottom:16px;
  border:1px solid rgba(167,139,250,.24);
  border-radius:10px;
  padding:12px 14px;
  background:#0e0a1a;
  color:var(--violet2);
}

.notice-warning{
  border-color:rgba(248,113,113,.55);
  background:rgba(127,29,29,.22);
  color:#fecaca;
}

.solar-map{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
  gap:16px;
}

.galaxy-tabs{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-bottom:16px;
}

.galaxy-tabs a{
  min-width:46px;
  border:1px solid rgba(167,139,250,.24);
  border-radius:8px;
  padding:9px 10px;
  background:#0e0a1a;
  color:var(--text2);
  text-align:center;
  text-decoration:none;
  font-family:Orbitron;
  font-size:12px;
}

.galaxy-tabs a.active,
.galaxy-tabs a:hover{
  border-color:var(--violet2);
  color:var(--text);
}

.galaxy-map{
  display:grid;
  gap:8px;
}

.galaxy-row{
  display:grid;
  grid-template-columns:1.1fr .7fr 1fr .7fr 1fr;
  gap:12px;
  align-items:center;
  min-height:54px;
  border:1px solid rgba(167,139,250,.18);
  border-radius:8px;
  padding:10px 12px;
  background:rgba(14,10,26,.72);
  color:var(--text2);
  font-size:13px;
}

.galaxy-head{
  min-height:0;
  background:transparent;
  color:var(--violet2);
  font-family:Orbitron;
  font-size:11px;
  letter-spacing:1px;
}

.galaxy-row strong{
  display:block;
  color:var(--text);
  margin-bottom:3px;
}

.galaxy-row small{
  color:var(--text2);
}

.home-system{
  border-color:rgba(34,197,94,.45);
  background:rgba(20,83,45,.22);
}

.active-system-row{
  border-color:rgba(250,204,21,.68);
  box-shadow:0 0 0 1px rgba(250,204,21,.22) inset,0 0 24px rgba(250,204,21,.12);
}

.occupied-system{
  border-color:rgba(244,114,182,.26);
}

.npc-system{
  border-color:rgba(250,204,21,.34);
  background:rgba(113,63,18,.2);
}

.free-system{
  border-color:rgba(56,189,248,.18);
}

.galaxy-actions{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
}

.galaxy-actions form{
  margin:0;
  display:grid;
  gap:4px;
}

.galaxy-actions small{
  color:var(--text2);
  font-size:10px;
  line-height:1.25;
}

.galaxy-actions .btn{
  width:auto;
  padding:8px 9px;
  font-size:10px;
}

.scroll-top-btn{
  position:fixed;
  right:clamp(14px, 3vw, 28px);
  bottom:clamp(14px, 3vw, 28px);
  z-index:20;
  display:grid;
  place-items:center;
  width:46px;
  height:46px;
  border:1px solid rgba(167,139,250,.34);
  border-radius:50%;
  background:rgba(14,10,26,.9);
  color:var(--violet2);
  font-family:Orbitron, sans-serif;
  font-size:20px;
  box-shadow:0 12px 34px rgba(0,0,0,.38),0 0 20px rgba(124,58,237,.16);
  cursor:pointer;
  opacity:0;
  pointer-events:none;
  transform:translateY(8px);
  transition:opacity .18s ease, transform .18s ease, border-color .18s ease, color .18s ease;
}

.scroll-top-btn.visible{
  opacity:1;
  pointer-events:auto;
  transform:translateY(0);
}

.scroll-top-btn:hover{
  border-color:var(--violet2);
  color:var(--text);
}

@media (max-width: 640px){
  .scroll-top-btn{
    width:42px;
    height:42px;
    font-size:18px;
  }
}

.body-card{
  display:flex;
  flex-direction:column;
  overflow:hidden;
  border:1px solid var(--border);
  border-radius:14px;
  background:linear-gradient(180deg,#140c24,#0d0818);
}

.body-visual{
  position:relative;
  display:grid;
  place-items:center;
  height:180px;
  overflow:hidden;
  background:
    radial-gradient(circle at 50% 50%, rgba(167,139,250,.12), transparent 36%),
    linear-gradient(180deg,#080511,#0f172a);
}

.body-art{
  position:relative;
  z-index:2;
  display:block;
  width:100%;
  height:100%;
  object-fit:contain;
  object-position:center center;
  filter:drop-shadow(0 0 24px rgba(167,139,250,.22));
}

.orbit-0 .body-visual{background:radial-gradient(circle,rgba(250,204,21,.18),transparent 48%),#080511}

.mission-strip{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  margin-bottom:16px;
}

.mission-visual{
  position:relative;
  display:grid;
  place-items:center;
  height:180px;
  overflow:hidden;
  background:
    radial-gradient(circle at 50% 54%, rgba(244,114,182,.14), transparent 38%),
    linear-gradient(180deg,#120817,#07040d);
}

.mission-visual:before{
  content:"";
  position:absolute;
  width:210px;
  height:82px;
  border:1px solid rgba(244,114,182,.2);
  border-radius:50%;
  transform:rotate(12deg);
}

.mission-visual-image:before{
  display:none;
}

.mission-art{
  position:relative;
  z-index:2;
  display:block;
  width:100%;
  height:100%;
  object-fit:contain;
  object-position:center center;
  filter:drop-shadow(0 0 24px rgba(244,114,182,.22));
}

.station-core{
  position:relative;
  width:96px;
  height:96px;
  border:1px solid rgba(233,231,255,.28);
  border-radius:18px;
  background:linear-gradient(135deg,#1f2937,#7f1d1d);
  box-shadow:0 0 38px rgba(244,114,182,.22);
  transform:rotate(45deg);
  z-index:2;
}

.station-core:before,
.station-core:after{
  content:"";
  position:absolute;
  background:rgba(167,139,250,.32);
}

.station-core:before{
  left:-36px;
  right:-36px;
  top:42px;
  height:10px;
}

.station-core:after{
  top:-36px;
  bottom:-36px;
  left:42px;
  width:10px;
}

.target-debris .station-core{
  border-radius:50% 18px 50% 18px;
  background:linear-gradient(135deg,#334155,#64748b);
  box-shadow:0 0 34px rgba(148,163,184,.22);
}

.report-panel{
  margin-top:18px;
}

.report-entry{
  border-top:1px solid var(--border);
  padding:12px 0;
  color:var(--text2);
  line-height:1.5;
}

.alliance-layout{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(280px,1fr));
  gap:16px;
}

.alliance-panel{
  border:1px solid rgba(167,139,250,.22);
  border-radius:8px;
  padding:18px;
  background:rgba(14,10,26,.72);
}

.alliance-panel h3{
  margin:0 0 10px;
  font-family:Orbitron;
  font-size:16px;
  letter-spacing:1px;
}

.alliance-form{
  display:grid;
  gap:14px;
}

.alliance-form label{
  display:grid;
  gap:6px;
  color:var(--text2);
  font-size:12px;
}

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

.alliance-member{
  display:grid;
  grid-template-columns:1fr auto;
  gap:4px 10px;
  border-top:1px solid rgba(167,139,250,.18);
  padding-top:10px;
}

.alliance-member strong{
  color:var(--text);
}

.alliance-member span{
  color:var(--violet2);
  font-size:12px;
}

.alliance-member small{
  grid-column:1 / -1;
  color:var(--text2);
}

.alliance-member form{
  grid-column:1 / -1;
}

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

.alliance-actions .btn,
.alliance-member .btn{
  width:auto;
  padding:8px 10px;
  font-size:10px;
}

.alliance-chat-panel,
.chat-page-panel{
  grid-column:1 / -1;
}

.chat-log{
  display:grid;
  gap:10px;
  max-height:420px;
  overflow:auto;
  border:1px solid rgba(167,139,250,.14);
  border-radius:8px;
  padding:12px;
  background:rgba(11,6,20,.42);
}

.chat-message{
  border-bottom:1px solid rgba(167,139,250,.12);
  padding-bottom:8px;
}

.chat-message:last-child{
  border-bottom:none;
}

.chat-message strong{
  color:var(--text);
  margin-right:8px;
}

.chat-message span{
  color:var(--text2);
  font-size:11px;
}

.chat-message p{
  margin:6px 0 0;
  color:var(--text2);
  line-height:1.45;
}

.chat-form{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:10px;
  margin-top:12px;
}

.chat-form .btn{
  width:auto;
  margin-top:0;
}

.muted{
  color:var(--text2);
}

@keyframes engine-pulse{
  50%{opacity:.42;transform:translate(88px,18px) rotate(-8deg) scaleX(1.25)}
}

@keyframes slow-spin{
  to{transform:rotate(360deg)}
}

@media (max-width:700px){
  .section-title{
    flex-direction:column;
  }

  .active-chip{
    width:100%;
  }

  .premium-strip{
    align-items:flex-start;
    flex-direction:column;
  }

  .galaxy-head{
    display:none;
  }

  .galaxy-row{
    grid-template-columns:1fr;
    gap:8px;
  }

  .chat-form{
    grid-template-columns:1fr;
  }
}
