/* Digi Space — dark embeddable UI */
*,
*::before,
*::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: #05070e;
  color: #e8e4dc;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  min-height: 100%;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 12px;
}

.game-shell {
  position: relative;
  width: 420px;
  max-width: 100%;
  aspect-ratio: 420 / 720;
  background: #05070e;
  border: 1px solid #2a3140;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0,0,0,.55);
}

#game {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: crosshair;
}

.screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 20px;
  text-align: center;
  background: linear-gradient(180deg, rgba(5,7,14,.55) 0%, rgba(5,7,14,.82) 100%);
  pointer-events: auto;
  z-index: 5;
}

.screen.hidden,
.hud.hidden,
#load-status.hidden { display: none !important; }

.eyebrow {
  font-size: .7rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #9aa0ad;
  margin: 0 0 8px;
}

h1 {
  margin: 0 0 6px;
  font-size: 2rem;
  letter-spacing: .06em;
  color: #f2e8d5;
  text-shadow: 0 0 24px rgba(201,164,106,.35);
}

.subtitle {
  margin: 0 0 28px;
  color: #9aa0ad;
  font-size: .9rem;
}

.btn {
  appearance: none;
  border: 1px solid #3a4558;
  background: #151b2a;
  color: #e8e4dc;
  font: inherit;
  font-weight: 600;
  padding: 12px 28px;
  border-radius: 10px;
  cursor: pointer;
  transition: border-color .15s, background .15s, transform .1s;
}

