:root { --navbar-height: 64px; --footer-height: 44px; }
:root[data-bs-theme="dark"] {
    color-scheme: dark;
    --bs-body-bg: #11191e;
    --bs-body-bg-rgb: 17, 25, 30;
    --bs-body-color: #e5eee9;
    --bs-body-color-rgb: 229, 238, 233;
    --bs-emphasis-color: #f5f8f8;
    --bs-emphasis-color-rgb: 245, 248, 248;
    --bs-secondary-color: #a3b0b7;
    --bs-secondary-color-rgb: 163, 176, 183;
    --bs-secondary-bg: #26343c;
    --bs-secondary-bg-rgb: 38, 52, 60;
    --bs-tertiary-color: #9aa9b1;
    --bs-tertiary-color-rgb: 154, 169, 177;
    --bs-tertiary-bg: #172128;
    --bs-tertiary-bg-rgb: 23, 33, 40;
    --bs-border-color: #425057;
    --bs-border-color-translucent: rgba(163, 176, 183, .25);
    --bs-link-color: #d5f76d;
    --bs-link-color-rgb: 213, 247, 109;
    --bs-link-hover-color: #e3ff97;
    --bs-link-hover-color-rgb: 227, 255, 151;
    --bs-focus-ring-color: rgba(70, 174, 149, .35);
    --bs-form-valid-color: #75d9a4;
    --bs-form-invalid-color: #f28b96;
}
html { font-size: 16px; min-height: 100%; background: var(--bs-body-bg); }
html, body { margin: 0; }
body { min-height: 100vh; display: flex; flex-direction: column; font-family: Inter, "Segoe UI", Arial, sans-serif; background: var(--bs-body-bg); color: var(--bs-body-color); }
a { text-underline-offset: 3px; }
header, .site-footer { flex-shrink: 0; }
#app { flex: 1; min-width: 0; }
.content-page { width: min(1120px, 100%); margin: 0 auto; padding: 2.5rem 24px; }
.privacy-notice { max-width: 780px; margin: 0 auto; }
.privacy-notice h1 { font-size: 2.3rem; letter-spacing: -.8px; margin-bottom: 1rem; }
.privacy-notice h2 { font-size: 1.25rem; margin-top: 2.2rem; margin-bottom: .8rem; }
.privacy-notice p, .privacy-notice li { line-height: 1.75; color: var(--bs-secondary-color); }
.content-page .text-danger { color: var(--bs-form-invalid-color) !important; }
.game-page {
    height: calc(100vh - var(--navbar-height, 56px) - var(--footer-height, 40px));
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.playing-page { height: 100vh; height: 100dvh; }
.playing-page #app { flex: 1 1 0; }
.site-header { background: #0c1115; border-bottom: 1px solid #273038; color: #fff; }
.site-nav { min-height: var(--navbar-height); padding: 10px 0; }
.site-nav-inner { max-width: 1248px; padding: 0 28px; gap: 32px; }
.site-brand { display: inline-flex; align-items: center; gap: 3px; margin: 0; color: #f5f8f8; font-size: 21px; font-weight: 850; letter-spacing: -1px; }
.brand-number { color: #d5f76d; }
.brand-mark { display: grid; place-items: center; width: 25px; height: 25px; border: 2px solid #d5f76d; margin-right: 9px; transform: rotate(45deg); }
.brand-mark span { height: 7px; width: 7px; background: #d5f76d; }
.site-primary-nav { gap: 14px; }
.language-switcher { display: inline-flex; gap: 3px; align-items: center; padding: 3px; border: 1px solid #425057; border-radius: 6px; flex-shrink: 0; }
.language-switcher button { background: transparent; border: 0; border-radius: 3px; color: #c6d2d8; padding: 6px 8px; font-size: 12px; font-weight: 700; min-height: 32px; }
.language-switcher button[aria-pressed="true"] { background: #d5f76d; color: #0c1115; }
.site-nav .navbar-collapse { gap: 16px; }
.analytics-preferences, .language-switcher button, .analytics-consent-actions button { cursor: pointer; }
@media (min-width: 768px) and (max-width: 1150px) {
    .site-nav-inner { gap: 16px; padding-left: 18px; padding-right: 18px; }
    .site-primary-nav { gap: 4px; }
    .site-nav .nav-link { font-size: 12px; }
}
.site-nav .nav-link { color: #bac3c8 !important; font-size: 13px; font-weight: 550; white-space: nowrap; }
.site-nav .nav-link:hover, .site-nav .nav-link:focus-visible { color: #e3ff97 !important; }
.site-footer { background: #0c1115; color: #8b999f; border-top: 1px solid #273038; font-size: 12px; }
.site-footer-inner { min-height: var(--footer-height); max-width: 1248px; margin: auto; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 10px 28px; }
.site-footer a { color: #b8c6cc; }
.analytics-preferences { padding: 0; border: 0; background: transparent; color: #b8c6cc; font: inherit; text-decoration: underline; text-underline-offset: 3px; }
.analytics-consent { position: fixed; inset: auto 16px 16px; z-index: 1100; max-width: 960px; margin: auto; padding: 20px; display: flex; align-items: center; gap: 24px; background: #172128; color: #edf4f1; border: 1px solid #65747a; border-radius: 8px; box-shadow: 0 8px 32px #0006; }
.analytics-consent[hidden], .analytics-preferences[hidden], .analytics-consent button[hidden] { display: none; }
.analytics-consent h2 { margin: 0 0 8px; font-size: 18px; }
.analytics-consent p { margin: 0; font-size: 13px; line-height: 1.6; }
.analytics-consent a { color: #d5f76d; }
.analytics-consent-status:not(:empty) { margin-top: 8px; color: #b8c6cc; }
.analytics-consent-actions { display: flex; gap: 10px; flex-wrap: wrap; flex-shrink: 0; max-width: 260px; }
.analytics-consent-actions button { padding: 10px 14px; min-height: 44px; border: 1px solid #b8c6cc; border-radius: 4px; background: #26343c; color: #fff; font-size: 13px; }
.analytics-consent-actions button:hover { background: #34454f; }
.skip-link { position: fixed; top: -100px; left: 16px; padding: 12px 20px; background: #d5f76d; color: #0c1115; z-index: 9999; }
.skip-link:focus { top: 12px; }
:focus-visible { outline: 3px solid #46ae95; outline-offset: 4px; }
.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-select:focus, .form-check-input:focus { box-shadow: 0 0 0 .1rem var(--bs-body-bg), 0 0 0 .25rem var(--bs-focus-ring-color); }
.form-control:focus, .form-select:focus { border-color: #46ae95; }
.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder { color: var(--bs-secondary-color); text-align: end; }
.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder { text-align: start; }
@media (max-width: 767px) {
    .site-nav-inner { padding: 0 18px; gap: 8px; }
    .site-nav .navbar-collapse { padding: 16px 0 6px; }
    .site-primary-nav { gap: 0; }
    .site-footer-inner { padding-right: 18px; padding-left: 18px; }
    .footer-note { display: none; }
    .site-footer-inner { flex-wrap: wrap; gap: 8px 16px; }
    .analytics-consent { inset: auto 10px 10px; padding: 16px; display: block; max-height: calc(100dvh - 20px); overflow-y: auto; }
    .analytics-consent-actions { margin-top: 14px; max-width: none; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto !important; }
}
