/* ============================================================================
 *  ui.css  —  DOM-Oberfläche (Menüs, Charakterwahl, Level-Up, Shop)
 * ============================================================================
 *  Präfix „gt-" (Grimmtal). Farben aus main.css. Animierte, „hochwertige" Menüs.
 * ========================================================================== */

/* ===================== Skins: Vorlagen + Eigener Bau ===================== */
.gt-menu { overflow-x: hidden; }                 /* kein horizontaler Scroll (Mehrspieler-Screen) */
.gt-input { max-width: 100%; }

.gt-skin-sub { width: 100%; text-align: left; color: var(--ink-dim); font-size: 0.78rem;
  letter-spacing: 0.05em; text-transform: uppercase; margin: 10px 0 4px; }

/* Vorlagen-Gitter (gleich große Kacheln — vorher verrutscht) */
.gt-skins { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; width: 100%; }
.gt-skin { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 4px;
  background: var(--panel); border: 1px solid var(--border-soft); border-radius: 10px; cursor: pointer;
  transition: transform 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease; }
.gt-skin:hover { transform: translateY(-2px); border-color: var(--gold); }
.gt-skin.on { border-color: var(--gold); box-shadow: 0 0 12px rgba(201,161,74,0.45); }
.gt-skin.locked { opacity: 0.55; cursor: not-allowed; filter: grayscale(0.6); }
.gt-skin.locked:hover { transform: none; border-color: var(--border-soft); }
.gt-skin canvas, .gt-skin-prev { width: 52px; height: 52px; flex: 0 0 auto; }
.gt-skin-prev { display: flex; align-items: center; justify-content: center; }
.gt-skin-lock { font-size: 1.4rem; background: rgba(0,0,0,0.3); border-radius: 8px; }
.gt-skin-name { font-size: 0.62rem; color: var(--ink-dim); text-align: center; line-height: 1.15; }

/* Eigener-Skin-Bau (Live-Vorschau + Bauteil-Pfeile) */
.gt-skinbuilder { display: flex; gap: 14px; align-items: center; width: 100%; padding: 12px;
  background: linear-gradient(180deg, rgba(40,70,48,0.14), rgba(0,0,0,0.22));
  border: 1px solid var(--border-soft); border-radius: 12px; box-shadow: var(--inset-top); }
.gt-skinbuilder.on { border-color: rgba(120,255,160,0.5); box-shadow: inset 0 0 0 1px rgba(120,255,160,0.22), 0 0 14px rgba(95,224,150,0.2); }
.gt-skinbuilder-prev { flex: 0 0 auto; }
.gt-skinbuilder-prev canvas { width: 96px; height: 96px; }
.gt-parts { display: flex; flex-direction: column; gap: 8px; flex: 1; min-width: 0; }
.gt-part-row { display: flex; align-items: center; gap: 8px; }
.gt-part-label { width: 68px; text-align: left; color: var(--ink); font-size: 0.85rem; }
.gt-part-swatch { width: 30px; height: 30px; border-radius: 7px; border: 1px solid var(--border); flex: 0 0 auto; }
.gt-part-swatch.none { display: flex; align-items: center; justify-content: center; color: var(--ink-dim); background: rgba(0,0,0,0.3); }
.gt-part-acc { min-width: 104px; padding: 5px 8px; text-align: center; font-size: 0.76rem; color: var(--ink);
  background: rgba(0,0,0,0.3); border: 1px solid var(--border-soft); border-radius: 7px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; }
.gt-part-idx { color: var(--ink-dim); font-size: 0.72rem; min-width: 30px; text-align: right; }

/* Dunkelgrüne, leicht durchsichtige, leuchtende Wechsel-Pfeile */
.gt-arrow {
  width: 34px; height: 34px; font-size: 0.95rem; line-height: 1; cursor: pointer; flex: 0 0 auto;
  color: #9fffbf; background: rgba(40,110,60,0.30);
  border: 1px solid rgba(120,255,160,0.45); border-radius: 8px;
  box-shadow: 0 0 10px rgba(95,224,150,0.35), inset 0 0 8px rgba(95,224,150,0.15);
  transition: transform 0.12s ease, box-shadow 0.2s ease, background 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}
.gt-arrow:hover { background: rgba(60,150,80,0.45); box-shadow: 0 0 16px rgba(120,255,160,0.6); transform: translateY(-1px); }
.gt-arrow:active { transform: translateY(0); }
@media (max-width: 480px) { .gt-skinbuilder { flex-direction: column; } .gt-part-label { width: 56px; } }
@media (pointer: coarse) { .gt-arrow { width: 42px; height: 42px; } }

/* Mehrspieler-Lobby: Team „steht" nebeneinander (Fortnite-artig, an unser Spiel angepasst) */
.gt-lobby-figs { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; width: 100%; }
.gt-lobby-fig { display: flex; flex-direction: column; align-items: center; gap: 4px;
  background: linear-gradient(180deg, rgba(30,34,48,0.6), rgba(12,14,22,0.6));
  border: 1px solid var(--border-soft); border-radius: 12px; padding: 8px 10px 10px; min-width: 112px; }
