:root {
    --rt-bg: #030403;
    --rt-black: #050604;
    --rt-panel: #090b08;
    --rt-panel-soft: #10120f;
    --rt-panel-2: #0d100c;
    --rt-cream: #f1e6c7;
    --rt-cream-soft: #d8c8a5;
    --rt-yellow: #ffc21a;
    --rt-yellow-2: #f2a900;
    --rt-red: #ff4438;
    --rt-cyan: #38c7de;
    --rt-green: #52d75b;
    --rt-purple: #b84ad9;
    --rt-muted: #b9aa84;
    --rt-line: #72684e;
    --rt-border-width: 2px;
    --rt-border: 2px solid var(--rt-cream);
    --rt-border-thin: 2px solid var(--rt-cream);
    --rt-mono: "Cascadia Mono", "Roboto Mono", Consolas, monospace;
    --rt-font: "Arial Black", Impact, "Segoe UI", Arial, sans-serif;
    --rt-body-font: "Segoe UI", Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    background: var(--rt-black);
    color: #fff8e4;
    font-family: var(--rt-body-font);
    font-size: 15px;
    line-height: 1.38;
    letter-spacing: 0;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
textarea,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

img,
svg,
canvas,
video {
    max-width: 100%;
}

h1,
h2,
h3,
h4,
h5,
h6,
p {
    margin-top: 0;
    overflow-wrap: break-word;
}

.rt-screen {
    min-height: 100vh;
    display: grid;
    grid-template-rows: auto 1fr auto;
    border: var(--rt-border);
    background: var(--rt-black);
}

.rt-main {
    width: 100%;
    max-width: 1440px;
    min-width: 0;
    margin: 0 auto;
    padding: 0 24px 10px;
}

.rt-auth-main {
    display: grid;
    align-items: center;
}

.rt-app-header {
    width: 100%;
    max-width: 1440px;
    min-height: 110px;
    display: grid;
    grid-template-columns: minmax(270px, .85fr) minmax(260px, 420px) auto;
    align-items: center;
    gap: 16px;
    border-bottom: var(--rt-border);
    margin: 0 auto;
    padding: 18px 24px;
    background: var(--rt-black);
}

.rt-logo {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    overflow: hidden;
}

.rt-logo-mark {
    width: 64px;
    height: 64px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 1fr;
    gap: 6px;
    border: var(--rt-border);
    padding: 8px;
    background: var(--rt-panel);
}

.rt-logo-mark i:nth-child(1),
.rt-logo-mark i:nth-child(4) {
    background: var(--rt-red);
}

.rt-logo-mark i:nth-child(2),
.rt-logo-mark i:nth-child(5) {
    background: var(--rt-yellow);
}

.rt-logo-mark i:nth-child(3),
.rt-logo-mark i:nth-child(6) {
    background: var(--rt-cyan);
}

.rt-logo-copy strong {
    display: block;
    font-family: var(--rt-font);
    font-size: clamp(1.9rem, 2.4vw, 2.9rem);
    line-height: .9;
    white-space: nowrap;
}

.rt-logo-copy strong span {
    color: var(--rt-red);
}

.rt-logo-copy strong b {
    color: var(--rt-yellow);
}

.rt-logo-copy strong em {
    color: var(--rt-cyan);
    font-style: normal;
    font-size: .62em;
    margin-left: 8px;
}

.rt-logo-copy small {
    display: block;
    margin-top: 8px;
    color: var(--rt-cream);
    font-family: var(--rt-font);
    font-size: .68rem;
    letter-spacing: .08em;
    white-space: nowrap;
}

.rt-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    min-width: 0;
}

.retro-search {
    min-height: 58px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: var(--rt-border-thin);
    background: var(--rt-panel);
    padding: 0 14px;
    min-width: 0;
}

.retro-search input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--rt-cream);
    font-size: .9rem;
    text-transform: uppercase;
}

.retro-search input::placeholder {
    color: #9f9578;
}

.pixel-icon {
    width: 30px;
    height: 30px;
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    border: 2px solid currentColor;
    color: var(--rt-yellow);
    background: transparent;
    font-family: var(--rt-mono);
    font-weight: 950;
    font-size: 1rem;
    line-height: 1;
}

