.arcade-score-dialog {
    position: fixed;
    inset: 0;
    width: min(410px, calc(100% - 32px));
    max-height: calc(100% - 32px);
    margin: auto;
    overflow: auto;
    padding: 22px;
    border: 2px solid #201e22;
    border-radius: 15px;
    background: #fffef8;
    color: #201e22;
    box-shadow: 6px 6px 0 #201e22;
    color-scheme: light;
    font-family: system-ui, sans-serif;
}
.arcade-score-dialog::backdrop { background: #20172eb0; }
.arcade-score-dialog form { display: grid; gap: 12px; }
.arcade-score-dialog h2 { font-size: 1.45rem; font-weight: 800; line-height: 1.15; }
.arcade-score-dialog label { display: grid; gap: 4px; font-weight: 700; }
.arcade-score-dialog input[name="nickname"] { width: 100%; min-height: 44px; padding: 8px 10px; border: 1px solid #8b8095; border-radius: 6px; font-size: 16px; }
.arcade-score-dialog [data-score-feedback]:empty { display: none; }
.arcade-score-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.arcade-score-actions button { min-height: 44px; padding: 6px 12px; border: 1px solid #201e22; border-radius: 7px; background: #ddf985; cursor: pointer; font: inherit; font-weight: 750; }
.arcade-score-actions [data-score-close] { background: #fffef8; }
.arcade-score-actions button:disabled { opacity: .55; cursor: default; }
.arcade-score-dialog a { width: fit-content; text-decoration: underline; }
.arcade-page { background: #f5f1fa; }
.arcade-page .top { background: var(--paper); }
.arcade-back { min-height: 44px; font-size: .87rem; }
.arcade-board { padding-block: clamp(25px, 6vw, 68px) 24px; }

.arcade-marquee {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    align-items: center;
    min-height: 280px;
    overflow: hidden;
    border: 2px solid #201829;
    border-radius: 18px;
    background: radial-gradient(#ffffff19 1px, transparent 1px) 0 0 / 15px 15px, #292137;
    color: #fffef8;
    box-shadow: 6px 6px 0 #a88add;
}
.arcade-marquee-copy { padding: clamp(18px, 5vw, 60px); }
.arcade-marquee h1 { font-size: clamp(2.4rem, 7vw, 6rem); line-height: .95; }
.arcade-marquee .period { color: var(--lime); }
.arcade-marquee p { margin-top: 15px; color: #e4d9f4; }
.arcade-marquee-lights { display: flex; gap: 5px; margin-bottom: 15px; }
.arcade-marquee-lights i { width: 8px; height: 8px; background: #ffab91; }
.arcade-marquee-lights i:nth-child(2) { background: #dcd0fc; }
.arcade-marquee-lights i:nth-child(3) { background: var(--lime); }
.arcade-marquee-art { position: relative; height: 100%; min-height: 220px; }
.arcade-trophy {
    position: absolute;
    top: 50%;
    left: 50%;
    width: min(48%, 176px);
    aspect-ratio: 1;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #fff0a1 45%, #ffd36a 45% 70%, #f5ac50 70%);
    clip-path: polygon(25% 7%, 75% 7%, 75% 17%, 95% 17%, 95% 42%, 85% 42%, 85% 52%, 71% 52%, 71% 62%, 58% 62%, 58% 78%, 72% 78%, 72% 91%, 28% 91%, 28% 78%, 42% 78%, 42% 62%, 29% 62%, 29% 52%, 15% 52%, 15% 42%, 5% 42%, 5% 17%, 25% 17%);
}
.arcade-pixel { position: absolute; width: clamp(12px, 3vw, 28px); height: auto; }
.arcade-pixel--spark { left: 18%; top: 20%; color: var(--lime); }
.arcade-pixel--heart { right: 16%; top: 24%; color: #ffab91; }
.arcade-pixel--block { right: 22%; bottom: 19%; color: #dcd0fc; }
.arcade-art-scene { position: absolute; bottom: 10%; }
.arcade-art-scene--left { left: 7%; }
.arcade-art-scene--right { right: 4%; }
.arcade-art-scene svg { width: clamp(42px, 8vw, 88px); height: auto; }

.arcade-board-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; gap: 15px; margin-top: 28px; }
.arcade-board-card {
    --board-accent: #ddf985;
    min-width: 0;
    overflow: hidden;
    border: 2px solid #292137;
    border-radius: 12px;
    background: #fffef8;
    box-shadow: 3px 3px 0 #d7cbe5;
}
.arcade-board-card:nth-child(2) { --board-accent: #ffceb9; }
.arcade-board-card:nth-child(3) { --board-accent: #dcd0fc; }
.arcade-card-header { display: flex; align-items: center; gap: 5px; min-height: 70px; padding: 8px 12px; background: var(--board-accent); border-bottom: 2px solid #292137; }
.arcade-card-scene { flex: 0 0 52px; }
.arcade-card-scene svg { width: 52px; height: auto; }
.arcade-board-card h2 { font-size: clamp(1.1rem, 2.3vw, 1.5rem); }
.arcade-board-card table { width: 100%; border-collapse: collapse; text-align: left; font-size: .92rem; }
.arcade-board-card th, .arcade-board-card td { padding: 8px 7px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.arcade-board-card :is(td, th):first-child { padding-left: 12px; }
.arcade-board-card :is(td, th):last-child { padding-right: 12px; text-align: right; }
.arcade-board-card th { font: 700 .72rem var(--mono); text-transform: uppercase; }
.arcade-board-card tbody tr:last-child td { border-bottom: 0; }
.arcade-board-card td:last-child { font: 750 .93rem var(--mono); white-space: nowrap; }
.arcade-rank { display: inline-grid; place-items: center; width: 26px; height: 26px; font: 700 .79rem var(--mono); }
.arcade-podium td { font-weight: 750; }
.arcade-podium .arcade-rank { background: #f7d978; border-radius: 5px; }
.arcade-podium:nth-child(2) .arcade-rank { background: #e1daec; }
.arcade-podium:nth-child(3) .arcade-rank { background: #f5c2a2; }
.arcade-empty { display: grid; justify-items: center; gap: 8px; padding: 23px 12px; text-align: center; color: var(--muted); font-size: .86rem; }
.arcade-empty svg { color: #69538a; }

@media (max-width: 850px) {
    .arcade-board-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 540px) {
    .arcade-page .top-inner { min-height: 58px; gap: 8px; }
    .arcade-marquee { grid-template-columns: minmax(0, 1fr) minmax(0, .45fr); min-height: 0; box-shadow: 4px 4px 0 #a88add; }
    .arcade-marquee-art { min-height: 0; }
    .arcade-trophy { width: 78%; }
    .arcade-art-scene--left { display: none; }
    .arcade-pixel--block { display: none; }
    .arcade-marquee p { margin-top: 10px; font-size: .9rem; }
    .arcade-board-grid { margin-top: 19px; }
}
.footer .arcade-score-link { color: var(--muted); font-size: .85rem; }

.arcade-score-remember input { accent-color: #6245a4; }

.arcade-record-option { padding: 10px; border: 1px solid #d3c3e3; border-radius: 8px; background: #f2eafa; }
.arcade-record-option input { width: 100%; min-height: 44px; padding: 8px 10px; border: 1px solid #8b8095; border-radius: 6px; background: #fffef8; font-size: 16px; }
.arcade-record-option p { margin-top: 4px; color: #523e64; font-size: .84rem; }
