:root {
    --black: #050507;
    --black-soft: #111218;
    --white: #f7f7f8;
    --white-soft: #e6e8eb;
    --muted: #aeb3ba;
    --red: #e21d27;
    --red-bright: #ff3b45;
    --red-dark: #780b12;
    --sky-blue: #2f698f;
    --sky-blue-dark: #17384d;
    --card: rgba(255, 255, 255, 0.075);
    --shadow: 0 30px 90px rgba(0, 0, 0, 0.58);

    /* Replace this with your own GIF or image when ready.
       Example: url('../img/hero-city.gif') */
    --hero-image: linear-gradient(135deg, rgba(226, 29, 39, 0.44), rgba(47, 105, 143, 0.24)), url('../img/hero-placeholder.svg');
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    font-family: Arial, Helvetica, sans-serif;
    background:
        radial-gradient(circle at top left, rgba(226, 29, 39, 0.15), transparent 28rem),
        radial-gradient(circle at bottom right, rgba(47, 105, 143, 0.16), transparent 30rem),
        var(--black);
    color: var(--white);
    line-height: 1.6;
}

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

.account-link {
    position: fixed;
    top: 1.2rem;
    right: 1.2rem;
    z-index: 20;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 1.15rem;
    border: 1px solid rgba(247, 247, 248, 0.72);
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--red-bright), var(--red) 52%, var(--red-dark));
    box-shadow: 0 14px 35px rgba(226, 29, 39, 0.32), inset 0 0 0 1px rgba(255, 255, 255, 0.32);
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: transform 180ms ease, filter 180ms ease;
}

.account-link:hover,
.account-link:focus-visible,
.btn:hover,
.btn:focus-visible {
    transform: translateY(-3px);
    filter: brightness(1.08);
}

.landing-page {
    overflow: hidden;
}

.hero {
    position: relative;
    min-height: 88vh;
    display: grid;
    place-items: center;
    padding: 7rem 1.25rem 5rem;
    isolation: isolate;
    border-bottom: 2px solid rgba(226, 29, 39, 0.55);
}

.hero__media {
    position: absolute;
    inset: 0;
    z-index: -3;
    background-image: var(--hero-image);
    background-size: cover;
    background-position: center;
    transform: scale(1.02);
}

.hero__overlay {
    position: absolute;
    inset: 0;
    z-index: -2;
    background:
        linear-gradient(90deg, rgba(5, 5, 6, 0.94), rgba(5, 5, 6, 0.54), rgba(5, 5, 6, 0.88)),
        radial-gradient(circle at 25% 25%, rgba(226, 29, 39, 0.34), transparent 26rem),
        radial-gradient(circle at 80% 35%, rgba(47, 105, 143, 0.16), transparent 24rem),
        linear-gradient(to bottom, rgba(5, 5, 6, 0.2), rgba(5, 5, 6, 0.98));
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 58px 58px;
    mask-image: linear-gradient(to bottom, black, transparent 90%);
}

.hero__content {
    width: min(980px, 100%);
    text-align: center;
}

.eyebrow,
.section-kicker {
    display: inline-flex;
    margin-bottom: 1rem;
    padding: 0.45rem 0.9rem;
    border: 1px solid rgba(226, 29, 39, 0.55);
    border-radius: 999px;
    color: var(--white-soft);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.76rem;
    font-weight: 900;
    background: rgba(0, 0, 0, 0.42);
}

h1 {
    font-size: clamp(3.5rem, 12vw, 9.5rem);
    line-height: 0.86;
    letter-spacing: -0.08em;
    text-transform: uppercase;
    color: var(--white);
    -webkit-text-stroke: 1px rgba(226, 29, 39, 0.5);
    text-shadow:
        0 7px 0 rgba(122, 10, 18, 0.62),
        0 18px 48px rgba(0, 0, 0, 0.9),
        0 0 32px rgba(226, 29, 39, 0.38);
}

.hero__lead {
    max-width: 780px;
    margin: 1.65rem auto 0;
    color: var(--muted);
    font-size: clamp(1rem, 2.2vw, 1.35rem);
}

.hero__stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 2rem;
}

.hero__stats span {
    padding: 0.55rem 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    color: var(--white);
    background: rgba(255, 255, 255, 0.07);
    box-shadow: inset 0 0 0 1px rgba(226, 29, 39, 0.08);
    font-size: 0.82rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.intro-section {
    width: min(1180px, calc(100% - 2rem));
    margin: 0 auto;
    padding: 5rem 0 2rem;
}

.intro-copy {
    max-width: 800px;
    margin: 0 auto 2rem;
    text-align: center;
}

.intro-copy h2,
.callout-section h2 {
    font-size: clamp(2rem, 5vw, 4.2rem);
    line-height: 0.98;
    letter-spacing: -0.05em;
    text-transform: uppercase;
}

.intro-copy p:not(.section-kicker),
.callout-section p:not(.section-kicker) {
    margin-top: 1rem;
    color: var(--muted);
    font-size: 1.04rem;
}

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

.feature-card {
    min-height: 260px;
    padding: 1.6rem;
    border: 1px solid rgba(226, 29, 39, 0.34);
    border-radius: 28px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.095), rgba(255, 255, 255, 0.035));
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: "";
    position: absolute;
    inset: -40% -20% auto auto;
    width: 210px;
    height: 210px;
    border-radius: 999px;
    opacity: 0.35;
    filter: blur(4px);
}

.feature-card--red::before { background: var(--red); }
.feature-card--light::before { background: var(--white-soft); }
.feature-card--sky::before { background: var(--sky-blue); }

.feature-card__number {
    color: var(--white-soft);
    font-weight: 900;
    letter-spacing: 0.16em;
}

.feature-card h3 {
    margin-top: 0.8rem;
    font-size: 1.45rem;
    line-height: 1.12;
    text-transform: uppercase;
}

.feature-card p {
    margin-top: 0.8rem;
    color: var(--muted);
}

.callout-section {
    width: min(1180px, calc(100% - 2rem));
    margin: 2rem auto 5rem;
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    border: 1px solid rgba(226, 29, 39, 0.42);
    border-radius: 30px;
    background:
        linear-gradient(135deg, rgba(226, 29, 39, 0.2), rgba(47, 105, 143, 0.14)),
        rgba(255, 255, 255, 0.06);
    box-shadow: var(--shadow);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 54px;
    padding: 0 1.5rem;
    border-radius: 999px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: transform 180ms ease, filter 180ms ease;
    white-space: nowrap;
}

.btn--primary {
    color: #ffffff;
    background: linear-gradient(135deg, var(--red-bright), var(--red) 52%, var(--red-dark));
    box-shadow: 0 16px 42px rgba(226, 29, 39, 0.28);
}

