@font-face {
    font-family: "CityRP Circular";
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: local("Circular Std Medium"), url("/fonts/circular.ttf") format("truetype");
}

:root {
    --cityrp-font: "CityRP Circular", Arial, Helvetica, sans-serif;
    --cityrp-bg: #161616;
    --cityrp-dark: #121212;
    --cityrp-card: #272727;
    --cityrp-card-alt: #303030;
    --cityrp-control: #3c3c3c;
    --cityrp-control-light: #484848;
    --cityrp-border: #414141;
    --cityrp-accent: #c83232;
    --cityrp-accent-light: #df5a5a;
    --cityrp-text: #f7f7f7;
    --cityrp-muted: #bebebe;
    --cityrp-action: #34d142;
    --cityrp-warning: #e1a444;
    --cityrp-danger: #d74141;
    --cityrp-glow: rgba(200, 50, 50, .24);
    --cityrp-glow-soft: rgba(200, 50, 50, .10);
    --cityrp-surface-high: #323233;
    --cityrp-surface-mid: #29292a;
    --cityrp-surface-low: #1b1b1c;
    --farming-organic: #70ae55;
    --farming-organic-light: #8ac76f;
    --farming-water: #60a4dc;
    --cityrp-shell: min(1240px, calc(100% - 32px));
    --cityrp-type-meta: 10px;
    --cityrp-type-support: 11px;
    --cityrp-type-detail: 12px;
    --cityrp-type-body: 13px;
    --cityrp-type-control: 13px;
    --cityrp-leading-body: 1.55;
}

