:root {
    --sz-bg: #0a0f14;
    --sz-primary: #0f1419;
    --sz-secondary: #4b5563;
    --sz-accent: #ff1744;
    --sz-ink: #e7e5e4;
    --sz-muted: #9ca3af;
    --sz-display: "Press Start 2P", monospace;
    --sz-body: "Courier New", Courier, monospace;
    --sz-header: 64px;
}

* { box-sizing: border-box; }
html { overflow-x: clip; }
body {
    margin: 0;
    background: var(--sz-bg);
    color: var(--sz-ink);
    font-family: var(--sz-body);
    font-size: 17px;
    line-height: 1.55;
    min-height: 100vh;
}
img { max-width: 100%; height: auto; }
a { color: var(--sz-accent); }
button, input { font-family: inherit; }
h1, h2, h3 {
    font-family: var(--sz-display);
    font-weight: 400;
    line-height: 1.45;
    letter-spacing: 0;
}
h1 { font-size: 1.15rem; }
h2 { font-size: 0.95rem; }
h3 { font-size: 0.72rem; }

.sz-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: var(--sz-primary);
    border-bottom: 4px solid var(--sz-secondary);
    box-shadow: 0 4px 0 #1f2933, 0 8px 0 #111827;
}
.sz-header__bar {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
    min-height: var(--sz-header);
    display: flex;
    align-items: center;
    gap: 16px;
}
.sz-header__brand {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
}
.sz-header__brand img { width: 176px; height: auto; }
.sz-nav {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}
.sz-nav a {
    color: var(--sz-ink);
    text-decoration: none;
    white-space: nowrap;
    font-size: 0.95rem;
}
.sz-nav a.is-active { color: var(--sz-accent); }
.sz-header__tools {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    flex-shrink: 0;
}
#authButtons { display: flex; align-items: center; gap: 8px; }
.sz-header__account {
    display: none;
    color: var(--sz-ink);
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    font-size: 0.95rem;
}
.sz-header__tools:has(#authButtons[style*="none"]) .sz-header__account {
    display: inline-flex;
}

.sz-burger {
    width: 44px;
    height: 44px;
    margin-left: 8px;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    background: transparent;
    border: 2px solid var(--sz-accent);
    cursor: pointer;
    flex-shrink: 0;
}
.sz-burger span {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--sz-accent);
}

.sz-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 50;
}
.sz-overlay:not([hidden]) { display: block; }

.sz-drawer {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 80%;
    max-width: 340px;
    z-index: 60;
    background: var(--sz-primary);
    box-shadow: -8px 0 0 #1f2933, -12px 0 0 #111827;
    flex-direction: column;
    overflow-y: auto;
    padding: 16px;
}
.sz-drawer:not([hidden]) { display: flex; }
.sz-drawer__top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.sz-drawer__label { font-family: var(--sz-display); font-size: 0.65rem; }
.sz-drawer__close {
    width: 44px;
    height: 44px;
    background: var(--sz-accent);
    color: #fff;
    border: 0;
    cursor: pointer;
    font-family: var(--sz-display);
}
.sz-drawer__list { list-style: none; margin: 16px 0; padding: 0; }
.sz-drawer__list a {
    display: block;
    padding: 14px 8px;
    color: var(--sz-ink);
    text-decoration: none;
    border-bottom: 2px solid var(--sz-secondary);
}
.sz-drawer__list a.is-active { color: var(--sz-accent); }
.sz-drawer__auth { display: flex; flex-direction: column; gap: 10px; }
.sz-drawer__auth a { color: var(--sz-ink); }

.sz-main { width: min(1120px, calc(100% - 32px)); margin: 0 auto; padding: 28px 0 64px; }