@media (max-width: 850px) {
    .hero {
        min-height: 82vh;
        padding-top: 6rem;
    }

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

    .feature-card {
        min-height: auto;
    }

    .callout-section {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 520px) {
    .account-link {
        top: 0.75rem;
        right: 0.75rem;
        min-height: 42px;
        padding: 0 0.95rem;
        font-size: 0.74rem;
    }

    .hero {
        padding: 5.5rem 1rem 4rem;
    }

    .hero__stats span {
        flex: 1 1 42%;
        text-align: center;
    }

    .callout-section,
    .btn {
        width: 100%;
    }
}

.cookie-consent {
    position: fixed;
    inset: auto 1rem 1rem auto;
    z-index: 50;
    width: min(620px, calc(100% - 2rem));
}

.cookie-consent__panel {
    padding: 1.25rem;
    border: 1px solid rgba(226, 29, 39, 0.62);
    border-radius: 24px;
    background:
        linear-gradient(135deg, rgba(226, 29, 39, 0.18), rgba(47, 105, 143, 0.16)),
        rgba(5, 5, 6, 0.96);
    box-shadow: 0 30px 100px rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(12px);
}

.cookie-consent__header h2 {
    font-size: clamp(1.35rem, 4vw, 2.1rem);
    line-height: 1;
    letter-spacing: -0.04em;
    text-transform: uppercase;
}

.cookie-consent__text,
.cookie-consent__warning,
.auth-note {
    margin-top: 0.9rem;
    color: var(--muted);
}

.cookie-consent__warning {
    padding: 0.8rem;
    border: 1px solid rgba(226, 29, 39, 0.5);
    border-radius: 16px;
    color: var(--white);
    background: rgba(226, 29, 39, 0.12);
    font-size: 0.92rem;
}

.cookie-options {
    display: grid;
    gap: 0.75rem;
    margin-top: 1rem;
    max-height: 320px;
    overflow: auto;
    padding-right: 0.35rem;
}

.cookie-option {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    padding: 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.055);
    cursor: pointer;
}

.cookie-option input {
    margin-top: 0.25rem;
    accent-color: var(--red);
}

.cookie-option strong,
.cookie-option small {
    display: block;
}

.cookie-option small {
    margin-top: 0.15rem;
    color: var(--muted);
}

.cookie-consent__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}

.btn--ghost {
    color: var(--white);
    border: 1px solid rgba(226, 29, 39, 0.5);
    background: rgba(255, 255, 255, 0.06);
}

.btn--danger {
    color: var(--white);
    border: 1px solid rgba(226, 29, 39, 0.58);
    background: linear-gradient(135deg, rgba(226, 29, 39, 0.28), rgba(122, 10, 18, 0.72));
}

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

.auth-shell {
    width: min(500px, 100%);
}

.auth-logo {
    display: block;
    margin-bottom: 1rem;
    color: var(--white-soft);
    text-align: center;
    font-weight: 900;
    font-size: 1.3rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-shadow: 0 0 22px rgba(226, 29, 39, 0.42);
}

.auth-card {
    padding: clamp(1.25rem, 5vw, 2rem);
    border: 1px solid rgba(226, 29, 39, 0.5);
    border-radius: 30px;
    background:
        linear-gradient(135deg, rgba(226, 29, 39, 0.18), rgba(47, 105, 143, 0.14)),
        rgba(255, 255, 255, 0.06);
    box-shadow: var(--shadow);
}

.auth-card h1 {
    font-size: clamp(2.6rem, 10vw, 4.4rem);
    letter-spacing: -0.07em;
}

.auth-form {
    display: grid;
    gap: 1rem;
    margin-top: 1.25rem;
}

.auth-form label {
    display: grid;
    gap: 0.4rem;
    color: var(--white-soft);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.8rem;
}

.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"] {
    width: 100%;
    min-height: 50px;
    padding: 0 0.95rem;
    border: 1px solid rgba(226, 29, 39, 0.35);
    border-radius: 14px;
    color: var(--white);
    background: rgba(0, 0, 0, 0.38);
    outline: none;
}

.auth-form input:focus {
    border-color: var(--sky-blue);
    box-shadow: 0 0 0 4px rgba(47, 105, 143, 0.18);
}

.check-row {
    display: flex !important;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 0.6rem !important;
    color: var(--muted) !important;
    letter-spacing: normal !important;
    text-transform: none !important;
    font-size: 0.95rem !important;
}

.check-row input {
    accent-color: var(--red);
}

.auth-links {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1.25rem;
    font-size: 0.92rem;
}

.auth-links a {
    color: var(--white-soft);
    text-decoration: underline;
    text-underline-offset: 4px;
}

@media (max-width: 620px) {
    .cookie-consent {
        inset: auto 0.75rem 0.75rem 0.75rem;
        width: auto;
    }

    .cookie-consent__actions .btn {
        width: 100%;
    }

    .auth-links {
        flex-direction: column;
    }
}

/* Phase 2 banking and travel */
.street-hero.street-hero--compact h1 {
    font-size: clamp(2.8rem, 7vw, 6rem);
}

.money-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.8rem;
    margin-top: 1rem;
}

.money-summary article {
    min-width: 0;
    padding: 1.1rem;
    border: 1px solid rgba(226, 29, 39, 0.28);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.045);
}

.money-summary span,
.money-summary strong,
.money-summary small {
    display: block;
}

.money-summary span,
.money-summary small {
    color: var(--muted);
}

.money-summary span {
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.money-summary strong {
    margin: 0.2rem 0;
    overflow: hidden;
    color: var(--white);
    text-overflow: ellipsis;
    font-size: clamp(1.45rem, 4vw, 2.35rem);
}

.money-summary small {
    font-size: 0.72rem;
}

.travel-lock-notice {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
    padding: 0.9rem 1rem;
    border: 1px solid rgba(47, 105, 143, 0.48);
    border-radius: 16px;
    background: rgba(47, 105, 143, 0.12);
}

.travel-lock-notice span {
    flex: 1;
    color: var(--muted);
    font-size: 0.82rem;
}

.bank-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.money-form {
    display: grid;
    gap: 1rem;
    margin-top: 1.2rem;
}

.money-form label {
    display: grid;
    gap: 0.45rem;
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 800;
}

.money-input {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.22);
}

.money-input:focus-within {
    border-color: var(--red-bright);
    box-shadow: 0 0 0 3px rgba(226, 29, 39, 0.12);
}

.money-input b {
    padding-left: 1rem;
    color: var(--sky-blue);
    font-size: 1.1rem;
}

.money-input input {
    width: 100%;
    min-height: 52px;
    padding: 0.75rem;
    border: 0;
    outline: 0;
    color: var(--white);
    background: transparent;
    font: inherit;
}