.btn:hover { border-color: #c9a46a; background: #1c2436; }
.btn:active { transform: scale(.98); }
.btn-primary {
  border-color: #c9a46a;
  background: linear-gradient(180deg, #2a2418, #1a1610);
  color: #f5e6c8;
}

.ship-grid {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin: 8px 0 22px;
}

.ship-card {
  width: 110px;
  padding: 10px 8px 12px;
  border: 1px solid #2a3140;
  border-radius: 12px;
  background: #0e1320;
  cursor: pointer;
  color: inherit;
  font: inherit;
  transition: border-color .15s, box-shadow .15s;
}

.ship-card:hover { border-color: #4a5568; }
.ship-card.selected {
  border-color: #c9a46a;
  box-shadow: 0 0 0 1px rgba(201,164,106,.35);
}

.ship-card img {
  display: block;
  width: 72px;
  height: auto;
  margin: 0 auto 8px;
  image-rendering: auto;
}

.ship-card .name { font-weight: 700; font-size: .85rem; color: #e8e4dc; }
.ship-card .meta { display: block; margin-top: 4px; font-size: .68rem; color: #e8e4dc; }
.ship-card .status { display: block; margin-top: 4px; font-size: .68rem; font-weight: 700; letter-spacing: .04em; color: #ff5c5c; }
.ship-card .status[hidden] { display: none !important; }

.hint {
  margin: 16px 0 0;
  font-size: .72rem;
  color: #7a8294;
  line-height: 1.4;
}

.hud {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 10px 14px;
  pointer-events: none;
  z-index: 4;
  font-weight: 700;
  letter-spacing: .04em;
  text-shadow: 0 1px 4px rgba(0,0,0,.8);
}

.hud .label { font-size: .65rem; color: #9aa0ad; display: block; font-weight: 600; }
.hud .value { font-size: 1.05rem; color: #f2e8d5; }

.go-stats {
  margin: 8px 0 22px;
  font-size: 1rem;
  line-height: 1.7;
}
.go-stats strong { color: #c9a46a; }

#load-status {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  background: #05070e;
  font-size: .9rem;
  color: #9aa0ad;
}
#load-status.error { color: #ffb4a8; padding: 20px; text-align: center; }

/* Phase 12 — attempts / grace */
.hud-sub { font-size: 0.65rem; margin-top: 2px; color: #9aa0ad; letter-spacing: 0.04em; }
.grace-overlay {
  position: absolute; inset: 0; z-index: 40;
  display: flex; align-items: center; justify-content: center;
  background: rgba(5, 7, 14, 0.82); padding: 16px;
}
.grace-overlay.hidden { display: none; }
/* Pause uses same .grace-overlay styles (#pause-overlay) */
.grace-card {
  background: #0e1320; border: 1px solid #2a3140; border-radius: 12px;
  padding: 20px 18px; max-width: 320px; text-align: center; color: #e8e4dc;
}
.grace-card h2 { margin: 4px 0 10px; font-size: 1.15rem; color: #c9a46a; }
.grace-actions { display: flex; flex-direction: column; gap: 8px; margin: 14px 0 8px; }
.grace-actions .btn { width: 100%; }
#attempts-msg:not(.hidden) { color: #d9898a; margin-bottom: 8px; }
#attempts-msg .quota-refresh-eta { color: #7dffa0; font-weight: 600; }

/* Phase 14 — round HUD */
.hud-center .value { font-size: 1.25rem; color: #7df0ff; }
#hud-stage { color: #c9a46a; font-weight: 700; letter-spacing: 0.06em; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* Phase 16 — Digi voucher UI */
.voucher-box {
  margin: 12px 0 8px;
  padding: 10px 12px;
  border: 1px solid #2a3140;
  border-radius: 10px;
  background: rgba(14, 19, 32, 0.85);
  width: min(340px, 92%);
  text-align: left;
}
.voucher-title {
  margin: 0 0 8px;
  font-size: .78rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #c9a46a;
  font-weight: 700;
}
.voucher-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.voucher-row input {
  flex: 1;
  min-width: 0;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #3a4558;
  background: #0a0e18;
  color: #e8e4dc;
  font-size: .85rem;
  font-family: ui-monospace, monospace;
}
.voucher-row input:focus {
  outline: 1px solid #7df0ff;
  border-color: #7df0ff;
}
.voucher-row .btn { padding: 8px 12px; font-size: .75rem; margin: 0; }
.ship-card.locked { opacity: 0.72; }
/* Phase 25B: meta/name stay white; only .status is red when locked */
.ship-card.locked .meta,
.ship-card.digi-ready .meta,
.ship-card.digi-empty .meta { color: #e8e4dc; }
.ship-card.locked .name,
.ship-card.digi-empty .name { color: #e8e4dc; }
.dim-note { opacity: 0.7; font-size: .68rem !important; margin-top: 6px; }
#select-digi-line { margin-top: 2px; }
#voucher-msg.ok { color: #7dffa0; }
#voucher-msg.err { color: #ffb4a8; }

/* Phase 18 — auth UI */
.auth-box {
  margin: 4px 0 12px;
  padding: 10px 12px;
  border: 1px solid #2a3140;
  border-radius: 10px;
  background: rgba(14, 19, 32, 0.85);
  width: min(340px, 92%);
  text-align: left;
}
.auth-row {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}
.auth-fields {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}
.auth-fields input,
.auth-row input {
  width: 100%;
  box-sizing: border-box;
  min-width: 0;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #3a4558;
  background: #0a0e18;
  color: #e8e4dc;
  font-size: .8rem;
}
.auth-fields input:focus,
.auth-row input:focus {
  outline: 1px solid #7df0ff;
  border-color: #7df0ff;
}
.auth-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.auth-actions-logout {
  margin-top: 8px;
}
.auth-actions .btn {
  padding: 8px 12px;
  font-size: .72rem;
  margin: 0;
}
#auth-msg.ok { color: #7dffa0; }
#auth-msg.err { color: #ffb4a8; }
#auth-user-line { margin: 0 0 8px; color: #c9a46a; }

/* Phase 23 — public HIGH SCORE screen */
.menu-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
  width: min(220px, 80%);
  margin-top: 4px;
}
.menu-actions .btn { width: 100%; margin: 0; }

#screen-highscore {
  justify-content: flex-start;
  padding-top: 18px;
  padding-bottom: 16px;
  overflow: hidden;
}
.hs-toggle {
  display: flex;
  gap: 6px;
  margin: 4px 0 2px;
}
.hs-tab {
  padding: 7px 12px;
  font-size: .72rem;
  margin: 0;
  border-radius: 8px;
  opacity: 0.75;
}
.hs-tab.active {
  opacity: 1;
  border-color: #c9a46a;
  background: linear-gradient(180deg, #2a2418, #1a1610);
  color: #f5e6c8;
}
.hs-personal {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 6px 0 8px;
  padding: 8px 10px;
  width: min(340px, 94%);
  border: 1px solid #2a3140;
  border-radius: 8px;
  background: rgba(14, 19, 32, 0.9);
  font-size: .78rem;
  color: #c8cdd8;
  text-align: left;
}
.hs-personal strong { color: #c9a46a; }
.hs-table-wrap {
  width: min(300px, 94%);
  max-height: 46%;
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid #2a3140;
  border-radius: 10px;
  background: rgba(8, 11, 18, 0.92);
  scrollbar-width: none; /* Firefox — no scroll frame */
  -ms-overflow-style: none; /* IE/old Edge */
}
.hs-table-wrap::-webkit-scrollbar { width: 0; height: 0; display: none; }
.hs-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: .74rem;
}
.hs-table th,
.hs-table td {
  padding: 5px 4px;
  border-bottom: 1px solid #1e2533;
  text-align: left;
  vertical-align: middle;
}
.hs-table th {
  position: sticky;
  top: 0;
  background: #0e1320;
  color: #c9a46a;
  font-size: .62rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  z-index: 1;
}
.hs-table th:nth-child(2),
.hs-table td:nth-child(2) { width: 2.4rem; text-align: center; padding-left: 2px; padding-right: 2px; }
.hs-table th:nth-child(3),
.hs-table td.hs-name {
  width: auto;
  max-width: 9.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hs-table th:last-child,
.hs-table td:last-child { text-align: right; width: 3.6rem; padding-right: 6px; }
.hs-table tr.hs-me td { background: rgba(201, 164, 106, 0.12); }
.hs-empty { text-align: center !important; color: #7a8294; padding: 16px 8px !important; }
.hs-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 999px;
  border: 1px solid #5a4a2a;
  background: rgba(201, 164, 106, 0.15);
  color: #c9a46a;
  font-size: .62rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  vertical-align: middle;
  font-weight: 700;
}
#hs-status { margin-top: 6px; min-height: 1.1em; }

/* ── Phase 24 — game feel / visual polish ── */
.mute-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 12;
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 8px;
  border: 1px solid #3a4558;
  background: rgba(14, 19, 32, 0.78);
  color: #e8e4dc;
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
}
.mute-btn:hover { border-color: #c9a46a; }
.mute-btn.is-muted { color: #7a8294; text-decoration: line-through; }

.countdown-overlay {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(5,7,14,.28) 0%, rgba(5,7,14,.05) 70%);
}
.countdown-overlay.hidden { display: none !important; }
.countdown-num {
  font-size: 4.2rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #f2e8d5;
  text-shadow: 0 0 28px rgba(125, 240, 255, 0.45), 0 4px 18px rgba(0,0,0,.7);
  animation: countPop 0.55s ease-out;
}
.countdown-num.is-go {
  font-size: 3.1rem;
  color: #7dffa0;
  text-shadow: 0 0 32px rgba(125, 255, 160, 0.5);
}
@keyframes countPop {
  0% { transform: scale(1.35); opacity: 0; }
  35% { transform: scale(1); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

.stage-toast {
  position: absolute;
  top: 22%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 6;
  pointer-events: none;
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid rgba(201, 164, 106, 0.55);
  background: rgba(14, 19, 32, 0.82);
  color: #f5e6c8;
  font-weight: 800;
  letter-spacing: 0.14em;
  font-size: 0.95rem;
  box-shadow: 0 8px 24px rgba(0,0,0,.4);
  animation: toastIn 0.35s ease-out;
}
.stage-toast.hidden { display: none !important; }
@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(-8px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

#hud-score.punch {
  color: #7dffa0;
  transform: scale(1.12);
  display: inline-block;
  transition: transform 0.08s ease-out, color 0.12s;
}
#hud-timer.urgent {
  color: #ffb4a8;
  animation: timerPulse 0.7s ease-in-out infinite;
}
#hud.urgent .hud-center .label { color: #ffb4a8; }
#hud.slowed .value { text-shadow: 0 0 10px rgba(201, 164, 106, 0.55); }
#hud.cooling .hud-center .value { opacity: 0.92; }
@keyframes timerPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.72; transform: scale(1.08); }
}

.go-stats.pop-in strong {
  display: inline-block;
  animation: scorePop 0.45s cubic-bezier(.2,1.2,.3,1);
}
@keyframes scorePop {
  0% { transform: scale(0.7); opacity: 0; }
  60% { transform: scale(1.12); opacity: 1; }
  100% { transform: scale(1); }
}
#screen-gameover .eyebrow { letter-spacing: 0.16em; }
#screen-gameover[data-cause="round_complete"] .eyebrow { color: #7dffa0; }
#screen-gameover[data-cause="lethal"] .eyebrow { color: #ffb4a8; }

#go-reason {
  margin: 8px 12px 14px;
  max-width: 340px;
  font-size: 0.92rem;
  line-height: 1.45;
  color: #c5cddc;
  text-align: center;
}
#screen-gameover[data-cause="lethal"] #go-reason {
  color: #ffb4a8;
}
#screen-gameover[data-cause="round_complete"] #go-reason {
  color: #9dffb8;
}
#hud-round {
  color: #7df0ff;
  font-weight: 700;
  letter-spacing: 0.05em;
  min-height: 1em;
}

.go-levels {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 10px;
  margin: 6px 12px 14px;
  max-width: 360px;
}
.go-levels[hidden] { display: none !important; }
.go-level {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 88px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid #3a4558;
  background: #121722;
  color: #8b95a8;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  font-weight: 600;
  opacity: 0.55;
}
.go-level.is-done {
  opacity: 1;
  color: #9dffb8;
  border-color: #2f7a4a;
  background: rgba(45, 120, 74, 0.22);
}
.go-level.is-done .go-level-mark::before {
  content: '✓';
  color: #5dff8a;
  font-weight: 800;
}
.go-level.is-current {
  opacity: 1;
  color: #e8eef8;
  border-color: #7df0ff;
  box-shadow: 0 0 0 1px rgba(125, 240, 255, 0.35), 0 0 14px rgba(125, 240, 255, 0.18);
  background: #18202c;
}
.go-level.is-failed {
  opacity: 1;
  color: #ffb4a8;
  border-color: #8a3a32;
  background: rgba(120, 40, 32, 0.28);
}
.go-level.is-failed .go-level-mark::before {
  content: '✕';
  color: #ff8f7d;
  font-weight: 800;
}
.go-level.is-future .go-level-mark::before {
  content: '·';
  color: #5a6578;
}
.go-level.is-current:not(.is-done):not(.is-failed) .go-level-mark::before {
  content: '▸';
  color: #7df0ff;
}
.go-level-mark {
  display: inline-flex;
  width: 1em;
  justify-content: center;
}

#btn-campaign-next.hidden { display: none !important; }
#screen-gameover[data-campaign-continue="1"] #btn-again,
#screen-gameover[data-campaign-continue="1"] #btn-back-menu {
  display: none;
}
#screen-gameover[data-campaign-continue="1"] #btn-campaign-next {
  display: inline-flex !important;
}

.ship-card {
  transition: border-color .15s, box-shadow .15s, transform .15s, opacity .15s;
}
.ship-card:hover {
  border-color: #6a7588;
  transform: translateY(-2px);
}
.ship-card:focus-visible {
  outline: 2px solid #7df0ff;
  outline-offset: 2px;
}
.ship-card.selected {
  border-color: #c9a46a;
  box-shadow: 0 0 0 2px rgba(201,164,106,.55), 0 0 18px rgba(201,164,106,.28);
  transform: translateY(-2px);
  background: #16120c;
}
.ship-card.selected .name { color: #e8e4dc; }
.ship-card.confirm-pulse {
  animation: confirmPulse 0.38s ease-out;
}
@keyframes confirmPulse {
  0% { box-shadow: 0 0 0 2px rgba(125,255,160,.8), 0 0 22px rgba(125,255,160,.35); }
  100% { box-shadow: 0 0 0 2px rgba(201,164,106,.55); }
}
.ship-card.locked img { filter: grayscale(0.3) brightness(0.88); }
.ship-card.locked { position: relative; }
.ship-card.locked::after {
  content: 'Gesperrt';
  display: inline-block;
  margin-top: 4px;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ffb4a8;
}
.ship-card.digi-ready {
  box-shadow: 0 0 0 1px rgba(125, 255, 160, 0.22);
}
.ship-card.digi-empty .name { color: #e8e4dc; }

.hs-table-wrap.is-loading { opacity: 0.7; }
.hs-empty {
  text-align: center !important;
  color: #7a8294;
  padding: 22px 10px !important;
  line-height: 1.5;
}
.hs-empty.hs-loading { color: #c9a46a; letter-spacing: 0.04em; }
.hs-badge { margin-left: 8px; }
.hs-table tr.hs-gold td:nth-child(2) { color: #ffd76a; font-weight: 800; }
.hs-table tr.hs-silver td:nth-child(2) { color: #d5dbe8; font-weight: 700; }
.hs-table tr.hs-bronze td:nth-child(2) { color: #d4a574; font-weight: 700; }
.hs-table td { padding: 8px 10px; }
.hs-personal {
  gap: 4px;
  padding: 10px 12px;
  margin: 8px 0 10px;
}
.hs-toggle { margin: 8px 0 6px; }

.btn:focus-visible {
  outline: 2px solid #7df0ff;
  outline-offset: 2px;
}

.hs-empty .dim { color: #5f6778; font-size: .7rem; display: inline-block; margin-top: 4px; }

/* Game over actions */
.go-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  width: min(280px, 86%);
  margin: 16px auto 0;
}
.go-actions .btn {
  width: 100%;
  margin: 0;
}

.ship-card .status.action-hint { color: #7df0ff; font-weight: 600; }

/* Phase 25H — compact select menu so START stays visible */
#screen-select.screen-select {
  justify-content: flex-start;
  padding: 10px 12px 12px;
  overflow-x: hidden;
  overflow-y: auto;
  gap: 0;
}
#screen-select .select-title {
  font-size: 1.15rem;
  margin: 0 0 2px;
}
#screen-select .select-title.title-cinematic {
  font-size: clamp(1.85rem, 9.5vw, 2.55rem);
  margin: 4px 0 8px;
  line-height: 1.05;
}
#screen-select .eyebrow { margin: 0 0 2px; }
#screen-select #auth-user-line { margin: 0 0 4px; font-size: .7rem; }
#screen-select .auth-box {
  margin: 0 0 6px;
  padding: 8px 10px;
  width: min(340px, 94%);
}
#screen-select .auth-fields { gap: 6px; margin-bottom: 6px; }
#screen-select .auth-fields input { padding: 6px 8px; font-size: .75rem; }
#screen-select .auth-actions { gap: 6px; }
#screen-select .auth-actions .btn { padding: 6px 10px; font-size: .68rem; }
#screen-select .auth-actions-logout { margin-top: 4px; }
#screen-select .voucher-title { margin: 0 0 4px; font-size: .68rem; }
#screen-select .ship-grid { margin: 4px 0 2px; gap: 8px; }
#screen-select .ship-card { width: 100px; padding: 6px 6px 8px; }
#screen-select .ship-card img { width: 56px; margin-bottom: 4px; }
#screen-select .ship-card .name { font-size: .78rem; }
#screen-select .ship-card .meta,
#screen-select .ship-card .status { font-size: .62rem; margin-top: 2px; }
#screen-select .select-status-line {
  margin: 1px 0;
  font-size: .68rem;
  line-height: 1.25;
}
#screen-select .voucher-box {
  margin: 4px 0 4px;
  padding: 6px 8px;
  width: min(340px, 94%);
}
#screen-select .voucher-row input { padding: 6px 8px; font-size: .72rem; }
#screen-select .voucher-row .btn { padding: 6px 10px; font-size: .68rem; }
#screen-select .menu-actions {
  margin-top: 6px;
  margin-bottom: 2px;
  width: min(280px, 92%);
  gap: 6px;
  flex-shrink: 0;
  position: sticky;
  bottom: 0;
  z-index: 8;
  padding: 8px 0 4px;
  background: linear-gradient(180deg, rgba(8,12,22,0) 0%, rgba(8,12,22,0.92) 28%, rgba(8,12,22,0.98) 100%);
}
#screen-select .menu-actions .btn {
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
}
#screen-select #btn-start {
  display: flex !important;
  align-items: center;
  justify-content: center;
  text-align: center;
  visibility: visible !important;
  opacity: 1 !important;
}
#screen-select .compact-note { margin: 4px 0 0; font-size: .6rem !important; }
#screen-select #auth-msg { margin: 4px 0 0; font-size: .68rem; min-height: 0; }

.auth-verify.compact {
  width: min(340px, 94%);
  margin: 4px 0;
  padding: 6px 8px;
  border: 1px solid #2a3140;
  border-radius: 8px;
  background: rgba(14, 19, 32, 0.85);
  text-align: left;
}
.auth-verify.compact .auth-verify-label {
  display: block;
  margin: 0 0 4px;
  font-size: .65rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #c9a46a;
  font-weight: 700;
}
.auth-verify-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: stretch;
}
.auth-verify-row input#auth-verify-email {
  flex: 1 1 100%;
  width: 100%;
  min-width: 0;
  min-height: 38px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #3a4558;
  background: #0a0e18;
  color: #e8e4dc;
  font-size: .85rem;
  box-sizing: border-box;
}
.auth-verify-row .btn {
  padding: 8px 10px;
  font-size: .65rem;
  margin: 0;
  white-space: nowrap;
  flex: 1 1 auto;
}
.auth-verify-row .btn:disabled { opacity: 0.4; cursor: not-allowed; }
/* Compact confirm: was the big right button — now small like old left field */
.auth-verify-row #btn-auth-verify-email.btn-email-ok,
.auth-verify-row .btn-email-ok {
  flex: 0 0 auto;
  min-width: 4.6rem;
  max-width: 5.6rem;
  padding: 6px 8px;
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .02em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border-color: #3d6b52;
  background: #121a16;
  color: #cfe8d8;
}
.auth-verify-row .btn-email-ok .email-ok-mark {
  color: #7dffa0;
  font-weight: 800;
  font-size: .85rem;
  line-height: 1;
}
.auth-verify-row .btn-email-ok:not(:disabled):hover {
  border-color: #7dffa0;
  background: #16241c;
}
.auth-verify-row #btn-auth-set-email {
  flex: 1 1 auto;
}
#auth-verify-msg { margin: 3px 0 0; font-size: .65rem; min-height: 0; }
#auth-verify-msg.ok { color: #7dffa0; }
#auth-verify-msg.err { color: #ffb4a8; }


/* Auto-Shot toggle */
.autoshot-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(340px, 92%);
  margin: 6px auto 8px;
  padding: 8px 10px;
  border: 1px solid #2a3140;
  border-radius: 10px;
  background: rgba(14, 19, 32, 0.85);
  color: #e8e4dc;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  cursor: pointer;
  user-select: none;
}
.autoshot-row input { width: 16px; height: 16px; accent-color: #c9a46a; cursor: pointer; }
.autoshot-row .autoshot-hint { margin-left: auto; color: #9aa0ad; font-size: 0.65rem; letter-spacing: 0.02em; }
.autoshot-row:has(input:checked) { border-color: #c9a46a; }
.autoshot-hud-btn {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 7px;
  font-size: 0.58rem;
  letter-spacing: 0.06em;
  font-weight: 700;
  color: #9aa0ad;
  background: rgba(14, 19, 32, 0.75);
  border: 1px solid #2a3140;
  border-radius: 6px;
  cursor: pointer;
}
.autoshot-hud-btn[aria-pressed="true"] {
  color: #0b1020;
  background: #c9a46a;
  border-color: #c9a46a;
}
#screen-select .autoshot-row { width: min(280px, 92%); padding: 6px 8px; font-size: 0.7rem; margin: 8px auto 6px; }
#screen-select .menu-actions + .autoshot-row { margin-top: 8px; }




/* Highscore: own name red; score white; ship mini column */
.hs-table th.hs-th-ship,
.hs-table td.hs-ship {
  width: 2.8rem;
  text-align: center;
  padding-left: 2px;
  padding-right: 2px;
}
.hs-table td.hs-score {
  color: #f2f4f8 !important;
  font-weight: 700;
}
.hs-table td.hs-name-me,
.hs-table tr.hs-me td.hs-name,
.hs-table tr.hs-me td.hs-name-me {
  color: #ff4d4d !important;
  font-weight: 800;
}
.hs-table tr.hs-me td {
  background: rgba(255, 77, 77, 0.10) !important;
}
.hs-ship-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 1px;
  position: relative;
  width: 34px;
  height: 28px;
  border-radius: 7px;
  background: rgba(10, 14, 24, 0.75);
  border: 1px solid #2a3140;
  vertical-align: middle;
}
.hs-ship-img {
  width: 28px;
  height: 24px;
  object-fit: contain;
  image-rendering: auto;
  filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.15));
}
.hs-ship-num {
  position: absolute;
  right: 1px;
  bottom: 0;
  font-size: 0.55rem;
  font-weight: 800;
  color: #c9a46a;
  line-height: 1;
  text-shadow: 0 0 3px #0b1020;
}