.pixel-icon-cream {
    color: var(--rt-cream);
}

.pixel-icon-yellow {
    color: var(--rt-yellow);
}

.pixel-icon-red {
    color: var(--rt-red);
}

.pixel-icon-cyan {
    color: var(--rt-cyan);
}

.pixel-icon-green {
    color: var(--rt-green);
}

.pixel-icon-purple {
    color: var(--rt-purple);
}

.player-chip,
.credits-chip,
.rt-auth-top-action {
    min-height: 62px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    border: 2px solid var(--rt-yellow);
    background: var(--rt-panel);
    padding: 10px 14px;
}

.player-chip {
    border-color: transparent;
    padding-left: 0;
}

.player-chip-avatar {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border: 3px solid var(--rt-red);
    background: var(--rt-yellow);
    position: relative;
}

.player-chip-avatar span {
    width: 8px;
    height: 8px;
    background: var(--rt-black);
    display: block;
    position: absolute;
    top: 25px;
}

.player-chip-avatar span:first-child {
    left: 19px;
}

.player-chip-avatar span:last-child {
    right: 19px;
}

.player-chip strong,
.credits-chip strong,
.rt-auth-top-action span {
    display: block;
    color: var(--rt-yellow);
    font-family: var(--rt-font);
    font-size: 1.05rem;
    text-transform: uppercase;
    white-space: nowrap;
}

.player-chip small {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--rt-cream);
    font-family: var(--rt-mono);
    font-size: .95rem;
    letter-spacing: .12em;
}

.credits-chip {
    min-width: 168px;
    justify-content: center;
    flex-direction: column;
    gap: 6px;
}

.credits-chip span {
    color: var(--rt-cream);
    font-size: 1.25rem;
    font-weight: 950;
}

.credits-chip i {
    width: 22px;
    height: 22px;
    display: inline-block;
    border-radius: 50%;
    background: var(--rt-cream);
    vertical-align: -4px;
    margin-right: 10px;
}

.rt-auth-top-action {
    min-width: 224px;
    justify-content: center;
}

.page-header {
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-right: var(--rt-border-thin);
    border-left: var(--rt-border-thin);
    background: var(--rt-cream);
    color: var(--rt-black);
    padding: 0 18px;
}

