@import url('/fonts/fonts.css');

:root {
  --font-display: 'Oswald', 'Arial Narrow', sans-serif;
  --font-body: 'Roboto', 'Segoe UI', sans-serif;

  --bg-0: #070910;
  --bg-1: #0c1220;
  --bg-2: #131d31;
  --panel: rgba(20, 31, 51, 0.78);
  --panel-strong: rgba(12, 20, 34, 0.9);
  --panel-border: rgba(122, 180, 255, 0.33);

  --text-main: #ecf3ff;
  --text-muted: #9fb3d3;
  --text-dim: #7d91b1;

  --brand-cyan: #61ddff;
  --brand-blue: #63a4ff;
  --brand-amber: #ffbe63;
  --brand-red: #ff6d84;
  --brand-green: #5ad69f;
  --lane-rise: #5ec8ff;
  --lane-fall: #d887ff;
  --lane-flux: #ffd874;

  --shadow-sm: 0 6px 14px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 12px 30px rgba(0, 0, 0, 0.34);
  --shadow-glow: 0 0 20px rgba(97, 221, 255, 0.2);

  --radius-s: 10px;
  --radius-m: 14px;
  --radius-l: 18px;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;

  --card-front-image: url('/v2/assets/cards/card-front.svg?v=20260421-lucide');
  --card-back-image: url('/v2/assets/cards/card-back.svg');
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
}

html {
  min-height: 100%;
  background-color: var(--bg-0);
}

body {
  position: relative;
  padding: 16px;
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--text-main);
  font-family: var(--font-body);
  background:
    radial-gradient(circle at 8% 8%, rgba(97, 221, 255, 0.18), transparent 36%),
    radial-gradient(circle at 92% 12%, rgba(99, 164, 255, 0.16), transparent 34%),
    radial-gradient(circle at 50% 100%, rgba(255, 190, 99, 0.12), transparent 42%),
    linear-gradient(180deg, var(--bg-2), var(--bg-0));
  background-attachment: fixed;
  overflow-x: hidden;
}

body::before,
body::after {
  content: '';
  position: fixed;
  pointer-events: none;
  z-index: -1;
}

body::before {
  inset: 0;
  background:
    linear-gradient(120deg, rgba(116, 168, 255, 0.06), transparent 40%),
    linear-gradient(300deg, rgba(98, 228, 255, 0.07), transparent 45%);
}

body::after {
  width: min(66vw, 760px);
  height: min(66vw, 760px);
  top: -18vw;
  right: -22vw;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(98, 164, 255, 0.12), rgba(98, 164, 255, 0));
}

h1,
h2,
.lane-name,
.label,
.room-code,
.ruleset-badge,
.btn,
.turn-banner,
.hero-tag,
.deck-count-pill {
  font-family: var(--font-display);
  letter-spacing: 0.06em;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  text-transform: uppercase;
  font-size: clamp(2.15rem, 4.9vw, 3.45rem);
  color: #f2f7ff;
  text-shadow: 0 0 24px rgba(97, 221, 255, 0.3);
}

h2 {
  text-transform: uppercase;
  font-size: 1rem;
  color: var(--brand-amber);
  margin-bottom: 10px;
}

label {
  display: block;
  margin: 8px 0 5px;
  color: var(--text-muted);
  font-size: 0.79rem;
  letter-spacing: 0.045em;
}

input,
select,
button {
  font: inherit;
}

input,
select {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(120, 171, 244, 0.38);
  border-radius: var(--radius-s);
  background: rgba(9, 14, 26, 0.88);
  color: var(--text-main);
  padding: 10px 12px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

input::placeholder {
  color: rgba(159, 179, 211, 0.72);
}

input:focus,
select:focus {
  outline: none;
  border-color: rgba(99, 164, 255, 0.8);
  box-shadow: 0 0 0 3px rgba(99, 164, 255, 0.16);
  background: rgba(11, 18, 32, 0.96);
}

.picker {
  --picker-cols: 2;
  width: 100%;
}

.picker-options {
  display: grid;
  grid-template-columns: repeat(var(--picker-cols), minmax(0, 1fr));
  gap: 6px;
  width: 100%;
  padding: 6px;
  border-radius: var(--radius-s);
  border: 1px solid rgba(120, 171, 244, 0.38);
  background: rgba(9, 14, 26, 0.88);
  box-shadow: inset 0 0 0 1px rgba(117, 167, 244, 0.08);
}

.picker-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 38px;
  border-radius: 9px;
  border: 1px solid rgba(109, 160, 236, 0.38);
  background: linear-gradient(180deg, rgba(28, 46, 76, 0.82), rgba(18, 31, 52, 0.86));
  color: #cfe7ff;
  font-family: var(--font-display);
  font-size: 0.88rem;
  letter-spacing: 0.045em;
  padding: 7px 8px;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.16s ease, filter 0.16s ease, box-shadow 0.16s ease;
}

.picker-option--centered {
  justify-content: center;
  text-align: center;
}

.picker-option-label {
  line-height: 1.1;
}

.picker-option:hover {
  filter: brightness(1.05);
  border-color: rgba(149, 202, 255, 0.6);
}

.picker-option:active {
  transform: translateY(1px);
}

.picker-option.active {
  border-color: rgba(97, 221, 255, 0.9);
  background: linear-gradient(135deg, rgba(69, 157, 255, 0.93), rgba(100, 229, 255, 0.95));
  color: #041322;
  box-shadow: 0 6px 14px rgba(72, 176, 255, 0.28), inset 0 0 0 1px rgba(222, 246, 255, 0.25);
}

.picker-option:focus-visible {
  outline: 2px solid rgba(255, 216, 148, 0.95);
  outline-offset: 1px;
}

.picker-info {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid rgba(151, 207, 255, 0.7);
  background: rgba(8, 15, 28, 0.72);
  color: #95d9ff;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.12s ease, filter 0.16s ease, border-color 0.16s ease, color 0.16s ease, background-color 0.16s ease;
}

.picker-info-mark {
  display: block;
  font-family: inherit;
  font-weight: 700;
  font-size: 13px;
  line-height: 1;
  letter-spacing: 0;
  color: inherit;
  pointer-events: none;
  transform: translateY(0.5px);
}

.picker-info:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
  border-color: rgba(255, 214, 141, 0.95);
  color: #ffe29a;
  background: rgba(30, 22, 10, 0.72);
}

.picker-info:focus-visible {
  outline: 2px solid rgba(255, 216, 148, 0.95);
  outline-offset: 1px;
}

.picker-option.active .picker-info {
  border-color: rgba(10, 47, 78, 0.75);
  background: rgba(2, 18, 33, 0.7);
  color: #d8f0ff;
}

.picker-option.active .picker-info:hover {
  border-color: rgba(255, 214, 141, 0.95);
  background: rgba(30, 22, 10, 0.72);
  color: #ffe29a;
}

.screen {
  display: none;
  width: min(1200px, 100%);
  margin: 0 auto;
  gap: var(--space-4);
}

.screen.active {
  display: flex;
  flex-direction: column;
}

.hero-wrap {
  text-align: center;
  padding: 10px 12px 2px;
}

.subtitle {
  margin-top: 6px;
  color: var(--brand-cyan);
  text-transform: uppercase;
  font-size: 0.94rem;
  letter-spacing: 0.11em;
}

.intro {
  max-width: 760px;
  margin: 10px auto 0;
  color: var(--text-muted);
  line-height: 1.45;
}

.menu-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
  align-items: start;
}

#menu-screen {
  padding-top: clamp(8px, 2vh, 22px);
}

#menu-screen .hero-wrap {
  margin-bottom: 8px;
}

#menu-screen .panel {
  display: flex;
  flex-direction: column;
}

/* ── Name-Row: anon single input / auth split (account + alias) ── */
.name-row { display: contents; }
.name-row-anon { display: contents; }
.name-row-anon[hidden] { display: none; }
.name-row-auth[hidden] { display: none; }
.name-row-auth { display: block; }

.name-row-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.name-row-account-wrap,
.name-row-alias-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.name-row-account {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid rgba(120, 171, 244, 0.22);
  background: rgba(10, 16, 30, 0.55);
  color: var(--text-muted);
  font-size: 0.95rem;
  font-family: var(--font-display);
  letter-spacing: 0.03em;
  cursor: default;
  user-select: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.name-row-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-body, sans-serif);
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  opacity: 0.7;
}

@media (max-width: 480px) {
  .name-row-split { grid-template-columns: 1fr; }
}

#menu-screen .panel .btn {
  margin-top: 12px;
  align-self: stretch;
  text-align: center;
  justify-content: center;
}

#menu-screen .public-list {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(122, 180, 255, 0.25);
  min-height: 28px;
}

#menu-screen .public-room .btn {
  margin-top: 0;
}

.panel {
  background: linear-gradient(180deg, rgba(19, 30, 49, 0.88), rgba(13, 20, 35, 0.92));
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-l);
  padding: var(--space-4);
  box-shadow: var(--shadow-md), inset 0 0 0 1px rgba(142, 191, 255, 0.14);
  backdrop-filter: blur(8px);
  isolation: isolate; /* contain z-index stacking — prevents deck card layers from painting over adjacent panels */
}

.panel > h2 {
  margin-bottom: var(--space-3);
}

#game-screen .panel > .relic-row + .hero-block,
#game-screen .panel > .compass-picker + .hero-block,
#game-screen .collapsible-content > .relic-row + .hero-block,
#game-screen .collapsible-content > .compass-picker + .hero-block {
  margin-top: var(--space-3);
}

#game-screen .panel > .relic-row + .compass-picker,
#game-screen .collapsible-content > .relic-row + .compass-picker {
  margin-top: var(--space-2);
}

#game-screen .panel > .missions + #ability-note,
#game-screen .panel > .inline-actions + #ability-note {
  margin-top: var(--space-2);
}

#game-screen .panel > .cards + .inline-actions,
#game-screen .panel > .cards + .action-row {
  margin-top: var(--space-3);
}

#game-screen .panel > .chat-box + .chat-input-row {
  margin-top: var(--space-2);
}

#game-screen .panel > .lane-hints {
  margin-top: var(--space-2);
}

.w-wide {
  width: 100%;
}

.center {
  text-align: center;
}

.btn {
  border: 1px solid transparent;
  border-radius: 11px;
  min-height: 42px;
  padding: 8px 12px;
  color: #f8fbff;
  text-transform: uppercase;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.12s ease, filter 0.18s ease, box-shadow 0.18s ease;
}

.btn:hover:not(:disabled) {
  transform: translateY(-1px);
  filter: brightness(1.06);
}

.btn:active:not(:disabled) {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(130deg, #3e8dff, #60d1ff);
  color: #03131f;
  box-shadow: 0 8px 18px rgba(80, 180, 255, 0.26);
}

.btn-success {
  background: linear-gradient(130deg, #2ba07d, #6ddfbb);
  color: #061810;
  box-shadow: 0 8px 18px rgba(74, 207, 157, 0.24);
}

.btn-secondary {
  background: linear-gradient(180deg, rgba(39, 58, 92, 0.95), rgba(25, 38, 64, 0.95));
  border-color: rgba(121, 170, 246, 0.45);
}

.btn-danger {
  background: linear-gradient(180deg, rgba(102, 34, 56, 0.95), rgba(73, 22, 40, 0.95));
  border-color: rgba(255, 117, 145, 0.52);
}

.btn-danger.ghost {
  background: rgba(73, 22, 40, 0.18);
}

.btn-accent {
  background: linear-gradient(130deg, #ffbe63, #ffe09f);
  color: #2f1e06;
  box-shadow: 0 8px 18px rgba(255, 188, 98, 0.24);
}

.inline-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.inline-actions.wrap {
  flex-wrap: wrap;
}

.inline-actions .picker {
  flex: 1 1 260px;
  min-width: 220px;
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-l);
  border: 1px solid rgba(125, 179, 255, 0.42);
  background: linear-gradient(120deg, rgba(15, 24, 41, 0.92), rgba(11, 17, 30, 0.94));
  box-shadow: var(--shadow-sm), inset 0 0 0 1px rgba(130, 186, 255, 0.08);
  flex-wrap: wrap;
}

/* Game-Screen Top-Bar: 3-Spalten-Grid für absolut mittig zentrierten Player-Strip */
#game-screen .top-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  flex-wrap: nowrap;
}

#game-screen .top-bar > :first-child { justify-self: start; min-width: 0; }
#game-screen .top-bar > .game-players { justify-self: center; }
#game-screen .top-bar > .stat-pills { justify-self: end; min-width: 0; }

/* Mitspieler-Strip in der Top-Bar — klein, kompakt */
.game-players {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  min-width: 0;
}

.gp-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 3px 10px 3px 3px;
  height: 32px;
  border-radius: 999px;
  border: 1.5px solid rgba(125, 179, 255, 0.42);
  background: rgba(10, 17, 30, 0.7);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
  max-width: 180px;
}

.gp-chip-avatar-wrap {
  position: relative;
  width: 26px;
  height: 26px;
  flex-shrink: 0;
}

.gp-chip .gp-name {
  font-size: 0.82rem;
  color: var(--text-main);
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
}

.gp-chip .gp-avatar {
  display: block;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  overflow: hidden;
  background: rgba(18, 26, 44, 0.92);
}

.gp-chip .gp-avatar svg {
  display: block;
  width: 100%;
  height: 100%;
}

.gp-chip .gp-avatar.avatar-fallback::after {
  content: attr(data-initial);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: var(--text-dim);
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.gp-chip .gp-hero {
  position: absolute;
  bottom: -3px;
  right: -3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(24, 36, 60, 0.98), rgba(14, 22, 40, 0.98));
  border: 1px solid rgba(130, 186, 255, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #cfe1ff;
}

.gp-chip .gp-hero [data-lucide],
.gp-chip .gp-hero svg {
  width: 9px;
  height: 9px;
}

.gp-chip.is-you {
  border-color: rgba(150, 200, 255, 0.75);
}

.gp-chip.is-offline {
  filter: grayscale(0.7);
  opacity: 0.55;
}

.gp-chip.is-current {
  border-color: rgba(255, 214, 141, 0.95);
  box-shadow:
    0 0 0 2px rgba(255, 214, 141, 0.18),
    0 0 14px rgba(255, 200, 110, 0.55);
  animation: gp-glow 1.8s ease-in-out infinite;
  transform: translateY(-1px);
}

.gp-chip.is-current .gp-hero {
  border-color: rgba(255, 214, 141, 0.95);
  color: #ffe29a;
}

@keyframes gp-glow {
  0%, 100% { box-shadow: 0 0 0 2px rgba(255, 214, 141, 0.18), 0 0 10px rgba(255, 200, 110, 0.45); }
  50%      { box-shadow: 0 0 0 2px rgba(255, 214, 141, 0.28), 0 0 18px rgba(255, 200, 110, 0.7); }
}

@media (max-width: 540px) {
  .game-players { gap: 6px; }
  .gp-chip { height: 28px; padding: 2px 8px 2px 2px; gap: 6px; max-width: 140px; }
  .gp-chip-avatar-wrap { width: 24px; height: 24px; }
  .gp-chip .gp-avatar { width: 24px; height: 24px; }
  .gp-chip .gp-name { font-size: 0.76rem; max-width: 88px; }
  .gp-chip .gp-hero { width: 12px; height: 12px; bottom: -2px; right: -2px; }
  .gp-chip .gp-hero [data-lucide],
  .gp-chip .gp-hero svg { width: 8px; height: 8px; }

  /* Schmale Screens: Grid fällt zurück auf wrap-flex (Player-Strip darunter) */
  #game-screen .top-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
  }
  #game-screen .top-bar > .game-players {
    order: 3;
    flex-basis: 100%;
    justify-content: center;
  }
}

.label {
  color: var(--text-dim);
  text-transform: uppercase;
  font-size: 0.77rem;
}

.small {
  color: var(--text-muted);
  font-size: 0.86rem;
}

.small.right {
  text-align: right;
}

.stat-pills {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
  justify-content: flex-end;
}

.stat-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 6px var(--space-3);
  border-radius: 999px;
  border: 1px solid rgba(125, 179, 255, 0.42);
  background: rgba(10, 17, 30, 0.78);
  color: var(--text-main);
  font-family: var(--font-display);
  font-size: 0.84rem;
  letter-spacing: 0.06em;
  line-height: 1;
}

.stat-pill-label {
  color: var(--text-dim);
  font-size: 0.72rem;
  text-transform: uppercase;
}

.stat-pill-value {
  color: #ecf4ff;
  font-size: 0.96rem;
}

.stat-pill--aether {
  border-color: rgba(255, 196, 103, 0.55);
  background: rgba(42, 28, 12, 0.62);
}

.stat-pill--aether .stat-pill-label {
  color: #ffd898;
}

.stat-pill--aether .stat-pill-value {
  color: #ffe7be;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
  justify-content: space-between;
  position: relative; /* ensure action-row paints above positioned .card siblings */
}

.action-row-primary,
.action-row-danger {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
}

.action-row-danger {
  justify-content: flex-end;
}

.room-code {
  margin-top: 2px;
  color: var(--brand-amber);
  font-size: clamp(1.5rem, 3.8vw, 2rem);
  line-height: 1;
}

.ruleset-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 999px;
  border: 1px solid rgba(132, 186, 255, 0.62);
  background: rgba(17, 28, 47, 0.88);
  color: #9fd0ff;
  font-size: 0.76rem;
  padding: 5px 12px 5px 8px;
  text-transform: uppercase;
  line-height: 1;
}

