body {
    margin: 0;
    min-height: 100vh;
    font-family: Verdana, Helvetica, Arial, sans-serif;
    background:
        radial-gradient(circle at top, rgba(181, 116, 27, 0.14), transparent 28%),
        linear-gradient(180deg, #221d18 0%, #0d0d0f 100%);
    color: #f0f0f0;
}

body.async-ui-busy::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    z-index: 10000;
    background: linear-gradient(90deg, #6f3d00 0%, #d99318 50%, #6f3d00 100%);
    animation: async-ui-progress 1.1s linear infinite;
}

body.async-ui-busy [data-async-shell],
body.async-ui-busy [data-async-mobile-drawer] {
    opacity: 0.72;
    transition: opacity 0.14s ease;
    pointer-events: none;
}

@keyframes async-ui-progress {
    0% {
        transform: translateX(-35%);
    }

    100% {
        transform: translateX(35%);
    }
}

.app-header {
    margin: 0 auto 12px;
    max-width: 1520px;
    padding: 14px 18px 0;
}

#logo-image {
    display: flex;
    justify-content: center;
}

#logo-image img {
    display: block;
    width: min(100%, 560px);
    height: auto;
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.28));
}

.page-shell {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 22px;
    max-width: 1520px;
    margin: 0 auto;
    padding: 0 18px 40px;
}

.page-shell-wide {
    align-items: start;
}