.page-header-title,
.page-header-actions,
.page-header-actions span {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.page-header-led {
    width: 12px;
    height: 12px;
    display: inline-block;
    background: var(--rt-red);
}

.page-header h1 {
    margin: 0;
    color: var(--rt-black);
    font-family: var(--rt-font);
    font-size: 1.15rem;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.page-header strong {
    color: var(--rt-black);
    font-family: var(--rt-font);
    font-size: 1.1rem;
}

.page-header i {
    width: 3px;
    height: 34px;
    background: var(--rt-black);
}

.page-header small,
.page-header-actions {
    color: var(--rt-black);
    font-family: var(--rt-font);
    font-size: .78rem;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.rt-page-frame {
    border-right: var(--rt-border-thin);
    border-left: var(--rt-border-thin);
    border-bottom: var(--rt-border-thin);
    padding: 16px;
}

.app-page-toolbar {
    margin-bottom: 18px;
}

.app-page-main-span {
    grid-column: span 2;
}

.rt-layout-two,
.rt-layout-three,
.rt-dashboard,
.rt-auth-grid,
.rt-grid,
.rt-stat-grid,
.rt-card-grid {
    display: grid;
    gap: 16px;
}

.rt-dashboard,
.rt-layout-two {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
    align-items: start;
}

.rt-layout-three {
    grid-template-columns: 280px minmax(0, 1fr) 340px;
}

.rt-auth-grid {
    grid-template-columns: minmax(0, .85fr) minmax(360px, 600px);
    align-items: start;
    min-height: auto;
    padding: 20px 0;
}

.rt-dashboard > *,
.rt-layout-two > *,
.rt-layout-three > *,
.rt-auth-grid > *,
.rt-grid > *,
.rt-card-grid > *,
.rt-stat-grid > * {
    min-width: 0;
}

.rt-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.rt-card-grid {
    grid-template-columns: repeat(3, minmax(220px, 1fr));
}

.rt-stat-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.retro-panel,
.panel,
.post-card,
.community-card,
.settings-section,
.retro-card {
    border: var(--rt-border-thin);
    background: var(--rt-panel);
    color: var(--rt-cream);
    min-width: 0;
}

.retro-panel-header {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid var(--rt-line);
    padding: 10px 14px;
}

.retro-panel-header h2,
.retro-card h2,
.settings-section h2 {
    margin: 0;
    color: var(--rt-yellow);
    font-family: var(--rt-font);
    font-size: .92rem;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.retro-panel-header small {
    display: block;
    color: var(--rt-cyan);
    font-family: var(--rt-font);
    font-size: .68rem;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.retro-panel-content {
    padding: 14px;
}

.retro-panel-yellow {
    border-color: var(--rt-yellow);
}

.retro-panel-red {
    border-color: var(--rt-red);
}

.retro-panel-cyan {
    border-color: var(--rt-cyan);
}

.retro-panel-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.retro-button {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 2px solid var(--rt-cream);
    background: var(--rt-black);
    color: var(--rt-cream);
    padding: 0 18px;
    font-family: var(--rt-font);
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.retro-button-primary {
    border-color: var(--rt-yellow);
    background: var(--rt-yellow);
    color: var(--rt-black);
}

.retro-button-accent {
    border-color: var(--rt-yellow);
    background: var(--rt-yellow);
    color: var(--rt-black);
    outline: 2px solid var(--rt-purple);
    outline-offset: 0;
}

.retro-button-cyan {
    border-color: var(--rt-cyan);
    background: var(--rt-cyan);
    color: var(--rt-black);
}

.retro-button-danger {
    border-color: var(--rt-red);
    color: var(--rt-red);
}

.retro-button-full {
    width: 100%;
}

.rt-empty {
    min-height: 140px;
    display: grid;
    place-items: center;
    gap: 8px;
    border: var(--rt-border-thin);
    background: var(--rt-panel);
    color: var(--rt-cream);
    padding: 20px;
    text-align: center;
}

.rt-empty strong,
.rt-placeholder {
    color: var(--rt-yellow);
    font-family: var(--rt-font);
    text-transform: uppercase;
}

.rt-empty p {
    max-width: 520px;
    margin: 0;
    color: var(--rt-muted);
}

.rt-skeleton {
    display: block;
    border: var(--rt-border-thin);
    background: var(--rt-panel-soft);
}

.rt-skeleton-line {
    min-height: 14px;
    width: 100%;
}

.rt-skeleton-block {
    min-height: 88px;
}

.rt-skeleton-sm {
    width: 38%;
}

.rt-skeleton-md {
    width: 68%;
}

.rt-skeleton-lg {
    width: 100%;
}

.rt-placeholder {
    display: grid;
    place-items: center;
    border: var(--rt-border-thin);
    background: var(--rt-black);
    color: var(--rt-cyan);
    min-height: 110px;
    padding: 16px;
}

.rt-placeholder-media {
    min-height: 150px;
}

.rt-form {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.retro-badge,
.status-pill,
.tag,
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 22px;
    border: 2px solid currentColor;
    color: var(--rt-yellow);
    background: var(--rt-black);
    padding: 2px 8px;
    font-family: var(--rt-font);
    font-size: .66rem;
    text-transform: uppercase;
}

.retro-badge-red {
    color: var(--rt-red);
}

.retro-badge-cyan {
    color: var(--rt-cyan);
}

.retro-badge-green {
    color: var(--rt-green);
}

.retro-badge-purple {
    color: var(--rt-purple);
}

.rt-footer-nav,
.rt-auth-footer {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 10px;
    border-top: var(--rt-border);
    padding: 14px 24px;
    background: var(--rt-black);
}

.rt-auth-footer {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-width: 1180px;
    width: 100%;
    margin: 0 auto;
    padding-inline: 88px;
}

.rt-footer-link {
    position: relative;
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: var(--rt-border-thin);
    background: var(--rt-panel);
    color: var(--rt-cream);
    font-family: var(--rt-font);
    font-size: .82rem;
    text-transform: uppercase;
}

.rt-footer-link.active {
    border-color: var(--rt-yellow);
    background: var(--rt-yellow);
    color: var(--rt-black);
}

.rt-footer-link.active .pixel-icon {
    color: var(--rt-black);
}

.rt-footer-link b {
    position: absolute;
    top: -8px;
    right: 12px;
    min-width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    background: var(--rt-purple);
    color: #fff;
}

.rt-hero-title {
    color: var(--rt-red);
    font-family: var(--rt-font);
    font-size: clamp(2.6rem, 4.4vw, 4.45rem);
    line-height: .98;
    text-transform: uppercase;
    max-width: 720px;
    overflow-wrap: normal;
}

.rt-hero-title span {
    color: var(--rt-yellow);
}

.rt-hero-title em {
    color: var(--rt-cyan);
    font-style: normal;
}

.rt-kicker {
    color: var(--rt-yellow);
    font-family: var(--rt-font);
    letter-spacing: .12em;
    text-transform: uppercase;
    line-height: 1.3;
}

.rt-copy,
.muted,
.empty-state,
small {
    color: var(--rt-cream);
}

.rt-cyan {
    color: var(--rt-cyan);
}

.rt-cream {
    color: var(--rt-cream);
}

.rt-red {
    color: var(--rt-red);
}

.rt-yellow {
    color: var(--rt-yellow);
}

.rt-green {
    color: var(--rt-green);
}

.rt-divider {
    height: 2px;
    background: var(--rt-cream-soft);
    opacity: .75;
    margin: 18px 0;
}

.rt-feature-item,
.rt-post-item,
.rt-transaction-item,
.rt-notification-item,
.rt-ranking-item,
.rt-machine-item,
.rt-community-item,
.rt-setting-item,
.rt-device-item,
.rt-security-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--rt-line);
    padding: 12px 0;
    min-width: 0;
}

.rt-feature-item:last-child,
.rt-post-item:last-child,
.rt-transaction-item:last-child,
.rt-notification-item:last-child,
.rt-ranking-item:last-child,
.rt-machine-item:last-child,
.rt-community-item:last-child,
.rt-setting-item:last-child,
.rt-device-item:last-child,
.rt-security-item:last-child {
    border-bottom: 0;
}

.feature-thumb,
.avatar-square,
.game-art,
.community-art,
.machine-art,
.venue-art {
    display: grid;
    place-items: center;
    border: 3px solid var(--rt-cream);
    background: var(--rt-panel-2);
    color: var(--rt-yellow);
    font-family: var(--rt-font);
    text-transform: uppercase;
}

.feature-thumb,
.avatar-square {
    width: 64px;
    height: 64px;
}

.avatar-square-yellow {
    background: var(--rt-yellow);
    color: var(--rt-black);
    border-color: var(--rt-red);
}

.rt-post-item h3,
.community-card h2,
.profile-name,
.settings-player-name,
.auth-form-title,
.card-title-red {
    margin: 0 0 6px;
    color: var(--rt-red);
    font-family: var(--rt-font);
    line-height: 1.08;
    text-transform: uppercase;
}

.rt-post-item p,
.community-card p,
.rt-setting-item p,
.rt-notification-item p,
.rt-machine-item p {
    margin: 0;
    color: #fff8e4;
    line-height: 1.35;
    max-width: 70ch;
}

.post-actions,
.card-meta,
.inline-meta,
.rt-toolbar-strip,
.form-actions,
.rt-tabs-strip {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    min-width: 0;
}

.post-actions span,
.inline-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--rt-cream);
    font-weight: 800;
}

.composer-card {
    min-height: 124px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 18px;
    border: var(--rt-border-thin);
    background: var(--rt-panel);
    padding: 18px;
}

.composer-card h2 {
    color: var(--rt-red);
    font-family: var(--rt-font);
    font-size: 1rem;
    line-height: 1.12;
    text-transform: uppercase;
}

.composer-card p {
    margin: 0;
    color: var(--rt-cream);
}

.side-stack,
.main-stack,
.feed-stack {
    display: grid;
    gap: 14px;
    align-content: start;
    min-width: 0;
}

.ranking-list,
.transaction-list,
.notification-list,
.device-list {
    display: grid;
}

.rt-ranking-item {
    grid-template-columns: 42px auto minmax(0, 1fr) auto;
}

.ranking-pos {
    color: var(--rt-yellow);
    font-family: var(--rt-font);
    font-size: 1.08rem;
}

.ranking-score,
.credit-positive,
.credit-negative,
.money-value {
    font-family: var(--rt-mono);
    font-weight: 950;
}

.ranking-score,
.money-value {
    color: var(--rt-cyan);
}

.credit-positive {
    color: var(--rt-green);
}

.credit-negative {
    color: var(--rt-red);
}

.stat-card {
    min-height: 104px;
    border: var(--rt-border-thin);
    background: var(--rt-panel);
    padding: 14px;
}

.stat-card span {
    display: block;
    margin-top: 8px;
    color: var(--rt-yellow);
    font-family: var(--rt-font);
    text-transform: uppercase;
}

.stat-card strong {
    display: block;
    color: var(--rt-cream);
    font-family: var(--rt-font);
    font-size: 1.6rem;
}

.stat-card small {
    color: var(--rt-cyan);
    font-family: var(--rt-font);
    text-transform: uppercase;
}

.balance-card {
    min-height: 220px;
    display: grid;
    place-items: center;
    text-align: center;
}

.balance-card strong {
    display: block;
    color: var(--rt-cyan);
    font-family: var(--rt-font);
    font-size: clamp(3.2rem, 7vw, 5.4rem);
    line-height: .9;
}

.balance-card span {
    color: var(--rt-cream);
    font-family: var(--rt-font);
    font-size: 1.35rem;
    text-transform: uppercase;
}

.community-card {
    min-height: 100%;
    padding: 0;
}

.community-banner,
.community-art-wide {
    min-height: 104px;
    border-bottom: var(--rt-border-thin);
    background: var(--rt-panel-2);
    display: grid;
    place-items: center;
    color: var(--rt-yellow);
    font-family: var(--rt-font);
    font-size: 1.65rem;
    line-height: 1.05;
    text-align: center;
    padding: 12px;
}

.community-body {
    padding: 14px;
}

.community-card .avatar-square {
    margin-top: -44px;
    margin-bottom: 12px;
}

.map-canvas {
    position: relative;
    min-height: 560px;
    overflow: hidden;
    border: var(--rt-border-thin);
    background: #081320;
}

.map-grid {
    position: absolute;
    inset: 0;
    background: #0b1a2b;
}

.map-road {
    position: absolute;
    display: block;
    background: #18365a;
}

.road-a {
    width: 120%;
    height: 24px;
    left: -10%;
    top: 18%;
    transform: rotate(-18deg);
}

.road-b {
    width: 130%;
    height: 28px;
    left: -12%;
    top: 54%;
    transform: rotate(14deg);
}

.road-c {
    width: 28px;
    height: 130%;
    left: 34%;
    top: -15%;
    transform: rotate(22deg);
}

.road-d {
    width: 34px;
    height: 140%;
    left: 72%;
    top: -20%;
    transform: rotate(-28deg);
}

.map-pin {
    position: absolute;
    width: 58px;
    height: 72px;
    display: grid;
    place-items: center;
    color: var(--rt-black);
    background: var(--rt-yellow);
    border: 4px solid var(--rt-black);
    outline: 4px solid var(--rt-yellow);
    clip-path: polygon(50% 100%, 8% 46%, 8% 12%, 50% 0, 92% 12%, 92% 46%);
    font-family: var(--rt-font);
}

.map-pin-red {
    background: var(--rt-red);
    outline-color: var(--rt-red);
}

.map-pin-cyan {
    background: var(--rt-cyan);
    outline-color: var(--rt-cyan);
}

.map-pin-pos-1 {
    left: 10%;
    top: 18%;
}

.map-pin-pos-2 {
    left: 14%;
    top: 66%;
}

.map-pin-pos-3 {
    left: 43%;
    top: 43%;
}

.map-pin-pos-4 {
    left: 58%;
    top: 20%;
}

.map-pin-pos-5 {
    left: 88%;
    top: 48%;
}

.map-legend,
.map-controls {
    position: absolute;
    display: flex;
    gap: 10px;
    border: var(--rt-border-thin);
    background: var(--rt-panel);
    padding: 10px;
}

.map-legend {
    left: 20px;
    bottom: 20px;
}

.map-controls {
    right: 20px;
    bottom: 20px;
    flex-direction: column;
}

.filter-pill {
    display: inline-grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 4px 10px;
    padding: 12px 14px;
}

.filter-pill strong {
    grid-column: 2;
    color: var(--rt-yellow);
    font-family: var(--rt-font);
}

.package-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    border: var(--rt-border-thin);
    background: var(--rt-panel);
    padding: 14px;
}

.package-card.active {
    border-color: var(--rt-red);
    outline: 2px solid var(--rt-yellow);
    outline-offset: -5px;
}

.package-card h3 {
    margin: 0;
    color: var(--rt-yellow);
    font-family: var(--rt-font);
    text-transform: uppercase;
}

.auth-copy-list {
    display: grid;
    gap: 12px;
    margin-top: 24px;
}

.auth-lead {
    color: var(--rt-cream);
}

.auth-tagline {
    margin-top: 24px;
}

.auth-centered {
    color: var(--rt-cream);
    text-align: center;
}

.auth-action-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    margin: 14px 0;
    color: var(--rt-cream);
}

