/* Arcade kit — the frame around every game on the games host.
 *
 * The canvas draws the game; this sheet draws everything else: the bar, the
 * CRT glass over the table and the menus. A game adds its own sheet only for
 * what no other game has. The four colour sets mirror THEMES in js/themes.js,
 * so a menu always matches the table behind it.
 */

.arcade {
    --bar-h: 52px;
    --p1: #f2f2f2;
    --p2: #ffd84d;
    --p3: #6fd6ff;
    --p4: #ff7aa8;
    --bg: #040406;
    --panel: rgba(8, 8, 12, 0.94);
    --fg: #f2f2f2;
    --dim: #8b8b98;
    --line: rgba(242, 242, 242, 0.22);
    --left: #f2f2f2;
    --right: #f2f2f2;
    --wild: #ffd84d;
    --good: #7dff9b;
    --bad: #ff5c7a;
    --glow: rgba(255, 255, 255, 0.45);
    --pixel: 'Press Start 2P', ui-monospace, 'Courier New', monospace;
    --text: 'VT323', ui-monospace, 'Courier New', monospace;
}

.arcade[data-theme="phosphor"] {
    --p1: #4dff88;
    --p2: #d4ff5c;
    --p3: #2fe0c4;
    --p4: #b6ffd0;
    --bg: #010502;
    --panel: rgba(1, 10, 4, 0.94);
    --fg: #4dff88;
    --dim: #2f9c58;
    --line: rgba(77, 255, 136, 0.25);
    --left: #4dff88;
    --right: #b6ffd0;
    --wild: #b6ffd0;
    --good: #b6ffd0;
    --bad: #ffe45c;
    --glow: rgba(77, 255, 136, 0.6);
}

.arcade[data-theme="amber"] {
    --p1: #ffb31a;
    --p2: #fff0c2;
    --p3: #ff6a3d;
    --p4: #ffd36b;
    --bg: #060300;
    --panel: rgba(14, 8, 0, 0.94);
    --fg: #ffb31a;
    --dim: #a97414;
    --line: rgba(255, 179, 26, 0.25);
    --left: #ffb31a;
    --right: #ffe2a3;
    --wild: #ffe2a3;
    --good: #fff0c2;
    --bad: #ff6a3d;
    --glow: rgba(255, 179, 26, 0.55);
}

.arcade[data-theme="synthwave"] {
    --p1: #22e6ff;
    --p2: #ff3fd2;
    --p3: #ffe95c;
    --p4: #62ffb0;
    --bg: #07000f;
    --panel: rgba(16, 2, 30, 0.94);
    --fg: #f6e8ff;
    --dim: #a584c8;
    --line: rgba(160, 110, 255, 0.35);
    --left: #22e6ff;
    --right: #ff3fd2;
    --wild: #ffe95c;
    --good: #62ffb0;
    --bad: #ff4f6d;
    --glow: rgba(255, 63, 210, 0.5);
}

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

html,
body {
    height: 100%;
    margin: 0;
}

body.arcade {
    background: var(--bg);
    color: var(--fg);
    font-family: var(--text);
    font-size: 22px;
    line-height: 1.2;
    overflow: hidden;
    overscroll-behavior: none;
    -webkit-tap-highlight-color: transparent;
    -webkit-font-smoothing: none;
}

.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.arcade :focus {
    outline: none;
}

.arcade :focus-visible {
    outline: 2px dashed var(--wild);
    outline-offset: 3px;
}

button {
    font: inherit;
    color: inherit;
}

/* The pointer: pixel pictures in the theme's colours, which js/cursor.js
   puts on the body as --cur-*; the system cursor stands in until then. */
body.arcade {
    cursor: var(--cur-arrow, default);
}

.arcade a[href],
.arcade button,
.arcade summary,
.arcade select,
.arcade input[type="checkbox"],
.arcade input[type="radio"],
.arcade input[type="range"],
.arcade [role="button"] {
    cursor: var(--cur-hand, pointer);
}

.arcade input:not([type="range"], [type="checkbox"], [type="radio"], [type="button"], [type="submit"]),
.arcade textarea {
    cursor: var(--cur-text, text);
}