* { box-sizing: border-box; }
html { min-height: 100%; scroll-behavior: smooth; scrollbar-color: var(--cityrp-accent) #202020; }
body {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    color: var(--cityrp-text);
    background-color: #0d0d0e;
    background-image:
        radial-gradient(circle at 12% 16%, rgba(200, 50, 50, .10), transparent 28%),
        linear-gradient(180deg, rgba(5, 5, 6, .18), rgba(5, 5, 6, .72)),
        url("/background.png");
    background-position: center top;
    background-repeat: no-repeat;
    background-size: cover;
    background-attachment: fixed;
    font-family: var(--cityrp-font);
    font-size: var(--cityrp-type-body);
    line-height: var(--cityrp-leading-body);
    -webkit-font-smoothing: antialiased;
}

::selection { color: #fff; background: rgba(200, 50, 50, .85); }
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: #202020; }
::-webkit-scrollbar-thumb { border: 2px solid #202020; border-radius: 8px; background: linear-gradient(180deg, #e05a5a, var(--cityrp-accent)); }

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
img { max-width: 100%; }
h1, h2, h3, p { margin-top: 0; }
.shell { width: var(--cityrp-shell); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* Forum navbar */
.topbar {
    position: fixed;
    inset: 0 0 auto;
    z-index: 9999;
    min-height: 64px;
    background: rgba(22, 22, 23, .78);
    border-bottom: 1px solid rgba(255, 255, 255, .07);
    box-shadow: 0 10px 34px rgba(0, 0, 0, .32);
    -webkit-backdrop-filter: saturate(165%) blur(18px);
    backdrop-filter: saturate(165%) blur(18px);
}
.topbar-shell {
    width: min(1440px, calc(100% - 32px));
    min-height: 64px;
    margin-inline: auto;
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 24px;
}
.main-nav { margin-left: auto; display: flex; align-items: stretch; }
.main-nav a {
    position: relative;
    min-width: max-content;
    padding: 0 20px;
    display: flex;
    align-items: center;
    border-radius: 6px;
    color: #dddddf;
    font-size: 13px;
    font-weight: 650;
    transition: background-color .18s ease, color .18s ease, transform .18s ease;
}
.main-nav a::after {
    position: absolute;
    right: 20px;
    bottom: 6px;
    left: 20px;
    height: 3px;
    content: "";
    border-radius: 2px;
    background: var(--cityrp-accent);
    transform: scaleX(0);
    transition: transform .18s ease;
}
.main-nav a:hover,
.main-nav a:focus-visible,
.main-nav a.is-active { color: #fff; background: rgba(200, 50, 50, .12); }
.main-nav a:hover::after,
.main-nav a:focus-visible::after,
.main-nav a.is-active::after { transform: scaleX(1); }

.account { position: relative; display: flex; align-items: center; }
.account-button {
    min-width: 0;
    padding: 5px 9px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 0;
    border-radius: 6px;
    color: #dddddf;
    background: transparent;
    cursor: pointer;
    transition: background-color .18s ease;
}
.account-button:hover, .account-button:focus-visible { background: rgba(200, 50, 50, .12); }
.account-button img { width: 40px; height: 40px; object-fit: cover; border: 3px solid #484848; border-radius: 50%; box-shadow: 0 0 0 3px rgba(200, 50, 50, .14); }
.account-button > span:not(.chevron) { max-width: 150px; display: flex; flex-direction: column; text-align: left; }
.account-button small { color: #939395; font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
.account-button strong { margin-top: 2px; overflow: hidden; color: #fff; font-size: 12px; white-space: nowrap; text-overflow: ellipsis; }
.chevron { color: #9f9fa1; }
.account-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 190px;
    max-height: calc(100vh - 82px);
    padding: 6px;
    display: none;
    overflow-x: hidden;
    overflow-y: auto;
    border: 1px solid #424242;
    border-radius: 8px;
    background: rgba(30, 30, 31, .98);
    box-shadow: 0 18px 42px rgba(0, 0, 0, .42);
}
.account-menu.is-open { display: grid; }
.account-menu a { padding: 11px 10px; border-radius: 5px; color: var(--cityrp-muted); font-size: 12px; transition: background-color .15s ease, color .15s ease, padding-left .15s ease; }
.account-menu a:hover, .account-menu a:focus-visible, .account-menu a.is-active { padding-left: 15px; color: #fff; background: rgba(200, 50, 50, .28); }
.nav-login { align-self: center; padding: 10px 14px; border: 1px solid #5a5a5c; border-radius: 6px; color: #fff; background: var(--cityrp-control); font-size: 11px; font-weight: 750; }
.nav-login:hover, .nav-login:focus-visible { border-color: var(--cityrp-accent); background: #5a3434; }
.nav-toggle { display: none; width: 43px; height: 42px; align-self: center; border: 1px solid #4a4a4c; border-radius: 6px; background: var(--cityrp-control); cursor: pointer; }
.nav-toggle > span:not(.sr-only) { display: block; width: 19px; height: 2px; margin: 4px auto; background: #fff; }

/* Forum logo/header */
.site-masthead {
    position: relative;
    padding-top: 64px;
    overflow: hidden;
    border-bottom: 1px solid rgba(255, 255, 255, .07);
    background:
        linear-gradient(120deg, rgba(18, 18, 18, .92), rgba(39, 39, 39, .78)),
        radial-gradient(circle at 72% 22%, rgba(200, 50, 50, .18), transparent 34%);
    box-shadow: inset 0 -1px 0 rgba(200, 50, 50, .20), 0 22px 50px rgba(0, 0, 0, .22);
}
.site-masthead::before {
    position: absolute;
    inset: 64px 0 0;
    content: "";
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, .018) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .018) 1px, transparent 1px);
    background-size: 34px 34px;
}
.site-masthead::after {
    position: absolute;
    top: -100px;
    right: -80px;
    width: 520px;
    height: 320px;
    content: "";
    pointer-events: none;
    background: radial-gradient(circle, rgba(200, 50, 50, .24), transparent 68%);
}
.masthead-shell { position: relative; z-index: 1; min-height: 175px; padding-block: 25px; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.brand-logo { display: block; max-width: 100%; }
.brand-logo img { display: block; width: auto; max-width: min(520px, 58vw); max-height: 125px; filter: drop-shadow(0 10px 20px rgba(0, 0, 0, .38)); transition: filter .22s ease, transform .22s ease; }
.brand-logo:hover img { filter: drop-shadow(0 13px 26px rgba(200, 50, 50, .20)); transform: translateY(-2px) scale(1.008); }
.masthead-status {
    min-width: min(100%, 290px);
    padding: 13px 15px;
    display: flex;
    align-items: center;
    gap: 11px;
    border: 1px solid #404040;
    border-left: 5px solid var(--cityrp-accent);
    border-radius: 8px;
    color: var(--cityrp-muted);
    background: rgba(39, 39, 39, .82);
    box-shadow: 0 14px 30px rgba(0, 0, 0, .24);
}
.masthead-status > span:last-child { display: grid; gap: 3px; }
.masthead-status small { color: #e16a6a; font-size: 9px; font-weight: 800; letter-spacing: .14em; }
.masthead-status strong { color: #f3f3f4; font-size: 11px; font-weight: 600; }
.status-light { flex: 0 0 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--cityrp-action); box-shadow: 0 0 10px rgba(52, 209, 66, .55); }
.masthead-status.is-guest .status-light { background: var(--cityrp-accent); box-shadow: 0 0 10px var(--cityrp-glow); }

main { min-height: 50vh; flex: 1 0 auto; }
.page-shell { padding-block: 24px 0; animation: cityrp-content-enter .38s ease-out both; }
.breadcrumb {
    min-height: 44px;
    margin-bottom: 18px;
    padding: 9px 13px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    border: 1px solid #353535;
    border-left: 5px solid var(--cityrp-accent);
    border-radius: 7px;
    color: var(--cityrp-muted);
    background: linear-gradient(90deg, rgba(200, 50, 50, .09), transparent 24%), rgba(24, 24, 25, .94);
    box-shadow: 0 12px 28px rgba(0, 0, 0, .22), inset 0 1px 0 rgba(255, 255, 255, .025);
    font-size: 11px;
}
.breadcrumb a { color: #e06a6a; }
.breadcrumb a:hover { color: #fff; }
.breadcrumb span { color: #6f6f71; }
.breadcrumb strong { padding: 4px 8px; border-radius: 5px; color: #fff; background: var(--cityrp-control); font-weight: 650; }

/* MyBB tborder-style surfaces */
.forum-panel {
    overflow: hidden;
    border: 1px solid #3b3b3c;
    border-radius: 9px;
    color: var(--cityrp-text);
    background: var(--cityrp-bg);
    box-shadow: 0 20px 46px rgba(0, 0, 0, .34), 0 0 0 1px rgba(255, 255, 255, .015), inset 0 1px 0 rgba(255, 255, 255, .035);
}
.panel-header {
    position: relative;
    min-height: 70px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    border-bottom: 1px solid #404041;
    border-left: 7px solid var(--cityrp-accent);
    color: #fff;
    background: linear-gradient(90deg, rgba(200, 50, 50, .18), transparent 30%), linear-gradient(135deg, #373738, #272728 72%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .035);
}
.panel-header::after { position: absolute; bottom: 0; left: 0; width: min(240px, 42%); height: 1px; content: ""; background: linear-gradient(90deg, var(--cityrp-accent), transparent); }
.panel-header h1, .panel-header h2 { margin: 3px 0 0; color: #fff; font-size: clamp(21px, 2.4vw, 29px); line-height: 1.15; letter-spacing: -.02em; }
.panel-header > p { max-width: 420px; margin: 0; color: var(--cityrp-muted); font-size: 12px; line-height: 1.55; text-align: right; }
.panel-kicker { color: #e16a6a; font-size: 9px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.panel-status { padding: 5px 9px; display: inline-flex; align-items: center; gap: 7px; border: 1px solid #444445; border-radius: 999px; color: var(--cityrp-muted); background: #1b1b1c; font-size: 9px; font-weight: 700; }
.panel-status::before { width: 6px; height: 6px; content: ""; border-radius: 50%; background: var(--cityrp-action); box-shadow: 0 0 8px rgba(52, 209, 66, .45); }

.dashboard-hero {
    position: relative;
    min-height: 260px;
    padding: 30px;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(300px, .8fr);
    align-items: center;
    gap: clamp(30px, 6vw, 85px);
    background: radial-gradient(circle at 88% 10%, rgba(200, 50, 50, .18), transparent 35%), linear-gradient(135deg, #303031, #1c1c1d 76%);
    border-left: 7px solid var(--cityrp-accent);
}
.dashboard-hero > *, .identity-card, .identity-card dl, .identity-card dl div, .identity-card dd { min-width: 0; }
.dashboard-hero::after { position: absolute; inset: 0; content: ""; pointer-events: none; opacity: .7; background-image: linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px); background-size: 28px 28px; }
.hero-copy, .identity-card { position: relative; z-index: 1; }
.hero-copy h1 { margin: 7px 0 9px; color: #fff; font-size: clamp(27px, 3.4vw, 42px); line-height: 1.12; letter-spacing: -.025em; }
.hero-copy > p { max-width: 620px; margin-bottom: 0; color: var(--cityrp-muted); font-size: 13px; line-height: 1.65; }
.hero-actions { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 9px; }
.button {
    min-height: 40px;
    padding: 9px 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #515153;
    border-radius: 6px;
    color: #fff;
    background: var(--cityrp-control);
    box-shadow: 0 5px 12px rgba(0, 0, 0, .18);
    font-size: 11px;
    font-weight: 750;
    transition: background-color .16s ease, border-color .16s ease, transform .16s ease;
}
.button:hover, .button:focus-visible { border-color: var(--cityrp-accent); background: #5a3434; transform: translateY(-1px); }
.button-primary { border-color: var(--cityrp-accent-light); background: linear-gradient(135deg, #d14242, #9e2929); box-shadow: 0 7px 16px rgba(200, 50, 50, .20); }
.button-primary:hover, .button-primary:focus-visible { background: linear-gradient(135deg, #df5151, #aa2c2c); }

.identity-card { padding: 18px; border: 1px solid #404042; border-left: 5px solid var(--cityrp-accent); border-radius: 8px; background: rgba(25, 25, 26, .88); box-shadow: 0 14px 30px rgba(0, 0, 0, .28); }
.identity-head { padding-bottom: 16px; display: flex; align-items: center; gap: 13px; }
.identity-head img { width: 56px; height: 56px; object-fit: cover; border: 3px solid #484848; border-radius: 6px; box-shadow: 0 0 0 3px rgba(200, 50, 50, .14); }
.identity-head > div { min-width: 0; display: flex; flex-direction: column; }
.identity-head small { color: #8f8f91; font-size: 8px; letter-spacing: .14em; }
.identity-head strong { margin: 4px 0 2px; overflow: hidden; color: #fff; font-size: 17px; white-space: nowrap; text-overflow: ellipsis; }
.identity-head span { color: #e16a6a; font-size: 10px; }
.online-pulse { margin-left: auto; width: 8px; height: 8px; border-radius: 50%; background: var(--cityrp-action); box-shadow: 0 0 10px rgba(52, 209, 66, .55); }
.identity-card dl { margin: 0; border-top: 1px solid #38383a; }
.identity-card dl div { padding: 10px 0; display: flex; justify-content: space-between; gap: 16px; border-bottom: 1px solid #343436; }
.identity-card dl div:last-child { border-bottom: 0; padding-bottom: 0; }
.identity-card dt { color: #8f8f91; font-size: 9px; text-transform: uppercase; letter-spacing: .07em; }
.identity-card dd { max-width: 68%; margin: 0; overflow: hidden; color: var(--cityrp-muted); font-size: 9px; white-space: nowrap; text-overflow: ellipsis; }
.identity-card dd.good { color: #66d778; }

.quick-stats, .module-section { margin-top: 18px; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.metric-grid article {
    min-height: 112px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    border-right: 1px solid #383838;
    background: linear-gradient(100deg, #29292a, #252526);
    transition: background-color .16s ease, box-shadow .16s ease;
}
.metric-grid article:nth-child(even) { background: linear-gradient(100deg, #242425, #202021); }
.metric-grid article:last-child { border-right: 0; }
.metric-grid article:hover { background: var(--cityrp-control); box-shadow: inset 4px 0 0 var(--cityrp-accent); }
.metric-mark { flex: 0 0 42px; width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid #505052; border-radius: 7px; color: #ef6969; background: linear-gradient(135deg, #4a3030, #242425); font-size: 11px; font-weight: 800; }
.metric-grid article > div { min-width: 0; display: flex; flex-direction: column; }
.metric-grid small { color: #8c8c8e; font-size: 8px; font-weight: 750; letter-spacing: .13em; }
.metric-grid strong { margin: 5px 0 3px; overflow: hidden; color: #fff; font-size: 19px; white-space: nowrap; text-overflow: ellipsis; }
.metric-grid article div span { color: #89898b; font-size: 9px; }

.connection-note { margin-top: 18px; padding: 14px 17px; display: flex; align-items: center; gap: 12px; border: 1px solid #424244; border-left: 5px solid var(--cityrp-warning); border-radius: 7px; color: var(--cityrp-muted); background: #29251e; box-shadow: 0 9px 22px rgba(0, 0, 0, .16); }
.connection-note > span { flex: 0 0 25px; width: 25px; height: 25px; display: grid; place-items: center; border: 1px solid #6b5b3c; border-radius: 50%; color: var(--cityrp-warning); font-size: 11px; font-weight: 800; }
.connection-note p { margin: 0; font-size: 11px; line-height: 1.55; }
.connection-note strong { color: #fff; }

.module-section { margin-bottom: 34px; }
.module-grid { padding: 14px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; background: #171718; }
.module-card {
    position: relative;
    min-height: 124px;
    padding: 18px 16px;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: center;
    gap: 15px;
    border: 1px solid #3b3b3d;
    border-left: 4px solid #48484a;
    border-radius: 7px;
    color: var(--cityrp-text);
    background: linear-gradient(100deg, #29292a, #242425);
    transition: background-color .16s ease, border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.module-card:nth-child(even) { background: linear-gradient(100deg, #242425, #202021); }
.module-card:hover, .module-card:focus-visible { border-left-color: var(--cityrp-accent); background: var(--cityrp-control); box-shadow: 3px 0 18px var(--cityrp-glow-soft); transform: translateY(-1px); }
.module-card.featured, .module-card.admin-card { border-left-color: var(--cityrp-accent); }
.module-index { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid #4a4a4c; border-radius: 7px; color: #e16a6a; background: #1b1b1c; font-size: 10px; font-weight: 800; letter-spacing: .08em; }
.module-card > div { min-width: 0; }
.module-card small { color: #e16a6a; font-size: 8px; font-weight: 800; letter-spacing: .14em; }
.module-card h3 { margin: 4px 0 5px; color: #fff; font-size: 16px; }
.module-card p { margin: 0; color: var(--cityrp-muted); font-size: 10px; line-height: 1.5; }
.module-state { justify-self: end; padding: 5px 8px; border: 1px solid #444446; border-radius: 999px; color: #8e8e90; background: #1b1b1c; font-size: 7px; font-weight: 800; letter-spacing: .09em; white-space: nowrap; }
.module-state.active { border-color: rgba(52, 209, 66, .35); color: #64d675; background: rgba(52, 209, 66, .07); }
.module-state.guarded { border-color: rgba(225, 164, 68, .35); color: #e1a444; background: rgba(225, 164, 68, .07); }
.module-action { justify-self: end; display: inline-flex; align-items: center; gap: 7px; color: #d4d4d6; font-size: 9px; font-weight: 750; white-space: nowrap; }
.module-action b { width: 25px; height: 25px; display: grid; place-items: center; border: 1px solid #545456; border-radius: 50%; color: #ef6969; background: #1c1c1d; font-size: 15px; font-weight: 500; transition: border-color .16s ease, background-color .16s ease, transform .16s ease; }
.module-card:hover .module-action b, .module-card:focus-visible .module-action b { border-color: var(--cityrp-accent-light); color: #fff; background: var(--cityrp-accent); transform: translateX(2px); }
.module-card:last-child:nth-child(odd) { grid-column: 1 / -1; }

/* Player profile, derived from the forum panels and CityRP scoreboard rows */
.profile-page { padding-bottom: 34px; }
.profile-hero {
    position: relative;
    min-height: 236px;
    padding: 28px 30px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) minmax(210px, auto);
    align-items: center;
    gap: 24px;
    border-left: 7px solid var(--cityrp-accent);
    background: radial-gradient(circle at 90% 0%, rgba(200, 50, 50, .19), transparent 33%), linear-gradient(135deg, #303031, #1c1c1d 76%);
}
.profile-hero::after { position: absolute; inset: 0; content: ""; pointer-events: none; opacity: .7; background-image: linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px); background-size: 28px 28px; }
.profile-hero > * { position: relative; z-index: 1; min-width: 0; }
.profile-portrait { display: grid; justify-items: center; gap: 12px; }
.profile-portrait > img { width: 112px; height: 112px; display: block; object-fit: cover; border: 4px solid #484848; border-radius: 8px; box-shadow: 0 0 0 4px rgba(200, 50, 50, .15), 0 15px 30px rgba(0, 0, 0, .32); }
.profile-link-state { padding: 5px 8px; display: inline-flex; align-items: center; gap: 7px; border: 1px solid rgba(52, 209, 66, .3); border-radius: 999px; color: #72d980; background: rgba(52, 209, 66, .07); font-size: 8px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.profile-link-state i { width: 6px; height: 6px; border-radius: 50%; background: var(--cityrp-action); box-shadow: 0 0 8px rgba(52, 209, 66, .5); }
.profile-identity h1 { margin: 6px 0 5px; overflow-wrap: anywhere; color: #fff; font-size: clamp(29px, 3.5vw, 43px); line-height: 1.08; letter-spacing: -.025em; }
.profile-identity > p { margin: 0; color: var(--cityrp-muted); font-size: 12px; }
.profile-actions { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 8px; }
.profile-emblem { min-width: 210px; padding: 22px 18px; display: grid; gap: 6px; border: 1px solid #444446; border-left: 5px solid var(--cityrp-accent); border-radius: 8px; background: rgba(25, 25, 26, .88); box-shadow: 0 14px 30px rgba(0, 0, 0, .26); }
.profile-emblem span { color: #e16a6a; font-size: 8px; font-weight: 800; letter-spacing: .15em; }
.profile-emblem strong { overflow-wrap: anywhere; color: #fff; font-size: 21px; }
.profile-emblem small { color: #8f8f91; font-size: 9px; }
.profile-stats { margin-top: 18px; }
.profile-layout { margin-top: 18px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.profile-details { min-width: 0; }
.profile-details .panel-header { min-height: 76px; }
.profile-detail-list { margin: 0; padding: 8px 17px; background: #171718; }
.profile-detail-list > div { min-height: 60px; padding: 13px 10px; display: grid; grid-template-columns: minmax(120px, .7fr) minmax(0, 1.3fr); align-items: center; gap: 18px; border-bottom: 1px solid #38383a; }
.profile-detail-list > div:last-child { border-bottom: 0; }
.profile-detail-list dt { color: #8f8f91; font-size: 9px; font-weight: 750; letter-spacing: .09em; text-transform: uppercase; }
.profile-detail-list dd { min-width: 0; margin: 0; overflow-wrap: anywhere; color: #fff; font-size: 11px; text-align: right; }
.profile-detail-list dd.good { color: #66d778; }
.profile-empty { margin-top: 18px; }
.profile-empty-content { min-height: 250px; padding: 34px; display: flex; align-items: flex-start; justify-content: center; gap: 18px; background: linear-gradient(100deg, #29292a, #202021); }
.profile-empty-content > span { flex: 0 0 38px; width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid #6b5b3c; border-radius: 50%; color: var(--cityrp-warning); background: #29251e; font-size: 13px; font-weight: 800; }
.profile-empty-content > div { max-width: 700px; }
.profile-empty-content h3 { margin: 2px 0 8px; color: #fff; font-size: 19px; }
.profile-empty-content p { margin: 0; color: var(--cityrp-muted); font-size: 12px; line-height: 1.65; }

/* Personal inventory, based on the ingame Store/Inventory item browser */
.inventory-page { padding-bottom: 34px; }
.inventory-hero {
    position: relative;
    min-height: 250px;
    padding: 30px;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(330px, .8fr);
    align-items: center;
    gap: clamp(28px, 6vw, 82px);
    border-left: 7px solid var(--cityrp-accent);
    background: radial-gradient(circle at 88% 8%, rgba(200, 50, 50, .19), transparent 35%), linear-gradient(135deg, #303031, #1c1c1d 76%);
}
.inventory-hero::after { position: absolute; inset: 0; content: ""; pointer-events: none; opacity: .65; background-image: linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px); background-size: 28px 28px; }
.inventory-hero-copy, .inventory-capacity { position: relative; z-index: 1; min-width: 0; }
.inventory-hero-copy h1 { margin: 7px 0 9px; overflow-wrap: anywhere; color: #fff; font-size: clamp(29px, 3.4vw, 43px); line-height: 1.1; letter-spacing: -.03em; }
.inventory-hero-copy > p { max-width: 650px; margin: 0; color: var(--cityrp-muted); font-size: 13px; line-height: 1.65; }
.inventory-capacity { padding: 18px; border: 1px solid #454547; border-left: 5px solid var(--cityrp-accent); border-radius: 8px; background: rgba(24, 24, 25, .91); box-shadow: 0 17px 34px rgba(0, 0, 0, .3); }
.inventory-capacity header, .inventory-capacity > div { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.inventory-capacity header { padding-bottom: 13px; border-bottom: 1px solid #3a3a3c; }
.inventory-capacity header span, .inventory-capacity > div span { color: #9a9a9c; font-size: 10px; font-weight: 800; letter-spacing: .1em; }
.inventory-capacity header strong { color: #fff; font-size: 20px; }
.inventory-capacity progress { width: 100%; height: 10px; margin: 17px 0 11px; display: block; overflow: hidden; border: 0; border-radius: 999px; appearance: none; background: #181819; }
.inventory-capacity progress::-webkit-progress-bar { border-radius: 999px; background: #181819; }
.inventory-capacity progress::-webkit-progress-value { border-radius: 999px; background: linear-gradient(90deg, #9e2929, var(--cityrp-accent-light)); box-shadow: 0 0 14px var(--cityrp-glow); }
.inventory-capacity progress::-moz-progress-bar { border-radius: 999px; background: linear-gradient(90deg, #9e2929, var(--cityrp-accent-light)); }
.inventory-capacity > div strong { color: #fff; font-size: 12px; }
.inventory-capacity > small { margin-top: 13px; display: block; color: #99999b; font-size: 11px; }
.inventory-unavailable, .inventory-stats, .inventory-browser { margin-top: 18px; }
.inventory-stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.inventory-stat-grid article { min-width: 0; min-height: 108px; padding: 19px; display: flex; flex-direction: column; justify-content: center; border-right: 1px solid #383838; background: linear-gradient(100deg, #29292a, #252526); }
.inventory-stat-grid article:nth-child(even) { background: linear-gradient(100deg, #242425, #202021); }
.inventory-stat-grid article:last-child { border-right: 0; }
.inventory-stat-grid small { color: #9a9a9c; font-size: 10px; font-weight: 800; letter-spacing: .11em; }
.inventory-stat-grid strong { margin: 5px 0 3px; overflow: hidden; color: #fff; font-size: 21px; white-space: nowrap; text-overflow: ellipsis; }
.inventory-stat-grid span { color: #9a9a9c; font-size: 11px; }
.inventory-overview-capacity { padding: 16px 19px 18px; border-top: 1px solid #3b3b3d; background: linear-gradient(90deg, rgba(200, 50, 50, .09), transparent 34%), #1c1c1d; }
.inventory-overview-capacity > div { margin-bottom: 10px; display: flex; align-items: end; justify-content: space-between; gap: 18px; }
.inventory-overview-capacity > div > span { display: flex; align-items: baseline; gap: 9px; }
.inventory-overview-capacity > div > span:last-child { text-align: right; }
.inventory-overview-capacity small { color: #9a9a9c; font-size: 10px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.inventory-overview-capacity strong { color: #fff; font-size: 14px; }
.inventory-overview-capacity > div > span:last-child strong { color: #ef6969; font-size: 18px; }
.inventory-overview-capacity progress { width: 100%; height: 12px; display: block; overflow: hidden; border: 0; border-radius: 999px; appearance: none; background: #101011; box-shadow: inset 0 1px 4px rgba(0, 0, 0, .65); }
.inventory-overview-capacity progress::-webkit-progress-bar { border-radius: 999px; background: #101011; }
.inventory-overview-capacity progress::-webkit-progress-value { border-radius: 999px; background: linear-gradient(90deg, #9d2929, var(--cityrp-accent-light)); box-shadow: 0 0 15px var(--cityrp-glow); }
.inventory-overview-capacity progress::-moz-progress-bar { border-radius: 999px; background: linear-gradient(90deg, #9d2929, var(--cityrp-accent-light)); box-shadow: 0 0 15px var(--cityrp-glow); }
.inventory-controls { padding: 13px 14px; display: flex; align-items: flex-end; gap: 9px; border-bottom: 1px solid #3b3b3d; background: #202021; }
.inventory-controls label { flex: 0 1 250px; display: grid; gap: 6px; }
.inventory-controls label:first-child { flex: 1 1 360px; }
.inventory-controls label > span { color: #9a9a9c; font-size: 10px; font-weight: 800; letter-spacing: .1em; }
.inventory-controls input, .inventory-controls select { width: 100%; }
.inventory-control-actions { margin-left: auto; display: flex; gap: 7px; }
.inventory-control-actions .button { white-space: nowrap; }
.inventory-result-summary { min-height: 48px; padding: 10px 15px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border-bottom: 1px solid #363638; color: #a7a7a9; background: #19191a; font-size: 11px; }
.inventory-result-summary strong { color: #fff; }
.inventory-list { padding: 12px; background: #171718; }
.inventory-category-stack { display: grid; gap: 9px; }
.inventory-category { overflow: hidden; border: 1px solid #3d3d3f; border-left: 5px solid #4a4a4c; border-radius: 8px; background: #202021; box-shadow: 0 8px 20px rgba(0, 0, 0, .15); transition: border-color .16s ease, box-shadow .16s ease; }
.inventory-category[open] { border-left-color: var(--cityrp-accent); box-shadow: 0 12px 26px rgba(0, 0, 0, .22); }
.inventory-category > summary { position: relative; min-height: 72px; padding: 13px 52px 13px 16px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 20px; list-style: none; color: var(--cityrp-muted); background: linear-gradient(100deg, #303031, #252526); cursor: pointer; user-select: none; transition: color .16s ease, background-color .16s ease; }
.inventory-category > summary::-webkit-details-marker { display: none; }
.inventory-category > summary::after { position: absolute; top: 50%; right: 20px; width: 9px; height: 9px; content: ""; border-right: 2px solid #a9a9ab; border-bottom: 2px solid #a9a9ab; transform: translateY(-68%) rotate(45deg); transition: border-color .16s ease, transform .18s ease; }
.inventory-category > summary:hover, .inventory-category > summary:focus-visible { color: #fff; background: #353536; }
.inventory-category > summary:hover::after, .inventory-category > summary:focus-visible::after { border-color: #fff; }
.inventory-category[open] > summary { background: linear-gradient(90deg, rgba(200, 50, 50, .14), #303031 38%, #262627); }
.inventory-category[open] > summary::after { border-color: #ef6969; transform: translateY(-30%) rotate(225deg); }
.inventory-category-name { min-width: 0; display: grid; gap: 4px; }
.inventory-category-name small { color: #e16a6a; font-size: 10px; font-weight: 800; letter-spacing: .12em; }
.inventory-category-name strong { overflow: hidden; color: #fff; font-size: 15px; white-space: nowrap; text-overflow: ellipsis; }
.inventory-category-count { min-width: 118px; display: grid; grid-template-columns: auto auto; align-items: baseline; justify-content: end; gap: 7px; text-align: right; }
.inventory-category-count strong { color: #fff; font-size: 18px; }
.inventory-category-count small { color: #9a9a9c; font-size: 10px; }
.inventory-category-items { padding: 8px; border-top: 1px solid #414143; background: #171718; }
.inventory-item { min-height: 96px; margin-bottom: 8px; padding: 10px 14px 10px 10px; display: grid; grid-template-columns: 76px minmax(0, 1fr) auto auto; align-items: center; gap: 18px; border: 1px solid #3b3b3d; border-left: 5px solid #4a4a4c; border-radius: 7px; background: linear-gradient(100deg, #29292a, #222223); transition: border-color .16s ease, background-color .16s ease; }
.inventory-item:last-child { margin-bottom: 0; }
.inventory-item:hover { border-left-color: var(--cityrp-accent); background: #303031; }
.inventory-item.is-inactive { border-left-color: var(--cityrp-warning); }
.inventory-item-image { width: 76px; height: 76px; overflow: hidden; display: grid; place-items: center; border: 1px solid #48484a; border-radius: 7px; background: #19191a; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .03), 0 7px 15px rgba(0, 0, 0, .22); }
.inventory-item-image img { width: 100%; height: 100%; display: block; object-fit: cover; }
.inventory-item-image.is-placeholder { color: #77777a; background: linear-gradient(135deg, rgba(200, 50, 50, .07), transparent 52%), repeating-linear-gradient(135deg, #202021 0, #202021 8px, #232324 8px, #232324 16px); }
.inventory-item-image.is-placeholder span { font-size: 9px; font-weight: 800; letter-spacing: .08em; line-height: 1.35; text-align: center; }
.inventory-item-copy { min-width: 0; display: grid; gap: 4px; }
.inventory-item-copy strong { overflow-wrap: anywhere; color: #fff; font-size: 15px; }
.inventory-item-copy span { color: var(--cityrp-muted); font-size: 11px; }
.inventory-item-meta { min-width: 86px; padding: 9px 12px; display: grid; gap: 3px; border: 1px solid #454547; border-radius: 6px; background: #1c1c1d; text-align: right; }
.inventory-item-meta span { color: #99999b; font-size: 10px; letter-spacing: .06em; text-transform: uppercase; }
.inventory-item-meta strong { color: #fff; font-size: 16px; }
.inventory-item-warning { padding-left: 11px; border-left: 3px solid var(--cityrp-warning); color: var(--cityrp-warning); font-size: 11px; font-weight: 750; }
.inventory-empty { min-height: 180px; padding: 30px; display: flex; align-items: center; justify-content: center; gap: 15px; }
.inventory-empty > span { flex: 0 0 34px; width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid #6b5b3c; border-radius: 50%; color: var(--cityrp-warning); background: #29251e; font-size: 12px; font-weight: 800; }
.inventory-empty h3 { margin: 0 0 5px; color: #fff; font-size: 16px; }
.inventory-empty p { margin: 0; color: var(--cityrp-muted); font-size: 12px; line-height: 1.55; }
.inventory-readonly-note { padding: 14px 17px; display: flex; align-items: baseline; gap: 9px; border-top: 1px solid #3a3a3c; color: var(--cityrp-muted); background: #202021; font-size: 11px; line-height: 1.55; }
.inventory-readonly-note strong { color: #fff; }

/* Farming Journal, translated from the ingame four-page progression screen */
.farming-page { padding-bottom: 34px; }
.farming-hero {
    position: relative;
    min-height: 260px;
    padding: 30px;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(340px, .85fr);
    align-items: center;
    gap: clamp(30px, 6vw, 80px);
    border-left: 7px solid var(--farming-organic);
    background: radial-gradient(circle at 88% 0%, rgba(112, 174, 85, .17), transparent 34%), linear-gradient(135deg, #303031, #1c1c1d 76%);
}
.farming-hero::after { position: absolute; inset: 0; content: ""; pointer-events: none; opacity: .7; background-image: linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px); background-size: 28px 28px; }
.farming-hero > * { position: relative; z-index: 1; min-width: 0; }
.farming-kicker { color: var(--farming-organic-light); }
.farming-hero-copy h1 { margin: 7px 0 9px; overflow-wrap: anywhere; color: #fff; font-size: clamp(29px, 3.5vw, 43px); line-height: 1.1; letter-spacing: -.025em; }
.farming-hero-copy > p { max-width: 650px; margin: 0; color: var(--cityrp-muted); font-size: 13px; line-height: 1.65; }
.farming-button { border-color: var(--farming-organic-light); background: linear-gradient(135deg, #76b85a, #477d36); box-shadow: 0 7px 16px rgba(112, 174, 85, .18); }
.farming-button:hover, .farming-button:focus-visible { border-color: #a5dc8d; background: linear-gradient(135deg, #83c565, #528e3e); }
.farmer-title-card { padding: 22px; display: grid; gap: 7px; border: 1px solid #424442; border-left: 6px solid var(--farming-organic); border-radius: 8px; background: rgba(25, 25, 26, .9); box-shadow: 0 14px 30px rgba(0, 0, 0, .28); }
.farmer-title-card > span { color: var(--farming-organic-light); font-size: 9px; font-weight: 800; letter-spacing: .16em; }
.farmer-title-card > strong { overflow-wrap: anywhere; color: #fff; font-size: clamp(24px, 3vw, 34px); line-height: 1.1; }
.farmer-title-card p { margin: 2px 0 5px; color: var(--cityrp-muted); font-size: 10px; line-height: 1.5; }
.farmer-title-card small { color: #858587; font-size: 8px; }
.farming-progress { width: 100%; height: 8px; display: block; overflow: hidden; border: 0; border-radius: 999px; appearance: none; background: #181819; }
.farming-progress::-webkit-progress-bar { border-radius: 999px; background: #181819; }
.farming-progress::-webkit-progress-value { border-radius: 999px; background: linear-gradient(90deg, #568f40, var(--farming-organic-light)); box-shadow: 0 0 10px rgba(112, 174, 85, .3); }
.farming-progress::-moz-progress-bar { border-radius: 999px; background: linear-gradient(90deg, #568f40, var(--farming-organic-light)); box-shadow: 0 0 10px rgba(112, 174, 85, .3); }
.farming-unavailable { margin-top: 18px; }

.farming-tabs { position: sticky; top: 76px; z-index: 30; margin-top: 18px; padding: 8px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; scroll-margin-top: 84px; background: rgba(23, 23, 24, .96); box-shadow: 0 15px 34px rgba(0, 0, 0, .34); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.farming-tabs button { position: relative; min-height: 44px; padding: 9px 13px; border: 1px solid #464648; border-radius: 6px; color: var(--cityrp-muted); background: var(--cityrp-control); cursor: pointer; font-size: 11px; font-weight: 750; transition: color .16s ease, background-color .16s ease, border-color .16s ease, transform .16s ease; }
.farming-tabs button::after { position: absolute; right: 14px; bottom: 4px; left: 14px; height: 3px; content: ""; border-radius: 2px; background: var(--farming-organic); transform: scaleX(0); transition: transform .16s ease; }
.farming-tabs button:hover, .farming-tabs button:focus-visible, .farming-tabs button.is-active { border-color: #5d7552; color: #fff; background: #35412f; transform: translateY(-1px); }
.farming-tabs button.is-active::after { transform: scaleX(1); }
.farming-panels { margin-top: 18px; }
.farming-tab-panel + .farming-tab-panel { margin-top: 18px; }
.farming-tab-panel[hidden] { display: none; }
.farming-section { margin-bottom: 18px; }
.farming-panel-header { border-left-color: var(--farming-organic); background: linear-gradient(90deg, rgba(112, 174, 85, .16), transparent 30%), linear-gradient(135deg, #373738, #272728 72%); }
.farming-panel-header::after { background: linear-gradient(90deg, var(--farming-organic), transparent); }
.farming-status::before { background: var(--farming-organic); box-shadow: 0 0 8px rgba(112, 174, 85, .5); }

.farming-metric-grid { padding: 12px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; background: #171718; }
.farming-metric-grid article { min-height: 104px; padding: 17px; display: flex; align-items: center; gap: 13px; border: 1px solid #39393b; border-left: 4px solid #4d6444; border-radius: 7px; background: linear-gradient(100deg, #29292a, #242425); transition: border-color .16s ease, background-color .16s ease, transform .16s ease; }
.farming-metric-grid article:nth-child(even) { background: linear-gradient(100deg, #242425, #202021); }
.farming-metric-grid article:hover { border-left-color: var(--farming-organic); background: var(--cityrp-control); transform: translateY(-1px); }
.farming-metric-mark { flex: 0 0 42px; width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid #52604d; border-radius: 7px; color: var(--farming-organic-light); background: linear-gradient(135deg, #33402e, #222323); font-size: 10px; font-weight: 800; }
.farming-metric-grid article > div { min-width: 0; display: flex; flex-direction: column; }
.farming-metric-grid small { color: #8c8c8e; font-size: 8px; font-weight: 750; letter-spacing: .11em; }
.farming-metric-grid strong { margin: 5px 0 3px; overflow: hidden; color: #fff; font-size: 19px; white-space: nowrap; text-overflow: ellipsis; }
.farming-metric-grid article div span { color: #89898b; font-size: 8px; line-height: 1.4; }

.farming-overview-layout { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(360px, .92fr); gap: 18px; }
.farming-next-list { padding: 12px; display: grid; gap: 9px; background: #171718; }
.farming-next-card { padding: 16px 17px; border: 1px solid #3b3b3d; border-left: 5px solid var(--farming-organic); border-radius: 7px; background: linear-gradient(100deg, #29292a, #222223); }
.farming-next-card > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.farming-next-card > div:first-child span { color: var(--farming-organic-light); font-size: 8px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.farming-next-card > div:first-child strong { color: #fff; font-size: 13px; text-align: right; }
.farming-next-card > p { margin: 8px 0 14px; color: var(--cityrp-muted); font-size: 10px; line-height: 1.5; }
.progress-label { margin-bottom: 7px; display: flex; align-items: center; justify-content: space-between; gap: 14px; color: #858587; font-size: 8px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.progress-label strong { color: #fff; font-size: 9px; }
.farming-complete-state { min-height: 180px; padding: 24px; display: flex; align-items: center; justify-content: center; gap: 14px; color: var(--cityrp-muted); text-align: left; }
.farming-complete-state > span { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid rgba(112, 174, 85, .45); border-radius: 50%; color: var(--farming-organic-light); background: rgba(112, 174, 85, .1); }
.farming-complete-state strong { color: #fff; font-size: 13px; }
.farming-complete-state p { margin: 5px 0 0; font-size: 10px; }
.farming-detail-list { margin: 0; padding: 8px 16px; background: #171718; }
.farming-detail-list > div { min-height: 49px; padding: 10px 7px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid #363638; }
.farming-detail-list > div:last-child { border-bottom: 0; }
.farming-detail-list dt { color: var(--cityrp-muted); font-size: 9px; }
.farming-detail-list dd { margin: 0; color: #fff; font-size: 12px; font-weight: 750; }

.farming-rule-grid { padding: 12px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; background: #171718; }
.farming-rule-grid article { min-height: 116px; padding: 17px; display: grid; grid-template-columns: 46px minmax(0, 1fr); align-items: start; gap: 13px; border: 1px solid #3b3b3d; border-radius: 7px; background: linear-gradient(100deg, #29292a, #222223); }
.farming-rule-grid article > span { width: 46px; height: 46px; display: grid; place-items: center; border: 1px solid #52604d; border-radius: 7px; color: var(--farming-organic-light); background: #20251e; font-size: 10px; font-weight: 800; }
.farming-rule-grid strong { color: #fff; font-size: 12px; }
.farming-rule-grid p { margin: 5px 0 0; color: var(--cityrp-muted); font-size: 9px; line-height: 1.55; }

.crop-card-grid { padding: 12px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; background: #171718; }
.crop-card { min-width: 0; padding: 18px; border: 1px solid #3b3b3d; border-left: 5px solid var(--farming-organic); border-radius: 8px; background: linear-gradient(115deg, #2b2b2c, #202021); box-shadow: 0 10px 22px rgba(0, 0, 0, .18); }
.crop-card > header { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; align-items: center; gap: 13px; }
.crop-monogram { width: 52px; height: 52px; display: grid; place-items: center; border: 1px solid #52604d; border-radius: 8px; color: var(--farming-organic-light); background: linear-gradient(135deg, #35432f, #202220); font-size: 12px; font-weight: 850; letter-spacing: .06em; }
.crop-card header > div { min-width: 0; }
.crop-card header > div small { color: #858587; font-size: 7px; font-weight: 800; letter-spacing: .13em; }
.crop-card h3 { margin: 3px 0 0; overflow: hidden; color: #fff; font-size: 18px; white-space: nowrap; text-overflow: ellipsis; }
.crop-card header > strong { color: #fff; font-size: 17px; text-align: right; }
.crop-card header > strong small { display: block; margin-top: 3px; color: #858587; font-size: 6px; letter-spacing: .09em; }
.crop-rules { margin-top: 14px; padding: 9px; display: flex; flex-wrap: wrap; gap: 6px; border: 1px solid #383a38; border-radius: 6px; background: #1b1d1b; }
.crop-rules > span { padding: 5px 7px; border-radius: 5px; color: #8f8f91; background: #292b29; font-size: 8px; }
.crop-rules strong { margin-left: 3px; color: #fff; }
.crop-stat-grid { margin: 14px 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; border: 1px solid #39393b; border-radius: 6px; overflow: hidden; background: #39393b; }
.crop-stat-grid > div { min-width: 0; padding: 10px 8px; display: grid; gap: 4px; background: #222223; }
.crop-stat-grid dt { color: #818183; font-size: 7px; letter-spacing: .06em; text-transform: uppercase; }
.crop-stat-grid dd { margin: 0; overflow: hidden; color: #fff; font-size: 11px; font-weight: 750; white-space: nowrap; text-overflow: ellipsis; }

.farming-completion { display: flex; align-items: baseline; gap: 7px; }
.farming-completion strong { color: var(--farming-organic-light); font-size: 20px; }
.farming-completion small { color: #858587; font-size: 7px; letter-spacing: .1em; }
.journal-progress-summary { padding: 15px 18px; border-bottom: 1px solid #38383a; background: #202021; }
.journal-progress-summary > div { margin-bottom: 9px; display: flex; justify-content: space-between; gap: 16px; color: var(--cityrp-muted); font-size: 10px; }
.journal-progress-summary strong { color: #fff; }
.challenge-groups { padding: 12px; background: #171718; }
.challenge-tier { margin: 19px 2px 9px; color: #fff; font-size: 12px; letter-spacing: .08em; }
.challenge-tier:first-child { margin-top: 2px; }
.challenge-card { margin-bottom: 9px; padding: 17px; border: 1px solid #3b3b3d; border-left: 5px solid var(--farming-organic); border-radius: 7px; background: linear-gradient(100deg, #29292a, #222223); }
.challenge-card.is-unlocked { border-left-color: var(--cityrp-action); }
.challenge-card.is-hidden { border-left-color: var(--cityrp-accent); }
.challenge-card.is-gated { border-left-color: #555557; }
.challenge-card-main { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.challenge-copy { min-width: 0; }
.challenge-copy > span { color: var(--farming-organic-light); font-size: 7px; font-weight: 800; letter-spacing: .13em; }
.is-unlocked .challenge-copy > span { color: #66d778; }
.is-hidden .challenge-copy > span { color: #e16a6a; }
.challenge-copy h4 { margin: 5px 0 5px; color: #fff; font-size: 15px; }
.challenge-copy p { margin: 0; color: var(--cityrp-muted); font-size: 10px; line-height: 1.5; }
.challenge-state { flex: 0 0 auto; padding: 5px 8px; border: 1px solid #4e5d48; border-radius: 999px; color: var(--farming-organic-light); background: #20251e; font-size: 7px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.is-unlocked .challenge-state { border-color: rgba(52, 209, 66, .35); color: #66d778; background: rgba(52, 209, 66, .07); }
.is-hidden .challenge-state { border-color: rgba(200, 50, 50, .4); color: #e16a6a; background: rgba(200, 50, 50, .08); }
.is-gated .challenge-state { border-color: #48484a; color: #909092; background: #222223; }
.challenge-progress { margin-top: 15px; }
.challenge-card footer { margin-top: 12px; padding-top: 11px; display: flex; justify-content: space-between; gap: 16px; border-top: 1px solid #38383a; color: #858587; font-size: 8px; }
.challenge-card footer strong { color: #a8a8aa; }

.order-live-badge { padding: 6px 9px; border: 1px solid rgba(225, 164, 68, .35); border-radius: 999px; color: var(--cityrp-warning); background: rgba(225, 164, 68, .07); font-size: 7px; font-weight: 800; letter-spacing: .09em; }
.order-hero { padding: 24px; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr); align-items: center; gap: 32px; border-bottom: 1px solid #3a3a3c; background: radial-gradient(circle at 88% 0%, rgba(225, 164, 68, .13), transparent 36%), linear-gradient(115deg, #29292a, #202021); }
.order-hero h3 { margin: 6px 0 8px; color: #fff; font-size: clamp(20px, 2.4vw, 29px); }
.order-hero p { max-width: 680px; margin: 0; color: var(--cityrp-muted); font-size: 11px; line-height: 1.65; }
.order-hero dl { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.order-hero dl > div { padding: 11px; border: 1px solid #414143; border-radius: 6px; background: #222223; }
.order-hero dt { color: #89898b; font-size: 7px; letter-spacing: .08em; text-transform: uppercase; }
.order-hero dd { margin: 4px 0 0; color: #fff; font-size: 12px; font-weight: 750; }
.order-runtime-note { margin: 12px; padding: 14px 16px; display: flex; align-items: center; gap: 12px; border: 1px solid #51472f; border-left: 5px solid var(--cityrp-warning); border-radius: 7px; color: var(--cityrp-muted); background: #29251e; }
.order-runtime-note > span { flex: 0 0 25px; width: 25px; height: 25px; display: grid; place-items: center; border: 1px solid #6b5b3c; border-radius: 50%; color: var(--cityrp-warning); font-size: 11px; font-weight: 800; }
.order-runtime-note p { margin: 0; font-size: 10px; line-height: 1.55; }
.order-runtime-note strong { color: #fff; }
code { padding: 2px 5px; border: 1px solid #48484a; border-radius: 4px; color: #fff; background: #202021; font-family: var(--cityrp-font); font-size: .92em; }
.order-workflow { padding: 0 12px 12px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.order-workflow article { min-height: 90px; padding: 15px; display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 12px; border: 1px solid #3b3b3d; border-radius: 7px; background: #222223; }
.order-workflow article > span { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid #65583d; border-radius: 7px; color: var(--cityrp-warning); background: #29251e; font-size: 9px; font-weight: 800; }
.order-workflow strong { color: #fff; font-size: 11px; }
.order-workflow p { margin: 5px 0 0; color: var(--cityrp-muted); font-size: 9px; line-height: 1.5; }
.order-rates { padding: 0 12px 12px; }
.order-rates > header { min-height: 52px; padding: 10px 13px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border: 1px solid #3b3b3d; border-bottom: 0; border-radius: 7px 7px 0 0; background: #303031; }
.order-rates > header span { color: var(--cityrp-warning); font-size: 8px; font-weight: 800; letter-spacing: .12em; }
.order-rates > header strong { color: #fff; font-size: 11px; }
.order-rate-list { border: 1px solid #3b3b3d; border-radius: 0 0 7px 7px; overflow: hidden; }
.order-rate-list > article { min-height: 76px; padding: 11px 13px; display: grid; grid-template-columns: 46px minmax(0, 1fr) minmax(270px, auto); align-items: center; gap: 13px; border-bottom: 1px solid #38383a; background: #242425; }
.order-rate-list > article:nth-child(even) { background: #202021; }
.order-rate-list > article:last-child { border-bottom: 0; }
.order-rate-list .crop-monogram { width: 46px; height: 46px; }
.order-rate-list article > div { min-width: 0; display: grid; gap: 4px; }
.order-rate-list article > div strong { color: #fff; font-size: 12px; }
.order-rate-list article > div small { color: #858587; font-size: 8px; }
.order-rate-list article > dl { margin: 0; display: grid; grid-template-columns: repeat(3, minmax(78px, 1fr)); gap: 6px; }
.order-rate-list article > dl > div { padding: 8px; border: 1px solid #3e3e40; border-radius: 5px; background: #1c1c1d; text-align: right; }
.order-rate-list dt { color: #858587; font-size: 7px; text-transform: uppercase; }
.order-rate-list dd { margin: 3px 0 0; color: #fff; font-size: 10px; font-weight: 750; }

/* CityRP community leaderboards */
.leaderboard-page { padding-bottom: 34px; }
.leaderboard-hero {
    position: relative;
    min-height: 250px;
    padding: 30px;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(330px, .8fr);
    align-items: center;
    gap: clamp(28px, 6vw, 82px);
    border-left: 7px solid var(--cityrp-accent);
    background:
        radial-gradient(circle at 88% 8%, rgba(200, 50, 50, .19), transparent 35%),
        linear-gradient(135deg, #303031, #1c1c1d 76%);
}
.leaderboard-hero::after { position: absolute; inset: 0; content: ""; pointer-events: none; opacity: .65; background-image: linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px); background-size: 28px 28px; }
.leaderboard-hero-copy, .leaderboard-rank-card { position: relative; z-index: 1; min-width: 0; }
.leaderboard-hero-copy h1 { margin: 7px 0 9px; color: #fff; font-size: clamp(29px, 3.4vw, 43px); line-height: 1.1; letter-spacing: -.03em; }
.leaderboard-hero-copy > p { max-width: 670px; margin: 0; color: var(--cityrp-muted); font-size: 13px; line-height: 1.65; }
.leaderboard-rank-card { padding: 18px; border: 1px solid #454547; border-left: 5px solid var(--cityrp-accent); border-radius: 8px; background: rgba(24, 24, 25, .91); box-shadow: 0 17px 34px rgba(0, 0, 0, .3); }
.leaderboard-rank-heading { padding-bottom: 15px; display: flex; align-items: center; gap: 14px; border-bottom: 1px solid #3a3a3c; }
.leaderboard-metric-mark { flex: 0 0 56px; width: 56px; height: 56px; display: grid; place-items: center; border: 1px solid #6a4444; border-radius: 9px; color: #f07070; background: linear-gradient(135deg, #4b3030, #252526); box-shadow: 0 7px 17px rgba(0, 0, 0, .22); font-size: 12px; font-style: normal; font-weight: 800; }
.leaderboard-rank-heading > div { min-width: 0; display: grid; gap: 4px; }
.leaderboard-rank-heading small { overflow: hidden; color: #929294; font-size: 7px; font-weight: 800; letter-spacing: .12em; white-space: nowrap; text-overflow: ellipsis; }
.leaderboard-rank-heading strong { color: #fff; font-size: 15px; }
.leaderboard-personal-score { padding: 14px 0; display: grid; grid-template-columns: .7fr 1.3fr; gap: 8px; }
.leaderboard-personal-score > div { min-width: 0; padding: 10px 11px; border: 1px solid #3c3c3e; border-radius: 6px; background: #202021; }
.leaderboard-personal-score small { display: block; color: #858587; font-size: 7px; letter-spacing: .1em; }
.leaderboard-personal-score strong { margin-top: 5px; display: block; overflow: hidden; color: #fff; font-size: 19px; white-space: nowrap; text-overflow: ellipsis; }
.leaderboard-personal-score > div:first-child strong { color: #ef6969; }
.leaderboard-rank-card > p { margin: 0; color: #8f8f91; font-size: 9px; line-height: 1.5; }

.leaderboard-navigation, .leaderboard-results { margin-top: 18px; }
.leaderboard-category-tabs { padding: 11px 12px 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; background: #171718; }
.leaderboard-category-tabs > a { min-height: 78px; padding: 12px 14px; display: grid; grid-template-columns: 46px minmax(0, 1fr); align-items: center; gap: 13px; border: 1px solid #3c3c3e; border-radius: 7px; color: var(--cityrp-muted); background: #232324; transition: border-color .16s ease, background-color .16s ease, transform .16s ease; }
.leaderboard-category-tabs > a:hover, .leaderboard-category-tabs > a:focus-visible { border-color: #59595b; background: #2d2d2e; transform: translateY(-1px); }
.leaderboard-category-tabs > a.is-active { border-color: #694040; box-shadow: inset 5px 0 0 var(--cityrp-accent); background: linear-gradient(100deg, rgba(200, 50, 50, .15), #29292a 45%); }
.leaderboard-category-tabs > a > span { width: 46px; height: 46px; display: grid; place-items: center; border: 1px solid #48484a; border-radius: 8px; color: #a5a5a7; background: #1b1b1c; font-size: 10px; font-weight: 800; }
.leaderboard-category-tabs > a.is-active > span { border-color: #6b4141; color: #f07070; background: #352626; }
.leaderboard-category-tabs > a > div { min-width: 0; display: grid; gap: 4px; }
.leaderboard-category-tabs small { color: #e16a6a; font-size: 7px; font-weight: 800; letter-spacing: .12em; }
.leaderboard-category-tabs strong { overflow: hidden; color: #fff; font-size: 12px; white-space: nowrap; text-overflow: ellipsis; }
.leaderboard-metric-grid { padding: 8px 12px 12px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; background: #171718; }
.leaderboard-metric-link { min-height: 92px; padding: 13px; display: grid; grid-template-columns: 50px minmax(0, 1fr) auto; align-items: center; gap: 12px; border: 1px solid #3a3a3c; border-radius: 7px; background: linear-gradient(110deg, #29292a, #222223); transition: border-color .16s ease, background-color .16s ease, transform .16s ease; }
.leaderboard-metric-link:hover, .leaderboard-metric-link:focus-visible { border-color: #555557; background: #303031; transform: translateY(-1px); }
.leaderboard-metric-link.is-active { border-color: #704242; box-shadow: inset 4px 0 0 var(--cityrp-accent); background: linear-gradient(110deg, rgba(200, 50, 50, .14), #2b2b2c 42%, #222223); }
.leaderboard-metric-link > span { width: 50px; height: 50px; display: grid; place-items: center; border: 1px solid #604343; border-radius: 8px; color: #ee7474; background: #2e2424; box-shadow: 0 7px 15px rgba(0, 0, 0, .16); font-size: 10px; font-weight: 800; }
.leaderboard-metric-link > div { min-width: 0; display: grid; gap: 4px; }
.leaderboard-metric-link strong { overflow: hidden; color: #fff; font-size: 11px; white-space: nowrap; text-overflow: ellipsis; }
.leaderboard-metric-link small { overflow: hidden; color: #89898b; font-size: 8px; white-space: nowrap; text-overflow: ellipsis; }
.leaderboard-metric-link > i { color: #777779; font-size: 17px; font-style: normal; }
.leaderboard-metric-link.is-active > i { color: #ef6969; }

.leaderboard-controls { padding: 13px 14px; display: flex; align-items: flex-end; gap: 9px; border-bottom: 1px solid #3b3b3d; background: #202021; }
.leaderboard-controls label { flex: 0 1 190px; display: grid; gap: 6px; }
.leaderboard-controls label:first-of-type { flex: 1 1 310px; }
.leaderboard-controls label > span { color: #919193; font-size: 7px; font-weight: 800; letter-spacing: .11em; }
.leaderboard-controls input, .leaderboard-controls select { width: 100%; }
.leaderboard-control-actions { margin-left: auto; display: flex; gap: 7px; }
.leaderboard-control-actions .button { white-space: nowrap; }
.leaderboard-summary { min-height: 48px; padding: 10px 15px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border-bottom: 1px solid #363638; color: #929294; background: #19191a; font-size: 9px; }
.leaderboard-summary p { margin: 0; }
.leaderboard-summary strong { color: #fff; }
.leaderboard-summary > span { color: #777779; text-align: right; }
.leaderboard-table-wrap { overflow-x: auto; background: #171718; }
.leaderboard-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.leaderboard-table th { height: 44px; padding: 10px 15px; border: 0; border-bottom: 1px solid #424244; color: #b9b9bb; background: linear-gradient(180deg, #343435, #2a2a2b); font-size: 8px; font-weight: 800; letter-spacing: .11em; text-align: left; text-transform: uppercase; }
.leaderboard-table th:first-child { width: 110px; padding-left: 20px; }
.leaderboard-table th:nth-child(3) { width: 220px; text-align: right; }
.leaderboard-table td { height: 82px; padding: 11px 15px; border-bottom: 1px solid #373739; color: var(--cityrp-muted); background: #272728; font-size: 10px; transition: background-color .15s ease; }
.leaderboard-table tr:nth-child(even) td { background: #232324; }
.leaderboard-table tbody tr:not(.leaderboard-no-results):hover td { background: #303031; }
.leaderboard-table td:first-child { padding-left: 20px; border-left: 5px solid #4a4a4c; }
.leaderboard-table td:nth-child(3) { text-align: right; }
.leaderboard-table tr.is-podium td:first-child { border-left-color: var(--cityrp-accent); }
.leaderboard-table tr.is-viewer td { background: linear-gradient(90deg, rgba(52, 209, 66, .07), #29292a 35%); }
.leaderboard-table tr.is-viewer td:first-child { border-left-color: var(--cityrp-action); }
.leaderboard-position { min-width: 48px; padding: 7px 8px; display: inline-grid; place-items: center; border: 1px solid #474749; border-radius: 6px; color: #c4c4c6; background: #1c1c1d; font-size: 10px; font-weight: 800; }
.podium-1 .leaderboard-position { border-color: #765f31; color: #f1c968; background: #322a1c; box-shadow: 0 0 16px rgba(225, 164, 68, .1); }
.podium-2 .leaderboard-position { border-color: #616165; color: #d7d7da; background: #2d2d2f; }
.podium-3 .leaderboard-position { border-color: #6b4d3d; color: #dda27e; background: #30251f; }
.leaderboard-citizen { min-width: 0; display: flex; align-items: center; gap: 12px; }
.leaderboard-avatar { flex: 0 0 52px; width: 52px; height: 52px; display: block; object-fit: cover; border: 2px solid #555557; border-radius: 8px; background: #1c1c1d; box-shadow: 0 0 0 3px rgba(200, 50, 50, .09), 0 8px 17px rgba(0, 0, 0, .22); }
.is-viewer .leaderboard-avatar { border-color: rgba(52, 209, 66, .55); box-shadow: 0 0 0 3px rgba(52, 209, 66, .09), 0 8px 17px rgba(0, 0, 0, .22); }
.leaderboard-citizen strong { overflow: hidden; color: #fff; font-size: 12px; white-space: nowrap; text-overflow: ellipsis; }
.leaderboard-citizen em { flex: 0 0 auto; padding: 4px 6px; border: 1px solid rgba(52, 209, 66, .35); border-radius: 999px; color: #66d778; background: rgba(52, 209, 66, .07); font-size: 6px; font-style: normal; font-weight: 800; letter-spacing: .09em; }
.leaderboard-score { color: #fff; font-size: 14px; letter-spacing: -.01em; }
.leaderboard-no-results td { height: 150px; padding: 28px !important; border-left-color: #4a4a4c !important; text-align: center !important; }
.leaderboard-no-results strong, .leaderboard-no-results span { display: block; }
.leaderboard-no-results strong { color: #fff; font-size: 14px; }
.leaderboard-no-results span { margin-top: 6px; color: #8f8f91; font-size: 10px; }
.leaderboard-empty { min-height: 190px; padding: 32px; display: flex; align-items: center; justify-content: center; gap: 15px; background: #1a1a1b; }
.leaderboard-empty > span { flex: 0 0 34px; width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid #6b5b3c; border-radius: 50%; color: var(--cityrp-warning); background: #29251e; font-size: 12px; font-weight: 800; }
.leaderboard-empty h3 { margin: 0 0 5px; color: #fff; font-size: 15px; }
.leaderboard-empty p { max-width: 620px; margin: 0; color: var(--cityrp-muted); font-size: 10px; line-height: 1.55; }
.leaderboard-pagination { min-height: 64px; padding: 11px 14px; display: grid; grid-template-columns: minmax(90px, 1fr) auto minmax(90px, 1fr); align-items: center; gap: 10px; border-top: 1px solid #3c3c3e; background: #202021; }
.leaderboard-pagination > a:last-child, .leaderboard-pagination > span:last-child { justify-self: end; }
.leaderboard-pagination > a, .leaderboard-pagination > span, .leaderboard-pagination > div a { min-height: 35px; padding: 8px 11px; display: inline-grid; place-items: center; border: 1px solid #474749; border-radius: 6px; color: #bcbcbf; background: #2b2b2c; font-size: 9px; font-weight: 700; }
.leaderboard-pagination > div { display: flex; gap: 5px; }
.leaderboard-pagination > div a { min-width: 35px; padding-inline: 7px; }
.leaderboard-pagination a:hover, .leaderboard-pagination a:focus-visible { border-color: var(--cityrp-accent); color: #fff; background: #4a3030; }
.leaderboard-pagination a.is-active { border-color: var(--cityrp-accent-light); color: #fff; background: var(--cityrp-accent); }
.leaderboard-pagination .is-disabled { color: #666668; background: #222223; cursor: not-allowed; }

/* CityRP moderation records, derived from the native ban and blacklist administration views */
.records-page { padding-bottom: 34px; }
.records-hero {
    position: relative;
    min-height: 250px;
    padding: 30px;
    display: grid;
    grid-template-columns: minmax(0, 1.18fr) minmax(340px, .82fr);
    align-items: center;
    gap: clamp(28px, 6vw, 82px);
    border-left: 7px solid var(--cityrp-accent);
    background: radial-gradient(circle at 88% 8%, rgba(200, 50, 50, .19), transparent 35%), linear-gradient(135deg, #303031, #1c1c1d 76%);
}
.records-hero::after { position: absolute; inset: 0; content: ""; pointer-events: none; opacity: .65; background-image: linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px); background-size: 28px 28px; }
.records-hero-copy, .records-overview { position: relative; z-index: 1; min-width: 0; }
.records-hero-copy h1 { margin: 7px 0 9px; color: #fff; font-size: clamp(29px, 3.4vw, 43px); line-height: 1.1; letter-spacing: -.03em; }
.records-hero-copy > p { max-width: 650px; margin: 0; color: var(--cityrp-muted); font-size: 13px; line-height: 1.65; }
.records-overview { padding: 18px; border: 1px solid #454547; border-left: 5px solid var(--cityrp-accent); border-radius: 8px; background: rgba(24, 24, 25, .91); box-shadow: 0 17px 34px rgba(0, 0, 0, .3); }
.records-overview header { padding-bottom: 14px; display: flex; align-items: center; gap: 13px; border-bottom: 1px solid #3a3a3c; }
.records-mark { flex: 0 0 54px; width: 54px; height: 54px; display: grid; place-items: center; border: 1px solid #6a4444; border-radius: 9px; color: #f07070; background: linear-gradient(135deg, #4b3030, #252526); font-size: 11px; font-weight: 800; }
.records-overview header > div { min-width: 0; display: grid; gap: 4px; }
.records-overview header small { color: #929294; font-size: 7px; font-weight: 800; letter-spacing: .12em; }
.records-overview header strong { color: #fff; font-size: 15px; }
.records-overview dl { margin: 10px 0; }
.records-overview dl > div { min-height: 37px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid #363638; }
.records-overview dl > div:last-child { border-bottom: 0; }
.records-overview dt { color: #8d8d8f; font-size: 8px; letter-spacing: .06em; text-transform: uppercase; }
.records-overview dd { margin: 0; color: #fff; font-size: 14px; font-weight: 750; }
.records-overview dd.access-level { color: #ef6969; font-size: 10px; }
.records-overview > p { margin: 0; color: #89898b; font-size: 9px; line-height: 1.5; }

.records-browser, .records-results { margin-top: 18px; }
.records-tabs { padding: 11px 12px 12px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; background: #171718; }
.records-tabs a { min-height: 94px; padding: 14px; display: grid; grid-template-columns: 50px minmax(0, 1fr) auto; align-items: center; gap: 13px; border: 1px solid #3c3c3e; border-left: 4px solid #48484a; border-radius: 7px; background: linear-gradient(110deg, #29292a, #222223); transition: border-color .16s ease, background-color .16s ease, transform .16s ease; }
.records-tabs a:hover, .records-tabs a:focus-visible { border-color: #5a5a5c; border-left-color: var(--cityrp-accent); background: #303031; transform: translateY(-1px); }
.records-tabs a.is-active { border-color: #704242; border-left-color: var(--cityrp-accent); background: linear-gradient(110deg, rgba(200, 50, 50, .15), #2b2b2c 42%, #222223); }
.records-tabs a > span { width: 50px; height: 50px; display: grid; place-items: center; border: 1px solid #604343; border-radius: 8px; color: #ee7474; background: #2e2424; font-size: 10px; font-weight: 800; }
.records-tabs a > div { min-width: 0; display: grid; gap: 4px; }
.records-tabs small { color: #e16a6a; font-size: 7px; font-weight: 800; letter-spacing: .12em; }
.records-tabs strong { color: #fff; font-size: 12px; }
.records-tabs em { color: #89898b; font-size: 8px; font-style: normal; }
.records-tabs i { color: #777779; font-size: 18px; font-style: normal; }
.records-tabs a.is-active i { color: #ef6969; }
.records-controls label { flex-basis: 150px; }
.records-controls label:first-of-type { flex-basis: 250px; }
.records-table-wrap { overflow-x: auto; background: #171718; }
.records-table { min-width: 1120px; width: 100%; border-collapse: collapse; table-layout: fixed; }
.records-table th { height: 44px; padding: 10px 13px; border: 0; border-bottom: 1px solid #424244; color: #b9b9bb; background: linear-gradient(180deg, #343435, #2a2a2b); font-size: 8px; font-weight: 800; letter-spacing: .11em; text-align: left; text-transform: uppercase; }
.records-table th:nth-child(1) { width: 108px; padding-left: 18px; }
.records-table th:nth-child(2) { width: 210px; }
.records-table th:nth-child(3) { width: 300px; }
.records-table th:nth-child(4), .records-table th:nth-child(5) { width: 160px; }
.records-table th:nth-child(6) { width: 160px; }
.records-table-blacklists th:nth-child(3) { width: 185px; }
.records-table-blacklists th:nth-child(4) { width: auto; }
.records-table td { min-height: 92px; padding: 15px 13px; border-bottom: 1px solid #373739; color: var(--cityrp-muted); background: #272728; font-size: 12px; line-height: 1.55; vertical-align: middle; transition: background-color .15s ease; }
.records-table tr:nth-child(even) td { background: #232324; }
.records-table tbody .record-row:hover td { background: #303031; }
.records-table td:first-child { padding-left: 18px; border-left: 5px solid #4a4a4c; }
.records-table .status-active td:first-child { border-left-color: var(--cityrp-action); }
.records-table .status-revoked td:first-child { border-left-color: var(--cityrp-danger); }
.record-status { min-width: 69px; padding: 5px 7px; display: inline-grid; place-items: center; border: 1px solid #505052; border-radius: 999px; color: #bdbdc0; background: #1d1d1e; font-size: 7px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.record-status-active { border-color: rgba(52, 209, 66, .36); color: #67d778; background: rgba(52, 209, 66, .08); }
.record-status-revoked { border-color: rgba(215, 65, 65, .4); color: #ef7474; background: rgba(215, 65, 65, .08); }
.record-id { margin-top: 6px; display: block; color: #8a8a8c; font-size: 9px; }
.record-player, .record-expiry, .record-target { display: block; overflow-wrap: anywhere; color: #fff; font-size: 13px; }
.record-identity { width: 100%; margin-top: 6px; display: block; overflow-wrap: anywhere; color: #c7c7ca; font-size: 12px; line-height: 1.65; }
.record-reason { width: 100%; display: block; overflow-wrap: anywhere; color: #dedee0; font-size: 12px; line-height: 1.6; }
.record-revocation { width: 100%; margin-top: 8px; padding: 9px 10px; display: block; border-left: 3px solid var(--cityrp-danger); border-radius: 3px; color: #e7c4c4; background: rgba(215, 65, 65, .08); font-size: 12px; line-height: 1.6; }
.record-kind { margin-bottom: 6px; padding: 4px 6px; display: inline-flex; border: 1px solid #5e5138; border-radius: 4px; color: var(--cityrp-warning); background: #29251e; font-size: 7px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.record-staff { width: 100%; margin-top: 7px; display: block; color: #c7c7ca; font-size: 12px; line-height: 1.55; }
.records-table time, .records-table td[data-label="Staff"] > span { color: #dddde0; font-size: 12px; font-weight: 600; }
.records-no-results td { height: 150px; padding: 28px !important; border-left-color: #4a4a4c !important; text-align: center; }
.records-no-results strong, .records-no-results span { display: block; }
.records-no-results strong { color: #fff; font-size: 14px; }
.records-no-results span { margin-top: 6px; color: #8f8f91; font-size: 10px; }

/* Personal economy activity, derived from the CityRP ledger and menu cards */
.economy-page { padding-bottom: 34px; }
.economy-hero { position: relative; min-height: 258px; padding: 30px; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(330px, .75fr); align-items: center; gap: clamp(30px, 6vw, 78px); border-left: 7px solid var(--cityrp-accent); background: radial-gradient(circle at 88% 0%, rgba(200, 50, 50, .2), transparent 36%), linear-gradient(135deg, #303031, #1c1c1d 76%); }
.economy-hero::after { position: absolute; inset: 0; content: ""; pointer-events: none; opacity: .7; background-image: linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px); background-size: 28px 28px; }
.economy-hero-copy, .economy-balance-card { position: relative; z-index: 1; min-width: 0; }
.economy-hero-copy h1 { margin: 7px 0 9px; color: #fff; font-size: clamp(29px, 3.5vw, 43px); line-height: 1.1; letter-spacing: -.03em; }
.economy-hero-copy > p { max-width: 650px; margin: 0; color: var(--cityrp-muted); font-size: 13px; line-height: 1.65; }
.economy-balance-card { padding: 21px; display: grid; gap: 7px; border: 1px solid #48484a; border-left: 6px solid var(--cityrp-accent); border-radius: 8px; background: rgba(24, 24, 25, .92); box-shadow: 0 17px 34px rgba(0, 0, 0, .3); }
.economy-balance-card > span { color: #e16a6a; font-size: 10px; font-weight: 800; letter-spacing: .14em; }
.economy-balance-card > strong { overflow-wrap: anywhere; color: #fff; font-size: clamp(29px, 3.5vw, 41px); line-height: 1.08; }
.economy-balance-card > div { margin-top: 6px; padding-top: 12px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border-top: 1px solid #3b3b3d; }
.economy-balance-card > div span { min-width: 0; overflow: hidden; color: #fff; font-size: 12px; font-weight: 700; white-space: nowrap; text-overflow: ellipsis; }
.economy-balance-card > div em { flex: 0 0 auto; color: var(--cityrp-action); font-size: 10px; font-style: normal; }
.economy-balance-card > small { color: #8f8f91; font-size: 10px; line-height: 1.45; }
.economy-unavailable, .economy-stats, .economy-community, .economy-history { margin-top: 18px; }
.economy-stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.economy-stat-grid article { min-width: 0; min-height: 112px; padding: 18px; display: flex; align-items: center; gap: 13px; border-right: 1px solid #38383a; background: linear-gradient(100deg, #29292a, #242425); }
.economy-stat-grid article:nth-child(even) { background: linear-gradient(100deg, #242425, #202021); }
.economy-stat-grid article:last-child { border-right: 0; }
.economy-stat-grid article > span { flex: 0 0 43px; width: 43px; height: 43px; display: grid; place-items: center; border: 1px solid #505052; border-radius: 7px; color: #e16a6a; background: linear-gradient(135deg, #4a3030, #242425); font-size: 10px; font-weight: 800; }
.economy-stat-grid article.is-income > span { border-color: #426f49; color: #72df82; background: linear-gradient(135deg, #29412d, #222423); }
.economy-stat-grid article.is-expense > span { border-color: #744545; color: #ef6969; background: linear-gradient(135deg, #4a3030, #242425); }
.economy-stat-grid article > div { min-width: 0; display: grid; gap: 3px; }
.economy-stat-grid small { color: #8c8c8e; font-size: 10px; font-weight: 800; letter-spacing: .11em; }
.economy-stat-grid strong { overflow: hidden; color: #fff; font-size: 19px; white-space: nowrap; text-overflow: ellipsis; }
.economy-stat-grid em { color: #89898b; font-size: 10px; font-style: normal; line-height: 1.4; }
.economy-insight-grid { margin-top: 18px; display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(360px, .88fr); gap: 18px; }
.economy-trend, .economy-reasons { min-width: 0; }
.economy-chart { padding: 12px 14px 10px; border-bottom: 1px solid #363638; background: #171718; }
.economy-chart-legend { min-height: 30px; display: flex; align-items: center; justify-content: flex-end; gap: 17px; color: #aaa; font-size: 10px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.economy-chart-legend span { display: flex; align-items: center; gap: 7px; }
.economy-chart-legend span::before { width: 9px; height: 9px; border-radius: 3px; content: ''; background: var(--cityrp-action); box-shadow: 0 0 0 3px rgba(52, 209, 66, .1); }
.economy-chart-legend .is-outflow::before { background: var(--cityrp-accent-light); box-shadow: 0 0 0 3px rgba(223, 90, 90, .1); }
.economy-chart-canvas { min-height: 190px; position: relative; overflow: hidden; border: 1px solid #39393b; border-radius: 7px; background: linear-gradient(180deg, #252527, #1d1d1f); }
.economy-chart-canvas svg { width: 100%; height: 190px; display: block; overflow: visible; }
.economy-chart-grid line { stroke: #3a3a3d; stroke-width: 1; stroke-dasharray: 5 7; }
.economy-chart-track { fill: #2d2d30; }
.economy-chart-bar { transition: opacity .18s ease; }
.economy-chart-bar:hover { opacity: .78; }
.economy-chart-bar.is-income { fill: var(--cityrp-action); }
.economy-chart-bar.is-outflow { fill: var(--cityrp-accent-light); }
.economy-chart-empty { position: absolute; inset: 32px 20px 42px; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; text-align: center; }
.economy-chart-empty strong { color: #ddd; font-size: 14px; }
.economy-chart-empty span { max-width: 280px; margin-top: 4px; color: #98989b; font-size: 11px; line-height: 1.4; }
.economy-chart-totals { padding-top: 10px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.economy-chart-totals > span { min-width: 0; padding: 10px 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 1px solid #39393b; border-left: 3px solid var(--cityrp-action); border-radius: 5px; background: #242426; }
.economy-chart-totals > span:last-child { border-left-color: var(--cityrp-accent-light); }
.economy-chart-totals small { color: #9f9fa2; font-size: 10px; font-weight: 800; letter-spacing: .08em; }
.economy-chart-totals strong { overflow: hidden; color: #71dc80; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.economy-chart-totals > span:last-child strong { color: #ed7474; }
.economy-chart-days { padding: 9px 12px 12px; display: grid; grid-template-columns: repeat(7, minmax(68px, 1fr)); gap: 5px; overflow-x: auto; background: #171718; }
.economy-chart-days article { min-width: 68px; padding: 9px 7px; display: grid; gap: 3px; border: 1px solid #38383a; border-radius: 5px; background: #252527; text-align: center; }
.economy-chart-days time { margin-bottom: 2px; color: #fff; font-size: 10px; font-weight: 800; white-space: nowrap; }
.economy-chart-days span { overflow: hidden; font-size: 10px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.economy-chart-days .is-income { color: #71dc80; }
.economy-chart-days .is-outflow { color: #ed7474; }
.economy-reason-list { padding: 10px 13px 13px; display: grid; gap: 7px; background: #171718; }
.economy-reason-list article { min-height: 71px; padding: 11px 13px; display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 12px; border: 1px solid #3a3a3c; border-left: 4px solid var(--cityrp-accent); border-radius: 6px; background: linear-gradient(100deg, #29292a, #222223); }
.economy-reason-list article > span { width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid #4b4b4d; border-radius: 6px; color: #e16a6a; background: #1b1b1c; font-size: 9px; font-weight: 800; }
.economy-reason-list article > div { min-width: 0; display: grid; gap: 4px; }
.economy-reason-list article > div:last-child { text-align: right; }
.economy-reason-list strong { overflow: hidden; color: #fff; font-size: 12px; white-space: nowrap; text-overflow: ellipsis; }
.economy-reason-list small { color: #8f8f91; font-size: 10px; }
.economy-compact-empty { min-height: 120px; padding: 25px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--cityrp-muted); text-align: center; }
.economy-compact-empty strong { color: #fff; font-size: 14px; }
.economy-compact-empty span { margin-top: 6px; font-size: 10px; }
.economy-community-grid { padding: 12px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; background: #171718; }
.economy-community-grid article { min-height: 102px; padding: 16px; display: grid; align-content: center; gap: 4px; border: 1px solid #3b3b3d; border-left: 4px solid #4a4a4c; border-radius: 7px; background: linear-gradient(100deg, #29292a, #222223); }
.economy-community-grid article.is-source { border-left-color: var(--cityrp-action); }
.economy-community-grid article.is-sink { border-left-color: var(--cityrp-accent); }
.economy-community-grid small { color: #8c8c8e; font-size: 10px; font-weight: 800; letter-spacing: .09em; }
.economy-community-grid strong { overflow: hidden; color: #fff; font-size: 18px; white-space: nowrap; text-overflow: ellipsis; }
.economy-community-grid span { color: #8f8f91; font-size: 10px; line-height: 1.4; }
.economy-community > footer { min-height: 46px; padding: 10px 16px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border-top: 1px solid #363638; color: #8f8f91; background: #1c1c1d; font-size: 10px; }
.economy-controls label { flex: 1 1 190px; }
.economy-controls label:first-of-type { flex: 1 1 210px; }
.economy-summary > span { text-align: right; }
.economy-table-wrap { padding: 12px; overflow-x: auto; background: #171718; }
.economy-table { width: 100%; min-width: 850px; border-collapse: separate; border-spacing: 0 7px; table-layout: fixed; }
.economy-table th { padding: 0 13px 6px; color: #9b9b9d; font-size: 10px; font-weight: 800; letter-spacing: .1em; text-align: left; }
.economy-table th:nth-child(1) { width: 18%; }
.economy-table th:nth-child(2) { width: 13%; }
.economy-table th:nth-child(3) { width: 31%; }
.economy-table th:nth-child(4), .economy-table th:nth-child(5) { width: 19%; text-align: right; }
.economy-table td { height: 68px; padding: 11px 13px; border-top: 1px solid #3d3d3f; border-bottom: 1px solid #3d3d3f; color: #d9d9db; background: #29292a; font-size: 11px; vertical-align: middle; }
.economy-table tr:nth-child(even) td { background: #252526; }
.economy-table td:first-child { border-left: 5px solid #4a4a4c; border-radius: 7px 0 0 7px; }
.economy-table td:last-child { border-right: 1px solid #3d3d3f; border-radius: 0 7px 7px 0; text-align: right; }
.economy-table tr.direction-source td:first-child { border-left-color: var(--cityrp-action); }
.economy-table tr.direction-sink td:first-child { border-left-color: var(--cityrp-accent); }
.economy-table tr.direction-transfer td:first-child { border-left-color: #60a4dc; }
.economy-table tr.direction-adjustment td:first-child { border-left-color: var(--cityrp-warning); }
.economy-table td:nth-child(4) { text-align: right; }
.economy-table td > strong, .economy-table td > small { display: block; }
.economy-table td > strong { color: #fff; font-size: 12px; }
.economy-table td > small { margin-top: 5px; overflow-wrap: anywhere; color: #909092; font-size: 10px; line-height: 1.35; }
.economy-table time { color: #bebec0; font-size: 10px; }
.economy-direction { padding: 5px 8px; display: inline-flex; border: 1px solid #4a4a4c; border-radius: 999px; color: #d7d7d9; background: #202021; font-size: 10px; font-weight: 750; }
.economy-direction-source { border-color: #426f49; color: #72df82; background: #233328; }
.economy-direction-sink { border-color: #714040; color: #ef7777; background: #352525; }
.economy-direction-transfer { border-color: #3f617b; color: #78b9eb; background: #222e38; }
.economy-direction-adjustment { border-color: #6b5b3c; color: #e1b25d; background: #302b22; }
.economy-amount { font-size: 14px !important; }
.economy-amount.is-positive { color: #72df82; }
.economy-amount.is-negative { color: #ef7777; }
.economy-amount.is-neutral { color: #b7b7b9; }
.economy-no-results td { min-height: 170px; padding: 38px !important; border: 1px solid #3d3d3f !important; border-left: 5px solid #4a4a4c !important; border-radius: 7px !important; text-align: center !important; }
.economy-no-results strong { color: #fff; font-size: 15px; }
.economy-no-results span { margin-top: 6px; display: block; color: #8f8f91; font-size: 10px; }
.economy-readonly-note { padding: 14px 17px; display: flex; align-items: baseline; gap: 9px; border-top: 1px solid #3a3a3c; color: var(--cityrp-muted); background: #202021; font-size: 11px; line-height: 1.55; }
.economy-readonly-note strong { color: #fff; }

/* Forum-style login */
.login-page { padding-bottom: 34px; }
.login-layout { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(360px, .95fr); gap: 18px; align-items: stretch; }
.login-panel, .login-benefits { min-height: 430px; }
.login-content { padding: 29px; }
.login-intro { max-width: 650px; margin-bottom: 24px; color: var(--cityrp-muted); font-size: 13px; line-height: 1.7; }
.steam-button { width: fit-content; max-width: 100%; min-height: 50px; padding: 7px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid #505052; border-radius: 7px; background: var(--cityrp-control); box-shadow: 0 8px 20px rgba(0, 0, 0, .22); transition: border-color .16s ease, background-color .16s ease, transform .16s ease; }
.steam-button:hover, .steam-button:focus-visible { border-color: var(--cityrp-accent); background: #5a3434; transform: translateY(-1px); }
.steam-button img { display: block; width: auto; max-width: 100%; max-height: 48px; }
.login-action { margin-top: 4px; }
.notice { max-width: 680px; margin: 0 0 20px; padding: 15px 17px; display: grid; gap: 5px; border: 1px solid #533a3a; border-left: 5px solid var(--cityrp-danger); border-radius: 7px; background: #302222; }
.notice strong { color: #fff; font-size: 12px; }
.notice span { color: var(--cityrp-muted); font-size: 11px; line-height: 1.55; }
.login-assurances { margin-top: 25px; padding-top: 20px; display: grid; gap: 11px; border-top: 1px solid #39393b; color: #a3a3a5; font-size: 10px; }
.login-assurances span { display: flex; align-items: center; gap: 9px; }
.login-assurances i { width: 6px; height: 6px; border-radius: 50%; background: var(--cityrp-accent); box-shadow: 0 0 9px var(--cityrp-glow); }
.benefit-list { padding: 14px; display: grid; gap: 8px; background: #171718; }
.benefit-list article { min-height: 92px; padding: 15px; display: grid; grid-template-columns: 40px 1fr; align-items: center; gap: 14px; border: 1px solid #3b3b3d; border-radius: 7px; background: linear-gradient(100deg, #29292a, #242425); }
.benefit-list article:nth-child(even) { background: linear-gradient(100deg, #242425, #202021); }
.benefit-list article > span { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid #4b4b4d; border-radius: 7px; color: #e16a6a; background: #1b1b1c; font-size: 9px; font-weight: 800; }
.benefit-list strong { color: #fff; font-size: 13px; }
.benefit-list p { margin: 4px 0 0; color: var(--cityrp-muted); font-size: 10px; line-height: 1.5; }

/* Shared form controls for future pages */
input[type="text"], input[type="password"], input[type="email"], input[type="url"], input[type="search"], input[type="number"], textarea, select {
    min-height: 40px;
    padding: 9px 11px;
    border: 1px solid #505052;
    border-radius: 6px;
    outline: 0;
    color: var(--cityrp-text);
    background: var(--cityrp-control);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .025);
    transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
textarea { min-height: 110px; resize: vertical; }
input::placeholder, textarea::placeholder { color: #a4a4a6; opacity: 1; }
input:focus, textarea:focus, select:focus { border-color: var(--cityrp-accent-light); background: #424244; box-shadow: 0 0 0 3px rgba(200, 50, 50, .12); }
input[type="checkbox"], input[type="radio"] { accent-color: var(--cityrp-accent); }

/* Forum footer */
.site-footer { position: relative; margin-top: 48px; overflow: hidden; border-top: 3px solid var(--cityrp-accent); color: var(--cityrp-text); background: radial-gradient(circle at 8% 0%, rgba(200, 50, 50, .16), transparent 32%), linear-gradient(135deg, rgba(18, 18, 18, .99), rgba(25, 25, 25, .98)); box-shadow: 0 -18px 44px rgba(0, 0, 0, .28); }
.footer-shell { position: relative; z-index: 1; padding-block: 34px; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(180px, .65fr) minmax(250px, 1fr); align-items: start; gap: 34px; }
.footer-kicker { margin-bottom: 12px; display: flex; align-items: center; color: #e16a6a; font-size: 10px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.footer-kicker::before { width: 28px; height: 4px; margin-right: 9px; content: ""; border-radius: 2px; background: var(--cityrp-accent); box-shadow: 0 0 14px var(--cityrp-glow); }
.footer-logo { display: block; width: auto; max-width: min(360px, 100%); max-height: 84px; margin-bottom: 10px; filter: drop-shadow(0 8px 18px rgba(0, 0, 0, .36)); }
.footer-community p { max-width: 520px; margin: 0; color: var(--cityrp-muted); font-size: 12px; line-height: 1.65; }
.footer-navigation > strong { display: block; margin-bottom: 12px; color: #fff; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.footer-links { display: grid; gap: 7px; }
.footer-links a { min-height: 38px; padding: 8px 11px; display: flex; align-items: center; border: 1px solid #363636; border-radius: 6px; color: var(--cityrp-muted); background: var(--cityrp-card); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .025), 0 9px 22px rgba(0, 0, 0, .16); font-size: 12px; font-weight: 650; transition: background-color .16s ease, border-color .16s ease, color .16s ease, transform .16s ease; }
.footer-links a:hover, .footer-links a:focus-visible { color: #fff; border-color: var(--cityrp-accent); background: var(--cityrp-control); transform: translateX(3px); }
.footer-meta { padding: 15px 16px; display: grid; gap: 8px; border: 1px solid #363636; border-left: 5px solid var(--cityrp-accent); border-radius: 7px; color: var(--cityrp-muted); background: linear-gradient(135deg, rgba(200, 50, 50, .07), transparent 45%), rgba(39, 39, 40, .84); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .025), 0 9px 22px rgba(0, 0, 0, .16); font-size: 10px; line-height: 1.55; }
.footer-meta a { color: #e16a6a; font-weight: 700; }
.footer-meta a:hover { color: #fff; }

@keyframes cityrp-content-enter {
    from { opacity: 0; transform: translateY(7px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1050px) {
    .topbar-shell { align-items: center; }
    .nav-toggle { display: block; order: 3; margin-left: auto; }
    .account, .nav-login { order: 1; }
    .main-nav { position: absolute; top: calc(100% + 1px); right: 16px; left: 16px; display: none; max-height: calc(100vh - 76px); padding: 8px; overflow-y: auto; border: 1px solid #424242; border-radius: 8px; background: rgba(30, 30, 31, .98); box-shadow: 0 18px 42px rgba(0, 0, 0, .42); }
    .main-nav.is-open { display: grid; }
    .main-nav a { min-height: 45px; padding: 0 13px; }
    .main-nav a::after { top: 10px; right: auto; bottom: 10px; left: 0; width: 3px; height: auto; transform: scaleY(0); }
    .main-nav a:hover::after, .main-nav a:focus-visible::after, .main-nav a.is-active::after { transform: scaleY(1); }
    .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .metric-grid article:nth-child(2) { border-right: 0; }
    .metric-grid article:nth-child(-n+2) { border-bottom: 1px solid #383838; }
    .profile-hero { grid-template-columns: auto minmax(0, 1fr); }
    .profile-emblem { grid-column: 1 / -1; margin-left: 140px; }
    .inventory-hero { grid-template-columns: 1fr; gap: 23px; }
    .inventory-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .inventory-stat-grid article:nth-child(2) { border-right: 0; }
    .inventory-stat-grid article:nth-child(-n+2) { border-bottom: 1px solid #383838; }
    .farming-hero { grid-template-columns: 1fr; gap: 22px; }
    .farming-metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .farming-overview-layout { grid-template-columns: 1fr; }
    .crop-card-grid { grid-template-columns: 1fr; }
    .order-hero { grid-template-columns: 1fr; gap: 22px; }
    .leaderboard-hero { grid-template-columns: 1fr; gap: 23px; }
    .records-hero { grid-template-columns: 1fr; gap: 23px; }
    .economy-hero { grid-template-columns: 1fr; gap: 23px; }
    .economy-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .economy-stat-grid article:nth-child(2) { border-right: 0; }
    .economy-stat-grid article:nth-child(-n+2) { border-bottom: 1px solid #38383a; }
    .economy-insight-grid { grid-template-columns: 1fr; }
    .economy-community-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .footer-shell { grid-template-columns: minmax(0, 1fr) minmax(220px, .75fr); }
    .footer-community { grid-column: 1 / -1; }
}

@media (max-width: 800px) {
    :root { --cityrp-shell: calc(100% - 16px); }
    .masthead-shell { min-height: 150px; padding-block: 20px; flex-direction: column; justify-content: center; text-align: center; }
    .brand-logo img { max-width: min(520px, 88vw); max-height: 105px; margin-inline: auto; }
    .masthead-status { min-width: 0; width: min(100%, 430px); text-align: left; }
    .dashboard-hero { grid-template-columns: 1fr; gap: 25px; padding: 24px; }
    .module-grid { grid-template-columns: 1fr; }
    .profile-layout { grid-template-columns: 1fr; }
    .inventory-controls { align-items: stretch; flex-wrap: wrap; }
    .inventory-controls label, .inventory-controls label:first-child { flex: 1 1 220px; }
    .inventory-control-actions { width: 100%; margin-left: 0; }
    .inventory-control-actions .button { flex: 1 1 150px; }
    .inventory-item { grid-template-columns: 72px minmax(0, 1fr) auto; }
    .inventory-item-image { width: 72px; height: 72px; }
    .inventory-item-warning { grid-column: 2 / -1; padding: 8px 0 0; border-top: 1px solid #484039; border-left: 0; }
    .farming-rule-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .order-workflow { grid-template-columns: 1fr; }
    .leaderboard-controls { align-items: stretch; flex-wrap: wrap; }
    .leaderboard-controls label, .leaderboard-controls label:first-of-type { flex: 1 1 220px; }
    .leaderboard-control-actions { width: 100%; margin-left: 0; }
    .leaderboard-control-actions .button { flex: 1 1 150px; }
    .records-controls label, .records-controls label:first-of-type { flex: 1 1 190px; }
    .economy-controls { align-items: stretch; flex-wrap: wrap; }
    .economy-controls label, .economy-controls label:first-of-type { flex: 1 1 190px; }
    .economy-controls .leaderboard-control-actions { width: 100%; margin-left: 0; }
    .economy-controls .leaderboard-control-actions .button { flex: 1 1 150px; }
    .login-layout { grid-template-columns: 1fr; }
    .login-panel, .login-benefits { min-height: 0; }
    .panel-header { align-items: flex-start; flex-direction: column; gap: 9px; }
    .panel-header > p { max-width: none; text-align: left; }
}

@media (max-width: 600px) {
    .topbar, .topbar-shell { min-height: 58px; }
    .topbar-shell { width: calc(100% - 20px); display: grid; grid-template-columns: 1fr auto; gap: 8px; }
    .nav-toggle { position: absolute; top: 8px; right: 10px; margin-left: 0; }
    .account, .nav-login { grid-column: 1; grid-row: 1; justify-self: start; }
    .site-masthead { padding-top: 58px; }
    .site-masthead::before { inset-block-start: 58px; }
    .account-button > span:not(.chevron), .chevron { display: none; }
    .account-button img { width: 36px; height: 36px; }
    .nav-login { padding: 9px 10px; font-size: 9px; }
    .masthead-shell { min-height: 132px; }
    .brand-logo { width: 100%; display: flex; justify-content: center; }
    .brand-logo img { width: auto; max-width: 88vw; max-height: 85px; object-fit: contain; }
    .masthead-status { padding: 10px 12px; }
    .page-shell { padding-top: 14px; }
    .breadcrumb { margin-bottom: 12px; }
    .dashboard-hero { padding: 20px 17px; border-left-width: 5px; }
    .profile-hero { padding: 22px 17px; grid-template-columns: 1fr; justify-items: stretch; border-left-width: 5px; text-align: center; }
    .profile-portrait { justify-self: center; }
    .profile-portrait > img { width: 96px; height: 96px; }
    .profile-actions { justify-content: center; }
    .profile-actions .button { flex: 1 1 145px; }
    .profile-emblem { min-width: 0; width: 100%; margin-left: 0; text-align: left; }
    .hero-copy h1 { font-size: 27px; }
    .hero-actions .button { flex: 1 1 140px; }
    .identity-card { padding: 15px; }
    .identity-head img { width: 49px; height: 49px; }
    .panel-header { min-height: 64px; padding: 13px 14px; border-left-width: 5px; }
    .panel-header h1, .panel-header h2 { font-size: 21px; }
    .metric-grid { grid-template-columns: 1fr; }
    .metric-grid article, .metric-grid article:nth-child(2) { min-height: 96px; border-right: 0; border-bottom: 1px solid #383838; }
    .metric-grid article:last-child { border-bottom: 0; }
    .module-grid { padding: 8px; gap: 7px; }
    .module-card { min-height: 138px; padding: 15px 12px; grid-template-columns: 38px minmax(0, 1fr); gap: 12px; }
    .module-card:last-child:nth-child(odd) { grid-column: auto; }
    .module-index { width: 38px; height: 38px; }
    .module-state, .module-action { grid-column: 2; justify-self: start; }
    .profile-detail-list { padding-inline: 10px; }
    .profile-detail-list > div { grid-template-columns: 1fr; gap: 6px; }
    .profile-detail-list dd { text-align: left; }
    .profile-empty-content { min-height: 0; padding: 25px 18px; flex-direction: column; }
    .inventory-hero { min-height: 0; padding: 22px 17px; border-left-width: 5px; }
    .inventory-capacity { padding: 15px; }
    .inventory-stat-grid { grid-template-columns: 1fr; }
    .inventory-stat-grid article, .inventory-stat-grid article:nth-child(2) { min-height: 92px; border-right: 0; border-bottom: 1px solid #383838; }
    .inventory-stat-grid article:last-child { border-bottom: 0; }
    .inventory-controls { padding: 10px; display: grid; grid-template-columns: 1fr; }
    .inventory-controls label, .inventory-controls label:first-child { width: 100%; }
    .inventory-control-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .inventory-result-summary { align-items: flex-start; flex-direction: column; gap: 4px; }
    .inventory-list { padding: 8px; }
    .inventory-overview-capacity > div { align-items: flex-start; }
    .inventory-overview-capacity > div > span { align-items: flex-start; flex-direction: column; gap: 2px; }
    .inventory-category > summary { min-height: 68px; padding: 11px 42px 11px 13px; gap: 10px; }
    .inventory-category > summary::after { right: 16px; }
    .inventory-category-count { min-width: 0; display: grid; grid-template-columns: auto; gap: 1px; }
    .inventory-category-count strong { font-size: 15px; }
    .inventory-category-count small { max-width: 112px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
    .inventory-category-items { padding: 7px; }
    .inventory-item { padding: 9px 11px 9px 9px; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 11px; }
    .inventory-item-image { width: 64px; height: 64px; }
    .inventory-item-meta { min-width: 68px; padding: 8px 9px; }
    .inventory-item-warning { grid-column: 1 / -1; }
    .inventory-readonly-note { align-items: flex-start; flex-direction: column; gap: 3px; }
    .farming-hero { min-height: 0; padding: 22px 17px; border-left-width: 5px; }
    .farming-tabs { top: 66px; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
    .farming-tabs button { min-height: 40px; }
    .farming-metric-grid { padding: 8px; grid-template-columns: 1fr; gap: 7px; }
    .farming-metric-grid article { min-height: 92px; padding: 14px; }
    .farming-rule-grid { padding: 8px; grid-template-columns: 1fr; }
    .crop-card-grid { padding: 8px; }
    .crop-card { padding: 15px 13px; }
    .crop-card > header { grid-template-columns: 46px minmax(0, 1fr); }
    .crop-monogram { width: 46px; height: 46px; }
    .crop-card header > strong { grid-column: 2; text-align: left; }
    .crop-card header > strong small { display: inline; margin-left: 4px; }
    .crop-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .challenge-groups { padding: 8px; }
    .challenge-card { padding: 14px; }
    .challenge-card-main { flex-direction: column; gap: 10px; }
    .challenge-state { align-self: flex-start; white-space: normal; }
    .challenge-card footer { flex-direction: column; gap: 5px; }
    .order-hero { padding: 19px 16px; }
    .order-hero dl { grid-template-columns: 1fr 1fr; }
    .order-runtime-note { align-items: flex-start; }
    .order-rate-list > article { grid-template-columns: 46px minmax(0, 1fr); }
    .order-rate-list article > dl { grid-column: 1 / -1; }
    .order-rates > header { align-items: flex-start; flex-direction: column; gap: 4px; }
    .leaderboard-hero { min-height: 0; padding: 22px 17px; border-left-width: 5px; }
    .leaderboard-hero-copy h1 { font-size: 28px; }
    .leaderboard-rank-card { padding: 15px; }
    .leaderboard-category-tabs { padding: 8px 8px 0; grid-template-columns: 1fr; }
    .leaderboard-metric-grid { padding: 7px 8px 8px; grid-template-columns: 1fr; }
    .leaderboard-controls { padding: 10px; display: grid; grid-template-columns: 1fr; }
    .leaderboard-controls label, .leaderboard-controls label:first-of-type { width: 100%; }
    .leaderboard-control-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .leaderboard-summary { align-items: flex-start; flex-direction: column; gap: 4px; }
    .leaderboard-summary > span { text-align: left; }
    .leaderboard-table-wrap { padding: 8px; overflow: visible; }
    .leaderboard-table, .leaderboard-table tbody, .leaderboard-table tr, .leaderboard-table td { display: block; width: 100%; }
    .leaderboard-table { table-layout: auto; }
    .leaderboard-table thead { display: none; }
    .leaderboard-table tr { margin-bottom: 8px; overflow: hidden; border: 1px solid #3e3e40; border-left: 5px solid #4a4a4c; border-radius: 7px; background: #262627; }
    .leaderboard-table tr:last-child { margin-bottom: 0; }
    .leaderboard-table tr.is-podium { border-left-color: var(--cityrp-accent); }
    .leaderboard-table tr.is-viewer { border-left-color: var(--cityrp-action); }
    .leaderboard-table td, .leaderboard-table td:first-child { min-height: 45px; height: auto; padding: 9px 11px; display: grid; grid-template-columns: 88px minmax(0, 1fr); align-items: center; gap: 10px; border: 0; border-bottom: 1px solid #39393b; background: #282829; text-align: right; }
    .leaderboard-table tr:nth-child(even) td { background: #242425; }
    .leaderboard-table tr.is-viewer td { background: linear-gradient(90deg, rgba(52, 209, 66, .06), #29292a 48%); }
    .leaderboard-table td:last-child { border-bottom: 0; text-align: right; }
    .leaderboard-table td::before { content: attr(data-label); color: #848486; font-size: 7px; font-weight: 800; letter-spacing: .09em; text-align: left; text-transform: uppercase; }
    .leaderboard-citizen { justify-content: flex-end; }
    .leaderboard-citizen strong { max-width: min(48vw, 260px); }
    .leaderboard-position { justify-self: end; }
    .leaderboard-no-results { border-left-color: #4a4a4c !important; }
    .leaderboard-no-results td { min-height: 130px; padding: 24px 15px !important; display: flex; flex-direction: column; justify-content: center; border: 0; }
    .leaderboard-no-results td::before { display: none; }
    .leaderboard-pagination { grid-template-columns: 1fr 1fr; }
    .leaderboard-pagination > div { grid-column: 1 / -1; grid-row: 1; justify-content: center; }
    .leaderboard-pagination > a:first-child, .leaderboard-pagination > span:first-child { grid-column: 1; grid-row: 2; }
    .leaderboard-pagination > a:last-child, .leaderboard-pagination > span:last-child { grid-column: 2; grid-row: 2; }
    .records-hero { min-height: 0; padding: 22px 17px; border-left-width: 5px; }
    .records-hero-copy h1 { font-size: 28px; }
    .records-overview { padding: 15px; }
    .records-tabs { padding: 8px; grid-template-columns: 1fr; }
    .records-controls { padding: 10px; display: grid; grid-template-columns: 1fr; }
    .records-controls label, .records-controls label:first-of-type { width: 100%; }
    .records-table-wrap { padding: 8px; overflow: visible; }
    .records-table, .records-table tbody, .records-table tr, .records-table td { display: block; min-width: 0; width: 100%; }
    .records-table { table-layout: auto; }
    .records-table thead { display: none; }
    .records-table tr { margin-bottom: 8px; overflow: hidden; border: 1px solid #3e3e40; border-left: 5px solid #4a4a4c; border-radius: 7px; background: #262627; }
    .records-table tr:last-child { margin-bottom: 0; }
    .records-table tr.status-active { border-left-color: var(--cityrp-action); }
    .records-table tr.status-revoked { border-left-color: var(--cityrp-danger); }
    .records-table td, .records-table td:first-child { min-height: 49px; height: auto; padding: 11px 12px; display: grid; grid-template-columns: 100px minmax(0, 1fr); align-items: start; gap: 11px; border: 0; border-bottom: 1px solid #39393b; background: #282829; text-align: right; }
    .records-table tr:nth-child(even) td { background: #242425; }
    .records-table td:last-child { border-bottom: 0; }
    .records-table td::before { grid-column: 1; grid-row: 1; content: attr(data-label); padding-top: 2px; color: #949496; font-size: 8px; font-weight: 800; letter-spacing: .09em; text-align: left; text-transform: uppercase; }
    .records-table td > * { grid-column: 2; justify-self: end; text-align: right; }
    .record-revocation, .record-identity, .record-staff, .record-id { max-width: 100%; }
    .record-revocation { border-right: 3px solid var(--cityrp-danger); border-left: 0; }
    .records-no-results { border-left-color: #4a4a4c !important; }
    .records-no-results td { min-height: 130px; padding: 24px 15px !important; display: flex; flex-direction: column; justify-content: center; border: 0; }
    .records-no-results td::before { display: none; }
    .economy-hero { min-height: 0; padding: 22px 17px; border-left-width: 5px; }
    .economy-hero-copy h1 { font-size: 28px; }
    .economy-balance-card { padding: 16px; }
    .economy-stat-grid { grid-template-columns: 1fr; }
    .economy-stat-grid article, .economy-stat-grid article:nth-child(2) { min-height: 96px; border-right: 0; border-bottom: 1px solid #38383a; }
    .economy-stat-grid article:last-child { border-bottom: 0; }
    .economy-chart, .economy-reason-list { padding: 8px; }
    .economy-chart-days { padding: 8px; }
    .economy-community-grid { padding: 8px; grid-template-columns: 1fr; }
    .economy-community > footer { align-items: flex-start; flex-direction: column; gap: 4px; }
    .economy-controls { padding: 10px; display: grid; grid-template-columns: 1fr; }
    .economy-controls label, .economy-controls label:first-of-type { width: 100%; }
    .economy-controls .leaderboard-control-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .economy-summary { align-items: flex-start; flex-direction: column; gap: 4px; }
    .economy-summary > span { text-align: left; }
    .economy-table-wrap { padding: 8px; overflow: visible; }
    .economy-table, .economy-table tbody, .economy-table tr, .economy-table td { display: block; min-width: 0; width: 100%; }
    .economy-table { table-layout: auto; }
    .economy-table thead { display: none; }
    .economy-table tr { margin-bottom: 8px; overflow: hidden; border: 1px solid #3e3e40; border-left: 5px solid #4a4a4c; border-radius: 7px; background: #262627; }
    .economy-table tr:last-child { margin-bottom: 0; }
    .economy-table tr.direction-source { border-left-color: var(--cityrp-action); }
    .economy-table tr.direction-sink { border-left-color: var(--cityrp-accent); }
    .economy-table tr.direction-transfer { border-left-color: #60a4dc; }
    .economy-table tr.direction-adjustment { border-left-color: var(--cityrp-warning); }
    .economy-table td, .economy-table td:first-child { min-height: 49px; height: auto; padding: 11px 12px; display: grid; grid-template-columns: 96px minmax(0, 1fr); align-items: start; gap: 11px; border: 0; border-bottom: 1px solid #39393b; border-radius: 0; background: #282829; text-align: right; }
    .economy-table tr:nth-child(even) td { background: #242425; }
    .economy-table td:last-child { border: 0; text-align: right; }
    .economy-table td::before { grid-column: 1; grid-row: 1; content: attr(data-label); padding-top: 2px; color: #949496; font-size: 10px; font-weight: 800; letter-spacing: .09em; text-align: left; text-transform: uppercase; }
    .economy-table td > * { grid-column: 2; justify-self: end; text-align: right; }
    .economy-no-results { border-left-color: #4a4a4c !important; }
    .economy-no-results td { min-height: 130px; padding: 24px 15px !important; display: flex; flex-direction: column; justify-content: center; border: 0 !important; }
    .economy-no-results td::before { display: none; }
    .economy-readonly-note { align-items: flex-start; flex-direction: column; gap: 3px; }
    .login-content { padding: 21px 17px; }
    .benefit-list { padding: 8px; }
    .site-footer { margin-top: 30px; }
    .footer-shell { padding-block: 27px; grid-template-columns: 1fr; gap: 24px; }
    .footer-community { grid-column: auto; }
    .footer-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .footer-links a:hover, .footer-links a:focus-visible { transform: none; }
}

/* Legacy modules join the shared web type scale. */
.account-button small,
.masthead-status small,
.panel-kicker,
.panel-status,
.identity-head small,
.identity-card dt,
.metric-grid small,
.module-card small,
.module-state,
.profile-link-state,
.profile-emblem span,
.profile-emblem small,
.profile-detail-list dt,
.farmer-title-card > span,
.farmer-title-card small,
.farming-metric-grid small,
.farming-next-card > div:first-child span,
.progress-label,
.crop-card header > div small,
.crop-card header > strong small,
.crop-stat-grid dt,
.farming-completion small,
.challenge-copy > span,
.challenge-state,
.challenge-card footer,
.order-live-badge,
.order-hero dt,
.order-rates > header span,
.order-rate-list article > div small,
.order-rate-list dt,
.leaderboard-rank-heading small,
.leaderboard-personal-score small,
.leaderboard-category-tabs small,
.leaderboard-metric-link small,
.leaderboard-controls label > span,
.leaderboard-table th,
.leaderboard-citizen em,
.records-overview header small,
.records-overview dt,
.records-tabs small,
.records-tabs em,
.records-table th,
.record-status,
.record-id,
.record-kind,
.economy-balance-card > span,
.economy-stat-grid small,
.economy-community-grid small,
.economy-table th,
.economy-direction,
.leaderboard-table td::before,
.records-table td::before { font-size: var(--cityrp-type-meta); }

.nav-login { font-size: var(--cityrp-type-detail); }
.progress-label strong, .order-workflow article > span { font-size: var(--cityrp-type-meta); }

.identity-head span,
.identity-card dd,
.metric-grid article div span,
.module-card p,
.module-action,
.farmer-title-card p,
.farming-metric-grid article div span,
.farming-next-card > p,
.farming-complete-state p,
.farming-detail-list dt,
.farming-rule-grid p,
.crop-rules > span,
.journal-progress-summary > div,
.challenge-copy p,
.order-hero p,
.order-runtime-note p,
.order-workflow p,
.order-rate-list dd,
.leaderboard-rank-card > p,
.leaderboard-summary,
.leaderboard-table td,
.leaderboard-empty p,
.leaderboard-pagination > a,
.leaderboard-pagination > span,
.leaderboard-pagination > div a,
.records-overview > p,
.records-no-results span,
.economy-balance-card > small,
.economy-stat-grid em,
.economy-chart-days,
.economy-reason-list small,
.economy-community-grid span,
.economy-community > footer,
.economy-table td,
.economy-table td > small,
.economy-readonly-note,
.benefit-list p { font-size: var(--cityrp-type-detail); }

:where(a, button, input, select, textarea):focus-visible { outline: 2px solid var(--cityrp-accent-light); outline-offset: 3px; }

@media (max-width: 800px) {
    body { background-attachment: scroll; }
}

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

/* Marketplace — forum shell with CityRP's compact transaction workbench. */
.marketplace-page { display: grid; gap: 18px; }
.marketplace-hero { min-height: 286px; padding: 35px 38px; position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 310px; align-items: center; gap: 34px; overflow: hidden; border-left: 7px solid var(--cityrp-accent); background: linear-gradient(118deg, #29292b 0%, #242426 57%, #1c1c1e 100%); }
.marketplace-hero::before { content: ''; width: 360px; height: 360px; position: absolute; right: 180px; bottom: -285px; border: 50px solid rgba(200, 50, 50, .1); border-radius: 50%; pointer-events: none; }
.marketplace-hero::after { content: 'MARKET'; position: absolute; right: 350px; bottom: -11px; color: rgba(255, 255, 255, .022); font-size: 85px; font-weight: 900; letter-spacing: -.05em; pointer-events: none; }
.marketplace-hero-copy, .marketplace-wallet { position: relative; z-index: 1; }
.marketplace-hero-copy h1 { max-width: 700px; margin: 4px 0 9px; color: #fff; font-size: clamp(34px, 5vw, 58px); line-height: .98; letter-spacing: -.045em; }
.marketplace-hero-copy > p { max-width: 650px; margin: 0; color: #bdbdbf; font-size: 14px; line-height: 1.65; }
.marketplace-wallet { min-height: 190px; padding: 24px; display: flex; flex-direction: column; justify-content: center; border: 1px solid #444447; border-top: 4px solid var(--cityrp-accent); border-radius: 8px; background: linear-gradient(145deg, #343436, #262628); box-shadow: 0 19px 38px rgba(0, 0, 0, .24); }
.marketplace-wallet > span { color: #aaa; font-size: 10px; font-weight: 800; letter-spacing: .13em; }
.marketplace-wallet > strong { margin: 4px 0 1px; color: #fff; font-size: clamp(30px, 4vw, 44px); line-height: 1; letter-spacing: -.035em; }
.marketplace-wallet > small { color: #b8b8ba; font-size: 12px; }
.marketplace-live-state { margin-top: 22px; padding-top: 13px; display: flex; align-items: center; gap: 8px; border-top: 1px solid #464648; color: #a9a9ab; font-size: 11px; font-weight: 700; }
.marketplace-live-state i { width: 9px; height: 9px; border-radius: 50%; background: #777; box-shadow: 0 0 0 4px rgba(119, 119, 119, .12); }
.marketplace-live-state.is-online i { background: var(--cityrp-action); box-shadow: 0 0 0 4px rgba(52, 209, 66, .12); }

.marketplace-alert { min-height: 70px; padding: 14px 17px; display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: 13px; border: 1px solid #444447; border-left: 5px solid #6e6e70; border-radius: 7px; background: #29292b; box-shadow: 0 8px 20px rgba(0, 0, 0, .13); }
.marketplace-alert > span { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 5px; background: #3a3a3d; color: #fff; font-size: 17px; font-weight: 900; }
.marketplace-alert strong { color: #fff; font-size: 13px; }
.marketplace-alert p { margin: 2px 0 0; color: #bcbcbf; font-size: 11px; line-height: 1.45; }
.marketplace-alert > a { color: #fff; font-size: 11px; font-weight: 800; text-decoration: none; }
.marketplace-alert > a:hover { color: var(--cityrp-accent-light); }
.marketplace-alert.is-good { border-left-color: var(--cityrp-action); }
.marketplace-alert.is-good > span { background: rgba(52, 209, 66, .15); color: var(--cityrp-action); }
.marketplace-alert.is-pending, .marketplace-alert.is-warning { border-left-color: var(--cityrp-warning); }
.marketplace-alert.is-pending > span, .marketplace-alert.is-warning > span { background: rgba(225, 164, 68, .15); color: var(--cityrp-warning); }
.marketplace-alert.is-bad, .marketplace-alert.is-error { border-left-color: var(--cityrp-danger); }
.marketplace-alert.is-bad > span, .marketplace-alert.is-error > span { background: rgba(215, 65, 65, .15); color: #ef7777; }

.marketplace-stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.marketplace-stat-grid article { min-height: 120px; padding: 22px; display: flex; flex-direction: column; justify-content: center; border-right: 1px solid #3c3c3e; background: linear-gradient(155deg, #2e2e30, #28282a); }
.marketplace-stat-grid article:last-child { border-right: 0; }
.marketplace-stat-grid small { color: #a9a9ac; font-size: 10px; font-weight: 800; letter-spacing: .12em; }
.marketplace-stat-grid strong { margin: 2px 0; color: #fff; font-size: 29px; line-height: 1; }
.marketplace-stat-grid span { color: #aeadb0; font-size: 11px; }
.marketplace-audit-grid article:nth-child(3) strong,
.marketplace-audit-grid article:nth-child(4) strong { font-size: 23px; }

.marketplace-controls { padding: 15px; display: grid; grid-template-columns: minmax(220px, 1fr) 220px auto; align-items: end; gap: 12px; border-top: 1px solid #3e3e40; border-bottom: 1px solid #3e3e40; background: #252527; }
.marketplace-controls label, .marketplace-sell-form label, .marketplace-listing-action label { min-width: 0; display: grid; gap: 6px; }
.marketplace-controls label > span, .marketplace-sell-form label > span, .marketplace-listing-action label > span { color: #aaa; font-size: 10px; font-weight: 800; letter-spacing: .1em; }
.marketplace-controls input, .marketplace-controls select, .marketplace-sell-form input, .marketplace-sell-form select, .marketplace-listing-action input { width: 100%; height: 42px; padding: 0 12px; border: 1px solid #4b4b4e; border-radius: 5px; background: #363638; color: #fff; font-family: var(--cityrp-font); font-size: 12px; font-weight: 700; }
.marketplace-controls input::placeholder, .marketplace-sell-form input::placeholder { color: #8f8f91; }
.marketplace-controls input:hover, .marketplace-controls select:hover, .marketplace-sell-form input:hover, .marketplace-sell-form select:hover, .marketplace-listing-action input:hover { border-color: #646467; }
.marketplace-control-actions { display: flex; gap: 8px; }
.marketplace-result-summary { min-height: 47px; padding: 0 16px; display: flex; align-items: center; justify-content: space-between; color: #aaa; font-size: 11px; }
.marketplace-result-summary strong { color: #fff; }

.marketplace-listing-grid { padding: 0 14px 15px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.marketplace-listing { min-width: 0; overflow: hidden; display: grid; grid-template-rows: 155px 1fr auto; border: 1px solid #414144; border-radius: 7px; background: #2b2b2d; box-shadow: 0 10px 24px rgba(0, 0, 0, .13); transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.marketplace-listing:hover { transform: translateY(-2px); border-color: #59595c; box-shadow: 0 15px 29px rgba(0, 0, 0, .2); }
.marketplace-listing.is-own { border-top: 3px solid var(--cityrp-accent); }
.marketplace-listing-image { position: relative; display: grid; place-items: center; overflow: hidden; border-bottom: 1px solid #3f3f42; background: radial-gradient(circle at 50% 40%, #3d3d40 0%, #272729 72%); }
.marketplace-listing-image img { width: 100%; height: 100%; padding: 20px; object-fit: contain; filter: drop-shadow(0 11px 12px rgba(0, 0, 0, .4)); }
.marketplace-listing-image.is-placeholder > span { color: #747477; font-size: 10px; font-weight: 900; line-height: 1.25; letter-spacing: .12em; text-align: center; }
.marketplace-listing-image small { padding: 6px 8px; position: absolute; top: 9px; right: 9px; border: 1px solid #505053; border-radius: 4px; background: rgba(25, 25, 27, .86); color: #d0d0d2; font-size: 9px; font-weight: 800; }
.marketplace-listing-copy { padding: 16px 16px 12px; }
.marketplace-listing-owner { display: block; overflow: hidden; color: #a5a5a8; font-size: 9px; font-weight: 800; letter-spacing: .1em; text-overflow: ellipsis; white-space: nowrap; }
.marketplace-listing.is-own .marketplace-listing-owner { color: #e46a6a; }
.marketplace-listing h3 { margin: 5px 0 13px; overflow: hidden; color: #fff; font-size: 17px; line-height: 1.15; text-overflow: ellipsis; white-space: nowrap; }
.marketplace-listing-numbers { display: flex; align-items: end; justify-content: space-between; gap: 10px; }
.marketplace-listing-numbers strong { color: #fff; font-size: 21px; letter-spacing: -.02em; }
.marketplace-listing-numbers span { color: #aaa; font-size: 10px; }
.marketplace-listing-action { padding: 12px 16px 15px; display: grid; grid-template-columns: minmax(78px, 96px) 1fr; align-items: end; gap: 9px; border-top: 1px solid #3d3d40; background: #272729; }
.marketplace-listing.is-own .marketplace-listing-action { grid-template-columns: 1fr; }
.marketplace-listing-action input { height: 38px; }
.marketplace-listing-action .button { min-height: 38px; }
.button:disabled { cursor: not-allowed; opacity: .45; filter: grayscale(.25); }

.marketplace-empty { min-height: 160px; margin: 0 14px 15px; padding: 30px; display: flex; align-items: center; justify-content: center; gap: 14px; border: 1px dashed #49494c; border-radius: 7px; background: #28282a; text-align: left; }
.marketplace-empty > span { width: 39px; height: 39px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; background: #3a3a3d; color: #bbb; font-weight: 900; }
.marketplace-empty h3 { margin: 0 0 3px; color: #fff; font-size: 15px; }
.marketplace-empty p { margin: 0; color: #aaa; font-size: 11px; }
.marketplace-pagination { min-height: 60px; padding: 10px 15px; display: grid; grid-template-columns: 110px 1fr 110px; align-items: center; border-top: 1px solid #3e3e40; background: #252527; text-align: center; }
.marketplace-pagination a, .marketplace-pagination span { color: #aaa; font-size: 11px; font-weight: 800; text-decoration: none; }
.marketplace-pagination a:hover { color: #fff; }
.marketplace-pagination strong { color: #fff; font-size: 11px; }
.marketplace-pagination > :first-child { text-align: left; }
.marketplace-pagination > :last-child { text-align: right; }

.marketplace-sell-form { padding: 18px; display: grid; grid-template-columns: minmax(220px, 1fr) 130px 190px auto; align-items: end; gap: 12px; border-top: 1px solid #3e3e40; background: linear-gradient(150deg, #2e2e30, #28282a); }
.marketplace-money-input { display: grid; grid-template-columns: 38px 1fr; }
.marketplace-money-input b { display: grid; place-items: center; border: 1px solid #4b4b4e; border-right: 0; border-radius: 5px 0 0 5px; background: #303032; color: #bdbdc0; font-size: 13px; }
.marketplace-money-input input { border-radius: 0 5px 5px 0; }
.marketplace-server-note { min-height: 58px; padding: 12px 18px; display: flex; align-items: center; gap: 14px; border-top: 1px solid #3c3c3e; background: #242426; }
.marketplace-server-note > span { padding: 5px 7px; border-radius: 4px; background: rgba(52, 209, 66, .1); color: var(--cityrp-action); font-size: 9px; font-weight: 900; letter-spacing: .1em; white-space: nowrap; }
.marketplace-server-note p { margin: 0; color: #a9a9ac; font-size: 11px; line-height: 1.45; }

.marketplace-activity-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid #3e3e40; }
.marketplace-activity-columns > section { min-width: 0; }
.marketplace-activity-columns > section + section { border-left: 1px solid #3e3e40; }
.marketplace-activity-columns > section > header { min-height: 47px; padding: 0 15px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #3c3c3e; background: #262628; }
.marketplace-activity-columns > section > header span { color: #aaa; font-size: 10px; font-weight: 800; letter-spacing: .11em; }
.marketplace-activity-columns > section > header strong { color: #fff; font-size: 12px; }
.marketplace-timeline { max-height: 430px; padding: 9px; overflow: auto; }
.marketplace-timeline article { min-height: 78px; padding: 12px 11px; display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; align-items: start; gap: 10px; border-bottom: 1px solid #3a3a3c; background: #2b2b2d; }
.marketplace-timeline article:first-child { border-radius: 5px 5px 0 0; }
.marketplace-timeline article:last-child { border-bottom: 0; border-radius: 0 0 5px 5px; }
.marketplace-timeline article > i { width: 8px; height: 8px; margin-top: 4px; border-radius: 50%; background: #777; box-shadow: 0 0 0 4px rgba(119, 119, 119, .1); }
.marketplace-timeline article > i.is-good { background: var(--cityrp-action); box-shadow: 0 0 0 4px rgba(52, 209, 66, .1); }
.marketplace-timeline article > i.is-bad { background: var(--cityrp-danger); box-shadow: 0 0 0 4px rgba(215, 65, 65, .1); }
.marketplace-timeline article > i.is-pending { background: var(--cityrp-warning); box-shadow: 0 0 0 4px rgba(225, 164, 68, .1); }
.marketplace-timeline article > div { min-width: 0; display: grid; gap: 2px; }
.marketplace-timeline article > div strong { overflow: hidden; color: #fff; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.marketplace-timeline article > div span { overflow: hidden; color: #adadb0; font-size: 10px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.marketplace-timeline article > div small { color: #828285; font-size: 9px; }
.marketplace-status { padding: 5px 7px; border: 1px solid #505053; border-radius: 4px; color: #bbb; font-size: 9px; font-style: normal; font-weight: 900; white-space: nowrap; }
.marketplace-status.is-good { border-color: rgba(52, 209, 66, .32); background: rgba(52, 209, 66, .08); color: var(--cityrp-action); }
.marketplace-status.is-bad { border-color: rgba(215, 65, 65, .34); background: rgba(215, 65, 65, .08); color: #ed7777; }
.marketplace-status.is-pending { border-color: rgba(225, 164, 68, .32); background: rgba(225, 164, 68, .08); color: var(--cityrp-warning); }
.marketplace-mini-empty { min-height: 110px; display: grid; place-items: center; color: #8f8f92; font-size: 11px; }

.marketplace-receipt-wrap { padding: 12px; overflow-x: auto; border-top: 1px solid #3e3e40; }
.marketplace-receipt-table { width: 100%; min-width: 760px; border-collapse: separate; border-spacing: 0 5px; }
.marketplace-receipt-table th { padding: 4px 12px 8px; color: #9c9c9f; font-size: 10px; letter-spacing: .1em; text-align: left; text-transform: uppercase; }
.marketplace-receipt-table td { height: 61px; padding: 10px 12px; border-top: 1px solid #3e3e40; border-bottom: 1px solid #3e3e40; background: #2b2b2d; color: #c8c8ca; font-size: 11px; }
.marketplace-receipt-table td:first-child { border-left: 4px solid #5a5a5d; border-radius: 5px 0 0 5px; }
.marketplace-receipt-table td:last-child { border-right: 1px solid #3e3e40; border-radius: 0 5px 5px 0; }
.marketplace-receipt-table td > strong, .marketplace-receipt-table td > small { display: block; }
.marketplace-receipt-table td > strong { color: #fff; }
.marketplace-receipt-table td > small { margin-top: 2px; color: #8d8d90; font-size: 9px; }
.marketplace-audit-table { min-width: 1080px; }
.marketplace-audit-table td:last-child { max-width: 270px; }
.marketplace-audit-table td:last-child small { overflow-wrap: anywhere; line-height: 1.35; }
.marketplace-audit-table .marketplace-status { display: inline-block; }
.marketplace-trade-kind { padding: 5px 7px; border-radius: 4px; background: #3a3a3d; color: #ccc; font-size: 9px; font-weight: 900; text-transform: uppercase; }
.marketplace-trade-kind.is-buy { background: rgba(96, 164, 220, .12); color: #78b6e8; }
.marketplace-trade-kind.is-sell { background: rgba(52, 209, 66, .1); color: var(--cityrp-action); }
.marketplace-debit { color: #ed7777 !important; }
.marketplace-credit { color: var(--cityrp-action) !important; }
.marketplace-no-receipts td { height: 130px; border: 1px dashed #464649 !important; border-radius: 5px !important; color: #aaa; text-align: center; }
.marketplace-no-receipts span { display: block; margin-top: 3px; font-size: 10px; }

@media (max-width: 980px) {
    .marketplace-hero { grid-template-columns: minmax(0, 1fr) 260px; padding: 30px; }
    .marketplace-listing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .marketplace-sell-form { grid-template-columns: minmax(200px, 1fr) 110px 170px; }
    .marketplace-sell-form > button { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
    .marketplace-hero { padding: 25px 20px; grid-template-columns: 1fr; gap: 22px; }
    .marketplace-hero::after { display: none; }
    .marketplace-wallet { min-height: 150px; }
    .marketplace-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .marketplace-stat-grid article:nth-child(2) { border-right: 0; }
    .marketplace-stat-grid article:nth-child(-n+2) { border-bottom: 1px solid #3c3c3e; }
    .marketplace-controls { grid-template-columns: 1fr 1fr; }
    .marketplace-control-actions { grid-column: 1 / -1; }
    .marketplace-control-actions .button { flex: 1; }
    .marketplace-sell-form { grid-template-columns: 1fr 1fr; }
    .marketplace-item-select { grid-column: 1 / -1; }
    .marketplace-sell-form > button { grid-column: 1 / -1; }
    .marketplace-activity-columns { grid-template-columns: 1fr; }
    .marketplace-activity-columns > section + section { border-top: 1px solid #3e3e40; border-left: 0; }
}

@media (max-width: 540px) {
    .marketplace-page { gap: 12px; }
    .marketplace-hero { min-height: 0; padding: 22px 16px; border-left-width: 5px; }
    .marketplace-hero-copy h1 { font-size: 31px; }
    .marketplace-hero-copy > p { font-size: 12px; }
    .marketplace-wallet { min-height: 135px; padding: 18px; }
    .marketplace-alert { grid-template-columns: 34px minmax(0, 1fr); }
    .marketplace-alert > a { grid-column: 2; }
    .marketplace-stat-grid { grid-template-columns: 1fr; }
    .marketplace-stat-grid article, .marketplace-stat-grid article:nth-child(2) { min-height: 96px; border-right: 0; border-bottom: 1px solid #3c3c3e; }
    .marketplace-stat-grid article:last-child { border-bottom: 0; }
    .marketplace-controls { grid-template-columns: 1fr; }
    .marketplace-control-actions { grid-column: auto; display: grid; grid-template-columns: 1fr 1fr; }
    .marketplace-result-summary { align-items: flex-start; flex-direction: column; justify-content: center; gap: 2px; }
    .marketplace-listing-grid { padding: 0 9px 10px; grid-template-columns: 1fr; }
    .marketplace-listing { grid-template-rows: 140px 1fr auto; }
    .marketplace-listing:hover { transform: none; }
    .marketplace-pagination { grid-template-columns: 90px 1fr 90px; }
    .marketplace-sell-form { padding: 13px; grid-template-columns: 1fr; }
    .marketplace-item-select, .marketplace-sell-form > button { grid-column: auto; }
    .marketplace-server-note { align-items: flex-start; flex-direction: column; gap: 7px; }
    .marketplace-timeline article { grid-template-columns: 10px minmax(0, 1fr); }
    .marketplace-status { grid-column: 2; justify-self: start; }
    .marketplace-receipt-wrap { padding: 8px; overflow: visible; }
    .marketplace-receipt-table, .marketplace-receipt-table tbody, .marketplace-receipt-table tr, .marketplace-receipt-table td { width: 100%; min-width: 0; display: block; }
    .marketplace-receipt-table thead { display: none; }
    .marketplace-receipt-table tr { margin-bottom: 8px; overflow: hidden; border: 1px solid #3e3e40; border-left: 5px solid #555558; border-radius: 6px; }
    .marketplace-receipt-table td, .marketplace-receipt-table td:first-child, .marketplace-receipt-table td:last-child { min-height: 48px; height: auto; padding: 10px 12px; display: grid; grid-template-columns: 88px minmax(0, 1fr); align-items: center; gap: 10px; border: 0; border-bottom: 1px solid #39393b; border-radius: 0; text-align: right; }
    .marketplace-receipt-table td:last-child { border-bottom: 0; }
    .marketplace-receipt-table td::before { content: attr(data-label); color: #969699; font-size: 9px; font-weight: 800; letter-spacing: .09em; text-align: left; text-transform: uppercase; }
    .marketplace-receipt-table td > * { justify-self: end; }
    .marketplace-no-receipts { border-left-color: #555558 !important; }
    .marketplace-no-receipts td { min-height: 130px !important; display: flex !important; flex-direction: column; justify-content: center; border: 0 !important; }
    .marketplace-no-receipts td::before { display: none; }
}

/* Quest Journal — mirrors the compact, status-led F1 quest panel. */
.quests-page { display: grid; gap: 18px; }
.quests-hero { min-height: 282px; padding: 34px 38px; position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 310px; align-items: center; gap: 34px; overflow: hidden; border-left: 7px solid var(--cityrp-accent); background: linear-gradient(118deg, #2b2b2d 0%, #242426 58%, #1c1c1e 100%); }
.quests-hero::before { width: 410px; height: 410px; position: absolute; right: 115px; bottom: -330px; border: 54px solid rgba(200, 50, 50, .09); border-radius: 50%; content: ''; pointer-events: none; }
.quests-hero::after { position: absolute; right: 344px; bottom: -12px; color: rgba(255, 255, 255, .022); content: 'JOURNAL'; font-size: 78px; font-weight: 900; letter-spacing: -.055em; pointer-events: none; }
.quests-hero-copy, .quests-hero-progress { position: relative; z-index: 1; }
.quests-hero-copy h1 { max-width: 670px; margin: 4px 0 9px; color: #fff; font-size: clamp(35px, 5vw, 58px); line-height: .98; letter-spacing: -.045em; }
.quests-hero-copy > p { max-width: 640px; margin: 0; color: #bdbdbf; font-size: 14px; line-height: 1.65; }
.quests-hero-progress { min-height: 188px; padding: 24px; display: flex; flex-direction: column; justify-content: center; border: 1px solid #444447; border-top: 4px solid var(--cityrp-accent); border-radius: 8px; background: linear-gradient(145deg, #343436, #262628); box-shadow: 0 19px 38px rgba(0, 0, 0, .24); }
.quests-hero-progress > span { color: #aaa; font-size: 11px; font-weight: 800; letter-spacing: .13em; }
.quests-hero-progress > strong { margin: 4px 0 12px; color: #fff; font-size: 42px; line-height: 1; letter-spacing: -.035em; }
.quests-hero-progress > strong small { color: #8f8f92; font-size: 17px; }
.quests-hero-progress progress, .quest-detail-progress progress, .quest-objectives progress { width: 100%; overflow: hidden; border: 0; border-radius: 999px; appearance: none; background: #1c1c1e; }
.quests-hero-progress progress { height: 8px; }
.quests-hero-progress progress::-webkit-progress-bar, .quest-detail-progress progress::-webkit-progress-bar, .quest-objectives progress::-webkit-progress-bar { border-radius: 999px; background: #1c1c1e; }
.quests-hero-progress progress::-webkit-progress-value, .quest-detail-progress progress::-webkit-progress-value, .quest-objectives progress::-webkit-progress-value { border-radius: 999px; background: linear-gradient(90deg, var(--cityrp-accent), var(--cityrp-accent-light)); }
.quests-hero-progress progress::-moz-progress-bar, .quest-detail-progress progress::-moz-progress-bar, .quest-objectives progress::-moz-progress-bar { border-radius: 999px; background: linear-gradient(90deg, var(--cityrp-accent), var(--cityrp-accent-light)); }
.quests-hero-progress > div { margin-top: 12px; display: flex; justify-content: space-between; gap: 10px; color: #a9a9ac; font-size: 11px; font-weight: 700; }

.quests-unavailable { overflow: hidden; }
.quests-stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.quests-stat-grid article { min-height: 116px; padding: 21px; display: flex; flex-direction: column; justify-content: center; border-right: 1px solid #3c3c3e; border-top: 3px solid #555558; background: linear-gradient(155deg, #2e2e30, #28282a); }
.quests-stat-grid article:last-child { border-right: 0; }
.quests-stat-grid article.is-active { border-top-color: #65a5d5; }
.quests-stat-grid article.is-ready { border-top-color: var(--cityrp-warning); }
.quests-stat-grid article.is-complete { border-top-color: var(--cityrp-action); }
.quests-stat-grid small { color: #a5a5a8; font-size: 10px; font-weight: 800; letter-spacing: .12em; }
.quests-stat-grid strong { margin: 3px 0 2px; color: #fff; font-size: 28px; line-height: 1; }
.quests-stat-grid span { color: #aeadb0; font-size: 11px; }

.quests-controls { padding: 15px; display: grid; grid-template-columns: minmax(220px, 1fr) 180px 170px auto; align-items: end; gap: 11px; border-top: 1px solid #3e3e40; border-bottom: 1px solid #3e3e40; background: #252527; }
.quests-controls label { min-width: 0; display: grid; gap: 6px; }
.quests-controls label > span { color: #aaa; font-size: 10px; font-weight: 800; letter-spacing: .1em; }
.quests-controls input, .quests-controls select { width: 100%; height: 42px; padding: 0 12px; border: 1px solid #4b4b4e; border-radius: 5px; background: #363638; color: #fff; font-family: var(--cityrp-font); font-size: 12px; font-weight: 700; }
.quests-controls input::placeholder { color: #8f8f91; }
.quests-controls input:hover, .quests-controls select:hover { border-color: #646467; }
.quests-control-actions { display: flex; gap: 8px; }

.quests-workbench { min-height: 620px; display: grid; grid-template-columns: minmax(290px, 365px) minmax(0, 1fr); background: #202022; }
.quests-list { min-width: 0; border-right: 1px solid #424245; background: #252527; }
.quests-list > header { min-height: 55px; padding: 0 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid #3d3d40; background: #29292b; }
.quests-list > header span { color: #aaa; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.quests-list > header span strong { color: #fff; }
.quests-list > header small { overflow: hidden; color: #929295; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.quests-list-scroll { max-height: 710px; padding: 9px; overflow-y: auto; scrollbar-color: #555558 #272729; scrollbar-width: thin; }
.quest-list-card { min-height: 79px; margin-bottom: 6px; position: relative; display: grid; grid-template-columns: 4px minmax(0, 1fr) 48px; align-items: center; gap: 12px; overflow: hidden; border: 1px solid #3e3e41; border-radius: 6px; background: #2b2b2d; color: inherit; text-decoration: none; transition: border-color .16s ease, background .16s ease, transform .16s ease; }
.quest-list-card:last-child { margin-bottom: 0; }
.quest-list-card:hover { transform: translateX(2px); border-color: #5a5a5d; background: #303032; }
.quest-list-card.is-selected { border-color: #656568; background: linear-gradient(100deg, #353537, #2c2c2e); box-shadow: 0 9px 20px rgba(0, 0, 0, .17); }
.quest-list-rail { width: 4px; height: 100%; display: block; background: #656568; }
.quest-list-card.is-active .quest-list-rail { background: #65a5d5; }
.quest-list-card.is-ready .quest-list-rail { background: var(--cityrp-warning); }
.quest-list-card.is-complete .quest-list-rail { background: var(--cityrp-action); }
.quest-list-card.is-locked { opacity: .62; }
.quest-list-card.is-locked .quest-list-rail { background: #4b4b4e; }
.quest-list-card > div { min-width: 0; display: grid; gap: 2px; }
.quest-list-card > div small { overflow: hidden; color: #98989b; font-size: 9px; font-weight: 800; letter-spacing: .07em; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.quest-list-card > div strong { overflow: hidden; color: #eee; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.quest-list-card > div span { color: #b0b0b3; font-size: 10px; }
.quest-list-card.is-active > div span { color: #83b9e0; }
.quest-list-card.is-ready > div span { color: var(--cityrp-warning); }
.quest-list-card.is-complete > div span { color: var(--cityrp-action); }
.quest-list-card > em { padding-right: 11px; color: #b5b5b8; font-size: 12px; font-style: normal; font-weight: 900; text-align: right; }
.quests-list-empty, .quests-detail-empty { min-height: 190px; padding: 25px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #8e8e91; text-align: center; }
.quests-list-empty strong, .quests-detail-empty strong { color: #ddd; font-size: 13px; }
.quests-list-empty span, .quests-detail-empty span { margin-top: 4px; font-size: 10px; }

.quest-detail { min-width: 0; background: linear-gradient(145deg, #29292b, #242426); }
.quest-detail-hero { min-height: 177px; padding: 29px 31px; position: relative; display: flex; align-items: flex-start; justify-content: space-between; gap: 25px; overflow: hidden; border-bottom: 1px solid #404043; background: linear-gradient(110deg, #333335, #28282a); }
.quest-detail-hero::after { width: 190px; height: 190px; position: absolute; right: -72px; bottom: -125px; border: 27px solid rgba(255, 255, 255, .022); border-radius: 50%; content: ''; }
.quest-detail-hero::before { width: 5px; position: absolute; inset: 0 auto 0 0; background: #69696c; content: ''; }
.quest-detail-hero.is-active::before { background: #65a5d5; }
.quest-detail-hero.is-ready::before { background: var(--cityrp-warning); }
.quest-detail-hero.is-complete::before { background: var(--cityrp-action); }
.quest-detail-hero.is-locked::before { background: #4b4b4e; }
.quest-detail-hero > div { max-width: 680px; position: relative; z-index: 1; }
.quest-detail-hero > div > span { color: #a9a9ac; font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.quest-detail-hero h3 { margin: 5px 0 7px; color: #fff; font-size: clamp(22px, 3vw, 32px); line-height: 1.04; letter-spacing: -.025em; }
.quest-detail-hero p { max-width: 620px; margin: 0; color: #c0c0c3; font-size: 13px; line-height: 1.6; }
.quest-detail-hero > em { padding: 7px 9px; position: relative; z-index: 1; border: 1px solid #555558; border-radius: 5px; color: #c8c8ca; font-size: 10px; font-style: normal; font-weight: 900; white-space: nowrap; }
.quest-detail-hero.is-active > em { border-color: rgba(101, 165, 213, .35); background: rgba(101, 165, 213, .1); color: #83b9e0; }
.quest-detail-hero.is-ready > em { border-color: rgba(225, 164, 68, .35); background: rgba(225, 164, 68, .1); color: var(--cityrp-warning); }
.quest-detail-hero.is-complete > em { border-color: rgba(52, 209, 66, .33); background: rgba(52, 209, 66, .09); color: var(--cityrp-action); }
.quest-detail-hero.is-locked > em { color: #8e8e91; }

.quest-detail-progress { padding: 17px 22px; border-bottom: 1px solid #3d3d40; background: #232325; }
.quest-detail-progress > div { margin-bottom: 9px; display: flex; align-items: end; justify-content: space-between; gap: 12px; }
.quest-detail-progress > div > span { display: grid; gap: 2px; }
.quest-detail-progress small, .quest-prerequisites header > span, .quest-objectives header > span, .quest-reward > div > span { color: #a0a0a3; font-size: 10px; font-weight: 800; letter-spacing: .11em; }
.quest-detail-progress > div strong, .quest-prerequisites header > strong, .quest-objectives header > strong { color: #d7d7d9; font-size: 11px; }
.quest-detail-progress > div b { color: #fff; font-size: 19px; }
.quest-detail-progress progress { height: 7px; }
.quest-prerequisites, .quest-objectives { border-bottom: 1px solid #3d3d40; }
.quest-prerequisites > header, .quest-objectives > header { min-height: 44px; padding: 0 21px; display: flex; align-items: center; justify-content: space-between; background: #262628; }
.quest-prerequisites > div { padding: 12px 18px 16px; display: flex; flex-wrap: wrap; gap: 7px; }
.quest-prerequisites a { padding: 8px 10px; display: flex; align-items: center; gap: 7px; border: 1px solid #47474a; border-radius: 5px; background: #2d2d2f; color: #b5b5b8; font-size: 10px; font-weight: 800; text-decoration: none; }
.quest-prerequisites a:hover { border-color: #626265; color: #fff; }
.quest-prerequisites a.is-met { border-color: rgba(52, 209, 66, .25); background: rgba(52, 209, 66, .06); color: var(--cityrp-action); }
.quest-objectives > div { padding: 10px 17px 15px; display: grid; gap: 7px; }
.quest-objectives article { min-height: 68px; padding: 12px 13px; display: grid; grid-template-columns: 35px minmax(0, 1fr) minmax(85px, 23%); align-items: center; gap: 12px; border: 1px solid #3f3f42; border-radius: 6px; background: #2c2c2e; }
.quest-objectives article.is-complete { border-color: rgba(52, 209, 66, .2); background: linear-gradient(100deg, rgba(52, 209, 66, .055), #2b2b2d 24%); }
.quest-objective-index { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid #505053; border-radius: 50%; color: #aaa; font-size: 9px; font-weight: 900; }
.quest-objectives article.is-complete .quest-objective-index { border-color: rgba(52, 209, 66, .34); background: rgba(52, 209, 66, .1); color: var(--cityrp-action); }
.quest-objectives article > div { min-width: 0; display: grid; gap: 3px; }
.quest-objectives article > div strong { overflow: hidden; color: #e7e7e9; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.quest-objectives article > div small { color: #a0a0a3; font-size: 10px; }
.quest-objectives article.is-complete > div strong { color: #bfcfc1; }
.quest-objectives progress { height: 6px; }
.quest-objectives article.is-complete progress::-webkit-progress-value { background: var(--cityrp-action); }
.quest-objectives article.is-complete progress::-moz-progress-bar { background: var(--cityrp-action); }

.quest-reward { min-height: 103px; padding: 17px 21px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid #3d3d40; background: linear-gradient(110deg, rgba(225, 164, 68, .07), #28282a 47%); }
.quest-reward > div { display: grid; gap: 2px; }
.quest-reward > div strong { color: var(--cityrp-warning); font-size: 25px; line-height: 1.1; }
.quest-reward > div small { color: #aaa; font-size: 10px; }
.quest-detail-note { min-height: 66px; padding: 13px 21px; display: flex; flex-direction: column; justify-content: center; background: #212123; }
.quest-detail-note strong { color: #d2d2d4; font-size: 11px; }
.quest-detail-note span { margin-top: 2px; color: #9d9da0; font-size: 10px; line-height: 1.45; }

@media (max-width: 980px) {
    .quests-hero { grid-template-columns: minmax(0, 1fr) 260px; padding: 30px; }
    .quests-controls { grid-template-columns: minmax(200px, 1fr) 1fr 1fr; }
    .quests-control-actions { grid-column: 1 / -1; }
    .quests-workbench { grid-template-columns: minmax(260px, 320px) minmax(0, 1fr); }
    .quest-detail-hero { padding: 26px 24px; }
}

@media (max-width: 760px) {
    .quests-hero { padding: 25px 20px; grid-template-columns: 1fr; gap: 22px; }
    .quests-hero::after { display: none; }
    .quests-hero-progress { min-height: 150px; }
    .quests-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .quests-stat-grid article:nth-child(2) { border-right: 0; }
    .quests-stat-grid article:nth-child(-n+2) { border-bottom: 1px solid #3c3c3e; }
    .quests-controls { grid-template-columns: 1fr 1fr; }
    .quests-controls label:first-child { grid-column: 1 / -1; }
    .quests-workbench { display: block; }
    .quests-list { border-right: 0; border-bottom: 1px solid #424245; }
    .quests-list-scroll { max-height: 390px; }
    .quest-detail { scroll-margin-top: 74px; }
}

@media (max-width: 540px) {
    .quests-page { gap: 12px; }
    .quests-hero { min-height: 0; padding: 22px 16px; border-left-width: 5px; }
    .quests-hero-copy h1 { font-size: 31px; }
    .quests-hero-copy > p { font-size: 12px; }
    .quests-hero-progress { min-height: 135px; padding: 18px; }
    .quests-stat-grid { grid-template-columns: 1fr; }
    .quests-stat-grid article, .quests-stat-grid article:nth-child(2) { min-height: 92px; border-right: 0; border-bottom: 1px solid #3c3c3e; }
    .quests-stat-grid article:last-child { border-bottom: 0; }
    .quests-controls { grid-template-columns: 1fr; }
    .quests-controls label:first-child, .quests-control-actions { grid-column: auto; }
    .quests-control-actions { display: grid; grid-template-columns: 1fr 1fr; }
    .quests-list > header { align-items: flex-start; flex-direction: column; justify-content: center; gap: 2px; }
    .quests-list-scroll { max-height: 350px; padding: 7px; }
    .quest-list-card { grid-template-columns: 4px minmax(0, 1fr) 42px; gap: 9px; }
    .quest-detail-hero { min-height: 0; padding: 23px 18px; flex-direction: column; gap: 13px; }
    .quest-detail-progress { padding: 15px; }
    .quest-prerequisites > header, .quest-objectives > header { padding: 0 15px; }
    .quest-prerequisites > div, .quest-objectives > div { padding-right: 10px; padding-left: 10px; }
    .quest-objectives article { grid-template-columns: 31px minmax(0, 1fr); gap: 9px; }
    .quest-objectives article > progress { grid-column: 2; }
    .quest-reward { padding: 17px 15px; align-items: stretch; flex-direction: column; }
    .quest-reward .button { width: 100%; }
    .quest-detail-note { padding: 13px 15px; }
}

/* Daily Rewards — mirrors the server's dark seven-day reward window. */
.rewards-page { display: grid; gap: 18px; }
.rewards-hero { min-height: 292px; padding: 35px 38px; position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 320px; align-items: center; gap: 35px; overflow: hidden; border-left: 7px solid var(--cityrp-accent); background: linear-gradient(118deg, #2a2a2c 0%, #242426 57%, #1c1c1e 100%); }
.rewards-hero::before { width: 410px; height: 410px; position: absolute; right: 165px; bottom: -330px; border: 52px solid rgba(200, 50, 50, .09); border-radius: 50%; content: ''; pointer-events: none; }
.rewards-hero::after { position: absolute; right: 345px; bottom: -13px; color: rgba(255, 255, 255, .025); content: 'REWARDS'; font-size: 79px; font-weight: 900; letter-spacing: -.055em; pointer-events: none; }
.rewards-hero-copy, .reward-claim-card { position: relative; z-index: 1; }
.rewards-hero-copy h1 { max-width: 720px; margin: 4px 0 9px; color: #fff; font-size: clamp(34px, 5vw, 58px); line-height: .98; letter-spacing: -.045em; }
.rewards-hero-copy > p { max-width: 650px; margin: 0; color: #bdbdbf; font-size: 14px; line-height: 1.65; }
.reward-claim-card { min-height: 210px; padding: 24px; display: flex; flex-direction: column; justify-content: center; border: 1px solid #454548; border-top: 4px solid #777; border-radius: 8px; background: linear-gradient(145deg, #353537, #272729); box-shadow: 0 20px 38px rgba(0, 0, 0, .25); }
.reward-claim-card.is-ready { border-top-color: var(--cityrp-accent); box-shadow: 0 20px 38px rgba(0, 0, 0, .25), 0 0 30px rgba(200, 50, 50, .08); }
.reward-claim-card.is-waiting { border-top-color: var(--cityrp-action); }
.reward-claim-card.is-unavailable { border-top-color: #6d6d70; }
.reward-claim-state { color: #aaa; font-size: 10px; font-weight: 900; letter-spacing: .13em; }
.reward-claim-card.is-ready .reward-claim-state { color: var(--cityrp-accent-light); }
.reward-claim-card.is-waiting .reward-claim-state { color: var(--cityrp-action); }
.reward-claim-card > strong { margin-top: 5px; color: #fff; font-size: 20px; }
.reward-claim-value, .reward-countdown { margin: 2px 0; color: #fff; font-size: clamp(31px, 4vw, 43px); font-weight: 900; line-height: 1; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.reward-claim-card > small { color: #b7b7ba; font-size: 11px; }
.reward-claim-card > .button { width: 100%; margin-top: 17px; }
.reward-claim-done { margin-top: 19px; padding-top: 13px; border-top: 1px solid #49494c; color: #b9d8bc; font-size: 11px; font-weight: 800; }

.reward-cycle { overflow: hidden; }
.reward-card-grid { padding: 18px; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 9px; background: #212123; }
.reward-card { min-width: 0; min-height: 215px; padding: 13px 11px 12px; position: relative; display: flex; flex-direction: column; align-items: center; overflow: hidden; border: 1px solid #404043; border-top: 4px solid #555558; border-radius: 6px; background: linear-gradient(150deg, #303032, #29292b); text-align: center; }
.reward-card::after { width: 75px; height: 75px; position: absolute; right: -43px; bottom: -47px; border: 13px solid rgba(255, 255, 255, .022); border-radius: 50%; content: ''; }
.reward-card.is-claimed { border-color: rgba(52, 209, 66, .22); border-top-color: var(--cityrp-action); background: linear-gradient(150deg, rgba(52, 209, 66, .09), #29292b 46%); }
.reward-card.is-active { border-color: rgba(200, 50, 50, .48); border-top-color: var(--cityrp-accent); background: linear-gradient(150deg, rgba(200, 50, 50, .15), #2b292b 49%); box-shadow: 0 0 22px rgba(200, 50, 50, .11); }
.reward-card header { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 5px; }
.reward-card header > span, .reward-card header > em { font-size: 9px; font-weight: 900; letter-spacing: .09em; }
.reward-card header > span { color: #b8b8ba; }
.reward-card header > em { color: #77777a; font-style: normal; }
.reward-card.is-claimed header > em { color: var(--cityrp-action); }
.reward-card.is-active header > em { color: var(--cityrp-accent-light); }
.reward-card-visual { width: 60px; height: 60px; margin: 16px 0 11px; display: grid; place-items: center; border: 1px solid #4b4b4e; border-radius: 50%; background: #242426; color: #aaa; font-size: 27px; font-weight: 900; }
.reward-card-visual.has-image { padding: 7px; border-radius: 7px; }
.reward-card-visual img { width: 100%; height: 100%; object-fit: contain; }
.reward-card.is-claimed .reward-card-visual { border-color: rgba(52, 209, 66, .31); background: rgba(52, 209, 66, .08); color: var(--cityrp-action); }
.reward-card.is-active .reward-card-visual { border-color: rgba(200, 50, 50, .42); background: rgba(200, 50, 50, .1); color: var(--cityrp-accent-light); }
.reward-card > strong { color: #fff; font-size: 19px; line-height: 1; }
.reward-card > small { min-height: 29px; margin-top: 5px; color: #a9a9ac; font-size: 10px; line-height: 1.35; }
.reward-card > b { margin-top: auto; padding-top: 8px; color: var(--cityrp-warning); font-size: 9px; line-height: 1.25; }
.reward-week-progress { padding: 17px 20px 20px; border-top: 1px solid #3c3c3f; background: #272729; }
.reward-week-progress > div { margin-bottom: 9px; display: flex; align-items: end; justify-content: space-between; gap: 15px; }
.reward-week-progress > div > span { display: grid; gap: 2px; }
.reward-week-progress small { color: #99999c; font-size: 9px; font-weight: 900; letter-spacing: .11em; }
.reward-week-progress strong { color: #ddd; font-size: 12px; }
.reward-week-progress em { color: var(--cityrp-warning); font-size: 10px; font-style: normal; font-weight: 800; }
.reward-week-progress progress { height: 8px; }
.reward-week-progress progress::-webkit-progress-value { background: linear-gradient(90deg, var(--cityrp-accent), var(--cityrp-warning)); }
.reward-week-progress progress::-moz-progress-bar { background: linear-gradient(90deg, var(--cityrp-accent), var(--cityrp-warning)); }

.reward-stats { overflow: hidden; }
.reward-stat-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); background: #232325; }
.reward-stat-grid article { min-width: 0; min-height: 126px; padding: 20px 17px; position: relative; display: flex; flex-direction: column; justify-content: center; border-right: 1px solid #3e3e41; }
.reward-stat-grid article:last-child { border-right: 0; }
.reward-stat-grid article::before { width: 3px; position: absolute; inset: 17px auto 17px 0; border-radius: 2px; background: #606063; content: ''; }
.reward-stat-grid article.is-current::before { background: var(--cityrp-action); }
.reward-stat-grid article.is-week::before, .reward-stat-grid article.is-month::before { background: var(--cityrp-warning); }
.reward-stat-grid article.is-cash::before { background: var(--cityrp-accent); }
.reward-stat-grid small { overflow: hidden; color: #9d9da0; font-size: 9px; font-weight: 900; letter-spacing: .1em; text-overflow: ellipsis; white-space: nowrap; }
.reward-stat-grid strong { margin: 4px 0 2px; overflow: hidden; color: #fff; font-size: clamp(21px, 2.7vw, 29px); line-height: 1; text-overflow: ellipsis; white-space: nowrap; }
.reward-stat-grid span { color: #aaa; font-size: 10px; }

.reward-insight-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(360px, .85fr); gap: 18px; }
.reward-calendar, .reward-bonus { min-width: 0; overflow: hidden; }
.reward-month-grid { padding: 17px 19px 19px; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 7px; background: #232325; }
.reward-weekday { padding: 2px 0 7px; color: #8f8f92; font-size: 9px; font-weight: 900; text-align: center; text-transform: uppercase; }
.reward-calendar-blank, .reward-calendar-day { aspect-ratio: 1.25; min-height: 41px; }
.reward-calendar-day { position: relative; display: grid; place-items: center; border: 1px solid #414144; border-radius: 5px; background: #2d2d2f; color: #bdbdc0; font-size: 11px; font-weight: 800; }
.reward-calendar-day i { position: absolute; right: 4px; bottom: 2px; color: inherit; font-size: 8px; font-style: normal; }
.reward-calendar-day.is-claimed { border-color: rgba(52, 209, 66, .29); background: rgba(52, 209, 66, .09); color: #7be884; }
.reward-calendar-day.is-missed { border-color: rgba(215, 65, 65, .2); background: rgba(215, 65, 65, .055); color: #b76b6b; }
.reward-calendar-day.is-today { border-color: var(--cityrp-accent); background: rgba(200, 50, 50, .13); color: #fff; box-shadow: inset 0 0 0 1px rgba(200, 50, 50, .25); }
.reward-calendar-footer { min-height: 60px; padding: 12px 18px; display: flex; align-items: center; flex-wrap: wrap; gap: 13px; border-top: 1px solid #3c3c3f; background: #29292b; }
.reward-calendar-footer > span { display: flex; align-items: center; gap: 5px; color: #a9a9ac; font-size: 9px; }
.reward-calendar-footer i { width: 8px; height: 8px; border-radius: 2px; background: #777; }
.reward-calendar-footer i.is-claimed { background: var(--cityrp-action); }
.reward-calendar-footer i.is-missed { background: var(--cityrp-danger); }
.reward-calendar-footer i.is-today { background: var(--cityrp-accent-light); }
.reward-calendar-footer strong { margin-left: auto; color: var(--cityrp-warning); font-size: 10px; }

.reward-chance { padding: 6px 8px; border: 1px solid rgba(225, 164, 68, .32); border-radius: 5px; background: rgba(225, 164, 68, .08); color: var(--cityrp-warning); font-size: 10px; font-weight: 900; }
.reward-bonus-intro { margin: 0; padding: 15px 18px; border-bottom: 1px solid #3d3d40; background: #252527; color: #b6b6b9; font-size: 11px; line-height: 1.55; }
.reward-bonus-items { padding: 14px 16px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; background: #212123; }
.reward-bonus-items article { min-width: 0; padding: 10px 6px; display: grid; justify-items: center; gap: 7px; border: 1px solid #424245; border-radius: 6px; background: linear-gradient(145deg, rgba(225, 164, 68, .06), #2c2c2e 58%); text-align: center; }
.reward-item-image { width: 49px; height: 49px; display: grid; place-items: center; border: 1px solid #4a4a4d; border-radius: 5px; background: #242426; color: var(--cityrp-warning); font-size: 19px; font-weight: 900; }
.reward-item-image.has-image { padding: 5px; }
.reward-item-image img { width: 100%; height: 100%; object-fit: contain; }
.reward-bonus-items strong { overflow: hidden; color: #ddd; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.reward-rules { padding: 4px 16px 15px; display: grid; gap: 7px; background: #212123; }
.reward-rules article { min-height: 57px; padding: 9px 10px; display: grid; grid-template-columns: 30px minmax(0, 1fr); align-items: center; gap: 9px; border: 1px solid #3e3e41; border-radius: 5px; background: #29292b; }
.reward-rules article > span { width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid #4d4d50; border-radius: 50%; color: #99999c; font-size: 8px; font-weight: 900; }
.reward-rules strong { color: #ddd; font-size: 11px; }
.reward-rules p { margin: 2px 0 0; color: #99999c; font-size: 10px; line-height: 1.35; }

.reward-history { overflow: hidden; }
.reward-history-scroll { overflow-x: auto; }
.reward-history-table { width: 100%; border-collapse: collapse; }
.reward-history-table th { padding: 11px 14px; border-bottom: 1px solid #424245; background: #242426; color: #99999c; font-size: 9px; font-weight: 900; letter-spacing: .09em; text-align: left; text-transform: uppercase; }
.reward-history-table td { min-width: 125px; padding: 14px; border-bottom: 1px solid #3c3c3f; background: #2b2b2d; color: #c8c8cb; font-size: 11px; vertical-align: middle; }
.reward-history-table tr:nth-child(even) td { background: #29292b; }
.reward-history-table tr:last-child td { border-bottom: 0; }
.reward-history-table td:first-child { min-width: 135px; }
.reward-history-table td:nth-child(3), .reward-history-table td:nth-child(4) { min-width: 190px; }
.reward-history-table td > strong, .reward-history-table td > small { display: block; }
.reward-history-table td > strong { color: #e3e3e5; font-size: 11px; }
.reward-history-table td > small { margin-top: 2px; color: #969699; font-size: 9px; }
.reward-streak-pill { padding: 5px 7px; display: inline-block; border: 1px solid rgba(200, 50, 50, .28); border-radius: 4px; background: rgba(200, 50, 50, .08); color: var(--cityrp-accent-light); font-size: 10px; font-weight: 900; }
.reward-no-extra { color: #89898c; font-size: 10px; }
.reward-history-table .reward-total { color: var(--cityrp-action); font-size: 13px; }
.reward-history-empty { min-height: 140px; padding: 25px; display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; align-items: center; gap: 15px; background: #29292b; }
.reward-history-empty > span { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid #49494c; border-radius: 50%; color: #999; font-weight: 900; }
.reward-history-empty strong { color: #e3e3e5; font-size: 13px; }
.reward-history-empty p { margin: 3px 0 0; color: #a9a9ac; font-size: 11px; }
.reward-readonly-note { min-height: 66px; padding: 13px 18px; display: flex; flex-direction: column; justify-content: center; border-top: 1px solid #3b3b3e; background: #212123; }
.reward-readonly-note strong { color: #d2d2d4; font-size: 11px; }
.reward-readonly-note span { margin-top: 2px; color: #9d9da0; font-size: 10px; line-height: 1.45; }

@media (max-width: 1080px) {
    .reward-card-grid { grid-auto-flow: column; grid-auto-columns: minmax(145px, 1fr); grid-template-columns: none; overflow-x: auto; }
    .reward-stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .reward-stat-grid article:nth-child(3) { border-right: 0; }
    .reward-stat-grid article:nth-child(-n+3) { border-bottom: 1px solid #3e3e41; }
}

@media (max-width: 860px) {
    .rewards-hero { padding: 30px; grid-template-columns: minmax(0, 1fr) 280px; }
    .reward-insight-grid { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
    .rewards-hero { padding: 25px 20px; grid-template-columns: 1fr; gap: 22px; }
    .rewards-hero::after { display: none; }
    .reward-claim-card { min-height: 185px; }
    .reward-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .reward-stat-grid article:nth-child(3) { border-right: 1px solid #3e3e41; }
    .reward-stat-grid article:nth-child(even) { border-right: 0; }
    .reward-stat-grid article:nth-child(-n+4) { border-bottom: 1px solid #3e3e41; }
    .reward-history-table, .reward-history-table tbody, .reward-history-table tr, .reward-history-table td { display: block; }
    .reward-history-table thead { display: none; }
    .reward-history-table tbody { padding: 10px; background: #222224; }
    .reward-history-table tr { margin-bottom: 9px; overflow: hidden; border: 1px solid #414144; border-left: 4px solid var(--cityrp-accent); border-radius: 6px; }
    .reward-history-table tr:last-child { margin-bottom: 0; }
    .reward-history-table td, .reward-history-table td:first-child, .reward-history-table td:nth-child(3), .reward-history-table td:nth-child(4) { min-width: 0; padding: 9px 12px 9px 42%; position: relative; border-bottom: 1px solid #3d3d40; background: #2b2b2d; }
    .reward-history-table tr:nth-child(even) td { background: #29292b; }
    .reward-history-table td:last-child { border-bottom: 0; }
    .reward-history-table td::before { position: absolute; left: 12px; top: 10px; color: #929295; content: attr(data-label); font-size: 9px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
}

@media (max-width: 520px) {
    .rewards-page { gap: 12px; }
    .rewards-hero { min-height: 0; padding: 22px 16px; border-left-width: 5px; }
    .rewards-hero-copy h1 { font-size: 31px; }
    .rewards-hero-copy > p { font-size: 12px; }
    .reward-card-grid { padding: 11px; grid-auto-columns: minmax(140px, 72vw); }
    .reward-week-progress > div { align-items: flex-start; flex-direction: column; gap: 4px; }
    .reward-stat-grid { grid-template-columns: 1fr; }
    .reward-stat-grid article, .reward-stat-grid article:nth-child(3), .reward-stat-grid article:nth-child(even) { min-height: 93px; border-right: 0; border-bottom: 1px solid #3e3e41; }
    .reward-stat-grid article:last-child { border-bottom: 0; }
    .reward-month-grid { padding: 13px 10px 15px; gap: 4px; }
    .reward-calendar-blank, .reward-calendar-day { min-height: 35px; }
    .reward-calendar-footer { align-items: flex-start; }
    .reward-calendar-footer strong { width: 100%; margin-left: 0; }
    .reward-bonus-items { padding: 12px 10px; }
    .reward-history-table td, .reward-history-table td:first-child, .reward-history-table td:nth-child(3), .reward-history-table td:nth-child(4) { padding-left: 43%; }
    .reward-history-empty { padding: 20px 15px; grid-template-columns: 42px minmax(0, 1fr); }
    .reward-history-empty .button { grid-column: 1 / -1; width: 100%; }
}

/* Clan Hub — responsive translation of the approved /clan dashboard. */
.clans-page { display: grid; gap: 18px; }
.clans-hero { min-height: 292px; padding: 35px 38px; position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 310px; align-items: center; gap: 35px; overflow: hidden; border-left: 7px solid var(--cityrp-accent); background: linear-gradient(118deg, #2a2a2c 0%, #242426 57%, #1c1c1e 100%); }
.clans-hero::before { width: 400px; height: 400px; position: absolute; right: 170px; bottom: -330px; border: 53px solid rgba(200, 50, 50, .09); border-radius: 50%; content: ''; pointer-events: none; }
.clans-hero::after { position: absolute; right: 345px; bottom: -13px; color: rgba(255, 255, 255, .025); content: 'CLANS'; font-size: 91px; font-weight: 900; letter-spacing: -.06em; pointer-events: none; }
.clans-hero-copy, .clan-identity-card { position: relative; z-index: 1; }
.clans-hero-copy h1 { max-width: 720px; margin: 4px 0 9px; color: #fff; font-size: clamp(34px, 5vw, 58px); line-height: .98; letter-spacing: -.045em; }
.clans-hero-copy > p { max-width: 650px; margin: 0; color: #bdbdbf; font-size: 14px; line-height: 1.65; }
.clan-identity-card { min-height: 210px; padding: 22px; display: flex; flex-direction: column; justify-content: center; border: 1px solid #454548; border-top: 4px solid var(--cityrp-accent); border-radius: 8px; background: linear-gradient(145deg, #353537, #272729); box-shadow: 0 20px 38px rgba(0, 0, 0, .25); }
.clan-identity-card.is-unavailable { border-top-color: #6d6d70; }
.clan-identity-card > span { color: var(--cityrp-accent-light); font-size: 10px; font-weight: 900; letter-spacing: .13em; }
.clan-identity-card > strong { margin: 2px 0 0; overflow: hidden; color: #fff; font-size: clamp(43px, 6vw, 65px); line-height: .95; letter-spacing: -.055em; text-overflow: ellipsis; white-space: nowrap; }
.clan-identity-card h2 { margin: 10px 0 2px; color: #e4e4e6; font-size: 17px; }
.clan-identity-card p { margin: 0; color: #aaa; font-size: 11px; }

.clan-tabs { padding: 6px; display: flex; gap: 3px; overflow-x: auto; background: #242426; scrollbar-width: thin; }
.clan-tabs button { min-width: 130px; height: 42px; padding: 0 15px; position: relative; border: 0; border-radius: 5px; background: #343436; color: #bcbcbf; cursor: pointer; font-size: 11px; font-weight: 850; transition: color .18s ease, background-color .18s ease; }
.clan-tabs button::after { height: 3px; position: absolute; right: 50%; bottom: 0; left: 50%; border-radius: 2px; background: var(--cityrp-action); content: ''; transition: right .18s ease, left .18s ease; }
.clan-tabs button:hover, .clan-tabs button:focus-visible { color: #fff; background: #414144; }
.clan-tabs button.is-active { color: #fff; background: var(--cityrp-accent); }
.clan-tabs button.is-active::after { right: 10px; left: 10px; }
.clan-panels, .clan-tab-panel { min-width: 0; }
.clan-tab-panel { display: grid; gap: 18px; }
.clan-tab-panel[hidden], .clan-directory-grid > article[hidden] { display: none; }

.clan-metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: #232325; }
.clan-metric-grid article { min-width: 0; min-height: 128px; padding: 20px 18px; position: relative; display: flex; flex-direction: column; justify-content: center; border-right: 1px solid #3e3e41; }
.clan-metric-grid article:last-child { border-right: 0; }
.clan-metric-grid article::before { width: 4px; position: absolute; inset: 18px auto 18px 0; border-radius: 2px; background: #666; content: ''; }
.clan-metric-grid article.is-level::before { background: var(--cityrp-accent); }
.clan-metric-grid article.is-reputation::before { background: var(--cityrp-warning); }
.clan-metric-grid article.is-members::before { background: var(--cityrp-action); }
.clan-metric-grid article.is-treasury::before { background: #4696dc; }
.clan-metric-grid small, .clan-treasury-summary small { overflow: hidden; color: #99999c; font-size: 10px; font-weight: 900; letter-spacing: .1em; text-overflow: ellipsis; white-space: nowrap; }
.clan-metric-grid strong { margin: 4px 0 3px; overflow: hidden; color: #fff; font-size: clamp(24px, 3vw, 33px); line-height: 1; text-overflow: ellipsis; white-space: nowrap; }
.clan-metric-grid strong em { color: #999; font-size: .55em; font-style: normal; }
.clan-metric-grid article > span { color: #aaa; font-size: 10px; line-height: 1.4; }
.clan-progress-grid { padding: 16px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; border-top: 1px solid #3d3d40; background: #29292b; }
.clan-progress-grid article { min-width: 0; padding: 13px 14px; border: 1px solid #424245; border-radius: 6px; background: #2e2e30; }
.clan-progress-grid article > div { margin-bottom: 9px; display: flex; align-items: end; justify-content: space-between; gap: 10px; }
.clan-progress-grid article > div > span { min-width: 0; display: grid; gap: 2px; }
.clan-progress-grid small { color: #99999c; font-size: 9px; font-weight: 900; letter-spacing: .09em; }
.clan-progress-grid strong { overflow: hidden; color: #ddd; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.clan-progress-grid em { color: #aaa; font-size: 10px; font-style: normal; font-weight: 800; white-space: nowrap; }
.clan-progress-grid progress { height: 7px; }

.clan-operation-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.clan-operation-card { min-height: 224px; padding: 19px; position: relative; display: flex; flex-direction: column; overflow: hidden; border-top: 4px solid #626265; background: linear-gradient(145deg, #303032, #272729); }
.clan-operation-card.is-active { border-top-color: var(--cityrp-action); }
.clan-operation-card.is-warning { border-top-color: var(--cityrp-warning); }
.clan-operation-card.is-charter { border-top-color: #4696dc; }
.clan-operation-card::after { width: 110px; height: 110px; position: absolute; right: -65px; bottom: -69px; border: 18px solid rgba(255, 255, 255, .025); border-radius: 50%; content: ''; }
.clan-operation-card header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.clan-operation-card header span, .clan-operation-card header em { font-size: 9px; font-weight: 900; letter-spacing: .1em; }
.clan-operation-card header span { color: #aaa; }
.clan-operation-card header em { padding: 5px 7px; border: 1px solid #505053; border-radius: 4px; color: #aaa; font-style: normal; }
.clan-operation-card.is-active header em { border-color: rgba(52, 209, 66, .28); color: var(--cityrp-action); }
.clan-operation-card.is-warning header em { border-color: rgba(225, 164, 68, .3); color: var(--cityrp-warning); }
.clan-operation-card.is-charter header em { border-color: rgba(70, 150, 220, .35); color: #70b3ed; }
.clan-operation-card h3 { margin: 21px 0 6px; color: #fff; font-size: 19px; }
.clan-operation-card p { min-height: 47px; margin: 0; color: #aaa; font-size: 11px; line-height: 1.5; }
.clan-operation-card > div { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #d5d5d7; font-size: 10px; font-weight: 800; }
.clan-operation-card time { color: #a5a5a8; font-size: 10px; font-style: normal; }
.clan-operation-card > progress { height: 6px; margin-top: 9px; }
.clan-operation-card > .clan-operation-empty { margin-top: auto; color: #8f8f92; font-size: 10px; font-weight: 800; }

.clan-authority { min-height: 88px; padding: 15px 18px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.clan-authority > div { min-width: 0; display: flex; align-items: center; gap: 13px; }
.clan-role-mark { width: 50px; height: 50px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid rgba(200, 50, 50, .35); border-radius: 6px; background: rgba(200, 50, 50, .1); color: var(--cityrp-accent-light); font-size: 14px; font-weight: 900; text-transform: uppercase; }
.clan-authority small { color: #929295; font-size: 9px; font-weight: 900; letter-spacing: .1em; }
.clan-authority h3 { margin: 2px 0; color: #eee; font-size: 15px; }
.clan-authority p { margin: 0; color: #aaa; font-size: 10px; line-height: 1.4; }

.clan-invite-grid { padding: 14px; display: grid; gap: 8px; background: #222224; }
.clan-invite-grid article { min-height: 76px; padding: 11px 12px; display: grid; grid-template-columns: 47px minmax(0, 1fr) auto; align-items: center; gap: 12px; border: 1px solid rgba(52, 209, 66, .25); border-left: 4px solid var(--cityrp-action); border-radius: 6px; background: linear-gradient(100deg, rgba(52, 209, 66, .07), #2b2b2d 34%); }
.clan-invite-grid article > span, .clan-tag-mark { display: grid; place-items: center; border: 1px solid #4d4d50; border-radius: 5px; background: #232325; color: #fff; font-weight: 900; text-transform: uppercase; }
.clan-invite-grid article > span { width: 45px; height: 45px; color: var(--cityrp-action); font-size: 11px; }
.clan-invite-grid article > div { min-width: 0; display: grid; gap: 3px; }
.clan-invite-grid strong { color: #e9e9eb; font-size: 13px; }
.clan-invite-grid small { color: #a0a0a3; font-size: 10px; }

.clan-directory-toolbar { padding: 13px 15px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 9px; border-bottom: 1px solid #3d3d40; background: #252527; }
.clan-directory-toolbar label { grid-column: 1 / -1; color: #99999c; font-size: 9px; font-weight: 900; letter-spacing: .1em; }
.clan-directory-toolbar input { min-width: 0; height: 44px; padding: 0 13px; border: 1px solid #49494c; border-radius: 5px; outline: 0; background: #343436; color: #fff; font-size: 12px; }
.clan-directory-toolbar input:focus { border-color: var(--cityrp-accent); box-shadow: 0 0 0 3px rgba(200, 50, 50, .1); }
.clan-directory-grid { padding: 14px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; background: #222224; }
.clan-directory-grid > article { min-width: 0; min-height: 104px; padding: 13px; display: grid; grid-template-columns: 58px minmax(0, 1fr) minmax(115px, .34fr); align-items: center; gap: 12px; border: 1px solid #424245; border-left: 4px solid var(--cityrp-accent); border-radius: 6px; background: linear-gradient(105deg, rgba(200, 50, 50, .055), #2c2c2e 30%); }
.clan-tag-mark { width: 55px; height: 55px; color: var(--cityrp-accent-light); font-size: 12px; }
.clan-directory-copy { min-width: 0; }
.clan-directory-copy small { color: #99999c; font-size: 9px; font-weight: 900; letter-spacing: .1em; }
.clan-directory-copy h3 { margin: 2px 0 4px; overflow: hidden; color: #eee; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.clan-directory-copy span { color: #a5a5a8; font-size: 10px; }
.clan-directory-capacity { display: grid; gap: 8px; }
.clan-directory-capacity > span { display: flex; align-items: end; justify-content: space-between; gap: 7px; }
.clan-directory-capacity small { color: #929295; font-size: 8px; font-weight: 900; }
.clan-directory-capacity strong { color: #ddd; font-size: 10px; }
.clan-directory-capacity progress { height: 6px; }
.clan-directory-empty { min-height: 150px; grid-column: 1 / -1; place-items: center; align-content: center; color: #999; text-align: center; }
.clan-directory-empty:not([hidden]) { display: grid; }
.clan-directory-empty strong { color: #ddd; font-size: 13px; }
.clan-directory-empty span { margin-top: 3px; font-size: 10px; }

.clan-onboarding-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(340px, .9fr); gap: 18px; }
.clan-application-list { padding: 12px; display: grid; gap: 7px; background: #222224; }
.clan-application-list > article { min-height: 69px; padding: 10px 11px; display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 11px; border: 1px solid #424245; border-left: 4px solid #6c6c6f; border-radius: 5px; background: #2b2b2d; }
.clan-application-list > article.is-pending { border-left-color: var(--cityrp-warning); }
.clan-application-list > article.is-accepted { border-left-color: var(--cityrp-action); }
.clan-application-list > article.is-rejected { border-left-color: var(--cityrp-danger); }
.clan-application-list article > span { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 4px; background: #222224; color: #bbb; font-size: 10px; font-weight: 900; }
.clan-application-list article > div { min-width: 0; display: grid; gap: 3px; }
.clan-application-list strong { color: #e1e1e3; font-size: 12px; }
.clan-application-list small { overflow: hidden; color: #99999c; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.clan-application-list em { padding: 5px 7px; border: 1px solid #505053; border-radius: 4px; color: #aaa; font-size: 9px; font-style: normal; font-weight: 900; }
.clan-onboarding { display: flex; flex-direction: column; }
.clan-step-list { padding: 13px 15px 6px; display: grid; gap: 7px; background: #222224; }
.clan-step-list article { min-height: 62px; padding: 9px 10px; display: grid; grid-template-columns: 32px minmax(0, 1fr); align-items: center; gap: 10px; border: 1px solid #414144; border-radius: 5px; background: #2b2b2d; }
.clan-step-list article > span { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid rgba(200, 50, 50, .33); border-radius: 50%; color: var(--cityrp-accent-light); font-size: 8px; font-weight: 900; }
.clan-step-list strong { color: #ddd; font-size: 11px; }
.clan-step-list p { margin: 2px 0 0; color: #99999c; font-size: 10px; line-height: 1.4; }
.clan-onboarding > .button { margin: auto 15px 15px; }

.clan-treasury-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: #232325; }
.clan-treasury-summary article { min-width: 0; min-height: 112px; padding: 19px 16px; display: flex; flex-direction: column; justify-content: center; border-right: 1px solid #3e3e41; }
.clan-treasury-summary article:last-child { border-right: 0; }
.clan-treasury-summary strong { margin-top: 5px; overflow: hidden; color: #fff; font-size: clamp(18px, 2.5vw, 27px); line-height: 1.1; text-overflow: ellipsis; white-space: nowrap; }
.clan-treasury-progress { padding: 15px 17px 18px; border-top: 1px solid #3c3c3f; background: #29292b; }
.clan-treasury-progress > div { margin-bottom: 8px; display: flex; justify-content: space-between; color: #aaa; font-size: 10px; font-weight: 900; }
.clan-treasury-progress progress { height: 8px; }
.clan-table-scroll { overflow-x: auto; }
.clan-ledger-table { width: 100%; border-collapse: collapse; }
.clan-ledger-table th { padding: 11px 14px; border-bottom: 1px solid #424245; background: #242426; color: #99999c; font-size: 9px; font-weight: 900; letter-spacing: .09em; text-align: left; text-transform: uppercase; }
.clan-ledger-table td { min-width: 130px; padding: 14px; border-bottom: 1px solid #3c3c3f; background: #2b2b2d; color: #c8c8cb; font-size: 11px; vertical-align: middle; }
.clan-ledger-table tr:nth-child(even) td { background: #29292b; }
.clan-ledger-table tr:last-child td { border-bottom: 0; }
.clan-ledger-table td:nth-child(3) { min-width: 210px; }
.clan-ledger-table td > strong, .clan-ledger-table td > small { display: block; }
.clan-ledger-table td > strong { color: #e1e1e3; font-size: 11px; }
.clan-ledger-table td > strong.is-positive { color: var(--cityrp-action); font-size: 13px; }
.clan-ledger-table td > strong.is-negative { color: var(--cityrp-danger); font-size: 13px; }
.clan-ledger-table td > small { margin-top: 2px; color: #969699; font-size: 9px; }
.clan-readonly-note { min-height: 64px; padding: 13px 18px; display: flex; flex-direction: column; justify-content: center; border-top: 1px solid #3c3c3f; background: #212123; }
.clan-readonly-note strong { color: #d4d4d6; font-size: 11px; }
.clan-readonly-note span { margin-top: 2px; color: #9d9da0; font-size: 10px; line-height: 1.45; }
.clan-wide-empty { min-height: 150px; padding: 25px; display: flex; align-items: center; justify-content: center; gap: 14px; background: #29292b; text-align: left; }
.clan-wide-empty > span { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid #4a4a4d; border-radius: 50%; color: #999; font-weight: 900; }
.clan-wide-empty strong, .clan-compact-empty strong { color: #ddd; font-size: 12px; }
.clan-wide-empty p { margin: 3px 0 0; color: #99999c; font-size: 10px; }
.clan-compact-empty { min-height: 120px; padding: 20px; display: grid; place-items: center; align-content: center; color: #99999c; text-align: center; }
.clan-compact-empty span { margin-top: 3px; font-size: 10px; }

.clan-member-grid { padding: 13px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; background: #222224; }
.clan-member-grid article { min-width: 0; min-height: 83px; padding: 10px 12px; display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; align-items: center; gap: 11px; border: 1px solid #424245; border-left: 4px solid #626265; border-radius: 6px; background: #2b2b2d; }
.clan-member-grid article.is-leader { border-left-color: var(--cityrp-warning); background: linear-gradient(100deg, rgba(225, 164, 68, .06), #2b2b2d 27%); }
.clan-member-grid article.is-viewer { border-color: rgba(200, 50, 50, .38); border-left-color: var(--cityrp-accent); }
.clan-member-grid img { width: 56px; height: 56px; object-fit: cover; border: 2px solid #4c4c4f; border-radius: 50%; }
.clan-member-grid article > div { min-width: 0; display: grid; gap: 3px; }
.clan-member-grid small { color: var(--cityrp-accent-light); font-size: 9px; font-weight: 900; letter-spacing: .08em; }
.clan-member-grid strong { overflow: hidden; color: #eee; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.clan-member-grid article > div > span { color: #99999c; font-size: 10px; }
.clan-member-grid em { color: #999; font-size: 9px; font-style: normal; font-weight: 900; }
.clan-member-grid article.is-leader em { color: var(--cityrp-warning); }
.clan-review-list { padding: 12px; display: grid; gap: 7px; background: #222224; }
.clan-review-list > article { min-height: 82px; padding: 11px; display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 11px; border: 1px solid #424245; border-left: 4px solid var(--cityrp-warning); border-radius: 5px; background: #2b2b2d; }
.clan-review-list article > span { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: rgba(225, 164, 68, .1); color: var(--cityrp-warning); font-size: 10px; font-weight: 900; text-transform: uppercase; }
.clan-review-list strong { color: #e5e5e7; font-size: 12px; }
.clan-review-list p { margin: 3px 0; color: #aaa; font-size: 10px; line-height: 1.45; }
.clan-review-list small { color: #88888b; font-size: 10px; }

.clan-role-grid { padding: 13px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; background: #222224; }
.clan-role-grid > article { min-width: 0; min-height: 218px; padding: 15px; display: flex; flex-direction: column; border: 1px solid #424245; border-top: 4px solid #646467; border-radius: 6px; background: linear-gradient(145deg, #303032, #29292b); }
.clan-role-grid > article.is-leader { border-top-color: var(--cityrp-warning); }
.clan-role-grid article > header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.clan-role-grid header span, .clan-role-grid header em { color: #99999c; font-size: 9px; font-style: normal; font-weight: 900; letter-spacing: .09em; }
.clan-role-grid h3 { margin: 19px 0 10px; color: #eee; font-size: 17px; }
.clan-permission-list { display: flex; flex-wrap: wrap; gap: 5px; }
.clan-permission-list span { padding: 5px 7px; border: 1px solid rgba(52, 209, 66, .2); border-radius: 4px; background: rgba(52, 209, 66, .06); color: #8fd696; font-size: 10px; font-weight: 800; }
.clan-permission-list span.is-muted { border-color: #47474a; background: #29292b; color: #929295; }
.clan-role-grid article > footer { margin-top: auto; padding-top: 14px; color: #99999c; font-size: 10px; }

.clan-active-contract { padding: 21px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; border-bottom: 1px solid #3e3e41; background: linear-gradient(110deg, rgba(52, 209, 66, .075), #29292b 45%); }
.clan-active-contract > div:first-child span, .clan-contract-state > span { color: var(--cityrp-action); font-size: 9px; font-weight: 900; letter-spacing: .1em; }
.clan-active-contract h3, .clan-contract-state h3 { margin: 4px 0; color: #eee; font-size: 19px; }
.clan-active-contract p, .clan-contract-state p { margin: 0; color: #aaa; font-size: 11px; }
.clan-active-contract > div:nth-child(2) { display: grid; align-content: center; justify-items: end; gap: 4px; }
.clan-active-contract > div:nth-child(2) strong { color: #fff; font-size: 20px; }
.clan-active-contract time { color: #aaa; font-size: 10px; }
.clan-active-contract progress { height: 7px; grid-column: 1 / -1; }
.clan-contract-state { padding: 23px 21px; border-bottom: 1px solid #3e3e41; background: #29292b; }
.clan-contract-state.is-cooldown > span { color: var(--cityrp-warning); }
.clan-contract-grid { padding: 13px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; background: #222224; }
.clan-contract-grid article { min-width: 0; min-height: 201px; padding: 15px; display: flex; flex-direction: column; border: 1px solid #424245; border-top: 4px solid #606063; border-radius: 6px; background: #2b2b2d; }
.clan-contract-grid article.is-selected { border-color: rgba(52, 209, 66, .27); border-top-color: var(--cityrp-action); }
.clan-contract-grid header { display: flex; justify-content: space-between; gap: 7px; color: #99999c; font-size: 9px; font-weight: 900; }
.clan-contract-grid header em { color: var(--cityrp-warning); font-style: normal; }
.clan-contract-grid h3 { margin: 19px 0 6px; color: #eee; font-size: 16px; }
.clan-contract-grid p { margin: 0; color: #aaa; font-size: 11px; line-height: 1.5; }
.clan-contract-grid article > div { margin-top: auto; padding-top: 13px; display: grid; gap: 2px; }
.clan-contract-grid article > div span { color: #929295; font-size: 8px; font-weight: 900; }
.clan-contract-grid article > div strong { color: #ddd; font-size: 11px; }

.clan-network-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(360px, .9fr); gap: 18px; }
.clan-relation-list { padding: 12px; display: grid; gap: 7px; background: #222224; }
.clan-relation-list > article { min-height: 69px; padding: 10px 11px; display: grid; grid-template-columns: 45px minmax(0, 1fr) auto; align-items: center; gap: 11px; border: 1px solid #424245; border-left: 4px solid var(--cityrp-warning); border-radius: 5px; background: #2b2b2d; }
.clan-relation-list > article.is-allied { border-left-color: var(--cityrp-action); }
.clan-relation-list article > span { width: 43px; height: 43px; display: grid; place-items: center; border-radius: 5px; background: #222224; color: #bbb; font-size: 10px; font-weight: 900; }
.clan-relation-list article > div { min-width: 0; display: grid; gap: 3px; }
.clan-relation-list strong { color: #e1e1e3; font-size: 12px; }
.clan-relation-list small { color: #99999c; font-size: 10px; }
.clan-relation-list em { color: var(--cityrp-warning); font-size: 9px; font-style: normal; font-weight: 900; }
.clan-relation-list article.is-allied em { color: var(--cityrp-action); }
.clan-score-versus { min-height: 180px; padding: 22px; display: grid; grid-template-columns: 1fr auto 1fr; place-items: center; gap: 14px; background: #222224; }
.clan-score-versus article { display: grid; justify-items: center; gap: 6px; }
.clan-score-versus small { color: #aaa; font-size: 10px; font-weight: 900; }
.clan-score-versus strong { color: #fff; font-size: clamp(32px, 5vw, 48px); line-height: 1; }
.clan-score-versus > span { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: var(--cityrp-accent); color: #fff; font-size: 11px; font-weight: 900; }
.clan-challenge-progress { padding: 14px 17px 17px; display: grid; grid-template-columns: 1fr auto; gap: 8px; border-top: 1px solid #3d3d40; background: #29292b; color: #aaa; font-size: 10px; }
.clan-challenge-progress progress { height: 7px; grid-column: 1 / -1; }
.clan-challenge-empty { min-height: 255px; padding: 26px; display: flex; flex-direction: column; align-items: center; justify-content: center; background: #222224; text-align: center; }
.clan-challenge-empty > span { width: 49px; height: 49px; display: grid; place-items: center; border: 1px solid #4c4c4f; border-radius: 50%; color: #999; font-size: 10px; font-weight: 900; }
.clan-challenge-empty h3 { margin: 12px 0 5px; color: #e3e3e5; font-size: 16px; }
.clan-challenge-empty p { max-width: 340px; margin: 0; color: #99999c; font-size: 10px; line-height: 1.5; }
.clan-objectives > div { padding: 12px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; background: #222224; }
.clan-objectives article { min-width: 0; min-height: 83px; padding: 11px; display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: 10px; border: 1px solid #424245; border-radius: 5px; background: #2b2b2d; }
.clan-objectives article > span { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: rgba(200, 50, 50, .09); color: var(--cityrp-accent-light); font-size: 9px; font-weight: 900; }
.clan-objectives article > div { min-width: 0; }
.clan-objectives strong { color: #e1e1e3; font-size: 11px; }
.clan-objectives p { margin: 2px 0 0; color: #99999c; font-size: 10px; line-height: 1.4; }
.clan-objectives em { color: var(--cityrp-warning); font-size: 10px; font-style: normal; font-weight: 900; white-space: nowrap; }

.clan-charter-intro { padding: 16px 18px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid #3d3d40; background: #29292b; }
.clan-charter-intro strong { color: #e3e3e5; font-size: 12px; }
.clan-charter-intro p { margin: 3px 0 0; color: #aaa; font-size: 10px; }
.clan-charter-intro > span { padding: 6px 8px; border: 1px solid #505053; border-radius: 4px; color: #99999c; font-size: 9px; font-weight: 900; white-space: nowrap; }
.clan-charter-grid { padding: 13px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; background: #222224; }
.clan-charter-grid article { min-width: 0; min-height: 220px; padding: 15px; display: flex; flex-direction: column; border: 1px solid #424245; border-top: 4px solid #4696dc; border-radius: 6px; background: linear-gradient(145deg, rgba(70, 150, 220, .06), #2b2b2d 45%); }
.clan-charter-grid article.is-active { border-color: rgba(52, 209, 66, .25); border-top-color: var(--cityrp-action); }
.clan-charter-grid header { display: flex; justify-content: space-between; gap: 8px; color: #99999c; font-size: 9px; font-weight: 900; }
.clan-charter-grid header em { color: #70b3ed; font-style: normal; }
.clan-charter-grid article.is-active header em { color: var(--cityrp-action); }
.clan-charter-grid h3 { margin: 22px 0 6px; color: #eee; font-size: 17px; }
.clan-charter-grid p { margin: 0; color: #aaa; font-size: 10px; line-height: 1.5; }
.clan-charter-state { margin-top: auto; padding-top: 14px; display: grid; gap: 3px; border-top: 1px solid #414144; }
.clan-charter-state strong { color: #ddd; font-size: 12px; }
.clan-charter-state span, .clan-charter-state time { color: #99999c; font-size: 10px; }

@media (max-width: 1050px) {
    .clan-directory-grid { grid-template-columns: 1fr; }
    .clan-operation-grid { gap: 10px; }
    .clan-role-grid, .clan-contract-grid, .clan-charter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .clan-objectives > div { grid-template-columns: 1fr; }
}

@media (max-width: 850px) {
    .clans-hero { padding: 30px; grid-template-columns: minmax(0, 1fr) 275px; }
    .clan-metric-grid, .clan-treasury-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .clan-metric-grid article:nth-child(2), .clan-treasury-summary article:nth-child(2) { border-right: 0; }
    .clan-metric-grid article:nth-child(-n+2), .clan-treasury-summary article:nth-child(-n+2) { border-bottom: 1px solid #3e3e41; }
    .clan-progress-grid { grid-template-columns: 1fr; }
    .clan-operation-grid { grid-template-columns: 1fr; }
    .clan-operation-card { min-height: 205px; }
    .clan-onboarding-grid, .clan-network-grid { grid-template-columns: 1fr; }
    .clan-member-grid { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
    .clans-hero { padding: 25px 20px; grid-template-columns: 1fr; gap: 22px; }
    .clans-hero::after { display: none; }
    .clan-identity-card { min-height: 180px; }
    .clan-directory-toolbar { grid-template-columns: 1fr; }
    .clan-directory-toolbar label { grid-column: auto; }
    .clan-directory-grid > article { grid-template-columns: 55px minmax(0, 1fr); }
    .clan-directory-capacity { grid-column: 1 / -1; }
    .clan-role-grid, .clan-contract-grid, .clan-charter-grid { grid-template-columns: 1fr; }
    .clan-ledger-table, .clan-ledger-table tbody, .clan-ledger-table tr, .clan-ledger-table td { display: block; }
    .clan-ledger-table thead { display: none; }
    .clan-ledger-table tbody { padding: 10px; background: #222224; }
    .clan-ledger-table tr { margin-bottom: 9px; overflow: hidden; border: 1px solid #414144; border-left: 4px solid #4696dc; border-radius: 6px; }
    .clan-ledger-table tr:last-child { margin-bottom: 0; }
    .clan-ledger-table td, .clan-ledger-table td:nth-child(3) { min-width: 0; padding: 9px 12px 9px 42%; position: relative; border-bottom: 1px solid #3d3d40; background: #2b2b2d; }
    .clan-ledger-table tr:nth-child(even) td { background: #29292b; }
    .clan-ledger-table td:last-child { border-bottom: 0; }
    .clan-ledger-table td::before { position: absolute; left: 12px; top: 10px; color: #929295; content: attr(data-label); font-size: 9px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
    .clan-active-contract { grid-template-columns: 1fr; }
    .clan-active-contract > div:nth-child(2) { justify-items: start; }
    .clan-score-versus { min-height: 155px; }
}

@media (max-width: 520px) {
    .clans-page { gap: 12px; }
    .clans-hero { min-height: 0; padding: 22px 16px; border-left-width: 5px; }
    .clans-hero-copy h1 { font-size: 31px; }
    .clans-hero-copy > p { font-size: 12px; }
    .clan-tabs button { min-width: 112px; }
    .clan-metric-grid, .clan-treasury-summary { grid-template-columns: 1fr; }
    .clan-metric-grid article, .clan-metric-grid article:nth-child(2), .clan-treasury-summary article, .clan-treasury-summary article:nth-child(2) { min-height: 95px; border-right: 0; border-bottom: 1px solid #3e3e41; }
    .clan-metric-grid article:last-child, .clan-treasury-summary article:last-child { border-bottom: 0; }
    .clan-authority { align-items: stretch; flex-direction: column; }
    .clan-authority .button { width: 100%; }
    .clan-invite-grid article { grid-template-columns: 45px minmax(0, 1fr); }
    .clan-invite-grid article .button { grid-column: 1 / -1; width: 100%; }
    .clan-directory-grid { padding: 9px; }
    .clan-directory-grid > article { padding: 10px; }
    .clan-application-list > article { grid-template-columns: 42px minmax(0, 1fr); }
    .clan-application-list article > em { grid-column: 2; justify-self: start; }
    .clan-member-grid article { grid-template-columns: 53px minmax(0, 1fr); }
    .clan-member-grid img { width: 51px; height: 51px; }
    .clan-member-grid article > em { grid-column: 2; }
    .clan-charter-intro { align-items: flex-start; flex-direction: column; }
    .clan-objectives article { grid-template-columns: 40px minmax(0, 1fr); }
    .clan-objectives article > em { grid-column: 2; }
    .clan-ledger-table td, .clan-ledger-table td:nth-child(3) { padding-left: 44%; }
}

/* Unified web typography — keep this after every module and breakpoint. */
.breadcrumb,
.button,
.nav-login,
.farming-tabs button,
.clan-tabs button {
    font-size: var(--cityrp-type-detail);
}

.page-shell :is(input, select, textarea) {
    font-size: var(--cityrp-type-control);
}

:is(
    .leaderboard-table,
    .records-table,
    .economy-table,
    .marketplace-receipt-table,
    .reward-history-table,
    .clan-ledger-table
) th,
:is(
    .leaderboard-table,
    .records-table,
    .economy-table,
    .marketplace-receipt-table,
    .reward-history-table,
    .clan-ledger-table
) td::before {
    font-size: var(--cityrp-type-meta);
}

:is(
    .leaderboard-table,
    .records-table,
    .economy-table,
    .marketplace-receipt-table,
    .reward-history-table,
    .clan-ledger-table
) td {
    font-size: var(--cityrp-type-detail);
    line-height: 1.5;
}

/* Shared shell, Dashboard, Profile and Login. */
.masthead-status strong,
.panel-header > p,
.identity-head span,
.identity-card dd,
.metric-grid article div span,
.connection-note p,
.module-card p,
.module-action,
.profile-identity > p,
.profile-detail-list dd,
.profile-empty-content p,
.benefit-list p {
    font-size: var(--cityrp-type-detail);
}

.inventory-item-image.is-placeholder span,
.economy-reason-list article > span,
.benefit-list article > span {
    font-size: var(--cityrp-type-meta);
}

.panel-header > p,
.profile-identity > p {
    font-size: var(--cityrp-type-body);
}

/* Inventory. */
.inventory-capacity > small,
.inventory-stat-grid span,
.inventory-result-summary,
.inventory-item-copy span,
.inventory-item-warning,
.inventory-readonly-note {
    font-size: var(--cityrp-type-detail);
}

/* Farming Journal. */
.farmer-title-card p,
.farming-metric-grid article div span,
.farming-next-card > p,
.farming-complete-state p,
.farming-detail-list dt,
.farming-detail-list dd,
.farming-rule-grid p,
.crop-rules > span,
.crop-stat-grid dd,
.journal-progress-summary > div,
.challenge-copy p,
.order-hero p,
.order-runtime-note p,
.order-workflow p,
.order-rate-list dd {
    font-size: var(--cityrp-type-detail);
}

/* Leaderboards, Moderation Records and Economy Activity. */
.leaderboard-rank-card > p,
.leaderboard-summary,
.leaderboard-citizen strong,
.leaderboard-empty p,
.leaderboard-pagination > a,
.leaderboard-pagination > span,
.leaderboard-pagination > div a,
.records-overview > p,
.record-identity,
.record-reason,
.record-revocation,
.record-staff,
.records-table time,
.records-table td[data-label="Staff"] > span,
.economy-balance-card > small,
.economy-stat-grid em,
.economy-reason-list small,
.economy-community-grid span,
.economy-community > footer,
.economy-readonly-note {
    font-size: var(--cityrp-type-detail);
}

.leaderboard-citizen strong {
    font-size: var(--cityrp-type-body);
}

.economy-chart-days {
    font-size: var(--cityrp-type-support);
}

/* Marketplace. */
.marketplace-listing-image small,
.marketplace-listing-owner,
.marketplace-server-note > span,
.marketplace-timeline article > div small,
.marketplace-status,
.marketplace-receipt-table td > small,
.marketplace-trade-kind,
.marketplace-receipt-table td::before {
    font-size: var(--cityrp-type-meta);
}

.marketplace-live-state,
.marketplace-stat-grid span,
.marketplace-listing-numbers span,
.marketplace-timeline article > div small,
.marketplace-receipt-table td > small {
    font-size: var(--cityrp-type-support);
}

.marketplace-wallet > small,
.marketplace-alert p,
.marketplace-alert > a,
.marketplace-result-summary,
.marketplace-empty p,
.marketplace-pagination a,
.marketplace-pagination span,
.marketplace-pagination strong,
.marketplace-server-note p,
.marketplace-timeline article > div span,
.marketplace-mini-empty,
.marketplace-no-receipts span {
    font-size: var(--cityrp-type-detail);
}

/* Quest Journal. */
.quest-list-card > div small,
.quest-detail-hero > div > span,
.quest-detail-hero > em,
.quest-detail-progress small,
.quest-prerequisites header > span,
.quest-objectives header > span,
.quest-reward > div > span,
.quest-objective-index {
    font-size: var(--cityrp-type-meta);
}

.quests-hero-progress > span,
.quests-hero-progress > div,
.quests-stat-grid span,
.quests-list > header span,
.quests-list > header small {
    font-size: var(--cityrp-type-support);
}

.quest-list-card > div span,
.quests-list-empty span,
.quests-detail-empty span,
.quest-detail-progress > div strong,
.quest-prerequisites header > strong,
.quest-objectives header > strong,
.quest-prerequisites a,
.quest-objectives article > div small,
.quest-reward > div small,
.quest-detail-note strong,
.quest-detail-note span {
    font-size: var(--cityrp-type-detail);
}

.quest-objectives article > div strong {
    font-size: var(--cityrp-type-body);
}

.quest-list-card.is-locked {
    opacity: .72;
}

/* Daily Rewards. */
.reward-card header > span,
.reward-card header > em,
.reward-card > b,
.reward-week-progress small,
.reward-stat-grid small,
.reward-weekday,
.reward-calendar-day i,
.reward-rules article > span,
.reward-history-table td > small,
.reward-history-table td::before {
    font-size: var(--cityrp-type-meta);
}

.reward-card > small,
.reward-stat-grid span,
.reward-calendar-footer > span,
.reward-calendar-footer strong,
.reward-history-table td > small {
    font-size: var(--cityrp-type-support);
}

.reward-claim-card > small,
.reward-claim-done,
.reward-calendar-day,
.reward-bonus-intro,
.reward-bonus-items strong,
.reward-rules strong,
.reward-rules p,
.reward-history-table td > strong,
.reward-history-empty p,
.reward-readonly-note strong,
.reward-readonly-note span {
    font-size: var(--cityrp-type-detail);
}

/* Clan Hub. */
.clans-page small,
.clans-page em,
.clan-directory-toolbar label,
.clan-operation-card header span,
.clan-active-contract > div:first-child span,
.clan-contract-state > span,
.clan-contract-grid header,
.clan-contract-grid article > div span,
.clan-step-list article > span,
.clan-role-grid header span,
.clan-objectives article > span,
.clan-charter-intro > span,
.clan-charter-grid header,
.clan-ledger-table td::before {
    font-size: var(--cityrp-type-meta);
}

.clan-operation-card > div,
.clan-operation-card time,
.clan-invite-grid small,
.clan-directory-copy span,
.clan-application-list small,
.clan-member-grid article > div > span,
.clan-review-list small,
.clan-permission-list span,
.clan-role-grid article > footer,
.clan-active-contract time,
.clan-relation-list small,
.clan-charter-state span,
.clan-charter-state time {
    font-size: var(--cityrp-type-support);
}

.clan-identity-card p,
.clan-metric-grid article > span,
.clan-progress-grid strong,
.clan-operation-card p,
.clan-authority p,
.clan-directory-capacity strong,
.clan-step-list strong,
.clan-step-list p,
.clan-ledger-table td > strong,
.clan-readonly-note strong,
.clan-readonly-note span,
.clan-wide-empty p,
.clan-compact-empty span,
.clan-directory-empty span,
.clan-review-list p,
.clan-active-contract p,
.clan-contract-state p,
.clan-contract-grid p,
.clan-contract-grid article > div strong,
.clan-challenge-progress,
.clan-challenge-empty p,
.clan-objectives strong,
.clan-objectives p,
.clan-charter-intro p,
.clan-charter-grid p {
    font-size: var(--cityrp-type-detail);
}

/* The footer follows the same readable forum-derived scale. */
.footer-kicker,
.footer-meta {
    font-size: var(--cityrp-type-support);
}

.footer-navigation > strong,
.footer-community p {
    font-size: var(--cityrp-type-detail);
}

.footer-links a {
    font-size: var(--cityrp-type-body);
}

@media (max-width: 760px) {
    .page-shell :is(
        input:not([type="checkbox"]):not([type="radio"]),
        select,
        textarea
    ) {
        font-size: 16px;
    }
}
