:root {
    color-scheme: dark;
    --bg: #090608;
    --panel: #181014;
    --panel-light: #26171d;
    --red: #e3132f;
    --red-dark: #780617;
    --cream: #fff5d8;
    --score: #ffdc45;
    --muted: #c7aeb7;
    --border: #49303a;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--bg);
}

body {
    min-height: 100vh;
    min-height: 100svh;
    margin: 0;
    display: grid;
    place-items: center;
    padding: 12px;
    overflow-x: hidden;
    color: var(--cream);
    font-family: "Trebuchet MS", Arial, sans-serif;
    background:
        radial-gradient(circle at 50% 20%, rgba(227, 19, 47, .18), transparent 27rem),
        repeating-linear-gradient(0deg, rgba(255, 255, 255, .018) 0 1px, transparent 1px 4px),
        linear-gradient(145deg, #11090d, #050405 70%);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(90deg, transparent 49.5%, rgba(255,255,255,.02) 50%, transparent 50.5%),
        linear-gradient(transparent 49.5%, rgba(255,255,255,.015) 50%, transparent 50.5%);
    background-size: 64px 64px;
    mask-image: radial-gradient(circle at center, black, transparent 78%);
}

button,
a,
input {
    font: inherit;
}

button {
    -webkit-tap-highlight-color: transparent;
}

.cabinet {
    width: min(980px, 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: clamp(15px, 2.2vw, 25px);
    position: relative;
    isolation: isolate;
    border: 4px solid #090507;
    border-radius: 24px;
    background:
        linear-gradient(180deg, rgba(255,255,255,.035), transparent 16%),
        linear-gradient(160deg, var(--panel-light), var(--panel));
    box-shadow:
        0 0 0 3px var(--border),
        0 0 0 7px #090608,
        0 24px 65px rgba(0,0,0,.65),
        inset 0 0 60px rgba(0,0,0,.45);
}

.cabinet::after {
    content: "";
    position: absolute;
    inset: 8px;
    z-index: -1;
    border: 1px solid rgba(255,255,255,.06);
    border-radius: 16px;
    pointer-events: none;
}

.marquee {
    width: 100%;
    text-align: center;
    padding: 9px clamp(8px, 2vw, 20px) 12px;
    border: 3px solid #5a303a;
    border-radius: 15px;
    background:
        radial-gradient(circle at 15% 35%, rgba(255,220,69,.16), transparent 25%),
        radial-gradient(circle at 85% 35%, rgba(255,220,69,.12), transparent 25%),
        linear-gradient(#390914, #18070b);
    box-shadow: inset 0 0 24px rgba(227,19,47,.35), 0 6px 0 #0c0709;
}

.eyebrow,
.consent-kicker {
    margin: 0 0 4px;
    color: var(--score);
    font-size: .68rem;
    font-weight: 900;
    letter-spacing: .21em;
}

h1,
h2,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 4px;
    color: white;
    font-size: clamp(1.85rem, 5.2vw, 3.75rem);
    line-height: .95;
    letter-spacing: .04em;
    text-transform: uppercase;
    text-shadow:
        0 3px 0 var(--red-dark),
        0 5px 0 #35040d,
        0 0 20px rgba(227, 19, 47, .65);
}

.subtitle {
    margin-bottom: 0;
    color: #e7ced5;
    font-size: clamp(.78rem, 1.7vw, .98rem);
}

.scoreboard {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.score-panel,
.high-score-panel {
    min-width: 0;
    border: 3px solid #4d3d17;
    border-radius: 12px;
    background:
        linear-gradient(rgba(255,220,69,.04), transparent),
        #080804;
    box-shadow:
        inset 0 0 24px rgba(255,220,69,.08),
        0 6px 0 #0a0707,
        0 0 0 2px #151007;
}

.score-panel {
    padding: 11px 14px 12px;
    text-align: center;
}

.score-label {
    display: block;
    margin-bottom: 5px;
    color: #e9c947;
    font-family: "Courier New", monospace;
    font-size: clamp(.67rem, 1.6vw, .9rem);
    font-weight: 700;
    letter-spacing: .16em;
}

.score-value {
    display: block;
    overflow: hidden;
    color: var(--score);
    font-family: "Courier New", ui-monospace, monospace;
    font-size: clamp(1.42rem, 4vw, 2.8rem);
    font-weight: 900;
    letter-spacing: .065em;
    line-height: 1;
    white-space: nowrap;
    text-shadow: 0 0 8px rgba(255,220,69,.9), 0 0 22px rgba(255,220,69,.38);
}

.score-value.flash {
    animation: scoreFlash .22s ease-out;
}

.game-area {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(230px, .75fr);
    gap: 16px;
    align-items: stretch;
}

.button-zone {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 15px;
    padding: 2px 0 4px;
}

.button-plinth {
    position: relative;
    width: clamp(205px, 30vw, 300px);
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background:
        radial-gradient(circle at 50% 45%, #4a4245 0 44%, #2a2024 45% 56%, #0c090a 57% 67%, transparent 68%),
        radial-gradient(circle, #393033, #100c0e 72%);
    box-shadow:
        0 15px 0 #070506,
        0 23px 28px rgba(0,0,0,.7),
        inset 0 5px 12px rgba(255,255,255,.12),
        inset 0 -13px 22px rgba(0,0,0,.65);
}

.button-plinth::before {
    content: "";
    position: absolute;
    inset: 8%;
    border-radius: 50%;
    border: 2px dashed rgba(255,255,255,.1);
    animation: slowSpin 18s linear infinite;
}

.arcade-button {
    position: relative;
    width: 62%;
    aspect-ratio: 1;
    z-index: 1;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    color: white;
    font-size: clamp(1.05rem, 3.6vw, 1.9rem);
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
    text-shadow: 0 3px 0 rgba(90,0,10,.9), 0 0 10px rgba(255,255,255,.5);
    background:
        radial-gradient(circle at 35% 24%, rgba(255,255,255,.9) 0 3%, rgba(255,255,255,.25) 4% 13%, transparent 14%),
        radial-gradient(circle at 50% 42%, #ff5369 0 12%, var(--red) 52%, #9c071c 73%, #54030f 100%);
    box-shadow:
        0 14px 0 #610615,
        0 18px 0 #2c050b,
        0 23px 24px rgba(0,0,0,.7),
        inset 0 8px 12px rgba(255,255,255,.45),
        inset 0 -13px 21px rgba(85,0,15,.58),
        0 0 31px rgba(227,19,47,.38);
    transform: translateY(-5px);
    transition: transform 80ms ease, box-shadow 80ms ease, filter 80ms ease;
    touch-action: manipulation;
}

.arcade-button::after {
    content: "";
    position: absolute;
    inset: 9%;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,.18);
    pointer-events: none;
}

.arcade-button:hover {
    filter: brightness(1.09) saturate(1.08);
}

.arcade-button:focus-visible {
    outline: 4px solid var(--score);
    outline-offset: 8px;
}

.arcade-button:active,
.arcade-button.pressed {
    transform: translateY(8px) scale(.985);
    box-shadow:
        0 3px 0 #610615,
        0 5px 0 #2c050b,
        0 8px 11px rgba(0,0,0,.6),
        inset 0 5px 13px rgba(255,255,255,.32),
        inset 0 -9px 18px rgba(85,0,15,.68),
        0 0 20px rgba(227,19,47,.42);
}

.arcade-button:disabled {
    cursor: wait;
}

.status-message {
    min-height: 1.15em;
    margin: 0;
    color: var(--muted);
    font-family: "Courier New", monospace;
    font-size: .86rem;
    font-weight: 900;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.status-message.success {
    color: var(--score);
    text-shadow: 0 0 10px rgba(255,220,69,.55);
}

.status-message.error {
    color: #ff8395;
}

.high-score-panel {
    align-self: center;
    width: 100%;
    padding: 14px;
}

.high-score-heading {
    text-align: center;
    padding-bottom: 10px;
    margin-bottom: 7px;
    border-bottom: 1px dashed rgba(255,220,69,.28);
}

.high-score-heading .score-label {
    margin-bottom: 2px;
    font-size: clamp(.8rem, 1.8vw, 1rem);
}

.high-score-note {
    color: #947f42;
    font-family: "Courier New", monospace;
    font-size: .62rem;
    font-weight: 700;
    letter-spacing: .13em;
}

.high-score-list {
    list-style: none;
    margin: 0;
    padding: 0;
    color: var(--score);
    font-family: "Courier New", monospace;
    font-weight: 900;
}

.high-score-list li {
    display: grid;
    grid-template-columns: 1.4em 2.7em minmax(0, 1fr);
    gap: 7px;
    align-items: center;
    min-height: 34px;
    border-bottom: 1px solid rgba(255,220,69,.1);
}

.high-score-list li:last-child {
    border-bottom: 0;
}

.rank {
    color: #9d8737;
    text-align: right;
}

.player-name {
    color: white;
    letter-spacing: .1em;
}

.player-score {
    overflow: hidden;
    text-align: right;
    font-size: clamp(.78rem, 1.8vw, 1rem);
    letter-spacing: .025em;
    white-space: nowrap;
    text-shadow: 0 0 6px rgba(255,220,69,.6);
}

.site-footer {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 4px 7px;
    text-align: center;
    font-size: .76rem;
    line-height: 1.35;
}

.site-footer a,
.footer-link,
.consent-card a,
.privacy-card a {
    color: #f5c9d2;
    text-underline-offset: 3px;
}

.site-footer a:hover,
.footer-link:hover,
.consent-card a:hover,
.privacy-card a:hover {
    color: white;
}

.support-link {
    display: inline-flex;
    align-items: center;
    min-height: 25px;
    padding: 3px 9px;
    border: 1px solid #8c5f15;
    border-radius: 999px;
    color: var(--score) !important;
    background: rgba(255,220,69,.07);
    font-family: "Courier New", monospace;
    font-weight: 900;
    letter-spacing: .035em;
    text-decoration: none;
    text-transform: uppercase;
    box-shadow: inset 0 0 10px rgba(255,220,69,.05);
}

.support-link:hover {
    border-color: var(--score);
    background: rgba(255,220,69,.13);
}

.builder-credit {
    text-decoration: none;
}

.builder-credit strong {
    color: white;
}

.footer-separator {
    color: #806d73;
}

.footer-link {
    margin: 0;
    padding: 0;
    border: 0;
    cursor: pointer;
    background: transparent;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.consent-backdrop {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(3,2,3,.82);
    backdrop-filter: blur(9px);
}

.consent-backdrop[hidden] {
    display: none;
}

.consent-card,
.privacy-card {
    width: min(620px, 100%);
    padding: clamp(22px, 4vw, 34px);
    border: 3px solid #67313e;
    border-radius: 18px;
    background: linear-gradient(145deg, #27151b, #130d10);
    box-shadow: 0 24px 80px rgba(0,0,0,.7), inset 0 0 30px rgba(227,19,47,.08);
}

.consent-card h2,
.privacy-card h2 {
    color: white;
    text-transform: uppercase;
}

.consent-card h2 {
    margin-bottom: 10px;
    font-size: clamp(1.55rem, 5vw, 2.35rem);
    line-height: 1.05;
}

.consent-card p,
.privacy-card p {
    color: #e5d3d8;
    line-height: 1.55;
}

.player-name-field {
    display: grid;
    gap: 7px;
    margin: 18px 0 7px;
}

.player-name-field label {
    color: var(--score);
    font-family: "Courier New", monospace;
    font-size: .78rem;
    font-weight: 900;
    letter-spacing: .13em;
}

.player-name-field input {
    width: 5.2ch;
    padding: 7px 9px;
    border: 3px solid #5b481b;
    border-radius: 7px;
    outline: none;
    color: var(--score);
    background: #080804;
    font-family: "Courier New", monospace;
    font-size: 2.1rem;
    font-weight: 900;
    letter-spacing: .14em;
    text-align: center;
    text-transform: uppercase;
    box-shadow: inset 0 0 16px rgba(255,220,69,.08), 0 4px 0 #080606;
}

.player-name-field input:focus {
    border-color: var(--score);
    box-shadow: 0 0 0 3px rgba(255,220,69,.16), inset 0 0 16px rgba(255,220,69,.08);
}

.player-name-field small {
    color: #bda9af;
    font-size: .82rem;
}

.consent-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 21px 0 15px;
}

.consent-actions button {
    flex: 1 1 190px;
    min-height: 48px;
    padding: 11px 17px;
    border-radius: 9px;
    cursor: pointer;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.consent-primary {
    border: 2px solid #ff667b;
    color: white;
    background: linear-gradient(#ef2945, #a60720);
    box-shadow: 0 5px 0 #570311;
}

.consent-secondary {
    border: 2px solid #5b464d;
    color: #f4e4e9;
    background: #251a1e;
    box-shadow: 0 5px 0 #0a0708;
}

.consent-actions button:active {
    transform: translateY(4px);
    box-shadow: 0 1px 0 #080506;
}

.consent-note {
    margin-bottom: 0;
    font-size: .86rem;
}

.privacy-page {
    justify-content: flex-start;
}

.privacy-card {
    width: 100%;
}

.privacy-card h2:not(:first-child) {
    margin-top: 26px;
}

.privacy-card code {
    padding: 2px 6px;
    border-radius: 4px;
    background: #080607;
    color: var(--score);
}

.setup-note {
    padding: 12px 14px;
    border: 1px solid #5b481b;
    border-radius: 9px;
    background: rgba(255,220,69,.055);
}

.support-card {
    width: min(620px, 100%);
    text-align: center;
}

.support-intro {
    max-width: 34rem;
    margin-inline: auto;
}

.paypal-support-panel {
    width: min(430px, 100%);
    min-height: 160px;
    margin: 2px auto 4px;
    padding: 18px;
    border: 2px solid #4d3d17;
    border-radius: 14px;
    background:
        linear-gradient(rgba(255,220,69,.035), transparent),
        #080804;
    box-shadow:
        inset 0 0 24px rgba(255,220,69,.07),
        0 6px 0 #0a0707,
        0 0 0 2px #151007;
}

#paypal-container-JQFE42YDPRY8C {
    width: 100%;
    min-height: 120px;
}

.support-disclaimer {
    max-width: 36rem;
    margin: 0 auto;
    color: var(--muted);
    font-size: .82rem;
    line-height: 1.45;
}

.back-link {
    display: inline-block;
    margin-top: 15px;
    font-weight: 900;
}

.noscript {
    position: fixed;
    inset: auto 20px 20px;
    z-index: 100;
    padding: 16px;
    border: 2px solid #ff667b;
    border-radius: 8px;
    background: #28050d;
    color: white;
}

@keyframes scoreFlash {
    0% { transform: scale(1); filter: brightness(1); }
    50% { transform: scale(1.055); filter: brightness(1.8); }
    100% { transform: scale(1); filter: brightness(1); }
}

@keyframes slowSpin {
    to { transform: rotate(360deg); }
}

@media (max-width: 650px) {
    body {
        padding: 8px;
    }

    .cabinet {
        gap: 10px;
        padding: 12px;
        border-radius: 18px;
    }

    .marquee {
        padding: 7px 6px 9px;
    }

    .eyebrow {
        display: none;
    }

    h1 {
        font-size: clamp(1.42rem, 7.6vw, 2.25rem);
    }

    .subtitle {
        font-size: .7rem;
    }

    .scoreboard {
        gap: 7px;
    }

    .score-panel {
        padding: 8px 5px 9px;
    }

    .score-label {
        margin-bottom: 4px;
        font-size: clamp(.56rem, 2.7vw, .68rem);
        letter-spacing: .1em;
    }

    .score-value {
        font-size: clamp(1rem, 5.7vw, 1.52rem);
        letter-spacing: .025em;
    }

    .game-area {
        grid-template-columns: minmax(145px, 1.1fr) minmax(125px, .9fr);
        gap: 9px;
    }

    .button-zone {
        gap: 10px;
    }

    .button-plinth {
        width: min(46vw, 205px);
        min-width: 142px;
    }

    .arcade-button {
        font-size: clamp(.78rem, 4.4vw, 1.1rem);
    }

    .status-message {
        font-size: .6rem;
        letter-spacing: .09em;
    }

    .high-score-panel {
        padding: 8px 7px;
    }

    .high-score-heading {
        padding-bottom: 6px;
        margin-bottom: 3px;
    }

    .high-score-heading .score-label {
        font-size: clamp(.61rem, 2.8vw, .76rem);
    }

    .high-score-note {
        display: none;
    }

    .high-score-list li {
        grid-template-columns: 1em 2.2em minmax(0, 1fr);
        gap: 3px;
        min-height: 27px;
        font-size: .72rem;
    }

    .player-score {
        font-size: clamp(.56rem, 2.55vw, .72rem);
        letter-spacing: 0;
    }

    .site-footer {
        gap: 4px 5px;
        font-size: .63rem;
    }

    .support-link {
        min-height: 22px;
        padding: 2px 7px;
    }
}

@media (max-width: 350px) {
    .cabinet {
        padding: 9px;
    }

    .game-area {
        grid-template-columns: minmax(132px, 1fr) minmax(115px, .85fr);
        gap: 6px;
    }

    .button-plinth {
        min-width: 132px;
    }

    .high-score-panel {
        padding-inline: 5px;
    }

    .player-score {
        font-size: .55rem;
    }
}

@media (max-height: 700px) and (min-width: 651px) {
    body {
        padding: 7px;
    }

    .cabinet {
        gap: 9px;
        padding: 12px 18px;
    }

    .marquee {
        padding-block: 6px 8px;
    }

    .eyebrow,
    .subtitle {
        display: none;
    }

    h1 {
        margin-bottom: 0;
        font-size: clamp(1.7rem, 4.4vw, 2.8rem);
    }

    .score-panel {
        padding-block: 8px;
    }

    .button-plinth {
        width: min(35vh, 255px);
    }

    .high-score-list li {
        min-height: 29px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
    }

    .arcade-button {
        transition: none;
    }
}

/* Viral challenge, daily leaderboard, and score-sharing additions */
.cabinet {
    gap: 11px;
    padding-block: clamp(13px, 1.8vw, 20px);
}

.marquee {
    padding-block: 7px 9px;
}

.score-value.score-long {
    font-size: clamp(1.18rem, 3.4vw, 2.35rem);
    letter-spacing: .035em;
}

.score-value.score-very-long {
    font-size: clamp(1rem, 2.9vw, 1.95rem);
    letter-spacing: .015em;
}

.challenge-banner {
    width: 100%;
    min-height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 11px;
    padding: 7px 13px;
    border: 2px solid #704f14;
    border-radius: 10px;
    color: #f8e6eb;
    background: linear-gradient(90deg, rgba(255,220,69,.08), rgba(227,19,47,.08));
    box-shadow: inset 0 0 16px rgba(255,220,69,.035);
    text-align: left;
}

.challenge-banner[hidden] {
    display: none;
}

.challenge-banner > div {
    display: grid;
    gap: 2px;
}

.challenge-banner strong {
    font-size: clamp(.75rem, 1.65vw, .94rem);
}

.challenge-banner span:not(.challenge-icon) {
    color: var(--muted);
    font-family: "Courier New", monospace;
    font-size: clamp(.62rem, 1.35vw, .76rem);
}

.challenge-banner.beaten {
    border-color: var(--score);
    background: linear-gradient(90deg, rgba(255,220,69,.15), rgba(65,139,75,.13));
}

.challenge-banner.beaten span:not(.challenge-icon) {
    color: var(--score);
}

.challenge-icon {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 31px;
    height: 31px;
    border: 2px solid #8a721d;
    border-radius: 50%;
    color: var(--score);
    background: #0b0905;
    font-family: "Courier New", monospace;
    font-size: .68rem;
    font-weight: 900;
    box-shadow: 0 0 12px rgba(255,220,69,.16);
}

.button-plinth {
    width: clamp(195px, 27vw, 275px);
}

.high-score-panel {
    padding: 10px 12px 11px;
}

.high-score-heading {
    padding-bottom: 7px;
    margin-bottom: 4px;
}

.leaderboard-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
    width: min(210px, 100%);
    margin: 5px auto 4px;
}

.leaderboard-tab {
    min-height: 25px;
    padding: 2px 5px;
    border: 1px solid #4e401a;
    border-radius: 5px;
    cursor: pointer;
    color: #9d8737;
    background: #121006;
    font-family: "Courier New", monospace;
    font-size: .61rem;
    font-weight: 900;
    letter-spacing: .06em;
}

.leaderboard-tab:hover,
.leaderboard-tab:focus-visible {
    border-color: var(--score);
    color: var(--score);
}

.leaderboard-tab.active {
    border-color: #8c741d;
    color: #100d03;
    background: var(--score);
    box-shadow: 0 0 10px rgba(255,220,69,.24);
}

.high-score-list li.is-you {
    margin-inline: -4px;
    padding-inline: 4px;
    border-radius: 4px;
    background: rgba(255,220,69,.085);
}

.high-score-list li.is-you .player-name::after {
    content: "•";
    margin-left: 3px;
    color: var(--score);
}

.challenge-tools {
    width: 100%;
    min-height: 48px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 7px 9px 7px 13px;
    border: 1px solid #51353e;
    border-radius: 10px;
    background: rgba(7,4,5,.4);
}

.achievement-readout {
    min-width: 0;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: baseline;
    gap: 1px 9px;
}

.achievement-label {
    color: #9e7e87;
    font-family: "Courier New", monospace;
    font-size: .59rem;
    font-weight: 900;
    letter-spacing: .1em;
}

.achievement-readout strong {
    overflow: hidden;
    color: var(--score);
    font-family: "Courier New", monospace;
    font-size: clamp(.73rem, 1.65vw, .94rem);
    letter-spacing: .03em;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-shadow: 0 0 8px rgba(255,220,69,.22);
}

.achievement-readout strong.legendary {
    color: #ff8998;
    text-shadow: 0 0 9px rgba(227,19,47,.55);
}

.achievement-readout strong.unlocked {
    animation: achievementUnlock .75s ease-out;
}

.achievement-readout small {
    grid-column: 1 / -1;
    overflow: hidden;
    color: var(--muted);
    font-size: .66rem;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.challenge-button {
    min-height: 32px;
    padding: 5px 11px;
    border: 2px solid #8b6f18;
    border-radius: 7px;
    cursor: pointer;
    color: #151003;
    background: linear-gradient(#ffe876, #e6bd27);
    font-family: "Courier New", monospace;
    font-size: .7rem;
    font-weight: 900;
    letter-spacing: .04em;
    box-shadow: 0 4px 0 #5c460c;
}

.challenge-button:hover,
.challenge-button:focus-visible {
    filter: brightness(1.08);
}

.challenge-button:active {
    transform: translateY(3px);
    box-shadow: 0 1px 0 #5c460c;
}

.share-card {
    position: relative;
    width: min(650px, 100%);
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 34px;
    height: 34px;
    border: 1px solid #67444e;
    border-radius: 50%;
    cursor: pointer;
    color: white;
    background: #160d10;
    font-size: 1.4rem;
    line-height: 1;
}

.modal-close:hover,
.modal-close:focus-visible {
    border-color: #ff8798;
    background: #2b1118;
}

.share-score-preview {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 2px 16px;
    margin: 16px 0;
    padding: 15px 18px;
    border: 3px solid #4d3d17;
    border-radius: 12px;
    background:
        radial-gradient(circle at 88% 50%, rgba(227,19,47,.22), transparent 30%),
        #080804;
    box-shadow: inset 0 0 20px rgba(255,220,69,.06);
}

.share-score-preview > span {
    grid-row: 1 / 3;
    color: white;
    font-family: "Courier New", monospace;
    font-size: clamp(2rem, 8vw, 4.2rem);
    font-weight: 900;
    letter-spacing: .08em;
}

.share-score-preview strong {
    overflow: hidden;
    color: var(--score);
    font-family: "Courier New", monospace;
    font-size: clamp(1.35rem, 5vw, 2.65rem);
    line-height: 1;
    white-space: nowrap;
    text-shadow: 0 0 12px rgba(255,220,69,.55);
}

.share-score-preview small {
    color: var(--muted);
    font-family: "Courier New", monospace;
    font-size: clamp(.68rem, 2vw, .88rem);
    font-weight: 900;
}

.share-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
}

.share-actions button {
    min-height: 43px;
    padding: 8px 10px;
    border: 2px solid #5b464d;
    border-radius: 7px;
    cursor: pointer;
    color: #f8e9ed;
    background: #251a1e;
    font-weight: 900;
    box-shadow: 0 4px 0 #090607;
}

.share-actions button:first-child {
    border-color: #35598c;
    background: #18325c;
}

.share-actions button:hover,
.share-actions button:focus-visible {
    filter: brightness(1.18);
}

.share-actions button:active {
    transform: translateY(3px);
    box-shadow: 0 1px 0 #090607;
}

.share-actions button:disabled {
    cursor: wait;
    opacity: .65;
}

.share-feedback {
    min-height: 1.35em;
    margin: 11px 0 0;
    color: var(--score) !important;
    font-family: "Courier New", monospace;
    font-size: .75rem;
    font-weight: 900;
    text-align: center;
}

@keyframes achievementUnlock {
    0% { transform: scale(1); filter: brightness(1); }
    45% { transform: scale(1.08); filter: brightness(2); }
    100% { transform: scale(1); filter: brightness(1); }
}

@media (max-width: 650px) {
    .cabinet {
        gap: 8px;
        padding-block: 10px;
    }

    .challenge-banner {
        min-height: 39px;
        padding: 5px 8px;
    }

    .challenge-icon {
        width: 27px;
        height: 27px;
        font-size: .6rem;
    }

    .challenge-banner strong {
        font-size: .68rem;
    }

    .challenge-banner span:not(.challenge-icon) {
        font-size: .58rem;
    }

    .button-plinth {
        width: min(43vw, 190px);
    }

    .high-score-panel {
        padding: 7px 6px 8px;
    }

    .leaderboard-tabs {
        gap: 3px;
        margin-block: 3px;
    }

    .leaderboard-tab {
        min-height: 22px;
        padding-inline: 2px;
        font-size: .52rem;
    }

    .challenge-tools {
        min-height: 43px;
        gap: 7px;
        padding: 5px 6px 5px 9px;
    }

    .achievement-readout {
        gap: 0 5px;
    }

    .achievement-label,
    .achievement-readout small {
        font-size: .53rem;
    }

    .achievement-readout strong {
        font-size: clamp(.58rem, 2.6vw, .75rem);
    }

    .challenge-button {
        min-height: 29px;
        padding: 4px 7px;
        font-size: .56rem;
    }

    .share-actions {
        grid-template-columns: 1fr;
    }

    .share-score-preview {
        gap: 2px 10px;
        padding: 11px 12px;
    }
}

@media (max-height: 700px) and (min-width: 651px) {
    .challenge-banner {
        min-height: 39px;
        padding-block: 5px;
    }

    .button-plinth {
        width: min(32vh, 235px);
    }

    .challenge-tools {
        min-height: 40px;
        padding-block: 4px;
    }

    .achievement-readout small {
        display: none;
    }
}

.challenge-button.attention {
    animation: challengeAttention .7s ease-in-out 3;
}

@keyframes challengeAttention {
    0%, 100% { transform: scale(1); filter: brightness(1); }
    50% { transform: scale(1.06); filter: brightness(1.28); box-shadow: 0 4px 0 #5c460c, 0 0 18px rgba(255,220,69,.52); }
}
