

:root {
    --pw-lime: #8fce00;
    --pw-lime-hover: #7fce00;
    --pw-pag: #ffa500;
    --pw-pag-hover: #ffb533;
    --pw-ink: #1a1a1a;
    --pw-muted: #888888;
    --pw-bg: #ffffff;
    --pw-soft: #f3f3f3;
    --pw-line: #e6e6e6;
    --pw-danger: #c0392b;
    --pw-online: #2ecc71;
    --pw-playing: #3498db;
    --pw-developing: #f1c40f;
    --pw-offline: #bdbdbd;
    --pw-font-display: "Archivo Black", "Arial Black", sans-serif;
    --pw-font: "Work Sans", "Segoe UI", sans-serif;
    --pw-col: 760px;
    --pw-nav-h: 52px;
    --pw-radius: 6px;
}

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

body {
    min-height: 100vh;
    font-family: var(--pw-font);
    font-size: 14px;
    line-height: 1.45;
    color: var(--pw-ink);
    background: var(--pw-bg);
    display: flex;
    flex-direction: column;
}

img {
    max-width: 100%;
    display: block;
}

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

a.link {
    color: var(--pw-ink);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

a.link:hover {
    color: var(--pw-muted);
}


.pw-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    min-height: var(--pw-nav-h);
    height: auto;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0 0.75rem;
    background: var(--pw-bg);
    border-bottom: 1px solid var(--pw-line);
}

.pw-nav-left {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
    min-width: 0;
}

.pw-nav-brand {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.pw-nav-brand img {
    height: 28px;
    width: auto;
}

.pw-nav-primary {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.pw-nav-primary .nav-link,
.pw-nav-utils .nav-link,
.nav-link-games {
    font-size: 13px;
    font-weight: 500;
    color: var(--pw-ink);
    padding: 0.35rem 0.35rem;
    border-radius: var(--pw-radius);
    white-space: nowrap;
}

.nav-link-games {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
}

.pw-nav-primary .nav-link:hover,
.pw-nav-utils .nav-link:hover,
.nav-link-games:hover {
    background: var(--pw-soft);
    color: var(--pw-ink);
}

.pw-nav-primary a[aria-current="page"],
.pw-nav-utils a[aria-current="page"],
.nav-link-games[aria-current="page"],
.nav-chip[aria-current="page"] {
    outline: 2px solid var(--pw-lime);
    outline-offset: 1px;
}

.nav-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--pw-ink);
    color: #fff;
    border-radius: 999px;
    padding: 0.35rem 0.75rem;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    text-decoration: none;
}

.nav-chip:hover {
    background: #333;
    color: #fff;
}

.nav-ccu {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: var(--pw-lime);
    color: #1a1a1a;
    border-radius: 999px;
    padding: 0.12rem 0.45rem;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
}

.nav-ccu .fa {
    width: 0.85em;
    height: 0.85em;
}

.nav-ccu-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin-left: 0.4rem;
    color: var(--pw-muted);
    font-size: 0.85em;
    font-weight: 600;
}

.pw-nav-search {
    flex: 1;
    max-width: 420px;
    margin: 0 auto;
    position: relative;
    min-width: 0;
}

.pw-nav-utils {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
    list-style: none;
    margin: 0 0 0 auto;
    padding: 0;
}

.pw-icon-btn {
    appearance: none;
    border: 0;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: var(--pw-radius);
    cursor: pointer;
    color: var(--pw-ink);
    padding: 0;
}

.pw-icon-btn:hover {
    background: var(--pw-soft);
}

.pw-search-icon {
    width: 16px;
    height: 16px;
    border: 2px solid currentColor;
    border-radius: 50%;
    position: relative;
    box-sizing: border-box;
}

.pw-search-icon::after {
    content: "";
    position: absolute;
    width: 7px;
    height: 2px;
    background: currentColor;
    right: -5px;
    bottom: -2px;
    transform: rotate(45deg);
    border-radius: 1px;
}

.pw-burger-bars,
.pw-burger-bars::before,
.pw-burger-bars::after {
    display: block;
    width: 18px;
    height: 2px;
    background: currentColor;
    border-radius: 1px;
    position: relative;
}

.pw-burger-bars::before,
.pw-burger-bars::after {
    content: "";
    position: absolute;
    left: 0;
}

.pw-burger-bars::before { top: -6px; }
.pw-burger-bars::after { top: 6px; }

.pw-nav-search-toggle,
.pw-nav-burger {
    display: none;
    list-style: none;
}

.pw-nav-drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(26, 26, 26, 0.35);
    z-index: 180;
}

.pw-nav-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: min(320px, 88vw);
    height: 100%;
    background: #fff;
    z-index: 190;
    box-shadow: -8px 0 28px rgba(0, 0, 0, 0.12);
    display: flex;
    flex-direction: column;
    overflow: auto;
}

.pw-nav-drawer[hidden],
.pw-nav-drawer-backdrop[hidden] {
    display: none !important;
}

.pw-nav-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--pw-line);
    font-size: 15px;
}

.pw-nav-drawer-list {
    list-style: none;
    margin: 0;
    padding: 0.5rem;
}

.pw-nav-drawer-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 0.9rem;
    min-height: 44px;
    border-radius: var(--pw-radius);
    font-size: 15px;
    font-weight: 500;
}

.pw-nav-drawer-list a:hover {
    background: var(--pw-soft);
}

.pw-nav-drawer-list a.is-danger {
    color: var(--pw-danger);
}

.pw-menu-label {
    list-style: none;
    padding: 0.55rem 0.9rem 0.25rem;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--pw-muted);
}

.pw-nav-user-menu .pw-menu-label {
    padding: 0.4rem 0.7rem 0.15rem;
}

body.pw-drawer-open {
    overflow: hidden;
}

/* —— legacy chip styles kept for pages that still use them —— */
.pw-nav-links {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
    list-style: none;
    margin-left: auto;
}

.pw-nav-links > li > a {
    font-size: 13px;
    font-weight: 500;
    color: var(--pw-ink);
    padding: 0.3rem 0.45rem;
    white-space: nowrap;
}

.pw-nav-links > li > a:hover {
    color: var(--pw-muted);
}

.pw-nav-links a.nav-chip {
    background: var(--pw-ink);
    color: #fff;
    border-radius: 999px;
    padding: 0.35rem 0.75rem;
    font-size: 12px;
    font-weight: 600;
}

.pw-nav-links a.nav-chip:hover {
    background: #333;
    color: #fff;
}

.pw-nav-links a.is-active,
.pw-nav-links a[aria-current="page"] {
    outline: 2px solid var(--pw-lime);
    outline-offset: 1px;
}

.pw-search-form {
    display: flex;
    align-items: stretch;
    position: relative;
    width: 100%;
}

.pw-search-form input {
    flex: 1;
    min-width: 0;
    border: 1px solid var(--pw-line);
    border-right: 0;
    border-radius: var(--pw-radius) 0 0 var(--pw-radius);
    padding: 0.4rem 0.7rem;
    font: inherit;
    font-size: 13px;
    background: var(--pw-soft);
    color: var(--pw-ink);
}

.pw-search-form input:focus {
    outline: none;
    background: #fff;
    border-color: #ccc;
}

.pw-search-form > button {
    appearance: none;
    border: 1px solid var(--pw-ink);
    background: var(--pw-ink);
    color: #fff;
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    padding: 0 0.85rem;
    border-radius: 0 var(--pw-radius) var(--pw-radius) 0;
    cursor: pointer;
    flex-shrink: 0;
}

.pw-search-form > button:hover {
    background: #333;
}

.pw-search-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid var(--pw-line);
    border-top: none;
    border-radius: 0 0 var(--pw-radius) var(--pw-radius);
    z-index: 120;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
}

.pw-search-dropdown.visible {
    display: block;
}

.pw-search-option {
    display: block;
    padding: 0.65rem 0.85rem;
    font-size: 13px;
    color: var(--pw-ink);
    cursor: pointer;
    border-bottom: 1px solid var(--pw-soft);
}

.pw-search-option:last-child {
    border-bottom: 0;
}

.pw-search-option:hover {
    background: var(--pw-soft);
}

.pw-search-query {
    font-weight: 650;
}

.pw-nav-links {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
    list-style: none;
    margin-left: auto;
}

.pw-nav-links > li > a {
    font-size: 13px;
    font-weight: 500;
    color: var(--pw-ink);
    padding: 0.3rem 0.45rem;
    white-space: nowrap;
}

.pw-nav-links > li > a:hover {
    color: var(--pw-muted);
}

.pw-nav-links a.nav-chip {
    background: var(--pw-ink);
    color: #fff;
    border-radius: 999px;
    padding: 0.35rem 0.75rem;
    font-size: 12px;
    font-weight: 600;
}

.pw-nav-links a.nav-chip:hover {
    background: #333;
    color: #fff;
}

.pw-nav-links a.is-active {
    outline: 2px solid var(--pw-lime);
    outline-offset: 1px;
}

.pw-badges {
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
    vertical-align: middle;
    margin-left: 0.2rem;
}

.pw-badges .fa {
    width: 0.95em;
    height: 0.95em;
    color: var(--pw-ink);
}

.pw-nav-currency {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 12px;
    font-weight: 600;
    color: var(--pw-muted);
    padding: 0 0.25rem;
    white-space: nowrap;
}

.pw-nav-currency .fa {
    width: 0.95em;
    height: 0.95em;
    color: var(--pw-ink);
}

.pw-nav-currency a {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: inherit;
    padding: 0 !important;
}