/* ── Menu UI — space / UFO / lava (menuui1) ── */
.game-shell {
  background:
    radial-gradient(ellipse 80% 46% at 16% 10%, rgba(36, 90, 52, 0.28) 0%, transparent 56%),
    radial-gradient(ellipse 70% 42% at 88% 14%, rgba(48, 28, 110, 0.38) 0%, transparent 55%),
    radial-gradient(ellipse 90% 50% at 50% 100%, rgba(22, 12, 60, 0.35) 0%, transparent 52%),
    radial-gradient(ellipse at 50% 40%, #0a1022 0%, #05070e 62%, #020308 100%);
}

#screen-title,
#screen-select.screen-select {
  background:
    radial-gradient(ellipse 72% 44% at 12% 6%, rgba(40, 110, 62, 0.26) 0%, transparent 58%),
    radial-gradient(ellipse 78% 48% at 90% 8%, rgba(70, 36, 140, 0.34) 0%, transparent 56%),
    radial-gradient(ellipse 60% 36% at 70% 55%, rgba(16, 44, 96, 0.20) 0%, transparent 62%),
    radial-gradient(ellipse 88% 42% at 48% 100%, rgba(28, 12, 64, 0.30) 0%, transparent 54%),
    linear-gradient(180deg, rgba(4, 8, 20, 0.32) 0%, rgba(3, 6, 16, 0.52) 100%);
}

