/* ==========================================================
   VIANDANTI DI RUOLO - DUNGEON SLAYER
   Mobile-first UI
========================================================== */

.ds-page {
    width: 100%;
    max-width: 100%;
    padding: 10px !important;
    margin: 0 auto;
}

/* HERO */

.ds-hero {
    background: linear-gradient(135deg, #ecf8ec, #fff8eb);
    border: 1px solid rgba(31, 107, 58, 0.18);
    border-radius: 18px;
    padding: 14px;
    margin-bottom: 12px !important;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.07);
}

.ds-hero h1 {
    font-size: 1.75rem;
    line-height: 1.05;
    margin-bottom: 6px !important;
}

.ds-hero .lead {
    font-size: 0.95rem;
    line-height: 1.25;
}

.ds-mobile-warning {
    color: #1f6b3a;
    font-size: 0.88rem;
    font-weight: 800;
    margin-top: 6px;
}

.ds-mode-badge {
    display: inline-block;
    margin-top: 8px;
    padding: 5px 10px;
    border-radius: 999px;
    background: #e6f5e8;
    color: #1f6b3a;
    font-size: 0.85rem;
    font-weight: 900;
}

/* LAYOUT */

.ds-layout {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ds-main-card,
.ds-side-card {
    background: #fffaf2;
    border: 1px solid rgba(31, 107, 58, 0.15);
    border-radius: 18px;
    padding: 12px;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.08);
}

/* SCHERMATE CENTRALI */

.ds-center-screen {
    min-height: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    gap: 12px;
}

.ds-center-screen h2 {
    font-size: 1.65rem;
    font-weight: 900;
    color: #18391f;
    margin: 0;
}

.ds-center-screen p {
    margin: 0;
    font-size: 0.95rem;
}

.ds-big-icon {
    font-size: 3.8rem;
    line-height: 1;
}

/* COMBATTIMENTO */

.ds-combat-screen {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ds-enemy-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: linear-gradient(135deg, #fff2dc, #ffffff);
    border: 1px solid rgba(120, 72, 20, 0.18);
    border-radius: 18px;
    padding: 12px;
    text-align: center;
}

.ds-enemy-image-wrap {
    height: 145px;
    max-height: 145px;
    border-radius: 16px;
    background: radial-gradient(circle, #fff9ec, #e8d2ad);
    border: 1px solid rgba(120, 72, 20, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.ds-enemy-img {
    width: 120px !important;
    height: 120px !important;
    max-width: 120px !important;
    max-height: 120px !important;
    object-fit: contain;
}

.ds-enemy-emoji {
    font-size: 4.6rem;
    line-height: 1;
}

.ds-enemy-info h2 {
    font-size: 1.45rem;
    font-weight: 900;
    color: #18391f;
    margin: 0 0 10px 0;
}

/* STAT */

.ds-stat-grid,
.ds-stat-grid-small {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.ds-stat {
    background: #ffffff;
    border: 1px solid rgba(31, 107, 58, 0.14);
    border-radius: 14px;
    padding: 9px 6px;
    text-align: center;
    min-height: 62px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ds-stat span {
    display: block;
    font-weight: 900;
    color: #1f3d27;
    font-size: 0.72rem;
    line-height: 1.1;
}

.ds-stat strong {
    display: block;
    font-size: 1.05rem;
    color: #111;
    margin-top: 4px;
    line-height: 1.1;
}

/* AZIONI */

.ds-action-panel {
    background: #eef8ee;
    border: 1px solid rgba(31, 107, 58, 0.18);
    border-radius: 18px;
    padding: 12px;
}

.ds-action-panel h3 {
    font-size: 1.35rem;
    font-weight: 900;
    color: #18391f;
    margin: 0 0 10px 0;
    text-align: center;
}

.ds-action-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 9px;
}

.ds-btn {
    width: 100%;
    border-radius: 15px;
    padding: 13px 12px;
    font-size: 1rem;
    font-weight: 900;
    text-align: center;
}

.ds-btn-big {
    font-size: 1.05rem;
    padding: 15px 12px;
}

/* DIREZIONI */

.ds-directions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 9px;
}

.ds-direction-btn {
    background: #ffffff;
    border: 2px solid rgba(31, 107, 58, 0.24);
    border-radius: 18px;
    padding: 14px;
    text-decoration: none;
    color: #18391f;
    font-weight: 900;
    text-align: center;
}

.ds-direction-btn span {
    display: block;
    font-size: 1.7rem;
    line-height: 1;
    margin-bottom: 4px;
}

.ds-direction-btn small {
    font-size: 0.9rem;
}

/* RISULTATO */

.ds-outcome-box {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid rgba(31, 107, 58, 0.18);
    padding: 12px;
    text-align: left;
}

.ds-outcome-title {
    font-weight: 900;
    margin-bottom: 7px;
    color: #18391f;
}

.ds-outcome-lines {
    display: grid;
    gap: 4px;
    font-size: 0.9rem;
}

/* BAULE */

.ds-chest-image-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
}

.ds-chest-svg {
    width: 150px;
    max-width: 100%;
}

.ds-chest-emoji {
    font-size: 4.8rem;
}

/* SHOP */

.ds-shop-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 9px;
}

/* SCHEDA */

.ds-player-box h3,
.ds-log-box h3 {
    font-size: 1.45rem;
    font-weight: 900;
    color: #18391f;
    margin-bottom: 10px;
}

/* DIARIO */

.ds-log-list {
    max-height: 230px;
    overflow-y: auto;
    display: grid;
    gap: 7px;
    padding-right: 2px;
}

.ds-log-line {
    background: #ffffff;
    border: 1px solid rgba(31, 107, 58, 0.12);
    border-radius: 12px;
    padding: 8px 9px;
    font-size: 0.82rem;
    line-height: 1.25;
}

/* LOADING */

.ds-loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.72);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}

