:root {
    --ink: #252a34;
    --ink-soft: rgba(37, 42, 52, 0.54);
    --ink-faint: rgba(37, 42, 52, 0.055);
    --muted: #687184;
    --paper: #edf2f8;
    --card: rgba(255, 255, 255, 0.74);
    --card-strong: rgba(255, 255, 255, 0.88);
    --surface: rgba(255, 255, 255, 0.92);
    --line: rgba(37, 42, 52, 0.16);
    --bar: rgba(248, 250, 254, 0.76);
    --error: #b3402f;
    --green: #4c8a62;
    --accent: #5964d7;
    --accent-strong: #424db5;
    --accent-soft: rgba(89, 100, 215, 0.12);
    --atmosphere-a: rgba(255, 255, 255, 0.3);
    --atmosphere-b: rgba(101, 119, 221, 0.16);
    --vignette: rgba(24, 34, 58, 0.14);
    --veil: rgba(255, 255, 255, 0.2);
    --hand: "Segoe Print", "Ink Free", "Comic Sans MS", cursive;
    --hand-head: "Ink Free", "Segoe Print", "Comic Sans MS", cursive;
    --sans: "Trebuchet MS", "Segoe UI", sans-serif;
    --scrawl-lg: 24px;
    --scrawl-md: 16px;
    --scrawl-sm: 12px;
    --pencil-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.72),
        0 18px 46px rgba(35, 48, 84, 0.16),
        0 5px 14px rgba(35, 48, 84, 0.08);
    --pencil-shadow-hover:
        inset 0 1px 0 rgba(255, 255, 255, 0.78),
        0 22px 56px rgba(35, 48, 84, 0.21),
        0 7px 18px rgba(35, 48, 84, 0.1);
    --control-shadow: 0 8px 20px rgba(35, 48, 84, 0.11);

     
    --sky-top: #58a6e8;
    --sky-mid: #9ecdf3;
    --sky-bottom: #e8f4fd;
    --cloud: rgba(255, 255, 255, 0.92);
    --clouds-front: 0.72;
    --clouds-back: 0.34;
    --glow-color: rgba(255, 255, 255, 0.35);
    --glow-opacity: 0;
    --stars-opacity: 0;
    --birds-opacity: 0;
}

* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    background-color: var(--paper);
    font-family: var(--sans);
}

 
.sky {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
    background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-mid) 58%, var(--sky-bottom) 100%);
}

.sky__layer {
    position: absolute;
    inset: 0;
}

 


body.sky-day {
    --birds-opacity: 0.45;
}



body.sky-night {
    --sky-top: #070b1d;
    --sky-mid: #101731;
    --sky-bottom: #1a2340;
    --cloud: rgb(112, 133, 172);
    --clouds-front: 0.48;
    --clouds-back: 0.22;
    --glow-opacity: 0;
    --stars-opacity: 1;

    --ink: #e8edf8;
    --ink-soft: rgba(232, 237, 248, 0.5);
    --ink-faint: rgba(232, 237, 248, 0.07);
    --muted: #a3adc6;
    --paper: #0d1226;
    --card: rgba(15, 21, 42, 0.72);
    --card-strong: rgba(22, 30, 56, 0.88);
    --surface: rgba(31, 40, 72, 0.94);
    --line: rgba(232, 237, 248, 0.16);
    --bar: rgba(10, 15, 32, 0.78);
    --error: #ff9b85;
    --accent: #9ba5ff;
    --accent-strong: #bac1ff;
    --accent-soft: rgba(155, 165, 255, 0.14);
    --atmosphere-a: rgba(92, 110, 205, 0.18);
    --atmosphere-b: rgba(74, 121, 188, 0.14);
    --vignette: rgba(1, 4, 14, 0.42);
    --veil: rgba(10, 15, 32, 0.26);
    --pencil-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 18px 46px rgba(0, 0, 0, 0.34),
        0 5px 14px rgba(0, 0, 0, 0.22);
    --pencil-shadow-hover:
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 22px 56px rgba(0, 0, 0, 0.44),
        0 7px 18px rgba(0, 0, 0, 0.28);
    --control-shadow: 0 8px 20px rgba(0, 0, 0, 0.24);
}

body.sky-night .primary-action img,
body.sky-night .download-rail img {
    filter: brightness(0);
}

body.sky-night .side-nav__item img,
body.sky-night .icon-button img,
body.sky-night .search img,
body.sky-night .heading-icon,
body.sky-night .stub-panel img,
body.sky-night .download-panel img,
body.sky-night .secondary-action img,
body.sky-night .avatar-preset__edit img,
body.sky-night .view-all img,
body.sky-night .robux-card img {
    filter: invert(1);
}

body.sky-night .game-art,
body.sky-night .item-art {
    filter: saturate(0.65) brightness(0.98);
}

.auth-wrap,
.app-shell {
    position: relative;
    z-index: 1;
}

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

[data-page],
.person-avatar,
.person-meta a,
.profile-friend,
.profile-stats a,
.profile-panel__heading a {
    color: inherit;
    text-decoration: none;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
    outline: 3px solid var(--accent-soft);
    outline-offset: 3px;
}

button:disabled {
    cursor: wait;
    opacity: 0.64;
}

.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 236px 1fr;
    grid-template-rows: 70px 1fr;
}

 

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 22px;
    padding: 0 24px;
    border-bottom: 1px solid var(--line);
    background: var(--bar);
    -webkit-backdrop-filter: blur(18px) saturate(1.08);
    backdrop-filter: blur(18px) saturate(1.08);
    box-shadow: 0 10px 30px rgba(28, 42, 78, 0.08);
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--ink);
    transform: rotate(-0.8deg);
}

.brand img {
    width: 52px;
    height: auto;
    display: block;
}

.brand span {
    font-family: var(--hand-head);
    font-size: 30px;
    font-weight: 700;
    letter-spacing: 0.06em;
}

.topnav {
    display: flex;
    align-items: center;
    gap: 24px;
}

.topnav__item,
.view-all,
.side-nav__item {
    border: 0;
    background: transparent;
    color: var(--ink);
    font-family: var(--sans);
}

.topnav__item {
    position: relative;
    padding: 10px 0;
    font-size: 15px;
    font-weight: 700;
}

.topnav__item::after {
    content: "";
    position: absolute;
    left: -3px;
    right: -3px;
    bottom: 2px;
    height: 3px;
    border-radius: 999px;
    background: var(--accent);
    transform: scaleX(0);
    transition: transform 160ms ease;
}

.topnav__item:hover::after,
.topnav__item.is-active::after {
    transform: scaleX(1);
}

.search {
    width: min(520px, 32vw);
    min-width: 300px;
    height: 42px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 15px;
    border: 1px solid var(--line);
    border-radius: var(--scrawl-sm);
    background: var(--card);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.54);
    transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.search:focus-within {
    border-color: var(--accent);
    background: var(--surface);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.search img {
    width: 21px;
    height: 21px;
    opacity: 0.75;
}

.search input {
    border: 0;
    outline: 0;
    width: 100%;
    color: var(--ink);
    background: transparent;
    font-size: 16px;
}

.search input::placeholder {
    color: var(--muted);
}

.wallet {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 5px 11px 5px 7px;
    border: 1px solid transparent;
    border-radius: 14px;
    background: transparent;
    color: var(--ink);
    font-size: 18px;
    font-weight: 700;
    font-family: var(--sans);
    transition: border-color 160ms ease, background 160ms ease;
}

.wallet:hover {
    border-color: var(--line);
    background: var(--card);
}

 
.wallet__coin {
    width: 22px;
    height: 24px;
    display: inline-block;
    flex: 0 0 auto;
    overflow: hidden;
    background: currentColor;
    font-size: 0;
    -webkit-mask: url("/site/icons/robux.svg") center / contain no-repeat;
    mask: url("/site/icons/robux.svg") center / contain no-repeat;
    transition: transform 180ms ease;
}

.wallet:hover .wallet__coin {
    transform: translateY(-1px);
}

.wallet__coin--big {
    width: 44px;
    height: 48px;
}

.icon-button {
    position: relative;
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: var(--scrawl-sm);
    background: var(--card);
    box-shadow: var(--control-shadow);
    transition: transform 160ms ease;
}

.icon-button:hover {
    border-color: var(--accent);
    transform: translateY(-1px);
}

.icon-button img {
    width: 23px;
    height: 23px;
    display: block;
}

.icon-button .badge {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 21px;
    height: 21px;
    display: grid;
    place-items: center;
    border-radius: 52% 48% 50% 50% / 48% 52% 48% 52%;
    background: var(--ink);
    color: var(--paper);
    font-size: 12px;
    font-weight: 700;
}

.settings-menu {
    position: relative;
    flex: 0 0 auto;
}

.settings-menu__popover,
.profile-overflow__menu {
    position: absolute;
    z-index: 40;
    right: 0;
    top: calc(100% + 8px);
    width: 168px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--card-strong);
    box-shadow: var(--pencil-shadow-hover);
}

.settings-menu__popover a,
.settings-menu__popover button,
.profile-overflow__menu a,
.profile-overflow__menu button {
    width: 100%;
    min-height: 42px;
    display: flex;
    align-items: center;
    padding: 0 14px;
    border: 0;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
    background: transparent;
    text-align: left;
    font: 650 14px var(--sans);
}

.settings-menu__popover > *:last-child,
.profile-overflow__menu > *:last-child {
    border-bottom: 0;
}

.settings-menu__popover a:hover,
.settings-menu__popover button:hover,
.profile-overflow__menu a:hover,
.profile-overflow__menu button:hover {
    background: var(--accent-soft);
}

.profile-overflow__menu button:disabled {
    cursor: not-allowed;
    color: var(--muted);
    opacity: 0.62;
}

 

.sidebar {
    position: sticky;
    top: 70px;
    height: calc(100vh - 70px);
    padding: 18px 14px;
    border-right: 1px solid var(--line);
    background: var(--bar);
    -webkit-backdrop-filter: blur(18px) saturate(1.08);
    backdrop-filter: blur(18px) saturate(1.08);
    box-shadow: 12px 0 34px rgba(28, 42, 78, 0.07);
}

.user-chip {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding: 9px 10px;
    border: 1px solid transparent;
    border-radius: var(--scrawl-md);
    background: transparent;
    color: var(--ink);
    text-align: left;
    transition: border-color 160ms ease, transform 160ms ease;
}

.user-chip:hover {
    border-color: var(--line);
    background: var(--card);
}

.user-chip__avatar {
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--surface);
}

.user-chip__avatar img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.user-chip__meta {
    display: grid;
    gap: 2px;
}

.user-chip__meta strong {
    font-family: var(--sans);
    font-size: 16px;
}

.user-chip__meta span {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
}

.side-nav {
    display: grid;
    gap: 5px;
}

.side-nav__item {
    height: 44px;
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 0 12px;
    border: 1px solid transparent;
    border-radius: var(--scrawl-md);
    font-size: 15px;
    font-weight: 600;
    text-align: left;
    transition: border-color 160ms ease, transform 160ms ease, background 160ms ease;
}

.side-nav__item img {
    width: 23px;
    height: 23px;
    object-fit: contain;
    opacity: 0.85;
}

.side-nav__item:hover,
.side-nav__item.is-active {
    border-color: var(--accent-soft);
    background: var(--accent-soft);
    color: var(--accent-strong);
}

.side-nav__item:hover {
    transform: translateX(2px);
}

.side-nav__item:nth-child(even):hover {
    transform: translateX(2px);
}

.download-rail {
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 20px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 0;
    border-radius: var(--scrawl-md);
    color: var(--paper);
    background: var(--accent);
    box-shadow: var(--pencil-shadow);
    font-family: var(--sans);
    font-size: 15px;
    font-weight: 700;
    transition: background 160ms ease, transform 160ms ease;
}

.download-rail:hover {
    background: var(--accent-strong);
    transform: translateY(-2px);
}

.download-rail img {
    width: 26px;
    filter: brightness(0) invert(1);
}

 

.content {
    padding: 30px clamp(20px, 3vw, 48px) 84px;
    overflow: hidden;
}

.page {
    display: none;
    animation: pageIn 320ms ease-out both;
}

.page.is-active {
    display: block;
}

@keyframes pageIn {
    from {
        opacity: 0;
        transform: translateY(7px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-card,
.page-card {
    border: 1px solid var(--line);
    border-radius: var(--scrawl-lg);
    background: var(--card);
    box-shadow: var(--pencil-shadow);
    -webkit-backdrop-filter: blur(18px) saturate(1.06);
    backdrop-filter: blur(18px) saturate(1.06);
}

.hero-card {
    position: relative;
    min-height: 210px;
    display: flex;
    align-items: center;
    gap: 34px;
    padding: 30px 40px;
    background: linear-gradient(135deg, var(--card-strong), var(--card));
}

.avatar-orb {
    position: relative;
    flex: 0 0 auto;
    width: 150px;
    height: 150px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--surface);
    box-shadow: 0 10px 30px rgba(35, 48, 84, 0.1);
    display: grid;
    place-items: center;
    overflow: hidden;
    color: var(--accent-strong);
    font: 800 46px var(--sans);
}

.avatar-orb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-orb--small {
    width: 132px;
    height: 132px;
    border-width: 2.5px;
}

.hero-profile {
    display: grid;
    gap: 10px;
}

.hero-profile p {
    color: var(--muted);
    font-size: 16px;
    font-weight: 600;
}

h1,
h2,
p {
    margin: 0;
}

h1 {
    font-family: var(--hand-head);
    font-size: clamp(34px, 4vw, 46px);
    font-weight: 700;
    letter-spacing: 0.04em;
}

h2 {
    font-family: var(--hand-head);
    font-size: 25px;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.empty-state__icon {
    width: 42px;
    height: 42px;
    opacity: 0.7;
}

.primary-action,
.secondary-action {
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border-radius: var(--scrawl-sm);
    padding: 0 22px;
    font-family: var(--sans);
    font-size: 15px;
    font-weight: 700;
    transition: transform 160ms ease;
}

.primary-action:hover,
.secondary-action:hover {
    transform: translateY(-2px);
}

.primary-action:hover {
    background: var(--accent-strong);
}

.primary-action {
    border: 1px solid var(--accent);
    color: var(--paper);
    background: var(--accent);
    box-shadow: var(--pencil-shadow);
    text-decoration: none;
}

.secondary-action {
    border: 1px solid var(--line);
    color: var(--ink);
    background: var(--surface);
    box-shadow: var(--pencil-shadow);
}

.primary-action img,
.secondary-action img {
    width: 23px;
    height: 23px;
    object-fit: contain;
}

.primary-action img {
    filter: brightness(0) invert(1);
}

.online-dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--green);
}

.stub-panel {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 34px 28px;
    border: 1px dashed var(--ink-soft);
    border-radius: var(--scrawl-md);
    background: var(--card);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    color: var(--muted);
    font-size: 15px;
    font-weight: 600;
}

.stub-panel img {
    width: 34px;
    height: 34px;
    opacity: 0.6;
}

.home-section {
    margin-top: 32px;
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 0 16px;
}

.section-heading h2 {
    display: flex;
    align-items: center;
    gap: 10px;
}

.heading-icon {
    width: 23px;
    height: 23px;
    opacity: 0.8;
}

.view-all {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    font-size: 16px;
    font-weight: 600;
    border-bottom: 2px dashed var(--ink-soft);
    padding-bottom: 2px;
}

.view-all img {
    width: 17px;
    opacity: 0.7;
}

 

.popular-grid,
.catalog-grid {
    display: grid;
    gap: 24px;
}

.popular-grid {
    grid-template-columns: repeat(4, minmax(170px, 1fr));
    gap: 16px;
}

.catalog-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.item-card {
    border: 1px solid var(--line);
    border-radius: var(--scrawl-md);
    background: var(--card-strong);
    box-shadow: var(--control-shadow);
    overflow: hidden;
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.item-card:nth-child(odd) {
    transform: none;
}

.item-card:nth-child(even) {
    transform: none;
}

.item-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--pencil-shadow-hover);
}