#screen-title::before,
#screen-select.screen-select::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(1.2px 1.2px at 42% 20%, rgba(255,255,255,0.35) 0%, transparent 70%),
    radial-gradient(1px 1px at 69% 13%, rgba(200,215,255,0.35) 0%, transparent 70%),
    radial-gradient(1px 1px at 28% 5%, rgba(220,230,255,0.8) 0%, transparent 70%),
    radial-gradient(1px 1px at 9% 31%, rgba(255,255,255,0.8) 0%, transparent 70%),
    radial-gradient(1px 1px at 73% 16%, rgba(200,215,255,0.35) 0%, transparent 70%),
    radial-gradient(1px 1px at 75% 51%, rgba(255,255,255,0.5) 0%, transparent 70%),
    radial-gradient(1px 1px at 72% 18%, rgba(255,255,255,0.8) 0%, transparent 70%),
    radial-gradient(1.4px 1.4px at 70% 16%, rgba(200,215,255,0.65) 0%, transparent 70%),
    radial-gradient(1px 1px at 88% 24%, rgba(220,230,255,0.5) 0%, transparent 70%),
    radial-gradient(1px 1px at 13% 71%, rgba(200,215,255,0.35) 0%, transparent 70%),
    radial-gradient(1.4px 1.4px at 27% 64%, rgba(220,230,255,0.8) 0%, transparent 70%),
    radial-gradient(1.2px 1.2px at 60% 75%, rgba(220,230,255,0.65) 0%, transparent 70%),
    radial-gradient(1px 1px at 32% 24%, rgba(200,215,255,0.35) 0%, transparent 70%),
    radial-gradient(1.2px 1.2px at 39% 68%, rgba(200,215,255,0.65) 0%, transparent 70%),
    radial-gradient(1.4px 1.4px at 58% 37%, rgba(255,255,255,0.35) 0%, transparent 70%),
    radial-gradient(1px 1px at 66% 54%, rgba(255,255,255,0.65) 0%, transparent 70%),
    radial-gradient(1px 1px at 63% 54%, rgba(200,215,255,0.35) 0%, transparent 70%),
    radial-gradient(1px 1px at 74% 41%, rgba(200,215,255,0.65) 0%, transparent 70%),
    radial-gradient(1.2px 1.2px at 64% 75%, rgba(255,255,255,0.35) 0%, transparent 70%),
    radial-gradient(1px 1px at 35% 61%, rgba(200,215,255,0.35) 0%, transparent 70%),
    radial-gradient(1.4px 1.4px at 90% 40%, rgba(220,230,255,0.8) 0%, transparent 70%),
    radial-gradient(1px 1px at 92% 50%, rgba(220,230,255,0.35) 0%, transparent 70%),
    radial-gradient(1.4px 1.4px at 46% 22%, rgba(220,230,255,0.35) 0%, transparent 70%),
    radial-gradient(1px 1px at 8% 28%, rgba(200,215,255,0.5) 0%, transparent 70%),
    radial-gradient(1.2px 1.2px at 32% 51%, rgba(255,255,255,0.8) 0%, transparent 70%),
    radial-gradient(1.2px 1.2px at 22% 58%, rgba(255,255,255,0.65) 0%, transparent 70%),
    radial-gradient(1px 1px at 56% 71%, rgba(220,230,255,0.8) 0%, transparent 70%),
    radial-gradient(1px 1px at 88% 49%, rgba(255,255,255,0.5) 0%, transparent 70%),
    radial-gradient(1px 1px at 23% 20%, rgba(255,255,255,0.5) 0%, transparent 70%),
    radial-gradient(1px 1px at 63% 76%, rgba(220,230,255,0.65) 0%, transparent 70%),
    radial-gradient(1.2px 1.2px at 1% 19%, rgba(200,215,255,0.65) 0%, transparent 70%),
    radial-gradient(1px 1px at 73% 41%, rgba(220,230,255,0.35) 0%, transparent 70%),
    radial-gradient(1.2px 1.2px at 88% 72%, rgba(220,230,255,0.8) 0%, transparent 70%),
    radial-gradient(1.2px 1.2px at 51% 14%, rgba(255,255,255,0.8) 0%, transparent 70%),
    radial-gradient(1px 1px at 25% 9%, rgba(255,255,255,0.8) 0%, transparent 70%),
    radial-gradient(1.4px 1.4px at 15% 44%, rgba(255,255,255,0.35) 0%, transparent 70%),
    radial-gradient(1px 1px at 1% 73%, rgba(220,230,255,0.35) 0%, transparent 70%),
    radial-gradient(1px 1px at 79% 4%, rgba(200,215,255,0.5) 0%, transparent 70%),
    radial-gradient(1px 1px at 49% 20%, rgba(200,215,255,0.65) 0%, transparent 70%),
    radial-gradient(1px 1px at 47% 61%, rgba(220,230,255,0.35) 0%, transparent 70%),
    radial-gradient(1.2px 1.2px at 60% 62%, rgba(255,255,255,0.65) 0%, transparent 70%),
    radial-gradient(1px 1px at 19% 14%, rgba(220,230,255,0.65) 0%, transparent 70%);
  opacity: 0.9;
}