.gt-lobby-fig.host { border-color: var(--gold); box-shadow: 0 0 12px rgba(201,161,74,0.3); }
.gt-lobby-fig.empty { opacity: 0.45; border-style: dashed; }
.gt-lobby-stage { width: 88px; height: 88px; display: flex; align-items: center; justify-content: center;
  border-radius: 10px; font-size: 2rem; color: var(--ink-dim);
  background: radial-gradient(ellipse at 50% 80%, rgba(95,224,192,0.14), rgba(0,0,0,0) 70%); }
.gt-lobby-fig strong { font-size: 0.85rem; white-space: nowrap; max-width: 120px; overflow: hidden; text-overflow: ellipsis; }
.gt-lobby-badge { font-size: 0.66rem; color: var(--ink-dim); text-transform: uppercase; letter-spacing: 0.05em; }

/* ---- Overlay-Ebene (fängt Eingaben ab, wenn sichtbar) ------------------- */
/* WICHTIG: background + display werden vom JS (Screens._show) per inline-Style
   gesetzt — hier NICHT überschreiben. Tiefe kommt über einen weichen Blur. */
.gt-layer {
  position: absolute; inset: 0; pointer-events: auto;
  display: flex; align-items: center; justify-content: center;
  padding: var(--sp-5); animation: gt-fade 0.25s ease;
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
}

/* ============================== Buttons ================================= */
/* Materielle Knöpfe: feiner Oberkanten-Glanz, weiche Tiefe, klare Zustände. */
.gt-btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  font-family: var(--font-head); font-weight: 700; color: var(--ink);
  background: linear-gradient(180deg, #2a3043 0%, #1b2030 52%, #141824 100%);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 10px 18px; cursor: pointer; letter-spacing: 0.04em;
  box-shadow: var(--inset-top), var(--shadow-sm);
  -webkit-tap-highlight-color: transparent;
  transition: transform var(--t-fast), box-shadow var(--t-mid),
              border-color var(--t-mid), color var(--t-mid), background var(--t-mid);
}
.gt-btn:hover { transform: translateY(-2px); border-color: var(--gold); color: var(--gold-bright);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.1), 0 8px 22px rgba(0,0,0,0.55), 0 0 18px var(--gold-glow); }
.gt-btn:active { transform: translateY(0); box-shadow: inset 0 2px 5px rgba(0,0,0,0.5); }
.gt-btn:focus-visible { outline: none; border-color: var(--gold-bright);
  box-shadow: var(--ring-gold), var(--shadow-sm); }

.gt-btn.big { font-size: 1.05rem; padding: 14px 28px; min-width: 260px; letter-spacing: 0.06em; }
.gt-btn.small { font-size: 0.82rem; padding: 6px 12px; }
.gt-btn.tiny { font-size: 0.78rem; padding: 3px 8px; gap: var(--sp-1); }