.game-art {
    height: 130px;
    margin: 12px 12px 0;
    border: 0;
    border-radius: var(--scrawl-sm);
    background:
        radial-gradient(circle at 20% 22%, rgba(255,255,255,0.9), transparent 10%),
        linear-gradient(135deg, var(--art-a), var(--art-b));
    filter: saturate(0.6) brightness(1.12);
    position: relative;
    overflow: hidden;
}

.game-card {
    min-width: 0;
}

.game-card:hover .game-art {
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(22, 31, 56, 0.18);
}

.game-art::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(130deg, transparent 0 42%, rgba(255,255,255,0.18) 43% 47%, transparent 48%),
        radial-gradient(circle at 80% 70%, rgba(0,0,0,0.28), transparent 36%);
}

.game-art::after {
    content: "";
    position: absolute;
    left: 12%;
    right: 8%;
    bottom: 0;
    height: 40%;
    background: linear-gradient(180deg, transparent, rgba(10, 18, 30, 0.5));
    clip-path: polygon(0 90%, 14% 45%, 26% 76%, 40% 30%, 54% 78%, 69% 38%, 84% 72%, 100% 20%, 100% 100%, 0 100%);
}

.game-card__body {
    padding: 8px 1px 0;
}

.game-card h3 {
    min-height: 38px;
    margin: 0 0 5px;
    overflow: hidden;
    font-family: var(--sans);
    font-size: 14px;
    font-weight: 800;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.game-card h3 a {
    color: inherit;
}

.game-card__link {
    display: block;
}

.game-card__metrics {
    display: flex;
    align-items: center;
    gap: 13px;
    color: var(--muted);
    font: 750 12px var(--sans);
}

.game-card__metrics span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.game-card__metrics img {
    width: 14px;
    height: 14px;
    opacity: 0.72;
}

.progress-row,
.stats-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.progress {
    flex: 1;
    height: 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    overflow: hidden;
}

.progress span {
    display: block;
    height: 100%;
    width: var(--progress);
    background: repeating-linear-gradient(
        -55deg,
        var(--ink) 0 3px,
        transparent 3px 7px
    );
}

.continue-button {
    border: 1px solid var(--line);
    border-radius: var(--scrawl-sm);
    background: var(--surface);
    padding: 6px 14px;
    color: var(--ink);
    font-family: var(--sans);
    font-weight: 700;
    transition: transform 140ms ease;
}

.continue-button:hover {
    border-color: var(--accent);
    transform: translateY(-1px);
}

.stats-row {
    justify-content: flex-start;
    gap: 8px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 600;
}

 

.page-card {
    padding: 32px;
}

.page-card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
}

.eyebrow {
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.muted {
    max-width: 680px;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.65;
}

 
.muted,
.eyebrow,
.item-price,
.stats-row,
.user-chip__meta span,
.search input,
.auth-field,
.auth-error,
.stub-panel,
.hero-profile p {
    font-family: var(--sans);
}

.item-art {
    height: 150px;
    display: grid;
    place-items: center;
     
    overflow: hidden;
    margin: 12px 12px 0;
    border: 0;
    border-radius: var(--scrawl-sm);
    background:
        radial-gradient(circle at 24% 20%, rgba(255, 255, 255, 0.35), transparent 42%),
        linear-gradient(135deg, var(--art-a), var(--art-b));
    filter: saturate(0.6) brightness(1.12);
}

.item-art img {
    width: 56px;
    height: 56px;
    filter: brightness(0) invert(1);
    opacity: 0.92;
}

.item-card h3 {
    margin: 14px 16px 5px;
    font-family: var(--sans);
    font-size: 17px;
    font-weight: 700;
}

.item-price {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 16px 16px;
    font-size: 16px;
    font-weight: 700;
}

.item-price .wallet__coin {
    width: 18px;
    height: 20px;
    vertical-align: -4px;
}

 

.games-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

.game-art--image,
.item-art--image {
    background: var(--surface);
    filter: none;
}

.game-card .game-art {
    height: auto;
    aspect-ratio: 16 / 9;
    margin: 0;
    border-radius: 9px;
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.game-art--image::before,
.game-art--image::after {
    display: none;
}

.game-art--image img,
.item-art--image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: none;
    opacity: 1;
}

.item-art--image img {
    box-sizing: border-box;
    object-fit: contain;
    padding: 8px;
     
    align-self: stretch;
    justify-self: stretch;
    min-height: 0;
    min-width: 0;
}

.item-card__body {
    display: grid;
    gap: 8px;
    padding: 14px 16px 16px;
}

.item-card__body h3,
.item-card__body .item-price {
    margin: 0;
}

.item-type {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.card-copy {
    min-height: 40px;
    margin: -4px 0 12px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.card-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.compact-action {
    height: 36px;
    min-width: 84px;
    padding: 0 14px;
    font-size: 13px;
}

button:disabled {
    cursor: default;
    opacity: 0.58;
    transform: none !important;
}

.inline-empty {
    grid-column: 1 / -1;
    padding: 28px;
    border: 1px dashed var(--ink-soft);
    border-radius: var(--scrawl-md);
    color: var(--muted);
    background: var(--card);
    font-family: var(--sans);
    font-size: 14px;
    font-weight: 650;
    text-align: center;
}

.avatar-editor,
.friends-page {
    display: grid;
    gap: 24px;
}

.avatar-editor__header {
    margin-bottom: 0;
}

.avatar-editor__actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar-workspace {
    display: grid;
    grid-template-columns: minmax(250px, 286px) minmax(0, 1fr);
    align-items: start;
    gap: 20px;
}

.avatar-preview-panel,
.avatar-library {
    border: 1px solid var(--line);
    background: var(--card);
    box-shadow: var(--control-shadow);
}

.avatar-preview-panel {
    position: sticky;
    top: 96px;
    display: grid;
    gap: 10px;
    padding: 10px;
    border-radius: 16px;
}

.avatar-preview {
    position: relative;
    display: grid;
    gap: 9px;
}

.avatar-preview__mode {
    position: absolute;
    z-index: 6;
    top: 12px;
    right: 12px;
    display: inline-flex;
    padding: 3px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
    box-shadow: var(--control-shadow);
    backdrop-filter: blur(10px);
}

.avatar-preview__mode-button {
    min-width: 42px;
    height: 32px;
    padding: 0 10px;
    border: 0;
    border-radius: 8px 7px 9px 7px;
    color: var(--muted);
    background: transparent;
    font: 800 12px var(--sans);
    cursor: pointer;
}

.avatar-preview__mode-button:hover,
.avatar-preview__mode-button.is-active {
    color: #fff;
    background: var(--accent);
}

.avatar-preview__mode-button:focus-visible {
    outline-color: rgba(89, 100, 215, 0.42);
    outline-offset: 2px;
}

.avatar-preview-stage {
    position: relative;
    height: auto;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 12px;
    background:
        radial-gradient(circle at 50% 25%, rgba(255, 255, 255, 0.9), transparent 34%),
        linear-gradient(155deg, var(--accent-soft), var(--surface) 60%, rgba(177, 188, 214, 0.42));
}

.avatar-preview-stage::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(115deg, rgba(255, 255, 255, 0.26), transparent 38%),
        linear-gradient(0deg, rgba(80, 58, 41, 0.16), transparent 31%);
}

.avatar-preview__image,
.avatar-preview__canvas {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    user-select: none;
}

.avatar-preview__canvas {
    cursor: grab;
    touch-action: none;
}

.avatar-preview__canvas:focus-visible {
    outline: 3px solid rgba(89, 100, 215, 0.52);
    outline-offset: -5px;
    border-radius: 14px 18px 15px 20px;
}

.avatar-preview.is-dragging .avatar-preview__canvas {
    cursor: grabbing;
}

.avatar-preview__loading,
.avatar-preview__error {
    position: absolute;
    z-index: 4;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 10px;
    padding: 36px 24px;
    color: var(--muted);
    background: var(--card-strong);
    font: 750 13px/1.45 var(--sans);
    text-align: center;
    backdrop-filter: blur(7px);
}

.avatar-preview__error strong {
    color: var(--ink);
    font: 800 18px var(--sans);
}

.avatar-preview__error span {
    max-width: 230px;
}

.avatar-preview[data-preview-state="offline"] .avatar-preview__error {
    background: var(--surface);
}

.avatar-preview__spinner {
    width: 28px;
    height: 28px;
    border: 3px solid rgba(89, 100, 215, 0.2);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: avatarSpinner 800ms linear infinite;
}

@keyframes avatarSpinner {
    to { transform: rotate(360deg); }
}

.avatar-preview__hint {
    margin: 0;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    text-align: center;
}

.avatar-preview-panel__meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.avatar-preview-panel__meta > div {
    display: grid;
    gap: 3px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: var(--scrawl-sm);
    background: var(--surface);
}

.avatar-preview-label {
    color: var(--muted);
    font-size: 11px;
    font-weight: 750;
    text-transform: uppercase;
}

.avatar-preview-panel__meta strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
}

.avatar-redraw {
    width: 100%;
    min-height: 39px;
}

.avatar-preview--compact .avatar-preview-stage {
    aspect-ratio: 1 / 1;
}

.avatar-preview--compact .avatar-preview__mode,
.avatar-preview--profile .avatar-preview__mode {
    top: 9px;
    right: 9px;
}

.avatar-preview--compact .avatar-preview__mode-button,
.avatar-preview--profile .avatar-preview__mode-button {
    min-width: 36px;
    height: 28px;
    padding: 0 7px;
}

.avatar-library {
    min-width: 0;
    overflow: hidden;
    border-radius: 17px 21px 15px 19px;
}

.avatar-category-nav {
    position: relative;
    z-index: 12;
}

.avatar-tabs {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    border-bottom: 1px solid var(--line);
    background: var(--bar);
    overscroll-behavior-inline: contain;
}

.avatar-tab,
.friends-tab {
    position: relative;
    min-height: 54px;
    border: 0;
    color: var(--muted);
    background: transparent;
    font: 800 13px var(--sans);
    cursor: pointer;
}

.avatar-tab {
    padding: 0 19px 0 10px;
    white-space: nowrap;
}

.avatar-tab::before {
    content: "";
    position: absolute;
    top: 50%;
    right: 9px;
    width: 6px;
    height: 6px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: translateY(-70%) rotate(45deg);
    opacity: 0.7;
}

.avatar-tab::after,
.friends-tab::after {
    content: "";
    position: absolute;
    right: 16%;
    bottom: 0;
    left: 16%;
    height: 3px;
    border-radius: 999px 700px 999px 620px;
    background: transparent;
    transform: rotate(-0.4deg);
}

.avatar-tab:hover,
.avatar-tab.is-active,
.friends-tab:hover,
.friends-tab.is-active {
    color: var(--ink);
    background: var(--ink-faint);
}

.avatar-tab.is-active::after,
.friends-tab.is-active::after {
    background: var(--accent);
}

.avatar-category-flyout {
    position: absolute;
    z-index: 30;
    top: calc(100% - 1px);
    left: 8px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
    width: max-content;
    max-width: calc(100% - 16px);
    max-height: 176px;
    overflow: auto;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 0 0 12px 10px;
    background: var(--surface);
    box-shadow: var(--pencil-shadow-hover);
    backdrop-filter: blur(16px);
    animation: avatarFlyoutIn 120ms ease-out;
}

@keyframes avatarFlyoutIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.avatar-subtab {
    min-height: 34px;
    padding: 0 11px;
    border: 1px solid transparent;
    border-radius: 9px 7px 10px 8px;
    color: var(--muted);
    background: transparent;
    font: 750 12px var(--sans);
    cursor: pointer;
}

.avatar-subtab:hover,
.avatar-subtab:focus-visible,
.avatar-subtab.is-active {
    border-color: var(--line);
    color: var(--accent-strong);
    background: var(--accent-soft);
}

.avatar-library__heading,
.friends-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.avatar-library__heading {
    padding: 20px 18px 13px;
}

.avatar-library__heading h2,
.friends-toolbar h2 {
    margin: 3px 0 0;
}

.avatar-library__heading .eyebrow,
.friends-toolbar .eyebrow {
    margin: 0;
}

.avatar-item-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
    gap: 12px;
    padding: 0 18px 20px;
}

.avatar-item-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 13px 16px 12px 15px;
    background: var(--card-strong);
    box-shadow: 0 7px 16px rgba(35, 48, 84, 0.08);
    transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.avatar-item-card:hover {
    border-color: var(--accent);
    box-shadow: var(--control-shadow);
    transform: translateY(-2px) rotate(-0.15deg);
}

