/* BensowPrompts©2026 */
:root {
    --bg-dark: #0f172a;
    --table-green: #1a4d2e;
    --table-dark: #0f2e1b;
    --felt-border: #4a2e18;
    --accent-gold: #f59e0b;
    --accent-gold-hover: #d97706;
    --card-red: #dc2626;
    --card-black: #1e293b;
    --card-bg: #ffffff;
    --text-light: #f8fafc;
    --text-muted: #94a3b8;
    --danger: #ef4444;
    --success: #10b981;
    --card-width: 84px;
    --card-height: 126px;
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --shadow-card: 0 4px 10px rgba(0, 0, 0, 0.25), 0 1px 3px rgba(0,0,0,0.15);
    --shadow-card-hover: 0 12px 24px rgba(0, 0, 0, 0.35), 0 0 15px rgba(245, 158, 11, 0.4);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-light);
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    user-select: none;
}

/* App Header */
.app-header {
    height: 52px;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 100;
}

.game-logo {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, #fcd34d, #f59e0b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.room-tag {
    margin-left: 14px;
    font-size: 0.85rem;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.06);
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Buttons */
button {
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    border: none;
    border-radius: var(--radius-sm);
    transition: all 0.18s ease-in-out;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-hover));
    color: #1e1b4b;
    padding: 10px 20px;
    font-size: 0.95rem;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.25);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(245, 158, 11, 0.4);
}

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

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

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 8px 16px;
    font-size: 0.9rem;
}

.btn-secondary:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.18);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.4);
    padding: 6px 12px;
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.35);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
}

.btn-large {
    padding: 14px 28px;
    font-size: 1.1rem;
    border-radius: var(--radius-md);
}

.btn-icon {
    background: transparent;
    font-size: 1.2rem;
    padding: 6px 10px;
    border-radius: 50%;
}
.btn-icon:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Main Container & Screens */
.main-container {
    flex: 1;
    display: flex;
    position: relative;
    overflow: hidden;
}

.screen {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.25s ease-in-out;
}

.hidden {
    display: none !important;
}

/* Welcome Screen & Game Carousel */
.welcome-card {
    background: rgba(30, 41, 59, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    padding: 28px 32px;
    width: 480px;
    max-width: 92vw;
    text-align: center;
}

.welcome-card.wide-card {
    width: 640px;
    max-width: 95vw;
}

.portal-header {
    margin-bottom: 16px;
}

.portal-header h1 {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 4px;
}

.portal-header .subtitle {
    color: var(--text-muted);
    font-size: 0.88rem;
}

.edition-badge {
    color: var(--accent-gold);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 4px;
}

/* Carousel */
.carousel-container {
    display: flex;
    align-items: center;
    position: relative;
    margin: 8px 0 16px 0;
}

.carousel-arrow {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 5;
    flex-shrink: 0;
}

.carousel-arrow:hover {
    background: var(--accent-gold);
    color: #1e1b4b;
    transform: scale(1.1);
}

.carousel-track-wrapper {
    overflow: hidden;
    width: 100%;
    margin: 0 8px;
    border-radius: var(--radius-md);
}

.carousel-track {
    display: flex;
    transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
    width: 100%;
}

.carousel-slide {
    flex: 0 0 100%;
    background: rgba(15, 23, 42, 0.7);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    user-select: none;
}

.slide-badge {
    position: absolute;
    top: 10px;
    left: 12px;
    background: rgba(245, 158, 11, 0.2);
    border: 1px solid var(--accent-gold);
    color: var(--accent-gold);
    font-size: 0.68rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 999px;
    text-transform: uppercase;
}

.slide-preview {
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 4px 0 8px 0;
}

.slide-title {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 4px;
    color: #fff;
}

.slide-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    max-width: 440px;
    line-height: 1.35;
    margin-bottom: 10px;
}

.slide-tags {
    display: flex;
    gap: 8px;
}

.slide-tags span {
    background: rgba(255, 255, 255, 0.06);
    border-radius: 999px;
    padding: 3px 10px;
    font-size: 0.72rem;
    color: #cbd5e1;
    font-weight: 600;
}

/* Previews in Carousel */
.skat-preview-fan, .poker-preview-fan {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 90px;
    position: relative;
}

.poker-chip-badge {
    position: absolute;
    bottom: -4px;
    background: #eab308;
    color: #1e1b4b;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 999px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
    z-index: 5;
}

.elfer-preview-fan {
    display: flex;
    align-items: center;
    justify-content: center;
}

.elfer-row-badge {
    background: rgba(255, 255, 255, 0.08);
    border: 2px dashed rgba(245, 158, 11, 0.5);
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: 4px;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 14px;
}

.dot {
    width: 10px;
    height: 10px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
}

.dot.active {
    background: var(--accent-gold);
    width: 24px;
    border-radius: 999px;
}

.welcome-form {
    text-align: left;
}

.game-tag {
    margin-left: 8px;
    font-size: 0.78rem;
    font-weight: 700;
    background: rgba(245, 158, 11, 0.2);
    color: var(--accent-gold);
    border: 1px solid rgba(245, 158, 11, 0.4);
    padding: 3px 8px;
    border-radius: 6px;
    text-transform: uppercase;
}

