/* =========================================================================
   Syndikat (Etappe 8)
   ========================================================================= */
.rail-count[hidden] { display: none !important; }

.gd-dim { color: var(--text-dim); font-size: .86rem; line-height: 1.5; }
.gd-h { font-family: var(--font-display); color: var(--text-bright); font-size: 1.25rem; letter-spacing: .5px; margin: 26px 0 12px; }
.gd-foot { margin-top: 18px; font-size: .8rem; color: var(--text-dim); text-align: center; }
.gd-row-btn { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 14px; }
.gd-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; align-items: start; }
.gd-grid > .panel { margin: 0; }
.gd-wide { grid-column: 1 / -1; }
.gd-tag { display: inline-flex; align-items: center; gap: 4px; font-size: .7rem; padding: 3px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--text-dim); letter-spacing: .4px; text-transform: uppercase; font-weight: 600; }
.gd-tag.on { color: var(--green); border-color: rgba(52,224,127,.4); background: rgba(52,224,127,.08); }
.gd-tag.off { color: var(--text-dim); }
.gd-x { background: none; border: 0; color: var(--text-dim); cursor: pointer; font-size: .9rem; padding: 2px 6px; border-radius: 6px; margin-left: auto; }
.gd-x:hover { color: var(--red); background: rgba(255,77,106,.1); }
.btn.violet-btn { border-color: rgba(168,85,247,.55); color: #d9b8ff; background: rgba(168,85,247,.12); }
.btn.violet-btn:hover { background: rgba(168,85,247,.22); }

.gd-ava { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex-shrink: 0; border: 1px solid var(--line-strong); }
.gd-ava-f { display: inline-flex; align-items: center; justify-content: center; background: linear-gradient(135deg, rgba(47,224,228,.25), rgba(168,85,247,.25)); color: var(--text-bright); font-family: var(--font-display); font-weight: 700; }

/* ---- Emblem ---- */
.gd-emblem {
  --gc: var(--cyan);
  width: 86px; height: 96px; flex-shrink: 0; position: relative;
  clip-path: polygon(50% 0, 100% 22%, 100% 70%, 50% 100%, 0 70%, 0 22%);
  background: linear-gradient(160deg, color-mix(in srgb, var(--gc) 70%, #fff 10%), color-mix(in srgb, var(--gc) 30%, #05070d));
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 30px color-mix(in srgb, var(--gc) 40%, transparent);
}
.gd-emblem::after { content: ''; position: absolute; inset: 4px; clip-path: inherit; background: linear-gradient(180deg, rgba(5,7,13,.25), rgba(5,7,13,.75)); }
.gd-emblem span { position: relative; z-index: 1; font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; letter-spacing: 1.5px; color: #fff; text-shadow: 0 0 12px var(--gc); }
.gd-emblem.big { clip-path: none; background: none; box-shadow: none; font-size: 3.2rem; width: auto; height: auto; }
.gd-emblem.big::after { display: none; }

/* ---- Banner ---- */
.gd-banner {
  --gc: var(--cyan);
  display: flex; gap: 22px; align-items: center; padding: 22px 24px; margin-bottom: 14px;
  border: 1px solid color-mix(in srgb, var(--gc) 40%, transparent); border-radius: var(--radius);
  background:
    radial-gradient(ellipse at 0% 0%, color-mix(in srgb, var(--gc) 22%, transparent), transparent 60%),
    linear-gradient(120deg, rgba(15,20,33,.92), rgba(8,11,20,.92));
  position: relative; overflow: hidden;
}
.gd-banner::before { content: ''; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; border: 1px dashed color-mix(in srgb, var(--gc) 30%, transparent); opacity: .6; }
.gd-b-main { flex: 1; min-width: 0; }
.gd-b-kicker { font-size: .72rem; letter-spacing: 2px; text-transform: uppercase; color: var(--text-dim); }
.gd-banner h2 { font-family: var(--font-display); font-size: 2rem; color: var(--text-bright); letter-spacing: 1px; line-height: 1.1; margin: 2px 0 4px; }
.gd-motto { color: var(--text-dim); font-style: italic; font-size: .9rem; margin: 2px 0 6px; }
.gd-b-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; font-size: .8rem; color: var(--text-dim); }
.gd-b-chips > span { padding: 4px 10px; border-radius: 999px; background: rgba(5,7,13,.55); border: 1px solid var(--line); }
.gd-role.r-Leader { color: var(--gold) !important; border-color: rgba(245,166,35,.45) !important; }
.gd-role.r-Officer { color: var(--cyan) !important; }
.gd-b-stats { display: grid; grid-template-columns: repeat(3, auto); gap: 6px 22px; text-align: right; position: relative; z-index: 1; }
.gd-b-stats small { display: block; font-size: .68rem; letter-spacing: 1.5px; text-transform: uppercase; color: var(--text-dim); }
.gd-b-stats b { font-family: var(--font-display); font-size: 1.35rem; color: var(--text-bright); }
.gd-alert { margin-bottom: 14px; }

.gd-tabs { margin-top: 4px; }
.gd-pane { animation: gdIn .25s var(--ease); }
@keyframes gdIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---- Lobby ---- */
.gd-lobby-hero { display: flex; gap: 22px; align-items: center; background: radial-gradient(ellipse at 10% 20%, rgba(168,85,247,.16), transparent 55%), var(--bg-panel); }
.gd-lobby-hero h2 { font-family: var(--font-display); font-size: 1.7rem; color: var(--text-bright); }
.gd-lobby-hero p { color: var(--text-dim); margin: 6px 0 12px; max-width: 70ch; }
.gd-perks { display: flex; flex-wrap: wrap; gap: 8px; }
.gd-perks span { font-size: .8rem; padding: 5px 11px; border-radius: 999px; background: rgba(47,224,228,.07); border: 1px solid rgba(47,224,228,.25); color: var(--text); }
.gd-glist { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.gd-gcard {
  --gc: var(--cyan);
  position: relative; padding: 16px 16px 14px; border-radius: var(--radius);
  background: linear-gradient(160deg, color-mix(in srgb, var(--gc) 12%, rgba(15,20,33,.9)), rgba(8,11,20,.9));
  border: 1px solid color-mix(in srgb, var(--gc) 30%, transparent);
  display: flex; flex-direction: column; gap: 6px;
  transition: transform .2s var(--ease), border-color .2s;
}
.gd-gcard:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--gc) 60%, transparent); }
.gd-gc-top { display: flex; align-items: center; gap: 8px; }
.gd-rank { font-family: var(--font-display); color: var(--text-dim); font-weight: 700; }
.gd-gtag { font-family: var(--font-display); font-weight: 700; color: var(--gc); letter-spacing: 1px; }
.gd-gcard h3 { font-family: var(--font-display); font-size: 1.3rem; color: var(--text-bright); }
.gd-gc-stats { display: flex; gap: 12px; flex-wrap: wrap; font-size: .82rem; color: var(--text-dim); }
.gd-gc-act { margin-top: auto; padding-top: 8px; }
.gd-gc-act .btn { width: 100%; }
.gd-note { font-size: .78rem; color: var(--gold); }
.gd-create { margin-top: 22px; }
.gd-form { display: grid; grid-template-columns: 140px 1fr; gap: 12px; margin: 12px 0 14px; }
.gd-form label, .gd-lbl { display: flex; flex-direction: column; gap: 6px; font-size: .8rem; color: var(--text-dim); letter-spacing: .5px; }
.gd-form small, .gd-lbl small { color: var(--text-dim); opacity: .7; font-size: .72rem; }
.gd-invites { margin-bottom: 16px; }
.gd-inv { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.gd-inv:last-child { border-bottom: 0; }
.gd-inv-t { flex: 1; min-width: 180px; display: flex; flex-direction: column; gap: 2px; }
.gd-inv-t b { color: var(--text-bright); }
.gd-inv-t small { color: var(--text-dim); font-size: .78rem; }
.gd-inv-t em { color: var(--text); font-size: .84rem; }
.gd-inv-a { display: flex; gap: 8px; }

/* ---- Hauptquartier ---- */
.gd-buffs { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.gd-buffs li { display: flex; gap: 10px; align-items: flex-start; font-size: .88rem; padding: 8px 10px; border-radius: 8px; background: rgba(52,224,127,.06); border: 1px solid rgba(52,224,127,.2); }
.gd-buffs li.off { background: rgba(125,138,163,.06); border-color: var(--line); color: var(--text-dim); }
.gd-buffs li span { flex-shrink: 0; }
.gd-post-h { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.gd-post-h .gd-ava { width: 28px; height: 28px; font-size: .8rem; }
.gd-post-h b { color: var(--text-bright); }
.gd-post-h small { color: var(--text-dim); font-size: .75rem; }
.gd-post-b { line-height: 1.55; font-size: .92rem; overflow-wrap: anywhere; }
.panel.gd-post { margin-bottom: 12px; }
.gd-post.pinned { border-color: rgba(245,166,35,.45); background: linear-gradient(160deg, rgba(245,166,35,.08), var(--bg-panel)); }
.gd-pin .gd-post.pinned { padding: 12px; border-radius: 8px; border: 1px solid rgba(245,166,35,.35); }
.gd-compose textarea { width: 100%; resize: vertical; min-height: 80px; font: inherit; }
.gd-check { display: inline-flex; gap: 6px; align-items: center; font-size: .85rem; color: var(--text-dim); cursor: pointer; }

/* ---- Kasse & Depot ---- */
.gd-amt { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.gd-quick { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.gd-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-top: 10px; }
.gd-item {
  --rc: var(--text-dim);
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; gap: 0 8px; align-items: center; text-align: left;
  padding: 9px 11px; border-radius: 9px; cursor: pointer; font: inherit; color: var(--text);
  background: linear-gradient(135deg, color-mix(in srgb, var(--rc) 12%, transparent), rgba(5,7,13,.6));
  border: 1px solid color-mix(in srgb, var(--rc) 35%, transparent);
  transition: transform .15s var(--ease), border-color .15s;
}
.gd-item:hover { transform: translateY(-2px); border-color: var(--rc); }
.gd-i-e { grid-row: span 2; font-size: 1.2rem; }
.gd-i-n { font-size: .82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gd-i-a { font-family: var(--font-display); font-weight: 700; color: var(--rc); font-size: 1rem; }

/* ---- Forschung ---- */
.gd-research { max-width: 780px; }
.gd-research.done { border-color: rgba(52,224,127,.45); }
.gd-r-head { display: flex; gap: 16px; align-items: center; margin-bottom: 16px; }
.gd-r-ico { font-size: 2.6rem; width: 72px; height: 72px; display: flex; align-items: center; justify-content: center; border-radius: 16px; background: radial-gradient(circle, rgba(168,85,247,.3), rgba(168,85,247,.05)); border: 1px solid rgba(168,85,247,.4); flex-shrink: 0; }
.gd-r-head h3 { font-family: var(--font-display); font-size: 1.5rem; color: var(--text-bright); }
.gd-r-head p { color: var(--text-dim); font-size: .9rem; }
.gd-res-row { margin-bottom: 10px; }
.gd-res-row small { display: block; margin-top: 3px; font-size: .75rem; }

/* ---- Raumstation ---- */
.gd-mods { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.gd-mod { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.gd-mod.ready { border-color: rgba(52,224,127,.5); box-shadow: 0 0 22px rgba(52,224,127,.12); }
.gd-mod.maxed { border-color: rgba(245,166,35,.35); }
.gd-mod-h { display: flex; gap: 12px; align-items: center; }
.gd-mod-ico { font-size: 1.9rem; width: 54px; height: 54px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: rgba(47,224,228,.08); border: 1px solid rgba(47,224,228,.3); flex-shrink: 0; }
.gd-mod h3 { font-family: var(--font-display); font-size: 1.2rem; color: var(--text-bright); }
.gd-pips { display: flex; align-items: center; gap: 4px; }
.gd-pips i { width: 16px; height: 6px; border-radius: 3px; background: rgba(125,138,163,.25); }
.gd-pips i.on { background: var(--cyan); box-shadow: 0 0 8px rgba(47,224,228,.6); }
.gd-pips span { font-size: .75rem; color: var(--text-dim); margin-left: 6px; }
.gd-effect { font-size: .82rem; padding: 7px 10px; border-radius: 8px; background: rgba(47,224,228,.06); border: 1px solid rgba(47,224,228,.2); }
.gd-cost .kv { font-size: .84rem; }
.gd-cost .kv.no span:last-child { color: var(--red); }
.gd-cost .kv.ok span:last-child { color: var(--green); }
.gd-mod .btn { margin-top: auto; }

/* ---- Krieg ---- */
.gd-war-head { margin-bottom: 16px; }
.gd-fleet { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.gd-fleet span { font-size: .8rem; padding: 4px 10px; border-radius: 999px; background: rgba(255,77,106,.08); border: 1px solid rgba(255,77,106,.3); }
.gd-planets { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.gd-planet { margin: 0; transition: opacity .2s; }
.gd-planet.target { border-color: rgba(255,77,106,.55); box-shadow: 0 0 26px rgba(255,77,106,.14); }
.gd-planet.dim { opacity: .6; }
.gd-pl-h { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.gd-pl-ico { font-size: 2rem; }
.gd-pl-h h3 { font-family: var(--font-display); font-size: 1.15rem; color: var(--text-bright); }
.gd-pl-h small { color: var(--text-dim); font-size: .78rem; }

/* ---- Personal ---- */
.gd-members { display: flex; flex-direction: column; }
.gd-mem { display: grid; grid-template-columns: auto 1fr auto auto; gap: 12px; align-items: center; padding: 10px 4px; border-bottom: 1px solid var(--line); }
.gd-mem:last-child { border-bottom: 0; }
.gd-mem.me { background: linear-gradient(90deg, rgba(47,224,228,.06), transparent); }
.gd-mem-t { display: flex; flex-direction: column; min-width: 0; }
.gd-mem-t b { color: var(--text-bright); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gd-mem-t small { color: var(--text-dim); font-size: .76rem; }
.gd-mem-s { display: flex; gap: 12px; font-size: .8rem; color: var(--text-dim); }
.gd-invite-row { display: flex; gap: 8px; margin: 10px 0 6px; }
.gd-invite-row .input { flex: 1; min-width: 0; }
.gd-sent { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.gd-sent .chip { display: inline-flex; align-items: center; gap: 4px; }
.gd-mm-h { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.gd-mm-h .gd-ava { width: 48px; height: 48px; font-size: 1.2rem; }
.gd-mm-h small { color: var(--text-dim); }
.gd-menu { display: flex; flex-direction: column; gap: 8px; }
.gd-menu button { text-align: left; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); background: rgba(5,7,13,.5); color: var(--text); cursor: pointer; font: inherit; display: flex; flex-direction: column; gap: 3px; }
.gd-menu button:hover { border-color: var(--line-strong); background: rgba(47,224,228,.05); }
.gd-menu small { color: var(--text-dim); font-size: .78rem; }

/* ---- Einstellungen ---- */
.gd-switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; }
.gd-switch input { appearance: none; width: 44px; height: 24px; border-radius: 12px; background: rgba(125,138,163,.3); position: relative; cursor: pointer; transition: background .2s; flex-shrink: 0; }
.gd-switch input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .2s var(--ease); }
.gd-switch input:checked { background: var(--green); }
.gd-switch input:checked::after { transform: translateX(20px); }
.gd-switch span { display: none; }
.gd-colors { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.gd-color { width: 34px; height: 34px; border-radius: 50%; border: 2px solid transparent; background: var(--c); cursor: pointer; box-shadow: 0 0 0 2px rgba(5,7,13,.8) inset; }
.gd-color.on { border-color: #fff; box-shadow: 0 0 14px var(--c); }
.gd-cmds { display: grid; gap: 6px; }
.gd-cmds div { display: flex; justify-content: space-between; gap: 10px; font-size: .84rem; }
.gd-cmds span { color: var(--text-dim); }

/* ---- Mobil ---- */
@media (max-width: 760px) {
  .gd-banner { flex-wrap: wrap; padding: 18px; gap: 14px; }
  .gd-emblem { width: 64px; height: 72px; }
  .gd-emblem span { font-size: 1.05rem; }
  .gd-banner h2 { font-size: 1.5rem; }
  .gd-b-stats { width: 100%; grid-template-columns: repeat(3, 1fr); text-align: left; }
  .gd-b-stats b { font-size: 1.1rem; }
  .gd-grid { grid-template-columns: 1fr; }
  .gd-lobby-hero { flex-direction: column; text-align: center; }
  .gd-perks { justify-content: center; }
  .gd-form { grid-template-columns: 1fr; }
  .gd-mem { grid-template-columns: auto 1fr auto; }
  .gd-mem-s { grid-column: 2 / 3; grid-row: 2; }
  .gd-items { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
}
.gd-row-btn .btn { width: auto; flex: 0 1 auto; }
.gd-invite-row .btn { width: auto; flex: 0 0 auto; }
@media (max-width: 480px) { .gd-invite-row { flex-direction: column; } .gd-invite-row .btn { width: 100%; } }

/* =========================================================================
   Sektor-Angriff (Karte)
   ========================================================================= */
.ms-attack { width: 100%; margin-top: 12px; }
.bt { position: relative; overflow: hidden; text-align: center; padding: 6px 4px 0; }
.bt-sky { position: absolute; inset: -20px; pointer-events: none; }
.bt-sky i { position: absolute; top: 50%; left: 50%; width: 2px; height: 2px; background: #fff; border-radius: 1px; opacity: 0; animation: btWarp 1.1s linear infinite; }
.bt-sky i:nth-child(1) { --dx: -260px; --dy: -120px; animation-delay: 0s; }
.bt-sky i:nth-child(2) { --dx: 240px; --dy: -140px; animation-delay: .15s; }
.bt-sky i:nth-child(3) { --dx: -220px; --dy: 150px; animation-delay: .3s; }
.bt-sky i:nth-child(4) { --dx: 260px; --dy: 120px; animation-delay: .45s; }
.bt-sky i:nth-child(5) { --dx: 0px; --dy: -200px; animation-delay: .6s; }
.bt-sky i:nth-child(6) { --dx: 0px; --dy: 200px; animation-delay: .75s; }
.bt-sky i:nth-child(7) { --dx: -300px; --dy: 10px; animation-delay: .9s; }
.bt-sky i:nth-child(8) { --dx: 300px; --dy: -10px; animation-delay: .2s; }
@keyframes btWarp { 0% { opacity: 0; transform: translate(0, 0) scaleX(1); } 20% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scaleX(8); } }
.bt.fight .bt-sky, .bt.win .bt-sky, .bt.lose .bt-sky { display: none; }
.bt-kick { font-size: .72rem; letter-spacing: 2px; text-transform: uppercase; color: var(--text-dim); position: relative; }
.bt-title { font-family: var(--font-display); font-size: 1.6rem; color: var(--text-bright); margin: 4px 0 16px; position: relative; }
.bt-field { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; position: relative; }
.bt-side { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.bt-side b { font-family: var(--font-display); letter-spacing: 1px; }
.bt-side.a b { color: var(--cyan); }
.bt-side.d b { color: var(--red); }
.bt-ship { font-size: 2.6rem; transition: transform .4s var(--ease); }
.bt-side.a .bt-ship { transform: rotate(45deg); }
.bt.fight .bt-side.a .bt-ship { animation: btShake .18s linear infinite; }
.bt.fight .bt-side.d .bt-ship { animation: btShake .22s linear infinite reverse; }
@keyframes btShake { 0%, 100% { translate: 0 0; } 25% { translate: 2px -1px; } 75% { translate: -2px 1px; } }
.bt-pow { font-family: var(--font-display); font-size: 1.4rem; font-weight: 700; color: var(--text-bright); font-variant-numeric: tabular-nums; }
.bt-vs { position: relative; font-size: 1.6rem; width: 80px; height: 40px; display: flex; align-items: center; justify-content: center; }
.bt-laser { position: absolute; top: 50%; height: 3px; width: 0; border-radius: 2px; opacity: 0; }
.bt-laser.l1 { left: -40px; background: linear-gradient(90deg, transparent, var(--cyan)); box-shadow: 0 0 10px var(--cyan); }
.bt-laser.l2 { right: -40px; background: linear-gradient(270deg, transparent, var(--red)); box-shadow: 0 0 10px var(--red); margin-top: 8px; }
.bt.fight .bt-laser { animation: btLaser .35s linear infinite; }
.bt.fight .bt-laser.l2 { animation-delay: .17s; }
@keyframes btLaser { 0% { width: 0; opacity: 1; } 100% { width: 90px; opacity: 0; } }
.bt-bar { height: 10px; border-radius: 5px; background: rgba(255,77,106,.35); margin: 18px 0 12px; overflow: hidden; position: relative; }
.bt-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--cyan), #7ff7fa); box-shadow: 0 0 12px rgba(47,224,228,.6); transition: width 1.2s var(--ease); }
.bt-result { min-height: 3em; font-size: .92rem; line-height: 1.5; color: var(--text); }
.bt.win .bt-title { color: var(--green); text-shadow: 0 0 18px rgba(52,224,127,.5); }
.bt.lose .bt-title { color: var(--red); }
.bt.win .bt-side.d .bt-ship { transform: scale(.6) rotate(-20deg); opacity: .4; }
.bt.lose .bt-side.a .bt-ship { transform: rotate(225deg) scale(.7); opacity: .4; }