.ledger-panel {
    margin-top: 1rem;
}

.ledger-table-wrap {
    overflow-x: auto;
    margin-top: 1rem;
}

.game-table {
    width: 100%;
    min-width: 680px;
    border-collapse: collapse;
    font-size: 0.82rem;
}

.game-table th,
.game-table td {
    padding: 0.78rem 0.7rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    text-align: left;
    white-space: nowrap;
}

.game-table th {
    color: var(--muted);
    font-size: 0.64rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.ledger-type {
    display: inline-block;
    padding: 0.26rem 0.48rem;
    border: 1px solid rgba(47, 105, 143, 0.42);
    border-radius: 999px;
    color: #d7ecf7;
    background: rgba(47, 105, 143, 0.12);
    font-size: 0.66rem;
    font-weight: 900;
    text-transform: uppercase;
}

.ledger-type--withdrawal,
.ledger-type--cancelled {
    border-color: rgba(226, 29, 39, 0.45);
    color: #ffd6d8;
    background: rgba(226, 29, 39, 0.12);
}

.ledger-type--completed,
.ledger-type--deposit {
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--white-soft);
    background: rgba(255, 255, 255, 0.06);
}

.trip-progress {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem 2rem;
    margin-top: 1rem;
    padding: clamp(1.2rem, 4vw, 2rem);
    border: 1px solid rgba(47, 105, 143, 0.58);
    border-radius: 24px;
    background: linear-gradient(120deg, rgba(47, 105, 143, 0.16), rgba(226, 29, 39, 0.08));
}

.trip-progress h2 {
    font-size: clamp(1.8rem, 4vw, 3.2rem);
    line-height: 1;
    text-transform: uppercase;
}

.trip-progress h2 span {
    color: var(--red-bright);
    font-size: 0.55em;
}

.trip-progress > p {
    grid-column: 1 / -1;
    color: var(--muted);
    font-size: 0.82rem;
}

.trip-countdown {
    min-width: 190px;
    text-align: right;
}

.trip-countdown span,
.trip-countdown strong,
.trip-countdown small {
    display: block;
}

.trip-countdown span,
.trip-countdown small {
    color: var(--muted);
    font-size: 0.68rem;
}

.trip-countdown strong {
    margin: 0.25rem 0;
    color: var(--white);
    font-size: 1.5rem;
}

.trip-progress__track {
    grid-column: 1 / -1;
    height: 7px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.09);
}

.trip-progress__track span {
    display: block;
    width: 45%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--red), var(--sky-blue));
    animation: travel-pulse 2.5s ease-in-out infinite alternate;
}

@keyframes travel-pulse {
    from { transform: translateX(-35%); }
    to { transform: translateX(155%); }
}

.game-section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    margin: 2rem 0 1rem;
}

.game-section-heading h2 {
    font-size: clamp(2rem, 5vw, 3.6rem);
    line-height: 0.95;
    text-transform: uppercase;
}

.game-section-heading > span {
    color: var(--muted);
    font-size: 0.78rem;
}

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

.city-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.04);
}

.city-card.is-current {
    border-color: rgba(226, 29, 39, 0.54);
    background: linear-gradient(145deg, rgba(226, 29, 39, 0.13), rgba(255, 255, 255, 0.035));
}

.city-card__top {
    display: flex;
    justify-content: space-between;
    color: var(--red-bright);
    font-size: 0.64rem;
    font-weight: 900;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.city-card__top small {
    color: var(--sky-blue);
}

.city-card h3 {
    margin-top: 0.65rem;
    font-size: 1.75rem;
    line-height: 1;
    text-transform: uppercase;
}

.city-card > p {
    flex: 1;
    margin-top: 0.65rem;
    color: var(--muted);
    font-size: 0.82rem;
}

.city-card__facts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.55rem;
    margin: 1rem 0;
}

.city-card__facts > span {
    padding: 0.65rem;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.18);
}

.city-card__facts small,
.city-card__facts strong {
    display: block;
}

.city-card__facts small {
    color: var(--muted);
    font-size: 0.61rem;
    text-transform: uppercase;
}

.city-card form,
.city-card form .btn {
    width: 100%;
}

@media (max-width: 1120px) {
    .city-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .money-summary,
    .bank-grid,
    .city-grid,
    .trip-progress {
        grid-template-columns: 1fr;
    }

    .trip-countdown {
        min-width: 0;
        text-align: left;
    }

    .travel-lock-notice,
    .game-section-heading {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* Phase 1 game shell */
.dashboard-nav__actions,
.game-topbar__actions {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.stat-grid .number-card {
    grid-column: span 2;
}

.game-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    background:
        radial-gradient(circle at 78% 12%, rgba(47, 105, 143, 0.14), transparent 28rem),
        radial-gradient(circle at 20% 80%, rgba(226, 29, 39, 0.12), transparent 34rem),
        var(--black);
}

.game-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding: 1.2rem 1rem;
    border-right: 1px solid rgba(226, 29, 39, 0.34);
    background:
        linear-gradient(180deg, rgba(226, 29, 39, 0.08), transparent 12rem),
        rgba(8, 8, 11, 0.98);
}

.game-sidebar__brand {
    display: block;
    padding: 0.25rem 0.6rem 1rem;
    color: var(--white);
    font-size: 1.35rem;
    font-weight: 900;
    letter-spacing: -0.04em;
    text-transform: uppercase;
}

.game-sidebar__brand span {
    color: var(--red-bright);
}

.game-sidebar__player {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding: 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.045);
}

.game-sidebar__player > div:last-child {
    min-width: 0;
}

.game-sidebar__player strong,
.game-sidebar__player small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.game-sidebar__player small {
    color: var(--muted);
    font-size: 0.72rem;
}

.game-mini-avatar {
    flex: 0 0 46px;
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 2px solid var(--red);
    border-radius: 14px;
    color: var(--white);
    background: linear-gradient(145deg, var(--red-bright), var(--red-dark));
    font-weight: 900;
}

.game-mini-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.game-navigation {
    display: grid;
    gap: 0.45rem;
}

.game-nav-group {
    border: 1px solid transparent;
    border-radius: 14px;
}

.game-nav-group[open] {
    border-color: rgba(255, 255, 255, 0.07);
    background: rgba(255, 255, 255, 0.025);
}