.arcade button:disabled,
.arcade input:disabled {
    cursor: var(--cur-arrow, not-allowed);
}

kbd {
    display: inline-block;
    min-width: 1.6em;
    padding: 0 0.35em;
    border: 2px solid var(--line);
    border-bottom-width: 4px;
    font-family: var(--text);
    text-align: center;
    line-height: 1.1;
}

/* ---- app shell ------------------------------------------------------- */

.arcade-app {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

.arcade-bar {
    flex: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    height: var(--bar-h);
    padding: 0 16px;
    border-bottom: 2px solid var(--line);
    background: var(--bg);
    position: relative;
    z-index: 30;
}

.arcade-bar-back {
    font-family: var(--pixel);
    font-size: 11px;
    color: var(--dim);
    text-decoration: none;
    padding: 10px 0;
    white-space: nowrap;
}

.arcade-bar-back:hover {
    color: var(--fg);
}

.arcade-bar-title {
    font-family: var(--pixel);
    font-size: 14px;
    letter-spacing: 0.3em;
    text-shadow: 0 0 8px var(--glow);
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    pointer-events: none;
}

.arcade-bar-actions {
    display: flex;
    gap: 6px;
}

.arcade-icon-btn {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 2px solid var(--line);
    background: transparent;
    color: var(--fg);
    cursor: var(--cur-hand, pointer);
}

.arcade-icon-btn svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
    shape-rendering: crispEdges;
}

.arcade-icon-btn:hover {
    border-color: var(--fg);
    box-shadow: 0 0 10px var(--glow);
}

.arcade-icon-btn[hidden] {
    display: none;
}

.arcade-icon-btn .arcade-sound-off,
.arcade-icon-btn[aria-pressed="true"] .arcade-sound-on {
    display: none;
}

.arcade-icon-btn[aria-pressed="true"] .arcade-sound-off {
    display: inline;
}

.arcade-icon-btn[aria-pressed="true"] {
    color: var(--bad);
}

/* The pause button only means something during a match. */
.arcade-app[data-mode="attract"] [data-arcade-action="pause"],
.arcade-app[data-mode="over"] [data-arcade-action="pause"] {
    visibility: hidden;
}

.arcade-stage {
    position: relative;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.arcade-stage canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}

/* A game asks for another pointer over the table with shell.setCursor(). */
.arcade-stage[data-cursor="hand"] canvas {
    cursor: var(--cur-hand, pointer);
}

.arcade-stage[data-cursor="aim"] canvas {
    cursor: var(--cur-aim, crosshair);
}

/* During a match on the keys, until the mouse moves again (js/shell.js). */
.arcade-stage.is-playing.is-keys canvas {
    cursor: none;
}

/* ---- the glass ------------------------------------------------------- */

.arcade-crt {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        repeating-linear-gradient(to bottom, transparent 0 2px, rgba(0, 0, 0, 0.28) 2px 3px),
        radial-gradient(ellipse at center, transparent 58%, rgba(0, 0, 0, 0.6) 100%);
    opacity: 0.55;
}

.arcade-crt::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(255, 255, 255, 0.035) 48%, rgba(255, 255, 255, 0.06) 50%, transparent 52%);
    background-size: 100% 300%;
    animation: arcade-roll 7s linear infinite;
    opacity: 0;
}

.arcade[data-crt="off"] .arcade-crt {
    display: none;
}

.arcade[data-crt="full"] .arcade-crt {
    opacity: 1;
    animation: arcade-flicker 5s steps(1) infinite;
}

.arcade[data-crt="full"] .arcade-crt::after {
    opacity: 1;
}

.arcade[data-crt="full"] .arcade-stage canvas {
    filter: contrast(1.08) saturate(1.1);
}

@keyframes arcade-roll {
    from { background-position: 0 0; }
    to { background-position: 0 -300%; }
}

@keyframes arcade-flicker {
    0%, 100% { opacity: 1; }
    47% { opacity: 0.92; }
    48% { opacity: 1; }
    83% { opacity: 0.95; }
    84% { opacity: 1; }
}