.mobile-drawer {
    display: none;
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.sidebar-section {
    margin: 0;
}

.sidebar-section-body {
    display: block;
}

.sidebar-mobile-toggle {
    display: none;
}

.player-card,
.nav-card,
.cooldown-card {
    background: linear-gradient(180deg, rgba(29, 26, 24, 0.98) 0%, rgba(18, 18, 20, 0.98) 100%);
    border: 1px solid #4b3a25;
    box-shadow: 0 16px 30px rgba(0, 0, 0, 0.18);
    padding: 16px;
}

.player-card p {
    margin: 0 0 7px;
}

.health-meter {
    margin: 0 0 12px;
}

.health-meter-inline {
    margin: 0;
    min-width: 180px;
}

.health-meter-label {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 4px;
    color: #f0dfc0;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.health-meter-track {
    position: relative;
    height: 12px;
    overflow: hidden;
    background: #1a1a1b;
    border: 1px solid #58452f;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.38);
}

.health-meter-fill {
    height: 100%;
    background: linear-gradient(180deg, #59b848 0%, #2d7f1f 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.player-card h3,
.cooldown-card h4 {
    margin-top: 0;
    margin-bottom: 10px;
}

.player-card h3,
.cooldown-card h4,
.section-card-title {
    padding-left: 0;
    background: none;
    line-height: 1.2;
}

.player-card h3 {
    color: #fff4df;
    font-size: 22px;
}

.sidebar-avatar {
    position: relative;
    margin-bottom: 12px;
    text-align: center;
}

.sidebar-avatar img {
    width: 118px;
    height: 148px;
    object-fit: cover;
    background: #232323;
    border: 1px solid #444;
}

.sidebar-avatar.is-jailed img {
    filter: grayscale(0.35) brightness(0.78);
}

.avatar-status-overlay {
    position: absolute;
    left: 50%;
    bottom: 12px;
    transform: translateX(-50%);
    min-width: 108px;
    padding: 6px 10px;
    border: 1px solid #b62e26;
    background: rgba(86, 9, 9, 0.9);
    color: #fff3f1;
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
}

.player-status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    margin: 0 0 12px;
    padding: 0 10px;
    border: 1px solid #4a4139;
    background: rgba(35, 33, 32, 0.94);
    color: #efefef;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.player-status-pill-jailed {
    border-color: #b62e26;
    background: rgba(86, 9, 9, 0.9);
    color: #fff3f1;
}

.player-status-pill-admin {
    border-color: #0e6c9a;
    background: rgba(10, 52, 77, 0.92);
    color: #e7f7ff;
}

.nav-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-card a,
.country-tabs a {
    color: #f6f6f6;
    text-decoration: none;
    background: rgba(35, 33, 32, 0.94);
    border: 1px solid #4a4139;
    padding: 10px 12px;
}

.nav-card a.active,
.country-tabs a.active {
    border-color: #d28000;
    background: linear-gradient(180deg, #4d3412 0%, #2e2011 100%);
}

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

.main-content-wide #text_container,
.main-content-wide .text_container {
    width: 100%;
    max-width: none;
}

.main-content-wide .userprof,
.main-content-wide .auth-table {
    width: 100%;
}

.main-content-wide .userprof.userprof-compact,
.main-content-wide .auth-table.userprof-compact,
.userprof.userprof-compact {
    width: auto;
    max-width: 100%;
    display: inline-table;
    vertical-align: top;
    margin: 0 0 14px;
}

.auth-shell {
    max-width: 1440px;
    margin: 0 auto;
    padding: 6px 18px 38px;
}

.auth-grid {
    display: grid;
    grid-template-columns: minmax(620px, 820px) minmax(360px, 420px);
    justify-content: center;
    gap: 28px;
    align-items: start;
}

.auth-content {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.auth-hero-card,
.auth-form-shell {
    border: 1px solid #4f3a20;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.24);
}

.auth-hero-card {
    padding: 24px 24px 22px;
    background:
        radial-gradient(circle at top left, rgba(179, 114, 27, 0.18), transparent 36%),
        linear-gradient(180deg, rgba(28, 25, 22, 0.98) 0%, rgba(15, 15, 17, 0.99) 100%);
}

.auth-copy-kicker {
    margin-bottom: 10px;
    color: #e0b86e;
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.auth-hero-card h1 {
    margin: 0 0 10px;
    color: #fff3dc;
    font-size: 40px;
    line-height: 1.02;
}

.auth-copy-lead {
    max-width: 720px;
    margin: 0 0 18px;
    color: #d9cec0;
    font-size: 17px;
    line-height: 1.6;
}

.auth-live-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.auth-live-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-height: 88px;
    padding: 14px 14px 12px;
    border: 1px solid #4a3d2c;
    background: rgba(18, 18, 19, 0.88);
}

.auth-live-card-accent {
    border-color: #a96d18;
    background: linear-gradient(180deg, rgba(82, 53, 18, 0.84) 0%, rgba(26, 19, 12, 0.96) 100%);
}

.auth-live-value {
    color: #fff4df;
    font-size: 28px;
    font-weight: bold;
    line-height: 1;
}

.auth-live-label {
    color: #d3c4b1;
    font-size: 12px;
    line-height: 1.45;
}

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

.auth-feature-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 94px;
    padding: 14px;
    border: 1px solid #413325;
    background: rgba(13, 13, 15, 0.78);
}

.auth-feature-card strong {
    color: #fff2db;
    font-size: 14px;
}

.auth-feature-card span {
    color: #c8bcad;
    font-size: 13px;
    line-height: 1.5;
}

.auth-form-shell {
    padding: 20px;
    background: linear-gradient(180deg, rgba(23, 21, 19, 0.98) 0%, rgba(11, 11, 13, 0.98) 100%);
}

.funeral-shell {
    max-width: 1200px;
    margin: 0 auto;
    padding: 18px 18px 48px;
}

.funeral-content {
    min-width: 0;
}

.funeral-view {
    display: flex;
    justify-content: center;
}

.funeral-card {
    width: min(100%, 760px);
    padding: 34px 30px;
    border: 1px solid #504030;
    background:
        radial-gradient(circle at top, rgba(136, 18, 14, 0.15), transparent 28%),
        linear-gradient(180deg, rgba(20, 19, 18, 0.98) 0%, rgba(10, 10, 12, 0.99) 100%);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.32);
    text-align: center;
}

.funeral-kicker {
    margin-bottom: 10px;
    color: #d0b284;
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.funeral-card h1 {
    margin: 0 0 8px;
    color: #fff2de;
    font-size: 40px;
}

.funeral-subtitle {
    margin: 0 0 24px;
    color: #d2c7bb;
    font-size: 18px;
}

.funeral-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 24px;
    text-align: left;
}

.funeral-meta > div {
    padding: 10px 12px;
    border: 1px solid #3d3228;
    background: rgba(25, 24, 24, 0.88);
}

.funeral-quote {
    margin-bottom: 22px;
    padding: 18px;
    border: 1px solid #46362a;
    background: rgba(14, 14, 16, 0.9);
}

.funeral-quote p {
    margin: 0 0 10px;
    color: #ccbca9;
}

.funeral-quote blockquote {
    margin: 0;
    color: #fff2de;
    font-size: 22px;
    line-height: 1.45;
}

.funeral-actions,
.funeral-wait {
    margin-top: 14px;
}

.funeral-wait {
    color: #dfd4c8;
    font-weight: bold;
}

.auth-panel {
    padding: 0;
}

.auth-brand-panel {
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(26, 24, 23, 0.96) 0%, rgba(13, 13, 15, 0.98) 100%);
    border: 1px solid #5d4522;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.auth-brand-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at top right, rgba(160, 31, 22, 0.22), transparent 34%),
        linear-gradient(135deg, rgba(203, 151, 81, 0.12), transparent 42%);
    pointer-events: none;
}

.auth-brand-panel > * {
    position: relative;
    z-index: 1;
}

.auth-brand-badge {
    display: inline-block;
    padding: 5px 9px;
    border: 1px solid #8f6932;
    background: rgba(92, 53, 11, 0.35);
    color: #f4d29c;
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

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

.auth-brand-stat {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 12px;
    border: 1px solid #4d3b28;
    background: rgba(18, 18, 18, 0.76);
}

.auth-brand-stat strong {
    color: #fff2de;
    font-size: 24px;
    line-height: 1;
}

.auth-brand-stat span {
    color: #d8c7ab;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.auth-brand-character {
    display: block;
    width: 100%;
    max-width: 290px;
    height: auto;
    margin: 0 auto;
}

.auth-brand-panel h2 {
    margin: 0;
    color: #fff4df;
    font-size: 30px;
    line-height: 1.1;
}

.auth-brand-panel p {
    margin: 0;
    color: #d5c8ba;
    line-height: 1.55;
}

.auth-brand-points {
    display: grid;
    gap: 8px;
}

.auth-brand-point {
    padding: 10px 12px;
    border: 1px solid #443427;
    background: rgba(16, 16, 18, 0.74);
    color: #ecd9bb;
    line-height: 1.5;
}

.auth-brand-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.auth-brand-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border: 1px solid #443a2a;
    background: rgba(18, 18, 18, 0.76);
    color: #f0d9b0;
    font-size: 12px;
}

.auth-table {
    width: 100%;
    max-width: 720px;
}

.auth-panel h3 {
    margin: 0 0 10px;
    color: #fff3dd;
    font-size: 30px;
}

.auth-panel > p {
    margin: 0 0 16px;
    color: #d3c4b1;
    line-height: 1.6;
}

.auth-table input[type="text"],
.auth-table input[type="email"],
.auth-table input[type="password"] {
    width: 100%;
    max-width: 340px;
    box-sizing: border-box;
}

.auth-switch {
    margin-top: 16px;
}

.form-errors {
    margin: 0 0 16px;
    padding: 12px 14px;
    border: 1px solid #933;
    background: #331919;
    color: #ffd7d7;
}

.flash-message {
    margin: 0 0 16px;
    padding: 12px 14px;
    border: 1px solid #4c4c4c;
    background: #262626;
}

.flash-success {
    border-color: #4e8f37;
    background: #1e3217;
    color: #dff3d6;
}

.flash-error {
    border-color: #933;
    background: #331919;
    color: #ffd7d7;
}

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

.country-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ownership-summary {
    font-size: 11px;
    line-height: 1.45;
}

.ownership-summary span {
    display: block;
    color: #d7d7d7;
}

.jail-roster-table,
.jail-log-table {
    border: 1px solid #41372d;
    background: #0f0f11;
}

.jail-grid-two {
    align-items: start;
}

.drugs-grid-two {
    align-items: start;
}

.oc-grid-two {
    align-items: start;
}

.oc-summary-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.oc-summary-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px;
    border: 1px solid #443627;
    background: linear-gradient(180deg, rgba(24, 21, 18, 0.98) 0%, rgba(14, 14, 16, 0.98) 100%);
}

.oc-summary-card strong {
    color: #fff2de;
    font-size: 26px;
    line-height: 1;
}