.pw-nav-currency a:hover {
    color: var(--pw-ink);
}

.pw-nav-notif {
    position: relative;
    list-style: none;
}

.pw-nav-notif > a {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--pw-radius);
    padding: 0 !important;
}

.pw-nav-notif > a:hover {
    background: var(--pw-soft);
}

.pw-nav-notif > a .fa {
    width: 1.05em;
    height: 1.05em;
}

.pw-notif-badge {
    position: absolute;
    top: -2px;
    right: -4px;
    background: #e53935;
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 10px;
    line-height: 1;
}

.pw-notif-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: -12px;
    width: 300px;
    background: #fff;
    border: 1px solid var(--pw-line);
    border-radius: var(--pw-radius);
    z-index: 140;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.pw-nav-notif.open .pw-notif-dropdown {
    display: block;
}

.pw-notif-header {
    padding: 0.65rem 0.85rem;
    font-weight: 650;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--pw-line);
}

.pw-notif-list {
    max-height: 280px;
    overflow-y: auto;
}

.pw-notif-empty,
.pw-notif-loading {
    padding: 1.25rem;
    text-align: center;
    color: var(--pw-muted);
    font-size: 0.85rem;
}

.pw-notif-item {
    display: block;
    padding: 0.65rem 0.85rem !important;
    border-bottom: 1px solid var(--pw-soft);
    color: var(--pw-ink) !important;
    white-space: normal;
}

.pw-notif-item:hover {
    background: var(--pw-soft);
}

.pw-notif-item.unread {
    background: #f5faf0;
}

.pw-notif-text {
    display: block;
    font-size: 0.82rem;
    line-height: 1.35;
}

.pw-notif-time {
    display: block;
    font-size: 0.7rem;
    color: var(--pw-muted);
    margin-top: 0.2rem;
}

.pw-notif-footer {
    display: block;
    text-align: center;
    padding: 0.65rem !important;
    font-size: 0.8rem;
    font-weight: 600;
    border-top: 1px solid var(--pw-line);
    color: var(--pw-muted) !important;
}

.pw-notif-footer:hover {
    background: var(--pw-soft);
    color: var(--pw-ink) !important;
}


.pw-nav-user {
    position: relative;
    list-style: none;
}

.pw-nav-user-btn {
    appearance: none;
    border: 0;
    background: transparent;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.2rem 0.25rem;
    cursor: pointer;
    font: inherit;
    color: var(--pw-ink);
    border-radius: var(--pw-radius);
}

.pw-nav-user-btn:hover,
.pw-nav-user.open .pw-nav-user-btn {
    background: var(--pw-soft);
}

.pw-nav-user-name {
    display: inline-flex;
    align-items: center;
    font-size: 13px;
    font-weight: 600;
}

.pw-nav-user-btn img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--pw-soft);
}

.pw-nav-user-menu {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    min-width: 180px;
    background: #fff;
    border: 1px solid var(--pw-line);
    border-radius: var(--pw-radius);
    list-style: none;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    padding: 0.3rem;
    z-index: 130;
}

.pw-nav-user.open .pw-nav-user-menu {
    display: block;
}

.pw-nav-user-menu a {
    display: block;
    padding: 0.5rem 0.7rem;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
}

.pw-nav-user-menu a:hover {
    background: var(--pw-soft);
}

.pw-nav-user-menu a.is-danger {
    color: var(--pw-danger);
}

.pw-menu-divider {
    height: 1px;
    background: var(--pw-line);
    margin: 0.3rem 0.35rem;
    list-style: none;
    padding: 0;
}


.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 1rem;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    border-radius: var(--pw-radius);
    border: 1px solid transparent;
    cursor: pointer;
    background: var(--pw-soft);
    color: var(--pw-ink);
    text-decoration: none;
    transition: background 0.2s ease, filter 0.2s ease;
}

.btn:not(.btn-pag, .btn-play):hover {
    background: #e8e8e8;
}

.btn-play {
    background: var(--pw-lime);
    color: #1a1a1a;
}
.btn-play:hover {
    background: var(--pw-lime-hover);
}

.btn-pag {
    background: var(--pw-pag);
    color: #1a1a1a;
}
.btn-pag:hover {
    background: var(--pw-pag-hover);
}

.btn-privated {
    background: #d0d0d0;
    color: #666;
    border-color: #bbb;
    cursor: default;
    pointer-events: none;
    text-align: center;
    display: inline-flex;
    box-sizing: border-box;
}

.btn-privated:hover {
    background: #d0d0d0;
    filter: none;
}

.btn-ghost {
    background: transparent;
    border-color: var(--pw-line);
}

.btn-block {
    width: 100%;
}
.pw-site-banner {
    width: 100%;
    padding: 0.65rem 1rem;
    text-align: center;
    font-size: 1.2rem;
    line-height: 1.4;
    border-bottom: 1px solid var(--pw-line);
}
.site-banner-img {
    width: 3rem;
    display: inline-block;
    top: calc(50% - 1rem);
    position: relative;
}
.pw-site-banner-inner {
    max-width: 85%;
    margin: 0 auto;
}
.pw-site-banner-link {
    font-weight: 600;
    text-decoration: underline;
    margin-left: 0.35rem;
    color: inherit;
    vertical-align: center;
}
.pw-site-banner-text {
    vertical-align: center;
}
.pw-site-banner--info {
    background: #e8f0fe;
    color: #174ea6;
}
.pw-site-banner--success {
    background: #e6f4ea;
    color: #137333;
}
.pw-site-banner--warn {
    background: #fef7e0;
    color: #8a6d00;
}

.pw-main {
    flex: 1;
    width: 100%;
}

.pw-shell {
    width: min(100% - 2rem, var(--pw-col));
    margin: 0 auto;
    padding: 1.75rem 0 3rem;
}

.pw-footer {
    width: min(100% - 2rem, var(--pw-col));
    margin: 0 auto;
    padding: 1.5rem 0 2rem;
    text-align: center;
    font-size: 12px;
    color: var(--pw-muted);
}

.pw-footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.85rem;
    margin-bottom: 0.75rem;
}

.pw-footer-links a:hover {
    color: var(--pw-ink);
}

.pw-footer p {
    line-height: 1.5;
}


.landing {
    width: min(100% - 2rem, 380px);
    margin: 3.5rem auto 4rem;
    text-align: center;
}

.landing .terms-accept {
    text-align: left;
    margin-top: 1.1rem;
    margin-bottom: 0.75rem;
}

.landing-logo {
    width: min(100%, 260px);
    margin: 0 auto 1.5rem;
}

.landing-kicker {
    font-family: var(--pw-font-display);
    font-size: 1.4rem;
    font-weight: 400;
    letter-spacing: -0.01em;
    margin-bottom: 0.4rem;
}

.landing-lead {
    color: var(--pw-muted);
    font-size: 0.95rem;
    margin-bottom: 1.75rem;
}

.landing-auth {
    text-align: left;
}

.landing-auth h2 {
    font-size: 0.95rem;
    font-weight: 650;
    color: var(--pw-ink);
    margin-bottom: 0.85rem;
}

.landing-auth .form-foot {
    margin-top: 1rem;
    font-size: 0.85rem;
    color: var(--pw-muted);
    text-align: center;
}


.form-group {
    margin-bottom: 0.75rem;
}

.form-group input[type="checkbox"] {
    width: auto;
    padding: 0;
    margin: 0;
    flex-shrink: 0;
    accent-color: var(--pw-lime);
}

.terms-accept {
    display: flex;
    gap: 0.7rem;
    align-items: flex-start;
    margin-bottom: 0.85rem;
}

.terms-accept label {
    display: block;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.55;
    color: var(--pw-ink);
    margin-bottom: 0;
}

.terms-accept input[type="checkbox"] {
    width: auto;
    margin-top: 0.2rem;
    flex-shrink: 0;
}

.recaptcha-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}

.recaptcha-wrap .g-recaptcha {
    display: inline-block;
}

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--pw-muted);
    margin-bottom: 0.3rem;
}

.form-group input {
    width: 100%;
    padding: 0.6rem 0.75rem;
    font: inherit;
    font-size: 14px;
    border: 1px solid var(--pw-line);
    border-radius: var(--pw-radius);
    background: var(--pw-soft);
    color: var(--pw-ink);
}

.form-group input:focus {
    outline: none;
    background: #fff;
    border-color: #bbb;
}

.alert {
    padding: 0.65rem 0.75rem;
    margin-bottom: 0.85rem;
    font-size: 0.85rem;
    border-radius: var(--pw-radius);
    background: #fdecea;
    color: var(--pw-danger);
}


.auth-page {
    width: min(100% - 2rem, 380px);
    margin: 3rem auto 4rem;
}

.auth-page h1 {
    font-family: var(--pw-font-display);
    font-size: 1.45rem;
    font-weight: 400;
    letter-spacing: -0.01em;
    text-align: center;
    margin-bottom: 0.35rem;
}

.auth-page .auth-lead {
    text-align: center;
    color: var(--pw-muted);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.auth-page .form-foot {
    margin-top: 1rem;
    text-align: center;
    font-size: 0.85rem;
    color: var(--pw-muted);
}


.section {
    margin-bottom: 2rem;
}

.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.85rem;
}

.section-head h2 {
    font-size: 0.95rem;
    font-weight: 650;
    color: var(--pw-ink);
}

.section-head a {
    font-size: 12px;
    color: var(--pw-muted);
}

.section-head a:hover {
    color: var(--pw-ink);
}

.home-hero {
    display: flex;
    align-items: center;
    gap: 1.1rem;
    padding: 1rem 0 0.25rem;
}