.arcade-toast {
    position: absolute;
    left: 50%;
    bottom: 20px;
    transform: translate(-50%, 12px);
    padding: 8px 14px;
    border: 2px solid var(--fg);
    background: var(--panel);
    font-family: var(--pixel);
    font-size: 10px;
    line-height: 1.5;
    text-align: center;
    /* One line while it fits, wrapped on a phone instead of cut off. */
    width: max-content;
    max-width: calc(100% - 32px);
    opacity: 0;
    transition: opacity 0.15s, transform 0.15s;
    pointer-events: none;
    z-index: 5;
}

.arcade-toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* ---- screens ---------------------------------------------------------- */

.arcade-screens {
    position: fixed;
    top: calc(var(--bar-h) + env(safe-area-inset-top));
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 20;
    overflow-y: auto;
    overscroll-behavior: contain;
    display: flex;
    padding: 24px 16px calc(24px + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--bg) 45%, transparent);
}

.arcade-screens[hidden] {
    display: none;
}

.arcade-screens > * {
    margin: auto;
}

.arcade-screens[data-screen="pause"],
.arcade-screens[data-screen="results"] {
    background: color-mix(in srgb, var(--bg) 62%, transparent);
}

/* Title */

.arcade-title {
    width: min(460px, 100%);
    text-align: center;
}

.arcade-logo {
    margin: 0 0 12px;
    font-family: var(--pixel);
    font-weight: 400;
    font-size: clamp(52px, 17vw, 112px);
    line-height: 1;
    letter-spacing: 0.06em;
    color: var(--fg);
    text-shadow: 0 0 18px var(--glow), 0 0 2px var(--fg);
    display: flex;
    justify-content: center;
}

.arcade-logo span {
    display: inline-block;
    animation: arcade-hop 3.2s ease-in-out infinite;
}

.arcade-logo span:first-child { color: var(--left); }
.arcade-logo span:last-child { color: var(--right); }
.arcade-logo span:nth-child(2) { animation-delay: 0.12s; }
.arcade-logo span:nth-child(3) { animation-delay: 0.24s; }
.arcade-logo span:nth-child(4) { animation-delay: 0.36s; }
.arcade-logo span:nth-child(5) { animation-delay: 0.48s; }
.arcade-logo span:nth-child(6) { animation-delay: 0.6s; }

@keyframes arcade-hop {
    0%, 70%, 100% { transform: translateY(0); }
    78% { transform: translateY(-0.12em); }
    86% { transform: translateY(0); }
    90% { transform: translateY(-0.04em); }
}

.arcade-tagline {
    margin: 0 0 24px;
    color: var(--dim);
    font-size: 22px;
}

.arcade-foot {
    margin: 20px 0 0;
    color: var(--dim);
    font-size: 18px;
    animation: arcade-blink 1.4s steps(1) infinite;
}

@keyframes arcade-blink {
    0%, 60% { opacity: 1; }
    61%, 100% { opacity: 0.35; }
}

.arcade-menu {
    display: grid;
    gap: 10px;
    width: min(340px, 100%);
    margin: 0 auto;
}

/* Buttons */

.arcade-btn {
    position: relative;
    display: block;
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--line);
    background: rgba(0, 0, 0, 0.45);
    color: var(--fg);
    font-family: var(--pixel);
    font-size: 12px;
    line-height: 1.4;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: var(--cur-hand, pointer);
    transition: background 0.08s, color 0.08s, box-shadow 0.08s;
}

.arcade-btn.is-primary {
    border-color: var(--fg);
    box-shadow: 0 0 12px var(--glow);
}

.arcade-btn:hover,
.arcade-btn:focus-visible {
    background: var(--fg);
    color: var(--bg);
    border-color: var(--fg);
    outline: none;
}

.arcade-btn:focus-visible::before {
    content: '';
    position: absolute;
    left: -22px;
    top: 50%;
    border: 7px solid transparent;
    border-left: 9px solid var(--fg);
    transform: translateY(-50%);
    animation: arcade-blink 0.8s steps(1) infinite;
}

.arcade-btn:active {
    transform: translateY(2px);
}

.arcade-btn.is-danger,
.arcade-btn.is-danger:hover {
    border-color: var(--bad);
    background: var(--bad);
    color: var(--bg);
}

/* Panels */