.sz-btn {
    display: inline-block;
    padding: 12px 16px;
    min-height: 44px;
    background: var(--sz-accent);
    color: #fff;
    border: 0;
    cursor: pointer;
    text-decoration: none;
    font-family: var(--sz-display);
    font-size: 0.62rem;
    line-height: 1.4;
    clip-path: polygon(0 8px, 4px 8px, 4px 4px, 8px 4px, 8px 0, calc(100% - 8px) 0, calc(100% - 8px) 4px, calc(100% - 4px) 4px, calc(100% - 4px) 8px, 100% 8px, 100% calc(100% - 8px), calc(100% - 4px) calc(100% - 8px), calc(100% - 4px) calc(100% - 4px), calc(100% - 8px) calc(100% - 4px), calc(100% - 8px) 100%, 8px 100%, 8px calc(100% - 4px), 4px calc(100% - 4px), 4px calc(100% - 8px), 0 calc(100% - 8px));
}
.sz-btn--tiny { font-size: 0.5rem; padding: 10px 12px; }
.sz-header__tools .sz-btn { color: #fff; }

.sz-hero { margin-bottom: 8px; }
.sz-band { margin-top: 42px; }
.sz-band__head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 16px;
}
.sz-band__head h2 { margin: 0; }
.sz-band__head a { white-space: nowrap; }
.sz-grid--trio { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sz-hero__kicker { color: var(--sz-muted); margin: 0 0 8px; font-size: 0.95rem; }
.sz-hero p { max-width: 62ch; }

.sz-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 18px; }
.sz-filters button {
    min-height: 44px;
    padding: 8px 12px;
    background: var(--sz-primary);
    color: var(--sz-ink);
    border: 2px solid var(--sz-secondary);
    cursor: pointer;
}
.sz-filters button.is-active,
.sz-filters button[aria-pressed="true"] {
    border-color: var(--sz-accent);
    color: var(--sz-accent);
}

.sz-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px 14px;
}
.sz-tile { margin: 0; text-align: center; position: relative; }
.sz-tile__face {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 50%;
    border: 0;
    padding: 0;
    cursor: pointer;
    background: var(--sz-primary);
    display: grid;
    place-items: center;
    position: relative;
    box-shadow: 0 1px 0 #4b5563, 0 5px 0 #1f2933, 0 9px 0 #111827, 0 14px 18px rgba(0,0,0,.45);
}
.sz-tile__face img {
    width: 78%;
    height: 78%;
    object-fit: contain;
}
.sz-tile__badge {
    position: absolute;
    bottom: 10%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--sz-accent);
    color: #fff;
    font-size: 0.65rem;
    padding: 2px 6px;
}
.sz-tile__name { margin: 12px 0 0; }
.sz-tile__name a { color: var(--sz-ink); text-decoration: none; }
.m-game-tile--locked .sz-tile__face { outline: 3px solid var(--sz-secondary); }
.m-game-tile__lock-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: rgba(10, 15, 20, 0.72);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}
.m-game-tile__lock-overlay::after {
    content: "Sign in";
    font-family: "Courier New", Courier, monospace;
    font-size: 0.85rem;
    color: #fff;
}
.m-game-tile__lock-text,
.m-game-tile__lock-btn,
.m-game-tile__lock-icon { display: none; }

.sz-panel {
    margin-top: 36px;
    padding: 18px;
    background: var(--sz-primary);
    box-shadow: 0 1px 0 #4b5563, 0 6px 0 #1f2933, 0 10px 0 #111827;
}
.sz-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.sz-stat {
    background: var(--sz-bg);
    padding: 12px;
    box-shadow: 0 3px 0 #1f2933, 0 6px 0 #111827;
}
.sz-stat b { display: block; font-family: var(--sz-display); font-size: 0.85rem; color: var(--sz-accent); }
.sz-stat span { color: var(--sz-muted); font-size: 0.9rem; }