.home-hero-avatar {
    flex-shrink: 0;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--pw-soft);
    border: 2px solid var(--pw-line);
}

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

.home-hero-main {
    min-width: 0;
    flex: 1;
}

.home-hero-name {
    font-family: var(--pw-font-display);
    font-size: 1.45rem;
    font-weight: 400;
    letter-spacing: -0.02em;
    line-height: 1.15;
    margin-bottom: 0.35rem;
}

.home-hero-currency {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin-bottom: 0.7rem;
    font-size: 13px;
    font-weight: 600;
    color: var(--pw-ink);
}

.home-hero-currency a:hover {
    color: var(--pw-muted);
}

.home-hero-currency .fa {
    margin-right: 0.2rem;
}

.home-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.home-hero-actions .btn {
    min-height: 40px;
}

.friends-playing-row {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding: 0.1rem 0 0.35rem;
    scrollbar-width: none;
}

.friends-playing-row::-webkit-scrollbar {
    display: none;
}

.friends-playing-chip {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    min-width: 220px;
    max-width: 280px;
    padding: 0.55rem 0.7rem;
    background: var(--pw-soft);
    border-radius: var(--pw-radius);
}

.friends-playing-chip .friend-avatar {
    width: 48px;
    height: 48px;
    margin: 0;
    flex-shrink: 0;
}

.friends-playing-meta {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.friends-playing-meta strong {
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.friends-playing-meta > span {
    font-size: 12px;
    color: var(--pw-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.friends-playing-meta .btn {
    align-self: flex-start;
    margin-top: 0.2rem;
    padding: 0.35rem 0.7rem;
    font-size: 12px;
    min-height: 32px;
}

.home-empty-places {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

.create-choice-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
    margin: 0 0 1.75rem;
}

.create-choice {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 1rem 1.1rem;
    background: var(--pw-soft);
    border-radius: var(--pw-radius);
    border: 1px solid transparent;
    min-height: 88px;
}

.create-choice:hover {
    border-color: var(--pw-lime);
    background: #f7fbf0;
}

.create-choice strong {
    font-size: 0.98rem;
}

.create-choice span {
    font-size: 13px;
    color: var(--pw-muted);
    line-height: 1.35;
}

@media (max-width: 640px) {
    .create-choice-row {
        grid-template-columns: 1fr;
    }
}

.friends-row {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding: 0.15rem 0 0.35rem;
    scrollbar-width: none;
}

.friends-row::-webkit-scrollbar {
    display: none;
}

.friend-chip {
    flex: 0 0 auto;
    width: 72px;
    text-align: center;
    cursor: pointer;
    position: relative;
}

.friend-avatar {
    width: 56px;
    height: 56px;
    margin: 0 auto 0.4rem;
    border-radius: 50%;
    background: #ddd;
    position: relative;
    overflow: hidden;
    display: grid;
    place-items: center;
    font-weight: 650;
    font-size: 1rem;
    color: rgba(0, 0, 0, 0.35);
}

.friend-avatar img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.friend-avatar.add {
    background: var(--pw-soft);
    color: var(--pw-muted);
    font-size: 1.35rem;
    font-weight: 400;
}

.status-dot {
    position: absolute;
    right: 1px;
    bottom: 1px;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    border: 2px solid #fff;
    background: var(--pw-offline);
    z-index: 1;
}

.status-online { background: var(--pw-online); }
.status-playing { background: var(--pw-playing); }
.status-developing { background: var(--pw-developing); }
.status-offline { background: var(--pw-offline); }

.friend-name {
    display: block;
    position: relative;
    width: 100%;
    max-width: 72px;
    margin: 0 auto;
    font-size: 11px;
    font-weight: 500;
    color: var(--pw-ink);
    white-space: nowrap;
    overflow: hidden;
    line-height: 1.25;
}

.friend-name::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 1.1em;
    pointer-events: none;
    background: linear-gradient(to right, transparent, var(--pw-bg));
    opacity: 0;
}

.friend-name.is-overflow::after {
    opacity: 1;
}

.friend-name-track {
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
    max-width: none;
    will-change: transform;
}

.friend-chip:hover .friend-name.is-overflow .friend-name-track {
    animation: friend-name-marquee 2.8s ease-in-out infinite alternate;
}

@keyframes friend-name-marquee {
    from { transform: translateX(0); }
    to { transform: translateX(var(--friend-scroll, 0px)); }
}

.friend-name .pw-badges {
    flex-shrink: 0;
}

.friend-name .pw-badges .fa {
    width: 0.85em;
    height: 0.85em;
    flex-shrink: 0;
}

.friend-popup {
    display: none;
    position: fixed;
    z-index: 200;
    background: #fff;
    border: 1px solid var(--pw-line);
    border-radius: var(--pw-radius);
    min-width: 130px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    padding: 0.2rem;
}

.friend-popup.visible {
    display: block;
}

.friend-popup a,
.friend-popup button {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.45rem 0.6rem;
    border-radius: 4px;
    font: inherit;
    font-size: 12px;
    font-weight: 500;
    border: 0;
    background: transparent;
    cursor: pointer;
    color: var(--pw-ink);
}

.friend-popup a:hover,
.friend-popup button:hover {
    background: var(--pw-soft);
}

.friend-popup .friend-join-btn {
    color: #1a7a3a;
    font-weight: 700;
}

.game-rail {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.1rem 0.9rem;
}

@media (max-width: 980px) {
    .pw-nav-primary {
        display: none;
    }

    .pw-nav-burger {
        display: list-item;
    }

    .pw-nav-auth-desktop {
        display: none;
    }
}

@media (max-width: 720px) {
    .game-rail {
        grid-template-columns: repeat(2, 1fr);
    }

    .pw-nav {
        padding: 0 0.65rem;
        gap: 0.4rem;
    }

    .pw-nav-user-name {
        display: none;
    }

    .pw-nav-currency {
        display: none;
    }

    .pw-nav-search-toggle {
        display: list-item;
    }

    .pw-nav-search {
        display: none;
        position: absolute;
        left: 0.65rem;
        right: 0.65rem;
        top: calc(100% + 1px);
        max-width: none;
        margin: 0;
        z-index: 150;
        background: #fff;
        padding: 0.55rem;
        border: 1px solid var(--pw-line);
        border-radius: 0 0 var(--pw-radius) var(--pw-radius);
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    }

    body.pw-search-open .pw-nav-search {
        display: block;
    }

    .pw-nav-notif > a,
    .pw-nav-cart > a {
        width: 44px;
        height: 44px;
    }

    .home-hero {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.85rem;
    }

    .home-hero-avatar {
        width: 64px;
        height: 64px;
    }

    .home-hero-actions {
        width: 100%;
    }

    .home-hero-actions .btn {
        flex: 1 1 auto;
        min-height: 44px;
    }

    .friends-playing-chip {
        min-width: 200px;
    }

    .section {
        margin-bottom: 1.5rem;
    }

    .game-rail {
        gap: 0.85rem 0.65rem;
    }
}

@media (max-width: 520px) {
    .pw-nav-left {
        gap: 0.35rem;
    }

    .pw-nav-brand img {
        height: 24px;
    }

    .home-hero-name {
        font-size: 1.25rem;
    }
}

.game-tile {
    display: flex;
    flex-direction: column;
    color: inherit;
    min-width: 0;
}

.game-tile img {
    aspect-ratio: 16 / 9;
    width: 100%;
    object-fit: cover;
    border-radius: 4px;
    background: var(--pw-soft);
    margin-bottom: 0.4rem;
}

.game-tile:hover img {
    opacity: 0.92;
}

.game-tile h3 {
    font-size: 12px;
    font-weight: 650;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.game-tile .meta {
    font-size: 11px;
    color: var(--pw-muted);
    margin-top: 0.1rem;
}

.empty-note {
    color: var(--pw-muted);
    font-size: 0.9rem;
}


#chat-widget {
    position: fixed;
    bottom: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    align-items: flex-end;
}

#chat-friends-bar {
    width: 240px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.chat-bar-header {
    background: #222;
    color: #fff;
    padding: 10px 14px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 8px 8px 0 0;
    user-select: none;
}

.chat-bar-header .fa {
    margin-right: 6px;
}

.chat-friends-list {
    display: none;
    background: #fff;
    border: 1px solid #ddd;
    border-bottom: none;
    max-height: 300px;
    overflow-y: auto;
}

.chat-friends-list.open {
    display: block;
}

.chat-empty {
    padding: 16px;
    text-align: center;
    color: #888;
    font-size: 0.85rem;
}

.chat-friend {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    cursor: pointer;
}

.chat-friend:hover {
    background: #f5f5f5;
}

.chat-friend-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    flex-shrink: 0;
}

.chat-friend-avatar span {
    font-size: 0.8rem;
    font-weight: 700;
    color: #fff;
}

.chat-friend-name {
    font-size: 0.85rem;
    font-weight: 500;
}

#chat-windows {
    position: fixed;
    bottom: 0;
    right: 260px;
    display: flex;
    align-items: flex-end;
    gap: 8px;
    pointer-events: none;
}

.chat-window {
    width: 280px;
    height: 360px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px 8px 0 0;
    display: flex;
    flex-direction: column;
    pointer-events: all;
    position: fixed;
    bottom: 0;
}

.chat-window.minimized {
    height: auto;
}

.chat-window.minimized .chat-messages,
.chat-window.minimized .chat-input-form {
    display: none;
}

.chat-window-header {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    background: #222;
    color: #fff;
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    flex-shrink: 0;
}

.chat-window-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
}

