/* Accueil, catalogue des cartes et salons (rejoindre, salle d'attente, fin de partie). */

/* =====================================================================
   Salle de jeu — table de cartes immersive, pensée pour un navigateur
   iPhone en mode paysage (mais qui reste utilisable ailleurs). Ces
   règles s'appliquent à toute page qui rend .lobby-shell/.game-shell
   (Room.razor pour le salon/la partie, Home.razor pour l'accueil qui
   reprend le même habillage "feutrine verte" plutôt qu'un style à part) ;
   le catalogue reprend désormais le même habillage (.catalog-shell).
   ===================================================================== */
body:has(.lobby-shell) {
    padding: 0;
    margin: 0;
}

/* ---------- Écrans "salon" (rejoindre / attente / partie terminée) ---------- */
.lobby-shell {
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1.5rem 1rem calc(1.5rem + env(safe-area-inset-bottom, 0px));
    text-align: center;
    background: radial-gradient(ellipse at 50% 0%, var(--felt) 0%, var(--felt-dark) 75%);
    color: var(--ink);
}

.lobby-shell h1 {
    margin: 0;
    letter-spacing: 0.02em;
}

.winner-line {
    font-weight: 700;
    color: #b8860b;
}

.home-code-input {
    text-transform: uppercase;
}

.home-catalog-link {
    color: var(--ink);
    opacity: 0.85;
    margin-top: 0.5rem;
}

.home-catalog-link:hover {
    opacity: 1;
}

.exhibition-status {
    font-size: 0.85rem;
    color: #f2c94c;
    margin: 0.2rem 0;
}

/* =====================================================================
   Accueil et catalogue habillés comme la table de jeu : feutrine verte,
   cartes crème à bande de couleur, touches dorées.
   ===================================================================== */
.home-shell [class*="cat-"], .catalog-shell [class*="cat-"] { --band: var(--cat-color); }

.home-shell {
    justify-content: flex-start;
    gap: 1.4rem;
    padding-top: 2.2rem;
}

.home-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
}

.home-fan {
    position: relative;
    width: 260px;
    height: 128px;
    margin-bottom: 0.2rem;
}

.fan-card {
    --band: #999;
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 70px;
    height: 98px;
    margin-left: -35px;
    border-radius: 10px;
    background: linear-gradient(160deg, #fffdf6 0%, #f1eee0 100%);
    border-top: 10px solid var(--band);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12), 0 6px 14px rgba(0, 0, 0, 0.45);
    transform-origin: 50% 120%;
    transform: rotate(calc(var(--i) * 11deg)) translateY(calc(var(--i) * var(--i) * 3px - 14px));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    color: #333;
    transition: transform 0.2s ease;
}

.fan-card b {
    font-size: 1.6rem;
    line-height: 1;
}

.fan-card small {
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.65;
}

.home-hero:hover .fan-card {
    transform: rotate(calc(var(--i) * 15deg)) translateY(calc(var(--i) * var(--i) * 4px - 20px));
}

.home-title {
    font-size: clamp(2.4rem, 8vw, 3.6rem);
    font-weight: 900;
    letter-spacing: 0.02em;
    color: #ffe27a;
    text-shadow: 0 3px 0 #8a6a00, 0 8px 22px rgba(0, 0, 0, 0.5);
    margin: 0.4rem 0 0;
}

.home-tagline {
    max-width: 520px;
    margin: 0;
    opacity: 0.9;
    line-height: 1.45;
}

.home-board {
    width: 100%;
    max-width: 720px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.1rem;
    border-radius: 18px;
    background: radial-gradient(ellipse at 50% 30%, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0) 70%),
        rgba(0, 0, 0, 0.16);
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.07), inset 0 6px 22px rgba(0, 0, 0, 0.35);
    box-sizing: border-box;
}

.home-name-card label {
    display: block;
    text-align: left;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.85;
    margin-bottom: 0.35rem;
}