.auth-art {
    min-height: 220px;
}

.auth-card {
    border: var(--rt-border-thin);
    background: var(--rt-panel);
    min-width: 0;
}

.auth-card-header {
    min-height: 50px;
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--rt-cream);
    color: var(--rt-black);
    padding: 0 16px;
    font-family: var(--rt-font);
    text-transform: uppercase;
}

.auth-card-body {
    padding: 26px 30px;
}

.auth-field,
.field {
    display: grid;
    gap: 8px;
    margin-bottom: 14px;
    min-width: 0;
}

.auth-field label,
.auth-field span,
.field label,
.field span {
    color: var(--rt-cream);
    font-family: var(--rt-font);
    font-size: .85rem;
    text-transform: uppercase;
}

.auth-input,
.input,
.search-field,
.community-textarea,
select.input,
textarea.input {
    width: 100%;
    min-height: 48px;
    border: var(--rt-border-thin);
    background: var(--rt-panel);
    color: var(--rt-cream);
    padding: 0 14px;
    outline: 0;
}

textarea.input,
.community-textarea {
    min-height: 120px;
    padding-block: 14px;
}

.auth-input:focus,
.input:focus,
.search-field:focus,
.community-textarea:focus {
    border-color: var(--rt-yellow);
}

.checkbox,
.form-check,
.rt-toggle-control {
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-check-input,
input[type="checkbox"],
input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--rt-yellow);
}