/* Primär — goldenes Metall, hervorgehoben. */
.gt-btn.primary {
  background: linear-gradient(180deg, #4c3b1d 0%, #352810 56%, #241a0c 100%);
  border-color: var(--gold); color: var(--gold-bright);
  box-shadow: inset 0 1px 0 rgba(255,220,140,0.22), 0 2px 8px rgba(0,0,0,0.45);
}
.gt-btn.primary:hover { border-color: var(--gold-bright);
  box-shadow: inset 0 1px 0 rgba(255,220,140,0.3), 0 8px 24px rgba(0,0,0,0.55), 0 0 22px var(--gold-glow); }

/* Gefahr (z. B. Zurücksetzen). */
.gt-btn.danger { border-color: rgba(181,48,48,0.7); color: #ff8a8a;
  background: linear-gradient(180deg, #3a2024 0%, #261216 60%, #1a0d10 100%); }
.gt-btn.danger:hover { border-color: var(--blood); color: #ffb0b0;
  box-shadow: inset 0 1px 0 rgba(255,140,140,0.15), 0 8px 22px rgba(0,0,0,0.55), 0 0 18px rgba(181,48,48,0.4); }

/* Aktiver Umschalter (z. B. „Endlos an"). */
.gt-btn.locked-on { border-color: var(--gold); color: var(--gold-bright);
  box-shadow: var(--inset-top), 0 0 14px var(--gold-glow), inset 0 0 0 1px rgba(201,161,74,0.35); }
.gt-btn.disabled { opacity: 0.4; cursor: not-allowed; pointer-events: none; box-shadow: none; transform: none; }

/* ============================== Menüs ================================== */
/* Zentrale „Karten-Fläche" der Overlays. Dezente Tiefe + goldener Rahmen,
   damit sich das Menü klar vom dunklen Spielfeld abhebt. */
.gt-menu {
  display: flex; flex-direction: column; align-items: center; gap: var(--sp-4);
  text-align: center; padding: var(--sp-6) var(--sp-7);
  max-width: min(960px, 94vw); max-height: 94vh; overflow: auto;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(120% 80% at 50% -10%, rgba(201,161,74,0.06), transparent 55%),
    linear-gradient(180deg, rgba(16,19,28,0.72), rgba(7,9,14,0.78));
  border: 1px solid var(--border-faint);
  box-shadow: var(--inset-top), var(--shadow-lg);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  animation: gt-pop 0.4s var(--ease);
}
/* Schlankes Hauptmenü/kleine Dialoge ohne „Box im Box"-Look: rahmenlos. */
.gt-menu.gt-main { background: none; border: none; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }

.gt-menu h2 { font-family: var(--font-head); font-size: clamp(1.5rem, 4.5vw, 1.9rem);
  font-weight: 700; color: var(--gold-bright); letter-spacing: 0.08em; line-height: 1.15; }
.gt-menu h3 { font-family: var(--font-head); color: var(--gold); letter-spacing: 0.03em; margin-bottom: var(--sp-2); }
.gt-sub2 { color: var(--ink-dim); margin-top: calc(-1 * var(--sp-2)); font-size: 0.92rem; }

.gt-logo { margin-bottom: var(--sp-1); }
/* Grund-Typografie des Titels. Optik (Gold-Verlauf, Glühen) kommt aus dem
   „Metallic-Titel"-Block am Dateiende und überschreibt color/text-shadow/animation. */
.gt-title {
  font-family: var(--font-head); font-weight: 900; font-size: clamp(3rem, 9vw, 6rem);
  letter-spacing: 0.16em; line-height: 1.05;
}
.gt-sub { font-family: var(--font-head); letter-spacing: 0.28em; color: var(--ink-dim);
  font-size: 0.85rem; margin-top: calc(-1 * var(--sp-1)); text-transform: uppercase; }
.gt-lore { color: var(--ink-dim); max-width: 560px; line-height: 1.65; font-size: 0.95rem; }
.gt-btncol { display: flex; flex-direction: column; gap: var(--sp-3); margin-top: var(--sp-2);
  width: 100%; max-width: 320px; align-items: stretch; }
.gt-btncol .gt-btn { width: 100%; }
.gt-foot { color: var(--ink-faint); font-size: 0.78rem; letter-spacing: 0.04em; }
.gt-hint { color: var(--ink-dim); font-size: 0.82rem; line-height: 1.5; max-width: 460px; opacity: 0.85; }

.gt-dead { font-family: var(--font-head); font-weight: 900; font-size: clamp(3rem, 10vw, 6rem);
  color: var(--blood); letter-spacing: 0.2em; text-shadow: 0 0 30px rgba(181,48,48,0.6); animation: gt-glow 2.5s ease-in-out infinite; }
.gt-win { font-family: var(--font-head); font-weight: 900; font-size: clamp(3rem, 10vw, 6rem);
  color: var(--teal); letter-spacing: 0.2em; text-shadow: 0 0 30px rgba(95,224,192,0.5); animation: gt-glow 2.5s ease-in-out infinite; }

/* ========================== Charakterauswahl =========================== */
/* Responsiv: füllt die Breite mit so vielen Karten wie passen; das Gitter
   scrollt INTERN, damit Titel/Schwierigkeit/Zurück immer sichtbar bleiben und
   der Bildschirm sich nie „in die Länge zieht" (Handy/Tablet/PC). */
.gt-char-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: var(--sp-3); width: 100%; align-content: start;
  max-height: min(64vh, 620px); overflow-y: auto; overflow-x: hidden;
  padding: var(--sp-1) var(--sp-2) var(--sp-1) 0;
  scroll-behavior: smooth;
}
/* Hinweis: KEIN overflow:hidden hier — als Grid-/Flex-Kind würde dadurch
   min-height:auto auf 0 fallen und die Karten in flachen Gittern (niedrige Höhe)
   auf eine Zeile zusammenfallen. Der Akzentstreifen wird stattdessen eingerückt. */
.gt-char-card {
  position: relative;
  background: linear-gradient(180deg, var(--panel-hi), var(--panel-lo));
  border: 1px solid var(--border-soft); border-radius: var(--radius);
  padding: var(--sp-3) var(--sp-3) 14px; cursor: pointer; text-align: center;
  box-shadow: var(--inset-top), var(--shadow-sm);
  display: flex; flex-direction: column; align-items: center; gap: var(--sp-1);
  transition: transform var(--t-fast), border-color var(--t-mid), box-shadow var(--t-mid);
}
.gt-char-card:hover { transform: translateY(-4px); border-color: var(--gold);
  box-shadow: var(--inset-top), 0 10px 26px rgba(0,0,0,0.55), 0 0 16px var(--gold-glow); }
.gt-char-card:focus-visible { outline: none; border-color: var(--gold-bright); box-shadow: var(--ring-gold); }
.gt-char-card.locked { opacity: 0.55; cursor: not-allowed; filter: grayscale(0.7); }
.gt-char-card.locked:hover { transform: none; border-color: var(--border-soft);
  box-shadow: var(--inset-top), var(--shadow-sm); }
/* Ausgewählt — goldener Rahmen + Lichtschein + feiner Kopfstreifen. */
.gt-char-card.on { border-color: var(--gold);
  box-shadow: var(--inset-top), 0 0 0 1px var(--gold), 0 0 18px var(--gold-glow); }
.gt-char-card.on::before {   /* eingerückt, damit er die runden Ecken nicht überragt */
  content: ''; position: absolute; left: var(--sp-3); right: var(--sp-3); top: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold-bright), transparent);
}
.gt-char-glyph { font-size: 2.3rem; line-height: 1; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5)); }
.gt-char-card h3 { margin: var(--sp-2) 0 var(--sp-1); color: var(--gold-bright); font-size: 1.05rem; letter-spacing: 0.02em; }
.gt-char-desc { color: var(--ink-dim); font-size: 0.8rem; line-height: 1.45; min-height: 48px; }
.gt-char-start { color: var(--teal); font-size: 0.72rem; margin-top: var(--sp-1); letter-spacing: 0.02em; }
.gt-char-gimmick { color: var(--gold); font-size: 0.7rem; line-height: 1.3; margin-top: 3px; font-weight: 600; }