.public-list {
  margin-top: 12px;
  display: grid;
  gap: 9px;
}

.public-room {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid rgba(121, 170, 246, 0.4);
  border-radius: 12px;
  padding: 10px;
  background: rgba(13, 21, 36, 0.76);
  box-shadow: inset 0 0 0 1px rgba(113, 163, 236, 0.12);
}

.public-room strong {
  color: #dbf0ff;
}

.error {
  min-height: 1.2em;
  text-align: center;
  color: #ff8fa5;
}

.v1-crosslink {
  display: flex;
  justify-content: center;
  margin-top: var(--space-4);
}

.v1-crosslink .v1-crosslink-btn {
  min-width: 220px;
  letter-spacing: 0.08em;
}

.v2-credit {
  margin-top: var(--space-3);
  margin-bottom: var(--space-3);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  opacity: 0.75;
}
.v2-credit a {
  color: var(--text-muted);
  text-decoration: none;
  border-bottom: 1px dashed rgba(120, 171, 244, 0.35);
  transition: color 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
  padding-bottom: 1px;
}
.v2-credit a:hover,
.v2-credit a:focus-visible {
  color: var(--text-main);
  border-bottom-color: rgba(120, 171, 244, 0.9);
  opacity: 1;
  outline: none;
}

/* ── Feedback-Panel ───────────────────────────────────────── */
.feedback-panel {
  margin-top: var(--space-5);
  padding: var(--space-4);
  border: 1px solid rgba(120, 171, 244, 0.28);
  border-radius: var(--radius-m);
  background: linear-gradient(180deg, rgba(14, 22, 40, 0.82), rgba(9, 14, 26, 0.88));
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.feedback-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-2);
}
.feedback-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 1.05rem;
  color: var(--text-main);
}
.feedback-title .lucide,
.feedback-title [data-lucide] {
  width: 18px;
  height: 18px;
  opacity: 0.85;
}
.feedback-counter {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(120, 171, 244, 0.4);
  background: rgba(30, 48, 82, 0.6);
  color: var(--text-main);
  min-width: 36px;
  text-align: center;
}
.feedback-hint {
  margin: 0 0 var(--space-3);
  color: var(--text-muted);
  font-size: 0.9rem;
}
.feedback-identity {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-bottom: var(--space-2);
}
.feedback-name {
  flex: 1 1 180px;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid rgba(120, 171, 244, 0.38);
  border-radius: var(--radius-s);
  background: rgba(9, 14, 26, 0.88);
  color: var(--text-main);
  font: inherit;
}
.feedback-name:focus {
  outline: none;
  border-color: rgba(120, 171, 244, 0.85);
  box-shadow: 0 0 0 3px rgba(120, 171, 244, 0.18);
}
.feedback-name:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.feedback-anon {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.88rem;
  user-select: none;
  cursor: pointer;
}
.feedback-anon input {
  accent-color: rgba(120, 171, 244, 0.85);
  cursor: pointer;
}
.feedback-textarea {
  width: 100%;
  min-height: 84px;
  resize: vertical;
  font: inherit;
  border: 1px solid rgba(120, 171, 244, 0.38);
  border-radius: var(--radius-s);
  background: rgba(9, 14, 26, 0.88);
  color: var(--text-main);
  padding: 10px 12px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.feedback-textarea:focus {
  outline: none;
  border-color: rgba(120, 171, 244, 0.85);
  box-shadow: 0 0 0 3px rgba(120, 171, 244, 0.18);
}
.feedback-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-top: var(--space-2);
}
.feedback-charcount {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.feedback-msg {
  min-height: 1.2em;
  margin: var(--space-2) 0 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}
.feedback-msg.is-ok { color: #7fe0a7; }
.feedback-msg.is-err { color: #ff8383; }

.player-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
  border: 1px solid rgba(121, 170, 246, 0.34);
  border-radius: 11px;
  padding: 8px 10px;
  background: rgba(13, 21, 36, 0.74);
}

.player-main {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-tag {
  border-radius: 999px;
  border: 1px solid rgba(131, 189, 255, 0.45);
  color: #bce1ff;
  background: rgba(15, 31, 54, 0.75);
  font-size: 0.73rem;
  padding: 2px 8px;
  text-transform: uppercase;
}

/* ═══════════════════════════════════════════════
   LUCIDE ICONS — Base sizing + alignment defaults
   ═══════════════════════════════════════════════ */

.lucide {
  display: inline-block;
  width: 18px;
  height: 18px;
  stroke-width: 2;
  vertical-align: middle;
  flex-shrink: 0;
  pointer-events: none;
}

/* Kontext-spezifische Größen & Farben */

/* Picker-Info-Icon (überschreibt altes "i"-Text-Styling) */
.picker-info .lucide {
  width: 14px;
  height: 14px;
  stroke-width: 2.2;
}

/* Hero-Card-Info (rechts am Card-Rand) */
.hero-card-info .lucide {
  width: 13px;
  height: 13px;
  stroke-width: 2.4;
}

/* Hero-Card-Glyph: großes Hero-Icon links */
.hero-card-glyph .lucide {
  width: 24px;
  height: 24px;
  stroke-width: 1.8;
  color: var(--hero-accent);
  filter: drop-shadow(0 0 4px color-mix(in srgb, var(--hero-accent) 45%, transparent));
}

/* Player-Chip-Glyph (selbe Größe/Farbe wie Hero-Card) */
.lobby-chip-avatar > .lucide.lobby-chip-glyph {
  width: 26px;
  height: 26px;
  stroke-width: 1.75;
  color: var(--chip-accent);
  filter: drop-shadow(0 0 5px color-mix(in srgb, var(--chip-accent) 50%, transparent));
}

/* Empty-Slot-Avatar (Plus-Icon) */
.lobby-chip-avatar.is-empty .lucide {
  width: 22px;
  height: 22px;
  stroke-width: 2;
  color: rgba(159, 179, 211, 0.65);
}

/* Player-Count im Top-Bar */
.lobby-player-count .lucide.lobby-player-count-icon {
  width: 16px;
  height: 16px;
  stroke-width: 2;
  color: #ffd994;
  filter: drop-shadow(0 0 6px rgba(255, 217, 148, 0.55));
}

/* Ruleset-Badge Icon */
.ruleset-badge .lucide {
  width: 13px;
  height: 13px;
  stroke-width: 2.2;
  margin-right: 4px;
  color: #9fd0ff;
}

/* Chip-Badges (Du/Host) */
.chip-badge .lucide {
  width: 11px;
  height: 11px;
  stroke-width: 2.5;
  margin-right: 3px;
}

/* Start-Button Icon */
.lobby-start-btn .lucide.lobby-start-glyph {
  width: 18px;
  height: 18px;
  stroke-width: 2.2;
  filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.6));
}

/* Waiting-Host-Icon (groß + leicht pulsierend) */
.lobby-waiting-host > .lucide.lobby-waiting-host-icon {
  width: 32px;
  height: 32px;
  stroke-width: 1.8;
  color: var(--text-muted);
  flex-shrink: 0;
  opacity: 0.85;
  animation: waitingHostPulse 2.4s ease-in-out infinite;
}

@keyframes waitingHostPulse {
  0%, 100% { opacity: 0.7; transform: rotate(0deg); }
  50%      { opacity: 1;   transform: rotate(10deg); }
}

/* V1-Crosslink Icon */
.v1-crosslink-btn .lucide {
  width: 16px;
  height: 16px;
  stroke-width: 2.2;
  margin-right: 6px;
}

.v1-crosslink-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ═══════════════════════════════════════════════
   LOBBY REDESIGN (v2)
   ═══════════════════════════════════════════════ */

.lobby-top-bar {
  align-items: center;
}

.lobby-top-meta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.lobby-player-count {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 6px var(--space-3);
  border-radius: 999px;
  border: 1px solid rgba(255, 196, 103, 0.4);
  background: linear-gradient(180deg, rgba(44, 34, 18, 0.55), rgba(22, 17, 10, 0.6));
  font-family: var(--font-display);
  letter-spacing: 0.06em;
  color: #ffe7be;
  font-size: 0.92rem;
  line-height: 1;
}

.lobby-player-count-icon {
  color: #ffd994;
  font-size: 0.82rem;
  filter: drop-shadow(0 0 6px rgba(255, 217, 148, 0.6));
}

.lobby-player-count-sep {
  color: rgba(255, 231, 190, 0.5);
  margin: 0 2px;
}

.lobby-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.lobby-section-head h2 {
  margin: 0;
}

.lobby-section-hint {
  font-family: var(--font-display);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.lobby-section-hint.is-ready {
  color: var(--brand-green);
  text-shadow: 0 0 8px rgba(90, 214, 159, 0.4);
}

/* ── Player Chips ── */

.lobby-players {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--space-3);
}

.lobby-chip {
  --chip-accent: var(--brand-cyan);
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  border-radius: 14px;
  border: 1px solid rgba(121, 170, 246, 0.38);
  background:
    linear-gradient(135deg, rgba(20, 31, 52, 0.9), rgba(12, 19, 34, 0.95));
  box-shadow:
    inset 0 0 0 1px rgba(142, 191, 255, 0.08),
    0 6px 14px rgba(0, 0, 0, 0.2);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  overflow: hidden;
}

.lobby-chip::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--chip-accent) 0%, transparent 55%);
  opacity: 0.08;
  transition: opacity 0.2s ease;
}

.lobby-chip:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--chip-accent) 70%, transparent);
  box-shadow:
    inset 0 0 0 1px rgba(142, 191, 255, 0.14),
    0 10px 20px rgba(0, 0, 0, 0.28),
    0 0 18px color-mix(in srgb, var(--chip-accent) 18%, transparent);
}

.lobby-chip[data-hero="seer"]      { --chip-accent: #61ddff; }
.lobby-chip[data-hero="smith"]     { --chip-accent: #ffbe63; }
.lobby-chip[data-hero="guardian"]  { --chip-accent: #5ad69f; }
.lobby-chip[data-hero="trickster"] { --chip-accent: #d887ff; }

.lobby-chip-avatar {
  position: relative;
  width: 50px;
  height: 50px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1.5px solid color-mix(in srgb, var(--chip-accent) 70%, transparent);
  background:
    radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--chip-accent) 32%, transparent), transparent 65%),
    linear-gradient(180deg, rgba(14, 22, 38, 0.95), rgba(8, 13, 24, 0.98));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04), 0 0 12px color-mix(in srgb, var(--chip-accent) 18%, transparent);
}

.lobby-chip-avatar.is-empty {
  border-style: dashed;
  border-color: rgba(125, 145, 177, 0.45);
  background: rgba(8, 13, 24, 0.6);
  color: var(--text-dim);
  box-shadow: none;
}

.lobby-chip-avatar.is-empty span {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 300;
  opacity: 0.65;
}

/* .lobby-chip-glyph selector is now on <i data-lucide="..."> element;
   Lucide-spezifische Sizes oben in .lobby-chip-avatar > .lucide.lobby-chip-glyph */

.lobby-chip-status {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--brand-green);
  border: 2px solid #0a1020;
  box-shadow: 0 0 8px rgba(90, 214, 159, 0.6);
}

.lobby-chip.is-offline .lobby-chip-status {
  background: var(--brand-red);
  box-shadow: 0 0 8px rgba(255, 109, 132, 0.6);
}

.lobby-chip.is-offline {
  opacity: 0.55;
}

.lobby-chip-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.lobby-chip-name {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.lobby-chip-name strong {
  color: #f2f7ff;
  font-size: 0.98rem;
  overflow-wrap: anywhere;
}

.lobby-chip-name-empty {
  color: var(--text-dim);
  font-family: var(--font-display);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.86rem;
}

.chip-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1.4;
}

.chip-badge-you {
  background: rgba(97, 221, 255, 0.18);
  border: 1px solid rgba(97, 221, 255, 0.5);
  color: #9de7ff;
}

.chip-badge-host {
  background: rgba(255, 190, 99, 0.18);
  border: 1px solid rgba(255, 190, 99, 0.5);
  color: #ffd994;
}

.lobby-chip-hero {
  color: var(--text-muted);
  font-size: 0.83rem;
  line-height: 1.3;
}

.lobby-chip-hero-hint {
  color: var(--text-dim);
}

.lobby-chip-online {
  display: none;
}

.lobby-chip-empty::before {
  opacity: 0;
}

.lobby-chip-empty {
  border-style: dashed;
  border-color: rgba(125, 145, 177, 0.3);
  background: linear-gradient(135deg, rgba(14, 22, 38, 0.55), rgba(10, 16, 28, 0.7));
  box-shadow: none;
}

.lobby-chip-empty:hover {
  transform: none;
  border-color: rgba(125, 145, 177, 0.4);
  box-shadow: none;
}

/* ── Hero Card Grid ── */

.hero-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: var(--space-3);
}

button.hero-card {
  --hero-accent: #61ddff;
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  min-height: 72px;
  border-radius: 14px;
  border: 1px solid rgba(121, 170, 246, 0.32);
  background-color: #0c1422;
  background-image: linear-gradient(135deg, rgba(20, 31, 52, 0.92), rgba(12, 19, 34, 0.96));
  color: #ecf3ff;
  font-family: var(--font-body);
  font-size: 1rem;
  text-transform: none;
  letter-spacing: normal;
  cursor: pointer;
  transition:
    transform 0.16s ease,
    border-color 0.18s ease,
    box-shadow 0.22s ease,
    background-color 0.22s ease;
  text-align: left;
  overflow: hidden;
  -webkit-appearance: none;
  appearance: none;
}

.hero-card::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--hero-accent) 0%, transparent 50%);
  opacity: 0.08;
  transition: opacity 0.22s ease;
}

.hero-card[data-hero-choice="seer"]      { --hero-accent: #61ddff; }
.hero-card[data-hero-choice="smith"]     { --hero-accent: #ffbe63; }
.hero-card[data-hero-choice="guardian"]  { --hero-accent: #5ad69f; }
.hero-card[data-hero-choice="trickster"] { --hero-accent: #d887ff; }

.hero-card:hover:not(.is-active) {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--hero-accent) 60%, transparent);
  box-shadow:
    0 10px 22px rgba(0, 0, 0, 0.3),
    0 0 20px color-mix(in srgb, var(--hero-accent) 22%, transparent);
}

.hero-card:hover::before {
  opacity: 0.14;
}

.hero-card.is-active {
  border-color: var(--hero-accent);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--hero-accent) 22%, rgba(20, 31, 52, 0.92)), rgba(12, 19, 34, 0.95));
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--hero-accent) 35%, transparent),
    0 0 22px color-mix(in srgb, var(--hero-accent) 28%, transparent);
}

.hero-card.is-active::before {
  opacity: 0.22;
}

.hero-card-glyph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  flex-shrink: 0;
  color: var(--hero-accent);
  background:
    radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--hero-accent) 30%, transparent), transparent 68%),
    rgba(8, 13, 24, 0.75);
  border: 1px solid color-mix(in srgb, var(--hero-accent) 45%, transparent);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.hero-card-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hero-card-name {
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.06em;
  color: #f2f7ff;
}

.hero-card-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.3;
}

.hero-card-info {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  border: 1px solid rgba(151, 207, 255, 0.55);
  background: rgba(8, 15, 28, 0.6);
  color: #95d9ff;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.14s ease, filter 0.14s ease, border-color 0.14s ease, color 0.14s ease;
  flex-shrink: 0;
}

.hero-card-info:hover {
  transform: translateY(-1px) scale(1.08);
  filter: brightness(1.1);
  border-color: rgba(255, 214, 141, 0.8);
  color: #ffe29a;
}

/* ── Host CTA / Start button ── */

.lobby-settings-panel label {
  margin-top: var(--space-3);
}

.lobby-cta {
  margin-top: var(--space-4);
  padding: var(--space-4);
  border-radius: 14px;
  border: 1px solid rgba(62, 141, 255, 0.4);
  background:
    radial-gradient(circle at 50% 0%, rgba(97, 221, 255, 0.14), transparent 70%),
    linear-gradient(180deg, rgba(18, 32, 58, 0.85), rgba(10, 18, 32, 0.92));
  text-align: center;
}

