.bmx-page { margin: 0; background: #0c0a06; color: #fff5df; font-family: Archivo, Arial, sans-serif; }
.bmx-ranking { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(420px, calc(100% - 40px)); max-height: calc(100% - 48px); box-sizing: border-box; z-index: 9; padding: clamp(14px, 3vw, 28px); background: #16120d; border: 1px solid #645444; border-top: 3px solid #ff2b0a; border-radius: 14px; box-shadow: 0 16px 48px rgb(0 0 0 / 55%); overflow: auto; text-align: center; }
.bmx-ranking-backdrop { position: absolute; inset: 0; z-index: 8; background: rgb(0 0 0 / 50%); }
.bmx-ranking-backdrop[hidden] { display: none; }
.bmx-ranking[hidden] { display: none; }
.bmx-menu-actions { display: flex; flex-wrap: wrap; gap: 24px; justify-content: center; margin-top: 12px; }
.bmx-menu-actions button { min-width: 120px; padding: 14px 22px; border-radius: 6px; }
.bmx-ranking button { margin: 12px 8px 0; border-radius: 6px; }
.bmx-ranking li::marker { color: #ff2b0a; font-weight: bold; }
.bmx-ranking li:nth-child(-n + 3) { background: rgb(255 43 10 / 8%); }
.bmx-ranking li strong { color: #ffb75e; }
.bmx-ranking ol { text-align: left; max-width: 480px; margin: 16px auto; }
.bmx-ranking form:not([hidden]) { justify-content: center; }
.bmx-ranking h2 { margin: 0 0 12px; }
.bmx-ranking h2 { font-size: 24px; text-transform: uppercase; }
.bmx-ranking form:not([hidden]) { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.bmx-ranking input { width: 72px; padding: 10px; background: #17130e; color: #fff5df; border: 1px solid #645444; font-size: 24px; text-transform: uppercase; }
.bmx-ranking button { padding: 14px; background: #ff2b0a; color: white; border: 0; cursor: pointer; }
.bmx-ranking li { padding: 12px 8px; border-bottom: 1px solid #332a20; font-variant-numeric: tabular-nums; }
.bmx-ranking li span { letter-spacing: .2em; }
.bmx-ranking li strong { float: right; }
.bmx-shell { max-width: 1080px; margin: 0 auto; padding: 28px clamp(16px, 4vw, 48px) 36px; }
.bmx-heading { display: flex; justify-content: space-between; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.bmx-heading a { color: inherit; text-decoration: none; }
.bmx-heading span { color: #a69985; }
.bmx-title { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 32px 0 22px; }
.bmx-title p { color: #fc2709; font-size: 10px; font-weight: 700; letter-spacing: .23em; }
.bmx-title h1 { font-size: clamp(32px, 7vw, 72px); letter-spacing: -.07em; text-transform: uppercase; line-height: 1; margin: 0; }
.bmx-title h1 span { font-size: .25em; vertical-align: top; margin-left: 8px; color: #fc2709; }
.bmx-page button { color: inherit; background: transparent; border: 1px solid #645444; padding: 12px 18px; font: inherit; font-size: 12px; font-weight: 700; cursor: var(--cursor-pointer, pointer); }
.bmx-page button:hover { border-color: #fc2709; }
.bmx-page button:focus-visible, .bmx-heading a:focus-visible { outline: 2px solid #ffc74f; outline-offset: 4px; }
.bmx-page button:disabled { opacity: .35; }
.bmx-stage { position: relative; border: 1px solid #645444; background: #170e0c; overflow: hidden; }
.bmx-scoreboard { position: absolute; z-index: 2; top: 18px; left: 20px; right: 20px; display: flex; justify-content: space-between; font-family: monospace; text-transform: uppercase; font-size: clamp(10px, 1.5vw, 14px); color: #b5a592; }
.bmx-scoreboard b { color: #fff5df; margin-left: 8px; }
#bmx-canvas { display: block; width: 100%; aspect-ratio: 16 / 9; image-rendering: pixelated; background: #100f0e; }
.bmx-overlay { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 24px; background: rgb(12 10 6 / 70%); }
.bmx-overlay[hidden] { display: none; }
.bmx-overlay > p:first-child { color: #fc2709; font-size: 10px; letter-spacing: .22em; text-transform: uppercase; font-weight: 700; }
.bmx-overlay h2 { font-size: clamp(24px, 4vw, 44px); text-transform: uppercase; letter-spacing: -.05em; margin: 6px 0; }
.bmx-overlay p { font-size: 13px; line-height: 1.5; max-width: 360px; color: #cabda8; }
.bmx-overlay button { margin-top: 12px; background: #fc2709; color: white; border: 0; }
.bmx-controls { display: grid; grid-template-columns: 1fr; gap: 12px; margin-top: 14px; }
.bmx-controls button { touch-action: none; user-select: none; display: flex; align-items: center; justify-content: space-between; padding: 18px; }
.bmx-controls small { color: #9a8b77; font-size: 10px; font-weight: 400; }
.bmx-controls button:active { background: #fc2709; }
.bmx-footer { margin-top: 22px; display: flex; justify-content: space-between; gap: 12px; color: #a69985; font-size: 11px; line-height: 1.6; }
.bmx-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
@media (max-width: 560px) { .bmx-shell { padding-top: 20px; } .bmx-heading span, .bmx-footer span:last-child { display: none; } .bmx-overlay { padding: 30px 14px 10px; } .bmx-overlay p { font-size: 11px; margin: 5px 0; } .bmx-scoreboard { top: 10px; left: 12px; right: 12px; } .bmx-title { margin-top: 24px; } .bmx-controls button { padding: 16px 12px; } }