.chat-window-avatar span {
    font-size: 0.7rem;
    font-weight: 700;
    color: #fff;
}

.chat-window-name {
    font-size: 0.85rem;
    font-weight: 500;
    flex: 1;
}

.chat-window-controls {
    display: flex;
    gap: 4px;
}

.chat-window-controls button {
    background: none;
    border: none;
    color: #aaa;
    font-size: 1rem;
    cursor: pointer;
    padding: 2px 6px;
    line-height: 1;
}

.chat-window-controls button:hover {
    color: #fff;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.chat-msg {
    padding: 6px 10px;
    border-radius: 12px;
    font-size: 0.82rem;
    max-width: 80%;
    word-wrap: break-word;
}

.chat-msg-me {
    background: #dcf8c6;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.chat-msg-them {
    background: #f0f0f0;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.chat-input-form {
    display: flex;
    border-top: 1px solid #eee;
    flex-shrink: 0;
}

.chat-input-form input {
    flex: 1;
    border: none;
    padding: 10px 12px;
    font-size: 0.85rem;
    font-family: inherit;
    outline: none;
    border-radius: 0 0 0 8px;
}


.pw-shell-narrow {
    max-width: 480px;
}

.pw-shell-wide {
    max-width: 920px;
}

.page-heading {
    font-family: var(--pw-font-display);
    font-weight: 400;
    font-size: 1.5rem;
    letter-spacing: -0.01em;
    text-align: center;
    width: 100%;
}

.page-heading .fa {
    width: 1.1em;
    height: 1.1em;
    vertical-align: -0.12em;
}

.page-lead {
    text-align: center;
    color: var(--pw-muted);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.page-lead .fa {
    width: 0.95em;
    height: 0.95em;
    vertical-align: -0.12em;
}

.section-title {
    font-family: var(--pw-font-display);
    font-weight: 400;
    font-size: 1.1rem;
    margin: 1.75rem 0 0.4rem;
}

.section-subtitle {
    color: var(--pw-muted);
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.section-head .page-heading {
    text-align: left;
    width: auto;
    margin-bottom: 1rem;
}

.pw-balance {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.85rem;
    font-weight: 650;
    color: var(--pw-muted);
}

.pw-balance .fa {
    width: 0.95em;
    height: 0.95em;
    color: var(--pw-ink);
}

.alert-success {
    background: #eef8ea;
    color: #3d7a2e;
}


.pw-tabs {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin-bottom: 0.85rem;
}

.pw-tab {
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    background: var(--pw-soft);
    color: var(--pw-ink);
    font-size: 0.8rem;
    font-weight: 600;
}

.pw-tab:hover {
    background: #e8e8e8;
}

.pw-tab.is-active {
    background: var(--pw-ink);
    color: #fff;
}

.pw-tab-create {
    background: var(--pw-lime);
    color: #1a1a1a;
}

.pw-tab-create:hover {
    background: var(--pw-lime);
    filter: brightness(1.05);
}

.pw-filters {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}

.pw-filter {
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--pw-line);
    color: var(--pw-muted);
    font-size: 0.75rem;
    font-weight: 600;
}

.pw-filter.is-active {
    background: #eef8ea;
    border-color: #b9dfa4;
    color: #3d7a2e;
}

.pw-pagination {
    display: flex;
    justify-content: center;
    gap: 0.35rem;
    flex-wrap: wrap;
    margin: 1.75rem 0 0.5rem;
}

.pw-pagination a {
    padding: 0.4rem 0.75rem;
    border-radius: var(--pw-radius);
    background: var(--pw-soft);
    font-size: 0.8rem;
    font-weight: 600;
}

.pw-pagination a:hover {
    background: #e8e8e8;
}

.pw-pagination a.is-active {
    background: var(--pw-ink);
    color: #fff;
}


.catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
}

.catalog-item {
    display: block;
    text-align: center;
    padding: 0.85rem;
    border: 1px solid var(--pw-line);
    border-radius: 10px;
    background: #fff;
}

.catalog-item:hover {
    border-color: #cfcfcf;
}

.catalog-item.is-owned {
    background: #f4f4f4;
    border-color: #d5d5d5;
}

.catalog-item.is-offsale {
    background: #fdf0f0;
    border-color: #f2c9c9;
}

.catalog-item img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: contain;
    border-radius: 6px;
    background: linear-gradient(135deg, #000c11 0%, #00377a 100%);
    margin-bottom: 0.5rem;
}

.catalog-item h4 {
    font-size: 0.85rem;
    font-weight: 650;
    margin-bottom: 0.15rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.catalog-price {
    color: #3d7a2e;
    font-weight: 650;
    font-size: 0.8rem;
    margin-bottom: 0.1rem;
}

.catalog-price.is-owned-price {
    color: #a3690a;
}

.catalog-price.is-offsale-price {
    color: var(--pw-danger);
}

.catalog-creator {
    color: var(--pw-muted);
    font-size: 0.72rem;
}

.catalog-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 2rem 0;
}