#screen-title::after,
#screen-select.screen-select::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(2.2px 2.2px at 89% 21%, rgba(255,255,255,0.7) 0%, transparent 70%),
    radial-gradient(1.4px 1.4px at 68% 47%, rgba(255,236,200,0.95) 0%, transparent 70%),
    radial-gradient(1.8px 1.8px at 12% 90%, rgba(230,240,255,0.95) 0%, transparent 70%),
    radial-gradient(1.4px 1.4px at 22% 46%, rgba(255,236,200,0.95) 0%, transparent 70%),
    radial-gradient(2.2px 2.2px at 65% 43%, rgba(255,236,200,0.7) 0%, transparent 70%),
    radial-gradient(1.4px 1.4px at 98% 25%, rgba(255,236,200,0.85) 0%, transparent 70%),
    radial-gradient(2.2px 2.2px at 30% 26%, rgba(230,240,255,0.85) 0%, transparent 70%),
    radial-gradient(1.4px 1.4px at 94% 4%, rgba(230,240,255,0.85) 0%, transparent 70%),
    radial-gradient(2.2px 2.2px at 34% 25%, rgba(230,240,255,0.95) 0%, transparent 70%),
    radial-gradient(1.8px 1.8px at 58% 93%, rgba(255,255,255,0.85) 0%, transparent 70%),
    radial-gradient(1.4px 1.4px at 29% 14%, rgba(255,255,255,0.85) 0%, transparent 70%),
    radial-gradient(1.8px 1.8px at 44% 27%, rgba(255,236,200,0.95) 0%, transparent 70%),
    radial-gradient(2.2px 2.2px at 1% 62%, rgba(255,236,200,0.85) 0%, transparent 70%),
    radial-gradient(1.4px 1.4px at 11% 85%, rgba(255,236,200,0.85) 0%, transparent 70%),
    radial-gradient(1.8px 1.8px at 97% 26%, rgba(230,240,255,0.7) 0%, transparent 70%);
  animation: menu-star-twinkle 3.6s ease-in-out infinite;
}

@keyframes menu-star-twinkle {
  0%, 100% { opacity: 0.72; }
  50% { opacity: 1; }
}

#screen-title > .title-stack,
#screen-select.screen-select > *:not(.menu-ufo):not(.menu-actions) {
  position: relative;
  z-index: 1;
}
#screen-select.screen-select > .menu-actions {
  z-index: 8;
}

.menu-ufo {
  position: absolute;
  top: 2px;
  left: 0;
  width: 132px;
  height: 100px;
  z-index: 2;
  pointer-events: none;
  line-height: 0;
  filter: drop-shadow(0 0 14px rgba(80, 255, 120, 0.45));
  animation: menu-ufo-fly 11s ease-in-out infinite;
  will-change: transform;
}
#screen-title .menu-ufo {
  top: 10px;
  width: 148px;
  height: 112px;
}
.menu-ufo-svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.menu-ufo .ufo-rim {
  animation: menu-ufo-rim 1.5s ease-in-out infinite;
}
.menu-ufo .ufo-rim:nth-of-type(2) { animation-delay: 0.15s; }
.menu-ufo .ufo-rim:nth-of-type(3) { animation-delay: 0.3s; }
.menu-ufo .ufo-rim:nth-of-type(4) { animation-delay: 0.45s; }
.menu-ufo .ufo-rim:nth-of-type(5) { animation-delay: 0.6s; }