.oc-summary-card span {
    color: #d7c5ab;
    font-size: 12px;
    line-height: 1.4;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.oc-summary-card-accent {
    border-color: #9a6922;
    background: linear-gradient(180deg, rgba(82, 53, 18, 0.9) 0%, rgba(26, 19, 12, 0.98) 100%);
}

.oc-panel {
    margin-bottom: 12px;
}

.oc-job-cell strong {
    color: #fff3dc;
}

.oc-meta-line {
    display: inline-block;
    margin-top: 4px;
    color: #cab89d;
    font-size: 11px;
}

.oc-job-details {
    line-height: 1.55;
}

.oc-badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.oc-badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 8px;
    border: 1px solid #4b3d2e;
    background: rgba(18, 18, 19, 0.82);
    color: #e8d5b8;
    font-size: 11px;
}

.oc-badge-accent {
    border-color: #9a6922;
    color: #ffe2a6;
}

.oc-payout-line {
    color: #d9cec0;
}

.oc-team-pill {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 10px;
    border: 1px solid #514330;
    background: rgba(21, 21, 23, 0.94);
    color: #f2e4c9;
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 0.06em;
}

.oc-members-line {
    min-width: 220px;
    color: #ddd2c1;
    line-height: 1.45;
}

.oc-status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 10px;
    border: 1px solid #5b4630;
    background: rgba(34, 27, 20, 0.94);
    color: #f2e0bd;
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.oc-status-pill-ready {
    border-color: #8d6a24;
    background: rgba(84, 58, 18, 0.94);
    color: #fff1cf;
}

.oc-status-pill-success {
    border-color: #2f7d35;
    background: rgba(21, 67, 24, 0.92);
    color: #e4ffe2;
}

.oc-status-pill-failed {
    border-color: #8c322b;
    background: rgba(76, 19, 17, 0.92);
    color: #ffe5e1;
}

.oc-result-copy {
    margin-top: 6px;
    color: #cfc2b0;
    line-height: 1.45;
}

.oc-action-cell {
    min-width: 150px;
}

.oc-action-stack {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.oc-inline-form {
    gap: 6px;
}

.jail-roster-table .jail-roster-title,
.jail-log-table .jail-roster-title {
    background: linear-gradient(180deg, #db9b29 0%, #a86100 100%);
    color: #fff7ea;
    font-size: 13px;
}

.jail-roster-table .jail-roster-heading,
.jail-log-table .jail-roster-heading {
    background: linear-gradient(180deg, #db9b29 0%, #a86100 100%);
    color: #fff1d7;
    font-size: 11px;
}

.jail-prisoner-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.jail-prisoner-cell img {
    width: 42px;
    height: 52px;
    object-fit: cover;
    border: 1px solid #5c4831;
    background: #1b1b1d;
}

.jail-prisoner-meta {
    margin-top: 2px;
    color: #adadad;
    font-size: 10px;
}

.jail-action-cell {
    width: 84px;
    text-align: center;
    white-space: nowrap;
}

.jail-action-button {
    min-width: 58px;
    padding: 4px 8px;
}

.sidebar-compact {
    position: sticky;
    top: 12px;
    max-height: calc(100vh - 24px);
    overflow-y: auto;
    padding-right: 4px;
}

.nav-left {
    gap: 16px;
}

.nav-left-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(91, 72, 44, 0.45);
}

.nav-left-group:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

.nav-left-group-collapsible {
    margin: 0;
}

.nav-left-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

.section-card-title {
    margin-bottom: 10px;
    color: #f4cd8b;
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-weight: bold;
}

.section-card-title-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 0;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.section-card-title-toggle::-webkit-details-marker {
    display: none;
}

.section-card-title-toggle::after {
    content: "+";
    color: #fff0d3;
    font-size: 14px;
    line-height: 1;
    letter-spacing: 0;
}

.nav-left-group[open] > .section-card-title-toggle::after,
.mobile-drawer-group[open] > .section-card-title-toggle::after {
    content: "-";
}

.cooldown-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 4px 0;
    border-bottom: 1px solid #2e2e2e;
}

.cooldown-row:last-child {
    border-bottom: none;
}

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

.plot-card {
    background: #151515;
    border: 2px solid #444;
    padding: 10px;
    min-height: 88px;
}

.plot-number {
    font-weight: bold;
    margin-bottom: 6px;
}

.plot-owner,
.plot-building {
    font-size: 11px;
    color: #d7d7d7;
}

.domination-map-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 18px;
    align-items: start;
}

.domination-top-grid {
    align-items: start;
}

.domination-map-shell-wide {
    grid-template-columns: minmax(0, 1fr) 260px;
}

.domination-map-canvas {
    position: relative;
    min-height: 700px;
    padding: 18px;
    background:
        radial-gradient(circle at top, rgba(160, 114, 45, 0.08), transparent 35%),
        linear-gradient(180deg, rgba(10, 10, 11, 0.95) 0%, rgba(18, 18, 19, 0.98) 100%);
    border: 1px solid #2f2f30;
    overflow: hidden;
}

.domination-map-track {
    position: relative;
    min-width: max-content;
}

.domination-land-underlay,
.domination-land-grid-clickable {
    position: absolute;
    top: 0;
    left: 0;
    display: grid;
}

.domination-land-underlay {
    gap: 0;
    z-index: 0;
}

.domination-land-underlay-cell {
    background: linear-gradient(180deg, rgba(111, 82, 41, 0.34) 0%, rgba(71, 49, 22, 0.28) 100%);
    box-shadow: inset 0 0 0 1px rgba(198, 149, 78, 0.08);
}

.domination-map-panel,
.domination-legend-panel {
    background: #171717;
    border: 1px solid #3b3b3b;
    padding: 14px;
}

.domination-map-title {
    font-weight: bold;
    margin-bottom: 6px;
}

.domination-map-subtitle {
    color: #c7c7c7;
    font-size: 12px;
    margin-bottom: 14px;
}

.domination-land-grid {
    display: grid;
    gap: 6px;
    justify-content: start;
}

.domination-land-grid-clickable {
    z-index: 1;
    gap: 6px;
    justify-content: start;
}