.item-detail {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.item-detail-left {
    flex: 0 0 260px;
}

.item-detail-img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: contain;
    border-radius: 12px;
    background: linear-gradient(135deg, #000c11 0%, #00377a 100%);
}

.item-detail-preview {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    background: linear-gradient(135deg, #000c11 0%, #00377a 100%);
}

.item-detail-preview .char-prev-frame {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
    background: transparent;
}

.item-preview-hint {
    margin-top: 0.45rem;
    font-size: 11px;
    color: var(--pw-muted);
    text-align: center;
}

.item-detail-right {
    flex: 1;
    min-width: 220px;
}

.item-detail-right h1 {
    font-family: var(--pw-font-display);
    font-weight: 400;
    font-size: 1.35rem;
    margin-bottom: 0.2rem;
}

.item-type {
    color: var(--pw-muted);
    font-size: 0.8rem;
    margin-bottom: 0.4rem;
}

.item-creator {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.item-description {
    color: #444;
    font-size: 0.88rem;
    margin-bottom: 0.75rem;
    line-height: 1.45;
}

.item-price {
    font-size: 1.1rem;
    font-weight: 650;
    color: #3d7a2e;
    margin-bottom: 0.15rem;
}

.item-sales {
    color: var(--pw-muted);
    font-size: 0.82rem;
    margin-bottom: 0.75rem;
}

.item-owned {
    color: #3d7a2e;
    font-weight: 650;
    margin: 0.75rem 0;
}

.item-offsaled {
    color: var(--pw-danger);
    font-weight: 650;
    margin: 0.75rem 0;
}

.btn-buy-detail {
    padding: 0.6rem 1.4rem;
    font-size: 0.9rem;
    margin: 0;
}

.item-buy-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin: 0.75rem 0;
}

.btn-cart-add {
    padding: 0.6rem 1.1rem;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.item-rating {
    margin: 0.75rem 0;
}

.rating-stars .star {
    color: var(--pw-line);
    font-size: 1.15rem;
}

.rating-stars .star.filled {
    color: #ffb300;
}

.rating-text {
    color: var(--pw-muted);
    font-size: 0.8rem;
    margin-left: 0.4rem;
}

.rate-section {
    margin: 0.75rem 0;
    font-size: 0.85rem;
    color: var(--pw-muted);
}

.rate-star {
    color: var(--pw-line);
    font-size: 1.35rem;
    cursor: pointer;
    transition: color 0.1s;
}

.rate-star:hover,
.rate-star.active {
    color: #ffb300;
}

.bundle-items {
    flex: 1 0 100%;
    margin-top: 1.75rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--pw-line);
}

.bundle-items h2 {
    font-size: 1rem;
    font-weight: 650;
    margin-bottom: 0.85rem;
}

.bundle-items-list {
    display: flex;
    gap: 0.85rem;
    flex-wrap: wrap;
}

.bundle-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100px;
    padding: 0.65rem;
    border: 1px solid var(--pw-line);
    border-radius: 8px;
    background: var(--pw-soft);
}

.bundle-item img {
    width: 70px;
    height: 70px;
    object-fit: contain;
    border-radius: 6px;
    background: linear-gradient(135deg, #000c11 0%, #00377a 100%);
    margin-bottom: 0.4rem;
}

.bundle-item span {
    font-size: 0.72rem;
    font-weight: 550;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.item-comments-section {
    margin-top: 2rem;
}

.item-comments-section h3 {
    font-size: 1rem;
    font-weight: 650;
    margin-bottom: 0.85rem;
}

.comment-form {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.comment-form textarea {
    flex: 1;
    padding: 0.55rem 0.7rem;
    border: 1px solid var(--pw-line);
    border-radius: var(--pw-radius);
    resize: vertical;
    min-height: 56px;
    font-family: inherit;
    font-size: 0.85rem;
    background: var(--pw-soft);
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.comment-item {
    display: flex;
    gap: 0.6rem;
}

.comment-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 650;
    font-size: 0.8rem;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.comment-avatar .avatar-headshot {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.comment-body {
    flex: 1;
}

.comment-body p {
    margin: 0.2rem 0;
    color: #333;
    font-size: 0.85rem;
}

.comment-time {
    color: var(--pw-muted);
    font-size: 0.7rem;
}


.create-item-form {
    margin-bottom: 1.5rem;
}

.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.6rem 0.75rem;
    font: inherit;
    font-size: 14px;
    border: 1px solid var(--pw-line);
    border-radius: var(--pw-radius);
    background: var(--pw-soft);
    color: var(--pw-ink);
    resize: vertical;
}

.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    background: #fff;
    border-color: #bbb;
}

.form-hint {
    display: block;
    color: var(--pw-muted);
    font-size: 0.75rem;
    margin-top: 0.3rem;
}

.create-item-downloads {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0.85rem 0;
}

.my-items-section {
    margin-top: 1.5rem;
}

.my-items-section h3 {
    font-size: 0.95rem;
    font-weight: 650;
    margin-bottom: 0.6rem;
}

.my-items-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.my-item-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    background: var(--pw-soft);
    border-radius: var(--pw-radius);
}

.my-item-row img {
    width: 38px;
    height: 38px;
    object-fit: contain;
    background: #2a2a3e;
    border-radius: 4px;
    padding: 3px;
}

.my-item-info {
    flex: 1;
    font-size: 0.85rem;
}

.my-item-type {
    color: var(--pw-muted);
    font-size: 0.75rem;
    margin-left: 0.3rem;
}

.my-item-status {
    font-size: 0.7rem;
    margin-left: 0.3rem;
}

.my-item-status.is-pending {
    color: #b3690a;
}

.my-item-status.is-approved {
    color: #3d7a2e;
}

.my-item-price {
    color: var(--pw-muted);
    font-size: 0.8rem;
}


.download-banner {
    max-width: 100%;
    margin: 0 0 1.75rem;
    padding: 1.25rem 1.35rem;
    background: linear-gradient(135deg, #eef8ff, #f7fff0);
    border: 1px solid #c5e0f0;
    border-radius: 12px;
}

.download-banner h2 {
    font-family: var(--pw-font-display);
    font-weight: 400;
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
}

.download-banner p {
    color: #444;
    margin-bottom: 0.85rem;
    line-height: 1.5;
    font-size: 0.88rem;
}

.download-banner ul {
    color: #555;
    padding-left: 1.2rem;
    margin: 0 0 1rem;
    line-height: 1.7;
    font-size: 0.88rem;
}

.download-banner-note {
    color: #777;
    font-size: 0.82rem;
    margin-top: 0.85rem;
}

.downloads-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    max-width: 520px;
    margin-inline: auto;
}

@media (max-width: 420px) {
    .downloads-grid {
        grid-template-columns: 1fr;
        max-width: 280px;
    }
}

.download-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: #fff;
    border: 1px solid var(--pw-line);
    border-radius: 12px;
    padding: 1.35rem;
}

.download-card .btn {
    height: 44px;
    width: 100%;
    margin-top: auto;
}

.download-icon-img {
    height: 56px;
    margin-bottom: 0.75rem;
}

.download-card h3 {
    font-size: 0.95rem;
    margin-bottom: 0.3rem;
}

.download-card p {
    color: var(--pw-muted);
    font-size: 0.82rem;
    margin-bottom: 0.85rem;
}

.info-box {
    margin-top: 1.5rem;
    padding: 1rem 1.15rem;
    background: var(--pw-soft);
    border-radius: 10px;
}

.info-box h3 {
    font-size: 0.9rem;
    font-weight: 650;
    margin-bottom: 0.5rem;
}

.info-box h4 {
    font-size: 0.85rem;
    font-weight: 650;
    margin: 0.6rem 0 0.3rem;
}

.info-box ul {
    color: #555;
    padding-left: 1.2rem;
    line-height: 1.75;
    font-size: 0.85rem;
}

.info-box p {
    color: #555;
    font-size: 0.85rem;
    line-height: 1.5;
}

.info-box code {
    background: #eee;
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
    font-size: 0.82em;
}

.legal-doc .legal-intro {
    color: var(--pw-muted);
    margin: 0.75rem 0 1.25rem;
    max-width: 42rem;
    line-height: 1.55;
}
.legal-toc {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    margin: 0 0 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--pw-line);
}
.legal-toc a {
    color: var(--pw-muted);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.92rem;
}
.legal-toc a:hover {
    color: var(--pw-ink);
}
.legal-toc a[aria-current="page"] {
    color: var(--pw-ink);
    text-decoration: underline;
    text-underline-offset: 3px;
}
.legal-doc .info-box {
    margin-bottom: 1rem;
}
.legal-foot {
    margin-top: 1.5rem;
    color: var(--pw-muted);
    font-size: 0.92rem;
}

.creator-requirements {
    max-width: 100%;
    margin: 0 0 1.75rem;
    padding: 1rem 1.15rem;
    background: var(--pw-soft);
    border-radius: 10px;
    color: #444;
    font-size: 0.9rem;
    line-height: 1.5;
}

.creator-requirements p {
    margin: 0.5rem 0 0;
}

.creator-requirements ul {
    margin: 0.6rem 0 0;
    padding-left: 1.2em;
}

.creator-progress {
    margin: 0.85rem 0 0;
    padding-top: 0.75rem;
    border-top: 1px solid var(--pw-line);
}

.creator-progress-note {
    color: var(--pw-muted);
}

.creators-empty {
    text-align: center;
    padding: 2rem 0;
}

.creators-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 0.85rem;
}

.creator-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem;
    border: 1px solid var(--pw-line);
    border-radius: 10px;
    background: #fff;
}

.creator-card:hover {
    border-color: #cfcfcf;
}

.creator-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #4da6cb;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

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

.creator-info {
    font-size: 0.85rem;
}

.creator-info .fa {
    width: 0.9em;
    height: 0.9em;
    margin-left: 0.15rem;
}

.creator-meta {
    color: var(--pw-muted);
    font-size: 0.78rem;
    margin-top: 0.15rem;
}


.gotw-winner {
    border: 1px solid #c5e0f0;
    background: linear-gradient(135deg, #eef8ff, #f7fff0);
    border-radius: 12px;
    padding: 1.1rem;
    margin-bottom: 1.5rem;
}

.gotw-winner h2 {
    font-size: 1rem;
    font-weight: 650;
    margin-bottom: 0.5rem;
}

.gotw-winner-body {
    display: flex;
    gap: 0.9rem;
    align-items: center;
}

.gotw-winner-body img {
    width: 88px;
    height: 88px;
    object-fit: cover;
    border-radius: 8px;
}

.gotw-winner-body strong {
    font-size: 1.05rem;
}

.gotw-winner-creator {
    color: var(--pw-muted);
    margin-bottom: 0.5rem;
}

.gotw-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.gotw-card {
    background: #fff;
    border: 1px solid var(--pw-line);
    border-radius: 10px;
    padding: 0.85rem;
}

.gotw-card img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 6px;
    background: var(--pw-soft);
    margin-bottom: 0.5rem;
}

.gotw-card h3 {
    font-size: 0.88rem;
    font-weight: 650;
    margin-bottom: 0.2rem;
}

.gotw-card p {
    color: var(--pw-muted);
    font-size: 0.78rem;
    margin-bottom: 0.6rem;
}

.gotw-card .btn {
    width: 100%;
    margin-top: 0.3rem;
}


.challenges-balance {
    margin-bottom: 1.5rem;
}

.challenges-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.challenge-card {
    border: 1px solid var(--pw-line);
    border-radius: 10px;
    padding: 1rem;
    background: #fff;
}

.challenge-card-body {
    display: flex;
    justify-content: space-between;
    gap: 0.85rem;
    align-items: flex-start;
}

