/**
 * Style interaktywnej gry planszowej (Front-end)
 * Wtyczka Gra Planszowa
 * Wymagania: zaokrąglenia 5px, kolor zielony: #4f883d, eleganckie pola imion, brak dźwięków, obsługa do 8 graczy, powiększony pionek, perfekcyjne skalowanie na pełnym ekranie
 */

.gp-game-wrapper {
    position: relative;
    width: 100% !important;
    max-width: 1200px;
    margin: 24px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #2c3e50;
    user-select: none;
    box-sizing: border-box;
    clear: both;
    line-height: 1.5;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.gp-game-wrapper * {
    box-sizing: border-box;
}

/* Zapewnienie pełnej szerokości w modułach Divi Theme Builder (Post Content, Code, Text) */
.et_pb_post_content .gp-game-wrapper,
.et_pb_module .gp-game-wrapper,
.et_pb_text .gp-game-wrapper,
.et_pb_code .gp-game-wrapper {
    width: 100% !important;
    margin: 16px auto !important;
}

/* Reset styli motywów i Divi dla przycisków */
.gp-game-wrapper button,
.gp-game-wrapper .gp-btn-primary,
.gp-game-wrapper .gp-btn-roll,
.gp-game-wrapper .gp-icon-btn {
    text-transform: none !important;
    letter-spacing: normal !important;
    text-shadow: none !important;
    min-height: unset !important;
    border-radius: 5px !important;
}

.gp-game-wrapper button::after,
.gp-game-wrapper button::before,
.gp-game-wrapper .gp-btn-roll::after,
.gp-game-wrapper .gp-btn-roll::before,
.gp-game-wrapper .gp-btn-primary::after,
.gp-game-wrapper .gp-btn-primary::before {
    display: none !important;
    content: none !important;
}

.gp-hidden {
    display: none !important;
}

/* ================= HUD (Pasek kontrolny) ================= */
.gp-hud {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: #ffffff;
    border: 1px solid #e0e6ed;
    border-radius: 5px;
    padding: 10px 16px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.gp-current-turn-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #edf5ea;
    border: 2px solid #4f883d;
    padding: 6px 14px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.gp-turn-avatar {
    font-size: 24px;
    line-height: 1;
}

.gp-turn-details {
    display: flex;
    flex-direction: column;
}

.gp-turn-label {
    font-size: 11px;
    text-transform: uppercase;
    color: #3b682d;
    letter-spacing: 0.5px;
    font-weight: 600;
    line-height: 1.2;
}

.gp-turn-name {
    font-size: 15px;
    color: #26471c;
    line-height: 1.2;
}

.gp-players-pills {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.gp-player-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
    transition: all 0.2s ease;
}

.gp-player-pill.is-active {
    background: #edf5ea;
    border-color: #4f883d;
    font-weight: 700;
    box-shadow: 0 0 0 2px rgba(79, 136, 61, 0.2);
}

.gp-pill-tile {
    font-size: 11px;
    background: #e2e8f0;
    color: #475569;
    padding: 2px 6px;
    border-radius: 5px;
    font-weight: 600;
}

.gp-hud-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.gp-icon-btn {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 5px !important;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    padding: 0 !important;
    line-height: 1;
    transition: all 0.2s ease;
}

.gp-icon-btn:hover {
    background: #e2e8f0;
    transform: translateY(-1px);
}

/* ================= PLANSZA ================= */
.gp-board-container {
    position: relative;
    width: 100%;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    background: #2b4c2b;
}

.gp-board-inner {
    position: relative;
    width: 100%;
    aspect-ratio: 1448 / 1086;
}

.gp-board-bg {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    pointer-events: none;
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.gp-tiles-layer,
.gp-pawns-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

/* ================= PIONKI (POWIĘKSZONE) ================= */
.gp-pawn {
    position: absolute;
    width: 56px;
    height: 68px;
    transform: translate(-50%, -88%);
    transition: left 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), top 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), transform 0.2s ease;
    z-index: 10;
    pointer-events: auto;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
    display: flex;
    flex-direction: column;
    align-items: center;
}

.gp-pawn.is-moving {
    animation: pawnHop 0.35s ease-in-out infinite;
    z-index: 20;
}

@keyframes pawnHop {
    0%, 100% {
        transform: translate(-50%, -88%) scale(1);
    }
    50% {
        transform: translate(-50%, -125%) scale(1.15);
    }
}

.gp-pawn-bubble {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #ffffff;
    border: 3px solid #333333;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    position: relative;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.28);
}

.gp-pawn-tip {
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 10px solid #333333;
    margin-top: -1px;
}

/* ================= WIRTUALNA KOSTKA 3D ================= */
.gp-dice-dock {
    --gp-dice-dock-inset: 24px;
    position: absolute;
    bottom: var(--gp-dice-dock-inset);
    right: var(--gp-dice-dock-inset);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 5px;
    padding: 16px 20px;
    display: grid;
    grid-template-columns: auto 32px;
    align-items: center;
    justify-items: center;
    gap: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    z-index: 999;
}

.gp-dice-dock.gp-dice-dock--left {
    --gp-dice-dock-origin: bottom left;
    left: var(--gp-dice-dock-inset);
    right: auto;
    transform-origin: bottom left;
}

.gp-dice-dock-toggle {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid #4f883d;
    border-radius: 5px;
    background: #edf5ea;
    color: #2d5721;
    font: 700 22px/1 sans-serif;
    cursor: pointer;
}

.gp-dice-dock-toggle:hover {
    background: #4f883d;
    color: #fff;
}

.gp-dice-dock-toggle:focus-visible {
    outline: 2px solid #2d5721;
    outline-offset: 3px;
}

.gp-dice-scene {
    grid-column: 1;
    grid-row: 1;
    width: 60px;
    height: 60px;
    perspective: 600px;
    cursor: pointer;
    margin: 8px 0;
}

.gp-dice-cube {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transform: rotateX(-15deg) rotateY(25deg);
    transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.3, 1.2);
}