.arcade-panel {
    width: min(560px, 100%);
    border: 2px solid var(--fg);
    background: var(--panel);
    box-shadow: 0 0 0 4px var(--bg), 0 0 0 6px var(--line), 0 0 28px var(--glow);
    padding: 20px;
}

.arcade-panel.is-wide {
    width: min(760px, 100%);
}

.arcade-panel-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 2px dashed var(--line);
}

.arcade-panel-head h2 {
    margin: 0;
    font-family: var(--pixel);
    font-weight: 400;
    font-size: clamp(15px, 4.4vw, 22px);
    line-height: 1.3;
    text-shadow: 0 0 10px var(--glow);
    text-transform: uppercase;
}

.arcade-kicker {
    margin: 0 0 6px;
    color: var(--dim);
    font-size: 20px;
}

.arcade-back-btn {
    flex: none;
    width: 40px;
    height: 40px;
    border: 2px solid var(--line);
    background: transparent;
    font-family: var(--pixel);
    font-size: 14px;
    cursor: var(--cur-hand, pointer);
}

.arcade-back-btn:hover {
    border-color: var(--fg);
    background: var(--fg);
    color: var(--bg);
}

.arcade-panel-body h3 {
    margin: 22px 0 10px;
    font-family: var(--pixel);
    font-weight: 400;
    font-size: 11px;
    color: var(--dim);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.arcade-note {
    margin: 8px 0;
    font-size: 21px;
}

.arcade-note.is-dim {
    color: var(--dim);
}

.arcade-note:empty {
    display: none;
}

.arcade-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.arcade-actions .arcade-btn {
    width: auto;
    flex: 1 1 150px;
}

/* Setting rows */

.arcade-row {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    align-items: center;
    gap: 6px 16px;
    padding: 9px 0;
    border-bottom: 1px solid var(--line);
}

.arcade-row-label {
    font-family: var(--pixel);
    font-size: 10px;
    line-height: 1.5;
    color: var(--dim);
    text-transform: uppercase;
}

.arcade-row-hint {
    grid-column: 2;
    color: var(--dim);
    font-size: 19px;
}

.arcade-seg,
.arcade-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.arcade-seg-btn,
.arcade-chip {
    min-height: 36px;
    padding: 8px 11px;
    border: 2px solid var(--line);
    background: transparent;
    font-family: var(--pixel);
    font-size: 10px;
    line-height: 1.3;
    cursor: var(--cur-hand, pointer);
    text-transform: uppercase;
}

.arcade-seg-btn:hover,
.arcade-chip:hover {
    border-color: var(--fg);
}

.arcade-seg-btn[aria-pressed="true"],
.arcade-chip[aria-pressed="true"] {
    background: var(--fg);
    border-color: var(--fg);
    color: var(--bg);
    box-shadow: 0 0 10px var(--glow);
}

.arcade-slider {
    display: flex;
    align-items: center;
    gap: 14px;
}

.arcade-slider output {
    flex: none;
    min-width: 7.5em;
    font-size: 22px;
    white-space: nowrap;
}

.arcade input[type="range"] {
    flex: 1;
    min-width: 0;
    height: 30px;
    margin: 0;
    background: transparent;
    -webkit-appearance: none;
    appearance: none;
    cursor: var(--cur-hand, pointer);
}

.arcade input[type="range"]::-webkit-slider-runnable-track {
    height: 8px;
    background: repeating-linear-gradient(to right, var(--line) 0 6px, transparent 6px 8px);
    border: 0;
}

.arcade input[type="range"]::-moz-range-track {
    height: 8px;
    background: repeating-linear-gradient(to right, var(--line) 0 6px, transparent 6px 8px);
    border: 0;
}

.arcade input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 26px;
    margin-top: -9px;
    background: var(--fg);
    border: 0;
    border-radius: 0;
    box-shadow: 0 0 10px var(--glow);
}

.arcade input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 26px;
    background: var(--fg);
    border: 0;
    border-radius: 0;
    box-shadow: 0 0 10px var(--glow);
}

.arcade input[type="range"]:focus-visible {
    outline: 2px dashed var(--wild);
    outline-offset: 2px;
}

/* Text fields */