.challenge-desc {
    color: var(--pw-muted);
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

.challenge-reward {
    color: #b3690a;
    font-size: 0.8rem;
    margin-top: 0.4rem;
}

.challenge-reward .fa {
    width: 0.85em;
    height: 0.85em;
    vertical-align: -0.1em;
}

.challenges-links {
    margin-top: 1.25rem;
    text-align: center;
    font-size: 0.85rem;
    color: var(--pw-muted);
}


.pw-shell-narrow {
    max-width: 520px;
}

.page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.page-head-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.page-title {
    font-family: var(--pw-font-display);
    font-size: 1.4rem;
    font-weight: 400;
    letter-spacing: -0.01em;
}

.page-lead {
    color: var(--pw-muted);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.page-crumbs {
    font-size: 0.85rem;
    color: var(--pw-muted);
    margin-bottom: 0.75rem;
}

.section-title {
    font-size: 1.05rem;
    font-weight: 650;
    margin-bottom: 0.4rem;
}

.pw-hr {
    border: none;
    border-top: 1px solid var(--pw-line);
    margin: 1.5rem 0;
}

.empty-note {
    color: var(--pw-muted);
    font-size: 0.9rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.65rem;
    margin: 0.75rem 0 1.5rem;
}

.stats-page {
    padding-bottom: 2rem;
}

.stats-page-title {
    font-family: var(--pw-font-display);
    font-size: 1.85rem;
    font-weight: 400;
    letter-spacing: -0.02em;
    text-align: center;
    margin: 0.5rem 0 1.25rem;
}

.stats-section-title {
    font-family: var(--pw-font-display);
    font-size: 1.15rem;
    font-weight: 400;
    letter-spacing: -0.01em;
    text-align: center;
    margin: 1.75rem 0 0.85rem;
}

.stats-live {
    text-align: center;
    margin-bottom: 0.5rem;
}

.stats-live-tabs {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.45rem;
    margin-bottom: 0.85rem;
}

.stats-live-tab {
    appearance: none;
    border: 1px solid var(--pw-line);
    background: #e8e8e8;
    color: var(--pw-ink);
    font: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.4rem 0.95rem;
    border-radius: 6px;
    cursor: pointer;
}

.stats-live-tab:hover {
    background: #dedede;
}

.stats-live-tab.is-active {
    background: #1a1a1a;
    border-color: #1a1a1a;
    color: #fff;
}

.stats-live-current {
    margin-bottom: 0.65rem;
}

.stats-live-current strong {
    display: block;
    font-family: var(--pw-font-display);
    font-size: 1.7rem;
    font-weight: 400;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.stats-live-current span {
    font-size: 0.8rem;
    color: var(--pw-muted);
}

.stats-live-updated {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.72rem !important;
    color: #999 !important;
}

.stats-peaks {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.85rem 1.35rem;
    margin: 0.75rem auto 0.25rem;
    max-width: 720px;
    font-size: 0.85rem;
    color: var(--pw-muted);
}

.stats-peaks strong {
    color: var(--pw-ink);
    font-weight: 650;
}

.stats-chart-wrap {
    position: relative;
    width: min(100%, 720px);
    margin: 0 auto 0.5rem;
    background: #fff;
    border: 1px solid var(--pw-line);
    border-radius: 10px;
    padding: 0.65rem 0.75rem 0.4rem;
    box-sizing: border-box;
}

.stats-chart-wrap canvas {
    display: block;
    width: 100%;
    height: 220px;
}

.stats-chart-empty {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    font-size: 0.85rem;
    color: var(--pw-muted);
    pointer-events: none;
}

.stats-grid-center {
    justify-content: center;
    grid-template-columns: repeat(auto-fit, minmax(130px, 150px));
    max-width: 820px;
    margin-left: auto;
    margin-right: auto;
}

.stats-tile {
    background: var(--pw-soft);
    border: 1px solid var(--pw-line);
    border-radius: var(--pw-radius);
    padding: 0.85rem 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    text-align: center;
}

.stats-tile strong {
    font-family: var(--pw-font-display);
    font-size: 1.35rem;
    font-weight: 400;
    letter-spacing: -0.02em;
    color: var(--pw-ink);
    line-height: 1.1;
}

.stats-tile span {
    font-size: 0.78rem;
    color: var(--pw-muted);
    line-height: 1.3;
}

.stats-top-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin: 0.75rem 0 2rem;
}

.stats-top-row {
    display: grid;
    grid-template-columns: 1.5rem 48px 1fr auto;
    gap: 0.75rem;
    align-items: center;
    padding: 0.45rem 0.55rem;
    border-radius: var(--pw-radius);
    text-decoration: none;
    color: inherit;
}

.stats-top-row:hover {
    background: var(--pw-soft);
}

.stats-top-rank {
    font-size: 0.85rem;
    color: var(--pw-muted);
    text-align: center;
}

.stats-top-row img {
    width: 48px;
    height: 36px;
    object-fit: cover;
    border-radius: 4px;
    background: #ddd;
}

.stats-top-meta {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.stats-top-meta strong {
    font-size: 0.92rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stats-top-meta span {
    font-size: 0.75rem;
    color: var(--pw-muted);
}

.stats-top-plays {
    font-size: 0.78rem;
    color: var(--pw-muted);
    text-align: right;
    white-space: nowrap;
}

.stats-top-plays em {
    display: block;
    font-style: normal;
    color: var(--pw-ink);
    font-weight: 600;
    margin-top: 0.1rem;
}

@media (max-width: 560px) {
    .stats-top-row {
        grid-template-columns: 1.25rem 40px 1fr;
    }
    .stats-top-plays {
        grid-column: 3;
        text-align: left;
    }
}

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
}

.empty-state-img {
    margin: 0 auto 1rem;
}

.empty-state .page-title {
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--pw-muted);
    margin-bottom: 0.75rem;
}


.btn-block {
    display: flex;
    width: 100%;
    margin-top: 0.5rem;
}

.btn-wide {
    width: 100%;
}

.btn-sm {
    padding: 0.35rem 0.7rem;
    font-size: 12px;
}

.btn-report {
    background: #fdecea;
    color: var(--pw-danger);
}

.btn-report:hover {
    background: #fbdcd8;
}

.btn-report-sm {
    border: 0;
    background: transparent;
    color: var(--pw-muted);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    padding: 0.2rem 0;
    text-decoration: underline;
}

.btn-report-sm:hover {
    color: var(--pw-danger);
}

.button-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}


.pw-tabs {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin-bottom: 1.1rem;
}

.pw-tab {
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    background: var(--pw-soft);
    color: var(--pw-ink);
    font-size: 12px;
    font-weight: 600;
}

.pw-tab:hover {
    background: #e8e8e8;
}

.pw-tab.is-active {
    background: var(--pw-ink);
    color: #fff;
}


.pw-pagination {
    display: flex;
    justify-content: center;
    gap: 0.35rem;
    flex-wrap: wrap;
    margin: 2rem 0 1rem;
}

.pw-pagination a {
    padding: 0.45rem 0.8rem;
    border-radius: var(--pw-radius);
    background: var(--pw-soft);
    color: var(--pw-ink);
    font-size: 12px;
    font-weight: 600;
}

.pw-pagination a:hover {
    background: #e8e8e8;
}

.pw-pagination a.is-active {
    background: var(--pw-ink);
    color: #fff;
    pointer-events: none;
}


.detail-header {
    display: flex;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.detail-thumb {
    width: 375px;
    height: auto;
    align-self: flex-start;
    border-radius: var(--pw-radius);
    background: var(--pw-soft);
    flex-shrink: 0;
    display: block;
}

.detail-info {
    flex: 1;
    min-width: 220px;
}

.detail-info .page-title {
    margin-bottom: 0.5rem;
}

.detail-creator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.6rem;
}

.detail-creator:hover {
    color: var(--pw-muted);
}

.detail-creator-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--pw-soft);
    position: relative;
    overflow: hidden;
    display: grid;
    place-items: center;
    font-weight: 650;
    font-size: 0.75rem;
    color: rgba(0, 0, 0, 0.35);
    flex-shrink: 0;
}

.avatar-headshot {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
}

.detail-stats {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: var(--pw-muted);
    margin-bottom: 1rem;
}

.game-rating-display {
    display: inline-flex;
    gap: 0.4rem;
}

.game-like,
.game-dislike {
    cursor: pointer;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
}

.game-like:hover,
.game-like.active {
    background: #e8f5e9;
    color: #2e7d32;
}

.game-dislike:hover,
.game-dislike.active {
    background: #ffebee;
    color: var(--pw-danger);
}

.detail-actions {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    max-width: 260px;
}

.desktop-client-link {
    display: block;
    text-align: center;
    margin-top: 0.2rem;
    font-size: 0.78rem;
    color: var(--pw-muted);
    text-decoration: underline;
    cursor: pointer;
}

.desktop-client-link:hover {
    color: var(--pw-ink);
}

.wasm-sunset-note {
    margin: 0.35rem 0 0;
    font-size: 0.75rem;
    line-height: 1.35;
    color: #9a6b00;
    text-align: center;
}

 
.pw-launch-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100000;
    align-items: center;
    justify-content: center;
    background: rgba(18, 18, 18, 0.72);
    padding: 1.25rem;
    box-sizing: border-box;
}

.pw-launch-overlay.is-open {
    display: flex;
}

.pw-launch-card {
    width: min(100%, 380px);
    background: #fff;
    border-radius: 12px;
    padding: 1.75rem 1.5rem 1.35rem;
    text-align: center;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

.pw-launch-card img {
    width: min(100%, 200px);
    height: auto;
    object-fit: contain;
    margin: 0 auto 1rem;
    display: block;
}

.pw-launch-card h2 {
    font-family: var(--pw-font-display);
    font-size: 1.2rem;
    font-weight: 400;
    letter-spacing: -0.01em;
    margin: 0 0 0.45rem;
    color: var(--pw-ink);
}

.pw-launch-card p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.45;
    color: var(--pw-muted);
}

.pw-launch-spinner {
    width: 28px;
    height: 28px;
    margin: 1.15rem auto 0;
    border: 3px solid #e6e6e6;
    border-top-color: var(--pw-lime);
    border-radius: 50%;
    animation: pw-launch-spin 0.75s linear infinite;
}

@keyframes pw-launch-spin {
    to { transform: rotate(360deg); }
}

.pw-launch-actions {
    display: none;
    flex-direction: column;
    gap: 0.45rem;
    margin-top: 1.15rem;
}

.pw-launch-overlay.is-help .pw-launch-spinner {
    display: none;
}

.pw-launch-overlay.is-help .pw-launch-actions {
    display: flex;
}

.pw-launch-overlay.is-help .pw-launch-starting {
    display: none;
}

.pw-launch-overlay:not(.is-help) .pw-launch-help {
    display: none;
}

.detail-description {
    margin-bottom: 1.5rem;
}

.detail-description h2,
.detail-servers h2,
.comments-section h2 {
    font-size: 1rem;
    font-weight: 650;
    margin-bottom: 0.6rem;
}

.detail-description p {
    color: var(--pw-ink);
    white-space: pre-wrap;
}

.detail-servers {
    margin-bottom: 1.5rem;
}

.server-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 0.8rem;
    background: var(--pw-soft);
    border-radius: var(--pw-radius);
    margin-bottom: 0.4rem;
}

.server-players {
    font-size: 0.85rem;
    font-weight: 600;
}


.comments-section {
    margin-bottom: 1.5rem;
}

.comment-form {
    display: flex;
    gap: 0.7rem;
    margin-bottom: 1.25rem;
}

.comment-form-fields {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
    flex: 1;
}

.comment-form-fields textarea {
    width: 100%;
    padding: 0.6rem 0.75rem;
    font: inherit;
    font-size: 13px;
    border: 1px solid var(--pw-line);
    border-radius: var(--pw-radius);
    background: var(--pw-soft);
    color: var(--pw-ink);
    resize: vertical;
    min-height: 60px;
}