.home-name-card input,
.home-action-card input {
    width: 100%;
    box-sizing: border-box;
    padding: 0.65rem 0.8rem;
    border-radius: 10px;
    border: 2px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.95);
    font-size: 1.05rem;
    color: #222;
}

.home-name-card input:focus,
.home-action-card input:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(224, 180, 0, 0.35);
}

.home-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

.home-action-card {
    --band: #999;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    text-align: left;
    padding: 1rem 1rem 1.1rem;
    border-radius: var(--card-radius);
    background: linear-gradient(160deg, #fffdf6 0%, #f1eee0 100%);
    border-top: 12px solid var(--band);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12), 0 8px 20px rgba(0, 0, 0, 0.4);
    color: #222;
    transition: transform 0.15s ease;
}

.home-action-card:hover {
    transform: translateY(-3px);
}

.home-action-card h2 {
    margin: 0;
    font-size: 1.15rem;
}

.home-action-card p {
    margin: 0;
    font-size: 0.85rem;
    opacity: 0.75;
}

.home-action-icon {
    position: absolute;
    top: 0.55rem;
    right: 0.75rem;
    font-size: 1.5rem;
    opacity: 0.85;
}

.home-action-card .btn {
    margin-top: auto;
}

.home-action-card .home-code-input {
    text-transform: uppercase;
    letter-spacing: 0.45em;
    text-align: center;
    font-weight: 800;
    font-size: 1.3rem;
    border-color: rgba(0, 0, 0, 0.18);
}

.home-error {
    margin: 0;
    color: #ffd0c9;
    font-weight: 700;
}

.home-howto {
    width: 100%;
    max-width: 720px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.7rem;
}

.howto-step {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    text-align: left;
    font-size: 0.85rem;
    line-height: 1.35;
    padding: 0.7rem 0.8rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.howto-num {
    flex: 0 0 auto;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--gold);
    color: #2a1e00;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}

.home-shell .home-catalog-link {
    display: inline-block;
    padding: 0.6rem 1.1rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.08);
    color: var(--ink);
    text-decoration: none;
    font-weight: 600;
    opacity: 1;
}

.home-shell .home-catalog-link:hover {
    background: rgba(255, 255, 255, 0.16);
}

/* ---------- Catalogue ---------- */
.catalog-shell {
    justify-content: flex-start;
    align-items: stretch;
    text-align: left;
    gap: 1rem;
    padding: 1.2rem clamp(0.8rem, 3vw, 2.2rem) 2.5rem;
}

.catalog-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.catalog-header h1 {
    margin: 0;
    font-size: clamp(1.6rem, 4vw, 2.3rem);
    color: #ffe27a;
    text-shadow: 0 2px 0 #8a6a00, 0 6px 16px rgba(0, 0, 0, 0.45);
}

.catalog-sub {
    margin: 0.2rem 0 0;
    opacity: 0.8;
    font-size: 0.9rem;
}

.catalog-back {
    text-decoration: none;
}

.catalog-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.8rem 1.4rem;
}

.catalog-search {
    flex: 1 1 260px;
    max-width: 420px;
    padding: 0.6rem 0.85rem;
    border-radius: 999px;
    border: 2px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.95);
    font-size: 1rem;
}

.catalog-search:focus {
    outline: none;
    border-color: var(--gold);
}

.catalog-switch {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    cursor: pointer;
    font-size: 0.9rem;
    user-select: none;
}

.catalog-switch input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

.switch-track {
    position: relative;
    width: 42px;
    height: 24px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.25);
    transition: background 0.15s ease;
}

.switch-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    transition: transform 0.15s ease;
}

.catalog-switch input:checked + .switch-track {
    background: #c0392b;
}

.catalog-switch input:checked + .switch-track .switch-thumb {
    transform: translateX(18px);
}

.catalog-switch input:focus-visible + .switch-track {
    box-shadow: 0 0 0 3px rgba(224, 180, 0, 0.5);
}

.catalog-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.catalog-chip {
    --band: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-left: 6px solid var(--band);
    background: rgba(255, 255, 255, 0.08);
    color: var(--ink);
    border-radius: 999px;
    padding: 0.35rem 0.8rem;
    font: inherit;
    font-size: 0.82rem;
    cursor: pointer;
}

