/* Petri Dish — global styles. Glassmorphism, deep blue, glowing white. */
* { box-sizing: border-box; }
html, body, #root { margin: 0; padding: 0; width: 100%; height: 100%; overflow: hidden; background: #050a1e; }
html, body { margin: 0; padding: 0; background: #050a1e; color: #E0F2FE;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: rgba(5,10,30,0.6); border-radius: 3px; }
::-webkit-scrollbar-thumb { background: linear-gradient(180deg, rgba(59,130,246,0.5), rgba(96,165,250,0.55)); border-radius: 3px; border: 1px solid rgba(147,197,253,0.25); }
::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, rgba(96,165,250,0.7), rgba(147,197,253,0.7)); }
::-webkit-scrollbar-corner { background: transparent; }
:root {
  --deep: #050a1e; --glow: #E0F2FE; --accent: #3B82F6;
  --line: rgba(224, 242, 254, 0.14);
  --glass-bg: rgba(12, 30, 70, 0.4);
  --glass-bord: rgba(224, 242, 254, 0.18);
}

.stage {
  position: relative; width: 100%; height: 100%; overflow: hidden;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(59, 130, 246, 0.25), transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(99, 102, 241, 0.18), transparent 60%),
    linear-gradient(180deg, #050a1e 0%, #02060f 100%);
}
.stage::before {
  content: ''; position: absolute; inset: 0;
  background-image:
    radial-gradient(1px 1px at 14% 22%, rgba(224,242,254,0.5) 50%, transparent 51%),
    radial-gradient(1px 1px at 78% 64%, rgba(224,242,254,0.4) 50%, transparent 51%),
    radial-gradient(1px 1px at 42% 88%, rgba(224,242,254,0.5) 50%, transparent 51%),
    radial-gradient(1px 1px at 92% 12%, rgba(224,242,254,0.4) 50%, transparent 51%);
  pointer-events: none; animation: drift 60s linear infinite; opacity: 0.6;
}
@keyframes drift { from { transform: translateY(0); } to { transform: translateY(-40px); } }

.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(14px) saturate(1.1);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  border: 1px solid var(--glass-bord);
  border-radius: 16px;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.04) inset, 0 8px 30px rgba(0,0,0,0.35);
}

.g-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 14px; border-radius: 12px; font-size: 13px; font-weight: 500;
  font-family: inherit; cursor: pointer; border: 1px solid transparent;
  transition: all 0.18s ease; white-space: nowrap;
}
.g-btn-primary {
  background: rgba(59, 130, 246, 0.3); border-color: rgba(147, 197, 253, 0.55);
  color: #fff; text-shadow: 0 0 8px rgba(224,242,254,0.7);
  box-shadow: 0 0 18px rgba(96,165,250,0.35);
}
.g-btn-primary:hover { box-shadow: 0 0 28px rgba(147,197,253,0.6); background: rgba(59, 130, 246, 0.45); }
.g-btn-ghost {
  background: rgba(224, 242, 254, 0.04); border-color: rgba(224, 242, 254, 0.18);
  color: rgba(224, 242, 254, 0.85);
}
.g-btn-ghost:hover { background: rgba(224, 242, 254, 0.08); border-color: rgba(224, 242, 254, 0.35); }
.g-btn:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }

.g-slider {
  width: 100%; appearance: none; height: 5px;
  background: linear-gradient(90deg, rgba(59,130,246,0.35), rgba(96,165,250,0.45));
  border-radius: 5px; outline: none; cursor: pointer;
}
.g-slider::-webkit-slider-thumb {
  appearance: none; width: 16px; height: 16px; border-radius: 50%;
  background: #E0F2FE;
  border: 2px solid rgba(96,165,250,0.8);
  box-shadow: 0 0 12px rgba(147,197,253,0.8), 0 0 0 4px rgba(59,130,246,0.25);
  cursor: pointer; transition: box-shadow 0.15s;
}
.g-slider::-webkit-slider-thumb:hover {
  box-shadow: 0 0 20px rgba(147,197,253,1), 0 0 0 6px rgba(59,130,246,0.35);
}
.g-slider::-moz-range-thumb {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(96,165,250,0.8); background: #E0F2FE;
  box-shadow: 0 0 12px rgba(147,197,253,0.8), 0 0 0 4px rgba(59,130,246,0.25);
  cursor: pointer;
}
.g-slider:disabled {
  opacity: 0.4; cursor: not-allowed;
}
.g-slider:disabled::-webkit-slider-thumb {
  background: rgba(224,242,254,0.4); border-color: rgba(224,242,254,0.3);
  box-shadow: none;
}
.g-slider:disabled::-moz-range-thumb {
  background: rgba(224,242,254,0.4); border-color: rgba(224,242,254,0.3);
  box-shadow: none;
}

/* ── Top bar — fancy 2-row layout (E34) ───────────────────────── */
.topbar {
  position: absolute; top: 0; left: 0; right: 0; height: 56px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px; gap: 24px; z-index: 10; pointer-events: none;
}
.topbar > * { pointer-events: auto; }
.tb-left, .tb-right { display: flex; align-items: center; gap: 14px; }
.tb-mid { flex: 1; display: flex; justify-content: center; }
.tb-pill { font-size: 10px; letter-spacing: 3px; opacity: 0.5;
  padding: 5px 14px; border: 1px solid var(--line); border-radius: 20px; }

/* ── Topbar — strak blok, 156px hoog met gelijke padding boven + onder.
   Layout: 20px padding · 56px stats-row · 4px hairline · 56px nav-row · 20px padding. */
.topbar-stacked {
  height: 156px; flex-direction: column; align-items: stretch;
  padding: 20px 0; gap: 0;
  background:
    /* Top specular sheen */
    radial-gradient(ellipse 80% 60% at 50% -20%, rgba(147,197,253,0.20), transparent 60%),
    /* Side accents */
    radial-gradient(ellipse 30% 100% at 0% 50%, rgba(96,165,250,0.10), transparent 70%),
    radial-gradient(ellipse 30% 100% at 100% 50%, rgba(192,132,252,0.10), transparent 70%),
    /* Vertical body */
    linear-gradient(180deg,
      rgba(14,32,72,0.92) 0%,
      rgba(10,24,58,0.88) 50%,
      rgba(8,20,48,0.84) 100%);
  backdrop-filter: blur(24px) saturate(1.5);
  border-bottom: 1px solid transparent;
  box-shadow:
    0 1px 0 rgba(147,197,253,0.18) inset,
    0 -1px 0 rgba(255,255,255,0.04) inset,
    0 16px 40px rgba(0,0,0,0.40);
  position: absolute; top: 0; left: 0; right: 0;
}
.topbar-stacked::after {
  /* Bottom accent — gradient line that signals the bar ends here. */
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(147,197,253,0.55) 28%,
    rgba(192,132,252,0.65) 50%,
    rgba(147,197,253,0.55) 72%,
    transparent 100%);
  box-shadow: 0 1px 14px rgba(147,197,253,0.45);
  pointer-events: none;
}
.topbar-stacked .tb-row {
  display: flex; align-items: center; padding: 0 24px; position: relative;
  flex-shrink: 0;
}
.topbar-stacked .tb-row-stats {
  height: 56px; gap: 16px; justify-content: space-between;
}
.topbar-stacked .tb-row-nav {
  height: 56px; gap: 6px; justify-content: center; margin-top: 4px;
}
.topbar-stacked .tb-row-nav::before {
  /* Hairline divider with feathered edges between row-1 and row-2 */
  content: ''; position: absolute; left: 16%; right: 16%; top: -2px; height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(147,197,253,0.22) 50%,
    transparent 100%);
}
.topbar-stacked .tb-left { gap: 14px; align-items: center; min-width: 0; flex: 1; }
.topbar-stacked .tb-currencies {
  display: flex; align-items: center; gap: 8px; flex-shrink: 0;
}

/* Uniform 36px-tall pill-row for ALL stat-row elements (E35 herzien). */
.topbar-stacked .currency-pill,
.topbar-stacked .fps-badge,
.topbar-stacked .speed-control,
.topbar-stacked .pause-btn {
  height: 36px; box-sizing: border-box;
}