.comment-form-fields textarea:focus {
    outline: none;
    background: #fff;
    border-color: #bbb;
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.comments-empty {
    color: var(--pw-muted);
    font-size: 0.9rem;
}

.comment {
    display: flex;
    gap: 0.7rem;
}

.comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--pw-soft);
    position: relative;
    overflow: hidden;
    display: grid;
    place-items: center;
    font-weight: 650;
    font-size: 0.8rem;
    color: rgba(0, 0, 0, 0.35);
    flex-shrink: 0;
}

.comment-body {
    flex: 1;
    min-width: 0;
}

.comment-header {
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.comment-author {
    font-size: 0.85rem;
    font-weight: 650;
}

.comment-author:hover {
    color: var(--pw-muted);
}

.comment-time {
    font-size: 0.75rem;
    color: var(--pw-muted);
}

.comment-text {
    font-size: 0.88rem;
    margin: 0.15rem 0 0.25rem;
    white-space: pre-wrap;
}


.pw-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    align-items: center;
    justify-content: center;
}

.pw-modal-box {
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    max-width: 400px;
    width: 90%;
}

.pw-modal-box h3 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
}

.pw-modal-box select {
    width: 100%;
    padding: 0.6rem 0.75rem;
    font: inherit;
    font-size: 13px;
    border: 1px solid var(--pw-line);
    border-radius: var(--pw-radius);
    background: var(--pw-soft);
    color: var(--pw-ink);
}

.pw-modal-box textarea {
    width: 100%;
    padding: 0.6rem 0.75rem;
    font: inherit;
    font-size: 13px;
    border: 1px solid var(--pw-line);
    border-radius: var(--pw-radius);
    background: var(--pw-soft);
    color: var(--pw-ink);
    resize: vertical;
    min-height: 60px;
}


.alert.is-success {
    background: #eef7e6;
    color: #2e7d32;
}


.manage-list {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.manage-row {
    display: flex;
    gap: 0.9rem;
    align-items: center;
    padding: 0.75rem;
    background: var(--pw-soft);
    border-radius: var(--pw-radius);
    flex-wrap: wrap;
}

.manage-thumb {
    width: 128px;
    aspect-ratio: 16 / 9;
    height: auto;
    object-fit: cover;
    border-radius: 4px;
    background: #ddd;
    flex-shrink: 0;
}

.manage-info {
    flex: 1;
    min-width: 180px;
}

.manage-title {
    font-size: 0.95rem;
}

.manage-meta {
    color: var(--pw-muted);
    font-size: 0.8rem;
    margin-top: 0.15rem;
}

.manage-meta .is-public {
    color: #2e7d32;
}

.manage-meta .is-private {
    color: #e67e22;
}

.manage-desc {
    color: var(--pw-muted);
    font-size: 0.82rem;
    margin-top: 0.25rem;
}

.manage-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.manage-preview {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1.25rem;
}

.manage-preview-thumb {
    width: 192px;
    aspect-ratio: 16 / 9;
    height: auto;
    object-fit: cover;
    border-radius: 8px;
    background: #ddd;
    flex-shrink: 0;
}

.manage-preview-title {
    font-weight: 650;
}


.music-track-list {
    list-style: none;
    margin: 0 0 1rem;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.music-track {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    justify-content: space-between;
    padding: 0.75rem 0.85rem;
    background: var(--pw-soft);
    border: 1px solid var(--pw-line);
    border-radius: var(--pw-radius);
    flex-wrap: wrap;
}

.music-track-info {
    flex: 1 1 220px;
    min-width: 0;
}

.music-track-name {
    font-weight: 650;
    font-size: 0.9rem;
    margin-bottom: 0.35rem;
}

.music-track-url {
    width: 100%;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 11px;
    padding: 0.4rem 0.5rem;
    border: 1px solid var(--pw-line);
    border-radius: 6px;
    background: #fff;
    color: var(--pw-ink);
}

.music-track-meta {
    color: var(--pw-muted);
    font-size: 0.75rem;
    margin-top: 0.3rem;
}

.music-track-actions {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    align-items: flex-start;
}

.music-track-actions .btn.is-danger {
    color: var(--pw-danger);
}

.music-script-hint {
    margin: 0 0 1rem;
    padding: 0.75rem 0.85rem;
    background: #1e1e1e;
    color: #d4d4d4;
    border-radius: var(--pw-radius);
    font-size: 12px;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-all;
}


.form-section {
    margin-bottom: 1.25rem;
}

.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.6rem 0.75rem;
    font: inherit;
    font-size: 14px;
    border: 1px solid var(--pw-line);
    border-radius: var(--pw-radius);
    background: var(--pw-soft);
    color: var(--pw-ink);
    resize: vertical;
}

.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    background: #fff;
    border-color: #bbb;
}

.form-group input[type="file"] {
    background: transparent;
    border: none;
    padding: 0.3rem 0;
}

.form-hint {
    color: var(--pw-muted);
    font-size: 0.78rem;
    margin-top: 0.3rem;
}

.form-group label.radio-option,
.form-group label.checkbox-option {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.88rem;
    margin: 0.4rem 0 0;
    font-weight: 400;
    color: var(--pw-ink);
}

.is-hidden {
    display: none;
}

@media (max-width: 640px) {
    .detail-header {
        flex-direction: column;
    }

    .detail-thumb {
        width: 100%;
    }

    .detail-actions {
        max-width: none;
    }
}


.btn-danger {
    background: #fdecea;
    color: var(--pw-danger);
}

.btn-danger:hover {
    background: #fbdcd8;
}


.user-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 1rem;
}

.user-grid-card {
    text-align: center;
    padding: 1rem 0.6rem;
    border: 1px solid var(--pw-line);
    border-radius: var(--pw-radius);
}

.user-grid-card:hover {
    border-color: #ccc;
    background: var(--pw-soft);
}

.user-grid-avatar {
    width: 64px;
    height: 64px;
    margin: 0 auto 0.6rem;
    border-radius: 50%;
    background: var(--pw-soft);
    position: relative;
    overflow: hidden;
}

.user-grid-card h4 {
    font-size: 0.82rem;
    font-weight: 650;
    margin-bottom: 0.15rem;
}

.user-grid-joined {
    color: var(--pw-muted);
    font-size: 0.72rem;
}

.user-grid-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 2rem 0;
}


.page-search-form {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.page-search-form input {
    flex: 1;
    padding: 0.6rem 0.85rem;
    font: inherit;
    font-size: 14px;
    border: 1px solid var(--pw-line);
    border-radius: var(--pw-radius);
    background: var(--pw-soft);
    color: var(--pw-ink);
}

.page-search-form input:focus {
    outline: none;
    background: #fff;
    border-color: #bbb;
}

.page-search-form button {
    appearance: none;
    border: 1px solid var(--pw-ink);
    background: var(--pw-ink);
    color: #fff;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    padding: 0 1.1rem;
    border-radius: var(--pw-radius);
    cursor: pointer;
}

.page-search-form button:hover {
    background: #333;
}

.search-section {
    margin-bottom: 1.75rem;
}

.search-section h2 {
    font-size: 1rem;
    font-weight: 650;
    margin-bottom: 0.6rem;
}

.search-empty {
    padding: 1.5rem 0;
}


.people-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.people-row {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.55rem 0.6rem;
    border-radius: var(--pw-radius);
}

a.people-row:hover {
    background: var(--pw-soft);
}

.people-row-link {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    flex: 1;
    min-width: 0;
}

.people-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--pw-soft);
    position: relative;
    overflow: hidden;
    display: grid;
    place-items: center;
    font-weight: 650;
    font-size: 0.9rem;
    color: rgba(0, 0, 0, 0.35);
    flex-shrink: 0;
}

.people-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.people-name {
    font-size: 0.88rem;
    font-weight: 650;
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
}

.people-bio {
    color: var(--pw-muted);
    font-size: 0.78rem;
    margin-top: 0.1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.people-row-action {
    display: flex;
    gap: 0.4rem;
    flex-shrink: 0;
}


.notif-page-list {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.notif-page-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0.6rem;
    border-radius: var(--pw-radius);
}

.notif-page-item:hover {
    background: var(--pw-soft);
}

.notif-page-item.is-unread {
    background: #f5faf0;
}

.notif-page-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--pw-soft);
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.notif-page-content {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.notif-page-text {
    font-size: 0.85rem;
}

.notif-page-time {
    color: var(--pw-muted);
    font-size: 0.75rem;
    margin-top: 0.15rem;
}

.notif-page-empty {
    padding: 2rem 0;
    text-align: center;
}


.settings-card {
    border: 1px solid var(--pw-line);
    border-radius: var(--pw-radius);
    padding: 1.25rem;
    margin-bottom: 1.25rem;
}

.settings-form h2 {
    font-size: 1rem;
    font-weight: 650;
    margin-bottom: 0.9rem;
}

.settings-group {
    margin-bottom: 0.9rem;
}

.settings-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--pw-muted);
    margin-bottom: 0.3rem;
}

.settings-group textarea,
.settings-group select {
    width: 100%;
    padding: 0.6rem 0.75rem;
    font: inherit;
    font-size: 13px;
    border: 1px solid var(--pw-line);
    border-radius: var(--pw-radius);
    background: var(--pw-soft);
    color: var(--pw-ink);
    resize: vertical;
}

.settings-group input[type="password"] {
    width: 100%;
    padding: 0.6rem 0.75rem;
    font: inherit;
    font-size: 14px;
    border: 1px solid var(--pw-line);
    border-radius: var(--pw-radius);
    background: var(--pw-soft);
    color: var(--pw-ink);
}

