:root {
    --rt-bg: #f2e6c1;
    --rt-bg-soft: #eadcb3;
    --rt-card: #fbf3dc;
    --rt-card-strong: #f7edcf;
    --rt-yellow: #f7bd2e;
    --rt-yellow-dark: #c58a14;
    --rt-red: #f04b40;
    --rt-blue: #35acc0;
    --rt-green: #72bf74;
    --rt-purple: #c45bb2;
    --rt-purple-dark: #8a3e79;
    --rt-text: #10120f;
    --rt-text-muted: #3f3d34;
    --rt-border: #4f4a3d;
    --rt-field: #f2e6c1;
    --rt-field-readonly: #eadcb3;
    --rt-radius: 0;
    --rt-shadow: 4px 4px 0 #4f4a3d;
    --rt-mono: "Lucida Console", "Cascadia Mono", Consolas, monospace;
    --bg: var(--rt-bg);
    --panel: var(--rt-card);
    --panel-2: var(--rt-card-strong);
    --line: var(--rt-border);
    --text: var(--rt-text);
    --muted: var(--rt-text-muted);
    --yellow: var(--rt-yellow);
    --magenta: var(--rt-purple);
    --cyan: var(--rt-blue);
    --green: var(--rt-green);
    --danger: var(--rt-red);
    --radius: var(--rt-radius);
}

* {
    box-sizing: border-box;
}

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

body {
    margin: 0;
    background:
        linear-gradient(90deg, rgba(255, 210, 31, .035) 1px, transparent 1px),
        linear-gradient(180deg, rgba(50, 183, 255, .03) 1px, transparent 1px),
        var(--rt-bg);
    background-size: 56px 56px;
    color: var(--rt-text);
    font-family: "Segoe UI", Tahoma, Arial, sans-serif;
    letter-spacing: 0;
}

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

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

button {
    cursor: pointer;
}

html,
body,
body * {
    cursor: auto !important;
}

a,
button,
label,
select,
summary,
[role="button"] {
    cursor: pointer !important;
}

input,
textarea,
[contenteditable="true"] {
    cursor: text !important;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1,
h2,
h3,
.app-brand strong,
.eyebrow {
    letter-spacing: 0;
}

h1 {
    font-size: clamp(2rem, 5vw, 3.4rem);
    line-height: 1.05;
    font-weight: 950;
}

h2 {
    font-size: 1rem;
    line-height: 1.2;
    font-weight: 900;
}

h3 {
    font-size: .95rem;
    font-weight: 900;
}

small,
.muted,
.empty-state,
.section-heading span {
    color: var(--rt-text-muted);
}

.auth-layout {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 2rem;
}

.auth-page {
    width: min(1180px, 100%);
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(360px, .9fr);
    gap: 1rem;
    align-items: stretch;
}

.auth-hero,
.auth-card {
    border: 1px solid var(--rt-border);
    border-radius: var(--rt-radius);
    background: rgba(21, 24, 36, .96);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .03);
}

.auth-hero {
    min-height: 680px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 2rem;
    overflow: hidden;
    padding: 2rem;
}

.auth-brand {
    display: inline-flex;
    align-items: center;
    gap: .85rem;
    width: fit-content;
}

.auth-brand-mark {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: var(--rt-radius);
    background: var(--rt-yellow);
    color: #111;
    font-weight: 950;
    box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .18);
}

.auth-brand strong {
    display: block;
    color: var(--rt-yellow);
    font-weight: 950;
}

.auth-brand small {
    display: block;
    color: var(--rt-text);
    font-weight: 800;
}

.auth-kicker {
    display: inline-block;
    margin-bottom: .7rem;
    color: var(--rt-yellow);
    font-family: var(--rt-mono);
    font-size: .75rem;
    font-weight: 950;
    text-transform: uppercase;
}

.auth-hero h1 {
    max-width: 760px;
    margin-bottom: 1rem;
}

.auth-hero p,
.auth-card-header p {
    margin-bottom: 0;
    color: var(--rt-text-muted);
    line-height: 1.65;
}

.auth-feature-list {
    display: grid;
    gap: .75rem;
}

.auth-feature {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: .8rem;
    align-items: center;
    border: 1px solid var(--rt-border);
    border-radius: var(--rt-radius);
    background: var(--rt-bg-soft);
    padding: .85rem;
}

.auth-feature > span {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 210, 31, .45);
    border-radius: var(--rt-radius);
    color: var(--rt-yellow);
    font-family: var(--rt-mono);
    font-size: .74rem;
    font-weight: 950;
}

.auth-feature strong,
.auth-feature small {
    display: block;
}

.auth-feature small {
    margin-top: .2rem;
    color: var(--rt-text-muted);
}

.auth-platform-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .75rem;
}

.auth-platform-grid div {
    border: 1px solid var(--rt-border);
    border-radius: var(--rt-radius);
    background: var(--rt-card-strong);
    padding: .85rem;
}

.auth-platform-grid strong,
.auth-platform-grid span {
    display: block;
}

.auth-platform-grid strong {
    color: var(--rt-yellow);
}

.auth-platform-grid span {
    margin-top: .3rem;
    color: var(--rt-text-muted);
    font-size: .84rem;
}

.auth-card {
    display: grid;
    align-content: start;
    gap: 1.15rem;
    padding: 1.35rem;
}

.auth-card-header h2 {
    margin-bottom: .45rem;
    font-size: 1.45rem;
}

.auth-form {
    display: grid;
    gap: .85rem;
}

.auth-check {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    color: var(--rt-text);
    font-weight: 850;
}

.auth-check input {
    flex: 0 0 auto;
}

.auth-divider {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: .75rem;
    align-items: center;
    color: var(--rt-text-muted);
    font-family: var(--rt-mono);
    font-size: .72rem;
    font-weight: 950;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    height: 1px;
    background: var(--rt-border);
}

.auth-link-list {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem .85rem;
}

.auth-link-list a {
    color: var(--rt-blue);
    font-size: .9rem;
    font-weight: 850;
}

.auth-secondary-access {
    border-top: 1px solid var(--rt-border);
    padding-top: 1rem;
}

.auth-secondary-access h3 {
    margin-bottom: .75rem;
}

.hub-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
}

.hub-main {
    min-width: 0;
}

.hub-content {
    width: min(100%, 1440px);
    margin: 0 auto;
    padding: 1.75rem;
}

.app-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    border-right: 1px solid var(--rt-border);
    background: rgba(10, 12, 18, .98);
    padding: 1.1rem;
}

.app-brand {
    display: flex;
    align-items: center;
    gap: .8rem;
    min-height: 56px;
}

.app-brand-mark,
.brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: var(--rt-radius);
    background: var(--rt-yellow);
    color: #111;
    font-weight: 950;
    box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .18);
}

.app-brand strong,
.hub-brand strong {
    display: block;
    color: var(--rt-yellow);
    font-size: 1rem;
    text-transform: uppercase;
}

.app-brand small,
.hub-brand small {
    display: block;
    color: var(--rt-text);
    font-size: .78rem;
}

.app-nav {
    display: grid;
    gap: .4rem;
}

.app-nav-link,
.nav-link {
    display: flex;
    align-items: center;
    gap: .7rem;
    min-height: 46px;
    border: 1px solid transparent;
    border-radius: var(--rt-radius);
    color: var(--rt-text-muted);
    font-weight: 850;
    padding: .68rem .75rem;
}

.app-nav-link:hover,
.app-nav-link.active,
.nav-link:hover,
.nav-link.active {
    color: var(--rt-text);
    background: var(--rt-card);
    border-color: var(--rt-border);
}

.app-nav-link.active {
    color: #111;
    background: var(--rt-yellow);
    border-color: var(--rt-yellow);
}

.app-nav-icon {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border: 1px solid currentColor;
    border-radius: 6px;
    font-family: var(--rt-mono);
    font-size: .62rem;
    font-weight: 950;
}

.app-sidebar-footer {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    border-top: 1px solid var(--rt-border);
    padding-top: 1rem;
}

.app-topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border-bottom: 1px solid var(--rt-border);
    background: rgba(7, 8, 13, .94);
    padding: .8rem 1.75rem;
    backdrop-filter: blur(12px);
}

.topbar-search {
    width: min(620px, 52vw);
    display: flex;
    align-items: center;
    gap: .75rem;
    border: 1px solid var(--rt-border);
    border-radius: var(--rt-radius);
    background: var(--rt-bg-soft);
    color: var(--rt-text-muted);
    padding: .72rem .85rem;
}

.topbar-search span {
    color: var(--rt-yellow);
    font-family: var(--rt-mono);
    font-size: .68rem;
    font-weight: 950;
}

.topbar-search input {
    min-width: 0;
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--rt-text);
}

.topbar-actions,
.header-actions,
.hero-actions,
.action-row,
.post-actions,
.composer-actions,
.toolbar-row,
.filter-tabs,
.tab-list {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .7rem;
}

.topbar-actions {
    flex-wrap: nowrap;
}

.topbar-player-link {
    display: block;
}

.topbar-login {
    white-space: nowrap;
}

.icon-button {
    position: relative;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 1px solid var(--rt-border);
    border-radius: var(--rt-radius);
    background: var(--rt-card);
    color: var(--rt-text);
    font-family: var(--rt-mono);
    font-size: .68rem;
    font-weight: 950;
}

.notification-button strong {
    position: absolute;
    right: -5px;
    top: -6px;
    min-width: 20px;
    height: 20px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: var(--rt-red);
    color: #fff;
    font-size: .7rem;
}

.mobile-bottom-nav {
    display: none;
}

.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid var(--rt-border);
    padding-bottom: 1rem;
}

.page-header h1 {
    margin-bottom: .55rem;
}

