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

html {
    overflow-x: clip;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    overflow-x: clip;
    max-width: 800px;
    margin: 16px auto;
    padding: 0 max(16px, env(safe-area-inset-left)) max(24px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-right));
    word-break: break-word;
    overflow-wrap: anywhere;
    -webkit-tap-highlight-color: rgba(200, 162, 200, 0.35);
}

a[href^="mailto:"]::before {
    content: none !important;
}

article img,
.banner img,
.banner amp-img,
.banner-link img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 10px;
}

.banner-link {
    display: block;
}

#copy-button,
.game-cta {
    margin: 16px 0 22px;
    background: linear-gradient(45deg, #ff4ec8, #e879f9, #a855f7, #ff4ec8);
    background-size: 300% 300%;
    animation: shimmer 5s ease-in-out infinite, pulse 2s infinite;
    color: #fff;
    border: none;
    padding: 14px 16px;
    min-height: 48px;
    border-radius: 8px;
    box-shadow: 0 0 18px #f472b6, 0 0 36px #e879f9, 0 0 58px rgba(168, 85, 247, 0.7);
    cursor: pointer;
    display: block;
    width: 100%;
    max-width: 100%;
    text-decoration: none;
    text-align: center;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1.2;
    touch-action: manipulation;
}

#copy-button:hover,
#copy-button:focus-visible,
.game-cta:hover,
.game-cta:focus-visible {
    text-decoration: none;
    color: #fff;
}

.page-article article p,
.page-article article li {
    line-height: 1.7;
}

#copy-button.blob {
    box-shadow: 0 0 18px #f472b6, 0 0 36px #e879f9, 0 0 58px rgba(168, 85, 247, 0.7);
}

.crumbs {
    margin: 0 0 0.35rem;
    font-size: 0.95rem;
}

.related-links a,
.materials a {
    display: inline-block;
    padding: 6px 0;
    min-height: 44px;
    line-height: 1.4;
}

.back-top {
    display: block;
    text-align: center;
    padding: 12px 0;
    min-height: 44px;
}

.blob {
    width: 100%;
    max-width: 100%;
    box-shadow: 0 0 0 0 #000;
    transform: scale(1);
}