.sz-bonus__row { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.sz-clock { font-family: var(--sz-display); font-size: 0.8rem; color: var(--sz-accent); }

.sz-disclaimer {
    margin-top: 36px;
    padding: 16px;
    border: 3px solid var(--sz-accent);
    background: #14080c;
}
.sz-disclaimer strong { font-family: var(--sz-display); font-size: 0.62rem; display: block; margin-bottom: 8px; }

.sz-prose { max-width: 72ch; }
.sz-prose h2 { margin-top: 1.6em; }
.sz-list { padding-left: 1.2em; }
.sz-split { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.sz-acct { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.sz-form, .sz-acct { display: flex; flex-direction: column; gap: 10px; }
.sz-form input, .sz-acct input, .sz-form textarea {
    width: 100%;
    min-height: 44px;
    background: var(--sz-bg);
    color: var(--sz-ink);
    border: 2px solid var(--sz-secondary);
    padding: 8px;
}
.sz-bar { height: 12px; background: #111827; margin: 8px 0 16px; }
.sz-bar span { display: block; height: 100%; background: var(--sz-accent); width: 8%; }

.sz-footer { background: #070b10; border-top: 4px solid var(--sz-secondary); padding: 28px 0 18px; }
.sz-footer__inner {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}
.sz-footer__brand { font-family: var(--sz-display); font-size: 0.65rem; margin: 0 0 10px; }
.sz-footer__links { list-style: none; margin: 0; padding: 0; }
.sz-footer__links a { color: var(--sz-ink); text-decoration: none; display: inline-block; padding: 4px 0; }
.sz-footer__addr { color: var(--sz-muted); }
.sz-footer__badges { display: flex; flex-wrap: wrap; gap: 10px; }
.sz-footer__badge {
    display: inline-flex;
    padding: 10px 16px;
    background: #f2f2f2;
    border-radius: 4px;
}
.sz-footer__badge img { height: 36px; width: auto; }
.sz-footer__copy { text-align: center; color: var(--sz-muted); font-size: 0.9rem; }

.sz-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 80;
    place-items: center;
    padding: 16px;
}
.sz-modal.is-open { display: grid; }
.sz-modal__panel {
    width: min(480px, 95vw);
    background: var(--sz-primary);
    padding: 18px;
    position: relative;
    box-shadow: 0 4px 0 #4b5563, 0 10px 0 #1f2933, 0 16px 0 #111827;
    max-height: 95vh;
    overflow: auto;
}
.sz-modal__panel--game { width: min(1100px, 95vw); }
.sz-modal__gamebar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.sz-modal__close {
    width: 44px;
    height: 44px;
    background: var(--sz-accent);
    color: #fff;
    border: 0;
    cursor: pointer;
    flex-shrink: 0;
    font-family: var(--sz-display);
}
#gameIframe { width: 100%; height: min(78vh, 820px); border: 0; background: #000; display: block; }
.sz-modal__tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.sz-modal__tabs button { min-height: 44px; background: transparent; color: var(--sz-ink); border: 2px solid var(--sz-secondary); cursor: pointer; }
.sz-modal__tabs button.is-active { border-color: var(--sz-accent); color: var(--sz-accent); }

.sz-cookie {
    display: none;
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 70;
    background: var(--sz-primary);
    border: 2px solid var(--sz-accent);
    padding: 12px 14px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    max-width: 720px;
    margin: 0 auto;
}
.sz-cookie:not([hidden]) { display: flex; }
.sz-cookie p { margin: 0; }

.sz-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.sz-card {
    display: block;
    padding: 14px;
    background: var(--sz-primary);
    color: var(--sz-ink);
    text-decoration: none;
    box-shadow: 0 4px 0 #1f2933, 0 8px 0 #111827;
}
.sz-card h2, .sz-card h3 { color: var(--sz-accent); }
.sz-sheet { display: grid; grid-template-columns: 280px 1fr; gap: 24px; align-items: start; }
.sz-sheet__art {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 50%;
    object-fit: contain;
    background: var(--sz-primary);
    box-shadow: 0 6px 0 #1f2933, 0 12px 0 #111827;
    padding: 12%;
}
.sz-rungs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sz-rung { padding: 12px; background: var(--sz-primary); }
.sz-rung.is-open { outline: 2px solid var(--sz-accent); }
.sz-table { width: 100%; border-collapse: collapse; }
.sz-table th, .sz-table td { border-bottom: 1px solid var(--sz-secondary); text-align: left; padding: 8px 6px; }
.sz-note { color: var(--sz-muted); }

@media (max-width: 1024px) {
    .sz-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .sz-stats { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 960px) {
    .sz-header__bar { justify-content: space-between; }
    .sz-nav { display: none; }
    .sz-header__tools { display: none !important; }
    .sz-burger { display: inline-flex; margin-left: auto; }
    .sz-header__brand img { width: 148px; }
}
@media (max-width: 768px) {
    .sz-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sz-split, .sz-sheet, .sz-footer__inner, .sz-cards, .sz-rungs { grid-template-columns: 1fr; }
    h1 { font-size: 0.95rem; }
    #gameIframe { height: 70vh; }
}
@media (max-width: 360px) {
    .sz-main, .sz-header__bar, .sz-footer__inner { width: calc(100% - 16px); }
}