.oauth-button-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.oauth-button,
.oauth-status-item {
    min-height: 52px;
    border: var(--rt-border-thin);
    background: var(--rt-panel);
    color: var(--rt-cream);
    font-family: var(--rt-font);
    text-transform: uppercase;
    min-width: 0;
}

.oauth-status-list {
    display: grid;
    gap: 10px;
}

.oauth-status-item {
    padding: 12px;
}

.oauth-status-item small {
    display: block;
    margin-top: 4px;
    color: var(--rt-cyan);
    font-size: .66rem;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.security-placeholder {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    border: var(--rt-border-thin);
    background: var(--rt-panel-soft);
    padding: 12px;
    margin: 14px 0;
}

.security-placeholder-content {
    min-width: 0;
}

.account-actions,
.account-form-actions,
.account-actions-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.account-form {
    display: grid;
    gap: 14px;
}

.account-panel-lead {
    margin-top: 0;
}

.account-readonly-field {
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border: var(--rt-border-thin);
    background: var(--rt-panel);
    color: var(--rt-cream);
    padding: 0 14px;
    overflow-wrap: anywhere;
}

.account-inline-status {
    color: var(--rt-green);
    font-family: var(--rt-font);
}

.account-code-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.account-code-grid code,
.recovery-code {
    display: block;
    border: var(--rt-border-thin);
    background: var(--rt-black);
    color: var(--rt-yellow);
    padding: 10px;
    overflow-wrap: anywhere;
}

.turnstile-widget {
    min-height: 72px;
    display: grid;
    place-items: center;
    border: 2px dashed var(--rt-line);
    margin: 18px 0;
}

.validation-message,
.text-danger {
    color: var(--rt-red);
}

.retro-tabs,
.filter-tabs,
.tab-list {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.retro-tabs button,
.filter-tabs button,
.tab-list button,
.tab-list a {
    min-height: 42px;
    border: var(--rt-border-thin);
    background: var(--rt-panel);
    color: var(--rt-cream);
    padding: 0 18px;
    font-family: var(--rt-font);
    text-transform: uppercase;
}

.retro-tabs button.active,
.filter-tabs button.active,
.tab-list .active {
    border-color: var(--rt-yellow);
    background: var(--rt-yellow);
    color: var(--rt-black);
}

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

.retro-table {
    width: 100%;
    border-collapse: collapse;
}

.retro-table th {
    color: var(--rt-yellow);
    font-family: var(--rt-font);
    text-align: left;
    text-transform: uppercase;
}

.retro-table th,
.retro-table td {
    border-bottom: 1px solid var(--rt-line);
    padding: 10px 8px;
}

.settings-menu {
    display: grid;
    border: var(--rt-border-thin);
}

.settings-menu a,
.settings-menu div {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    min-height: 72px;
    border-bottom: 1px solid var(--rt-line);
    padding: 14px;
}

.settings-menu a.active,
.settings-menu div.active {
    background: var(--rt-yellow);
    color: var(--rt-black);
}

.settings-menu h3 {
    margin: 0;
    font-family: var(--rt-font);
    text-transform: uppercase;
}

.settings-menu p {
    margin: 0;
}

.security-meter {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 20px;
    align-items: center;
}

.security-grade {
    font-size: 3rem;
}

.security-score {
    font-size: 4rem;
}

.meter-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    height: 18px;
    border: 2px solid var(--rt-green);
}

.meter-bar i:nth-child(1) {
    background: var(--rt-red);
}

.meter-bar i:nth-child(2) {
    background: #ff8b32;
}

.meter-bar i:nth-child(3) {
    background: var(--rt-yellow);
}

.meter-bar i:nth-child(4) {
    background: var(--rt-green);
}

.w-100 {
    width: 100%;
}

#blazor-error-ui {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 1000;
    display: none;
    max-width: 520px;
    border: var(--rt-border-thin);
    background: var(--rt-black);
    color: var(--rt-red);
    padding: 16px 44px 16px 18px;
}