/* Full width: left edge → right edge → back (flip facing) */
@keyframes menu-ufo-fly {
  0% {
    left: 0%;
    transform: translate(0, 2px) scaleX(1);
  }
  48% {
    left: 100%;
    transform: translate(-100%, -2px) scaleX(1);
  }
  50% {
    left: 100%;
    transform: translate(-100%, -2px) scaleX(-1);
  }
  98% {
    left: 0%;
    transform: translate(0, 2px) scaleX(-1);
  }
  100% {
    left: 0%;
    transform: translate(0, 2px) scaleX(1);
  }
}
@keyframes menu-ufo-rim {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

/* START / SPIELEN — UFO green text */
#btn-start,
#btn-play,
.btn-start-ufo {
  color: #8cff96 !important;
  text-shadow:
    0 0 8px rgba(140, 255, 150, 0.7),
    0 0 16px rgba(60, 200, 90, 0.35);
}
#btn-start:hover,
#btn-play:hover,
.btn-start-ufo:hover {
  color: #b6ffbe !important;
  border-color: #5dcc72;
  text-shadow:
    0 0 10px rgba(140, 255, 150, 0.85),
    0 0 20px rgba(80, 220, 110, 0.4);
}

/* HIGH SCORE — lava text */
#btn-highscore-select,
#btn-highscore-title,
.btn-highscore-lava {
  color: #ff4a2a;
  text-shadow:
    0 0 6px rgba(255, 74, 42, 0.85),
    0 0 14px rgba(255, 120, 40, 0.45);
  animation: menu-lava-shimmer 2.6s ease-in-out infinite;
}
#btn-highscore-select:hover,
#btn-highscore-title:hover,
.btn-highscore-lava:hover {
  border-color: #ff6a3a;
  color: #ffb347;
}

@keyframes menu-lava-shimmer {
  0%, 100% {
    color: #ff4a2a;
    text-shadow: 0 0 6px rgba(255, 74, 42, 0.8), 0 0 14px rgba(255, 80, 30, 0.4);
  }
  45% {
    color: #ff8a3a;
    text-shadow: 0 0 8px rgba(255, 140, 50, 0.85), 0 0 16px rgba(255, 90, 30, 0.5);
  }
  70% {
    color: #ffb347;
    text-shadow: 0 0 10px rgba(255, 179, 71, 0.9), 0 0 18px rgba(255, 100, 40, 0.45);
  }
}

/* Keep compact select panels readable over the nebula */
#screen-select .auth-box,
#screen-select .voucher-box,
#screen-select .auth-verify.compact,
#screen-select .autoshot-row {
  background: rgba(10, 14, 26, 0.78);
}
#screen-select .ship-card {
  background: rgba(10, 14, 26, 0.8);
}
#screen-select .menu-actions {
  background: linear-gradient(180deg, rgba(5, 8, 18, 0) 0%, rgba(5, 8, 18, 0.88) 28%, rgba(5, 8, 18, 0.96) 100%);
}

@media (prefers-reduced-motion: reduce) {
  #screen-title::after,
  #screen-select.screen-select::after,
  .menu-ufo {
    animation: none !important;
  }
  .menu-ufo .ufo-rim,
  #btn-highscore-select,
  #btn-highscore-title,
  .btn-highscore-lava {
    animation: none;
  }
}

/* Auth row: ANMELDEN / REGISTRIEREN / ABMELDEN side by side */
#screen-select .auth-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 5px;
  width: 100%;
}
#screen-select .auth-actions .btn {
  flex: 1 1 0;
  min-width: 0;
  padding: 6px 4px;
  font-size: .62rem;
  letter-spacing: 0.02em;
}
#screen-select .auth-actions-logout { display: none; }

/* Highscore — Nebel-Parasit in free top/bottom corners (not under table text) */
#screen-highscore {
  position: absolute;
}
#screen-highscore > *:not(.hs-parasit-bg) {
  position: relative;
  z-index: 2;
}
.hs-parasit-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

/* TOP free band: large parasite body hanging from above */
.hs-parasit-top {
  position: absolute;
  top: -8px;
  left: 50%;
  width: 78%;
  max-width: 340px;
  height: 168px;
  transform: translateX(-50%);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow: hidden;
}
.hs-parasit-top img {
  width: 100%;
  height: auto;
  margin-top: -12%;
  object-fit: contain;
  object-position: center top;
  opacity: 0.72;
  filter:
    drop-shadow(0 0 18px rgba(80, 255, 230, 0.45))
    drop-shadow(0 0 28px rgba(255, 200, 80, 0.25))
    saturate(1.2);
  animation: hs-parasit-bob 4.8s ease-in-out infinite;
}
.hs-parasit-aura {
  position: absolute;
  top: 18%;
  left: 50%;
  width: 70%;
  height: 70%;
  transform: translate(-50%, -20%);
  border-radius: 50%;
  background: radial-gradient(ellipse at center,
    rgba(80, 255, 230, 0.35) 0%,
    rgba(255, 200, 80, 0.14) 40%,
    transparent 70%);
  mix-blend-mode: screen;
  animation: hs-parasit-pulse 5.5s ease-in-out infinite;
  z-index: -1;
}

/* BOTTOM free band: shield bubble + parasite peek */
.hs-parasit-bottom {
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 88%;
  max-width: 360px;
  height: 150px;
  transform: translateX(-50%);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
}
.hs-parasit-peek {
  width: 58%;
  max-width: 210px;
  height: auto;
  margin-bottom: -38%;
  object-fit: contain;
  object-position: center bottom;
  opacity: 0.55;
  filter:
    drop-shadow(0 0 16px rgba(80, 220, 255, 0.4))
    saturate(1.15);
  animation: hs-parasit-bob 5.2s ease-in-out infinite reverse;
  z-index: 1;
}
.hs-shield-glow {
  position: absolute;
  left: 50%;
  bottom: 18%;
  width: 72%;
  height: 95%;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(ellipse at center,
    rgba(160, 255, 250, 0.4) 0%,
    rgba(255, 220, 90, 0.28) 32%,
    rgba(80, 220, 255, 0.14) 58%,
    transparent 78%);
  mix-blend-mode: screen;
  animation: hs-shield-pulse 2.4s ease-in-out infinite;
  z-index: 0;
}
.hs-shield-ring {
  position: absolute;
  left: 50%;
  bottom: 22%;
  border-radius: 50%;
  border: 2px solid rgba(200, 255, 250, 0.55);
  box-shadow:
    0 0 10px rgba(160, 255, 250, 0.45),
    inset 0 0 12px rgba(255, 220, 90, 0.25);
  transform: translateX(-50%);
  z-index: 2;
  pointer-events: none;
}
.hs-shield-ring-a {
  width: 46%;
  aspect-ratio: 1.15 / 1;
  animation: hs-shield-spin 7s linear infinite;
  border-color: rgba(200, 255, 250, 0.65);
  border-top-color: rgba(255, 220, 90, 0.85);
  border-bottom-color: transparent;
}
.hs-shield-ring-b {
  width: 58%;
  aspect-ratio: 1.2 / 1;
  animation: hs-shield-spin 11s linear infinite reverse;
  border-width: 1.5px;
  border-color: rgba(80, 220, 255, 0.35);
  border-left-color: rgba(255, 220, 90, 0.7);
  border-right-color: transparent;
  opacity: 0.85;
}

@keyframes hs-parasit-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(5px); }
}
@keyframes hs-parasit-pulse {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 0.95; }
}
@keyframes hs-shield-pulse {
  0%, 100% { opacity: 0.65; transform: translateX(-50%) scale(1); }
  50% { opacity: 1; transform: translateX(-50%) scale(1.04); }
}
@keyframes hs-shield-spin {
  from { transform: translateX(-50%) rotate(0deg); }
  to { transform: translateX(-50%) rotate(360deg); }
}

/* Keep table readable over mid empty zone */
#screen-highscore .hs-table-wrap {
  background: rgba(8, 11, 18, 0.78);
}
#screen-highscore .hs-personal {
  background: rgba(14, 19, 32, 0.82);
}

@media (prefers-reduced-motion: reduce) {
  .hs-parasit-top img,
  .hs-parasit-peek,
  .hs-parasit-aura,
  .hs-shield-glow,
  .hs-shield-ring {
    animation: none !important;
  }
}