/* Auf breiten Schirmen das Auswahl-Menü verbreitern → mehr Spalten, weniger Scrollen.
   Inhalt bleibt aber „zusammen": die Karten wachsen nicht ins Riesige.
   width:100% nötig, weil .gt-menu sonst als Flex-Kind nur inhaltsbreit wird. */
@media (min-width: 900px) {
  .gt-menu:has(.gt-char-grid) { width: 100%; max-width: min(1080px, 92vw); }
  .gt-char-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
}
/* Tablet/iPad: etwas größere Mindestbreite → gleichmäßige Spalten. */
@media (min-width: 768px) and (max-width: 1024px) {
  .gt-char-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
}
/* Handy (≤480): zwei kompakte Spalten, kleinere Beschreibung. */
@media (max-width: 480px) {
  .gt-char-grid { grid-template-columns: repeat(2, 1fr); gap: var(--sp-2); max-height: 58vh; }
  .gt-char-desc { min-height: 0; font-size: 0.76rem; }
  .gt-char-glyph { font-size: 2rem; }
}
/* Sehr schmale Handys (≤340): eine Spalte, damit nichts gequetscht wird. */
@media (max-width: 340px) {
  .gt-char-grid { grid-template-columns: 1fr; }
}
/* Sehr niedrige (Querformat-Handy) Schirme: kompaktere Karten → mehr passen
   sichtbar ins flache Gitter; der Rest scrollt intern. */
@media (max-height: 560px) {
  .gt-char-grid { max-height: 58vh; gap: var(--sp-2);
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .gt-char-card { padding: var(--sp-2) var(--sp-2) var(--sp-3); }
  .gt-char-glyph { font-size: 1.7rem; }
  .gt-char-card h3 { margin: var(--sp-1) 0 2px; font-size: 0.95rem; }
  .gt-char-desc { min-height: 0; font-size: 0.74rem; line-height: 1.35; }
  .gt-char-start { font-size: 0.68rem; margin-top: 2px; }
  /* Auch hier Menü auf volle Breite, damit mehr Spalten entstehen. */
  .gt-menu:has(.gt-char-grid) { width: 100%; max-width: min(900px, 94vw); }
}

/* ============================== Level-Up =============================== */
.gt-levelup-title { color: var(--gold-bright); animation: gt-glow 2s ease-in-out infinite; }
.gt-up-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--sp-4); width: 100%; max-width: 760px; }
.gt-up-card {
  position: relative;   /* kein overflow:hidden (siehe Hinweis bei .gt-char-card) */
  background: linear-gradient(180deg, #1c2030, #12151f); border: 1px solid var(--border);
  border-radius: var(--radius); padding: var(--sp-5) var(--sp-4); cursor: pointer; text-align: center;
  box-shadow: var(--inset-top), var(--shadow-md);
  transition: transform var(--t-fast), border-color var(--t-mid), box-shadow var(--t-mid);
}
.gt-up-card:hover { transform: translateY(-4px) scale(1.03); border-color: var(--gold-bright);
  box-shadow: var(--inset-top), 0 12px 30px rgba(0,0,0,0.55), 0 0 22px var(--gold-glow); }
.gt-up-card:focus-visible { outline: none; border-color: var(--gold-bright); box-shadow: var(--ring-gold); }
.gt-up-card::before {   /* dezenter goldener Kopfstreifen (eingerückt für runde Ecken) */
  content: ''; position: absolute; left: var(--sp-4); right: var(--sp-4); top: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent); opacity: 0.6;
}
.gt-up-glyph { font-size: 2.2rem; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5)); }
.gt-up-card h3 { margin: var(--sp-2) 0 var(--sp-1); color: var(--ink); font-size: 1.05rem; letter-spacing: 0.02em; }
.gt-up-card p { color: var(--ink-dim); font-size: 0.82rem; line-height: 1.45; }