#blazor-error-ui .dismiss {
    position: absolute;
    right: 14px;
    top: 10px;
    cursor: pointer;
}

@media (max-width: 1180px) {
    .rt-app-header {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .rt-header-actions {
        justify-content: space-between;
    }

    .retro-search {
        order: 3;
    }

    .rt-dashboard,
    .rt-layout-two,
    .rt-layout-three,
    .rt-auth-grid {
        grid-template-columns: 1fr;
    }

    .rt-card-grid,
    .rt-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .rt-footer-nav {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .rt-auth-footer {
        padding-inline: 32px;
    }
}

@media (max-width: 760px) {
    .rt-screen {
        border-width: 2px;
    }

    .rt-main {
        padding: 0 8px 8px;
    }

    .rt-app-header {
        padding: 12px;
        gap: 12px;
    }

    .rt-logo {
        gap: 10px;
    }

    .rt-logo-mark {
        width: 48px;
        height: 48px;
        gap: 4px;
        padding: 6px;
    }

    .rt-logo-copy strong {
        font-size: 1.35rem;
    }

    .rt-logo-copy small {
        margin-top: 5px;
        font-size: .47rem;
    }

    .rt-header-actions,
    .player-chip,
    .credits-chip {
        width: 100%;
    }

    .rt-header-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .rt-auth-screen .rt-header-actions {
        grid-template-columns: 1fr;
    }

    .player-chip,
    .credits-chip,
    .rt-auth-top-action {
        min-height: 52px;
        padding: 8px 10px;
    }

    .player-chip {
        gap: 8px;
    }

    .player-chip-avatar {
        width: 48px;
        height: 48px;
    }

    .player-chip-avatar span {
        top: 20px;
    }

    .player-chip-avatar span:first-child {
        left: 15px;
    }

    .player-chip-avatar span:last-child {
        right: 15px;
    }

    .player-chip strong,
    .credits-chip strong,
    .rt-auth-top-action span {
        font-size: .82rem;
    }

    .player-chip small {
        font-size: .72rem;
        letter-spacing: .06em;
    }

    .credits-chip {
        min-width: 0;
    }

    .credits-chip span {
        font-size: .95rem;
    }

    .retro-search {
        min-height: 48px;
        padding: 0 10px;
    }

    .retro-search input {
        font-size: .72rem;
    }

    .pixel-icon {
        width: 26px;
        height: 26px;
        font-size: .78rem;
    }

    .page-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
        padding: 10px;
    }

    .page-header-title {
        flex-wrap: wrap;
    }

    .page-header h1,
    .page-header strong {
        font-size: .92rem;
    }

    .page-header small,
    .page-header-actions {
        font-size: .68rem;
    }

    .rt-page-frame {
        padding: 10px;
    }

    .rt-card-grid,
    .rt-stat-grid,
    .rt-grid,
    .account-code-grid,
    .oauth-button-list,
    .rt-footer-nav,
    .rt-auth-footer {
        grid-template-columns: 1fr;
    }

    .composer-card,
    .rt-feature-item,
    .rt-post-item,
    .rt-transaction-item,
    .rt-notification-item,
    .rt-ranking-item,
    .rt-machine-item,
    .rt-community-item,
    .rt-setting-item,
    .rt-device-item,
    .rt-security-item,
    .package-card,
    .security-meter {
        grid-template-columns: 1fr;
    }

    .composer-card {
        padding: 14px;
        gap: 12px;
    }

    .rt-feature-item,
    .rt-post-item,
    .rt-transaction-item,
    .rt-notification-item,
    .rt-ranking-item,
    .rt-machine-item,
    .rt-community-item,
    .rt-setting-item,
    .rt-device-item,
    .rt-security-item {
        gap: 10px;
    }

    .feature-thumb,
    .avatar-square {
        width: 54px;
        height: 54px;
    }

    .retro-panel-content,
    .community-body {
        padding: 12px;
    }

    .retro-panel-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .retro-button,
    .retro-tabs button,
    .filter-tabs button,
    .tab-list button,
    .tab-list a {
        min-height: 40px;
        padding: 0 14px;
        font-size: .78rem;
    }

    .rt-hero-title {
        max-width: 100%;
        font-size: 2.25rem !important;
        line-height: .95;
    }

    .rt-auth-grid .rt-hero-title span,
    .rt-auth-grid .rt-hero-title em {
        display: block;
    }

    .rt-auth-grid {
        padding: 12px 0;
        gap: 14px;
    }

    .app-page-main-span {
        grid-column: auto;
    }

    .rt-auth-main {
        align-items: start;
    }

    .auth-card-body {
        padding: 16px;
    }

    .auth-art {
        min-height: 120px;
    }

    .auth-card-header {
        min-height: 44px;
        padding: 0 12px;
        font-size: .82rem;
    }

    .auth-input,
    .input,
    .search-field,
    .community-textarea,
    select.input,
    textarea.input {
        min-height: 44px;
    }

    .auth-copy-list {
        gap: 8px;
        margin-top: 16px;
    }

    .oauth-status-item {
        padding: 10px;
    }

    .community-banner,
    .community-art-wide {
        min-height: 86px;
        font-size: 1.28rem;
    }

    .balance-card {
        min-height: 170px;
    }

    .balance-card strong {
        font-size: 3rem;
    }

    .map-canvas {
        min-height: 360px;
    }

    .map-pin {
        width: 46px;
        height: 58px;
        border-width: 3px;
        outline-width: 3px;
    }

    .map-legend,
    .map-controls {
        position: static;
        margin-top: 10px;
        flex-wrap: wrap;
    }

    .security-grade {
        font-size: 2rem;
    }

    .security-score {
        font-size: 2.5rem;
    }

    .rt-footer-nav,
    .rt-auth-footer {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        padding: 10px 12px;
    }

    .rt-auth-footer {
        grid-template-columns: 1fr;
    }

    .rt-footer-link {
        min-height: 46px;
        justify-content: flex-start;
        padding: 0 12px;
        font-size: .72rem;
    }

    .main-stack {
        grid-column: auto !important;
    }
}