.lobby-start-btn {
  width: 100%;
  padding: 16px var(--space-4);
  min-height: 56px;
  font-size: 1rem;
  letter-spacing: 0.14em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  background: linear-gradient(135deg, #3e8dff, #60d1ff);
  box-shadow:
    0 10px 26px rgba(80, 180, 255, 0.32),
    inset 0 0 0 1px rgba(222, 246, 255, 0.22);
  position: relative;
  overflow: hidden;
}

.lobby-start-btn::after {
  content: '';
  position: absolute;
  inset: -40% -20%;
  background: linear-gradient(120deg, transparent 40%, rgba(255, 255, 255, 0.22) 50%, transparent 60%);
  animation: btnSheen 4s ease-in-out infinite;
  pointer-events: none;
}

@keyframes btnSheen {
  0%, 70%, 100% { transform: translateX(-100%); opacity: 0; }
  85% { opacity: 1; }
  95% { transform: translateX(100%); opacity: 0.2; }
}

/* .lobby-start-glyph Lucide-Version siehe oberer Lucide-Block */

.lobby-start-btn.is-full {
  animation: lobbyReadyPulse 1.8s ease-in-out infinite;
}

@keyframes lobbyReadyPulse {
  0%, 100% { box-shadow: 0 10px 26px rgba(80, 180, 255, 0.32), inset 0 0 0 1px rgba(222, 246, 255, 0.22); }
  50%      { box-shadow: 0 10px 28px rgba(80, 180, 255, 0.5), 0 0 28px rgba(97, 221, 255, 0.5), inset 0 0 0 1px rgba(222, 246, 255, 0.4); }
}

.lobby-cta-hint {
  margin-top: var(--space-2);
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
}

/* Host-only settings: picker appearance tweak */
.lobby-settings-panel .picker-options {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

/* Non-Host: warte-auf-host Block */

.lobby-waiting-host {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  border-radius: 14px;
  border: 1px dashed rgba(125, 145, 177, 0.4);
  background: linear-gradient(180deg, rgba(18, 28, 46, 0.55), rgba(10, 16, 28, 0.7));
}

/* .lobby-waiting-host-icon Größe/Animation ist jetzt oben im Lucide-Block gesetzt */

.lobby-waiting-host-text strong {
  color: #f2f7ff;
  font-family: var(--font-display);
  letter-spacing: 0.05em;
}

/* Ghost button style for leave */

.btn.btn-ghost {
  background-color: rgba(13, 21, 36, 0.8);
  background-image: linear-gradient(180deg, rgba(22, 33, 54, 0.85), rgba(12, 19, 34, 0.9));
  border: 1px solid rgba(125, 145, 177, 0.45);
  color: #c9d6ea;
}

.btn.btn-ghost:hover:not(:disabled) {
  border-color: rgba(180, 206, 255, 0.7);
  color: #ecf3ff;
  background-image: linear-gradient(180deg, rgba(30, 46, 74, 0.9), rgba(16, 24, 40, 0.92));
}

.lobby-leave-row {
  display: flex;
  justify-content: center;
  margin-top: var(--space-2);
}

.lobby-leave-row .btn-ghost {
  min-width: 220px;
}

/* Mobile stack */

@media (max-width: 720px) {
  .lobby-top-bar {
    flex-direction: column;
    align-items: flex-start;
  }
  .lobby-top-meta {
    width: 100%;
    justify-content: space-between;
  }
  .lobby-players {
    grid-template-columns: 1fr;
  }
  .hero-card-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .lobby-leave-row .btn-ghost {
    min-width: 0;
    width: 100%;
  }
}

.turn-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  border-radius: var(--radius-m);
  border: 1px solid rgba(124, 187, 255, 0.45);
  background: linear-gradient(120deg, rgba(35, 71, 114, 0.58), rgba(19, 38, 66, 0.72));
  color: #dbf0ff;
  font-size: 1rem;
  text-transform: uppercase;
  padding: var(--space-3) var(--space-4);
  box-shadow: inset 0 0 0 1px rgba(155, 211, 255, 0.12);
}

.turn-banner .turn-progress {
  font-size: 0.84rem;
  color: #bcdcff;
  letter-spacing: 0.08em;
  font-family: var(--font-display);
  white-space: nowrap;
}

.turn-banner.your-turn .turn-progress {
  color: #ffe7be;
}

.turn-banner.your-turn {
  border-color: rgba(255, 190, 99, 0.7);
  background: linear-gradient(120deg, rgba(114, 83, 33, 0.54), rgba(57, 44, 23, 0.7));
  color: #ffe7be;
  animation: turnPulse 1.4s ease-in-out infinite;
}

@keyframes turnPulse {
  0%,
  100% {
    box-shadow: inset 0 0 0 1px rgba(255, 218, 153, 0.12), 0 0 0 rgba(255, 190, 99, 0);
  }
  50% {
    box-shadow: inset 0 0 0 1px rgba(255, 218, 153, 0.25), 0 0 24px rgba(255, 190, 99, 0.18);
  }
}

.deck-stage {
  display: flex;
  justify-content: center;
  margin: var(--space-3) 0 var(--space-5);
  padding-bottom: var(--space-2);
}

.deck-stack {
  position: relative;
  width: 108px;
  height: 150px;
  filter: drop-shadow(0 14px 16px rgba(0, 0, 0, 0.35));
}

.deck-back {
  position: absolute;
  inset: 0;
  border-radius: 14px;
  border: 1px solid rgba(126, 181, 255, 0.56);
  background:
    linear-gradient(160deg, rgba(162, 214, 255, 0.16), rgba(108, 211, 255, 0.08)),
    var(--card-back-image) center / cover no-repeat;
  box-shadow: inset 0 0 0 1px rgba(156, 205, 255, 0.2);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.deck-back.layer-0 { transform: translate(0, 0); z-index: 4; }
.deck-back.layer-1 { transform: translate(-4px, 4px); z-index: 3; }
.deck-back.layer-2 { transform: translate(-8px, 8px); z-index: 2; }
.deck-back.layer-3 { transform: translate(-12px, 12px); z-index: 1; }

.deck-stack.depth-0 .layer-1,
.deck-stack.depth-0 .layer-2,
.deck-stack.depth-0 .layer-3,
.deck-stack.depth-1 .layer-2,
.deck-stack.depth-1 .layer-3,
.deck-stack.depth-2 .layer-3 {
  opacity: 0;
}

.deck-count-pill {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 6;
  min-width: 48px;
  border-radius: 999px;
  border: 1px solid rgba(255, 196, 103, 0.9);
  background: rgba(10, 17, 30, 0.96);
  color: #ffd994;
  text-align: center;
  font-size: 1.1rem;
  padding: 6px 12px 5px;
  line-height: 1;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

.board-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.lane {
  position: relative;
  min-height: 122px;
  border-radius: 13px;
  border: 1px solid rgba(120, 175, 248, 0.42);
  background: linear-gradient(180deg, rgba(16, 27, 44, 0.86), rgba(10, 18, 30, 0.92));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  padding: var(--space-2);
  cursor: default;
  transition: border-color 0.14s ease, transform 0.14s ease, box-shadow 0.14s ease;
}

.lane::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 13px;
  pointer-events: none;
  opacity: 0.6;
  box-shadow: inset 0 0 0 1px currentColor;
  color: transparent;
}

.lane.rise { color: var(--lane-rise); }
.lane.fall { color: var(--lane-fall); }
.lane.flux { color: var(--lane-flux); }

.lane.rise::before { color: rgba(94, 200, 255, 0.32); }
.lane.fall::before { color: rgba(216, 135, 255, 0.28); }
.lane.flux::before { color: rgba(255, 216, 116, 0.26); }

.lane.selectable {
  cursor: pointer;
}

.lane.selectable:hover {
  border-color: rgba(135, 195, 255, 0.8);
  transform: translateY(-1px);
}

.lane.valid {
  border-color: rgba(90, 214, 159, 0.95);
  box-shadow: 0 0 0 1px rgba(90, 214, 159, 0.35), 0 0 16px rgba(90, 214, 159, 0.22);
}

.lane-name {
  color: var(--text-muted);
  font-size: 0.77rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.92;
}

.lane.rise .lane-name { color: color-mix(in srgb, var(--lane-rise) 78%, var(--text-muted) 22%); }
.lane.fall .lane-name { color: color-mix(in srgb, var(--lane-fall) 70%, var(--text-muted) 30%); }
.lane.flux .lane-name { color: color-mix(in srgb, var(--lane-flux) 78%, var(--text-muted) 22%); }

.lane-value {
  line-height: 1;
  font-size: clamp(1.95rem, 2.6vw, 2.2rem);
  font-weight: 700;
}

.lane.rise .lane-value { color: var(--lane-rise); }
.lane.fall .lane-value { color: var(--lane-fall); }
.lane.flux .lane-value { color: var(--lane-flux); }

.lane-hints {
  color: var(--text-dim);
  font-size: 0.83rem;
}

/* Collapsible panel pattern (used by Missionen — extensible to other panels) */
.collapsible-panel {
  overflow: hidden;
}

.collapsible-head {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  width: 100%;
  padding: 0;
  margin: 0 0 var(--space-3);
  background: transparent;
  border: none;
  cursor: pointer;
  color: inherit;
  font: inherit;
  text-align: left;
  -webkit-appearance: none;
  appearance: none;
  border-radius: 6px;
  transition: background-color 0.18s ease;
}

.collapsible-head:hover {
  background-color: rgba(122, 180, 255, 0.04);
}

.collapsible-head:focus-visible {
  outline: 2px solid rgba(255, 216, 148, 0.95);
  outline-offset: 2px;
}

.collapsible-head h2 {
  margin: 0;
  flex: 0 0 auto;
}

.collapsible-summary {
  flex: 1;
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  text-transform: uppercase;
  text-align: right;
  margin-right: var(--space-2);
  transition: color 0.2s ease;
}

.collapsible-summary.is-complete {
  color: var(--brand-green);
  text-shadow: 0 0 8px rgba(90, 214, 159, 0.35);
}

.collapsible-chevron.lucide {
  width: 20px;
  height: 20px;
  stroke-width: 2.2;
  color: var(--text-muted);
  flex: 0 0 auto;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), color 0.18s ease;
}

.collapsible-head:hover .collapsible-chevron {
  color: var(--brand-cyan);
}

.collapsible-panel.is-collapsed .collapsible-chevron {
  transform: rotate(-90deg);
}

.collapsible-content {
  overflow: hidden;
  max-height: 2000px;
  opacity: 1;
  transition:
    max-height 0.38s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.25s ease-out;
}

.collapsible-panel.is-collapsed .collapsible-content {
  max-height: 0;
  opacity: 0;
  pointer-events: none;
}

/* Aether-Budget-Pille im Relikte-Panel-Header (rechts neben dem Titel,
   vor dem Chevron). Zeigt auf einen Blick, wieviel Aether das Team hat. */
.collapsible-head .relics-aether-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  margin-right: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 200, 120, 0.35);
  background: rgba(60, 40, 14, 0.42);
  color: #ffe7be;
  font-size: 0.78rem;
  font-family: var(--font-display);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1;
}
.relics-aether-label { color: rgba(255, 231, 190, 0.7); }
.relics-aether-value { font-weight: 700; }
.relics-aether-pill .aether-glyph { color: #ffd57a; }

.collapsible-panel.is-collapsed .collapsible-head {
  margin-bottom: 0;
}

.missions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3);
}

.mission {
  position: relative;
  border-radius: 11px;
  border: 1px solid rgba(120, 175, 248, 0.36);
  background: rgba(10, 18, 30, 0.76);
  padding: var(--space-3);
  font-size: 0.84rem;
  line-height: 1.38;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.mission strong {
  display: block;
  color: #dff2ff;
  font-size: 0.92rem;
}

.mission-desc {
  color: var(--text-muted);
  flex: 1;
}

.mission-progress {
  margin-top: var(--space-1);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.mission-bar {
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: rgba(20, 32, 56, 0.85);
  overflow: hidden;
}

.mission-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, rgba(97, 221, 255, 0.85), rgba(99, 164, 255, 0.9));
  transition: width 0.28s ease;
}

.mission-count {
  color: var(--text-dim);
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  min-width: 36px;
  text-align: right;
}

.mission.done {
  border-color: rgba(90, 214, 159, 0.7);
  background: linear-gradient(180deg, rgba(29, 66, 57, 0.55), rgba(13, 31, 28, 0.72));
}

.mission.done .mission-bar-fill {
  background: linear-gradient(90deg, rgba(90, 214, 159, 0.95), rgba(153, 236, 196, 0.95));
}

.mission.done .mission-count {
  color: #b5ecd0;
}

.relic-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-2);
}

.relic-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 10px var(--space-2);
  min-height: 52px;
  text-align: center;
}

.relic-btn .relic-name {
  font-size: 0.86rem;
  letter-spacing: 0.06em;
}

.relic-btn .relic-cost {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.74rem;
  font-family: var(--font-display);
  letter-spacing: 0.08em;
  color: #ffd994;
  opacity: 0.92;
}

/* Affordable-Indikator: Wenn das Team genug Aether hat, wird die Cost-
   Anzeige hervorgehoben — leichter Glow + sattere Farbe. So erkennt der
   Spieler auf einen Blick welche Relikte gerade kaufbar sind. */
.relic-btn.relic-affordable .relic-cost {
  color: #fff2c4;
  opacity: 1;
  text-shadow: 0 0 8px rgba(255, 200, 100, 0.55);
}
.relic-btn.relic-affordable {
  border-color: rgba(255, 195, 110, 0.55);
  box-shadow: 0 0 0 1px rgba(255, 195, 110, 0.18) inset, 0 4px 12px rgba(255, 160, 60, 0.18);
}

.relic-btn .aether-glyph {
  font-size: 0.82rem;
  line-height: 1;
}

.compass-picker {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  padding: var(--space-3);
  border: 1px dashed rgba(130, 186, 255, 0.42);
  border-radius: 12px;
  background: rgba(10, 17, 30, 0.76);
}
.compass-picker[hidden] { display: none; }

.compass-picker .compass-label {
  flex-basis: 100%;
  color: var(--text-muted);
  font-size: 0.84rem;
}

.compass-picker .btn {
  flex: 1 1 120px;
  min-height: 38px;
  padding: 6px var(--space-3);
  font-size: 0.85rem;
}

.hero-block {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-3);
  border-radius: 13px;
  border: 1px solid rgba(255, 190, 99, 0.32);
  background: linear-gradient(180deg, rgba(44, 34, 18, 0.42), rgba(22, 17, 10, 0.5));
}

.hero-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2);
}

.hero-head-label {
  color: var(--text-dim);
  text-transform: uppercase;
  font-size: 0.74rem;
  letter-spacing: 0.11em;
  font-family: var(--font-display);
}

.hero-head-name {
  color: #ffe7be;
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero-block .btn {
  align-self: flex-start;
}

/* ── Seher-Blick (Deck-Oberseite nach Aktivierung) ──────────────── */
.hero-peek {
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(128, 196, 255, 0.42);
  background: linear-gradient(180deg, rgba(22, 42, 70, 0.55), rgba(14, 28, 48, 0.62));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04), 0 6px 14px rgba(40, 100, 180, 0.18);
  animation: hero-peek-reveal 0.32s ease-out;
}
.hero-peek[hidden] { display: none; }
.hero-peek-label {
  color: #a8d8ff;
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  font-family: var(--font-display);
  margin-bottom: 8px;
}
.hero-peek-cards {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.hero-peek-card {
  min-width: 42px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(168, 216, 255, 0.52);
  background: linear-gradient(180deg, rgba(30, 58, 92, 0.88), rgba(14, 28, 48, 0.92));
  color: #ecf6ff;
  font-weight: 700;
  font-size: 1.1rem;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.28);
  position: relative;
}
.hero-peek-card-order {
  display: block;
  font-size: 0.62rem;
  color: #89b8e5;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 2px;
}
.hero-peek-hint {
  margin-top: 8px;
  font-size: 0.75rem;
  color: #8aaccf;
  font-style: italic;
}

@keyframes hero-peek-reveal {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-peek { animation: none; }
}

.cards {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: flex-start;
  justify-content: center;
  min-height: 112px;
}

.card {
  width: 76px;
  height: 112px;
  border: 0;
  border-radius: 13px;
  background: transparent;
  padding: 0;
  position: relative;
  cursor: pointer;
  transition: transform 0.12s ease;
}

.card:focus-visible {
  outline: 2px solid rgba(255, 216, 148, 0.95);
  outline-offset: 3px;
}