.avatar-item-card.is-equipped {
    border-color: rgba(89, 100, 215, 0.48);
}

.avatar-item-card__art {
    position: relative;
    height: 134px;
    padding: 7px;
    border-bottom: 1px solid var(--line);
    background:
        radial-gradient(circle at 28% 20%, rgba(255, 255, 255, 0.55), transparent 38%),
        var(--accent-soft);
}

.avatar-item-card__art img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.avatar-item-card__check {
    position: absolute;
    top: 9px;
    right: 9px;
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 9px 7px 10px 8px;
    color: var(--paper);
    background: var(--accent);
    box-shadow: var(--control-shadow);
    font-size: 16px;
    font-weight: 900;
}

.avatar-item-card__body {
    display: grid;
    gap: 7px;
    padding: 10px;
}

.avatar-item-card__body h3 {
    min-height: 36px;
    margin: 0;
    overflow: hidden;
    font: 750 14px/1.35 var(--sans);
}

.avatar-item-card__body .compact-action {
    width: 100%;
}

.avatar-presets {
    grid-column: 1 / -1;
    min-width: 0;
}

.avatar-presets__toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
    color: var(--ink);
    font: 750 13px var(--sans);
}

.avatar-presets__toolbar b {
    margin: 0 5px;
    color: var(--muted);
}

.avatar-presets__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(132px, 156px));
    gap: 14px;
}

.avatar-presets__empty .inline-empty {
    min-height: 150px;
}

.avatar-preset {
    min-width: 0;
}

.avatar-preset__art {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: visible;
    border: 1px solid var(--line);
    border-radius: 10px;
    background:
        radial-gradient(circle at 32% 18%, rgba(255, 255, 255, 0.34), transparent 42%),
        var(--card-strong);
    box-shadow: 0 7px 16px rgba(35, 48, 84, 0.08);
    transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.avatar-preset:hover .avatar-preset__art {
    border-color: var(--accent);
    box-shadow: var(--control-shadow);
    transform: translateY(-2px);
}

.avatar-preset__apply,
.avatar-preset__name,
.avatar-preset__edit,
.avatar-preset__menu button {
    border: 0;
    color: inherit;
    background: transparent;
    font-family: var(--sans);
    cursor: pointer;
}

.avatar-preset__apply {
    width: 100%;
    height: 100%;
    padding: 7px;
    border-radius: inherit;
}

.avatar-preset__apply > img,
.avatar-preset__placeholder,
.avatar-preset__placeholder img {
    width: 100%;
    height: 100%;
}

.avatar-preset__apply > img {
    display: block;
    object-fit: contain;
}

.avatar-preset__placeholder {
    display: grid;
    place-items: center;
    opacity: 0.38;
}

.avatar-preset__placeholder img {
    width: 42%;
    height: 42%;
    object-fit: contain;
}

.avatar-preset__edit {
    position: absolute;
    z-index: 3;
    top: 7px;
    right: 7px;
    width: 25px;
    height: 25px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--card);
    box-shadow: var(--control-shadow);
}

.avatar-preset__edit img {
    width: 14px;
    height: 14px;
}

.avatar-preset__menu {
    position: absolute;
    z-index: 4;
    inset: 6px;
    display: grid;
    align-content: center;
    gap: 3px;
    padding: 27px 10px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--card-strong);
    box-shadow: var(--pencil-shadow);
}

.avatar-preset__menu[hidden] {
    display: none;
}

.avatar-preset__menu button {
    min-height: 25px;
    border-radius: 7px;
    color: var(--ink);
    font-size: 12px;
    font-weight: 800;
}

.avatar-preset__menu button:hover,
.avatar-preset__menu button:focus-visible {
    color: var(--accent-strong);
    background: var(--accent-soft);
}

.avatar-preset__menu button.is-danger:hover,
.avatar-preset__menu button.is-danger:focus-visible {
    color: var(--error);
}

.avatar-preset__name {
    display: block;
    width: 100%;
    padding: 7px 2px 0;
    overflow: hidden;
    color: var(--ink);
    font-size: 13px;
    font-weight: 800;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.avatar-preset__apply:focus-visible,
.avatar-preset__name:focus-visible,
.avatar-preset__edit:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

body.has-modal {
    overflow: hidden;
}

.avatar-preset-modal {
    position: fixed;
    z-index: 1200;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 20px;
}

.avatar-preset-modal__backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    background: rgba(4, 7, 16, 0.72);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
}

.avatar-preset-dialog {
    position: relative;
    width: min(100%, 430px);
    display: grid;
    gap: 18px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 16px;
    color: var(--ink);
    background: var(--surface);
    box-shadow: var(--pencil-shadow-hover);
    animation: presetDialogIn 160ms ease-out both;
}

@keyframes presetDialogIn {
    from { opacity: 0; transform: translateY(10px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.avatar-preset-dialog__header,
.avatar-preset-dialog__actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.avatar-preset-dialog__header h2 {
    margin: 0;
    font: 800 17px var(--sans);
}

.avatar-preset-dialog__message {
    margin: -3px 0 0;
    color: var(--ink-soft);
    font-size: 13px;
    line-height: 1.5;
}

.avatar-preset-dialog__close {
    width: 36px;
    height: 36px;
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    padding: 0 0 2px;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: var(--ink);
    background: var(--card-strong);
    font: 400 27px/1 var(--sans);
}

.avatar-preset-dialog__field {
    display: grid;
    gap: 7px;
    color: var(--ink);
    font-size: 12px;
    font-weight: 800;
}

.avatar-preset-dialog__field input {
    width: 100%;
    height: 42px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 9px;
    color: var(--ink);
    background: var(--card-strong);
    outline: none;
}

.avatar-preset-dialog__field input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.avatar-preset-dialog__actions {
    justify-content: flex-end;
}

.avatar-preset-dialog__actions button {
    min-width: 82px;
}

.avatar-preset-dialog__actions .avatar-preset-dialog__danger {
    border-color: var(--error);
    color: #fff;
    background: var(--error);
}

.import-panel {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) minmax(210px, 320px) auto;
    align-items: center;
    gap: 20px;
    padding: 22px;
    border: 1px dashed var(--ink-soft);
    border-radius: var(--scrawl-md);
    background: var(--card);
}

.import-panel h2,
.inventory-heading h2 {
    margin: 0 0 6px;
}

.avatar-import-panel {
    border-style: solid;
}

.avatar-import-status {
    grid-column: 1 / -1;
    display: grid;
    gap: 9px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.avatar-import-status[hidden] { display: none; }
.avatar-import-status__copy { display: flex; justify-content: space-between; gap: 18px; }
.avatar-import-progress { height: 8px; overflow: hidden; border-radius: 999px; background: var(--surface); }
.avatar-import-progress span { display: block; width: 4%; height: 100%; background: var(--accent); transition: width 240ms ease; }

.inline-field input,
.friend-search input {
    width: 100%;
    height: 46px;
    border: 1px solid var(--line);
    border-radius: var(--scrawl-sm);
    padding: 0 15px;
    color: var(--ink);
    background: var(--surface);
    box-shadow: var(--control-shadow);
    font: 650 14px var(--sans);
    outline: none;
}

.inline-field input:focus,
.friend-search input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft), var(--control-shadow);
}

.inline-message {
    padding: 12px 15px;
    border-left: 3px solid var(--accent);
    color: var(--muted);
    background: var(--accent-soft);
    font: 650 14px/1.5 var(--sans);
}

.friend-search {
    display: grid;
    grid-template-columns: minmax(210px, 360px) auto;
    gap: 12px;
    justify-content: start;
}

.friends-tabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 15px 18px 12px 16px;
    background: var(--bar);
}

.friends-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.tab-count {
    min-width: 24px;
    height: 24px;
    display: inline-grid;
    place-items: center;
    padding: 0 6px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    background: var(--surface);
    font-size: 11px;
}

.friends-panel {
    display: grid;
    gap: 20px;
}

.friends-panel[hidden] {
    display: none;
}

.friends-toolbar {
    min-height: 54px;
}

.friend-search-results {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 12px;
}

.friend-search-results:empty {
    display: none;
}

.people-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 14px;
}

.people-grid:empty,
.friend-search-results:empty {
    display: none;
}

.person-card {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    min-width: 0;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 14px 18px 13px 16px;
    background: var(--card-strong);
    box-shadow: var(--control-shadow);
}

.person-avatar {
    position: relative;
    flex: 0 0 auto;
    width: 64px;
    height: 64px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: var(--paper);
    background:
        radial-gradient(circle at 32% 25%, rgba(255, 255, 255, 0.42), transparent 33%),
        linear-gradient(145deg, var(--accent), var(--accent-strong));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.46), 0 7px 15px rgba(35, 48, 84, 0.13);
    font: 800 23px var(--hand-head);
    overflow: hidden;
}

.person-avatar-link {
    width: 64px;
    height: 64px;
    display: block;
}

.person-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.person-meta {
    min-width: 0;
    display: grid;
    gap: 3px;
    margin-right: auto;
}

.person-meta strong,
.person-meta span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.person-meta span {
    color: var(--muted);
    font-size: 12px;
}

.person-actions {
    grid-column: 1 / -1;
    display: flex;
    gap: 8px;
}

.person-actions > button {
    flex: 1;
}

.outgoing-requests {
    display: grid;
    gap: 12px;
    padding-top: 4px;
}

.outgoing-requests[hidden] {
    display: none;
}

.app-notice {
    position: fixed;
    z-index: 100;
    right: 24px;
    bottom: 24px;
    max-width: min(420px, calc(100vw - 32px));
    padding: 14px 18px;
    border: 1px solid var(--line);
    border-left: 4px solid var(--green);
    border-radius: var(--scrawl-sm);
    color: var(--ink);
    background: var(--card-strong);
    box-shadow: var(--pencil-shadow-hover);
    font: 700 14px/1.45 var(--sans);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
}

.app-notice.is-error {
    border-left-color: #c84b54;
}

.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;
}

 

.robux-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
    max-width: 860px;
}

.robux-card {
    display: grid;
    justify-items: center;
    gap: 10px;
    padding: 30px 22px;
    border: 1px solid var(--line);
    border-radius: var(--scrawl-md);
    background: var(--card-strong);
    text-align: center;
    box-shadow: var(--control-shadow);
    transform: none;
}

.robux-card:nth-child(even) {
    transform: none;
}

.robux-card--featured {
    background:
        repeating-linear-gradient(-55deg, var(--ink-faint) 0 5px, transparent 5px 12px),
        var(--surface);
    box-shadow: var(--pencil-shadow-hover);
}

.robux-card img {
    width: 44px;
    height: 44px;
    opacity: 0.85;
}

.robux-card h3 {
    margin: 0;
    font-family: var(--hand-head);
    font-size: 30px;
    font-weight: 700;
}

 

.download-page {
    display: grid;
    gap: 28px;
}

.download-panel {
    display: flex;
    align-items: center;
    gap: 18px;
    max-width: 720px;
    padding: 22px;
    border: 1px dashed var(--ink-soft);
    border-radius: var(--scrawl-md);
    background: var(--card);
}

.download-panel img {
    width: 46px;
}

.download-panel .primary-action {
    margin-left: auto;
}

.inventory-page,
.profile-page {
    display: grid;
    gap: 24px;
}

.inventory-page__header,
.inventory-content__header,
.profile-panel__heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.inventory-page__header h1,
.inventory-content__header h2,
.inventory-sidebar h2,
.profile-panel h2 {
    margin: 0;
}

.inventory-layout {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    min-height: 560px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 18px 15px 20px 16px;
    background: var(--card);
    box-shadow: var(--control-shadow);
}

.inventory-sidebar {
    padding: 18px 13px;
    border-right: 1px solid var(--line);
    background: var(--bar);
}

.inventory-avatar-preview {
    margin: -5px -1px 16px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--line);
}

.inventory-sidebar h2 {
    padding: 0 10px 12px;
    font-size: 17px;
}

.inventory-category {
    position: relative;
    width: 100%;
    min-height: 43px;
    padding: 0 29px 0 12px;
    border: 1px solid transparent;
    border-radius: 10px 8px 11px 9px;
    color: var(--muted);
    background: transparent;
    font: 750 13px var(--sans);
    text-align: left;
}

.inventory-category::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 13px;
    width: 6px;
    height: 6px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: translateY(-50%) rotate(-45deg);
}

.inventory-category:hover,
.inventory-category.is-active {
    border-color: var(--line);
    color: var(--ink);
    background: var(--surface);
}

.inventory-category.is-active {
    box-shadow: inset 3px 0 0 var(--accent);
}

.inventory-content {
    min-width: 0;
    padding: 22px;
}

.inventory-content__header {
    margin-bottom: 14px;
}

.inventory-breadcrumb {
    margin: 0 0 5px;
    color: var(--muted);
    font: 700 12px var(--sans);
}

.inventory-subcategories {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 18px;
    padding-bottom: 13px;
    border-bottom: 1px solid var(--line);
}

.inventory-subcategories[hidden] {
    display: none;
}

.inventory-subcategory {
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 9px 7px 10px 8px;
    color: var(--muted);
    background: var(--card);
    font: 750 12px var(--sans);
}

.inventory-subcategory:hover,
.inventory-subcategory.is-active {
    color: var(--accent-strong);
    background: var(--accent-soft);
}

.inventory-subcategory[aria-disabled="true"] {
    opacity: 0.42;
    cursor: default;
}

.inventory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 15px;
}

.inventory-item-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 14px 17px 13px 16px;
    background: var(--card-strong);
    box-shadow: 0 8px 18px rgba(35, 48, 84, 0.08);
    transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.inventory-item-card:hover {
    border-color: var(--accent);
    box-shadow: var(--control-shadow);
    transform: translateY(-2px);
}

.inventory-item-card__art {
    position: relative;
    height: 170px;
    padding: 10px;
    border-bottom: 1px solid var(--line);
    background:
        radial-gradient(circle at 30% 21%, rgba(255, 255, 255, 0.34), transparent 38%),
        var(--accent-soft);
}

.inventory-item-card__art img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.inventory-wearing {
    position: absolute;
    top: 9px;
    right: 9px;
    padding: 5px 8px;
    border-radius: 8px 7px 9px 7px;
    color: var(--paper);
    background: var(--accent);
    font: 800 10px var(--sans);
    text-transform: uppercase;
}

