/* ===== Global ===== */
*, *::before, *::after { box-sizing: border-box; }

/* Mobile: kill double-tap-to-zoom (and the 300ms tap delay) site-wide while
   keeping pinch-zoom for accessibility. Browsers intersect touch-action down
   the ancestor chain, so setting it on the root covers every descendant; the
   explicit control list below is a belt-and-braces fallback for older Safari. */
html { touch-action: manipulation; }

body {
    margin: 0;
    background: linear-gradient(180deg, #caf0f8 0%, #ade8f4 100%);
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    touch-action: manipulation;
}

button, a, input, select, textarea, label,
.btn, .nav-link, [role="button"], [onclick],
[data-reel], [data-idx], [data-meter], [data-dir], [data-pot],
[class*="btn-adjust"], [class*="control-btn"], [class*="-block"] {
    touch-action: manipulation;
}

a { color: inherit; }

/* ===== Layout ===== */
.page {
    display: flex;
    min-height: 100vh;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.content-footest {
    flex: 1;
    padding: 1rem 2rem 2rem;
    overflow-y: auto;
}

/* ===== Sidebar ===== */
.sidebar {
    width: 250px;
    min-width: 250px;
    background: linear-gradient(180deg, #03045e 0%, #023e8a 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 100;
    box-shadow: 4px 0 20px rgba(0,0,0,0.18);
}

.top-row {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 700;
    font-size: 1.1rem;
    color: #fff;
    text-decoration: none;
    letter-spacing: -0.2px;
}

.navbar-brand img {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    object-fit: contain;
}

.navbar-brand .brand-emoji {
    font-size: 1.6rem;
    line-height: 1;
}

.nav-scrollable {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem 0;
}

.nav-item a {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.65rem 1.25rem;
    color: rgba(255,255,255,0.78);
    text-decoration: none;
    font-size: 0.93rem;
    font-weight: 500;
    transition: background 0.2s, color 0.2s;
    border-radius: 0 2rem 2rem 0;
    margin-right: 0.75rem;
}

.nav-item a:hover,
.nav-item a.active {
    background: rgba(72,202,228,0.18);
    color: #fff;
}

.nav-item.border-bottom {
    border-bottom: 1px solid rgba(255,255,255,0.1) !important;
    padding-bottom: 0.5rem;
    margin-bottom: 0.25rem;
}

.nav-item.pt-1 {
    padding-top: 0.5rem;
}

.nav-icon { font-size: 1rem; }

.nav-user-email {
    display: block;
    font-size: 0.75rem;
    color: rgba(255,255,255,0.45);
    padding: 0.5rem 1.25rem 0 1.25rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ===== Hamburger (mobile) ===== */
.navbar-toggler {
    display: none;
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 200;
    width: 32px;
    height: 32px;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
}

.navbar-toggler span {
    display: block;
    width: 22px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: all 0.3s;
}

.nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 99;
}

/* ===== Hero ===== */
.hero-section {
    position: relative;
    background: linear-gradient(135deg, #03045e 0%, #0077b6 55%, #00b4d8 100%);
    color: white;
    padding: 4rem 2rem 3.5rem;
    text-align: center;
    overflow: hidden;
    margin: -1rem -2rem 0 -2rem;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -80px; right: -60px;
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(0,180,216,0.38) 0%, transparent 70%);
    border-radius: 50%;
    animation: hero-float 8s ease-in-out infinite;
    pointer-events: none;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: -60px; left: -40px;
    width: 220px; height: 220px;
    background: radial-gradient(circle, rgba(72,202,228,0.32) 0%, transparent 70%);
    border-radius: 50%;
    animation: hero-float 6s ease-in-out infinite reverse;
    pointer-events: none;
}

@keyframes hero-float {
    0%, 100% { transform: translateY(0) scale(1); }
    50%       { transform: translateY(-25px) scale(1.08); }
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
}

.hero-section h1 {
    font-weight: 800;
    font-size: 2.8rem;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 20px rgba(0,0,0,0.25);
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.2rem;
    line-height: 1.7;
    opacity: 0.92;
    margin-bottom: 1.5rem;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 50px;
    padding: 0.5rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: rgba(255,255,255,0.95);
    margin-bottom: 2rem;
    animation: badge-glow 3s ease-in-out infinite;
}

@keyframes badge-glow {
    0%, 100% { box-shadow: 0 0 15px rgba(0,180,216,0.25); }
    50%       { box-shadow: 0 0 28px rgba(0,180,216,0.5); }
}

.hero-cta {
    display: inline-block;
    padding: 0.85rem 2.2rem;
    background: linear-gradient(135deg, #0077b6, #023e8a);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.05rem;
    letter-spacing: 0.3px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0,119,182,0.4);
}

.hero-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0,119,182,0.55);
    color: white;
    text-decoration: none;
}

.hero-shape {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
}

.hero-shape-1 {
    width: 120px; height: 120px;
    top: 20%; left: 8%;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    animation: hero-float 10s ease-in-out infinite;
}

.hero-shape-2 {
    width: 70px; height: 70px;
    top: 60%; right: 12%;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    animation: hero-float 7s ease-in-out infinite reverse;
}

.hero-shape-3 {
    width: 50px; height: 50px;
    bottom: 15%; left: 25%;
    background: rgba(0,180,216,0.2);
    animation: hero-float 9s ease-in-out infinite 1s;
}

/* ===== Sections ===== */
.content-section { padding: 2.5rem 0; }

.section-title {
    text-align: center;
    margin-bottom: 1.5rem;
    font-weight: 700;
    font-size: 1.75rem;
    color: #1a1d23;
    letter-spacing: -0.3px;
}

/* ===== Feature Cards ===== */
.feature-card {
    background: rgba(255,255,255,0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.6);
    border-radius: 1rem;
    box-shadow: 0 8px 32px rgba(0,0,0,0.06);
    padding: 2rem;
    text-align: center;
    height: 100%;
    transition: transform 0.35s cubic-bezier(0.25,0.46,0.45,0.94), box-shadow 0.35s ease;
}

.feature-card:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: 0 20px 50px rgba(0,0,0,0.1);
    border-color: rgba(0,180,216,0.3);
}

.feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(0,150,199,0.12), rgba(72,202,228,0.18));
    font-size: 1.8rem;
    margin-bottom: 1.25rem;
}

.feature-card h5 {
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: #1a1d23;
}

.feature-card p {
    color: #5a6270;
    line-height: 1.65;
    font-size: 0.95rem;
    margin-bottom: 0;
}

/* ===== What is AP section ===== */
.ap-text-col {
    border-left: 4px solid;
    border-image: linear-gradient(180deg, #0077b6, #48cae4) 1;
    padding-left: 1.5rem;
}

.ap-text-col .lead {
    font-size: 1.15rem;
    line-height: 1.75;
}

/* ===== CTA Banner ===== */
.cta-banner {
    background: linear-gradient(135deg, #03045e 0%, #0077b6 100%);
    color: white;
    border-radius: 1rem;
    padding: 2.5rem;
    text-align: center;
}

.cta-banner h4 { font-weight: 700; margin-bottom: 0.75rem; }
.cta-banner p  { opacity: 0.88; margin-bottom: 0; }

.cta-banner .btn-light {
    padding: 0.65rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255,255,255,0.2);
    text-decoration: none;
    color: #1a1d23;
    background: #fff;
    border: none;
    display: inline-block;
    margin-top: 1rem;
}

.cta-banner .btn-light:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255,255,255,0.35);
}

/* ===== Footer ===== */
footer {
    background: rgba(202,240,248,0.7);
    border-top: 1px solid #90e0ef;
    padding: 1rem 2rem;
}

footer .container {
    max-width: 100%;
}

footer a {
    color: #6c757d;
    text-decoration: none;
    margin-left: 1rem;
    font-size: 0.875rem;
}

