/* ==========================================================================
   Wort-Flitzer – Stylesheet (100 % lokal, abgestimmt auf shared/theme.css)
   ========================================================================== */

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden;
    font-family: var(--le-font-sans);
    color: var(--le-ink);
    background: var(--le-bg);
    -webkit-tap-highlight-color: transparent;
}

.wf-shell {
    display: flex;
    flex-direction: column;
    height: 100dvh;
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
}

.mono {
    font-family: var(--le-font-mono);
}

/* --- TOP HUD --- */
.wf-hud-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 14px;
    background: var(--le-surface);
    border-bottom: 1px solid var(--le-border);
    z-index: 15;
    flex-shrink: 0;
}

.wf-hud-left,
.wf-hud-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.wf-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--le-bg-soft);
    border: 1px solid var(--le-border);
    font-size: 0.88rem;
    font-weight: 800;
}

.wf-score-pill {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1e3a8a;
}

.wf-battle-pill {
    background: linear-gradient(135deg, #1e1b4b, #7c2d12);
    border-color: #f97316;
    color: #fef08a;
    letter-spacing: 0.02em;
}

.wf-ability-pill {
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 900;
    background: #fef3c7;
    border: 1.5px solid #f59e0b;
    color: #78350f;
    white-space: nowrap;
}

.wf-ability-pill.is-ready {
    background: #dcfce7;
    border-color: #16a34a;
    color: #14532d;
}

.wf-ability-pill.is-cooling {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #64748b;
}

.wf-timer-pill {
    background: var(--le-amber-soft);
    border-color: #fcd34d;
    color: #92400e;
}

.wf-icon-btn {
    min-width: 44px;
    min-height: 44px;
    padding: 0 12px;
    border-radius: 12px;
    border: 1px solid var(--le-border);
    background: var(--le-surface-alt);
    color: var(--le-ink);
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: transform 0.12s ease, background 0.15s ease;
}

.wf-icon-btn:hover {
    background: var(--le-bg-soft);
}

.wf-icon-btn[aria-pressed="true"] {
    background: var(--le-blue-soft);
    border-color: var(--le-blue);
    color: #075985;
}

/* --- BUCHSTABEN-SLOTS BAR --- */
.wf-slots-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 14px;
    background: linear-gradient(180deg, #ffffff 0%, #faf6ec 100%);
    border-bottom: 1px solid var(--le-border);
    flex-shrink: 0;
    z-index: 12;
}

.wf-player-slots {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
    flex-wrap: wrap;
}

.wf-player-slots.p2 {
    justify-content: flex-end;
}

.wf-player-tag {
    font-size: 0.84rem;
    font-weight: 900;
    white-space: nowrap;
}

.wf-letter-row {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

.wf-slot {
    width: 32px;
    height: 36px;
    border-radius: 9px;
    border: 2px solid var(--le-border-strong);
    background: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 1.05rem;
    color: var(--le-ink);
    transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.wf-slot.is-current {
    border-color: var(--le-blue);
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.18);
    transform: translateY(-1px);
}

.wf-player-slots.p2 .wf-slot.is-current {
    border-color: #ea580c;
    box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.18);
}

.wf-slot.is-filled {
    background: var(--le-green-soft);
    border-color: var(--le-green);
    color: #14532d;
}

.wf-round-badge {
    padding: 5px 12px;
    border-radius: 999px;
    background: var(--le-ink);
    color: #ffffff;
    font-size: 0.82rem;
    font-weight: 800;
    white-space: nowrap;
}

.wf-solo-timer {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 18px;
    border-radius: 14px;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border: 2.5px solid #d97706;
    color: #78350f;
    font-size: clamp(1.15rem, 2.5vw, 1.5rem);
    font-weight: 900;
    letter-spacing: 0.02em;
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.22);
    white-space: nowrap;
}