.catalog-chip:hover {
    background: rgba(255, 255, 255, 0.16);
}

.catalog-chip.active {
    background: #fffdf6;
    color: #222;
    font-weight: 700;
}

.catalog-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
    border-radius: 18px;
    background: rgba(0, 0, 0, 0.14);
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.06);
}

.catalog-section-title {
    --band: #fff;
    margin: 0;
    display: flex;
    align-items: baseline;
    gap: 0.7rem;
    font-size: 1.25rem;
    padding-left: 0.6rem;
    border-left: 6px solid var(--band);
}

.catalog-section-title span {
    font-size: 0.8rem;
    font-weight: 400;
    opacity: 0.7;
}

.catalog-section-rule {
    margin: 0 0 0.3rem;
    font-size: 0.85rem;
    opacity: 0.75;
}

.catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 0.8rem;
}

.catalog-card {
    --band: #999;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-height: 190px;
    padding: 0.6rem 0.7rem 0.55rem;
    border-radius: var(--card-radius);
    background: linear-gradient(160deg, #fffdf6 0%, #f1eee0 100%);
    border-top: 12px solid var(--band);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12), 0 5px 14px rgba(0, 0, 0, 0.4);
    color: #222;
    transition: transform 0.12s ease;
}

.catalog-card:hover {
    transform: translateY(-4px) rotate(-0.6deg);
}

.catalog-card header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.4rem;
}

.catalog-card header strong {
    font-size: 0.95rem;
    line-height: 1.2;
}

.catalog-qty {
    flex: 0 0 auto;
    background: var(--gold);
    color: #2a1e00;
    border-radius: 999px;
    padding: 0.05rem 0.45rem;
    font-size: 0.72rem;
    font-weight: 800;
}

.catalog-card-cat {
    font-size: 0.64rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.6;
}

.catalog-short {
    margin: 0;
    font-size: 0.8rem;
    font-style: italic;
    color: #4a4a4a;
}

.catalog-effect {
    margin: 0;
    font-size: 0.76rem;
    line-height: 1.3;
    opacity: 0.8;
}

.catalog-conditions {
    margin: 0;
    padding-left: 1rem;
    font-size: 0.72rem;
    opacity: 0.75;
}

.catalog-card footer {
    margin-top: auto;
    display: flex;
    justify-content: flex-end;
}

.catalog-smiles {
    font-weight: 800;
    color: #b8860b;
    font-size: 0.85rem;
}

.catalog-nosmile {
    font-size: 0.7rem;
    opacity: 0.45;
}

/* ---------- Salle d'attente / rejoindre / fin de partie (même habillage que l'accueil) ---------- */
.room-lobby-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.55rem;
}

.room-lobby-eyebrow {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    opacity: 0.8;
}

.room-code-tiles {
    display: flex;
    gap: 0.45rem;
}

.code-tile {
    width: 54px;
    height: 72px;
    border-radius: 10px;
    background: linear-gradient(160deg, #fffdf6 0%, #f1eee0 100%);
    border-top: 9px solid var(--gold);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12), 0 6px 14px rgba(0, 0, 0, 0.45);
    color: #222;
    font-size: 2rem;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
}

.code-tile:nth-child(odd) {
    transform: rotate(-3deg);
}

.code-tile:nth-child(even) {
    transform: rotate(3deg);
}

.room-invite {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.room-invite code {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 0.35rem 0.6rem;
    font-size: 0.82rem;
    color: var(--ink);
    overflow-wrap: anywhere;
}

.room-section-title {
    margin: 0;
    text-align: left;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.85;
}

.seat-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.7rem;
}

.seat-card {
    --seat-color: #9ad;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    padding: 0.8rem 0.5rem 0.7rem;
    border-radius: var(--card-radius);
    background: linear-gradient(160deg, #fffdf6 0%, #f1eee0 100%);
    border-top: 10px solid var(--seat-color);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12), 0 5px 14px rgba(0, 0, 0, 0.4);
    color: #222;
    font: inherit;
}