.inventory-item-card__body {
    display: grid;
    gap: 6px;
    padding: 11px 12px 13px;
}

.inventory-item-card__body h3,
.inventory-item-card__body p {
    margin: 0;
    overflow: hidden;
}

.inventory-item-card__body h3 {
    text-overflow: ellipsis;
    white-space: nowrap;
    font: 800 14px var(--sans);
}

.inventory-item-card__body p {
    min-height: 36px;
    display: -webkit-box;
    color: var(--muted);
    font: 600 12px/1.45 var(--sans);
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.profile-page {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    gap: 16px;
}

.profile-summary {
    position: relative;
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    align-items: center;
    gap: 26px;
    min-height: 190px;
    padding: 20px 8px 26px;
    border-bottom: 1px solid var(--line);
}

.profile-portrait {
    position: relative;
    width: 150px;
    height: 150px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--surface);
}

.profile-portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-overflow {
    position: absolute;
    top: 18px;
    right: 8px;
}

.profile-overflow__button {
    width: 42px;
    height: 34px;
    display: grid;
    place-items: center;
    padding: 0 0 10px;
    border: 1px solid transparent;
    border-radius: 8px;
    color: var(--ink);
    background: transparent;
    font: 800 22px/1 var(--sans);
    letter-spacing: 2px;
}

.profile-overflow__button:hover,
.profile-overflow__button[aria-expanded="true"] {
    border-color: var(--line);
    background: var(--card);
}

.profile-portrait span {
    color: var(--accent-strong);
    font: 800 48px var(--sans);
}

.profile-identity h1 {
    margin: 0;
    font: 750 clamp(28px, 3vw, 36px)/1.15 var(--sans);
}

.profile-handle {
    margin: 5px 0 0;
    color: var(--muted);
    font: 600 14px var(--sans);
}

.profile-stats {
    display: flex;
    align-items: center;
    gap: 0;
    margin-top: 22px;
}

.profile-stats > a,
.profile-stats > .profile-stat {
    min-width: 92px;
    display: grid;
    justify-items: center;
    gap: 2px;
    padding: 0 22px;
    border-right: 1px solid var(--line);
}

.profile-stats > *:first-child {
    padding-left: 0;
}

.profile-stats > *:last-child {
    border-right: 0;
}

.profile-stats > a:hover strong,
.profile-stats > a:hover span {
    color: var(--accent-strong);
}

.profile-stats > * > strong {
    font: 750 18px var(--sans);
}

.profile-stats > * > span {
    color: var(--muted);
    font: 600 13px var(--sans);
}

.profile-tabs {
    display: flex;
    border-bottom: 1px solid var(--line);
}

.profile-tabs a,
.profile-tabs span,
.profile-tabs button {
    min-width: 0;
    flex: 1 1 50%;
    padding: 13px 22px 11px;
    border-bottom: 3px solid transparent;
    color: var(--muted);
    text-align: center;
    font: 700 14px var(--sans);
}
.profile-tabs button { background: transparent; border: 0; border-bottom: 3px solid transparent; cursor: pointer; }
.profile-tab-content { display: grid; gap: 18px; }
.profile-tab-content[hidden] { display: none; }

.profile-tabs a:hover,
.profile-tabs .is-active {
    border-bottom-color: var(--accent);
    color: var(--ink);
}

.profile-sections {
    display: grid;
    gap: 14px;
    padding-top: 14px;
}

.profile-panel {
    min-width: 0;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--card);
}

.profile-panel h2 {
    font: 750 20px var(--sans);
}

.profile-panel__heading {
    margin-bottom: 16px;
}

.profile-panel__heading a {
    color: var(--accent-strong);
    font: 700 13px var(--sans);
}

.profile-about p {
    margin: 13px 0 0;
    color: var(--muted);
    line-height: 1.65;
}

.profile-wearing {
    min-height: 300px;
    display: grid;
    grid-template-columns: minmax(260px, 42%) minmax(0, 1fr);
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: var(--surface);
}

.profile-wearing__avatar {
    position: relative;
    min-height: 330px;
    padding: 14px;
    overflow: hidden;
    border-right: 1px solid var(--line);
    background:
        radial-gradient(circle at 50% 30%, rgba(255, 255, 255, 0.58), transparent 36%),
        linear-gradient(145deg, var(--surface), var(--accent-soft));
}

.profile-wearing__avatar .avatar-preview,
.profile-wearing__avatar .avatar-preview-stage {
    width: 100%;
    height: 100%;
}

.profile-wearing__avatar .avatar-preview-stage {
    min-height: 300px;
    aspect-ratio: auto;
}

.profile-wearing__items {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-content: start;
    gap: 12px;
    padding: 16px;
    background: var(--accent-soft);
}

.profile-friends {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    padding: 2px 0 5px;
    scrollbar-width: thin;
}

.profile-friend {
    min-width: 0;
    flex: 0 0 94px;
    display: grid;
    justify-items: center;
    gap: 8px;
    padding: 8px 4px;
    border-radius: 6px;
}

.profile-friend:hover {
    background: var(--surface);
}

.profile-friend__portrait {
    position: relative;
    width: 76px;
    height: 76px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: var(--paper);
    background: var(--surface);
}

.profile-friend__portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-friend__fallback {
    background: var(--accent);
    font: 750 22px var(--sans);
}

.profile-friend strong {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
}

.profile-inventory {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding-bottom: 5px;
    scrollbar-width: thin;
}

.profile-inventory-item {
    min-width: 0;
    flex: 0 0 126px;
    display: grid;
    gap: 7px;
}

.profile-wearing__items .profile-inventory-item {
    width: auto;
    min-width: 0;
}

.profile-inventory-item img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: contain;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface);
}

.profile-inventory-item strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
}

.profile-compact-empty {
    min-height: 72px;
    width: 100%;
    display: grid;
    place-items: center;
    margin: 0;
    color: var(--muted);
    text-align: center;
    font: 650 13px/1.45 var(--sans);
}

.profile-wearing__items .profile-compact-empty {
    grid-column: 1 / -1;
    min-height: 240px;
}

.profile-statistics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 16px 0 0;
    border-top: 1px solid var(--line);
}

.profile-statistics > div {
    display: grid;
    gap: 6px;
    padding: 18px 20px 4px;
    border-right: 1px solid var(--line);
    text-align: center;
}

.profile-statistics > div:last-child {
    border-right: 0;
}

.profile-statistics dt {
    color: var(--muted);
    font: 650 13px var(--sans);
}

.profile-statistics dd {
    margin: 0;
    color: var(--ink);
    font: 700 15px var(--sans);
}

 

.settings-page,
.game-detail {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
}

.settings-page__header {
    margin-bottom: 18px;
}

.settings-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--bar);
}

.settings-tab {
    position: relative;
    min-height: 50px;
    border: 0;
    color: var(--muted);
    background: transparent;
    font: 700 14px var(--sans);
}

.settings-tab::after {
    content: "";
    position: absolute;
    right: 18px;
    bottom: 0;
    left: 18px;
    height: 3px;
    border-radius: 999px 999px 0 0;
    background: var(--accent);
    transform: scaleX(0);
}

.settings-tab.is-active {
    color: var(--ink);
}

.settings-tab.is-active::after {
    transform: scaleX(1);
}

.settings-panel {
    display: grid;
    gap: 16px;
}

.settings-section {
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--card);
    box-shadow: var(--control-shadow);
}

.settings-section h2 {
    margin-bottom: 16px;
    font: 750 22px var(--sans);
}

.settings-account-row {
    min-height: 46px;
    display: grid;
    grid-template-columns: 140px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    border-top: 1px solid var(--line);
    font-size: 14px;
}

.settings-account-row > span,
.settings-help {
    color: var(--muted);
}

.display-name-dialog .avatar-preset-dialog__header h2 {
    font-family: var(--hand-head);
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.display-name-dialog .avatar-preset-dialog__field > span {
    font-weight: 900;
}

.text-action {
    border: 0;
    color: var(--accent-strong);
    background: transparent;
    font-weight: 700;
}

.settings-password-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
    align-items: end;
    gap: 12px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.settings-password-form label,
.settings-field {
    display: grid;
    gap: 7px;
    color: var(--muted);
    font: 650 13px var(--sans);
}

.settings-password-form input,
.settings-field textarea,
.birthday-fields select,
.birthday-fields input {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 7px;
    color: var(--ink);
    background: var(--surface);
    font: 600 14px var(--sans);
    outline: 0;
}

.settings-password-form input,
.birthday-fields select,
.birthday-fields input {
    height: 44px;
    padding: 0 12px;
}

.settings-field textarea {
    min-height: 108px;
    resize: vertical;
    padding: 12px;
    line-height: 1.5;
}

.settings-password-form input:focus,
.settings-field textarea:focus,
.birthday-fields select:focus,
.birthday-fields input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.settings-help {
    margin: 7px 0 16px;
    font-size: 12px;
}

.birthday-fields,
.gender-fields {
    display: grid;
    grid-template-columns: 1.4fr 0.7fr 0.9fr;
    gap: 10px;
    margin: 0 0 14px;
    padding: 0;
    border: 0;
}

.birthday-fields legend,
.gender-fields legend {
    grid-column: 1 / -1;
    margin-bottom: 7px;
    color: var(--muted);
    font: 650 13px var(--sans);
}

.gender-fields {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.gender-fields label {
    position: relative;
}

.gender-fields input {
    position: absolute;
    opacity: 0;
}

.gender-fields span {
    min-height: 42px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 7px;
    color: var(--muted);
    background: var(--surface);
    font: 650 13px var(--sans);
}

.gender-fields input:checked + span {
    border-color: var(--accent);
    color: var(--ink);
    background: var(--accent-soft);
}

.settings-form-actions {
    display: flex;
    justify-content: flex-end;
}

.secure-signout {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.secure-signout h2 {
    margin-bottom: 5px;
}

 

.game-detail {
    display: grid;
    gap: 22px;
}

.game-detail__hero {
    display: grid;
    grid-template-columns: minmax(0, 1.72fr) minmax(280px, 0.78fr);
    gap: 18px;
}

.game-detail__media,
.game-detail__sidebar,
.game-detail__panel {
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--card);
    box-shadow: var(--control-shadow);
}

.game-detail__media {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: linear-gradient(145deg, var(--surface), var(--accent-soft));
}

.game-detail__media img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.game-detail__media-shade {
    position: absolute;
    inset: auto 0 0;
    height: 22%;
    pointer-events: none;
    background: linear-gradient(transparent, rgba(5, 8, 18, 0.2));
}

.game-detail__sidebar {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 34px;
    padding: clamp(20px, 3vw, 30px);
}

.game-detail__identity h1 {
    margin: 0 0 10px;
    font: 800 clamp(25px, 3vw, 34px) / 1.08 var(--sans);
    letter-spacing: -0.025em;
}

.game-detail__identity p {
    margin: 5px 0;
    color: var(--muted);
    font-size: 13px;
}

.game-detail__identity a {
    color: var(--ink);
    font-weight: 750;
    text-decoration: none;
}

.game-detail__identity a:hover {
    text-decoration: underline;
}

.game-detail__launch {
    display: grid;
    gap: 13px;
}

.game-detail__play {
    width: 100%;
    min-height: 58px;
    justify-content: center;
    gap: 10px;
    border-radius: 8px;
    font-size: 18px;
}

.game-detail__play .game-icon {
    width: 26px;
    height: 26px;
}

.game-actions {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
}

.game-action {
    min-width: 0;
    min-height: 73px;
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 3px;
    padding: 7px 3px;
    border: 0;
    border-radius: 7px;
    color: var(--muted);
    background: transparent;
    font: 650 10px var(--sans);
}

.game-action:hover {
    color: var(--ink);
    background: var(--accent-soft);
}

.game-action[aria-pressed="true"] {
    color: var(--accent-strong);
    background: var(--accent-soft);
}

.game-action strong {
    min-height: 13px;
    color: currentColor;
    font-size: 10px;
}

.game-icon {
    width: 22px;
    height: 22px;
    display: inline-block;
    flex: 0 0 auto;
    background: currentColor;
    -webkit-mask: var(--game-icon) center / contain no-repeat;
    mask: var(--game-icon) center / contain no-repeat;
}

.game-icon--play { --game-icon: url("/site/icons/lucide/play.svg"); }
.game-icon--star { --game-icon: url("/site/icons/lucide/star.svg"); }
.game-icon--bell { --game-icon: url("/site/icons/lucide/bell.svg"); }
.game-icon--thumbs-up { --game-icon: url("/site/icons/lucide/thumbs-up.svg"); }
.game-icon--thumbs-down { --game-icon: url("/site/icons/lucide/thumbs-down.svg"); }
.game-icon--store { --game-icon: url("/site/icons/lucide/gamepad-2.svg"); }

.game-detail__tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--bar);
}

.game-detail__tab {
    position: relative;
    min-height: 48px;
    border: 0;
    color: var(--muted);
    background: transparent;
    font: 750 14px var(--sans);
}

.game-detail__tab::after {
    content: "";
    position: absolute;
    right: 13%;
    bottom: -1px;
    left: 13%;
    height: 3px;
    border-radius: 3px 3px 0 0;
    background: var(--accent);
    transform: scaleX(0);
    transition: transform 150ms ease;
}

.game-detail__tab:hover,
.game-detail__tab.is-active {
    color: var(--ink);
}

.game-detail__tab.is-active::after {
    transform: scaleX(1);
}

.game-detail__panel {
    position: relative;
    padding: clamp(20px, 3vw, 30px);
}

.game-detail__panel[hidden] {
    display: none;
}

.game-detail__panel h2 {
    margin: 0 0 10px;
    font: 800 18px var(--sans);
}

.game-detail__description {
    max-width: 920px;
    min-height: 26px;
    margin: 0 0 22px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.65;
    white-space: pre-wrap;
}

.game-detail__maturity {
    width: fit-content;
    display: flex;
    align-items: center;
    gap: 11px;
    margin: 0 0 22px;
    padding: 11px 14px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--bar);
    font-size: 12px;
}

.game-detail__maturity span:last-child {
    color: var(--muted);
}