.gp-dice-cube.is-rolling {
    animation: diceSpin 0.7s cubic-bezier(0.25, 1, 0.5, 1) infinite;
}

@keyframes diceSpin {
    0% {
        transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg);
    }
    100% {
        transform: rotateX(720deg) rotateY(1080deg) rotateZ(360deg);
    }
}

/* Ścianki kostki */
.gp-dice-face {
    position: absolute;
    width: 60px;
    height: 60px;
    background: #ffffff;
    border: 2px solid #cbd5e1;
    border-radius: 5px;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.gp-dot {
    width: 10px;
    height: 10px;
    background: #1e293b;
    border-radius: 50%;
    display: inline-block;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.4);
}

.gp-face-1 { transform: rotateY(0deg) translateZ(30px); }
.gp-face-2 { transform: rotateY(180deg) translateZ(30px); justify-content: space-around; padding: 10px; }
.gp-face-3 { transform: rotateY(-90deg) translateZ(30px); justify-content: space-around; padding: 8px; }
.gp-face-4 { transform: rotateY(90deg) translateZ(30px); flex-direction: column; justify-content: space-around; padding: 6px; }
.gp-face-5 { transform: rotateX(-90deg) translateZ(30px); flex-direction: column; justify-content: space-around; padding: 6px; }
.gp-face-6 { transform: rotateX(90deg) translateZ(30px); flex-direction: column; justify-content: space-around; padding: 5px; }

.gp-dot-row {
    display: flex;
    justify-content: space-between;
    width: 100%;
    padding: 0 4px;
}

.gp-dot-mid {
    align-self: center;
}

/* Wyniki obrotu ścianek */
.gp-dice-cube[data-result="1"] { transform: rotateX(0deg) rotateY(0deg); }
.gp-dice-cube[data-result="2"] { transform: rotateX(0deg) rotateY(180deg); }
.gp-dice-cube[data-result="3"] { transform: rotateX(0deg) rotateY(90deg); }
.gp-dice-cube[data-result="4"] { transform: rotateX(0deg) rotateY(-90deg); }
.gp-dice-cube[data-result="5"] { transform: rotateX(90deg) rotateY(0deg); }
.gp-dice-cube[data-result="6"] { transform: rotateX(-90deg) rotateY(0deg); }