.ds-loading-overlay.is-visible {
    display: flex;
}

.ds-loading-box {
    background: #ffffff;
    border-radius: 20px;
    padding: 24px 34px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.18);
    text-align: center;
    font-weight: 900;
}

.ds-loading-dice {
    font-size: 3rem;
}

/* CELL GRANDI / TABLET */

@media (min-width: 480px) {
    .ds-page {
        padding: 14px !important;
    }

    .ds-action-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ds-directions {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .ds-enemy-image-wrap {
        height: 175px;
        max-height: 175px;
    }

    .ds-enemy-img {
        width: 145px !important;
        height: 145px !important;
        max-width: 145px !important;
        max-height: 145px !important;
    }
}

/* DESKTOP */

@media (min-width: 992px) {
    .ds-page {
        max-width: 1200px;
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    .ds-hero {
        padding: 24px;
        border-radius: 22px;
    }

    .ds-hero h1 {
        font-size: 2.5rem;
    }

    .ds-layout {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 340px;
        gap: 22px;
        align-items: start;
    }

    .ds-main-card,
    .ds-side-card {
        padding: 22px;
        border-radius: 24px;
    }

    .ds-enemy-card {
        display: grid;
        grid-template-columns: 210px minmax(0, 1fr);
        gap: 22px;
        align-items: center;
        text-align: left;
        padding: 20px;
        border-radius: 24px;
    }

    .ds-enemy-image-wrap {
        height: 210px;
        max-height: 210px;
        border-radius: 22px;
    }

    .ds-enemy-img {
        width: 165px !important;
        height: 165px !important;
        max-width: 165px !important;
        max-height: 165px !important;
    }

    .ds-enemy-emoji {
        font-size: 6rem;
    }

    .ds-enemy-info h2 {
        font-size: 2rem;
    }

    .ds-stat-grid-small {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

    .ds-action-grid {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    }

    .ds-center-screen {
        min-height: 390px;
    }
}
@media (max-width: 991px) {
    .ds-center-screen .ds-action-grid {
        display: flex;
        justify-content: center;
    }

    .ds-center-screen .ds-action-grid .ds-btn {
        width: auto;
        min-width: 260px;
        max-width: 90%;
    }
}
.ds-return-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    text-decoration: none !important;
    font-weight: 900;
    border-radius: 15px;
}

.ds-return-btn:hover,
.ds-return-btn:focus {
    text-decoration: none !important;
}
.ds-bottom-buttons {
    display: flex;
    flex-direction: row;
    gap: 10px;
    width: 100%;
}

.ds-bottom-buttons .ds-bottom-btn {
    flex: 1 1 0;
    width: auto !important;
    min-width: 0;
    display: flex !important;
    align-items: center;
    justify-content: center;
    text-align: center;
    white-space: nowrap;
    text-decoration: none !important;
}

@media (max-width: 380px) {
    .ds-bottom-buttons {
        gap: 6px;
    }

    .ds-bottom-buttons .ds-bottom-btn {
        font-size: 0.78rem;
        padding-left: 6px;
        padding-right: 6px;
    }
}/* =======================================================
   DUNGEON SLAYER - SVG NEGOZIO
======================================================= */

.ds-shop-image-wrap {
    width: 220px;
    max-width: 65%;
    margin: 0 auto 1rem auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ds-shop-svg {
    width: 100%;
    max-width: 220px;
    height: auto;
    display: block;
}

.ds-shop-fallback .ds-big-icon {
    font-size: 4rem;
}