footer a:hover { color: #1a1d23; }

.text-muted { color: #6c757d !important; font-size: 0.875rem; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .page { flex-direction: column; }

    .sidebar {
        width: 100%;
        min-width: unset;
        position: fixed;
        top: 0; left: -100%;
        height: 100%;
        z-index: 200;
        transition: left 0.3s ease;
    }

    .sidebar.open { left: 0; }

    .nav-overlay.visible { display: block; }

    .navbar-toggler { display: flex; }

    .mobile-topbar {
        display: flex !important;
        align-items: center;
        background: linear-gradient(135deg, #03045e, #023e8a);
        color: #fff;
        padding: 0.75rem 1rem;
        position: sticky;
        top: 0;
        z-index: 150;
        box-shadow: 0 2px 12px rgba(0,0,0,0.2);
    }

    .mobile-topbar .brand {
        font-weight: 700;
        font-size: 1rem;
        color: #fff;
        flex: 1;
    }

    .mobile-topbar .hamburger {
        background: none;
        border: none;
        cursor: pointer;
        display: flex;
        flex-direction: column;
        gap: 5px;
        padding: 4px;
    }

    .mobile-topbar .hamburger span {
        display: block;
        width: 22px;
        height: 2px;
        background: #fff;
        border-radius: 2px;
    }

    .content-footest {
        padding: 0.75rem 1rem 1.5rem;
    }

    .hero-section {
        padding: 3rem 1.25rem 2.5rem;
        margin: -0.75rem -1rem 0 -1rem;
    }

    .hero-section h1 { font-size: 2rem; }
    .hero-subtitle   { font-size: 1.05rem; }
    .hero-shape      { display: none; }

    footer { padding: 1rem; }
    footer a { margin-left: 0.5rem; }
}

@media (min-width: 769px) {
    .mobile-topbar { display: none !important; }
}

/* ===== Slot Detail Pages ===== */
.slot-hero {
    background: linear-gradient(135deg, #03045e 0%, #0077b6 55%, #00b4d8 100%);
    color: #fff;
    padding: 1.75rem 2rem 2rem;
    margin: -1rem -2rem 0 -2rem;
    position: relative;
    overflow: hidden;
}

.slot-hero::before {
    content: '';
    position: absolute;
    top: -60px; right: -40px;
    width: 220px; height: 220px;
    background: radial-gradient(circle, rgba(0,180,216,0.3) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.slot-breadcrumb {
    font-size: 0.8rem;
    margin-bottom: 0.85rem;
}

.slot-breadcrumb a {
    color: rgba(255,255,255,0.65);
    text-decoration: none;
}

.slot-breadcrumb a:hover { color: #fff; }

.slot-thumbnail {
    width: 190px;
    min-width: 190px;
    height: 130px;
    object-fit: cover;
    border-radius: 0.75rem;
    border: 2px solid rgba(255,255,255,0.25);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.slot-hero-provider {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.7rem;
    border-radius: 50px;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.35);
    color: #fff;
    margin-bottom: 0.75rem;
    letter-spacing: 0.3px;
}

.slot-hero h1 {
    font-size: 1.85rem;
    font-weight: 800;
    margin-bottom: 0.4rem;
    letter-spacing: -0.3px;
}

.slot-hero .slot-lead {
    font-size: 0.9rem;
    opacity: 0.88;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.slot-hero-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.slot-hero-actions .btn {
    border-radius: 50px;
    font-size: 0.82rem;
    padding: 0.4rem 1rem;
    font-weight: 600;
    border-color: rgba(255,255,255,0.4);
    color: #fff;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(8px);
}

.slot-hero-actions .btn:hover {
    background: rgba(255,255,255,0.22);
    border-color: rgba(255,255,255,0.7);
    color: #fff;
}

.slot-hero-actions .btn-favorite i {
    transition: color 0.2s;
}
.slot-hero-actions .btn-favorite.favorited {
    background: rgba(220,38,38,0.18);
    border-color: rgba(255,100,100,0.6);
}
.slot-hero-actions .btn-favorite.favorited i {
    color: #ff6b6b;
}

.btn-favorites-filter {
    padding: 0.55rem 1rem;
    border: 1px solid rgba(0,150,199,0.25);
    border-radius: 50px;
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(8px);
    font-size: 0.9rem;
    color: #1a1d23;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 500;
    transition: border-color 0.2s, background 0.2s, color 0.2s;
    white-space: nowrap;
    touch-action: manipulation;
}
.btn-favorites-filter i { transition: color 0.2s; }
.btn-favorites-filter:hover {
    border-color: rgba(220,38,38,0.4);
    background: rgba(255,255,255,0.95);
}
.btn-favorites-filter.active {
    border-color: #dc2626;
    background: rgba(220,38,38,0.08);
    color: #991b1b;
}
.btn-favorites-filter.active i { color: #dc2626; }

/* Slot page cards */
.slot-card {
    background: rgba(255,255,255,0.85) !important;
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.6) !important;
    border-radius: 1rem !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06) !important;
    overflow: hidden;
}

.slot-card .card-header {
    background: #023e8a !important;
    border-bottom: none !important;
    font-weight: 700;
    font-size: 0.92rem;
    color: #fff !important;
    border-radius: 0 !important;
}

/* Strategy content blocks */
.strategy-block {
    padding: 1.1rem 1.2rem 1.1rem 1.4rem;
    border-left: 4px solid;
    margin-bottom: 1rem;
    border-radius: 0 0.5rem 0.5rem 0;
}

.strategy-block:last-child { margin-bottom: 0; }

.strategy-block h3 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.65rem;
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.strategy-block p, .strategy-block li {
    font-size: 0.88rem;
    color: #374151;
    line-height: 1.65;
}

.strategy-block ul { padding-left: 1.25rem; margin-bottom: 0.5rem; }
.strategy-block p:last-child { margin-bottom: 0; }

.strategy-play   { border-color: #0077b6; background: rgba(0,119,182,0.05); }
.strategy-play   h3 { color: #0077b6; }
.strategy-info   { border-color: #0096c7; background: rgba(0,150,199,0.05); }
.strategy-info   h3 { color: #0096c7; }
.strategy-warning { border-color: #f59e0b; background: rgba(245,158,11,0.06); }
.strategy-warning h3 { color: #b45309; }

.strategy-whentoplay-image {
    max-width: 100%;
    border-radius: 0.5rem;
    margin-top: 0.75rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Calculator */
.mt-gold-calculator-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.mt-gold-form-label {
    font-weight: 600;
    color: #374151;
}

.mt-gold-pot-control {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    touch-action: manipulation;
}

.mt-gold-pot-display {
    width: 60px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: inset 0 0 0 2px #ffd700, 0 4px 8px rgba(0,0,0,0.3);
}

.mt-gold-pot-number {
    color: white;
    font-size: 1.5rem;
    font-weight: 900;
    font-family: sans-serif;
    line-height: 1;
}

input.mt-gold-pot-number {
    background: transparent;
    border: none;
    outline: none;
    text-align: center;
    width: 48px;
    padding: 0;
    -moz-appearance: textfield;
}
input.mt-gold-pot-number::-webkit-inner-spin-button,
input.mt-gold-pot-number::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.mt-gold-pot-display.gold   { background: radial-gradient(ellipse at center, #ffc107 20%, #f58700 100%); border: 5px solid #d4af37; }
.mt-gold-pot-display.purple { background: radial-gradient(ellipse at center, #9370db 20%, #6a5acd 100%); border: 5px solid #483d8b; }
.mt-gold-pot-display.green  { background: radial-gradient(ellipse at center, #28a745 20%, #218838 100%); border: 5px solid #146c43; }

.mt-gold-pot-number.gold   { text-shadow: -2px -2px 0 #d4af37, 2px -2px 0 #d4af37, -2px 2px 0 #d4af37, 2px 2px 0 #d4af37; }
.mt-gold-pot-number.purple { text-shadow: -2px -2px 0 #483d8b, 2px -2px 0 #483d8b, -2px 2px 0 #483d8b, 2px 2px 0 #483d8b; }
.mt-gold-pot-number.green  { text-shadow: -2px -2px 0 #146c43, 2px -2px 0 #146c43, -2px 2px 0 #146c43, 2px 2px 0 #146c43; }

.mt-gold-control-btn {
    width: 40px;
    height: 40px;
    border: 2px solid #6c757d;
    background-color: #f8f9fa;
    border-radius: 50%;
    font-size: 1.5rem;
    font-weight: bold;
    color: #495057;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s, transform 0.1s;
    user-select: none;
    line-height: 1;
    padding: 0;
    touch-action: manipulation;
}

.mt-gold-control-btn:hover { background-color: #e9ecef; }
.mt-gold-control-btn:active { transform: scale(0.95); }
.mt-gold-control-btn:disabled { opacity: 0.5; cursor: not-allowed; }

@media (max-width: 768px) {
    .slot-hero {
        padding: 1.5rem 1rem 1.5rem;
        margin: -0.75rem -1rem 0 -1rem;
    }
    .slot-hero h1 { font-size: 1.4rem; }
    .slot-thumbnail { width: 100%; min-width: unset; height: 160px; margin-bottom: 1rem; }
}

@media (min-width: 768px) {
    .slot-hero .slot-lead { display: block; }
}

/* ===== Strategies Page ===== */
.page-hero {
    background: linear-gradient(135deg, #03045e 0%, #0077b6 55%, #00b4d8 100%);
    color: white;
    padding: 2.5rem 2rem 2rem;
    margin: -1rem -2rem 0 -2rem;
    position: relative;
    overflow: hidden;
}

.page-hero::before {
    content: '';
    position: absolute;
    top: -60px; right: -40px;
    width: 200px; height: 200px;
    background: radial-gradient(circle, rgba(0,180,216,0.35) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.page-hero h1 {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.3px;
    margin-bottom: 0.4rem;
}

.page-hero p {
    font-size: 1rem;
    opacity: 0.88;
    margin-bottom: 0;
}

/* Filters bar */
.filters-bar {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
    padding: 1.25rem 0 1rem;
}

.filters-bar .search-wrap {
    flex: 1;
    min-width: 200px;
    position: relative;
}

.filters-bar .search-wrap i {
    position: absolute;
    left: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    font-size: 0.95rem;
}

.filters-bar input[type="search"] {
    width: 100%;
    padding: 0.55rem 1rem 0.55rem 2.4rem;
    border: 1px solid rgba(0,150,199,0.25);
    border-radius: 50px;
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(8px);
    font-size: 0.9rem;
    color: #1a1d23;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.filters-bar input[type="search"]:focus {
    border-color: #0096c7;
    box-shadow: 0 0 0 3px rgba(0,150,199,0.15);
}

.filters-bar select {
    padding: 0.55rem 1rem;
    border: 1px solid rgba(0,150,199,0.25);
    border-radius: 50px;
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(8px);
    font-size: 0.9rem;
    color: #1a1d23;
    outline: none;
    cursor: pointer;
    transition: border-color 0.2s;
}

.filters-bar select:focus { border-color: #0096c7; }

.slot-count {
    font-size: 0.85rem;
    color: #5a6270;
    white-space: nowrap;
}

/* Slot grid */
.slot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.25rem;
    padding-bottom: 2rem;
}

.slot-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.slot-card {
    background: rgba(255,255,255,0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.65);
    border-radius: 1rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s cubic-bezier(0.25,0.46,0.45,0.94), box-shadow 0.3s ease, border-color 0.3s;
}

.slot-grid .slot-card {
    height: 100%;
}

.slot-card:hover {
    transform: translateY(-6px) scale(1.01);
    box-shadow: 0 16px 40px rgba(0,0,0,0.1);
    border-color: rgba(0,180,216,0.35);
}

.slot-image {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: linear-gradient(135deg, #03045e, #0077b6);
}

.slot-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fallback-icon {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
}

.provider-badge {
    position: absolute;
    top: 0.6rem;
    left: 0.6rem;
    background: rgba(3,4,94,0.82);
    backdrop-filter: blur(8px);
    color: rgba(255,255,255,0.95);
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.25rem 0.65rem;
    border-radius: 50px;
    letter-spacing: 0.2px;
    z-index: 2;
}

.slot-content {
    padding: 1rem 1.1rem 1.1rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.slot-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1a1d23;
    margin-bottom: 0.6rem;
    line-height: 1.3;
}

.slot-meta {
    display: flex;
    gap: 0.5rem;
    font-size: 0.82rem;
    color: #5a6270;
    margin-bottom: 0.3rem;
    align-items: center;
}

.slot-meta .meta-label { font-weight: 600; color: #3a4050; }
.slot-meta .meta-stars { letter-spacing: -1px; }
.slot-meta .meta-val { font-weight: 600; color: #1a1d23; }

.slot-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin: 0.65rem 0 0.75rem;
}

.tag {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: 50px;
    background: rgba(0,150,199,0.1);
    color: #0077b6;
    border: 1px solid rgba(0,150,199,0.2);
}

.tag.hot {
    background: linear-gradient(135deg, rgba(3,4,94,0.1), rgba(0,119,182,0.15));
    color: #03045e;
    border-color: rgba(3,4,94,0.25);
}

.slot-description {
    font-size: 0.83rem;
    color: #5a6270;
    line-height: 1.6;
    margin-bottom: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    color: #5a6270;
}

.no-results .no-results-icon { font-size: 3rem; margin-bottom: 1rem; }

@media (max-width: 768px) {
    .page-hero {
        padding: 2rem 1.25rem 1.5rem;
        margin: -0.75rem -1rem 0 -1rem;
    }
    .page-hero h1 { font-size: 1.6rem; }
    .slot-grid { grid-template-columns: 1fr; }
    .filters-bar { flex-direction: column; align-items: stretch; }
    .filters-bar .search-wrap { min-width: unset; }
}

/* ===== Buffalo Link Flame Calculator ===== */
.bl-calc-label {
    font-weight: 600;
    color: #374151;
    text-align: center;
    margin-bottom: 0.75rem;
}

.bl-flame-display {
    position: relative;
    background-color: #1a1a1a;
    border-radius: 1rem;
    padding: 1.25rem 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    margin-bottom: 1rem;
}

.bl-flame-display::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 1rem;
    box-shadow:
        inset 0 0 8px  4px  #ffc107,
        inset 0 0 18px 8px  #ff8c00,
        inset 0 0 30px 14px #dc3545;
    pointer-events: none;
}

.bl-flame-input {
    background: transparent;
    border: none;
    outline: none;
    width: 100%;
    text-align: center;
    font-size: 5rem;
    font-weight: 900;
    line-height: 1;
    color: #31d32d;
    text-shadow: 0 0 8px rgba(49, 211, 45, 0.8);
    position: relative;
    z-index: 1;
    -moz-appearance: textfield;
    touch-action: manipulation;
}

.bl-flame-input::-webkit-inner-spin-button,
.bl-flame-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

@media (max-width: 480px) {
    .bl-flame-input { font-size: 4rem; }
}

/* ===== Buffalo Ascension Calculator ===== */
.ba-calc-intro {
    font-size: 0.78rem;
    color: #6b7280;
    text-align: center;
    margin-bottom: 1rem;
}

.ba-calc-grid {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 0.5rem;
}

.ba-reel-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

.ba-reel-label {
    font-size: 0.66rem;
    font-weight: 700;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 2px;
}

.ba-bonus-block {
    width: 74px;
    height: 52px;
    border: 2px dashed #ced4da;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: filter 0.15s;
    font-size: 0.6rem;
    font-weight: 700;
    text-align: center;
    line-height: 1.3;
    padding: 3px;
    margin-bottom: 5px;
    user-select: none;
    touch-action: manipulation;
}

.ba-bonus-block:hover         { filter: brightness(0.92); }
.ba-bonus-none  { background: #f3f4f6; border-color: #d1d5db; color: #9ca3af; }
.ba-bonus-s     { background: #fed7aa; border-color: #fb923c; color: #9a3412; border-style: solid; }
.ba-bonus-ss    { background: #fef08a; border-color: #eab308; color: #713f12; border-style: solid; }
.ba-bonus-fg    { background: #dbeafe; border-color: #3b82f6; color: #1e3a8a; border-style: solid; }

.ba-block-stack {
    display: flex;
    flex-direction: column;
    gap: 3px;
    width: 74px;
}

.ba-height-block {
    width: 74px;
    height: 26px;
    border: 1px solid #d1d5db;
    border-radius: 5px;
    background: #f3f4f6;
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s;
    touch-action: manipulation;
}

.ba-height-block.filled            { background: #d97706; border-color: #92400e; }
.ba-height-block:hover             { background: #e5e7eb; }
.ba-height-block.filled:hover      { background: #b45309; }

.ba-reel-height-badge {
    font-size: 0.66rem;
    font-weight: 700;
    color: #4b5563;
    margin-top: 3px;
}

.ba-reel-height-badge.maxed { color: #b45309; }

.ba-bonus-legend {
    text-align: center;
    font-size: 0.7rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
    line-height: 1.9;
}

.ba-legend-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 0.58rem;
    font-weight: 800;
    vertical-align: middle;
    border: 1.5px solid;
}

.ba-legend-s  { background: #fed7aa; border-color: #fb923c; color: #9a3412; }
.ba-legend-ss { background: #fef08a; border-color: #eab308; color: #713f12; }
.ba-legend-fg { background: #dbeafe; border-color: #3b82f6; color: #1e3a8a; }

.ba-ways-display {
    text-align: center;
    padding: 0.5rem 0 0.25rem;
}

.ba-ways-value {
    font-size: 2.4rem;
    font-weight: 900;
    line-height: 1;
    color: #991b1b;
    transition: color 0.2s;
}

.ba-ways-value.above-threshold { color: #16a34a; }

.ba-ways-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* ===== Magic Treasures (original) single-pot calculator ===== */
.mt-single-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.mt-single-display {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: radial-gradient(ellipse at center, #28a745 20%, #218838 100%);
    border: 5px solid #146c43;
    box-shadow: inset 0 0 0 2px #34ce57, 0 4px 8px rgba(0,0,0,0.25);
    display: flex;
    align-items: center;
    justify-content: center;
}

.mt-single-input {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    text-align: center;
    font-size: 1.6rem;
    font-weight: 900;
    color: white;
    line-height: 1;
    -moz-appearance: textfield;
    text-shadow:
        -2px -2px 0 #146c43, 2px -2px 0 #146c43,
        -2px  2px 0 #146c43, 2px  2px 0 #146c43;
    touch-action: manipulation;
}

.mt-single-input::-webkit-inner-spin-button,
.mt-single-input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

/* ══════════════════════════════════════════════════════════
   Regal Riches / Prosperity Pearl calculator
══════════════════════════════════════════════════════════ */

.rr-calculator {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto auto;
    gap: 12px 8px;
    align-items: start;
    justify-items: center;
    padding: 4px 0 8px;
}

/* Full-width rows */
.group-mega { grid-column: 1 / 3; grid-row: 1; }
.group-blue { grid-column: 1 / 3; grid-row: 3; }
/* Side-by-side row */
.group-major { grid-column: 1 / 2; grid-row: 2; }
.group-minor { grid-column: 2 / 3; grid-row: 2; }

.rr-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.rr-label {
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.rr-control {
    display: flex;
    align-items: center;
    gap: 6px;
}

.rr-display {
    width: 56px;
    height: 48px;
    border-radius: 8px;
    border: 2.5px solid #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
}

.rr-input {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    text-align: center;
    font-size: 1.35rem;
    font-weight: 800;
    color: #1a1a1a;
    -moz-appearance: textfield;
    line-height: 1;
}
.rr-input::-webkit-inner-spin-button,
.rr-input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

.rr-btn {
    width: 36px;
    height: 36px;
    font-size: 1.4rem;
    font-weight: 700;
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    line-height: 1;
    user-select: none;
    transition: opacity 0.15s, transform 0.1s;
}
.rr-btn:hover   { opacity: 0.85; }
.rr-btn:active  { transform: scale(0.93); }
.rr-btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

.rr-mhb {
    font-size: 0.7rem;
    color: #6c757d;
    text-align: center;
}

/* Color variants — scoped to Regal Riches' .rr- calculator so they aren't
   clobbered by the bare .label-mega/.field-major/.btn-minor rules further down
   (those belong to the stack-up-pays / ascending-fortunes family).
   Regal: Mega = gold, Major = green, Minor = purple, Blue = blue. */
.rr-label.label-mega   { color: #d4a000; }
.rr-display.field-mega { border-color: #ffc107 !important; }
.rr-btn.btn-mega       { background-color: #ffc107; }

.rr-label.label-major   { color: #1a7a3c; }
.rr-display.field-major { border-color: #28a745 !important; }
.rr-btn.btn-major       { background-color: #28a745; }

.rr-label.label-minor   { color: #6a3fb5; }
.rr-display.field-minor { border-color: #9370db !important; }
.rr-btn.btn-minor       { background-color: #9370db; }

.rr-label.label-blue   { color: #0056cc; }
.rr-display.field-blue { border-color: #007bff !important; }
.rr-btn.btn-blue       { background-color: #007bff; }

/* ── Regal Link: six-meter grid ───────────────────────────── */
.rl-calculator {
    grid-template-rows: auto auto auto auto;
}
.rl-calculator .group-diamond   { grid-column: 1 / 3; grid-row: 1; }
.rl-calculator .group-emerald   { grid-column: 1 / 2; grid-row: 2; }
.rl-calculator .group-amethyst  { grid-column: 2 / 3; grid-row: 2; }
.rl-calculator .group-sapphire  { grid-column: 1 / 2; grid-row: 3; }
.rl-calculator .group-amber     { grid-column: 2 / 3; grid-row: 3; }
.rl-calculator .group-cashwilds { grid-column: 1 / 3; grid-row: 4; }

.label-diamond  { color: #d4a000; }
.field-diamond  { border-color: #ffc107 !important; }
.btn-diamond    { background-color: #ffc107; }

.label-emerald  { color: #1a7a3c; }
.field-emerald  { border-color: #28a745 !important; }
.btn-emerald    { background-color: #28a745; }

.label-amethyst { color: #6a3fb5; }
.field-amethyst { border-color: #9370db !important; }
.btn-amethyst   { background-color: #9370db; }

.label-sapphire { color: #0056cc; }
.field-sapphire { border-color: #007bff !important; }
.btn-sapphire   { background-color: #007bff; }

.label-amber    { color: #b06a28; }
.field-amber    { border-color: #cd7f32 !important; }
.btn-amber      { background-color: #cd7f32; }

.label-cashwilds { color: #5a6169; }
.field-cashwilds { border-color: #6c757d !important; }
.btn-cashwilds   { background-color: #6c757d; }

/* ──────────────────────────────────────────────────────────
   Raise the Sails / San Xing Riches calculator
   Three uncapped free-games meters stacked vertically
   (Gold / Silver / Bronze). Shared by the slot page and the
   Play History "Add New Play" modal.
────────────────────────────────────────────────────────── */
.rts-calculator {
    padding: 15px;
    background-color: #f0f8ff;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
}
.rts-input-group {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}
.rts-input-label {
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    flex-basis: 80px;
    text-align: right;
}
.rts-input-control {
    display: flex;
    align-items: center;
    gap: 5px;
}
.rts-input-field {
    width: 64px;
    height: 35px;
    text-align: center;
    font-size: 1.2rem;
    font-weight: 700;
    border: 2px solid #ccc;
    border-radius: 5px;
    -moz-appearance: textfield;
}
.rts-input-field::-webkit-outer-spin-button,
.rts-input-field::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.rts-btn-adjust {
    width: 30px;
    height: 30px;
    font-size: 1.2rem;
    font-weight: 700;
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    line-height: 1;
    user-select: none;
    flex-shrink: 0;
}
.rts-btn-adjust:hover    { opacity: 0.85; }
.rts-btn-adjust:active   { transform: scale(0.93); }
.rts-btn-adjust:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

.label-gold   { color: #d4af37; }
.field-gold   { border-color: #d4af37 !important; }
.btn-gold     { background-color: #d4af37; }
.label-silver { color: #9a9a9a; }
.field-silver { border-color: #a9a9a9 !important; }
.btn-silver   { background-color: #a9a9a9; }
.label-bronze { color: #cd7f32; }
.field-bronze { border-color: #cd7f32 !important; }
.btn-bronze   { background-color: #cd7f32; }

/* ──────────────────────────────────────────────────────────
   Stack Up Pays calculator (5 must-hit-by progressive meters).
   Mirrors slotfarmers.club's .sup-calculator layout.
────────────────────────────────────────────────────────── */
.sup-calculator {
    padding: 15px;
    background-color: #f0f0f0;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
}
.sup-input-group {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}
.sup-input-label {
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    flex-basis: 80px;
    text-align: right;
}
.sup-input-control {
    display: flex;
    align-items: center;
    gap: 5px;
}
.sup-input-field {
    width: 64px;
    height: 35px;
    text-align: center;
    font-size: 1.2rem;
    font-weight: 700;
    border: 2px solid #ccc;
    border-radius: 5px;
    -moz-appearance: textfield;
}
.sup-input-field::-webkit-outer-spin-button,
.sup-input-field::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.sup-btn-adjust {
    width: 30px;
    height: 30px;
    font-size: 1.2rem;
    font-weight: 700;
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    line-height: 1;
    user-select: none;
    flex-shrink: 0;
}
.sup-btn-adjust:hover    { opacity: 0.85; }
.sup-btn-adjust:active   { transform: scale(0.93); }
.sup-btn-adjust:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

/* Bare keys drive the slot-page calculator; sup-* keys drive the Play History
   modal calculator (its meter color comes from the machineState `color` key). */
.label-mega,  .label-sup-mega  { color: #dc3545; }
.field-mega,  .field-sup-mega  { border-color: #dc3545 !important; }
.btn-mega,    .btn-sup-mega    { background-color: #dc3545; }
.label-grand, .label-sup-grand { color: #fd7e14; }
.field-grand, .field-sup-grand { border-color: #fd7e14 !important; }
.btn-grand,   .btn-sup-grand   { background-color: #fd7e14; }
.label-major, .label-sup-major { color: #6f42c1; }
.field-major, .field-sup-major { border-color: #6f42c1 !important; }
.btn-major,   .btn-sup-major   { background-color: #6f42c1; }
.label-minor, .label-sup-minor { color: #198754; }
.field-minor, .field-sup-minor { border-color: #198754 !important; }
.btn-minor,   .btn-sup-minor   { background-color: #198754; }
.label-mini,  .label-sup-mini  { color: #0d6efd; }
.field-mini,  .field-sup-mini  { border-color: #0d6efd !important; }
.btn-mini,    .btn-sup-mini    { background-color: #0d6efd; }

/* Wolf Run Eclipse modal calculator meter colors (green/orange/purple/cyan) */
.label-wre-mega  { color: #28a745; } .field-wre-mega  { border-color: #28a745 !important; } .btn-wre-mega  { background-color: #28a745; }
.label-wre-major { color: #ff8c00; } .field-wre-major { border-color: #ff8c00 !important; } .btn-wre-major { background-color: #ff8c00; }
.label-wre-minor { color: #9370db; } .field-wre-minor { border-color: #9370db !important; } .btn-wre-minor { background-color: #9370db; }
.label-wre-mini  { color: #00bfff; } .field-wre-mini  { border-color: #00bfff !important; } .btn-wre-mini  { background-color: #00bfff; }

/* Azure Dragon / Emerald Guardian modal calculator meter colors (red/blue/purple/orange) */
.label-az-mega  { color: #dc3545; } .field-az-mega  { border-color: #dc3545 !important; } .btn-az-mega  { background-color: #dc3545; }
.label-az-maxi  { color: #007bff; } .field-az-maxi  { border-color: #007bff !important; } .btn-az-maxi  { background-color: #007bff; }
.label-az-minor { color: #9370db; } .field-az-minor { border-color: #9370db !important; } .btn-az-minor { background-color: #9370db; }
.label-az-mini  { color: #ff8c00; } .field-az-mini  { border-color: #ff8c00 !important; } .btn-az-mini  { background-color: #ff8c00; }

/* San Xing Riches modal calculator meter colors (red/green/teal-blue) */
.label-sxr-red   { color: #df0b27; } .field-sxr-red   { border-color: #df0b27 !important; } .btn-sxr-red   { background-color: #df0b27; }
.label-sxr-green { color: #037e19; } .field-sxr-green { border-color: #037e19 !important; } .btn-sxr-green { background-color: #037e19; }
.label-sxr-blue  { color: #4bb2bf; } .field-sxr-blue  { border-color: #4bb2bf !important; } .btn-sxr-blue  { background-color: #4bb2bf; }

/* ══════════════════════════════════════════════════════════
   Play History page
══════════════════════════════════════════════════════════ */

/* Section dividers (REQUIRED / OPTIONAL / etc.) */
.ph-divider {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin: 1rem 0 0.6rem;
    color: #9ca3af;
}
.ph-divider::before,
.ph-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}
.ph-divider-text {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    white-space: nowrap;
}

/* Machine state dashed box */
.ph-ms-box {
    border: 2px dashed #d1d5db;
    border-radius: 0.5rem;
    min-height: 110px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 1rem;
    background: #fafafa;
}
.ph-ms-plus-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid #9ca3af;
    background: white;
    color: #6b7280;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
    flex-shrink: 0;
}
.ph-ms-plus-btn:hover {
    border-color: #4b5563;
    color: #1f2937;
}
.ph-ms-close-btn {
    position: absolute;
    top: 0.35rem;
    right: 0.55rem;
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 1.15rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}
.ph-ms-close-btn:hover { color: #374151; }

/* Stats cards */
.ph-stat {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 0.875rem 1rem;
    text-align: center;
}
.ph-stat-value {
    font-size: 1.4rem;
    font-weight: 800;
    line-height: 1.2;
}
.ph-stat-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-top: 0.15rem;
}

/* Profit/loss colors */
.ph-profit-pos  { color: #15803d; }
.ph-profit-neg  { color: #b91c1c; }
.ph-profit-zero { color: #6b7280; }

/* History table */
.ph-table { font-size: 0.875rem; }
.ph-table thead th {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
    border-bottom: 2px solid #e5e7eb;
    padding: 0.5rem 0.75rem;
}
.ph-table tbody td {
    padding: 0.625rem 0.75rem;
    border-bottom: 1px solid #f3f4f6;
    vertical-align: middle;
}
.ph-table tbody tr:last-child td { border-bottom: none; }
.ph-table tbody tr:hover { background: #f9fafb; }

/* Dollar input wrapper */
.ph-input-dollar {
    display: flex;
    align-items: center;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    overflow: hidden;
    background: white;
}
.ph-dollar-sign {
    padding: 0.375rem 0.55rem;
    color: #6b7280;
    background: #f9fafb;
    border-right: 1px solid #dee2e6;
    font-size: 0.875rem;
    line-height: 1.5;
    flex-shrink: 0;
}
.ph-input-dollar input {
    border: none;
    outline: none;
    padding: 0.375rem 0.5rem;
    font-size: 0.9rem;
    width: 100%;
    background: transparent;
    min-width: 0;
}
.ph-input-dollar input[readonly] {
    background: #f3f4f6;
    color: #9ca3af;
}

/* Add Play button */
.ph-add-btn {
    background: #1d4ed8;
    color: white;
    border: none;
    border-radius: 0.5rem;
    padding: 0.875rem;
    font-size: 1rem;
    font-weight: 600;
    width: 100%;
    cursor: pointer;
    transition: background 0.15s;
}
.ph-add-btn:hover    { background: #1e40af; }
.ph-add-btn:disabled { opacity: 0.65; cursor: not-allowed; }

/* ── Play History card list ───────────────────────────────────── */
.ph-play-list {
    background: white;
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
    overflow: hidden;
}
.ph-play-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border-bottom: 1px solid #f3f4f6;
}
.ph-play-card:last-child { border-bottom: none; }

/* Machine state dot stack */
.ph-ms-stack {
    display: flex;
    flex-direction: column;
    gap: 3px;
    align-items: center;
    min-width: 32px;
    padding-top: 1px;
    flex-shrink: 0;
}
/* Meters render in the same grid orientation as the slot page calculator
   (top meter full-width, middle meters paired, bottom meter full-width). */
.ph-ms-grid {
    display: grid;
    grid-template-columns: repeat(2, auto);
    justify-items: center;
    align-items: center;
    gap: 3px;
    min-width: 63px;
}

.ph-ms-dot {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 800;
    color: white;
    flex-shrink: 0;
}
/* Rounded-box variant (Raise the Sails meters) — mirrors the calculator's number fields */
.ph-ms-dot.ph-ms-square { border-radius: 6px; width: 32px; height: 28px; }

.ph-ms-dot.gold   { background: radial-gradient(ellipse at center, #ffc107 20%, #f58700 100%); border: 2px solid #d4af37; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.4); font-size: 0.62rem; }
.ph-ms-dot.purple { background: radial-gradient(ellipse at center, #9370db 20%, #6a5acd 100%); border: 2px solid #483d8b; }
.ph-ms-dot.green  { background: radial-gradient(ellipse at center, #28a745 20%, #218838 100%); border: 2px solid #146c43; }
.ph-ms-dot.silver { background: radial-gradient(ellipse at center, #e0e0e0 20%, #a9a9a9 100%); border: 2px solid #808080; color: #333; text-shadow: none; font-size: 0.62rem; }
.ph-ms-dot.bronze { background: radial-gradient(ellipse at center, #d99a5b 20%, #cd7f32 100%); border: 2px solid #9c5e22; font-size: 0.62rem; }
.ph-ms-dot.balls  { background: radial-gradient(ellipse at center, #ffc107 20%, #f58700 100%); border: 2px solid #d4af37; }
.ph-ms-dot.counter { background: #1a1a1a; border: 2px solid #ffc107; font-size: 0.6rem; letter-spacing: -0.5px; }

/* Multi-meter machine state (Regal Riches / Regal Link) */
.ph-ms-dot.mega,
.ph-ms-dot.diamond  { background: radial-gradient(ellipse at center, #ffc107 20%, #f58700 100%); border: 2px solid #d4af37; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.4); font-size: 0.62rem; }
.ph-ms-dot.major,
.ph-ms-dot.emerald  { background: radial-gradient(ellipse at center, #28a745 20%, #218838 100%); border: 2px solid #146c43; }
.ph-ms-dot.minor,
.ph-ms-dot.amethyst { background: radial-gradient(ellipse at center, #9370db 20%, #6a5acd 100%); border: 2px solid #483d8b; }
.ph-ms-dot.blue,
.ph-ms-dot.sapphire { background: radial-gradient(ellipse at center, #4d9fff 20%, #007bff 100%); border: 2px solid #0056cc; }
.ph-ms-dot.amber    { background: radial-gradient(ellipse at center, #d99a5b 20%, #cd7f32 100%); border: 2px solid #9c5e22; }
.ph-ms-dot.cashwilds { background: radial-gradient(ellipse at center, #adb5bd 20%, #6c757d 100%); border: 2px solid #495057; font-size: 0.62rem; }

/* Stack Up Pays — 5 must-hit-by progressives (calculator-matched colors) */
.ph-ms-dot.sup-mega  { background: radial-gradient(ellipse at center, #f1707a 15%, #dc3545 100%); border: 2px solid #a71d2a; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.4); font-size: 0.6rem; }
.ph-ms-dot.sup-grand { background: radial-gradient(ellipse at center, #ffa84d 15%, #fd7e14 100%); border: 2px solid #c45e00; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.4); font-size: 0.6rem; }
.ph-ms-dot.sup-major { background: radial-gradient(ellipse at center, #9370db 15%, #6f42c1 100%); border: 2px solid #4d2d8f; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.4); font-size: 0.6rem; }
.ph-ms-dot.sup-minor { background: radial-gradient(ellipse at center, #34c46b 15%, #198754 100%); border: 2px solid #11633d; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.4); font-size: 0.6rem; }
.ph-ms-dot.sup-mini  { background: radial-gradient(ellipse at center, #4d9fff 15%, #0d6efd 100%); border: 2px solid #0a53be; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.4); font-size: 0.6rem; }

/* Wolf Run Eclipse — 4 progressive meters (calculator-matched colors) */
.ph-ms-dot.wre-mega  { background: radial-gradient(ellipse at center, #34c46b 15%, #28a745 100%); border: 2px solid #1b7a33; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.4); font-size: 0.58rem; }
.ph-ms-dot.wre-major { background: radial-gradient(ellipse at center, #ffac4d 15%, #ff8c00 100%); border: 2px solid #c96a00; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.4); font-size: 0.58rem; }
.ph-ms-dot.wre-minor { background: radial-gradient(ellipse at center, #a98ce0 15%, #9370db 100%); border: 2px solid #6f4fc0; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.4); font-size: 0.58rem; }
.ph-ms-dot.wre-mini  { background: radial-gradient(ellipse at center, #4fd0ff 15%, #00bfff 100%); border: 2px solid #0095c8; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.4); font-size: 0.58rem; }

/* Azure Dragon / Emerald Guardian — 4 progressive free-game meters (calculator-matched colors) */
.ph-ms-dot.az-mega  { background: radial-gradient(ellipse at center, #e4606d 15%, #dc3545 100%); border: 2px solid #a71d2a; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.4); font-size: 0.58rem; }
.ph-ms-dot.az-maxi  { background: radial-gradient(ellipse at center, #4d9fff 15%, #007bff 100%); border: 2px solid #0056cc; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.4); font-size: 0.58rem; }
.ph-ms-dot.az-minor { background: radial-gradient(ellipse at center, #a98ce0 15%, #9370db 100%); border: 2px solid #6f4fc0; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.4); font-size: 0.58rem; }
.ph-ms-dot.az-mini  { background: radial-gradient(ellipse at center, #ffae42 15%, #ff8c00 100%); border: 2px solid #cc7000; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.4); font-size: 0.58rem; }

/* San Xing Riches — 3 progressive free-game meters (Lu red / Fu green / Shou blue) */
.ph-ms-dot.sxr-red   { background: radial-gradient(ellipse at center, #ee4a5e 15%, #df0b27 100%); border: 2px solid #a5081d; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.4); font-size: 0.58rem; }
.ph-ms-dot.sxr-green { background: radial-gradient(ellipse at center, #2aa83f 15%, #037e19 100%); border: 2px solid #025c12; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.4); font-size: 0.58rem; }
.ph-ms-dot.sxr-blue  { background: radial-gradient(ellipse at center, #7fcdd8 15%, #4bb2bf 100%); border: 2px solid #357f89; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.4); font-size: 0.58rem; }

.ph-ms-meters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 14px;
    padding: 2px 0 4px;
}

/* Buffalo counter — mini flame display */
.ph-ms-counter-mini {
    background: #1a1a1a;
    border: 1.5px solid #ffc107;
    border-radius: 6px;
    padding: 4px 7px;
    min-width: 42px;
    text-align: center;
    font-size: 0.68rem;
    font-weight: 900;
    color: #31d32d;
    text-shadow: 0 0 5px rgba(49, 211, 45, 0.75);
    box-shadow: inset 0 0 5px 2px rgba(255,193,7,0.35),
                inset 0 0 10px 4px rgba(255,100,0,0.15);
    letter-spacing: -0.5px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ── Treasure Box — golden coins-needed display (page calc + modal + card) ── */
.tb-calculator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1.5rem 1rem;
    background-color: #2c3e50;
    border-radius: 15px;
    border: 2px solid #34495e;
    cursor: pointer;
    user-select: none;
}
.tb-golden-number {
    font-size: 4.5rem;
    font-weight: 900;
    color: #ffd700;
    line-height: 1;
    text-shadow: 0 0 5px #ffc107, 0 0 15px #f58700, 2px 2px 2px rgba(0,0,0,0.5);
    -webkit-text-stroke: 1px #c8a400;
}
.tb-description-text {
    font-size: 0.9rem;
    font-weight: 600;
    color: #f1c40f;
    line-height: 1.2;
    text-transform: uppercase;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.7);
    text-align: left;
}
/* compact golden-number badge for play-history cards */
.ph-ms-tbnum {
    background: #2c3e50;
    border: 1.5px solid #34495e;
    border-radius: 6px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 900;
    color: #ffd700;
    text-shadow: 0 0 4px #f58700, 1px 1px 1px rgba(0,0,0,0.5);
    -webkit-text-stroke: 0.5px #c8a400;
    flex-shrink: 0;
}

/* ── Ultra Rush Gold — gold-coin grid (page calc + modal + card) ── */
.urg-calculator {
    padding: 14px;
    background-color: #f0f0f0;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    user-select: none;
}
.urg-grid {
    display: grid;
    grid-template-columns: repeat(3, 48px);
    grid-template-rows: repeat(2, 48px);
    gap: 4px;
}
.urg-square {
    width: 48px;
    height: 48px;
    background-color: #000;
    border: 1px solid #d4af37;
    border-radius: 4px;
    padding: 4px;
    box-sizing: border-box;
}
.urg-coin {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: transparent;
    transition: background-color 0.15s ease-in-out;
}
.urg-coin.filled {
    background-color: #ffd700;
    box-shadow: inset 0 0 8px rgba(0,0,0,0.4);
}
/* compact coin-grid for play-history cards */
.ph-ms-urg {
    display: grid;
    grid-template-columns: repeat(3, 9px);
    grid-template-rows: repeat(2, 9px);
    gap: 2px;
    padding: 3px;
    background: #f0f0f0;
    border-radius: 4px;
    flex-shrink: 0;
}
.ph-ms-urg .urg-cell {
    width: 9px;
    height: 9px;
    background-color: #000;
    border: 1px solid #d4af37;
    border-radius: 2px;
    box-sizing: border-box;
}
.ph-ms-urg .urg-cell.filled {
    background-color: #ffd700;
    box-shadow: inset 0 0 3px rgba(0,0,0,0.4);
}

/* ── Golden Jungle Grand — Buddha statue stacks (page calc + modal) ── */
.buddha-calculator {
    padding: 15px;
    background-color: #f0f0f0;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}
.buddha-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    height: 70px;
    align-items: flex-end;
}
.statue-stack {
    width: 30px;
    height: 100%;
    display: flex;
    flex-direction: column-reverse;
    justify-content: flex-start;
}
.statue {
    width: 100%;
    height: 34px;
    clip-path: path('M15,0 C10,0 5,5 5,8 L5,15 L2,15 L2,30 L10,30 L10,20 L20,20 L20,30 L28,30 L28,15 L25,15 L25,8 C25,5 20,0 15,0 Z');
    transition: background-color 0.3s ease, opacity 0.3s ease;
    cursor: pointer;
}
.statue.top { margin-bottom: -5px; }
.statue-stack[data-state="0"] .statue.bottom { background-color: #444; }
.statue-stack[data-state="0"] .statue.top    { background-color: #444; opacity: 1; }
.statue-stack[data-state="1"] .statue.bottom { background-color: gold; }
.statue-stack[data-state="1"] .statue.top    { background-color: #444; opacity: 1; }
.statue-stack[data-state="2"] .statue.bottom { background-color: gold; }
.statue-stack[data-state="2"] .statue.top    { background-color: gold; opacity: 1; }
.counter-container { font-size: 1.8rem; font-weight: bold; color: #333; }
.counter-value {
    cursor: pointer;
    padding: 0 5px;
    border-radius: 5px;
    transition: background-color 0.2s;
}
.counter-value:hover { background-color: #ddd; }
/* compact statue display for play-history cards */
.ph-ms-gjg { display: flex; flex-direction: column; align-items: center; gap: 2px; flex-shrink: 0; }
.ph-ms-gjg-cols { display: flex; gap: 2px; align-items: flex-end; }
.ph-ms-gjg .gjg-col { display: flex; flex-direction: column; gap: 1px; }
.ph-ms-gjg .gjg-cell {
    width: 8px; height: 8px; border-radius: 2px;
    background-color: #444;
}
.ph-ms-gjg .gjg-cell.gold { background-color: gold; }
.ph-ms-gjg-spin { font-size: 0.6rem; font-weight: 800; color: #374151; line-height: 1; white-space: nowrap; }

/* ── Golden Egypt Grand — coin-holder reels (page calc + modal) ── */
.coin-calculator {
    padding: 20px;
    background-color: #f0f0f0;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}
.coin-reels-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    align-items: flex-end;
    height: 140px;
}
.coin-reel {
    width: 30px;
    height: 100%;
    display: flex;
    flex-direction: column-reverse;
    justify-content: flex-start;
    gap: 5px;
}
.coin {
    width: 100%;
    height: 30px;
    border-radius: 50%;
    background-color: #6c757d;
    border: 2px solid #495057;
    box-shadow: inset 0 -3px 5px rgba(0,0,0,0.3);
    cursor: pointer;
    transition: background-color 0.2s ease;
}
.coin.filled {
    background-color: gold;
    border-color: #b8860b;
    box-shadow: inset 0 -3px 5px rgba(0,0,0,0.2), 0 0 10px gold;
}
/* compact coin display for play-history cards */
.ph-ms-geg { display: flex; gap: 2px; align-items: flex-end; flex-shrink: 0; }
.ph-ms-geg .geg-col { display: flex; flex-direction: column-reverse; gap: 1px; }
.ph-ms-geg .geg-cell {
    width: 8px; height: 8px; border-radius: 50%;
    background-color: #6c757d; border: 1px solid #495057;
}
.ph-ms-geg .geg-cell.gold { background-color: gold; border-color: #b8860b; }

/* ── Dancing Drums — turquoise multiplier orb (page calc + modal + card) ── */
.dd-calculator-container {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background-color: transparent;
    cursor: pointer;
    user-select: none;
}
.dd-orb-display {
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, #40e0d0 50%, #00ced1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 4px solid #008b8b;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3), inset 0 0 15px rgba(255,255,255,0.3);
}
.dd-display-multiplier {
    font-size: 3.5rem;
    font-weight: 900;
    color: #000;
    line-height: 1;
    font-family: sans-serif;
    text-shadow: 1px 1px 2px rgba(255,255,255,0.4);
}
/* compact multiplier orb for play-history cards */
.ph-ms-ddorb {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    background: radial-gradient(circle, #40e0d0 50%, #00ced1);
    border: 2px solid #008b8b;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 0.85rem;
    color: #000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3), inset 0 0 6px rgba(255,255,255,0.3);
}

/* ── Wu Jin Pen — red spin counter (page calc + modal + card) ── */
.wjp-calculator-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background-color: #f5f5f5;
    border-radius: 15px;
}
.wjp-controls-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}
.wjp-circle-display {
    width: 80px;
    height: 80px;
    background-color: #dc3545;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 8px rgba(0,0,0,0.4), inset 0 0 10px rgba(0,0,0,0.2);
    border: 2px solid #a02020;
}
.wjp-display-number {
    font-size: 2.5rem;
    font-weight: 900;
    color: white;
    text-shadow: 0 0 5px rgba(0,0,0,0.5);
}
.wjp-display-text {
    font-size: 1.2rem;
    font-weight: bold;
    color: #ffd700;
    text-shadow: -1px -1px 0 #800080, 1px -1px 0 #800080, -1px 1px 0 #800080, 1px 1px 0 #800080;
}
.wjp-control-btn {
    width: 45px;
    height: 45px;
    border: 2px solid #6c757d;
    background-color: #f8f9fa;
    border-radius: 50%;
    font-size: 1.8rem;
    font-weight: bold;
    color: #495057;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    transition: background-color 0.2s, transform 0.1s;
}
.wjp-control-btn:hover  { background-color: #e9ecef; }
.wjp-control-btn:active { transform: scale(0.95); }
.wjp-control-btn:disabled { opacity: 0.5; cursor: not-allowed; }
/* compact red counter for play-history cards */
.ph-ms-wjp {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    background-color: #dc3545;
    border: 2px solid #a02020;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 0.9rem;
    color: #fff;
    text-shadow: 0 0 4px rgba(0,0,0,0.5);
    box-shadow: 0 2px 5px rgba(0,0,0,0.4), inset 0 0 6px rgba(0,0,0,0.2);
}

/* ── Huff N Puff — 5×3 frame grid (page calc + modal) ── */
.hnp-calculator-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background-color: #00a316;
    border: 3px solid #095921;
    border-radius: 15px;
    position: relative;
}
.hnp-reset-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 24px;
    height: 24px;
    border: none;
    background: rgba(0,0,0,0.2);
    color: white;
    border-radius: 50%;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hnp-reset-btn:hover { background: rgba(0,0,0,0.4); }
.hnp-grid-container {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    width: 100%;
    max-width: 350px;
}
.hnp-grid-cell {
    aspect-ratio: 1 / 1;
    background-color: rgba(0,0,0,0.1);
    border: 4px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.2s ease-in-out;
}
.hnp-border-hay  { border-color: #e0cda1; box-shadow: 0 0 8px #e0cda1; }
.hnp-border-red  { border-color: #dc3545; box-shadow: 0 0 10px #dc3545; }
.hnp-border-gold { border-color: #ffd700; box-shadow: 0 0 12px #ffd700; }
/* compact 5×3 grid for play-history cards */
.ph-ms-hnp {
    display: grid;
    grid-template-columns: repeat(5, 7px);
    grid-template-rows: repeat(3, 7px);
    gap: 2px;
    padding: 3px;
    background-color: #00a316;
    border: 1px solid #095921;
    border-radius: 4px;
    flex-shrink: 0;
}
.ph-ms-hnp .hnp-cell {
    width: 7px; height: 7px; border-radius: 2px;
    background-color: rgba(0,0,0,0.12);
    border: 1.5px solid transparent;
    box-sizing: border-box;
}
.ph-ms-hnp .hnp-cell.hay  { border-color: #e0cda1; }
.ph-ms-hnp .hnp-cell.red  { border-color: #dc3545; }
.ph-ms-hnp .hnp-cell.gold { border-color: #ffd700; }

/* ── Rich Little Piggies — Blue Pig display (card mini + modal) ── */
.ph-ms-bluepig { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.ph-pig {
    position: relative;
    width: 34px;
    height: 30px;
    background: #6495ed;
    border: 2px solid #4169e1;
    border-radius: 50% 50% 40% 40% / 60% 60% 40% 40%;
    box-shadow: inset 0 -3px 6px rgba(0,0,0,0.1);
    flex-shrink: 0;
}
.ph-pig-ear {
    position: absolute;
    width: 11px;
    height: 13px;
    background: #6495ed;
    border: 2px solid #4169e1;
    border-radius: 50% 50% 0 0;
    top: -8px;
}
.ph-pig-ear.l { left: 2px;  transform: rotate(-25deg); }
.ph-pig-ear.r { right: 2px; transform: rotate(25deg);  }
.ph-pig-snout {
    position: absolute;
    width: 16px;
    height: 12px;
    background: #87ceeb;
    border: 1.5px solid #4169e1;
    border-radius: 50%;
    left: 50%;
    top: 42%;
    transform: translateX(-50%);
}
.ph-pig-nostril {
    position: absolute;
    width: 3px;
    height: 5px;
    background: #4169e1;
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
}
.ph-pig-nostril.l { left: 4px;  }
.ph-pig-nostril.r { right: 4px; }
.ph-pig-num { font-size: 0.66rem; font-weight: 900; color: #00008b; line-height: 1; }

/* Blue Pig modal calculator */
.ph-bluepig-calc {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.9rem;
    padding: 1rem;
    background: #f0f8ff;
    border-radius: 12px;
    border: 2px solid #add8e6;
}
.ph-pig-lg {
    width: 72px;
    height: 62px;
    border-width: 3px;
    box-shadow: inset 0 -5px 10px rgba(0,0,0,0.1);
}
.ph-pig-lg .ph-pig-ear   { width: 18px; height: 22px; border-width: 3px; top: -13px; }
.ph-pig-lg .ph-pig-ear.l { left: 5px;  }
.ph-pig-lg .ph-pig-ear.r { right: 5px; }
.ph-pig-lg .ph-pig-snout { width: 32px; height: 22px; border-width: 2px; }
.ph-pig-lg .ph-pig-nostril { width: 4px; height: 7px; }
.ph-pig-lg .ph-pig-nostril.l { left: 7px;  }
.ph-pig-lg .ph-pig-nostril.r { right: 7px; }
.ph-bluepig-controls { display: flex; align-items: center; gap: 14px; }
.ph-bluepig-display  { text-align: center; }
.ph-bluepig-input {
    width: 72px;
    border: none;
    background: transparent;
    text-align: center;
    font-size: 2rem;
    font-weight: 900;
    color: #00008b;
    padding: 0;
    -moz-appearance: textfield;
}
.ph-bluepig-input:focus { outline: none; }
.ph-bluepig-input::-webkit-outer-spin-button,
.ph-bluepig-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.ph-bluepig-sub { font-size: 0.72rem; font-weight: 600; color: #483d8b; text-transform: uppercase; }
.ph-bluepig-btn {
    width: 42px;
    height: 42px;
    border: 2px solid #6c757d;
    background: #f8f9fa;
    border-radius: 50%;
    font-size: 1.7rem;
    font-weight: 700;
    color: #495057;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    line-height: 1;
}
.ph-bluepig-btn:hover    { background: #e9ecef; }
.ph-bluepig-btn:active   { transform: scale(0.95); }
.ph-bluepig-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Red Hen (Rich Little Hens) — mirrors the Blue Pig structure, red theme */
.ph-ms-redhen { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.ph-hen {
    position: relative;
    width: 34px;
    height: 30px;
    background: #dc3545;
    border: 2px solid #b22222;
    border-radius: 50% 50% 45% 45% / 60% 60% 40% 40%;
    box-shadow: inset 0 -3px 6px rgba(0,0,0,0.15);
    flex-shrink: 0;
}
.ph-hen-comb {
    position: absolute;
    width: 6px;
    height: 6px;
    background: #ff4500;
    border: 1.5px solid #b22222;
    border-radius: 50%;
    top: -4px;
    left: 14px;
    box-shadow: 5px 1px 0 0 #ff4500, -5px 1px 0 0 #ff4500;
}
.ph-hen-beak {
    position: absolute;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 7px solid #ffc107;
    left: 50%;
    top: 42%;
    transform: translateX(-50%);
}
.ph-hen-wattle {
    position: absolute;
    width: 6px;
    height: 9px;
    background: #ff4500;
    border: 1.5px solid #b22222;
    border-radius: 0 0 50% 50%;
    top: 21px;
    left: 50%;
    transform: translateX(-50%);
}
.ph-hen-num { font-size: 0.66rem; font-weight: 900; color: #8b0000; line-height: 1; }

/* Red Hen modal calculator */
.ph-redhen-calc {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.9rem;
    padding: 1rem;
    background: #fff0f0;
    border-radius: 12px;
    border: 2px solid #ffb6c1;
}
.ph-hen-lg {
    width: 72px;
    height: 62px;
    border-width: 3px;
    box-shadow: inset 0 -5px 10px rgba(0,0,0,0.15);
}
.ph-hen-lg .ph-hen-comb {
    width: 13px; height: 13px; border-width: 2px; top: -8px; left: 29px;
    box-shadow: 9px 2px 0 0 #ff4500, -9px 2px 0 0 #ff4500;
}
.ph-hen-lg .ph-hen-beak {
    border-left-width: 9px; border-right-width: 9px; border-top: 14px solid #ffc107;
}
.ph-hen-lg .ph-hen-wattle { width: 11px; height: 16px; border-width: 2px; top: 46px; }
.ph-redhen-input {
    width: 72px;
    border: none;
    background: transparent;
    text-align: center;
    font-size: 2rem;
    font-weight: 900;
    color: #8b0000;
    padding: 0;
    -moz-appearance: textfield;
}
.ph-redhen-input:focus { outline: none; }
.ph-redhen-input::-webkit-outer-spin-button,
.ph-redhen-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.ph-redhen-sub { font-size: 0.72rem; font-weight: 600; color: #a52a2a; text-transform: uppercase; }

/* ── Buffalo/Eagle Ascension — mini reel grid (card) ── */
.ph-ms-stack.ph-ms-reels {
    flex-direction: row;
    align-items: flex-end;
    gap: 4px;
    min-width: 78px;
}
.ph-ms-reel { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.ph-ms-rbonus {
    width: 22px;
    height: 18px;
    border-radius: 4px;
    border: 1.5px solid;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.55rem;
    font-weight: 800;
}
.ph-ms-rbonus.none { background: #f3f4f6; border-color: #d1d5db; color: #9ca3af; }
.ph-ms-rbonus.s    { background: #fed7aa; border-color: #fb923c; color: #9a3412; }
.ph-ms-rbonus.ss   { background: #fef08a; border-color: #eab308; color: #713f12; }
.ph-ms-rbonus.fg   { background: #dbeafe; border-color: #3b82f6; color: #1e3a8a; }
/* Filled expansion-block stack — mirrors the page calculator's reel height blocks */
.ph-ms-rstack { display: flex; flex-direction: column; gap: 2px; }
.ph-ms-rblk {
    width: 22px;
    height: 5px;
    border-radius: 2px;
    background: #f3f4f6;
    border: 1px solid #d1d5db;
}
.ph-ms-rblk.filled { background: #d97706; border-color: #92400e; }

/* Play card body */
.ph-play-body { flex: 1; min-width: 0; }
.ph-play-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
}
.ph-play-slot-name { font-weight: 700; font-size: 0.95rem; color: #111827; }
.ph-play-pnl       { font-size: 0.95rem; white-space: nowrap; }
.ph-play-date      { font-size: 0.78rem; color: #9ca3af; margin-top: 3px; }
.ph-play-meta      { font-size: 0.78rem; color: #9ca3af; margin-top: 3px; display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }
.ph-play-meta i    { opacity: 0.7; }
.ph-meta-sep       { color: #d1d5db; }
.ph-play-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 0.9rem;
    margin-top: 0.35rem;
    font-size: 0.78rem;
    color: #6b7280;
}
.ph-stat-item { display: flex; align-items: center; gap: 0.25rem; }
.ph-stat-item i { opacity: 0.6; font-size: 0.75rem; }

/* Delete button */
.ph-card-actions {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex-shrink: 0;
    margin-top: 1px;
}
.ph-edit-btn,
.ph-delete-btn {
    color: #d1d5db;
    padding: 0.2rem 0.3rem;
    border: none;
    background: none;
    flex-shrink: 0;
    line-height: 1;
}
.ph-edit-btn:hover   { color: #3b82f6; }
.ph-delete-btn:hover { color: #ef4444; }
/* ── Casino autocomplete dropdown ───────────────────────────────────── */
.casino-ac-wrap     { position: relative; }
.casino-ac-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 2px);
    left: 0; right: 0;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    box-shadow: 0 4px 16px rgba(0,0,0,0.10);
    max-height: 220px;
    overflow-y: auto;
    z-index: 1070;
}
.casino-ac-item {
    padding: 0.45rem 0.8rem;
    font-size: 0.875rem;
    color: #374151;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: background 0.08s;
}
.casino-ac-item:first-child { border-radius: 0.5rem 0.5rem 0 0; }
.casino-ac-item:last-child  { border-radius: 0 0 0.5rem 0.5rem; }
.casino-ac-item:hover,
.casino-ac-item.active      { background: #f3f4f6; }
.casino-ac-item strong      { color: #111827; }

.ph-ms-empty { width: 30px; flex-shrink: 0; }

/* ── Feature hit detail sub-form ─────────────────────────────────────── */
.ph-feature-detail-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 0.875rem 1rem;
}
.fd-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.4rem;
}
.fd-range     { font-size: 0.68rem; color: #9ca3af; font-weight: 400; }
.fd-pot-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    color: #6b7280;
    text-align: center;
    margin-bottom: 0.3rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.fd-multi-row {
    display: flex;
    gap: 0.5rem;
}
.fd-pot-group {
    flex: 1;
    min-width: 0;
}
.fd-mult-row   { margin-top: 0.75rem; }
.fd-mult-btns  { display: flex; gap: 0.375rem; flex-wrap: wrap; }
.fd-mult-btn {
    padding: 0.3rem 0.75rem;
    border: 1.5px solid #d1d5db;
    background: #fff;
    border-radius: 0.375rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: #374151;
    cursor: pointer;
    transition: border-color 0.12s, background 0.12s, color 0.12s;
}
.fd-mult-btn:hover  { border-color: #6366f1; color: #6366f1; }
.fd-mult-btn.active { border-color: #6366f1; background: #6366f1; color: #fff; }

/* ── Feature details row on play card ───────────────────────────────── */
.ph-feature-detail-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.1rem;
    margin-top: 0.25rem;
    font-size: 0.74rem;
    color: #6b7280;
    padding-top: 0.2rem;
    border-top: 1px dashed #e5e7eb;
}
.ph-fd-item         { display: inline-flex; align-items: center; gap: 0.2rem; }
.ph-fd-key          { font-weight: 600; color: #374151; }
.ph-fd-sep          { color: #d1d5db; }
.ph-fd-mult         { font-weight: 700; color: #6366f1; font-size: 0.78rem; }
.ph-fd-label-prefix { font-weight: 600; color: #374151; }

/* Comments line on card */
.ph-play-comments {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.25rem;
    font-style: italic;
}
.ph-play-comments i { opacity: 0.6; margin-right: 0.2rem; }

/* ══════════════════════════════════════════════════════════════
   Play History — multi-select filter bar
═══════════════════════════════════════════════════════════════ */
.ph-filter-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.ph-filter-toggle {
    background: #fff;
    border: 1px solid #d1d5db;
    color: #374151;
    font-size: 0.82rem;
    font-weight: 600;
    border-radius: 8px;
    padding: 0.35rem 0.7rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}
.ph-filter-toggle:hover { background: #f9fafb; border-color: #9ca3af; }
.ph-filter-toggle.has-active {
    background: #eef2ff;
    border-color: #818cf8;
    color: #3730a3;
}
.ph-filter-toggle i { opacity: 0.7; }
.ph-filter-menu {
    padding: 0.35rem;
    max-height: 320px;
    overflow-y: auto;
    min-width: 220px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    border-radius: 10px;
}
.ph-filter-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.55rem;
    border-radius: 7px;
    font-size: 0.85rem;
    color: #374151;
    cursor: pointer;
    margin: 0;
}
.ph-filter-item:hover { background: #f3f4f6; }
.ph-filter-item input { cursor: pointer; flex: none; }
.ph-filter-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ph-filter-empty {
    padding: 0.5rem 0.55rem;
    font-size: 0.82rem;
    color: #9ca3af;
}
.ph-filter-clear {
    background: transparent;
    border: 1px solid transparent;
    color: #6b7280;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 8px;
    padding: 0.35rem 0.6rem;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}
.ph-filter-clear:hover { background: #fef2f2; color: #b91c1c; }
.ph-filter-clear i { font-size: 0.72rem; }

/* Slot page — past-plays / log-a-play hero actions reuse .btn-outline-light */

/* ==========================================================================
   Dark mode  (toggled by js/theme.js via [data-theme="dark"] on <html>)
   ========================================================================== */
[data-theme="dark"] { color-scheme: dark; }

[data-theme="dark"] body {
    background: linear-gradient(180deg, #0a1120 0%, #0f1a2e 100%);
    color: #e6ebf3;
}

/* ---- surfaces / cards ---- */
[data-theme="dark"] .slot-card,
[data-theme="dark"] .feature-card,
[data-theme="dark"] .card {
    background: #182231 !important;
    border-color: #2a3547 !important;
    color: #e6ebf3;
    box-shadow: 0 6px 24px rgba(0,0,0,0.45) !important;
}
[data-theme="dark"] .card-body { color: #dce3ec; }
[data-theme="dark"] .card-header { background: #0f2b52 !important; color: #eef2f8 !important; border-color: #2a3547 !important; }
/* slot-card headers are already deep blue — keep them */
[data-theme="dark"] .slot-card .card-header { background: #023e8a !important; color: #fff !important; }
[data-theme="dark"] .slot-image { background: linear-gradient(135deg, #061033, #0a4a72); }

/* ---- headings & text ---- */
[data-theme="dark"] .section-title,
[data-theme="dark"] .feature-card h5,
[data-theme="dark"] .slot-title,
[data-theme="dark"] .slot-meta .meta-val { color: #eef2f8; }
[data-theme="dark"] .text-muted { color: #93a0b3 !important; }
[data-theme="dark"] .feature-card p,
[data-theme="dark"] .slot-meta,
[data-theme="dark"] .slot-description,
[data-theme="dark"] .slot-count,
[data-theme="dark"] .no-results,
[data-theme="dark"] .mt-gold-form-label,
[data-theme="dark"] .bl-calc-label,
[data-theme="dark"] .ba-calc-intro { color: #aab4c2; }
[data-theme="dark"] .slot-meta .meta-label { color: #c2ccd9; }
[data-theme="dark"] .strategy-block p,
[data-theme="dark"] .strategy-block li { color: #c6cedb; }
[data-theme="dark"] .strategy-warning h3 { color: #fbbf24; }

/* ---- strategy tint blocks: deepen so they read on a dark card ---- */
[data-theme="dark"] .strategy-play    { background: rgba(0,119,182,0.12); }
[data-theme="dark"] .strategy-info    { background: rgba(0,150,199,0.12); }
[data-theme="dark"] .strategy-warning { background: rgba(245,158,11,0.10); }

/* ---- footer / bootstrap light utilities ---- */
[data-theme="dark"] footer,
[data-theme="dark"] .footer,
[data-theme="dark"] .bg-light { background: #0c1523 !important; border-color: #2a3547 !important; }
[data-theme="dark"] footer a { color: #93a0b3; }
[data-theme="dark"] footer a:hover { color: #e6ebf3; }
[data-theme="dark"] .border-top { border-color: #2a3547 !important; }

/* ---- inputs / filters / buttons ---- */
[data-theme="dark"] .filters-bar input[type="search"],
[data-theme="dark"] .filters-bar select,
[data-theme="dark"] .btn-favorites-filter,
[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select {
    background: #0f1a2b !important;
    color: #e6ebf3 !important;
    border-color: #2f3b4f !important;
}
[data-theme="dark"] .form-control::placeholder { color: #7b8798; }
[data-theme="dark"] .filters-bar .search-wrap i { color: #93a0b3; }
[data-theme="dark"] .btn-favorites-filter.active { background: rgba(220,38,38,0.18) !important; color: #fca5a5 !important; }

/* ---- tags ---- */
[data-theme="dark"] .tag { background: rgba(72,202,228,0.13); color: #7fd6ef; border-color: rgba(72,202,228,0.28); }
[data-theme="dark"] .tag.hot { background: linear-gradient(135deg, rgba(72,202,228,0.18), rgba(0,119,182,0.22)); color: #9fe3ff; border-color: rgba(72,202,228,0.4); }
[data-theme="dark"] .provider-badge { background: rgba(3,4,94,0.9); }

/* ---- tables (Play History) ---- */
[data-theme="dark"] .table { color: #e6ebf3; }
[data-theme="dark"] .table > :not(caption) > * > * { background-color: transparent !important; border-color: #2a3547 !important; color: #e6ebf3; }
[data-theme="dark"] .table thead th { color: #c6cedb; }
[data-theme="dark"] .table-striped > tbody > tr:nth-of-type(odd) > * { background-color: rgba(255,255,255,0.035) !important; }
[data-theme="dark"] .table-hover > tbody > tr:hover > * { background-color: rgba(72,202,228,0.08) !important; }

/* ---- alerts / list groups ---- */
[data-theme="dark"] .list-group-item { background: #182231; color: #e6ebf3; border-color: #2a3547; }
[data-theme="dark"] .modal-content { background: #182231; color: #e6ebf3; }
[data-theme="dark"] .modal-header, [data-theme="dark"] .modal-footer { border-color: #2a3547; }
[data-theme="dark"] .btn-close { filter: invert(1) grayscale(1) brightness(1.6); }

/* ---- calculator panels: turn plain light-grey containers dark ---- */
[data-theme="dark"] .dmx-grid,
[data-theme="dark"] .cr-reels,
[data-theme="dark"] .rs-reels,
[data-theme="dark"] .hexgrid,
[data-theme="dark"] .tf-grid,
[data-theme="dark"] .bd-calculator,
[data-theme="dark"] .ba-calc-grid,
[data-theme="dark"] .rr-calculator,
[data-theme="dark"] .rts-calculator { background: #232f40 !important; }
[data-theme="dark"] .dmx-cell,
[data-theme="dark"] .tf-coin { background: #0f1a2b; box-shadow: 0 0 0 2px #3a465b inset; color: #cbd5e5; }
[data-theme="dark"] .mt-gold-control-btn { background: #1a2434; color: #e6ebf3; border-color: #3a465b; }
[data-theme="dark"] .mt-gold-control-btn:hover { background: #22304a; }
[data-theme="dark"] .rr-mhb, [data-theme="dark"] .dmx-hint, [data-theme="dark"] .cr-hint,
[data-theme="dark"] .hex-hint, [data-theme="dark"] .tf-hint, [data-theme="dark"] .rs-hint { color: #9aa6b6; }

/* ---- theme toggle: floating button (pages without a sidebar) ---- */
.theme-fab {
    position: fixed; bottom: 1.1rem; right: 1.1rem; z-index: 500;
    width: 46px; height: 46px; border-radius: 50%; border: none; cursor: pointer;
    background: linear-gradient(135deg, #0077b6, #023e8a); color: #fff;
    font-size: 1.2rem; box-shadow: 0 4px 16px rgba(0,0,0,0.3);
    display: flex; align-items: center; justify-content: center;
    transition: transform 0.15s ease;
}
.theme-fab:hover { transform: scale(1.08); }
[data-theme="dark"] .theme-fab { background: linear-gradient(135deg, #f5c518, #f58700); color: #1a1a1a; }