.eyebrow {
    margin-bottom: .55rem;
    color: var(--rt-yellow);
    font-family: var(--rt-mono);
    font-size: .75rem;
    font-weight: 950;
    text-transform: uppercase;
}

.panel,
.rt-card,
.post-card,
.community-card,
.settings-section,
.package-tile,
.quick-tile,
.feature-grid div,
.detail-list div,
.record-row,
.leader-row,
.statement-row {
    border: 1px solid var(--rt-border);
    border-radius: var(--rt-radius);
    background: rgba(21, 24, 36, .96);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .03);
}

.panel,
.rt-card,
.post-card,
.community-card,
.settings-section {
    padding: 1rem;
    margin-bottom: 1rem;
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.section-heading h2 {
    margin-bottom: 0;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    min-height: 42px;
    border: 1px solid var(--rt-border);
    border-radius: var(--rt-radius);
    padding: .68rem .95rem;
    font-weight: 900;
    line-height: 1;
    text-align: center;
}

.btn-primary {
    border-color: var(--rt-yellow);
    background: var(--rt-yellow);
    color: #111;
}

.btn-secondary {
    border-color: var(--rt-border);
    background: var(--rt-card-strong);
    color: var(--rt-text);
}

.btn-ghost {
    background: transparent;
    color: var(--rt-text-muted);
}

.status-pill,
.tag,
.badge {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    border: 1px solid rgba(255, 210, 31, .45);
    border-radius: 999px;
    background: rgba(255, 210, 31, .1);
    color: var(--rt-yellow);
    font-family: var(--rt-mono);
    font-size: .72rem;
    font-weight: 950;
    padding: .35rem .65rem;
    text-transform: uppercase;
}

.arcade-status {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    color: var(--rt-text-muted);
    font-weight: 850;
    font-size: .82rem;
}

.arcade-status i {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: var(--rt-blue);
    box-shadow: 0 0 0 4px rgba(50, 183, 255, .12);
}

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

.arcade-status-success i {
    background: var(--rt-green);
    box-shadow: 0 0 0 4px rgba(77, 255, 136, .12);
}

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

.arcade-status-danger i {
    background: var(--rt-red);
    box-shadow: 0 0 0 4px rgba(255, 77, 77, .14);
}

.credit-badge {
    display: inline-flex;
    align-items: baseline;
    gap: .4rem;
    border: 1px solid rgba(255, 210, 31, .5);
    border-radius: var(--rt-radius);
    background: rgba(255, 210, 31, .1);
    color: var(--rt-yellow);
    padding: .55rem .75rem;
    font-family: var(--rt-mono);
    font-weight: 950;
    white-space: nowrap;
}

.credit-badge small {
    color: var(--rt-text);
    font-family: "Segoe UI", Tahoma, Arial, sans-serif;
    font-size: .78rem;
    font-weight: 800;
}

.player-badge {
    display: inline-flex;
    align-items: center;
    gap: .7rem;
    min-width: 0;
}

.player-avatar,
.profile-avatar,
.mini-avatar,
.community-avatar {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: var(--rt-radius);
    background: var(--avatar-color, var(--rt-yellow));
    color: #111;
    font-weight: 950;
}

.player-avatar {
    width: 42px;
    height: 42px;
}

.player-info {
    min-width: 0;
}

.player-info strong,
.player-info small {
    display: block;
}

.player-info strong {
    color: var(--rt-text);
    font-size: .9rem;
    white-space: nowrap;
}

.player-info small {
    color: var(--rt-text-muted);
    font-size: .76rem;
}

.player-badge-compact .player-info {
    display: none;
}

.content-grid {
    display: grid;
    gap: 1rem;
}

.details-layout {
    grid-template-columns: minmax(0, 1fr) 320px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 1rem;
    align-items: start;
}

.main-stack,
.side-stack,
.feed-main,
.feed-rail {
    min-width: 0;
}

.feed-stack,
.feed-rail,
.community-feed,
.record-list,
.leaderboard,
.statement-list,
.detail-list,
.settings-grid {
    display: grid;
    gap: .8rem;
}

.composer-card {
    display: flex;
    align-items: center;
    gap: .8rem;
}

.composer-input {
    min-height: 48px;
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    border: 1px solid var(--rt-border);
    border-radius: var(--rt-radius);
    background: var(--rt-bg-soft);
    color: var(--rt-text-muted);
    padding: .75rem .9rem;
}

.filter-tabs,
.tab-list {
    overflow-x: auto;
    padding-bottom: .2rem;
}

.filter-tabs button,
.tab-list button,
.tab-list a {
    border: 1px solid var(--rt-border);
    border-radius: 999px;
    background: var(--rt-bg-soft);
    color: var(--rt-text-muted);
    padding: .5rem .75rem;
    font-weight: 850;
    white-space: nowrap;
}

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

.post-card {
    display: grid;
    gap: .85rem;
}

.post-author {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
}

.post-author .status-pill {
    margin-left: auto;
}

.post-body {
    margin: 0;
    color: var(--rt-text);
    line-height: 1.55;
    white-space: pre-wrap;
}

.post-meta,
.card-meta,
.profile-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .55rem;
    color: var(--rt-text-muted);
    font-size: .84rem;
}

.post-visual {
    min-height: 170px;
    display: grid;
    place-items: center;
    border: 1px solid var(--rt-border);
    border-radius: var(--rt-radius);
    background:
        linear-gradient(135deg, rgba(255, 210, 31, .18) 0 16%, transparent 16% 100%),
        linear-gradient(45deg, rgba(50, 183, 255, .18) 0 12%, transparent 12% 100%),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, .05) 0 1px, transparent 1px 18px),
        #0a0d15;
    color: var(--rt-yellow);
    font-family: var(--rt-mono);
    font-weight: 950;
}

.mini-avatar {
    width: 44px;
    height: 44px;
    background: var(--rt-purple);
}

.stat-strip,
.quick-grid,
.feature-grid,
.package-grid,
.summary-grid,
.community-grid,
.highlight-grid,
.form-grid {
    display: grid;
    gap: .85rem;
}

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

.quick-grid,
.package-grid,
.summary-grid,
.highlight-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.stat-tile,
.quick-tile,
.feature-grid div,
.package-tile,
.detail-list div,
.record-row,
.leader-row,
.statement-row {
    padding: .9rem;
}

.stat-tile {
    border: 1px solid var(--rt-border);
    border-radius: var(--rt-radius);
    background: var(--rt-card-strong);
}

.stat-tile span,
.quick-tile span,
.package-tile span,
.detail-list span {
    display: block;
    color: var(--rt-yellow);
    font-family: var(--rt-mono);
    font-size: .72rem;
    font-weight: 950;
    text-transform: uppercase;
}

.stat-tile strong,
.quick-tile strong,
.feature-grid strong,
.package-tile strong,
.detail-list strong {
    display: block;
    margin: .25rem 0;
}

.machine-mini-card,
.ranking-mini-row,
.community-pill,
.notification-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    border: 1px solid var(--rt-border);
    border-radius: var(--rt-radius);
    background: var(--rt-bg-soft);
    padding: .75rem;
}

.ranking-mini-row strong {
    color: var(--rt-yellow);
    font-family: var(--rt-mono);
}

.notification-channel {
    display: block;
    margin-top: .35rem;
    font-family: var(--rt-mono);
    font-size: .72rem;
    font-weight: 900;
    text-transform: uppercase;
}

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

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

.notification-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: .5rem;
}

.hero-machine {
    border: 1px solid var(--rt-border);
    border-radius: var(--rt-radius);
    background: linear-gradient(180deg, #202637, #10141f);
    padding: 1rem;
}

.machine-screen {
    aspect-ratio: 4 / 3;
    display: grid;
    place-items: center;
    border: 1px solid rgba(50, 183, 255, .35);
    border-radius: 4px;
    background:
        repeating-linear-gradient(180deg, rgba(255, 255, 255, .045) 0 1px, transparent 1px 5px),
        #05080c;
    color: var(--rt-green);
    text-align: center;
}

.machine-screen strong {
    display: block;
    color: var(--rt-yellow);
    font-family: var(--rt-mono);
    font-size: 2rem;
}

.machine-controls {
    display: flex;
    justify-content: center;
    gap: .75rem;
    padding-top: 1rem;
}

.machine-controls span {
    width: 22px;
    height: 22px;
    border-radius: 999px;
    background: var(--rt-red);
    border: 2px solid rgba(255, 255, 255, .45);
}

.machine-controls span:nth-child(2) {
    background: var(--rt-blue);
}

.machine-controls span:nth-child(3) {
    background: var(--rt-yellow);
}

.community-toolbar {
    display: grid;
    gap: .75rem;
    margin-bottom: 1rem;
}

.search-field,
.community-textarea,
.comment-form input,
.form-control,
.input,
textarea.input,
select.input {
    width: 100%;
    border: 1px solid var(--rt-border);
    border-radius: var(--rt-radius);
    background: var(--rt-bg-soft);
    color: var(--rt-text);
    padding: .72rem .82rem;
}

.community-textarea {
    min-height: 132px;
    resize: vertical;
}

.search-field:focus,
.community-textarea:focus,
.comment-form input:focus,
.form-control:focus,
.input:focus {
    outline: 2px solid rgba(50, 183, 255, .45);
    outline-offset: 2px;
    box-shadow: none;
}

.community-card {
    display: grid;
    gap: .75rem;
    min-height: 100%;
}

.community-banner {
    min-height: 86px;
    border-radius: var(--rt-radius);
    border: 1px solid var(--rt-border);
    background:
        linear-gradient(135deg, rgba(255, 210, 31, .24) 0 18%, transparent 18% 100%),
        linear-gradient(45deg, rgba(168, 85, 247, .22) 0 16%, transparent 16% 100%),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, .06) 0 2px, transparent 2px 16px),
        var(--rt-bg-soft);
}