@keyframes shimmer {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes pulse {
    0% { transform: scale(0.98); }
    70% { transform: scale(1); }
    100% { transform: scale(0.98); }
}

article ol a,
main ol a {
    display: inline-block;
    padding: 8px 0;
    min-height: 44px;
    line-height: 1.4;
}

.mellstroy-info-table {
    width: 100%;
    max-width: 740px;
    margin: 28px auto;
    border-collapse: separate;
    border-spacing: 0;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    border-radius: 16px;
    overflow: hidden;
    font-family: Arial, Helvetica, sans-serif;
    table-layout: auto;
    color: #222;
}

.mellstroy-info-table tbody tr:nth-child(2n),
.mellstroy-info-table tbody tr:nth-child(2n) td {
    background-color: #fdfdfd;
}

.mellstroy-info-table th {
    background: linear-gradient(90deg, #c8a2c8, #967bb6);
    color: #fff;
    padding: 16px 18px;
    text-align: left;
    font-size: 1.05em;
    font-weight: bold;
}

.mellstroy-info-table td {
    padding: 14px 18px;
    background-color: #fdfdfd;
    vertical-align: middle;
}

.mellstroy-info-table td:first-child {
    font-weight: 600;
    color: #444;
    width: 38%;
}

.mellstroy-info-table td:last-child {
    font-weight: 800;
    color: #333;
    font-size: 1.08em;
    background: linear-gradient(90deg, #f8f0ff, #f5e8ff);
}

.mellstroy-info-table a {
    color: #6b21a8;
    text-decoration: underline;
    font-weight: 900;
    overflow-wrap: anywhere;
}

.mellstroy-info-table tr:last-child td {
    border-bottom: none;
}

footer small {
    display: block;
    font-size: 0.85em;
}

.promocode {
    border-style: dashed;
    font-size: 2em;
    margin: auto;
    width: 50%;
    padding: 10px;
    text-align: center;
    display: block;
}

.cta-button {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: #07c;
    color: #fff;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 3px;
    transition: background-color 0.3s;
}

.cta-button:hover {
    background-color: #005fa3;
    text-decoration: none;
}

@media (max-width: 767px) {
    .hide-on-mobile {
        display: none;
    }

    h1 {
        font-size: 1.7rem;
        margin-top: 0;
    }

    h2 {
        font-size: 1.3rem;
        scroll-margin-top: 12px;
    }

    h3 {
        font-size: 1.08rem;
    }

    .promocode {
        width: 100%;
        font-size: 1.25em;
    }
}

@media (max-width: 640px) {
    .mellstroy-info-table,
    .mellstroy-info-table thead,
    .mellstroy-info-table tbody,
    .mellstroy-info-table th,
    .mellstroy-info-table td,
    .mellstroy-info-table tr {
        display: block;
        width: 100%;
    }

    .mellstroy-info-table {
        background: transparent;
        box-shadow: none;
        border-radius: 0;
        overflow: visible;
        margin: 20px 0;
    }

    .mellstroy-info-table thead {
        display: none;
    }

    .mellstroy-info-table tbody tr:nth-child(2n),
    .mellstroy-info-table tbody tr:nth-child(2n) td {
        background: #fff;
    }

    .mellstroy-info-table tr {
        margin-bottom: 12px;
        border: 1px solid #e0d0ff;
        border-radius: 12px;
        background: #fff;
        overflow: hidden;
    }

    .mellstroy-info-table td {
        position: static;
        text-align: left;
        padding: 8px 14px;
        border: none;
    }

    .mellstroy-info-table td::before {
        content: none;
    }

    .mellstroy-info-table td:first-child {
        width: 100%;
        padding-bottom: 2px;
        font-size: 0.82em;
        font-weight: 700;
        color: #967bb6;
        background: #fff;
    }

    .mellstroy-info-table td:last-child {
        width: 100%;
        padding-top: 2px;
        padding-bottom: 12px;
        font-weight: 800;
        color: #333;
        font-size: 1.05em;
        background: #f8f0ff;
        line-height: 1.35;
    }
}

body.cap-lock {
    overflow: hidden;
}

.cap-root {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: grid;
    place-items: center;
    padding: 16px;
}

.cap-root[hidden] {
    display: none !important;
}

.cap-back {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
}

.cap-card {
    position: relative;
    z-index: 1;
    width: min(100%, 400px);
    margin: 0;
    padding: 22px 18px 16px;
    border: 1px solid rgba(168, 85, 247, 0.7);
    border-radius: 16px;
    background: #16121c;
    color: #fff;
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.45);
}

.cap-x {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 36px;
    height: 36px;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #fff;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}

.cap-title {
    margin: 0 28px 8px 0;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.3;
}

.cap-prompt {
    margin: 0 0 12px;
    color: #f3e8ff;
}

.cap-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    max-width: 280px;
    margin: 0 auto;
}

.cap-cell {
    display: grid;
    place-items: center;
    width: 100%;
    aspect-ratio: 1;
    margin: 0;
    padding: 8px;
    border: 2px solid transparent;
    border-radius: 12px;
    background: #241c2e;
    cursor: pointer;
}

.cap-cell svg {
    width: 70%;
    height: 70%;
}

.cap-cell.is-on {
    border-color: #ff4ec8;
    box-shadow: 0 0 0 2px rgba(255, 78, 200, 0.35);
}

.cap-error {
    margin: 10px 0 0;
    color: #ff8aa8;
    font-size: 0.95rem;
}

.cap-error[hidden],
.cap-fallback[hidden] {
    display: none !important;
}

.cap-go,
.cap-fallback {
    display: block;
    width: 100%;
    margin: 14px 0 0;
    padding: 12px 16px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(45deg, #ff4ec8, #a855f7);
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

.cap-note {
    margin: 10px 0 0;
    color: #c4b5d4;
    font-size: 0.85rem;
    text-align: center;
}