/* =============================== Shop ================================== */
.gt-panel { position: relative;
  background: linear-gradient(180deg, #11141d, var(--panel-solid));
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--inset-top), var(--shadow-lg);
  width: min(960px, 96vw); max-height: 92vh; overflow: auto; padding: var(--sp-4) var(--sp-5);
  animation: gt-pop 0.3s var(--ease); }
.gt-shop-top { display: flex; justify-content: space-between; align-items: center; gap: var(--sp-3);
  margin-bottom: var(--sp-4); padding-bottom: var(--sp-3); border-bottom: 1px solid var(--border-faint); flex-wrap: wrap; }
.gt-shop-top h2 { font-family: var(--font-head); color: var(--gold-bright); font-size: clamp(1.2rem, 4vw, 1.4rem); letter-spacing: 0.04em; }
.gt-shop-ess { font-family: var(--font-head); font-size: clamp(1.25rem, 4.5vw, 1.5rem); color: var(--teal);
  text-shadow: 0 0 12px var(--teal-glow); white-space: nowrap; }
.gt-offers { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--sp-3); }
.gt-offer { background: linear-gradient(180deg, var(--panel-hi), var(--panel-lo));
  border: 2px solid var(--border-soft); border-radius: var(--radius);
  box-shadow: var(--inset-top), var(--shadow-sm);
  padding: var(--sp-3); display: flex; flex-direction: column; gap: var(--sp-2); min-height: 170px;
  transition: border-color var(--t-mid), box-shadow var(--t-mid), transform var(--t-fast); }
.gt-offer:hover { border-color: var(--border); transform: translateY(-2px);
  box-shadow: var(--inset-top), var(--shadow-md); }
.gt-offer.empty { align-items: center; justify-content: center; color: var(--ink-faint); font-style: italic;
  border-style: dashed; background: rgba(0,0,0,0.2); box-shadow: none; }
.gt-offer.empty:hover { transform: none; border-color: var(--border-soft); box-shadow: none; }
.gt-offer-head { display: flex; gap: var(--sp-3); align-items: center; }
.gt-offer-glyph { font-size: 1.9rem; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5)); }
.gt-offer-name { font-family: var(--font-head); font-weight: 700; color: var(--ink); }
.gt-offer-kind { color: var(--ink-dim); font-size: 0.74rem; letter-spacing: 0.03em; text-transform: uppercase; }
.gt-offer-stats { flex: 1; color: #b6d6a0; font-size: 0.82rem; line-height: 1.55; }
.gt-offer-stats .gt-set { color: var(--ink-dim); }
.gt-offer-foot { display: flex; gap: var(--sp-2); justify-content: space-between; align-items: center; }
.gt-shop-actions { display: flex; flex-direction: column; gap: var(--sp-3); margin-top: var(--sp-4); align-items: center; }
.gt-owned-row { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; justify-content: center; }
.gt-owned-label { color: var(--ink-dim); font-size: 0.85rem; }
.gt-owned { display: flex; flex-direction: column; align-items: center; gap: var(--sp-1);
  background: rgba(0,0,0,0.3); border: 1px solid var(--border-soft); border-radius: var(--radius-sm); padding: var(--sp-1) var(--sp-2); }
.gt-combine-row { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; justify-content: center; }

/* ============================ Einstellungen =========================== */
.gt-box { background: linear-gradient(180deg, var(--panel-hi), var(--panel-lo));
  border: 1px solid var(--border-soft); border-radius: var(--radius);
  box-shadow: var(--inset-top), var(--shadow-sm);
  padding: var(--sp-4); width: min(440px, 90vw); text-align: left; }
.gt-box > h3:first-child { margin-top: 0; }
.gt-setting { display: flex; align-items: center; gap: var(--sp-3); margin: var(--sp-2) 0; min-height: 32px; }
.gt-setting label { flex: 1; font-size: 0.9rem; color: var(--ink); }
.gt-setting input[type="range"] { flex: 1.3; accent-color: var(--gold); cursor: pointer; height: 4px; }
.gt-setting input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--gold); cursor: pointer; }
.gt-sld-val { width: 46px; text-align: right; color: var(--gold); font-size: 0.85rem;
  font-variant-numeric: tabular-nums; font-family: var(--font-head); }