/* Title controls hint — clearer, larger, dark brown */
#screen-title .title-controls-hint {
  margin: 26px 0 0;
  font-size: 0.92rem;
  line-height: 1.35;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #ffffff;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.85),
    0 0 12px rgba(0, 0, 0, 0.45);
  max-width: 92%;
}
#screen-title #btn-play {
  margin-top: 0;
  width: min(260px, 86%);
}
#screen-title #btn-highscore-title {
  margin-top: 8px;
  width: min(260px, 86%);
}

/* Title Digi hero — large showcase ship (menu optics only) */
#screen-title {
  justify-content: flex-end;
  align-items: center;
  padding: 10px 16px 0;
  overflow: hidden;
}
#screen-title > .title-stack-above-ship {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  flex: 0 0 auto;
  margin: 0;
  /* above Digi ship, then +20% of shell height higher */
  padding-bottom: calc(210px + 30%);
  gap: 0;
}
.title-digi-hero {
  position: absolute;
  left: 50%;
  bottom: -2px;
  width: min(88%, 320px);
  z-index: 1;
  pointer-events: none;
  transform: translateX(-50%);
  line-height: 0;
  filter: drop-shadow(0 0 18px rgba(61, 224, 255, 0.55))
          drop-shadow(0 0 36px rgba(47, 111, 255, 0.35));
  animation: title-digi-bob 3.6s ease-in-out infinite;
}
.title-digi-hero img {
  display: block;
  width: 100%;
  height: auto;
  position: relative;
  z-index: 2;
}
.title-digi-glow {
  position: absolute;
  left: 50%;
  top: 42%;
  width: 85%;
  height: 70%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(ellipse at center,
    rgba(125, 240, 255, 0.45) 0%,
    rgba(47, 111, 255, 0.22) 45%,
    transparent 72%);
  mix-blend-mode: screen;
  z-index: 0;
  animation: title-digi-pulse 2.8s ease-in-out infinite;
}
.title-digi-ring {
  position: absolute;
  left: 50%;
  top: 48%;
  width: 72%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1.5px solid rgba(125, 240, 255, 0.35);
  box-shadow: 0 0 16px rgba(61, 224, 255, 0.35), inset 0 0 12px rgba(47, 111, 255, 0.2);
  z-index: 1;
  animation: title-digi-ring 8s linear infinite;
}
.title-digi-flame {
  position: absolute;
  left: 50%;
  bottom: 2%;
  width: 18%;
  height: 22%;
  transform: translateX(-50%);
  border-radius: 40% 40% 50% 50%;
  background: linear-gradient(180deg,
    rgba(232, 255, 255, 0.95) 0%,
    rgba(125, 240, 255, 0.85) 35%,
    rgba(47, 111, 255, 0.35) 70%,
    transparent 100%);
  filter: blur(1.5px);
  mix-blend-mode: screen;
  z-index: 3;
  animation: title-digi-flame 0.55s ease-in-out infinite alternate;
  opacity: 0.9;
}
@keyframes title-digi-bob {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-4px); }
}
@keyframes title-digi-pulse {
  0%, 100% { opacity: 0.65; }
  50% { opacity: 1; }
}
@keyframes title-digi-ring {
  from { transform: translate(-50%, -50%) rotate(0deg) scale(1); }
  to { transform: translate(-50%, -50%) rotate(360deg) scale(1.02); }
}
@keyframes title-digi-flame {
  from { height: 18%; opacity: 0.7; }
  to { height: 26%; opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .title-digi-hero,
  .title-digi-glow,
  .title-digi-ring,
  .title-digi-flame {
    animation: none !important;
  }
}

/* Highscore left/right flanks — UFO, rocks, gold nebula (keep table clear) */
.hs-side {
  position: absolute;
  top: 150px;
  bottom: 130px;
  width: 72px;
  z-index: 0;
  pointer-events: none;
  overflow: visible;
}
.hs-side-left { left: 2px; }
.hs-side-right { right: 2px; }

.hs-side-ufo {
  position: absolute;
  top: 8%;
  left: 50%;
  width: 64px;
  transform: translateX(-50%);
  filter: drop-shadow(0 0 10px rgba(80, 255, 120, 0.45));
  animation: hs-side-float 5.5s ease-in-out infinite;
  opacity: 0.85;
}
.hs-side-ufo svg { display: block; width: 100%; height: auto; }

.hs-side-rock {
  position: absolute;
  left: 50%;
  width: 42px;
  height: auto;
  transform: translateX(-50%);
  opacity: 0.55;
  filter: drop-shadow(0 0 8px rgba(120, 160, 255, 0.25));
}
.hs-side-rock-a {
  top: 38%;
  width: 36px;
  animation: hs-side-spin 22s linear infinite;
  opacity: 0.6;
}
.hs-side-rock-b {
  bottom: 12%;
  width: 48px;
  animation: hs-side-float 7s ease-in-out infinite reverse;
  opacity: 0.5;
}
.hs-side-rock-c {
  top: 22%;
  width: 40px;
  animation: hs-side-float 6.2s ease-in-out infinite;
  opacity: 0.55;
}
.hs-side-rock-d {
  top: 52%;
  width: 52px;
  animation: hs-side-spin 28s linear infinite reverse;
  opacity: 0.48;
}
.hs-side-nebula {
  position: absolute;
  top: 4%;
  left: 50%;
  width: 70px;
  transform: translateX(-50%);
  opacity: 0.42;
  filter: blur(0.3px) saturate(1.2);
  animation: hs-side-pulse 4.5s ease-in-out infinite;
}
.hs-side-sun {
  position: absolute;
  bottom: 8%;
  left: 50%;
  width: 38px;
  transform: translateX(-50%);
  opacity: 0.7;
  filter: drop-shadow(0 0 12px rgba(255, 200, 80, 0.55));
  animation: hs-side-pulse 3.2s ease-in-out infinite;
}

@keyframes hs-side-float {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-10px); }
}
@keyframes hs-side-spin {
  from { transform: translateX(-50%) rotate(0deg); }
  to { transform: translateX(-50%) rotate(360deg); }
}
@keyframes hs-side-pulse {
  0%, 100% { opacity: 0.38; }
  50% { opacity: 0.7; }
}

@media (prefers-reduced-motion: reduce) {
  .hs-side-ufo,
  .hs-side-rock,
  .hs-side-nebula,
  .hs-side-sun {
    animation: none !important;
  }
}

/* Password row + eye toggle + confirm */
.auth-pass-row {
  position: relative;
  display: flex;
  align-items: stretch;
  width: 100%;
}
.auth-pass-row input {
  flex: 1 1 auto;
  width: 100%;
  padding-right: 2.4rem !important;
}
.auth-pass-toggle {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 2rem;
  height: 2rem;
  border: none;
  background: transparent;
  color: #c9a46a;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 6px;
  line-height: 1;
  font-size: 1rem;
  opacity: 0.85;
}
.auth-pass-toggle:hover {
  opacity: 1;
  background: rgba(201, 164, 106, 0.12);
}
.auth-pass-toggle[aria-pressed="true"] {
  color: #7df0ff;
}
.auth-pass-toggle .auth-eye-off {
  text-decoration: line-through;
  opacity: 0.75;
}
#screen-select .auth-pass-toggle {
  width: 1.75rem;
  height: 1.75rem;
  font-size: 0.9rem;
}