.domination-plot {
    display: block;
    position: relative;
    min-height: 92px;
    background: #111;
    border: 2px solid #555;
    padding: 16px 8px 8px;
    overflow: hidden;
}

.domination-plot-link {
    text-decoration: none;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12);
    transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

.domination-plot-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 18px rgba(0, 0, 0, 0.24);
}

.domination-plot-selected {
    box-shadow: 0 0 0 2px #f0b449 inset, 0 12px 22px rgba(0, 0, 0, 0.26);
}

.domination-plot-band {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 8px;
}

.domination-plot-id {
    font-weight: bold;
    font-size: 12px;
    margin-bottom: 6px;
}

.domination-plot-owner,
.domination-plot-building,
.domination-plot-crew {
    display: block;
    font-size: 10px;
    line-height: 1.3;
    color: #e5e5e5;
}

.domination-plot-building {
    color: #f1c27a;
}

.domination-plot-crew {
    margin-top: 4px;
    color: #bdbdbd;
}

.domination-plot-empty .domination-plot-building,
.domination-plot-empty .domination-plot-owner,
.domination-plot-empty .domination-plot-crew {
    color: #9a9a9a;
}

.domination-mobile-picker {
    display: none;
    background: #171717;
    border: 1px solid #3b3b3b;
    padding: 12px;
}

.domination-mobile-picker-strip {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
}

.domination-mobile-plot-chip {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 88px;
    padding: 8px 10px;
    text-decoration: none;
    background: #111;
    border: 2px solid #4a4a4a;
    color: #f1f1f1;
}

.domination-mobile-plot-chip.is-selected {
    box-shadow: 0 0 0 2px #f0b449 inset;
}

.domination-mobile-plot-id {
    font-weight: bold;
    font-size: 12px;
}

.domination-mobile-plot-owner {
    font-size: 10px;
    color: #c9c9c9;
    line-height: 1.25;
}

.domination-legend-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 4px;
}

.domination-legend-row {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: flex-start;
    padding: 2px 0;
}

.domination-legend-row strong {
    margin-left: auto;
}

.color-swatch {
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-right: 8px;
    vertical-align: middle;
    border: 1px solid #222;
}

.crew-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 180px;
    background: linear-gradient(135deg, #2d2d2d, #161616);
    border: 1px dashed #666;
    color: #cfcfcf;
}

.avatar-section {
    margin-top: 18px;
}

.avatar-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 240px;
    gap: 18px;
    align-items: start;
}

.avatar-group {
    margin-top: 18px;
}

.avatar-group.is-hidden {
    display: none;
}

.avatar-group-title {
    margin-bottom: 10px;
    font-weight: bold;
}

.avatar-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.avatar-option {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px;
    border: 1px solid #4a4a4a;
    background: #171717;
    cursor: pointer;
    text-align: center;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.avatar-option.selected {
    border-color: #d28000;
    box-shadow: 0 0 0 2px #d28000 inset;
    background: #21180d;
    transform: translateY(-1px);
}

.avatar-option:hover {
    border-color: #b6b6b6;
}

.avatar-option input {
    display: none;
}

.avatar-option img {
    width: 120px;
    height: 150px;
    object-fit: cover;
    background: #232323;
    border: 1px solid #4a4036;
}

.avatar-selected-label {
    display: none;
    position: absolute;
    top: 8px;
    right: 8px;
    background: #d28000;
    color: #fff;
    font-size: 10px;
    line-height: 1;
    padding: 4px 6px;
    border-radius: 2px;
    text-transform: uppercase;
}

.avatar-option.selected .avatar-selected-label {
    display: inline-block;
}

.avatar-preview-card {
    background: #1a1a1a;
    border: 1px solid #3b3b3b;
    padding: 14px;
    text-align: center;
}

.avatar-preview-title {
    margin-bottom: 12px;
    font-weight: bold;
}

.avatar-preview-card img {
    width: 160px;
    height: 200px;
    object-fit: cover;
    background: #232323;
    border: 1px solid #444;
}

.avatar-preview-name {
    margin-top: 10px;
    font-weight: bold;
}

.avatar-preview-help {
    margin-top: 6px;
    color: #c8c8c8;
    font-size: 12px;
}

.profile-grid {
    align-items: start;
}

.profile-avatar-cell {
    background: #171717;
}

.profile-avatar {
    width: 180px;
    height: 225px;
    object-fit: cover;
    background: #232323;
    border: 1px solid #444;
    margin: 8px 0;
}

.profile-property-value {
    color: #ffb21a;
}

.players-list-avatar {
    width: 38px;
    height: 48px;
    object-fit: cover;
    background: #1c1c1e;
    border: 1px solid #5a4730;
}

.players-list-table td {
    vertical-align: middle;
}

.players-started {
    color: #f4d29c;
    font-weight: bold;
}

.online-indicator {
    color: #5fdc63;
    font-weight: bold;
}

.inbox-toolbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 14px;
}

.userprof.inbox-compose-table td.footer,
.userprof.inbox-compose-table td.header {
    background: #171719 !important;
}

.inbox-compose-grid,
.inbox-compose-grid tbody,
.inbox-compose-grid tr,
.inbox-compose-grid td {
    border-collapse: collapse;
    background: transparent !important;
    color: #efe7da !important;
}

.inbox-compose-grid td {
    padding: 0 0 12px;
    vertical-align: top;
}

.inbox-compose-grid td:first-child {
    width: 180px;
    padding-right: 14px;
}

.inbox-compose-form input[type="text"],
.inbox-compose-form textarea {
    background: #1f1a15 !important;
    border: 1px solid #8a6b33 !important;
    color: #fff3dc !important;
}

.inbox-compose-form input[type="text"]::placeholder,
.inbox-compose-form textarea::placeholder {
    color: #bca98c;
}

.inbox-compose-meta {
    margin-top: 6px;
    color: #cebfa9;
    font-size: 11px;
    line-height: 1.45;
}

.inline-form {
    display: inline;
}

.trade-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.trade-form input[type="number"] {
    width: 84px;
}

.link-button {
    background: none;
    border: none;
    color: #f0f0f0;
    padding: 0;
    margin-top: 10px;
    text-decoration: underline;
    cursor: pointer;
    font: inherit;
}

.notification-body {
    margin-bottom: 6px;
}

textarea,
input,
button {
    font: inherit;
}