.community-avatar {
    width: 48px;
    height: 48px;
    margin-top: -34px;
    border: 3px solid var(--rt-card);
}

.profile-card {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.profile-avatar {
    width: 92px;
    height: 92px;
    font-size: 2rem;
}

.metric-inline {
    display: flex;
    align-items: baseline;
    gap: .6rem;
    margin: .8rem 0 1rem;
}

.metric-inline strong {
    color: var(--rt-yellow);
    font-family: var(--rt-mono);
    font-size: 2.4rem;
}

.record-row,
.leader-row,
.statement-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 1rem;
}

.leader-row .rank,
.rank {
    color: var(--rt-yellow);
    font-family: var(--rt-mono);
    font-weight: 950;
}

.credit-positive {
    color: var(--rt-green);
    font-family: var(--rt-mono);
    font-weight: 950;
}

.credit-negative {
    color: var(--rt-red);
    font-family: var(--rt-mono);
    font-weight: 950;
}

.map-layout {
    grid-template-columns: minmax(0, 1fr) 380px;
}

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

.map-panel {
    min-height: 620px;
}

.map-canvas {
    position: relative;
    min-height: 580px;
    overflow: hidden;
    border-radius: var(--rt-radius);
    background:
        linear-gradient(30deg, transparent 0 42%, rgba(255, 210, 31, .14) 43% 45%, transparent 46%),
        linear-gradient(150deg, transparent 0 50%, rgba(50, 183, 255, .18) 51% 53%, transparent 54%),
        linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px),
        linear-gradient(180deg, rgba(255, 255, 255, .04) 1px, transparent 1px),
        #0c1421;
    background-size: 260px 260px, 300px 300px, 44px 44px, 44px 44px, auto;
}

.map-pin {
    position: absolute;
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border: 3px solid rgba(255, 255, 255, .45);
    border-radius: 50% 50% 50% 8px;
    background: var(--rt-red);
    color: #111;
    rotate: -45deg;
}

.map-pin span {
    rotate: 45deg;
    font-family: var(--rt-mono);
    font-weight: 950;
}

.pin-0 {
    left: 58%;
    top: 28%;
}

.pin-1 {
    left: 32%;
    top: 48%;
    background: var(--rt-blue);
}

.pin-2 {
    left: 68%;
    top: 66%;
    background: var(--rt-yellow);
}

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

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

.phone-input {
    display: grid;
    grid-template-columns: minmax(150px, .6fr) minmax(0, 1fr);
    gap: .55rem;
    width: 100%;
}

.phone-input .input,
.phone-input .form-control {
    min-width: 0;
}

.field {
    display: grid;
    gap: .4rem;
}

.field label,
.toggle-row span {
    color: var(--rt-text);
    font-weight: 850;
}

.field-full {
    grid-column: 1 / -1;
}

.toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border-top: 1px solid var(--rt-border);
    padding: .85rem 0;
}

.switch {
    width: 48px;
    height: 28px;
    position: relative;
    flex: 0 0 auto;
}

.switch input {
    position: absolute;
    opacity: 0;
}

.switch i {
    position: absolute;
    inset: 0;
    border: 1px solid var(--rt-border);
    border-radius: 999px;
    background: var(--rt-bg-soft);
}

.switch i::after {
    content: "";
    position: absolute;
    left: 4px;
    top: 4px;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    background: var(--rt-text-muted);
    transition: transform .16s ease, background .16s ease;
}

.switch input:checked + i {
    border-color: var(--rt-yellow);
    background: rgba(255, 210, 31, .16);
}

.switch input:checked + i::after {
    transform: translateX(20px);
    background: var(--rt-yellow);
}

.oauth-button-list,
.oauth-status-list {
    display: grid;
    gap: .65rem;
}

.oauth-status-item {
    border: 1px solid var(--rt-border);
    border-radius: var(--rt-radius);
    background: var(--rt-bg-soft);
    padding: .75rem;
}

.alert-success,
.alert-danger {
    border-radius: var(--rt-radius);
    margin-bottom: 1rem;
    padding: .9rem 1rem;
    font-weight: 850;
}

.alert-success {
    border: 1px solid rgba(77, 255, 136, .5);
    background: rgba(77, 255, 136, .1);
    color: var(--rt-green);
}

.alert-danger {
    border: 1px solid rgba(255, 77, 77, .55);
    background: rgba(255, 77, 77, .12);
    color: var(--rt-red);
}

.w-100 {
    width: 100%;
}

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

.form-floating > label {
    color: #586176;
}

.form-check-input:checked {
    background-color: var(--rt-yellow);
    border-color: var(--rt-yellow);
}

#blazor-error-ui {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 1000;
    display: none;
    max-width: 520px;
    border: 1px solid rgba(255, 77, 77, .5);
    border-radius: var(--rt-radius);
    background: #3a1020;
    color: #fff;
    box-shadow: var(--rt-shadow);
    padding: .85rem 2.5rem .85rem 1rem;
}

#blazor-error-ui .dismiss {
    position: absolute;
    right: .8rem;
    top: .65rem;
    cursor: pointer;
}

@media (max-width: 1180px) {
    .auth-page {
        grid-template-columns: 1fr;
    }

    .auth-hero {
        min-height: auto;
    }

    .dashboard-grid,
    .details-layout,
    .map-layout,
    .community-layout {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 900px) {
    .auth-layout {
        display: block;
        padding: 1rem;
    }

    .auth-page {
        gap: .85rem;
    }

    .auth-hero,
    .auth-card {
        padding: 1rem;
    }

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

    .hub-shell {
        display: block;
    }

    .app-sidebar {
        display: none;
    }

    .app-topbar {
        min-height: 64px;
        padding: .7rem 1rem;
    }

    .topbar-search {
        width: auto;
        flex: 1 1 auto;
    }

    .topbar-search input {
        display: none;
    }

    .topbar-actions .credit-badge {
        display: none;
    }

    .hub-content {
        padding: 1rem 1rem 5.5rem;
    }

    .mobile-bottom-nav {
        position: fixed;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 30;
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        border-top: 1px solid var(--rt-border);
        background: rgba(7, 8, 13, .96);
        backdrop-filter: blur(12px);
    }

    .mobile-bottom-nav a {
        display: grid;
        place-items: center;
        gap: .2rem;
        min-height: 62px;
        color: var(--rt-text-muted);
        font-weight: 850;
    }

    .mobile-bottom-nav a.active {
        color: var(--rt-yellow);
    }

    .mobile-bottom-nav span {
        font-family: var(--rt-mono);
        font-size: .7rem;
    }

    .mobile-bottom-nav small {
        font-size: .66rem;
    }

    .page-header,
    .composer-card,
    .profile-card {
        align-items: stretch;
        flex-direction: column;
    }

    .header-actions {
        width: 100%;
    }

    .stat-strip,
    .quick-grid,
    .package-grid,
    .summary-grid,
    .highlight-grid,
    .settings-grid,
    .form-grid {
        grid-template-columns: 1fr;
    }

    .record-row,
    .leader-row,
    .statement-row {
        grid-template-columns: 1fr;
    }

    .post-author .status-pill {
        margin-left: 0;
    }

    .map-panel,
    .map-canvas {
        min-height: 420px;
    }
}

@media (max-width: 560px) {
    .feature-grid,
    .community-grid {
        grid-template-columns: 1fr;
    }

    .topbar-actions {
        gap: .45rem;
    }

    .notification-button {
        width: 38px;
        height: 38px;
    }

    .player-avatar {
        width: 38px;
        height: 38px;
    }
}

.os-login-grid {
    grid-template-columns: minmax(0, 720px);
}

.os-login-panel {
    max-width: 720px;
}

/* Arcade Retrorama Hub v2 -------------------------------------------------- */

::selection {
    background: var(--rt-purple);
    color: var(--rt-text);
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--rt-bg);
    background-image:
        linear-gradient(rgba(16, 18, 15, .07) 2px, transparent 2px),
        linear-gradient(90deg, rgba(16, 18, 15, .07) 2px, transparent 2px);
    background-size: 48px 48px;
    color: var(--rt-text);
    font-family: "Segoe UI", Tahoma, Arial, sans-serif;
}

h1,
h2,
h3,
.app-nav-copy strong,
.btn,
.status-pill,
.section-heading span,
.stat-tile span,
.credit-badge,
.eyebrow {
    font-family: var(--rt-mono);
}

h1,
h2,
h3 {
    color: var(--rt-text);
}

h1 {
    font-size: clamp(2.4rem, 5vw, 4.25rem);
    letter-spacing: -.045em;
    line-height: .88;
}

h2 {
    font-size: 1.25rem;
    letter-spacing: -.02em;
}

h3 {
    font-size: 1rem;
}

small,
.muted,
.empty-state,
.section-heading span {
    color: var(--rt-text-muted);
}

.hub-shell {
    grid-template-columns: 268px minmax(0, 1fr);
}

.hub-main {
    background: rgba(242, 230, 193, .92);
}

.hub-content {
    max-width: 1500px;
    padding: 2rem clamp(1rem, 2.3vw, 2rem) 4rem;
}

/* Shared pixel wordmark */

.hub-wordmark {
    align-items: center;
    color: inherit;
    display: inline-flex;
    gap: .8rem;
    text-decoration: none;
    width: fit-content;
}

.hub-wordmark__mark {
    background: transparent;
    border: 0;
    display: block;
    flex: 0 0 auto;
    height: 48px;
    position: relative;
    width: 48px;
}

