:root {
    color-scheme: dark;
    --body: #0c1017;
    --panel: #141b25;
    --panel-raised: #1b2430;
    --line: #303b4d;
    --text: #f0f3f7;
    --muted: #aeb9c9;
    --accent: #ffc475;
    --accent-deep: #df8d40;
    --success: #91dfbb;
    --danger: #ffacae;
    --radius: 16px;
    --shell: 1136px;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    min-width: 280px;
    color: var(--text);
    background: var(--body);
    line-height: 1.55;
}
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.15; }
h2 { font-size: clamp(1.65rem, 3vw, 2.42rem); letter-spacing: -.026em; }
h3 { font-size: 1.18rem; }
a { color: inherit; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .62; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
section[id] { scroll-margin-top: 1.2rem; }

.shell { width: min(var(--shell), calc(100% - 52px)); margin-inline: auto; }
.skip {
    position: fixed;
    z-index: 5;
    margin: 10px;
    padding: 9px 14px;
    transform: translateY(-160%);
    color: var(--body);
    background: var(--accent);
}
.skip:focus { transform: none; }
.site-header { border-bottom: 1px solid #283240; background: #10161e; }
.header-inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    grid-template-areas: 'brand nav language';
    align-items: center;
    min-height: 72px;
    gap: 20px;
}
.brand {
    grid-area: brand;
    display: inline-flex;
    gap: 11px;
    align-items: center;
    justify-self: start;
    color: var(--text);
    text-decoration: none;
}
.brand-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    position: relative;
    border: 1px solid #a2673a;
    background: linear-gradient(145deg, #422c22, #241c1f);
    border-radius: 10px;
    color: var(--accent);
    font-size: 1.16rem;
    font-weight: 800;
    letter-spacing: -.08em;
    padding-right: 6px;
}
.brand-mark span { position: absolute; top: 7px; right: 6px; font-size: .62rem; }
.brand-name { min-width: 0; font-weight: 800; font-size: .93rem; line-height: 1.1; white-space: nowrap; }
.brand-name small {
    display: block;
    margin-top: 4px;
    color: var(--accent);
    font-size: .65rem;
    letter-spacing: .15em;
}
.site-header nav {
    grid-area: nav;
    display: flex;
    gap: clamp(12px, 3vw, 34px);
    align-items: center;
    white-space: nowrap;
}
.site-header nav a { font-size: .94rem; font-weight: 620; color: var(--muted); text-decoration: none; }
.site-header nav a:hover { color: var(--accent); }
.languages {
    grid-area: language;
    display: flex;
    gap: 4px;
    padding: 4px;
    justify-self: end;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: #0c121a;
}
.languages button {
    min-width: 42px;
    min-height: 34px;
    border: 0;
    border-radius: 6px;
    color: var(--muted);
    background: transparent;
    font-weight: 760;
    font-size: .76rem;
    letter-spacing: .03em;
}
.languages button[aria-pressed='true'] { color: #251a10; background: var(--accent); }

.hero {
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-columns: 1.32fr 1fr;
    align-items: center;
    gap: clamp(26px, 6vw, 76px);
    margin-top: 34px;
    padding: clamp(28px, 5.3vw, 62px);
    border: 1px solid #3e3a39;
    border-radius: 23px;
    background:
        radial-gradient(ellipse at top left, #593821a3 0, transparent 62%),
        linear-gradient(115deg, #201a1b, #121922 61%);
}
.hero::before {
    position: absolute;
    z-index: -1;
    inset: 0;
    border-radius: inherit;
    background: repeating-linear-gradient(127deg, transparent 0 41px, #ffe1b308 41px 42px);
    content: '';
    pointer-events: none;
}
.hero-copy { min-width: 0; }
.hero h1 {
    font-size: clamp(2.38rem, 5.7vw, 5.08rem);
    letter-spacing: -.057em;
    font-weight: 825;
    line-height: .99;
    margin-block: 22px 18px;
}
.hero h1 span { display: block; }
.hero h1 .accent { color: var(--accent); }
.hero-copy > p { max-width: 390px; color: #d0d7e1; font-size: clamp(1rem, 1.45vw, 1.14rem); }
.status-tag {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    color: #ffdcad;
    background: #3a2920;
    border: 1px solid #785436;
    border-radius: 999px;
    padding: 5px 12px;
    font-size: .76rem;
    font-weight: 720;
}
.status-tag > span:first-child { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.hero-actions, .form-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}
.hero-actions { margin-top: 26px; }
.button {
    display: inline-flex;
    gap: 9px;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 9px 15px;
    border: 1px solid transparent;
    border-radius: 10px;
    color: var(--text);
    text-align: center;
    text-decoration: none;
    font-weight: 710;
    line-height: 1.24;
}
.button.primary {
    border-color: #f3ad61;
    background: linear-gradient(135deg, #ffcf8c, #f4a955);
    color: #231607;
}
.button.primary:hover:not(:disabled) { background: #ffcf8c; }
.button.subtle { background: #1b2431; border-color: #3a475b; }
.button.subtle:hover:not(:disabled) { border-color: #8796aa; background: #253145; }
.icon-arrow { color: #553618; }

.server-card, .card, .metric {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}
.server-card {
    padding: clamp(18px, 3vw, 25px);
    background: #131b25ef;
    box-shadow: 0 12px 38px #0003;
}
.server-card h2 { font-size: clamp(1.18rem, 2.3vw, 1.57rem); margin-top: 3px; }
.card-label { color: var(--muted); font-size: .8rem; font-weight: 660; }
.budget-total {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 9px;
    margin-top: 18px;
    font-variant-numeric: tabular-nums;
}
.budget-total strong { color: var(--accent); font-size: clamp(1.68rem, 3vw, 2.19rem); letter-spacing: -.04em; }
.budget-total span { color: var(--muted); font-size: .93rem; }
progress {
    appearance: none;
    display: block;
    width: 100%;
    height: 7px;
    margin-block: 10px 7px;
    border: 0;
    background: #253244;
    border-radius: 999px;
    overflow: hidden;
}
progress::-webkit-progress-bar { background: #253244; }
progress::-webkit-progress-value { background: linear-gradient(90deg, var(--accent-deep), var(--accent)); border-radius: 999px; }
progress::-moz-progress-bar { background: var(--accent); border-radius: 999px; }
.muted, .section-heading p, .section-copy p { color: var(--muted); }
.server-card > .muted { font-size: .83rem; }
.test-note {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    border-top: 1px solid var(--line);
    margin-top: 17px;
    padding-top: 14px;
    color: #e0c7ab;
    font-size: .85rem;
}
.note-mark {
    display: grid;
    place-items: center;
    width: 17px;
    height: 17px;
    flex: none;
    border: 1px solid #af8057;
    border-radius: 50%;
    color: var(--accent);
    font-weight: 760;
    line-height: 1;
}

.section { margin-top: clamp(48px, 7vw, 78px); }
.cabinet-locked main > section:not(#cabinet), .cabinet-locked .site-header nav { display: none; }
.cabinet-locked #cabinet { max-width: 590px; margin-inline: auto; }
.section-heading { margin-bottom: 18px; }
.section-heading p { margin-top: 7px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.metric { display: flex; flex-direction: column; gap: 8px; padding: 15px 17px; }
.metric span, .profile-facts span { color: var(--muted); font-size: .88rem; font-weight: 560; }
.metric strong {
    margin-top: auto;
    font-variant-numeric: tabular-nums;
    font-size: clamp(1.25rem, 2.7vw, 1.94rem);
    letter-spacing: -.025em;
    overflow-wrap: anywhere;
}
.split-section { display: grid; grid-template-columns: .36fr .64fr; gap: clamp(20px, 4vw, 49px); }
.section-copy p { margin-top: 12px; }
.order-card, .auth-card { padding: clamp(15px, 2.5vw, 24px); }
.order-card fieldset { min-width: 0; padding: 0; border: 0; margin: 0; }
.order-card legend { font-weight: 740; margin-bottom: 11px; }
.package-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.package-grid input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    clip-path: inset(50%);
}
.package-grid label {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 3px;
    padding: 9px 4px;
    border: 1px solid var(--line);
    border-radius: 10px;
    text-align: center;
    background: #101722;
    cursor: pointer;
}
.package-grid label:hover { border-color: #8b684b; }
.package-grid label strong { font-size: 1rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.package-grid label small { color: var(--muted); font-size: .76rem; }
.package-grid input:checked + label { background: #38291f; border-color: #d49c65; color: #ffd29d; }
.package-grid input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }
.order-bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    justify-content: space-between;
    gap: 11px;
    padding-top: 14px;
    margin-top: 15px;
    border-top: 1px solid var(--line);
}
.order-bottom > p { display: flex; flex-direction: column; }
.order-bottom strong { font-variant-numeric: tabular-nums; font-size: 1.10rem; }
.status { color: var(--muted); font-size: .9rem; }
.status:not(:empty) { margin-block: 10px; }
.status[data-variant='error'] { color: var(--danger); }
.status[data-variant='success'] { color: var(--success); }
.order-card .status:not(:empty), .auth-card .status:not(:empty) { margin-bottom: 0; }

.leaderboard { padding: 0 18px; }
.leaderboard-head, .rank-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) max-content;
    gap: 12px;
    align-items: center;
}
.leaderboard-head { padding-block: 12px; color: var(--muted); border-bottom: 1px solid var(--line); font-size: .8rem; }
.leaderboard ol { list-style: none; padding: 0; margin: 0; }
.rank-row { min-height: 64px; }
.rank-row + .rank-row { border-top: 1px solid #293443; }
.rank-player { display: flex; min-width: 0; align-items: center; gap: 10px; }
.rank-player > strong { overflow-wrap: anywhere; }
.rank { min-width: 2ch; font-variant-numeric: tabular-nums; color: var(--muted); text-align: center; }
.rank-row:first-child .rank, .rank-amount { color: var(--accent); }
.rank-amount { font-variant-numeric: tabular-nums; text-align: right; }
.avatar {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    flex: none;
    overflow: hidden;
    border: 1px solid #5d4a3e;
    border-radius: 11px;
    background: #302624;
    color: var(--accent);
    font-size: .85rem;
    font-weight: 750;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }

.auth-card { max-width: 570px; }
.auth-card h3 { margin-bottom: 15px; }
.auth-card form { display: flex; align-items: flex-start; flex-direction: column; gap: 9px; }
.auth-card label { font-size: .91rem; font-weight: 650; }
.auth-card input {
    width: 100%;
    min-height: 46px;
    padding: 9px 11px;
    border: 1px solid #506078;
    border-radius: 8px;
    color: var(--text);
    background: #0e1620;
}
.auth-card input[type='text'] { font-variant-numeric: tabular-nums; letter-spacing: .14em; }
#auth-destination { overflow-wrap: anywhere; }
.profile-card { padding: clamp(16px, 2.7vw, 24px); }
.profile-main { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.profile-main .avatar { width: 57px; height: 57px; font-size: 1rem; }
.profile-info { min-width: 0; flex: 1 0 160px; }
.profile-info p { margin-top: 4px; overflow-wrap: anywhere; }
.profile-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 15px;
}
.profile-facts > div {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px;
    background: #101721;
    border: 1px solid #2f3b4c;
    border-radius: 10px;
}
.profile-facts strong { font-size: 1.04rem; overflow-wrap: anywhere; }
#profile-priority { font-variant-numeric: tabular-nums; }
#profile-priority-date { line-height: 1.35; }
.leaderboard-setting {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    border-top: 1px solid var(--line);
    padding-top: 15px;
    margin-top: 15px;
}
.leaderboard-setting input { accent-color: var(--accent); width: 19px; height: 19px; margin: 3px 0 0; flex: none; }
.leaderboard-setting strong, .leaderboard-setting small { display: block; }
.leaderboard-setting small { color: var(--muted); }
.orders-heading, .operator-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 9px 14px;
    flex-wrap: wrap;
}
.orders-heading { margin-block: 19px 10px; }
.orders-heading .button, .operator-heading .button { min-height: 38px; font-size: .88rem; flex: none; }
.orders-list { display: grid; gap: 8px; }
.order-row {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(79px, .7fr) minmax(104px, .7fr) auto;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 12px 15px;
}
.order-row p { min-width: 0; }
.order-row p strong, .order-row p small { display: block; overflow-wrap: anywhere; }
.order-row p small { color: var(--muted); font-size: .8rem; }
.order-state {
    display: inline-block;
    justify-self: start;
    border: 1px solid #675231;
    border-radius: 7px;
    padding: 3px 8px;
    color: var(--accent);
    background: #3a2d20;
    font-size: .78rem;
    font-weight: 670;
}
.order-state.confirmed { color: var(--success); background: #1d3230; border-color: #325952; }
.order-row .button { min-height: 40px; font-size: .85rem; }

.site-footer { margin-top: 68px; border-top: 1px solid #263140; color: var(--muted); font-size: .88rem; }
.footer-inner { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 7px 19px; padding-block: 18px; }
.footer-inner > span:first-child { color: var(--text); font-weight: 640; }
dialog {
    width: min(430px, calc(100% - 28px));
    padding: 0;
    border: 0;
    border-radius: var(--radius);
    color: var(--text);
    background: var(--panel);
}
dialog::backdrop { background: #000a; }
.dialog-card { padding: 23px; }
.dialog-card p { margin-top: 9px; overflow-wrap: anywhere; }
.dialog-card .form-actions { justify-content: end; margin-top: 17px; }

@media (max-width: 800px) {
    .shell { width: min(var(--shell), calc(100% - 34px)); }
    .hero { gap: 22px; padding: 25px; }
    .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .split-section { grid-template-columns: 1fr; }
    .section-copy p { max-width: 57ch; }
}

@media (max-width: 580px) {
    .shell { width: min(var(--shell), calc(100% - 24px)); }
    .header-inner {
        grid-template-columns: 1fr auto;
        grid-template-areas: 'brand language' 'nav nav';
        gap: 9px;
        padding-block: 9px 7px;
    }
    .site-header nav {
        justify-content: space-between;
        gap: 8px;
        min-width: 0;
        padding-top: 5px;
        border-top: 1px solid #283240;
    }
    .site-header nav a { display: inline-flex; align-items: center; min-height: 34px; font-size: .88rem; }
    .hero { margin-top: 16px; grid-template-columns: 1fr; border-radius: 16px; padding: 20px 16px; }
    .hero h1 { font-size: clamp(2.32rem, 11vw, 3.29rem); }
    .hero-actions { margin-top: 19px; }
    .hero-actions .button { font-size: .87rem; padding-inline: 10px; flex: 1 1 auto; }
    .section { margin-top: 45px; }
    .metric { padding: 11px; }
    .package-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .order-bottom .button { width: 100%; }
    .order-row { grid-template-columns: minmax(0, 1fr) max-content; gap: 9px; }
    .order-row .button { grid-column: span 2; width: 100%; }
    .leaderboard { padding-inline: 12px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
}


.payment-order {
    display: grid;
    gap: 8px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
    overflow-wrap: anywhere;
}
.payment-order .button { flex: 0 1 auto; }
.payment-report { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 9px; }
.payment-report summary { cursor: pointer; color: var(--accent); font-size: .9rem; }
.payment-report .payment-fields { max-width: 360px; }
.payment-report .payment-fields .button { justify-self: start; width: auto; }
.payment-fields { display: grid; gap: 7px; margin-top: 15px; }
.payment-fields label { font-size: .92rem; }
.payment-fields input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--body);
    color: inherit;
    font: inherit;
}