.game-nav-group summary {
    padding: 0.62rem 0.7rem;
    color: var(--muted);
    cursor: pointer;
    list-style: none;
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.game-nav-group summary::-webkit-details-marker {
    display: none;
}

.game-nav-group summary::after {
    content: "+";
    float: right;
    color: var(--red-bright);
}

.game-nav-group[open] summary::after {
    content: "−";
}

.game-nav-items {
    display: grid;
    gap: 0.2rem;
    padding: 0 0.35rem 0.4rem;
}

.game-nav-link {
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.48rem 0.7rem;
    border-radius: 10px;
    color: var(--white-soft);
    font-size: 0.84rem;
    transition: color 160ms ease, background 160ms ease, transform 160ms ease;
}

a.game-nav-link:hover,
a.game-nav-link:focus-visible {
    color: var(--white);
    background: rgba(226, 29, 39, 0.13);
    transform: translateX(3px);
}

.game-nav-link.is-active {
    color: var(--white);
    background: linear-gradient(90deg, rgba(226, 29, 39, 0.34), rgba(226, 29, 39, 0.08));
    box-shadow: inset 3px 0 0 var(--red-bright);
}

.game-nav-link.is-locked {
    color: #70747b;
    cursor: not-allowed;
}

.game-nav-link small {
    padding: 0.12rem 0.35rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    font-size: 0.55rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.game-sidebar__public-link {
    margin-top: auto;
    padding: 1rem 0.7rem 0;
    color: var(--muted);
    font-size: 0.75rem;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.game-workspace {
    min-width: 0;
}

.game-topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem clamp(1rem, 3vw, 2rem);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(5, 5, 7, 0.9);
    backdrop-filter: blur(16px);
}

.game-topbar__title small,
.game-topbar__title strong {
    display: block;
}

.game-topbar__title small {
    color: var(--red-bright);
    font-size: 0.65rem;
    font-weight: 900;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.game-topbar__title strong {
    font-size: 1.05rem;
}

.game-mobile-menu {
    display: none;
}

.game-main {
    width: min(1440px, 100%);
    margin: 0 auto;
    padding: clamp(1rem, 3vw, 2rem);
}

.street-hero {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 2rem;
    padding: clamp(1.4rem, 4vw, 2.5rem);
    border: 1px solid rgba(226, 29, 39, 0.4);
    border-radius: 30px;
    background:
        linear-gradient(115deg, rgba(226, 29, 39, 0.23), transparent 48%),
        linear-gradient(300deg, rgba(47, 105, 143, 0.13), transparent 46%),
        rgba(255, 255, 255, 0.045);
    box-shadow: var(--shadow);
}

.street-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: linear-gradient(90deg, black, transparent);
}

.street-hero > * {
    position: relative;
    z-index: 1;
}

.street-hero h1 {
    max-width: 760px;
    font-size: clamp(3.2rem, 8vw, 7.2rem);
}

.street-hero p:not(.section-kicker) {
    max-width: 760px;
    margin-top: 1rem;
    color: var(--muted);
}

.street-identity {
    min-width: 210px;
    padding: 1.1rem;
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 20px;
    background: rgba(0, 0, 0, 0.28);
}

.street-identity span,
.street-identity strong,
.street-identity small {
    display: block;
}

.street-identity span {
    color: var(--muted);
    font-size: 0.67rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.street-identity strong {
    margin: 0.2rem 0;
    color: var(--white);
    font-size: 1.4rem;
    text-transform: uppercase;
}

.street-identity small {
    color: var(--sky-blue);
}

.game-stat-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.8rem;
    margin-top: 1rem;
}

.game-stat-card,
.game-number-card {
    min-width: 0;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.045);
}

.game-stat-card {
    grid-column: span 2;
}

.game-number-card {
    grid-column: span 2;
    border-color: rgba(226, 29, 39, 0.25);
}

.game-stat-card > div:first-child {
    display: flex;
    justify-content: space-between;
    gap: 0.7rem;
    font-size: 0.8rem;
}

.game-number-card span,
.street-status span {
    display: block;
    color: var(--muted);
    font-size: 0.65rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.game-number-card strong {
    display: block;
    margin-top: 0.25rem;
    color: var(--white);
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: clamp(1.1rem, 2.5vw, 1.65rem);
}

.street-status {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    overflow: hidden;
    margin-top: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.08);
}

.street-status > div {
    padding: 0.85rem 1rem;
    background: var(--black-soft);
}

.street-status strong {
    display: block;
    margin-top: 0.15rem;
}

.game-content-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.game-panel {
    min-width: 0;
    padding: clamp(1.1rem, 3vw, 1.6rem);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.04);
}

.game-panel__heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.game-panel h2 {
    font-size: clamp(1.7rem, 3.5vw, 2.7rem);
    line-height: 0.95;
    letter-spacing: -0.05em;
    text-transform: uppercase;
}

.game-panel__lead {
    margin-top: 0.8rem;
    color: var(--muted);
}

.game-badge {
    flex: 0 0 auto;
    padding: 0.35rem 0.6rem;
    border: 1px solid rgba(47, 105, 143, 0.45);
    border-radius: 999px;
    color: #d7ecf7;
    background: rgba(47, 105, 143, 0.12);
    font-size: 0.65rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.future-action-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1.2rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--muted);
    font-size: 0.82rem;
}

.btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
    filter: none;
}

.nearby-list,
.activity-list,
.quick-moves {
    display: grid;
    gap: 0.55rem;
    margin-top: 1rem;
}

.nearby-player {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.16);
}

.nearby-player__initial {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    color: var(--white);
    background: var(--red-dark);
    font-weight: 900;
}

.nearby-player__initial img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.nearby-player small,
.nearby-player b {
    color: var(--muted);
    font-size: 0.72rem;
}

.activity-list > div {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.7rem;
    padding: 0.65rem 0;
}

.activity-list > div + div {
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.activity-dot {
    width: 9px;
    height: 9px;
    margin-top: 0.5rem;
    border-radius: 50%;
    background: var(--red-bright);
    box-shadow: 0 0 14px rgba(226, 29, 39, 0.5);
}

.activity-list strong,
.activity-list small {
    display: block;
}

.activity-list small {
    color: var(--muted);
    font-size: 0.7rem;
}

.quick-moves > a,
.quick-moves > span {
    display: block;
    padding: 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.16);
}

.quick-moves > a {
    border-color: rgba(226, 29, 39, 0.3);
    transition: transform 160ms ease, background 160ms ease;
}

.quick-moves > a:hover,
.quick-moves > a:focus-visible {
    transform: translateX(4px);
    background: rgba(226, 29, 39, 0.1);
}

.quick-moves strong,
.quick-moves span {
    display: block;
}

.quick-moves > * > span {
    margin-top: 0.15rem;
    color: var(--muted);
    font-size: 0.8rem;
}

.quick-moves > .is-locked {
    opacity: 0.58;
}