.hub-wordmark__mark img {
    display: block;
    height: 100%;
    image-rendering: pixelated;
    object-fit: contain;
    width: 100%;
}

.hub-wordmark__copy {
    display: flex;
    flex-direction: column;
    line-height: .9;
}

.hub-wordmark__copy strong {
    color: var(--rt-yellow);
    font-family: var(--rt-mono);
    font-size: .92rem;
    letter-spacing: 0;
    line-height: 1.12;
}

.hub-wordmark__copy strong em {
    color: var(--rt-red);
    font-style: normal;
}

.hub-wordmark__copy small {
    color: var(--rt-blue);
    font-family: var(--rt-mono);
    font-size: .52rem;
    font-weight: 700;
    letter-spacing: .08em;
    margin-top: .38rem;
}

/* Application chrome */

.app-sidebar {
    background-color: #10120f;
    background-image: radial-gradient(#292c25 2px, transparent 2px);
    background-size: 22px 22px;
    border-right: 3px solid var(--rt-yellow);
    color: var(--rt-card);
    gap: 1.4rem;
    min-height: 0;
    overflow: hidden;
    padding: 1.35rem 1.15rem;
}

.app-brand {
    border-bottom: 3px solid var(--rt-card);
    flex: 0 0 auto;
    min-height: 78px;
    padding: 0 .25rem 1.25rem;
    width: 100%;
}

.app-brand .hub-wordmark__mark {
    color: var(--rt-card);
}

.app-nav-label {
    color: var(--rt-yellow);
    font-family: var(--rt-mono);
    font-size: .61rem;
    font-weight: 700;
    letter-spacing: .12em;
    padding: 0 .35rem;
}

.app-nav {
    align-content: start;
    flex: 1 1 auto;
    gap: .35rem;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding: .1rem .25rem .35rem 0;
    scrollbar-color: var(--rt-purple) #24271f;
    scrollbar-width: thin;
}

.app-nav-link {
    border: 2px solid transparent;
    border-radius: 0;
    color: #c8c1ad;
    gap: .7rem;
    min-height: 55px;
    padding: .55rem .6rem;
}

.app-nav-link:hover {
    background: #24271f;
    border-color: var(--rt-purple);
    box-shadow: 3px 3px 0 var(--rt-purple-dark);
    color: var(--rt-card);
}

.app-nav-link.active {
    background: var(--rt-purple);
    border-color: var(--rt-card);
    box-shadow: 4px 4px 0 var(--rt-purple-dark);
    color: var(--rt-text);
}

.app-nav-icon {
    border: 0;
    border-right: 2px solid currentColor;
    border-radius: 0;
    font-size: .7rem;
    height: 32px;
    width: 34px;
}

.app-nav-copy {
    display: flex;
    flex-direction: column;
    line-height: 1.05;
}

.app-nav-copy strong {
    color: inherit;
    font-size: .84rem;
}

.app-nav-copy small {
    color: inherit;
    font-size: .64rem;
    margin-top: .32rem;
    opacity: .65;
}

.app-sidebar-footer {
    border-top: 3px dotted #5d5f55;
    flex: 0 0 auto;
    padding: 1rem .25rem 0;
}

.app-sidebar-footer > small {
    color: #858777;
    font-family: var(--rt-mono);
    font-size: .6rem;
}

.app-topbar {
    backdrop-filter: none;
    background-color: var(--rt-text);
    background-image: radial-gradient(#292c25 1px, transparent 1px);
    background-size: 18px 18px;
    border-bottom: 3px solid var(--rt-yellow);
    color: var(--rt-card);
    min-height: 82px;
    padding: .8rem clamp(1rem, 2.3vw, 2rem);
}

.topbar-context {
    display: grid;
    gap: .32rem;
    min-width: 0;
}

.topbar-context span,
.topbar-context strong {
    font-family: var(--rt-mono);
}

.topbar-context span {
    align-items: center;
    color: #b9b29e;
    display: inline-flex;
    font-size: .58rem;
    gap: .45rem;
    letter-spacing: .06em;
}

.topbar-context span i {
    background: var(--rt-purple);
    display: inline-block;
    height: 8px;
    width: 8px;
}

.topbar-context strong {
    color: var(--rt-card);
    font-size: .78rem;
    letter-spacing: .02em;
}

.topbar-search {
    background: var(--rt-card);
    border: 3px solid var(--rt-text);
    border-radius: 0;
    color: var(--rt-text-muted);
    max-width: 620px;
    padding: .68rem .8rem;
}

.topbar-search:focus-within {
    border-color: var(--rt-purple);
    box-shadow: 4px 4px 0 var(--rt-purple);
}

.topbar-search span {
    border-right: 3px solid var(--rt-text);
    color: var(--rt-red);
    font-family: var(--rt-mono);
    padding-right: .75rem;
    white-space: nowrap;
}

.topbar-search input {
    color: var(--rt-text);
}

.topbar-search kbd {
    background: var(--rt-yellow);
    border: 2px solid var(--rt-text);
    border-radius: 0;
    box-shadow: none;
    color: var(--rt-text);
    font-family: var(--rt-mono);
    padding: .05rem .35rem;
}

.topbar-mode {
    align-items: center;
    color: var(--rt-card);
    display: inline-flex;
    font-family: var(--rt-mono);
    font-size: .65rem;
    font-weight: 700;
    gap: .45rem;
    white-space: nowrap;
}

.topbar-mode i,
.page-header__system i,
.auth-card__status i {
    background: var(--rt-blue);
    display: inline-block;
    height: 9px;
    width: 9px;
}

.icon-button {
    background: var(--rt-card);
    border: 3px solid var(--rt-text);
    border-radius: 0;
    color: var(--rt-red);
    font-family: var(--rt-mono);
    font-size: 1rem;
}

.icon-button:hover {
    background: var(--rt-card);
    border-color: var(--rt-card);
    box-shadow: 3px 3px 0 var(--rt-purple);
    color: var(--rt-red);
}

.credit-badge {
    align-items: center;
    background: var(--rt-text);
    border: 3px solid var(--rt-yellow);
    border-radius: 0;
    color: var(--rt-card);
    display: inline-flex;
    gap: .65rem;
    min-height: 48px;
    padding: .35rem .75rem;
}

.credit-badge .nes-icon {
    flex: 0 0 auto;
    margin: 0;
    transform: scale(.65);
}

.credit-badge > span {
    display: flex;
    flex-direction: column;
    line-height: .9;
}

.credit-badge strong {
    color: var(--rt-yellow);
    font-size: 1.15rem;
}

.credit-badge small {
    color: var(--rt-card);
    font-size: .55rem;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.player-badge {
    gap: .6rem;
}

.player-avatar,
.mini-avatar,
.profile-avatar,
.community-avatar {
    background: var(--avatar-color, var(--rt-purple));
    border: 3px solid var(--rt-text);
    border-radius: 0;
    box-shadow: 3px 3px 0 var(--rt-yellow);
    color: var(--rt-text);
    font-family: var(--rt-mono);
}

.player-info strong {
    color: var(--rt-text);
    font-family: var(--rt-mono);
}

.player-info small {
    color: var(--rt-text-muted);
}

.app-topbar .player-info strong {
    color: var(--rt-card);
}

.app-topbar .player-info small {
    color: #b9b29e;
}

.app-topbar .player-avatar {
    border-color: var(--rt-card);
    box-shadow: 3px 3px 0 var(--rt-purple);
}

/* Headers and controls */

.page-header {
    background: var(--rt-card);
    border: 2px solid var(--rt-border);
    box-shadow: 4px 4px 0 var(--rt-border);
    margin-bottom: 1.5rem;
    min-height: 170px;
    overflow: hidden;
    padding: 1.6rem;
    position: relative;
}

.page-header::before {
    background-image:
        linear-gradient(rgba(16, 18, 15, .06) 2px, transparent 2px),
        linear-gradient(90deg, rgba(16, 18, 15, .06) 2px, transparent 2px);
    background-size: 32px 32px;
    content: "";
    inset: 0;
    pointer-events: none;
    position: absolute;
}

.page-header__copy,
.header-actions {
    position: relative;
    z-index: 1;
}

.page-header__copy {
    max-width: 820px;
}

.page-header__system {
    align-items: center;
    color: var(--rt-text);
    display: flex;
    font-family: var(--rt-mono);
    font-size: .64rem;
    font-weight: 700;
    gap: .55rem;
    letter-spacing: .09em;
    margin-bottom: 1.4rem;
}

.page-header h1 {
    font-size: clamp(2.6rem, 5vw, 4.5rem);
    margin-bottom: .75rem;
}

.page-header .eyebrow {
    color: var(--rt-red);
    font-size: .7rem;
    margin-bottom: .6rem;
}

.page-header .muted {
    font-size: .95rem;
    line-height: 1.55;
    margin: 0;
    max-width: 680px;
}

.page-header__corner {
    border-left: 54px solid transparent;
    border-top: 54px solid var(--rt-red);
    position: absolute;
    right: 0;
    top: 0;
}

.header-actions {
    align-self: flex-end;
    justify-content: flex-end;
}

.btn {
    align-items: center;
    border: 2px solid var(--rt-border);
    border-radius: 0;
    box-shadow: inset -3px -3px rgba(16, 18, 15, .18);
    display: inline-flex;
    font-size: .75rem;
    font-weight: 700;
    justify-content: center;
    letter-spacing: .01em;
    min-height: 44px;
    padding: .62rem 1rem;
    text-transform: none;
}

.btn:hover {
    box-shadow: inset -3px -3px rgba(16, 18, 15, .18), 3px 3px 0 var(--rt-purple);
    filter: none;
    transform: none;
}

.btn:active {
    box-shadow: inset 3px 3px rgba(16, 18, 15, .18);
    transform: translate(1px, 1px);
}

.btn-primary,
.btn-primary:focus,
.btn-primary:hover {
    background: var(--rt-yellow);
    border-color: var(--rt-border);
    color: var(--rt-text);
}

.btn-secondary,
.btn-secondary:focus,
.btn-secondary:hover {
    background: var(--rt-card);
    border-color: var(--rt-border);
    color: var(--rt-text);
}

.btn-danger,
.btn-danger:hover {
    background: var(--rt-red);
    border-color: var(--rt-border);
    color: var(--rt-card);
}

.btn-link {
    border: 0;
    box-shadow: none;
    color: var(--rt-red);
}

.btn:disabled,
.btn.disabled {
    filter: grayscale(.65);
    opacity: .55;
    transform: none;
}

.status-pill,
.badge {
    background: var(--rt-yellow);
    border: 2px solid var(--rt-text);
    border-radius: 0;
    color: var(--rt-text);
    font-size: .62rem;
    font-weight: 700;
    padding: .35rem .5rem;
}

.arcade-status {
    border: 2px solid currentColor;
    border-radius: 0;
    color: var(--rt-text);
    font-family: var(--rt-mono);
    font-size: .58rem;
    letter-spacing: .04em;
}

.app-sidebar .arcade-status {
    color: var(--rt-card);
}

.arcade-status i {
    border-radius: 0;
}

.arcade-status-success i {
    background: var(--rt-blue);
}

/* Cards, dashboard and social surfaces */

.panel,
.post-card,
.community-card,
.settings-section {
    background: var(--rt-card);
    border: 2px solid var(--rt-border);
    border-radius: 0;
    box-shadow: 4px 4px 0 var(--rt-border);
    color: var(--rt-text);
    padding: 1.25rem;
}

.panel + .panel,
.settings-section + .settings-section {
    margin-top: 0;
}

.section-heading {
    border-bottom: 2px solid var(--rt-border);
    margin-bottom: 1rem;
    padding-bottom: .7rem;
}

.section-heading h2 {
    font-size: 1.12rem;
    margin: 0;
}

.section-heading span,
.section-heading a {
    color: var(--rt-red);
    font-family: var(--rt-mono);
    font-size: .65rem;
    font-weight: 700;
}

.stat-strip {
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-tile {
    background: var(--rt-card);
    border: 2px solid var(--rt-border);
    border-radius: 0;
    box-shadow: 4px 4px 0 var(--rt-border);
    min-height: 145px;
    padding: 1.1rem;
    position: relative;
}

.stat-tile::after {
    background: var(--rt-red);
    content: "";
    height: 10px;
    position: absolute;
    right: 12px;
    top: 12px;
    width: 10px;
}

.stat-tile:nth-child(1) {
    background: var(--rt-text);
    color: var(--rt-card);
}

.stat-tile:nth-child(1) small,
.stat-tile:nth-child(1) span {
    color: var(--rt-card);
}

.stat-tile:nth-child(2) {
    background: var(--rt-yellow);
}

.stat-tile:nth-child(2)::after { background: var(--rt-purple); }
.stat-tile:nth-child(3)::after { background: var(--rt-blue); }
.stat-tile:nth-child(4)::after { background: var(--rt-green); }

.stat-tile span {
    color: var(--rt-red);
    font-size: .65rem;
}

.stat-tile strong {
    display: block;
    font-family: var(--rt-mono);
    font-size: 2.5rem;
    line-height: 1;
    margin: 1rem 0 .35rem;
}

.dashboard-grid {
    gap: 1.4rem;
    grid-template-columns: minmax(0, 1fr) 350px;
}

.feed-stack,
.feed-rail,
.community-feed,
.record-list,
.leaderboard,
.statement-list,
.detail-list,
.settings-grid {
    gap: 1rem;
}

.composer-card {
    align-items: center;
    background: var(--rt-yellow);
    margin-bottom: 1.25rem;
}

.composer-input {
    background: var(--rt-card);
    border: 3px solid var(--rt-text);
    border-radius: 0;
    color: var(--rt-text-muted);
}

.post-card,
.community-post {
    gap: 1rem;
}

.post-author {
    border-bottom: 3px dotted var(--rt-text-muted);
    padding-bottom: .9rem;
}

.post-author strong,
.machine-mini-card strong,
.ranking-mini-row strong {
    font-family: var(--rt-mono);
}

.post-body {
    color: var(--rt-text);
    font-size: .95rem;
    line-height: 1.7;
}

.feed-empty-card {
    align-items: stretch;
    background: var(--rt-card);
    display: grid;
    gap: 1.5rem;
    grid-template-columns: minmax(0, 1fr) 210px;
    min-height: 320px;
    overflow: hidden;
    padding: 0;
}

.feed-empty-card__copy {
    align-self: center;
    padding: 1.8rem;
}

.feed-empty-card__copy .section-kicker {
    color: var(--rt-red);
    font-family: var(--rt-mono);
    font-size: .64rem;
    font-weight: 700;
}

.feed-empty-card__copy h2 {
    font-size: clamp(2rem, 4vw, 3.4rem);
    line-height: .85;
    margin: 1rem 0;
}

.feed-empty-card__copy p {
    color: var(--rt-text-muted);
    line-height: 1.6;
    max-width: 520px;
}

.feed-empty-card__art {
    align-items: center;
    background-color: var(--rt-text);
    background-image: radial-gradient(#34372f 2px, transparent 2px);
    background-size: 20px 20px;
    color: var(--rt-yellow);
    display: flex;
    flex-direction: column;
    font-family: var(--rt-mono);
    font-size: 1.5rem;
    justify-content: center;
    position: relative;
}

.feed-empty-card__art::before {
    border: 4px solid var(--rt-blue);
    content: "";
    height: 90px;
    position: absolute;
    width: 120px;
}

.feed-empty-card__art i {
    background: var(--rt-red);
    height: 12px;
    position: absolute;
    width: 12px;
}

.feed-empty-card__art i:nth-of-type(1) { left: 24px; top: 28px; }
.feed-empty-card__art i:nth-of-type(2) { background: var(--rt-purple); bottom: 32px; right: 25px; }
.feed-empty-card__art i:nth-of-type(3) { background: var(--rt-blue); right: 42px; top: 42px; }

.machine-mini-card,
.ranking-mini-row,
.community-pill,
.notification-row,
.detail-list > div,
.record-row,
.leader-row,
.statement-row {
    background: var(--rt-card-strong);
    border: 2px solid var(--rt-border);
    border-radius: 0;
    color: var(--rt-text);
}

.machine-mini-card:hover {
    background: var(--rt-yellow);
}

.ranking-mini-row strong,
.rank,
.metric-inline strong {
    color: var(--rt-red);
}

.detail-list span,
.stat-tile span {
    font-family: var(--rt-mono);
}

.detail-list strong {
    color: var(--rt-text);
    min-width: 0;
    overflow-wrap: anywhere;
}

.detail-list > div,
.main-stack,
.side-stack,
.side-stack > * {
    min-width: 0;
}

.main-stack,
.side-stack {
    align-content: start;
    display: grid;
    gap: 1rem;
}

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

.community-card {
    background: var(--rt-card);
    min-height: 380px;
}

.community-card:hover {
    border-color: var(--rt-purple-dark);
    box-shadow: 4px 4px 0 var(--rt-purple);
    transform: none;
}

.community-banner {
    background-color: var(--rt-text);
    background-image:
        linear-gradient(135deg, var(--rt-yellow) 0 18%, transparent 18%),
        linear-gradient(45deg, var(--rt-red) 0 12%, transparent 12%),
        radial-gradient(var(--rt-blue) 2px, transparent 2px);
    background-size: auto, auto, 18px 18px;
    border: 2px solid var(--rt-border);
    border-radius: 0;
    min-height: 128px;
}

.community-avatar {
    border-color: var(--rt-card);
    margin-top: -42px;
}

.community-textarea,
.comment-form input,
.search-field,
.input,
.form-control,
textarea.input,
select.input,
.phone-country-select {
    background: var(--rt-field);
    border: 2px solid var(--rt-border);
    border-radius: 0;
    color: var(--rt-text);
    min-height: 48px;
}

.community-textarea:focus,
.comment-form input:focus,
.search-field:focus,
.input:focus,
.form-control:focus,
textarea.input:focus,
select.input:focus,
.phone-country-select:focus {
    background: var(--rt-field);
    border-color: var(--rt-purple);
    box-shadow: 3px 3px 0 var(--rt-purple);
    color: var(--rt-text);
    outline: 0;
}

.comment-list {
    border-left: 4px solid var(--rt-blue);
    padding-left: 1rem;
}

.comment-row {
    background: var(--rt-card-strong);
    border-bottom: 2px solid var(--rt-text);
    padding: .75rem;
}

.comment-form {
    align-items: stretch;
}

/* Map, records, profile and wallet */

.map-layout,
.details-layout,
.community-layout {
    gap: 1.4rem;
}

.map-canvas {
    background-color: var(--rt-card-strong);
    background-image:
        linear-gradient(rgba(16, 18, 15, .12) 2px, transparent 2px),
        linear-gradient(90deg, rgba(16, 18, 15, .12) 2px, transparent 2px);
    background-size: 38px 38px;
    border: 2px solid var(--rt-border);
    border-radius: 0;
    display: grid;
    place-items: center;
    position: relative;
}

.map-canvas::before {
    border: 4px dashed var(--rt-blue);
    content: "";
    inset: 28px;
    pointer-events: none;
    position: absolute;
}

.map-canvas > .empty-state {
    background: var(--rt-card);
    border: 2px solid var(--rt-border);
    box-shadow: 4px 4px 0 var(--rt-purple);
    color: var(--rt-text);
    font-family: var(--rt-mono);
    margin: 0 2rem;
    max-width: 430px;
    padding: 1.25rem;
    position: relative;
    text-align: center;
    z-index: 1;
}

.map-pin {
    background: var(--rt-yellow);
    border: 2px solid var(--rt-border);
    border-radius: 0;
    box-shadow: 3px 3px 0 var(--rt-red);
    color: var(--rt-text);
}

.map-pin:hover {
    background: var(--rt-purple);
    border-color: var(--rt-border);
    box-shadow: 3px 3px 0 var(--rt-purple-dark);
    transform: translate(-50%, -50%);
}

.profile-card {
    align-items: flex-start;
}

.profile-avatar {
    flex: 0 0 auto;
}

.profile-meta {
    border-top: 3px dotted var(--rt-text);
    margin-top: .8rem;
    padding-top: .8rem;
}

.record-row,
.leader-row,
.statement-row {
    border-width: 3px;
    padding: 1rem;
}

.leader-row:first-child {
    background: var(--rt-yellow);
    box-shadow: 5px 5px 0 var(--rt-purple);
}

.credit-positive { color: #277d42; }
.credit-negative { color: var(--rt-red); }

.hero-machine {
    background: var(--rt-text);
    border: 4px solid var(--rt-text);
    border-radius: 0;
    box-shadow: 7px 7px 0 var(--rt-yellow);
}

.machine-screen {
    border: 4px solid var(--rt-blue);
    border-radius: 0;
    color: var(--rt-green);
}

.machine-controls span {
    border: 3px solid var(--rt-card);
    border-radius: 0;
}

/* Settings and feedback */

.settings-grid {
    gap: 1.4rem;
}

.settings-section {
    box-shadow: 4px 4px 0 var(--rt-border);
}

.field span,
.toggle-row strong,
.form-label,
.control-label {
    color: var(--rt-text);
    font-family: var(--rt-mono);
    font-size: .73rem;
    font-weight: 700;
}

.input[readonly],
.form-control[readonly] {
    background: var(--rt-field-readonly);
    color: var(--rt-text-muted);
}

.toggle-row {
    background: var(--rt-card-strong);
    border: 2px solid var(--rt-border);
    border-radius: 0;
}

.switch i {
    background: var(--rt-text-muted);
    border: 2px solid var(--rt-border);
    border-radius: 0;
}

.switch i::after {
    border-radius: 0;
}

.switch input:checked + i {
    background: var(--rt-purple);
}

.alert,
.alert-danger,
.alert-success,
.alert-warning,
.alert-info {
    border: 4px solid var(--rt-text);
    border-radius: 0;
    box-shadow: 5px 5px 0 var(--rt-text);
    color: var(--rt-text);
    margin-bottom: 1.25rem;
    padding: 1rem;
}

.alert-danger { background: #ffd7d2; }
.alert-success { background: #d6f0dd; }
.alert-warning { background: #ffefb5; }
.alert-info { background: #d8f0f4; }

.empty-state {
    line-height: 1.6;
}

/* Authentication */

.auth-layout {
    background-color: var(--rt-text);
    background-image:
        linear-gradient(#292c25 2px, transparent 2px),
        linear-gradient(90deg, #292c25 2px, transparent 2px);
    background-size: 48px 48px;
    padding: 2.5rem;
}

.auth-page {
    align-items: stretch;
    background: var(--rt-card);
    border: 2px solid var(--rt-card);
    box-shadow: 7px 7px 0 var(--rt-purple);
    gap: 0;
    grid-template-columns: minmax(0, 1.08fr) minmax(390px, .92fr);
    max-width: 1280px;
}

.auth-hero,
.auth-card {
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.auth-hero {
    background-color: var(--rt-bg);
    background-image:
        linear-gradient(rgba(16, 18, 15, .07) 2px, transparent 2px),
        linear-gradient(90deg, rgba(16, 18, 15, .07) 2px, transparent 2px);
    background-size: 40px 40px;
    color: var(--rt-text);
    gap: 1.8rem;
    justify-content: flex-start;
    min-height: 860px;
    padding: 2.25rem;
    position: relative;
}

.auth-card {
    background: var(--rt-card);
    border-left: 2px solid var(--rt-border);
    color: var(--rt-text);
    padding: 2.5rem;
}

.auth-card-brand {
    display: none;
}

.auth-brand .hub-wordmark__mark {
    color: var(--rt-text);
}

.auth-brand .hub-wordmark__copy strong {
    color: var(--rt-yellow-dark);
}

.auth-brand .hub-wordmark__copy strong em {
    color: var(--rt-red);
}

.auth-brand .hub-wordmark__copy small {
    color: #237f91;
}

.auth-hero__copy {
    max-width: 650px;
}

.auth-kicker {
    color: var(--rt-red);
    font-family: var(--rt-mono);
    font-size: .68rem;
    letter-spacing: .08em;
}

.auth-hero h1 {
    color: var(--rt-text);
    font-family: var(--rt-mono);
    font-size: clamp(3.2rem, 5vw, 5.4rem);
    letter-spacing: -.055em;
    line-height: .78;
    margin-bottom: 1.25rem;
}

.auth-hero h1 em {
    color: var(--rt-red);
    font-style: normal;
    position: relative;
}

.auth-hero h1 em::after {
    background: var(--rt-yellow);
    bottom: -.08em;
    content: "";
    height: .12em;
    left: 0;
    position: absolute;
    width: 100%;
}

.auth-hero__copy > p {
    color: var(--rt-text-muted);
    line-height: 1.65;
    max-width: 590px;
}

.auth-visual {
    height: 205px;
    margin: -.25rem 0;
    overflow: hidden;
    position: relative;
}

.auth-visual__orbit {
    border: 3px dashed var(--rt-blue);
    height: 170px;
    left: 65px;
    position: absolute;
    top: 15px;
    transform: rotate(-3deg);
    width: 72%;
}

.auth-visual__ticket {
    background: var(--rt-card);
    border: 2px solid var(--rt-border);
    box-shadow: 4px 4px 0 var(--rt-purple);
    display: flex;
    flex-direction: column;
    left: 105px;
    min-width: 230px;
    padding: 1rem;
    position: absolute;
    top: 42px;
    transform: rotate(2deg);
}

.auth-visual__ticket small,
.auth-visual__ticket em {
    color: var(--rt-red);
    font-family: var(--rt-mono);
    font-size: .62rem;
    font-style: normal;
    font-weight: 700;
}

.auth-visual__ticket strong {
    color: var(--rt-text);
    font-family: var(--rt-mono);
    font-size: 2.2rem;
    line-height: 1;
    margin: .65rem 0;
}

.auth-visual__stick {
    background: var(--rt-yellow);
    border: 2px solid var(--rt-border);
    bottom: 18px;
    height: 88px;
    position: absolute;
    right: 55px;
    width: 100px;
}

.auth-visual__stick::before {
    background: var(--rt-red);
    border: 2px solid var(--rt-border);
    content: "";
    height: 28px;
    left: 17px;
    position: absolute;
    top: 12px;
    width: 28px;
}

.auth-visual__stick i {
    background: var(--rt-text);
    bottom: 17px;
    height: 7px;
    position: absolute;
    right: 14px;
    width: 34px;
}

.auth-visual__pixel {
    background: var(--rt-red);
    height: 16px;
    position: absolute;
    width: 16px;
}

.auth-visual__pixel--one { left: 34px; top: 40px; }
.auth-visual__pixel--two { background: var(--rt-blue); right: 15px; top: 20px; }

.auth-visual--register .auth-visual__ticket {
    box-shadow: 7px 7px 0 var(--rt-blue);
}

.auth-feature-list {
    display: grid;
    gap: .75rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.auth-feature {
    align-items: flex-start;
    background: var(--rt-card);
    border: 2px solid var(--rt-border);
    border-radius: 0;
    display: grid;
    gap: .55rem;
    grid-template-columns: 1fr;
    padding: .85rem;
}

.auth-feature > span {
    background: var(--rt-blue);
    border: 2px solid var(--rt-text);
    border-radius: 0;
    color: var(--rt-text);
    font-family: var(--rt-mono);
    height: 28px;
    width: 34px;
}

.auth-feature:nth-child(2) > span { background: var(--rt-yellow); }
.auth-feature:nth-child(3) > span { background: var(--rt-red); color: var(--rt-card); }

.auth-feature strong {
    color: var(--rt-text);
    font-family: var(--rt-mono);
    font-size: .72rem;
}

.auth-feature small {
    color: var(--rt-text-muted);
    font-size: .68rem;
    line-height: 1.45;
}

.auth-hero__footer {
    align-items: center;
    color: var(--rt-text);
    display: flex;
    font-family: var(--rt-mono);
    font-size: .62rem;
    font-weight: 700;
    gap: .55rem;
    margin: auto 0 0;
}

.auth-hero__footer span {
    background: var(--rt-purple);
    height: 10px;
    width: 10px;
}

.auth-card-header {
    border-bottom: 2px solid var(--rt-border);
    margin-bottom: 1.5rem;
    padding-bottom: 1.25rem;
}

.auth-card-header h2 {
    color: var(--rt-text);
    font-size: clamp(2.4rem, 4vw, 3.6rem);
    margin: .25rem 0 .65rem;
}

.auth-card-header p {
    color: var(--rt-text-muted);
    line-height: 1.55;
}

.auth-form {
    gap: 1rem;
}

.form-floating > .form-control {
    height: 58px;
}

.form-floating > label {
    color: var(--rt-text-muted);
}

.auth-check {
    color: var(--rt-text);
    font-family: var(--rt-mono);
    font-size: .72rem;
}

.form-check-input {
    background-color: var(--rt-field);
    border: 2px solid var(--rt-border);
    border-radius: 0 !important;
}

.form-check-input:checked {
    background-color: var(--rt-purple);
    border-color: var(--rt-border);
}

.auth-divider {
    color: var(--rt-text-muted);
    font-family: var(--rt-mono);
}

.auth-divider::before,
.auth-divider::after {
    border-color: var(--rt-text);
}

.auth-link-list {
    border-top: 3px dotted var(--rt-text-muted);
    gap: .8rem;
    padding-top: 1rem;
}

.auth-link-list a {
    color: #16778a;
    font-family: var(--rt-mono);
    font-size: .7rem;
}

.auth-link-list a:hover {
    color: var(--rt-red);
}

.auth-link-list--single {
    margin-top: 1.25rem;
}

.auth-secondary-access {
    border-top: 2px solid var(--rt-border);
    margin-top: 1.4rem;
    padding-top: 1.2rem;
}

.auth-secondary-access h3 {
    color: var(--rt-text);
}

.oauth-status-list {
    gap: .65rem;
}

.oauth-status-item {
    background: var(--rt-card-strong);
    border: 2px solid var(--rt-border);
    border-radius: 0;
    color: var(--rt-text);
    overflow-wrap: anywhere;
}

.oauth-status-item strong {
    color: var(--rt-text);
    font-family: var(--rt-mono);
}

.auth-card__status {
    align-items: center;
    border-top: 3px dotted var(--rt-text-muted);
    color: var(--rt-text-muted);
    display: flex;
    font-family: var(--rt-mono);
    font-size: .58rem;
    gap: .5rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
}

/* Other Identity pages retain the same system */

.auth-layout > h1 {
    color: var(--rt-card);
    max-width: 980px;
    width: 100%;
}

.auth-layout > .row,
.auth-layout > form,
.auth-layout > section,
.auth-layout > div:not(.auth-page):not(#blazor-error-ui) {
    background: var(--rt-card);
    border: 2px solid var(--rt-border);
    box-shadow: 6px 6px 0 var(--rt-purple);
    color: var(--rt-text);
    max-width: 980px;
    padding: 2rem;
    width: 100%;
}

.nav-pills .nav-link {
    color: var(--rt-text);
}

.nav-pills .nav-link.active {
    background: var(--rt-purple);
    border-color: var(--rt-border);
    color: var(--rt-text);
}

/* Mobile */

@media (max-width: 1180px) {
    .hub-shell {
        grid-template-columns: 228px minmax(0, 1fr);
    }

    .app-sidebar {
        padding-inline: .8rem;
    }

    .app-nav-copy small,
    .topbar-mode {
        display: none;
    }

    .dashboard-grid {
        grid-template-columns: minmax(0, 1fr) 310px;
    }

    .auth-page {
        grid-template-columns: 1fr 430px;
    }

    .auth-feature-list {
        grid-template-columns: 1fr;
    }

    .auth-feature {
        grid-template-columns: 38px 1fr;
    }
}

@media (max-width: 960px) {
    .hub-shell {
        display: block;
    }

    .app-sidebar {
        display: none;
    }

    .app-topbar {
        padding-inline: 1rem;
    }

    .topbar-search {
        width: min(470px, 55vw);
    }

    .hub-content {
        padding: 1.5rem 1rem 7.5rem;
    }

    .mobile-bottom-nav {
        background: var(--rt-text);
        border: 0;
        border-top: 4px solid var(--rt-yellow);
        bottom: 0;
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        left: 0;
        padding: .45rem .45rem max(.45rem, env(safe-area-inset-bottom));
        position: fixed;
        right: 0;
        z-index: 100;
    }

    .mobile-bottom-nav a {
        border: 2px solid transparent;
        color: #a7a997;
        display: grid;
        gap: .22rem;
        justify-items: center;
        padding: .45rem .2rem;
    }

    .mobile-bottom-nav a.active {
        background: var(--rt-yellow);
        border-color: var(--rt-card);
        color: var(--rt-text);
    }

    .mobile-bottom-nav span {
        font-family: var(--rt-mono);
        font-size: .7rem;
    }

    .mobile-bottom-nav small {
        color: inherit;
        font-size: .58rem;
    }

    .dashboard-grid,
    .details-layout,
    .map-layout,
    .community-layout {
        grid-template-columns: 1fr;
    }

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

    .auth-layout {
        padding: 1.5rem;
    }

    .auth-page {
        grid-template-columns: 1fr;
        max-width: 760px;
    }

    .auth-hero {
        min-height: auto;
    }

    .auth-card {
        border-left: 0;
        border-top: 4px solid var(--rt-text);
    }

    .auth-feature-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

@media (max-width: 720px) {
    h1 {
        font-size: 2.6rem;
    }

    .app-topbar {
        min-height: 68px;
    }

    .topbar-search {
        flex: 0 0 48px;
        max-width: none;
        width: 48px;
    }

    .topbar-search span {
        border: 0;
        font-size: 0;
        padding: 0;
    }

    .topbar-search span::after {
        content: "⌕";
        font-size: 1.4rem;
    }

    .topbar-search input,
    .topbar-search kbd {
        display: none;
    }

    .player-badge-compact {
        display: none;
    }

    .page-header {
        align-items: stretch;
        box-shadow: 5px 5px 0 var(--rt-yellow);
        flex-direction: column;
        min-height: 0;
        padding: 1.35rem;
    }

    .page-header h1 {
        font-size: 2.8rem;
    }

    .header-actions {
        align-self: stretch;
        justify-content: flex-start;
        width: 100%;
    }

    .header-actions .btn {
        flex: 1 1 auto;
    }

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

    .stat-tile {
        min-height: 125px;
    }

    .stat-tile strong {
        font-size: 2rem;
    }

    .feed-rail,
    .community-grid,
    .settings-grid,
    .form-grid {
        grid-template-columns: 1fr;
    }

    .feed-empty-card {
        grid-template-columns: 1fr;
    }

    .feed-empty-card__art {
        min-height: 180px;
    }

    .composer-card {
        align-items: stretch;
        flex-direction: column;
    }

    .panel,
    .post-card,
    .community-card,
    .settings-section {
        box-shadow: 4px 4px 0 var(--rt-text);
        padding: 1rem;
    }

    .auth-layout {
        display: block;
        padding: 0;
    }

    .auth-page {
        border: 0;
        box-shadow: none;
    }

    .auth-page > .auth-hero {
        display: none;
    }

    .auth-hero,
    .auth-card {
        padding: 1.35rem;
    }

    .auth-card {
        border: 0;
        min-height: 100dvh;
    }

    .auth-card-brand {
        display: inline-flex;
        margin-bottom: 2rem;
    }

    .auth-card-brand .hub-wordmark__copy strong {
        color: var(--rt-yellow-dark);
    }

    .auth-card-brand .hub-wordmark__copy strong em {
        color: var(--rt-red);
    }

    .auth-hero h1 {
        font-size: clamp(3.1rem, 14vw, 4.6rem);
    }

    .auth-visual__orbit {
        left: 20px;
        width: 80%;
    }

    .auth-visual__ticket {
        left: 45px;
        min-width: 200px;
    }

    .auth-visual__stick {
        right: 12px;
    }

    .auth-feature-list {
        grid-template-columns: 1fr;
    }

    .auth-feature {
        grid-template-columns: 38px 1fr;
    }

    .auth-card-header h2 {
        font-size: 2.8rem;
    }

    .notification-actions {
        justify-content: flex-start;
    }

    .record-row,
    .leader-row,
    .statement-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 440px) {
    .topbar-actions .credit-badge {
        display: inline-flex;
        min-width: 68px;
        padding-inline: .4rem;
    }

    .credit-badge .nes-icon,
    .credit-badge small {
        display: none;
    }

    .topbar-player-link {
        display: none;
    }

    .stat-strip {
        grid-template-columns: 1fr;
    }

    .auth-visual__ticket {
        left: 20px;
    }

    .auth-visual__stick {
        opacity: .75;
        right: -18px;
    }
}

/* Arcade Retrorama suite alignment // 2026 ------------------------------- */

body {
    overflow-x: hidden;
}

code,
kbd,
pre,
samp,
.technical,
.metric-inline,
.detail-list strong,
.record-row,
.leader-row,
.statement-row {
    font-family: "Cascadia Mono", Consolas, monospace;
}

:where(a, button, input, textarea, select, summary):focus-visible {
    outline: 3px solid var(--rt-purple);
    outline-offset: 2px;
}

.app-nav::-webkit-scrollbar {
    width: 8px;
}

.app-nav::-webkit-scrollbar-track {
    background: #24271f;
}

.app-nav::-webkit-scrollbar-thumb {
    background: var(--rt-purple);
    border: 2px solid #24271f;
}

.topbar-actions {
    min-width: 0;
}

.app-topbar .credit-badge,
.app-topbar .icon-button,
.app-topbar .btn {
    flex: 0 0 auto;
}

.icon-button {
    border-width: 2px;
    box-shadow: inset -3px -3px rgba(16, 18, 15, .16);
}

.filter-tabs button,
.tab-list button,
.tab-list a,
.nav-pills .nav-link {
    background: var(--rt-card-strong);
    border: 2px solid var(--rt-border);
    border-radius: 0;
    box-shadow: inset -3px -3px rgba(16, 18, 15, .14);
    color: var(--rt-text);
    font-family: var(--rt-mono);
    font-size: .68rem;
    min-height: 40px;
}

.filter-tabs button:hover,
.tab-list button:hover,
.tab-list a:hover,
.nav-pills .nav-link:hover {
    background: var(--rt-card-strong);
    border-color: var(--rt-purple-dark);
    box-shadow: inset -3px -3px rgba(16, 18, 15, .14), 3px 3px 0 var(--rt-purple);
    color: var(--rt-text);
}

.filter-tabs .active,
.tab-list .active,
.nav-pills .nav-link.active,
.btn[aria-pressed="true"] {
    background: var(--rt-purple);
    border-color: var(--rt-border);
    box-shadow: inset -3px -3px rgba(16, 18, 15, .16), 3px 3px 0 var(--rt-purple-dark);
    color: var(--rt-text);
}

.community-textarea,
.comment-form input,
.search-field,
.input,
.form-control,
textarea.input,
select.input,
.phone-country-select,
.form-select {
    background-color: var(--rt-field);
    border: 2px solid var(--rt-border);
    border-radius: 0;
    color: var(--rt-text);
    font-family: "Segoe UI", Tahoma, Arial, sans-serif;
}

.community-textarea:hover,
.comment-form input:hover,
.search-field:hover,
.input:hover,
.form-control:hover,
textarea.input:hover,
select.input:hover,
.phone-country-select:hover,
.form-select:hover {
    background-color: var(--rt-field);
    border-color: var(--rt-border);
    color: var(--rt-text);
}

.community-textarea:focus,
.comment-form input:focus,
.search-field:focus,
.input:focus,
.form-control:focus,
textarea.input:focus,
select.input:focus,
.phone-country-select:focus,
.form-select:focus {
    background-color: var(--rt-field) !important;
    border-color: var(--rt-purple-dark) !important;
    box-shadow: 3px 3px 0 var(--rt-purple) !important;
    color: var(--rt-text);
    outline: 0;
}

.input[readonly],
.form-control[readonly],
.form-control:disabled,
.form-select:disabled {
    background-color: var(--rt-field-readonly);
    color: var(--rt-text-muted);
    opacity: 1;
}

input::placeholder,
textarea::placeholder {
    color: #625d4d;
    opacity: 1;
}

select option {
    background: var(--rt-card);
    color: var(--rt-text);
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
select:-webkit-autofill {
    -webkit-text-fill-color: var(--rt-text) !important;
    box-shadow: 0 0 0 1000px var(--rt-field) inset, 3px 3px 0 var(--rt-purple) !important;
    caret-color: var(--rt-text);
}

.form-floating > label,
.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
    color: var(--rt-text-muted);
}

.form-floating > label::after {
    background: transparent !important;
}

.form-check-input:checked,
.switch input:checked + i {
    background-color: var(--rt-purple);
    border-color: var(--rt-border);
}

.switch input:checked + i::after {
    background: var(--rt-card);
}

.alert,
.alert-danger,
.alert-success,
.alert-warning,
.alert-info {
    border: 2px solid var(--rt-border);
    box-shadow: 3px 3px 0 var(--rt-border);
}

.main-stack,
.side-stack,
.feed-stack,
.feed-rail,
.community-feed,
.record-list,
.leaderboard,
.statement-list,
.detail-list,
.notification-list {
    gap: 1rem;
}

.notification-list {
    display: grid;
}

.machine-mini-card,
.ranking-mini-row,
.community-pill,
.notification-row,
.detail-list > div,
.record-row,
.leader-row,
.statement-row,
.toggle-row,
.auth-feature,
.oauth-status-item {
    border-color: var(--rt-border);
    border-width: 2px;
}

.auth-visual--register .auth-visual__ticket {
    box-shadow: 4px 4px 0 var(--rt-blue);
}

.auth-layout .nav-pills {
    gap: .5rem;
}

.auth-layout .nav-pills .nav-link {
    width: 100%;
}

#blazor-error-ui {
    background: var(--rt-card);
    border: 2px solid var(--rt-red);
    box-shadow: 4px 4px 0 var(--rt-red);
    color: var(--rt-text);
    font-family: "Segoe UI", Tahoma, Arial, sans-serif;
}

#blazor-error-ui .reload {
    color: var(--rt-purple-dark);
    font-family: var(--rt-mono);
    font-weight: 700;
}

.simple-auth-card {
    max-width: 660px !important;
    overflow: hidden;
    padding: 2rem !important;
}

.simple-auth-card::before {
    background: repeating-linear-gradient(135deg, var(--rt-yellow) 0 12px, var(--rt-text) 12px 24px);
    content: "";
    display: block;
    height: 11px;
    margin: -2rem -2rem 1.6rem;
}

.simple-auth-card .auth-card-header h1 {
    font-size: clamp(1.8rem, 5vw, 3rem);
    line-height: 1.08;
}

.simple-auth-card > p:last-child,
.simple-auth-card > a:last-child {
    margin-bottom: 0;
}

.simple-auth-card a:not(.btn) {
    color: var(--rt-purple-dark);
    font-family: var(--rt-mono);
    font-weight: 700;
}

.account-manage {
    display: grid;
    gap: 1.25rem;
}

.account-manage__header,
.account-manage__nav,
.account-manage__content {
    background: var(--rt-card);
    border: 2px solid var(--rt-border);
    box-shadow: 4px 4px 0 var(--rt-border);
}

.account-manage__header {
    overflow: hidden;
    padding: 1.5rem;
    position: relative;
}

.account-manage__header::after {
    border-left: 42px solid transparent;
    border-top: 42px solid var(--rt-red);
    content: "";
    position: absolute;
    right: 0;
    top: 0;
}

.account-manage__header h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    line-height: 1;
    margin: .45rem 0 .7rem;
}

.account-manage__header p {
    color: var(--rt-text-muted);
    margin: 0;
}

.account-manage__grid {
    align-items: start;
    display: grid;
    gap: 1.25rem;
    grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
}

.account-manage__nav {
    background-color: var(--rt-text);
    background-image: radial-gradient(#292c25 1px, transparent 1px);
    background-size: 18px 18px;
    padding: .8rem;
    position: sticky;
    top: 104px;
}

.account-manage__nav .nav-pills {
    margin: 0;
}

.account-manage__nav .nav-link {
    background: transparent;
    border-color: transparent;
    box-shadow: none;
    color: #c8c1ad;
    justify-content: flex-start;
    margin: 0;
    text-align: left;
}

.account-manage__nav .nav-link:hover {
    background: #24271f;
    border-color: var(--rt-purple);
    box-shadow: 3px 3px 0 var(--rt-purple-dark);
    color: var(--rt-card);
}

.account-manage__nav .nav-link.active,
.account-manage__nav .nav-link.active:hover {
    background: var(--rt-purple);
    border-color: var(--rt-card);
    box-shadow: 3px 3px 0 var(--rt-purple-dark);
    color: var(--rt-text);
}

.account-manage__content {
    min-width: 0;
    padding: 1.5rem;
}

.account-manage__content > h2:first-child {
    border-bottom: 2px solid var(--rt-border);
    font-size: 1.35rem;
    margin-bottom: 1.25rem;
    padding-bottom: .8rem;
}

.account-manage__content .auth-form,
.account-manage__content form {
    display: grid;
    gap: 1rem;
}

.account-manage__content .btn + .btn,
.account-manage__content form + form {
    margin-top: .75rem;
}

.account-manage__content .table {
    --bs-table-bg: var(--rt-card-strong);
    --bs-table-border-color: var(--rt-border);
    --bs-table-color: var(--rt-text);
    border: 2px solid var(--rt-border);
    color: var(--rt-text);
    margin-bottom: 1.25rem;
}

.account-manage__content .table > :not(caption) > * > * {
    background: var(--rt-card-strong);
    border-bottom-width: 2px;
    box-shadow: none;
    color: var(--rt-text);
    padding: .8rem;
}

.recovery-code {
    background: var(--rt-text);
    color: var(--rt-yellow);
    display: inline-block;
    margin: .2rem 0;
    padding: .45rem .6rem;
}

@media (max-width: 960px) {
    .mobile-bottom-nav {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    .mobile-bottom-nav a:hover {
        background: #24271f;
        border-color: var(--rt-purple);
        color: var(--rt-card);
    }

    .mobile-bottom-nav a.active,
    .mobile-bottom-nav a.active:hover {
        background: var(--rt-purple);
        border-color: var(--rt-card);
        box-shadow: inset -3px -3px rgba(16, 18, 15, .18);
        color: var(--rt-text);
    }

    .account-manage__grid {
        grid-template-columns: 1fr;
    }

    .account-manage__nav {
        position: static;
    }

    .account-manage__nav .nav-pills {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .page-header {
        box-shadow: 4px 4px 0 var(--rt-border);
    }

    .panel,
    .post-card,
    .community-card,
    .settings-section {
        box-shadow: 3px 3px 0 var(--rt-border);
    }

    .auth-card {
        border-top: 2px solid var(--rt-border);
    }

    .topbar-context span {
        display: none;
    }

    .topbar-context strong {
        font-size: .68rem;
    }

    .mobile-bottom-nav small {
        font-size: .52rem;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

@media (max-width: 520px) {
    .app-topbar {
        gap: .55rem;
        padding-inline: .7rem;
    }

    .topbar-context strong {
        font-size: .6rem;
    }

    .topbar-actions {
        gap: .45rem;
    }

    .topbar-actions .credit-badge {
        display: none;
    }

    .topbar-login {
        min-height: 40px;
        padding-inline: .65rem;
    }

    .simple-auth-card {
        border-inline: 0 !important;
        padding: 1.35rem !important;
    }

    .simple-auth-card::before {
        margin: -1.35rem -1.35rem 1.3rem;
    }

    .account-manage__header,
    .account-manage__content {
        padding: 1.1rem;
    }

    .account-manage__nav .nav-pills {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}