.gp-btn-roll {
    grid-column: 1 / -1;
    background: #4f883d !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 5px !important;
    padding: 10px 18px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    cursor: pointer;
    box-shadow: 0 3px 8px rgba(79, 136, 61, 0.3);
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.gp-btn-roll:hover:not(:disabled) {
    background: #437534 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(79, 136, 61, 0.4);
}

.gp-btn-roll:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.gp-dice-result-badge {
    grid-column: 1 / -1;
    font-size: 12px;
    font-weight: 700;
    color: #2d5721;
    background: #edf5ea;
    border: 1px solid #c8dec0;
    padding: 4px 10px;
    border-radius: 5px;
}

/* ================= MODALE I OKNA DIALOGOWE ================= */
.gp-modal-overlay {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999999 !important;
    padding: 20px;
    animation: fadeIn 0.2s ease;
}

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

.gp-modal-card {
    background: #ffffff;
    border-radius: 5px;
    width: 100%;
    max-width: 580px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: popUp 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes popUp {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.gp-modal-header {
    padding: 20px 24px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    text-align: center;
}

.gp-modal-header h2 {
    margin: 0 0 6px 0 !important;
    font-size: 20px !important;
    color: #0f172a !important;
    line-height: 1.3 !important;
}

.gp-modal-header p {
    margin: 0 !important;
    font-size: 13px !important;
    color: #64748b !important;
    line-height: 1.4 !important;
}

/* ================= KONFIGURACJA GRACZY ================= */
.gp-setup-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Wybór liczby graczy 1 do 8 */
.gp-player-count-selector {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 6px;
}

@media (max-width: 600px) {
    .gp-player-count-selector {
        grid-template-columns: repeat(4, 1fr);
    }
}

.gp-count-btn {
    padding: 10px 4px;
    border: 2px solid #e2e8f0 !important;
    border-radius: 5px !important;
    background: #ffffff !important;
    color: #334155 !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s ease;
}

.gp-count-btn:hover {
    border-color: #94a3b8 !important;
}

.gp-count-btn.active {
    border-color: #4f883d !important;
    background: #edf5ea !important;
    color: #2d5721 !important;
}

/* Ulepszone, eleganckie pola wpisywania imion graczy */
.gp-player-inputs-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 320px;
    overflow-y: auto;
    padding-right: 4px;
}

.gp-player-input-row {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    border: 1px solid #d0d7de;
    border-radius: 5px;
    padding: 6px 8px;
    transition: all 0.2s ease;
}

.gp-player-input-row:focus-within {
    border-color: #4f883d;
    box-shadow: 0 0 0 3px rgba(79, 136, 61, 0.15);
}

/* Klikalny przycisk wyboru zwierzaka */
.gp-btn-char-picker {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 5px !important;
    padding: 6px 10px !important;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 18px;
    line-height: 1;
}

.gp-btn-char-picker:hover {
    background: #e2e8f0;
    border-color: #94a3b8;
}

.gp-char-picker-arrow {
    font-size: 10px;
    color: #64748b;
}

.gp-player-input-field {
    flex: 1;
    border: none !important;
    background: transparent !important;
    padding: 8px 10px !important;
    font-size: 14px !important;
    color: #1e293b !important;
    outline: none !important;
    box-shadow: none !important;
    line-height: 1.4 !important;
}

.gp-player-input-field::placeholder {
    color: #94a3b8;
}

/* Modal wyboru zwierzaka */
.gp-char-grid-modal {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-top: 12px;
    max-height: 280px;
    overflow-y: auto;
    padding: 4px;
}

.gp-char-grid-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 6px;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 5px !important;
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: center;
}

.gp-char-grid-item:hover {
    border-color: #4f883d;
    background: #edf5ea;
    transform: translateY(-2px);
}

.gp-char-grid-item.is-selected {
    border-color: #4f883d;
    background: #edf5ea;
    font-weight: 700;
}

.gp-char-grid-icon {
    font-size: 26px;
    line-height: 1;
}

.gp-char-grid-name {
    font-size: 11px;
    color: #334155;
}

.gp-modal-footer {
    padding: 16px 24px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: flex-end;
}

.gp-btn-primary {
    background: #4f883d !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 5px !important;
    padding: 12px 24px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    cursor: pointer;
    box-shadow: 0 3px 8px rgba(79, 136, 61, 0.3);
    transition: all 0.2s ease;
}

.gp-btn-primary:hover {
    background: #437534 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(79, 136, 61, 0.4);
}

/* ================= MODAL PYTANIA QUIZOWEGO ================= */
.gp-question-modal-card {
    max-width: 620px;
    border-radius: 5px;
}

.gp-q-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.gp-q-modal-player-tag {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 14px;
}

.gp-q-modal-step-badge {
    background: #e2e8f0;
    color: #334155;
    padding: 4px 10px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 600;
}

.gp-q-modal-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    max-height: 70vh;
    overflow-y: auto;
}

.gp-q-image-container {
    text-align: center;
    border-radius: 5px;
    overflow: hidden;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    max-height: 220px;
}

.gp-q-image-container img {
    max-width: 100%;
    max-height: 220px;
    object-fit: contain;
}

.gp-q-title {
    font-size: 17px !important;
    line-height: 1.4 !important;
    color: #0f172a !important;
    margin: 0 !important;
    font-weight: 600 !important;
}

.gp-q-answers-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Kafelki wyboru odpowiedzi w modalu */
.gp-q-choice-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px !important;
    background: #ffffff !important;
    border: 2px solid #e2e8f0 !important;
    border-radius: 5px !important;
    cursor: pointer;
    text-align: left !important;
    transition: all 0.2s ease;
    font-size: 14px !important;
    color: #1e293b !important;
    width: 100%;
}

.gp-q-choice-btn:hover:not(:disabled) {
    border-color: #4f883d !important;
    background: #f8fafc !important;
}

.gp-q-choice-btn.is-selected {
    border-color: #4f883d !important;
    background: #edf5ea !important;
}

.gp-q-choice-btn.is-correct-reveal {
    border-color: #4f883d !important;
    background: #edf5ea !important;
    color: #2d5721 !important;
}