.seat-card.me {
    box-shadow: 0 0 0 3px var(--gold), 0 5px 14px rgba(0, 0, 0, 0.4);
}

.seat-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--seat-color);
    color: #1a1a1a;
    font-size: 1.3rem;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.15);
}

.seat-name {
    font-weight: 800;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.seat-status {
    font-size: 0.72rem;
    opacity: 0.65;
}

.seat-card.seat-add {
    --seat-color: rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.06);
    border: 2px dashed rgba(255, 255, 255, 0.35);
    border-top: 2px dashed rgba(255, 255, 255, 0.35);
    color: var(--ink);
    box-shadow: none;
    cursor: pointer;
}

.seat-card.seat-add .seat-name {
    white-space: normal;
    text-align: center;
    line-height: 1.15;
}

.seat-card.seat-add .seat-avatar {
    background: rgba(255, 255, 255, 0.15);
    color: var(--ink);
}

.seat-card.seat-add:hover {
    background: rgba(255, 255, 255, 0.12);
}

.room-options {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.room-option {
    text-align: left;
    padding: 0.55rem 0.7rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.room-option > span:last-child {
    display: flex;
    flex-direction: column;
}

.room-option small {
    opacity: 0.7;
    font-size: 0.75rem;
}

.room-option .switch-track {
    flex: 0 0 auto;
}

.room-start {
    font-size: 1.05rem;
    padding: 0.75rem 1rem !important;
}

.room-join-card,
.room-results {
    width: 100%;
    max-width: 420px;
    box-sizing: border-box;
}

.room-results ul {
    list-style: none;
    padding: 0;
    margin: 0.2rem 0 0.6rem;
}

.room-results li {
    padding: 0.35rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.pick-player .seat-avatar {
    width: 34px;
    height: 34px;
    font-size: 1rem;
    flex: 0 0 auto;
}

/* Catalogue : la même illustration que sur les cartes en jeu. */
.catalog-card .catalog-art {
    display: block;
    align-self: center;
    font-size: 44px;
    margin: 0.1rem 0 0.15rem;
    filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.18));
}

.catalog-card .catalog-art .card-art-badge {
    font-size: 20px;
}

@media (max-width: 480px) {
    .home-fan {
        transform: scale(0.8);
    }

    .catalog-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

/* ---------- Accueil : salons publics à rejoindre ---------- */
.home-public {
    text-align: left;
}

.home-public-title {
    margin: 0.2rem 0 0.5rem;
    font-size: 1.05rem;
    color: var(--gold);
}

.home-public-title small {
    color: var(--ink);
    opacity: 0.7;
    font-weight: 600;
}

.home-public-empty {
    margin: 0.2rem 0;
    font-size: 0.85rem;
    opacity: 0.75;
}

.home-public-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.home-public-room {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.55rem 0.7rem;
    border-radius: 12px;
    border-left: 6px solid #3d7ff2;
    background: linear-gradient(160deg, #fffdf6 0%, #f1eee0 100%);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.35);
    color: #222;
}

.home-public-code {
    font-weight: 900;
    letter-spacing: 0.25em;
    font-size: 1.05rem;
    padding: 0.25rem 0.45rem;
    border-radius: 8px;
    background: #0b4a2c;
    color: var(--gold);
}

.home-public-players {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}

.home-public-players strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.home-public-options {
    opacity: 0.7;
    font-size: 0.78rem;
}

/* Salle d'attente : retirer un bot (× en haut à droite de sa carte). */
.seat-card {
    position: relative;
}

.seat-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.12);
    color: #333;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
}

.seat-remove:hover {
    background: #c0392b;
    color: #fff;
}

/* Salle d'attente : hôte, note pour les autres joueurs, bouton Quitter. */
.seat-host {
    font-size: 0.72rem;
    font-weight: 800;
    color: #8a6a00;
}

.room-manager-note {
    margin: 0 0 0.6rem;
    font-size: 0.85rem;
    opacity: 0.85;
}

.room-leave {
    margin-top: 0.7rem;
}

/* ---------- Aide aux règles de l'accueil (RulesGuide.razor) ---------- */
.home-rules-btn {
    margin-top: 0.5rem;
    padding: 0.55rem 1.2rem;
    border-radius: 999px;
    border: 2px solid var(--gold);
    background: rgba(224, 180, 0, 0.14);
    color: var(--ink);
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease;
}

.home-rules-btn:hover {
    background: rgba(224, 180, 0, 0.28);
    transform: translateY(-1px);
}

.rules-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(0, 12, 6, 0.72);
    backdrop-filter: blur(3px);
    animation: rules-fade 0.2s ease-out;
}