@media (max-width: 1080px) {
    .game-page {
        grid-template-columns: 240px minmax(0, 1fr);
    }

    .street-hero {
        grid-template-columns: 1fr;
    }

    .street-identity {
        min-width: 0;
    }
}

@media (max-width: 900px) {
    .game-page {
        display: block;
    }

    .game-sidebar {
        display: none;
    }

    .game-mobile-menu {
        position: relative;
        display: block;
    }

    .game-mobile-menu > summary {
        min-height: 42px;
        display: grid;
        place-items: center;
        padding: 0 0.9rem;
        border: 1px solid rgba(226, 29, 39, 0.4);
        border-radius: 12px;
        cursor: pointer;
        list-style: none;
        font-size: 0.78rem;
        font-weight: 900;
        letter-spacing: 0.08em;
        text-transform: uppercase;
    }

    .game-mobile-menu > summary::-webkit-details-marker {
        display: none;
    }

    .game-navigation--mobile {
        position: absolute;
        top: calc(100% + 0.6rem);
        left: 0;
        width: min(330px, calc(100vw - 2rem));
        max-height: calc(100vh - 100px);
        overflow-y: auto;
        padding: 0.75rem;
        border: 1px solid rgba(226, 29, 39, 0.42);
        border-radius: 18px;
        background: rgba(8, 8, 11, 0.99);
        box-shadow: var(--shadow);
    }
}

@media (max-width: 720px) {
    .game-topbar__title {
        display: none;
    }

    .game-topbar__actions .btn--ghost {
        display: none;
    }

    .game-stat-grid,
    .game-content-grid {
        grid-template-columns: 1fr;
    }

    .game-stat-card,
    .game-number-card {
        grid-column: auto;
    }

    .street-status {
        grid-template-columns: 1fr;
    }

    .future-action-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .nearby-player {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .nearby-player b {
        grid-column: 2;
    }
}

@media (max-width: 560px) {
    .dashboard-nav {
        align-items: flex-start;
        flex-direction: column;
    }

    .dashboard-nav__actions {
        width: 100%;
    }

    .dashboard-nav__actions .btn,
    .dashboard-nav__actions form {
        flex: 1;
    }

    .dashboard-nav__actions form .btn {
        width: 100%;
    }

    .stat-grid .number-card {
        grid-column: auto;
    }

    .street-hero h1 {
        font-size: clamp(2.8rem, 18vw, 4.6rem);
    }
}

/* Phase 4: city crime engine */
.crime-hero {
    border-color: rgba(226, 29, 39, 0.48);
    background:
        radial-gradient(circle at 88% 18%, rgba(47, 105, 143, 0.18), transparent 30%),
        linear-gradient(120deg, rgba(226, 29, 39, 0.18), transparent 52%),
        rgba(255, 255, 255, 0.035);
}

.crime-summary,
.account-crime-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}

.crime-summary article,
.account-crime-strip > div {
    min-width: 0;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 17px;
    background: rgba(255, 255, 255, 0.035);
}

.crime-summary span,
.crime-summary strong,
.account-crime-strip span,
.account-crime-strip strong,
.account-crime-strip small {
    display: block;
}

.crime-summary span,
.account-crime-strip span {
    color: var(--muted);
    font-size: 0.62rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.crime-summary strong,
.account-crime-strip strong {
    margin-top: 0.2rem;
    overflow: hidden;
    color: var(--white);
    font-size: clamp(1.1rem, 2vw, 1.6rem);
    text-overflow: ellipsis;
}

.account-crime-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
    align-items: stretch;
    margin-bottom: 1rem;
}

.account-crime-strip small {
    margin-top: 0.2rem;
    color: var(--sky-blue);
    font-size: 0.7rem;
}

.account-crime-strip > .btn {
    align-self: center;
}

.crime-lock-notice {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.25rem 1rem;
    margin-top: 1rem;
    padding: 1rem 1.1rem;
    border: 1px solid rgba(226, 29, 39, 0.48);
    border-radius: 17px;
    background: linear-gradient(100deg, rgba(226, 29, 39, 0.15), rgba(47, 105, 143, 0.07));
}

.crime-lock-notice strong,
.crime-lock-notice span {
    display: block;
}

.crime-lock-notice strong {
    color: var(--white);
}

.crime-lock-notice span {
    color: var(--muted);
    font-size: 0.76rem;
}

.crime-lock-notice .btn {
    grid-column: 2;
    grid-row: 1 / span 2;
}

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

.crime-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 1.15rem;
    border: 1px solid rgba(226, 29, 39, 0.31);
    border-radius: 22px;
    background:
        linear-gradient(145deg, rgba(226, 29, 39, 0.08), transparent 46%),
        rgba(255, 255, 255, 0.035);
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.2);
}

.crime-card.is-locked {
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.025);
}

.crime-card__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.7rem;
    color: var(--muted);
    font-size: 0.66rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.crime-card__top b {
    padding: 0.25rem 0.5rem;
    border: 1px solid rgba(47, 105, 143, 0.42);
    border-radius: 999px;
    color: #a8d4ee;
    background: rgba(47, 105, 143, 0.12);
    white-space: nowrap;
}

.crime-card h3 {
    margin-top: 0.8rem;
    font-size: clamp(1.45rem, 2.4vw, 2rem);
    line-height: 0.95;
    text-transform: uppercase;
}

.crime-card > p {
    flex: 1;
    margin-top: 0.6rem;
    color: var(--muted);
    font-size: 0.8rem;
}

.crime-card__facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
    margin-top: 0.9rem;
}

.crime-card__facts span {
    min-width: 0;
    padding: 0.6rem;
    border-radius: 11px;
    background: rgba(0, 0, 0, 0.22);
}

.crime-card__facts small,
.crime-card__facts strong {
    display: block;
}

.crime-card__facts small {
    color: var(--muted);
    font-size: 0.57rem;
    text-transform: uppercase;
}

.crime-card__facts strong {
    overflow: hidden;
    color: var(--white);
    font-size: 0.78rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.crime-card__risk {
    display: grid;
    gap: 0.22rem;
    margin-top: 0.8rem;
    color: #d7999d;
    font-size: 0.65rem;
}

.crime-card form {
    margin-top: 0.9rem;
}

.crime-card form .btn {
    width: 100%;
}

.crime-card form .btn span {
    display: inline;
}

.crime-history {
    margin-top: 1.25rem;
}

.crime-history td:first-child small {
    display: block;
    margin-top: 0.15rem;
    color: var(--muted);
    font-size: 0.65rem;
}

.result-pill {
    display: inline-block;
    padding: 0.24rem 0.48rem;
    border-radius: 999px;
    font-size: 0.6rem;
    font-weight: 900;
    text-transform: uppercase;
}

.result-pill--success {
    color: #c8f4da;
    background: rgba(45, 144, 85, 0.25);
}

.result-pill--failure {
    color: #ffd1d3;
    background: rgba(226, 29, 39, 0.22);
}

@media (max-width: 1080px) {
    .crime-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .account-crime-strip > .btn {
        grid-column: 1 / -1;
    }
}

@media (max-width: 720px) {
    .crime-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .crime-grid,
    .crime-summary,
    .account-crime-strip,
    .crime-lock-notice {
        grid-template-columns: 1fr;
    }

    .crime-lock-notice .btn {
        grid-column: 1;
        grid-row: auto;
        margin-top: 0.45rem;
    }
}

/* Public stats, authentication feedback, and player account */
.hero__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.8rem;
    margin-top: 2rem;
}