.color-picker-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.color-picker-row input[type="color"] {
    width: 44px;
    height: 34px;
    border: 1px solid var(--pw-line);
    border-radius: 4px;
    padding: 2px;
    background: #fff;
}

.color-picker-row span {
    color: var(--pw-muted);
    font-size: 0.8rem;
}


.profile-state {
    text-align: center;
    padding: 3.5rem 1rem;
}

.profile-state-avatar {
    width: 72px;
    height: 72px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    background: var(--pw-soft);
    display: grid;
    place-items: center;
    font-size: 1.6rem;
    font-weight: 650;
    color: var(--pw-muted);
}

.profile-state h1 {
    font-family: var(--pw-font-display);
    font-size: 1.3rem;
    font-weight: 400;
    margin-bottom: 0.4rem;
}

.profile-state p {
    color: var(--pw-muted);
}


.profile-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 2rem;
    align-items: start;
}

.profile-side {
    position: sticky;
    top: calc(var(--pw-nav-h) + 1.5rem);
}

.profile-render-card {
    display: flex;
    justify-content: center;
    width: 100%;
    aspect-ratio: 3 / 4;
    max-width: 220px;
    min-height: 260px;
    background: transparent;
    overflow: hidden;
    position: relative;
}

.profile-render-card .char-prev-frame {
    width: 100%;
    height: 100%;
    border: 0;
    background: transparent;
    display: block;
    position: absolute;
    inset: 0;
}

.profile-render-card .full-body-render {
    width: 100%;
    max-width: 220px;
}

.profile-render-hint {
    margin-top: 0.45rem;
    font-size: 11px;
    color: var(--pw-muted);
    text-align: center;
    max-width: 220px;
}

.profile-avatar-box {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 50%;
    position: relative;
    overflow: hidden;
    display: grid;
    place-items: center;
    font-size: 2.4rem;
    font-weight: 650;
    color: rgba(0, 0, 0, 0.35);
}

.profile-avatar-letter {
    position: relative;
    z-index: 1;
}

.status-dot-lg {
    width: 18px;
    height: 18px;
    right: 6px;
    bottom: 6px;
    border-width: 3px;
    z-index: 2;
}

.profile-header {
    margin-bottom: 1.25rem;
}

.profile-name {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin-bottom: 0.15rem;
}

.profile-rank {
    display: block;
    color: var(--pw-muted);
    font-size: 0.85rem;
    margin-bottom: 0.9rem;
}

.profile-playing {
    margin: -0.45rem 0 0.85rem;
    font-size: 0.95rem;
    color: var(--pw-muted);
}
.profile-playing .link {
    font-weight: 600;
}

.profile-stats {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.profile-stat {
    display: flex;
    flex-direction: column;
}

.profile-stat:hover {
    color: var(--pw-muted);
}

.profile-stat strong {
    font-size: 1rem;
}

.profile-stat span {
    color: var(--pw-muted);
    font-size: 0.75rem;
}

.profile-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.profile-actions form {
    display: inline-flex;
}

.profile-info {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    margin: 1.25rem 0 1.75rem;
    padding: 1rem 0;
    border-top: 1px solid var(--pw-line);
    border-bottom: 1px solid var(--pw-line);
}

.profile-field label {
    display: block;
    font-size: 11px;
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--pw-muted);
    margin-bottom: 0.25rem;
}

.profile-field p {
    font-size: 0.88rem;
    white-space: pre-wrap;
}

.profile-games {
    margin-bottom: 1.75rem;
}

.profile-games h2 {
    font-size: 1rem;
    font-weight: 650;
    margin-bottom: 0.7rem;
}

@media (max-width: 720px) {
    .profile-layout {
        grid-template-columns: 1fr;
    }

    .profile-side {
        position: static;
        max-width: 200px;
        margin: 0 auto 1rem;
    }
}


.pw-modal.is-open {
    display: flex;
}

.pw-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 0.4rem;
}

.sg-layout {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 1.75rem;
    align-items: start;
    margin-top: 0.5rem;
}

.sg-toc {
    position: sticky;
    top: 68px;
    max-height: calc(100vh - 90px);
    overflow: auto;
    padding: 0.9rem 0.75rem;
    background: var(--pw-soft);
    border: 1px solid var(--pw-line);
    border-radius: 6px;
    font-size: 0.88rem;
}

.sg-toc h2 {
    font-family: "Work Sans", sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--pw-muted);
    margin: 0 0 0.6rem;
}

.sg-toc a {
    display: block;
    color: var(--pw-ink);
    text-decoration: none;
    padding: 0.28rem 0 0.28rem 0.5rem;
    border-left: 2px solid transparent;
}

.sg-toc a:hover {
    border-left-color: var(--pw-lime);
    color: var(--pw-ink);
}

.sg-toc a.sg-toc-h3 {
    padding-left: 1.1rem;
    color: var(--pw-muted);
    font-size: 0.82rem;
}

.sg-toc-empty {
    color: var(--pw-muted);
    font-size: 0.85rem;
    margin: 0;
}

.sg-doc h2 {
    font-family: "Archivo Black", sans-serif;
    font-size: 1.25rem;
    font-weight: 400;
    margin: 1.6rem 0 0.6rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--pw-line);
}

.sg-doc h2:first-of-type {
    border-top: none;
    padding-top: 0;
    margin-top: 0;
}

.sg-doc h3 {
    font-size: 1.05rem;
    font-weight: 650;
    margin: 1.1rem 0 0.45rem;
}

.sg-doc p {
    margin: 0 0 0.75rem;
    line-height: 1.55;
    color: var(--pw-ink);
}

.sg-doc code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.88em;
    background: var(--pw-soft);
    padding: 1px 5px;
    border-radius: 3px;
}

.sg-code {
    background: #1e1e1e;
    color: #e8e8e8;
    padding: 0.85rem 1rem;
    border-radius: 6px;
    overflow-x: auto;
    margin: 0 0 1rem;
    font-size: 0.86rem;
    line-height: 1.45;
}

.sg-code code {
    background: none;
    color: inherit;
    padding: 0;
    font-size: inherit;
}

.sg-table-wrap {
    overflow-x: auto;
    margin: 0 0 1rem;
}

.sg-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.sg-table th,
.sg-table td {
    border: 1px solid var(--pw-line);
    padding: 0.5rem 0.65rem;
    text-align: left;
    vertical-align: top;
}

.sg-table th {
    background: var(--pw-soft);
    font-weight: 650;
}

.sg-table tr:nth-child(even) td {
    background: #fafafa;
}

.sg-list {
    margin: 0 0 0.9rem 1.2em;
    line-height: 1.55;
}

.sg-list li {
    margin-bottom: 0.25rem;
}

.sg-hr {
    border: none;
    border-top: 1px solid var(--pw-line);
    margin: 1.4rem 0;
}

@media (max-width: 820px) {
    .sg-layout {
        grid-template-columns: 1fr;
    }

    .sg-toc {
        position: static;
        max-height: none;
    }
}

.avatar-editor-layout {
    display: grid;
    grid-template-columns: minmax(280px, 400px) minmax(0, 1fr);
    gap: 1.5rem;
    align-items: start;
    margin-top: 0.75rem;
}

.avatar-preview-panel {
    position: relative;
    width: 100%;
    max-width: 400px;
    aspect-ratio: 4 / 5;
    background: linear-gradient(160deg, #2a2a32, #16161c);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--pw-line);
}

.avatar-preview-panel iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

.avatar-2d-preview {
    display: none;
    width: 100%;
    height: auto;
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
}

.avatar-preview-hint {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--pw-muted);
}

.avatar-preview-hint a {
    color: var(--pw-ink);
    font-weight: 600;
}

.avatar-controls h3 {
    font-size: 0.92rem;
    font-weight: 650;
    margin: 0 0 0.5rem;
}

.avatar-control-section {
    margin-bottom: 1.1rem;
}

.avatar-item-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.avatar-item-slot {
    width: 56px;
    height: 56px;
    border: 2px solid var(--pw-line);
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--pw-soft);
    padding: 0;
    overflow: hidden;
    position: relative;
}

.avatar-item-slot:hover {
    border-color: var(--pw-lime);
}

.avatar-item-slot.is-selected {
    border-color: var(--pw-lime);
    background: #f4ffe0;
}

.avatar-item-slot img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.avatar-item-mesh {
    position: absolute;
    left: 2px;
    bottom: 2px;
    padding: 1px 4px;
    border-radius: 3px;
    font-size: 0.55rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.2;
    color: #fff;
    background: rgba(0, 0, 0, 0.55);
    pointer-events: none;
}

.avatar-item-mesh.is-new {
    background: #3d8b40;
}

.avatar-item-mesh.is-legacy {
    background: #666;
}

.avatar-item-none {
    font-size: 0.65rem;
    color: var(--pw-muted);
}

.avatar-acc-count {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--pw-muted);
    margin-left: 0.4rem;
}

.avatar-color-picker {
    width: 60px;
    height: 36px;
    border: 1px solid var(--pw-line);
    border-radius: 6px;
    cursor: pointer;
    background: none;
    padding: 0;
}

.avatar-tip {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--pw-muted);
}

.avatar-tip a {
    color: var(--pw-ink);
    font-weight: 600;
}

@media (max-width: 720px) {
    .avatar-editor-layout {
        grid-template-columns: 1fr;
        justify-items: center;
    }

    .avatar-controls {
        width: 100%;
    }
}