.arcade-input {
    width: 100%;
    min-height: 40px;
    padding: 8px 12px;
    border: 2px solid var(--line);
    background: rgba(0, 0, 0, 0.5);
    color: var(--fg);
    font-family: var(--pixel);
    font-size: 12px;
    letter-spacing: 0.06em;
    border-radius: 0;
    caret-color: var(--wild);
}

.arcade-input::placeholder {
    color: var(--dim);
}

.arcade-input.is-upper {
    text-transform: uppercase;
}

.arcade-input:focus,
.arcade-input:focus-visible {
    border-color: var(--fg);
    box-shadow: 0 0 10px var(--glow);
    outline: none;
}

/* Buttons that cannot be used yet */

.arcade-btn:disabled,
.arcade-btn:disabled:hover {
    opacity: 0.4;
    background: transparent;
    color: var(--fg);
    border-color: var(--line);
    cursor: var(--cur-arrow, not-allowed);
}

.arcade-note.is-warn {
    color: var(--bad);
}

/* Player colours: a swatch, and the same as a background class */

.arcade-swatch {
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-right: 8px;
    vertical-align: -1px;
    box-shadow: 0 0 6px currentColor;
}

.is-p1 { color: var(--p1); }
.is-p2 { color: var(--p2); }
.is-p3 { color: var(--p3); }
.is-p4 { color: var(--p4); }
.arcade-swatch.is-p1 { background: var(--p1); }
.arcade-swatch.is-p2 { background: var(--p2); }
.arcade-swatch.is-p3 { background: var(--p3); }
.arcade-swatch.is-p4 { background: var(--p4); }

/* The opponent block */

.arcade-opponent {
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
}

.arcade-opponent .arcade-row {
    border-bottom: 0;
}

.arcade-traits {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 6px 22px;
    margin: 10px 0 4px;
}

.arcade-trait {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 20px;
}

.arcade-cells {
    display: flex;
    gap: 3px;
}

.arcade-cells i {
    width: 9px;
    height: 12px;
    background: var(--line);
    transition: background 0.1s;
}

.arcade-cells i.on {
    background: var(--fg);
    box-shadow: 0 0 6px var(--glow);
}

.arcade-cells i.on:nth-child(n + 8) {
    background: var(--wild);
}

/* Results */

.arcade-final {
    display: flex;
    justify-content: center;
    align-items: baseline;
    gap: 0.4em;
    margin: 4px 0 10px;
    font-family: var(--pixel);
    font-size: clamp(40px, 12vw, 72px);
    line-height: 1;
    text-shadow: 0 0 18px var(--glow);
}

.arcade-final .is-left { color: var(--left); }
.arcade-final .is-right { color: var(--right); }
.arcade-final-dash { color: var(--dim); font-size: 0.6em; }

.arcade-timeline {
    display: grid;
    grid-template-rows: 12px 12px;
    grid-auto-flow: column;
    grid-auto-columns: 12px;
    gap: 3px;
    justify-content: center;
    margin: 14px 0 18px;
    overflow-x: auto;
    padding-bottom: 2px;
}

.arcade-timeline i {
    display: block;
    width: 12px;
    height: 12px;
}

.arcade-timeline i.is-left {
    grid-row: 1;
    background: var(--left);
}

.arcade-timeline i.is-right {
    grid-row: 2;
    background: var(--right);
    opacity: 0.85;
}

/* One row of results, one square per round, in the winner's colour */

.arcade-timeline.is-rounds {
    grid-template-rows: 12px;
}

.arcade-timeline.is-rounds i {
    grid-row: 1;
    background: var(--line);
}

.arcade-timeline.is-rounds i.is-p1 { background: var(--p1); }
.arcade-timeline.is-rounds i.is-p2 { background: var(--p2); }
.arcade-timeline.is-rounds i.is-p3 { background: var(--p3); }
.arcade-timeline.is-rounds i.is-p4 { background: var(--p4); }

.arcade-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 8px;
    margin: 0;
}

.arcade-stats div {
    padding: 8px 10px;
    border: 2px solid var(--line);
}

.arcade-stats dt {
    font-size: 18px;
    color: var(--dim);
}

.arcade-stats dd {
    margin: 2px 0 0;
    font-family: var(--pixel);
    font-size: 13px;
    line-height: 1.5;
}