.crew-config-form input[type="text"],
.crew-config-form input[type="number"],
.crew-config-form select,
.crew-config-form textarea {
    width: 100%;
    max-width: 420px;
    box-sizing: border-box;
    padding: 8px 10px;
    border: 1px solid #6b542f;
    background: linear-gradient(180deg, #1f1b17 0%, #151310 100%);
    color: #f3ead9;
}

.crew-config-form textarea {
    min-height: 92px;
    resize: vertical;
}

.crew-config-form select {
    max-width: 300px;
}

.crew-color-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.crew-color-row .crew-color-text {
    width: 160px;
    max-width: 160px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.crew-color-row .crew-color-picker {
    width: 54px;
    min-width: 54px;
    height: 40px;
    padding: 2px;
    border: 1px solid #8e6a2e;
    background: #120f0b;
    cursor: pointer;
}

.crew-grid-two {
    align-items: start;
}

.crew-config-cell {
    background: #151311 !important;
}

.crew-config-form table,
.crew-config-form tr,
.crew-config-form td {
    background: transparent !important;
    border: none !important;
}

.crew-config-form table {
    border-collapse: collapse;
}

.crew-config-form td {
    padding: 0 0 12px;
    vertical-align: top;
}

.crew-config-form td:first-child {
    width: 180px;
    padding-right: 14px;
    color: #e7d7bc;
    font-weight: bold;
}

.crew-config-form td:last-child {
    color: #f3ead9;
}

.crew-grid-two .userprof .header {
    padding-top: 7px;
    padding-bottom: 7px;
}

.embedded-form-table,
.embedded-form-table tr,
.embedded-form-table td {
    background: transparent !important;
    border: none !important;
}

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

.embedded-form-table td {
    padding: 0 0 12px;
    vertical-align: top;
    color: #f3ead9;
}

.embedded-form-table td:first-child {
    width: 180px;
    padding-right: 14px;
    color: #e7d7bc;
    font-weight: bold;
}

.embedded-form-table input[type="text"],
.embedded-form-table input[type="number"],
.embedded-form-table input[type="email"],
.embedded-form-table input[type="password"],
.embedded-form-table select,
.embedded-form-table textarea {
    box-sizing: border-box;
    padding: 8px 10px;
    border: 1px solid #6b542f;
    background: linear-gradient(180deg, #1f1b17 0%, #151310 100%);
    color: #f3ead9;
}

.embedded-form-table textarea {
    min-height: 92px;
    resize: vertical;
}

.casino-config-form input[type="text"],
.casino-config-form input[type="number"],
.casino-config-form select,
.casino-config-form textarea,
.casino-inline-form input[type="text"],
.casino-inline-form input[type="number"],
.casino-inline-form select,
.casino-inline-form textarea {
    box-sizing: border-box;
    padding: 8px 10px;
    border: 1px solid #6b542f;
    background: linear-gradient(180deg, #1f1b17 0%, #151310 100%);
    color: #f3ead9;
}

.casino-config-form table,
.casino-config-form tr,
.casino-config-form td {
    background: transparent !important;
    border: none !important;
}

.casino-config-form table {
    border-collapse: collapse;
}

.casino-config-form td {
    padding: 0 0 12px;
    vertical-align: top;
    color: #f3ead9;
}

.casino-config-form td:first-child {
    width: 180px;
    padding-right: 14px;
    color: #e7d7bc;
    font-weight: bold;
}

.casino-inline-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.casino-inline-form label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #e7d7bc;
    font-weight: bold;
}

.casino-stage {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.casino-table-top {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    padding: 18px;
    border: 1px solid #5d4620;
    background:
        radial-gradient(circle at top, rgba(245, 190, 82, 0.1), transparent 34%),
        radial-gradient(circle at center, rgba(15, 72, 39, 0.84) 0%, rgba(9, 43, 24, 0.96) 72%),
        linear-gradient(180deg, rgba(18, 17, 16, 0.98) 0%, rgba(11, 11, 13, 0.99) 100%);
    box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.22);
}

.casino-seat {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 190px;
    padding: 14px;
    border: 1px solid rgba(242, 214, 161, 0.16);
    background: rgba(8, 19, 13, 0.4);
}

.casino-seat-label {
    color: #f7e4bc;
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.casino-seat-cards {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px;
}

.casino-card-tile {
    width: 90px;
    filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.3));
}

.casino-card-tile svg {
    display: block;
    width: 100%;
    height: auto;
}

.casino-seat-total {
    color: #f2eadb;
    line-height: 1.5;
}

.casino-seat-actions {
    margin-top: auto;
}

.casino-stage-toolbar {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid #493626;
    background: linear-gradient(180deg, rgba(28, 25, 22, 0.96) 0%, rgba(15, 15, 17, 0.98) 100%);
}

.casino-chip-note {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0 12px;
    border: 1px solid #6c5126;
    background: rgba(52, 35, 14, 0.65);
    color: #f2e7d2;
}

.casino-action-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.casino-stage-toolbar label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #e8d7b8;
    font-weight: bold;
}

.casino-stage-toolbar input[type="number"] {
    max-width: 160px;
}

.casino-round-result {
    margin-top: 10px;
    padding: 10px 12px;
    border: 1px solid #5a4330;
    background: rgba(28, 21, 17, 0.92);
    color: #f1e6d2;
    line-height: 1.45;
}

.casino-seat-dice {
    gap: 12px;
}

.casino-die-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.casino-die-tile input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.casino-die-visual,
.casino-die-static {
    display: block;
    width: 72px;
    filter: drop-shadow(0 10px 16px rgba(0, 0, 0, 0.25));
}

.casino-die-visual svg,
.casino-die-static svg {
    display: block;
    width: 100%;
    height: auto;
}

.casino-die-caption {
    color: #f5dfb6;
    font-size: 11px;
    font-weight: bold;
}

.casino-die-tile input:checked + .casino-die-visual {
    transform: translateY(-2px);
}

.casino-die-tile input:checked + .casino-die-visual svg rect:nth-of-type(2) {
    stroke: #d08d20;
}

.roulette-stage {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
    padding: 0 0 14px;
}

.roulette-wheel {
    position: relative;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    border: 2px solid #7b5b24;
    background:
        radial-gradient(circle at center, rgba(18, 18, 20, 0.96) 0 34%, transparent 35%),
        conic-gradient(
            #1e6b39 0deg 9deg,
            #8c1d1d 9deg 18deg,
            #141414 18deg 27deg,
            #8c1d1d 27deg 36deg,
            #141414 36deg 45deg,
            #8c1d1d 45deg 54deg,
            #141414 54deg 63deg,
            #8c1d1d 63deg 72deg,
            #141414 72deg 81deg,
            #8c1d1d 81deg 90deg,
            #141414 90deg 99deg,
            #8c1d1d 99deg 108deg,
            #141414 108deg 117deg,
            #8c1d1d 117deg 126deg,
            #141414 126deg 135deg,
            #8c1d1d 135deg 144deg,
            #141414 144deg 153deg,
            #8c1d1d 153deg 162deg,
            #141414 162deg 171deg,
            #8c1d1d 171deg 180deg,
            #141414 180deg 189deg,
            #8c1d1d 189deg 198deg,
            #141414 198deg 207deg,
            #8c1d1d 207deg 216deg,
            #141414 216deg 225deg,
            #8c1d1d 225deg 234deg,
            #141414 234deg 243deg,
            #8c1d1d 243deg 252deg,
            #141414 252deg 261deg,
            #8c1d1d 261deg 270deg,
            #141414 270deg 279deg,
            #8c1d1d 279deg 288deg,
            #141414 288deg 297deg,
            #8c1d1d 297deg 306deg,
            #141414 306deg 315deg,
            #8c1d1d 315deg 324deg,
            #141414 324deg 333deg,
            #8c1d1d 333deg 342deg,
            #141414 342deg 351deg,
            #8c1d1d 351deg 360deg
        );
    box-shadow: inset 0 0 0 8px rgba(12, 12, 14, 0.85), 0 14px 28px rgba(0, 0, 0, 0.35);
    animation: roulette-spin 1.35s cubic-bezier(.2,.75,.15,1);
}

.roulette-wheel-ring {
    position: absolute;
    inset: 12px;
    border-radius: 50%;
    border: 1px solid rgba(255, 219, 140, 0.22);
}

.roulette-wheel-center {
    position: absolute;
    inset: 42px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, rgba(88, 72, 40, 0.55), rgba(15, 14, 14, 0.98));
    text-align: center;
    padding: 8px;
}