.game-detail__stats {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin: 0 0 8px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.game-detail__stats > div {
    display: grid;
    align-content: center;
    gap: 6px;
    min-height: 72px;
    padding: 12px 8px;
    text-align: center;
}

.game-detail__stats dt {
    color: var(--muted);
    font: 650 10px var(--sans);
}

.game-detail__stats dd {
    margin: 0;
    overflow-wrap: anywhere;
    font: 750 12px var(--sans);
}

.game-detail__report {
    display: block;
    margin-left: auto;
    border: 0;
    color: var(--muted);
    background: transparent;
    font-size: 11px;
}

.game-tab-empty {
    min-height: 230px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 10px;
    color: var(--muted);
    text-align: center;
}

.game-tab-empty .game-icon {
    width: 36px;
    height: 36px;
    color: var(--accent);
}

.game-tab-empty h2,
.game-tab-empty p {
    margin: 0;
}

.game-server-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 26px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--bar);
}

.game-server-card h2 {
    margin: 6px 0 3px;
    font-size: 17px;
}

.game-server-card p,
.game-server-card__players span {
    margin: 0;
    color: var(--muted);
    font-size: 11px;
}

.game-server-card__status {
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
}

.game-server-card__status i {
    width: 7px;
    height: 7px;
    display: inline-block;
    margin-right: 5px;
    border-radius: 50%;
    background: var(--green);
}

.game-server-card__players {
    display: grid;
    gap: 3px;
    text-align: center;
}

.game-server-card__players strong {
    font: 800 16px var(--sans);
}

.empty-state {
    min-height: 380px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 14px;
    text-align: center;
}

 

.auth-wrap {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.auth-card {
     
    width: min(450px, calc(100vw - 48px));
    display: grid;
    gap: 18px;
    padding: 42px 40px;
    border: 1px solid var(--line);
    border-radius: var(--scrawl-lg);
    background: var(--card-strong);
    box-shadow: var(--pencil-shadow);
    -webkit-backdrop-filter: blur(18px) saturate(1.06);
    backdrop-filter: blur(18px) saturate(1.06);
}

 
.auth-back {
    justify-self: start;
    color: var(--ink);
    font-family: var(--hand-head);
    font-size: 30px;
    letter-spacing: 0.04em;
    text-decoration: none;
    transform: rotate(-0.8deg);
}

.auth-back:hover {
    color: var(--accent);
}

.auth-brand {
    font-family: var(--hand-head);
    font-size: 46px;
    letter-spacing: 0.08em;
    transform: rotate(-0.8deg);
}

.auth-tabs {
    display: flex;
    gap: 24px;
}

.auth-tab {
    position: relative;
    padding: 8px 0;
    border: 0;
    background: transparent;
    color: var(--muted);
    font-family: var(--sans);
    font-size: 16px;
    font-weight: 700;
}

.auth-tab::after {
    content: "";
    position: absolute;
    left: -3px;
    right: -3px;
    bottom: 2px;
    height: 4px;
    border-radius: 999px;
    background: var(--accent);
    transform: scaleX(0);
    transition: transform 160ms ease;
}

.auth-tab.is-active {
    color: var(--ink);
}

.auth-tab:hover::after,
.auth-tab.is-active::after {
    transform: scaleX(1);
}

#authForm {
    display: grid;
    gap: 16px;
}

.auth-field {
    display: grid;
    gap: 6px;
    font-size: 16px;
    font-weight: 700;
}

.auth-field input {
    height: 48px;
    padding: 0 15px;
    border: 1px solid var(--line);
    border-radius: var(--scrawl-sm);
    background: var(--surface);
    color: var(--ink);
    font-size: 16px;
    outline: none;
}

.auth-field input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.auth-error {
    margin: 0;
    color: var(--error);
    font-size: 15px;
    font-weight: 700;
}

.auth-submit {
    justify-self: start;
}

 

#resetForm {
    display: grid;
    gap: 16px;
}

.auth-aside {
    margin: 4px 0 0;
}

.auth-link {
    padding: 0;
    border: 0;
    background: none;
    color: var(--accent);
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
}

.auth-link:hover {
    text-decoration: underline;
}

.auth-hint {
    margin: 0;
    color: var(--muted);
    font-size: 15px;
}

#resetForm[hidden],
#authForm[hidden],
.auth-tabs[hidden],
.auth-aside[hidden] {
    display: none;
}

.tg-link-box {
    display: grid;
    gap: 8px;
    justify-items: start;
    margin-top: 12px;
}

.tg-link-box p {
    margin: 0;
}

.tg-link-box code {
    color: var(--ink);
    font: 700 14px/1 ui-monospace, Consolas, monospace;
    letter-spacing: 0.08em;
    user-select: all;
}

.tg-link-box[hidden] {
    display: none;
}

.logout-button {
    margin-top: 16px;
    height: 48px;
    font-size: 15px;
}

 

@media (max-width: 1280px) {
    .app-shell {
        grid-template-columns: 210px 1fr;
    }

    .popular-grid {
        grid-template-columns: repeat(3, minmax(160px, 1fr));
    }
}

@media (max-width: 860px) {
    .app-shell {
        display: block;
    }

    .topbar {
        flex-wrap: wrap;
        height: auto;
        padding: 12px 16px;
        gap: 14px;
    }

    .topnav {
        order: 3;
        width: 100%;
        overflow-x: auto;
        gap: 22px;
    }

    .search {
        width: 100%;
        min-width: 0;
        flex: 1 1 100%;
        order: 4;
    }

    .sidebar {
        position: static;
        height: auto;
        border-right: 0;
        border-bottom: 2px solid var(--line);
    }

    .side-nav {
        grid-template-columns: repeat(4, 1fr);
    }

    .side-nav__item {
        justify-content: center;
        font-size: 0;
    }

    .download-rail {
        position: static;
        margin-top: 12px;
    }

    .content {
        padding: 22px 14px 90px;
    }

    .hero-card {
        padding: 24px;
        flex-direction: column;
        text-align: center;
    }

    .hero-actions {
        justify-content: center;
    }

    .popular-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px 10px;
    }

    .catalog-grid,
    .avatar-workspace,
    .import-panel,
    .inventory-layout {
        grid-template-columns: 1fr;
    }

    .inventory-sidebar {
        display: grid;
        grid-template-columns: repeat(6, max-content);
        gap: 7px;
        overflow-x: auto;
        padding: 12px;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .inventory-avatar-preview {
        width: min(280px, calc(100vw - 56px));
        grid-column: 1 / -1;
        justify-self: center;
        margin: 0 auto 8px;
    }

    .inventory-sidebar h2 {
        display: none;
    }

    .inventory-category {
        width: auto;
        flex: 0 0 auto;
        padding: 0 12px;
    }

    .inventory-category::after {
        display: none;
    }

    .profile-summary {
        grid-template-columns: 130px minmax(0, 1fr);
        gap: 20px;
    }

    .profile-portrait {
        width: 130px;
        height: 130px;
    }

    .profile-wearing {
        grid-template-columns: minmax(230px, 38%) minmax(0, 1fr);
    }

    .profile-wearing__items {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .avatar-preview-panel {
        position: static;
    }

    .avatar-preview-stage {
        height: auto;
    }

    .avatar-tabs {
        display: flex;
        overflow-x: auto;
        scrollbar-width: thin;
        scroll-snap-type: x proximity;
    }

    .avatar-tab {
        flex: 0 0 auto;
        min-width: 116px;
        padding: 0 16px;
        scroll-snap-align: start;
    }

    .friend-search {
        grid-template-columns: 1fr;
    }

    .friends-tabs {
        display: flex;
        overflow-x: auto;
        scrollbar-width: thin;
    }

    .friends-tab {
        min-width: 150px;
        flex: 1 0 150px;
    }

    .settings-password-form {
        grid-template-columns: 1fr;
    }

    .game-detail__hero {
        grid-template-columns: 1fr;
    }

    .game-detail__sidebar {
        min-height: 280px;
    }

    .game-detail__stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .page-card__header,
    .avatar-library__heading,
    .friends-toolbar,
    .profile-page {
        align-items: flex-start;
        flex-direction: column;
    }

    .person-card {
        grid-template-columns: 54px minmax(0, 1fr);
    }

    .person-avatar {
        width: 54px;
        height: 54px;
    }

    .person-actions {
        width: 100%;
        justify-content: flex-end;
    }

}

@media (max-width: 560px) {
    .avatar-editor,
    .friends-page {
        gap: 16px;
    }

    .avatar-editor__actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .avatar-editor__actions .primary-action {
        flex: 1 1 120px;
    }

    .inventory-page__header,
    .inventory-content__header {
        align-items: flex-start;
    }

    .inventory-content {
        padding: 16px 12px;
    }

    .inventory-grid {
        grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
        gap: 10px;
    }

    .inventory-item-card__art {
        height: 138px;
    }

    .profile-summary {
        grid-template-columns: 92px minmax(0, 1fr);
        align-items: start;
        gap: 14px;
        padding: 10px 0 18px;
    }

    .profile-portrait {
        width: 92px;
        height: 92px;
    }

    .profile-stats {
        grid-column: 1 / -1;
        margin-top: 17px;
    }

    .profile-stats > a,
    .profile-stats > .profile-stat {
        min-width: 0;
        padding: 0 10px;
    }

    .profile-wearing {
        grid-template-columns: 1fr;
    }

    .profile-wearing__avatar {
        min-height: 280px;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .profile-wearing__avatar .avatar-preview-stage {
        min-height: min(82vw, 330px);
    }

    .profile-wearing__items {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .profile-friends {
        gap: 10px;
    }

    .profile-statistics {
        grid-template-columns: 1fr;
    }

    .profile-statistics > div {
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .profile-statistics > div:last-child {
        border-bottom: 0;
    }

    .profile-overflow {
        top: 6px;
        right: 0;
    }

    .profile-identity {
        padding-right: 36px;
    }

    .birthday-fields,
    .gender-fields {
        grid-template-columns: 1fr;
    }

    .game-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .game-detail__stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .game-detail__maturity {
        align-items: flex-start;
        flex-direction: column;
    }

    .game-server-card {
        grid-template-columns: 1fr auto;
    }

    .game-server-card .primary-action {
        grid-column: 1 / -1;
        justify-content: center;
    }

    .settings-account-row {
        grid-template-columns: 100px minmax(0, 1fr) auto;
    }

    .secure-signout {
        align-items: stretch;
        flex-direction: column;
    }

    .avatar-preview-panel {
        padding: 10px;
    }

    .avatar-preview-stage {
        height: auto;
    }

    .avatar-preview__mode {
        top: 12px;
        right: 12px;
    }

    .avatar-category-flyout {
        max-height: 152px;
        padding: 7px;
    }

    .avatar-item-grid {
        grid-template-columns: repeat(auto-fill, minmax(116px, 1fr));
        gap: 9px;
        padding: 0 12px 16px;
    }

    .avatar-library__heading {
        padding: 17px 12px 12px;
    }

    .avatar-presets__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 11px;
    }

    .avatar-presets__toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .avatar-preset-dialog {
        padding: 16px;
        border-radius: 14px;
    }

}

@media (max-width: 480px) {
    .game-card h3 {
        font-size: 13px;
    }

    .game-card__metrics {
        gap: 9px;
        font-size: 11px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sky::before,
    .sky::after,
    .sky__clouds,
    .sky__stars--twinkle,
    .sky__shooting,
    .sky__birds,
    .page {
        animation: none;
    }

    .avatar-preview__spinner,
    .avatar-category-flyout {
        animation: none;
    }

    .avatar-item-card {
        transition: none;
    }

    .avatar-item-card:hover {
        transform: none;
    }
}


 
 

.avatar-scale {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  grid-column: 1 / -1;
}

.avatar-scale__group { display: flex; flex-direction: column; gap: 8px; }

.avatar-scale__label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

.avatar-scale__value { font-weight: 500; opacity: 0.75; }

.avatar-scale__types { display: flex; gap: 0; }

.avatar-scale__type {
  min-width: 52px;
  padding: 7px 14px;
  font: inherit;
  font-weight: 600;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  cursor: pointer;
}

.avatar-scale__type:first-child { border-radius: 8px 0 0 8px; }
.avatar-scale__type:last-child { border-radius: 0 8px 8px 0; border-left: none; }
.avatar-scale__type:hover { background: var(--accent-soft); }
.avatar-scale__type.is-active {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

.avatar-scale__note {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--muted);
}


 
 

.avatar-colors {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  grid-column: 1 / -1;
}

.avatar-colors__group { display: flex; flex-direction: column; gap: 10px; }

.avatar-colors__label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

.avatar-colors__value { font-weight: 500; opacity: 0.75; }

.avatar-colors__palette {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(38px, 1fr));
  gap: 10px;
}

.avatar-colors__swatch {
  position: relative;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid rgba(0, 0, 0, 0.16);
  border-radius: 50%;
  cursor: pointer;
}

.avatar-colors__swatch:hover { transform: scale(1.08); }
.avatar-colors__swatch:disabled { cursor: progress; opacity: 0.6; }

 
.avatar-colors__swatch.is-active {
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent);
}

.avatar-colors__swatch.is-active::after {
  content: "";
  position: absolute;
  left: 11px;
  top: 6px;
  width: 7px;
  height: 13px;
  border: solid #fff;
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
  filter: drop-shadow(0 0 1px rgba(0, 0, 0, 0.55));
}

.avatar-colors__note {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--muted);
}


 
 

.guest {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.guest-shell {
    width: min(1180px, 100%);
    margin: 0 auto;
    padding: 0 28px;
}

 

 
.guest-bar {
    position: sticky;
    top: 0;
    z-index: 5;
    border-bottom: 1px solid transparent;
    background: transparent;
    transition: background 220ms ease, border-color 220ms ease;
}

 
.guest-bar.is-stuck {
    background: var(--veil);
    -webkit-backdrop-filter: blur(20px) saturate(1.04);
    backdrop-filter: blur(20px) saturate(1.04);
}

.guest-bar__inner {
    display: flex;
    align-items: center;
    gap: 18px;
    height: 72px;
}

.guest-bar__brand {
    margin: 0;
    margin-right: auto;
    font-family: var(--hand-head);
    font-size: 26px;
    font-weight: 400;
     
    letter-spacing: 0.08em;
}

.guest-bar__links {
    display: flex;
    gap: 22px;
}

.guest-bar__links a {
    color: var(--muted);
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
}

.guest-bar__links a:hover {
    color: var(--ink);
}

 
.guest-bar__ghost {
     
    display: inline-flex;
    align-items: center;
    height: 42px;
    padding: 0 14px;
    border: 0;
    text-decoration: none;
    border-radius: var(--scrawl-sm);
    background: transparent;
    color: var(--muted);
    font-family: var(--sans);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: color 160ms ease, background 160ms ease;
}

.guest-bar__ghost:hover {
    color: var(--ink);
    background: var(--ink-faint);
}

.guest-bar .primary-action {
    height: 42px;
    padding: 0 18px;
    font-size: 14px;
    text-decoration: none;
     
    box-shadow: none;
}

 

 
 
.guest-hero {
    flex: 1;
    display: grid;
    align-content: center;
    justify-items: center;
    text-align: center;
    gap: 0;
    padding: 48px 28px 64px;
}

.guest-title {
    margin: 0 0 22px;
    font-family: var(--hand-head);
    font-weight: 400;
    font-size: clamp(48px, 7.6vw, 96px);
    line-height: 1.02;
    letter-spacing: 0.01em;
    transform: rotate(-0.7deg);
}

.guest-lead {
    max-width: 27em;
    margin: 0 0 34px;
    color: var(--ink-soft);
    font-size: 19px;
    line-height: 1.6;
}

.guest-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
}

.guest-actions .secondary-action,
.guest-actions .primary-action {
    text-decoration: none;
}

 

.guest-band {
    padding: 74px 0;
    border-top: 1px solid var(--line);
}

.guest-band__head {
    max-width: 34em;
    margin-bottom: 36px;
}

.guest-band__head h2 {
    margin: 0 0 10px;
    font-family: var(--hand-head);
    font-weight: 400;
    font-size: clamp(30px, 3.4vw, 42px);
    transform: rotate(-0.5deg);
}

.guest-band__head p {
    margin: 0;
    color: var(--ink-soft);
    font-size: 17px;
    line-height: 1.6;
}

 

.guest-specs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.guest-spec {
    display: grid;
    gap: 12px;
    align-content: start;
    padding: 26px 24px 28px;
    border: 1px solid var(--line);
    border-radius: var(--scrawl-md);
    background: var(--card);
    box-shadow: var(--pencil-shadow);
    -webkit-backdrop-filter: blur(14px) saturate(1.04);
    backdrop-filter: blur(14px) saturate(1.04);
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.guest-spec:hover {
    transform: translateY(-3px);
    box-shadow: var(--pencil-shadow-hover);
}

.guest-spec img {
    width: 30px;
    height: 30px;
}

.guest-spec h3 {
    margin: 0;
    font-size: 18px;
}

.guest-spec p {
    margin: 0;
    color: var(--ink-soft);
    font-size: 15px;
    line-height: 1.6;
}

 

.guest-faq {
    display: grid;
    gap: 0;
    border-top: 1px solid var(--line);
}

.guest-faq details {
    border-bottom: 1px solid var(--line);
}

.guest-faq summary {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 22px 4px;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    list-style: none;
}

 
.guest-faq summary::-webkit-details-marker {
    display: none;
}

.guest-faq summary::after {
    content: "";
    width: 10px;
    height: 10px;
    margin-left: auto;
    border-right: 2px solid var(--muted);
    border-bottom: 2px solid var(--muted);
    transform: rotate(45deg) translate(-2px, -2px);
    transition: transform 180ms ease;
}

.guest-faq details[open] summary::after {
    transform: rotate(-135deg) translate(-3px, -3px);
}

.guest-faq summary:hover {
    color: var(--accent);
}

 
.guest-faq__body {
    overflow: hidden;
}

.guest-faq p {
    margin: 0;
    padding: 0 4px 24px;
    max-width: 52em;
    color: var(--ink-soft);
    font-size: 16px;
    line-height: 1.65;
}

 

.guest-foot {
    margin-top: auto;
    padding: 24px 0 28px;
     
    border-top: 1px solid var(--line);
}

.guest-foot__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 28px;
}

.guest-foot__fine {
    margin: 0;
    color: var(--ink-soft);
    font-size: 13px;
}

.guest-foot__links {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-left: auto;
}

.guest-foot__links a {
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.guest-foot__links a:hover {
    color: var(--ink);
}

 
.guest-foot__social {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 34px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}

.guest-foot__social svg {
    width: 16px;
    height: 16px;
    flex: none;
}

.guest-foot__social:hover {
    color: var(--ink);
    border-color: var(--ink-soft);
    background: var(--ink-faint);
}

 

@media (max-width: 940px) {
    .guest-bar__links {
        display: none;
    }
}

@media (max-width: 560px) {
    .guest-shell {
        padding: 0 18px;
    }

    .guest-band {
        padding: 52px 0;
    }

    .guest-actions .primary-action,
    .guest-actions .secondary-action {
        flex: 1 1 100%;
    }
}

 
.avatar-face-notice {
    grid-column: 1 / -1;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-top: 14px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-left: 3px solid var(--accent);
    border-radius: 10px;
    background: var(--surface);
}

.avatar-face-notice[hidden] { display: none; }
.avatar-face-notice__copy { display: grid; gap: 4px; }
.avatar-face-notice__copy span { color: var(--muted); font-size: 13px; line-height: 1.45; }

.avatar-face-notice__close {
    flex: none;
    width: 26px;
    height: 26px;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--muted);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.avatar-face-notice__close:hover { background: var(--line); color: var(--text); }

 
 
.shop-panel {
    position: relative;
    z-index: 2;
    padding: 0;
    margin-bottom: 20px;
    border: 0;
    background: transparent;
}

 
#page-catalog .catalog-grid {
    position: relative;
    z-index: 1;
}

#page-catalog .page-card {
    border: 0;
    background: transparent;
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}