.wf-solo-timer.is-warning {
    background: linear-gradient(135deg, #fed7aa, #fdba74);
    border-color: #ea580c;
    color: #7c2d12;
}

.wf-solo-timer.is-urgent {
    background: linear-gradient(135deg, #fecaca, #fca5a5);
    border-color: #dc2626;
    color: #7f1d1d;
    animation: wfTimerPulse 0.65s ease-in-out infinite alternate;
}

.wf-solo-timer.is-frozen {
    background: linear-gradient(135deg, #e0f2fe, #bae6fd);
    border-color: #0284c7;
    color: #0c4a6e;
    animation: none;
}

@keyframes wfTimerPulse {
    from { transform: scale(1); }
    to { transform: scale(1.07); }
}

/* --- ARENA --- */
.wf-arena-wrap {
    position: relative;
    flex: 1;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e2e8f0;
    overflow: hidden;
}

.wf-canvas {
    width: 100%;
    height: 100%;
    display: block;
    touch-action: none;
}

/* --- 3-SEKUNDEN-MERKE-BANNER --- */
.wf-memorize-banner {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.34);
    backdrop-filter: blur(2px);
    z-index: 10;
    padding: 16px;
    pointer-events: none;
}

.wf-memorize-card {
    background: #ffffff;
    border: 3px solid var(--le-amber);
    border-radius: 24px;
    padding: 20px 30px;
    text-align: center;
    box-shadow: var(--le-shadow-md);
    min-width: min(420px, 92vw);
    animation: wfPopIn 0.22s ease;
}

.wf-memorize-card.is-battle {
    background: linear-gradient(135deg, #0f172a 0%, #312e81 60%, #431407 100%);
    border: 3.5px solid #f97316;
    box-shadow: 0 14px 36px rgba(249, 115, 22, 0.36);
}

.wf-memorize-card.is-battle .wf-memorize-eyebrow {
    color: #fb923c;
}

.wf-memorize-card.is-battle .wf-memorize-word {
    color: #ffffff;
    text-shadow: 0 2px 12px rgba(250, 204, 21, 0.35);
}

.wf-memorize-card.is-battle .wf-memorize-hint {
    color: #cbd5e1;
}

.wf-memorize-card.is-battle .wf-memorize-bar-wrap {
    background: rgba(255, 255, 255, 0.18);
}

.wf-memorize-card.is-battle .wf-memorize-count {
    color: #fde047;
}

.wf-memorize-eyebrow {
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--le-amber);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.wf-memorize-word {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 900;
    letter-spacing: 0.14em;
    color: var(--le-ink);
    margin: 6px 0 4px;
}

.wf-memorize-hint {
    font-size: 0.95rem;
    color: var(--le-ink-muted);
    font-weight: 700;
    margin-bottom: 12px;
}

.wf-memorize-bar-wrap {
    width: 100%;
    height: 10px;
    border-radius: 999px;
    background: var(--le-bg-soft);
    overflow: hidden;
    margin-bottom: 8px;
}

.wf-memorize-bar {
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, #16a34a, #f59e0b);
    transition: width 0.06s linear;
}

.wf-memorize-count {
    font-size: 0.92rem;
    font-weight: 900;
    color: var(--le-ink);
}

.wf-round-toast {
    position: absolute;
    top: 18px;
    left: 50%;
    transform: translateX(-50%);
    padding: 10px 20px;
    border-radius: 999px;
    background: #0f172a;
    color: #ffffff;
    font-weight: 900;
    font-size: 1rem;
    box-shadow: var(--le-shadow-md);
    z-index: 11;
    pointer-events: none;
}

/* --- VIRTUELLE TOUCH-JOYSTICKS --- */
.wf-touch-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 12;
}

.wf-joystick {
    position: absolute;
    bottom: 18px;
    pointer-events: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

.wf-joystick.p1 {
    left: 18px;
}

.wf-joystick.p2 {
    right: 18px;
}

.wf-joy-base {
    width: 112px;
    height: 112px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.42);
    border: 3px solid rgba(2, 132, 199, 0.72);
    backdrop-filter: blur(4px);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wf-joystick.p2 .wf-joy-base {
    border-color: rgba(234, 88, 12, 0.78);
}

.wf-joy-knob {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #0284c7;
    border: 3px solid #ffffff;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.25);
    transform: translate(0, 0);
}

.wf-joystick.p2 .wf-joy-knob {
    background: #ea580c;
}

.wf-joy-label {
    font-size: 0.75rem;
    font-weight: 900;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.85);
}

.wf-touch-ability-btn {
    position: absolute;
    bottom: 42px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 3px solid #ffffff;
    background: linear-gradient(135deg, #f97316, #eab308);
    color: #ffffff;
    font-size: 1.4rem;
    font-weight: 900;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.32);
    pointer-events: auto;
    touch-action: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wf-touch-ability-btn.p1 {
    left: 144px;
}

.wf-touch-ability-btn.p2 {
    right: 144px;
}

.wf-touch-ability-btn.is-cooling {
    opacity: 0.45;
    filter: grayscale(0.7);
}

.wf-shop-ability {
    font-size: 0.76rem;
    font-weight: 800;
    padding: 4px 8px;
    border-radius: 9px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #9a3412;
}

/* --- OVERLAYS & GAMING-MENÜ --- */
.wf-overlay {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at 20% 15%, rgba(2, 132, 199, 0.35), rgba(15, 23, 42, 0.72));
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px;
    z-index: 30;
    overflow-y: auto;
}

.wf-card {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 26px;
    border: 2px solid rgba(255, 255, 255, 0.85);
    box-shadow: 0 22px 50px rgba(15, 23, 42, 0.35);
    padding: 22px;
    width: 100%;
    max-height: 93dvh;
    overflow-y: auto;
    animation: wfPopIn 0.18s ease;
}

.wf-menu-card {
    padding: 0 22px 22px;
    border: 3px solid #38bdf8;
    background: linear-gradient(180deg, #f0f9ff 0%, #ffffff 28%, #f8fafc 100%);
}

.wf-menu-card.is-battle-theme {
    border-color: #f97316;
    background: linear-gradient(180deg, #fff7ed 0%, #ffffff 30%, #faf5ff 100%);
}

.wf-menu-hero {
    margin: 0 -22px 14px;
    padding: 18px 22px 16px;
    background: linear-gradient(135deg, #0284c7 0%, #0d9488 55%, #16a34a 100%);
    color: #ffffff;
    border-bottom: 4px solid #fde047;
    position: relative;
    overflow: hidden;
}

.wf-menu-hero::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 84px;
    height: 100%;
    opacity: 0.14;
    background-image: repeating-conic-gradient(#ffffff 0% 25%, transparent 0% 50%);
    background-size: 16px 16px;
    pointer-events: none;
}

.wf-menu-card.is-battle-theme .wf-menu-hero {
    background: linear-gradient(135deg, #1e1b4b 0%, #7c2d12 58%, #dc2626 100%);
    border-bottom-color: #fb923c;
}

.wf-card-wide {
    max-width: 850px;
}

.wf-card-narrow {
    max-width: 440px;
    text-align: center;
}

.wf-menu-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.wf-badge-pill {
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #ffffff;
    font-size: 0.82rem;
    font-weight: 800;
}

.wf-coins-pill {
    padding: 6px 14px;
    border-radius: 999px;
    background: linear-gradient(135deg, #fef08a, #facc15);
    border: 2px solid #ffffff;
    color: #78350f;
    font-size: 0.9rem;
    font-weight: 900;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.2);
}

.wf-title-block {
    margin: 10px 0 12px;
    position: relative;
    z-index: 1;
}

.wf-title-block h1 {
    margin: 0 0 4px;
    font-size: clamp(1.75rem, 3.6vw, 2.4rem);
    font-weight: 900;
    letter-spacing: 0.01em;
    color: #ffffff;
    text-shadow: 0 3px 10px rgba(15, 23, 42, 0.28);
}

.wf-menu-hero .wf-subtitle {
    color: rgba(255, 255, 255, 0.92);
}

.wf-subtitle,
.wf-modal-sub {
    margin: 0;
    color: var(--le-ink-muted);
    font-size: 0.94rem;
    line-height: 1.45;
}

.wf-quick-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 0;
    position: relative;
    z-index: 1;
}

.wf-quick-btn {
    min-height: 44px;
    padding: 8px 16px;
    border-radius: 14px;
    border: 2px solid rgba(255, 255, 255, 0.65);
    background: rgba(255, 255, 255, 0.92);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 900;
    color: #0f172a;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.16);
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.wf-quick-btn.is-garage {
    background: linear-gradient(135deg, #ffffff, #e0f2fe);
    color: #075985;
}

.wf-quick-btn.is-badges {
    background: linear-gradient(135deg, #ffffff, #fef3c7);
    color: #92400e;
}

.wf-quick-btn.is-music {
    background: linear-gradient(135deg, #ffffff, #dcfce7);
    color: #166534;
}

.wf-quick-btn.is-music.is-off {
    background: rgba(255, 255, 255, 0.72);
    color: #64748b;
}

.wf-quick-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.22);
}

.wf-section {
    margin-top: 14px;
}

.wf-section-label {
    font-size: 0.82rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #334155;
    margin-bottom: 8px;
}

.wf-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.wf-section-head .wf-section-label {
    margin-bottom: 0;
}

.wf-mix-pills {
    display: inline-flex;
    gap: 6px;
    flex-wrap: wrap;
}

.wf-mix-btn {
    min-height: 38px;
    padding: 6px 12px;
    border-radius: 999px;
    border: 2px solid #cbd5e1;
    background: #ffffff;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 800;
    color: #334155;
    cursor: pointer;
    transition: all 0.14s ease;
}

.wf-mix-btn.active {
    border-color: #0284c7;
    background: #e0f2fe;
    color: #075985;
}

.wf-mix-btn[data-wordmix="1"].active {
    border-color: #7c3aed;
    background: #ede9fe;
    color: #5b21b6;
}

.wf-seg-grid {
    display: grid;
    gap: 10px;
}

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

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

.wf-choice-card {
    min-height: 44px;
    padding: 12px 14px;
    border-radius: 16px;
    border: 2px solid var(--le-border);
    background: var(--le-surface);
    text-align: left;
    cursor: pointer;
    font-family: inherit;
    color: var(--le-ink);
    display: flex;
    flex-direction: column;
    gap: 3px;
    transition: border-color 0.14s ease, background 0.14s ease, transform 0.12s ease, box-shadow 0.14s ease;
}

.wf-choice-card:hover {
    transform: translateY(-1px);
    border-color: var(--le-blue);
}

/* Spielmodus-Farben */
.wf-choice-card[data-mode="duell"] {
    background: linear-gradient(135deg, #eff6ff 0%, #fff7ed 100%);
    border-color: #93c5fd;
}

.wf-choice-card[data-mode="duell"].active {
    border-color: #0284c7;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.22), 0 6px 16px rgba(2, 132, 199, 0.16);
}

.wf-choice-card[data-mode="solo"] {
    background: linear-gradient(135deg, #ecfdf5 0%, #e0f2fe 100%);
    border-color: #6ee7b7;
}

.wf-choice-card[data-mode="solo"].active {
    border-color: #0d9488;
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.22), 0 6px 16px rgba(13, 148, 136, 0.16);
}

/* Battle-Mode-Fenster deutlich als Battle gestaltet */
.wf-choice-card[data-battle="0"] {
    background: linear-gradient(135deg, #f0fdf4 0%, #eff6ff 100%);
    border-color: #86efac;
}

.wf-choice-card[data-battle="0"].active {
    border-color: #16a34a;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.22), 0 6px 16px rgba(22, 163, 74, 0.14);
}

.wf-choice-card[data-battle="1"] {
    background: linear-gradient(135deg, #1e1b4b 0%, #6b21a8 52%, #9a3412 100%);
    border-color: #f97316;
    color: #ffffff;
    position: relative;
    overflow: hidden;
}

.wf-choice-card[data-battle="1"] .wf-choice-title {
    color: #fde047;
}

.wf-choice-card[data-battle="1"] .wf-choice-sub {
    color: #e2e8f0;
}

.wf-choice-card[data-battle="1"].active {
    border-color: #fde047;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.38), 0 10px 24px rgba(249, 115, 22, 0.28);
}

/* Schwierigkeits-Farben */
.wf-choice-card.diff-leicht {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border-color: #86efac;
}

.wf-choice-card.diff-leicht.active {
    border-color: #16a34a;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.22);
}

.wf-choice-card.diff-mittel {
    background: linear-gradient(135deg, #fffbeb, #fef3c7);
    border-color: #fcd34d;
}

.wf-choice-card.diff-mittel.active {
    border-color: #d97706;
    box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.24);
}

.wf-choice-card.diff-profi {
    background: linear-gradient(135deg, #f5f3ff, #ede9fe);
    border-color: #c4b5fd;
}

.wf-choice-card.diff-profi.active {
    border-color: #7c3aed;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.24);
}

.wf-choice-icon {
    font-size: 1.35rem;
}

.wf-choice-title {
    font-weight: 900;
    font-size: 0.95rem;
}

.wf-choice-sub {
    font-size: 0.8rem;
    color: var(--le-ink-muted);
    line-height: 1.3;
}

.wf-map-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
    gap: 10px;
}

.wf-map-card {
    min-height: 44px;
    padding: 12px;
    border-radius: 16px;
    border: 2.5px solid var(--le-border);
    background: var(--le-surface);
    text-align: left;
    cursor: pointer;
    font-family: inherit;
    color: var(--le-ink);
    display: flex;
    flex-direction: column;
    gap: 5px;
    position: relative;
    transition: transform 0.12s ease, box-shadow 0.14s ease, border-color 0.14s ease;
}

.wf-map-card:hover {
    transform: translateY(-2px);
}

.wf-map-card.active {
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.28), 0 8px 18px rgba(15, 23, 42, 0.16);
}

.wf-map-card.locked {
    opacity: 0.86;
}

/* Individuelle Strecken-Designs im Menü & Shop */
.wf-map-style-schulhof {
    background: linear-gradient(155deg, #fef3c7 0%, #fed7aa 100%);
    border-color: #f59e0b;
}

.wf-map-style-waldlichtung {
    background-color: #064e3b;
    background-image:
        radial-gradient(rgba(253, 224, 71, 0.55) 1.5px, transparent 1.5px),
        radial-gradient(rgba(103, 232, 249, 0.45) 1.2px, transparent 1.2px),
        linear-gradient(155deg, #064e3b 0%, #0f766e 100%);
    background-size: 26px 26px, 34px 34px, 100% 100%;
    background-position: 0 0, 12px 14px, 0 0;
    border-color: #34d399;
    color: #ffffff;
}

.wf-map-style-matheland {
    background-color: #f8fafc;
    background-image:
        linear-gradient(rgba(59, 130, 246, 0.16) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59, 130, 246, 0.16) 1px, transparent 1px);
    background-size: 16px 16px;
    box-shadow: inset 8px 0 0 rgba(239, 68, 68, 0.45);
    border-color: #2563eb;
}

.wf-map-style-wasserwelt {
    background: linear-gradient(155deg, #cffafe 0%, #22d3ee 100%);
    border-color: #0891b2;
}

.wf-map-style-eisarena {
    background:
        radial-gradient(circle at 20% 25%, rgba(255, 255, 255, 0.85) 0 2px, transparent 3px),
        radial-gradient(circle at 82% 28%, rgba(255, 255, 255, 0.78) 0 2.5px, transparent 3.5px),
        radial-gradient(circle at 68% 76%, rgba(255, 255, 255, 0.72) 0 2px, transparent 3px),
        radial-gradient(circle at 30% 72%, rgba(224, 242, 254, 0.7) 0 2px, transparent 3px),
        linear-gradient(155deg, #f0f9ff 0%, #bae6fd 48%, #38bdf8 100%);
    border-color: #0284c7;
    box-shadow: inset 0 0 14px rgba(255, 255, 255, 0.75);
}

.wf-map-style-vulkanwelt {
    background: linear-gradient(155deg, #292524 0%, #7c2d12 75%, #b91c1c 100%);
    border-color: #f97316;
    color: #ffffff;
}

.wf-map-style-dinowelt {
    background: linear-gradient(155deg, #ecfccb 0%, #a3e635 100%);
    border-color: #4d7c0f;
}

.wf-map-style-weltraum {
    background-color: #0f172a;
    background-image:
        radial-gradient(rgba(255, 255, 255, 0.45) 1px, transparent 1px),
        linear-gradient(155deg, #0f172a 0%, #312e81 100%);
    background-size: 22px 22px, 100% 100%;
    border-color: #38bdf8;
    color: #ffffff;
}

.wf-map-style-hauptstaedte {
    background: linear-gradient(155deg, #fef9c3 0%, #bae6fd 100%);
    border-color: #0369a1;
}

.wf-map-style-tierwelt {
    background: linear-gradient(155deg, #fef3c7 0%, #fdba74 100%);
    border-color: #b45309;
}

.wf-map-style-koerper {
    background: linear-gradient(155deg, #fff1f2 0%, #fda4af 100%);
    border-color: #e11d48;
}

.wf-map-style-erfindungen {
    background-color: #0f172a;
    background-image:
        linear-gradient(rgba(147, 197, 253, 0.16) 1px, transparent 1px),
        linear-gradient(90deg, rgba(147, 197, 253, 0.16) 1px, transparent 1px);
    background-size: 16px 16px;
    border-color: #60a5fa;
    color: #ffffff;
}

.wf-map-dark .wf-choice-sub,
.wf-map-dark .wf-shop-desc {
    color: #e2e8f0;
}

.wf-map-dark .wf-map-theme {
    background: rgba(255, 255, 255, 0.18);
    color: #fef08a;
}

.wf-map-status-pill {
    font-size: 0.75rem;
    font-weight: 900;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.88);
}

.wf-map-theme {
    display: inline-block;
    align-self: flex-start;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.82);
    color: #0f172a;
    font-size: 0.72rem;
    font-weight: 800;
}

.wf-trail-preview {
    height: 8px;
    border-radius: 999px;
    width: 100%;
    margin: 2px 0;
}

.wf-trail-preview-standard {
    background: linear-gradient(90deg, #0284c7, #ea580c);
}

.wf-trail-preview-funken {
    background: linear-gradient(90deg, #facc15, #fef08a, #f59e0b);
}

.wf-trail-preview-eis {
    background: linear-gradient(90deg, #bae6fd, #ffffff, #38bdf8);
}

.wf-trail-preview-regenbogen {
    background: linear-gradient(90deg, #ef4444, #f97316, #facc15, #22c55e, #3b82f6, #a855f7);
}

.wf-trail-preview-feuer {
    background: linear-gradient(90deg, #991b1b, #ef4444, #f97316, #fef08a);
}

.wf-trail-preview-neon {
    background: linear-gradient(90deg, #22d3ee, #ffffff, #e879f9);
}

.wf-start-actions {
    margin-top: 16px;
}

.wf-primary-btn,
.wf-secondary-btn,
.wf-ghost-btn,
.wf-close-btn {
    min-height: 48px;
    padding: 10px 20px;
    border-radius: 14px;
    font-family: inherit;
    font-size: 1.02rem;
    font-weight: 900;
    cursor: pointer;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.12s ease, box-shadow 0.14s ease;
}

.wf-primary-btn {
    width: 100%;
    background: linear-gradient(135deg, #0284c7 0%, #0d9488 55%, #16a34a 100%);
    color: #ffffff;
    box-shadow: 0 8px 22px rgba(2, 132, 199, 0.3);
}

.wf-primary-btn.is-battle-cta {
    background: linear-gradient(135deg, #dc2626 0%, #f97316 55%, #eab308 100%);
    box-shadow: 0 8px 24px rgba(249, 115, 22, 0.36);
}

.wf-primary-btn:hover {
    transform: translateY(-1px);
}

.wf-secondary-btn {
    width: 100%;
    background: var(--le-amber-soft);
    color: #78350f;
    border: 1px solid #fcd34d;
}

.wf-ghost-btn,
.wf-close-btn {
    background: var(--le-bg-soft);
    color: var(--le-ink);
    border: 1px solid var(--le-border);
}

.wf-ghost-btn {
    width: 100%;
}

.wf-ctrl-hint {
    margin: 12px 0 0;
    font-size: 0.84rem;
    color: var(--le-ink-muted);
    line-height: 1.45;
}

kbd {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 6px;
    border: 1px solid var(--le-border-strong);
    background: var(--le-surface-alt);
    font-family: var(--le-font-mono);
    font-size: 0.78rem;
    font-weight: 800;
}

/* --- GARAGE & SHOP (IN-GAME SHOWROOM) --- */
.wf-shop-shell {
    padding: 0 22px 22px;
    border: 3px solid #38bdf8;
    background: linear-gradient(180deg, #eff6ff 0%, #ffffff 28%, #f8fafc 100%);
    max-width: 920px;
}

.wf-shop-hero-head {
    margin: 0 -22px 14px;
    padding: 16px 22px;
    background: linear-gradient(135deg, #0f172a 0%, #0369a1 58%, #0d9488 100%);
    border-bottom: 4px solid #facc15;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.wf-shop-hero-head h2 {
    margin: 0 0 3px;
    font-size: clamp(1.25rem, 2.8vw, 1.6rem);
    color: #ffffff;
    text-shadow: 0 2px 8px rgba(15, 23, 42, 0.35);
}

.wf-shop-hero-sub {
    margin: 0;
    font-size: 0.84rem;
    color: rgba(224, 242, 254, 0.92);
    font-weight: 700;
}

.wf-shop-done-btn {
    min-height: 44px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.95);
    color: #0f172a;
    border: 2px solid #ffffff;
}

.wf-modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.wf-modal-head h2 {
    margin: 0 0 4px;
    font-size: 1.35rem;
}

.wf-modal-head-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.wf-shop-feedback {
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 0.88rem;
    font-weight: 800;
    margin-bottom: 12px;
    background: var(--le-green-soft);
    color: #14532d;
}

.wf-shop-feedback.is-error {
    background: var(--le-rose-soft);
    color: #881337;
}

.wf-shop-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 12px;
}

.wf-shop-tab {
    min-height: 46px;
    padding: 8px 12px;
    border-radius: 14px;
    border: 2px solid #cbd5e1;
    background: #ffffff;
    color: #334155;
    font-family: inherit;
    font-weight: 900;
    font-size: 0.92rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.14s ease;
}

.wf-shop-tab:hover {
    border-color: #38bdf8;
    transform: translateY(-1px);
}

.wf-shop-tab.active {
    background: linear-gradient(135deg, #0284c7 0%, #0d9488 100%);
    border-color: #0284c7;
    color: #ffffff;
    box-shadow: 0 6px 16px rgba(2, 132, 199, 0.28);
}

.wf-tab-count {
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.08);
    font-size: 0.75rem;
    font-weight: 800;
}

.wf-shop-tab.active .wf-tab-count {
    background: rgba(255, 255, 255, 0.24);
    color: #ffffff;
}

.wf-garage-picker-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
    padding: 8px 10px;
    border-radius: 14px;
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
}

.wf-picker-tabs-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.wf-picker-tab {
    min-height: 44px;
    padding: 6px 14px;
    border-radius: 12px;
    border: 2px solid var(--le-border);
    background: var(--le-surface);
    font-family: inherit;
    font-weight: 900;
    font-size: 0.88rem;
    cursor: pointer;
}

.wf-picker-tab.active {
    border-color: var(--le-blue);
    background: var(--le-blue-soft);
    color: #075985;
}

.wf-equipped-mini-pill {
    font-size: 0.82rem;
    font-weight: 800;
    color: #334155;
    padding: 5px 12px;
    border-radius: 999px;
    background: #f1f5f9;
}

.wf-shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(195px, 1fr));
    gap: 12px;
}

.wf-shop-card {
    padding: 10px;
    border-radius: 18px;
    border: 2.5px solid #cbd5e1;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
    transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease;
}

.wf-shop-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.14);
}

.wf-shop-card.is-rarity-rare {
    border-color: #38bdf8;
    background: linear-gradient(180deg, #ffffff 0%, #f0f9ff 100%);
}

.wf-shop-card.is-rarity-epic {
    border-color: #a855f7;
    background: linear-gradient(180deg, #ffffff 0%, #faf5ff 100%);
}

.wf-shop-card.is-rarity-legendary {
    border-color: #f59e0b;
    background: linear-gradient(180deg, #ffffff 0%, #fffbeb 100%);
}

.wf-shop-card.is-equipped {
    border-color: #16a34a;
    background: linear-gradient(180deg, #f0fdf4 0%, #dcfce7 100%);
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.2), 0 8px 18px rgba(22, 163, 74, 0.14);
}

.wf-preview-frame {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #0f172a;
    border: 1.5px solid rgba(15, 23, 42, 0.14);
}

.wf-shop-canvas {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
}

.wf-shop-canvas.is-trail {
    aspect-ratio: 16 / 8;
}

.wf-preview-badges-top {
    position: absolute;
    top: 6px;
    left: 6px;
    right: 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    pointer-events: none;
}

.wf-preview-badges-right {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.wf-rarity-chip {
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.02em;
    background: rgba(15, 23, 42, 0.78);
    color: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, 0.22);
}

.wf-rarity-chip.is-active {
    background: #16a34a;
    color: #ffffff;
    border-color: #86efac;
}

.wf-rarity-chip.is-rare {
    background: rgba(2, 132, 199, 0.88);
    color: #e0f2fe;
}

.wf-rarity-chip.is-epic {
    background: rgba(126, 34, 206, 0.9);
    color: #f3e8ff;
}

.wf-rarity-chip.is-legendary {
    background: linear-gradient(135deg, #d97706, #f59e0b);
    color: #ffffff;
}

.wf-mini-icon-chip {
    min-width: 24px;
    height: 24px;
    padding: 0 6px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.28);
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 900;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.wf-shop-card-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding: 0 2px;
}

.wf-shop-title {
    font-weight: 900;
    font-size: 0.94rem;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wf-shop-theme-mini {
    padding: 2px 8px;
    border-radius: 999px;
    background: #e0f2fe;
    color: #075985;
    font-size: 0.7rem;
    font-weight: 800;
    align-self: flex-start;
}

.wf-shop-desc {
    font-size: 0.8rem;
    color: var(--le-ink-muted);
    flex: 1;
}

.wf-shop-btn {
    min-height: 44px;
    border-radius: 12px;
    border: none;
    font-family: inherit;
    font-weight: 900;
    font-size: 0.88rem;
    cursor: pointer;
    padding: 8px 10px;
    transition: transform 0.1s ease, filter 0.12s ease;
}

.wf-shop-btn:hover:not(:disabled) {
    filter: brightness(1.04);
}

.wf-shop-btn.is-select {
    background: linear-gradient(135deg, #e0f2fe, #bae6fd);
    color: #075985;
    border: 1.5px solid #38bdf8;
}

.wf-shop-btn.is-active {
    background: linear-gradient(135deg, #16a34a, #0d9488);
    color: #ffffff;
}

.wf-shop-btn.is-buy {
    background: linear-gradient(135deg, #fef08a, #fde047);
    color: #78350f;
    border: 1.5px solid #f59e0b;
}

.wf-shop-btn:disabled {
    background: #e2e8f0;
    color: #475569;
    border: 1.5px solid #cbd5e1;
    opacity: 0.88;
    cursor: not-allowed;
}

/* --- SHOP DETAIL INSPEKTOR MODAL --- */
.wf-detail-overlay {
    z-index: 45;
    background: rgba(15, 23, 42, 0.72);
}

.wf-detail-card {
    width: 100%;
    max-width: 510px;
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 42%, #ffffff 42.5%, #f8fafc 100%);
    border-radius: 24px;
    border: 3px solid #38bdf8;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.55);
    padding: 18px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    animation: wfPopIn 0.16s ease;
}

.wf-detail-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.wf-detail-head-title {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.wf-detail-head-title h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 900;
    color: #ffffff;
}

.wf-rarity-pill {
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: #334155;
    color: #f8fafc;
}

.wf-rarity-pill.is-rare {
    background: #0284c7;
    color: #e0f2fe;
}

.wf-rarity-pill.is-epic {
    background: #9333ea;
    color: #f3e8ff;
}

.wf-rarity-pill.is-legendary {
    background: linear-gradient(135deg, #d97706, #eab308);
    color: #ffffff;
}

.wf-detail-close-x {
    min-width: 44px;
    min-height: 44px;
    border-radius: 12px;
    border: 1.5px solid rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    font-size: 1.05rem;
    font-weight: 900;
    cursor: pointer;
}

.wf-detail-stage {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    border: 2px solid rgba(56, 189, 248, 0.45);
    background: #0f172a;
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.35);
}

.wf-detail-canvas {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 480 / 260;
}

.wf-detail-player-tag {
    position: absolute;
    bottom: 10px;
    right: 10px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #f8fafc;
    font-size: 0.76rem;
    font-weight: 800;
}

.wf-detail-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.wf-detail-theme {
    align-self: flex-start;
    padding: 4px 10px;
    border-radius: 999px;
    background: #e0f2fe;
    color: #075985;
    font-size: 0.78rem;
    font-weight: 800;
}

.wf-detail-desc {
    margin: 0;
    font-size: 0.94rem;
    color: #334155;
    line-height: 1.45;
    font-weight: 600;
}

.wf-detail-ability {
    padding: 10px 12px;
    border-radius: 14px;
    background: linear-gradient(135deg, #fff7ed 0%, #fef3c7 100%);
    border: 1.5px solid #fb923c;
    color: #7c2d12;
    font-size: 0.86rem;
    font-weight: 800;
    line-height: 1.38;
}

.wf-detail-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.wf-detail-action-btn {
    flex: 1 1 200px;
    min-height: 48px;
    font-size: 0.96rem;
}

.wf-detail-back-btn {
    min-height: 48px;
    padding: 8px 16px;
}

/* --- ABZEICHEN & ENDE --- */
.wf-badges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}

.wf-badge-card {
    padding: 14px;
    border-radius: 16px;
    border: 2px solid var(--le-border);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.wf-badge-card.locked {
    opacity: 0.72;
    filter: grayscale(0.45);
}

.wf-badge-progress-wrap {
    width: 100%;
    margin-top: 2px;
}

.wf-badge-progress-bar {
    width: 100%;
    height: 7px;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
    margin-bottom: 3px;
}

.wf-badge-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #0284c7, #0d9488);
}

.wf-badge-progress-text {
    font-size: 0.72rem;
    font-weight: 800;
    color: #475569;
}

.wf-badge-card img,
.wf-badge-svg {
    width: 60px;
    height: 60px;
}

.wf-end-trophy {
    font-size: 3rem;
    margin-bottom: 6px;
}

.wf-end-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 14px 0;
}

.wf-stat-box {
    padding: 10px;
    border-radius: 14px;
    background: var(--le-bg-soft);
    border: 1px solid var(--le-border);
}

.wf-stat-val {
    font-size: 1.25rem;
    font-weight: 900;
}

.wf-stat-lbl {
    font-size: 0.78rem;
    color: var(--le-ink-muted);
    font-weight: 700;
}

.wf-end-coins {
    padding: 10px 14px;
    border-radius: 14px;
    background: var(--le-amber-soft);
    border: 1px solid #fcd34d;
    color: #92400e;
    font-weight: 900;
    margin-bottom: 14px;
}

.wf-modal-stack-btns {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 14px;
}

@keyframes wfPopIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

@media (max-width: 720px) {
    .wf-shop-tabs {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px;
    }

    .wf-shop-tab {
        padding: 6px 6px;
        font-size: 0.8rem;
        flex-direction: column;
        gap: 2px;
    }

    .wf-shop-grid {
        grid-template-columns: repeat(auto-fill, minmax(154px, 1fr));
        gap: 8px;
    }

    .wf-seg-grid.two,
    .wf-seg-grid.three {
        grid-template-columns: 1fr;
    }

    .wf-slots-bar {
        padding: 6px 10px;
        gap: 6px;
    }

    .wf-slot {
        width: 26px;
        height: 30px;
        font-size: 0.9rem;
    }

    .wf-btn-text {
        display: none;
    }

    .wf-joy-base {
        width: 96px;
        height: 96px;
    }
}
