:root {
    color-scheme: dark;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #edf5ff;
    background: #060a12;
    --panel: rgba(9, 18, 32, 0.88);
    --panel-solid: #091220;
    --line: #263b53;
    --line-bright: #355b79;
    --muted: #91a6ba;
    --blue: #55c8ff;
    --blue-deep: #118bc6;
    --green: #43e299;
    --orange: #ff9b50;
    --red: #ff687b;
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    background: #060a12;
}

body {
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 10% 8%, rgba(15, 127, 184, 0.24), transparent 35rem),
        radial-gradient(circle at 92% 26%, rgba(91, 41, 154, 0.18), transparent 34rem),
        linear-gradient(180deg, #07101b 0%, #060a12 72%);
}

a,
button {
    font: inherit;
}

a:focus-visible,
button:focus-visible {
    outline: 3px solid rgba(85, 200, 255, 0.72);
    outline-offset: 3px;
}

.background-grid {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: 0.28;
    background-image:
        linear-gradient(rgba(86, 157, 204, 0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(86, 157, 204, 0.07) 1px, transparent 1px);
    background-size: 68px 68px;
    mask-image: linear-gradient(to bottom, black 0%, transparent 82%);
}

.site-header,
main,
footer {
    width: min(1180px, calc(100% - 40px));
    margin-inline: auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    min-height: 88px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    border-bottom: 1px solid rgba(72, 110, 143, 0.35);
    background: rgba(6, 12, 22, 0.88);
    backdrop-filter: blur(18px);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    color: inherit;
    text-decoration: none;
}

.brand img {
    width: 38px;
    height: 38px;
    border-radius: 9px;
    box-shadow: 0 0 24px rgba(255, 132, 50, 0.18);
}

.brand span,
.account-summary {
    display: grid;
}

.brand strong {
    font-size: 17px;
    letter-spacing: 0.02em;
}

.brand small {
    margin-top: -2px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 750;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.account-preview {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 8px 9px 8px 13px;
    border: 1px solid rgba(53, 91, 121, 0.72);
    border-radius: 14px;
    background: rgba(8, 17, 30, 0.76);
}

.coin-preview {
    min-height: 52px;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 7px 12px;
    border: 1px solid rgba(255, 196, 65, 0.48);
    border-radius: 14px;
    background: linear-gradient(145deg, rgba(54, 37, 10, 0.82), rgba(15, 21, 31, 0.88));
    box-shadow: inset 0 0 18px rgba(255, 183, 45, 0.05), 0 0 20px rgba(255, 183, 45, 0.08);
    color: inherit;
    cursor: pointer;
}

.coin-preview:hover {
    border-color: rgba(255, 218, 111, 0.88);
    filter: brightness(1.08);
}

.coin-preview[hidden] {
    display: none;
}

.coin-preview > span:last-child {
    display: grid;
}

.coin-preview strong {
    color: #fff0aa;
    font-size: 14px;
    line-height: 1.15;
}

.coin-preview small {
    color: #c9a95a;
    font-size: 8px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
}

.coin-mark {
    width: 27px;
    height: 27px;
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    overflow: hidden;
    border: 1px solid #ffe081;
    border-radius: 50%;
    color: transparent;
    background-color: #6f3707;
    background-image:
        url("/brand/scrootch-coin.png"),
        radial-gradient(circle at 35% 28%, #fff4b5 0 14%, #ffc943 44%, #b96b0e 100%);
    background-position: center;
    background-repeat: no-repeat;
    background-size: 118%, cover;
    box-shadow: 0 0 16px rgba(255, 193, 54, 0.42);
    font-size: 0;
    font-weight: 950;
}

.header-actions,
.live-overview,
.live-stat {
    display: flex;
    align-items: center;
}

.header-actions {
    gap: 10px;
}

.live-overview {
    min-height: 52px;
    gap: 2px;
    padding: 5px;
    border: 1px solid rgba(53, 91, 121, 0.72);
    border-radius: 14px;
    background: rgba(8, 17, 30, 0.82);
}

.live-stat {
    min-height: 40px;
    gap: 9px;
    padding: 6px 11px;
    border-radius: 9px;
}

.live-stat + .live-stat {
    border-left: 1px solid rgba(53, 91, 121, 0.62);
    border-radius: 0 9px 9px 0;
}

.live-stat > span:not(.live-dot),
.live-ping {
    display: grid;
}

.live-stat strong {
    color: #edf7ff;
    font-size: 12px;
    line-height: 1.2;
    white-space: nowrap;
}

.live-stat small {
    color: var(--muted);
    font-size: 9px;
    font-weight: 750;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}

.live-dot {
    width: 8px;
    height: 8px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 13px rgba(67, 226, 153, 0.75);
}

.live-ping[data-quality="good"] strong {
    color: var(--green);
}

.live-ping[data-quality="medium"] strong {
    color: var(--orange);
}

.live-ping[data-quality="high"] strong,
.live-ping[data-quality="offline"] strong {
    color: var(--red);
}

.account-preview strong {
    font-size: 13px;
}

.account-preview small {
    color: var(--muted);
    font-size: 11px;
}

.account-dot {
    width: 9px;
    height: 9px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--blue);
    box-shadow: 0 0 14px rgba(85, 200, 255, 0.85);
}

.account-preview button {
    min-height: 34px;
    padding: 7px 12px;
    border: 1px solid #31516b;
    border-radius: 9px;
    color: #7890a5;
    background: #101c2b;
    font-size: 12px;
    font-weight: 750;
    cursor: not-allowed;
}

.account-preview[data-state="anonymous"] button,
.account-preview[data-state="authenticated"] button {
    border-color: rgba(85, 200, 255, 0.55);
    color: #dff5ff;
    background: rgba(22, 83, 116, 0.42);
    cursor: pointer;
}

.account-preview[data-state="authenticated"] .account-dot {
    display: none;
}

.account-preview[data-level-ready="true"] {
    border-color: rgba(255, 210, 84, 0.78);
    box-shadow: 0 0 24px rgba(255, 210, 84, 0.16);
}

.account-preview[data-level-ready="true"] small {
    color: #ffd95a;
    font-weight: 900;
}

.account-preview[data-reward-ready="true"] {
    border-color: rgba(82, 243, 170, .84);
    box-shadow: 0 0 28px rgba(82, 243, 170, .19);
}

.account-preview[data-reward-ready="true"] small {
    color: #7ff4bb;
    font-weight: 900;
}

.account-preview[data-reward-ready="true"] button {
    border-color: rgba(82, 243, 170, .68);
    color: #d8ffed;
    background: rgba(24, 105, 72, .42);
}

.account-portrait {
    position: relative;
    width: 36px;
    height: 36px;
    flex: 0 0 auto;
}

.account-portrait img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.account-portrait img:first-child {
    inset: 4px;
    width: calc(100% - 8px);
    height: calc(100% - 8px);
    border-radius: 8px;
}

main {
    padding: 84px 0 56px;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(260px, 0.75fr);
    align-items: end;
    gap: clamp(36px, 7vw, 96px);
    padding-bottom: 92px;
}

.eyebrow {
    margin: 0;
    color: var(--blue);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.2em;
}

h1,
h2,
p {
    text-wrap: balance;
}

h1 {
    max-width: 820px;
    margin: 14px 0 24px;
    font-size: clamp(48px, 8vw, 94px);
    line-height: 0.92;
    letter-spacing: -0.055em;
}

h1 span {
    color: #bde9ff;
}

.hero-copy {
    max-width: 670px;
    margin: 0;
    color: #a9bdd0;
    font-size: clamp(17px, 2vw, 20px);
    line-height: 1.65;
}

.platform-summary {
    display: grid;
    gap: 1px;
    margin: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--line);
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.18);
}