.public-stats {
    width: min(1180px, calc(100% - 2rem));
    margin: 3rem auto;
    padding: clamp(1.2rem, 4vw, 2.2rem);
    border: 1px solid rgba(226, 29, 39, 0.42);
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.045);
    box-shadow: var(--shadow);
}

.stats-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
}

.stats-heading h2,
.panel h2 {
    font-size: clamp(1.8rem, 4vw, 3.4rem);
    line-height: 1;
    letter-spacing: -0.05em;
    text-transform: uppercase;
}

.stats-status {
    padding: 0.5rem 0.8rem;
    border: 1px solid rgba(226, 29, 39, 0.45);
    border-radius: 999px;
    color: #ffd4d7;
    font-size: 0.78rem;
}

.city-numbers {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 1.5rem;
}

.city-numbers article,
.number-card {
    padding: 1.2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(226, 29, 39, 0.12), rgba(255, 255, 255, 0.035));
}

.city-numbers span,
.number-card span {
    display: block;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.city-numbers strong,
.number-card strong {
    display: block;
    margin-top: 0.25rem;
    color: var(--white-soft);
    font-size: clamp(1.35rem, 4vw, 2.2rem);
}

.leaderboard {
    margin-top: 1rem;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
}

.leaderboard__head,
.leaderboard__row {
    display: grid;
    grid-template-columns: 70px 1fr 100px 120px;
    gap: 0.5rem;
    align-items: center;
    padding: 0.85rem 1rem;
}

.leaderboard__head {
    color: var(--white-soft);
    background: rgba(226, 29, 39, 0.12);
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.leaderboard__row + .leaderboard__row {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.stats-fallback,
.empty-state {
    margin-top: 1rem;
    padding: 1.2rem;
    border: 1px dashed rgba(226, 29, 39, 0.34);
    border-radius: 18px;
    color: var(--muted);
    background: rgba(0, 0, 0, 0.2);
}

.stats-fallback strong {
    color: var(--white);
}

.alert {
    margin-top: 1rem;
    padding: 0.8rem 1rem;
    border-radius: 14px;
    font-size: 0.92rem;
}

.alert--error {
    border: 1px solid rgba(226, 29, 39, 0.55);
    color: #ffd1ce;
    background: rgba(226, 29, 39, 0.14);
}

.alert--success {
    border: 1px solid rgba(47, 105, 143, 0.5);
    color: #d7ecf7;
    background: rgba(47, 105, 143, 0.12);
}

.auth-form small {
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: normal;
    text-transform: none;
}

.auth-form textarea {
    width: 100%;
    padding: 0.8rem 0.95rem;
    resize: vertical;
    border: 1px solid rgba(226, 29, 39, 0.35);
    border-radius: 14px;
    color: var(--white);
    background: rgba(0, 0, 0, 0.38);
    font: inherit;
    outline: none;
}

.auth-form textarea:focus {
    border-color: var(--sky-blue);
    box-shadow: 0 0 0 4px rgba(47, 105, 143, 0.18);
}

.auth-form input[type="file"] {
    width: 100%;
    padding: 0.7rem;
    border: 1px dashed rgba(226, 29, 39, 0.45);
    border-radius: 14px;
    color: var(--muted);
    background: rgba(0, 0, 0, 0.25);
}

.btn--small {
    min-height: 42px;
    padding: 0 1rem;
    border: 0;
    cursor: pointer;
}

.dashboard-page {
    padding-bottom: 4rem;
}

.dashboard-nav {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem max(1rem, calc((100% - 1180px) / 2));
    border-bottom: 1px solid rgba(226, 29, 39, 0.35);
    background: rgba(5, 5, 6, 0.92);
    backdrop-filter: blur(14px);
}

.dashboard-brand {
    color: var(--white-soft);
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.dashboard-shell {
    width: min(1180px, calc(100% - 2rem));
    margin: 2rem auto;
}

.profile-banner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: clamp(1.2rem, 4vw, 2rem);
    border: 1px solid rgba(226, 29, 39, 0.42);
    border-radius: 30px;
    background: linear-gradient(135deg, rgba(226, 29, 39, 0.18), rgba(47, 105, 143, 0.12));
    box-shadow: var(--shadow);
}

.profile-banner h1 {
    font-size: clamp(2.5rem, 8vw, 6rem);
}

.profile-meta {
    margin-top: 0.75rem;
    color: var(--muted);
}

.avatar {
    flex: 0 0 auto;
    width: clamp(92px, 14vw, 150px);
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 3px solid var(--red);
    border-radius: 26px;
    color: #ffffff;
    background: linear-gradient(145deg, var(--red-bright), var(--red-dark));
    box-shadow: 0 15px 45px rgba(226, 29, 39, 0.25);
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 900;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.8rem;
    margin: 1rem 0;
}

.status-card {
    grid-column: span 2;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.05);
}

.status-card > div:first-child {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.82rem;
}

.number-card {
    grid-column: span 3;
}

.meter {
    height: 8px;
    margin-top: 0.75rem;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
}

.meter span {
    display: block;
    height: 100%;
    border-radius: inherit;
}

.meter--health { background: var(--red); }
.meter--xp { background: var(--sky-blue); }
.meter--stamina { background: var(--white-soft); }

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.panel {
    padding: clamp(1.1rem, 3vw, 1.7rem);
    border: 1px solid rgba(226, 29, 39, 0.3);
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.045);
}

.panel:first-child {
    grid-row: span 2;
}

.inventory-list {
    display: grid;
    gap: 0.6rem;
    margin-top: 1rem;
}

.inventory-list > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
}

.inventory-list small {
    display: block;
    color: var(--muted);
    text-transform: capitalize;
}

@media (max-width: 760px) {
    .stats-heading,
    .profile-banner {
        align-items: flex-start;
        flex-direction: column;
    }

    .city-numbers,
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .leaderboard__head,
    .leaderboard__row {
        grid-template-columns: 48px 1fr 55px 72px;
        padding-inline: 0.65rem;
        font-size: 0.83rem;
    }

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

    .status-card,
    .number-card {
        grid-column: auto;
    }

    .panel:first-child {
        grid-row: auto;
    }
}