.gp-q-choice-btn.is-wrong-reveal {
    border-color: #ef4444 !important;
    background: #fef2f2 !important;
    color: #991b1b !important;
}

.gp-q-choice-letter {
    font-weight: 700;
    color: #4f883d;
    min-width: 24px;
}

.gp-q-choice-text {
    flex: 1;
}

.gp-q-choice-thumb {
    width: 36px;
    height: 36px;
    object-fit: cover;
    border-radius: 5px;
}

/* Odpowiedź otwarta */
.gp-q-open-input {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #cbd5e1;
    border-radius: 5px;
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s ease;
}

.gp-q-open-input:focus {
    border-color: #4f883d;
}

/* Alert podsumowujący odpowiedź */
.gp-feedback-alert {
    padding: 14px 16px;
    border-radius: 5px;
    font-size: 14px;
    line-height: 1.4;
    font-weight: 600;
}

.gp-feedback-alert.is-success {
    background: #edf5ea;
    border: 1px solid #c8dec0;
    color: #2d5721;
}

.gp-feedback-alert.is-error {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #991b1b;
}

.gp-q-modal-footer {
    padding: 14px 20px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: flex-end;
}

/* ================= MODAL ZWYCIĘSTWA ================= */
.gp-victory-card {
    text-align: center;
    padding: 36px 28px;
    max-width: 480px;
    border-radius: 5px;
}

.gp-victory-trophy {
    font-size: 64px;
    animation: bounceTrophy 1s ease infinite alternate;
}

@keyframes bounceTrophy {
    from { transform: translateY(0); }
    to { transform: translateY(-10px); }
}

.gp-victory-title {
    font-size: 26px !important;
    margin: 12px 0 6px 0 !important;
    color: #0f172a !important;
}

.gp-winner-badge {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: #edf5ea;
    border: 2px solid #4f883d;
    padding: 10px 24px;
    border-radius: 5px;
    margin: 14px 0;
}

.gp-winner-avatar {
    font-size: 32px;
}

.gp-winner-name {
    margin: 0 !important;
    font-size: 20px !important;
    color: #2d5721 !important;
}

.gp-victory-desc {
    color: #64748b !important;
    font-size: 15px !important;
    margin-bottom: 24px !important;
}

/* ================= PEŁNY EKRAN (FULLSCREEN Z POPRAWNYM SKALOWANIEM) ================= */
.gp-game-wrapper:fullscreen,
.gp-game-wrapper:-webkit-full-screen {
    width: 100vw !important;
    height: 100vh !important;
    max-width: 100vw !important;
    max-height: 100vh !important;
    margin: 0 !important;
    padding: 8px 16px !important;
    background: #1b2f19 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

.gp-game-wrapper:fullscreen .gp-hud,
.gp-game-wrapper:-webkit-full-screen .gp-hud {
    width: 100% !important;
    max-width: 1400px !important;
    flex-shrink: 0 !important;
    margin-bottom: 8px !important;
    padding: 6px 14px !important;
    background: rgba(255, 255, 255, 0.96) !important;
}

.gp-game-wrapper:fullscreen .gp-board-container,
.gp-game-wrapper:-webkit-full-screen .gp-board-container {
    flex: 0 1 auto !important;
    width: min(calc(100vw - 32px), calc((100vh - 84px) * (1448 / 1086))) !important;
    max-width: calc(100vw - 32px) !important;
    max-height: calc(100vh - 84px) !important;
    aspect-ratio: 1448 / 1086 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: auto !important;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.5) !important;
}

.gp-game-wrapper:fullscreen .gp-board-inner,
.gp-game-wrapper:-webkit-full-screen .gp-board-inner {
    width: 100% !important;
    height: 100% !important;
    aspect-ratio: 1448 / 1086 !important;
    position: relative !important;
}

.gp-game-wrapper:fullscreen .gp-board-bg,
.gp-game-wrapper:-webkit-full-screen .gp-board-bg {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    display: block !important;
}

.gp-game-wrapper:fullscreen .gp-dice-dock,
.gp-game-wrapper:-webkit-full-screen .gp-dice-dock {
    --gp-dice-dock-inset: 16px;
    scale: 0.9;
    transform-origin: var(--gp-dice-dock-origin, bottom right);
}

/* RWD / Responsywność */
@media (max-width: 768px) {
    .gp-hud {
        flex-direction: column;
        align-items: stretch;
    }
    .gp-hud-center {
        order: 3;
        justify-content: center;
    }
    .gp-dice-dock {
        --gp-dice-dock-inset: 12px;
        padding: 10px 14px;
        scale: 0.85;
        transform-origin: var(--gp-dice-dock-origin, bottom right);
    }
    .gp-char-grid-modal {
        grid-template-columns: repeat(3, 1fr);
    }
}