.rules-sheet {
    position: relative;
    width: min(520px, 100%);
    max-height: calc(100dvh - 2rem);
    overflow-y: auto;
    box-sizing: border-box;
    padding: 1.4rem 1.4rem 1.1rem;
    border-radius: 18px;
    border-top: 6px solid var(--gold);
    background: linear-gradient(160deg, #fffdf6 0%, #f1eee0 100%);
    color: #2a2418;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
    animation: rules-pop 0.25s cubic-bezier(0.2, 1.4, 0.4, 1);
}

.rules-close {
    position: absolute;
    top: 0.5rem;
    right: 0.6rem;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.06);
    color: #2a2418;
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
}

.rules-eyebrow {
    color: #8a7b52;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.rules-page {
    min-height: 15.5rem;
    animation: rules-slide 0.25s ease-out;
}

.rules-emoji {
    margin: 0.4rem 0 0.1rem;
    font-size: 2.6rem;
    line-height: 1.1;
}

.rules-page h2 {
    margin: 0 0 0.7rem;
    color: #0b4a2c;
    font-size: 1.35rem;
    font-weight: 900;
}

.rules-page p {
    margin: 0.45rem 0;
    font-size: 0.95rem;
    line-height: 1.45;
}

.rules-chain {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    margin: 0.2rem 0 0.8rem;
}

.rules-mini {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 84px;
    border-radius: 9px;
    border-top: 6px solid var(--cat-color);
    background: #fff;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.18), inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.rules-mini b {
    font-size: 1.6rem;
    line-height: 1.2;
}

.rules-mini small {
    color: #4a4535;
    font-size: 0.66rem;
    font-weight: 800;
}

.rules-arrow {
    color: #b8860b;
    font-size: 1.2rem;
    font-weight: 900;
}

.rules-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: 0.8rem;
}

.rules-dots {
    display: flex;
    gap: 0.35rem;
}

.rules-dot {
    width: 9px;
    height: 9px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: #d6ccad;
    cursor: pointer;
}

.rules-dot.on {
    background: #0b6b40;
    transform: scale(1.3);
}

.rules-nav .btn {
    min-width: 7.5rem;
    background: linear-gradient(180deg, #1f9a5c, #0b6b40);
    color: #fff;
    border: 1px solid rgba(0, 0, 0, 0.2);
}

.rules-nav .btn.secondary {
    background: #fff;
    color: #0b4a2c;
    border: 1px solid #c9bf9f;
}

.rules-nav .btn:disabled {
    visibility: hidden;
}

@keyframes rules-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes rules-pop { from { opacity: 0; transform: translateY(14px) scale(0.96); } to { opacity: 1; transform: none; } }
@keyframes rules-slide { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }

@media (max-width: 420px) {
    .rules-sheet { padding: 1.2rem 0.9rem 0.9rem; }
    .rules-mini { width: 54px; height: 72px; }
    .rules-mini b { font-size: 1.35rem; }
    .rules-nav .btn { min-width: 0; padding-left: 0.7rem; padding-right: 0.7rem; font-size: 0.85rem; }
}

@media (prefers-reduced-motion: reduce) {
    .rules-overlay, .rules-sheet, .rules-page { animation: none; }
}