.card-face {
  position: absolute;
  inset: 0;
  border-radius: 13px;
  border: 1px solid rgba(128, 184, 255, 0.7);
  background:
    radial-gradient(circle at 50% 24%, rgba(96, 221, 255, 0.2), transparent 42%),
    radial-gradient(circle at 50% 78%, rgba(255, 190, 99, 0.12), transparent 36%),
    var(--card-front-image) center / cover no-repeat;
  box-shadow: inset 0 0 0 1px rgba(144, 198, 255, 0.2), 0 8px 16px rgba(0, 0, 0, 0.34);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* .card-glyph wurde entfernt — Nummer ist jetzt der einzige zentrale Fokus. */
.card-glyph { display: none; }

.card-value {
  font-family: var(--font-display);
  font-size: 2.1rem;
  line-height: 1;
  font-weight: 700;
  color: #f7faff;
  letter-spacing: 0.02em;
  text-shadow:
    0 0 14px rgba(97, 221, 255, 0.45),
    0 0 6px rgba(255, 220, 150, 0.22),
    0 1px 0 rgba(255, 255, 255, 0.08);
}

.card-corner {
  position: absolute;
  color: #f3dfbf;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.card-corner--tl {
  top: 10px;
  left: 10px;
}

.card-corner--br {
  right: 10px;
  bottom: 10px;
  transform: rotate(180deg);
}

.card:disabled {
  cursor: default;
  opacity: 0.6;
  filter: saturate(0.75);
}

.card.selected {
  transform: translateY(-5px) scale(1.03);
}

.card.selected .card-face {
  border-color: rgba(255, 199, 99, 0.96);
  box-shadow:
    inset 0 0 0 1px rgba(255, 217, 144, 0.3),
    0 0 0 1px rgba(255, 198, 98, 0.52),
    0 14px 24px rgba(255, 190, 98, 0.26);
}

.card.echo .card-face {
  border-color: rgba(255, 231, 142, 0.95);
  box-shadow:
    inset 0 0 0 1px rgba(255, 231, 142, 0.28),
    0 0 20px rgba(255, 231, 142, 0.2),
    0 10px 16px rgba(0, 0, 0, 0.32);
}

.card.echo .card-value {
  color: #fff4b4;
  text-shadow:
    0 0 14px rgba(255, 233, 149, 0.55),
    0 0 6px rgba(255, 220, 140, 0.4),
    0 1px 0 rgba(255, 255, 255, 0.1);
}

/* ── Card Ability Badges (Echo / 10er-Trick / …) ── */
.card-badges {
  position: absolute;
  top: 4px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 2px;
  pointer-events: none;
  z-index: 3;
  align-items: center;
}
.card-badge {
  font-family: var(--font-display);
  font-size: 0.54rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 1px 5px;
  border-radius: 5px;
  border: 1px solid currentColor;
  background: rgba(6, 11, 22, 0.88);
  font-weight: 700;
  white-space: nowrap;
  line-height: 1.3;
  backdrop-filter: blur(2px);
}
.card-badge--echo {
  color: #ffd97a;
  text-shadow: 0 0 6px rgba(255, 217, 122, 0.55);
  box-shadow: 0 0 8px rgba(255, 217, 122, 0.18);
}
.card-badge--trick10 {
  color: #7adcff;
  text-shadow: 0 0 6px rgba(122, 220, 255, 0.55);
  box-shadow: 0 0 8px rgba(122, 220, 255, 0.18);
}
/* Karte mit Badges hat oben weniger Platz — Top-Corner-Zahl etwas weiter unten/außen */
.card.has-echo .card-corner--tl,
.card.has-trick10 .card-corner--tl { top: 6px; left: 6px; }
/* Bei "is-played" Badges ausblenden — gespielte Karten sind nicht mehr legbar */
.card.is-played .card-badges { display: none; }

/* ── Lane Move-Type-Badge (während Card-Selection) ── */
.lane-move-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  font-family: var(--font-display);
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 6px;
  border: 1px solid currentColor;
  background: rgba(6, 12, 24, 0.92);
  font-weight: 700;
  z-index: 3;
  pointer-events: none;
  line-height: 1.3;
}
.lane-move-badge--echo {
  color: #ffd97a;
  border-color: rgba(255, 217, 122, 0.85);
  box-shadow: 0 0 12px rgba(255, 217, 122, 0.32);
  text-shadow: 0 0 4px rgba(255, 217, 122, 0.55);
}
.lane-move-badge--trick10 {
  color: #7adcff;
  border-color: rgba(122, 220, 255, 0.85);
  box-shadow: 0 0 12px rgba(122, 220, 255, 0.32);
  text-shadow: 0 0 4px rgba(122, 220, 255, 0.55);
}
/* Bonus-Lanes glühen in ihrer Bonus-Farbe, statt nur grün (Valid). */
.lane.move-echo {
  border-color: rgba(255, 217, 122, 0.85);
  box-shadow: 0 0 0 1px rgba(255, 217, 122, 0.35), 0 0 18px rgba(255, 217, 122, 0.28);
}
.lane.move-trick10 {
  border-color: rgba(122, 220, 255, 0.85);
  box-shadow: 0 0 0 1px rgba(122, 220, 255, 0.35), 0 0 18px rgba(122, 220, 255, 0.28);
}

/* ── Lane Hints Bar (zeigt valide Targets der selektierten Karte) ── */
.lane-hints {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: var(--space-2);
  min-height: 28px;
}
.lane-hints-text {
  color: var(--text-muted);
  font-size: 0.85rem;
}
.lane-hints-text--warn { color: var(--brand-red); font-weight: 600; }
.lane-hints-text strong { color: var(--text-main); font-weight: 700; }
.lane-hint-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid rgba(120, 175, 248, 0.5);
  background: rgba(10, 18, 32, 0.78);
  font-size: 0.8rem;
  line-height: 1.3;
}
.lane-hint-chip--rise { color: var(--lane-rise); border-color: color-mix(in srgb, var(--lane-rise) 55%, transparent); }
.lane-hint-chip--fall { color: var(--lane-fall); border-color: color-mix(in srgb, var(--lane-fall) 55%, transparent); }
.lane-hint-chip--flux { color: var(--lane-flux); border-color: color-mix(in srgb, var(--lane-flux) 55%, transparent); }
.lane-hint-name { font-weight: 600; }
.lane-hint-arrow { color: var(--text-dim); font-size: 0.7rem; }
.lane-hint-value { font-family: var(--font-display); font-weight: 700; color: var(--text-main); }
.lane-hint-tag {
  font-family: var(--font-display);
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 1px 6px;
  border-radius: 5px;
  border: 1px solid currentColor;
  margin-left: 2px;
  font-weight: 700;
}
.lane-hint-tag--echo { color: #ffd97a; text-shadow: 0 0 4px rgba(255, 217, 122, 0.45); }
.lane-hint-tag--trick10 { color: #7adcff; text-shadow: 0 0 4px rgba(122, 220, 255, 0.45); }

/* Karte wurde diese Runde schon gelegt — bleibt sichtbar in der Hand bis Turn-Ende,
   sieht jetzt aber "verbraucht" aus: kleiner, ausgegraut, nicht klickbar.

   Wichtig: renderHand() rebuildet via innerHTML → Nodes sind brandneu, eine `transition`
   würde nicht greifen (kein From-State). Daher CSS-Animation via @keyframes, die nur
   beim ERSTEN Render mit `.is-played-anim` läuft (siehe playedAnimSeen in app.js). */
.card.is-played {
  transform: scale(0.78);
  filter: grayscale(0.85) brightness(0.62);
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
  transform-origin: 50% 70%;
  will-change: transform, filter, opacity;
}
.card.is-played .card-face {
  border-color: rgba(120, 140, 170, 0.35);
  box-shadow: inset 0 0 0 1px rgba(120, 140, 170, 0.18);
}
.card.is-played .card-value,
.card.is-played .card-corner {
  color: var(--text-dim) !important;
  text-shadow: none !important;
}

/* Entry-Animation — läuft genau einmal pro neu-gelegter Karte (markiert via .is-played-anim).
   Bei Folge-Renders bleibt die Karte einfach im End-State, ohne dass die Animation neu startet. */
.card.is-played.is-played-anim {
  animation: card-played-fade 380ms cubic-bezier(0.22, 0.61, 0.36, 1) both;
}
.card.is-played.is-played-anim .card-face {
  animation: card-played-face 380ms cubic-bezier(0.22, 0.61, 0.36, 1) both;
}
.card.is-played.is-played-anim .card-value,
.card.is-played.is-played-anim .card-corner {
  animation: card-played-text 380ms cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

@keyframes card-played-fade {
  from {
    transform: scale(1);
    filter: grayscale(0) brightness(1);
    opacity: 1;
  }
  to {
    transform: scale(0.78);
    filter: grayscale(0.85) brightness(0.62);
    opacity: 0.55;
  }
}
@keyframes card-played-face {
  from {
    border-color: var(--card-border, rgba(120, 175, 248, 0.6));
    box-shadow: inset 0 0 0 1px rgba(120, 175, 248, 0.18);
  }
  to {
    border-color: rgba(120, 140, 170, 0.35);
    box-shadow: inset 0 0 0 1px rgba(120, 140, 170, 0.18);
  }
}
@keyframes card-played-text {
  from { color: inherit; }
  to   { color: var(--text-dim); }
}

/* Respektiere Reduced-Motion-Preference */
@media (prefers-reduced-motion: reduce) {
  .card.is-played.is-played-anim,
  .card.is-played.is-played-anim .card-face,
  .card.is-played.is-played-anim .card-value,
  .card.is-played.is-played-anim .card-corner {
    animation: none;
  }
}

.chat-box {
  min-height: 108px;
  max-height: 220px;
  overflow: auto;
  border-radius: 12px;
  border: 1px solid rgba(120, 175, 248, 0.35);
  background: rgba(8, 13, 23, 0.88);
  padding: 9px;
  box-shadow: inset 0 0 0 1px rgba(132, 186, 255, 0.08);
}

.chat-msg {
  margin-bottom: 6px;
  line-height: 1.34;
}

.chat-name {
  color: #ffd48a;
  font-weight: 700;
}

.chat-input-row {
  margin-top: 8px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

/* ── Aufgeben-Abstimmung Modal-Overlay (V2-Theme) ── */
.v2-vote-overlay {
  position: fixed;
  inset: 0;
  z-index: 220;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(5, 9, 18, 0.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.v2-vote-overlay[hidden] { display: none; }

.v2-vote-card {
  width: min(94vw, 560px);
  border-radius: var(--radius-l);
  border: 1.5px solid rgba(120, 175, 248, 0.55);
  background:
    radial-gradient(circle at 50% 0%, rgba(99, 164, 255, 0.22), rgba(10, 16, 30, 0.95) 65%),
    linear-gradient(160deg, rgba(15, 24, 42, 0.96), rgba(10, 16, 28, 0.96));
  box-shadow:
    0 20px 48px rgba(0, 0, 0, 0.5),
    inset 0 0 0 1px rgba(132, 186, 255, 0.18),
    0 0 32px rgba(97, 221, 255, 0.18);
  padding: 20px 18px 16px;
  text-align: center;
  color: var(--text-main);
}

.v2-vote-title {
  color: var(--brand-amber);
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.v2-vote-sub {
  margin-top: 8px;
  font-size: 0.95rem;
  color: var(--text-main);
}

.v2-vote-timer {
  margin-top: 10px;
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--brand-amber);
  letter-spacing: 0.1em;
}

.v2-vote-meta {
  margin-top: 10px;
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.v2-vote-meta strong { color: var(--text-main); }

.v2-vote-votes {
  margin-top: 12px;
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.v2-vote-chip {
  border: 1px solid rgba(120, 175, 248, 0.42);
  border-radius: 999px;
  padding: 4px 11px;
  background: rgba(10, 18, 32, 0.78);
  font-size: 0.78rem;
  color: var(--text-main);
  letter-spacing: 0.02em;
}

.v2-vote-actions {
  margin-top: 14px;
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

.v2-vote-btn {
  min-height: 42px;
  min-width: 130px;
  padding: 8px 14px;
  font-family: var(--font-display);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.88rem;
  border-radius: 10px;
  border: 1px solid rgba(120, 175, 248, 0.45);
  background: linear-gradient(180deg, rgba(20, 32, 54, 0.92), rgba(12, 20, 36, 0.94));
  color: var(--text-main);
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}
.v2-vote-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  filter: brightness(1.08);
}
.v2-vote-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.v2-vote-btn.yes {
  border-color: rgba(90, 214, 159, 0.7);
  background: linear-gradient(180deg, rgba(45, 138, 96, 0.92), rgba(28, 92, 64, 0.95));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 0 14px rgba(90, 214, 159, 0.18);
}
.v2-vote-btn.yes:hover:not(:disabled) {
  border-color: rgba(120, 232, 178, 0.95);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 0 22px rgba(90, 214, 159, 0.45);
}

.v2-vote-btn.restart {
  border-color: rgba(255, 200, 110, 0.78);
  background: linear-gradient(180deg, rgba(196, 138, 36, 0.95), rgba(150, 100, 22, 0.96));
  color: #1b1408;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 0 14px rgba(255, 200, 110, 0.22);
}
.v2-vote-btn.restart:hover:not(:disabled) {
  border-color: rgba(255, 222, 156, 1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 0 22px rgba(255, 200, 110, 0.5);
}

.v2-vote-btn.no {
  border-color: rgba(255, 109, 132, 0.7);
  background: linear-gradient(180deg, rgba(176, 56, 76, 0.92), rgba(120, 36, 50, 0.95));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 0 14px rgba(255, 109, 132, 0.18);
}
.v2-vote-btn.no:hover:not(:disabled) {
  border-color: rgba(255, 156, 178, 0.95);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 0 22px rgba(255, 109, 132, 0.45);
}

.v2-vote-note {
  margin-top: 12px;
  font-size: 0.78rem;
  color: var(--text-dim);
  letter-spacing: 0.02em;
}

@media (max-width: 540px) {
  .v2-vote-card { padding: 16px 12px 12px; }
  .v2-vote-title { font-size: 1.25rem; }
  .v2-vote-btn { min-width: 100%; }
}

body.v2-vote-open { overflow: hidden; }

.score-pill {
  margin: var(--space-4) auto;
  width: fit-content;
  border-radius: 999px;
  border: 1px solid rgba(120, 175, 248, 0.52);
  background: rgba(10, 18, 32, 0.84);
  color: #dff2ff;
  padding: var(--space-2) var(--space-4);
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.06em;
  box-shadow: inset 0 0 0 1px rgba(142, 191, 255, 0.14);
}

#gameover-screen .panel {
  padding: var(--space-5);
}

#gameover-screen .inline-actions {
  justify-content: center;
  gap: var(--space-3);
}

#gameover-text {
  margin-top: var(--space-2);
  color: var(--text-muted);
}

.status-dot {
  position: fixed;
  top: 12px;
  right: 12px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--brand-green);
  box-shadow: 0 0 14px rgba(90, 214, 159, 0.6);
  z-index: 20;
}

.status-dot.offline {
  background: var(--brand-red);
  box-shadow: 0 0 14px rgba(255, 109, 132, 0.6);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%) translateY(20px);
  min-width: 220px;
  max-width: min(92vw, 520px);
  border-radius: 12px;
  border: 1px solid rgba(120, 175, 248, 0.42);
  background: rgba(9, 15, 28, 0.96);
  color: #e7f3ff;
  padding: 10px 13px;
  text-align: center;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.32);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  /* Über alle Overlays (Tutorial 250, Rules 200, Admin 220, Vote 260) — Toast
     darf nie geblurred oder verdeckt werden. */
  z-index: 10001;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

#game-screen .panel,
#lobby-screen .panel,
#gameover-screen .panel {
  background: linear-gradient(180deg, rgba(15, 24, 40, 0.88), rgba(10, 16, 29, 0.9));
}

#lobby-screen .inline-actions,
#game-screen > .inline-actions {
  justify-content: center;
}

#game-screen > .inline-actions .btn {
  min-width: 220px;
}

#menu-screen .btn,
#lobby-screen .btn,
#game-screen .btn,
#gameover-screen .btn {
  min-height: 44px;
}

@media (max-width: 1100px) {
  .missions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .board-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .lane.flux {
    grid-column: 2 / span 2;
  }
}

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

  #menu-screen .panel {
    width: 100%;
    max-width: 560px;
    margin: 0 auto;
  }
}

@media (max-width: 900px) {
  body {
    padding: 12px;
  }

  .menu-grid {
    grid-template-columns: 1fr;
  }

  .top-bar {
    flex-direction: column;
    gap: var(--space-2);
  }

  .stat-pills {
    justify-content: flex-start;
    width: 100%;
  }

  .small.right {
    text-align: left;
  }

  .missions {
    grid-template-columns: 1fr;
  }

  .board-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lane.flux {
    grid-column: 1 / -1;
  }
}

@media (max-width: 700px) {
  body {
    padding: 9px;
  }

  .screen {
    gap: 10px;
  }

  .panel {
    padding: 11px;
    border-radius: 14px;
  }

  h1 {
    font-size: clamp(1.8rem, 7vw, 2.45rem);
  }

  .subtitle {
    font-size: 0.82rem;
  }

  .turn-banner {
    font-size: 0.9rem;
  }

  .deck-stack {
    width: 94px;
    height: 132px;
  }

  .deck-count-pill {
    min-width: 40px;
    font-size: 0.95rem;
    padding: 5px 8px 4px;
  }

  .lane {
    min-height: 104px;
  }

  .lane-value {
    font-size: 1.8rem;
  }

  .cards {
    gap: 8px;
  }

  .card {
    width: 66px;
    height: 98px;
  }

  .card-value {
    font-size: 1.8rem;
  }

  .card-corner {
    font-size: 0.7rem;
    top: 8px;
    left: 8px;
  }

  .card-corner--br {
    top: auto;
    left: auto;
    right: 8px;
    bottom: 8px;
  }

  .chat-box {
    max-height: 190px;
  }

  .status-dot {
    top: 9px;
    right: 9px;
  }
}

@media (max-width: 520px) {
  .board-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lane.flux {
    grid-column: 1 / -1;
  }

  .inline-actions {
    flex-wrap: wrap;
  }

  .btn {
    width: 100%;
  }

  .relic-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-1);
  }

  .relic-btn {
    width: auto;
    padding: 8px 6px;
    min-height: 48px;
  }

  .relic-btn .relic-name {
    font-size: 0.78rem;
  }

  .relic-btn .relic-cost {
    font-size: 0.68rem;
  }

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

  #game-screen > .inline-actions .btn {
    min-width: 0;
  }

  .missions {
    gap: var(--space-2);
  }

  .hero-block {
    padding: var(--space-2);
  }

  .action-row {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-2);
  }

  .action-row-primary,
  .action-row-danger {
    width: 100%;
    justify-content: stretch;
  }

  .room-code {
    font-size: 1.36rem;
  }
}

/* ============================================================
   AETHER LOADER — "Ritual Seal" Intro-Animation
   Timeline (ms):
     0-150   sigil container enters (scale-up fade)
     150-680 rays draw one by one (5 × 80ms stagger)
     200-600 central aether glyph appears + starts pulse
     700-1200 outer ring draws itself (clockwise)
     850-1100 runes at each tip fade in
     1100-1500 title letters appear one by one
     1500-1900 subtitle fades in
     -> JS triggers .dissolve at ~1800ms (scale + fade + sparks)
   ============================================================ */

.aether-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-5);
  pointer-events: none;
  overflow: hidden;
  will-change: transform, opacity, filter;
}

.aether-loader-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 50% 45%, rgba(97, 221, 255, 0.18), transparent 55%),
    radial-gradient(circle at 20% 80%, rgba(216, 135, 255, 0.12), transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(255, 216, 116, 0.1), transparent 50%),
    linear-gradient(180deg, #050810 0%, #0a1020 55%, #04070e 100%);
  animation: loaderBgFade 400ms ease-out;
}