.shop-panel__top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.shop-panel__title {
    margin-right: auto;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0.01em;
}

 
.shop-panel__filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    width: fit-content;
    max-width: 100%;
    margin-top: 8px;
    padding: 5px 7px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--card-strong);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    box-shadow: var(--control-shadow);
}

.shop-choice {
    position: relative;
}

.shop-choice__toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 7px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
    cursor: pointer;
}

.shop-choice__toggle:hover,
.shop-choice__toggle[aria-expanded="true"] { background: var(--ink-faint); }

.shop-choice__menu {
    position: absolute;
    z-index: 40;
    top: calc(100% + 6px);
    left: 0;
    width: max-content;
    min-width: 132px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--card-strong);
    color: var(--ink);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    box-shadow: 0 14px 34px var(--vignette);
}

.shop-choice--sort .shop-choice__menu { min-width: 190px; }
.shop-choice--creator .creator-menu { width: 260px; max-width: calc(100vw - 40px); padding: 18px; }
.creator-menu__row { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 20px 0; font-size: 14px; }
.creator-menu__row input[type="radio"] { width: 18px; height: 18px; flex-shrink: 0; margin: 0; accent-color: var(--accent); }
.creator-menu__row input[type="search"] { width: 100%; min-width: 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--ink-faint); color: var(--ink); font: inherit; }
.creator-menu__apply { width: 100%; }
.creator-menu__apply:disabled { opacity: .45; cursor: default; }
.shop-choice__menu[hidden] { display: none; }

.shop-choice__option {
    display: block;
    width: 100%;
    padding: 9px 12px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--ink);
    font: inherit;
    font-size: 14px;
    text-align: left;
}

.shop-choice__option:hover,
.shop-choice__option:focus-visible { background: var(--ink-faint); outline: none; }
.shop-choice__option.is-selected { background: var(--accent-soft); font-weight: 700; }

.shop-search {
    position: relative;
    display: flex;
    align-items: center;
    flex: 0 1 320px;
    min-width: 200px;
}

.shop-search img {
    position: absolute;
    left: 11px;
    width: 15px;
    height: 15px;
    opacity: 0.5;
    pointer-events: none;
}

.shop-search input {
    width: 100%;
    padding: 10px 32px 10px 36px;
    border: 1px solid var(--ink-soft);
    border-radius: 999px;
    background: var(--surface);
    color: var(--ink);
    font: inherit;
    font-size: 14px;
}

.shop-search input::placeholder { color: var(--muted); }

.shop-search input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.shop-search__clear {
    position: absolute;
    right: 8px;
    width: 20px;
    height: 20px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--muted);
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
}

.shop-search__clear:hover { background: var(--ink-faint); color: var(--ink); }

.shop-more {
    display: flex;
    justify-content: center;
    padding: 16px 0 4px;
}

.shop-more button[hidden] { display: none; }

 
.shop-category { position: relative; }

.shop-category__toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 140px;
    justify-content: space-between;
    padding: 10px 14px;
    border: 1px solid var(--ink-soft);
    border-radius: 999px;
    background: var(--surface);
    color: var(--ink);
    font: inherit;
    font-size: 14px;
    cursor: pointer;
}

.shop-category__toggle::after,
.shop-choice__toggle::after {
    content: "";
    flex: none;
    width: 6px;
    height: 6px;
    margin: -3px 2px 0 4px;
    border-right: 1.5px solid var(--muted);
    border-bottom: 1.5px solid var(--muted);
    transform: rotate(45deg);
    transition: transform 140ms ease;
}

.shop-category__toggle[aria-expanded="true"]::after,
.shop-choice__toggle[aria-expanded="true"]::after {
    margin-top: 3px;
    transform: rotate(225deg);
}

.shop-category__toggle:hover,
.shop-category__toggle[aria-expanded="true"] { border-color: var(--accent); }

.shop-category__menu {
    position: absolute;
    z-index: 40;
    top: calc(100% + 6px);
    right: 0;
    text-align: left;
    width: 250px;
    max-height: 70vh;
    overflow-y: auto;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--card-strong);
    backdrop-filter: blur(8px);
    box-shadow: 0 14px 34px var(--vignette);
}

.shop-category__menu[hidden] { display: none; }

.shop-category__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 8px;
    margin-bottom: 6px;
    border-bottom: 1px solid var(--line);
}

.shop-category__close {
    width: 24px;
    height: 24px;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--muted);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}

.shop-category__close:hover { background: var(--ink-faint); color: var(--ink); }

.shop-category__list { display: grid; gap: 1px; }

 
.shop-cat {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    padding: 8px 9px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--ink);
    font: inherit;
    font-size: 14px;
    text-align: left;
    cursor: pointer;
}

.shop-cat:hover { background: var(--ink-faint); }
.shop-cat--child { padding-left: 24px; color: var(--muted); font-size: 13px; }
.shop-cat.is-chosen { font-weight: 700; color: var(--ink); }

.shop-cat__dot {
    flex: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--ink-faint);
    box-shadow: inset 0 0 0 1px var(--line);
}

.shop-cat.is-chosen .shop-cat__dot {
    background: var(--accent);
    box-shadow: inset 0 0 0 3px var(--surface);
}

 
.shop-category__list { max-height: 60vh; overflow-y: auto; }
.shop-category__menu { max-height: none; overflow: visible; }

 
.shop-category--inline .shop-category__toggle {
    min-width: 0;
    padding: 5px 7px;
    border: 0;
    border-radius: 6px;
    background-color: transparent;
    font-size: 13px;
    font-weight: 600;
}

.shop-category--inline .shop-category__toggle:hover,
.shop-category--inline .shop-category__toggle[aria-expanded="true"] {
    background-color: var(--ink-faint);
}

.shop-category--inline .shop-category__menu { right: auto; left: 0; }

 
.shop-cat--child { padding-left: 26px; }

 
.shop-category__apply {
    width: 100%;
    margin-top: 10px;
    justify-content: center;
}

 
.shop-category--beside .shop-category__menu {
    width: auto;
    min-width: 100%;
    padding: 6px;
}

.shop-category--beside .shop-category__head { display: none; }
.shop-category--beside .shop-cat__dot { display: none; }
.shop-category--beside .shop-cat { padding: 9px 12px; border-radius: 8px; }

.shop-panel .shop-search { flex: 0 1 300px; }

@media (max-width: 560px) {
    .shop-panel__top { align-items: stretch; }
    .shop-panel__title { width: 100%; }
    .shop-panel .shop-search {
        flex: 1 1 180px;
        min-width: 0;
    }
    .shop-category--beside .shop-category__toggle { min-width: 104px; }
    .shop-choice--sort .shop-choice__menu {
        right: 0;
        left: auto;
        max-width: calc(100vw - 32px);
    }
}

 
.import-mode {
    display: inline-flex;
    margin-top: 12px;
    padding: 3px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
    box-shadow: var(--control-shadow);
}

.import-mode__button {
    min-width: 78px;
    height: 32px;
    padding: 0 12px;
    border: 0;
    border-radius: 8px 7px 9px 7px;
    color: var(--muted);
    background: transparent;
    font: 800 12px var(--sans);
    cursor: pointer;
}

.import-mode__button:hover,
.import-mode__button.is-active {
    color: #fff;
    background: var(--accent);
}
 