/* Highscore — parasite channel beam (Kernblitz), top-left sideways */
.hs-parasit-beam {
  position: absolute;
  top: 52px;
  left: -8px;
  width: 58%;
  max-width: 240px;
  height: 28px;
  z-index: 0;
  pointer-events: none;
  transform: rotate(-8deg);
  transform-origin: left center;
  filter: drop-shadow(0 0 10px rgba(255, 200, 90, 0.45));
  animation: hs-beam-pulse 1.8s ease-in-out infinite;
}
.hs-beam-veil {
  position: absolute;
  inset: -10px -6px;
  border-radius: 40px;
  background: linear-gradient(90deg,
    rgba(60, 220, 210, 0) 0%,
    rgba(60, 220, 210, 0.18) 12%,
    rgba(255, 200, 90, 0.28) 48%,
    rgba(60, 220, 210, 0.16) 78%,
    rgba(40, 180, 200, 0) 100%);
  mix-blend-mode: screen;
}
.hs-beam-core {
  position: absolute;
  left: 0;
  top: 50%;
  width: 100%;
  height: 7px;
  transform: translateY(-50%);
  border-radius: 6px;
  background: linear-gradient(90deg,
    rgba(80, 255, 230, 0.15) 0%,
    rgba(125, 255, 240, 0.85) 18%,
    rgba(255, 220, 120, 0.95) 50%,
    rgba(70, 235, 220, 0.75) 82%,
    rgba(40, 180, 200, 0) 100%);
  box-shadow:
    0 0 8px rgba(255, 210, 100, 0.7),
    0 0 18px rgba(80, 230, 220, 0.45);
  animation: hs-beam-shimmer 1.1s linear infinite;
}
.hs-beam-edge {
  position: absolute;
  left: 4%;
  right: 8%;
  height: 1.5px;
  border-radius: 2px;
  background: linear-gradient(90deg,
    rgba(180, 255, 240, 0) 0%,
    rgba(255, 230, 140, 0.75) 40%,
    rgba(120, 255, 240, 0.55) 70%,
    transparent 100%);
  opacity: 0.75;
}
.hs-beam-edge-t { top: 4px; }
.hs-beam-edge-b { bottom: 4px; }

@keyframes hs-beam-pulse {
  0%, 100% { opacity: 0.72; filter: drop-shadow(0 0 8px rgba(255, 200, 90, 0.35)); }
  50% { opacity: 1; filter: drop-shadow(0 0 16px rgba(80, 255, 230, 0.55)); }
}
@keyframes hs-beam-shimmer {
  0% { background-position: 0% 50%; filter: brightness(0.95); }
  50% { filter: brightness(1.2); }
  100% { background-position: 100% 50%; filter: brightness(0.95); }
}

@media (prefers-reduced-motion: reduce) {
  .hs-parasit-beam,
  .hs-beam-core {
    animation: none !important;
  }
}

/* Cinematic DIGI SPACE title */
#screen-title .title-cinematic,
#screen-select .title-cinematic {
  font-family: "Orbitron", system-ui, sans-serif;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #f7f1e4;
  text-shadow:
    0 0 4px rgba(255, 255, 255, 0.55),
    0 0 18px rgba(125, 240, 255, 0.45),
    0 0 36px rgba(47, 111, 255, 0.35),
    0 0 56px rgba(201, 164, 106, 0.28),
    0 2px 0 rgba(20, 28, 48, 0.9);
  background: linear-gradient(180deg, #ffffff 0%, #e8f6ff 28%, #c9a46a 72%, #8b6a3a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 12px rgba(125, 240, 255, 0.35));
  animation: title-cinematic-glow 3.8s ease-in-out infinite;
}
@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
  #screen-title .title-cinematic,
  #screen-select .title-cinematic {
    color: #f2e8d5;
    -webkit-text-fill-color: unset;
    background: none;
  }
}
@keyframes title-cinematic-glow {
  0%, 100% {
    filter: drop-shadow(0 0 10px rgba(125, 240, 255, 0.3))
            drop-shadow(0 0 22px rgba(201, 164, 106, 0.22));
  }
  50% {
    filter: drop-shadow(0 0 18px rgba(125, 240, 255, 0.55))
            drop-shadow(0 0 34px rgba(201, 164, 106, 0.4));
  }
}
@media (prefers-reduced-motion: reduce) {
  #screen-title .title-cinematic,
  #screen-select .title-cinematic { animation: none; }
}

/* Quota numbers — optically emphasized */
.quota-num {
  color: #ffe08a;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  text-shadow: 0 0 8px rgba(255, 200, 100, 0.35);
}
#select-attempts-line,
#select-digi-line {
  color: #c8cdd8;
}
#select-attempts .quota-num,
#select-digi-status .quota-num {
  font-size: 1.08em;
}

#screen-title .title-cinematic {
  font-size: clamp(1.85rem, 9.5vw, 2.45rem);
  margin: 0 0 6px;
  line-height: 1.05;
  letter-spacing: 0.16em;
}

/* Fun tagline under title */
#screen-title .title-tagline-fun {
  font-family: "Fredoka", system-ui, sans-serif;
  font-weight: 600;
  font-size: clamp(0.95rem, 4.2vw, 1.12rem);
  letter-spacing: 0.04em;
  color: #9ad4ff;
  margin: 0 0 28px;
  text-shadow:
    0 0 10px rgba(125, 200, 255, 0.35),
    1px 1px 0 rgba(20, 40, 80, 0.6);
  transform: rotate(-1.2deg);
}

/* Ship name colors in status lines */
.ship-label { font-weight: 800; letter-spacing: 0.02em; }
.ship-label-kiesel {
  color: #e8e4dc;
  text-shadow: 0 0 6px rgba(230, 230, 240, 0.25);
}
.ship-label-aurora {
  color: #ffd76a;
  text-shadow: 0 0 10px rgba(255, 200, 80, 0.45);
}
.ship-label-digi {
  color: #4db8ff;
  text-shadow: 0 0 10px rgba(61, 180, 255, 0.5);
}


/* WoW – Neuer Rekord (ship-class monthly #1) — hidden by default */
.go-new-record {
  display: none;
  margin: 10px 0 6px;
  padding: 8px 14px;
  font-family: "Orbitron", system-ui, sans-serif;
  font-weight: 800;
  font-size: clamp(0.95rem, 4.2vw, 1.15rem);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #ffe08a;
  text-shadow:
    0 0 10px rgba(255, 200, 80, 0.65),
    0 0 22px rgba(255, 140, 40, 0.4);
  border: 1px solid rgba(255, 200, 100, 0.45);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(80, 50, 10, 0.55), rgba(30, 18, 6, 0.7));
}
#screen-gameover.has-new-record .go-new-record:not(.hidden) {
  display: block;
  animation: go-record-pulse 1.4s ease-in-out infinite;
}
.go-new-record.hidden { display: none !important; }
@keyframes go-record-pulse {
  0%, 100% { transform: scale(1); filter: brightness(1); }
  50% { transform: scale(1.03); filter: brightness(1.15); }
}
@media (prefers-reduced-motion: reduce) {
  #screen-gameover.has-new-record .go-new-record:not(.hidden) { animation: none; }
}