.lobby-game-badge {
    display: inline-block;
    background: rgba(245, 158, 11, 0.2);
    border: 1px solid var(--accent-gold);
    color: var(--accent-gold);
    font-size: 0.75rem;
    font-weight: 800;
    padding: 3px 12px;
    border-radius: 999px;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.card-fan-preview {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 90px;
    position: relative;
}

.fan-card {
    width: 58px;
    height: 87px;
    border-radius: 6px;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.4);
    position: absolute;
    transition: transform 0.3s ease;
}

.fan-left {
    transform: translateX(-32px) rotate(-14deg);
    z-index: 1;
}

.fan-center {
    transform: translateY(-4px);
    z-index: 2;
}

.fan-right {
    transform: translateX(32px) rotate(14deg);
    z-index: 1;
}

.welcome-header h1 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.welcome-header .subtitle {
    color: var(--text-muted);
    font-size: 0.92rem;
    margin-bottom: 24px;
    line-height: 1.4;
}

.form-group {
    text-align: left;
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input, .join-input-group input, .share-box input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-sm);
    color: #fff;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
}

.form-group input:focus, .join-input-group input:focus {
    border-color: var(--accent-gold);
}

.join-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.join-actions .btn-primary {
    width: 100%;
}

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    margin: 8px 0;
}

.divider::before, .divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.divider span {
    padding: 0 10px;
}

.join-input-group {
    display: flex;
    gap: 8px;
}

.join-input-group input {
    flex: 1;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
}