.platform-summary div {
    padding: 18px 20px;
    background: rgba(9, 18, 32, 0.96);
}

.platform-summary dt {
    color: #f2f8ff;
    font-size: 25px;
    font-weight: 900;
}

.platform-summary dd {
    margin: 2px 0 0;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.library {
    padding-top: 34px;
    border-top: 1px solid rgba(72, 110, 143, 0.35);
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
}

h2 {
    margin: 7px 0 0;
    font-size: clamp(28px, 4vw, 44px);
    letter-spacing: -0.035em;
}

.fleet-status,
.game-status {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: #c9d7e4;
    font-size: 13px;
    font-weight: 750;
}

.fleet-status > span,
.game-status > span {
    width: 9px;
    height: 9px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: #7f94a9;
    box-shadow: 0 0 14px rgba(127, 148, 169, 0.45);
}

[data-state="online"] > span {
    background: var(--green);
    box-shadow: 0 0 14px rgba(67, 226, 153, 0.72);
}

[data-state="offline"] > span {
    background: var(--red);
    box-shadow: 0 0 14px rgba(255, 104, 123, 0.58);
}

[data-state="maintenance"] > span {
    background: var(--orange);
    box-shadow: 0 0 14px rgba(255, 155, 80, 0.58);
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr));
    gap: 22px;
}