@media (max-width: 520px) {
    .hero__actions .btn {
        width: 100%;
    }
}


/* Updated compact centered cookie consent flow */
.cookie-consent {
    position: fixed;
    inset: 0;
    z-index: 100;
    width: auto;
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.38);
}

.cookie-consent[hidden],
.cookie-consent__compact[hidden],
.cookie-consent__step[hidden] {
    display: none !important;
}

.cookie-consent__panel {
    width: min(430px, 100%);
    max-height: calc(100vh - 2rem);
    overflow: auto;
    padding: 1rem;
    text-align: center;
    border: 1px solid rgba(226, 29, 39, 0.72);
    border-radius: 22px;
    background:
        linear-gradient(135deg, rgba(226, 29, 39, 0.18), rgba(47, 105, 143, 0.14)),
        rgba(5, 5, 6, 0.98);
    box-shadow: 0 22px 80px rgba(0, 0, 0, 0.76);
    backdrop-filter: blur(14px);
}

.cookie-consent__panel h2 {
    font-size: clamp(1.25rem, 5vw, 1.75rem);
    line-height: 1.05;
    letter-spacing: -0.04em;
    text-transform: uppercase;
}

.cookie-consent__text {
    margin-top: 0.65rem;
    font-size: 0.9rem;
    line-height: 1.55;
}

.cookie-consent__actions--centered {
    justify-content: center;
    align-items: center;
}

.cookie-consent__actions .btn {
    min-height: 42px;
    padding: 0 1rem;
    font-size: 0.8rem;
}

.cookie-consent__step .cookie-consent__warning {
    text-align: left;
}

.cookie-options {
    text-align: left;
    max-height: min(340px, 45vh);
}

@media (max-width: 620px) {
    .cookie-consent {
        inset: 0;
        width: auto;
        padding: 0.75rem;
    }

    .cookie-consent__panel {
        width: min(430px, 100%);
    }

    .cookie-consent__actions .btn {
        width: 100%;
    }
}

/* Phase 3 city marketplace and equipment */
.street-status {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.inventory-manage-link {
    margin-top: 1rem;
}

.market-empty {
    margin-top: 1rem;
    padding: 2rem;
}

.market-section + .market-section {
    margin-top: 2rem;
}

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

.store-card {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 1.1rem;
    min-width: 0;
    padding: 1.25rem;
    border: 1px solid rgba(226, 29, 39, 0.32);
    border-radius: 24px;
    background:
        linear-gradient(135deg, rgba(226, 29, 39, 0.1), transparent 50%),
        rgba(255, 255, 255, 0.04);
}

.store-card--ammunition {
    border-color: rgba(47, 105, 143, 0.44);
    background:
        linear-gradient(135deg, rgba(47, 105, 143, 0.15), transparent 52%),
        rgba(255, 255, 255, 0.04);
}

.store-card__mark,
.store-banner__mark,
.market-item__mark {
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--white);
    background: linear-gradient(145deg, var(--red-bright), var(--red-dark));
    font-weight: 900;
    letter-spacing: -0.05em;
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.3);
}

.store-card--ammunition .store-card__mark,
.store-banner--ammunition .store-banner__mark,
.market-item--ammunition .market-item__mark {
    background: linear-gradient(145deg, var(--sky-blue), #17374d);
}

.store-card__mark {
    width: 92px;
    height: 92px;
    border-radius: 24px;
    font-size: 1.8rem;
}

.store-card__content {
    min-width: 0;
}

.store-card__content > span,
.market-item__type,
.owned-item__top > span {
    color: var(--red-bright);
    font-size: 0.64rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.store-card--ammunition .store-card__content > span,
.market-item--ammunition .market-item__type {
    color: #8fc4e4;
}

.store-card h3 {
    margin-top: 0.2rem;
    font-size: clamp(1.6rem, 3vw, 2.35rem);
    line-height: 0.95;
    text-transform: uppercase;
}

.store-card p {
    margin-top: 0.55rem;
    color: var(--muted);
    font-size: 0.82rem;
}

.store-card__facts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 0.85rem 0;
    color: var(--sky-blue);
    font-size: 0.72rem;
}

.store-card .btn {
    width: 100%;
}

.market-footer-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.market-footer-actions a {
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.035);
    transition: border-color 160ms ease, transform 160ms ease;
}

.market-footer-actions a:hover,
.market-footer-actions a:focus-visible {
    border-color: rgba(226, 29, 39, 0.52);
    transform: translateY(-2px);
}

.market-footer-actions strong,
.market-footer-actions span {
    display: block;
}

.market-footer-actions span {
    margin-top: 0.25rem;
    color: var(--muted);
    font-size: 0.78rem;
}

.store-banner {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr) auto;
    align-items: center;
    gap: 1.5rem;
    padding: clamp(1.25rem, 4vw, 2.2rem);
    border: 1px solid rgba(226, 29, 39, 0.44);
    border-radius: 28px;
    background:
        linear-gradient(120deg, rgba(226, 29, 39, 0.17), transparent 48%),
        rgba(255, 255, 255, 0.04);
    box-shadow: var(--shadow);
}

.store-banner--ammunition {
    border-color: rgba(47, 105, 143, 0.52);
    background:
        linear-gradient(120deg, rgba(47, 105, 143, 0.2), transparent 48%),
        rgba(255, 255, 255, 0.04);
}

.store-banner__mark {
    width: 120px;
    height: 120px;
    border-radius: 30px;
    font-size: 2.25rem;
}

.store-banner h1 {
    font-size: clamp(2.8rem, 7vw, 6rem);
    line-height: 0.9;
    text-transform: uppercase;
}

.store-banner > div:nth-child(2) > p:last-child {
    max-width: 680px;
    margin-top: 0.7rem;
    color: var(--muted);
}

.market-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin: 1rem 0;
}

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

.market-item {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 1.15rem;
    border: 1px solid rgba(226, 29, 39, 0.27);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.04);
}

.market-item--ammunition {
    border-color: rgba(47, 105, 143, 0.36);
}

.market-item__top,
.owned-item__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    color: var(--muted);
    font-size: 0.68rem;
}

.market-item__mark {
    width: 64px;
    height: 64px;
    margin-top: 0.9rem;
    border-radius: 18px;
    font-size: 1.55rem;
}

.market-item h2 {
    margin-top: 0.75rem;
    font-size: 1.65rem;
    line-height: 0.95;
    text-transform: uppercase;
}