@media (max-width: 860px) {
    .topbar {
        gap: 10px;
        row-gap: 4px;
        padding: 8px 12px;
    }

    .brand span {
        font-size: 23px;
    }

     
    .search {
        display: none;
    }

    .topnav {
        order: 5;
        width: 100%;
        gap: 20px;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .topnav::-webkit-scrollbar {
        display: none;
    }

    .topnav__item {
        padding: 3px 0 6px;
        font-size: 14px;
        white-space: nowrap;
    }

     
    .topnav__item[data-page="create"] {
        display: none;
    }

    .wallet {
        min-height: 36px;
        padding: 3px 9px 3px 6px;
        font-size: 16px;
    }

    .topbar .icon-button,
    .settings-menu .icon-button {
        width: 36px;
        height: 36px;
    }

     
    .sidebar {
        position: fixed;
        top: auto;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 30;
        height: auto;
        display: flex;
        align-items: center;
        gap: 6px;
        padding: 6px 8px;
        padding-bottom: calc(6px + env(safe-area-inset-bottom, 0px));
        border-right: 0;
        border-bottom: 0;
        border-top: 1px solid var(--line);
        box-shadow: 0 -10px 30px rgba(28, 42, 78, 0.12);
    }

     
    .user-chip {
        display: none;
    }

    .side-nav {
        flex: 1 1 auto;
        min-width: 0;
        display: flex;
        gap: 2px;
    }

     
    .side-nav__item[data-page="messages"] {
        display: none;
    }

     
    .side-nav__item {
        flex: 1 1 0;
        width: auto;
        min-width: 0;
        height: 52px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        padding: 0;
         
        font-size: 10px;
        font-weight: 700;
        line-height: 1;
        text-align: center;
         
        white-space: nowrap;
        overflow: hidden;
    }

    .side-nav__item img {
        width: 20px;
        height: 20px;
    }

    .side-nav__item:hover,
    .side-nav__item:nth-child(even):hover {
        transform: none;
    }

    .download-rail {
        position: static;
        flex: 1 1 0;
        width: auto;
        min-width: 0;
        height: 52px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        margin: 0;
        padding: 0;
        font-size: 10px;
        line-height: 1;
    }

    .download-rail img {
        width: 20px;
        height: 20px;
    }

     
    .content {
        padding: 18px 12px calc(78px + env(safe-area-inset-bottom, 0px));
    }
}

@media (max-width: 560px) {
     
    .catalog-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .item-art {
        height: 118px;
        margin: 8px 8px 0;
    }

    .item-card__body {
        padding: 10px 10px 12px;
        gap: 6px;
    }

    .item-card h3 {
        margin: 0;
        font-size: 14px;
        line-height: 1.25;
    }

    .item-type {
        font-size: 10px;
    }

    .item-price {
        margin: 0;
        font-size: 14px;
    }

    .item-price .wallet__coin {
        width: 16px;
        height: 18px;
    }

     
    .card-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .card-actions .compact-action {
        width: 100%;
        justify-content: center;
    }

     
    .hero-card {
        min-height: 0;
        padding: 18px 16px;
        gap: 12px;
    }

    .avatar-orb {
        width: 96px;
        height: 96px;
        font-size: 32px;
    }

    .hero-profile h1 {
        font-size: 26px;
    }

    .hero-profile p {
        font-size: 14px;
    }

    .page-card {
        padding: 14px 12px;
    }
}

 
.avatar-more {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    padding: 6px 0 2px;
}


 
 
.avatar-outfits {
    position: fixed;
     
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    inset: 0;
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(24, 34, 58, 0.42);
    backdrop-filter: blur(3px);
}
.avatar-outfits[hidden] { display: none; }
.avatar-outfits__sheet {
    width: min(720px, 100%);
    max-height: min(78vh, 720px);
    overflow: auto;
    padding: 18px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: 0 24px 60px rgba(35, 48, 84, 0.26);
}
.avatar-outfits__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}
.avatar-outfits__close {
    padding: 2px 10px;
    font-size: 20px;
    line-height: 1;
    color: var(--muted);
    cursor: pointer;
    background: none;
    border: 0;
    border-radius: 8px;
}
.avatar-outfits__close:hover { color: var(--ink); background: var(--ink-faint); }
.avatar-outfits__grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
}
.avatar-outfit {
    position: relative;
    display: block;
    width: 100%;
    padding: 8px;
    font: inherit;
    text-align: center;
    color: inherit;
    cursor: pointer;
    background: var(--card-strong);
    border: 1px solid var(--line);
    border-radius: 14px;
    transition: transform .14s ease, border-color .14s ease;
}
.avatar-outfit:hover,
.avatar-outfit:focus-visible {
    transform: translateY(-2px);
    border-color: var(--accent);
}
.avatar-outfit img,
.avatar-outfit__noimg {
    display: block;
    width: 100%;
    aspect-ratio: 1;
    border-radius: 10px;
    background: var(--veil);
    object-fit: contain;
}
.avatar-outfit__noimg {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: var(--muted);
}
.avatar-outfit__name {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
 
.avatar-outfit.is-current {
    border-color: var(--accent);
    background: var(--accent-soft);
}
.avatar-outfit__badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 1px 7px;
    font-size: 10px;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
}


 
@media (max-width: 640px) {
    .avatar-outfits {
        padding: 0;
        align-items: flex-end;
    }
    .avatar-outfits__sheet {
        width: 100%;
        max-height: 88vh;
        padding: 16px 14px calc(16px + env(safe-area-inset-bottom));
        border-radius: 18px 18px 0 0;
        border-bottom: 0;
    }
    .avatar-outfits__grid {
        gap: 10px;
        grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
    }
    .avatar-outfits__close {
        padding: 6px 14px;
        font-size: 24px;
    }
}

 

.tg-verify-backdrop {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: grid;
    place-items: center;
    padding: 16px;
    background: rgba(0, 0, 0, 0.45);
}

.tg-verify {
    width: 100%;
    max-width: 420px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--scrawl-sm);
    color: var(--ink);
    background: var(--card-strong);
    box-shadow: var(--pencil-shadow-hover);
    font: 500 14px/1.5 var(--sans);
}

.tg-verify h3 {
    margin: 0 0 8px;
    font: 700 18px/1.3 var(--sans);
}

.tg-verify p {
    margin: 0 0 12px;
}

.tg-verify-primary {
    display: block;
    margin: 4px 0 14px;
    padding: 11px 14px;
    border-radius: var(--scrawl-sm);
    color: #fff;
    background: #2aabee;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
}

.tg-verify-code code {
    font: 700 15px/1 ui-monospace, Consolas, monospace;
    letter-spacing: 0.08em;
    user-select: all;
}

.tg-verify-hint {
    opacity: 0.7;
    font-size: 13px;
}

.tg-verify-close {
    padding: 8px 14px;
    border: 1px solid var(--line);
    border-radius: var(--scrawl-sm);
    color: var(--ink);
    background: transparent;
    font: 700 13px/1 var(--sans);
    cursor: pointer;
}

 

.tg-gate {
    display: grid;
    gap: 14px;
    justify-items: center;
    text-align: center;
}

.tg-gate__lead {
    margin: 0;
    color: var(--ink);
    font-weight: 700;
}

.tg-gate__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 46px;
    padding: 0 18px;
    border-radius: 999px;
    color: #fff;
    background: #2aabee;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    transition: background 160ms ease, transform 160ms ease;
}

.tg-gate__button svg {
    width: 20px;
    height: 20px;
    flex: none;
}

.tg-gate__button:hover {
    background: #229ed9;
    transform: translateY(-1px);
}

.auth-card--entry > .auth-back {
    margin-bottom: 43.84px;
}

.tg-gate__button--discord {
    background: #5865f2;
}

.tg-gate__button--discord:hover {
    background: #4752c4;
}