.topbar-stacked .player-bar { gap: 12px; align-items: center; min-width: 0; }
.topbar-stacked .lvl-badge {
  width: 44px; height: 44px; flex-shrink: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: radial-gradient(circle at 30% 30%, rgba(96,165,250,0.50), rgba(59,130,246,0.22));
  border: 1px solid rgba(147,197,253,0.60);
  border-radius: 12px;
  box-shadow: 0 0 18px rgba(96,165,250,0.35), 0 1px 0 rgba(255,255,255,0.12) inset;
}
.topbar-stacked .lvl-num { font-size: 18px; font-weight: 800; color: #fff; line-height: 1; }
.topbar-stacked .lvl-tag { font-size: 8px; letter-spacing: 1.6px; opacity: 0.75; margin-top: 2px; }

.topbar-stacked .xp-block { min-width: 280px; max-width: 480px; flex: 1; }
.topbar-stacked .xp-meta {
  font-size: 11px; letter-spacing: 0.6px;
  display: flex; justify-content: space-between; gap: 12px;
  align-items: baseline;
}
.topbar-stacked .xp-meta-name {
  display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap;
  min-width: 0;
}
.topbar-stacked .xp-meta-num { font-variant-numeric: tabular-nums; flex-shrink: 0; }
.topbar-stacked .xp-track {
  margin-top: 5px; height: 6px;
  background: rgba(5,10,30,0.55); border-radius: 999px;
  border: 1px solid rgba(147,197,253,0.15);
  overflow: hidden;
}
.topbar-stacked .xp-fill {
  height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, #6ee7b7, #93c5fd);
  box-shadow: 0 0 10px rgba(110,231,183,0.45);
  transition: width 0.5s cubic-bezier(.16,1,.3,1);
}

/* Currency pills inside topbar — uniform sizing + restore colored icons. */
.topbar-stacked .currency-pill {
  padding: 0 12px; gap: 8px;
  background: rgba(5,10,30,0.55);
  border: 1px solid rgba(147,197,253,0.18);
  border-radius: 10px;
  display: flex; align-items: center;
}
.topbar-stacked .currency-pill .cy-icon {
  width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
  flex-shrink: 0;
}
/* Restore colored icon backgrounds inside the topbar context (E35-fix). */
.topbar-stacked .currency-pill.bio .cy-icon {
  background: rgba(110,231,183,0.30); color: #6ee7b7;
  box-shadow: 0 0 10px rgba(110,231,183,0.55);
}
.topbar-stacked .currency-pill.dna .cy-icon {
  background: rgba(192,132,252,0.30); color: #c084fc;
  box-shadow: 0 0 10px rgba(192,132,252,0.55);
}
.topbar-stacked .currency-pill.rp .cy-icon {
  background: rgba(251,191,36,0.28); color: #fbbf24;
  box-shadow: 0 0 10px rgba(251,191,36,0.50);
}
.topbar-stacked .currency-pill .cy-label {
  font-size: 9px; letter-spacing: 1.6px; line-height: 1; opacity: 0.65;
}
.topbar-stacked .currency-pill b { font-size: 14px; line-height: 1.1; color: #fff; }

/* Pause button — uniform height. */
.topbar-stacked .pause-btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 12px; min-width: 38px;
  background: rgba(5,10,30,0.55);
  border: 1px solid rgba(147,197,253,0.22);
  border-radius: 10px; cursor: pointer; color: #e0f2fe;
  font-family: inherit; font-size: 14px;
  transition: all 0.18s ease;
}
.topbar-stacked .pause-btn:hover {
  border-color: rgba(147,197,253,0.5);
  background: rgba(96,165,250,0.18);
}
.topbar-stacked .pause-btn.on {
  background: rgba(251,191,36,0.18);
  border-color: rgba(251,191,36,0.55);
  color: #fbbf24;
}
.topbar-stacked .pause-btn span { font-size: 14px; line-height: 1; }

/* Speed control — uniform height with internal padding. */
.topbar-stacked .speed-control {
  display: inline-flex; align-items: center; gap: 2px; padding: 3px;
  background: rgba(5,10,30,0.55);
  border: 1px solid rgba(147,197,253,0.18);
  border-radius: 10px;
}
.topbar-stacked .speed-control button {
  height: 28px; padding: 0 8px; font-size: 11px; font-family: inherit;
  background: transparent; border: 0; color: rgba(224,242,254,0.6);
  cursor: pointer; border-radius: 7px; min-width: 32px;
  transition: background 0.15s, color 0.15s;
}
.topbar-stacked .speed-control button:hover { color: #fff; }
.topbar-stacked .speed-control button.on {
  background: rgba(96,165,250,0.30); color: #fff; font-weight: 600;
}

/* FPS badge — same 36px height as siblings. */
.fps-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 0 11px; border-radius: 10px;
  background: rgba(5,10,30,0.55); border: 1px solid rgba(147,197,253,0.18);
  font-family: ui-monospace, SFMono-Regular, monospace;
  font-size: 11px; font-variant-numeric: tabular-nums;
}
.fps-badge .fps-label { font-size: 9px; letter-spacing: 1.4px; opacity: 0.55; }
.fps-badge b { font-size: 13px; font-weight: 700; }

/* Nav row — uniform 40px buttons, comfortable padding. */
.topbar-stacked .tb-nav { gap: 4px; flex-wrap: nowrap; }
.topbar-stacked .tb-nav-btn {
  height: 40px; padding: 0 16px; font-size: 12px;
  border-radius: 10px;
  transition: all 0.18s cubic-bezier(.16,1,.3,1);
  letter-spacing: 0.4px;
  display: inline-flex; align-items: center; gap: 7px;
}
.topbar-stacked .tb-nav-btn.on {
  background: linear-gradient(180deg, rgba(96,165,250,0.35), rgba(96,165,250,0.20));
  border-color: rgba(147,197,253,0.6);
  color: #fff;
  box-shadow:
    0 0 22px rgba(96,165,250,0.35),
    0 1px 0 rgba(147,197,253,0.45) inset,
    0 -2px 8px rgba(96,165,250,0.20) inset;
}
.topbar-stacked .tb-nav-btn.on .tb-nav-icon {
  text-shadow: 0 0 10px rgba(147,197,253,0.85);
}
.tb-nav-icon {
  width: 28px; height: 28px; display: grid; place-items: center; flex: 0 0 28px;
  border-radius: 8px; overflow: hidden;
}
.tb-nav-icon img {
  width: 100%; height: 100%; display: block; object-fit: cover;
  filter: saturate(.82) brightness(.9); opacity: .82;
  transition: opacity .18s, filter .18s, transform .18s;
}
.tb-nav-btn:hover .tb-nav-icon img { opacity: 1; filter: saturate(1) brightness(1.08); transform: scale(1.05); }
.tb-nav-btn.on .tb-nav-icon img {
  opacity: 1; filter: saturate(1.08) brightness(1.12); transform: scale(1.08);
  box-shadow: 0 0 15px rgba(96,165,250,.44);
}

/* Hide the floating dev-overlay FPS pill — moved into the topbar (E34).
   The detail-overlay (backtick) keeps its own visibility logic. */
#petrie-fps-mini { display: none !important; }

/* ── HUD-grid variabelen (E38 — coach als 5e tab) ─────────────────── */
:root {
  --hud-margin:   16px;
  --hud-pad:      14px;
  --hud-gap:      10px;
  --hud-side-w:   320px;  /* iets breder met coach erbij */
  --hud-right-w:  220px;
  --hud-top:      172px;  /* topbar 156 + 16 gap */
  --mentor-h:     116px;
}

/* Left sidebar — full-height, single tabbed widget houdt alle content. */
.hud-left-column {
  position: fixed;
  left: var(--hud-margin);
  top: calc(var(--hud-top) + var(--mentor-h) + 10px);
  bottom: var(--hud-margin);
  width: var(--hud-side-w);
  display: flex; flex-direction: column;
  pointer-events: none; z-index: 11;
}
.stage:has(.mentor-dock.priority-critical:not(.collapsed)) .hud-left-column {
  top: calc(var(--hud-top) + 150px);
}
.stage:has(.mentor-dock.speaking:not(.collapsed)) .hud-left-column {
  top: calc(var(--hud-top) + 181px);
}

/* Permanente Dr. Xanthia-console — staat buiten de tabkeuze en verdwijnt
   dus niet wanneer onboarding of een specifiek paneel afgerond is. */
.mentor-dock {
  position: fixed; left: var(--hud-margin); top: var(--hud-top); z-index: 58;
  width: var(--hud-side-w); min-height: var(--mentor-h); padding: 10px;
  display: grid; grid-template-columns: 76px minmax(0,1fr); gap: 11px;
  color: #e0f2fe; border-radius: 15px; overflow: visible;
  background: linear-gradient(145deg, rgba(20,24,65,.94), rgba(7,19,47,.93));
  border: 1px solid rgba(192,132,252,.46);
  box-shadow: 0 14px 38px rgba(0,0,0,.46), 0 0 24px rgba(168,85,247,.14);
  backdrop-filter: blur(16px) saturate(1.2);
  transition: width .22s cubic-bezier(.16,1,.3,1), border-color .2s, box-shadow .2s;
}
.mentor-dock.mood-concerned { border-color: rgba(248,113,113,.62); box-shadow: 0 14px 38px rgba(0,0,0,.5),0 0 26px rgba(248,113,113,.18); }
.mentor-dock.mood-excited { border-color: rgba(110,231,183,.52); box-shadow: 0 14px 38px rgba(0,0,0,.46),0 0 25px rgba(110,231,183,.15); }
.mentor-dock.priority-critical { animation: mentorCritical 1.8s ease-in-out infinite; }
@keyframes mentorCritical { 0%,100%{border-color:rgba(248,113,113,.48)} 50%{border-color:rgba(248,113,113,.9)} }
.mentor-portrait { position: relative; width: 76px; height: 92px; padding: 0; overflow: hidden; border-radius: 12px; cursor: pointer; background: rgba(76,29,149,.22); border: 1px solid rgba(216,180,254,.42); }
.mentor-portrait img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; display: block; transition: transform .25s; }
.mentor-portrait:hover img { transform: scale(1.04); }
.mentor-presence-dot { position: absolute; right: 6px; bottom: 6px; width: 9px; height: 9px; border-radius: 50%; background: #6ee7b7; border: 2px solid #09132e; box-shadow: 0 0 9px #6ee7b7; }
.mentor-alert-dot { position:absolute; top:5px; right:5px; width:19px; height:19px; display:grid; place-items:center; border-radius:50%; color:#fff; background:#ef4444; font-size:11px; font-weight:900; box-shadow:0 0 12px rgba(239,68,68,.75); }
.mentor-content { min-width: 0; display:flex; flex-direction:column; gap:6px; }
.mentor-head { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.mentor-eyebrow { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:8px; line-height:1.2; letter-spacing:1.45px; font-weight:800; color:#d8b4fe; text-transform:uppercase; }
.mood-concerned .mentor-eyebrow { color:#fca5a5; }
.mood-excited .mentor-eyebrow { color:#a7f3d0; }
.mentor-tools { display:flex; gap:3px; flex-shrink:0; }
.mentor-tools button { height:19px; min-width:24px; padding:0 5px; border-radius:5px; cursor:pointer; color:rgba(224,242,254,.62); background:rgba(224,242,254,.05); border:1px solid rgba(224,242,254,.1); font:700 7px/1 inherit; letter-spacing:.4px; }
.mentor-tools button:hover,.mentor-tools button.on { color:#fff; border-color:rgba(147,197,253,.4); background:rgba(96,165,250,.16); }
.mentor-text { min-height:34px; font-size:11px; line-height:1.4; color:rgba(240,249,255,.92); animation:mentorTextIn .2s ease-out; }
@keyframes mentorTextIn { from{opacity:.2;transform:translateY(3px)} to{opacity:1;transform:none} }
.mentor-actions { display:flex; align-items:center; gap:5px; min-width:0; }
.mentor-action,.mentor-task { min-width:0; height:24px; padding:0 8px; border-radius:6px; cursor:pointer; font:700 8px/1 inherit; color:rgba(224,242,254,.76); border:1px solid rgba(147,197,253,.18); background:rgba(96,165,250,.08); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.mentor-action.primary { color:#07152f; background:linear-gradient(135deg,#a7f3d0,#7dd3fc); border-color:transparent; }
.mentor-task { flex:1; text-align:left; color:#c4b5fd; border-color:rgba(192,132,252,.25); background:rgba(76,29,149,.15); }
.mentor-history { position:absolute; left:0; top:calc(100% + 7px); width:100%; max-height:260px; padding:7px; overflow:auto; border-radius:11px; background:rgba(6,14,36,.97); border:1px solid rgba(192,132,252,.35); box-shadow:0 14px 32px rgba(0,0,0,.55); }
.mentor-history button { width:100%; display:flex; flex-direction:column; gap:2px; padding:7px 8px; text-align:left; color:#e0f2fe; background:transparent; border:0; border-bottom:1px solid rgba(224,242,254,.07); cursor:pointer; }
.mentor-history button:hover { background:rgba(96,165,250,.1); }
.mentor-history span { font-size:7px; letter-spacing:1px; text-transform:uppercase; opacity:.5; }
.mentor-history b { font-size:9px; line-height:1.3; font-weight:500; }
.mentor-history-empty { padding:12px; text-align:center; font-size:9px; opacity:.5; }
.mentor-mode-settings { display:flex; flex-direction:column; gap:5px; }
.mentor-mode-settings button { display:flex; flex-direction:column; gap:2px; padding:8px 9px; text-align:left; cursor:pointer; color:#e0f2fe; background:rgba(224,242,254,.04); border:1px solid rgba(224,242,254,.09); border-radius:8px; font:inherit; }
.mentor-mode-settings button.on { border-color:rgba(110,231,183,.48); background:rgba(110,231,183,.09); }
.mentor-mode-settings b { font-size:11px; color:#fff; }
.mentor-mode-settings span { font-size:9px; opacity:.58; }
.mentor-dock.collapsed { width:96px; grid-template-columns:76px; }
.mentor-dock.collapsed .mentor-portrait { height:92px; }
body.right-panel-open .mentor-dock { opacity:.25; pointer-events:none; }
body.compact-ui .mentor-dock { width:280px; }
body.compact-ui .mentor-dock.collapsed { width:96px; }

@media (max-width: 900px) {
  :root { --mentor-h: 0px; }
  .mentor-dock { top:auto; left:8px; bottom:86px; width:min(360px,calc(100vw - 16px)); z-index:75; }
  .mentor-dock.collapsed { width:62px; min-height:62px; padding:4px; grid-template-columns:52px; border-radius:999px; }
  .mentor-dock.collapsed .mentor-portrait { width:52px; height:52px; border-radius:50%; }
}
.hud-left-column > * { pointer-events: auto; flex: 1; min-height: 0; }

/* ── Tabbed sidebar (E37) — één widget met tabs per content-type. */
.hud-tabbed {
  display: flex; flex-direction: column;
  height: 100%; max-height: 100%;
  border-radius: 14px;
  overflow: hidden;
  background: rgba(12,30,70,0.72);
  border: 1px solid rgba(224,242,254,0.18);
  backdrop-filter: blur(18px) saturate(1.2);
  box-shadow: 0 18px 50px rgba(0,0,0,0.45), 0 0 24px rgba(96,165,250,0.10);
}
.hud-tabs {
  display: flex; gap: 3px; padding: 6px;
  background: rgba(5,10,30,0.45);
  border-bottom: 1px solid rgba(224,242,254,0.10);
  flex-shrink: 0;
}
.hud-tab {
  flex: 1; min-width: 0;
  padding: 6px 4px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  color: rgba(224,242,254,0.55);
  cursor: pointer;
  font-family: inherit;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  transition: all 0.15s ease;
}
.hud-tab:hover { color: #fff; background: rgba(96,165,250,0.10); }
.hud-tab.on {
  color: #fff;
  background: linear-gradient(180deg, rgba(96,165,250,0.30), rgba(96,165,250,0.18));
  border-color: rgba(147,197,253,0.50);
  box-shadow: 0 0 12px rgba(96,165,250,0.25), 0 1px 0 rgba(147,197,253,0.40) inset;
}
.hud-tab-icon { width: 24px; height: 24px; display:grid; place-items:center; overflow:hidden; border-radius:7px; font-size: 14px; line-height: 1; }
.hud-tab-icon img { width:100%; height:100%; object-fit:cover; opacity:.78; filter:saturate(.75) brightness(.86); }
.hud-tab.on .hud-tab-icon img { opacity:1; filter:saturate(1) brightness(1.1); box-shadow:0 0 12px rgba(96,165,250,.35); }
.hud-tab-label { font-size: 9px; letter-spacing: 1px; line-height: 1; font-weight: 600; }
.hud-tab-body {
  flex: 1; min-height: 0;
  padding: 16px;
  overflow-y: auto;
}
/* Uniforme typografie binnen elke tab — eyebrows, headers, lists. */
.hud-tab-body .mission-eyebrow,
.hud-tab-body .daily-eyebrow,
.hud-tab-body .legend-eyebrow,
.hud-tab-body .tutorial-eyebrow {
  font-size: 9px;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  opacity: 0.55;
  margin-bottom: 10px;
}
.hud-tab-body .progression-focus,
.hud-tab-body .rivalry-leader,
.hud-tab-body .tutorial-title {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
  line-height: 1.3;
}
/* Kaart-rijen binnen tabs — uniform padding, border, spacing. */
.hud-tab-body .progression-row,
.hud-tab-body .daily-row,
.hud-tab-body .rivalry-row {
  padding: 9px 11px !important;
  border-radius: 8px;
  margin: 0 0 6px;
  font-size: 11px;
}
.hud-tab-body .progression-mini button {
  padding: 7px 8px !important;
  font-size: 10px;
}
.hud-tab-body .progression-mini { gap: 6px; margin-top: 10px; }
.hud-tab-body .daily-list,
.hud-tab-body .rivalry-list { gap: 6px; margin-top: 0; }
/* Voorkom dat lijst-items uitlopen of overlappen */
.hud-tab-body .legend-rows { gap: 7px; font-size: 11px; }
/* Reset embedded widget chrome — outer tabbed shell levert de glass-look. */
.hud-tab-body > *,
.hud-tab-body > * > * {
  max-width: 100% !important;
}
.hud-tab-body > * {
  position: static !important;
  left: auto !important; right: auto !important;
  top: auto !important; bottom: auto !important;
  width: 100% !important;
  margin: 0 !important; padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  backdrop-filter: none !important;
}
/* Coach-tab — twee widgets met fancy scheidingslijn ertussen. */
.coach-tab-stack {
  display: flex; flex-direction: column;
  gap: 0;
}
.coach-tab-stack > * {
  position: static !important;
  left: auto !important; right: auto !important;
  top: auto !important; bottom: auto !important;
  width: 100% !important; max-width: 100% !important;
  margin: 0 !important; padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  backdrop-filter: none !important;
}
/* Mooie horizontale gradient-lijn tussen siblings in de coach-stack. */
.coach-tab-stack > * + *::before {
  content: '';
  display: block;
  height: 1px;
  margin: 14px 0;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(192,132,252,0.40) 25%,
    rgba(147,197,253,0.45) 50%,
    rgba(192,132,252,0.40) 75%,
    transparent 100%);
  box-shadow: 0 0 8px rgba(192,132,252,0.25);
}

body.compact-ui .hud-left-column { width: 280px; }
.speed-control {
  display: inline-flex; align-items: center; gap: 3px; height: 32px; padding: 3px;
  border-radius: 10px; border: 1px solid rgba(224,242,254,0.12);
  background: rgba(5,10,30,0.34);
}
.speed-control button {
  height: 24px; min-width: 32px; padding: 0 7px; border-radius: 7px;
  border: 1px solid transparent; background: transparent; color: rgba(224,242,254,0.66);
  font: inherit; font-size: 10px; font-weight: 650; cursor: pointer;
}
.speed-control button:hover {
  background: rgba(224,242,254,0.07); color: #fff;
}
.speed-control button.on {
  background: rgba(96,165,250,0.22); border-color: rgba(147,197,253,0.42);
  color: #fff; box-shadow: 0 0 12px rgba(96,165,250,0.22);
}
.pause-btn {
  display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 11px;
  border-radius: 10px; border: 1px solid rgba(224,242,254,0.14);
  background: rgba(224,242,254,0.045); color: rgba(224,242,254,0.82);
  font: inherit; cursor: pointer; transition: all 0.16s ease;
}
.pause-btn:hover {
  background: rgba(96,165,250,0.13); border-color: rgba(147,197,253,0.36); color: #fff;
}
.pause-btn.on {
  background: rgba(110,231,183,0.14); border-color: rgba(110,231,183,0.42); color: #fff;
  box-shadow: 0 0 18px rgba(110,231,183,0.18);
}
.pause-btn span {
  width: 17px; height: 17px; display: inline-grid; place-items: center; font-size: 12px;
}
.pause-btn b { font-size: 11px; font-weight: 650; }
.tb-eyebrow { font-size: 9px; letter-spacing: 2px; opacity: 0.5; }
.tb-line { font-size: 12px; }
.tb-line b { font-weight: 600; color: #fff; text-shadow: 0 0 6px rgba(224,242,254,0.5); }
.tb-ring { position: relative; width: 32px; height: 32px; }
.tb-ring-text { position: absolute; inset: 0; display: flex; align-items: center;
  justify-content: center; font-size: 11px; font-weight: 600; color: #E0F2FE; }
.res { display: flex; align-items: center; gap: 8px; }
.res-icon { font-size: 14px; opacity: 0.8; }
.topbar-glass {
  height: 60px; margin: 12px; left: 12px; right: 12px; top: 0;
  background: rgba(12, 30, 70, 0.4); backdrop-filter: blur(14px);
  border: 1px solid var(--glass-bord); border-radius: 14px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.35); padding: 0 20px;
}

.pause-overlay {
  position: absolute; inset: 0; z-index: 12; pointer-events: none;
  display: grid; place-items: center;
  background: rgba(5,10,30,0.18);
}
.pause-card {
  width: min(420px, calc(100vw - 32px)); padding: 18px; pointer-events: auto;
  display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 14px; align-items: center;
  background: rgba(8,19,48,0.78);
}
.pause-icon {
  width: 52px; height: 52px; display: grid; place-items: center;
  border-radius: 14px; color: #fff; font-size: 26px;
  background: rgba(96,165,250,0.18); border: 1px solid rgba(147,197,253,0.34);
  box-shadow: 0 0 22px rgba(96,165,250,0.22);
}
.pause-eyebrow {
  font-size: 9px; letter-spacing: 2.2px; color: rgba(224,242,254,0.58);
}
.pause-card h2 {
  margin: 4px 0 5px; font-size: 24px; line-height: 1; color: #fff;
}
.pause-card p {
  margin: 0; font-size: 12px; line-height: 1.45; color: rgba(224,242,254,0.72);
}
.pause-card .g-btn {
  grid-column: 1 / -1; width: 100%;
}

/* ── Floating selection panel ────── */
.float-panel {
  position: absolute; width: 230px;
  background: rgba(12, 30, 70, 0.6);
  backdrop-filter: blur(18px) saturate(1.2);
  border: 1px solid rgba(224, 242, 254, 0.25);
  border-radius: 14px; padding: 12px; z-index: 20;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5), 0 0 24px rgba(96,165,250,0.2);
  animation: panelIn 0.28s cubic-bezier(.16,1,.3,1); color: #E0F2FE;
}

/* E120 — Action ring: ronde knoppen in halve cirkel LINKS van geselecteerd organisme. */
.org-action-ring {
  position: absolute; width: 0; height: 0; z-index: 22;
  pointer-events: none; /* alleen knoppen vangen clicks */
  animation: ringIn 0.32s cubic-bezier(.16,1,.3,1);
}
@keyframes ringIn {
  from { opacity: 0; transform: translate(8px, 0) scale(0.92); }
  to   { opacity: 1; transform: translate(0, 0) scale(1); }
}
.oar-btn {
  position: absolute; pointer-events: auto;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(30,60,120,0.85), rgba(8,16,40,0.92));
  border: 1px solid rgba(147,197,253,0.55);
  color: #E0F2FE;
  box-shadow: 0 6px 18px rgba(0,0,0,0.55), 0 0 14px rgba(96,165,250,0.25),
              inset 0 1px 0 rgba(255,255,255,0.10);
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease, background 140ms ease;
  font-family: inherit;
  padding: 0;
}
.oar-btn:hover {
  transform: scale(1.12);
  border-color: rgba(147,197,253,0.95);
  box-shadow: 0 10px 26px rgba(0,0,0,0.6), 0 0 22px rgba(96,165,250,0.55),
              inset 0 1px 0 rgba(255,255,255,0.18);
  z-index: 2;
}
.oar-btn.active {
  border-color: #fbbf24;
  box-shadow: 0 8px 22px rgba(0,0,0,0.55), 0 0 18px rgba(251,191,36,0.55),
              inset 0 1px 0 rgba(255,255,255,0.18);
  background: radial-gradient(circle at 30% 30%, rgba(80,55,15,0.85), rgba(20,12,4,0.92));
}
.oar-btn.danger {
  border-color: rgba(252,165,165,0.55);
  background: radial-gradient(circle at 30% 30%, rgba(80,20,30,0.85), rgba(20,4,8,0.92));
}
.oar-btn.danger:hover {
  border-color: #fca5a5;
  box-shadow: 0 10px 26px rgba(0,0,0,0.6), 0 0 22px rgba(248,113,113,0.55),
              inset 0 1px 0 rgba(255,255,255,0.18);
}
.oar-btn.disabled {
  opacity: 0.42; cursor: not-allowed; filter: grayscale(0.5);
}
.oar-btn.disabled:hover { transform: none; box-shadow: 0 6px 18px rgba(0,0,0,0.55); }
.oar-ico { font-size: 20px; line-height: 1; }
.oar-cost {
  position: absolute; bottom: 3px; right: 4px;
  font-size: 9px; font-weight: 600; letter-spacing: 0.3px;
  background: rgba(8,16,40,0.85);
  border: 1px solid rgba(147,197,253,0.45);
  border-radius: 8px;
  padding: 1px 5px;
  color: #c084fc;
  pointer-events: none;
}
@keyframes panelIn {
  from { opacity: 0; transform: translate(-10px, 6px) scale(0.94); }
  to { opacity: 1; transform: translate(0, 0) scale(1); }
}
.float-panel-line { position: absolute; top: 30px; height: 1px;
  background: linear-gradient(90deg, rgba(224,242,254,0.6), transparent); pointer-events: none; }
.float-panel-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--line);
}
.x-btn { background: transparent; border: none; color: rgba(224,242,254,0.5);
  font-size: 18px; cursor: pointer; line-height: 1; padding: 0 4px; }
.x-btn:hover { color: #fff; }
.arch-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.arch-pill {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px;
  border: 1px solid; border-radius: 999px; font-size: 11px; letter-spacing: 0.5px;
}
.rarity-pill {
  display: inline-flex; align-items: center; padding: 3px 9px;
  border-radius: 999px; border: 1px solid rgba(224,242,254,0.12);
  font-size: 10px; background: rgba(224,242,254,0.05);
}
.rarity-zeldzaam, .rarity-rare { color: #93c5fd; border-color: rgba(147,197,253,0.42); }
.rarity-episch, .rarity-epic { color: #c084fc; border-color: rgba(192,132,252,0.48); }
.rarity-legendarisch, .rarity-legendary { color: #fbbf24; border-color: rgba(251,191,36,0.55); }
.lineage-card {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 8px 0;
}
.lineage-card div {
  min-width: 0; padding: 5px 6px; border-radius: 6px;
  background: rgba(5,10,30,0.28); border: 1px solid rgba(224,242,254,0.08);
}
.lineage-card span { display: block; font-size: 8px; letter-spacing: 1px; opacity: 0.55; text-transform: uppercase; }
.lineage-card b { display: block; margin-top: 2px; font-size: 10px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.arch-badge {
  display: inline-block; margin-left: 10px; padding: 3px 10px;
  font-size: 10px; letter-spacing: 1.5px; border: 1px solid; border-radius: 999px;
  vertical-align: middle;
}
.float-panel-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; margin-bottom: 12px; }
.fp-stat { display: flex; flex-direction: column; gap: 1px; }
.fp-stat span { font-size: 9px; letter-spacing: 1.5px; opacity: 0.55; }
.fp-stat b { font-size: 13px; font-weight: 600; color: #fff;
  text-shadow: 0 0 6px rgba(224,242,254,0.4); }
.float-panel-actions { display: flex; flex-direction: column; gap: 6px; }
.action-btn {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; font-size: 12px;
  background: rgba(224,242,254,0.05); border: 1px solid rgba(224,242,254,0.12);
  color: #E0F2FE; cursor: pointer; font-family: inherit; transition: all 0.15s; text-align: left;
}
.action-btn:hover { background: rgba(96,165,250,0.18); border-color: rgba(147,197,253,0.4); }
.action-btn.active { background: rgba(96,165,250,0.3); border-color: #93c5fd;
  box-shadow: 0 0 14px rgba(147,197,253,0.4); }
.action-btn.danger:hover { background: rgba(248,113,113,0.18); border-color: rgba(248,113,113,0.5); }
.ab-icon { width: 18px; text-align: center; }

/* ── Lab overlay (DNA editor) ────── */
.lab-overlay {
  position: absolute; inset: 0; z-index: 30;
  background: rgba(5, 10, 30, 0.5); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center; animation: fadeIn 0.25s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.lab-card {
  width: min(1320px, 96vw);
  max-height: calc(100% - 28px); overflow: hidden;
  background: rgba(12, 30, 70, 0.6); backdrop-filter: blur(20px) saturate(1.2);
  border: 1px solid rgba(224, 242, 254, 0.25); border-radius: 22px;
  padding: 22px 26px 18px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.6), 0 0 60px rgba(59,130,246,0.15);
  animation: labIn 0.32s cubic-bezier(.2,.8,.3,1);
}
@keyframes labIn {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.lab-header {
  display: flex; justify-content: space-between; align-items: flex-end;
  border-bottom: 1px solid var(--line); padding-bottom: 14px; margin-bottom: 16px;
}
.dna-mode-switch {
  display: flex; align-items: center; gap: 3px; padding: 3px;
  border-radius: 9px; background: rgba(5,10,30,.55); border: 1px solid rgba(147,197,253,.16);
}
.dna-mode-btn {
  border: 0; border-radius: 6px; padding: 6px 10px; cursor: pointer;
  background: transparent; color: rgba(224,242,254,.55); font: 700 10px/1 Inter, sans-serif;
  letter-spacing: .6px;
}
.dna-mode-btn:hover { color: #fff; background: rgba(147,197,253,.08); }
.dna-mode-btn.on { color: #fff; background: rgba(59,130,246,.28); box-shadow: inset 0 0 0 1px rgba(147,197,253,.3); }
.lab-eyebrow { font-size: 10px; letter-spacing: 3px; opacity: 0.5; }
.lab-title { font-size: 22px; font-weight: 600; text-shadow: 0 0 12px rgba(224,242,254,0.4); }

.lab-body-v2 {
  display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 22px;
  max-height: calc(100vh - 190px); overflow: hidden;
  min-width: 0;
}
.lab-body-v2 > * { min-width: 0; }
.lab-preview {
  min-width: 0; overflow-y: auto; padding-right: 4px;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.lab-preview canvas {
  border-radius: 50%; border: 1px solid rgba(224,242,254,0.2);
  background: radial-gradient(circle at 30% 30%, rgba(40,90,180,0.4), rgba(5,10,30,0.9));
  box-shadow: 0 0 30px rgba(96,165,250,0.25);
}
.lab-stats { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.lab-stat {
  display: flex; justify-content: space-between; padding: 4px 8px;
  background: rgba(224,242,254,0.04); border-radius: 6px; font-size: 11px;
}
.lab-stat span { opacity: 0.6; } .lab-stat b { color: #fff; }
.lab-cap-grid { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.lab-cap {
  min-width: 0; display: flex; justify-content: space-between; align-items: center; gap: 6px;
  padding: 5px 7px; border-radius: 7px; font-size: 10px;
  background: rgba(96,165,250,0.09); border: 1px solid rgba(147,197,253,0.16);
}
.lab-cap.locked { opacity: 0.45; border-color: rgba(251,191,36,0.14); background: rgba(251,191,36,0.04); }
.lab-cap span { opacity: 0.64; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lab-cap b { color: #fff; font-variant-numeric: tabular-nums; }

/* ── Pose toggle ── */
.pose-toggle { display: flex; gap: 4px; width: 100%; }
.pose-btn {
  flex: 1; padding: 4px 6px; font-size: 9px; font-weight: 600; letter-spacing: 0.8px;
  font-family: inherit; border-radius: 7px; cursor: pointer; text-align: center;
  background: rgba(224,242,254,0.04); border: 1px solid rgba(224,242,254,0.1);
  color: rgba(224,242,254,0.55); transition: all 0.15s;
}
.pose-btn:hover { background: rgba(224,242,254,0.08); color: #fff; }
.pose-btn.on { background: rgba(59,130,246,0.2); border-color: rgba(147,197,253,0.4); color: #fff; }
.pose-btn.attack.on { background: rgba(239,68,68,0.2); border-color: rgba(248,113,113,0.4); }
.pose-btn.defend.on { background: rgba(59,130,246,0.2); border-color: rgba(96,165,250,0.4); }
.pose-btn.social.on { background: rgba(192,132,252,0.2); border-color: rgba(192,132,252,0.45); }
.pose-btn.hungry.on { background: rgba(251,191,36,0.2); border-color: rgba(251,191,36,0.45); }
.pose-btn.dormant.on { background: rgba(148,163,184,0.15); border-color: rgba(148,163,184,0.35); }

/* ── Radar chart ── */
.radar-label { font-size: 9px; letter-spacing: 2px; opacity: 0.45; margin-top: 4px; }
.radar-label.behav { color: #c084fc; }
.radar-canvas {
  border-radius: 50%; background: rgba(5,10,30,0.4);
  border: 1px solid rgba(224,242,254,0.08);
}
.radar-canvas.behav { border-color: rgba(192,132,252,0.15); }
/* E188 — Vergrote fenotype-radar met categorie-overlay + legend */
.radar-canvas.big { display: block; margin: 4px auto 2px; }
.radar-legend {
  display: grid; grid-template-columns: repeat(3, auto);
  gap: 4px 10px;
  margin: 4px auto 8px;
  font-size: 9px; letter-spacing: 0.4px;
  justify-content: center;
  opacity: 0.85;
}
.radar-legend-item {
  display: inline-flex; align-items: center; gap: 4px;
  color: rgba(224,242,254,0.78);
}
.radar-legend-dot {
  width: 8px; height: 8px; border-radius: 2px;
  display: inline-block;
}

/* ── Gene matrix with bars + costs ── */
.gene-matrix { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-content: start;
  overflow-y: auto; overflow-x: hidden; max-height: calc(100vh - 200px); padding-right: 4px;
  min-width: 0; }
.gene-cat { min-width: 0; }
.gene-rows { min-width: 0; }
.gene-row { min-width: 0; }
.gene-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 1200px) {
  .gene-matrix { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .gene-matrix { grid-template-columns: minmax(0, 1fr); }
  .lab-body-v2 { grid-template-columns: 1fr; }
}
/* E105 — Mobile DNA-editor: grotere touch-targets + minder visual noise */
@media (max-width: 700px), (pointer: coarse) {
  .gene-row {
    grid-template-columns: 26px 22px 1fr auto 60px;
    padding: 6px 0;
    min-height: 38px;
  }
  .gene-slider {
    height: 28px;
    accent-color: #fbbf24;
  }
  .gene-slider::-webkit-slider-thumb {
    width: 22px; height: 22px;
  }
  .mini-toggle {
    width: 28px; height: 16px;
  }
  .mini-toggle-dot {
    width: 12px; height: 12px;
  }
  .enum-pill {
    padding: 6px 10px;
    font-size: 11px;
    min-height: 32px;
    min-width: 60px;
  }
  .lab-card {
    padding: 14px 12px 10px;
  }
  .lab-header { flex-wrap: wrap; gap: 8px; }
  .lab-title { font-size: 18px; }
}
.gene-cat { background: rgba(5,10,30,0.4); border: 1px solid var(--line);
  border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.gene-cat-head { display: flex; align-items: center; gap: 8px; padding-bottom: 6px;
  border-bottom: 1px solid var(--line); }
.gene-cat-dot { width: 8px; height: 8px; border-radius: 50%; box-shadow: 0 0 8px currentColor; }
.gene-cat-label { font-size: 10px; letter-spacing: 2px; opacity: 0.7; flex: 1; }
.gene-cat-count { font-size: 10px; opacity: 0.4; }
.gene-rows { display: flex; flex-direction: column; gap: 8px; }
.gene-row {
  display: grid; grid-template-columns: 22px 18px 1fr auto 50px;
  align-items: center; gap: 2px 5px; font-size: 11px;
  transition: opacity 0.15s;
}
.gene-row.off { opacity: 0.4; }
.gene-row.off .gene-slider { opacity: 0.4; }
.gene-row.locked .gene-label::after { content: ' [slot]'; color: #fbbf24; font-size: 9px; opacity: 0.8; }
.gene-icon { font-size: 14px; text-align: center; }
.gene-label { color: rgba(224,242,254,0.85); font-weight: 500; }
.gene-val { font-size: 10px; opacity: 0.7; text-align: right; font-variant-numeric: tabular-nums; }

/* cost badge per gene */
.gene-cost-badge {
  font-size: 8px; color: #c084fc; font-weight: 600;
  background: rgba(192,132,252,0.1); padding: 1px 5px;
  border-radius: 4px; border: 1px solid rgba(192,132,252,0.2);
  white-space: nowrap;
}

/* stat bar under label */
.gene-bar-wrap { grid-column: 3 / 6; height: 3px; margin-top: 1px; }
.gene-bar {
  width: 100%; height: 100%; border-radius: 2px;
  background: rgba(224,242,254,0.06); overflow: hidden;
}
.gene-bar-fill {
  height: 100%; border-radius: 2px; transition: width 0.2s ease;
  background: linear-gradient(90deg, #3b82f6, #93c5fd);
}
.gene-row.off .gene-bar-fill { opacity: 0.3; }

.gene-slider { grid-column: 3 / 6; width: 100%; margin-top: 1px; }

.gene-enum { grid-column: 3 / 6; display: flex; gap: 3px; flex-wrap: wrap; }
.enum-pill {
  padding: 2px 6px; font-size: 9px; letter-spacing: 0.5px;
  background: rgba(224,242,254,0.04); border: 1px solid var(--line);
  border-radius: 4px; color: #E0F2FE; cursor: pointer; font-family: inherit;
}
.enum-pill.on { background: rgba(96,165,250,0.3); border-color: rgba(147,197,253,0.6); }
.enum-pill:disabled { opacity: 0.4; cursor: not-allowed; }

.mini-toggle {
  width: 22px; height: 13px; padding: 1px;
  background: rgba(224,242,254,0.1); border: 1px solid rgba(224,242,254,0.2);
  border-radius: 999px; cursor: pointer; position: relative; transition: all 0.15s;
}
.mini-toggle.on { background: rgba(59,130,246,0.4); border-color: #93c5fd; }
.mini-toggle-dot {
  position: absolute; top: 1px; left: 1px; width: 9px; height: 9px;
  border-radius: 50%; background: rgba(224,242,254,0.6); transition: all 0.15s;
}
.mini-toggle.on .mini-toggle-dot { left: 10px; background: #fff; box-shadow: 0 0 6px #fff; }

.lab-foot { display: flex; justify-content: space-between; align-items: center;
  margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }

/* ── Pinned env card ───────── */
.env-card {
  position: absolute; right: 16px; top: 172px; width: 260px;
  padding: 14px; z-index: 11;
}
.env-card-head { display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.env-eyebrow { font-size: 9px; letter-spacing: 2.5px; opacity: 0.55; }
.env-title { font-size: 15px; font-weight: 600; }
.env-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.env-slider { font-size: 10px; }
.env-slider-label { display: flex; justify-content: space-between; margin-bottom: 4px; }
.env-slider b { color: #fff; font-weight: 600; }
.env-introduce { padding-top: 12px; margin-top: 12px; border-top: 1px solid var(--line); }
.env-chip-row { display: flex; flex-wrap: wrap; gap: 5px; }
.env-chip {
  padding: 4px 9px; font-size: 10px;
  background: rgba(224,242,254,0.05); border: 1px solid var(--line);
  border-radius: 999px; color: #E0F2FE; cursor: pointer; font-family: inherit;
}
.env-chip:hover { background: rgba(96,165,250,0.18); border-color: rgba(147,197,253,0.4); }
.env-chip.locked {
  border-color: rgba(251,191,36,0.22);
}

/* ── Legend ─────────── */
.legend {
  position: absolute; left: 16px; top: 172px; width: 170px;
  padding: 12px; z-index: 11;
}
.legend-eyebrow { font-size: 9px; letter-spacing: 2.5px; opacity: 0.55; margin-bottom: 8px; }
.legend-rows { display: flex; flex-direction: column; gap: 6px; font-size: 11px; }
.legend-row { display: flex; align-items: center; gap: 8px; }
.legend-dot { width: 8px; height: 8px; border-radius: 50%; box-shadow: 0 0 6px currentColor; }
.legend-sep { height: 1px; background: var(--line); margin: 4px 0; }
.legend-tri {
  width: 0; height: 0; border-left: 8px solid #E0F2FE;
  border-top: 4px solid transparent; border-bottom: 4px solid transparent;
  filter: drop-shadow(0 0 3px rgba(224,242,254,0.7));
}
.legend-arc {
  width: 14px; height: 8px;
  border: 1.5px solid rgba(224,242,254,0.6); border-bottom: none;
  border-radius: 14px 14px 0 0;
}
.legend-bar {
  width: 14px; height: 4px; background: #60a5fa; border-radius: 2px;
  box-shadow: 0 -3px 0 #E0F2FE;
}

/* ── Toast (E42) ─────────────────────────────────────────────────── */
.toast-stack {
  position: fixed; right: 24px; bottom: 24px;
  display: flex; flex-direction: column; gap: 8px;
  z-index: 60; pointer-events: none;
  max-width: 360px;
}
.toast-stack > .toast { pointer-events: auto; }
.toast {
  padding: 10px 14px; display: flex; align-items: center; gap: 10px;
  background: rgba(12, 30, 70, 0.78); backdrop-filter: blur(14px);
  border: 1px solid rgba(147,197,253,0.4); border-radius: 12px;
  color: #E0F2FE; font-size: 12px; line-height: 1.4;
  box-shadow: 0 8px 30px rgba(0,0,0,0.45), 0 0 20px rgba(96,165,250,0.18);
  animation: toastIn 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: pointer; transition: transform 0.15s, opacity 0.15s;
}
.toast:hover { transform: translateX(-2px); }
.toast-icon {
  flex-shrink: 0; width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
  border-radius: 50%;
  background: rgba(147,197,253,0.18);
  color: #93c5fd;
}
.toast-text { flex: 1; }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px) scale(0.96); } to { opacity: 1; transform: translateY(0) scale(1); } }

/* legacy single-toast still used by NotifToast (kept for safety) */
.toast-stack .toast { position: static; right: auto; bottom: auto; }
.toast-dot { width: 8px; height: 8px; border-radius: 50%; background: #93c5fd;
  box-shadow: 0 0 10px #93c5fd; animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { opacity: 0.4; } }

/* type-specific accents */
.toast.toast-success { border-color: rgba(110,231,183,0.45); box-shadow: 0 8px 30px rgba(0,0,0,0.45), 0 0 20px rgba(110,231,183,0.20); }
.toast.toast-success .toast-icon { background: rgba(110,231,183,0.20); color: #6ee7b7; }
.toast.toast-unlock {
  border-color: rgba(192,132,252,0.55);
  background: linear-gradient(135deg, rgba(46,16,82,0.85), rgba(12,30,70,0.85));
  box-shadow: 0 8px 30px rgba(0,0,0,0.5), 0 0 28px rgba(192,132,252,0.35);
}
.toast.toast-unlock .toast-icon {
  background: rgba(192,132,252,0.25); color: #fbbf24;
  box-shadow: 0 0 12px rgba(251,191,36,0.45);
}
.toast.toast-warn { border-color: rgba(251,146,60,0.50); }
.toast.toast-warn .toast-icon { background: rgba(251,146,60,0.20); color: #fb923c; }
.toast.toast-error { border-color: rgba(248,113,113,0.55); }
.toast.toast-error .toast-icon { background: rgba(248,113,113,0.20); color: #f87171; }

/* Centrale meldingsrail — vrije corridor onder de 156px topbar, begrensd
   tussen de linker coachkolom en de rechter runkolom. Eén kaart tegelijk. */
.notification-center {
  position: fixed;
  top: 164px;
  left: calc(var(--hud-margin) + var(--hud-side-w) + 24px);
  right: calc(var(--hud-margin) + var(--hud-right-w) + 24px);
  z-index: 70;
  display: flex;
  justify-content: center;
  pointer-events: none;
}
.notification-rail {
  position: relative;
  width: min(560px, 100%);
  min-height: 42px;
  display: grid;
  grid-template-columns: 26px minmax(0,1fr) auto auto auto;
  align-items: center;
  gap: 8px;
  padding: 7px 8px 7px 9px;
  color: #e0f2fe;
  background: linear-gradient(135deg, rgba(10,25,58,.94), rgba(7,17,43,.93));
  border: 1px solid rgba(147,197,253,.38);
  border-radius: 11px;
  box-shadow: 0 10px 28px rgba(0,0,0,.46), 0 0 20px rgba(96,165,250,.12);
  backdrop-filter: blur(16px) saturate(1.2);
  pointer-events: auto;
  animation: notificationRailIn .24s cubic-bezier(.16,1,.3,1);
}
@keyframes notificationRailIn {
  from { opacity: 0; transform: translateY(-7px) scale(.98); }
  to { opacity: 1; transform: none; }
}
.notification-icon {
  width: 26px; height: 26px; display: grid; place-items: center;
  border-radius: 8px; color: #bfdbfe; background: rgba(96,165,250,.14);
  font-size: 13px; font-weight: 900;
}
.notification-art { object-fit: cover; padding: 0; }
.notification-copy { min-width: 0; display: flex; align-items: baseline; gap: 8px; }
.notification-copy b {
  flex-shrink: 0; color: #93c5fd; font-size: 8px; letter-spacing: 1.25px;
  text-transform: uppercase; white-space: nowrap;
}
.notification-copy span {
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: rgba(240,249,255,.9); font-size: 10.5px; line-height: 1.3;
}
.notification-queued {
  min-width: 22px; padding: 3px 5px; border-radius: 999px; text-align: center;
  color: #c4b5fd; background: rgba(139,92,246,.13); border: 1px solid rgba(192,132,252,.24);
  font-size: 8px; font-weight: 800;
}
.notification-log-btn,.notification-close {
  height: 24px; padding: 0 6px; border-radius: 6px; cursor: pointer;
  color: rgba(224,242,254,.62); background: rgba(224,242,254,.045);
  border: 1px solid rgba(224,242,254,.11); font: 800 7px/1 inherit;
}
.notification-close { width: 24px; padding: 0; font-size: 15px; font-weight: 500; }
.notification-log-btn:hover,.notification-log-btn.on,.notification-close:hover { color:#fff; border-color:rgba(147,197,253,.4); background:rgba(96,165,250,.14); }
.notification-success { border-color: rgba(110,231,183,.46); }
.notification-success .notification-icon { color:#6ee7b7; background:rgba(16,185,129,.13); }
.notification-unlock { border-color: rgba(192,132,252,.55); box-shadow:0 10px 28px rgba(0,0,0,.46),0 0 22px rgba(168,85,247,.16); }
.notification-unlock .notification-icon { color:#fde68a; background:rgba(168,85,247,.16); }
.notification-warn { border-color: rgba(251,146,60,.52); }
.notification-warn .notification-icon { color:#fdba74; background:rgba(234,88,12,.13); }
.notification-error { border-color: rgba(248,113,113,.6); }
.notification-error .notification-icon { color:#fca5a5; background:rgba(239,68,68,.14); }
.notification-history {
  position: absolute; top: calc(100% + 6px); left:50%; transform:translateX(-50%);
  width: min(560px,100%); max-height: 300px;
  padding: 8px; overflow-y: auto; pointer-events: auto; border-radius: 11px;
  color: #e0f2fe; background: rgba(5,13,34,.97); border: 1px solid rgba(147,197,253,.3);
  box-shadow: 0 18px 42px rgba(0,0,0,.58); backdrop-filter: blur(18px);
}
.notification-history-head { padding: 3px 7px 7px; color:#93c5fd; font-size:8px; font-weight:800; letter-spacing:1.4px; }
.notification-history-row { display:grid; grid-template-columns:22px minmax(0,1fr); align-items:start; gap:7px; padding:7px; border-top:1px solid rgba(224,242,254,.07); }
.notification-history-icon { width:22px; height:22px; display:grid; place-items:center; border-radius:6px; background:rgba(96,165,250,.1); font-size:10px; }
.notification-history-icon.notification-art { object-fit: cover; border: 1px solid rgba(147,197,253,.2); }
.notification-history-row > div { min-width:0; display:flex; flex-direction:column; gap:2px; }
.notification-history-row b { color:#fff; font-size:8px; letter-spacing:.8px; text-transform:uppercase; }
.notification-history-row span { color:rgba(224,242,254,.67); font-size:9px; line-height:1.3; }

.cross-dish-panel {
  position: absolute; right: 22px; bottom: 22px; width: 308px;
  padding: 14px; z-index: 13;
  background: rgba(8, 22, 52, 0.72); border: 1px solid rgba(147,197,253,0.35);
  border-radius: 14px; backdrop-filter: blur(16px);
  box-shadow: 0 18px 54px rgba(0,0,0,0.48), 0 0 30px rgba(96,165,250,0.16);
}
.cross-dish-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 10px; }
.cross-dish-eyebrow { font-size: 9px; letter-spacing: 2.4px; opacity: 0.58; }
.cross-dish-title { margin-top: 2px; font-size: 15px; font-weight: 650; color: #fff; }
.cross-mini-dish {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  min-height: 124px; padding: 12px 10px;
  background: radial-gradient(circle at 50% 44%, rgba(30,58,138,0.42), rgba(5,10,30,0.72) 70%);
  border: 1px solid rgba(224,242,254,0.16); border-radius: 999px;
}
.cross-slot {
  min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; text-align: center;
}
.cross-slot canvas {
  width: 58px; height: 58px; border-radius: 999px;
  filter: drop-shadow(0 0 10px rgba(147,197,253,0.35));
}
.cross-slot.empty {
  color: rgba(224,242,254,0.42);
}
.cross-slot.muted {
  opacity: 0.52;
}
.cross-empty-mark {
  width: 58px; height: 58px; border-radius: 999px;
  display: grid; place-items: center; font-size: 24px;
  border: 1px dashed rgba(224,242,254,0.24); background: rgba(5,10,30,0.3);
}
.cross-slot-label { font-size: 8px; letter-spacing: 1.4px; opacity: 0.58; text-transform: uppercase; }
.cross-slot-name {
  max-width: 78px; min-height: 14px; font-size: 10px; color: rgba(224,242,254,0.9);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cross-help { margin-top: 10px; font-size: 11px; color: rgba(224,242,254,0.72); text-align: center; }
.cross-strategy { margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(224,242,254,0.1); }
.cross-strategy-label { font-size: 9px; letter-spacing: 1.6px; opacity: 0.58; text-transform: uppercase; margin-bottom: 6px; }
.cross-strategy-pills { display: flex; flex-wrap: wrap; gap: 5px; }
.cross-strategy-pill {
  flex: 1 1 auto; min-width: 54px; padding: 5px 7px;
  background: rgba(224,242,254,0.05); border: 1px solid rgba(224,242,254,0.12);
  border-radius: 7px; color: #E0F2FE; font-family: inherit; font-size: 10px; cursor: pointer;
}
.cross-strategy-pill.on { background: rgba(96,165,250,0.25); border-color: rgba(147,197,253,0.55); color: #fff; }
.cross-strategy-pill.locked {
  opacity: 0.42; cursor: not-allowed; border-color: rgba(251,191,36,0.16);
  background: rgba(251,191,36,0.035);
}
.cross-timer { margin-top: 10px; }
.cross-timer-meta { display: flex; justify-content: space-between; font-size: 10px; letter-spacing: 1px; opacity: 0.75; }
.cross-timer-track {
  margin-top: 6px; height: 7px; overflow: hidden; border-radius: 999px;
  background: rgba(224,242,254,0.12); border: 1px solid rgba(224,242,254,0.18);
}
.cross-timer-fill {
  height: 100%; background: linear-gradient(90deg, #60a5fa, #6ee7b7);
  box-shadow: 0 0 14px rgba(110,231,183,0.7); transition: width 0.1s linear;
}
.cross-discovery-note {
  margin-top: 8px; padding: 7px 9px; border-radius: 8px;
  background: rgba(192,132,252,0.08); border: 1px solid rgba(192,132,252,0.18);
  color: rgba(224,242,254,0.78); font-size: 10px; text-align: center;
}
.cross-actions { margin-top: 10px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cross-actions .g-btn { padding: 8px 10px; }

[data-tweaks-panel] { color: #E0F2FE !important; }

/* ───────────── Gamification HUD ───────────── */

/* Player bar — XP, level, currencies, in topbar */
.player-bar { display: flex; align-items: center; gap: 12px; }
.lvl-badge {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, rgba(147,197,253,0.4), rgba(99,102,241,0.4));
  border: 1px solid rgba(224,242,254,0.45);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  box-shadow: 0 0 12px rgba(147,197,253,0.4), 0 0 0 1px rgba(255,255,255,0.08) inset;
  position: relative;
}
.lvl-badge .lvl-num { font-size: 14px; font-weight: 700; color: #fff; line-height: 1;
  text-shadow: 0 0 8px rgba(224,242,254,0.8); }
.lvl-badge .lvl-tag { font-size: 7px; letter-spacing: 1.5px; opacity: 0.7; margin-top: 1px; }
.xp-block { display: flex; flex-direction: column; gap: 3px; min-width: 150px; }
.xp-meta { display: flex; justify-content: space-between; font-size: 9px; letter-spacing: 1.5px; opacity: 0.75; }
.xp-meta b { color: #fff; }
.xp-track {
  height: 6px; background: rgba(224,242,254,0.1);
  border: 1px solid rgba(224,242,254,0.18); border-radius: 999px; overflow: hidden;
}
.xp-fill {
  height: 100%; background: linear-gradient(90deg, #60a5fa, #c084fc);
  box-shadow: 0 0 12px rgba(147,197,253,0.7); transition: width 0.4s cubic-bezier(.2,.8,.3,1);
}

.currency-pill {
  display: flex; align-items: center; gap: 6px; padding: 5px 10px;
  background: rgba(5,10,30,0.55); border: 1px solid rgba(224,242,254,0.18);
  border-radius: 10px; font-size: 12px; font-variant-numeric: tabular-nums;
}
.currency-pill .cy-icon {
  width: 18px; height: 18px; border-radius: 50%; display: flex; align-items: center;
  justify-content: center; font-size: 11px; font-weight: 700;
}
.currency-pill.bio .cy-icon { background: rgba(110,231,183,0.25); color: #6ee7b7;
  box-shadow: 0 0 8px rgba(110,231,183,0.5); }
.currency-pill.dna .cy-icon { background: rgba(192,132,252,0.25); color: #c084fc;
  box-shadow: 0 0 8px rgba(192,132,252,0.5); }
.currency-pill.rp  .cy-icon { background: rgba(251,191,36,0.22); color: #fbbf24;
  box-shadow: 0 0 8px rgba(251,191,36,0.45); }
.currency-pill b { color: #fff; font-weight: 700; }
.currency-pill .cy-label { font-size: 9px; letter-spacing: 1.5px; opacity: 0.6; }

/* Next-unlock widget — sits next to the BIO/DNA pills, shows what the
   player is about to unlock with a thin progress fill. Click → Evolutie tab. */
/* Mastery-badges row (E19) — small icon badges next to the username
   for every branch with ≥5 unlocked nodes. */
/* Login-streak modal cells (E20) */
.streak-row {
  display: flex; justify-content: center; gap: 4px; margin: 10px 0 16px; flex-wrap: wrap;
}
.streak-cell {
  display: inline-flex; align-items: center; justify-content: center; gap: 2px;
  padding: 4px 8px; border-radius: 8px; font-size: 11px;
  font-variant-numeric: tabular-nums;
  background: rgba(110,231,183,0.14); border: 1px solid rgba(110,231,183,0.32);
  color: #6ee7b7;
}
.streak-cell.today {
  background: rgba(251,146,60,0.20); border-color: rgba(251,146,60,0.55);
  color: #fb923c; font-weight: 700;
  box-shadow: 0 0 12px rgba(251,146,60,0.35);
}

.mastery-badges {
  display: inline-flex; gap: 4px; margin-left: 8px; vertical-align: middle;
}
.mastery-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 50%;
  font-size: 11px; line-height: 1; font-weight: 700;
  border: 1.5px solid currentColor;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.18), rgba(255,255,255,0.04));
  box-shadow: 0 0 8px currentColor, 0 1px 0 rgba(255,255,255,0.15) inset;
  text-shadow: 0 0 6px currentColor;
  flex-shrink: 0;
}
.mastery-badges { gap: 5px; }

.petrie-score {
  margin-left: 8px; padding: 1px 6px; border-radius: 6px;
  font-size: 10px; letter-spacing: 0.4px;
  background: rgba(251,191,36,0.14); color: #fbbf24;
  border: 1px solid rgba(251,191,36,0.3);
  font-variant-numeric: tabular-nums;
}

/* ── Compact UI mode — smaller pills, tighter cadence. */
body.compact-ui .next-unlock-pill,
body.compact-ui .run-status,
body.compact-ui .combo-counter { width: 180px; }
body.compact-ui .next-unlock-pill { top: 170px; padding: 4px 10px 4px 8px; font-size: 11px; }
body.compact-ui .run-status      { top: 216px; padding: 8px 10px; font-size: 11px; }
body.compact-ui .combo-counter   { top: 324px; padding: 6px 10px; }
body.compact-ui .currency-pill .cy-label { display: none; }
body.compact-ui .currency-pill { padding: 4px 8px; }
body.compact-ui .narrative-dialog { width: 380px; bottom: 40px; padding: 14px 16px 14px 14px; }
body.compact-ui .progression-dock,
body.compact-ui .daily-dock,
body.compact-ui .rivalry-panel { width: 220px; padding: 10px 12px; font-size: 11px; }

/* Right HUD stack — all right-side panels are wide (~80%), so trying to
   shift the pills sideways doesn't help. Just fade them out instead. */
body.right-panel-open .next-unlock-pill,
body.right-panel-open .run-status,
body.right-panel-open .founder-card,
body.right-panel-open .combo-counter,
body.right-panel-open .rivalry-panel {
  opacity: 0; pointer-events: none;
  transition: opacity 0.22s ease;
}
#petrie-fps-mini, .next-unlock-pill, .run-status, .founder-card, .combo-counter, .rivalry-panel {
  transition: opacity 0.22s ease;
}

.next-unlock-pill {
  position: fixed; top: 172px; right: 16px; z-index: 50;
  display: flex; align-items: center; gap: 8px;
  padding: 6px 12px 6px 10px; width: 220px;
  background: rgba(5,10,30,0.62); backdrop-filter: blur(10px) saturate(1.2);
  border: 1px solid rgba(192,132,252,0.3);
  border-radius: 12px; cursor: pointer;
  font-family: inherit; color: rgba(224,242,254,0.92);
  transition: right 0.25s cubic-bezier(.16,1,.3,1), border-color 0.18s, box-shadow 0.18s;
  box-shadow: 0 4px 14px rgba(0,0,0,0.35);
}
.next-unlock-pill:hover {
  border-color: rgba(192,132,252,0.55);
  box-shadow: 0 0 14px rgba(192,132,252,0.3);
  background: rgba(12,30,70,0.6);
}
.next-unlock-pill.ready {
  border-color: rgba(245,158,11,0.65);
  box-shadow: 0 0 14px rgba(245,158,11,0.4);
  animation: nuReadyPulse 1.6s ease-in-out infinite;
}
@keyframes nuReadyPulse {
  0%,100% { box-shadow: 0 0 14px rgba(245,158,11,0.35); }
  50%     { box-shadow: 0 0 22px rgba(245,158,11,0.7); }
}
.next-unlock-pill .nu-label {
  font-size: 9px; letter-spacing: 1.5px; opacity: 0.55; font-weight: 600;
}
.next-unlock-pill .nu-name {
  font-size: 12px; font-weight: 600; flex: 1; text-align: left;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  color: #c4b5fd;
}
.next-unlock-pill .nu-progress {
  width: 36px; height: 3px; background: rgba(224,242,254,0.12);
  border-radius: 2px; overflow: hidden;
}
.next-unlock-pill .nu-progress-fill {
  display: block; height: 100%;
  background: linear-gradient(90deg, #a78bfa, #fbbf24);
  border-radius: 2px; transition: width 0.4s cubic-bezier(.16,1,.3,1);
}
.next-unlock-pill .nu-need {
  font-size: 11px; font-variant-numeric: tabular-nums;
  color: rgba(224,242,254,0.85); font-weight: 600; min-width: 36px; text-align: right;
}
.next-unlock-pill.ready .nu-need { color: #fbbf24; }
/* ── Run-status widget — third slot in right HUD stack ─────────────── */
.run-status {
  position: fixed; top: 258px; right: 16px; width: 220px;
  transition: right 0.25s cubic-bezier(.16,1,.3,1), border-color 0.25s, box-shadow 0.25s;
  z-index: 50; padding: 10px 13px; border-radius: 12px;
  background: rgba(5,10,30,0.62); backdrop-filter: blur(10px) saturate(1.2);
  border: 1px solid rgba(192,132,252,0.28);
  color: rgba(224,242,254,0.92);
  box-shadow: 0 4px 16px rgba(0,0,0,0.35);
  font-family: inherit; font-size: 12px;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.founder-card {
  position: fixed; top: 172px; right: 16px; z-index: 50; width: 252px;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 9px;
  padding: 9px 11px; border-radius: 12px; cursor: pointer; text-align: left;
  font-family: inherit; color: #fff; background: rgba(30,27,75,.72);
  border: 1px solid rgba(251,191,36,.45); box-shadow: 0 4px 18px rgba(0,0,0,.38), 0 0 18px rgba(251,191,36,.10);
  backdrop-filter: blur(10px) saturate(1.2);
}
.founder-card:hover { border-color: rgba(251,191,36,.8); box-shadow: 0 0 24px rgba(251,191,36,.2); }
.founder-card.descendant { border-color: rgba(192,132,252,.48); background: rgba(46,16,82,.72); }
.fc-specimen { position:relative; display:grid; place-items:center; width:48px; height:48px; overflow:hidden; border-radius:11px; background:radial-gradient(circle,rgba(96,165,250,.18),rgba(5,10,30,.72)); border:1px solid rgba(147,197,253,.26); }
.fc-specimen canvas { width:48px !important; height:48px !important; }
.fc-specimen i { position:absolute; right:2px; bottom:2px; display:grid; place-items:center; width:17px; height:17px; border-radius:50%; font-style:normal; font-size:9px; color:#081329; background:#fbbf24; box-shadow:0 0 9px rgba(251,191,36,.65); }
.fc-main { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.fc-main .fc-eye { font-size: 8px; font-weight: 800; letter-spacing: 1.4px; color: #fbbf24; }
.fc-main b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.fc-main small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 8px; opacity: .62; }
.fc-fit { display: flex; flex-direction: column; align-items: center; font-size: 12px; font-weight: 800; color: #6ee7b7; }
.fc-fit small { font-size: 7px; font-weight: 700; letter-spacing: .8px; opacity: .65; text-transform: uppercase; }
.run-status.urgent {
  border-color: rgba(245,158,11,0.7);
  box-shadow: 0 4px 18px rgba(245,158,11,0.35);
  animation: rsUrgentPulse 1.0s ease-in-out infinite;
}
@keyframes rsUrgentPulse {
  0%,100% { box-shadow: 0 4px 16px rgba(245,158,11,0.32); }
  50%     { box-shadow: 0 4px 24px rgba(245,158,11,0.55); }
}
.run-status .rs-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 6px;
}
.run-status .rs-label {
  font-size: 9px; letter-spacing: 1.6px; opacity: 0.55; font-weight: 600;
}
.run-status .rs-time {
  font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums;
  color: #c4b5fd;
}
.run-status.urgent .rs-time { color: #fbbf24; }
.run-status .rs-goal {
  font-size: 12px; font-weight: 500; color: #e0f2fe;
  margin-bottom: 6px; line-height: 1.3;
}
.run-status .rs-phase { display: flex; flex-direction: column; gap: 2px; margin: 6px 0; padding: 6px 7px; border-radius: 6px; background: rgba(110,231,183,.08); color: #d1fae5; font-size: 9px; line-height: 1.25; }
.run-status .rs-phase span { color: rgba(224,242,254,.66); }
.death-cause { margin: 0 auto 10px; padding: 6px 10px; width: fit-content; border-radius: 8px; background: rgba(239,68,68,.10); border: 1px solid rgba(239,68,68,.24); color: rgba(254,226,226,.8); font-size: 11px; }
.replay-analysis { margin: 10px 0; }
.replay-analysis-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 7px; margin-top: 6px; }
.replay-conclusion { min-width: 0; padding: 8px 9px; display: flex; flex-direction: column; gap: 4px; border-radius: 8px; background: rgba(96,165,250,.07); border: 1px solid rgba(147,197,253,.16); }
.replay-conclusion b { color: #fff; font-size: 10px; }
.replay-conclusion span { color: rgba(224,242,254,.65); font-size: 9px; line-height: 1.35; }
.legacy-candidate { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; margin: 10px 0; padding: 10px 12px; border-radius: 10px; border: 1px solid rgba(251,191,36,.34); background: rgba(120,74,10,.12); }
.legacy-mark { color: #fde68a; font-size: 22px; text-shadow: 0 0 14px rgba(251,191,36,.7); }
.legacy-copy { min-width: 0; display: flex; flex-direction: column; gap: 2px; text-align: left; }
.legacy-copy b { color: #fff; font-size: 12px; }
.legacy-copy > span { color: rgba(253,230,138,.68); font-size: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.replay-more { margin-top: 7px; border-top: 1px solid rgba(224,242,254,.09); padding-top: 7px; }
.replay-more summary { color: rgba(224,242,254,.58); font-size: 10px; cursor: pointer; text-align: center; }
.replay-more[open] summary { color: #bfdbfe; }
@media (max-width: 700px) { .replay-analysis-grid { grid-template-columns: 1fr; } .legacy-candidate { grid-template-columns: auto 1fr; } .legacy-candidate button { grid-column: 1 / -1; } }
.run-status .rs-bar {
  height: 4px; background: rgba(224,242,254,0.10);
  border-radius: 2px; overflow: hidden; margin-bottom: 4px;
}
.run-status .rs-bar-fill {
  display: block; height: 100%;
  background: linear-gradient(90deg, #a78bfa, #fbbf24);
  border-radius: 2px;
  transition: width 0.5s cubic-bezier(.16,1,.3,1);
}
.run-status .rs-progress {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 11px; opacity: 0.7; font-variant-numeric: tabular-nums;
}
.run-status .rs-stat {
  font-size: 9px; letter-spacing: 1px; opacity: 0.6; text-transform: uppercase;
}
.run-status .rs-numbers { text-align: right; }
.run-status .rs-combo { margin-top:7px; padding-top:7px; border-top:1px solid rgba(224,242,254,.1); color:#fbbf24; }
.run-status .rs-combo > div { display:flex; justify-content:space-between; align-items:center; gap:8px; }
.run-status .rs-combo span { font-size:8px; font-weight:800; letter-spacing:1px; opacity:.72; }
.run-status .rs-combo b { font-size:11px; color:currentColor; }
.run-status .rs-combo i { display:block; height:3px; margin-top:4px; overflow:hidden; border-radius:99px; background:rgba(224,242,254,.1); }
.run-status .rs-combo i span { display:block; height:100%; border-radius:inherit; background:currentColor; transition:width .12s linear; }
.run-status .rs-combo-food { color:#6ee7b7; }
.run-status .rs-oracle {
  margin-top: 4px; font-size: 10px; color: #c4b5fd;
  font-variant-numeric: tabular-nums;
}
.run-status .rs-eta { color: #fbbf24; }

/* ── Run-end modal ─────────────────────────────────────────────────── */
.run-end-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(5,10,30,0.60); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  /* E123 — Symmetrische padding: modal staat in visuele midden van viewport
     i.p.v. weggedrukt door HUD-reservering. De backdrop-blur dekt de HUD af. */
  padding: 16px;
  animation: panelIn 0.30s cubic-bezier(.16,1,.3,1);
}
.run-end {
  width: min(840px, 95vw); max-width: 95vw;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  padding: 28px 32px; border-radius: 18px;
  background: rgba(12,30,70,0.85); backdrop-filter: blur(18px) saturate(1.2);
  border: 1px solid rgba(224,242,254,0.18);
  box-shadow: 0 30px 80px rgba(0,0,0,0.55);
  color: #e0f2fe; text-align: center;
}
.run-end.win  { border-color: rgba(110,231,183,0.45); box-shadow: 0 30px 80px rgba(34,197,94,0.30); }
.run-end.loss { border-color: rgba(252,165,165,0.35); }
.run-end .re-icon {
  font-size: 44px; line-height: 1; margin-bottom: 8px;
}
.run-end.win  .re-icon { color: #6ee7b7; text-shadow: 0 0 24px rgba(110,231,183,0.7); }
.run-end.loss .re-icon { color: #fca5a5; text-shadow: 0 0 24px rgba(252,165,165,0.5); }
.run-end .re-title { font-size: 22px; font-weight: 600; margin: 0 0 4px; }
.run-end .re-goal  { font-size: 14px; opacity: 0.8; margin: 0 0 4px; }
.run-end .re-reason { font-size: 12px; opacity: 0.55; margin: 0 0 18px; letter-spacing: 0.4px; }
.run-end .re-rewards {
  display: flex; gap: 10px; justify-content: center; margin-bottom: 22px; flex-wrap: wrap;
}
.run-end .re-pill {
  padding: 8px 14px; border-radius: 10px;
  background: rgba(96,165,250,0.18); border: 1px solid rgba(147,197,253,0.35);
  display: flex; align-items: baseline; gap: 6px;
}
.run-end .re-pill span { font-size: 10px; letter-spacing: 1.2px; opacity: 0.6; }
.run-end .re-pill b    { font-size: 16px; color: #fff; font-weight: 700; }
.run-end .re-buttons { display: flex; gap: 10px; justify-content: center; }
.run-end .re-buttons .g-btn { padding: 10px 20px; }

/* Ω-confrontation button — special gold-purple gradient (E21). */
.omega-btn {
  background: linear-gradient(135deg, rgba(251,191,36,0.25), rgba(168,85,247,0.30));
  border: 1px solid rgba(251,191,36,0.55) !important;
  color: #fbbf24 !important;
  text-shadow: 0 0 8px rgba(251,191,36,0.6);
  box-shadow: 0 0 14px rgba(251,191,36,0.30);
  font-weight: 700;
  animation: omegaPulse 1.6s ease-in-out infinite;
}
@keyframes omegaPulse {
  0%,100% { box-shadow: 0 0 12px rgba(251,191,36,0.30); }
  50%     { box-shadow: 0 0 22px rgba(251,191,36,0.60), 0 0 26px rgba(168,85,247,0.30); }
}

/* ── Narrative dialog (L4) ─────────────────────────────────────────── */
.narrative-dialog {
  position: fixed; left: 50%; bottom: 60px; transform: translateX(-50%);
  z-index: 70; width: 460px; max-width: calc(100% - 32px);
  display: flex; gap: 16px; align-items: flex-start;
  padding: 18px 22px 18px 18px; border-radius: 16px;
  background: linear-gradient(180deg, rgba(12,30,70,0.92), rgba(8,20,48,0.92));
  backdrop-filter: blur(14px) saturate(1.2);
  border: 1px solid rgba(192,132,252,0.4);
  color: #e0f2fe;
  box-shadow: 0 18px 50px rgba(0,0,0,0.55), 0 0 24px rgba(168,85,247,0.18);
  animation: ndIn 0.32s cubic-bezier(.16,1,.3,1);
}
@keyframes ndIn {
  from { opacity: 0; transform: translate(-50%, 20px) scale(0.97); }
  to   { opacity: 1; transform: translate(-50%, 0) scale(1); }
}
.narrative-dialog .nd-avatar {
  flex-shrink: 0; width: 54px; height: 54px;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 28px; background: rgba(168,85,247,0.18);
  border: 1px solid rgba(192,132,252,0.4);
  box-shadow: 0 0 18px rgba(168,85,247,0.25);
}
.narrative-dialog .nd-body { flex: 1; }
.narrative-dialog .nd-name {
  font-size: 11px; letter-spacing: 1.5px; font-weight: 600;
  color: #c4b5fd; text-transform: uppercase; margin-bottom: 4px;
}
.narrative-dialog .nd-text {
  font-size: 14px; line-height: 1.55; color: rgba(224,242,254,0.95);
  margin-bottom: 12px;
}
.narrative-dialog .nd-actions { display: flex; justify-content: flex-end; }
.narrative-dialog .nd-continue { padding: 6px 16px; font-size: 13px; }

/* ── Combo counter — fourth slot in right HUD stack ────────────────── */
.combo-counter {
  position: fixed; top: 370px; right: 16px; width: 220px;
  transition: right 0.25s cubic-bezier(.16,1,.3,1);
  z-index: 50; padding: 8px 12px; border-radius: 12px;
  background: rgba(5,10,30,0.65); backdrop-filter: blur(10px);
  border: 1px solid rgba(245,158,11,0.45);
  color: #e0f2fe; font-family: inherit;
  box-shadow: 0 4px 16px rgba(0,0,0,0.35), 0 0 16px rgba(245,158,11,0.25);
  animation: comboIn 0.22s cubic-bezier(.16,1,.3,1);
}
@keyframes comboIn {
  from { opacity: 0; transform: translateY(-8px) scale(0.94); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.combo-counter .cc-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 4px;
}
.combo-counter .cc-label {
  font-size: 9px; letter-spacing: 1.5px; opacity: 0.6; font-weight: 600;
}
.combo-counter .cc-mult {
  font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums;
  text-shadow: 0 0 12px currentColor;
}
.combo-counter .cc-streak {
  font-size: 11px; opacity: 0.75; margin-bottom: 5px;
}
.combo-counter .cc-bar {
  height: 3px; background: rgba(224,242,254,0.10);
  border-radius: 2px; overflow: hidden;
}
.combo-counter .cc-bar > span {
  display: block; height: 100%; background: currentColor; border-radius: 2px;
  transition: width 0.1s linear;
}
.combo-counter.tier-1 { color: #fde68a; border-color: rgba(253,230,138,0.45); box-shadow: 0 4px 16px rgba(0,0,0,0.35), 0 0 16px rgba(253,230,138,0.25); }
.combo-counter.tier-2 { color: #fbbf24; border-color: rgba(245,158,11,0.55); box-shadow: 0 4px 16px rgba(0,0,0,0.35), 0 0 18px rgba(245,158,11,0.4); }
.combo-counter.tier-3 { color: #f97316; border-color: rgba(249,115,22,0.65); box-shadow: 0 4px 16px rgba(0,0,0,0.35), 0 0 22px rgba(249,115,22,0.5); }
.combo-counter.tier-4 { color: #ef4444; border-color: rgba(239,68,68,0.7); box-shadow: 0 4px 18px rgba(0,0,0,0.4), 0 0 28px rgba(239,68,68,0.6); animation: comboIn 0.22s cubic-bezier(.16,1,.3,1), comboPulse 0.7s ease-in-out infinite alternate; }
@keyframes comboPulse {
  from { box-shadow: 0 4px 18px rgba(0,0,0,0.4), 0 0 22px rgba(239,68,68,0.5); }
  to   { box-shadow: 0 4px 18px rgba(0,0,0,0.4), 0 0 32px rgba(239,68,68,0.85); }
}

/* ── Random event banner (L3) ──────────────────────────────────────── */
.event-banner {
  position: fixed; top: 200px; left: 50%; transform: translateX(-50%);
  z-index: 60; min-width: 320px; max-width: 480px;
  padding: 14px 22px; border-radius: 14px;
  background: rgba(5,10,30,0.85); backdrop-filter: blur(14px) saturate(1.3);
  border: 1px solid; color: #e0f2fe;
  display: flex; align-items: center; gap: 16px;
  animation: evtBannerIn 0.45s cubic-bezier(.16,1,.3,1), evtBannerOut 0.6s ease 4s forwards;
  box-shadow: 0 18px 50px rgba(0,0,0,0.55);
  pointer-events: none;
}
.event-banner .eb-icon {
  font-size: 36px; line-height: 1; filter: drop-shadow(0 0 12px var(--evt-color, currentColor));
}
.event-banner .eb-text { flex: 1; }
.event-banner .eb-name {
  font-size: 14px; font-weight: 700; letter-spacing: 1.5px;
  text-transform: uppercase; margin-bottom: 2px;
  text-shadow: 0 0 12px var(--evt-color, currentColor);
}
.event-banner .eb-desc { font-size: 12px; opacity: 0.78; line-height: 1.35; }
@keyframes evtBannerIn {
  from { opacity: 0; transform: translate(-50%, -16px) scale(0.92); }
  to   { opacity: 1; transform: translate(-50%, 0) scale(1); }
}
@keyframes evtBannerOut {
  from { opacity: 1; transform: translate(-50%, 0) scale(1); }
  to   { opacity: 0; transform: translate(-50%, -8px) scale(0.96); }
}

/* ── Share-code modal (L2) ─────────────────────────────────────────── */
.share-modal {
  width: 380px; max-width: 100%;
  max-height: 100%;
  overflow-y: auto;
  padding: 28px 32px; border-radius: 18px;
  background: rgba(12,30,70,0.85); backdrop-filter: blur(18px) saturate(1.2);
  border: 1px solid rgba(192,132,252,0.35);
  box-shadow: 0 30px 80px rgba(0,0,0,0.55);
  color: #e0f2fe; text-align: center;
}
.share-code-box {
  display: flex; align-items: center; gap: 10px; justify-content: center;
  margin: 14px 0 8px; padding: 12px 14px;
  background: rgba(5,10,30,0.5); border: 1px solid rgba(192,132,252,0.3);
  border-radius: 10px;
}
.share-code-text {
  font-family: ui-monospace,SFMono-Regular,monospace;
  font-size: 22px; font-weight: 700; letter-spacing: 4px;
  color: #c4b5fd; flex: 1; text-align: center;
}
.share-copy { padding: 8px 14px !important; font-size: 12px !important; }
.share-hint { font-size: 12px; opacity: 0.65; margin: 8px 0 16px; line-height: 1.4; }
.share-import-input {
  text-align: center; font-family: ui-monospace,monospace;
  font-size: 18px; letter-spacing: 3px; padding: 12px 16px !important;
  margin: 14px 0 8px;
}
.leaderboard {
  list-style: none; padding: 0; margin: 8px 0 14px; text-align: left;
}
.leaderboard li {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 10px; border-bottom: 1px solid rgba(224,242,254,0.08);
  font-size: 13px;
}
.lb-rank { width: 22px; text-align: right; color: rgba(147,197,253,0.6); font-variant-numeric: tabular-nums; font-weight: 600; }
.lb-name { flex: 1; color: #e0f2fe; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-owner { color: rgba(192,132,252,0.75); font-size: 11px; min-width: 70px; }
.lb-code  { font-family: ui-monospace,monospace; color: #c4b5fd; cursor: pointer; padding: 2px 6px; border-radius: 4px; transition: background 0.15s; }
.lb-code:hover { background: rgba(192,132,252,0.15); }
.lb-plays { color: #fbbf24; font-variant-numeric: tabular-nums; font-weight: 600; min-width: 38px; text-align: right; }

.share-error {
  background: rgba(239,68,68,0.12); border: 1px solid rgba(239,68,68,0.3);
  color: #fca5a5; padding: 8px 12px; border-radius: 8px;
  font-size: 12px; margin: 4px 0 12px;
}

/* ── Lab panel (E5) ────────────────────────────────────────────────── */
.lab-panel { padding: 4px 0; }
.lab-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 14px; gap: 12px;
}
.lab-rp-pill {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 10px;
  background: rgba(251,191,36,0.12); border: 1px solid rgba(251,191,36,0.4);
  color: #fbbf24; font-variant-numeric: tabular-nums;
}
.lab-rp-pill span { font-size: 10px; letter-spacing: 1.5px; opacity: 0.7; }
.lab-rp-pill b { font-size: 16px; }
.lab-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
}
@media (max-width: 1100px) {
  .lab-grid { grid-template-columns: repeat(2, 1fr); }
}
.lab-mod {
  background: rgba(5,10,30,0.5); border: 1px solid rgba(224,242,254,0.12);
  border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 6px;
  transition: border-color 0.2s, background 0.2s, transform 0.18s;
  overflow: hidden;
}
.lab-mod:hover { transform: translateY(-1px); }
/* E111 — module-afbeelding bovenaan kaart, volledig in beeld (16:9) */
.lab-mod-image {
  margin: -12px -12px 4px;
  width: calc(100% + 24px);
  aspect-ratio: 16 / 9;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  background-color: #050a1e;
  border-bottom: 1px solid rgba(224,242,254,0.10);
}
.lab-mod.tier-1 { border-color: rgba(205,127,50,0.45); }   /* bronze */
.lab-mod.tier-2 { border-color: rgba(192,192,192,0.45); }  /* silver */
.lab-mod.tier-3 { border-color: rgba(251,191,36,0.55); box-shadow: 0 0 12px rgba(251,191,36,0.18); } /* gold */
.lab-mod.tier-3 .lab-mod-image { box-shadow: inset 0 0 24px rgba(251,191,36,0.28); }
.lab-mod-head { display: flex; justify-content: space-between; align-items: baseline; }
.lab-mod-head b { font-size: 13px; }
.lab-mod-tier {
  font-size: 10px; letter-spacing: 1.2px; opacity: 0.65;
  padding: 1px 6px; border-radius: 4px;
  background: rgba(224,242,254,0.08);
}
.lab-mod.tier-1 .lab-mod-tier { background: rgba(205,127,50,0.18); color: #cd7f32; }
.lab-mod.tier-2 .lab-mod-tier { background: rgba(192,192,192,0.18); color: #cfd5dc; }
.lab-mod.tier-3 .lab-mod-tier { background: rgba(251,191,36,0.20); color: #fbbf24; }
.lab-mod-desc { font-size: 11px; opacity: 0.7; line-height: 1.45; }
.lab-mod-active {
  font-size: 11px; color: #6ee7b7;
  border-top: 1px solid rgba(110,231,183,0.18); padding-top: 6px; margin-top: 4px;
}
.lab-mod-buy { margin-top: 4px; padding: 6px 10px; font-size: 12px; }
.lab-mod-maxed {
  margin-top: 4px; padding: 6px 0; text-align: center; font-size: 12px;
  color: #fbbf24; opacity: 0.85;
}

/* ── Season Pass (E45) ────────────────────────────────────────────── */
.season-pass { display: flex; flex-direction: column; gap: 16px; }
.sp-header {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px; border-radius: 14px;
  background: linear-gradient(135deg, rgba(192,132,252,0.18), rgba(96,165,250,0.10));
  border: 1px solid rgba(192,132,252,0.30);
}
.sp-header-info { flex: 1; }
.sp-eyebrow { font-size: 10px; letter-spacing: 1.8px; opacity: 0.7; }
.sp-title { display: flex; align-items: baseline; gap: 8px; margin-top: 4px; font-size: 13px; opacity: 0.7; }
.sp-level-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; height: 44px; padding: 0 12px;
  border-radius: 12px; background: linear-gradient(135deg, #fbbf24, #f97316);
  color: #050a1e; font-size: 22px; font-weight: 800;
  box-shadow: 0 0 16px rgba(251,191,36,0.45);
}
.sp-premium-btn { white-space: nowrap; }
.sp-premium-active {
  font-size: 11px; letter-spacing: 1.4px; color: #fbbf24;
  padding: 6px 12px; border-radius: 8px;
  background: rgba(251,191,36,0.15); border: 1px solid rgba(251,191,36,0.40);
}
.sp-progress-track {
  height: 8px; background: rgba(5,10,30,0.6); border-radius: 4px; overflow: hidden;
  border: 1px solid rgba(224,242,254,0.10);
}
.sp-progress-fill {
  height: 100%; background: linear-gradient(90deg, #fbbf24, #f97316, #c084fc);
  box-shadow: 0 0 10px rgba(251,191,36,0.45);
  transition: width 0.3s;
}
.sp-progress-foot {
  display: flex; justify-content: space-between; margin-top: 6px;
  font-size: 11px; opacity: 0.65; font-variant-numeric: tabular-nums;
}

.sp-quests {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}
.sp-quest-block h4 {
  font-size: 11px; letter-spacing: 1.6px; opacity: 0.6;
  margin: 0 0 8px; text-transform: uppercase;
}
.sp-quest {
  padding: 8px 10px; margin-bottom: 6px; border-radius: 8px;
  background: rgba(5,10,30,0.42); border: 1px solid rgba(224,242,254,0.10);
}
.sp-quest.done { opacity: 0.7; border-color: rgba(110,231,183,0.35); background: rgba(110,231,183,0.08); }
.sp-quest-head { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; }
.sp-quest-head b { color: #fff; }
.sp-quest-head span { color: #fbbf24; font-variant-numeric: tabular-nums; }
.sp-quest-bar {
  height: 4px; background: rgba(224,242,254,0.10); border-radius: 2px; overflow: hidden;
  margin-top: 5px;
}
.sp-quest-bar > span { display: block; height: 100%; background: linear-gradient(90deg, #93c5fd, #c084fc); }
.sp-quest-foot { font-size: 10px; opacity: 0.55; margin-top: 4px; font-variant-numeric: tabular-nums; }

.sp-section h4 { font-size: 11px; letter-spacing: 1.6px; opacity: 0.6; margin: 0 0 10px; text-transform: uppercase; }
.sp-tier-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 6px;
}
.sp-tier {
  display: flex; flex-direction: column; gap: 4px;
  padding: 6px 4px; border-radius: 8px;
  background: rgba(5,10,30,0.40); border: 1px solid rgba(224,242,254,0.08);
  font-size: 10px; opacity: 0.55;
}
.sp-tier.unlocked { opacity: 1; border-color: rgba(96,165,250,0.40); }
.sp-tier.milestone-small { border-color: rgba(110,231,183,0.40); }
.sp-tier.milestone-med {
  border-color: rgba(192,132,252,0.55);
  background: rgba(192,132,252,0.10);
}
.sp-tier.milestone-big {
  border-color: rgba(251,191,36,0.65);
  background: linear-gradient(135deg, rgba(251,191,36,0.18), rgba(192,132,252,0.10));
  box-shadow: 0 0 12px rgba(251,191,36,0.20);
}
.sp-tier-num { font-size: 11px; font-weight: 700; text-align: center; opacity: 0.85; }
.sp-reward {
  width: 100%; padding: 4px 4px; border-radius: 5px;
  font-size: 9px; line-height: 1.2; font-weight: 600;
  border: 1px solid rgba(224,242,254,0.10);
  background: rgba(5,10,30,0.55);
  color: rgba(224,242,254,0.65);
  cursor: not-allowed;
  font-family: inherit;
  word-break: break-word;
  min-height: 22px;
}
.sp-reward-free { border-color: rgba(96,165,250,0.30); }
.sp-reward-prem { border-color: rgba(251,191,36,0.30); color: #fbbf24; }
.sp-reward.locked { opacity: 0.4; }
.sp-reward.ready {
  cursor: pointer;
  background: linear-gradient(180deg, rgba(110,231,183,0.30), rgba(110,231,183,0.10));
  border-color: rgba(110,231,183,0.55);
  color: #fff;
  animation: pulse 1.6s infinite;
}
.sp-reward.ready:hover { transform: scale(1.05); }
.sp-reward.claimed {
  background: rgba(110,231,183,0.15);
  border-color: rgba(110,231,183,0.40);
  color: #6ee7b7;
}

/* ── Lucky Spin (E47) ─────────────────────────────────────────────── */
.spin-panel { display: flex; flex-direction: column; gap: 18px; align-items: center; }
.spin-header { width: 100%; }
.spin-stats {
  display: flex; gap: 14px; margin-top: 6px;
  font-size: 11px; opacity: 0.75;
}
.spin-stats b { color: #fff; font-variant-numeric: tabular-nums; }
.spin-wheel-wrap {
  position: relative; width: 240px; height: 240px;
  display: flex; align-items: center; justify-content: center;
  margin: 12px 0;
}
.spin-pointer {
  position: absolute; top: -16px; left: 50%; transform: translateX(-50%);
  font-size: 28px; color: #fbbf24; z-index: 5;
  text-shadow: 0 0 10px rgba(251,191,36,0.6);
}
.spin-wheel {
  width: 240px; height: 240px; border-radius: 50%;
  position: relative; overflow: hidden;
  border: 4px solid rgba(251,191,36,0.55);
  box-shadow: 0 0 30px rgba(251,191,36,0.20), inset 0 0 20px rgba(0,0,0,0.4);
  transition: transform 3.4s cubic-bezier(0.17, 0.67, 0.10, 0.99);
  background: rgba(5,10,30,0.6);
}
.spin-seg {
  position: absolute; top: 0; left: 50%;
  width: 50%; height: 50%;
  transform-origin: 0 100%;
  opacity: 0.85;
}
.spin-seg-label {
  position: absolute; top: 50%; left: 50%; transform-origin: 0 0;
  font-size: 10px; font-weight: 700; color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.7);
  white-space: nowrap;
  pointer-events: none;
}
.spin-btn { padding: 12px 32px !important; font-size: 14px !important; }
.spin-result {
  font-size: 14px; padding: 10px 16px; border-radius: 8px;
  background: rgba(110,231,183,0.15); border: 1px solid rgba(110,231,183,0.40);
  color: #fff;
}
.spin-tip { font-size: 11px; opacity: 0.55; text-align: center; }

/* ── Pet (E48) ────────────────────────────────────────────────────── */
.pet-panel { display: flex; flex-direction: column; gap: 14px; }
.pet-arc-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.pet-arc-card {
  padding: 16px 12px; border-radius: 12px;
  background: rgba(5,10,30,0.45); border: 2px solid;
  display: flex; flex-direction: column; gap: 6px;
  cursor: pointer; font-family: inherit;
  transition: transform 0.15s, box-shadow 0.15s;
  color: #fff;
}
.pet-arc-card:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,0.4); }
.pet-arc-icon { font-size: 32px; line-height: 1; }
.pet-arc-name { font-size: 14px; font-weight: 700; }
.pet-arc-desc { font-size: 11px; opacity: 0.75; line-height: 1.4; }

/* E142 — Library-picker voor pet */
.pet-lib-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 8px;
  max-height: 360px; overflow-y: auto;
}
.pet-lib-card {
  position: relative;
  background: rgba(5,10,30,0.55);
  border: 1px solid rgba(147,197,253,0.22);
  border-radius: 10px;
  padding: 9px 10px 10px;
  text-align: left;
  cursor: pointer; font-family: inherit; color: #E0F2FE;
  transition: all 140ms ease;
  display: flex; flex-direction: column; gap: 3px;
}
.pet-lib-card:hover:not(.current):not(:disabled) {
  border-color: rgba(147,197,253,0.55);
  transform: translateY(-1px);
}
.pet-lib-card.current {
  border-color: #6ee7b7;
  background: rgba(20,80,55,0.30);
  box-shadow: 0 0 14px rgba(110,231,183,0.30);
  cursor: default;
}
.pet-lib-name { font-size: 12px; font-weight: 600; color: #fff; line-height: 1.2; }
.pet-lib-meta { display: flex; align-items: center; gap: 6px; font-size: 10px; opacity: 0.78; }
.pet-lib-buff { font-size: 11px; color: #93c5fd; font-weight: 600; margin-top: 3px; }
.pet-lib-buffval { font-size: 10px; opacity: 0.75; font-family: ui-monospace, Menlo, Consolas, monospace; }
.pet-lib-active {
  position: absolute; top: 6px; right: 6px;
  font-size: 9px; letter-spacing: 1px; font-weight: 700;
  padding: 1px 6px; border-radius: 999px;
  border: 1px solid #6ee7b7; color: #6ee7b7;
  background: rgba(5,10,30,0.85);
}

.pet-hero {
  display: flex; align-items: center; gap: 14px;
  padding: 14px; border-radius: 14px;
  background: rgba(5,10,30,0.45); border: 2px solid;
}
.pet-icon {
  width: 60px; height: 60px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 32px;
}
.pet-name-input {
  width: 100%; background: rgba(5,10,30,0.4);
  border: 1px solid rgba(224,242,254,0.10); border-radius: 6px;
  color: #fff; font-size: 16px; font-weight: 700;
  padding: 4px 8px; font-family: inherit;
}
.pet-arc-line { font-size: 11px; opacity: 0.65; margin-top: 4px; }
.pet-level-num {
  font-size: 22px; font-weight: 800; color: #fbbf24;
  padding: 4px 10px; border-radius: 8px;
  background: rgba(251,191,36,0.15);
}
.pet-xp-bar {
  height: 8px; background: rgba(5,10,30,0.6); border-radius: 4px; overflow: hidden;
  border: 1px solid rgba(224,242,254,0.10);
}
.pet-xp-fill { height: 100%; transition: width 0.3s; }
.pet-xp-foot {
  display: flex; justify-content: space-between;
  font-size: 11px; opacity: 0.65; font-variant-numeric: tabular-nums;
}
.pet-buff-card, .fac-buff-card {
  padding: 12px 14px; border-radius: 10px;
  background: rgba(5,10,30,0.40); border: 1px solid rgba(224,242,254,0.10);
}
.pet-buff-text { font-size: 13px; color: #fff; margin: 6px 0 4px; }
.pet-buff-meta { font-size: 11px; opacity: 0.55; }
.pet-info, .fac-info { font-size: 11px; opacity: 0.55; line-height: 1.6; }

/* ── Faction (E49) ────────────────────────────────────────────────── */
.faction-panel { display: flex; flex-direction: column; gap: 14px; }
.fac-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; width: 100%; }
.fac-grid-3 { grid-template-columns: repeat(3, 1fr); }
/* E135b — Faction blueprint-image: edge-to-edge zonder negatieve margins,
   net als .climate-day-img — `overflow: hidden` op .fac-card houdt corners netjes. */
.fac-card-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  background-size: cover;
  background-position: center;
  background-color: #050a1e;
  border-bottom: 1px solid currentColor;
  opacity: 0.95;
}
.fac-card.current .fac-card-img { opacity: 1; }
.fac-card {
  padding: 0; border-radius: 12px;
  background: rgba(5,10,30,0.45); border: 2px solid;
  display: flex; flex-direction: column;
  cursor: pointer; font-family: inherit; color: #fff;
  transition: transform 0.15s;
  overflow: hidden;
  text-align: left;
}
.fac-card-body { padding: 12px; display: flex; flex-direction: column; gap: 6px; }
.fac-card:hover:not(.current):not(:disabled) { transform: translateY(-2px); }
/* E134 — Active faction state */
.fac-card { position: relative; }
.fac-card.current {
  background: rgba(5,10,30,0.65);
  box-shadow: 0 0 22px rgba(96,165,250,0.30);
  cursor: default;
  border-width: 2px;
}
.fac-card.current::after {
  content: ''; position: absolute; inset: 0; border-radius: 10px;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 70%, rgba(255,255,255,0.06));
}
.fac-active-badge {
  position: absolute; top: 8px; right: 8px;
  font-size: 9px; letter-spacing: 1.2px; font-weight: 700;
  padding: 2px 7px; border-radius: 999px;
  border: 1px solid;
  background: rgba(5,10,30,0.85);
}
.fac-icon { font-size: 36px; line-height: 1; }
.fac-name { font-size: 14px; font-weight: 700; }
.fac-desc { font-size: 11px; opacity: 0.75; line-height: 1.4; }
.fac-hero {
  display: flex; align-items: center; gap: 14px;
  padding: 16px; border-radius: 14px; border: 2px solid;
}
.fac-icon-big { font-size: 48px; line-height: 1; }
.fac-hero-name { font-size: 18px; font-weight: 800; color: #fff; margin-top: 4px; }
.fac-hero-desc { font-size: 12px; opacity: 0.8; margin-top: 2px; }

/* ── Analytics dashboard (E104/E107) ──────────────────────────────── */
.analytics-panel { display: flex; flex-direction: column; gap: 12px; }
.analytics-tabs {
  display: flex; gap: 4px; padding: 4px;
  background: rgba(5,10,30,0.45); border-radius: 8px;
  border: 1px solid rgba(224,242,254,0.10);
}
.a-tab {
  flex: 1; padding: 8px 10px;
  background: transparent; border: 1px solid transparent;
  border-radius: 6px;
  color: rgba(224,242,254,0.65);
  font-size: 11px; font-family: inherit;
  cursor: pointer; transition: all 0.15s;
}
.a-tab:hover { color: #fff; background: rgba(96,165,250,0.10); }
.a-tab.on {
  background: linear-gradient(135deg, rgba(96,165,250,0.30), rgba(192,132,252,0.20));
  border-color: rgba(147,197,253,0.55);
  color: #fff;
}
.analytics-errors { display: flex; flex-direction: column; gap: 6px; }
.analytics-error-row {
  padding: 10px 12px; border-radius: 8px;
  background: rgba(248,113,113,0.06);
  border: 1px solid rgba(248,113,113,0.30);
}
.aer-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 4px;
}
.aer-event {
  font-family: monospace; font-size: 11px; color: #fca5a5;
}
.aer-count {
  font-size: 11px; color: #f87171; font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.aer-sample {
  font-family: monospace; font-size: 10px;
  background: rgba(5,10,30,0.55);
  border-radius: 5px; padding: 6px 8px;
  margin: 4px 0;
  white-space: pre-wrap;
  word-break: break-all;
  color: rgba(224,242,254,0.78);
}
.aer-when { font-size: 10px; opacity: 0.50; font-variant-numeric: tabular-nums; }

.analytics-table {
  display: flex; flex-direction: column; gap: 4px;
  margin-top: 10px;
}
.analytics-row {
  display: grid; grid-template-columns: 160px 1fr 50px;
  align-items: center; gap: 10px;
  padding: 6px 10px; border-radius: 6px;
  background: rgba(5,10,30,0.40); border: 1px solid rgba(224,242,254,0.08);
  font-size: 11px;
}
.a-event { font-family: monospace; color: #93c5fd; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.a-bar {
  height: 6px; background: rgba(5,10,30,0.6); border-radius: 3px; overflow: hidden;
}
.a-bar > span {
  display: block; height: 100%;
  background: linear-gradient(90deg, #60a5fa, #c084fc);
}
.a-count { text-align: right; font-variant-numeric: tabular-nums; color: #fbbf24; font-weight: 700; }

/* ── Language toggle (E102) ────────────────────────────────────────── */
.mini-lang {
  padding: 3px 8px;
  font-size: 10px; font-weight: 700; letter-spacing: 0.6px;
  background: rgba(5,10,30,0.45);
  border: 1px solid rgba(147,197,253,0.30);
  border-radius: 6px;
  color: rgba(224,242,254,0.65);
  cursor: pointer; font-family: inherit;
  transition: all 0.12s;
}
.mini-lang:hover { color: #fff; border-color: rgba(147,197,253,0.60); }
.mini-lang.on {
  background: linear-gradient(135deg, rgba(96,165,250,0.30), rgba(192,132,252,0.20));
  border-color: rgba(147,197,253,0.65);
  color: #fff;
  box-shadow: 0 0 8px rgba(96,165,250,0.25);
}

/* ── Topbar action-buttons (E99) ──────────────────────────────────── */
.tb-action-btn {
  position: relative;
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(12,30,70,0.55);
  border: 1px solid rgba(147,197,253,0.30);
  border-radius: 10px;
  cursor: pointer; font-family: inherit;
  color: #E0F2FE;
  transition: all 0.15s;
  margin-left: 4px;
}
.tb-action-btn:hover {
  background: rgba(96,165,250,0.20);
  border-color: rgba(147,197,253,0.60);
  transform: translateY(-1px);
}
.tb-action-icon { font-size: 17px; line-height: 1; }
.tb-action-btn.daily-action {
  border-color: rgba(251,191,36,0.45);
  background: linear-gradient(180deg, rgba(251,191,36,0.10), rgba(251,146,60,0.06));
}
.tb-action-btn.daily-action .tb-action-icon {
  color: #fbbf24;
  text-shadow: 0 0 8px rgba(251,191,36,0.5);
}
.tb-action-btn.daily-action:hover {
  background: linear-gradient(180deg, rgba(251,191,36,0.22), rgba(251,146,60,0.14));
  border-color: rgba(251,191,36,0.70);
  box-shadow: 0 0 14px rgba(251,191,36,0.25);
}
.tb-action-btn.daily-fresh { box-shadow: 0 0 0 1px rgba(110,231,183,0.40), 0 0 12px rgba(110,231,183,0.18); }
.tb-action-btn.daily-won { box-shadow: 0 0 0 1px rgba(251,191,36,0.55), 0 0 14px rgba(251,191,36,0.22); }
.tb-action-dot {
  position: absolute; top: 3px; right: 3px;
  width: 8px; height: 8px; border-radius: 50%;
  font-size: 8px; line-height: 8px; text-align: center;
}
.tb-action-dot.fresh { background: #6ee7b7; box-shadow: 0 0 6px #6ee7b7; animation: pulse 1.6s infinite; }
.tb-action-dot.played { background: rgba(224,242,254,0.4); }
.tb-action-dot.won {
  width: 14px; height: 14px; border-radius: 4px;
  background: #fbbf24; color: #050a1e; font-weight: 800;
  box-shadow: 0 0 8px rgba(251,191,36,0.6);
  display: flex; align-items: center; justify-content: center;
}

/* ── Empty-states (E98) ────────────────────────────────────────────── */
.empty-state {
  display: flex; flex-direction: column; align-items: center;
  padding: 36px 20px;
  text-align: center;
  background: rgba(5,10,30,0.30);
  border: 1px dashed rgba(147,197,253,0.20);
  border-radius: 14px;
  margin: 12px 0;
}
.empty-state .empty-icon {
  font-size: 56px; line-height: 1;
  opacity: 0.40;
  margin-bottom: 12px;
}
.empty-state .empty-state-art {
  width: min(320px, 88%);
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 12px;
  opacity: .68;
  margin: -12px 0 14px;
  filter: saturate(.9);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 58%, transparent 100%);
  mask-image: radial-gradient(ellipse at center, #000 58%, transparent 100%);
}
.empty-state .empty-title {
  font-size: 14px; font-weight: 700; color: #fff;
  margin-bottom: 6px; letter-spacing: 0.4px;
}
.empty-state .empty-hint {
  font-size: 12px; opacity: 0.70; line-height: 1.5;
  max-width: 320px;
}

/* ── Per-organism level + stats + memorial (E89/E90/E93) ──────────── */
.org-level-pill {
  display: inline-flex; align-items: center;
  padding: 1px 7px; border-radius: 999px;
  font-size: 9px; font-weight: 700; letter-spacing: 0.5px;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  color: #050a1e;
  box-shadow: 0 0 8px rgba(251,191,36,0.5);
}
.org-personal-stats {
  margin: 8px 0;
  padding: 8px 10px; border-radius: 9px;
  background: rgba(5,10,30,0.45);
  border: 1px solid rgba(251,191,36,0.25);
}
.org-personal-stats .sp-eyebrow { margin-bottom: 6px; }
.ops-grid {
  display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 6px;
}
.ops-grid > div {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 5px 4px; border-radius: 6px;
  background: rgba(5,10,30,0.40);
}
.ops-grid span { font-size: 14px; line-height: 1; }
.ops-grid b { font-size: 12px; color: #fff; font-variant-numeric: tabular-nums; }

.memorial-panel { display: flex; flex-direction: column; gap: 12px; }
.memorial-list { display: flex; flex-direction: column; gap: 8px; }
.memorial-card {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 12px 14px; border-radius: 10px;
  background: linear-gradient(135deg, rgba(80,10,20,0.35), rgba(12,30,70,0.55));
  border: 1px solid rgba(248,113,113,0.30);
}
.mem-cross {
  font-size: 28px; line-height: 1; color: #f87171;
  text-shadow: 0 0 12px rgba(248,113,113,0.45);
}
.mem-info { flex: 1; }
.mem-info b { color: #fff; font-size: 14px; }
.mem-meta { font-size: 11px; opacity: 0.72; margin-top: 2px; }
.mem-stats {
  display: flex; gap: 10px; margin-top: 6px;
  font-size: 10px; opacity: 0.78; font-variant-numeric: tabular-nums;
}
.mem-when { margin-left: auto; opacity: 0.5; }
.mem-words {
  margin-top: 6px; font-size: 11px; font-style: italic;
  color: #fca5a5; opacity: 0.85;
}

/* ── Death Splash + Lineage Tree + Run Narrative (E83/E85/E86) ────── */
.death-splash {
  background: linear-gradient(180deg, rgba(80,10,20,0.92), rgba(12,30,70,0.95));
  border: 2px solid rgba(248,113,113,0.55);
  border-radius: 16px; padding: 30px 36px;
  text-align: center; color: #fff;
  box-shadow: 0 24px 70px rgba(0,0,0,0.7), 0 0 50px rgba(248,113,113,0.30);
  max-width: 520px;
  animation: deathIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes deathIn { from { opacity: 0; transform: scale(0.92) translateY(20px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.death-cross {
  font-size: 60px; line-height: 1;
  color: #f87171;
  text-shadow: 0 0 28px rgba(248,113,113,0.5);
  margin-bottom: 6px;
  animation: deathPulse 2s ease-in-out infinite;
}
@keyframes deathPulse { 50% { text-shadow: 0 0 40px rgba(248,113,113,0.8); transform: scale(1.05); } }
.death-name { font-size: 24px; margin: 6px 0 8px; }
.death-words { font-size: 14px; font-style: italic; opacity: 0.85; margin: 0 0 18px; color: #fca5a5; }
.death-stats {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px;
  margin: 12px 0;
}
.death-stats > div {
  padding: 8px 10px; border-radius: 8px;
  background: rgba(5,10,30,0.50); border: 1px solid rgba(224,242,254,0.10);
  display: flex; flex-direction: column; gap: 2px;
}
.death-stats span { font-size: 9px; letter-spacing: 1.4px; opacity: 0.6; text-transform: uppercase; }
.death-stats b { font-size: 16px; color: #fff; }
.death-foot { font-size: 11px; opacity: 0.65; margin: 14px 0 14px; line-height: 1.5; }

.lineage-panel { display: flex; flex-direction: column; gap: 8px; }
.lineage-tree { display: flex; flex-direction: column; gap: 6px; }
.lineage-node { padding: 4px 0; }
.lineage-row {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 10px; border-radius: 7px;
  background: rgba(5,10,30,0.45); border: 1px solid rgba(224,242,254,0.10);
  font-size: 12px;
}
.lineage-row b { color: #fff; }
.lineage-icon { font-size: 14px; }
.lineage-meta { font-size: 10px; opacity: 0.55; font-variant-numeric: tabular-nums; }
.lineage-children {
  margin-left: 18px;
  border-left: 1px dashed rgba(147,197,253,0.30);
  padding-left: 10px; padding-top: 4px;
  display: flex; flex-direction: column; gap: 4px;
}
.lineage-node.depth-0 > .lineage-row {
  border-color: rgba(96,165,250,0.45);
  background: rgba(96,165,250,0.10);
}

.replay-narrative {
  padding: 12px 14px; margin-bottom: 12px;
  border-radius: 9px;
  background: rgba(96,165,250,0.10);
  border: 1px solid rgba(96,165,250,0.30);
}
.replay-narrative p { font-size: 13px; line-height: 1.55; margin: 6px 0 0; opacity: 0.92; font-style: italic; }

/* ── Master Rank pill (E74) ───────────────────────────────────────── */
.master-rank-pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 1px 8px; margin-left: 6px;
  border: 1px solid;
  border-radius: 999px;
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.6px;
  background: rgba(5,10,30,0.45);
}

/* Challenge Picker (E74) */
.challenge-modal {
  background: linear-gradient(180deg, rgba(46,16,82,0.92), rgba(12,30,70,0.95));
  border: 2px solid rgba(248,113,113,0.50);
  border-radius: 16px; padding: 24px 28px;
  color: #fff;
  box-shadow: 0 18px 50px rgba(0,0,0,0.6), 0 0 30px rgba(248,113,113,0.20);
  /* E160 — Bredere modal voor 5-koloms curse-grid met images */
  max-width: 1200px; width: 94vw;
  max-height: 90vh; display: flex; flex-direction: column;
}
.challenge-modal .re-title { margin: 4px 0 4px; font-size: 22px; }
.challenge-grid {
  /* E160 — 5 kolommen vast (10 curses → 2 rijen van 5) */
  display: grid; grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  flex: 1; overflow-y: auto; min-height: 0;
  padding: 4px 0;
}
.challenge-mod {
  text-align: left;
  padding: 0; /* E160 — image edge-to-edge, body krijgt eigen padding */
  background: rgba(5,10,30,0.50); border: 1px solid rgba(224,242,254,0.10);
  border-radius: 9px; cursor: pointer; font-family: inherit;
  color: #fff; transition: all 0.15s;
  display: flex; flex-direction: column;
  overflow: hidden; /* rounded corners knippen image */
}
.challenge-mod:hover { transform: translateY(-1px); border-color: rgba(248,113,113,0.45); background: rgba(248,113,113,0.08); }
.challenge-mod.on {
  background: linear-gradient(135deg, rgba(248,113,113,0.20), rgba(192,132,252,0.16));
  border-color: rgba(248,113,113,0.65);
  box-shadow: 0 0 12px rgba(248,113,113,0.30);
}
/* E160 — Image-banner + body wrapper */
.cm-img {
  width: 100%; aspect-ratio: 16 / 9;
  background-size: cover; background-position: center;
  background-color: #050a1e;
  border-bottom: 1px solid rgba(248,113,113,0.20);
}
.cm-body { padding: 8px 10px 10px; display: flex; flex-direction: column; gap: 3px; }
.cm-icon { font-size: 18px; line-height: 1; }
.cm-name { font-size: 12px; font-weight: 700; line-height: 1.2; }
.cm-desc { font-size: 10.5px; opacity: 0.78; line-height: 1.35; }
.cm-mul {
  font-size: 10px; font-weight: 600; letter-spacing: 0.3px;
  color: #fbbf24; margin-top: 3px;
  font-family: ui-monospace, Menlo, Consolas, monospace;
}
.challenge-foot {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(248,113,113,0.20);
  gap: 12px; flex-wrap: wrap;
}
.challenge-foot b { color: #fbbf24; font-variant-numeric: tabular-nums; font-size: 14px; }

/* ── Onboarding Spotlight (E73) ───────────────────────────────────── */
.spotlight-overlay {
  position: fixed; inset: 0;
  z-index: 90;
  background: rgba(5,10,30,0.55);
  backdrop-filter: blur(2px);
  pointer-events: auto;
  animation: fadeIn 0.25s ease;
}
.spotlight-cutout {
  position: absolute;
  border-radius: 12px;
  box-shadow: 0 0 0 9999px rgba(5,10,30,0.78);
  border: 2px solid rgba(251,191,36,0.85);
  outline: 4px solid rgba(251,191,36,0.20);
  pointer-events: none;
  animation: spotPulse 2s ease-in-out infinite;
}
@keyframes spotPulse {
  0%,100% { outline-color: rgba(251,191,36,0.20); }
  50%     { outline-color: rgba(251,191,36,0.50); outline-offset: 4px; }
}
.spotlight-tooltip {
  position: fixed;
  width: 380px;
  max-width: calc(100vw - 32px);
  padding: 18px 22px;
  background: linear-gradient(180deg, rgba(46,16,82,0.95), rgba(12,30,70,0.95));
  border: 2px solid rgba(192,132,252,0.55);
  border-radius: 14px;
  box-shadow: 0 18px 50px rgba(0,0,0,0.6), 0 0 30px rgba(192,132,252,0.30);
  color: #fff;
  z-index: 91;
  animation: spotIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes spotIn { from { opacity: 0; transform: translateY(8px) scale(0.96); } to { opacity: 1; transform: translateY(0) scale(1); } }
.spotlight-tooltip h3 {
  font-size: 17px; font-weight: 800; margin: 4px 0 8px;
  color: #fff;
}
.spotlight-tooltip p {
  font-size: 13px; line-height: 1.55; opacity: 0.88;
  margin: 0 0 14px;
}
.spot-progress {
  font-size: 10px; letter-spacing: 1.6px; opacity: 0.65;
  color: #fbbf24; font-variant-numeric: tabular-nums;
}
.spot-actions {
  display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap;
}
.spot-actions .g-btn { padding: 7px 14px; font-size: 12px; }

/* ── Synergy card in Lab Assistant (E72) ──────────────────────────── */
.la-synergy-card {
  padding: 12px 14px; border-radius: 11px;
  background: linear-gradient(135deg, rgba(251,191,36,0.10), rgba(192,132,252,0.10));
  border: 1px solid rgba(251,191,36,0.35);
  margin-bottom: 12px;
}
.la-synergy-row {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 6px 0; font-size: 11px; line-height: 1.5;
}
.la-synergy-row + .la-synergy-row { border-top: 1px solid rgba(251,191,36,0.18); }
.la-syn-icon { font-size: 14px; line-height: 1.4; flex-shrink: 0; }

/* ── Lab Assistant (E70) ─────────────────────────────────────────── */
.lab-assist-panel { display: flex; flex-direction: column; gap: 14px; }
.la-section h4 {
  font-size: 11px; letter-spacing: 1.6px; opacity: 0.65;
  margin: 0 0 8px; text-transform: uppercase;
}
.la-text { font-size: 12px; opacity: 0.78; line-height: 1.5; }
.la-card {
  padding: 10px 12px; border-radius: 9px;
  background: rgba(5,10,30,0.45); border: 1px solid rgba(147,197,253,0.20);
  margin-bottom: 6px;
}
.la-card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.la-card-head b { font-size: 12px; color: #fff; }
.la-reward { font-size: 10px; color: #fbbf24; font-variant-numeric: tabular-nums; }
.la-card-desc { font-size: 11px; opacity: 0.72; line-height: 1.5; margin: 4px 0 6px; }
.la-card-match {
  font-size: 11px; color: #6ee7b7;
  padding-top: 5px; border-top: 1px solid rgba(110,231,183,0.20);
}
.la-card-match b { color: #fff; }
.la-card-gap {
  font-size: 11px; color: #fb923c;
  padding-top: 5px; border-top: 1px solid rgba(251,146,60,0.20);
  font-family: monospace;
}

/* ── Photo Mode (E71) ──────────────────────────────────────────────── */
.photo-mode-overlay {
  position: fixed; inset: 0;
  display: flex; justify-content: flex-end;
  z-index: 80;
  pointer-events: none;
}
.photo-controls {
  width: 360px;
  margin: 16px;
  padding: 18px 20px;
  background: rgba(5,10,30,0.92);
  backdrop-filter: blur(16px) saturate(1.2);
  border: 1px solid rgba(147,197,253,0.40);
  border-radius: 14px;
  box-shadow: 0 18px 50px rgba(0,0,0,0.55);
  pointer-events: auto;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  display: flex; flex-direction: column; gap: 8px;
}
.photo-row { display: flex; flex-direction: column; gap: 6px; }
.photo-row label { font-size: 11px; opacity: 0.65; letter-spacing: 0.4px; }
.photo-input {
  background: rgba(5,10,30,0.6); border: 1px solid rgba(147,197,253,0.30);
  border-radius: 7px; padding: 7px 10px;
  color: #fff; font-size: 12px; font-family: inherit;
}
.photo-toggle {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; opacity: 0.85; cursor: pointer;
}
.photo-actions {
  display: flex; gap: 6px; flex-wrap: wrap;
  margin-top: 8px;
}
.photo-actions .g-btn { flex: 1; padding: 8px 10px; font-size: 11px; min-width: 0; }
.photo-preview {
  margin-top: 10px;
  border-radius: 8px; overflow: hidden;
  border: 1px solid rgba(147,197,253,0.30);
}
.photo-preview img { display: block; width: 100%; height: auto; }

/* ── Boss-hint card in RunEndModal (E66) ──────────────────────────── */
.boss-hint-card {
  margin-top: 14px; padding: 12px 14px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(251,191,36,0.10), rgba(192,132,252,0.10));
  border: 1px solid rgba(251,191,36,0.45);
  text-align: left;
}
.boss-hint-eyebrow {
  font-size: 10px; letter-spacing: 1.6px;
  color: #fbbf24; font-weight: 700; margin-bottom: 6px;
}
.boss-hint-text { font-size: 13px; color: #fff; line-height: 1.5; }
.boss-hint-meta { font-size: 11px; opacity: 0.65; margin-top: 6px; }

/* ── Genome Market paneel (E67) ───────────────────────────────────── */
.market-panel { display: flex; flex-direction: column; gap: 10px; }
.market-cost {
  font-size: 11px; opacity: 0.75;
  padding: 8px 10px; border-radius: 6px;
  background: rgba(192,132,252,0.08);
  border: 1px solid rgba(192,132,252,0.20);
}
.market-cost b { color: #fbbf24; font-variant-numeric: tabular-nums; }
.market-clip {
  padding: 10px 12px; border-radius: 9px;
  background: rgba(110,231,183,0.10);
  border: 1px solid rgba(110,231,183,0.40);
}
.market-clip-row { font-size: 13px; margin-top: 4px; }
.market-clip-row b { color: #fff; }
.market-clip-row span { font-variant-numeric: tabular-nums; }
.market-key-pick {
  display: flex; align-items: center; gap: 8px;
  padding: 8px; border-radius: 8px;
  background: rgba(5,10,30,0.40); border: 1px solid rgba(224,242,254,0.10);
}
.market-select {
  background: rgba(5,10,30,0.6); color: #fff;
  border: 1px solid rgba(147,197,253,0.30);
  border-radius: 6px; padding: 4px 8px;
  font-size: 12px; font-family: inherit;
  flex: 1;
}
.market-org-list { display: flex; flex-direction: column; gap: 6px; max-height: 360px; overflow-y: auto; }
.market-org-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 10px; border-radius: 7px;
  background: rgba(5,10,30,0.40); border: 1px solid rgba(224,242,254,0.08);
  font-size: 12px; gap: 10px;
}
.market-org-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.market-org-info b { color: #fff; font-size: 12px; }
.market-org-info span { font-size: 11px; opacity: 0.65; font-variant-numeric: tabular-nums; }
.market-org-row .g-btn { padding: 4px 12px; font-size: 11px; flex-shrink: 0; }

/* ── Climate + Lottery (E64/E65) ──────────────────────────────────── */
.climate-panel { display: flex; flex-direction: column; gap: 10px; }
.climate-hero {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 18px; border-radius: 14px;
  background: linear-gradient(135deg, rgba(96,165,250,0.10), rgba(192,132,252,0.10));
  border: 1px solid rgba(147,197,253,0.30);
}
.climate-icon-big { font-size: 56px; line-height: 1; text-shadow: 0 0 20px rgba(192,132,252,0.4); }
.climate-name { font-size: 18px; font-weight: 800; color: #fff; margin-top: 4px; }
.climate-desc { font-size: 12px; opacity: 0.78; line-height: 1.5; margin-top: 4px; }
.climate-effects {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
}
.climate-fav, .climate-deb {
  padding: 8px 10px; border-radius: 8px;
  background: rgba(5,10,30,0.45);
  font-size: 11px;
}
.climate-fav { border: 1px solid rgba(110,231,183,0.40); color: #6ee7b7; }
.climate-deb { border: 1px solid rgba(248,113,113,0.40); color: #f87171; }
.climate-fav > div, .climate-deb > div { color: #fff; margin-top: 4px; font-family: monospace; font-size: 11px; }
.climate-list { display: flex; flex-direction: column; gap: 4px; }
.climate-item {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 10px; border-radius: 8px;
  background: rgba(5,10,30,0.40);
  border: 1px solid rgba(224,242,254,0.08);
  font-size: 11px;
}
.climate-item.current {
  border-color: rgba(96,165,250,0.55);
  background: rgba(96,165,250,0.10);
}
.climate-item .climate-icon { font-size: 22px; line-height: 1; min-width: 28px; text-align: center; }
.climate-item b { font-size: 12px; color: #fff; }
.climate-desc-small { font-size: 10px; opacity: 0.65; margin-top: 2px; }

/* E133b — Climate-rijen: rij 1 = 4 cellen, rij 2 = 3 cellen, beide volle paneelbreedte.
   Aspect 16:9 op de image behouden zodat blueprint niet vervormt. */
.climate-row {
  display: grid;
  gap: 8px;
  width: 100%;
  margin-bottom: 8px;
}
.climate-row-4 { grid-template-columns: repeat(4, 1fr); }
.climate-row-3 { grid-template-columns: repeat(3, 1fr); margin-bottom: 0; }
.climate-day {
  background: rgba(5,10,30,0.50);
  border: 1px solid rgba(147,197,253,0.18);
  border-radius: 8px;
  overflow: hidden;
  display: flex; flex-direction: column;
  min-width: 0;
}
.climate-day.current {
  border-color: rgba(96,165,250,0.70);
  box-shadow: 0 0 14px rgba(96,165,250,0.35);
  background: rgba(96,165,250,0.08);
}
.climate-day-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  background-size: cover;
  background-position: center;
  background-color: #050a1e;
}
.climate-day-fallback {
  width: 100%; aspect-ratio: 16 / 9;
  display: flex; align-items: center; justify-content: center;
  font-size: 30px; opacity: 0.55;
  background: rgba(8,16,40,0.85);
}
.climate-day-name {
  font-size: 10px; padding: 5px 6px 6px;
  text-align: center; line-height: 1.25;
  color: #cbd5e1;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.climate-day.current .climate-day-name { color: #fff; font-weight: 600; }

.lottery-panel { display: flex; flex-direction: column; gap: 14px; }
.lottery-stats {
  display: flex; flex-direction: column; gap: 8px;
  padding: 14px; border-radius: 12px;
  background: rgba(5,10,30,0.50); border: 1px solid rgba(147,197,253,0.20);
}
.lottery-stats > div {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px;
}
.lottery-stats span { opacity: 0.65; }
.lottery-stats b { color: #fff; font-variant-numeric: tabular-nums; }
.lottery-stats .fail-stat { color: #f87171; }
.lottery-stats .fail-stat b { color: #fca5a5; }
.lottery-btn {
  padding: 14px !important; font-size: 14px !important;
  background: linear-gradient(180deg, rgba(251,191,36,0.30), rgba(251,146,60,0.30)) !important;
  border-color: rgba(251,191,36,0.65) !important;
}
.lottery-warn {
  font-size: 11px; color: #f87171;
  text-align: center; padding: 8px;
  background: rgba(248,113,113,0.08); border-radius: 6px;
  border: 1px solid rgba(248,113,113,0.25);
}

/* ── Discoveries + Journal panels (E62/E63) ───────────────────────── */
.discoveries-panel, .journal-panel { display: flex; flex-direction: column; gap: 12px; }
.disc-progress {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; border-radius: 10px;
  background: rgba(5,10,30,0.45); border: 1px solid rgba(147,197,253,0.20);
  font-size: 12px;
}
.disc-progress span { font-weight: 700; white-space: nowrap; }
.disc-list { display: flex; flex-direction: column; gap: 8px; }
.disc-item {
  padding: 10px 12px; border-radius: 9px;
  background: rgba(5,10,30,0.45); border: 1px solid rgba(224,242,254,0.10);
}
.disc-item.unlocked {
  background: linear-gradient(135deg, rgba(110,231,183,0.10), rgba(96,165,250,0.10));
  border-color: rgba(110,231,183,0.45);
}
.disc-item.locked { opacity: 0.65; }
.disc-head {
  display: flex; justify-content: space-between; align-items: baseline; gap: 10px;
}
.disc-head b { font-size: 13px; color: #fff; }
.disc-reward {
  font-size: 10px; color: #fbbf24;
  font-variant-numeric: tabular-nums;
}
.disc-desc { font-size: 11px; opacity: 0.78; line-height: 1.5; margin-top: 4px; }
.disc-meta {
  font-size: 10px; opacity: 0.6;
  margin-top: 5px; padding-top: 5px;
  border-top: 1px solid rgba(224,242,254,0.06);
}

/* ── DNA-editor role-card + hybrid slider (E60/E61) ───────────────── */
.dna-role-card {
  width: 100%; padding: 8px 10px;
  border-radius: 9px;
  background: rgba(5,10,30,0.55);
  border: 1px solid rgba(147,197,253,0.20);
  margin-bottom: 4px;
}
.dna-role-card.is-hybrid {
  border-color: rgba(192,132,252,0.55);
  background: linear-gradient(135deg, rgba(96,165,250,0.10), rgba(192,132,252,0.10));
  box-shadow: 0 0 12px rgba(192,132,252,0.18);
}
.dna-forecast-card {
  width: 100%; padding: 9px 10px; border-radius: 10px;
  background: linear-gradient(145deg, rgba(8,47,73,.52), rgba(30,27,75,.45));
  border: 1px solid rgba(56,189,248,.24);
}
.dna-forecast-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.dna-forecast-head span { font-size: 8px; font-weight: 800; letter-spacing: 1.4px; color: #7dd3fc; }
.dna-forecast-head b { font-size: 9px; color: #fff; opacity: .72; }
.dna-forecast-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; margin-top: 7px; }
.dna-forecast-metric {
  display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 4px;
  padding: 5px 6px; border-radius: 6px; background: rgba(5,10,30,.38); font-size: 9px;
}
.dna-forecast-metric span { opacity: .64; }
.dna-forecast-metric b { color: #fff; font-variant-numeric: tabular-nums; }
.dna-forecast-metric em { font-style: normal; color: #94a3b8; font-size: 8px; }
.dna-forecast-metric em.good { color: #6ee7b7; }
.dna-forecast-metric em.bad { color: #fca5a5; }
.dna-tradeoff-list { margin-top: 7px; display: grid; gap: 3px; }
.dna-tradeoff-list div { font-size: 9px; line-height: 1.35; color: rgba(224,242,254,.72); }
.dna-role-head {
  display: flex; justify-content: space-between; align-items: center;
}
.dna-role-name { font-size: 13px; font-weight: 700; color: #fff; letter-spacing: 0.4px; }
.dna-role-tag-hybrid {
  font-size: 9px; letter-spacing: 1.5px; font-weight: 700;
  padding: 2px 6px; border-radius: 4px;
  background: rgba(192,132,252,0.25); color: #fbbf24;
}
.dna-arch-blend {
  display: flex; gap: 6px; font-size: 10px; opacity: 0.80;
  margin-top: 4px; font-variant-numeric: tabular-nums;
}
.dna-role-bars {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px;
  margin-top: 6px;
}
.dna-role-bar {
  height: 5px; border-radius: 3px;
  background: rgba(5,10,30,0.6);
  border: 1px solid rgba(224,242,254,0.10);
  position: relative; overflow: hidden;
}
.dna-role-bar > span {
  position: absolute; left: 0; top: 0; bottom: 0;
  border-radius: 3px;
  transition: width 0.3s;
}
.dna-role-bar.role-off > span { background: linear-gradient(90deg, #f87171, #ef4444); box-shadow: 0 0 6px rgba(248,113,113,0.5); }
.dna-role-bar.role-def > span { background: linear-gradient(90deg, #93c5fd, #3b82f6); box-shadow: 0 0 6px rgba(96,165,250,0.5); }
.dna-role-bar.role-mob > span { background: linear-gradient(90deg, #fde68a, #fbbf24); box-shadow: 0 0 6px rgba(251,191,36,0.5); }
.dna-role-bar.role-sup > span { background: linear-gradient(90deg, #6ee7b7, #10b981); box-shadow: 0 0 6px rgba(110,231,183,0.5); }
.dna-role-tags {
  display: flex; flex-wrap: wrap; gap: 3px; margin-top: 5px;
}
.dna-role-tag {
  font-size: 9px; padding: 1px 5px; border-radius: 4px;
  background: rgba(192,132,252,0.14); color: #c4b5fd;
  border: 1px solid rgba(192,132,252,0.30);
}

/* E61 Hybrid Engineering — continuous archetype slider */
.gene-archetype-hybrid {
  grid-column: 3 / 6;
  display: flex; flex-direction: column; gap: 4px;
}
.gah-readout {
  font-size: 10px; letter-spacing: 0.4px;
  color: #fbbf24; font-variant-numeric: tabular-nums;
}
.gah-sec { color: #c084fc; }
.gah-marks {
  display: grid; grid-template-columns: repeat(4, 1fr);
  font-size: 8px; opacity: 0.65; letter-spacing: 0.3px;
}
.gah-mark {
  text-align: center; cursor: pointer;
  padding: 1px 0;
  transition: color 0.15s, transform 0.15s;
}
.gah-mark:hover { color: #fff; }
.gah-mark.near { color: #fbbf24; font-weight: 700; transform: scale(1.05); }
.gah-slider { accent-color: #fbbf24; }

/* ── Role-card / hybride classificatie (E59) ──────────────────────── */
.role-card {
  margin: 8px 0;
  padding: 8px 10px;
  border-radius: 9px;
  background: linear-gradient(135deg, rgba(96,165,250,0.08), rgba(192,132,252,0.06));
  border: 1px solid rgba(147,197,253,0.20);
}
.role-name {
  font-size: 12px; font-weight: 700; color: #fff;
  letter-spacing: 0.4px;
}
.role-bars {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px;
  margin-top: 6px;
}
.role-bar {
  height: 5px; border-radius: 3px;
  background: rgba(5,10,30,0.5);
  border: 1px solid rgba(224,242,254,0.08);
  position: relative; overflow: hidden;
}
.role-bar > span {
  position: absolute; left: 0; top: 0; bottom: 0;
  border-radius: 3px;
  transition: width 0.3s;
}
.role-bar.role-off > span { background: linear-gradient(90deg, #f87171, #ef4444); box-shadow: 0 0 6px rgba(248,113,113,0.5); }
.role-bar.role-def > span { background: linear-gradient(90deg, #93c5fd, #3b82f6); box-shadow: 0 0 6px rgba(96,165,250,0.5); }
.role-bar.role-mob > span { background: linear-gradient(90deg, #fde68a, #fbbf24); box-shadow: 0 0 6px rgba(251,191,36,0.5); }
.role-bar.role-sup > span { background: linear-gradient(90deg, #6ee7b7, #10b981); box-shadow: 0 0 6px rgba(110,231,183,0.5); }
.role-tags {
  display: flex; flex-wrap: wrap; gap: 4px;
  margin-top: 6px;
}
.role-tag {
  font-size: 9px; padding: 1px 6px; border-radius: 4px;
  background: rgba(192,132,252,0.14); color: #c4b5fd;
  border: 1px solid rgba(192,132,252,0.30);
  letter-spacing: 0.3px;
}

/* ── E126 · Loadout modal ──────────────────────────────────────────── */
.loadout-modal {
  background: linear-gradient(180deg, rgba(12,30,70,0.94), rgba(5,10,30,0.96));
  border: 1px solid rgba(147,197,253,0.45);
  border-radius: 14px; padding: 20px 24px;
  color: #fff; text-align: center;
  box-shadow: 0 12px 40px rgba(0,0,0,0.6);
  width: min(640px, 95vw); max-width: 95vw; max-height: calc(100vh - 32px);
  display: flex; flex-direction: column; gap: 12px;
  overflow-y: auto;
}
.loadout-goal { margin: 0 0 4px; font-size: 13px; }
.loadout-slots {
  display: flex; gap: 10px; justify-content: center; margin: 4px 0 8px;
}
.loadout-slot {
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; line-height: 1;
  border: 1px dashed rgba(147,197,253,0.30);
  background: rgba(5,10,30,0.5);
  color: rgba(224,242,254,0.35);
  transition: all 180ms ease;
}
.loadout-slot.random {
  border-style: solid; border-color: rgba(147,197,253,0.70);
  color: #93c5fd;
  box-shadow: 0 0 14px rgba(96,165,250,0.30);
}
.loadout-slot.filled {
  border-style: solid; border-color: #6ee7b7;
  background: radial-gradient(circle at 30% 30%, rgba(20,80,55,0.85), rgba(5,30,20,0.92));
  color: #6ee7b7;
  box-shadow: 0 0 18px rgba(110,231,183,0.45);
}
.loadout-slot.founder {
  border-color: #fbbf24; color: #fde68a;
  box-shadow: 0 0 0 3px rgba(251,191,36,0.14), 0 0 22px rgba(251,191,36,0.5);
}
.loadout-founder-hint { margin-top: -8px; color: rgba(253,230,138,0.78); font-size: 10px; }
/* E126b — Random-preview card met re-roll */
.loadout-random-preview {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px;
  background: rgba(96,165,250,0.10);
  border: 1px solid rgba(147,197,253,0.40);
  border-radius: 10px;
  text-align: left;
}
.lrp-icon {
  width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
  background: rgba(96,165,250,0.18);
  border: 1px solid rgba(147,197,253,0.55);
  color: #93c5fd;
}
.lrp-info { flex: 1; min-width: 0; }
.lrp-eyebrow { font-size: 9px; letter-spacing: 1.4px; opacity: 0.65; color: #93c5fd; }
.lrp-name { font-size: 14px; font-weight: 600; margin-top: 1px; }
.lrp-meta { font-size: 10px; opacity: 0.78; display: flex; gap: 6px; flex-wrap: wrap; margin-top: 2px; }
.lrp-reroll {
  background: rgba(96,165,250,0.18);
  border: 1px solid rgba(147,197,253,0.55);
  border-radius: 999px;
  color: #E0F2FE;
  font-family: inherit; font-size: 12px; font-weight: 600;
  padding: 6px 12px;
  cursor: pointer;
  transition: all 140ms ease;
  flex-shrink: 0;
}
.lrp-reroll:hover {
  background: rgba(96,165,250,0.32);
  border-color: #93c5fd;
  transform: scale(1.05);
}

.loadout-summary {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px;
  padding: 8px 12px; border-radius: 8px;
  background: rgba(96,165,250,0.10);
  border: 1px solid rgba(147,197,253,0.25);
}
.loadout-cost { color: #c084fc; font-weight: 700; font-size: 14px; }
.loadout-cost-bad { color: #fca5a5; }
.loadout-empty {
  padding: 24px 16px; opacity: 0.65; font-size: 12px; font-style: italic;
}
.loadout-lib {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px; max-height: 280px; overflow-y: auto;
  padding: 4px;
}
.loadout-card {
  background: rgba(12,30,70,0.55);
  border: 1px solid rgba(147,197,253,0.25);
  border-radius: 8px;
  padding: 8px 10px;
  text-align: left;
  cursor: pointer;
  color: #E0F2FE;
  transition: all 140ms ease;
  font-family: inherit;
  display: flex; flex-direction: column; gap: 3px;
}
.loadout-card:hover { border-color: rgba(147,197,253,0.65); transform: translateY(-1px); }
.loadout-card.on {
  border-color: #6ee7b7;
  background: rgba(20,80,55,0.45);
  box-shadow: 0 0 14px rgba(110,231,183,0.35);
}
.loadout-card.disabled { opacity: 0.35; cursor: not-allowed; }
.loadout-card.disabled:hover { transform: none; border-color: rgba(147,197,253,0.25); }
.lc-name { font-size: 12px; font-weight: 600; line-height: 1.2; }
.lc-meta { display: flex; gap: 6px; align-items: center; font-size: 10px; opacity: 0.8; }
.lc-rarity { padding: 1px 6px; border-radius: 999px; border: 1px solid rgba(255,255,255,0.15); font-size: 9px; }
.lc-cost { font-size: 10px; color: #c084fc; font-weight: 600; margin-top: 2px; }

/* ── Replay / Highlight reel (E57/E117 unified, E118 banner) ──────── */
.replay-modal {
  background: linear-gradient(180deg, rgba(12,30,70,0.92), rgba(5,10,30,0.95));
  border: 1px solid rgba(147,197,253,0.40);
  border-radius: 14px; padding: 0 24px 18px;
  color: #fff; text-align: center;
  box-shadow: 0 12px 40px rgba(0,0,0,0.6);
  /* E175 — Even breed als challenge modal */
  width: 94vw; max-width: 1200px; max-height: calc(100vh - 32px);
  display: flex; flex-direction: column; gap: 10px;
  overflow-y: auto; overflow-x: hidden;
}
/* E118/E121/E175 — Banner image (Victory/Defeat) — image is 1280×543,
   gebruik die exacte aspect-ratio + contain zodat er niks wordt geknipt. */
.replay-banner {
  position: relative;
  margin: 0 -24px 4px;
  width: calc(100% + 48px);
  aspect-ratio: 1280 / 543;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  background-color: #050a1e;
  border-bottom: 1px solid rgba(147,197,253,0.30);
}
.replay-banner-overlay {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 14px 24px 12px;
  background: linear-gradient(180deg, rgba(5,10,30,0) 0%, rgba(5,10,30,0.55) 50%, rgba(5,10,30,0.92) 100%);
  text-align: center;
  display: flex; flex-direction: column; gap: 4px;
}
.replay-banner-overlay .re-title {
  margin: 0 !important; font-size: 22px; font-weight: 600;
  text-shadow: 0 2px 8px rgba(0,0,0,0.85);
}
.replay-modal.win  .replay-banner-overlay .re-title { color: #6ee7b7; }
.replay-modal.loss .replay-banner-overlay .re-title { color: #fca5a5; }
.re-meta {
  display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 6px; font-size: 12px; opacity: 0.92;
  text-shadow: 0 1px 4px rgba(0,0,0,0.85);
}
.re-meta-goal   { color: #fff; font-weight: 500; }
.re-meta-reason { color: #cbd5e1; }
.re-meta-time   { color: #fbbf24; font-variant-numeric: tabular-nums; font-weight: 600; }
.re-meta-sep    { opacity: 0.45; }
/* Compact reward pills (één korte rij i.p.v. blokken) */
.re-rewards-compact {
  display: flex; gap: 6px; justify-content: center; flex-wrap: wrap;
  margin: 0;
}
.re-pill-mini {
  display: inline-block;
  font-size: 11px; font-weight: 600; letter-spacing: 0.4px;
  padding: 3px 9px; border-radius: 999px;
  background: rgba(96,165,250,0.14);
  border: 1px solid rgba(147,197,253,0.32);
  color: #E0F2FE;
}
.replay-modal.win  .replay-banner { border-bottom-color: rgba(110,231,183,0.45); }
.replay-modal.loss .replay-banner { border-bottom-color: rgba(252,165,165,0.45); }
.replay-modal.win  { border-color: rgba(110,231,183,0.45); box-shadow: 0 12px 40px rgba(34,197,94,0.30); }
.replay-modal.loss { border-color: rgba(252,165,165,0.40); }
.replay-modal .re-icon { display: none; } /* E121 — banner heeft eigen ✓/✗ */
.replay-modal .re-rewards { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.replay-modal .re-buttons { justify-content: center; gap: 6px; flex-wrap: wrap; margin-top: 6px !important; }
.replay-modal .re-buttons .g-btn { padding: 6px 12px; font-size: 12px; }
.replay-section { text-align: left; }
.replay-section .sp-eyebrow { margin-bottom: 4px; }
.replay-modal .replay-narrative { margin: 0; padding: 8px 12px; }
.replay-modal .replay-narrative p { font-size: 12px; line-height: 1.45; margin: 4px 0 0; }
.replay-modal .boss-hint-card { padding: 8px 12px; }
.replay-modal .replay-timeline { gap: 4px; max-height: 180px; }
.replay-modal .replay-event { padding: 5px 8px; font-size: 11px; }
.replay-score {
  font-size: 14px; color: #fbbf24;
  padding: 6px 12px; border-radius: 8px;
  background: rgba(251,191,36,0.12); border: 1px solid rgba(251,191,36,0.35);
  margin-bottom: 12px; align-self: flex-start;
}
.replay-timeline {
  flex: 1; overflow-y: auto; min-height: 0;
  display: flex; flex-direction: column; gap: 6px;
  padding-right: 6px;
}
.replay-event {
  display: grid; grid-template-columns: 24px 50px 1fr; align-items: center;
  gap: 8px; padding: 8px 10px; border-radius: 7px;
  background: rgba(5,10,30,0.5); border: 1px solid rgba(224,242,254,0.08);
  font-size: 12px;
}
.replay-event.replay-encounter {
  background: rgba(192,132,252,0.10);
  border-color: rgba(192,132,252,0.30);
}
.replay-event.replay-start {
  background: rgba(96,165,250,0.10);
  border-color: rgba(96,165,250,0.30);
}
.replay-icon { font-size: 16px; text-align: center; }
.replay-time {
  font-variant-numeric: tabular-nums;
  font-size: 10px; opacity: 0.6;
}
.replay-text { color: #fff; }
.replay-modal .re-buttons { margin-top: 14px; justify-content: flex-end; }

/* ── Mobile / responsive (E56) ─────────────────────────────────────── */
@media (max-width: 900px) {
  :root { --hud-side-w: 0px; --hud-right-w: 0px; --hud-margin: 8px; --hud-pad: 10px; --hud-top: 132px; }
  .hud-left-column { display: none; }
  .topbar-stacked { padding: 4px 6px !important; }
  .tb-row-nav { overflow-x: auto; flex-wrap: nowrap !important; -webkit-overflow-scrolling: touch; }
  .tb-nav { flex-wrap: nowrap !important; min-width: max-content; }
  .tb-nav-btn { flex-shrink: 0; padding: 4px 8px !important; }
  .tb-nav-label { font-size: 10px !important; }
  .side-panel-wide.side-panel-right {
    left: 8px !important; right: 8px !important; width: auto !important;
    max-width: none !important; max-height: calc(100vh - 160px) !important;
  }
  .pu-bar { bottom: 8px; padding: 6px 10px; }
  .pu-slot { width: 44px; height: 44px; }
  .pu-slot-icon { font-size: 18px; }
  .toast-stack { right: 8px; bottom: 8px; max-width: 92vw; }
  .notification-center { top: 164px; left: 10px; right: 10px; }
  .notification-rail { width: min(520px,100%); }
  .notification-copy { flex-direction: column; align-items: flex-start; gap: 1px; }
  .notification-copy span { width: 100%; }
  /* Reserveer ook op smalle schermen één vaste meldingsbaan. De rechter
     runkaarten beginnen eronder, zodat een melding nooit bovenop de founder,
     unlockstatus of het run-doel terechtkomt. */
  .next-unlock-pill,
  .founder-card,
  body.compact-ui .next-unlock-pill { top: 228px; }
  .run-status,
  body.compact-ui .run-status { top: 314px; }
  .live-event-banner { font-size: 10px; padding: 2px 8px; max-width: 90vw; }
  .lev-desc { display: none; }
  .encounter-modal { max-width: 92vw; padding: 18px 16px; }
  .run-end { max-width: 92vw; }
}
@media (max-width: 600px) {
  .topbar-stacked { height: 142px !important; padding: 6px 8px !important; }
  .topbar-stacked .tb-row-stats { height: 58px !important; padding: 0 4px !important; flex-wrap: nowrap; gap: 5px !important; }
  .topbar-stacked .tb-left { min-width: 0; flex: 1 1 auto; gap: 5px; }
  .topbar-stacked .player-bar { width: 100%; min-width: 0; gap: 7px; }
  .topbar-stacked .lvl-badge { width: 42px; height: 42px; }
  .topbar-stacked .xp-block { min-width: 0; max-width: none; }
  .topbar-stacked .xp-meta { gap: 3px; font-size: 9px; }
  .topbar-stacked .xp-meta-name { display: none; }
  .topbar-stacked .xp-meta-num { width: 100%; text-align: right; }
  .topbar-stacked .tb-currencies { gap: 3px; }
  .topbar-stacked .currency-pill { width: 41px; height: 36px; padding: 0 3px !important; justify-content: center; text-align: center; font-size: 10px !important; }
  .topbar-stacked .currency-pill .cy-icon { display: none; }
  .topbar-stacked .currency-pill .cy-label { font-size: 7px; letter-spacing: .8px; }
  .topbar-stacked .currency-pill b { font-size: 11px; }
  .topbar-stacked .fps-badge,
  .topbar-stacked .speed-control,
  .topbar-stacked .tb-action-btn { display: none !important; }
  .topbar-stacked .pause-btn { width: 34px; min-width: 34px; padding: 0; }
  .topbar-stacked .tb-row-nav { height: 66px; margin-top: 2px; padding: 0 2px !important; }
  .topbar-stacked .tb-nav { width: 100%; padding: 3px; overflow-x: auto; justify-content: flex-start; scrollbar-width: none; }
  .topbar-stacked .tb-nav::-webkit-scrollbar { display: none; }
  .topbar-stacked .tb-nav-btn { width: 39px; height: 42px; padding: 0 5px !important; gap: 0; justify-content: center; }
  .topbar-stacked .tb-nav-icon { width: 30px; height: 30px; flex-basis: 30px; }
  .run-mods { top: 146px; left: 8px; right: 8px; max-width: none; flex-wrap: nowrap; overflow: hidden; gap: 4px; }
  .run-mod-badge { flex: 0 1 auto; min-width: 0; padding: 2px 6px; font-size: 8px; }
  .run-mod-badge .rmb-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .live-event-banner { display: none; }
  .notification-center { top: 178px; }
  .notification-rail { grid-template-columns: 26px minmax(0,1fr) auto auto; gap: 6px; }
  .notification-queued { display: none; }
}

/* ── E116 · Encounter banner image bovenaan modal (volledig zichtbaar) */
.enc-banner {
  margin: 0 -32px 18px;
  width: calc(100% + 64px);
  aspect-ratio: 1280 / 543;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  background-color: #050a1e;
  border-bottom: 1px solid rgba(192,132,252,0.30);
}

/* ── Encounter modal (E53) ────────────────────────────────────────── */
.encounter-overlay { background: rgba(5, 10, 30, 0.55); }
.encounter-modal {
  background: linear-gradient(180deg, rgba(46,16,82,0.88), rgba(12,30,70,0.92));
  border: 2px solid rgba(192,132,252,0.50);
  border-radius: 18px; padding: 0 32px 28px;
  text-align: center; color: #fff;
  box-shadow: 0 14px 60px rgba(0,0,0,0.7), 0 0 50px rgba(192,132,252,0.30);
  max-width: 720px; width: 92vw;
  overflow: hidden;
  animation: encIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
/* E150 — Season-change modal: cyaan accent i.p.v. paars (anders dan encounter) */
.season-change-modal {
  background: linear-gradient(180deg, rgba(12,30,70,0.92), rgba(5,30,50,0.94)) !important;
  border-color: rgba(96,165,250,0.55) !important;
  box-shadow: 0 14px 60px rgba(0,0,0,0.7), 0 0 50px rgba(96,165,250,0.32) !important;
}
/* E154 — Banner edge-to-edge én volledig gevuld (16:9 image, cover-fit) */
.season-change-modal .enc-banner,
.climate-change-modal .enc-banner {
  aspect-ratio: 16 / 9;
  background-size: cover;
}
/* E153 — Modal close-X (rechtsboven, op de banner) */
.modal-close-x {
  position: absolute; top: 10px; right: 12px;
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(5,10,30,0.75);
  border: 1px solid rgba(147,197,253,0.40);
  color: #E0F2FE;
  font-size: 18px; line-height: 1;
  cursor: pointer; font-family: inherit;
  display: flex; align-items: center; justify-content: center;
  transition: all 140ms ease; z-index: 5;
}
.modal-close-x:hover {
  background: rgba(96,165,250,0.30);
  border-color: #93c5fd;
  transform: scale(1.08);
}
.season-change-modal, .climate-change-modal, .council-modal, .run-start-modal, .custom-run-modal { position: relative; }
/* E174 — Run-start modal + Loadout modal even breed als challenge (1200px / 94vw) */
.run-start-modal {
  max-width: 1200px !important; width: 94vw !important;
  padding-top: 0 !important;
}
.run-primary-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; margin: 12px 0; }
.run-primary-card { min-height: 104px; padding: 0; display: flex; flex-direction: row; align-items: stretch; overflow: hidden; border-radius: 11px; border: 1px solid rgba(147,197,253,.27); background: rgba(10,23,54,.76); color: #e0f2fe; font: inherit; cursor: pointer; text-align: left; transition: transform .18s ease, border-color .18s ease, background .18s ease; }
.run-primary-card:hover,.run-primary-card.primary { border-color: rgba(110,231,183,.62); background: rgba(16,60,61,.45); transform: translateY(-1px); }
.run-primary-art { position: relative; flex: 0 0 44%; min-width: 0; background-position: center; background-size: cover; opacity: .72; border-right: 1px solid rgba(147,197,253,.16); transition: opacity .18s ease, transform .24s ease; }
.run-primary-art::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent 45%, rgba(5,10,30,.64)); }
.run-primary-card:hover .run-primary-art { opacity: .94; transform: scale(1.025); }
.run-primary-copy { position: relative; z-index: 1; flex: 1; min-width: 0; padding: 13px 12px; display: flex; flex-direction: column; justify-content: center; gap: 7px; }
.run-primary-card .run-primary-copy b { font-size: 14px; color: #fff; }
.run-primary-card .run-primary-copy > span { font-size: 10px; line-height: 1.35; opacity: .68; }
.run-advanced-toggle { width: 100%; border: 0; background: transparent; color: rgba(224,242,254,.68); font: inherit; font-size: 11px; cursor: pointer; padding: 8px; }
.run-start-buttons.advanced { margin-top: 4px; padding-top: 9px; border-top: 1px solid rgba(224,242,254,.1); }
@media (max-width: 700px) { .run-primary-grid { grid-template-columns: 1fr; } .run-primary-card { min-height: 82px; } .run-primary-art { flex-basis: 38%; } }
.loadout-modal {
  max-width: 1200px !important; width: 94vw !important;
  padding-top: 0 !important;
}
/* E177 — Header banner bovenaan modal — edge-to-edge */
.modal-header-banner {
  position: relative;
  width: calc(100% + 64px);
  margin: 0 -32px 6px;
  aspect-ratio: 16 / 5;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  background-color: #050a1e;
  border-bottom: 1px solid rgba(147,197,253,0.30);
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  overflow: hidden;
}
/* loadout heeft padding 20px 24px ipv 32 — corrigeer marges */
.loadout-modal .modal-header-banner {
  width: calc(100% + 48px);
  margin: 0 -24px 0;
}
/* E178 — Volle-breedte variant: image filt de bak, tekst-overlay onderaan */
.modal-header-banner.with-overlay {
  background-size: cover;
  margin-bottom: 0;
}
.modal-header-overlay {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 18px 28px 16px;
  background: linear-gradient(180deg, rgba(5,10,30,0) 0%, rgba(5,10,30,0.65) 55%, rgba(5,10,30,0.95) 100%);
  text-align: left;
  display: flex; flex-direction: column; gap: 2px;
}
.modal-header-overlay .sp-eyebrow {
  font-size: 11px; letter-spacing: 1.4px; opacity: 0.85;
  text-shadow: 0 1px 4px rgba(0,0,0,0.85);
}
.modal-header-overlay .re-title {
  margin: 2px 0 4px !important; font-size: 22px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.85);
}
.modal-header-overlay .loadout-goal {
  margin: 0 !important; font-size: 13px; opacity: 0.92;
  text-shadow: 0 1px 4px rgba(0,0,0,0.85);
}
/* E163/E165c — CustomRunModal: BLOCK-layout zodat 12 secties niet via
   flex-shrink elkaar verdringen. Modal zelf scrollt op max-height. Grid blijft
   op natuurlijke hoogte → cards behouden volle inhoud incl. descs. */
.custom-run-modal {
  background: linear-gradient(180deg, rgba(12,30,70,0.92), rgba(5,10,30,0.95)) !important;
  border-color: rgba(96,165,250,0.50) !important;
  box-shadow: 0 14px 60px rgba(0,0,0,0.7), 0 0 50px rgba(96,165,250,0.25) !important;
  max-width: 1200px !important; width: 94vw !important;
  max-height: 92vh !important;
  display: block !important;        /* NIET flex-column */
  overflow-y: auto !important;      /* modal scrollt zelf */
  padding-top: 14px !important;
}
.custom-run-modal .enc-flavor { margin-bottom: 6px; }
.custom-run-modal .challenge-grid {
  /* Override challenge-modal's flex:1 → laat de grid natuurlijke hoogte hebben */
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  padding: 4px;
  flex: none;
  overflow: visible;
  min-height: 0;
}
.custom-run-modal .challenge-mod {
  /* Geen overflow:hidden op cards in custom — anders snijdt het descs af.
     Image bovenaan houden via border-radius-overlap blijft visueel oké. */
  overflow: hidden;
  min-height: 0;
}
.custom-run-modal .cm-desc {
  display: block;
  white-space: normal;
  overflow: visible;
  /* Geef desc gegarandeerde verticale ruimte (auto-grow, geen clip) */
  min-height: 30px;
}
.cr-settings {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 8px 16px; margin: 10px 4px 4px;
}
.cr-settings-2col { grid-template-columns: repeat(2, 1fr); }
.cr-settings .cr-row {
  display: flex; align-items: center; gap: 10px;
  background: rgba(5,10,30,0.45);
  border: 1px solid rgba(147,197,253,0.18);
  border-radius: 8px; padding: 8px 12px;
}
.cr-settings .cr-label { font-size: 11px; opacity: 0.65; min-width: 60px; }
.cr-settings .panel-select, .cr-settings .g-slider { flex: 1; }
.cr-settings b { font-size: 12px; color: #fbbf24; min-width: 50px; text-align: right; }

/* E164 — Card-pickers voor goal + biome */
.cr-pick-row { display: grid; gap: 8px; padding: 0 4px; }
.cr-pick-5 { grid-template-columns: repeat(5, 1fr); }
.cr-card {
  background: rgba(5,10,30,0.55);
  border: 1px solid rgba(147,197,253,0.22);
  border-radius: 9px;
  cursor: pointer; font-family: inherit; color: #fff;
  text-align: left;
  transition: all 140ms ease;
  display: flex; flex-direction: column;
  overflow: hidden;
  padding: 10px 12px;
}
.cr-card-img { padding: 0; }
.cr-card:hover:not(.on) { transform: translateY(-1px); border-color: rgba(147,197,253,0.55); }
.cr-card.on {
  background: rgba(96,165,250,0.10);
  border-color: rgba(96,165,250,0.65);
  box-shadow: 0 0 14px rgba(96,165,250,0.30);
}
.cr-card-icon { font-size: 24px; line-height: 1; margin-bottom: 4px; }
.cr-card-banner {
  width: 100%; aspect-ratio: 16 / 9;
  background-size: cover; background-position: center;
  background-color: #050a1e;
  border-bottom: 1px solid rgba(147,197,253,0.20);
}
.cr-card-body { padding: 7px 10px 9px; display: flex; flex-direction: column; gap: 2px; }
.cr-card-name { font-size: 12px; font-weight: 600; line-height: 1.2; }
.cr-card-meta {
  font-size: 10px; opacity: 0.70;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  color: #fbbf24;
}

/* E164 — Duur als 3-button row i.p.v. dropdown */
.cr-dur-btns { display: flex; gap: 4px; flex: 1; }
.cr-dur-btn {
  flex: 1; padding: 7px 8px; font-size: 11px;
  background: rgba(5,10,30,0.55); border: 1px solid rgba(147,197,253,0.22);
  border-radius: 7px; color: #cbd5e1; cursor: pointer; font-family: inherit;
  transition: all 140ms ease;
}
.cr-dur-btn:hover:not(.on) { border-color: rgba(147,197,253,0.55); color: #fff; }
.cr-dur-btn.on {
  background: rgba(96,165,250,0.18);
  border-color: rgba(96,165,250,0.65);
  color: #fff;
  box-shadow: 0 0 10px rgba(96,165,250,0.30);
}
/* E167/E168 — Random-setup rij in ChallengePicker (3 items + re-roll knop) */
.challenge-setup-locked {
  display: grid; grid-template-columns: repeat(3, 1fr) auto;
  gap: 8px; margin: 0 0 14px;
  align-items: stretch;
}
.cs-reroll-btn {
  background: rgba(96,165,250,0.18);
  border: 1px solid rgba(147,197,253,0.55);
  border-radius: 8px;
  color: #E0F2FE;
  font-family: inherit; font-size: 12px; font-weight: 600;
  padding: 6px 14px;
  cursor: pointer;
  transition: all 140ms ease;
  white-space: nowrap;
}
.cs-reroll-btn:hover {
  background: rgba(96,165,250,0.32);
  border-color: #93c5fd;
  transform: scale(1.04);
}
.cs-locked-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px;
  background: rgba(5,10,30,0.55);
  border: 1px solid rgba(147,197,253,0.22);
  border-radius: 8px;
  font-size: 12px;
  opacity: 0.85;
}
.cs-locked-label { opacity: 0.65; font-size: 11px; }
.cs-locked-item b { color: #fff; }
.cs-locked-lock { margin-left: auto; opacity: 0.55; font-size: 11px; }

/* E166 — Multiplier breakdown in custom-run foot */
.cr-mul-breakdown { display: flex; flex-direction: column; gap: 2px; }
.cr-mul-line { font-size: 13px; }
.cr-mul-line b { color: #fbbf24; font-variant-numeric: tabular-nums; font-size: 14px; margin-left: 4px; }
.cr-mul-detail {
  display: flex; gap: 12px; font-size: 11px; opacity: 0.78;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  color: #93c5fd;
}
/* E162 — Run-type picker buttons in een grid */
.run-start-buttons {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px; margin-top: 14px;
}
.run-start-buttons .g-btn { padding: 10px 14px; font-size: 13px; }
/* E156 — Library Council modal */
.council-modal {
  background: linear-gradient(180deg, rgba(20,80,55,0.30), rgba(5,30,20,0.92)) !important;
  border-color: rgba(110,231,183,0.55) !important;
  box-shadow: 0 14px 60px rgba(0,0,0,0.7), 0 0 50px rgba(110,231,183,0.30) !important;
}
.council-list {
  display: flex; flex-direction: column; gap: 10px;
  margin: 14px 0 10px;
}
.council-card {
  background: rgba(5,10,30,0.55);
  border: 1px solid rgba(147,197,253,0.25);
  border-radius: 10px;
  padding: 10px 14px;
  text-align: left;
  display: flex; flex-direction: column; gap: 4px;
}
.council-card.kind-gap     { border-color: rgba(110,231,183,0.55); }
.council-card.kind-replace { border-color: rgba(96,165,250,0.55); }
.council-card.kind-cull    { border-color: rgba(252,165,165,0.50); }
.council-card-head {
  display: flex; justify-content: space-between; align-items: center;
}
.council-tag {
  font-size: 10px; font-weight: 700; letter-spacing: 1.2px;
  padding: 2px 8px; border-radius: 999px;
  background: rgba(5,10,30,0.85); border: 1px solid rgba(147,197,253,0.30);
  color: #cbd5e1;
}
.council-card.kind-gap     .council-tag { color: #6ee7b7; border-color: rgba(110,231,183,0.55); }
.council-card.kind-replace .council-tag { color: #93c5fd; border-color: rgba(96,165,250,0.55); }
.council-card.kind-cull    .council-tag { color: #fca5a5; border-color: rgba(252,165,165,0.55); }
.council-card-name { font-size: 14px; font-weight: 600; color: #fff; }
.council-card-desc { font-size: 12px; opacity: 0.78; line-height: 1.4; }
.council-card-actions {
  display: flex; gap: 8px; margin-top: 6px;
}
.council-card-actions .g-btn { padding: 6px 14px; font-size: 12px; }
.season-change-stats {
  display: inline-block;
  margin: 10px auto 0;
  font-size: 11px;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  letter-spacing: 0.4px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(96,165,250,0.12);
  border: 1px solid rgba(147,197,253,0.30);
  color: #93c5fd;
}
@keyframes encIn { from { opacity: 0; transform: translateY(20px) scale(0.92); } to { opacity: 1; transform: translateY(0) scale(1); } }
.enc-icon-big {
  font-size: 56px; line-height: 1; margin-bottom: 6px;
  text-shadow: 0 0 24px rgba(192,132,252,0.55);
  animation: encPulse 2s infinite;
}
@keyframes encPulse { 50% { text-shadow: 0 0 36px rgba(251,191,36,0.7); } }
.encounter-modal .re-title { margin: 4px 0 8px; font-size: 22px; }
.enc-flavor { font-size: 13px; opacity: 0.85; line-height: 1.5; margin: 0 0 18px; }
.enc-choices { display: flex; flex-direction: column; gap: 8px; }
.enc-choice {
  padding: 12px 16px; border-radius: 10px;
  background: rgba(5,10,30,0.55); border: 1px solid rgba(147,197,253,0.30);
  color: #fff; font-size: 13px; font-family: inherit;
  cursor: pointer; transition: transform 0.12s, background 0.12s;
}
.enc-choice:hover {
  background: rgba(96,165,250,0.20);
  border-color: rgba(96,165,250,0.65);
  transform: translateY(-1px);
}
.enc-foot { font-size: 10px; opacity: 0.55; margin-top: 14px; letter-spacing: 0.5px; }

/* ── Live event banner (E54) ──────────────────────────────────────── */
.live-event-banner {
  position: fixed; top: 6px; left: 50%; transform: translateX(-50%);
  z-index: 25;
  padding: 4px 14px; border-radius: 999px;
  background: linear-gradient(90deg, rgba(251,191,36,0.18), rgba(192,132,252,0.18));
  border: 1px solid rgba(251,191,36,0.40);
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; letter-spacing: 0.4px;
  cursor: help;
  max-width: 60vw;
  white-space: nowrap; overflow: hidden;
  pointer-events: auto;
}
.lev-icon { font-size: 14px; color: #fbbf24; }
.lev-name { font-weight: 700; color: #fff; }
.lev-desc { opacity: 0.75; font-size: 10px; }

/* ── Power-up hot-bar (E46) ───────────────────────────────────────── */
.pu-bar {
  position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 10px 14px; border-radius: 14px;
  background: rgba(5,10,30,0.78); backdrop-filter: blur(10px);
  border: 1px solid rgba(147,197,253,0.25);
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  z-index: 30;
}
.pu-place-hint {
  position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  white-space: nowrap; padding: 7px 12px; border-radius: 999px;
  color: #e0f2fe; background: rgba(8,47,73,.94); border: 1px solid rgba(56,189,248,.65);
  box-shadow: 0 0 22px rgba(56,189,248,.28); font-size: 10px; font-weight: 800; letter-spacing: 1.1px;
}
.pu-energy { width: 100%; }
.pu-energy-track {
  height: 5px; background: rgba(5,10,30,0.6); border-radius: 3px; overflow: hidden;
  border: 1px solid rgba(224,242,254,0.10);
}
.pu-energy-fill {
  height: 100%;
  background: linear-gradient(90deg, #fbbf24, #f97316);
  box-shadow: 0 0 8px rgba(251,191,36,0.45);
  transition: width 0.6s;
}
.pu-energy-label {
  font-size: 10px; letter-spacing: 1.4px; opacity: 0.75;
  margin-top: 3px; text-align: center;
}
.pu-slots { display: flex; gap: 6px; }
.pu-slot {
  position: relative;
  width: 56px; height: 56px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: rgba(5,10,30,0.65); border: 2px solid;
  border-radius: 10px; cursor: pointer; font-family: inherit;
  transition: transform 0.12s, box-shadow 0.12s;
  padding: 0;
}
.pu-slot:hover:not(.disabled) {
  transform: translateY(-2px);
  box-shadow: 0 0 16px currentColor;
}
.pu-slot.active {
  transform: translateY(-4px) scale(1.06);
  box-shadow: 0 0 0 3px rgba(224,242,254,.25), 0 0 24px currentColor;
}
.pu-slot.disabled {
  opacity: 0.42; cursor: not-allowed;
  filter: grayscale(0.5);
}
.pu-slot-icon { font-size: 22px; line-height: 1; margin-top: -2px; }
.pu-slot-cost {
  font-size: 9px; letter-spacing: 0.6px;
  color: #fbbf24; margin-top: 2px;
  font-variant-numeric: tabular-nums;
}
.pu-slot-cd {
  position: absolute; top: 2px; right: 4px;
  font-size: 10px; font-weight: 700; color: #f87171;
  font-variant-numeric: tabular-nums;
}

/* ── Idle return modal (E51) ──────────────────────────────────────── */
.idle-modal {
  background: linear-gradient(180deg, rgba(46,16,82,0.85), rgba(12,30,70,0.85));
  border: 1px solid rgba(192,132,252,0.45);
  border-radius: 16px; padding: 26px 28px;
  text-align: center; color: #fff;
  box-shadow: 0 12px 50px rgba(0,0,0,0.6), 0 0 40px rgba(192,132,252,0.30);
  max-width: 420px;
}
.idle-modal .re-icon { font-size: 38px; }
.idle-modal .re-title { margin: 6px 0 4px; font-size: 22px; }
.idle-modal .re-goal { font-size: 13px; opacity: 0.78; margin: 0 0 14px; }
.idle-modal .re-rewards { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }

/* ── Daily nav-action + badge (E44) ──────────────────────────────── */
.tb-nav-btn.action {
  border-color: rgba(251,191,36,0.45);
  background: linear-gradient(180deg, rgba(251,191,36,0.10), rgba(251,146,60,0.06));
}
.tb-nav-btn.action:hover {
  background: linear-gradient(180deg, rgba(251,191,36,0.22), rgba(251,146,60,0.14));
  border-color: rgba(251,191,36,0.70);
  box-shadow: 0 0 14px rgba(251,191,36,0.25);
}
.tb-nav-btn.action .tb-nav-icon { color: #fbbf24; text-shadow: 0 0 8px rgba(251,191,36,0.5); }
.tb-nav-btn .tb-nav-badge {
  position: absolute; top: 4px; right: 4px;
  width: 8px; height: 8px; border-radius: 50%;
  font-size: 8px; line-height: 8px; text-align: center;
  background: #6ee7b7; box-shadow: 0 0 6px #6ee7b7;
}
.tb-nav-btn .tb-nav-badge.fresh { animation: pulse 1.6s infinite; }
.tb-nav-btn .tb-nav-badge.played {
  background: rgba(224,242,254,0.4); box-shadow: none;
}
.tb-nav-btn .tb-nav-badge.won {
  width: 14px; height: 14px; border-radius: 4px;
  background: #fbbf24; color: #050a1e; font-weight: 800;
  box-shadow: 0 0 8px rgba(251,191,36,0.6);
  display: flex; align-items: center; justify-content: center;
}
.tb-nav-btn { position: relative; }
.tb-nav-btn.daily-fresh { box-shadow: 0 0 0 1px rgba(110,231,183,0.40), 0 0 12px rgba(110,231,183,0.18); }
.tb-nav-btn.daily-won { box-shadow: 0 0 0 1px rgba(251,191,36,0.55), 0 0 14px rgba(251,191,36,0.22); }

/* ── Profile-hub (E39) ────────────────────────────────────────────── */
.profile-panel { display: flex; flex-direction: column; gap: 16px; }
.profile-hero {
  display: flex; align-items: center; gap: 20px;
  padding: 18px;
  background: radial-gradient(ellipse at 0% 0%, rgba(96,165,250,0.18), transparent 60%),
              radial-gradient(ellipse at 100% 100%, rgba(192,132,252,0.15), transparent 60%),
              rgba(5,10,30,0.45);
  border: 1px solid rgba(147,197,253,0.25);
  border-radius: 14px;
}
.profile-score-block {
  flex-shrink: 0;
  display: flex; flex-direction: column; align-items: center;
  padding: 0 20px 0 0; border-right: 1px solid rgba(224,242,254,0.10);
}
.profile-score-num {
  font-size: 38px; font-weight: 800; line-height: 1;
  color: #fbbf24; text-shadow: 0 0 16px rgba(251,191,36,0.45);
  font-variant-numeric: tabular-nums;
}
.profile-score-label {
  font-size: 10px; letter-spacing: 1.6px; opacity: 0.65; margin-top: 6px;
}
.profile-meta { flex: 1; display: flex; flex-direction: column; gap: 6px; font-size: 12px; }
.profile-meta-row { display: flex; justify-content: space-between; gap: 12px; }
.profile-meta-row span { opacity: 0.6; }
.profile-meta-row b { color: #fff; font-variant-numeric: tabular-nums; }

.profile-section h4 {
  font-size: 11px; letter-spacing: 1.6px; opacity: 0.6;
  text-transform: uppercase; margin: 0 0 12px;
}
.profile-mastery-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: 6px;
}
.profile-mastery-cell {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 8px 4px; border-radius: 8px;
  background: rgba(5,10,30,0.4);
  border: 1px solid rgba(224,242,254,0.10);
  font-size: 9px; line-height: 1.2;
  color: rgba(224,242,254,0.4);
}
.profile-mastery-cell.on {
  background: rgba(255,255,255,0.04);
  box-shadow: 0 0 8px currentColor;
}
.profile-mastery-cell.on .pmc-icon { text-shadow: 0 0 6px currentColor; font-weight: 700; }
.profile-mastery-cell .pmc-icon { font-size: 16px; }
.profile-mastery-cell .pmc-label { letter-spacing: 0.4px; }

.profile-records {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px;
}
.profile-records > div {
  padding: 8px 10px; border-radius: 8px;
  background: rgba(5,10,30,0.40); border: 1px solid rgba(224,242,254,0.10);
  display: flex; flex-direction: column; gap: 2px;
}
.profile-records span { font-size: 9px; letter-spacing: 1px; opacity: 0.6; text-transform: uppercase; }
.profile-records b { font-size: 16px; color: #fff; font-variant-numeric: tabular-nums; }

.profile-strain-row {
  display: flex; gap: 8px; flex-wrap: wrap;
}
.profile-strain-card {
  width: 76px; display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.profile-strain-canvas {
  width: 56px; height: 56px;
  border-radius: 50%; border: 2px solid;
  display: flex; align-items: center; justify-content: center;
}
.profile-strain-name {
  font-size: 10px; opacity: 0.85; max-width: 100%;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ── Quest-log (E40) ──────────────────────────────────────────────── */
.quest-log { display: flex; flex-direction: column; gap: 16px; }
.quest-empty { font-size: 12px; opacity: 0.55; margin: 0; }
.quest-list { display: flex; flex-direction: column; gap: 6px; }
.quest-row {
  padding: 10px 12px; border-radius: 9px;
  background: rgba(5,10,30,0.45); border: 1px solid rgba(224,242,254,0.10);
  display: flex; flex-direction: column; gap: 5px;
}
.quest-row.compact { padding: 7px 10px; gap: 4px; }
.quest-row.active { border-color: rgba(96,165,250,0.45); background: rgba(96,165,250,0.08); }
.quest-row.done { opacity: 0.65; border-color: rgba(110,231,183,0.30); }
.quest-row.omega { border-color: rgba(168,85,247,0.30); }
.quest-row-head {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
}
.quest-row-head b { font-size: 12px; color: #fff; }
.quest-row-desc { font-size: 11px; opacity: 0.7; line-height: 1.4; }
.quest-row-foot {
  display: flex; justify-content: space-between; font-size: 10px; opacity: 0.7;
  font-variant-numeric: tabular-nums;
}
.quest-tag {
  font-size: 8px; letter-spacing: 1.4px; padding: 2px 6px; border-radius: 4px;
  background: rgba(224,242,254,0.06); color: rgba(224,242,254,0.65);
}
.quest-tag.run     { background: rgba(96,165,250,0.20); color: #93c5fd; }
.quest-tag.daily   { background: rgba(110,231,183,0.18); color: #6ee7b7; }
.quest-tag.mission { background: rgba(192,132,252,0.18); color: #c4b5fd; }
.quest-tag.omega   { background: rgba(251,191,36,0.20); color: #fbbf24; }
.quest-bar {
  height: 4px; background: rgba(224,242,254,0.10);
  border-radius: 2px; overflow: hidden;
}
.quest-bar > span {
  display: block; height: 100%; background: linear-gradient(90deg, #6ee7b7, #93c5fd);
  border-radius: 2px;
}

/* ── E115 · Mechanics 2-row grid (8 items → 4 per rij) ────────────── */
.enc-mech-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
@media (max-width: 1100px) { .enc-mech-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px)  { .enc-mech-row { grid-template-columns: 1fr; } }
.enc-mech-card {
  display: flex; flex-direction: column;
  background: rgba(5,10,30,0.45);
  border: 1px solid rgba(224,242,254,0.10);
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.18s, border-color 0.2s, box-shadow 0.2s;
}
.enc-mech-card:hover {
  transform: translateY(-2px);
  border-color: rgba(96,165,250,0.45);
  box-shadow: 0 8px 24px rgba(0,0,0,0.40);
}
.enc-mech-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  background-color: #050a1e;
  border-bottom: 1px solid rgba(224,242,254,0.08);
}
.enc-mech-body {
  padding: 10px 12px 12px;
  display: flex; flex-direction: column; gap: 6px;
  flex: 1;
}

/* ── E114 · Archetype row in encyclopedia (4 vaste kolommen) ──────── */
.enc-arch-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
@media (max-width: 900px) { .enc-arch-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 500px) { .enc-arch-row { grid-template-columns: 1fr; } }
.enc-arch-card {
  display: flex; flex-direction: column;
  background: rgba(5,10,30,0.45);
  border: 1px solid rgba(224,242,254,0.10);
  border-top-width: 3px;
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.18s, border-color 0.2s, box-shadow 0.2s;
}
.enc-arch-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.40);
}
.enc-arch-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  background-color: #050a1e;
  border-bottom: 1px solid rgba(224,242,254,0.08);
}
.enc-arch-body {
  padding: 10px 12px 12px;
  display: flex; flex-direction: column; gap: 6px;
}

/* ── E113 · Biome row in encyclopedia (5 vaste kolommen) ──────────── */
.enc-biome-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}
@media (max-width: 1100px) { .enc-biome-row { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 700px)  { .enc-biome-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px)  { .enc-biome-row { grid-template-columns: 1fr; } }
.enc-biome-card {
  display: flex; flex-direction: column;
  background: rgba(5,10,30,0.45);
  border: 1px solid rgba(224,242,254,0.10);
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.18s, border-color 0.2s, box-shadow 0.2s;
}
.enc-biome-card:hover {
  transform: translateY(-2px);
  border-color: rgba(96,165,250,0.45);
  box-shadow: 0 8px 24px rgba(96,165,250,0.18);
}
.enc-biome-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  background-color: #050a1e;
  border-bottom: 1px solid rgba(224,242,254,0.08);
}
.enc-biome-body {
  padding: 10px 12px 12px;
  display: flex; flex-direction: column; gap: 6px;
}

/* ── Encyclopedia (E41) ───────────────────────────────────────────── */
.encyclopedia-panel { display: flex; flex-direction: column; gap: 12px; height: 100%; }
.enc-tabs {
  display: flex; flex-wrap: wrap; gap: 4px; padding: 4px;
  background: rgba(5,10,30,0.40); border: 1px solid rgba(224,242,254,0.10);
  border-radius: 10px;
}
.enc-tab {
  flex: 1 1 auto; min-width: 70px;
  padding: 7px 10px; font-size: 11px;
  background: transparent; border: 0; border-radius: 7px;
  color: rgba(224,242,254,0.55); cursor: pointer; font-family: inherit;
  transition: all 0.15s;
}
.enc-tab:hover { color: #fff; background: rgba(96,165,250,0.10); }
.enc-tab.on {
  background: linear-gradient(180deg, rgba(96,165,250,0.30), rgba(96,165,250,0.18));
  color: #fff; box-shadow: 0 0 10px rgba(96,165,250,0.20);
}
.enc-filter { font-size: 12px; padding: 7px 10px !important; }
.enc-content { flex: 1; min-height: 0; overflow-y: auto; }
.enc-list { display: flex; flex-direction: column; gap: 8px; }

/* E137b — Universele encyclopedia-card met optionele image-banner + stats-rij */
.enc-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}
.enc-cards-grid.no-img { grid-template-columns: 1fr; gap: 8px; }
/* E145/E157 — Vaste-kolom varianten: forceer N gelijke kolommen op volle breedte */
.enc-cards-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.enc-cards-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.enc-cards-grid.cols-5 { grid-template-columns: repeat(5, 1fr); }
.enc-ref-card {
  background: rgba(5,10,30,0.55);
  border: 1px solid rgba(147,197,253,0.18);
  border-radius: 10px;
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: border-color 140ms ease;
}
.enc-ref-card:hover { border-color: rgba(147,197,253,0.45); }
.enc-ref-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  background-size: cover;
  background-position: center;
  background-color: #050a1e;
  border-bottom: 1px solid rgba(147,197,253,0.18);
}
.enc-ref-body { padding: 9px 11px 10px; display: flex; flex-direction: column; gap: 4px; }
.enc-ref-title {
  font-size: 13px; font-weight: 600; color: #fff; line-height: 1.2;
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
}
.enc-ref-desc { font-size: 11.5px; opacity: 0.78; line-height: 1.4; }
.enc-ref-stats {
  font-size: 10px; opacity: 0.68;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  letter-spacing: 0.2px;
  margin-top: 2px;
  padding-top: 5px;
  border-top: 1px dashed rgba(147,197,253,0.18);
  color: #93c5fd;
}
.enc-item {
  padding: 10px 12px; border-radius: 9px;
  background: rgba(5,10,30,0.40); border: 1px solid rgba(224,242,254,0.10);
}
.enc-item-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 5px;
}
.enc-item-head b { font-size: 12px; color: #fff; }
.enc-tag {
  font-size: 9px; letter-spacing: 1.4px; padding: 2px 6px; border-radius: 4px;
  background: rgba(96,165,250,0.18); color: #93c5fd; text-transform: uppercase;
}
.enc-item-desc { font-size: 11px; line-height: 1.5; opacity: 0.78; margin-bottom: 4px; }
.enc-item-meta { font-size: 10px; opacity: 0.5; font-variant-numeric: tabular-nums; }

/* Activity feed in friends panel (E29) */
.activity-feed { display: flex; flex-direction: column; gap: 4px; }
.activity-row {
  display: grid; grid-template-columns: 22px 1fr auto; gap: 8px; align-items: center;
  padding: 6px 8px; border-radius: 7px; font-size: 11px;
  background: rgba(5,10,30,0.32);
}
.activity-row.self { background: rgba(96,165,250,0.10); }
.activity-row .act-icon { color: #c4b5fd; font-weight: 700; text-align: center; }
.activity-row .act-text b { color: #fff; }
.activity-row .act-when { color: rgba(147,197,253,0.5); font-variant-numeric: tabular-nums; }

/* Achievement compare grid (E31) */
.ach-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  margin-bottom: 14px;
}
.ach-cell {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 8px 6px; border-radius: 8px;
  background: rgba(5,10,30,0.5); border: 1px solid rgba(224,242,254,0.10);
}
.ach-cell.both       { border-color: rgba(110,231,183,0.45); background: rgba(110,231,183,0.08); }
.ach-cell.theirs-only{ border-color: rgba(251,191,36,0.45);  background: rgba(251,191,36,0.06); }
.ach-cell.mine-only  { border-color: rgba(96,165,250,0.45);  background: rgba(96,165,250,0.06); }
.ach-cell.neither    { opacity: 0.45; }
.ach-cell .ach-icon { font-size: 18px; }
.ach-cell .ach-marks { display: flex; gap: 4px; font-size: 9px; letter-spacing: 1px; }
.ach-marks .on  { color: #6ee7b7; font-weight: 700; }
.ach-marks .off { color: rgba(224,242,254,0.32); }

/* Coach toast (E32) — horizontal: avatar links, body rechts, gelijke hoogte. */
.coach-toast {
  position: fixed; bottom: 24px; right: 24px; z-index: 70;
  width: 280px; min-height: 96px;
  padding: 14px; border-radius: 14px;
  background: linear-gradient(180deg, rgba(12,30,70,0.92), rgba(8,20,48,0.92));
  backdrop-filter: blur(12px); border: 1px solid rgba(192,132,252,0.4);
  box-shadow: 0 14px 40px rgba(0,0,0,0.45), 0 0 18px rgba(168,85,247,0.18);
  animation: ndIn 0.32s cubic-bezier(.16,1,.3,1);
  display: flex; align-items: stretch; gap: 14px;
}
.coach-toast .coach-avatar {
  flex-shrink: 0;
  width: 64px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px;
  background: radial-gradient(circle at 30% 30%, rgba(192,132,252,0.32), rgba(168,85,247,0.12));
  border: 1px solid rgba(192,132,252,0.55);
  border-radius: 12px;
  box-shadow: 0 0 14px rgba(192,132,252,0.30), 0 1px 0 rgba(255,255,255,0.12) inset;
}
.coach-toast .coach-avatar-icon {
  font-size: 26px; line-height: 1;
  filter: drop-shadow(0 0 8px rgba(192,132,252,0.7));
}
.coach-toast .coach-step-num {
  font-size: 10px; letter-spacing: 1px; font-weight: 700;
  color: #c4b5fd;
  font-variant-numeric: tabular-nums;
}
.coach-toast .coach-body {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; justify-content: center; gap: 8px;
}
.coach-toast .coach-eyebrow {
  font-size: 9px; letter-spacing: 1.6px; color: #c4b5fd;
  font-weight: 700; opacity: 0.7;
}
.coach-toast .coach-text {
  font-size: 12px; line-height: 1.5; color: #e0f2fe;
}
.coach-toast .coach-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.coach-toast .coach-btn { padding: 5px 12px; font-size: 11px; }

/* Strain-stories panel (E27) */
.story-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px;
}
.story-card {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 10px; border-radius: 10px;
  background: rgba(5,10,30,0.5); border: 1px solid rgba(224,242,254,0.1);
}
.story-canvas {
  flex-shrink: 0; width: 56px; height: 56px;
  border-radius: 50%; border: 2px solid;
  display: flex; align-items: center; justify-content: center;
}
.story-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; font-size: 11px; }
.story-name { font-size: 13px; font-weight: 700; color: #fff; }
.story-arch { font-weight: 600; }
.story-stats { display: flex; gap: 10px; font-size: 10px; opacity: 0.75; }
.story-stats b { color: #fff; }
.story-context { display: flex; justify-content: space-between; font-size: 10px; opacity: 0.6; }
.story-status.won  { color: #6ee7b7; }
.story-status.lost { color: #fca5a5; }
.story-when { font-size: 10px; opacity: 0.4; }

/* Friends panel (E28) */
.friend-search-results {
  margin-top: 10px; padding: 8px; border-radius: 8px;
  background: rgba(5,10,30,0.4); border: 1px solid rgba(224,242,254,0.08);
}
.friend-search-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 5px 4px; font-size: 12px;
}
.friend-list {
  display: flex; flex-direction: column; gap: 8px; margin-top: 12px;
}
.friend-card {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 10px;
  background: rgba(5,10,30,0.5); border: 1px solid rgba(224,242,254,0.12);
}
.friend-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.friend-info b { font-size: 13px; }
.friend-level { font-size: 10px; opacity: 0.6; }
.friend-stats {
  display: flex; gap: 10px; font-size: 10px; opacity: 0.75;
  font-variant-numeric: tabular-nums;
}
.friend-unfollow { padding: 4px 10px !important; font-size: 11px !important; }

/* Custom run-builder rows (E25) */
.cr-row {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 8px;
}
.cr-row .cr-label {
  flex-shrink: 0; min-width: 75px;
  font-size: 11px; opacity: 0.7; text-align: left;
}
.cr-row .panel-select, .cr-row .g-slider { flex: 1; }
.cr-row b { font-size: 11px; min-width: 60px; text-align: right; font-variant-numeric: tabular-nums; }

/* Cosmetics grid (E22) */
.cosmetic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.cosmetic-card {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 10px;
  background: rgba(5,10,30,0.5); border: 1px solid rgba(224,242,254,0.12);
  transition: border-color 0.18s, background 0.18s;
}
.cosmetic-card.active { border-color: rgba(110,231,183,0.55); background: rgba(110,231,183,0.06); }
.cosmetic-card.locked { opacity: 0.55; }
.cosmetic-swatch {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
  background: rgba(255,255,255,0.05);
}
.cosmetic-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cosmetic-info b { font-size: 13px; }
.cosmetic-info span { font-size: 11px; opacity: 0.65; line-height: 1.35; }
.cosmetic-btn { padding: 6px 12px; font-size: 11px; flex-shrink: 0; }
.cosmetic-active { font-size: 11px; color: #6ee7b7; flex-shrink: 0; padding: 6px 10px; }
.cosmetic-locked { font-size: 12px; color: #fbbf24; flex-shrink: 0; padding: 6px 10px; letter-spacing: 1px; }

/* Help-list inside settings */
.help-list { padding-left: 18px; margin: 6px 0 0; font-size: 12px; line-height: 1.55; color: rgba(224,242,254,0.78); }
.help-list li { margin-bottom: 4px; }
.help-list kbd {
  display: inline-block; padding: 1px 5px; font-family: ui-monospace,monospace;
  font-size: 11px; background: rgba(224,242,254,0.10);
  border: 1px solid rgba(224,242,254,0.22); border-radius: 4px;
}

.currency-pill.flash { animation: cyFlash 0.6s ease; }
@keyframes cyFlash {
  0% { box-shadow: 0 0 0 rgba(147,197,253,0); }
  50% { box-shadow: 0 0 20px rgba(147,197,253,0.7); }
  100% { box-shadow: 0 0 0 rgba(147,197,253,0); }
}
/* Digit flash for AnimatedCounter — text-only so it works inside any wrapper. */
.cy-flash { animation: cyTextFlash 0.7s ease; }
@keyframes cyTextFlash {
  0%   { color: inherit; text-shadow: none; }
  25%  { color: #fde68a; text-shadow: 0 0 12px rgba(253,230,138,0.85); }
  100% { color: inherit; text-shadow: none; }
}

/* Mission card — bottom-left dock */
.mission-card {
  position: absolute; left: 16px; bottom: 16px; width: 260px; padding: 12px 14px;
  z-index: 11;
}
.mission-eyebrow { font-size: 9px; letter-spacing: 2.5px; opacity: 0.6;
  display: flex; align-items: center; gap: 8px; }
.mission-eyebrow .live-dot { width: 6px; height: 6px; border-radius: 50%;
  background: #6ee7b7; box-shadow: 0 0 8px #6ee7b7; animation: pulse 1.6s infinite; }
.mission-title { font-size: 14px; font-weight: 600; margin: 4px 0 8px; }
.mission-desc { font-size: 11px; opacity: 0.7; line-height: 1.4; margin-bottom: 8px; }
.mission-track {
  height: 6px; background: rgba(224,242,254,0.1); border-radius: 999px;
  border: 1px solid rgba(224,242,254,0.15); overflow: hidden;
}
.mission-fill { height: 100%; background: linear-gradient(90deg, #6ee7b7, #93c5fd);
  box-shadow: 0 0 10px rgba(110,231,183,0.5); transition: width 0.3s; }
.mission-progress { display: flex; justify-content: space-between; font-size: 10px;
  margin-top: 6px; opacity: 0.7; font-variant-numeric: tabular-nums; }
.mission-progress b { color: #fff; }
.mission-reward {
  margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line);
  display: flex; gap: 8px; align-items: center; font-size: 10px; opacity: 0.85;
}
.mission-reward .pill-mini {
  padding: 2px 7px; background: rgba(192,132,252,0.18); border: 1px solid rgba(192,132,252,0.4);
  border-radius: 6px; font-size: 10px; color: #fff; }

.progression-dock {
  position: absolute; left: 16px; bottom: 16px; width: 300px; padding: 12px 14px;
  z-index: 11;
}
.progression-head { display: flex; justify-content: space-between; gap: 10px; }
.progression-hero {
  display:grid; grid-template-columns:72px minmax(0,1fr); align-items:stretch; gap:11px;
  margin:-5px -5px 11px; padding:6px; border-radius:12px;
  background:linear-gradient(135deg,rgba(96,165,250,.10),rgba(76,29,149,.11));
  border:1px solid rgba(147,197,253,.13);
}
.progression-biome-thumb { position:relative; min-height:72px; overflow:hidden; border-radius:9px; background:#07132f; }
.progression-biome-thumb::after { content:""; position:absolute; inset:0; background:linear-gradient(180deg,transparent 45%,rgba(3,8,24,.94)); }
.progression-biome-thumb img { width:100%; height:100%; display:block; object-fit:cover; filter:saturate(.82) brightness(.78); }
.progression-biome-thumb span { position:absolute; z-index:1; left:6px; right:6px; bottom:5px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:7px; font-weight:800; letter-spacing:.55px; color:#e0f2fe; text-transform:uppercase; }
.progression-hero-copy { min-width:0; display:flex; flex-direction:column; justify-content:center; }
.progression-hero .mission-eyebrow { margin-bottom:2px !important; }
.progression-hero .progression-focus { margin:3px 0 5px !important; font-size:12px !important; line-height:1.26; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.progression-context { display:flex; align-items:center; gap:6px; font-size:7px; letter-spacing:.75px; color:rgba(224,242,254,.54); }
.progression-context span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.progression-context b { margin-left:auto; color:#6ee7b7; font-size:8px; }
.progression-focus {
  margin-top: 5px; font-size: 13px; line-height: 1.35; color: #fff; font-weight: 650;
}
.experiment-phase-card { margin-top: 10px; padding: 9px 10px; border-radius: 9px; background: rgba(110,231,183,0.08); border: 1px solid rgba(110,231,183,0.24); }
.experiment-phase-head { display: flex; justify-content: space-between; gap: 8px; font-size: 10px; color: #d1fae5; }
.experiment-phase-dots { display: grid; grid-template-columns: repeat(3,1fr); gap: 4px; margin-top: 7px; }
.experiment-phase-dots i { height: 3px; border-radius: 9px; background: rgba(224,242,254,0.13); }
.experiment-phase-dots i.done { background: linear-gradient(90deg,#6ee7b7,#93c5fd); box-shadow: 0 0 6px rgba(110,231,183,.45); }
.progression-row.secondary { opacity: .74; }
.progression-row {
  position: relative; width: 100%; min-width: 0; margin-top: 10px; padding: 9px 10px 11px;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; overflow: hidden;
  text-align: left; color: #E0F2FE; font-family: inherit; cursor: pointer;
  background: rgba(5,10,30,0.3); border: 1px solid rgba(224,242,254,0.09); border-radius: 9px;
}
.progression-row:hover { background: rgba(96,165,250,0.12); border-color: rgba(147,197,253,0.28); }
.progression-row.ready { border-color: rgba(110,231,183,0.35); background: rgba(110,231,183,0.08); }
.progression-row span { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.progression-row b {
  font-size: 12px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.progression-row small {
  font-size: 10px; line-height: 1.3; color: rgba(224,242,254,0.68);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.progression-row em {
  align-self: start; font-style: normal; font-size: 10px; color: rgba(224,242,254,0.72);
  font-variant-numeric: tabular-nums;
}
.progression-row i {
  position: absolute; left: 0; bottom: 0; height: 3px; background: linear-gradient(90deg, #6ee7b7, #93c5fd);
}
.progression-mini {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 10px;
}
.progression-mini button {
  min-width: 0; padding: 6px 7px; border-radius: 8px; border: 1px solid rgba(224,242,254,0.09);
  background: rgba(224,242,254,0.045); color: rgba(224,242,254,0.78); font: inherit; font-size: 10px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer;
}
.progression-mini button:hover { background: rgba(96,165,250,0.12); color: #fff; }

.tutorial-coach {
  position: absolute; left: 342px; bottom: 16px; width: 310px; padding: 12px 14px;
  z-index: 12;
}
.tutorial-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.tutorial-eyebrow { font-size: 9px; letter-spacing: 2.2px; opacity: 0.58; }
.tutorial-title { margin-top: 4px; font-size: 14px; font-weight: 700; color: #fff; }
.tutorial-coach p {
  margin: 8px 0 10px; font-size: 11px; line-height: 1.45; color: rgba(224,242,254,0.74);
}
.tutorial-progress-top {
  display: flex; justify-content: space-between; gap: 10px; font-size: 10px;
  color: rgba(224,242,254,0.68); font-variant-numeric: tabular-nums;
}
.tutorial-progress-top b { color: #fff; }
.tutorial-track {
  height: 5px; margin-top: 5px; overflow: hidden; border-radius: 999px;
  background: rgba(224,242,254,0.1); border: 1px solid rgba(224,242,254,0.12);
}
.tutorial-fill { height: 100%; background: linear-gradient(90deg, #93c5fd, #c084fc); }
.tutorial-steps { display: flex; gap: 6px; margin: 10px 0; }
.tutorial-steps span {
  width: 18px; height: 18px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; font-size: 11px; color: rgba(224,242,254,0.5);
  background: rgba(224,242,254,0.045); border: 1px solid rgba(224,242,254,0.08);
}
.tutorial-steps span.done {
  color: #052014; background: rgba(110,231,183,0.9); border-color: rgba(110,231,183,0.9);
}
.tutorial-steps span.active {
  color: #fff; background: rgba(96,165,250,0.24); border-color: rgba(147,197,253,0.45);
}
.tutorial-action { width: 100%; justify-content: center; }

.daily-dock {
  position: absolute; left: 16px; bottom: 242px; width: 260px; padding: 12px 14px;
  z-index: 11;
}
.daily-eyebrow { font-size: 9px; letter-spacing: 2.4px; opacity: 0.58; }
.daily-biome { margin-top: 3px; font-size: 11px; color: rgba(224,242,254,0.78); }
.daily-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.daily-row { padding: 8px; border-radius: 8px; background: rgba(5,10,30,0.28); border: 1px solid rgba(224,242,254,0.08); }
.daily-row.done { opacity: 0.68; background: rgba(110,231,183,0.08); border-color: rgba(110,231,183,0.22); }
.daily-row-top { display: flex; justify-content: space-between; gap: 8px; font-size: 10px; }
.daily-row-top b { color: #fff; font-weight: 600; }
.daily-row-top span { opacity: 0.7; font-variant-numeric: tabular-nums; }
.daily-track { margin-top: 5px; height: 4px; overflow: hidden; border-radius: 999px; background: rgba(224,242,254,0.1); }
.daily-fill { height: 100%; background: linear-gradient(90deg, #93c5fd, #6ee7b7); }

.rivalry-panel {
  position: absolute; right: 16px; bottom: 16px; width: 230px; padding: 12px 14px;
  z-index: 11;
}
.rivalry-leader { margin-top: 4px; font-size: 15px; color: #fff; font-weight: 650; }
.rivalry-meta { margin-top: 2px; font-size: 10px; opacity: 0.65; }
.rivalry-list { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.rivalry-row {
  display: flex; justify-content: space-between; gap: 8px; font-size: 10px;
  padding: 4px 6px; border-radius: 7px;
}
.rivalry-row.leader {
  background: rgba(110,231,183,0.09); border: 1px solid rgba(110,231,183,0.18);
}
.rivalry-row.challenger {
  background: rgba(251,191,36,0.08); border: 1px solid rgba(251,191,36,0.16);
}
.rivalry-row span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; opacity: 0.82; }
.rivalry-row b { color: #fff; font-variant-numeric: tabular-nums; }
.rivalry-note {
  margin-top: 9px; font-size: 9px; line-height: 1.35; color: rgba(224,242,254,0.56);
}

/* Achievement toast */
.ach-toast {
  position: absolute; right: 24px; top: 84px;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px 12px 12px;
  background: linear-gradient(135deg, rgba(99,102,241,0.4), rgba(192,132,252,0.3));
  backdrop-filter: blur(20px) saturate(1.2);
  border: 1px solid rgba(192,132,252,0.5);
  border-radius: 14px; color: #fff;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5), 0 0 30px rgba(192,132,252,0.4);
  z-index: 30; animation: achIn 0.4s cubic-bezier(.2,.8,.3,1);
  min-width: 240px;
}
@keyframes achIn {
  from { opacity: 0; transform: translateX(20px) scale(0.92); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}
.ach-icon {
  width: 38px; height: 38px; border-radius: 10px;
  background: rgba(255,255,255,0.18); border: 1px solid rgba(255,255,255,0.4);
  display: flex; align-items: center; justify-content: center; font-size: 18px;
  box-shadow: 0 0 20px rgba(255,255,255,0.4);
}
.ach-text { display: flex; flex-direction: column; gap: 2px; }
.ach-text .ach-eyebrow { font-size: 9px; letter-spacing: 2px; opacity: 0.85; }
.ach-text .ach-title { font-size: 13px; font-weight: 600; }
.ach-text .ach-xp { font-size: 10px; color: #ddd6fe; }

/* Settings panel — old absolute card style (kept for backward-compat with EnvCard demo) */
.settings-card {
  position: absolute; right: 16px; bottom: 16px; width: 260px; padding: 14px;
  z-index: 11; max-height: calc(100vh - 32px); overflow-y: auto;
  display: none; /* superseded by .side-panel */
}
.settings-card .env-eyebrow { margin-bottom: 4px; }
.settings-card h4 {
  font-size: 11px; font-weight: 600; letter-spacing: 1px; margin: 12px 0 8px;
  color: rgba(224,242,254,0.85); display: flex; align-items: center; gap: 6px;
}
.settings-card h4::before {
  content: ''; width: 3px; height: 11px; background: #93c5fd;
  border-radius: 2px; box-shadow: 0 0 6px #93c5fd;
}
.set-row { display: flex; justify-content: space-between; align-items: center;
  font-size: 11px; padding: 5px 0; gap: 10px; }
.set-row b { color: #fff; font-weight: 600; font-variant-numeric: tabular-nums; }
.set-row input[type=range] { flex: 1; }
.set-radio { display: flex; gap: 4px; }
.set-radio button {
  flex: 1; padding: 4px 8px; font-size: 10px; font-family: inherit;
  background: rgba(224,242,254,0.05); border: 1px solid rgba(224,242,254,0.15);
  color: #E0F2FE; border-radius: 6px; cursor: pointer;
}
.set-radio button.on { background: rgba(96,165,250,0.3); border-color: #93c5fd; color: #fff; }

/* Insufficient currency state */
.action-btn[disabled], .action-btn.disabled {
  opacity: 0.45; cursor: not-allowed;
}
.action-btn .cost {
  margin-left: auto; padding: 2px 6px; font-size: 10px;
  background: rgba(192,132,252,0.2); border: 1px solid rgba(192,132,252,0.4);
  border-radius: 6px; color: #ddd6fe;
}
.action-btn.danger .cost { background: rgba(248,113,113,0.18); border-color: rgba(248,113,113,0.4); color: #fecaca; }

/* Floating XP gain in scene */
.xp-float {
  position: absolute; pointer-events: none; font-size: 14px; font-weight: 700;
  text-shadow: 0 0 10px rgba(224,242,254,0.9), 0 0 20px rgba(147,197,253,0.6);
  animation: xpRise 1s ease-out forwards;
  z-index: 25;
}
@keyframes xpRise {
  from { opacity: 1; transform: translate(-50%, 0); }
  to { opacity: 0; transform: translate(-50%, -32px); }
}

/* Help overlay */
.help-btn { width: 32px; padding: 0; font-weight: 700; }
.help-panel { display: flex; flex-direction: column; gap: 12px; }
.help-start {
  display: grid; grid-template-columns: minmax(0, 1fr) 150px; gap: 12px; align-items: stretch;
  padding: 14px; border-radius: 12px;
  background: linear-gradient(135deg, rgba(96,165,250,0.16), rgba(45,212,191,0.09));
  border: 1px solid rgba(147,197,253,0.22);
}
.help-kicker {
  font-size: 9px; letter-spacing: 2px; color: rgba(224,242,254,0.62);
}
.help-start h3 {
  margin: 5px 0 6px; font-size: 18px; line-height: 1.15; color: #fff;
}
.help-start p {
  margin: 0; font-size: 12px; line-height: 1.5; color: rgba(224,242,254,0.76);
}
.help-progress-card {
  min-width: 0; padding: 10px; border-radius: 10px;
  background: rgba(5,10,30,0.36); border: 1px solid rgba(224,242,254,0.1);
}
.help-progress-card span {
  display: block; font-size: 10px; color: rgba(224,242,254,0.62);
}
.help-progress-card b {
  display: block; margin-top: 4px; font-size: 24px; color: #fff;
}
.help-progress-track {
  height: 6px; margin-top: 10px; overflow: hidden; border-radius: 999px;
  background: rgba(224,242,254,0.1);
}
.help-progress-track i {
  display: block; height: 100%; background: linear-gradient(90deg, #6ee7b7, #93c5fd);
}
.help-actions {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.help-flow {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px;
}
.help-flow-step {
  min-width: 0; min-height: 74px; padding: 10px; text-align: left; border-radius: 10px;
  border: 1px solid rgba(224,242,254,0.1); background: rgba(224,242,254,0.045);
  color: #E0F2FE; font: inherit; cursor: pointer;
}
.help-flow-step:hover {
  background: rgba(96,165,250,0.12); border-color: rgba(147,197,253,0.25);
}
.help-flow-step b {
  display: block; margin-bottom: 5px; font-size: 12px; color: #fff;
}
.help-flow-step span {
  display: block; font-size: 10px; line-height: 1.35; color: rgba(224,242,254,0.66);
}

.activity-panel { display: flex; flex-direction: column; gap: 12px; }
.activity-summary {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px;
}
.activity-summary div {
  min-width: 0; padding: 9px 10px; border-radius: 9px;
  background: rgba(5,10,30,0.28); border: 1px solid rgba(224,242,254,0.08);
}
.activity-summary span {
  display: block; font-size: 9px; letter-spacing: 1.2px; text-transform: uppercase;
  color: rgba(224,242,254,0.58);
}
.activity-summary b {
  display: block; margin-top: 4px; color: #fff; font-size: 17px;
  font-variant-numeric: tabular-nums;
}
.activity-toolbar {
  display: flex; justify-content: space-between; gap: 12px; align-items: center;
}
.activity-toolbar h4 {
  margin: 0 0 4px; font-size: 13px; color: #fff;
}
.activity-toolbar p {
  margin: 0; font-size: 11px; color: rgba(224,242,254,0.66);
}
.activity-list { display: flex; flex-direction: column; gap: 8px; }
.activity-empty {
  padding: 28px 12px; text-align: center; color: rgba(224,242,254,0.66);
  border: 1px dashed rgba(224,242,254,0.14); border-radius: 12px;
}
.activity-row {
  display: grid; grid-template-columns: 12px minmax(0, 1fr); gap: 10px;
  padding: 11px 12px; border-radius: 11px;
  background: rgba(255,255,255,0.035); border: 1px solid rgba(224,242,254,0.08);
}
.activity-dot {
  width: 9px; height: 9px; margin-top: 4px; border-radius: 999px;
  background: #93c5fd; box-shadow: 0 0 12px rgba(147,197,253,0.7);
}
.activity-copy { min-width: 0; }
.activity-copy > div {
  display: flex; justify-content: space-between; gap: 12px; align-items: baseline;
}
.activity-copy b {
  min-width: 0; color: #fff; font-size: 12px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.activity-copy span {
  flex: 0 0 auto; font-size: 10px; color: rgba(224,242,254,0.52);
  font-variant-numeric: tabular-nums;
}
.activity-copy p {
  margin: 4px 0 0; font-size: 11px; line-height: 1.4; color: rgba(224,242,254,0.7);
}
.activity-row.kind-mission .activity-dot { background: #c084fc; box-shadow: 0 0 12px rgba(192,132,252,0.7); }
.activity-row.kind-daily .activity-dot { background: #6ee7b7; box-shadow: 0 0 12px rgba(110,231,183,0.7); }
.activity-row.kind-cross .activity-dot { background: #f9a8d4; box-shadow: 0 0 12px rgba(249,168,212,0.7); }
.activity-row.kind-dna .activity-dot,
.activity-row.kind-evolution .activity-dot { background: #93c5fd; box-shadow: 0 0 12px rgba(147,197,253,0.7); }
.activity-row.kind-combat .activity-dot,
.activity-row.kind-rare .activity-dot { background: #fbbf24; box-shadow: 0 0 12px rgba(251,191,36,0.7); }

/* Trait pickers in DNA editor */
.trait-pickers { display: flex; flex-direction: column; gap: 10px; margin-top: 14px;
  padding-top: 14px; border-top: 1px solid rgba(224, 242, 254, 0.1); }
.trait-row { display: flex; flex-direction: column; gap: 6px; }
.trait-label { font-size: 10px; letter-spacing: 1.2px; opacity: 0.65; text-transform: uppercase; }
.trait-pills { display: flex; flex-wrap: wrap; gap: 4px; }
.trait-pill { background: rgba(255,255,255,0.05); border: 1px solid rgba(224,242,254,0.12);
  color: #E0F2FE; padding: 6px 10px; border-radius: 8px; font-size: 11px; cursor: pointer;
  transition: all 0.15s; }
.trait-pill:hover { background: rgba(255,255,255,0.1); }
.trait-pill.on { background: rgba(96,165,250,0.3); border-color: rgba(96,165,250,0.7); color: #fff; font-weight: 600; }
.trait-pill:disabled { opacity: 0.35; cursor: not-allowed; }
.dna-module-panel {
  width: 100%; display: flex; flex-direction: column; gap: 9px;
  padding-top: 12px; border-top: 1px solid rgba(224,242,254,0.1);
}
.dna-module-group { display: flex; flex-direction: column; gap: 5px; }
.dna-module-group-title {
  font-size: 9px; letter-spacing: 1.5px; text-transform: uppercase;
  color: rgba(224,242,254,0.58);
}
.dna-module-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.dna-module {
  min-width: 0; min-height: 54px; padding: 7px 8px; border-radius: 8px;
  border: 1px solid rgba(224,242,254,0.11); background: rgba(224,242,254,0.045);
  color: #E0F2FE; font: inherit; text-align: left; cursor: pointer;
}
.dna-module:hover { background: rgba(96,165,250,0.12); border-color: rgba(147,197,253,0.28); }
.dna-module b {
  display: block; font-size: 10px; color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dna-module span {
  display: block; margin-top: 3px; font-size: 9px; line-height: 1.25;
  color: rgba(224,242,254,0.64);
}
.dna-module.locked {
  opacity: 0.48; cursor: not-allowed; border-color: rgba(251,191,36,0.16);
  background: rgba(251,191,36,0.035);
}

/* ── Topbar nav menubar (Lab/Bibliotheek/Missies/Help) ── */
.tb-nav {
  display: flex; gap: 4px; padding: 4px;
  background: rgba(5, 10, 30, 0.55); border: 1px solid rgba(224,242,254,0.1);
  border-radius: 12px;
}
.tb-nav-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 10px; background: transparent; border: 1px solid transparent;
  color: rgba(224,242,254,0.7); font-family: inherit; font-size: 12px;
  letter-spacing: 0.3px; border-radius: 8px; cursor: pointer; transition: all 0.15s;
}
.tb-nav-btn:hover { background: rgba(224,242,254,0.05); color: #fff; }
.tb-nav-btn.on {
  background: rgba(96,165,250,0.28); border-color: rgba(147,197,253,0.55);
  color: #fff; box-shadow: 0 0 14px rgba(96,165,250,0.3);
}
.tb-nav-icon { font-size: 14px; opacity: 0.85; }
.tb-nav-label { font-weight: 500; }

@media (max-width: 1280px) {
  .tb-nav-btn { padding: 6px 8px; }
  .tb-nav-label { display: none; }
  .tb-pill { display: none; }
  .speed-control button { min-width: 28px; padding: 0 5px; }
}

/* ── Side panels (Library/Missions/Settings via menubar) ── */
.side-panel {
  position: absolute;
  top: var(--hud-top, 172px);
  width: 380px;
  /* Bottom: 16px van onder, top: 172 → max-height = vh - 172 - 16 = vh - 188 */
  max-height: calc(100vh - var(--hud-top, 172px) - var(--hud-margin, 16px));
  display: flex; flex-direction: column;
  background: rgba(12, 30, 70, 0.72); backdrop-filter: blur(18px) saturate(1.2);
  border: 1px solid rgba(224, 242, 254, 0.18); border-radius: 16px;
  box-shadow: 0 18px 50px rgba(0,0,0,0.45), 0 0 24px rgba(96,165,250,0.15);
  z-index: 13; color: #E0F2FE;
  animation: sidePanelIn 0.32s cubic-bezier(.16,1,.3,1);
}
@keyframes sidePanelIn {
  from { opacity: 0; transform: translateY(-12px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.side-panel-left  { left: var(--hud-margin, 16px); }
.side-panel-right { right: var(--hud-margin, 16px); }
/* Wide right-side panels — start na de left-sidebar zodat ze er niet overheen vallen. */
.side-panel-wide.side-panel-right {
  left: calc(var(--hud-margin, 16px) + var(--hud-side-w, 320px) + var(--hud-margin, 16px));
  right: var(--hud-margin, 16px);
  width: auto;
  /* Zelfde max-height als base — voorkomt overflow onder beeld. */
  max-height: calc(100vh - var(--hud-top, 172px) - var(--hud-margin, 16px));
}
/* E112 — Universele modal/panel padding-tokens. Pas hier centraal aan. */
:root {
  --panel-pad-x: 22px;
  --panel-pad-y: 20px;
  --panel-gap: 14px;
}
.side-panel-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: var(--panel-pad-y) var(--panel-pad-x) calc(var(--panel-pad-y) - 4px);
  border-bottom: 1px solid rgba(224,242,254,0.1);
}
.side-panel-title { font-size: 14px; font-weight: 600; letter-spacing: 0.3px; }
.side-panel-body {
  padding: var(--panel-pad-y) var(--panel-pad-x);
  overflow-y: auto; flex: 1; min-height: 0;
}

/* E68 — TabbedSidebar binnen een SidePanel: strip dubbele glass.
   E112 — geen negative-margin meer; hub vult panel-body, padding leeft op
   .hud-tab-body en .hud-tabs zelf voor consistent ritme. */
.side-panel-body > .hud-tabbed {
  background: transparent;
  backdrop-filter: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  height: auto;
  max-height: none;
  margin: 0;
}
.side-panel-body > .hud-tabbed > .hud-tabs {
  position: sticky; top: 0; z-index: 2;
  padding: calc(var(--panel-pad-y) - 8px) var(--panel-pad-x) calc(var(--panel-pad-y) - 6px);
  gap: 8px;
  background: linear-gradient(180deg, rgba(5,10,30,0.85), rgba(5,10,30,0.55));
  backdrop-filter: blur(10px) saturate(1.2);
  border-bottom: 1px solid rgba(96,165,250,0.20);
  box-shadow: 0 6px 16px rgba(0,0,0,0.30);
}
/* Hub-tab styling: groter, horizontaal, kleur-accent per actieve tab. */
.side-panel-body > .hud-tabbed > .hud-tabs > .hud-tab {
  flex: 1;
  flex-direction: row;
  align-items: center; justify-content: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(12,30,70,0.40);
  border: 1px solid rgba(224,242,254,0.10);
  position: relative; overflow: hidden;
  transition: transform 0.18s cubic-bezier(.16,1,.3,1),
              background 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.side-panel-body > .hud-tabbed > .hud-tabs > .hud-tab .hud-tab-icon {
  font-size: 18px; line-height: 1;
  filter: drop-shadow(0 0 4px rgba(96,165,250,0.30));
}
.side-panel-body > .hud-tabbed > .hud-tabs > .hud-tab .hud-tab-label {
  font-size: 11px;
  letter-spacing: 0.6px;
  font-weight: 600;
  text-transform: none;
}
.side-panel-body > .hud-tabbed > .hud-tabs > .hud-tab:hover {
  background: rgba(96,165,250,0.16);
  border-color: rgba(147,197,253,0.40);
  transform: translateY(-1px);
}
.side-panel-body > .hud-tabbed > .hud-tabs > .hud-tab.on {
  background: linear-gradient(135deg, rgba(96,165,250,0.32), rgba(192,132,252,0.24));
  border-color: rgba(147,197,253,0.60);
  box-shadow: 0 4px 18px rgba(96,165,250,0.28),
              0 1px 0 rgba(255,255,255,0.18) inset;
  transform: translateY(-1px);
}
/* Glanzende streep onder actieve tab */
.side-panel-body > .hud-tabbed > .hud-tabs > .hud-tab.on::after {
  content: '';
  position: absolute; left: 14%; right: 14%; bottom: -1px;
  height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, transparent, #fbbf24, #c084fc, transparent);
  box-shadow: 0 0 10px rgba(251,191,36,0.55);
}
/* Subtiele shine-sweep op active tab */
.side-panel-body > .hud-tabbed > .hud-tabs > .hud-tab.on::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,0.10) 50%, transparent 70%);
  background-size: 200% 100%;
  animation: tabShine 4s ease-in-out infinite;
  pointer-events: none;
}
@keyframes tabShine {
  0%, 100% { background-position: 200% 0; }
  50% { background-position: -100% 0; }
}
/* Per-tab kleur-hint via icon-color (eerste kind = ☆ Pass = goud, etc.).
   Werkt visueel doordat de emoji de kleur al draagt. */
.side-panel-body > .hud-tabbed > .hud-tab-body {
  padding: var(--panel-pad-y) var(--panel-pad-x);
  overflow-y: visible;
  height: auto;
}
/* Side-panel-body is zelf scroll-container; hub mag niet ook scroll-tegen. */
.side-panel-body:has(> .hud-tabbed) {
  padding: 0;
}

/* E112 — Universele content-spacing in alle panel-bodies en hub-tab-bodies.
   Top-level children krijgen consistente verticale ritme. */
.side-panel-body > *:not(.hud-tabbed),
.hud-tab-body > * {
  margin-bottom: var(--panel-gap);
}
.side-panel-body > *:not(.hud-tabbed):last-child,
.hud-tab-body > *:last-child {
  margin-bottom: 0;
}
/* Headers binnen panels: consistente eyebrow + title spacing */
.side-panel-body h3,
.side-panel-body h4,
.hud-tab-body h3,
.hud-tab-body h4 {
  margin: 0 0 8px;
}
/* Inhoudelijke flex-stacks in panels (al veel gebruikt: .season-pass, .pet-panel,
   .climate-panel, etc.) — laat hun eigen interne gap, maar voorkom dat ze tegen
   de rand vastlopen. */
.season-pass, .pet-panel, .climate-panel, .faction-panel, .lottery-panel,
.spin-panel, .lab-assist-panel, .market-panel, .discoveries-panel,
.journal-panel, .profile-panel, .quest-log, .encyclopedia-panel,
.lineage-panel, .memorial-panel, .analytics-panel, .lab-panel {
  display: flex; flex-direction: column;
  gap: var(--panel-gap);
}

/* Settings inner (no longer absolutely positioned — wrapped by SidePanel) */
.panel-stat-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px;
}
.panel-stat {
  min-width: 0; padding: 8px 10px; border-radius: 9px;
  background: rgba(5,10,30,0.34); border: 1px solid rgba(224,242,254,0.08);
}
.panel-stat span {
  display: block; font-size: 9px; letter-spacing: 1.4px; text-transform: uppercase;
  color: rgba(224,242,254,0.58);
}
.panel-stat b {
  display: block; margin-top: 3px; font-size: 16px; color: #fff;
  font-variant-numeric: tabular-nums;
}
.panel-input,
.panel-select {
  height: 34px; min-width: 0; padding: 0 10px;
  border-radius: 9px; border: 1px solid rgba(224,242,254,0.14);
  background: rgba(5,10,30,0.38); color: #E0F2FE; font: inherit; font-size: 12px;
}
.panel-input::placeholder { color: rgba(224,242,254,0.45); }
.settings-inner h4 {
  font-size: 11px; font-weight: 600; letter-spacing: 1px; margin: 14px 0 8px;
  color: rgba(224,242,254,0.85); display: flex; align-items: center; gap: 6px;
}
.settings-inner h4:first-child { margin-top: 0; }
.settings-inner h4::before {
  content: ''; width: 3px; height: 11px; background: #93c5fd;
  border-radius: 2px; box-shadow: 0 0 6px #93c5fd;
}
.settings-inner { display: flex; flex-direction: column; gap: 12px; }
.settings-toolbar {
  display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: stretch;
}
.settings-reset { align-self: stretch; border-radius: 9px; }
.settings-grid-wide {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px;
}
.settings-section {
  min-width: 0; padding: 12px; border-radius: 12px;
  background: rgba(255,255,255,0.035); border: 1px solid rgba(224,242,254,0.08);
}
.settings-section-wide { grid-column: span 2; }
.settings-section h4 { margin-top: 0; }
.settings-section .set-row + .set-row { margin-top: 10px; }
.env-grid-wide { grid-template-columns: 1fr; gap: 11px; }
.env-chip-grid { display: grid; grid-template-columns: 1fr; gap: 8px; }
.env-chip-grid .env-chip {
  justify-content: space-between; border-radius: 9px; padding: 8px 10px;
}
.module-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.module-toggle {
  min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) 28px; gap: 8px; align-items: center;
  padding: 8px 9px; text-align: left; color: #E0F2FE; font-family: inherit; cursor: pointer;
  background: rgba(224,242,254,0.045); border: 1px solid rgba(224,242,254,0.1); border-radius: 9px;
}
.module-toggle:hover { background: rgba(96,165,250,0.12); border-color: rgba(147,197,253,0.28); }
.module-toggle.locked { opacity: 0.5; cursor: not-allowed; border-color: rgba(251,191,36,0.16); }
.module-toggle-copy { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.module-toggle-copy b { font-size: 11px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.module-toggle-copy small { font-size: 9px; opacity: 0.62; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.modules-panel { display: flex; flex-direction: column; gap: 12px; }
.modules-panel .module-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.modules-info-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px;
}
.modules-info-grid div {
  min-width: 0; padding: 10px; border-radius: 9px;
  background: rgba(5,10,30,0.28); border: 1px solid rgba(224,242,254,0.08);
}
.modules-info-grid b { display: block; margin-bottom: 4px; color: #fff; font-size: 12px; }
.modules-info-grid span { display: block; font-size: 11px; line-height: 1.45; opacity: 0.72; }
.module-prestige {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center;
}
.module-prestige p { margin: 0; font-size: 11px; line-height: 1.45; opacity: 0.72; }
.test-panel { display: flex; flex-direction: column; gap: 12px; }
.test-action-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px;
}
.test-action {
  min-height: 72px; min-width: 0; padding: 10px; border-radius: 10px;
  text-align: left; color: #E0F2FE; font-family: inherit; cursor: pointer;
  background: rgba(224,242,254,0.045); border: 1px solid rgba(224,242,254,0.1);
}
.test-action:hover { background: rgba(96,165,250,0.12); border-color: rgba(147,197,253,0.28); }
.test-action b { display: block; margin-bottom: 5px; font-size: 12px; color: #fff; }
.test-action span { display: block; font-size: 11px; line-height: 1.35; color: rgba(224,242,254,0.68); }
.test-readout {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px;
}
.test-readout div {
  min-width: 0; padding: 8px 9px; border-radius: 9px;
  background: rgba(5,10,30,0.28); border: 1px solid rgba(224,242,254,0.08);
}
.test-readout span {
  display: block; font-size: 9px; letter-spacing: 1.2px; text-transform: uppercase;
  color: rgba(224,242,254,0.58);
}
.test-readout b {
  display: block; margin-top: 4px; font-size: 12px; color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.test-notes p { margin: 0; font-size: 12px; line-height: 1.5; color: rgba(224,242,254,0.76); }
.biome-list { display: grid; grid-template-columns: 1fr; gap: 7px; margin-top: 12px; }
.biome-option {
  min-width: 0; text-align: left; padding: 8px 9px; border-radius: 9px;
  background: rgba(224,242,254,0.045); border: 1px solid rgba(224,242,254,0.1);
  color: #E0F2FE; font-family: inherit; cursor: pointer;
}
.biome-option:hover { background: rgba(96,165,250,0.12); border-color: rgba(147,197,253,0.28); }
.biome-option.on { background: rgba(96,165,250,0.18); border-color: rgba(147,197,253,0.48); }
.biome-option b { display: block; font-size: 11px; color: #fff; }
.biome-option span { display: block; margin-top: 2px; font-size: 10px; line-height: 1.35; opacity: 0.7; }
.biome-option small { display: block; margin-top: 4px; font-size: 9px; color: #c084fc; }

/* Library inner */
.lib-inner { display: flex; flex-direction: column; gap: 12px; }
.lib-empty { padding: 32px 12px; text-align: center; opacity: 0.7; font-size: 12px; line-height: 1.5; }
.library-toolbar {
  display: grid; grid-template-columns: minmax(280px, 1fr) minmax(280px, 0.9fr);
  gap: 10px; align-items: stretch;
}
.library-tools { display: grid; grid-template-columns: 1fr 150px; gap: 8px; }

/* Missions panel list */
.mission-board { display: flex; flex-direction: column; gap: 12px; }
.mission-layout {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 12px;
}
.mission-column {
  min-width: 0; padding: 12px; border-radius: 12px;
  background: rgba(255,255,255,0.035); border: 1px solid rgba(224,242,254,0.08);
}
.mission-list { display: flex; flex-direction: column; gap: 10px; }
.ml-eyebrow { font-size: 9px; letter-spacing: 2.5px; opacity: 0.55; margin-bottom: 4px; }
.ml-row { padding: 10px 12px; background: rgba(255,255,255,0.04);
  border: 1px solid rgba(224,242,254,0.08); border-radius: 10px; }
.ml-row.done { opacity: 0.6; background: rgba(110,231,183,0.06); border-color: rgba(110,231,183,0.18); }
.ml-row-head { display: flex; justify-content: space-between; align-items: baseline; }
.ml-row-title { font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.ml-check { color: #6ee7b7; }
.ml-row-reward { font-size: 10px; opacity: 0.75; color: #c084fc; }
.ml-row-desc { font-size: 11px; opacity: 0.7; line-height: 1.4; margin: 4px 0 6px; }
.ml-row-track { height: 4px; background: rgba(224,242,254,0.1); border-radius: 999px; overflow: hidden; }
.ml-row-fill { height: 100%; background: linear-gradient(90deg, #6ee7b7, #93c5fd); }
.ml-row-progress { font-size: 10px; opacity: 0.6; text-align: right; margin-top: 3px; font-variant-numeric: tabular-nums; }
.mission-achievements { grid-column: 1 / -1; }
.mission-achievements .ach-grid { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); }
.achievement-collection-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px;
}
.achievement-collection-head .ml-eyebrow { margin: 0 0 3px; }
.achievement-collection-head b { display: block; font-size: 11px; color: rgba(224,242,254,.86); }
.achievement-collection-head > span {
  min-width: 48px; text-align: right; color: #a5f3fc; font-size: 17px; font-weight: 750;
  font-variant-numeric: tabular-nums;
}
.achievement-progress {
  height: 4px; margin: 0 0 12px; overflow: hidden; border-radius: 999px; background: rgba(224,242,254,.08);
}
.achievement-progress i {
  display: block; height: 100%; border-radius: inherit;
  background: linear-gradient(90deg, #60a5fa, #c084fc, #6ee7b7);
  box-shadow: 0 0 12px rgba(96,165,250,.55); transition: width .45s ease;
}
.ach-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ach-cell {
  --ach-rgb: 96,165,250;
  position: relative; isolation: isolate; overflow: hidden;
  padding: 10px 8px; text-align: center;
  background: linear-gradient(160deg, rgba(var(--ach-rgb),.075), rgba(5,10,30,.58) 62%);
  border: 1px solid rgba(var(--ach-rgb),.16);
  border-radius: 11px; opacity: .66; transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease, opacity .2s ease;
}
.ach-cell::before {
  content: ''; position: absolute; z-index: -1; inset: -35% -20% auto; height: 85%; pointer-events: none;
  background: radial-gradient(circle, rgba(var(--ach-rgb),.14), transparent 68%);
}
.ach-cell.earned {
  opacity: 1; border-color: rgba(var(--ach-rgb),.48);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.055), 0 0 18px rgba(var(--ach-rgb),.13);
}
.ach-cell.both, .ach-cell.mine-only, .ach-cell.theirs-only { opacity: 1; }
.mission-achievements .ach-cell { min-height: 124px; display: flex; flex-direction: column; justify-content: center; }
.mission-achievements .ach-cell:hover { transform: translateY(-2px); border-color: rgba(var(--ach-rgb),.42); }
.ach-cell-icon { font-size: 22px; margin-bottom: 4px; }
.achievement-art { display: block; object-fit: cover; padding: 0 !important; }
.ach-cell-icon.achievement-art {
  width: 56px; height: 56px; margin: 0 auto 7px; border-radius: 50%;
  border: 1px solid rgba(var(--ach-rgb),.24); box-shadow: 0 0 15px rgba(var(--ach-rgb),.18);
}
.ach-icon.achievement-art { border-radius: 9px; border-color: rgba(var(--ach-rgb),.28); }
.ach-cell:not(.earned):not(.both):not(.mine-only):not(.theirs-only) .achievement-art {
  filter: grayscale(.82) saturate(.48) brightness(.58); opacity: .76;
}
.ach-seal-wrap { position: relative; display: inline-flex; align-self: center; }
.ach-state {
  position: absolute; right: 1px; bottom: 5px; display: grid; place-items: center;
  width: 18px; height: 18px; border-radius: 50%; color: rgba(224,242,254,.78);
  background: rgba(6,13,35,.94); border: 1px solid rgba(var(--ach-rgb),.34); font-size: 9px; font-weight: 800;
}
.ach-cell.earned .ach-state { color: #fff; background: rgb(var(--ach-rgb)); box-shadow: 0 0 9px rgba(var(--ach-rgb),.5); }
.ach-cell-label { font-size: 10px; font-weight: 600; }
.ach-cell-meta { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 4px; font-size: 8px; }
.ach-cell-meta span { opacity: .54; text-transform: uppercase; letter-spacing: .7px; }
.ach-cell-meta b { color: rgb(var(--ach-rgb)); font-weight: 700; }
.ach-cat-genetics { --ach-rgb: 192,132,252; }
.ach-cat-predation { --ach-rgb: 251,113,133; }
.ach-cat-ecology { --ach-rgb: 110,231,183; }
.ach-cat-discovery { --ach-rgb: 96,165,250; }
.ach-cat-progression { --ach-rgb: 251,191,36; }
.ach-cat-companion { --ach-rgb: 244,114,182; }
.ach-cat-challenge { --ach-rgb: 251,146,60; }
.ach-cat-fortune { --ach-rgb: 250,204,21; }
.ach-cat-exploration { --ach-rgb: 45,212,191; }
.ach-cat-faction { --ach-rgb: 129,140,248; }

/* Evolution panel */
.evo-panel { display: flex; flex-direction: column; gap: 12px; }
.evo-summary {
  display: grid; grid-template-columns: 82px 1fr; gap: 12px; align-items: stretch;
  padding: 10px 12px; background: rgba(255,255,255,0.04);
  border: 1px solid rgba(224,242,254,0.08); border-radius: 10px;
}
.evo-dna { margin-top: 3px; font-size: 22px; font-weight: 700; color: #fff; }
.evo-dna span { color: #c084fc; font-size: 16px; }
.evo-cap-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.evo-cap {
  display: flex; justify-content: space-between; gap: 8px;
  padding: 5px 7px; background: rgba(5,10,30,0.35);
  border-radius: 7px; font-size: 10px;
}
.evo-cap span { opacity: 0.65; }
.evo-cap b { color: #fff; font-weight: 600; }
.evo-error {
  padding: 8px 10px; border-radius: 8px;
  background: rgba(248,113,113,0.12); border: 1px solid rgba(248,113,113,0.28);
  color: #fecaca; font-size: 11px;
}
.evo-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.evo-toolbar-group {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px; border: 1px solid rgba(224,242,254,0.1);
  border-radius: 10px; background: rgba(5,10,30,0.28);
}
.evo-tool-btn {
  width: 28px; height: 28px; padding: 0; border-radius: 8px;
  font-size: 16px; line-height: 1;
}
.evo-zoom-readout {
  min-width: 40px; text-align: center; font-size: 11px;
  color: rgba(224,242,254,0.78); font-variant-numeric: tabular-nums;
}
.evo-compact-btn { height: 34px; padding: 0 12px; border-radius: 10px; font-size: 11px; }
.evo-tree-scroll {
  overflow: auto; padding: 6px;
  border: 1px solid rgba(224,242,254,0.08); border-radius: 12px;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255,255,255,0.025) 1px, transparent 1px),
    rgba(5,10,30,0.22);
  background-size: 166px 122px, 166px 122px, auto;
}
.evo-tree-viewport { position: relative; min-width: 100%; }
.evo-tree-map { position: relative; min-width: 100%; transform-origin: 0 0; }
.evo-links { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.evo-link {
  fill: none; stroke: rgba(148,163,184,0.34); stroke-width: 2;
  stroke-linecap: round;
}
.evo-link.available { stroke: rgba(147,197,253,0.72); stroke-dasharray: 7 7; }
.evo-link.unlocked { stroke: rgba(110,231,183,0.86); stroke-width: 2.5; }
.evo-branch-label {
  position: absolute; left: 12px; width: 60px; z-index: 1;
  font-size: 9px; line-height: 1.2; letter-spacing: 1.4px; text-transform: uppercase;
  color: rgba(224,242,254,0.62);
}
.evo-node {
  position: absolute; width: 138px; min-height: 92px; z-index: 2;
  display: flex; flex-direction: column;
  padding: 9px 10px; border-radius: 10px;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(224,242,254,0.08);
  box-sizing: border-box;
}
.evo-node.unlocked {
  background: rgba(110,231,183,0.06); border-color: rgba(110,231,183,0.22);
  box-shadow: 0 0 18px rgba(110,231,183,0.1);
}
.evo-node.available {
  background: rgba(96,165,250,0.08); border-color: rgba(147,197,253,0.44);
}
.evo-node.branch-groei { border-color: rgba(110,231,183,0.24); }
.evo-node.branch-beweging { border-color: rgba(125,211,252,0.24); }
.evo-node.branch-verdediging { border-color: rgba(251,191,36,0.24); }
.evo-node.branch-metabolisme { border-color: rgba(192,132,252,0.24); }
.evo-node.branch-predatie { border-color: rgba(248,113,113,0.24); }
.evo-node.branch-voortplanting { border-color: rgba(244,114,182,0.24); }
.evo-node.branch-laboratorium { border-color: rgba(96,165,250,0.24); }
.evo-node.branch-economie { border-color: rgba(52,211,153,0.24); }
.evo-node.branch-ecologie { border-color: rgba(163,230,53,0.24); }
.evo-node.branch-populatie { border-color: rgba(251,146,60,0.24); }
.evo-node.branch-herstel { border-color: rgba(250,204,21,0.24); }
/* E4 — colours for the new branches added in E4 (Sociaal, Sensorisch,
   Adaptief, Symbiose-uitbreiding deelt 'metabolisme', en de verborgen Ω-tak). */
.evo-node.branch-sociaal { border-color: rgba(244,114,182,0.32); }
.evo-node.branch-sensorisch { border-color: rgba(56,189,248,0.32); }
.evo-node.branch-adaptief { border-color: rgba(110,231,183,0.32); }
.evo-node.branch-omega {
  border-color: rgba(251,191,36,0.50);
  box-shadow: 0 0 12px rgba(251,191,36,0.25);
  background: linear-gradient(180deg, rgba(251,191,36,0.06), rgba(192,132,252,0.06));
}
.evo-node-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.evo-node-icon {
  width: 25px; height: 25px; display: grid; place-items: center;
  border-radius: 8px; background: rgba(224,242,254,0.08);
  border: 1px solid rgba(224,242,254,0.12);
}
.evo-node-title { margin-top: 6px; font-size: 12px; font-weight: 650; color: #fff; }
.evo-node-unlocks {
  margin-top: 4px; font-size: 10px; line-height: 1.25; opacity: 0.72;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.evo-unlock-btn { min-width: 48px; padding: 5px 8px; font-size: 10px; }
.evo-lock-reason {
  margin-top: 5px; padding: 2px 5px; border-radius: 5px;
  font-size: 9px; line-height: 1.15; color: #fbbf24; opacity: 0.92;
  background: rgba(251,191,36,0.08); border: 1px solid rgba(251,191,36,0.16);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.evo-panel.compact .evo-summary {
  grid-template-columns: 78px 1fr; padding: 8px 10px;
}
.evo-panel.compact .evo-cap-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.evo-panel.compact .evo-cap { padding: 4px 6px; font-size: 9px; }
.evo-panel.compact .evo-tree-scroll { background-size: 150px 112px, 150px 112px, auto; }
.evo-panel.compact .evo-branch-label {
  width: 54px; font-size: 8px; letter-spacing: 1px;
}
.evo-panel.compact .evo-node {
  width: 132px; min-height: 96px; padding: 7px 8px; border-radius: 8px;
}
.evo-panel.compact .evo-node-icon {
  width: 22px; height: 22px; border-radius: 7px; font-size: 12px;
}
.evo-panel.compact .evo-node-title { margin-top: 4px; font-size: 11px; }
.evo-panel.compact .evo-node-unlocks {
  margin-top: 3px; font-size: 9px; line-height: 1.18; -webkit-line-clamp: 2;
}
.evo-panel.compact .evo-unlock-btn {
  min-width: 42px; padding: 4px 6px; font-size: 9px; border-radius: 8px;
}
.evo-panel.compact .evo-lock-reason {
  margin-top: 4px; padding: 2px 4px; font-size: 8px; line-height: 1.15;
}

@media (max-width: 760px) {
  .progression-dock,
  .tutorial-coach,
  .daily-dock,
  .rivalry-panel {
    display: none;
  }
  .side-panel-wide.side-panel-right {
    left: 12px; right: 12px;
  }
  .panel-stat-grid,
  .settings-grid-wide,
  .library-toolbar,
  .mission-layout,
  .help-start,
  .help-grid,
  .activity-summary,
  .modules-panel .module-grid,
  .modules-info-grid,
  .test-action-grid,
  .test-readout {
    grid-template-columns: 1fr;
  }
  .help-flow {
    grid-template-columns: 1fr;
  }
  .library-tools {
    grid-template-columns: 1fr;
  }
  .mission-achievements { grid-column: auto; }
  .mission-achievements .ach-grid,
  .ach-grid {
    grid-template-columns: 1fr 1fr;
  }
  .evo-summary,
  .evo-panel.compact .evo-summary {
    grid-template-columns: 1fr; gap: 8px;
  }
  .evo-panel.compact .evo-cap-grid {
    grid-template-columns: 1fr 1fr;
  }
  .activity-toolbar {
    align-items: stretch; flex-direction: column;
  }
}
.lib-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.lib-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px; overflow-y: auto; flex: 1; padding-right: 4px;
}
.lib-card {
  display: flex; align-items: center; gap: 12px; padding: 10px;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(224, 242, 254, 0.08);
  border-radius: 10px; transition: background 0.15s;
}
.lib-card:hover { background: rgba(255,255,255,0.08); }
.lib-card canvas { background: rgba(10, 20, 50, 0.6); border-radius: 8px; flex-shrink: 0; }
.lib-info { flex: 1; min-width: 0; }
.lib-name {
  font-size: 13px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 6px;
  cursor: pointer;
}
/* E129 — Strain power rating (sterren + score) */
.lib-arch { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lib-power {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.6px;
  padding: 2px 7px; border-radius: 999px;
  background: rgba(96,165,250,0.14);
  border: 1px solid rgba(147,197,253,0.30);
  color: #93c5fd;
}
.lib-power.tier-1 { color: #94a3b8; border-color: rgba(148,163,184,0.45); background: rgba(148,163,184,0.12); }
.lib-power.tier-2 { color: #93c5fd; border-color: rgba(147,197,253,0.45); background: rgba(96,165,250,0.14); }
.lib-power.tier-3 { color: #6ee7b7; border-color: rgba(110,231,183,0.50); background: rgba(34,197,94,0.14); }
.lib-power.tier-4 { color: #fbbf24; border-color: rgba(251,191,36,0.55); background: rgba(251,191,36,0.14); box-shadow: 0 0 10px rgba(251,191,36,0.22); }
.lib-power.tier-5 { color: #f472b6; border-color: rgba(244,114,182,0.65); background: rgba(244,114,182,0.16); box-shadow: 0 0 14px rgba(244,114,182,0.35); }
.lib-power-num { margin-left: 2px; font-size: 10px; opacity: 0.92; }
/* Loadout-card power pill — kleinere variant */
.lc-power {
  font-size: 9px; font-weight: 700; letter-spacing: 0.4px;
  padding: 1px 6px; border-radius: 999px;
  background: rgba(96,165,250,0.14);
  border: 1px solid rgba(147,197,253,0.30);
}
.lc-power.tier-1 { color: #94a3b8; }
.lc-power.tier-2 { color: #93c5fd; }
.lc-power.tier-3 { color: #6ee7b7; border-color: rgba(110,231,183,0.50); }
.lc-power.tier-4 { color: #fbbf24; border-color: rgba(251,191,36,0.55); }
.lc-power.tier-5 { color: #f472b6; border-color: rgba(244,114,182,0.65); }
/* E129b — Power-pill in hoek van loadout-card (prominenter) */
.loadout-card { position: relative; }
.lc-power-corner {
  position: absolute; top: 5px; right: 5px;
  font-size: 9px; font-weight: 700; letter-spacing: 0.3px;
  padding: 2px 6px; border-radius: 999px;
  background: rgba(5,10,30,0.85);
  border: 1px solid rgba(147,197,253,0.40);
  color: #93c5fd;
  display: inline-flex; align-items: center; gap: 2px;
}
.lc-power-corner.tier-1 { color: #94a3b8; border-color: rgba(148,163,184,0.45); }
.lc-power-corner.tier-2 { color: #93c5fd; }
.lc-power-corner.tier-3 { color: #6ee7b7; border-color: rgba(110,231,183,0.55); }
.lc-power-corner.tier-4 { color: #fbbf24; border-color: rgba(251,191,36,0.60); box-shadow: 0 0 8px rgba(251,191,36,0.30); }
.lc-power-corner.tier-5 { color: #f472b6; border-color: rgba(244,114,182,0.70); box-shadow: 0 0 12px rgba(244,114,182,0.45); }
/* E129b — Random-preview header rij (eyebrow + power pill naast elkaar) */
.lrp-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; margin-bottom: 1px;
}
.lib-rename-btn {
  background: transparent; border: none;
  color: rgba(224,242,254,0.40);
  cursor: pointer; padding: 0 2px;
  font-size: 11px; line-height: 1;
  transition: color 140ms ease;
  font-family: inherit;
}
.lib-rename-btn:hover { color: #93c5fd; }
.lib-name-edit { display: flex; }
.lib-name-input {
  font-size: 13px; font-weight: 600;
  background: rgba(5,10,30,0.85);
  border: 1px solid rgba(147,197,253,0.65);
  border-radius: 6px;
  padding: 2px 6px;
  color: #fff;
  font-family: inherit;
  outline: none;
  width: 100%;
  max-width: 180px;
}
.lib-name-input:focus { border-color: #93c5fd; box-shadow: 0 0 0 2px rgba(96,165,250,0.25); }
.lib-arch { font-size: 10px; letter-spacing: 0.5px; opacity: 0.85; margin-top: 2px; }
.lib-traits {
  display: flex; flex-wrap: wrap; gap: 4px; margin-top: 7px;
  font-size: 9px; color: rgba(224,242,254,0.66);
}
.lib-traits span {
  padding: 2px 5px; border-radius: 5px;
  background: rgba(5,10,30,0.35); border: 1px solid rgba(224,242,254,0.08);
}
.lib-card-actions { display: flex; gap: 4px; }
.lib-mini-btn { width: 28px; height: 28px; padding: 0; font-size: 14px; }

.help-card {
  width: 920px; max-width: 96%;
  background: rgba(12, 30, 70, 0.65); backdrop-filter: blur(20px) saturate(1.2);
  border: 1px solid rgba(224, 242, 254, 0.25); border-radius: 22px;
  padding: 22px 26px 22px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.6), 0 0 60px rgba(96,165,250,0.18);
  animation: labIn 0.32s cubic-bezier(.2,.8,.3,1);
  color: #E0F2FE;
}
.help-body { display: grid; grid-template-columns: 1fr 1fr; gap: 26px;
  margin-top: 8px; max-height: 70vh; overflow-y: auto; }
.help-col h4 { font-size: 12px; font-weight: 600; letter-spacing: 1px;
  margin: 14px 0 6px; color: #fff; }
.help-col h4:first-child { margin-top: 0; }
.help-col p { font-size: 12px; line-height: 1.55; opacity: 0.85; margin: 0 0 8px; }
.help-col b { color: #fff; font-weight: 600; }
.help-panel { display: flex; flex-direction: column; gap: 12px; }
.help-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px;
}
.help-tile {
  min-width: 0; padding: 14px; border-radius: 12px;
  background: rgba(255,255,255,0.035); border: 1px solid rgba(224,242,254,0.08);
}
.help-tile h4 {
  margin: 0 0 8px; font-size: 12px; font-weight: 650; color: #fff;
}
.help-tile p {
  margin: 0; font-size: 12px; line-height: 1.5; color: rgba(224,242,254,0.78);
}

@media (min-width: 761px) and (max-width: 1100px) {
  .settings-grid-wide,
  .help-grid,
  .activity-summary,
  .test-action-grid,
  .test-readout { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .help-flow { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mission-layout { grid-template-columns: 1fr 1fr; }
  .mission-achievements { grid-column: 1 / -1; }
  .mission-achievements .ach-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* env chip with cost */
.env-chip { display: inline-flex; align-items: center; gap: 5px; }
.env-chip .chip-cost {
  padding: 1px 5px; font-size: 9px; background: rgba(192,132,252,0.2);
  border: 1px solid rgba(192,132,252,0.4); border-radius: 4px; color: #ddd6fe;
}
.env-chip[disabled] { opacity: 0.4; cursor: not-allowed; }

/* ═══════════════════════════════════════════════════════════
   Gamification — OrganismDex, DailyBonus, DNA Share, KillFeed
   ═══════════════════════════════════════════════════════════ */

/* ── Organismendex ──────────────────────────────────────── */
.dex-overlay {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  background: rgba(2,6,15,0.85);
  backdrop-filter: blur(8px);
}
.dex-card {
  width: min(700px, 90vw); max-height: 80vh;
  background: rgba(10,20,50,0.95);
  border: 1px solid rgba(147,197,253,0.2);
  border-radius: 20px; overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: 0 0 40px rgba(59,130,246,0.15);
}
.dex-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid rgba(224,242,254,0.1);
}
.dex-title {
  font-size: 18px; font-weight: 600; color: #E0F2FE;
  display: flex; align-items: center; gap: 8px;
}
.dex-count {
  font-size: 12px; opacity: 0.55; margin-left: 6px;
  background: rgba(96,165,250,0.15); padding: 3px 10px; border-radius: 12px;
}
.dex-body {
  overflow-y: auto; padding: 14px 22px 22px;
  display: flex; flex-direction: column; gap: 6px;
}
.dex-empty {
  text-align: center; padding: 40px 20px; opacity: 0.5;
  font-size: 14px; color: #64748b;
}
.dex-entry {
  display: grid; grid-template-columns: 28px 1fr auto auto 60px;
  align-items: center; gap: 10px; padding: 8px 12px;
  background: rgba(224,242,254,0.025);
  border: 1px solid rgba(224,242,254,0.06);
  border-radius: 10px; font-size: 13px;
  transition: background 0.12s;
}
.dex-entry:hover { background: rgba(224,242,254,0.045); }
.dex-entry-icon { font-size: 16px; text-align: center; }
.dex-entry-name { color: #E0F2FE; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dex-entry-arch {
  font-size: 10px; padding: 2px 8px; border-radius: 6px;
  color: rgba(224,242,254,0.8); white-space: nowrap;
}
.dex-entry-rarity { font-size: 11px; font-weight: 600; text-align: center; min-width: 60px; }
.dex-entry-seen { font-size: 11px; opacity: 0.5; text-align: right; font-variant-numeric: tabular-nums; }

/* ── Daily Bonus Toast ─────────────────────────────────── */
.daily-toast {
  position: fixed; top: 76px; right: 20px; z-index: 200;
  display: flex; align-items: center; gap: 12px;
  padding: 14px 20px;
  background: rgba(10,20,50,0.95);
  border: 1px solid rgba(245,158,11,0.4);
  border-radius: 14px;
  box-shadow: 0 0 24px rgba(245,158,11,0.2);
  animation: slideInRight 0.35s ease-out;
}
.daily-toast-icon { font-size: 28px; }
.daily-toast-title { font-size: 13px; font-weight: 600; color: #f59e0b; margin-bottom: 4px; }
.daily-toast-rewards { display: flex; gap: 12px; font-size: 11px; opacity: 0.85; }
.daily-toast-rewards span {
  padding: 2px 8px; border-radius: 6px;
  background: rgba(224,242,254,0.06); border: 1px solid rgba(224,242,254,0.1);
  white-space: nowrap;
}

/* ── DNA Share Panel ──────────────────────────────────── */
.share-overlay {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  background: rgba(2,6,15,0.85);
  backdrop-filter: blur(8px);
}
.share-card {
  width: min(520px, 90vw);
  background: rgba(10,20,50,0.95);
  border: 1px solid rgba(147,197,253,0.2);
  border-radius: 20px; overflow: hidden;
  box-shadow: 0 0 40px rgba(59,130,246,0.15);
}
.share-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid rgba(224,242,254,0.1);
}
.share-title { font-size: 18px; font-weight: 600; color: #E0F2FE; }
.share-body { padding: 18px 22px 22px; display: flex; flex-direction: column; gap: 20px; }
.share-section { display: flex; flex-direction: column; gap: 6px; }
.share-section-title { font-size: 12px; font-weight: 600; color: #64748b; letter-spacing: 1px; }
.share-org-name { font-size: 14px; font-weight: 600; color: #93c5fd; }
.share-code-area {
  width: 100%; padding: 10px 12px; font-size: 11px; font-family: monospace;
  background: rgba(5,10,30,0.8); color: #94a3b8;
  border: 1px solid rgba(224,242,254,0.12); border-radius: 8px;
  resize: vertical; outline: none;
}
.share-code-area:focus { border-color: rgba(96,165,250,0.5); }
.share-import-ok {
  padding: 8px 12px; background: rgba(34,197,94,0.08);
  border: 1px solid rgba(34,197,94,0.2); border-radius: 8px;
  font-size: 12px; display: flex; align-items: center; gap: 10px;
}

/* ── Animations ───────────────────────────────────────── */
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInScale {
  from { opacity: 0; transform: scale(0.92); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 12px rgba(96,165,250,0.3); }
  50%      { box-shadow: 0 0 28px rgba(147,197,253,0.7); }
}

@keyframes staggerIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── UI Animation assignments ────────────────────────── */
.lab-overlay { animation: fadeInScale 0.25s ease-out; }
.lab-card { animation: fadeInScale 0.3s ease-out; }
.dex-overlay { animation: fadeInScale 0.2s ease-out; }
.share-overlay { animation: fadeInScale 0.2s ease-out; }

.dex-entry { animation: staggerIn 0.35s ease-out both; }
.dex-entry:nth-child(1)  { animation-delay: 0.02s; }
.dex-entry:nth-child(2)  { animation-delay: 0.04s; }
.dex-entry:nth-child(3)  { animation-delay: 0.06s; }
.dex-entry:nth-child(4)  { animation-delay: 0.08s; }
.dex-entry:nth-child(5)  { animation-delay: 0.10s; }
.dex-entry:nth-child(6)  { animation-delay: 0.12s; }
.dex-entry:nth-child(7)  { animation-delay: 0.14s; }
.dex-entry:nth-child(8)  { animation-delay: 0.16s; }
.dex-entry:nth-child(9)  { animation-delay: 0.18s; }
.dex-entry:nth-child(10) { animation-delay: 0.20s; }

.notif-toast { animation: slideDown 0.3s ease-out; }

/* ── Evotree animation ───────────────────────────────── */
.evo-node {
  transition: all 0.25s ease;
}
.evo-node:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(96,165,250,0.3);
}
.evo-node.unlocking {
  animation: pulse 0.8s ease-in-out;
}

/* ── Rarity badge animations ─────────────────────────── */
.rarity-pill {
  transition: all 0.25s ease;
}
.rarity-pill.legendarisch {
  animation: pulse 2s ease-in-out infinite;
  border-color: #f59e0b !important;
  box-shadow: 0 0 16px rgba(245,158,11,0.4);
}

/* ── Kill feed entry animation ───────────────────────── */
#petrie-killfeed > div {
  animation: feedIn 0.25s ease-out;
}
@keyframes feedIn {
  from { opacity: 0; transform: translateX(-24px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ═══════════════════════════════════════════════════════════
   Research Lab — faciliteiten, journal, story arc
   ═══════════════════════════════════════════════════════════ */

.rp-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 12px; background: rgba(245,158,11,0.15);
  border: 1px solid rgba(245,158,11,0.35); border-radius: 12px;
  font-size: 13px; color: #fbbf24; margin-left: 10px;
}
.rp-badge b { font-size: 16px; }

.research-lab-card { max-height: 85vh; }

.research-overlay {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  background: rgba(2,6,15,0.85);
  backdrop-filter: blur(8px);
}
.research-card {
  width: min(780px, 92vw); max-height: 88vh;
  background: rgba(10,20,50,0.95);
  border: 1px solid rgba(147,197,253,0.2);
  border-radius: 20px; overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: 0 0 40px rgba(59,130,246,0.15);
}
.research-overlay .lab-header,
.research-hdr {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px; border-bottom: 1px solid rgba(224,242,254,0.1);
}
.rec-eyebrow { font-size: 10px; letter-spacing: 3px; opacity: 0.5; }
.rec-title { font-size: 18px; font-weight: 600; color: #E0F2FE; display: flex; align-items: center; }
.research-tabs {
  display: flex; gap: 4px; padding: 0 20px 12px;
  border-bottom: 1px solid rgba(224,242,254,0.1);
}
.research-tab {
  padding: 8px 16px; background: transparent; border: 1px solid transparent;
  border-radius: 10px; color: rgba(224,242,254,0.55); font-family: inherit;
  font-size: 13px; cursor: pointer; transition: all 0.15s;
}
.research-tab:hover { color: #fff; background: rgba(224,242,254,0.04); }
.research-tab.on { color: #fff; background: rgba(59,130,246,0.2); border-color: rgba(147,197,253,0.35); }
.research-body { overflow-y: auto; padding: 16px 20px 20px; flex: 1; }

/* Facilities grid */
.facility-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 12px;
}
.facility-card {
  padding: 14px; border-radius: 12px;
  background: rgba(5,10,30,0.5); border: 1px solid rgba(224,242,254,0.08);
  display: flex; flex-direction: column; gap: 10px;
  transition: border-color 0.15s;
}
.facility-card:not(.locked):hover { border-color: rgba(147,197,253,0.2); }
.facility-card.locked { opacity: 0.45; filter: grayscale(0.4); }
.facility-card.maxed { border-color: rgba(34,197,94,0.2); background: rgba(34,197,94,0.03); }
.facility-head { display: flex; align-items: flex-start; gap: 10px; }
.facility-icon { font-size: 22px; line-height: 1; }
.facility-info { flex: 1; min-width: 0; }
.facility-name { font-size: 14px; font-weight: 600; color: #fff; }
.facility-desc { font-size: 11px; color: rgba(224,242,254,0.55); display: block; margin-top: 2px; }
.facility-level {
  font-size: 13px; font-weight: 700; color: #93c5fd; white-space: nowrap;
  padding: 3px 10px; background: rgba(59,130,246,0.15); border-radius: 8px;
}
.facility-bar {
  height: 4px; border-radius: 2px;
  background: rgba(224,242,254,0.08); overflow: hidden;
}
.facility-bar-fill {
  height: 100%; border-radius: 2px;
  background: linear-gradient(90deg, #3b82f6, #60a5fa);
  transition: width 0.3s ease;
}
.facility-upgrade-btn { align-self: flex-start; }
.facility-max { font-size: 11px; color: #22c55e; text-align: center; padding: 4px 0; }
.facility-effects {
  display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px;
}
.facility-effect {
  font-size: 9px; padding: 2px 6px; background: rgba(96,165,250,0.1);
  border: 1px solid rgba(96,165,250,0.15); border-radius: 4px;
  color: rgba(224,242,254,0.7);
}

/* Journal */
.journal-list { display: flex; flex-direction: column; gap: 14px; }
.journal-empty { text-align: center; padding: 40px; color: #64748b; font-size: 13px; }
.journal-entry {
  padding: 16px; border-radius: 12px;
  background: rgba(10,20,50,0.5); border: 1px solid rgba(224,242,254,0.08);
}
.journal-entry-head {
  display: flex; align-items: flex-start; gap: 10px; margin-bottom: 10px;
  padding-bottom: 10px; border-bottom: 1px solid rgba(224,242,254,0.06);
}
.journal-entry-icon { font-size: 20px; }
.journal-entry-title { font-size: 14px; font-weight: 600; color: #fff; }
.journal-entry-from { font-size: 11px; color: rgba(224,242,254,0.5); margin-top: 2px; }
.journal-entry-text p {
  margin: 0 0 6px; font-size: 12px; line-height: 1.6;
  color: rgba(224,242,254,0.75);
}

/* Story arc */
.story-panel { display: flex; flex-direction: column; align-items: center; gap: 0; padding: 10px 0; }
.story-act-card {
  padding: 18px 24px; border-radius: 14px;
  background: rgba(10,20,50,0.6); border: 1px solid rgba(59,130,246,0.2);
  text-align: center; width: 100%; max-width: 420px;
}
.story-act-card.next { border-color: rgba(148,163,184,0.15); opacity: 0.7; }
.story-act-badge {
  display: inline-block; padding: 4px 14px; font-size: 11px; font-weight: 700;
  letter-spacing: 2px; color: #60a5fa;
  background: rgba(59,130,246,0.15); border-radius: 8px; margin-bottom: 8px;
}
.story-act-name { font-size: 18px; font-weight: 700; color: #fff; }
.story-act-desc { font-size: 12px; color: rgba(224,242,254,0.6); margin-top: 4px; }
.story-arrow { font-size: 22px; color: #64748b; margin: 6px 0; }
.story-progress {
  margin-top: 10px; font-size: 11px; color: rgba(224,242,254,0.5);
  padding: 4px 12px; background: rgba(224,242,254,0.03); border-radius: 6px;
}
.story-choices { margin-top: 16px; width: 100%; max-width: 420px; }
.story-section-title { font-size: 12px; font-weight: 600; color: #94a3b8; margin-bottom: 6px; }
.story-choice {
  padding: 6px 12px; font-size: 12px; color: rgba(224,242,254,0.7);
  background: rgba(224,242,254,0.03); border-radius: 6px; margin-bottom: 4px;
}

/* E193 — Active run-modifiers badge-rij in petri-dish overlay */
.run-mods {
  position: absolute; top: 78px; left: 14px;
  display: flex; flex-wrap: wrap; gap: 6px; max-width: 320px;
  z-index: 9; pointer-events: none;
}
.run-mod-badge {
  pointer-events: auto;
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 8px 3px 6px;
  background: rgba(5,10,30,0.55);
  border: 1px solid rgba(147,197,253,0.22);
  border-radius: 12px;
  font-size: 10.5px; color: rgba(224,242,254,0.88);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: background 0.2s, border-color 0.2s;
}
.run-mod-badge:hover {
  background: rgba(5,10,30,0.78); border-color: rgba(147,197,253,0.45);
}
.run-mod-badge .rmb-icon { font-size: 12px; line-height: 1; }
.run-mod-badge .rmb-label { font-weight: 500; letter-spacing: 0.2px; }
.run-mod-biome   { border-color: rgba(125,211,252,0.30); }
.run-mod-climate { border-color: rgba(192,132,252,0.30); }
.run-mod-season  { border-color: rgba(110,231,183,0.30); }
.run-mod-live    { border-color: rgba(251,191,36,.38); background:rgba(40,28,4,.48); color:rgba(254,230,138,.9); }
.run-mod-curse   {
  border-color: rgba(248,113,113,0.40);
  background: rgba(40,8,8,0.55);
  color: rgba(254,202,202,0.92);
}
.run-mod-buff    { border-color: rgba(251,191,36,0.40); background: rgba(40,28,4,0.55); color: rgba(254,230,138,0.92); }

@media (max-width: 600px) {
  .run-mods { top: 146px; left: 8px; right: 8px; max-width: none; flex-wrap: nowrap; overflow: hidden; gap: 4px; }
  .run-mod-badge { flex: 0 1 auto; min-width: 0; padding: 2px 6px; font-size: 8px; }
  .run-mod-badge .rmb-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .live-event-banner { display: none; }
}

/* ── E201 · Purposeful image layer ────────────────────────────────── */
.biome-ambient {
  position: absolute; inset: -3%; z-index: 0; pointer-events: none;
  background-size: cover; background-position: center;
  opacity: 0.11; filter: saturate(1.15) blur(2px);
  mix-blend-mode: screen;
  -webkit-mask-image: radial-gradient(ellipse at center, rgba(0,0,0,0.78), transparent 78%);
  mask-image: radial-gradient(ellipse at center, rgba(0,0,0,0.78), transparent 78%);
  transform: scale(1.04);
}
.biome-ambient.biome-acid { opacity: 0.13; filter: hue-rotate(18deg) saturate(1.3) blur(2px); }
.biome-ambient.biome-predator { opacity: 0.13; filter: saturate(1.35) blur(2px); }

.narrative-dialog .nd-avatar { overflow: hidden; padding: 0; }
.narrative-dialog .nd-avatar img {
  width: 100%; height: 100%; object-fit: cover; object-position: 50% 28%;
  display: block;
}

.profile-lead {
  width: 92px; flex-shrink: 0; display: flex; flex-direction: column;
  align-items: center; gap: 3px; padding: 8px 6px;
  border-radius: 12px; border: 1px solid rgba(192,132,252,0.32);
  background: radial-gradient(circle, rgba(96,165,250,0.18), rgba(5,10,30,0.35));
}
.profile-lead canvas { filter: drop-shadow(0 0 9px rgba(147,197,253,0.45)); }
.profile-lead span { color: #c4b5fd; font-size: 8px; letter-spacing: .7px; text-transform: uppercase; }
.profile-lead b { max-width: 78px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; color: #fff; }

.pu-slot-art {
  width: 34px; height: 34px; margin-top: -3px; border-radius: 7px;
  background-size: cover; background-position: center; background-repeat: no-repeat;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.16), 0 0 10px rgba(96,165,250,.2);
}
.pu-slot-art .pu-slot-fallback { opacity: 0; }

.reward-banner {
  position: relative; height: 190px; overflow: hidden;
  background-size: cover; background-position: center 42%;
  border-bottom: 1px solid rgba(251,191,36,.32);
}
.run-end .reward-banner { width: calc(100% + 64px); margin: -28px -32px 18px; border-radius: 18px 18px 0 0; }
.idle-modal .reward-banner { width: calc(100% + 56px); margin: -26px -28px 18px; border-radius: 16px 16px 0 0; }
.reward-banner::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 42%, rgba(5,10,30,.82) 100%);
}
.reward-banner-icon {
  position: absolute; right: 18px; bottom: 12px; z-index: 1;
  font-size: 28px; filter: drop-shadow(0 0 10px rgba(251,191,36,.7));
}

.disc-item { display: flex; align-items: center; gap: 12px; }
.disc-copy { flex: 1; min-width: 0; }
.disc-specimen {
  width: 64px; height: 64px; flex: 0 0 64px; display: grid; place-items: center;
  border-radius: 50%; background: radial-gradient(circle, rgba(96,165,250,.18), rgba(5,10,30,.66));
  border: 1px solid rgba(147,197,253,.25); overflow: hidden;
}
.disc-item.unlocked .disc-specimen { border-color: rgba(110,231,183,.45); box-shadow: 0 0 12px rgba(110,231,183,.14); }
.disc-item.locked .disc-specimen { filter: grayscale(1); }
.disc-silhouette { font-size: 25px; color: rgba(224,242,254,.24); filter: blur(.3px); }

.journal-mentor {
  display: flex; align-items: center; gap: 12px; padding: 8px 12px;
  border: 1px solid rgba(192,132,252,.26); border-radius: 12px;
  background: linear-gradient(90deg, rgba(168,85,247,.12), rgba(5,10,30,.25));
}
.journal-mentor img { width: 58px; height: 58px; object-fit: cover; object-position: 50% 28%; border-radius: 50%; border: 1px solid rgba(192,132,252,.45); }
.journal-mentor p { margin: 4px 0 0; font-size: 11px; opacity: .65; }

.death-portrait {
  width: 90px; height: 90px; margin: 0 auto 8px; display: grid; place-items: center;
  border-radius: 50%; border: 1px solid rgba(248,113,113,.48);
  background: radial-gradient(circle, rgba(248,113,113,.14), rgba(5,10,30,.55));
  box-shadow: 0 0 28px rgba(248,113,113,.2); overflow: hidden;
}
.death-portrait canvas { transform: scale(1.38); filter: grayscale(.35) drop-shadow(0 0 8px rgba(248,113,113,.5)); }
.death-portrait .death-cross { margin: 0; }
.mem-specimen { width: 62px; height: 62px; flex: 0 0 62px; display: grid; place-items: center; border-radius: 50%; overflow: hidden; background: rgba(5,10,30,.5); border: 1px solid rgba(248,113,113,.28); }
.mem-specimen canvas { filter: grayscale(.45); }

.lineage-row { min-height: 58px; }
.lineage-specimen { width: 48px; height: 48px; flex: 0 0 48px; display: grid; place-items: center; overflow: hidden; border-radius: 50%; background: rgba(5,10,30,.55); }
.lineage-specimen canvas { transform: scale(.82); }
.lineage-copy { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.lineage-copy b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.replay-banner.boss-banner { aspect-ratio: 16 / 9; background-size: cover; }
.loadout-modal .modal-header-banner.boss-banner { aspect-ratio: 16 / 6; background-position: center 43%; }

.welcome-portrait {
  position: relative; width: 168px; height: 168px; margin: -4px auto 14px;
  border-radius: 50%; overflow: hidden; border: 1px solid rgba(147,197,253,.42);
  box-shadow: 0 0 30px rgba(96,165,250,.25);
}
.welcome-portrait img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 27%; }
.welcome-portrait span { position: absolute; right: 12px; bottom: 9px; font-size: 25px; filter: drop-shadow(0 0 8px #60a5fa); }
.coach-toast .coach-avatar { overflow: hidden; position: relative; }
.coach-toast .coach-avatar-icon { width: 100%; height: 100%; object-fit: cover; object-position: 50% 28%; filter: none; }
.coach-toast .coach-step-num { position: absolute; left: 6px; right: 6px; bottom: 5px; padding: 2px 0; border-radius: 999px; text-align: center; background: rgba(5,10,30,.78); }

/* Legacy concept-art had tiny generator marks in the outer corners. Keep the
   source masters intact, but use a small UI-safe crop wherever those cards
   are shown. New character/boss/reward art does not need this crop. */
.enc-biome-image,
.enc-arch-image,
.enc-mech-image,
.enc-ref-img,
.fac-card-img,
.enc-banner,
.climate-day-img,
.cm-img,
.cr-card-banner,
.lab-mod-image,
.modal-header-banner:not(.boss-banner),
.replay-banner:not(.boss-banner) {
  background-size: 105% auto;
  background-position: center;
}

@media (max-width: 700px) {
  .profile-hero { flex-wrap: wrap; }
  .profile-lead { order: 3; width: 100%; flex-direction: row; justify-content: center; }
  .reward-banner { height: 130px; }
  .welcome-portrait { width: 124px; height: 124px; }
  .disc-specimen { width: 52px; height: 52px; flex-basis: 52px; }
}