/* ============================ Animationen ============================= */
@keyframes gt-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes gt-pop { from { opacity: 0; transform: translateY(14px) scale(0.97); } to { opacity: 1; transform: none; } }
@keyframes gt-glow {
  0%, 100% { text-shadow: 0 0 18px rgba(201,161,74,0.35), 0 4px 0 #000; }
  50% { text-shadow: 0 0 34px rgba(201,161,74,0.65), 0 4px 0 #000; }
}

/* ===================== Schwierigkeit & Stats-Panel ==================== */
.gt-diff-label { color: var(--ink-dim); font-size: 0.85rem; margin-top: calc(-1 * var(--sp-1)); }
.gt-diffrow { display: flex; gap: var(--sp-2); flex-wrap: wrap; justify-content: center; }
.gt-statsbox { background: linear-gradient(180deg, var(--panel-hi), var(--panel-lo));
  border: 1px solid var(--border-soft); border-radius: var(--radius);
  box-shadow: var(--inset-top), var(--shadow-sm);
  padding: var(--sp-3) var(--sp-4); width: 100%; max-width: 640px; text-align: left; margin: var(--sp-1) auto 0; }
.gt-statsbox h3 { font-family: var(--font-head); color: var(--gold); margin-bottom: var(--sp-2);
  font-size: 0.95rem; letter-spacing: 0.03em; }
.gt-stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px var(--sp-5); }
.gt-stat-row { display: flex; justify-content: space-between; gap: var(--sp-3); font-size: 0.82rem; color: var(--ink-dim);
  border-bottom: 1px dotted var(--border-faint); padding: var(--sp-1) 0; }
.gt-stat-v { color: var(--ink); font-variant-numeric: tabular-nums; }

/* ============================ Profil-Editor ========================== */
.gt-profile-preview { font-family: var(--font-head); font-size: 1.7rem; letter-spacing: 0.05em;
  text-shadow: 0 0 14px currentColor; }
.gt-input { font-family: var(--font-body); font-size: 1rem; padding: 10px var(--sp-3); width: 100%; margin-top: var(--sp-1);
  background: #12151f; border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--ink);
  transition: border-color var(--t-mid), box-shadow var(--t-mid); }
.gt-input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold-glow); }
.gt-input::placeholder { color: var(--ink-faint); }
.gt-swatches, .gt-emblems { display: flex; gap: var(--sp-2); flex-wrap: wrap; }
.gt-swatch { width: 34px; height: 34px; border-radius: 50%; border: 2px solid rgba(0,0,0,0.4);
  cursor: pointer; box-shadow: var(--inset-top), 0 2px 6px rgba(0,0,0,0.4);
  transition: transform var(--t-fast), box-shadow var(--t-mid); }