.tg-gate__code {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.tg-gate__code code {
    color: var(--ink);
    font: 700 14px/1 ui-monospace, Consolas, monospace;
    letter-spacing: 0.08em;
    user-select: all;
}

.tg-gate__code a,
.tg-gate__code a:visited {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.tg-gate__code a:hover,
.tg-gate__code a:focus-visible {
    color: var(--accent-strong);
}

.tg-gate__wait {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
}

.tg-gate__why {
    width: 100%;
    color: var(--muted);
    font-size: 13px;
    text-align: left;
}

.tg-gate__why summary {
    width: max-content;
    margin: 0 auto;
    color: var(--ink-soft, var(--muted));
    font-weight: 700;
    cursor: pointer;
    list-style: none;
}

.tg-gate__why summary::-webkit-details-marker {
    display: none;
}

.tg-gate__why summary::after {
    content: " \25BE";
}

.tg-gate__why[open] summary::after {
    content: " \25B4";
}

.tg-gate__why p {
    margin: 10px 0 0;
    line-height: 1.5;
}

.settings-tg-badge {
    margin-left: auto;
    padding: 2px 10px;
    border-radius: 999px;
    color: #2aabee;
    background: rgba(42, 171, 238, 0.12);
    font-size: 12px;
    font-weight: 700;
}

 
.download-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

 
.download-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    align-items: center;
    column-gap: 20px;
    row-gap: 2px;
    min-width: 0;
    padding: 24px 26px;
    border: 1px dashed var(--ink-soft);
    border-radius: var(--scrawl-md);
    background: var(--card);
}

.download-card__os {
    grid-row: 1 / 3;
    width: 64px;
    height: 64px;
    color: var(--ink);
}

.download-card__img {
    object-fit: contain;
}

body.sky-night .download-card__img {
    filter: invert(1);
}

.download-card h2 {
    grid-column: 2;
    align-self: end;
    margin: 0;
}

.download-card .muted {
    grid-column: 2;
    align-self: start;
    margin: 0;
}

.download-card .primary-action,
.download-card .download-command {
    grid-column: 3;
    grid-row: 1 / 3;
}

.download-command {
    display: flex;
    align-items: center;
    gap: 8px;
    width: min(380px, 38vw);
    padding: 6px 6px 6px 12px;
    border: 1px dashed var(--ink-soft);
    border-radius: var(--scrawl-sm);
    background: var(--surface);
}

.download-command code {
    flex: 1;
    min-width: 0;
    overflow-x: auto;
    white-space: nowrap;
    font-family: Consolas, "Cascadia Mono", "DejaVu Sans Mono", monospace;
    font-size: 13px;
    color: var(--ink);
    scrollbar-width: none;
}

.download-command code::-webkit-scrollbar {
    display: none;
}

.download-command__copy {
    flex: none;
    padding: 6px 12px;
    border: 0;
    border-radius: var(--scrawl-sm);
    background: var(--accent);
    color: #fff;
    font: inherit;
    font-size: 13px;
    cursor: pointer;
}

.download-command__copy:hover {
    background: var(--accent-strong);
}

.download-command__copy.is-done {
    background: var(--green);
}

@media (max-width: 1280px) {
    .download-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 620px) {
    .download-card {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .download-card__os {
        width: 48px;
        height: 48px;
    }

    .download-card .primary-action,
    .download-card .download-command {
        grid-column: 1 / 3;
        grid-row: 3;
        margin-top: 14px;
        justify-self: start;
    }

    .download-command {
        width: 100%;
    }
}


 
.lite * {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
}

.sky {
    background-position: center, 0 0;
    background-repeat: no-repeat, no-repeat;
    background-size: cover, auto;
}

body.sky-day .sky {
    background-image: url("sky-day.jpg"), linear-gradient(180deg, var(--sky-top) 0%, var(--sky-mid) 58%, var(--sky-bottom) 100%);
}

body.sky-night .sky {
    background-image: url("sky-night.jpg"), linear-gradient(180deg, var(--sky-top) 0%, var(--sky-mid) 58%, var(--sky-bottom) 100%);
}

 
.sky::before,
.sky::after,
.sky .sky__clouds,
.sky .sky__glow,
.sky .sky__milkyway,
.sky .sky__stars,
.sky .sky__moon,
.sky .sky__birds,
.sky .sky__shooting {
    display: none;
}

.sky__img {
    position: absolute;
    inset: 0;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    opacity: 0;
    pointer-events: none;
    transition: opacity 5s ease-in-out;
}

.sky__img.is-on {
    opacity: 1;
}

.lite .sky__img {
    display: none;
}

 
.item-card__body h3 a { color: inherit; text-decoration: none; }
.item-card__body h3 a:hover { text-decoration: underline; }
.item-art[href] { display: block; }
.product-back { display: inline-flex; margin-bottom: 20px; color: var(--muted); text-decoration: none; }
.product-back:hover { color: var(--ink); }
.product-detail { display: grid; grid-template-columns: minmax(300px, 1.1fr) minmax(280px, 1fr); gap: 32px; max-width: 1040px; margin: 0 auto; padding: 28px; background: var(--card); border: 1px solid var(--line); border-radius: 22px; }
.product-preview { min-width: 0; }
.product-preview > img { width: 100%; aspect-ratio: 1; object-fit: contain; border-radius: 16px; background: #f8f9fc; }
.product-info { min-width: 0; }
.product-info h1 { margin: 0 0 12px; font-size: clamp(24px, 3vw, 34px); line-height: 1.2; overflow-wrap: anywhere; }
.product-creator { margin: 0 0 24px; color: var(--muted); }
.product-creator a { color: var(--accent); }
.product-purchase { padding: 20px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.product-price { display: flex; align-items: center; gap: 8px; margin: 0 0 16px; font-size: 25px; font-weight: 700; }
.product-purchase button { width: 100%; min-height: 44px; }
.product-meta { display: grid; grid-template-columns: 85px minmax(0, 1fr); gap: 14px; margin: 24px 0; font-size: 14px; }
.product-meta dt { color: var(--muted); }
.product-meta dd { margin: 0; overflow-wrap: anywhere; }
.product-description h2 { font-size: 15px; margin: 0 0 10px; }
.product-description p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.65; color: var(--muted); }
.product-favorite { display: inline-flex; align-items: center; gap: 9px; margin-top: 14px; min-height: 40px; }
.product-favorite svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.7; }
.product-favorite[aria-pressed="true"] { color: var(--accent); }
.product-favorite[aria-pressed="true"] svg { fill: currentColor; }
@media (max-width: 760px) { .product-detail { grid-template-columns: minmax(0, 1fr); padding: 18px; gap: 24px; } .product-preview { max-width: 420px; width: 100%; margin: 0 auto; } }

.product-image { width: 100%; aspect-ratio: 1; overflow: hidden; border-radius: 6px; background: #fff; display: grid; place-items: center; }
.product-image img { width: 86%; height: 86%; object-fit: contain; transform: none; }
.product-image--ugc img { transform: none; }
.global-search-choices { position: absolute; z-index: 80; top: calc(100% + 7px); left: 0; right: 0; background: #f1f7ff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 30px #0003; overflow: hidden; }
body.sky-night .global-search-choices { background: #1f2848; }
.global-search-choices[hidden] { display: none; }
.search { position: relative; }
.global-search-choices a { display: flex; align-items: center; gap: 5px; padding: 14px; color: var(--ink); font: 13px var(--sans); text-decoration: none; border-bottom: 1px solid var(--line); }
.global-search-choices a:last-child { border-bottom: 0; }
.global-search-choices a:hover, .global-search-choices a:focus-visible { background: var(--surface); outline: 2px solid var(--accent); outline-offset: -2px; }
.global-search-choices a > img { width: 18px; height: 18px; margin-right: 5px; flex-shrink: 0; }
.global-search-choices a > span { font-weight: 700; overflow: hidden; text-overflow: ellipsis; max-width: 55%; white-space: nowrap; }
.search-results-page { max-width: 1040px; margin: 0 auto; }
.search-results-page h1 { font: 700 20px var(--sans); margin: 0 0 18px; overflow-wrap: anywhere; }
.search-results-form { display: flex; gap: 12px; margin-bottom: 20px; }
.search-results-form input { flex: 1; min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--ink); font: 14px var(--sans); }
.search-results-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.search-results-grid > .inline-empty { grid-column: 1 / -1; }
.search-results-grid .person-card { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 12px; padding: 16px; }
.search-results-grid .person-avatar { width: 72px; height: 72px; border-radius: 50%; }
.search-results-grid .person-avatar-link { width: 72px; height: 72px; }
.search-results-grid .person-avatar,
#page-friends .person-avatar,
#page-home .avatar-orb { background: #fff; color: #202227; }
.search-results-grid .person-actions { grid-column: 1 / -1; width: 100%; }
.search-results-grid .person-actions button { width: 100%; }
.search-results-grid .person-meta { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 1000px) { .search-results-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .search-results-grid { grid-template-columns: minmax(0, 1fr); } }
.product-favorite { gap: 6px; margin-top: 10px; min-height: 32px; padding: 4px 2px; border: 0; border-radius: 0; background: transparent; box-shadow: none; color: var(--ink); font-size: 13px; font-family: var(--sans); cursor: pointer; }
.product-favorite:hover { background: transparent; box-shadow: none; color: var(--accent); transform: none; }
.product-favorite svg { width: 18px; height: 18px; }
.product-favorite:focus-visible, .product-more summary:focus-visible, .product-avatar-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.product-heading { display: flex; align-items: flex-start; gap: 12px; }
.product-heading h1 { flex: 1; }
.product-more { position: relative; flex: 0 0 auto; }
.product-more summary { list-style: none; cursor: pointer; width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); font: 700 23px/1 var(--sans); }
.product-more summary::-webkit-details-marker { display: none; }
.product-more-menu { position: absolute; top: 38px; right: 0; min-width: 145px; padding: 5px; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 8px 24px rgba(0,0,0,.14); z-index: 10; }
.product-more-menu a { display: block; padding: 10px; color: var(--ink); text-decoration: none; font: 14px var(--sans); white-space: nowrap; }
.product-more-menu a:hover { background: var(--accent-soft); }
.product-owned { display: inline-block; margin-left: 12px; color: var(--green); font-size: 13px; font-weight: 700; }
.product-purchase--owned { display: flex; align-items: center; justify-content: space-between; gap: 16px; font-size: 14px; }
.product-avatar-link { display: grid; place-items: center; flex: 0 0 auto; width: 40px; height: 40px; background: var(--accent-soft); border-radius: 6px; color: var(--ink); }
.product-avatar-link svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; }
@media (max-width: 760px) { .product-detail { grid-template-columns: minmax(0, 1fr); } .product-preview { max-width: 420px; } }

.catalog-creator-form { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 16px 0 22px; font: 14px var(--sans); }
.catalog-creator-form input { width: 210px; max-width: 100%; min-height: 36px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: var(--surface); }
.profile-store-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 18px; }
.profile-store-item { display: flex; flex-direction: column; min-width: 0; gap: 7px; text-decoration: none; color: var(--ink); font: 12px var(--sans); }
.profile-store-item > img { width: 100%; aspect-ratio: 1; object-fit: contain; border-radius: 7px; background: var(--surface); }
.profile-store-item strong { overflow-wrap: anywhere; line-height: 1.3; }
.profile-store-item > span { display: flex; align-items: center; gap: 5px; }
.profile-store-item .wallet__coin { width: 14px; height: 16px; }
.profile-store .profile-panel__heading a { color: inherit; text-decoration: none; }
.profile-store-item:hover strong, .profile-store .profile-panel__heading a:hover { text-decoration: underline; }
.product-image--ugc img { transform: none; }
@media (max-width: 900px) { .profile-store-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 480px) { .profile-store-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
 
.verified-badge { display: inline-block; width: .85em; height: .85em; min-width: 14px; min-height: 14px; margin-left: .3em; vertical-align: -.08em; object-fit: contain; }
 
@media (max-width: 860px) {
    .topbar .icon-button,
    .settings-menu .icon-button {
        width: 44px;
        height: 44px;
    }

    .settings-menu__popover > a,
    .settings-menu__popover > button,
    .profile-overflow__menu > a,
    .profile-overflow__menu > button {
        min-height: 44px;
        display: flex;
        align-items: center;
    }

     
    .content input:not([type="checkbox"]):not([type="radio"]),
    .content select,
    .content textarea,
    .auth-card input,
    .auth-card select,
    .auth-card textarea,
    .avatar-preset-dialog input {
        font-size: 16px;
    }

    .content input:not([type="checkbox"]):not([type="radio"]),
    .content select,
    .auth-card input:not([type="checkbox"]):not([type="radio"]),
    .auth-card select {
        min-height: 44px;
    }

    .avatar-preset-dialog__close {
        min-width: 44px;
        min-height: 44px;
        flex: 0 0 auto;
    }
}

 
.avatar-preset-dialog {
    max-height: calc(100vh - 40px);
    max-height: calc(100dvh - 40px);
    overflow-y: auto;
    overscroll-behavior: contain;
}

@media (max-width: 560px) {
    .auth-wrap {
        padding: 16px;
    }

    .auth-card {
        width: min(450px, calc(100vw - 32px));
        padding: 28px 20px;
        min-width: 0;
    }

    #authForm,
    #resetForm,
    .auth-field,
    .auth-field input {
        min-width: 0;
    }

    .avatar-preset-modal {
        padding: 12px;
    }

    .avatar-preset-dialog {
        max-height: calc(100vh - 24px);
        max-height: calc(100dvh - 24px);
    }

    .settings-section {
        padding: 18px 14px;
    }

    .settings-account-row {
        grid-template-columns: 86px minmax(0, 1fr) auto;
        gap: 8px;
    }

    .settings-account-row > strong {
        min-width: 0;
        overflow-wrap: anywhere;
    }
}

/* 14.10.2026: sign up confirmation "17 or older + Terms" and the /terms page. */
.auth-check {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    color: var(--muted);
    font-size: 15px;
    font-weight: 400;
    line-height: 1.4;
    cursor: pointer;
}

.auth-check[hidden] {
    display: none;
}

.auth-check input {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    margin: 2px 0 0;
    accent-color: var(--accent);
}

.auth-check a {
    color: var(--accent);
    font-weight: 700;
}

.auth-card.legal-card {
    width: min(780px, calc(100vw - 48px));
    gap: 10px;
}

.legal-card h1 {
    margin: 4px 0 0;
    font-size: 30px;
}

.legal-card h2 {
    margin: 18px 0 0;
    font-size: 19px;
}

.legal-card p,
.legal-card li {
    margin: 0;
    color: var(--ink);
    font-size: 15px;
    line-height: 1.55;
}

.legal-card ul {
    margin: 4px 0 0;
    padding-left: 22px;
    display: grid;
    gap: 6px;
}

.legal-card .legal-version {
    color: var(--muted);
}

.legal-card a {
    color: var(--accent);
}

@media (max-width: 560px) {
    .auth-card.legal-card {
        padding: 28px 20px;
    }
}

/* 14.10.2026: the Terms link in the guest footer is plain text, not a pill. */
.guest-foot__links {
    align-items: center;
}

.guest-foot__links a:not(.guest-foot__social):hover {
    text-decoration: underline;
}

/* 14.10.2026: accept screen for accounts that have not accepted the current Terms (site/views/pages/terms-gate.php). */
.terms-gate-title {
    margin: 0;
    font-family: var(--hand-head);
    font-size: 34px;
    font-weight: 400;
    letter-spacing: 0.04em;
}

#termsGateForm {
    display: grid;
    gap: 16px;
}

/* 14.10.2026: a link inside a login error (the Discord appeal link of a ban notice). */
.auth-error a {
    color: inherit;
    text-decoration: underline;
    overflow-wrap: anywhere;
}

/* 14.10.2026: accept screen text spacing and the Cloudflare widget in the log in form. */
.terms-gate-text {
    line-height: 1.5;
}

.terms-gate-title {
    line-height: 1.2;
}

#termsGateForm .auth-check {
    align-items: center;
}

#termsGateForm .auth-check input {
    margin: 0;
}

.auth-card .cf-turnstile {
    width: 100%;
    min-height: 65px;
}

/* 14.10.2026: accept screen is one centered block, the button as wide as the card (no staircase of different widths). */
.terms-gate-card {
    text-align: center;
}

.terms-gate-card #termsGateForm .auth-check {
    justify-content: center;
}

.terms-gate-card .auth-submit {
    justify-self: stretch;
    width: 100%;
}

.terms-gate-card .auth-aside {
    text-align: center;
}

.terms-gate-card .auth-link {
    text-align: center;
}

/* 18.10: the whole site was too large at 100% browser zoom; on desktop widths it is drawn at 85%, like zooming the browser out.
   `zoom` does not rescale vh units, so every viewport-height rule is divided by the same factor. */
@media (min-width: 900px) {
    html { zoom: 0.85; }
    body, .app-shell, .auth-wrap, .guest { min-height: calc(100vh / 0.85); }
    .sidebar { height: calc(100vh / 0.85 - 70px); }
    .shop-category__menu { max-height: calc(70vh / 0.85); }
    .shop-category__list { max-height: calc(60vh / 0.85); }
    .avatar-outfits__sheet { max-height: min(calc(78vh / 0.85), 720px); }
    .avatar-preset-dialog { max-height: calc(100vh / 0.85 - 40px); }
}

/* 18.10: Messages has four folders */
.messages-tabs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.messages-panel[hidden] { display: none; }
.messages-panel .empty-state { text-align: center; }

/* 18.10: no underline bar under Create in the top navigation */
.topnav__item[href="/create"]::after { display: none; }

/* 18.10: Discover was removed from the top navigation; the search keeps the place it had
   (Discover is 60px wide plus the 24px gap), and Create has no underline of any kind. */
@media (min-width: 900px) {
    .topnav { margin-right: 84px; }
}
.topnav__item[href="/create"], .topnav__item[href="/create"]:hover { text-decoration: none; }

/* 18.10: Discover was removed from the top navigation; the search keeps the place it had
   (Discover is 60px wide plus the 24px gap), and Create has no underline of any kind. */
@media (min-width: 900px) {
    .topnav { margin-right: 84px; }
}
.topnav__item[href="/create"], .topnav__item[href="/create"]:hover { text-decoration: none; }

/* Advanced skin colours: keep the existing palette and flat legacy controls. */
.avatar-colors__advanced { display: flex; justify-content: flex-end; }
.avatar-colors__advanced-link {
  border: 0; padding: 4px 0; background: transparent; color: var(--ink);
  font: inherit; font-size: 13px; cursor: pointer;
}
.avatar-colors__advanced-link:hover { text-decoration: underline; }
body.has-skin-tone-modal { overflow: hidden; }
.skin-tone-modal { position: fixed; z-index: 1500; inset: 0; display: grid; place-items: center; padding: 18px; }
.skin-tone-modal__backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .48); }
.skin-tone-dialog {
  position: relative; width: min(100%, 540px); max-height: calc(100dvh - 36px);
  overflow-y: auto; margin: 0; border: 1px solid var(--line); border-radius: 3px;
  background: var(--surface); color: var(--ink); box-shadow: 0 6px 24px rgba(0, 0, 0, .22);
  font-family: inherit;
}
.skin-tone-dialog__header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 18px; border-bottom: 1px solid var(--line); }
.skin-tone-dialog__header h2 { margin: 0; font-size: 17px; font-weight: 600; }
.skin-tone-dialog__body { display: grid; grid-template-columns: 135px minmax(0, 1fr); gap: 24px; padding: 20px 22px 8px; }
.skin-tone-dialog__parts { display: flex; flex-direction: column; gap: 12px; margin: 0; padding: 0; border: 0; min-width: 0; }
.skin-tone-dialog__parts label { display: flex; align-items: center; gap: 7px; font-size: 14px; cursor: pointer; }
.skin-tone-dialog__parts input { margin: 0; width: 14px; height: 14px; accent-color: var(--ink); }
.skin-tone-dialog__editor { min-width: 0; }
.skin-tone-dialog__palette { display: grid; grid-template-columns: repeat(6, 26px); justify-content: space-between; gap: 13px 8px; margin: 0 2px 24px; }
.skin-tone-dialog__palette .avatar-colors__swatch { width: 26px; height: 26px; }
.skin-tone-dialog__palette .avatar-colors__swatch.is-active::after { left: 8px; top: 4px; width: 6px; height: 11px; }
.skin-tone-dialog__hex-label { display: block; margin-bottom: 7px; font-size: 13px; font-weight: 600; }
.skin-tone-dialog__hex { display: flex; align-items: center; gap: 8px; padding: 0 10px; min-height: 36px; border: 1px solid var(--line); border-radius: 3px; }
.skin-tone-dialog__hex:focus-within { outline: 1px solid var(--ink); }
.skin-tone-dialog__sample { flex: 0 0 19px; height: 19px; border: 1px solid var(--line); border-radius: 50%; }
.skin-tone-dialog__hex input { min-width: 0; width: 100%; padding: 7px 0; border: 0; outline: none; background: transparent; color: inherit; font: inherit; font-size: 13px; }
.skin-tone-dialog__error { min-height: 18px; margin: 6px 0 0; font-size: 12px; color: var(--error, #b32c2c); }
.skin-tone-dialog__footer { display: flex; justify-content: center; padding: 12px 20px 20px; }
.skin-tone-dialog__footer button { min-width: 90px; }
.skin-tone-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 480px) {
  .skin-tone-modal { padding: 10px; }
  .skin-tone-dialog { max-height: calc(100dvh - 20px); }
  .skin-tone-dialog__body { grid-template-columns: minmax(85px, .8fr) minmax(0, 1.6fr); padding: 17px 14px 6px; gap: 16px; }
  .skin-tone-dialog__parts label { font-size: 12px; }
  .skin-tone-dialog__palette { grid-template-columns: repeat(5, 23px); gap: 12px 7px; }
  .skin-tone-dialog__palette .avatar-colors__swatch { width: 23px; height: 23px; }
  .skin-tone-dialog__header { padding: 12px 14px; }
  .skin-tone-dialog__header h2 { font-size: 15px; }
}
/* End advanced skin colours. */