.arcade-score-line {
    margin: 0 0 18px;
    text-align: center;
    font-size: 24px;
}

.arcade-score-line strong {
    font-family: var(--pixel);
    font-weight: 400;
    font-size: 20px;
    padding: 0 6px;
}

/* Tables and lists */

.arcade-table-wrap {
    overflow-x: auto;
}

.arcade-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 21px;
}

.arcade-table th,
.arcade-table td {
    padding: 6px 8px;
    border-bottom: 1px solid var(--line);
    text-align: right;
    white-space: nowrap;
}

.arcade-table th:first-child,
.arcade-table td.is-name {
    text-align: left;
}

.arcade-table tr.is-you td,
.arcade-table tr.is-you th {
    color: var(--wild);
}

.arcade-table thead th {
    font-family: var(--pixel);
    font-weight: 400;
    font-size: 9px;
    color: var(--dim);
    text-transform: uppercase;
}

.arcade-keys th,
.arcade-keys td {
    text-align: left;
    white-space: normal;
}

.arcade-keys th {
    width: 32%;
    color: var(--dim);
    font-weight: 400;
}

.arcade-list,
.arcade-powerups,
.arcade-recent {
    margin: 0;
    padding: 0;
    list-style: none;
}

.arcade-list li {
    position: relative;
    padding: 3px 0 3px 22px;
}

.arcade-list li::before {
    content: '';
    position: absolute;
    left: 2px;
    top: 0.55em;
    width: 8px;
    height: 8px;
    background: var(--fg);
}

.arcade-powerups {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 10px 18px;
}

.arcade-powerups li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.arcade-powerups strong {
    font-family: var(--pixel);
    font-weight: 400;
    font-size: 10px;
    margin-right: 4px;
}

.arcade-icon {
    flex: none;
    width: 34px;
    height: 34px;
    shape-rendering: crispEdges;
    filter: drop-shadow(0 0 4px currentColor);
}

.arcade-recent li {
    display: grid;
    grid-template-columns: 5.5em minmax(0, 1fr) auto;
    gap: 12px;
    padding: 4px 0;
    border-bottom: 1px solid var(--line);
}

.arcade-recent li span:first-child,
.arcade-recent li span:last-child {
    color: var(--dim);
}

/* No script */

.arcade-noscript {
    position: fixed;
    inset: var(--bar-h) 0 0;
    display: grid;
    place-content: center;
    padding: 24px 16px;
    text-align: center;
    background: var(--bg);
    z-index: 40;
}

.arcade-noscript h1 {
    font-family: var(--pixel);
    font-weight: 400;
    font-size: 48px;
    margin: 0 0 16px;
}

.arcade-noscript p {
    max-width: 30em;
    margin: 8px auto;
}

.arcade-noscript a {
    color: var(--fg);
}

/* ---- small screens ---------------------------------------------------- */

@media (max-width: 560px) {
    .arcade-bar {
        padding: 0 12px;
    }

    .arcade-bar-title {
        display: none;
    }

    .arcade-panel {
        padding: 16px 14px;
    }

    .arcade-row {
        grid-template-columns: minmax(0, 1fr);
    }

    .arcade-row-hint {
        grid-column: 1;
    }

    .arcade-slider output {
        min-width: 0;
    }

    .arcade-btn:focus-visible::before {
        display: none;
    }

    .arcade-seg-btn,
    .arcade-chip {
        flex: 1 1 auto;
    }
}

@media (max-height: 460px) and (orientation: landscape) {
    .arcade {
        --bar-h: 40px;
    }

    .arcade-icon-btn {
        width: 32px;
        height: 32px;
    }

    .arcade-logo {
        font-size: clamp(36px, 12vh, 64px);
    }

    .arcade-tagline {
        margin-bottom: 12px;
    }

    .arcade-menu {
        grid-template-columns: 1fr 1fr;
        width: min(560px, 100%);
    }
}

/* ---- motion ------------------------------------------------------------ */

.arcade[data-motion="reduced"] *,
.arcade[data-motion="reduced"] *::before,
.arcade[data-motion="reduced"] *::after {
    animation: none !important;
    transition: none !important;
}