.roulette-wheel-number {
    font-size: 34px;
    font-weight: bold;
    line-height: 1;
    color: #f7f2e9;
}

.roulette-wheel-label {
    margin-top: 6px;
    font-size: 11px;
    color: #dcbf84;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.roulette-wheel-red .roulette-wheel-center {
    box-shadow: 0 0 0 2px rgba(170, 34, 34, 0.4);
}

.roulette-wheel-black .roulette-wheel-center {
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.12);
}

.roulette-wheel-green .roulette-wheel-center {
    box-shadow: 0 0 0 2px rgba(40, 150, 80, 0.42);
}

.roulette-stage-copy {
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: #dbc9a8;
}

.roulette-stage-copy strong {
    font-size: 16px;
    color: #f3ead9;
}

.roulette-board-wrap {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 8px;
    align-items: stretch;
}

.roulette-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(34px, 1fr));
    gap: 4px;
}

.roulette-cell,
.roulette-outside-chip {
    appearance: none;
    border: 1px solid #8a6b33;
    color: #f3ead9;
    font-weight: bold;
    font-family: inherit;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

.roulette-cell {
    min-height: 38px;
    padding: 0;
    background: #1a1a1c;
}

.roulette-cell:hover,
.roulette-outside-chip:hover,
.roulette-cell.active,
.roulette-outside-chip.active {
    transform: translateY(-1px);
    border-color: #d9a43d;
    box-shadow: 0 0 0 1px rgba(217, 164, 61, 0.35);
}

.roulette-cell-red {
    background: linear-gradient(180deg, #8c1d1d 0%, #5c1212 100%);
}

.roulette-cell-black {
    background: linear-gradient(180deg, #232427 0%, #101113 100%);
}

.roulette-cell-zero {
    background: linear-gradient(180deg, #1f7b45 0%, #14512d 100%);
    min-height: 122px;
}

.roulette-outside-bets {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.roulette-outside-chip {
    min-height: 34px;
    padding: 0 12px;
    background: linear-gradient(180deg, #2d241c 0%, #1a1612 100%);
}

@keyframes roulette-spin {
    from {
        transform: rotate(-540deg);
    }
    to {
        transform: rotate(0deg);
    }
}

.stock-chart-panel {
    border: 1px solid #4a3a24;
    background: linear-gradient(180deg, rgba(24, 21, 18, 0.98) 0%, rgba(14, 14, 16, 0.98) 100%);
    padding: 14px;
    margin-bottom: 6px;
}

.stock-chart-header {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
    margin-bottom: 12px;
}

.stock-chart-kicker {
    color: #e2b35b;
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.stock-chart-header h4 {
    margin: 0 0 4px;
    font-size: 22px;
}

.stock-chart-header p {
    margin: 0;
    color: #c9c9c9;
}

.stock-chart-stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    max-width: 420px;
}

.stock-chart-stats span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border: 1px solid #4f4030;
    background: rgba(31, 28, 24, 0.96);
    color: #f2ece0;
    white-space: nowrap;
}

.stock-chart-canvas {
    border: 1px solid #3a3128;
    background: #151515;
    padding: 8px;
}

.stock-chart-canvas svg {
    display: block;
    width: 100%;
    height: 240px;
}

.stock-symbol-link {
    color: #f3ead9;
    text-decoration: none;
}

.stock-symbol-link.is-active {
    color: #ffbf47;
}

.vehicle-preview-cell,
.vehicle-inventory-cell {
    min-width: 170px;
}

.vehicle-thumb,
.vehicle-preview-cell svg {
    display: block;
}

.vehicle-thumb svg,
.vehicle-preview-cell svg {
    max-width: 100%;
    height: auto;
}

.vehicle-thumb-meta {
    margin-top: 8px;
    line-height: 1.35;
}

@media (max-width: 900px) {
    .app-header {
        padding: 10px 10px 0;
        margin-bottom: 10px;
    }

    .page-shell {
        gap: 14px;
        padding: 0 10px 28px;
    }

    .page-shell,
    .grid-two {
        grid-template-columns: 1fr;
    }

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

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

    .auth-hero-card h1 {
        font-size: 32px;
    }

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

    .player-card,
    .nav-card,
    .cooldown-card,
    .auth-brand-panel,
    .funeral-card,
    .auth-hero-card,
    .auth-form-shell {
        padding: 12px;
    }

    .sidebar-avatar img {
        width: 88px;
        height: 112px;
    }

    .player-card h3 {
        font-size: 18px;
    }

    .sidebar {
        display: none;
    }

    .main-content {
        order: 1;
    }

    .mobile-drawer {
        display: block;
        position: sticky;
        top: 0;
        z-index: 90;
        margin: 0 10px 12px;
    }

    .mobile-drawer-toggle {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 12px 14px;
        border: 1px solid #6c4a17;
        background: linear-gradient(180deg, rgba(84, 54, 18, 0.98) 0%, rgba(33, 24, 14, 0.98) 100%);
        color: #fff0d6;
        box-shadow: 0 12px 24px rgba(0, 0, 0, 0.24);
        cursor: pointer;
        list-style: none;
    }

    .mobile-drawer-toggle::-webkit-details-marker {
        display: none;
    }

    .mobile-drawer-toggle::after {
        content: "Open";
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 56px;
        min-height: 28px;
        padding: 0 10px;
        border: 1px solid rgba(255, 221, 169, 0.25);
        background: rgba(11, 11, 13, 0.3);
        color: #fff7ea;
        font-size: 11px;
        font-weight: bold;
        letter-spacing: 0.08em;
        text-transform: uppercase;
    }

    .mobile-drawer[open] .mobile-drawer-toggle::after {
        content: "Close";
    }

    .mobile-drawer-label {
        font-size: 12px;
        font-weight: bold;
        letter-spacing: 0.16em;
        text-transform: uppercase;
    }

    .mobile-drawer-meta {
        margin-left: auto;
        color: #e2c79e;
        font-size: 12px;
    }

    .mobile-drawer-backdrop {
        display: none;
        opacity: 0;
        pointer-events: none;
    }

    .mobile-drawer[open] .mobile-drawer-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 94;
        background: rgba(0, 0, 0, 0.72);
        opacity: 1;
        pointer-events: auto;
    }

    .mobile-drawer-panel {
        display: none;
        opacity: 0;
        pointer-events: none;
    }

    .mobile-drawer[open] .mobile-drawer-panel {
        display: block;
        position: fixed;
        top: 70px;
        left: 10px;
        right: 10px;
        bottom: 12px;
        overflow-y: auto;
        padding: 14px;
        z-index: 95;
        border: 1px solid #5a3f1b;
        background: linear-gradient(180deg, rgba(23, 21, 20, 0.99) 0%, rgba(11, 11, 13, 0.99) 100%);
        box-shadow: 0 24px 40px rgba(0, 0, 0, 0.35);
        opacity: 1;
        pointer-events: auto;
    }

    .mobile-drawer-header {
        display: flex;
        justify-content: space-between;
        gap: 10px;
        margin-bottom: 12px;
        color: #fff2de;
    }

    .mobile-player-strip {
        display: grid;
        grid-template-columns: 72px minmax(0, 1fr);
        gap: 12px;
        margin-bottom: 14px;
        padding: 10px;
        border: 1px solid #453423;
        background: rgba(24, 21, 18, 0.95);
    }

    .mobile-player-avatar {
        position: relative;
    }

    .mobile-player-avatar img {
        display: block;
        width: 72px;
        height: 90px;
        object-fit: cover;
        background: #232323;
        border: 1px solid #5f4a31;
    }

    .mobile-player-avatar.is-jailed img {
        filter: grayscale(0.35) brightness(0.78);
    }

    .mobile-player-avatar .avatar-status-overlay {
        bottom: 6px;
        min-width: 56px;
        padding: 4px 6px;
        font-size: 9px;
    }

    .mobile-player-meta {
        min-width: 0;
    }

    .player-status-line {
        display: flex;
        flex-direction: column;
        gap: 3px;
        margin-bottom: 8px;
        color: #f0dbc0;
    }

    .mobile-player-facts {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        margin-top: 8px;
    }

    .mobile-player-facts span {
        display: inline-flex;
        align-items: center;
        min-height: 24px;
        padding: 0 8px;
        border: 1px solid #4a4139;
        background: rgba(35, 33, 32, 0.94);
        color: #efefef;
        font-size: 11px;
    }

    .mobile-drawer-nav,
    .mobile-drawer-cooldowns {
        padding: 10px;
        border: 1px solid #453423;
        background: rgba(24, 21, 18, 0.95);
    }

    .mobile-drawer-nav {
        margin-bottom: 12px;
    }

    .mobile-drawer-group + .mobile-drawer-group {
        margin-top: 14px;
    }

    .mobile-drawer-group {
        margin: 0;
    }

    .mobile-drawer-group > .section-card-title-toggle {
        padding-bottom: 6px;
        border-bottom: 1px solid rgba(91, 72, 44, 0.35);
    }

    .mobile-drawer-links {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .mobile-drawer-group > .mobile-drawer-links {
        margin-top: 10px;
    }

    .mobile-drawer-links a {
        color: #f6f6f6;
        text-decoration: none;
        background: rgba(35, 33, 32, 0.94);
        border: 1px solid #4a4139;
        padding: 10px 12px;
        text-align: center;
    }

    .mobile-drawer-links a.active {
        border-color: #d28000;
        background: linear-gradient(180deg, #4d3412 0%, #2e2011 100%);
    }

    .sidebar-section {
        border: 1px solid #4b3a25;
        background: linear-gradient(180deg, rgba(29, 26, 24, 0.98) 0%, rgba(18, 18, 20, 0.98) 100%);
        box-shadow: 0 16px 30px rgba(0, 0, 0, 0.18);
        overflow: hidden;
    }

    .sidebar-mobile-toggle {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 10px 12px;
        color: #f4cd8b;
        font-size: 12px;
        font-weight: bold;
        letter-spacing: 0.12em;
        text-transform: uppercase;
        cursor: pointer;
        list-style: none;
        background: linear-gradient(180deg, rgba(78, 58, 27, 0.96) 0%, rgba(45, 31, 16, 0.96) 100%);
        border-bottom: 1px solid rgba(171, 118, 34, 0.42);
    }

    .sidebar-mobile-toggle::-webkit-details-marker {
        display: none;
    }

    .sidebar-mobile-toggle::after {
        content: "+";
        color: #fff2de;
        font-size: 18px;
        line-height: 1;
        letter-spacing: 0;
    }

    .sidebar-section[open] .sidebar-mobile-toggle::after {
        content: "-";
    }

    .sidebar-section-body > .player-card,
    .sidebar-section-body > .nav-card,
    .sidebar-section-body > .cooldown-card {
        margin: 0;
        border: none;
        box-shadow: none;
        background: transparent;
    }

    .nav-card a,
    .country-tabs a {
        padding: 9px 10px;
    }

    .nav-left {
        gap: 12px;
    }

    .nav-left-group {
        gap: 6px;
        padding-bottom: 10px;
    }

    .cooldown-row {
        font-size: 12px;
    }

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

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

    .avatar-layout {
        grid-template-columns: 1fr;
    }

    .domination-map-shell {
        grid-template-columns: 1fr;
    }

    .domination-mobile-picker {
        display: block;
    }

    .domination-map-canvas {
        min-height: auto;
        overflow: auto;
        padding: 10px;
        -webkit-overflow-scrolling: touch;
    }

    .domination-map-track {
        min-width: max-content;
    }

    .domination-plot {
        min-height: 84px;
        padding: 14px 7px 7px;
    }

    .sidebar-compact {
        position: static;
        max-height: none;
        overflow: visible;
        padding-right: 0;
    }

    .main-content .userprof,
    .main-content .auth-table,
    .main-content table[style*="width:100%"] {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .main-content .userprof.userprof-compact,
    .main-content .auth-table.userprof-compact {
        display: inline-table;
        overflow: visible;
    }

    .main-content .userprof td,
    .main-content .auth-table td {
        white-space: nowrap;
    }

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

    .main-content input[type="text"],
    .main-content input[type="email"],
    .main-content input[type="password"],
    .main-content input[type="number"],
    .main-content select,
    .main-content textarea {
        max-width: 100%;
        box-sizing: border-box;
    }

    .inline-form,
    .trade-form {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        align-items: center;
    }

    .auth-brand-panel h2 {
        font-size: 24px;
    }

    .auth-brand-character {
        max-width: 250px;
    }

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

    .funeral-meta {
        grid-template-columns: 1fr;
    }

    .stock-chart-header {
        flex-direction: column;
    }

    .stock-chart-stats {
        justify-content: flex-start;
        max-width: none;
    }

    .vehicle-preview-cell,
    .vehicle-inventory-cell {
        min-width: 150px;
    }

    .roulette-stage {
        grid-template-columns: 1fr;
    }

    .casino-table-top {
        grid-template-columns: 1fr;
    }

    .casino-seat {
        min-height: auto;
    }

    .casino-card-tile {
        width: 72px;
    }

    .casino-die-visual,
    .casino-die-static {
        width: 62px;
    }

    .roulette-stage-copy {
        order: -1;
    }

    .roulette-grid {
        grid-template-columns: repeat(6, minmax(34px, 1fr));
    }
}

@media (max-width: 640px) {
    body {
        font-size: 14px;
    }

    #logo-image img {
        width: min(100%, 340px);
    }

    .auth-shell {
        padding-left: 8px;
        padding-right: 8px;
    }

    .auth-hero-card h1 {
        font-size: 28px;
    }

    .auth-copy-lead {
        font-size: 15px;
    }

    .auth-live-grid,
    .auth-feature-grid,
    .auth-brand-stats {
        grid-template-columns: 1fr;
    }

    .sidebar-mobile-toggle {
        padding: 9px 10px;
        font-size: 11px;
    }

    .mobile-drawer {
        margin-left: 8px;
        margin-right: 8px;
    }

    .mobile-drawer-toggle {
        padding: 10px 12px;
    }

    .mobile-drawer-meta {
        font-size: 11px;
    }

    .mobile-drawer[open] .mobile-drawer-panel {
        top: 62px;
        left: 8px;
        right: 8px;
        bottom: 8px;
        padding: 12px;
    }

    .mobile-player-strip {
        grid-template-columns: 60px minmax(0, 1fr);
    }

    .mobile-player-avatar img {
        width: 60px;
        height: 76px;
    }

    .mobile-drawer-links {
        grid-template-columns: 1fr;
    }

    .inventory-pane-table {
        table-layout: fixed;
    }

    .inventory-pane-table td,
    .inventory-pane-table th {
        word-break: break-word;
    }

    .inventory-pane-table td[style*="width:220px"] {
        width: 42% !important;
    }

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

    .country-tabs a {
        text-align: center;
    }

    .domination-map-panel,
    .domination-legend-panel {
        padding: 10px;
    }

    .domination-map-canvas {
        padding: 8px;
    }

    .domination-plot {
        min-height: 76px;
        padding: 12px 6px 6px;
    }

    .domination-plot-owner,
    .domination-plot-building,
    .domination-plot-crew {
        display: none;
    }

    .domination-plot-id {
        font-size: 13px;
        margin-top: 6px;
    }

    .domination-map-subtitle {
        font-size: 11px;
    }

    .avatar-grid {
        grid-template-columns: 1fr;
    }

    .players-list-avatar {
        width: 30px;
        height: 38px;
    }

    .funeral-card h1 {
        font-size: 30px;
    }

    .funeral-subtitle {
        font-size: 16px;
    }

    .stock-chart-canvas svg {
        height: 200px;
    }

    .roulette-board-wrap {
        grid-template-columns: 1fr;
    }

    .casino-stage-toolbar {
        padding: 12px;
    }

    .casino-action-row {
        width: 100%;
    }

    .casino-stage-toolbar label {
        width: 100%;
        justify-content: space-between;
    }

    .casino-stage-toolbar input[type="number"] {
        max-width: 120px;
    }

    .roulette-cell-zero {
        min-height: 38px;
    }

    .roulette-grid {
        grid-template-columns: repeat(4, minmax(34px, 1fr));
    }
}