.gt-swatch:hover { transform: scale(1.08); }
.gt-swatch.on { border-color: #fff; box-shadow: 0 0 0 2px rgba(255,255,255,0.6), 0 0 12px rgba(255,255,255,0.45); }
.gt-emblem { display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; width: 42px; height: 42px; background: #12151f; border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm); cursor: pointer; transition: transform var(--t-fast), border-color var(--t-mid), box-shadow var(--t-mid); }
.gt-emblem:hover { transform: translateY(-2px); border-color: var(--gold); }
.gt-emblem.on { border-color: var(--gold); box-shadow: var(--inset-top), 0 0 12px var(--gold-glow), inset 0 0 0 1px rgba(201,161,74,0.4); }

/* ---- Lobby-Slots (Mehrspieler-Team) ---------------------------------- */
.gt-slots { display: flex; flex-direction: column; gap: var(--sp-2); width: 100%; }
.gt-slot { display: flex; align-items: center; gap: var(--sp-3);
  background: rgba(0,0,0,0.28); border: 1px solid var(--border-soft); border-radius: var(--radius-sm);
  padding: var(--sp-2) var(--sp-3); box-shadow: var(--inset-top); }
.gt-slot-info { display: flex; flex-direction: column; gap: 1px; min-width: 0; text-align: left; }
.gt-slot-info strong { font-family: var(--font-head); letter-spacing: 0.02em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gt-slot-info span { color: var(--ink-dim); font-size: 0.74rem; letter-spacing: 0.04em; text-transform: uppercase; }

@media (max-width: 640px) { .gt-btn.big { min-width: 200px; } .gt-stats-grid { grid-template-columns: 1fr; } }

/* ============================== Bestenliste ============================ */
.gt-lb { width: min(640px, 96vw); }
.gt-lb-stats { display: flex; gap: 12px; width: 100%; }
.gt-lb-stat {
  flex: 1; display: flex; flex-direction: column; gap: 2px; padding: 12px 14px;
  background: linear-gradient(180deg, rgba(201,161,74,0.14), rgba(0,0,0,0.28));
  border: 1px solid var(--border-soft); border-radius: var(--radius);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}
.gt-lb-stat b { font-family: var(--font-head); font-size: 1.5rem; color: var(--gold-bright); line-height: 1; }
.gt-lb-stat span { color: var(--ink-dim); font-size: 0.74rem; letter-spacing: 0.05em; text-transform: uppercase; }
.gt-lb-list { display: flex; flex-direction: column; gap: var(--sp-1); width: 100%; max-height: 54vh;
  overflow: auto; padding-right: var(--sp-1); scroll-behavior: smooth; }
.gt-lb-row {
  display: grid; grid-template-columns: 42px 34px 1fr auto; align-items: center; gap: var(--sp-3);
  background: var(--panel); border: 1px solid var(--border-soft); border-radius: var(--radius-sm);
  padding: var(--sp-2) var(--sp-3); text-align: left;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04); transition: border-color var(--t-mid), transform var(--t-mid), box-shadow var(--t-mid);
}
.gt-lb-row:hover { border-color: var(--border); transform: translateX(2px); }
.gt-lb-row.top { border-color: var(--border); background: linear-gradient(90deg, rgba(201,161,74,0.18), var(--panel) 62%); }
.gt-lb-row.me { border-color: var(--teal); box-shadow: inset 0 0 0 1px rgba(95,224,192,0.35); }
.gt-lb-rank { font-family: var(--font-head); font-size: 1.05rem; color: var(--gold); text-align: center; }
.gt-lb-row.top .gt-lb-rank { font-size: 1.5rem; }
.gt-lb-emblem { font-size: 1.4rem; text-align: center; }
.gt-lb-info { display: flex; flex-direction: column; min-width: 0; }
.gt-lb-info strong { color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gt-lb-info span { color: var(--ink-dim); font-size: 0.74rem; }
.gt-lb-score { font-family: var(--font-head); font-size: 1.15rem; color: var(--teal); white-space: nowrap; text-shadow: 0 0 10px var(--teal-glow); }
.gt-empty { color: var(--ink-dim); font-style: italic; padding: var(--sp-6); }

/* Sortier-/Filter-Steuerleiste der Bestenliste */
.gt-lb-controls { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; width: 100%; }
.gt-lb-select {
  font-family: var(--font-body); font-size: 0.84rem; padding: 7px 10px; cursor: pointer;
  background: #12151f; color: var(--ink); border: 1px solid var(--border); border-radius: 8px;
}
.gt-lb-select:hover { border-color: var(--gold); }
@media (pointer: coarse) { .gt-lb-select { padding: 10px 12px; font-size: 0.9rem; } }

/* Bestenliste auf Handy: Statistik-Kacheln untereinander, Zeilen kompakter. */
@media (max-width: 480px) {
  .gt-lb-stats { flex-direction: column; gap: var(--sp-2); }
  .gt-lb-stat { flex-direction: row; align-items: baseline; justify-content: space-between; padding: var(--sp-2) var(--sp-3); }
  .gt-lb-row { grid-template-columns: 32px 28px 1fr auto; gap: var(--sp-2); padding: var(--sp-2); }
  .gt-lb-rank { font-size: 0.95rem; }
  .gt-lb-row.top .gt-lb-rank { font-size: 1.25rem; }
  .gt-lb-score { font-size: 1.02rem; }
}

/* ===================== Responsive: In-Game-Overlays =================== */
/* Level-Up & Shop tauchen mitten im Spiel auf (Handy ist dann im Querformat).
   Kompaktere Paddings/Spalten, damit alle 4 Karten ohne Abschneiden passen. */
@media (max-width: 480px) {
  .gt-up-grid { grid-template-columns: repeat(2, 1fr); gap: var(--sp-2); }
  .gt-up-card { padding: var(--sp-4) var(--sp-3); }
  .gt-offers { grid-template-columns: repeat(2, 1fr); gap: var(--sp-2); }
  .gt-offer { min-height: 0; }
  .gt-panel { padding: var(--sp-3) var(--sp-3); }
}
/* Niedrige Höhe (Querformat-Handy): Karten flacher, Glyphen kleiner. */
@media (max-height: 560px) {
  .gt-up-grid { grid-template-columns: repeat(4, 1fr); }
  .gt-up-card { padding: var(--sp-3) var(--sp-2); }
  .gt-up-glyph, .gt-offer-glyph { font-size: 1.7rem; }
  .gt-up-card p { font-size: 0.78rem; }
  .gt-offer { min-height: 0; }
  .gt-shop-actions { margin-top: var(--sp-2); gap: var(--sp-2); }
  /* Shop-Kopf von der fixierten Steuerleiste (oben rechts) freihalten,
     damit Essenz-Anzeige nicht hinter Vollbild/Pause rutscht. */
  .gt-shop-top { padding-right: 104px; }
}

/* ==================== Politur: Tiefe, Glanz & Textur ================== */
/* Hinweis: Tiefe/Glanz/Hover der Buttons & Karten sind jetzt direkt in den
   jeweiligen Basis-Regeln definiert (oben). Hier verbleiben nur Effekte, die
   sich nicht sauber dort unterbringen lassen. */

/* Goldener Akzentstreifen oben am Shop-Panel. */
.gt-panel { position: relative; }
.gt-panel::before {
  content: ''; position: absolute; left: var(--sp-3); right: var(--sp-3); top: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent); opacity: 0.55;
}

/* Metallic-Titel (Gold-Verlauf im Text). Wichtig: KEIN text-shadow hier — der
   würde sich mit dem drop-shadow zu einem rechteckigen „Kasten"-Halo addieren.
   Stattdessen nur ein eng anliegender drop-shadow, der die Buchstaben umschmiegt. */
.gt-title {
  background: linear-gradient(180deg, #ffe9a8 0%, #e8c14a 46%, #b9892f 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  text-shadow: none;
  filter: drop-shadow(0 2px 1px rgba(0,0,0,0.6)) drop-shadow(0 0 9px rgba(201,161,74,0.32));
  animation: gt-title-pulse 3.6s ease-in-out infinite;
}
@keyframes gt-title-pulse {
  0%, 100% { filter: drop-shadow(0 2px 1px rgba(0,0,0,0.6)) drop-shadow(0 0 7px rgba(201,161,74,0.28)); }
  50% { filter: drop-shadow(0 2px 1px rgba(0,0,0,0.6)) drop-shadow(0 0 15px rgba(232,193,74,0.45)); }
}

/* ============================================================================
 *  SMARTPHONE-QUERFORMAT (sehr niedrige Höhe ≤ 500px) — kompakter als iPad.
 *  Muss am DATEI-ENDE stehen, damit es die frühere `.gt-title`-Größe in ui.css
 *  überschreibt (sonst bleibt der Titel riesig und drückt alles aus dem Bild).
 *  Greift NICHT auf iPads (Querformat ≥ ~744px hoch).
 * ========================================================================== */
@media (max-height: 500px) {
  /* Menü-Rahmen flacher, Platz unten für den fixen Rechts-Footer. */
  .gt-menu { padding: 8px 18px 22px; gap: 6px; max-height: 100vh; }
  .gt-menu h2 { font-size: 1.3rem; letter-spacing: 0.05em; }
  .gt-menu h3 { font-size: 0.92rem; margin-bottom: 4px; }
  .gt-logo { margin-bottom: 0; }
  .gt-title { font-size: clamp(1.5rem, 8.5vh, 2.4rem); letter-spacing: 0.1em; }
  .gt-sub { font-size: 0.6rem; letter-spacing: 0.2em; }
  .gt-sub2 { font-size: 0.74rem; margin-top: -2px; }
  .gt-lore, .gt-foot, .gt-hint { display: none; }   /* Fließtext/Statistik weglassen */

  /* Buttons kompakt, aber touch-tauglich. */
  .gt-btncol { gap: 6px; margin-top: 2px; }
  .gt-btn.big { padding: 9px 18px; font-size: 0.9rem; min-width: 150px; min-height: 40px; }

  /* Heldenwahl: mehr Karten sichtbar, flacher. */
  .gt-diff-label { font-size: 0.7rem; margin: 0; }
  .gt-char-grid { max-height: 56vh; gap: 7px; }
  .gt-char-card { padding: 7px 8px; gap: 0; }
  .gt-char-glyph { font-size: 1.7rem; }
  .gt-char-card h3 { font-size: 0.92rem; margin: 3px 0 2px; }
  .gt-char-desc { min-height: 0; font-size: 0.72rem; line-height: 1.25; }
  .gt-char-start, .gt-char-gimmick { font-size: 0.64rem; margin-top: 1px; }

  /* Shop / Panels flacher. */
  .gt-panel { padding: 8px 12px 22px; max-height: 98vh; }
  .gt-box { padding: 10px 12px; }
  .gt-statsbox { padding: 8px 10px; }

  /* Bestenliste: Liste bekommt die meiste Höhe, Steuerleiste schmaler. */
  .gt-lb-list { max-height: 42vh; }
  .gt-lb-select { padding: 6px 8px; font-size: 0.78rem; }
  .gt-lb-stats { gap: 6px; }
  .gt-lb-stat { padding: 6px 10px; }
  .gt-lb-stat b { font-size: 1.1rem; }

  /* Profil / Skin-Baukasten kompakter. */
  .gt-skinbuilder { gap: 10px; padding: 8px; }
  .gt-skinbuilder-prev canvas { width: 72px; height: 72px; }
  .gt-skins { grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); }
  .gt-skin canvas, .gt-skin-prev { width: 44px; height: 44px; }

  /* Lobby-Figuren kleiner. */
  .gt-lobby-stage { width: 66px; height: 66px; }
  .gt-lobby-stage canvas { width: 66px; height: 66px; }

  /* Pflicht-Links dezenter, damit sie nicht stören. */
  .gt-legal { font-size: 10px; bottom: 2px; }
}