.game-card {
    position: relative;
    min-height: 500px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: var(--panel);
    box-shadow: 0 22px 70px rgba(0, 0, 0, 0.22);
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.game-card:not(.game-card-loading):hover {
    transform: translateY(-4px);
    border-color: var(--line-bright);
    box-shadow: 0 28px 78px rgba(0, 0, 0, 0.32);
}

.game-art {
    position: relative;
    min-height: 224px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
    background:
        radial-gradient(circle at 50% 58%, color-mix(in srgb, var(--game-accent) 36%, transparent), transparent 38%),
        linear-gradient(145deg, rgba(13, 37, 55, 0.96), rgba(8, 13, 26, 0.98));
}

.game-art::before,
.game-art::after {
    content: "";
    position: absolute;
    width: 220px;
    height: 220px;
    border: 1px solid color-mix(in srgb, var(--game-accent) 38%, transparent);
    transform: rotate(45deg);
}

.game-cover {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 48%;
    filter: saturate(0.90) brightness(0.78) contrast(1.04);
    transform: scale(1.012);
    transition: filter 220ms ease, transform 260ms ease;
}

.game-art.has-cover::before {
    z-index: 1;
    inset: 0;
    width: auto;
    height: auto;
    border: 0;
    background:
        linear-gradient(90deg, rgba(3, 9, 18, 0.36), transparent 24%, transparent 76%, rgba(3, 9, 18, 0.36)),
        linear-gradient(0deg, rgba(3, 9, 18, 0.46), transparent 46%);
    transform: none;
    pointer-events: none;
}

.game-art.has-cover::after,
.game-art.has-cover .game-monogram {
    display: none;
}

.game-card:hover .game-cover {
    filter: saturate(1.02) brightness(0.88) contrast(1.04);
    transform: scale(1.025);
}

.game-art::after {
    width: 135px;
    height: 135px;
    border-color: color-mix(in srgb, var(--game-accent) 64%, transparent);
}

.game-monogram {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 96px;
    height: 96px;
    border: 2px solid var(--game-accent);
    border-radius: 28px 12px 28px 12px;
    color: #f4fbff;
    background: rgba(5, 13, 24, 0.82);
    font-size: 34px;
    font-weight: 950;
    letter-spacing: -0.05em;
    box-shadow: 0 0 38px color-mix(in srgb, var(--game-accent) 28%, transparent);
    transform: rotate(-5deg);
}

.game-stage {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
    padding: 6px 9px;
    border: 1px solid rgba(181, 216, 238, 0.22);
    border-radius: 999px;
    color: #bfd0dd;
    background: rgba(6, 13, 24, 0.76);
    backdrop-filter: blur(10px);
    font-size: 10px;
    font-weight: 850;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.game-body {
    min-height: 274px;
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 23px;
}

.game-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.game-status {
    color: var(--muted);
    font-size: 12px;
}

.game-player-count {
    color: #a8bacb;
    font-size: 12px;
    font-weight: 700;
}

.game-title {
    margin: 18px 0 7px;
    font-size: 29px;
    letter-spacing: -0.025em;
}

.game-subtitle {
    margin: 0 0 12px;
    color: var(--game-accent);
    font-size: 13px;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.game-description {
    margin: 0;
    color: #9eb2c5;
    font-size: 14px;
    line-height: 1.55;
}

.game-presence {
	display: flex;
	flex-wrap: wrap;
	gap: 7px;
	margin-top: 15px;
}

.game-presence div {
	display: flex;
	align-items: center;
	gap: 7px;
	min-width: 104px;
	padding: 6px 9px;
	border: 1px solid rgba(71, 107, 137, 0.38);
	border-radius: 999px;
	background: rgba(11, 25, 41, 0.52);
}

.game-presence strong {
	color: #dceaf5;
	font-size: 14px;
	font-weight: 900;
}

.game-presence span {
	color: #7f95a8;
	font-size: 9px;
	font-weight: 850;
	letter-spacing: 0.07em;
	text-transform: uppercase;
}

.game-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin: 18px 0 20px;
    padding: 0;
    list-style: none;
}

.game-tags li {
    padding: 5px 8px;
    border: 1px solid rgba(71, 107, 137, 0.58);
    border-radius: 7px;
    color: #9fb2c4;
    background: rgba(14, 29, 46, 0.72);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.play-button {
    min-height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: auto;
    padding: 13px 16px;
    border: 1px solid var(--game-accent);
    border-radius: 12px;
    color: #04101a;
    background: var(--game-accent);
    font-size: 14px;
    font-weight: 900;
    text-decoration: none;
    box-shadow: 0 12px 30px color-mix(in srgb, var(--game-accent) 18%, transparent);
    transition: filter 150ms ease, transform 150ms ease;
}

.play-button::after {
    content: "→";
    font-size: 20px;
}

.play-button:hover {
    filter: brightness(1.08);
    transform: translateX(2px);
}

.play-button[aria-disabled="true"] {
    pointer-events: none;
    border-color: #405267;
    color: #8598aa;
    background: #172536;
    box-shadow: none;
}

.game-card-loading {
    min-height: 500px;
    padding: 24px;
}

.loading-block {
    border-radius: 12px;
    background: linear-gradient(100deg, #0c1a2a 25%, #142a3e 43%, #0c1a2a 60%);
    background-size: 300% 100%;
    animation: loading 1.5s ease infinite;
}

.loading-art {
    height: 250px;
    margin-bottom: 35px;
}

.loading-line {
    height: 24px;
    margin-top: 14px;
}

.loading-line.short {
    width: 62%;
}

.notice {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 14px;
    color: #b7c8d7;
    background: var(--panel);
}

.notice a {
    color: var(--blue);
}

.future-panel {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 24px;
    margin-top: 24px;
    padding: clamp(24px, 4vw, 40px);
    border: 1px dashed #34516b;
    border-radius: 22px;
    background: rgba(8, 16, 29, 0.6);
}

.future-icon {
    width: 74px;
    height: 74px;
    display: grid;
    place-items: center;
    border: 1px solid #39627f;
    border-radius: 20px;
    color: var(--blue);
    background: #0d1d2e;
    font-size: 36px;
    font-weight: 300;
}

.future-panel h2 {
    font-size: clamp(22px, 3vw, 32px);
}

.future-panel p:last-child {
    max-width: 780px;
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.6;
}

footer {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    padding: 30px 0 40px;
    border-top: 1px solid rgba(72, 110, 143, 0.24);
    color: #71869a;
    font-size: 12px;
}

.account-dialog {
    width: min(1040px, calc(100% - 32px));
    max-height: min(880px, calc(100dvh - 32px));
    margin: auto;
    padding: 0;
    overflow: hidden;
    border: 1px solid rgba(63, 111, 148, 0.9);
    border-radius: 24px;
    color: #edf5ff;
    background: rgba(7, 15, 27, 0.98);
    box-shadow: 0 36px 120px rgba(0, 0, 0, 0.72), 0 0 70px rgba(38, 141, 194, 0.12);
}

.account-dialog::backdrop {
    background: rgba(1, 5, 11, 0.78);
    backdrop-filter: blur(10px);
}

.reward-dialog {
    width: min(760px, calc(100% - 32px));
    max-height: min(900px, calc(100dvh - 24px));
    margin: auto;
    padding: 0;
    overflow: hidden;
    border: 1px solid rgba(76, 149, 194, 0.8);
    border-radius: 26px;
    color: #edf5ff;
    background: #07101c;
    box-shadow: 0 40px 140px rgba(0, 0, 0, 0.82), 0 0 80px rgba(53, 180, 255, 0.2);
}

.reward-dialog::backdrop {
    background: rgba(1, 4, 10, 0.88);
    backdrop-filter: blur(14px) saturate(.7);
}

.reward-dialog-shell {
    --reward-accent: #55c8ff;
    --reward-accent-soft: rgba(85, 200, 255, 0.18);
    --reward-glow: rgba(85, 200, 255, 0.38);
    position: relative;
    max-height: min(900px, calc(100dvh - 24px));
    padding: clamp(22px, 4.5vw, 42px);
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    background:
        radial-gradient(circle at 50% -5%, var(--reward-accent-soft), transparent 22rem),
        linear-gradient(145deg, rgba(10, 24, 40, .99), rgba(5, 11, 21, .99));
}

.reward-dialog-shell[data-outcome="win"] {
    --reward-accent: #52f3aa;
    --reward-accent-soft: rgba(48, 230, 147, 0.18);
    --reward-glow: rgba(48, 230, 147, 0.38);
}

.reward-dialog-shell[data-outcome="loss"] {
    --reward-accent: #ff7385;
    --reward-accent-soft: rgba(255, 88, 112, 0.16);
    --reward-glow: rgba(255, 88, 112, 0.34);
}

.reward-dialog-shell[data-outcome="abandoned"] {
    --reward-accent: #ffad61;
    --reward-accent-soft: rgba(255, 158, 71, 0.16);
    --reward-glow: rgba(255, 158, 71, 0.34);
}

.reward-aurora {
    position: absolute;
    z-index: 0;
    top: -260px;
    left: 50%;
    width: 640px;
    height: 520px;
    pointer-events: none;
    transform: translateX(-50%);
    border-radius: 50%;
    background: radial-gradient(circle, var(--reward-glow), transparent 67%);
    filter: blur(18px);
    opacity: .45;
}

.reward-header,
.reward-result,
.reward-xp-card,
.reward-gain-grid,
.reward-stat-grid,
.reward-hint,
.reward-actions {
    position: relative;
    z-index: 2;
}

.reward-header,
.reward-card-heading,
.reward-xp-caption,
.reward-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.reward-header h2 {
    margin: 6px 0 0;
    font-size: clamp(25px, 4.4vw, 42px);
    line-height: 1.05;
}

.reward-result {
    display: flex;
    align-items: center;
    gap: 17px;
    margin: 24px 0 16px;
    padding: 17px 19px;
    border: 1px solid color-mix(in srgb, var(--reward-accent) 52%, transparent);
    border-radius: 17px;
    background: linear-gradient(115deg, var(--reward-accent-soft), rgba(8, 18, 31, .82));
    box-shadow: inset 0 0 30px rgba(255, 255, 255, .02);
}

.reward-result-mark {
    display: grid;
    width: 54px;
    height: 54px;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid var(--reward-accent);
    border-radius: 16px;
    color: #06101a;
    background: var(--reward-accent);
    box-shadow: 0 0 28px var(--reward-glow);
    font-size: 27px;
    font-weight: 950;
}

.reward-result > div {
    display: grid;
    min-width: 0;
    gap: 2px;
}

.reward-result strong {
    color: var(--reward-accent);
    font-size: clamp(16px, 3vw, 25px);
    line-height: 1.12;
    letter-spacing: .04em;
    overflow-wrap: anywhere;
}

.reward-result small {
    margin-top: 3px;
    color: #8298ab;
    font-size: 10px;
}

.reward-xp-card {
    padding: 19px;
    border: 1px solid rgba(69, 108, 137, .7);
    border-radius: 17px;
    background: rgba(6, 15, 27, .8);
    transition: border-color .25s ease, box-shadow .25s ease;
}

.reward-xp-card.is-leveling {
    border-color: var(--reward-accent);
    box-shadow: 0 0 34px var(--reward-glow), inset 0 0 26px var(--reward-accent-soft);
}

.reward-card-heading h3 {
    margin: 3px 0 0;
    font-size: 23px;
}

.reward-card-heading > strong {
    color: var(--reward-accent);
    font-size: 22px;
    text-shadow: 0 0 18px var(--reward-glow);
}

.reward-xp-track {
    position: relative;
    height: 18px;
    margin-top: 15px;
    overflow: visible;
    border: 1px solid rgba(81, 125, 156, .6);
    border-radius: 999px;
    background: #050c16;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, .65);
}

.reward-xp-track > span {
    position: absolute;
    inset: 2px auto 2px 2px;
    width: 0;
    max-width: calc(100% - 4px);
    border-radius: inherit;
    background: linear-gradient(90deg, #2d8bd1, #57d6ff 58%, var(--reward-accent));
    box-shadow: 0 0 16px var(--reward-glow);
}

.reward-xp-spark {
    position: absolute;
    top: 50%;
    left: 0;
    width: 10px;
    height: 28px;
    pointer-events: none;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 12px 4px var(--reward-accent), 0 0 28px 8px var(--reward-glow);
    opacity: 0;
}

.reward-dialog-shell.is-playing .reward-xp-spark {
    opacity: .88;
}

.reward-xp-caption {
    margin-top: 8px;
    color: #839aad;
    font-size: 10px;
}

.reward-gain-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 11px;
    margin-top: 11px;
}

.reward-gain {
    display: flex;
    align-items: center;
    gap: 13px;
    min-width: 0;
    padding: 15px;
    border: 1px solid rgba(55, 89, 116, .64);
    border-radius: 15px;
    background: rgba(8, 18, 31, .76);
}

.reward-gain-coins {
    border-color: rgba(255, 197, 63, .48);
    background: linear-gradient(112deg, rgba(68, 43, 9, .48), rgba(8, 18, 31, .8));
}

.reward-gain > div {
    display: grid;
    min-width: 0;
    gap: 2px;
}

.reward-gain strong {
    overflow: hidden;
    color: #e9f6ff;
    font-size: 20px;
    text-overflow: ellipsis;
}

.reward-gain-coins strong {
    color: #ffe184;
}

.reward-gain small {
    color: #8195a7;
    font-size: 10px;
}

.reward-game-level {
    display: grid;
    width: 43px;
    height: 43px;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid #55c8ff;
    border-radius: 12px;
    color: #75d4ff;
    background: rgba(17, 105, 151, .18);
    font-size: 17px;
    font-weight: 950;
}

.reward-gain-coins.is-counting .coin-mark {
    animation: reward-coin-pop .18s ease-out both;
}

.reward-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin: 11px 0 0;
}

.reward-stat-grid div {
    display: grid;
    gap: 2px;
    padding: 12px;
    border: 1px solid rgba(53, 84, 109, .56);
    border-radius: 13px;
    background: rgba(7, 16, 28, .72);
}

.reward-stat-grid dt {
    color: #edf7ff;
    font-size: 19px;
    font-weight: 950;
}

.reward-stat-grid dd {
    margin: 0;
    color: #7890a3;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.reward-hint {
    min-height: 20px;
    margin: 15px 0 10px;
    color: #8fa5b7;
    text-align: center;
    font-size: 11px;
}

.reward-actions {
    align-items: stretch;
}

.reward-primary,
.reward-secondary {
    min-height: 48px;
    border-radius: 13px;
    font-weight: 950;
    letter-spacing: .035em;
    cursor: pointer;
}

.reward-primary {
    flex: 1 1 auto;
    border: 1px solid var(--reward-accent);
    color: #041019;
    background: var(--reward-accent);
    box-shadow: 0 0 24px var(--reward-glow);
}

.reward-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    filter: brightness(1.1);
}

.reward-primary:disabled {
    opacity: .58;
    cursor: wait;
}

.reward-secondary {
    padding-inline: 18px;
    border: 1px solid rgba(75, 111, 140, .58);
    color: #a9bdce;
    background: rgba(8, 19, 32, .78);
}

.reward-particles {
    position: absolute;
    z-index: 1;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.reward-particles span {
    position: absolute;
    top: 54%;
    left: 50%;
    width: var(--size, 5px);
    height: var(--size, 5px);
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: var(--particle-color, var(--reward-accent));
    box-shadow: 0 0 12px var(--particle-color, var(--reward-accent));
    opacity: 0;
}

.reward-dialog-shell.is-playing .reward-particles span {
    animation: reward-particle-flight 1.8s cubic-bezier(.15,.72,.28,1) var(--delay, 0s) both;
}

@keyframes reward-particle-flight {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(.2); }
    18% { opacity: .95; }
    100% { opacity: 0; transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y))) scale(1.15); }
}