.market-item > p {
    flex: 1;
    margin-top: 0.6rem;
    color: var(--muted);
    font-size: 0.8rem;
}

.item-stats,
.owned-item__facts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.85rem;
}

.item-stats > span,
.owned-item__facts > span {
    min-width: 74px;
    padding: 0.55rem;
    border-radius: 11px;
    background: rgba(0, 0, 0, 0.2);
}

.item-stats small,
.item-stats strong,
.owned-item__facts small,
.owned-item__facts strong {
    display: block;
}

.item-stats small,
.owned-item__facts small {
    color: var(--muted);
    font-size: 0.57rem;
    text-transform: uppercase;
}

.market-item__price {
    margin-top: 0.9rem;
    padding-top: 0.85rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.market-item__price span,
.market-item__price strong,
.market-item__price small {
    display: block;
}

.market-item__price span,
.market-item__price small {
    color: var(--muted);
    font-size: 0.65rem;
}

.market-item__price strong {
    color: var(--white);
    font-size: 1.45rem;
}

.purchase-form {
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 0.6rem;
    margin-top: 0.9rem;
}

.purchase-form label {
    display: grid;
    gap: 0.25rem;
    color: var(--muted);
    font-size: 0.62rem;
    font-weight: 900;
    text-transform: uppercase;
}

.purchase-form input {
    width: 100%;
    min-height: 42px;
    padding: 0.45rem 0.55rem;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 11px;
    outline: 0;
    color: var(--white);
    background: rgba(0, 0, 0, 0.22);
    font: inherit;
}

.purchase-form input:focus {
    border-color: var(--red-bright);
}

.loadout-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.8rem;
    margin-top: 1rem;
}

.loadout-slot {
    min-width: 0;
    padding: 1rem;
    border: 1px dashed rgba(255, 255, 255, 0.16);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.025);
}

.loadout-slot.is-filled {
    border-style: solid;
    border-color: rgba(226, 29, 39, 0.42);
    background: linear-gradient(135deg, rgba(226, 29, 39, 0.11), rgba(47, 105, 143, 0.05));
}

.loadout-slot span,
.loadout-slot strong,
.loadout-slot small {
    display: block;
}

.loadout-slot span {
    color: var(--muted);
    font-size: 0.62rem;
    font-weight: 900;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.loadout-slot strong {
    margin-top: 0.25rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.loadout-slot small {
    color: var(--sky-blue);
    font-size: 0.68rem;
}

.owned-item-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
}

.owned-item {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 19px;
    background: rgba(255, 255, 255, 0.035);
}

.owned-item.is-equipped {
    border-color: rgba(226, 29, 39, 0.48);
    box-shadow: inset 3px 0 0 var(--red-bright);
}

.owned-item__top b {
    padding: 0.2rem 0.42rem;
    border-radius: 999px;
    color: var(--white);
    background: var(--red-dark);
    font-size: 0.58rem;
    text-transform: uppercase;
}

.owned-item h3 {
    margin-top: 0.65rem;
    font-size: 1.35rem;
    line-height: 1;
    text-transform: uppercase;
}

.owned-item > p {
    flex: 1;
    margin-top: 0.5rem;
    color: var(--muted);
    font-size: 0.76rem;
}

.owned-item form {
    margin-top: 0.85rem;
}

.owned-item form .btn {
    width: 100%;
}

.owned-item__passive {
    display: block;
    margin-top: 0.85rem;
    color: var(--muted);
    font-size: 0.68rem;
    text-transform: uppercase;
}

@media (max-width: 1180px) {
    .item-grid,
    .owned-item-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .store-banner {
        grid-template-columns: 90px minmax(0, 1fr);
    }

    .store-banner__mark {
        width: 90px;
        height: 90px;
        border-radius: 24px;
    }

    .store-banner .street-identity {
        grid-column: 1 / -1;
    }
}

@media (max-width: 720px) {
    .street-status,
    .store-grid,
    .market-footer-actions,
    .loadout-grid {
        grid-template-columns: 1fr;
    }

    .store-card {
        grid-template-columns: 72px minmax(0, 1fr);
    }

    .store-card__mark {
        width: 72px;
        height: 72px;
        border-radius: 19px;
    }
}

@media (max-width: 560px) {
    .store-banner,
    .item-grid,
    .owned-item-grid {
        grid-template-columns: 1fr;
    }

    .store-banner__mark {
        width: 76px;
        height: 76px;
        border-radius: 20px;
    }
}

/* Phase 5: PvP combat */
.combat-hero {
    border-color: rgba(226, 29, 39, 0.5);
    background: linear-gradient(120deg, rgba(226, 29, 39, 0.16), transparent 54%), rgba(255,255,255,0.035);
}

.combat-summary {
    margin-bottom: 1rem;
}

.combat-loadout {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
    gap: 0.8rem;
    align-items: stretch;
    margin: 1rem 0 1.7rem;
}

.combat-loadout > div {
    padding: 0.9rem 1rem;
    border: 1px solid rgba(255,255,255,0.09);
    border-radius: 16px;
    background: rgba(255,255,255,0.035);
}

.combat-loadout span,
.combat-loadout strong,
.combat-loadout small {
    display: block;
}

.combat-loadout span {
    color: var(--muted);
    font-size: 0.62rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.combat-loadout small {
    margin-top: 0.2rem;
    color: var(--sky-blue);
    font-size: 0.68rem;
}

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

.combat-target {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    min-width: 0;
    padding: 1rem;
    border: 1px solid rgba(226,29,39,0.28);
    border-radius: 20px;
    background: rgba(255,255,255,0.035);
}

.combat-target.is-protected {
    border-color: rgba(255,255,255,0.12);
    opacity: 0.72;
}

.combat-target__head {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.combat-target__head h3 {
    font-size: 1.25rem;
    text-transform: uppercase;
}

.combat-target__head small {
    color: var(--muted);
}

.combat-target__stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 0.55rem;
}

.combat-target__stats > span {
    padding: 0.65rem;
    border-radius: 12px;
    background: rgba(0,0,0,0.2);
}

.combat-target__stats small,
.combat-target__stats strong {
    display: block;
}

.combat-target__stats small {
    color: var(--muted);
    font-size: 0.58rem;
    text-transform: uppercase;
}

.combat-target form,
.combat-target .btn {
    width: 100%;
}

.combat-history {
    margin-bottom: 1rem;
}

.combat-empty {
    margin-bottom: 1rem;
}

.account-combat-strip {
    border-color: rgba(226,29,39,0.28);
}

.nearby-player > .btn {
    margin-left: auto;
}

@media (max-width: 1050px) {
    .combat-target-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .combat-loadout,
    .combat-target-grid {
        grid-template-columns: 1fr;
    }
}