@keyframes loaderBgFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.aether-sigil {
  width: min(320px, 55vmin);
  height: min(320px, 55vmin);
  overflow: visible;
  filter: drop-shadow(0 0 28px rgba(97, 221, 255, 0.25));
  animation: sigilEnter 400ms cubic-bezier(0.16, 1, 0.3, 1) both;
  transform-origin: center;
}

@keyframes sigilEnter {
  from { opacity: 0; transform: scale(0.82) rotate(-8deg); }
  to   { opacity: 1; transform: scale(1)    rotate(0deg); }
}

.sigil-ring {
  fill: none;
  stroke: rgba(116, 199, 255, 0.85);
  stroke-width: 1.25;
  stroke-linecap: round;
  stroke-dasharray: 534;
  stroke-dashoffset: 534;
  filter: drop-shadow(0 0 6px rgba(97, 221, 255, 0.55));
  animation: drawRing 500ms ease-out 700ms forwards;
}

@keyframes drawRing {
  to { stroke-dashoffset: 0; }
}

.sigil-ray {
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-dasharray: 75;
  stroke-dashoffset: 75;
  opacity: 0.92;
  animation: drawRay 260ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
  filter: drop-shadow(0 0 4px currentColor);
}

.ray-1 { stroke: #61ddff; color: #61ddff; animation-delay: 180ms; }
.ray-2 { stroke: #63a4ff; color: #63a4ff; animation-delay: 260ms; }
.ray-3 { stroke: #d887ff; color: #d887ff; animation-delay: 340ms; }
.ray-4 { stroke: #ff9ab3; color: #ff9ab3; animation-delay: 420ms; }
.ray-5 { stroke: #ffd874; color: #ffd874; animation-delay: 500ms; }

@keyframes drawRay {
  to { stroke-dashoffset: 0; }
}

.sigil-rune {
  font-family: var(--font-display), serif;
  font-size: 11px;
  font-weight: 300;
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  animation: runeAppear 320ms cubic-bezier(0.2, 0.9, 0.3, 1) forwards;
  filter: drop-shadow(0 0 5px currentColor);
}

.rune-1 { fill: #61ddff; animation-delay: 850ms; }
.rune-2 { fill: #63a4ff; animation-delay: 900ms; }
.rune-3 { fill: #d887ff; animation-delay: 950ms; }
.rune-4 { fill: #ff9ab3; animation-delay: 1000ms; }
.rune-5 { fill: #ffd874; animation-delay: 1050ms; }

@keyframes runeAppear {
  from { opacity: 0; transform: scale(0.2); }
  60%  { opacity: 1; transform: scale(1.25); }
  to   { opacity: 1; transform: scale(1); }
}

.sigil-core {
  font-family: var(--font-display), serif;
  font-size: 32px;
  font-weight: 400;
  fill: #ffe0a0;
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  animation:
    coreAppear 420ms cubic-bezier(0.2, 0.9, 0.3, 1) 220ms forwards,
    corePulse  1600ms ease-in-out 720ms infinite;
  filter: drop-shadow(0 0 14px rgba(255, 217, 148, 0.95));
}

@keyframes coreAppear {
  from { opacity: 0; transform: scale(0.3); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes corePulse {
  0%, 100% { transform: scale(1);    filter: drop-shadow(0 0 14px rgba(255, 217, 148, 0.95)); }
  50%      { transform: scale(1.14); filter: drop-shadow(0 0 22px rgba(255, 217, 148, 1)); }
}

.aether-title {
  display: flex;
  align-items: baseline;
  gap: 0;
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 3.5vw, 2.3rem);
  letter-spacing: 0.32em;
  font-weight: 500;
  color: #f5faff;
  text-transform: uppercase;
  text-shadow:
    0 0 18px rgba(97, 221, 255, 0.55),
    0 0 8px rgba(255, 190, 99, 0.2);
  padding-left: 0.32em; /* optisch zentrieren da letter-spacing rechts wirkt */
}

.aether-title span {
  display: inline-block;
  opacity: 0;
  transform: translateY(12px);
  animation: titleLetterIn 380ms cubic-bezier(0.2, 0.9, 0.3, 1) forwards;
}

.aether-title span.aether-title-gap {
  width: 0.55em;
  animation: none;
  opacity: 1;
  transform: none;
}

.aether-title span:nth-child(1)  { animation-delay: 1100ms; }
.aether-title span:nth-child(2)  { animation-delay: 1140ms; }
.aether-title span:nth-child(3)  { animation-delay: 1180ms; }
.aether-title span:nth-child(4)  { animation-delay: 1220ms; }
.aether-title span:nth-child(5)  { animation-delay: 1260ms; }
.aether-title span:nth-child(6)  { animation-delay: 1300ms; }
/* nth-child(7) = .aether-title-gap (no animation) */
.aether-title span:nth-child(8)  { animation-delay: 1340ms; }
.aether-title span:nth-child(9)  { animation-delay: 1380ms; }
.aether-title span:nth-child(10) { animation-delay: 1420ms; }
.aether-title span:nth-child(11) { animation-delay: 1460ms; }
.aether-title span:nth-child(12) { animation-delay: 1500ms; }

@keyframes titleLetterIn {
  to { opacity: 1; transform: translateY(0); }
}

.aether-subtitle {
  font-family: var(--font-display);
  font-size: clamp(0.7rem, 1.6vw, 0.86rem);
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--brand-cyan);
  opacity: 0;
  animation: subtitleFade 500ms ease-out 1650ms forwards;
  margin-top: calc(var(--space-3) * -1);
}

@keyframes subtitleFade {
  from { opacity: 0; letter-spacing: 0.2em; }
  to   { opacity: 0.9; letter-spacing: 0.35em; }
}

/* ---------- Dissolve + Screen Reveal (smooth handoff) ---------- */

.aether-loader.dissolve {
  animation: loaderDissolve 620ms cubic-bezier(0.33, 0, 0.67, 1) forwards;
  pointer-events: none;
}

@keyframes loaderDissolve {
  0% {
    opacity: 1;
    transform: scale(1);
    filter: blur(0) brightness(1);
  }
  25% {
    opacity: 1;
    transform: scale(1.03);
    filter: blur(0) brightness(1.35);
  }
  70% {
    opacity: 0.4;
    transform: scale(1.08);
    filter: blur(4px) brightness(1.2);
  }
  100% {
    opacity: 0;
    transform: scale(1.12);
    filter: blur(12px) brightness(1.05);
  }
}

/* Initial-Reveal: feuert GENAU EINMAL direkt nach dem Loader-Dismiss.
   JS setzt body.initial-screen-reveal beim dismissAetherLoader und entfernt
   die Klasse ~1100ms später. Danach feuert hier NICHTS mehr, damit
   spätere Screen-Wechsel (Portal) nicht von einer konkurrierenden
   screenReveal-Animation überschrieben werden. */
body.initial-screen-reveal .screen.active {
  animation: screenReveal 520ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

body.initial-screen-reveal .status-dot {
  animation: statusDotReveal 400ms ease-out forwards;
}

@keyframes screenReveal {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.985);
    filter: blur(6px);
  }
  60% {
    filter: blur(0);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes statusDotReveal {
  from { opacity: 0; transform: scale(0.4); }
  to   { opacity: 1; transform: scale(1); }
}

/* ---------- Sparks (body-level, spawned by JS on dissolve) ---------- */

.aether-spark {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 10000;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--spark-color, #fff);
  box-shadow:
    0 0 8px var(--spark-color, #fff),
    0 0 16px var(--spark-color, #fff);
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.6);
  animation: sparkFly var(--spark-duration, 800ms) cubic-bezier(0.12, 0.8, 0.35, 1) forwards;
}

@keyframes sparkFly {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.6);
  }
  15% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.4);
  }
  100% {
    opacity: 0;
    transform:
      translate(
        calc(-50% + var(--spark-dx, 0px)),
        calc(-50% + var(--spark-dy, 0px))
      )
      scale(0.15);
  }
}

/* ---------- Mobile ---------- */

@media (max-width: 520px) {
  .aether-loader {
    gap: var(--space-4);
  }
  .aether-sigil {
    width: min(260px, 70vmin);
    height: min(260px, 70vmin);
  }
  .aether-title {
    letter-spacing: 0.22em;
    padding-left: 0.22em;
  }
}

/* ---------- Reduced motion (Accessibility) ---------- */

@media (prefers-reduced-motion: reduce) {
  .aether-sigil,
  .sigil-ring,
  .sigil-ray,
  .sigil-rune,
  .sigil-core,
  .aether-title span,
  .aether-subtitle,
  .aether-loader-bg {
    animation: none !important;
    opacity: 1 !important;
    stroke-dashoffset: 0 !important;
    transform: none !important;
  }
  .aether-loader.dissolve {
    animation: loaderReducedFade 260ms ease-out forwards;
  }
  @keyframes loaderReducedFade {
    to { opacity: 0; visibility: hidden; }
  }
  body.loader-done .screen.active,
  body.loader-done .status-dot {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }
  .aether-spark {
    display: none;
  }
}

/* ============================================================
   AETHER PORTAL — Screen-Transition (right-to-left sweep)
   Trigger: room-create/join, lobby→playing, gameover→lobby
   Layer-Stack (back→front):
     - portal-veil   : darkening vignette around the sweep
     - portal-wake   : soft trailing shimmer (slower, thicker)
     - portal-band   : main aether band (gradient, blurred)
     - portal-edge   : leading light edge (crisp, bright)
     - portal-edge-trail : second accent edge, slightly behind
   Total duration: 1200ms
   ============================================================ */

.portal-transition {
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  overflow: hidden;
  visibility: hidden;
}

.portal-transition.active {
  visibility: visible;
}

.portal-veil {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 60% at center, transparent 20%, rgba(4, 7, 14, 0.55) 80%);
  opacity: 0;
}

.portal-transition.active .portal-veil {
  animation: portalVeil 1100ms ease-in-out forwards;
}

@keyframes portalVeil {
  0%, 100% { opacity: 0; }
  45%, 55% { opacity: 0.9; }
}

.portal-wake {
  position: absolute;
  top: -10%;
  height: 120%;
  width: 60vw;
  left: 100%;
  background:
    linear-gradient(90deg,
      transparent 0%,
      rgba(97, 221, 255, 0.08) 30%,
      rgba(172, 134, 255, 0.12) 50%,
      rgba(255, 216, 116, 0.1) 70%,
      transparent 100%);
  filter: blur(30px);
  opacity: 0;
  mix-blend-mode: screen;
}

.portal-transition.active .portal-wake {
  animation: portalWake 1250ms cubic-bezier(0.3, 0, 0.5, 1) 60ms forwards;
}

@keyframes portalWake {
  0%   { transform: translateX(0);       opacity: 0; }
  15%  {                                 opacity: 0.9; }
  85%  {                                 opacity: 0.7; }
  100% { transform: translateX(-170vw); opacity: 0; }
}

.portal-band {
  position: absolute;
  top: -8%;
  height: 116%;
  width: 36vw;
  left: 100%;
  background:
    linear-gradient(90deg,
      transparent 0%,
      rgba(97, 221, 255, 0.35) 18%,
      rgba(216, 135, 255, 0.42) 42%,
      rgba(255, 216, 116, 0.55) 62%,
      rgba(97, 221, 255, 0.28) 85%,
      transparent 100%);
  filter: blur(18px);
  opacity: 0;
  mix-blend-mode: screen;
}

.portal-transition.active .portal-band {
  animation: portalBand 1200ms cubic-bezier(0.38, 0, 0.55, 1) forwards;
}

@keyframes portalBand {
  0%   { transform: translateX(0);       opacity: 0; }
  12%  {                                 opacity: 1; }
  85%  {                                 opacity: 1; }
  100% { transform: translateX(-150vw); opacity: 0; }
}

.portal-edge {
  position: absolute;
  top: 0;
  height: 100%;
  width: 2px;
  left: 100%;
  background: linear-gradient(180deg,
    transparent 0%,
    rgba(97, 221, 255, 1) 12%,
    rgba(255, 255, 255, 1) 50%,
    rgba(97, 221, 255, 1) 88%,
    transparent 100%);
  box-shadow:
    0 0 14px rgba(97, 221, 255, 0.95),
    0 0 28px rgba(255, 216, 116, 0.7),
    0 0 56px rgba(97, 221, 255, 0.45);
  opacity: 0;
}

.portal-transition.active .portal-edge {
  animation: portalEdge 1000ms cubic-bezier(0.45, 0, 0.55, 1) forwards;
}

@keyframes portalEdge {
  0%   { transform: translateX(0);       opacity: 0; }
  6%   {                                 opacity: 1; }
  92%  {                                 opacity: 1; }
  100% { transform: translateX(-102vw); opacity: 0; }
}

.portal-edge--trail {
  width: 1px;
  background: linear-gradient(180deg,
    transparent 0%,
    rgba(255, 216, 116, 0.85) 30%,
    rgba(216, 135, 255, 0.9) 70%,
    transparent 100%);
  box-shadow:
    0 0 10px rgba(255, 216, 116, 0.7),
    0 0 22px rgba(216, 135, 255, 0.5);
}

.portal-transition.active .portal-edge--trail {
  animation: portalEdgeTrail 1120ms cubic-bezier(0.42, 0, 0.55, 1) 90ms forwards;
}

@keyframes portalEdgeTrail {
  0%   { transform: translateX(0);       opacity: 0; }
  10%  {                                 opacity: 0.7; }
  90%  {                                 opacity: 0.5; }
  100% { transform: translateX(-110vw); opacity: 0; }
}

/* Portal Sparks (body-level, JS-spawned entlang der Edge) */

.portal-spark {
  position: fixed;
  z-index: 9999;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--spark-color, #ffd874);
  box-shadow:
    0 0 9px var(--spark-color, #ffd874),
    0 0 18px var(--spark-color, #ffd874);
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.4);
  animation: portalSparkFly var(--spark-duration, 900ms) cubic-bezier(0.2, 0.8, 0.3, 1) forwards;
}

@keyframes portalSparkFly {
  0%   {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.4);
  }
  18%  {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.4);
  }
  100% {
    opacity: 0;
    transform:
      translate(calc(-50% + var(--spark-dx, -40px)), calc(-50% + var(--spark-dy, -60px)))
      scale(0.2);
  }
}

/* Screen-Reveal während Portal aktiv ist.
   body.is-portal-active wird von playPortalTransition() gesetzt und nach
   Ende der Portal-Animation wieder entfernt. Specificity: (0,2,2) — gewinnt
   gegen body.initial-screen-reveal .screen.active (0,2,1). */

body.is-portal-active .screen.active {
  animation: portalScreenReveal 740ms cubic-bezier(0.22, 1, 0.36, 1) 220ms both;
}

@keyframes portalScreenReveal {
  from {
    opacity: 0;
    transform: translateX(42px) scale(0.985);
    filter: blur(8px);
  }
  55% { filter: blur(0); }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
    filter: blur(0);
  }
}

/* Reduced motion: Portal komplett aus */

@media (prefers-reduced-motion: reduce) {
  .portal-transition,
  .portal-spark {
    display: none !important;
  }
  body.is-portal-active .screen.active {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }
}

/* ── V2 Auth Bar (oben rechts) ───────────────────────────────────── */
.v2-auth-bar {
  position: fixed;
  top: calc(10px + env(safe-area-inset-top, 0));
  right: calc(14px + env(safe-area-inset-right, 0));
  z-index: 80;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  pointer-events: auto;
}
.v2-auth-bar[hidden] { display: none; }

.v2-auth-bar-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid rgba(120, 171, 244, 0.45);
  background: linear-gradient(180deg, rgba(14, 22, 40, 0.92), rgba(9, 14, 26, 0.95));
  color: var(--text-main);
  cursor: pointer;
  font: inherit;
  font-size: 0.88rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.v2-auth-bar-btn:hover { transform: translateY(-1px); border-color: rgba(120, 171, 244, 0.85); }
.v2-auth-bar-btn [data-lucide] { width: 16px; height: 16px; }
.v2-auth-bar-btn[hidden] { display: none; }

.v2-auth-bar-user {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.v2-auth-bar-user[hidden] { display: none; }

.v2-auth-bar-profile {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 4px;
  border-radius: 999px;
  border: 1px solid rgba(120, 171, 244, 0.45);
  background: linear-gradient(180deg, rgba(14, 22, 40, 0.92), rgba(9, 14, 26, 0.95));
  color: var(--text-main);
  cursor: pointer;
  font: inherit;
  font-size: 0.88rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.v2-auth-bar-profile:hover { transform: translateY(-1px); border-color: rgba(120, 171, 244, 0.85); }

.v2-auth-bar-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3e8dff, #d887ff);
  color: #03131f;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  overflow: hidden;
  flex: 0 0 auto;
}
.v2-auth-bar-avatar svg { width: 100%; height: 100%; }

.v2-auth-bar-name {
  max-width: 120px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.v2-auth-bar-logout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(120, 171, 244, 0.45);
  background: linear-gradient(180deg, rgba(14, 22, 40, 0.92), rgba(9, 14, 26, 0.95));
  color: var(--text-main);
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.v2-auth-bar-logout:hover { transform: translateY(-1px); border-color: rgba(255, 117, 145, 0.7); }
.v2-auth-bar-logout [data-lucide] { width: 16px; height: 16px; }

@media (max-width: 540px) {
  .v2-auth-bar { top: calc(8px + env(safe-area-inset-top, 0)); right: 10px; }
  .v2-auth-bar-name { max-width: 80px; }
}

/* ── V2 Auth Modal ───────────────────────────────────────────────── */
.v2-auth-overlay {
  position: fixed; inset: 0;
  background: rgba(5, 8, 18, 0.72);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.v2-auth-overlay[hidden] { display: none; }

.v2-auth-modal {
  width: 100%;
  max-width: 420px;
  max-height: 90vh;
  overflow-y: auto;
  background: linear-gradient(180deg, rgba(14, 22, 40, 0.96), rgba(9, 14, 26, 0.98));
  border: 1px solid rgba(120, 171, 244, 0.38);
  border-radius: var(--radius-l);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
}

.v2-auth-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--space-4);
  border-bottom: 1px solid rgba(120, 171, 244, 0.2);
}
.v2-auth-head h2 { margin: 0; font-size: 1.1rem; color: var(--text-main); }

.v2-auth-close {
  background: none; border: none;
  color: var(--text-muted);
  font-size: 1.5rem; line-height: 1; cursor: pointer;
  padding: 2px 10px;
}
.v2-auth-close:hover { color: var(--text-main); }

.v2-auth-tabs {
  display: flex;
  border-bottom: 1px solid rgba(120, 171, 244, 0.2);
}
.v2-auth-tab {
  flex: 1;
  padding: var(--space-3) var(--space-4);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font: inherit;
  font-size: 0.95rem;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.v2-auth-tab:hover { color: var(--text-main); }
.v2-auth-tab.active {
  color: var(--text-main);
  border-bottom-color: rgba(120, 171, 244, 0.85);
}

.v2-auth-body {
  padding: var(--space-4);
}

.v2-auth-form label {
  display: block;
  margin-top: var(--space-3);
  margin-bottom: 4px;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.v2-auth-form label:first-of-type { margin-top: 0; }

.v2-auth-form input[type="text"],
.v2-auth-form input[type="password"] {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid rgba(120, 171, 244, 0.38);
  border-radius: var(--radius-s);
  background: rgba(9, 14, 26, 0.88);
  color: var(--text-main);
  font: inherit;
}
.v2-auth-form input[type="text"]:focus,
.v2-auth-form input[type="password"]:focus {
  outline: none;
  border-color: rgba(120, 171, 244, 0.85);
  box-shadow: 0 0 0 3px rgba(120, 171, 244, 0.18);
}

.v2-auth-submit {
  width: 100%;
  margin-top: var(--space-4);
  justify-content: center;
}

.v2-auth-msg {
  min-height: 1.2em;
  margin: var(--space-2) 0 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}
.v2-auth-msg.is-ok { color: #7fe0a7; }
.v2-auth-msg.is-err { color: #ff92a8; }

.v2-auth-hint {
  margin: var(--space-3) 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.v2-auth-link {
  background: none; border: none; padding: 0;
  color: var(--brand-cyan, #63d1ff);
  cursor: pointer;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.v2-auth-link:hover { color: var(--text-main); }

.v2-auth-note {
  margin: var(--space-3) 0 0;
  font-size: 0.8rem;
  color: var(--text-dim, var(--text-muted));
  border-top: 1px dashed rgba(120, 171, 244, 0.2);
  padding-top: var(--space-3);
}

/* ── Avatar Base ────────────────────────────────────────────── */
.avatar-svg,
.avatar-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(135deg, #3e8dff, #d887ff);
  color: #03131f;
  font-weight: 700;
  font-family: var(--font-display, system-ui);
  flex: 0 0 auto;
}
.avatar-svg svg { width: 100%; height: 100%; display: block; }
.avatar-fallback::before { content: attr(data-initial); }

/* Auth-Bar: Avatar ist bereits ein Kreis; SVG füllt vollständig */
.v2-auth-bar-avatar svg { display: block; }

/* ── Profile Modal ──────────────────────────────────────────── */
.v2-profile-overlay {
  position: fixed; inset: 0;
  background: rgba(5, 8, 18, 0.72);
  backdrop-filter: blur(4px);
  z-index: 210;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.v2-profile-overlay[hidden] { display: none; }

.v2-profile-modal {
  width: 100%;
  max-width: 880px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, rgba(14, 22, 40, 0.96), rgba(9, 14, 26, 0.98));
  border: 1px solid rgba(120, 171, 244, 0.38);
  border-radius: var(--radius-l);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.v2-profile-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--space-4);
  border-bottom: 1px solid rgba(120, 171, 244, 0.2);
  flex: 0 0 auto;
}
.v2-profile-head h2 { margin: 0; font-size: 1.1rem; color: var(--text-main); }
.v2-profile-close {
  background: none; border: none;
  color: var(--text-muted);
  font-size: 1.5rem; line-height: 1; cursor: pointer;
  padding: 2px 10px;
}
.v2-profile-close:hover { color: var(--text-main); }

.v2-profile-body {
  display: grid;
  grid-template-columns: minmax(220px, 280px) 1fr;
  gap: var(--space-5);
  padding: var(--space-4);
  overflow: hidden;
  flex: 1 1 auto;
  min-height: 0;
}

.v2-profile-preview-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  border: 1px solid rgba(120, 171, 244, 0.22);
  border-radius: var(--radius-m);
  background: rgba(10, 17, 30, 0.6);
  position: sticky;
  top: 0;
  align-self: start;
}

.v2-profile-preview {
  width: 180px; height: 180px;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(135deg, #3e8dff, #d887ff);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4), 0 0 0 3px rgba(120, 171, 244, 0.25);
}
.v2-profile-preview svg { width: 100%; height: 100%; display: block; }

.v2-profile-preview-name {
  font-weight: 600;
  color: var(--text-main);
  font-size: 1.05rem;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.v2-profile-preview-actions {
  display: flex;
  gap: var(--space-2);
  width: 100%;
}
.v2-profile-preview-actions .btn {
  flex: 1;
  justify-content: center;
}

.v2-profile-msg {
  min-height: 1.2em;
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
}
.v2-profile-msg.is-ok { color: #7fe0a7; }
.v2-profile-msg.is-err { color: #ff92a8; }

.v2-profile-pickers {
  overflow-y: auto;
  padding-right: var(--space-2);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.avatar-picker-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.avatar-picker-group-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.avatar-picker-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.avatar-picker-chip {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(120, 171, 244, 0.32);
  background: rgba(10, 17, 30, 0.7);
  color: var(--text-muted);
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.avatar-picker-chip:hover {
  border-color: rgba(120, 171, 244, 0.6);
  color: var(--text-main);
}
.avatar-picker-chip.active {
  border-color: rgba(120, 171, 244, 0.9);
  background: rgba(30, 48, 82, 0.75);
  color: var(--text-main);
  box-shadow: 0 0 0 2px rgba(120, 171, 244, 0.18);
}

@media (max-width: 720px) {
  .v2-profile-body {
    grid-template-columns: 1fr;
    overflow-y: auto;
  }
  .v2-profile-preview-wrap {
    position: static;
  }
  .v2-profile-preview { width: 140px; height: 140px; }
  .v2-profile-pickers { overflow-y: visible; }
}

/* ── Lobby Player Avatars ───────────────────────────────────── */
.lobby-player-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  overflow: hidden;
  flex: 0 0 auto;
  background: linear-gradient(135deg, #3e8dff, #d887ff);
  color: #03131f;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
}
.lobby-player-avatar svg { width: 100%; height: 100%; display: block; }

/* ── Profil: Stats-Panel ────────────────────────────────────── */
.v2-profile-stats {
  border-top: 1px solid rgba(120, 171, 244, 0.18);
  padding: var(--space-4);
}
.v2-profile-stats h3 {
  margin: 0 0 var(--space-3) 0;
  color: var(--text-main);
  font-size: 1.05rem;
}
.v2-profile-stats-sub {
  margin: var(--space-4) 0 var(--space-2) 0;
  color: var(--text-main);
  font-size: 0.92rem;
  opacity: 0.85;
}
.v2-profile-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: var(--space-2);
}
.v2-profile-stats-tile {
  background: rgba(14, 22, 40, 0.55);
  border: 1px solid rgba(120, 171, 244, 0.18);
  border-radius: var(--radius-m);
  padding: var(--space-3);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.v2-profile-stats-tile-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}
.v2-profile-stats-tile-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  font-variant-numeric: tabular-nums;
}
.v2-profile-stats-empty {
  color: var(--text-muted);
  font-size: 0.88rem;
  opacity: 0.8;
  padding: var(--space-2) 0;
}
.v2-profile-stats-games {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.v2-profile-stats-game {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--space-2);
  background: rgba(14, 22, 40, 0.45);
  border: 1px solid rgba(120, 171, 244, 0.12);
  border-radius: var(--radius-s, 8px);
  padding: 8px 10px;
  font-size: 0.86rem;
}
.v2-profile-stats-game-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  border: 1px solid rgba(120, 171, 244, 0.35);
}
.v2-profile-stats-game-badge.won {
  background: rgba(94, 214, 144, 0.15);
  border-color: rgba(94, 214, 144, 0.55);
  color: #9ae9b6;
}
.v2-profile-stats-game-badge.lost {
  background: rgba(240, 120, 140, 0.12);
  border-color: rgba(240, 120, 140, 0.45);
  color: #ecb2c0;
}
.v2-profile-stats-game-players {
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.v2-profile-stats-game-date {
  color: var(--text-muted);
  opacity: 0.8;
  font-variant-numeric: tabular-nums;
  font-size: 0.78rem;
}

/* ── Rules-Button (fixed links-unten) + Modal ───────────────── */
.v2-rules-btn {
  position: fixed;
  left: calc(10px + env(safe-area-inset-left, 0px));
  bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(120, 171, 244, 0.45);
  background: linear-gradient(180deg, rgba(14, 22, 40, 0.92), rgba(9, 14, 26, 0.95));
  color: var(--text-main);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
  padding: 0;
}
.v2-rules-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(120, 171, 244, 0.85);
}
.v2-rules-btn svg,
.v2-rules-btn [data-lucide] {
  width: 20px; height: 20px;
}

.v2-rules-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 18, 0.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.v2-rules-overlay[hidden] { display: none; }

.v2-rules-modal {
  max-width: 720px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, rgba(14, 22, 40, 0.96), rgba(9, 14, 26, 0.98));
  border: 1px solid rgba(120, 171, 244, 0.35);
  border-radius: var(--radius-l, 16px);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.v2-rules-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4);
  border-bottom: 1px solid rgba(120, 171, 244, 0.2);
  flex: 0 0 auto;
}
.v2-rules-head h2 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--text-main);
}

.v2-rules-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 2px 10px;
  border-radius: 6px;
}
.v2-rules-close:hover { color: var(--text-main); background: rgba(120, 171, 244, 0.12); }

.v2-rules-tabs {
  display: flex;
  gap: 4px;
  padding: 0 var(--space-4);
  border-bottom: 1px solid rgba(120, 171, 244, 0.2);
  flex: 0 0 auto;
}
.v2-rules-tab {
  background: none;
  border: none;
  color: var(--text-muted);
  padding: 10px 14px;
  cursor: pointer;
  font-size: 0.92rem;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.v2-rules-tab:hover { color: var(--text-main); }
.v2-rules-tab.active {
  color: var(--text-main);
  border-bottom-color: rgba(120, 171, 244, 0.85);
}

.v2-rules-body {
  padding: var(--space-4);
  overflow-y: auto;
  flex: 1 1 auto;
  color: var(--text-muted);
  line-height: 1.55;
}

.v2-rules-section { margin-bottom: var(--space-4); }
.v2-rules-section:last-child { margin-bottom: 0; }
.v2-rules-section h3 {
  margin: 0 0 var(--space-2) 0;
  color: var(--text-main);
  font-size: 1rem;
}
.v2-rules-section p,
.v2-rules-section ul { margin: 0 0 var(--space-2) 0; }
.v2-rules-section ul { padding-left: 22px; }
.v2-rules-section ul ul { margin-top: 4px; }
.v2-rules-section li { margin-bottom: 4px; }
.v2-rules-section strong { color: var(--text-main); }
.v2-rules-section em { color: var(--text-main); font-style: normal; opacity: 0.9; }

.v2-rules-role {
  background: rgba(14, 22, 40, 0.45);
  border: 1px solid rgba(120, 171, 244, 0.18);
  border-radius: var(--radius-m, 12px);
  padding: var(--space-3);
}
.v2-rules-role-tag {
  color: var(--text-muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: -4px !important;
}
.v2-rules-role-tip {
  margin-top: var(--space-2) !important;
  font-size: 0.88rem;
  opacity: 0.88;
}
.v2-rules-role-tip em {
  color: #a7d0ff;
}

@media (max-width: 540px) {
  .v2-rules-btn { width: 36px; height: 36px; }
  .v2-rules-btn svg,
  .v2-rules-btn [data-lucide] { width: 18px; height: 18px; }
  .v2-rules-modal { max-height: 94vh; }
  .v2-rules-head { padding: var(--space-3); }
  .v2-rules-body { padding: var(--space-3); }
}

body.v2-rules-open { overflow: hidden; }

/* === V2 Admin Panel === */
.v2-auth-bar-admin {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(240, 180, 70, 0.55);
  background: linear-gradient(180deg, rgba(45, 32, 14, 0.75), rgba(30, 22, 10, 0.85));
  color: #f0d27a;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  margin-right: 6px;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.v2-auth-bar-admin:hover {
  transform: translateY(-1px);
  border-color: rgba(240, 180, 70, 0.95);
  background: linear-gradient(180deg, rgba(65, 48, 20, 0.85), rgba(40, 30, 14, 0.9));
}
.v2-auth-bar-admin svg,
.v2-auth-bar-admin [data-lucide] { width: 16px; height: 16px; }

.v2-admin-overlay {
  position: fixed; inset: 0;
  background: rgba(5, 8, 18, 0.78);
  backdrop-filter: blur(4px);
  z-index: 220;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.v2-admin-overlay[hidden] { display: none; }
.v2-admin-modal {
  max-width: 1040px; width: 100%; max-height: 92vh;
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, rgba(14, 22, 40, 0.97), rgba(9, 14, 26, 0.99));
  border: 1px solid rgba(240, 180, 70, 0.35);
  border-radius: var(--radius-l);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}
.v2-admin-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--space-4);
  border-bottom: 1px solid rgba(240, 180, 70, 0.2);
  flex-shrink: 0; /* niemals vom Flex-Algo zusammengedrückt */
}
.v2-admin-head h2 { margin: 0; color: #f0d27a; font-size: 1.15rem; }
.v2-admin-close {
  background: none; border: none; color: var(--text-muted);
  font-size: 1.5rem; cursor: pointer; padding: 2px 10px;
  line-height: 1;
}
.v2-admin-close:hover { color: var(--text-main); }
.v2-admin-tabs {
  display: flex; gap: 4px;
  padding: 0 var(--space-4);
  border-bottom: 1px solid rgba(120, 171, 244, 0.18);
  overflow-x: auto;
  flex-shrink: 0; /* Tabs bleiben immer sichtbar */
}
.v2-admin-tab {
  background: none; border: none;
  color: var(--text-muted);
  padding: 10px 14px;
  font-size: 0.95rem;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s;
}
.v2-admin-tab:hover { color: var(--text-main); }
.v2-admin-tab.active {
  color: #f0d27a;
  border-bottom-color: rgba(240, 180, 70, 0.85);
}
.v2-admin-body {
  flex: 1; min-height: 0;
  overflow-y: auto;
  padding: var(--space-4);
}
.v2-admin-empty {
  color: var(--text-muted);
  padding: var(--space-4);
  text-align: center;
}
.v2-admin-error {
  color: #ff8a8a;
  background: rgba(255, 80, 80, 0.08);
  border: 1px solid rgba(255, 80, 80, 0.25);
  padding: var(--space-3);
  border-radius: var(--radius-m);
  margin-bottom: var(--space-3);
}
.v2-admin-error strong { margin-right: 6px; }

.v2-admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}
.v2-admin-tile {
  background: rgba(120, 171, 244, 0.06);
  border: 1px solid rgba(120, 171, 244, 0.18);
  border-radius: var(--radius-m);
  padding: var(--space-3);
  display: flex; flex-direction: column; gap: 4px;
}
.v2-admin-tile span {
  color: var(--text-muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.v2-admin-tile b {
  color: var(--text-main);
  font-size: 1.1rem;
  word-break: break-word;
}
.v2-admin-details {
  margin-top: var(--space-3);
  color: var(--text-muted);
}
.v2-admin-details summary { cursor: pointer; padding: 6px 0; }
.v2-admin-details pre {
  background: rgba(0, 0, 0, 0.35);
  padding: var(--space-3);
  border-radius: var(--radius-s);
  overflow-x: auto;
  font-size: 0.8rem;
  color: #a7d0ff;
  max-height: 360px;
}

/* ── Admin: UI-Test-Tools (Cookie-Banner-Tests etc.) ─── */
.v2-admin-tools {
  margin-top: var(--space-4);
  padding: var(--space-3);
  border-radius: var(--radius-s);
  border: 1px solid rgba(120, 171, 244, 0.22);
  background: rgba(20, 30, 54, 0.42);
}
.v2-admin-tools h3 {
  margin: 0 0 4px;
  color: #ffe7be;
  font-family: var(--font-display);
  font-size: 0.92rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.v2-admin-tools-hint {
  margin: 0 0 12px;
  color: #8aa3c5;
  font-size: 0.82rem;
}
.v2-admin-tools-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.v2-admin-tools-note {
  margin: 12px 0 0;
  color: #6f88ad;
  font-size: 0.76rem;
  font-style: italic;
}
.v2-admin-tools-note code {
  background: rgba(0, 0, 0, 0.35);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.78rem;
  color: #a7d0ff;
}

.v2-admin-toolbar {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: 8px;
  margin-bottom: var(--space-3);
}
.v2-admin-toolbar input[type="text"],
.v2-admin-toolbar input[type="search"] {
  flex: 1; min-width: 180px;
  background: rgba(10, 16, 30, 0.7);
  border: 1px solid rgba(120, 171, 244, 0.25);
  color: var(--text-main);
  padding: 8px 10px;
  border-radius: var(--radius-s);
}
.v2-admin-meta {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-left: auto;
}
.v2-admin-checkbox {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--text-muted);
  font-size: 0.9rem;
  cursor: pointer;
}

.v2-admin-table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(120, 171, 244, 0.15);
  border-radius: var(--radius-m);
}
.v2-admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.v2-admin-table th,
.v2-admin-table td {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid rgba(120, 171, 244, 0.1);
  vertical-align: top;
}
.v2-admin-table th {
  background: rgba(120, 171, 244, 0.06);
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.75rem;
}
.v2-admin-table tr:last-child td { border-bottom: none; }
.v2-admin-table tr:hover td { background: rgba(120, 171, 244, 0.04); }
.v2-admin-table-compact td { padding: 4px 8px; font-family: ui-monospace, monospace; font-size: 0.8rem; }

.v2-admin-role {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 1px solid transparent;
}
.v2-admin-role.role-admin {
  color: #f0d27a;
  background: rgba(240, 180, 70, 0.1);
  border-color: rgba(240, 180, 70, 0.35);
}
.v2-admin-role.role-user {
  color: #a7d0ff;
  background: rgba(120, 171, 244, 0.08);
  border-color: rgba(120, 171, 244, 0.3);
}
.v2-admin-role.role-locked {
  color: #ff8a8a;
  background: rgba(255, 80, 80, 0.08);
  border-color: rgba(255, 80, 80, 0.35);
}

.v2-admin-actions {
  white-space: nowrap;
}
.v2-admin-actions .btn {
  padding: 4px 8px;
  font-size: 0.8rem;
  margin-right: 4px;
}

.v2-admin-log-file {
  font-family: ui-monospace, monospace;
  color: var(--text-muted);
  white-space: nowrap;
}
.v2-admin-log-line {
  font-family: ui-monospace, monospace;
  color: #a7d0ff;
  word-break: break-all;
}

.v2-admin-feedback-ts {
  font-family: ui-monospace, monospace;
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
}
.v2-admin-feedback-user {
  color: #f0d27a;
  font-weight: 600;
  white-space: nowrap;
}
.v2-admin-feedback-text {
  color: var(--text-main);
  white-space: pre-wrap;
  word-break: break-word;
}
.v2-admin-feedback-raw {
  font-family: ui-monospace, monospace;
  font-size: 0.8rem;
  color: var(--text-muted);
}

body.v2-admin-open { overflow: hidden; }

/* === V2 Admin Prompt (in-app replacement for window.prompt) === */
.v2-admin-prompt-overlay {
  position: fixed; inset: 0;
  background: rgba(4, 7, 16, 0.75);
  backdrop-filter: blur(6px);
  z-index: 260; /* über Admin-Modal (220) */
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  animation: v2AdminPromptFadeIn 0.15s ease-out;
}
@keyframes v2AdminPromptFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.v2-admin-prompt-modal {
  max-width: 440px; width: 100%;
  background: linear-gradient(180deg, rgba(18, 26, 46, 0.98), rgba(10, 16, 30, 1));
  border: 1px solid rgba(240, 180, 70, 0.35);
  border-radius: var(--radius-l);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(120, 171, 244, 0.08);
  overflow: hidden;
  animation: v2AdminPromptPop 0.18s cubic-bezier(0.2, 0.8, 0.3, 1.2);
}
@keyframes v2AdminPromptPop {
  from { transform: scale(0.92); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}
.v2-admin-prompt-head {
  padding: var(--space-4) var(--space-4) var(--space-3);
  border-bottom: 1px solid rgba(240, 180, 70, 0.18);
}
.v2-admin-prompt-head h3 {
  margin: 0;
  color: #f0d27a;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}
.v2-admin-prompt-body {
  padding: var(--space-4);
  display: flex; flex-direction: column;
  gap: 10px;
}
.v2-admin-prompt-label {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.4;
}
.v2-admin-prompt-input {
  width: 100%;
  background: rgba(8, 14, 28, 0.8);
  border: 1px solid rgba(120, 171, 244, 0.3);
  border-radius: var(--radius-m);
  color: var(--text-main);
  font-size: 0.95rem;
  padding: 10px 12px;
  font-family: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.v2-admin-prompt-input:focus {
  outline: none;
  border-color: rgba(240, 180, 70, 0.7);
  box-shadow: 0 0 0 3px rgba(240, 180, 70, 0.15);
}
textarea.v2-admin-prompt-input { resize: vertical; min-height: 80px; }
.v2-admin-prompt-err {
  margin: 0;
  color: #ff8a8a;
  font-size: 0.85rem;
}
.v2-admin-prompt-foot {
  display: flex; justify-content: flex-end; gap: 8px;
  padding: var(--space-3) var(--space-4) var(--space-4);
  border-top: 1px solid rgba(120, 171, 244, 0.12);
}
.v2-admin-prompt-foot .btn { min-width: 110px; }

@media (max-width: 540px) {
  .v2-admin-prompt-modal { max-width: 100%; }
  .v2-admin-prompt-foot .btn { flex: 1; min-width: 0; }
}

@media (max-width: 540px) {
  .v2-admin-head { padding: var(--space-3); }
  .v2-admin-body { padding: var(--space-3); }
  .v2-admin-tabs { padding: 0 var(--space-3); }
  .v2-admin-tab { padding: 8px 10px; font-size: 0.85rem; }
  .v2-admin-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}

/* ── Tutorial: Tab im Rules-Modal ────────────────────────────────── */
.v2-tut-tab-intro {
  margin-bottom: var(--space-4);
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.5;
}
.v2-tut-tab-intro p { margin: 0; }
.v2-tut-group { margin-bottom: var(--space-4); }
.v2-tut-group:last-child { margin-bottom: 0; }
.v2-tut-group-title {
  margin: 0 0 var(--space-2);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.v2-tut-mode-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.v2-tut-mode-card {
  display: flex;
  align-items: stretch;
  gap: 12px;
  padding: 14px;
  background: linear-gradient(180deg, rgba(14, 22, 40, 0.85), rgba(9, 14, 26, 0.92));
  border: 1px solid rgba(120, 171, 244, 0.28);
  border-radius: var(--radius-m, 12px);
  color: var(--text-main);
  text-align: left;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  font: inherit;
}
.v2-tut-mode-card:hover {
  transform: translateY(-1px);
  border-color: rgba(120, 171, 244, 0.65);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.v2-tut-mode-card.is-done {
  border-color: rgba(120, 220, 160, 0.45);
}
.v2-tut-mode-card.is-done:hover {
  border-color: rgba(120, 220, 160, 0.85);
}
.v2-tut-mode-icon {
  flex: 0 0 auto;
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px;
  background: rgba(120, 171, 244, 0.18);
  color: #cfe1ff;
}
.v2-tut-mode-icon svg, .v2-tut-mode-icon [data-lucide] { width: 22px; height: 22px; }
.v2-tut-mode-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.v2-tut-mode-title {
  display: flex; align-items: center; gap: 6px;
  font-weight: 600;
  font-size: 0.98rem;
}
.v2-tut-mode-done {
  color: #7adfa3;
  font-weight: 700;
  font-size: 0.95rem;
}
.v2-tut-mode-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.4;
}
.v2-tut-mode-meta {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 4px;
  font-size: 0.78rem;
  color: var(--text-muted);
}
.v2-tut-mode-action {
  color: #cfe1ff;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* ── Tutorial: Voll-Overlay (eigenes Spielfeld) ──────────────────── */
.v2-tut-overlay {
  position: fixed; inset: 0;
  background: rgba(5, 8, 18, 0.86);
  backdrop-filter: blur(6px);
  z-index: 250;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.v2-tut-overlay[hidden] { display: none; }
body.v2-tut-open { overflow: hidden; }
.v2-tut-modal {
  width: 100%;
  max-width: 880px;
  max-height: calc(100vh - 32px);
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, rgba(14, 22, 40, 0.96), rgba(9, 14, 26, 0.98));
  border: 1px solid rgba(120, 171, 244, 0.4);
  border-radius: 16px;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}
.v2-tut-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(120, 171, 244, 0.22);
  background: rgba(0, 0, 0, 0.18);
}
.v2-tut-title-wrap { display: flex; flex-direction: column; gap: 2px; }
.v2-tut-head h2 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--text-main);
}
.v2-tut-subtitle {
  font-size: 0.82rem;
  color: var(--text-muted);
}
.v2-tut-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  padding: 2px 10px;
  border-radius: 6px;
}
.v2-tut-close:hover {
  color: var(--text-main);
  background: rgba(120, 171, 244, 0.14);
}

/* Coach-Panel oben */
.v2-tut-coach {
  padding: 14px 18px;
  background: linear-gradient(180deg, rgba(120, 171, 244, 0.10), rgba(120, 171, 244, 0.04));
  border-bottom: 1px solid rgba(120, 171, 244, 0.18);
}
.v2-tut-coach-step { display: flex; flex-direction: column; gap: 6px; }
.v2-tut-coach-meta {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(207, 225, 255, 0.7);
}
.v2-tut-coach-title {
  font-size: 1.02rem;
  font-weight: 600;
  color: #ffd97a;
}
.v2-tut-coach-text {
  font-size: 0.94rem;
  color: var(--text-main);
  line-height: 1.5;
}
.v2-tut-coach-text strong { color: #ffd97a; }
.v2-tut-coach-actions {
  margin-top: 6px;
  display: flex; align-items: center; gap: 10px;
}
.v2-tut-coach-waiting {
  color: var(--text-muted);
  font-size: 0.86rem;
  font-style: italic;
}
.v2-tut-coach-pulse {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #ffd97a;
  animation: v2-tut-pulse 1.2s ease-in-out infinite;
}
@keyframes v2-tut-pulse {
  0%, 100% { opacity: 0.3; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1.1); }
}
.v2-tut-coach-done .v2-tut-coach-title { color: #7adfa3; font-size: 1.18rem; }

/* Spielfeld (Bahnen) */
.v2-tut-board {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  padding: 14px 18px;
  background: rgba(0, 0, 0, 0.2);
}
.v2-tut-lane {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px;
  padding: 12px 8px;
  min-height: 78px;
  background: linear-gradient(180deg, rgba(14, 22, 40, 0.9), rgba(9, 14, 26, 0.95));
  border: 1.5px solid rgba(120, 171, 244, 0.22);
  border-radius: 12px;
  color: var(--text-main);
  cursor: not-allowed;
  font: inherit;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.v2-tut-lane.is-valid {
  cursor: pointer;
  border-color: rgba(120, 220, 160, 0.7);
  box-shadow: 0 0 0 2px rgba(120, 220, 160, 0.18);
}
.v2-tut-lane.is-valid:hover { transform: translateY(-2px); }
.v2-tut-lane.has-echo {
  border-color: rgba(255, 217, 122, 0.85);
  box-shadow: 0 0 0 2px rgba(255, 217, 122, 0.22), 0 0 18px rgba(255, 217, 122, 0.25);
}
.v2-tut-lane.has-trick10 {
  border-color: rgba(122, 220, 255, 0.85);
  box-shadow: 0 0 0 2px rgba(122, 220, 255, 0.22), 0 0 18px rgba(122, 220, 255, 0.25);
}
.v2-tut-lane.is-highlight {
  animation: v2-tut-highlight 1.6s ease-in-out infinite;
}
@keyframes v2-tut-highlight {
  0%, 100% { box-shadow: 0 0 0 2px rgba(255, 217, 122, 0.18); }
  50%      { box-shadow: 0 0 0 4px rgba(255, 217, 122, 0.55), 0 0 20px rgba(255, 217, 122, 0.4); }
}
.v2-tut-lane--rise { background: linear-gradient(180deg, rgba(20, 50, 35, 0.9), rgba(9, 20, 14, 0.95)); }
.v2-tut-lane--fall { background: linear-gradient(180deg, rgba(50, 25, 25, 0.9), rgba(20, 9, 9, 0.95)); }
.v2-tut-lane--flux { background: linear-gradient(180deg, rgba(40, 30, 60, 0.9), rgba(15, 10, 25, 0.95)); }
.v2-tut-lane-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}
.v2-tut-lane-value {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-main);
}
.v2-tut-lane-badge {
  position: absolute;
  top: 4px; right: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 6px;
  letter-spacing: 0.04em;
}
.v2-tut-lane-badge--echo { background: rgba(255, 217, 122, 0.22); color: #ffd97a; border: 1px solid rgba(255, 217, 122, 0.5); }
.v2-tut-lane-badge--trick10 { background: rgba(122, 220, 255, 0.22); color: #7adcff; border: 1px solid rgba(122, 220, 255, 0.5); }

/* Hero-Bar (nur in Rollen-Modi) */
.v2-tut-hero-bar { padding: 0 18px; }
.v2-tut-hero-bar[hidden] { display: none; }
.v2-tut-hero-card {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: linear-gradient(180deg, rgba(255, 217, 122, 0.12), rgba(255, 217, 122, 0.04));
  border: 1px solid rgba(255, 217, 122, 0.4);
  border-radius: 10px;
}
.v2-tut-hero-card.is-used {
  background: rgba(40, 40, 50, 0.4);
  border-color: rgba(120, 120, 130, 0.4);
  opacity: 0.7;
}
.v2-tut-hero-card.is-expected {
  animation: v2-tut-highlight 1.4s ease-in-out infinite;
}
.v2-tut-hero-label { font-weight: 600; color: #ffd97a; }
.v2-tut-hero-card.is-used .v2-tut-hero-label { color: var(--text-muted); }

/* Hand */
.v2-tut-hand {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 18px;
  background: rgba(0, 0, 0, 0.18);
  justify-content: center;
}
.v2-tut-card {
  position: relative;
  min-width: 56px; height: 84px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(180deg, rgba(20, 30, 55, 0.98), rgba(10, 16, 30, 0.99));
  border: 1.5px solid rgba(120, 171, 244, 0.45);
  border-radius: 10px;
  color: var(--text-main);
  font: inherit;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.v2-tut-card:hover:not(:disabled) { transform: translateY(-3px); border-color: rgba(120, 171, 244, 0.85); }
.v2-tut-card.is-selected {
  border-color: #ffd97a;
  box-shadow: 0 0 0 2px rgba(255, 217, 122, 0.5), 0 0 18px rgba(255, 217, 122, 0.3);
  transform: translateY(-4px);
}
.v2-tut-card.is-played {
  opacity: 0.4;
  filter: grayscale(0.8) brightness(0.7);
  transform: scale(0.85);
  cursor: not-allowed;
}
.v2-tut-card.has-echo:not(.is-played) {
  border-color: rgba(255, 217, 122, 0.7);
  box-shadow: 0 0 12px rgba(255, 217, 122, 0.18);
}
.v2-tut-card.has-trick10:not(.is-played) {
  border-color: rgba(122, 220, 255, 0.7);
  box-shadow: 0 0 12px rgba(122, 220, 255, 0.18);
}
.v2-tut-card.is-highlight:not(.is-played) {
  animation: v2-tut-highlight 1.4s ease-in-out infinite;
}
.v2-tut-card-value {
  font-size: 1.5rem;
  font-weight: 700;
}
.v2-tut-card-badges {
  position: absolute;
  bottom: 3px; left: 3px; right: 3px;
  display: flex; gap: 3px; flex-wrap: wrap; justify-content: center;
}
.v2-tut-card-badge {
  font-size: 0.62rem;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 4px;
  letter-spacing: 0.03em;
}
.v2-tut-card-badge--echo { background: rgba(255, 217, 122, 0.25); color: #ffd97a; }
.v2-tut-card-badge--trick10 { background: rgba(122, 220, 255, 0.25); color: #7adcff; }

/* Footer */
.v2-tut-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  border-top: 1px solid rgba(120, 171, 244, 0.18);
  background: rgba(0, 0, 0, 0.22);
}
.v2-tut-deck, .v2-tut-played {
  font-size: 0.86rem;
  color: var(--text-muted);
}
.v2-tut-deck strong, .v2-tut-played strong { color: var(--text-main); }
.v2-tut-btn {
  background: linear-gradient(180deg, rgba(120, 171, 244, 0.22), rgba(120, 171, 244, 0.12));
  border: 1px solid rgba(120, 171, 244, 0.55);
  color: var(--text-main);
  padding: 8px 16px;
  border-radius: 8px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}
.v2-tut-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: rgba(120, 171, 244, 0.95);
  background: linear-gradient(180deg, rgba(120, 171, 244, 0.32), rgba(120, 171, 244, 0.18));
}
.v2-tut-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.v2-tut-btn-primary {
  background: linear-gradient(180deg, rgba(255, 217, 122, 0.28), rgba(255, 217, 122, 0.14));
  border-color: rgba(255, 217, 122, 0.6);
  color: #ffd97a;
}
.v2-tut-btn-primary:hover:not(:disabled) {
  border-color: rgba(255, 217, 122, 0.95);
  background: linear-gradient(180deg, rgba(255, 217, 122, 0.42), rgba(255, 217, 122, 0.22));
}
.v2-tut-btn-hero {
  padding: 6px 12px;
  font-size: 0.86rem;
}
.v2-tut-btn.is-expected {
  animation: v2-tut-highlight 1.4s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .v2-tut-coach-pulse,
  .v2-tut-lane.is-highlight,
  .v2-tut-card.is-highlight,
  .v2-tut-hero-card.is-expected,
  .v2-tut-btn.is-expected {
    animation: none !important;
  }
}

@media (max-width: 640px) {
  .v2-tut-overlay { padding: 8px; }
  .v2-tut-modal { max-height: calc(100vh - 16px); border-radius: 12px; }
  .v2-tut-head, .v2-tut-coach, .v2-tut-hand, .v2-tut-foot, .v2-tut-board { padding-left: 12px; padding-right: 12px; }
  .v2-tut-board { gap: 6px; }
  .v2-tut-lane { min-height: 64px; padding: 8px 4px; }
  .v2-tut-lane-value { font-size: 1.15rem; }
  .v2-tut-lane-label { font-size: 0.7rem; }
  .v2-tut-card { min-width: 48px; height: 72px; }
  .v2-tut-card-value { font-size: 1.2rem; }
  .v2-tut-foot { flex-wrap: wrap; }
  .v2-tut-mode-grid { grid-template-columns: 1fr; }
}

/* ── Tutorial-CTA auf Menu-Screen ─────────────────────────────────── */
.v2-tutorial-cta {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
  padding: 14px 22px 14px 18px;
  border-radius: 14px;
  border: 1px solid rgba(255, 120, 110, 0.55);
  background: linear-gradient(135deg, rgba(220, 60, 70, 0.92), rgba(180, 42, 82, 0.92));
  color: #fff;
  font: inherit;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(200, 40, 60, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.14);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  animation: v2-tutorial-cta-pulse 2.4s ease-in-out infinite;
}
.v2-tutorial-cta[hidden] { display: none; }
.v2-tutorial-cta:hover {
  transform: translateY(-1px);
  background: linear-gradient(135deg, rgba(240, 80, 92, 0.96), rgba(200, 52, 100, 0.96));
  box-shadow: 0 12px 28px rgba(220, 50, 70, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.v2-tutorial-cta:focus-visible {
  outline: 2px solid #ffd6d6;
  outline-offset: 3px;
}
.v2-tutorial-cta:active { transform: translateY(0); }
.v2-tutorial-cta-icon {
  font-size: 1.7rem;
  line-height: 1;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
}
.v2-tutorial-cta-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.v2-tutorial-cta-title {
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: 0.01em;
}
.v2-tutorial-cta-sub {
  font-size: 0.82rem;
  opacity: 0.88;
}
.v2-tutorial-cta-arrow {
  margin-left: 6px;
  font-size: 1.3rem;
  transition: transform 0.18s ease;
}
.v2-tutorial-cta:hover .v2-tutorial-cta-arrow { transform: translateX(3px); }

@keyframes v2-tutorial-cta-pulse {
  0%, 100% { box-shadow: 0 8px 22px rgba(200, 40, 60, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.14); }
  50%      { box-shadow: 0 10px 28px rgba(240, 70, 90, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.18); }
}

@media (prefers-reduced-motion: reduce) {
  .v2-tutorial-cta { animation: none; }
  .v2-tutorial-cta:hover .v2-tutorial-cta-arrow { transform: none; }
}

@media (max-width: 640px) {
  .v2-tutorial-cta {
    width: 100%;
    justify-content: flex-start;
    padding: 12px 16px;
  }
  .v2-tutorial-cta-title { font-size: 0.96rem; }
  .v2-tutorial-cta-sub { font-size: 0.78rem; }
}

/* ─────────────────────────────────────────────────────────────────
   Cookie-Consent Banner & Settings — Aether-Piles-Stil
   ───────────────────────────────────────────────────────────────── */

.v2-cookie-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 40%, rgba(20, 30, 60, 0.78), rgba(5, 8, 18, 0.92));
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9000;
  opacity: 0;
  transition: opacity 0.32s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 20px;
}
.v2-cookie-overlay.is-visible { opacity: 1; }
.v2-cookie-overlay[hidden] { display: none; }

/* Settings-Modal etwas dunkleren Backdrop, damit man Banner-Reste nicht durchblitzen sieht. */
.v2-cookie-overlay--settings {
  background: rgba(5, 8, 18, 0.86);
  z-index: 9100;
}

/* ── Banner-Modal ──────────────────────────────────── */
.v2-cookie-modal {
  position: relative;
  width: min(94vw, 500px);
  background: linear-gradient(180deg, rgba(22, 32, 56, 0.98), rgba(12, 18, 34, 0.98));
  border: 1px solid rgba(255, 200, 110, 0.42);
  border-radius: 22px;
  padding: 36px 28px 22px;
  text-align: center;
  box-shadow:
    0 32px 80px rgba(0, 0, 0, 0.65),
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 90px rgba(255, 180, 80, 0.15);
  transform: scale(0.92) translateY(12px);
  transition: transform 0.36s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.32s ease;
  overflow: hidden;
}
.v2-cookie-overlay.is-visible .v2-cookie-modal {
  transform: scale(1) translateY(0);
}

/* Wenn gerade Cookie-Regen läuft, schmilzt das Modal zur Seite. */
.v2-cookie-overlay.is-celebrating .v2-cookie-modal {
  transform: scale(0.96) translateY(0);
  opacity: 0.92;
  filter: brightness(1.15) saturate(1.1);
  box-shadow:
    0 32px 80px rgba(0, 0, 0, 0.65),
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 0 140px rgba(255, 200, 100, 0.45);
}

/* Big Cookie Icon */
.v2-cookie-cookie {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 96px;
  height: 96px;
  margin: 0 auto 18px;
  filter: drop-shadow(0 8px 22px rgba(255, 170, 80, 0.45));
  animation: v2-cookie-wobble 3s ease-in-out infinite;
  position: relative;
  z-index: 2;
}
.v2-cookie-cookie svg { width: 100%; height: 100%; }
@keyframes v2-cookie-wobble {
  0%, 100% { transform: rotate(-7deg) scale(1); }
  50%      { transform: rotate(7deg) scale(1.05); }
}

/* Sparkle-Glitter um den Cookie */
.v2-cookie-sparkles {
  position: absolute;
  top: 16px; left: 0; right: 0;
  height: 120px;
  pointer-events: none;
  z-index: 1;
}
.v2-cookie-sparkle {
  position: absolute;
  color: #ffd57a;
  font-size: 1.1rem;
  opacity: 0;
  animation: v2-cookie-sparkle 2.6s ease-in-out infinite;
  text-shadow: 0 0 8px rgba(255, 200, 100, 0.7);
}
.v2-cookie-sparkle.s1 { top: 10px;  left: calc(50% - 80px); animation-delay: 0s;   }
.v2-cookie-sparkle.s2 { top: 60px;  left: calc(50% - 100px); animation-delay: 0.6s; font-size: 0.85rem; }
.v2-cookie-sparkle.s3 { top: 20px;  left: calc(50% + 60px);  animation-delay: 1.2s; }
.v2-cookie-sparkle.s4 { top: 70px;  left: calc(50% + 80px);  animation-delay: 1.8s; font-size: 0.85rem; }
@keyframes v2-cookie-sparkle {
  0%, 100% { opacity: 0; transform: scale(0.6); }
  50%      { opacity: 1; transform: scale(1.1); }
}

.v2-cookie-modal h2 {
  margin: 0 0 12px;
  color: #ffe7be;
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.v2-cookie-text {
  color: #c8d6f0;
  font-size: 0.94rem;
  line-height: 1.55;
  margin: 0 0 22px;
}
.v2-cookie-text strong { color: #ffe7be; font-weight: 600; }
.v2-cookie-promise {
  display: inline-block;
  margin-top: 6px;
  color: #88e0a8;
  font-size: 0.85rem;
  font-style: italic;
  font-weight: 500;
}

.v2-cookie-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
}
@media (min-width: 540px) {
  .v2-cookie-actions {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }
}

.v2-cookie-foot {
  margin: 18px 0 0;
  color: #6f88ad;
  font-size: 0.78rem;
  font-style: italic;
}

/* ── Buttons ───────────────────────────────────────── */
.v2-cookie-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 12px;
  font: inherit;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
  white-space: nowrap;
}
.v2-cookie-btn:focus-visible {
  outline: 2px solid #ffd57a;
  outline-offset: 3px;
}
.v2-cookie-btn-primary {
  background: linear-gradient(135deg, #ffd57a, #f5a73a);
  color: #2a1908;
  border-color: rgba(255, 220, 140, 0.7);
  box-shadow: 0 6px 16px rgba(245, 167, 58, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.v2-cookie-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(245, 167, 58, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.v2-cookie-btn-ghost {
  background: rgba(40, 60, 100, 0.32);
  color: #c8d6f0;
  border-color: rgba(140, 168, 220, 0.4);
}
.v2-cookie-btn-ghost:hover {
  border-color: rgba(180, 210, 255, 0.7);
  background: rgba(60, 90, 140, 0.42);
  color: #fff;
}
.v2-cookie-btn-icon {
  font-size: 0.95rem;
  color: inherit;
  filter: drop-shadow(0 0 4px rgba(255, 220, 140, 0.5));
}

/* ── Settings-Modal ────────────────────────────────── */
.v2-cookie-settings-modal {
  width: min(94vw, 560px);
  max-height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, rgba(18, 28, 50, 0.98), rgba(10, 16, 30, 0.98));
  border: 1px solid rgba(120, 171, 244, 0.42);
  border-radius: 18px;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  overflow: hidden;
  transform: scale(0.94) translateY(8px);
  transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
}
.v2-cookie-overlay.is-visible .v2-cookie-settings-modal {
  transform: scale(1) translateY(0);
}

.v2-cookie-settings-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 22px 14px;
  border-bottom: 1px solid rgba(120, 171, 244, 0.18);
}
.v2-cookie-settings-icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 8px rgba(255, 170, 80, 0.4));
}
.v2-cookie-settings-icon svg { width: 100%; height: 100%; }
.v2-cookie-settings-head h2 {
  margin: 0;
  color: #ffe7be;
  font-family: var(--font-display);
  font-size: 1.1rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.v2-cookie-settings-sub {
  margin: 2px 0 0;
  color: #8aa3c5;
  font-size: 0.82rem;
}
.v2-cookie-settings-head > div { flex: 1; }

.v2-cookie-close {
  width: 34px;
  height: 34px;
  background: rgba(40, 60, 100, 0.32);
  border: 1px solid rgba(140, 168, 220, 0.4);
  color: #c8d6f0;
  border-radius: 8px;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.v2-cookie-close:hover {
  background: rgba(60, 90, 140, 0.45);
  border-color: rgba(180, 210, 255, 0.7);
  color: #fff;
}

.v2-cookie-settings-body {
  padding: 20px 22px;
  overflow-y: auto;
  flex: 1;
}
.v2-cookie-cat {
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(120, 171, 244, 0.22);
  background: rgba(20, 30, 54, 0.5);
  margin-bottom: 10px;
}
.v2-cookie-cat:last-child { margin-bottom: 0; }
.v2-cookie-cat.is-locked {
  opacity: 0.85;
}
.v2-cookie-cat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.v2-cookie-cat-title {
  display: flex;
  align-items: center;
  gap: 10px;
}
.v2-cookie-cat h3 {
  margin: 0;
  color: #ffe7be;
  font-family: var(--font-display);
  font-size: 0.98rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.v2-cookie-tag {
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 200, 110, 0.5);
  background: rgba(80, 50, 18, 0.45);
  color: #ffd57a;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.v2-cookie-tag--soft {
  border-color: rgba(140, 200, 255, 0.5);
  background: rgba(30, 60, 100, 0.45);
  color: #a8d8ff;
}
.v2-cookie-cat p {
  margin: 8px 0 0;
  color: #a4b8d8;
  font-size: 0.84rem;
  line-height: 1.45;
}

/* ── Toggle-Switch ─────────────────────────────────── */
.v2-cookie-toggle {
  position: relative;
  width: 50px;
  height: 28px;
  border-radius: 999px;
  background: rgba(60, 80, 120, 0.55);
  border: 1px solid rgba(120, 160, 220, 0.4);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
  padding: 0;
  flex-shrink: 0;
}
.v2-cookie-toggle.is-on {
  background: linear-gradient(135deg, #ffd57a, #f5a73a);
  border-color: rgba(255, 220, 140, 0.85);
  box-shadow: 0 0 16px rgba(245, 167, 58, 0.3);
}
.v2-cookie-toggle.is-locked {
  cursor: not-allowed;
  opacity: 0.85;
}
.v2-cookie-toggle-dot {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.v2-cookie-toggle.is-on .v2-cookie-toggle-dot {
  transform: translateX(22px);
}

.v2-cookie-settings-foot {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 22px 18px;
  border-top: 1px solid rgba(120, 171, 244, 0.18);
  background: rgba(8, 14, 26, 0.4);
}
@media (max-width: 480px) {
  .v2-cookie-settings-foot { flex-direction: column; }
}

/* ── Cookie-Regen ────────────────────────────────────
   Performance:
   - `contain: strict` isoliert Layout/Paint vom Rest der Seite
   - `translate3d` erzwingt eigene GPU-Layer pro Drop
   - KEIN `filter: drop-shadow` (CPU-teuer, kein GPU-Layer)
   - <img> mit gecachter data-URI: ein Decode für alle 20 Drops
   - JS pausiert während des Regens den Backdrop-Blur (.is-cookie-raining) */
.v2-cookie-rain {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.25s ease;
  contain: strict;
}
.v2-cookie-rain.is-active { opacity: 1; }
.v2-cookie-drop {
  position: absolute;
  top: 0;
  transform: translate3d(0, -120px, 0);
  animation-name: v2-cookie-fall;
  animation-timing-function: cubic-bezier(0.42, 0, 0.58, 1);
  animation-fill-mode: forwards;
  will-change: transform;
  backface-visibility: hidden;
}
.v2-cookie-drop img {
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

@keyframes v2-cookie-fall {
  0%   { transform: translate3d(0, -120px, 0) rotate(0deg); opacity: 0; }
  6%   { opacity: 1; }
  90%  { opacity: 1; }
  100% { transform: translate3d(var(--swayX, 0px), 110vh, 0) rotate(var(--rot, 360deg)); opacity: 0.2; }
}

/* Während Regen: Backdrop-Blur reduzieren + Cookie-Pulse pausieren —
   beides spart GPU-Frametime und macht den Fall sichtbar smoother. */
body.is-cookie-raining .v2-cookie-overlay {
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
body.is-cookie-raining .v2-cookie-cookie,
body.is-cookie-raining .v2-cookie-sparkle {
  animation-play-state: paused;
}

/* ── Re-Open: Floating Cookie-Settings-Button (neben Rules) ─── */
.v2-cookie-settings-btn {
  position: fixed;
  left: calc(58px + env(safe-area-inset-left, 0px));
  bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 200, 110, 0.42);
  background: linear-gradient(180deg, rgba(34, 22, 14, 0.92), rgba(20, 14, 9, 0.95));
  color: #ffd57a;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  padding: 4px;
}
.v2-cookie-settings-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 220, 140, 0.85);
  box-shadow: 0 6px 16px rgba(245, 167, 58, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.v2-cookie-settings-btn svg { width: 24px; height: 24px; }

/* ── Re-Open: Text-Link unter Tutorial-CTA in der Hero ───── */
.v2-cookie-hero-link {
  display: inline-block;
  margin-top: 14px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(168, 184, 220, 0.3);
  background: transparent;
  color: #a4b8d8;
  font-size: 0.82rem;
  cursor: pointer;
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}
.v2-cookie-hero-link:hover {
  color: #ffd57a;
  border-color: rgba(255, 200, 110, 0.55);
  background: rgba(60, 40, 14, 0.25);
}
.v2-cookie-hero-link:focus-visible {
  outline: 2px solid #ffd57a;
  outline-offset: 2px;
}

/* ── Reduced Motion ────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .v2-cookie-overlay,
  .v2-cookie-modal,
  .v2-cookie-settings-modal,
  .v2-cookie-toggle,
  .v2-cookie-toggle-dot,
  .v2-cookie-btn-primary,
  .v2-cookie-btn-ghost,
  .v2-cookie-rain {
    transition: opacity 0.15s ease;
  }
  .v2-cookie-cookie,
  .v2-cookie-sparkle,
  .v2-cookie-drop {
    animation: none !important;
  }
  .v2-cookie-rain { display: none !important; }
  .v2-cookie-overlay.is-visible .v2-cookie-modal,
  .v2-cookie-overlay.is-visible .v2-cookie-settings-modal {
    transform: none;
  }
}

/* ── Mobile (< 480px) ──────────────────────────────── */
@media (max-width: 480px) {
  .v2-cookie-modal { padding: 28px 20px 18px; border-radius: 18px; }
  .v2-cookie-cookie { width: 76px; height: 76px; }
  .v2-cookie-modal h2 { font-size: 1.15rem; }
  .v2-cookie-text { font-size: 0.88rem; }
  .v2-cookie-settings-head { padding: 14px 16px 12px; }
  .v2-cookie-settings-body { padding: 14px 16px; }
}