@keyframes reward-coin-pop {
    0% { transform: scale(.82) rotate(-7deg); filter: brightness(1); }
    55% { transform: scale(1.18) rotate(4deg); filter: brightness(1.6); }
    100% { transform: scale(1) rotate(0); filter: brightness(1); }
}

.account-dialog-shell {
    max-height: min(880px, calc(100dvh - 32px));
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: clamp(22px, 4vw, 42px);
    background:
        radial-gradient(circle at 15% 0%, rgba(43, 156, 213, 0.17), transparent 24rem),
        linear-gradient(145deg, rgba(10, 22, 38, 0.98), rgba(6, 12, 23, 0.99));
}

.account-dialog-header,
.profile-panel-heading,
.level-progress > div,
.profile-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.account-dialog-header h2 {
    margin-top: 6px;
    font-size: clamp(26px, 4vw, 42px);
}

.dialog-close {
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    border: 1px solid rgba(88, 127, 158, 0.55);
    border-radius: 12px;
    color: #b7cad9;
    background: rgba(10, 24, 40, 0.78);
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.account-global-status {
    min-height: 22px;
    margin: 16px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.account-global-status[data-kind="error"] {
    color: #ff9bab;
}

.account-global-status[data-kind="success"] {
    color: var(--green);
}

.auth-intro {
    max-width: 680px;
    margin: 30px 0 24px;
}

.auth-intro h3,
.key-reveal-view h3,
.profile-identity h3 {
    margin: 0;
    font-size: clamp(24px, 4vw, 36px);
    letter-spacing: -0.035em;
}

.auth-intro p,
.key-reveal-view > p:not(.eyebrow) {
    margin: 10px 0 0;
    color: #a8bdcf;
    line-height: 1.6;
}

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

.account-form,
.profile-panel {
    padding: clamp(20px, 3vw, 28px);
    border: 1px solid rgba(55, 90, 120, 0.68);
    border-radius: 18px;
    background: rgba(6, 15, 27, 0.72);
}

.account-form-accent {
    border-color: rgba(85, 200, 255, 0.48);
    background: linear-gradient(145deg, rgba(15, 53, 75, 0.74), rgba(7, 19, 33, 0.78));
}

.guest-account-form {
    max-width: 720px;
    margin: 0 auto 18px;
    border-color: rgba(97, 216, 149, 0.48);
    background: linear-gradient(145deg, rgba(15, 55, 49, 0.66), rgba(7, 19, 33, 0.78));
}

.guest-account-form .form-kicker {
    color: #61d895;
}

.form-kicker {
    color: var(--blue);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.16em;
}

.account-form h3,
.profile-panel h3 {
    margin: 7px 0 22px;
    font-size: 22px;
}

.account-form label,
.profile-name-form label {
    display: block;
    margin-bottom: 8px;
    color: #c4d4e1;
    font-size: 12px;
    font-weight: 750;
}

.account-form input,
.profile-name-form input {
    width: 100%;
    min-height: 48px;
    padding: 11px 13px;
    border: 1px solid #334d65;
    border-radius: 10px;
    outline: 0;
    color: #edf7ff;
    background: rgba(4, 12, 23, 0.92);
    font: inherit;
}

.account-form input:focus,
.profile-name-form input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(85, 200, 255, 0.13);
}

.account-form > small {
    display: block;
    margin-top: 8px;
    color: #8197aa;
    font-size: 11px;
}

#invite-field {
    margin-top: 18px;
}

#invite-field small {
    display: block;
    margin-top: 8px;
    color: #8197aa;
    font-size: 11px;
}

.primary-action,
.profile-name-form button,
.profile-actions button,
.login-key-display button {
    min-height: 44px;
    padding: 10px 15px;
    border: 1px solid rgba(85, 200, 255, 0.72);
    border-radius: 10px;
    color: #04111b;
    background: var(--blue);
    font-weight: 850;
    cursor: pointer;
}

.account-form .primary-action {
    width: 100%;
    margin-top: 18px;
}

.primary-action:disabled,
.profile-actions button:disabled,
.login-key-display button:disabled {
    border-color: #3b4c5e;
    color: #778b9d;
    background: #172434;
    cursor: not-allowed;
}

.guest-note {
    margin: 20px 0 0;
    color: #8399ad;
    font-size: 12px;
    text-align: center;
}

.key-reveal-view {
    max-width: 700px;
    margin: 38px auto 10px;
    padding: clamp(24px, 5vw, 44px);
    border: 1px solid rgba(255, 155, 80, 0.5);
    border-radius: 22px;
    background: linear-gradient(145deg, rgba(68, 37, 18, 0.42), rgba(8, 17, 29, 0.92));
    text-align: center;
}

.key-warning-mark {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    margin: 0 auto 18px;
    border: 1px solid var(--orange);
    border-radius: 50%;
    color: #14100a;
    background: var(--orange);
    font-size: 30px;
    font-weight: 950;
}

.login-key-display {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    margin: 26px 0 20px;
}

.login-key-display code {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    overflow-wrap: anywhere;
    border: 1px solid rgba(255, 174, 105, 0.52);
    border-radius: 11px;
    color: #ffe2c9;
    background: rgba(8, 12, 19, 0.84);
    font-size: clamp(14px, 2.5vw, 20px);
    font-weight: 850;
    letter-spacing: 0.04em;
}

.key-confirmation {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 18px 0;
    color: #cbd8e3;
    font-size: 13px;
}

.key-confirmation input {
    width: 18px;
    height: 18px;
    accent-color: var(--green);
}