.quick-info {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.info-pill {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    padding: 4px 12px;
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* Lobby Screen */
.lobby-card {
    background: rgba(30, 41, 59, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    padding: 32px;
    width: 520px;
    max-width: 92vw;
    text-align: center;
}

.lobby-header h2 {
    font-size: 1.6rem;
    margin-bottom: 6px;
}

.highlight-code {
    color: var(--accent-gold);
    font-family: monospace;
    letter-spacing: 1.5px;
}

.share-box {
    display: flex;
    gap: 8px;
    margin: 14px 0 24px 0;
}

.share-box input {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.player-slots-container {
    text-align: left;
    margin-bottom: 24px;
}

.player-slots-container h3 {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.lobby-player-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.lobby-player-item {
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.lobby-player-item.is-host {
    border-color: rgba(245, 158, 11, 0.35);
}

.lobby-player-item .user-left {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.lobby-player-item .bot-tag {
    background: #3b82f6;
    color: white;
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 700;
}

.lobby-player-item .host-tag {
    background: var(--accent-gold);
    color: #1e1b4b;
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 700;
}

.lobby-controls {
    display: flex;
    gap: 12px;
}

.lobby-controls button {
    flex: 1;
}

.status-note {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 12px;
}

/* ======================================================== */
/* Game Arena & Table                                      */
/* ======================================================== */
.game-arena {
    width: 100%;
    height: 100%;
    display: flex;
}

.felt-table {
    flex: 1;
    position: relative;
    background: url('/tables/spiel.png') no-repeat center center / cover;
    box-shadow: inset 0 0 80px rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: background 0.35s ease;
}

.felt-table.theme-spiel {
    background: url('/tables/spiel.png') no-repeat center center / cover;
}

.felt-table.theme-fliesen {
    background: url('/tables/fliesen.png') no-repeat center center / cover;
}

.felt-table.theme-kueche {
    background: url('/tables/kueche.png') no-repeat center center / cover;
}

.felt-table.theme-camping {
    background: url('/tables/camping.png') no-repeat center center / cover;
}

/* Atmospheric vignette over all tables for readability */
.felt-table::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(0,0,0,0.1) 30%, rgba(0, 0, 0, 0.45) 80%, rgba(0, 0, 0, 0.75) 100%);
    pointer-events: none;
    z-index: 1;
}

/* Seats */
.seat {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.seat-top {
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    flex-direction: column-reverse;
}

.seat-left {
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    flex-direction: row;
}

.seat-right {
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    flex-direction: row-reverse;
}

.seat-bottom {
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    flex-direction: column;
    width: 90%;
    max-width: 900px;
}

/* Player Badge */
.player-badge {
    background: rgba(15, 23, 42, 0.85);
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 999px;
    padding: 6px 14px 6px 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    position: relative;
    transition: all 0.3s ease;
}

.player-badge .avatar {
    font-size: 1.1rem;
    background: rgba(255, 255, 255, 0.1);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.player-badge .player-info {
    display: flex;
    flex-direction: column;
}

.player-badge .name {
    font-size: 0.85rem;
    font-weight: 700;
    max-width: 100px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-badge .card-count-badge {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.player-badge.is-active {
    border-color: var(--accent-gold);
    box-shadow: 0 0 18px rgba(245, 158, 11, 0.6);
    transform: scale(1.05);
}

.player-badge.is-active .turn-indicator {
    position: absolute;
    inset: -6px;
    border: 2px solid var(--accent-gold);
    border-radius: 999px;
    animation: turn-pulse 1.4s infinite ease-in-out;
}

@keyframes turn-pulse {
    0% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.08); opacity: 0.2; }
    100% { transform: scale(1); opacity: 0.8; }
}

/* Opponent Hands */
.hand-opponent {
    display: flex;
    gap: -30px;
    padding: 8px;
}

.hand-top .card-back-mini {
    width: 32px;
    height: 48px;
    margin-left: -18px;
}

.hand-left, .hand-right {
    flex-direction: column;
}

.hand-left .card-back-mini, .hand-right .card-back-mini {
    width: 32px;
    height: 48px;
    margin-top: -30px;
}

/* Center Table Area */
.center-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    position: relative;
}

.deck-area {
    display: flex;
    align-items: center;
    gap: 36px;
}

.pile {
    position: relative;
    width: var(--card-width);
    height: var(--card-height);
    display: flex;
    align-items: center;
    justify-content: center;
}

.draw-pile {
    cursor: pointer;
    transition: transform 0.15s ease;
}

.draw-pile:hover {
    transform: translateY(-3px) scale(1.02);
}

.draw-pile:active {
    transform: translateY(0);
}

.pile-label {
    position: absolute;
    bottom: -24px;
    font-size: 0.75rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Subviews in Center Table Area */
.game-center-subview {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

/* Skat Center */
.skat-banner {
    background: #1e1b4b;
    border: 2px solid var(--accent-gold);
    color: #fff;
}

.skat-trick-area {
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: center;
    min-height: calc(var(--card-height) + 20px);
}

.trick-slot {
    width: var(--card-width);
    height: var(--card-height);
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.trick-slot .slot-label {
    position: absolute;
    bottom: -20px;
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* Poker Center */
.poker-pot-banner {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border: 2px solid var(--accent-gold);
    color: var(--accent-gold);
    padding: 6px 20px;
    border-radius: 999px;
    font-size: 1.1rem;
    font-weight: 800;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.poker-round-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    font-weight: 700;
}

.community-cards-container {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
    min-height: calc(var(--card-height) + 10px);
}

.community-card-slot {
    width: var(--card-width);
    height: var(--card-height);
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 11er Raus Center */
.elfer-rows-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: rgba(0, 0, 0, 0.3);
    padding: 10px 16px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-width: 90vw;
    overflow-x: auto;
}

.elfer-suit-row {
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 48px;
}

.elfer-suit-label {
    width: 28px;
    font-size: 1.5rem;
    font-weight: bold;
    text-align: center;
}

.elfer-row-cards {
    display: flex;
    gap: 4px;
}

.elfer-mini-card {
    width: 38px;
    height: 56px;
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.elfer-placeholder {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
    font-style: italic;
}

/* Docks */
.game-dock {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 6px;
}

.dock-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.poker-raise-box {
    display: flex;
    gap: 8px;
    align-items: center;
}

.skat-declare-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 16px;
}

.btn-declare {
    padding: 12px;
    font-size: 0.95rem;
    text-align: center;
}

.card.selected-for-discard {
    transform: translateY(-20px) !important;
    outline: 3px solid var(--danger) !important;
    box-shadow: 0 0 16px rgba(239, 68, 68, 0.9) !important;
}

.status-banner {
    padding: 6px 16px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
    animation: bounce-in 0.3s ease;
}

@keyframes bounce-in {
    0% { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.wish-banner {
    background: #1e1b4b;
    border: 2px solid var(--accent-gold);
    color: var(--accent-gold);
    display: flex;
    align-items: center;
    gap: 8px;
}

.wish-symbol {
    font-size: 1.4rem;
}

.penalty-banner {
    background: rgba(239, 68, 68, 0.95);
    border: 2px solid #fff;
    color: #fff;
}

.turn-announcement {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.85);
    background: rgba(0, 0, 0, 0.35);
    padding: 4px 16px;
    border-radius: 999px;
    backdrop-filter: blur(4px);
    text-align: center;
}

.bot-thinking {
    font-size: 0.8rem;
    color: var(--accent-gold);
    margin-left: 6px;
    animation: pulse-thinking 1s infinite ease-in-out;
}

@keyframes pulse-thinking {
    0%, 100% { opacity: 0.5; transform: scale(0.98); }
    50% { opacity: 1; transform: scale(1.02); }
}

/* Playing Cards */
.card {
    width: var(--card-width);
    height: var(--card-height);
    background: transparent;
    border-radius: 6px;
    box-shadow: var(--shadow-card);
    position: relative;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.2s ease, filter 0.2s ease;
    overflow: hidden;
}

.card-svg {
    width: 100%;
    height: 100%;
    object-fit: fill;
    display: block;
    border-radius: 6px;
    pointer-events: none;
    user-select: none;
}

.card-back {
    background: url('/cards/00_Kartenruecken_Cherry_Dame.svg') no-repeat center / cover;
    border-radius: 6px;
    box-shadow: var(--shadow-card);
    border: none;
}

.card-stacked-2 {
    position: absolute;
    top: -2px;
    left: -2px;
    z-index: 1;
}

.card-stacked-3 {
    position: absolute;
    top: -4px;
    left: -4px;
    z-index: 0;
}

.card-topmost {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.deck-count {
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 0.9rem;
    padding: 2px 8px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.card.is-red {
    color: var(--card-red);
}

.card.is-black {
    color: var(--card-black);
}

.card-corner {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1;
    font-size: 0.95rem;
}

.card-corner-bottom {
    transform: rotate(180deg);
}

.card-center-suit {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2.2rem;
    opacity: 0.9;
}

/* Local Player Hand */
.my-hand-container {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 8px;
    padding: 10px 0;
    min-height: calc(var(--card-height) + 30px);
    overflow-x: auto;
    overflow-y: visible;
}

.my-hand-container .card {
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.2s;
}

.my-hand-container .card:hover {
    transform: translateY(-24px) scale(1.08);
    box-shadow: var(--shadow-card-hover);
    z-index: 50;
}

.my-hand-container .card.playable {
    outline: 3px solid var(--accent-gold);
    outline-offset: -2px;
    box-shadow: 0 0 16px rgba(245, 158, 11, 0.95);
    animation: playable-wiggle 3s infinite ease-in-out;
}

@keyframes playable-wiggle {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

.my-hand-container .card.unplayable {
    opacity: 0.65;
    filter: grayscale(0.2);
    cursor: not-allowed;
}

.my-hand-container .card.unplayable:hover {
    transform: none;
    box-shadow: var(--shadow-card);
}

/* Action Dock & Mau Button */
.action-dock {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 6px;
}

.btn-mau {
    background: linear-gradient(135deg, #ef4444, #b91c1c);
    color: #fff;
    font-size: 1.1rem;
    font-weight: 800;
    padding: 8px 24px;
    border-radius: 999px;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.5);
    border: 2px solid #fff;
}

.btn-mau.active-mau {
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.7);
}

.btn-mau.pulse {
    animation: mau-pulse 0.8s infinite;
}

@keyframes mau-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); box-shadow: 0 0 25px rgba(239, 68, 68, 0.9); }
    100% { transform: scale(1); }
}

.btn-callout {
    background: #eab308;
    color: #1e1b4b;
    font-weight: 800;
    padding: 8px 18px;
    border-radius: 999px;
    box-shadow: 0 4px 12px rgba(234, 179, 8, 0.4);
}

.my-badge-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 4px;
}

.my-status-hint {
    font-size: 0.85rem;
    color: var(--accent-gold);
    font-weight: 600;
}

/* Sidebar & Log Feed */
.game-sidebar {
    width: 260px;
    background: rgba(15, 23, 42, 0.95);
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-header h4 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.game-feed {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 0.82rem;
}

.feed-item {
    background: rgba(255, 255, 255, 0.04);
    border-left: 3px solid var(--accent-gold);
    padding: 6px 10px;
    border-radius: 0 6px 6px 0;
    line-height: 1.35;
}

.feed-item.is-penalty {
    border-left-color: var(--danger);
    background: rgba(239, 68, 68, 0.08);
}

.feed-item.is-mau {
    border-left-color: #3b82f6;
    background: rgba(59, 130, 246, 0.08);
    font-weight: 700;
}

.quick-emojis {
    display: flex;
    justify-content: space-around;
    padding: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.2);
}

.btn-emoji {
    background: transparent;
    font-size: 1.3rem;
    padding: 6px;
    border-radius: 6px;
}

.btn-emoji:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.2);
}

/* Modals */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
}

.modal-card {
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-lg);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
    padding: 28px;
    width: 480px;
    max-width: 90vw;
    text-align: center;
}

.suit-choices {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-top: 20px;
}

.btn-suit {
    padding: 18px;
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-size: 1.1rem;
    background: rgba(15, 23, 42, 0.8);
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.btn-suit:hover {
    transform: translateY(-2px);
    border-color: var(--accent-gold);
}

.suit-hearts, .suit-diamonds {
    color: var(--card-red);
}

.suit-clubs, .suit-spades {
    color: #e2e8f0;
}

.btn-suit .suit-icon {
    font-size: 2.8rem;
    line-height: 1;
}

/* Table Picker Modal */
.table-picker-card {
    width: 600px;
    max-width: 94vw;
}

.modal-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 20px;
    text-align: left;
}

.table-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.table-choice-item {
    background: rgba(15, 23, 42, 0.7);
    border: 2px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
}

.table-choice-item:hover {
    border-color: var(--accent-gold);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
}

.table-choice-item.is-selected {
    border-color: var(--accent-gold);
    box-shadow: 0 0 16px rgba(245, 158, 11, 0.4);
}

.table-preview {
    height: 105px;
    background-size: cover;
    background-position: center;
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.preview-classic {
    background: radial-gradient(circle at center, var(--table-green) 0%, var(--table-dark) 90%);
}

.table-info {
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    position: relative;
}

.table-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: #fff;
}

.table-subtext {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.table-badge-active {
    position: absolute;
    right: 12px;
    top: 12px;
    background: var(--accent-gold);
    color: #1e1b4b;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 999px;
}

/* Rules Modal */
.rules-card {
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    text-align: left;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.btn-close {
    background: transparent;
    font-size: 1.6rem;
    color: var(--text-muted);
    padding: 0 6px;
}

.rules-body {
    overflow-y: auto;
    padding-right: 8px;
}

.rules-body h4 {
    color: var(--accent-gold);
    margin: 14px 0 6px 0;
    font-size: 1rem;
}

.rules-body ul {
    padding-left: 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

.rules-body p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.modal-footer {
    margin-top: 20px;
    text-align: right;
}

/* Game Over Modal */
.game-over-card .confetti-icon {
    font-size: 3.5rem;
    margin-bottom: 8px;
}

.game-over-card h2 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 6px;
}

.winner-text {
    font-size: 1.1rem;
    color: var(--accent-gold);
    font-weight: 700;
    margin-bottom: 20px;
}

.scoreboard {
    background: rgba(15, 23, 42, 0.6);
    border-radius: var(--radius-md);
    padding: 14px;
    margin-bottom: 24px;
    text-align: left;
}

.scoreboard h4 {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.scoreboard-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 0.92rem;
}

.modal-actions {
    display: flex;
    gap: 12px;
}

.modal-actions button {
    flex: 1;
}

/* Responsive adjustments */
@media (max-width: 860px) {
    .game-sidebar {
        display: none;
    }
    :root {
        --card-width: 68px;
        --card-height: 98px;
    }
}

.copyright-note {
    margin: 18px 0 0;
    text-align: center;
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    opacity: 0.55;
}

/* Ablagestapel: Karten fallen von oben und liegen leicht schräg übereinander */
.discard-stack {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.discard-item {
    position: absolute;
    inset: 0;
    transform: translate(var(--dx, 0px), var(--dy, 0px)) rotate(var(--rot, 0deg));
}

.discard-item.dropping {
    animation: card-drop 0.6s cubic-bezier(0.22, 0.9, 0.3, 1) both;
    z-index: 5;
}

@keyframes card-drop {
    0% {
        transform: translate(calc(var(--dx, 0px) + var(--fx, 0px)), calc(var(--dy, 0px) - 300px))
                   rotate(calc(var(--rot, 0deg) + var(--spin, 0deg))) scale(1.3);
        opacity: 0;
    }
    18% { opacity: 1; }
    72% {
        transform: translate(var(--dx, 0px), calc(var(--dy, 0px) + 5px)) rotate(var(--rot, 0deg)) scale(0.97);
        opacity: 1;
    }
    100% {
        transform: translate(var(--dx, 0px), var(--dy, 0px)) rotate(var(--rot, 0deg)) scale(1);
        opacity: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .discard-item.dropping { animation: none; }
}

/* ===== Austeil-Animation (Mau-Mau) ===== */
#deal-layer {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 900;
    overflow: hidden;
}

.deal-clone {
    position: fixed;
    transform-origin: center center;
    will-change: transform, opacity;
}

.deal-clone > .card {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

/* Echte Karten bleiben unsichtbar, bis die fliegende Kopie gelandet ist */
body.dealing #my-hand .card,
body.dealing .hand-opponent .card,
body.dealing #draw-pile .card,
body.dealing #discard-stack {
    visibility: hidden;
}

body.dealing #my-hand,
body.dealing #dock-maumau {
    pointer-events: none;
}

/* ===== Cherry-Konto: Kritzelei auf dem Block ===== */
.cherry-doodle {
    position: fixed;
    z-index: 9; /* über Tisch und Vignette, unter den Spielerplätzen (10) */
    pointer-events: none;
    left: 14px;
    bottom: 12px;
    width: 150px;
    transform-origin: center center;
    opacity: 0;
    transition: opacity 0.4s ease;
    filter: drop-shadow(0 1px 0 rgba(120, 0, 25, 0.25));
}
.cherry-doodle.ready { opacity: 0.96; }
.cherry-doodle svg { display: block; width: 100%; height: auto; }

.cherry-doodle .ink-fill   { stroke: #D4062E; stroke-width: 3.6; opacity: 0.95; }
.cherry-doodle .ink-fill2  { stroke: #E8244A; stroke-width: 2.4; opacity: 0.65; }
.cherry-doodle .ink-shade  { stroke: #7E0620; stroke-width: 2.6; opacity: 0.75; }
.cherry-doodle .ink-light  { stroke: #FFB3C2; stroke-width: 3.2; opacity: 0.95; }
.cherry-doodle .ink-line   { stroke: #A00B27; stroke-width: 2.8; }
.cherry-doodle .ink-line2  { stroke: #C00F2F; stroke-width: 1.8; opacity: 0.8; }
.cherry-doodle .ink-stem   { stroke: #8F0824; stroke-width: 3; }
.cherry-doodle .ink-stem2  { stroke: #B5102C; stroke-width: 1.6; }
.cherry-doodle .ink-leaf   { stroke: #C8102E; stroke-width: 2.2; opacity: 0.8; }
.cherry-doodle .ink-under  { stroke: #C8102E; stroke-width: 3; }
.cherry-doodle .ink-under2 { stroke: #C8102E; stroke-width: 2; opacity: 0.8; }

/* Strich für Strich aufs Papier zeichnen (einmalig beim ersten Anzeigen) */
.cherry-doodle path { stroke-dasharray: 1; stroke-dashoffset: 1; }
.cherry-doodle.drawn path { animation: ink-draw 0.9s cubic-bezier(0.4, 0, 0.2, 1) forwards; }
.cherry-doodle.drawn .ink-line   { animation-delay: 0s; }
.cherry-doodle.drawn .ink-line2  { animation-delay: 0.25s; }
.cherry-doodle.drawn .ink-stem   { animation-delay: 0.55s; }
.cherry-doodle.drawn .ink-stem2  { animation-delay: 0.7s; }
.cherry-doodle.drawn .ink-leaf   { animation-delay: 0.85s; animation-duration: 0.7s; }
.cherry-doodle.drawn .ink-fill   { animation-delay: 0.9s; animation-duration: 1.4s; }
.cherry-doodle.drawn .ink-fill2  { animation-delay: 1.3s; animation-duration: 1.2s; }
.cherry-doodle.drawn .ink-shade  { animation-delay: 1.8s; animation-duration: 0.6s; }
.cherry-doodle.drawn .ink-light  { animation-delay: 2s; animation-duration: 0.5s; }
.cherry-doodle.drawn .ink-under  { animation-delay: 2.1s; animation-duration: 0.5s; }
.cherry-doodle.drawn .ink-under2 { animation-delay: 2.3s; animation-duration: 0.5s; }
@keyframes ink-draw { to { stroke-dashoffset: 0; } }

.cherry-count, .cherry-x, .cherry-delta {
    font-family: 'Caveat', 'Segoe Print', 'Bradley Hand', 'Marker Felt', cursive;
    font-weight: 700;
}
.cherry-count { font-size: 74px; fill: #C8102E; }
.cherry-x { font-size: 52px; fill: #B5102C; }
.cherry-delta { font-size: 46px; fill: #D4062E; opacity: 0; }
.cherry-delta.gain { fill: #D4062E; }
.cherry-delta.loss { fill: #7E0620; }

.cherry-doodle.pop svg { animation: cherry-pop 0.7s cubic-bezier(0.3, 1.6, 0.5, 1); }
@keyframes cherry-pop {
    0% { transform: scale(1) rotate(0deg); }
    35% { transform: scale(1.14) rotate(-3deg); }
    100% { transform: scale(1) rotate(0deg); }
}
.cherry-delta.show { animation: cherry-delta-rise 2.2s ease-out forwards; }
@keyframes cherry-delta-rise {
    0%   { opacity: 0; transform: translateY(14px) scale(0.7); }
    15%  { opacity: 1; transform: translateY(0) scale(1.1); }
    70%  { opacity: 1; }
    100% { opacity: 0; transform: translateY(-26px) scale(1); }
}

.scoreboard-cherries { margin-left: 6px; font-size: 0.85em; font-weight: 700; }
.scoreboard-cherries.gain { color: #ff5a78; }
.scoreboard-cherries.loss { color: #b8a0a6; }

/* ===== Solitär ===== */
body[data-game="solitaire"] .center-area { position: static; }
body[data-game="solitaire"] #turn-announcement,
body[data-game="solitaire"] #my-hand,
body[data-game="solitaire"] #seat-bottom .action-dock { display: none; }

#center-solitaire {
    position: absolute;
    inset: 8px 3% 74px 3%;
    justify-content: flex-start;
    gap: 6px;
    z-index: 6;
}
#center-solitaire.hidden { display: none; }

.sol-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.sol-toolbar button { font-size: 0.78rem; padding: 6px 10px; }
.sol-toolbar button:disabled { opacity: 0.45; cursor: not-allowed; }
.sol-toolbar small { opacity: 0.75; margin-left: 4px; }
.sol-info {
    font-size: 0.8rem;
    font-weight: 700;
    color: #fff;
    background: rgba(0, 0, 0, 0.45);
    border-radius: 999px;
    padding: 4px 12px;
}
.sol-stuck { margin: 0; animation: sol-pulse 1.6s ease-in-out infinite; }
@keyframes sol-pulse { 50% { box-shadow: 0 0 18px rgba(245, 158, 11, 0.8); } }
.sol-toolbar.stuck #sol-reset, .sol-toolbar.stuck #sol-new { outline: 2px solid var(--accent-gold); animation: sol-pulse 1.6s ease-in-out infinite; }

.sol-board {
    --card-width: clamp(50px, 8.6vw, 84px);
    --card-height: calc(var(--card-width) * 1.5);
    --sol-gap: clamp(6px, 1.4vw, 16px);
    position: relative;
    width: 100%;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}
.sol-top {
    width: calc(var(--card-width) * 7 + var(--sol-gap) * 6);
    max-width: 100%;
    display: flex;
    justify-content: space-between;
}
.sol-top-group { display: flex; gap: var(--sol-gap); }
.sol-slot {
    position: relative;
    width: var(--card-width);
    height: var(--card-height);
    border-radius: 7px;
    border: 2px dashed rgba(255, 255, 255, 0.28);
    background: rgba(0, 0, 0, 0.18);
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.4);
    font-size: 1.4rem;
    user-select: none;
}
.sol-slot.sol-stock { cursor: pointer; }
.sol-slot.sol-drop-hover, .sol-column.sol-drop-hover { box-shadow: 0 0 0 3px var(--accent-gold), 0 0 18px rgba(245, 158, 11, 0.7); }

.sol-tableau {
    width: calc(var(--card-width) * 7 + var(--sol-gap) * 6);
    max-width: 100%;
    flex: 1;
    min-height: 0;
    display: flex;
    justify-content: center;
    gap: var(--sol-gap);
}
.sol-column {
    position: relative;
    width: var(--card-width);
    min-height: var(--card-height);
    border-radius: 7px;
    box-sizing: border-box;
}
.sol-column.empty { border: 2px dashed rgba(255, 255, 255, 0.22); }

/* Dauerhafte Karten: gleiten an ihren Platz, drehen sich um */
.sol-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
}
.sol-card {
    position: absolute;
    left: 0;
    top: 0;
    width: var(--card-width);
    height: var(--card-height);
    pointer-events: auto;
    touch-action: none;
    user-select: none;
    will-change: transform;
    transition: transform 0.34s cubic-bezier(0.2, 0.85, 0.25, 1) var(--d, 0ms);
}
.sol-layer.resizing .sol-card { transition: none; }
.sol-card.moving { z-index: 700 !important; }
.sol-card.dragging { transition: none !important; z-index: 900 !important; cursor: grabbing; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.55)); }
.sol-card.is-up { cursor: grab; }
.sol-card.is-up:hover .sol-face .card { filter: brightness(1.08); }
.sol-inner {
    position: absolute;
    inset: 0;
}
/* Umdrehen ohne 3D (läuft in Firefox/Safari/Chrome gleich): Karte wird schmal (per JS), in der Mitte tauschen die Seiten */
.sol-face, .sol-back {
    position: absolute;
    inset: 0;
    transition: opacity 0s linear calc(var(--fd, 0ms) + 190ms);
}
.sol-face { opacity: 0; }
.sol-back { opacity: 1; }
.sol-card.is-up .sol-face { opacity: 1; }
.sol-card.is-up .sol-back { opacity: 0; }
.sol-face .card, .sol-back .card { width: 100%; height: 100%; }

.sol-finish {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    animation: sol-pulse 1.6s ease-in-out infinite;
}
.sol-finish.hidden { display: none; }

/* ===== Coach (Übungsrunde) ===== */
.coach-box {
    position: absolute;
    left: 12px;
    top: 10px;
    z-index: 12;
    width: min(300px, 38%);
    background: rgba(15, 23, 42, 0.82);
    border: 1px solid rgba(245, 158, 11, 0.55);
    border-radius: 12px;
    padding: 8px 12px 10px;
    color: #f8fafc;
    font-size: 0.82rem;
    line-height: 1.35;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
    pointer-events: none;
}
.coach-box.hidden { display: none; }
.coach-title { font-weight: 800; color: var(--accent-gold); margin-bottom: 4px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.coach-badge { font-size: 0.65rem; font-weight: 700; background: rgba(245, 158, 11, 0.2); border-radius: 999px; padding: 1px 8px; color: #fde68a; }
@media (max-width: 760px) { .coach-box { width: calc(100% - 24px); top: 6px; font-size: 0.78rem; } }

/* ===== Schule ===== */
.school-overlay {
    position: fixed; inset: 0; z-index: 400;
    background: rgba(2, 6, 23, 0.8); backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center; padding: 14px;
}
.school-overlay.hidden { display: none; }
.school-modal {
    width: min(1040px, 100%); height: min(780px, 100%);
    background: #1e293b; border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 18px;
    display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}
.school-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 14px 18px; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
.school-head h2 { margin: 0; font-size: 1.3rem; color: var(--accent-gold); }
.school-head p { margin: 2px 0 0; font-size: 0.82rem; opacity: 0.75; }
.school-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 230px 1fr; }
.school-nav { border-right: 1px solid rgba(255, 255, 255, 0.1); overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 4px; background: rgba(15, 23, 42, 0.5); }
.school-progress { padding: 4px 6px 10px; }
.school-progress small { font-size: 0.72rem; opacity: 0.7; }
.school-bar { height: 7px; background: rgba(255, 255, 255, 0.12); border-radius: 999px; overflow: hidden; margin-bottom: 4px; }
.school-bar span { display: block; height: 100%; background: linear-gradient(90deg, #f59e0b, #ef4444); }
.school-navitem { display: grid; grid-template-columns: 24px 1fr 20px; gap: 6px; align-items: center; text-align: left; background: transparent; border: 1px solid transparent; color: #e2e8f0; border-radius: 10px; padding: 8px 8px; cursor: pointer; font-size: 0.86rem; font-family: inherit; }
.school-navitem:hover { background: rgba(255, 255, 255, 0.07); }
.school-navitem.active { background: rgba(245, 158, 11, 0.16); border-color: rgba(245, 158, 11, 0.55); }
.school-main { overflow-y: auto; padding: 18px 22px 26px; }
.school-main h3 { margin: 0 0 10px; font-size: 1.25rem; }
.school-text p, .school-text li { line-height: 1.5; font-size: 0.95rem; }
.school-text ul { padding-left: 20px; margin: 6px 0 10px; }
.school-note { margin: 12px 0; padding: 10px 14px; border-left: 4px solid #ef4444; background: rgba(239, 68, 68, 0.1); border-radius: 8px; font-size: 0.88rem; line-height: 1.45; }
.school-table { border-collapse: collapse; margin: 8px 0 12px; }
.school-table th, .school-table td { padding: 5px 16px; border: 1px solid rgba(255, 255, 255, 0.18); text-align: left; font-size: 0.9rem; }
.school-table th { background: rgba(255, 255, 255, 0.08); }
.school-cardrow { margin: 10px 0; }
.school-cardlabel { display: block; font-size: 0.78rem; font-weight: 700; opacity: 0.75; margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.04em; }
.school-cards { display: flex; flex-wrap: wrap; gap: 6px; --card-width: 58px; --card-height: 87px; }
.school-card { width: var(--card-width); height: var(--card-height); }
.school-ladder { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 6px 0; border-bottom: 1px dashed rgba(255, 255, 255, 0.12); }
.school-ladder .school-cardrow { margin: 0; }
.school-rank { width: 160px; font-size: 0.92rem; }
.school-quiz { margin-top: 18px; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, 0.12); }
.school-qhead { font-size: 0.78rem; font-weight: 700; opacity: 0.75; margin-bottom: 4px; }
.school-qprompt { font-size: 1.02rem; line-height: 1.45; margin: 6px 0 8px; }
.school-emptynote { opacity: 0.75; font-style: italic; }
.school-options { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.school-option { flex: 1 1 180px; min-width: 140px; text-align: left; background: rgba(255, 255, 255, 0.07); color: #f1f5f9; border: 1px solid rgba(255, 255, 255, 0.22); border-radius: 10px; padding: 10px 14px; cursor: pointer; font-size: 0.93rem; font-family: inherit; }
.school-option:hover:not(:disabled) { background: rgba(245, 158, 11, 0.18); border-color: var(--accent-gold); }
.school-option:disabled { cursor: default; }
.school-option.right { background: rgba(34, 197, 94, 0.25); border-color: #22c55e; }
.school-option.wrong { background: rgba(239, 68, 68, 0.28); border-color: #ef4444; }
.school-feedback { margin-top: 6px; font-size: 0.92rem; line-height: 1.5; padding: 0; }
.school-feedback.ok, .school-feedback.bad { padding: 10px 14px; border-radius: 10px; }
.school-feedback.ok { background: rgba(34, 197, 94, 0.14); }
.school-feedback.bad { background: rgba(239, 68, 68, 0.14); }
.school-nextq { display: block; margin-top: 10px; }
.school-result { text-align: center; padding: 18px 8px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.school-big { font-size: 3rem; }
.school-result h4 { margin: 0; font-size: 1.4rem; }
.school-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 18px; border-top: 1px solid rgba(255, 255, 255, 0.1); flex-wrap: wrap; }
.school-foot button:disabled { opacity: 0.4; cursor: not-allowed; }
@media (max-width: 760px) {
    .school-body { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
    .school-nav { flex-direction: row; overflow-x: auto; overflow-y: hidden; border-right: none; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
    .school-progress { display: none; }
    .school-navitem { white-space: nowrap; grid-template-columns: 20px auto 18px; }
    .school-main { padding: 14px; }
    .school-foot #school-practice { order: 3; width: 100%; }
}

@media (max-width: 860px) {
    #btn-school .btn-label { display: none; }   /* auf schmalen Fenstern nur das 🎓-Symbol */
}

/* ===== Zugangscode ===== */
.gate-overlay { position: fixed; inset: 0; z-index: 1000; background: radial-gradient(circle at 50% 30%, #1e293b, #020617);
    display: flex; align-items: center; justify-content: center; padding: 16px; }
.gate-overlay.hidden { display: none; }
.gate-card { width: min(380px, 100%); background: #1e293b; border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 18px;
    padding: 26px 22px; text-align: center; display: flex; flex-direction: column; gap: 12px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6); }
.gate-icon { font-size: 2.6rem; }
.gate-card h2 { margin: 0; color: var(--accent-gold); }
.gate-card p { margin: 0; font-size: 0.9rem; opacity: 0.8; line-height: 1.4; }
.gate-card input { font-size: 1.25rem; letter-spacing: 0.12em; text-align: center; text-transform: uppercase; padding: 12px;
    border-radius: 10px; border: 1px solid rgba(255, 255, 255, 0.25); background: #0f172a; color: #fff; }
.gate-card input:focus { outline: 2px solid var(--accent-gold); }
.gate-error { min-height: 1.2em; color: #fca5a5; font-size: 0.85rem; }

.field-hint { display: block; margin-top: 6px; font-size: 0.78rem; line-height: 1.35; color: rgba(255, 255, 255, 0.6); }