.profile-view {
    margin-top: 28px;
    --level-accent: #55c8ff;
    --level-accent-bright: #bcecff;
    --level-glow: rgba(85, 200, 255, 0.22);
}

.profile-view[data-level-tier="1"] { --level-accent: #60dfb0; --level-accent-bright: #c8ffe9; --level-glow: rgba(96, 223, 176, 0.25); }
.profile-view[data-level-tier="2"] { --level-accent: #80aaff; --level-accent-bright: #d6e2ff; --level-glow: rgba(128, 170, 255, 0.27); }
.profile-view[data-level-tier="3"] { --level-accent: #b68cff; --level-accent-bright: #eadcff; --level-glow: rgba(182, 140, 255, 0.29); }
.profile-view[data-level-tier="4"] { --level-accent: #ff75c8; --level-accent-bright: #ffd4ee; --level-glow: rgba(255, 117, 200, 0.3); }
.profile-view[data-level-tier="5"] { --level-accent: #ffb14a; --level-accent-bright: #ffe6bd; --level-glow: rgba(255, 177, 74, 0.31); }
.profile-view[data-level-tier="6"] { --level-accent: #54f0ef; --level-accent-bright: #d1ffff; --level-glow: rgba(84, 240, 239, 0.33); }
.profile-view[data-level-tier="7"] { --level-accent: #ffd95a; --level-accent-bright: #fff5bd; --level-glow: rgba(255, 217, 90, 0.34); }
.profile-view[data-level-tier="8"] { --level-accent: #ff786c; --level-accent-bright: #ffe0dc; --level-glow: rgba(255, 120, 108, 0.36); }
.profile-view[data-level-tier="9"] { --level-accent: #ffffff; --level-accent-bright: #ffffff; --level-glow: rgba(128, 224, 255, 0.46); }

.profile-hero {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 20px;
    padding: 22px;
    border: 1px solid rgba(60, 103, 137, 0.64);
    border-radius: 20px;
    background: linear-gradient(120deg, rgba(12, 39, 58, 0.9), rgba(8, 17, 31, 0.88));
    box-shadow: inset 0 0 40px var(--level-glow);
    transition: border-color 250ms ease, box-shadow 250ms ease;
}

.profile-portrait {
    position: relative;
    width: 104px;
    height: 104px;
}

.profile-portrait img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.profile-portrait .profile-avatar {
    inset: 12px;
    width: calc(100% - 24px);
    height: calc(100% - 24px);
    border-radius: 20px;
}

.profile-identity p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.profile-level-badge {
    min-width: 88px;
    display: grid;
    place-items: center;
    padding: 13px;
    border: 1px solid var(--level-accent);
    border-radius: 16px;
    background: rgba(5, 24, 40, 0.84);
}

.profile-level-badge span {
    color: #8eb2c8;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 0.15em;
}

.profile-level-badge strong {
    color: var(--level-accent-bright);
    font-size: 34px;
    text-shadow: 0 0 18px var(--level-glow);
}

.level-progress {
    margin: 18px 0;
    padding: 16px 18px;
    border: 1px solid rgba(50, 84, 111, 0.56);
    border-radius: 14px;
    background: rgba(7, 17, 29, 0.72);
}

.level-progress span {
    color: #a7bac9;
    font-size: 12px;
}

.level-progress span:first-child {
    color: #e7f5ff;
    font-weight: 800;
}

.level-progress progress {
    width: 100%;
    height: 10px;
    display: block;
    margin-top: 10px;
    overflow: hidden;
    border: 0;
    border-radius: 999px;
    background: #162739;
    accent-color: var(--level-accent);
}

.level-progress progress::-webkit-progress-bar {
    background: #162739;
}

.level-progress progress::-webkit-progress-value {
    border-radius: 999px;
    background: linear-gradient(90deg, var(--level-accent), var(--level-accent-bright));
}

.level-claim {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: -5px 0 18px;
    padding: 16px 18px;
    border: 1px solid var(--level-accent);
    border-radius: 15px;
    background: linear-gradient(100deg, var(--level-glow), rgba(7, 17, 29, 0.84));
    box-shadow: 0 0 28px var(--level-glow);
}

.level-claim[hidden] { display: none; }

.level-claim > div {
    display: grid;
    gap: 3px;
}

.level-claim strong { color: var(--level-accent-bright); font-size: 16px; }
.level-claim small { color: #98adbd; font-size: 11px; }

.level-claim button {
    flex: 0 0 auto;
    padding: 13px 18px;
    border: 1px solid var(--level-accent-bright);
    border-radius: 12px;
    color: #04101b;
    background: var(--level-accent);
    box-shadow: 0 0 22px var(--level-glow);
    font-weight: 950;
    letter-spacing: 0.06em;
    cursor: pointer;
}

.level-claim button:hover:not(:disabled) { transform: translateY(-2px); filter: brightness(1.12); }
.level-claim button:disabled { opacity: 0.55; cursor: wait; }

.level-up-celebration {
    position: fixed;
    z-index: 30;
    inset: 50% auto auto 50%;
    width: min(360px, calc(100vw - 40px));
    padding: 30px 24px 24px;
    overflow: hidden;
    transform: translate(-50%, -50%);
    border: 1px solid var(--level-accent-bright);
    border-radius: 24px;
    color: white;
    text-align: center;
    background: rgba(5, 15, 27, 0.96);
    box-shadow: 0 0 90px var(--level-glow), 0 28px 80px rgba(0, 0, 0, 0.65);
}

.profile-wallet {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 0 0 18px;
    padding: 15px 18px;
    border: 1px solid rgba(255, 196, 65, 0.5);
    border-radius: 15px;
    background: linear-gradient(105deg, rgba(69, 43, 9, 0.45), rgba(7, 17, 29, 0.84));
}

.profile-wallet > button,
.wallet-history-heading button,
.wallet-history-more {
    margin-left: auto;
    padding: 9px 12px;
    border: 1px solid rgba(255, 205, 78, 0.42);
    border-radius: 10px;
    color: #ffe9a1;
    background: rgba(70, 45, 10, 0.46);
    font-size: 11px;
    font-weight: 850;
    cursor: pointer;
}

.profile-wallet > div {
    display: grid;
    gap: 2px;
}

.profile-wallet strong {
    color: #ffeda1;
    font-size: 19px;
}

.profile-wallet small {
    color: #a99970;
    font-size: 10px;
}

.coin-mark-large {
    width: 48px;
    height: 48px;
    background-size: 112%, cover;
    box-shadow: 0 0 22px rgba(255, 193, 54, 0.48);
}

.reward-gain-coins .coin-mark-large {
    width: 58px;
    height: 58px;
}

.wallet-history {
    margin: 0 0 18px;
    padding: 16px 18px;
    border: 1px solid rgba(63, 95, 119, 0.62);
    border-radius: 15px;
    background: rgba(7, 16, 28, 0.84);
}

.wallet-history[hidden] {
    display: none;
}

.wallet-history-heading,
.wallet-transaction {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.wallet-history-heading h3 {
    margin: 3px 0 0;
    font-size: 20px;
}

.coin-earning-guide {
    margin-top: 14px;
    padding: 14px;
    border: 1px solid rgba(255, 199, 64, 0.36);
    border-radius: 13px;
    background: linear-gradient(115deg, rgba(68, 43, 9, 0.38), rgba(10, 21, 34, 0.75));
}

.coin-earning-guide > div:first-child,
.coin-earning-guide dl > div {
    display: flex;
    align-items: center;
    gap: 11px;
}

.coin-earning-guide > div:first-child > div {
    display: grid;
}

.coin-earning-guide > div:first-child strong {
    color: #ffe9a1;
    font-size: 13px;
}

.coin-earning-guide > div:first-child small,
.coin-earning-guide p,
.coin-earning-guide dd span {
    color: #9d9275;
    font-size: 10px;
}

.coin-earning-guide dl {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 12px 0 8px;
}

.coin-earning-guide dl > div {
    padding: 10px;
    border: 1px solid rgba(135, 105, 38, 0.34);
    border-radius: 10px;
    background: rgba(9, 19, 31, 0.62);
}

.coin-earning-guide dt {
    min-width: 42px;
    color: #ffd765;
    font-size: 20px;
    font-weight: 950;
}

.coin-earning-guide dd {
    display: grid;
    margin: 0;
}

.coin-earning-guide dd strong {
    font-size: 11px;
}

.coin-earning-guide p {
    margin: 0;
    line-height: 1.45;
}

.wallet-transaction-list {
    display: grid;
    gap: 7px;
    margin-top: 13px;
}

.wallet-transaction {
    padding: 11px 12px;
    border: 1px solid rgba(47, 73, 94, 0.58);
    border-radius: 11px;
    background: rgba(10, 22, 36, 0.78);
}

.wallet-transaction > div {
    display: grid;
    gap: 2px;
}

.wallet-transaction > div:last-child {
    justify-items: end;
}

.wallet-transaction time,
.wallet-transaction small {
    color: #7f95a8;
    font-size: 9px;
}

.wallet-transaction strong {
    font-size: 12px;
}

.wallet-transaction-amount.is-credit {
    color: #72e7a7;
}

.wallet-transaction-amount.is-debit {
    color: #ff9b77;
}

.wallet-history-more {
    display: block;
    margin: 11px auto 0;
}

.wallet-history-more[hidden] {
    display: none;
}

.level-up-celebration[hidden] { display: none; }
.level-up-celebration span { position: relative; color: var(--level-accent); font-size: 14px; font-weight: 950; letter-spacing: 0.22em; }
.level-up-celebration strong { position: relative; display: block; color: var(--level-accent-bright); font-size: 92px; line-height: 1; text-shadow: 0 0 30px var(--level-accent); }
.level-up-celebration p { position: relative; margin: 12px 0 0; color: #c5d6e3; font-size: 13px; }
.level-up-burst { position: absolute; inset: 50%; width: 10px; height: 10px; border-radius: 50%; box-shadow: 0 -110px 0 var(--level-accent), 78px -78px 0 var(--level-accent), 110px 0 0 var(--level-accent), 78px 78px 0 var(--level-accent), 0 110px 0 var(--level-accent), -78px 78px 0 var(--level-accent), -110px 0 0 var(--level-accent), -78px -78px 0 var(--level-accent); opacity: 0; }
.level-up-celebration.is-playing { animation: level-card-in 2.2s cubic-bezier(.2,.8,.2,1) both; }
.level-up-celebration.is-playing .level-up-burst { animation: level-burst 1s ease-out both; }

@keyframes level-card-in {
    0% { opacity: 0; transform: translate(-50%, -44%) scale(.72); }
    16%, 78% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    100% { opacity: 0; transform: translate(-50%, -54%) scale(1.04); }
}

@keyframes level-burst {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(.3) rotate(0deg); }
    30% { opacity: .9; }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(1.45) rotate(25deg); }
}

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

.profile-stat-grid div {
    display: grid;
    gap: 3px;
    padding: 14px;
    border: 1px solid rgba(51, 81, 107, 0.52);
    border-radius: 13px;
    background: rgba(8, 18, 31, 0.72);
}

.profile-stat-grid strong {
    font-size: 20px;
}

.profile-stat-grid span {
    color: #8197aa;
    font-size: 9px;
    font-weight: 850;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.profile-panel h4 {
    margin: 24px 0 10px;
    color: #aabcca;
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.profile-name-form > div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
}

.cosmetic-grid {
    display: grid;
    gap: 16px;
}

.cosmetic-source-section {
    padding: 12px;
    border: 1px solid rgba(53, 82, 108, 0.48);
    border-radius: 13px;
    background: rgba(8, 18, 31, 0.56);
}

.cosmetic-source-section h5 {
    margin: 0 0 10px;
    color: #d6e8f5;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.cosmetic-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
    gap: 9px;
}

.cosmetic-option {
    min-height: 116px;
    display: grid;
    place-items: center;
    gap: 7px;
    padding: 9px;
    border: 1px solid #2f485e;
    border-radius: 12px;
    color: #9fb3c3;
    background: rgba(8, 18, 31, 0.82);
    cursor: pointer;
}

.cosmetic-option[aria-pressed="true"] {
    border-color: var(--blue);
    color: #e3f6ff;
    box-shadow: inset 0 0 0 2px rgba(85, 200, 255, 0.15);
}

.cosmetic-option:disabled {
    opacity: 0.46;
    cursor: not-allowed;
}

.cosmetic-option img {
    width: 64px;
    height: 64px;
    object-fit: contain;
}

.cosmetic-option span {
    font-size: 10px;
    font-weight: 750;
    text-align: center;
}

.cosmetic-option small {
    color: #c9a95a;
    font-size: 8px;
    font-weight: 800;
    text-transform: uppercase;
}

.cosmetic-shop-link {
    margin-top: 10px;
    border: 0;
    color: var(--blue);
    background: transparent;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
}

.game-stats-list {
    display: grid;
    gap: 10px;
}

.profile-game-stat {
    padding: 14px;
    border: 1px solid rgba(50, 82, 108, 0.52);
    border-radius: 12px;
    background: rgba(8, 18, 31, 0.72);
}

.profile-game-stat header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.profile-game-stat h4 {
    margin: 0;
    color: #e4f4ff;
    font-size: 15px;
    letter-spacing: 0;
    text-transform: none;
}

.profile-game-stat dl {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin: 12px 0 0;
}

.profile-game-stat dt {
    color: #778ea2;
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
}

.profile-game-stat dd {
    margin: 2px 0 0;
    color: #dbeaf4;
    font-size: 13px;
    font-weight: 800;
}

.empty-profile-state {
    margin: 0;
    padding: 24px;
    border: 1px dashed #30495e;
    border-radius: 12px;
    color: #8197aa;
    font-size: 13px;
    text-align: center;
}

.profile-actions {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid rgba(58, 91, 118, 0.42);
}

.profile-actions button {
    color: #c9d8e4;
    background: rgba(13, 31, 48, 0.88);
}

.profile-actions .danger-action {
    margin-left: auto;
    border-color: rgba(255, 104, 123, 0.52);
    color: #ffb6c0;
}

.profile-actions .master-action {
    border-color: rgba(255, 186, 84, 0.7);
    color: #ffe0a2;
    background: rgba(55, 36, 12, 0.72);
}

.admin-view {
    margin-top: 28px;
}

.admin-titlebar,
.admin-panel-heading,
.admin-disabled-feature,
.admin-record-heading,
.admin-record-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.admin-titlebar {
    margin-bottom: 18px;
    padding: 20px 22px;
    border: 1px solid rgba(255, 186, 84, 0.48);
    border-radius: 18px;
    background: linear-gradient(120deg, rgba(65, 40, 12, 0.55), rgba(8, 17, 31, 0.9));
}

.admin-titlebar h3 {
    margin: 5px 0 0;
    font-size: clamp(26px, 4vw, 38px);
}

.admin-titlebar p,
.admin-disabled-feature p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.admin-titlebar button,
.admin-panel button,
.admin-inline-form button,
.admin-search-form button {
    min-height: 40px;
    padding: 9px 13px;
    border: 1px solid rgba(85, 200, 255, 0.55);
    border-radius: 9px;
    color: #cfe9fa;
    background: rgba(13, 31, 48, 0.9);
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

.admin-overview {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 18px;
}

.admin-overview div {
    display: grid;
    gap: 2px;
    padding: 14px 16px;
    border: 1px solid rgba(58, 91, 118, 0.55);
    border-radius: 12px;
    background: rgba(7, 17, 29, 0.76);
}

.admin-overview strong {
    font-size: 22px;
}

.admin-overview span {
    color: #8197aa;
    font-size: 9px;
    font-weight: 850;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

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

.admin-panel {
    margin-top: 18px;
    padding: 20px;
    border: 1px solid rgba(55, 90, 120, 0.68);
    border-radius: 16px;
    background: rgba(6, 15, 27, 0.74);
}

.admin-grid .admin-panel {
    margin-top: 0;
}

.admin-panel h4 {
    margin: 5px 0 0;
    color: #e6f5ff;
    font-size: 19px;
}

.admin-inline-form,
.admin-search-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
    align-items: end;
    gap: 8px;
    margin: 18px 0;
}

.admin-search-form {
    grid-template-columns: minmax(0, 1fr) auto;
}

.admin-inline-form label {
    color: #9eb2c2;
    font-size: 10px;
    font-weight: 800;
}

.admin-inline-form input,
.admin-search-form input {
    width: 100%;
    min-height: 40px;
    margin-top: 6px;
    padding: 8px 10px;
    border: 1px solid #334d65;
    border-radius: 9px;
    outline: 0;
    color: #edf7ff;
    background: rgba(4, 12, 23, 0.92);
    font: inherit;
}

.admin-search-form input {
    margin-top: 0;
}

.admin-secret-box {
    margin: 12px 0;
    padding: 14px;
    border: 1px solid rgba(255, 174, 84, 0.58);
    border-radius: 11px;
    background: rgba(55, 34, 12, 0.48);
}

.admin-secret-box strong,
.admin-secret-box code {
    display: block;
    color: #ffe1a8;
}

.admin-secret-box pre,
.admin-secret-box code {
    margin: 9px 0;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
    font-size: 12px;
}

.admin-list {
    display: grid;
    gap: 8px;
    max-height: 360px;
    overflow-y: auto;
}

.admin-record {
    padding: 12px;
    border: 1px solid rgba(48, 76, 99, 0.62);
    border-radius: 11px;
    background: rgba(8, 18, 31, 0.78);
}

.admin-record strong {
    color: #dfedf7;
    font-size: 13px;
}

.admin-record small {
    color: #7890a3;
    font-size: 10px;
}

.admin-record-meta {
    margin: 7px 0 0;
    color: #9bb0c0;
    font-size: 11px;
}

.admin-record-actions {
    justify-content: flex-start;
    margin-top: 10px;
}

.admin-record-actions .danger-action {
    border-color: rgba(255, 104, 123, 0.5);
    color: #ffb6c0;
}

.admin-record-actions button:disabled,
.admin-disabled-feature button:disabled {
    border-color: #34485a;
    color: #708598;
    background: #152333;
    cursor: not-allowed;
}

.admin-status-pill {
    padding: 4px 7px;
    border-radius: 999px;
    color: #9ce7bd;
    background: rgba(45, 215, 139, 0.12);
    font-size: 8px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.admin-status-pill[data-state="closed"] {
    color: #8a9dad;
    background: rgba(112, 133, 151, 0.13);
}

.admin-disabled-feature {
    opacity: 0.78;
}

.admin-audit-list {
    max-height: 270px;
    margin-top: 16px;
}

.shop-nav-button {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-height: 48px;
    padding: 7px 13px;
    border: 1px solid rgba(184, 113, 255, 0.55);
    border-radius: 14px;
    color: #f1e5ff;
    background: linear-gradient(145deg, rgba(67, 24, 101, 0.82), rgba(11, 22, 35, 0.88));
    cursor: pointer;
}

.shop-nav-button > span:last-child {
    display: grid;
    text-align: left;
}

.shop-nav-button > span:first-child {
    color: #e7a7ff;
    filter: drop-shadow(0 0 8px rgba(218, 101, 255, .75));
}

.shop-nav-button small {
    color: #b99bc9;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.shop-nav-button[data-state="ready"] {
    border-color: rgba(102, 224, 255, .7);
    box-shadow: 0 0 24px rgba(131, 81, 255, .16);
}

.shop-nav-button[data-state="disabled"] {
    opacity: .72;
}

.shop-dialog,
.shop-confirm-dialog {
    width: min(1120px, calc(100% - 32px));
    max-height: min(900px, calc(100dvh - 32px));
    margin: auto;
    padding: 0;
    overflow: hidden;
    border: 1px solid rgba(128, 92, 220, .8);
    border-radius: 24px;
    color: #edf5ff;
    background: #07101c;
    box-shadow: 0 38px 130px rgba(0, 0, 0, .78), 0 0 80px rgba(127, 73, 224, .18);
}

.shop-dialog::backdrop,
.shop-confirm-dialog::backdrop {
    background: rgba(1, 4, 10, .84);
    backdrop-filter: blur(12px);
}

.shop-dialog-shell {
    max-height: min(900px, calc(100dvh - 32px));
    padding: clamp(22px, 4vw, 42px);
    overflow-y: auto;
    overscroll-behavior: contain;
    background:
        radial-gradient(circle at 82% 0%, rgba(143, 72, 224, .24), transparent 28rem),
        radial-gradient(circle at 10% 18%, rgba(40, 179, 216, .14), transparent 24rem),
        linear-gradient(145deg, rgba(12, 19, 37, .99), rgba(5, 10, 20, .99));
}

.shop-dialog-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.shop-dialog-header h2,
.shop-confirm-shell h2 {
    margin: 6px 0 0;
    font-size: clamp(27px, 4vw, 44px);
    letter-spacing: -.04em;
}

.shop-dialog-header p:not(.eyebrow) {
    margin: 9px 0 0;
    color: #a9bdd0;
}

.shop-balance {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    margin-top: 24px;
    padding: 11px 16px;
    border: 1px solid rgba(255, 199, 76, .45);
    border-radius: 15px;
    background: rgba(47, 33, 12, .5);
}

.shop-balance > div {
    display: grid;
}

.shop-balance small {
    color: #c9a95a;
    font-size: 8px;
    font-weight: 900;
    letter-spacing: .1em;
}

.shop-balance strong {
    color: #fff0aa;
    font-size: 20px;
}

.shop-status,
.shop-confirm-status {
    min-height: 22px;
    margin: 14px 0;
    color: #9fb5c8;
    font-size: 13px;
}

.shop-status[data-kind="error"],
.shop-confirm-status[data-kind="error"] { color: #ff9bab; }
.shop-status[data-kind="success"] { color: var(--green); }

.shop-tabs {
    display: flex;
    gap: 8px;
    margin: 18px 0;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(63, 93, 119, .5);
}

.shop-tabs button {
    padding: 10px 15px;
    border: 1px solid #344e67;
    border-radius: 999px;
    color: #9fb4c7;
    background: rgba(8, 18, 31, .75);
    cursor: pointer;
}

.shop-tabs button[aria-selected="true"] {
    border-color: #8f77ff;
    color: #fff;
    background: rgba(104, 70, 188, .3);
    box-shadow: inset 0 0 14px rgba(126, 91, 225, .14);
}

.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 16px;
}

.shop-card {
    display: grid;
    grid-template-rows: auto 1fr auto;
    overflow: hidden;
    border: 1px solid rgba(63, 93, 121, .7);
    border-radius: 18px;
    background: rgba(7, 16, 29, .88);
    box-shadow: 0 18px 42px rgba(0, 0, 0, .2);
}

.shop-card-visual {
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    padding: 13px;
    background:
        radial-gradient(circle, rgba(92, 100, 226, .22), transparent 64%),
        linear-gradient(145deg, rgba(20, 32, 54, .95), rgba(7, 12, 23, .95));
}

.shop-card-visual img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 13px;
}

.shop-card-visual.is-frame img {
    width: 86%;
    height: 86%;
}

.shop-card-body {
    padding: 16px 16px 8px;
}

.shop-card-body h3 {
    margin: 8px 0 5px;
    font-size: 19px;
}

.shop-card-body p {
    margin: 0;
    color: #91a7b9;
    font-size: 12px;
    line-height: 1.5;
}

.shop-origin-badge {
    display: inline-flex;
    padding: 4px 7px;
    border-radius: 999px;
    color: #d9c5ff;
    background: rgba(128, 83, 212, .2);
    font-size: 8px;
    font-weight: 900;
    letter-spacing: .1em;
}

.shop-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 13px 16px 16px;
}

.shop-price {
    color: #fff0aa;
    font-size: 17px;
}

.shop-card-footer button,
.shop-confirm-actions button {
    min-height: 40px;
    padding: 9px 13px;
    border: 1px solid rgba(101, 203, 240, .55);
    border-radius: 10px;
    color: #e7f8ff;
    background: linear-gradient(135deg, rgba(24, 123, 168, .8), rgba(60, 69, 175, .82));
    font-weight: 800;
    cursor: pointer;
}

.shop-card-footer button:disabled {
    border-color: #34485a;
    color: #7f92a2;
    background: #142130;
    cursor: not-allowed;
}

.shop-confirm-dialog {
    width: min(520px, calc(100% - 32px));
}

.shop-confirm-shell {
    padding: clamp(24px, 5vw, 38px);
    background: linear-gradient(145deg, rgba(15, 27, 48, .99), rgba(7, 13, 25, .99));
}

.shop-confirm-item {
    display: flex;
    align-items: center;
    gap: 13px;
    margin: 20px 0;
    padding: 12px;
    border: 1px solid rgba(75, 108, 137, .65);
    border-radius: 14px;
    background: rgba(7, 16, 29, .72);
}

.shop-confirm-item img {
    width: 74px;
    height: 74px;
    object-fit: contain;
    border-radius: 11px;
}

.shop-confirm-item strong { font-size: 18px; }

.shop-confirm-shell dl {
    display: grid;
    gap: 8px;
    margin: 0;
}

.shop-confirm-shell dl div {
    display: flex;
    justify-content: space-between;
    gap: 18px;
}

.shop-confirm-shell dt { color: #93a9bc; }
.shop-confirm-shell dd { margin: 0; color: #fff0aa; font-weight: 850; }

.shop-confirm-actions {
    display: flex;
    justify-content: flex-end;
    gap: 9px;
    margin-top: 18px;
}

.shop-confirm-actions button:first-child {
    border-color: #40566a;
    background: #142231;
}

@keyframes loading {
    from { background-position: 100% 0; }
    to { background-position: 0 0; }
}

@media (max-width: 760px) {
    .site-header {
        min-height: 76px;
    }

    .account-preview {
        gap: 6px;
        padding: 4px;
        border-color: transparent;
        background: transparent;
    }

    .account-preview .account-summary,
    .account-preview .account-dot {
        display: none;
    }

    .account-preview button {
        min-height: 38px;
        padding-inline: 10px;
    }

    .header-actions {
        margin-left: auto;
    }

    .shop-nav-button {
        min-height: 42px;
        padding: 6px 9px;
    }

    .shop-nav-button small {
        display: none;
    }

    .shop-grid {
        grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    }

    .coin-preview {
        min-height: 44px;
        padding: 5px 8px;
    }

    .coin-preview small {
        display: none;
    }

    .profile-wallet {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .profile-wallet > div {
        min-width: calc(100% - 62px);
        flex: 1 1 180px;
    }

    .profile-wallet > button {
        width: 100%;
        margin-left: 0;
    }

    .coin-earning-guide dl {
        grid-template-columns: 1fr;
    }

    .live-overview {
        min-height: 46px;
    }

    .live-stat {
        min-height: 34px;
        padding: 4px 8px;
    }

    .live-stat small {
        display: none;
    }

    main {
        padding-top: 55px;
    }

    .hero {
        grid-template-columns: 1fr;
        padding-bottom: 68px;
    }

    .platform-summary {
        grid-template-columns: repeat(3, 1fr);
    }

    .platform-summary div {
        padding: 15px 12px;
    }

    .platform-summary dt {
        font-size: 21px;
    }

    .platform-summary dd {
        font-size: 9px;
    }

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

    .future-panel {
        grid-template-columns: 1fr;
    }

    footer {
        flex-direction: column;
        gap: 5px;
    }

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

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

    .reward-dialog {
        width: calc(100% - 18px);
    }

    .reward-dialog-shell {
        padding: 23px 18px;
    }
}

@media (max-width: 430px) {
    .shop-nav-button > span:first-child,
    .shop-nav-button small {
        display: none;
    }

    .shop-nav-button {
        padding-inline: 10px;
    }

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

    .shop-tabs {
        overflow-x: auto;
    }
    .site-header,
    main,
    footer {
        width: min(100% - 26px, 1180px);
    }

    h1 {
        font-size: 47px;
    }

    .brand small {
        display: none;
    }

    .live-stat strong {
        font-size: 11px;
    }

    .live-players {
        padding-right: 6px;
    }

    .live-players {
        display: none;
    }

    .coin-preview {
        border-color: transparent;
        background: transparent;
        box-shadow: none;
    }

    .account-preview[data-state="disabled"] {
        display: none;
    }

    .account-portrait {
        width: 34px;
        height: 34px;
    }

    .account-dialog {
        width: calc(100% - 16px);
        max-height: calc(100dvh - 16px);
        border-radius: 17px;
    }

    .account-dialog-shell {
        max-height: calc(100dvh - 16px);
        padding: 19px 15px;
    }

    .account-dialog-header h2 {
        font-size: 24px;
    }

    .reward-dialog {
        max-height: calc(100dvh - 12px);
        border-radius: 18px;
    }

    .reward-dialog-shell {
        max-height: calc(100dvh - 12px);
        padding: 18px 14px;
    }

    .reward-header h2 {
        font-size: 24px;
    }

    .reward-result {
        margin-top: 18px;
        padding: 13px;
    }

    .reward-result-mark {
        width: 46px;
        height: 46px;
    }

    .reward-gain-grid {
        grid-template-columns: 1fr;
    }

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

    .reward-actions {
        flex-direction: column;
    }

    .reward-secondary {
        min-height: 42px;
    }

    .login-key-display,
    .profile-name-form > div {
        grid-template-columns: 1fr;
    }

    .profile-hero {
        grid-template-columns: auto minmax(0, 1fr);
        padding: 15px;
    }

    .profile-portrait {
        width: 78px;
        height: 78px;
    }

    .profile-level-badge {
        grid-column: 1 / -1;
        grid-template-columns: auto auto;
        justify-content: center;
        gap: 8px;
        min-width: 0;
        padding: 8px;
    }

    .profile-level-badge strong {
        font-size: 24px;
    }

    .level-progress > div,
    .level-claim,
    .profile-actions,
    .admin-titlebar,
    .admin-disabled-feature {
        align-items: stretch;
        flex-direction: column;
    }

    .level-claim button {
        width: 100%;
    }

    .admin-inline-form,
    .admin-search-form,
    .admin-overview {
        grid-template-columns: 1fr;
    }

    .profile-actions .danger-action {
        margin-left: 0;
    }

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

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