:root {
    color-scheme: dark;
    --bg-main: #0c0c0c;
    --bg-header: #121212;
    --bg-menu: #161616;
    --bg-card: #121212;
    --bg-card-soft: #161616;
    --color-primary: #1e018f;
    --text-main: #cdcdcd;
    --text-muted: #8f8f8f;
    --border-color: rgba(255,255,255,0.08);
    --radius-md: 16px;
    --radius-lg: 22px;
    --radius-xl: 30px;
    --danger: #fb7185;
    --warning: #f5b84b;
    --success: #47d17c;
    --bg: var(--bg-main);
    --panel: var(--bg-card);
    --panel-soft: var(--bg-card-soft);
    --line: var(--border-color);
    --text: var(--text-main);
    --muted: var(--text-muted);
    --brand: var(--color-primary);
    --brand-strong: #3214bb;
    --radius: var(--radius-md);
    --shadow: 0 24px 70px rgba(0, 0, 0, .48);
    --shadow-soft: 0 12px 34px rgba(0, 0, 0, .34);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

[data-theme="dark"] {
    color-scheme: dark;
    --bg-main: #0c0c0c;
    --bg-header: #121212;
    --bg-menu: #161616;
    --bg-card: #121212;
    --bg-card-soft: #161616;
    --color-primary: #1e018f;
    --text-main: #cdcdcd;
    --text-muted: #8f8f8f;
    --border-color: rgba(255,255,255,0.08);
    --bg: var(--bg-main);
    --panel: var(--bg-card);
    --panel-soft: var(--bg-card-soft);
    --line: var(--border-color);
    --text: var(--text-main);
    --muted: var(--text-muted);
    --brand: var(--color-primary);
    --shadow: 0 24px 70px rgba(0, 0, 0, .48);
    --shadow-soft: 0 12px 34px rgba(0, 0, 0, .34);
}

[data-theme="light"] {
    color-scheme: light;
    --bg-main: #f4f5f8;
    --bg-header: #ffffff;
    --bg-menu: #f1f2f5;
    --bg-card: #ffffff;
    --bg-card-soft: #f6f7fb;
    --color-primary: #1e018f;
    --text-main: #18181b;
    --text-muted: #666b76;
    --border-color: rgba(0,0,0,0.10);
    --bg: var(--bg-main);
    --panel: var(--bg-card);
    --panel-soft: var(--bg-card-soft);
    --line: var(--border-color);
    --text: var(--text-main);
    --muted: var(--text-muted);
    --brand: var(--color-primary);
    --shadow: 0 24px 70px rgba(17, 24, 39, .14);
    --shadow-soft: 0 12px 34px rgba(17, 24, 39, .10);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); text-rendering: optimizeLegibility; }
[hidden] { display: none !important; }
body[data-area="studio"],
body[data-area="zpanel"] { overflow-x: hidden; background: var(--bg-main); color: var(--text-main); }
body[data-area="studio"] main,
body[data-area="zpanel"] main { min-width: 0; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; }
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 3px; }

.container { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.site-header { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg-header) 94%, transparent); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-soft); backdrop-filter: blur(18px); }
.topbar { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: clamp(18px, 3vw, 34px); }
.brand { min-height: 42px; display: inline-flex; align-items: center; gap: 10px; flex: 0 0 auto; min-width: max-content; font-weight: 800; letter-spacing: 0; }
.brand.has-logo { gap: 0; }
.brand-text { line-height: 1; font-size: 15px; font-weight: 800; }
.brand img, .footer-logo { width: auto; height: 46px; max-height: 54px; max-width: 180px; object-fit: contain; }
.search { flex: 1 1 620px; display: flex; align-items: center; gap: 8px; width: min(620px, 100%); max-width: 620px; min-height: 46px; margin-inline: auto; padding: 6px 6px 6px 14px; background: var(--bg-card-soft); border: 1px solid var(--line); border-radius: 999px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04), 0 0 0 1px rgba(30,1,143,.08); }
.search-leading { color: var(--muted); font-weight: 800; }
.search input { width: 100%; min-width: 0; color: var(--text); background: transparent; border: 0; outline: 0; }
.search-submit { width: 36px; height: 36px; display: grid; place-items: center; flex: 0 0 auto; color: var(--text-muted); background: rgba(255,255,255,.04); border: 1px solid var(--line); border-radius: 50%; cursor: pointer; box-shadow: none; }
.search-submit:hover { color: var(--brand); border-color: color-mix(in srgb, var(--brand) 45%, transparent); box-shadow: none; }
.account { min-width: 0; flex: 0 0 auto; margin-left: 0; display: flex; align-items: center; gap: 8px; }
.guest-actions { min-width: 0; display: inline-flex; align-items: center; gap: 8px; padding: 5px; background: var(--bg-card-soft); border: 1px solid var(--line); border-radius: 999px; }
.account-icon { position: relative; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 50%; background: var(--bg-card); }
.account-icon::before { content: ""; position: absolute; top: 8px; left: 11px; width: 10px; height: 10px; border: 2px solid var(--text); border-radius: 50%; }
.account-icon::after { content: ""; position: absolute; left: 8px; bottom: 7px; width: 16px; height: 9px; border: 2px solid var(--text); border-top-left-radius: 999px; border-top-right-radius: 999px; border-bottom: 0; }
.hamburger { display: none; width: 42px; height: 42px; align-items: center; justify-content: center; flex-direction: column; gap: 5px; color: var(--text); background: var(--bg-card-soft); border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.hamburger span { display: block; width: 18px; height: 2px; border-radius: 999px; background: currentColor; }
.menubar { background: var(--bg-menu); border-top: 1px solid var(--line); }
.menu { position: relative; display: flex; flex-wrap: wrap; gap: 10px; overflow: visible; padding: 12px 0; }
.menu-item { position: relative; }
.menu > a, .menu-item > .menu-link, .pill, .icon-btn { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 16px; border: 1px solid var(--line); border-radius: 999px; color: var(--text); background: var(--bg-card); cursor: pointer; white-space: nowrap; line-height: 1; text-align: center; vertical-align: middle; transition: border-color .18s ease, background .18s ease, color .18s ease, transform .18s ease, box-shadow .18s ease; }
.menu > a:hover, .menu-item > .menu-link:hover, .pill:hover, .icon-btn:hover { border-color: color-mix(in srgb, var(--text) 18%, transparent); background: var(--bg-card-soft); box-shadow: 0 0 22px rgba(30,1,143,.16); }
.pill.primary, .menu > a.is-active, .menu-item > .menu-link.is-active { border-color: #1e018f; background: #1e018f; color: #ffffff; font-weight: 800; box-shadow: 0 0 24px rgba(30,1,143,.42); }
.pill.primary:hover, .menu > a.is-active:hover, .menu-item > .menu-link.is-active:hover { transform: translateY(-1px); }
.pill i,
.pill svg,
.pill > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.pill i,
.pill svg {
    flex: 0 0 auto;
}
.icon-btn { width: 40px; padding: 0; }
.menu-caret { color: var(--muted); font-size: 11px; }
.menu-dropdown { position: absolute; top: calc(100% + 10px); left: 0; z-index: 30; display: none; min-width: 210px; padding: 8px; background: #121212; border: 1px solid rgba(255,255,255,.08); border-radius: 16px; box-shadow: 0 20px 52px rgba(0,0,0,.46), 0 0 30px rgba(30,1,143,.18); }
.menu-dropdown a { width: 100%; min-height: 38px; display: flex; align-items: center; justify-content: flex-start; margin-bottom: 4px; padding: 0 10px; color: var(--muted); background: transparent; border: 1px solid transparent; border-radius: 10px; }
.menu-dropdown a:hover { color: var(--text); background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.08); }
.menu-item:hover > .menu-dropdown, .menu-item:focus-within > .menu-dropdown, .menu-item.is-open > .menu-dropdown { display: grid; }
.menu-item.has-mega { position: static; }
.mega-menu { position: absolute; top: calc(100% + 10px); left: 0; right: 0; z-index: 30; display: none; width: min(960px, 100%); max-height: min(72vh, 560px); margin: 0 auto; overflow: auto; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; padding: 16px; background: linear-gradient(180deg, #161616, #111); border: 1px solid rgba(255,255,255,.08); border-radius: 22px; box-shadow: 0 24px 70px rgba(0,0,0,.58), 0 0 36px rgba(30,1,143,.22); }
.menu-item:hover > .mega-menu, .menu-item:focus-within > .mega-menu, .menu-item.is-open > .mega-menu { display: grid; }
.mega-column { min-width: 0; padding: 12px; background: rgba(255,255,255,.025); border: 1px solid rgba(255,255,255,.06); border-radius: 16px; }
.mega-column h3 { margin: 0 0 10px; color: #fff; font-size: 13px; line-height: 1.2; letter-spacing: 0; }
.mega-links { display: grid; gap: 7px; }
.mega-link { min-width: 0; min-height: 44px; display: flex; align-items: center; gap: 10px; padding: 8px; color: var(--muted); border: 1px solid transparent; border-radius: 12px; transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease, box-shadow .18s ease; }
.mega-link:hover { color: #fff; background: rgba(255,255,255,.045); border-color: rgba(255,255,255,.1); box-shadow: 0 0 18px rgba(30,1,143,.2); transform: translateY(-1px); }
.mega-icon { width: 32px; height: 32px; display: grid; place-items: center; flex: 0 0 auto; color: #fff; background: linear-gradient(135deg, #1e018f, #3214bb); border-radius: 10px; font-size: 11px; font-weight: 900; }
.zx-header { isolation: isolate; }
.zx-nav .menu-link { max-width: 100%; }
.zx-nav .menu-link.is-active { background: transparent; border-color: transparent; color: var(--brand); box-shadow: none; }
.zx-nav .menu-link:hover { background: rgba(255, 255, 255, 0.03); border-color: transparent; box-shadow: none; }
.zx-nav .menu-link.is-active:hover { transform: none; }
.zx-nav .menu-icon { width: 24px; height: 24px; display: inline-grid; place-items: center; flex: 0 0 auto; color: var(--brand); background: color-mix(in srgb, var(--brand) 14%, transparent); border: 1px solid color-mix(in srgb, var(--brand) 24%, transparent); border-radius: 8px; font-size: 11px; font-weight: 800; }
.zx-dropdown { min-width: 240px; background: color-mix(in srgb, #121212 92%, var(--brand) 8%); border-color: rgba(255,255,255,.1); border-radius: 14px; }
.zx-dropdown a { gap: 8px; }
.zx-mega { width: min(1060px, calc(100% - 32px)); border-radius: 18px; background: linear-gradient(180deg, color-mix(in srgb, #171717 92%, var(--brand) 8%), #101010); }
.zx-mega-column { border-radius: 12px; }
.zx-mega-link { border-radius: 10px; }
.zx-mega-link span:last-child { min-width: 0; overflow-wrap: anywhere; }
.lang select { min-height: 38px; color: var(--text); background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 0 10px; }

.hero { min-height: 340px; display: grid; align-items: center; padding: 56px 0 32px; }
.hero h1 { max-width: 760px; margin: 0 0 16px; font-size: clamp(34px, 6vw, 72px); line-height: .98; letter-spacing: 0; }
.hero p { max-width: 640px; color: var(--muted); font-size: 18px; line-height: 1.6; }
.eyebrow { margin: 0 0 10px; color: var(--brand); font-weight: 800; text-transform: uppercase; font-size: 12px; }
.section { padding: 26px 0; }
.section h1, .section h2, .page h1 { margin: 0 0 18px; }
.grid { display: grid; gap: 16px; }
.mods { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.music-grid { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.mod-card, .music-card, .category-card, .payment-card, .comment, .related-item { background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; }
.mod-card a, .music-card a { display: block; height: 100%; position: relative; }
.mod-card img, .music-card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: var(--panel-soft); }
.card-body, .music-card h3, .music-card p { padding: 0 14px; }
.card-body { padding: 14px; }
.card-body h3, .music-card h3 { margin: 0 0 6px; font-size: 16px; }
.card-body p, .music-card p, .muted { color: var(--muted); }
.meta { display: flex; gap: 10px; flex-wrap: wrap; color: var(--muted); font-size: 13px; }
.badge { position: absolute; margin: 10px; padding: 5px 9px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); font-size: 12px; }
.badge.premium { color: #061316; background: var(--warning); border-color: transparent; }
.game-slider { display: flex; gap: 8px; overflow-x: auto; padding: 12px 0; }
.game-slider button { min-width: 92px; height: 42px; color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-md); }
.site-footer { margin-top: 50px; padding: 36px 0; border-top: 1px solid var(--line); background: var(--bg-header); }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 28px; align-items: start; }
.footer-brand p { max-width: 420px; margin: 14px 0 10px; }
.footer-brand small { color: var(--text-muted); }
.footer-links { display: grid; gap: 8px; }
.footer-links h4 { margin: 0 0 4px; }
.site-footer p, .site-footer a { display: block; color: var(--muted); line-height: 1.7; }
.site-footer a:hover { color: var(--text); }
.social-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0; }
.social-links a { width: 38px; height: 38px; display: inline-grid; place-items: center; color: var(--text); background: var(--bg-card-soft); border: 1px solid var(--line); border-radius: 50%; font-size: 12px; font-weight: 800; line-height: 1; }
.page { padding: 48px 0; }
.auth-card { width: min(420px, calc(100% - 32px)); margin: 52px auto; padding: 22px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.auth-card-wide { width: min(620px, calc(100% - 32px)); }
.auth-card h1 { margin: 0 0 8px; }
.auth-copy { margin: 0 0 18px; color: var(--muted); line-height: 1.55; }
.auth-card label { display: grid; gap: 7px; margin-bottom: 14px; color: var(--muted); }
.auth-card input, .auth-card select { width: 100%; color: var(--text); background: var(--bg-card-soft); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 11px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.check-row { display: flex !important; grid-template-columns: none !important; align-items: flex-start; gap: 10px !important; color: var(--text) !important; line-height: 1.45; }
.check-row input { width: 18px; min-width: 18px; height: 18px; margin-top: 2px; accent-color: var(--color-primary); }
.check-row a, .auth-links a, .auth-note a { color: #ffffff; text-decoration: underline; text-underline-offset: 3px; }
.auth-links { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 16px; color: var(--muted); }
.auth-errors, .auth-note { margin: 0 0 16px; padding: 12px; background: var(--bg-card-soft); border: 1px solid var(--line); border-radius: var(--radius-md); }
.auth-errors { border-left: 4px solid var(--danger); }
.auth-errors p { margin: 0; color: var(--text); }
.auth-errors p + p { margin-top: 6px; }
.auth-note { display: grid; gap: 8px; border-left: 4px solid var(--success); color: var(--muted); overflow-wrap: anywhere; }
.auth-note small { color: var(--muted); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; opacity: 0; }
.user-menu { position: relative; }
.user-chip { min-height: 44px; display: inline-flex; align-items: center; gap: 8px; padding: 0 12px 0 6px; color: var(--text); background: var(--bg-card-soft); border: 1px solid var(--line); border-radius: 999px; cursor: pointer; }
.avatar { width: 30px; height: 30px; display: inline-grid; place-items: center; overflow: hidden; border-radius: 50%; color: #ffffff; background: var(--color-primary); font-size: 12px; font-weight: 800; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.user-name { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chevron { color: var(--muted); font-size: 12px; }
.dropdown { position: absolute; top: calc(100% + 10px); right: 0; z-index: 40; display: none; width: min(360px, calc(100vw - 24px)); min-width: 280px; padding: 10px; background: var(--bg-card); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow), 0 0 30px rgba(30,1,143,.12); }
.user-menu.is-open .dropdown { display: block; }
.dropdown-head { display: grid; gap: 3px; padding: 10px 10px 12px; border-bottom: 1px solid var(--line); }
.dropdown-head strong { color: var(--text); line-height: 1.2; }
.dropdown-head span, .dropdown-head small { color: var(--muted); font-size: 13px; }
.user-dropdown-head { grid-template-columns: 36px minmax(0, 1fr); align-items: center; gap: 10px; }
.user-dropdown-head .avatar { width: 36px; height: 36px; }
.dropdown-section { display: grid; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.dropdown-section:last-child { border-bottom: 0; padding-bottom: 0; }
.dropdown-label { padding: 0 4px; color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; }
.language-chips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.language-chip { min-width: 0; min-height: 42px; display: flex; align-items: center; gap: 8px; padding: 7px 8px; color: var(--muted); background: var(--bg-card-soft); border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.language-chip strong { width: 28px; height: 28px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, rgba(30,1,143,.8), rgba(50,20,187,.86)); border-radius: 9px; font-size: 11px; }
.language-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.language-chip:hover { color: var(--text); border-color: color-mix(in srgb, var(--text) 16%, transparent); background: var(--bg-card); }
.language-chip.is-active { color: var(--text); border-color: rgba(71,209,124,.42); background: rgba(71,209,124,.12); box-shadow: 0 0 18px rgba(30,1,143,.16); }
.theme-choice-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.theme-choice { min-width: 0; min-height: 58px; display: grid; align-content: center; gap: 2px; padding: 8px; color: var(--muted); background: var(--bg-card-soft); border: 1px solid var(--line); border-radius: 12px; cursor: pointer; text-align: left; }
.theme-choice strong { color: var(--text); font-size: 13px; }
.theme-choice span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.theme-choice:hover { color: var(--text); background: var(--bg-card); }
.theme-choice.is-active { color: #fff; background: var(--brand); border-color: var(--brand); box-shadow: 0 0 18px rgba(30,1,143,.22); }
.theme-choice.is-active strong { color: #fff; }
.theme-choice-note { color: var(--muted); line-height: 1.35; padding: 0 4px; }
.theme-toggle-row { min-height: 46px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 9px 4px 0; }
.theme-toggle-row span { min-width: 0; display: grid; gap: 2px; }
.theme-toggle-row strong { color: #fff; font-size: 14px; }
.theme-toggle-row small { color: var(--muted); font-size: 12px; }
.theme-switch { width: 48px; height: 28px; position: relative; flex: 0 0 auto; padding: 0; background: #262626; border: 1px solid rgba(255,255,255,.1); border-radius: 999px; cursor: pointer; transition: background .18s ease, border-color .18s ease; }
.theme-switch span { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; background: #fff; border-radius: 50%; transition: transform .18s ease; }
.theme-switch.is-active { background: #1e018f; border-color: #1e018f; }
.theme-switch.is-active span { transform: translateX(20px); }
.account-links { gap: 4px; }
.dropdown-link { min-height: 38px; display: flex; align-items: center; justify-content: space-between; padding: 9px 10px; color: var(--muted); border-radius: 10px; }
.dropdown-link:hover { color: var(--text); background: var(--bg-card-soft); }
.dropdown-link.is-primary { color: #fff; background: #1e018f; }
.dropdown-link.is-danger:hover { color: #fff; background: rgba(251,113,133,.14); }
.more-btn { border-radius: 50%; }
.more-dots { display: inline-flex; align-items: center; justify-content: center; gap: 3px; }
.more-dots span { width: 4px; height: 4px; display: block; background: currentColor; border-radius: 50%; }
.toast-stack { position: fixed; top: 88px; right: 18px; z-index: 80; display: grid; gap: 10px; width: min(360px, calc(100% - 36px)); }
.toast-message { padding: 12px 14px; background: var(--bg-card); border: 1px solid var(--line); border-left: 4px solid var(--color-primary); border-radius: var(--radius-md); box-shadow: var(--shadow-soft); color: var(--text); }
.toast-message[data-type="error"], .toast-message[data-type="danger"] { border-left-color: var(--danger); }
.toast-message[data-type="warning"] { border-left-color: var(--warning); }
.toast-message[data-type="success"] { border-left-color: var(--success); }

[data-theme="light"] .menu-dropdown,
[data-theme="light"] .mega-menu {
    background: var(--bg-card);
    border-color: var(--line);
    box-shadow: var(--shadow);
}

[data-theme="light"] .mega-column,
[data-theme="light"] .mega-link:hover,
[data-theme="light"] .menu-dropdown a:hover {
    background: var(--bg-card-soft);
    border-color: var(--line);
    color: var(--text);
}

[data-theme="light"] .mega-column h3,
[data-theme="light"] .check-row a,
[data-theme="light"] .auth-links a,
[data-theme="light"] .auth-note a {
    color: var(--text);
}

[data-theme="light"] .home-hero {
    background:
        linear-gradient(90deg, rgba(244,245,248,.98), rgba(244,245,248,.76)),
        linear-gradient(135deg, #ffffff, #eef0f6 60%);
}

.music-mini-player,
.music-queue-panel {
    --music-card: var(--bg-card);
    --music-card-soft: var(--bg-card-soft);
    --music-text: var(--text-main);
    --music-muted: var(--text-muted);
    --music-line: var(--border-color);
    --music-brand: var(--color-primary);
}

.music-mini-player {
    position: fixed;
    left: 50%;
    bottom: 14px;
    z-index: 80;
    width: min(1040px, calc(100% - 28px));
    min-height: 78px;
    transform: translateX(-50%);
    display: grid;
    grid-template-columns: minmax(180px, .9fr) auto minmax(220px, 1.2fr) minmax(230px, .9fr);
    align-items: center;
    gap: 14px;
    padding: 10px 12px;
    background: color-mix(in srgb, var(--music-card) 94%, transparent);
    border: 1px solid var(--music-line);
    border-radius: 8px;
    box-shadow: 0 18px 44px rgba(0,0,0,.28);
    backdrop-filter: blur(18px);
}
.music-mini-player[hidden] { display: none; }
.music-mini-track { min-width: 0; display: grid; grid-template-columns: 54px minmax(0, 1fr); align-items: center; gap: 10px; }
.music-mini-player img { width: 54px; height: 54px; object-fit: cover; border-radius: 7px; }
.music-mini-meta { min-width: 0; display: grid; gap: 2px; }
.music-mini-meta strong, .music-mini-meta span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.music-mini-meta span { color: var(--music-muted); }
.music-mini-controls { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.music-mini-toggle {
    width: 50px;
    height: 50px;
    display: grid;
    place-items: center;
    color: #fff;
    background: var(--music-brand);
    border: 1px solid var(--music-brand);
    border-radius: 50%;
    cursor: pointer;
    font-weight: 900;
    box-shadow: 0 10px 24px rgba(30,1,143,.32);
}
.music-mini-icon,
.music-mini-queue-button {
    min-width: 38px;
    min-height: 38px;
    display: inline-grid;
    place-items: center;
    color: var(--music-text);
    background: var(--music-card-soft);
    border: 1px solid var(--music-line);
    border-radius: 999px;
    cursor: pointer;
}
.music-mini-icon.is-muted { color: #fff; background: rgba(251,113,133,.86); border-color: transparent; }
.music-mini-time { min-width: 0; display: grid; grid-template-columns: 42px minmax(0, 1fr) 48px; align-items: center; gap: 9px; color: var(--music-muted); font-size: 12px; }
.music-mini-progress { height: 5px; overflow: hidden; background: var(--music-card-soft); border-radius: 999px; }
.music-mini-progress span { display: block; width: 0%; height: 100%; background: var(--music-brand); }
.music-mini-actions { min-width: 0; display: grid; grid-template-columns: auto auto auto minmax(74px, 120px) auto; align-items: center; justify-content: end; gap: 8px; }
.music-mini-actions input { width: 100%; accent-color: var(--music-brand); }
.music-mini-queue-button { padding: 0 12px; }

.music-queue-panel {
    position: fixed;
    right: 18px;
    bottom: 108px;
    z-index: 82;
    width: min(380px, calc(100% - 36px));
    max-height: min(560px, calc(100vh - 150px));
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    background: var(--music-card);
    border: 1px solid var(--music-line);
    border-radius: 8px;
    box-shadow: var(--shadow);
    overflow: hidden;
}
.music-queue-panel[hidden] { display: none; }
.music-queue-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px; border-bottom: 1px solid var(--music-line); }
.music-queue-head div { display: grid; gap: 2px; }
.music-queue-head span { color: var(--music-muted); font-size: 12px; }
.music-queue-head button { width: 34px; height: 34px; color: var(--music-text); background: var(--music-card-soft); border: 1px solid var(--music-line); border-radius: 50%; cursor: pointer; }
.music-queue-list { display: grid; gap: 6px; padding: 10px; overflow: auto; }
.music-queue-empty { padding: 14px; color: var(--music-muted); text-align: center; }
.music-queue-item { min-width: 0; display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; align-items: center; gap: 10px; width: 100%; padding: 8px; color: var(--music-text); background: var(--music-card-soft); border: 1px solid var(--music-line); border-radius: 8px; cursor: pointer; text-align: left; }
.music-queue-item:hover { border-color: rgba(30,1,143,.42); }
.music-queue-item img { width: 46px; height: 46px; object-fit: cover; border-radius: 6px; }
.music-queue-item span { min-width: 0; display: grid; gap: 2px; }
.music-queue-item strong, .music-queue-item small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.music-queue-item small { color: var(--music-muted); }
.music-queue-item em { color: var(--music-muted); font-size: 12px; font-style: normal; }
.music-queue-item.is-locked { opacity: .62; }
.music-queue-item.is-locked em { color: var(--warning); }

@media (max-width: 980px) {
    .topbar { gap: 10px; }
    .brand-text { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .menu { padding-bottom: 12px; }
    .mega-menu { width: min(820px, 100%); }
    .music-mini-player { grid-template-columns: minmax(170px, 1fr) auto minmax(180px, 1fr); }
    .music-mini-actions { grid-column: 1 / -1; justify-content: stretch; grid-template-columns: auto auto auto minmax(90px, 1fr) auto; }
}

@media (max-width: 760px) {
    .topbar { flex-wrap: wrap; padding: 12px 0; }
    .hamburger { display: inline-flex; margin-left: auto; }
    .account { order: 2; margin-left: 0; }
    .search { order: 3; width: 100%; max-width: none; flex-basis: 100%; }
    .header-cta { order: 2; }
    .menubar { display: none; }
    body.menu-open .site-header .menubar { display: block; }
    .menu { display: grid; grid-template-columns: 1fr; overflow: visible; }
    .menu-item, .menu > a, .menu-item > .menu-link, .menu .lang, .menu select { width: 100%; }
    .menu > a, .menu-item > .menu-link { justify-content: space-between; border-radius: 14px; }
    .menu-dropdown { position: static; display: none; margin-top: 6px; box-shadow: none; }
    .mega-menu { position: static; display: none; width: 100%; max-height: none; grid-template-columns: 1fr; gap: 10px; margin-top: 8px; padding: 12px; border-radius: 16px; box-shadow: none; }
    .menu-item:hover > .menu-dropdown, .menu-item:focus-within > .menu-dropdown, .menu-item.is-open > .menu-dropdown { display: grid; }
    .menu-item:hover > .mega-menu, .menu-item:focus-within > .mega-menu, .menu-item.is-open > .mega-menu { display: grid; }
    .pill { min-height: 40px; }
    .premium-lock-card { align-items: flex-start; flex-direction: column; }
    .footer-grid { grid-template-columns: 1fr; }
    .form-grid { grid-template-columns: 1fr; gap: 0; }
    .toast-stack { top: 14px; }
    .music-mini-player { left: 0; right: 0; bottom: 0; width: 100%; transform: none; grid-template-columns: minmax(0, 1fr) auto; border-radius: 8px 8px 0 0; }
    .music-mini-track { grid-template-columns: 46px minmax(0, 1fr); }
    .music-mini-player img { width: 46px; height: 46px; }
    .music-mini-time { grid-column: 1 / -1; grid-template-columns: 40px minmax(0, 1fr) 46px; }
    .music-mini-actions { grid-column: 1 / -1; grid-template-columns: repeat(4, auto) minmax(92px, 1fr); justify-content: stretch; }
    .music-queue-panel { right: 12px; bottom: 112px; width: min(380px, calc(100% - 24px)); }
}

@media (max-width: 460px) {
    .container { width: min(100% - 24px, 1180px); }
    .brand img, .footer-logo { width: auto; height: 38px; max-height: 42px; max-width: 142px; }
    .account { width: 100%; }
    .guest-actions { width: auto; flex: 1 1 auto; }
    .account .pill, .user-chip { width: 100%; }
    .guest-menu { flex: 0 0 auto; }
    .account-user-menu { width: 100%; }
    .account .pill { flex: 1; }
    .dropdown { right: 0; width: min(100vw - 24px, 340px); }
    .language-chips { grid-template-columns: 1fr; }
    .hero { padding-top: 38px; }
    .hero p { font-size: 16px; }
    .music-mini-player { gap: 8px; padding: 8px; }
    .music-mini-controls { gap: 5px; }
    .music-mini-icon { min-width: 34px; min-height: 34px; }
    .music-mini-toggle { width: 44px; height: 44px; }
    .music-mini-actions { grid-template-columns: repeat(3, auto) minmax(70px, 1fr); }
    .music-mini-actions [data-mini-share] { display: none; }
    .music-mini-queue-button { padding: 0 9px; }
}

.home-hero {
    min-height: 390px;
    display: grid;
    align-items: end;
    padding: 58px 0 34px;
    background:
        linear-gradient(90deg, rgba(12, 12, 12, .98), rgba(12, 12, 12, .74)),
        linear-gradient(135deg, #151515, #0c0c0c 60%);
    border-bottom: 1px solid var(--line);
}

.home-hero-copy { max-width: 760px; min-width: 0; }
.home-hero h1, .category-hero h1, .list-header h1, .mod-title-row h1 {
    margin: 0;
    line-height: 1.02;
    letter-spacing: 0;
    overflow-wrap: anywhere;
}
.home-hero h1 { max-width: 760px; font-size: clamp(34px, 5vw, 62px); }
.home-hero p { max-width: 640px; color: var(--muted); line-height: 1.6; }

.hero-search, .list-search {
    width: min(620px, 100%);
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    padding: 8px;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.hero-search input, .list-search input {
    width: 100%;
    min-width: 0;
    color: var(--text);
    background: transparent;
    border: 0;
    outline: 0;
    padding: 10px;
}

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

.section-head h2, .section-head p { margin: 0; }
.section-link {
    color: var(--muted);
    border-bottom: 1px solid transparent;
    white-space: nowrap;
}
.section-link:hover { color: var(--text); border-color: var(--color-primary); }

.slider-controls { display: inline-flex; gap: 8px; }
.game-slider {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(280px, 340px);
    gap: 18px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    padding: 4px 0 16px;
    scrollbar-width: none;
}

.game-slider::-webkit-scrollbar {
    display: none;
}

.game-slider .category-card { scroll-snap-align: start; }
.game-slider .home-game-card { scroll-snap-align: start; }

.home-game-card {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 380px;
    border-radius: 20px;
    overflow: hidden;
    text-decoration: none;
    color: #fff;
    background: var(--bg-card);
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.home-game-card:hover {
    transform: translateY(-4px);
}

.home-game-card .hgc-bg {
    position: absolute;
    inset: 0;
    background: var(--game-bg, linear-gradient(135deg, var(--color-primary), #111)) center/cover no-repeat;
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
    z-index: 1;
}

.home-game-card:hover .hgc-bg {
    transform: scale(1.06);
}

.home-game-card .hgc-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.05) 0%, rgba(12,12,12,0.85) 100%);
    z-index: 2;
    transition: opacity 0.3s;
}

.home-game-card:hover .hgc-overlay {
    background: linear-gradient(to bottom, rgba(0,0,0,0.05) 0%, rgba(12,12,12,0.95) 100%);
}

.home-game-card .hgc-content {
    position: relative;
    z-index: 3;
    padding: 24px;
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: space-between;
}

.home-game-card .hgc-header {
    display: flex;
    justify-content: flex-end;
}

.home-game-card .hgc-badge {
    background: rgba(0,0,0,0.3);
    backdrop-filter: blur(8px);
    padding: 6px 12px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.1);
}

.home-game-card .hgc-bottom {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.home-game-card .hgc-info h3 {
    font-size: 26px;
    font-weight: 800;
    margin: 0 0 6px 0;
    line-height: 1.1;
    text-shadow: 0 2px 4px rgba(0,0,0,0.6);
    color: #fff;
}

.home-game-card .hgc-info p {
    font-size: 14px;
    color: rgba(255,255,255,0.75);
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.home-game-card .hgc-stats {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,0.15);
}

.home-game-card .hgc-mod-count {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
}

.home-game-card .hgc-mod-count svg {
    opacity: 0.8;
}

.home-game-card .hgc-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    color: #fff;
    transition: all 0.3s;
    border: 1px solid rgba(255,255,255,0.1);
}

.home-game-card:hover .hgc-arrow {
    background: var(--color-primary);
    border-color: var(--color-primary);
    transform: translateX(4px);
}
.category-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
}

.category-card {
    position: relative;
    min-height: 154px;
    display: grid;
    align-content: end;
    gap: 8px;
    overflow: hidden;
    padding: 16px;
    color: var(--text);
    background:
        linear-gradient(135deg, rgba(30, 1, 143, .46), rgba(18, 18, 18, .94)),
        var(--bg-card);
    border: 1px solid var(--line);
    border-radius: 8px;
    transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.category-card.has-banner {
    background-image:
        linear-gradient(180deg, rgba(12, 12, 12, .08), rgba(12, 12, 12, .88)),
        var(--category-banner);
    background-size: cover;
    background-position: center;
}

.category-card:hover, .mod-card:hover, .music-card:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 255, 255, .18);
}

.category-card-backdrop {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(12, 12, 12, .08), rgba(12, 12, 12, .9));
    pointer-events: none;
}

.category-card > *:not(.category-card-backdrop) { position: relative; z-index: 1; }
.category-icon {
    width: 42px;
    height: 42px;
    display: inline-grid;
    place-items: center;
    color: #ffffff;
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 8px;
    font-weight: 800;
}

.category-icon img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.category-card strong, .category-card small, .category-card em {
    min-width: 0;
    overflow-wrap: anywhere;
}
.category-card small { color: var(--muted); line-height: 1.45; }
.category-card em { color: var(--text); font-size: 12px; font-style: normal; }

.mod-card {
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow-soft);
    transition: transform .18s ease, border-color .18s ease;
}

.mod-card-link { display: grid; height: 100%; color: inherit; }
.mod-card-media {
    position: relative;
    min-height: 0;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(30, 1, 143, .42), rgba(22, 22, 22, .92)),
        var(--panel-soft);
}

.mod-card-media img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    transition: transform .26s ease, opacity .18s ease;
}

.mod-card:hover .mod-card-media img { transform: scale(1.04); }
.mod-card-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(12, 12, 12, .03), rgba(12, 12, 12, .74));
    pointer-events: none;
}

.mod-card-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    z-index: 2;
}

.mod-card-badges .badge, .mod-gallery-overlay .badge {
    position: static;
    margin: 0;
}

.badge.free { color: #eafff3; background: rgba(71, 209, 124, .2); border-color: rgba(71, 209, 124, .34); }
.badge.featured { color: #ffffff; background: var(--color-primary); border-color: transparent; }
.rating-badge {
    position: absolute;
    right: 10px;
    bottom: 10px;
    z-index: 2;
    padding: 5px 9px;
    color: #ffffff;
    background: rgba(12, 12, 12, .78);
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 12px;
    font-weight: 800;
}

.card-body h3 { overflow-wrap: anywhere; line-height: 1.25; }
.card-body p {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 0 0 12px;
    line-height: 1.45;
}
.card-body p span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meta { justify-content: space-between; }

.music-card {
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: 8px;
    transition: transform .18s ease, border-color .18s ease;
}
.music-card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: var(--panel-soft); }
img.is-missing { opacity: 0; }
.music-card h3 { margin: 14px 14px 4px; overflow-wrap: anywhere; }
.music-card p { margin: 0 14px 16px; color: var(--muted); line-height: 1.45; }

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.chips a, .chips button {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 13px;
    color: var(--muted);
    background: var(--bg-card-soft);
    border: 1px solid var(--line);
    border-radius: 8px;
    cursor: pointer;
}

.chips a.is-active, .chips button.is-active {
    color: #ffffff;
    background: var(--color-primary);
    border-color: var(--color-primary);
}

.category-hero {
    position: relative;
    min-height: 240px;
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    overflow: hidden;
    margin-top: 28px;
    padding: 28px;
    background:
        linear-gradient(135deg, rgba(30, 1, 143, .36), rgba(18, 18, 18, .95)),
        var(--bg-card);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.category-hero.has-banner {
    background-image:
        linear-gradient(180deg, rgba(12, 12, 12, .18), rgba(12, 12, 12, .94)),
        var(--category-banner);
    background-size: cover;
    background-position: center;
}

.category-hero > *:not(.category-card-backdrop) { position: relative; z-index: 1; }
.category-hero p { max-width: 650px; color: var(--muted); line-height: 1.55; }
.category-hero strong {
    padding: 9px 12px;
    background: rgba(12, 12, 12, .68);
    border: 1px solid var(--line);
    border-radius: 8px;
    white-space: nowrap;
}

.list-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
    gap: 20px;
    align-items: end;
    padding-top: 42px;
}

.list-header h1 { font-size: clamp(30px, 4vw, 48px); }

.empty-state {
    padding: 22px;
    color: var(--muted);
    background: var(--bg-card);
    border: 1px dashed rgba(255, 255, 255, .16);
    border-radius: 8px;
}
.empty-state strong { display: block; color: var(--text); margin-bottom: 6px; }
.empty-state p { margin: 0; line-height: 1.55; }

.mod-detail {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 22px;
    padding-top: 34px;
}

.mod-main { min-width: 0; display: grid; gap: 18px; }
.mod-gallery {
    position: relative;
    overflow: hidden;
    background: var(--panel-soft);
    border: 1px solid var(--line);
    border-radius: 8px;
}
.mod-gallery img { width: 100%; aspect-ratio: 16 / 8; object-fit: cover; }
.mod-gallery-overlay {
    position: absolute;
    inset: 14px;
    display: flex;
    align-items: start;
    gap: 8px;
    pointer-events: none;
}

.mod-title-row {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
}
.mod-title-row h1 { font-size: clamp(30px, 4vw, 54px); margin-top: 6px; }

.mod-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}
.mod-stat-grid div {
    padding: 14px;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: 8px;
}
.mod-stat-grid span { display: block; color: var(--muted); font-size: 13px; }
.mod-stat-grid strong { display: block; margin-top: 4px; font-size: 20px; }

.creator-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: 8px;
}
.creator-bar > div { display: flex; align-items: center; gap: 10px; min-width: 0; }
.creator-bar span span, .creator-bar strong, .creator-bar a { display: block; }
.creator-bar a { color: var(--muted); font-size: 13px; }
.actions { display: flex; flex-wrap: wrap; justify-content: flex-end; }
.creator-actions .pill,
.profile-actions .pill,
.package-subscribe-row .pill,
.mod-action-bar .pill {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding-block: 0;
    line-height: 1;
    white-space: nowrap;
    text-align: center;
}

.profile-info-card .profile-actions .pill {
    white-space: nowrap;
}

.description, .comments {
    padding: 18px;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: 8px;
}
.description h2, .comments h2 { margin: 0 0 12px; }
.description p { color: var(--muted); line-height: 1.7; }
.mod-meta-list { display: grid; gap: 8px; margin: 16px 0 0; }
.mod-meta-list div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding-top: 8px;
    border-top: 1px solid var(--line);
}
.mod-meta-list dt { color: var(--muted); }
.mod-meta-list dd { margin: 0; }

.comments textarea {
    width: 100%;
    min-height: 110px;
    resize: vertical;
    color: var(--text);
    background: var(--bg-card-soft);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px;
}
.login-note { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.login-note p { margin-right: auto; color: var(--muted); }

.related {
    position: sticky;
    top: 112px;
    align-self: start;
    display: grid;
    gap: 10px;
}
.related h2 { margin: 0 0 4px; }
.related-item {
    display: grid;
    grid-template-columns: 98px minmax(0, 1fr);
    gap: 10px;
    padding: 8px;
    color: var(--text);
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: 8px;
}
.related-item img { width: 98px; height: 66px; object-fit: cover; border-radius: 8px; }
.related-item span { min-width: 0; overflow-wrap: anywhere; font-weight: 700; }
.related-item small { display: block; margin-top: 4px; color: var(--muted); font-weight: 400; }

@media (max-width: 1100px) {
    .category-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .mod-detail { grid-template-columns: 1fr; }
    .related { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .related h2 { grid-column: 1 / -1; }
}

@media (max-width: 860px) {
    .category-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .list-header { grid-template-columns: 1fr; }
    .mod-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
    .home-hero { min-height: 330px; padding-top: 38px; }
    .section-head, .category-hero, .mod-title-row, .creator-bar {
        align-items: stretch;
        flex-direction: column;
    }
    .hero-search, .list-search { display: grid; }
    .hero-search .pill, .list-search .pill { width: 100%; }
    .category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .category-card { min-height: 138px; padding: 14px; }
    .related { grid-template-columns: 1fr; }
}

@media (max-width: 420px) {
    .category-grid { grid-template-columns: 1fr; }
    .mod-stat-grid { grid-template-columns: 1fr; }
    .card-body p, .meta { display: grid; justify-content: start; }
}

.mod-watch {
    grid-template-columns: minmax(0, 1fr) 352px;
    align-items: start;
}

.mod-title-block {
    display: grid;
    gap: 10px;
}

.mod-title-block h1 {
    margin: 0;
    color: #cdcdcd;
    font-size: clamp(28px, 4vw, 48px);
    line-height: 1.08;
    letter-spacing: 0;
    overflow-wrap: anywhere;
}

.mod-kicker, .mod-meta-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    color: var(--muted);
    font-size: 13px;
}

.mod-kicker a, .mod-kicker span {
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    padding: 0 9px;
    color: var(--text);
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.mod-meta-inline span + span::before {
    content: "";
    width: 4px;
    height: 4px;
    display: inline-block;
    margin-right: 8px;
    vertical-align: middle;
    background: var(--muted);
    border-radius: 50%;
}

.mod-gallery {
    display: grid;
    gap: 10px;
    background: transparent;
    border: 0;
    border-radius: 0;
}

.mod-gallery-stage {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(30, 1, 143, .34), rgba(22, 22, 22, .96)),
        var(--bg-card-soft);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.mod-gallery-item {
    display: none;
    margin: 0;
}

.mod-gallery-item.is-active {
    display: block;
}

.gallery-image-button {
    width: 100%;
    display: block;
    padding: 0;
    color: var(--text);
    background: transparent;
    border: 0;
    cursor: zoom-in;
}

.gallery-image-button img, .gallery-video-frame, .gallery-model-frame {
    width: 100%;
    aspect-ratio: 16 / 8.5;
    min-height: 360px;
    object-fit: cover;
    background:
        linear-gradient(135deg, rgba(30, 1, 143, .38), rgba(18, 18, 18, .96)),
        var(--bg-card-soft);
}

.gallery-model-frame {
    position: relative;
    display: grid;
    place-items: stretch;
}

.gallery-model-frame model-viewer {
    width: 100%;
    min-height: 360px;
    height: 100%;
    background:
        linear-gradient(135deg, rgba(30, 1, 143, .2), rgba(18, 18, 18, .96)),
        #111;
}

.gallery-model-fallback {
    min-height: 100%;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 10px;
    padding: 24px;
    text-align: center;
    color: var(--text);
}

.gallery-model-fallback p {
    margin: 0;
    color: var(--muted);
}

.gallery-model-open {
    position: absolute;
    right: 12px;
    bottom: 12px;
    z-index: 2;
}

.gallery-video-frame iframe {
    width: 100%;
    height: 100%;
    min-height: 360px;
    display: block;
    border: 0;
}

.gallery-fallback {
    min-height: 360px;
    display: grid;
    place-items: center;
    padding: 30px;
    background:
        linear-gradient(135deg, rgba(30, 1, 143, .5), rgba(18, 18, 18, .94)),
        var(--bg-card-soft);
}

.gallery-fallback span {
    max-width: 520px;
    text-align: center;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    z-index: 2;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: rgba(12, 12, 12, .72);
    border: 1px solid var(--line);
    border-radius: 50%;
    transform: translateY(-50%);
    cursor: pointer;
}

.gallery-nav.prev { left: 12px; }
.gallery-nav.next { right: 12px; }

.mod-gallery-thumbs {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(86px, 112px);
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
}

.mod-gallery-thumbs button {
    height: 64px;
    overflow: hidden;
    padding: 0;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: 8px;
    cursor: pointer;
    opacity: .62;
}

.mod-gallery-thumbs button.is-active {
    opacity: 1;
    border-color: var(--color-primary);
}

.mod-gallery-thumbs img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-thumb {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(135deg, rgba(30, 1, 143, .7), rgba(18, 18, 18, .92));
    font-size: 12px;
    font-weight: 800;
}

.mod-social-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: stretch;
}

.mod-social-row .creator-bar, .mod-action-bar {
    min-width: 0;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.mod-social-row .creator-bar {
    padding: 12px;
}

.creator-identity {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar.large {
    width: 46px;
    height: 46px;
    min-width: 46px;
    font-size: 16px;
}

.creator-identity strong, .creator-identity small {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.creator-identity small { color: var(--muted); }
.creator-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

.mod-action-bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px;
}

.mod-action-bar .pill.is-active {
    color: #ffffff;
    background: var(--bg-card-soft);
    border-color: var(--color-primary);
}

.download-pill {
    min-width: 124px;
}

.premium-locked-pill {
    color: var(--warning);
    border-color: rgba(245, 184, 75, .35);
    background: rgba(245, 184, 75, .08);
}

.premium-lock-card,
.package-card {
    background: #121212;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.premium-lock-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px;
}

.premium-lock-card h2,
.premium-lock-card p {
    margin: 0;
}

.premium-lock-card p:not(.eyebrow) {
    color: var(--muted);
    line-height: 1.6;
}

.package-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.package-card {
    min-width: 0;
    display: grid;
    gap: 14px;
    padding: 16px;
    background:
        linear-gradient(135deg, rgba(30, 1, 143, .18), rgba(18, 18, 18, .96)),
        #121212;
}

.package-card-top,
.package-subscribe-row,
.package-price-row,
.package-meta-row,
.package-actions,
.package-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.package-card h3 {
    margin: 0;
    font-size: 20px;
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.package-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

.package-price-row span,
.package-meta-row span {
    min-width: 110px;
    flex: 1 1 110px;
    display: grid;
    gap: 3px;
    padding: 10px;
    color: var(--muted);
    background: #161616;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.package-price-row strong {
    color: #ffffff;
    font-size: 15px;
}

.package-access-note {
    padding-top: 2px;
}

.package-status {
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    padding: 0 9px;
    color: var(--muted);
    background: #161616;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.package-status.is-active {
    color: #dfffea;
    border-color: rgba(71, 209, 124, .34);
    background: rgba(71, 209, 124, .1);
}

.package-status.is-inactive {
    color: #ffd7df;
    border-color: rgba(251, 113, 133, .3);
    background: rgba(251, 113, 133, .1);
}

.package-status.is-owned {
    color: #fff7df;
    border-color: rgba(245, 184, 75, .34);
    background: rgba(245, 184, 75, .1);
}

.mod-description {
    position: relative;
    overflow: hidden;
}

.description-body {
    max-height: 210px;
    overflow: hidden;
}

.mod-description.is-expanded .description-body {
    max-height: none;
}

.mod-description:not(.is-expanded)::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 52px;
    height: 64px;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(18, 18, 18, 0), var(--bg-card));
}

.description-toggle {
    position: relative;
    z-index: 1;
    margin-top: 12px;
    padding: 0;
    color: #ffffff;
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--color-primary);
    cursor: pointer;
}

.comments-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.comments-head h2, .comments-head p {
    margin: 0;
}

.comments-head p, .comment-form-actions span {
    color: var(--muted);
    font-size: 13px;
}

.comment-form {
    display: grid;
    gap: 10px;
    margin-bottom: 16px;
}

.comment-form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

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

.comment {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 10px;
    padding: 12px;
}

.comment header {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.comment time {
    color: var(--muted);
    font-size: 12px;
}

.comment p {
    margin: 7px 0 0;
    color: var(--text);
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.comment-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.comment-actions button {
    padding: 0;
    color: var(--muted);
    background: transparent;
    border: 0;
    cursor: pointer;
}

.comment-actions button:hover {
    color: var(--text);
}

.comment.is-reply {
    margin-left: 34px;
    border-left: 3px solid rgba(30, 1, 143, .62);
}

.comment-tools {
    display: inline-flex;
    gap: 6px;
    margin-left: auto;
}

.comment-tools button {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    padding: 0;
    color: var(--text);
    background: var(--bg-card-soft);
    border: 1px solid var(--line);
    border-radius: 8px;
    cursor: pointer;
}

.comment-actions button.is-active {
    color: #ffffff;
}

.comment-edit-form {
    display: grid;
    gap: 8px;
    margin-top: 8px;
}

.comment-edit-form textarea {
    min-height: 86px;
}

.comment-edit-form div {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.profile-page {
    padding-bottom: 42px;
}

.profile-page .profile-cover {
    min-height: 220px;
    background:
        linear-gradient(180deg, rgba(12, 12, 12, .24), #0c0c0c),
        linear-gradient(135deg, rgba(30, 1, 143, .42), #161616);
    background-size: cover;
    background-position: center;
    border-bottom: 1px solid var(--line);
}

.profile-card {
    position: relative;
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr) auto;
    gap: 18px;
    align-items: end;
    margin-top: -54px;
    padding: 16px;
    background: #121212;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.profile-avatar {
    width: 96px;
    height: 96px;
    font-size: 34px;
    border: 4px solid #121212;
}

.profile-main h1 {
    margin: 0 0 4px;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.05;
}

.profile-main p {
    margin: 6px 0 0;
    color: var(--muted);
    line-height: 1.55;
}

.profile-links, .profile-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.profile-actions {
    justify-content: flex-end;
}

@media (max-width: 760px) {
    .profile-card {
        grid-template-columns: 78px minmax(0, 1fr);
        align-items: start;
    }

    .profile-avatar {
        width: 78px;
        height: 78px;
        font-size: 26px;
    }

    .profile-actions {
        grid-column: 1 / -1;
        justify-content: stretch;
    }

    .profile-actions .pill {
        flex: 1 1 calc(50% - 8px);
    }

    .comment.is-reply {
        margin-left: 14px;
    }
}

/* Final MVP theme hardening: public profile, dropdowns, comments and community surfaces. */
.profile-v13,
.profile-page {
    background: var(--bg-main);
    color: var(--text-main);
}

.profile-cover-hero {
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--bg-main) 8%, transparent), color-mix(in srgb, var(--bg-main) 88%, transparent)),
        linear-gradient(135deg, color-mix(in srgb, var(--color-primary) 62%, var(--bg-card-soft)), var(--bg-card-soft));
    border-color: var(--border-color);
    box-shadow: var(--shadow-soft);
}

.profile-cover-hero.has-cover {
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--bg-main) 8%, transparent), color-mix(in srgb, var(--bg-main) 78%, transparent)),
        var(--profile-cover-image);
    background-size: cover;
    background-position: center;
}

.profile-info-card,
.profile-card,
.profile-stats-grid span,
.profile-tab-list,
.profile-empty,
.profile-lock-card,
.profile-about-grid article {
    color: var(--text-main);
    background: var(--bg-card);
    border-color: var(--border-color);
}

.profile-title-row h1,
.profile-main h1,
.profile-stats-grid strong,
.profile-about-grid h2,
.profile-summary-list dd,
.profile-lock-card h1,
.profile-lock-card h2,
.profile-empty strong {
    color: var(--text-main);
}

.profile-title-row p,
.profile-main p,
.profile-about-lead,
.profile-stats-grid span,
.profile-lock-card p:not(.eyebrow),
.profile-about-grid article > p:not(.eyebrow),
.profile-summary-list dt {
    color: var(--text-muted);
}

.profile-badge,
.profile-socials a,
.profile-tab-list button,
.package-benefits li,
.menu-dropdown,
.mega-column,
.login-note,
.comment,
.comment-edit-form textarea {
    color: var(--text-main);
    background: var(--bg-card-soft);
    border-color: var(--border-color);
}

.profile-socials a:hover,
.profile-tab-list button:hover,
.menu-dropdown a:hover,
.mega-link:hover {
    color: var(--text-main);
    background: var(--bg-card);
    border-color: color-mix(in srgb, var(--text-main) 16%, transparent);
}

.profile-avatar,
.profile-avatar-xl,
.profile-lock-icon,
.search-submit,
.mega-icon,
.language-chip strong,
.theme-choice.is-active,
.dropdown-link.is-primary,
.profile-tab-list button.is-active,
.profile-badge-creator,
.profile-badge-admin,
.comment-actions button.is-active,
.pill.primary {
    color: #ffffff;
}

.profile-avatar-xl {
    background: linear-gradient(135deg, var(--color-primary), color-mix(in srgb, var(--color-primary) 64%, var(--bg-card-soft)));
    border-color: var(--bg-card);
}

.profile-info-card .profile-actions .pill.is-active {
    color: var(--text-main);
    background: color-mix(in srgb, var(--warning) 18%, var(--bg-card-soft));
    border-color: color-mix(in srgb, var(--warning) 45%, var(--border-color));
}

[data-theme="light"] .check-row a,
[data-theme="light"] .auth-links a,
[data-theme="light"] .auth-note a,
[data-theme="light"] .theme-toggle-row strong,
[data-theme="light"] .mega-column h3 {
    color: var(--text-main);
}

[data-theme="light"] .profile-badge-creator,
[data-theme="light"] .profile-badge-admin,
[data-theme="light"] .profile-tab-list button.is-active {
    color: #ffffff;
}

.empty-state.small {
    padding: 14px;
}

.related {
    gap: 8px;
}

.related h2 {
    font-size: 18px;
}

.related-item {
    grid-template-columns: 142px minmax(0, 1fr);
    gap: 10px;
    padding: 0;
    overflow: hidden;
    border: 0;
    background: transparent;
}

.related-cover {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background: var(--bg-card-soft);
}

.related-cover img {
    width: 142px;
    height: 82px;
    object-fit: cover;
}

.profile-v13 {
    padding: 28px 0 56px;
    background: #0c0c0c;
}

.profile-hero {
    display: grid;
    gap: 0;
}

.profile-cover-hero {
    min-height: clamp(220px, 32vw, 360px);
    background:
        linear-gradient(180deg, rgba(12, 12, 12, .12), rgba(12, 12, 12, .9)),
        linear-gradient(135deg, rgba(30, 1, 143, .72), rgba(22, 22, 22, .96) 58%, rgba(245, 184, 75, .22));
    background-size: cover;
    background-position: center;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 30px;
    box-shadow: 0 28px 80px rgba(0,0,0,.42);
}

.profile-info-card {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 124px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
    margin: -74px 22px 0;
    padding: 18px;
    background: rgba(18,18,18,.98);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 8px;
    box-shadow: 0 24px 70px rgba(0,0,0,.45);
}

.profile-avatar-xl {
    width: 124px;
    height: 124px;
    color: #fff;
    background:
        linear-gradient(135deg, rgba(30,1,143,.86), rgba(22,22,22,.94)),
        #161616;
    border: 5px solid #121212;
    border-radius: 26px;
    font-size: 42px;
    font-weight: 900;
    box-shadow: 0 12px 30px rgba(0,0,0,.35);
}

.profile-avatar-xl img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
}

.profile-identity {
    min-width: 0;
    display: grid;
    gap: 10px;
}

.profile-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 14px;
    min-width: 0;
    flex-wrap: wrap;
}

.profile-title-row h1 {
    margin: 0;
    color: #fff;
    font-size: clamp(30px, 5vw, 52px);
    line-height: 1.02;
    word-break: normal;
    overflow-wrap: normal;
    max-width: min(100%, 920px);
}

.profile-title-row p,
.profile-about-lead {
    margin: 6px 0 0;
    color: #8f8f8f;
    line-height: 1.55;
}

.profile-title-row p {
    word-break: normal;
    overflow-wrap: anywhere;
}

.profile-about-lead {
    max-width: 760px;
    color: #cdcdcd;
    word-break: normal;
    overflow-wrap: break-word;
}

.profile-badges,
.profile-socials,
.profile-tab-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.profile-badge,
.profile-socials a {
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    color: #cdcdcd;
    background: #161616;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.profile-badge-creator,
.profile-badge-admin {
    color: #fff;
    border-color: rgba(30,1,143,.72);
    background: rgba(30,1,143,.55);
}

.profile-badge-moderator {
    color: #eafff3;
    border-color: rgba(71,209,124,.34);
    background: rgba(71,209,124,.12);
}

.profile-socials a:hover {
    color: #fff;
    border-color: rgba(255,255,255,.18);
}

.profile-info-card .profile-actions {
    grid-column: 2;
    align-self: stretch;
    min-width: 0;
    display: flex;
    align-content: flex-end;
    align-items: flex-end;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
}

.profile-info-card .profile-actions .pill {
    min-width: 0;
    white-space: nowrap;
    text-align: center;
}

.profile-info-card .profile-actions .pill.is-active {
    color: #fff;
    border-color: rgba(245,184,75,.42);
    background: rgba(245,184,75,.14);
}

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

.profile-stats-grid span {
    min-width: 0;
    display: grid;
    gap: 4px;
    padding: 14px;
    color: #8f8f8f;
    background: #121212;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 8px;
}

.profile-stats-grid strong {
    color: #fff;
    font-size: clamp(20px, 3vw, 28px);
    line-height: 1;
}

.profile-tabs {
    display: grid;
    gap: 16px;
    padding-top: 18px;
}

.profile-tab-list {
    position: sticky;
    top: 90px;
    z-index: 9;
    padding: 10px;
    background: rgba(18,18,18,.94);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 8px;
    backdrop-filter: blur(16px);
}

.profile-tab-list button {
    min-height: 40px;
    padding: 0 14px;
    color: #8f8f8f;
    background: #161616;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 999px;
    cursor: pointer;
}

.profile-tab-list button.is-active {
    color: #fff;
    background: #1e018f;
    border-color: #1e018f;
    box-shadow: 0 0 24px rgba(30,1,143,.36);
}

.profile-tab-panel {
    min-width: 0;
}

.profile-empty,
.profile-lock-card,
.profile-about-grid article {
    background: #121212;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 8px;
}

.profile-empty {
    padding: 22px;
}

.profile-lock-card {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-top: 22px;
    padding: 22px;
}

.profile-lock-card h1,
.profile-lock-card h2,
.profile-lock-card p {
    margin: 0;
}

.profile-lock-card p:not(.eyebrow) {
    margin-top: 6px;
    color: #8f8f8f;
    line-height: 1.6;
}

.profile-lock-icon {
    width: 64px;
    height: 64px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    color: #fff;
    background: #1e018f;
    border-radius: 18px;
    font-size: 13px;
    font-weight: 900;
}

.profile-about-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(220px, .8fr) minmax(240px, .9fr);
    gap: 14px;
}

.profile-about-grid article {
    min-width: 0;
    padding: 18px;
}

.profile-about-grid h2,
.profile-about-grid p {
    margin: 0;
}

.profile-about-grid article > p:not(.eyebrow) {
    color: #cdcdcd;
    line-height: 1.65;
}

.profile-summary-list {
    display: grid;
    gap: 10px;
    margin: 0;
}

.profile-summary-list div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.profile-summary-list dt,
.profile-summary-list dd {
    margin: 0;
}

.profile-summary-list dt {
    color: #8f8f8f;
}

.profile-summary-list dd {
    color: #fff;
    text-align: right;
    overflow-wrap: anywhere;
}

.package-benefits {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.package-benefits li {
    padding: 9px 10px;
    color: #cdcdcd;
    background: rgba(255,255,255,.035);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 8px;
}

@media (max-width: 980px) {
    .profile-info-card {
        grid-template-columns: 108px minmax(0, 1fr);
        align-items: start;
    }

    .profile-avatar-xl {
        width: 108px;
        height: 108px;
        font-size: 36px;
    }

    .profile-info-card .profile-actions {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }

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

    .profile-about-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .profile-v13 {
        padding-top: 16px;
    }

    .profile-cover-hero {
        min-height: 190px;
        border-radius: 24px;
    }

    .profile-info-card {
        grid-template-columns: 1fr;
        margin: -52px 10px 0;
        padding: 14px;
    }

    .profile-avatar-xl {
        width: 92px;
        height: 92px;
        border-radius: 22px;
        font-size: 32px;
    }

    .profile-title-row {
        display: grid;
    }

    .profile-info-card .profile-actions .pill {
        flex: 1 1 calc(50% - 8px);
        white-space: nowrap;
    }

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

    .profile-tab-list {
        position: static;
        overflow-x: auto;
        flex-wrap: nowrap;
    }

    .profile-tab-list button {
        flex: 0 0 auto;
    }

    .profile-lock-card {
        align-items: flex-start;
    }
}

.related-cover em {
    position: absolute;
    left: 6px;
    bottom: 6px;
    padding: 3px 6px;
    color: #ffffff;
    background: rgba(12, 12, 12, .76);
    border: 1px solid var(--line);
    border-radius: 6px;
    font-size: 11px;
    font-style: normal;
}

.related-copy {
    min-width: 0;
    display: grid;
    align-content: start;
    gap: 3px;
    padding: 2px 0;
}

.related-copy strong {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.25;
}

.related-copy small {
    color: var(--muted);
    line-height: 1.35;
}

.gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 12px;
    padding: 14px;
    background: rgba(5, 5, 8, .94);
}

.gallery-lightbox[hidden] {
    display: none;
}

.gallery-lightbox-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.gallery-lightbox-title {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text);
}

.gallery-lightbox-actions {
    display: flex;
    gap: 8px;
}

.gallery-lightbox-stage {
    min-height: 0;
    display: grid;
    place-items: center;
    overflow: hidden;
}

.gallery-lightbox-stage img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    cursor: zoom-in;
    touch-action: none;
    transform-origin: center;
}

.gallery-lightbox-stage img.is-zoomed {
    cursor: grab;
}

.gallery-lightbox-stage iframe {
    width: min(1100px, 100%);
    aspect-ratio: 16 / 9;
    border: 0;
}

.gallery-lightbox-stage model-viewer {
    width: min(1100px, 100%);
    height: min(74vh, 720px);
    background: #111;
    border: 1px solid var(--line);
    border-radius: 8px;
}

@media (max-width: 1180px) {
    .mod-watch {
        grid-template-columns: minmax(0, 1fr) 300px;
    }

    .related-item {
        grid-template-columns: 120px minmax(0, 1fr);
    }

    .related-cover img {
        width: 120px;
        height: 76px;
    }
}

@media (max-width: 980px) {
    .mod-watch {
        grid-template-columns: 1fr;
    }

    .mod-social-row {
        grid-template-columns: 1fr;
    }

    .related {
        position: static;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .related h2 {
        grid-column: 1 / -1;
    }
}

@media (max-width: 700px) {
    .gallery-image-button img, .gallery-video-frame, .gallery-video-frame iframe, .gallery-model-frame, .gallery-model-frame model-viewer, .gallery-fallback {
        min-height: 220px;
        aspect-ratio: 16 / 10;
    }

    .mod-action-bar {
        justify-content: stretch;
        flex-wrap: wrap;
    }

    .mod-action-bar .pill {
        flex: 1 1 calc(50% - 8px);
    }

    .download-pill {
        flex-basis: 100% !important;
    }

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

    .related-item {
        grid-template-columns: 132px minmax(0, 1fr);
    }

    .related-cover img {
        width: 132px;
        height: 78px;
    }

    .gallery-lightbox {
        padding: 10px;
    }
}

@media (max-width: 460px) {
    .mod-kicker, .mod-meta-inline {
        display: grid;
        grid-template-columns: 1fr;
    }

    .mod-meta-inline span + span::before {
        display: none;
    }

    .creator-actions, .mod-social-row .creator-bar {
        align-items: stretch;
    }

    .creator-actions .pill {
        flex: 1;
    }
}

/* Bolum 17: header live search, notifications and public documentation pages. */
.search {
    position: relative;
}

.search-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 60;
    display: grid;
    gap: 6px;
    padding: 8px;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow);
}

.search-results[hidden] {
    display: none;
}

.search-result {
    min-width: 0;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding: 8px;
    color: var(--text);
    border: 1px solid transparent;
    border-radius: 10px;
}

.search-result:hover {
    background: var(--bg-card-soft);
    border-color: var(--line);
}

.search-result img,
.search-result-mark {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    object-fit: cover;
    color: #ffffff;
    background: var(--brand);
    border-radius: 9px;
    font-size: 11px;
    font-weight: 900;
}

.search-result span {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.search-result strong,
.search-result small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.search-result small,
.search-empty span {
    color: var(--muted);
}

.search-empty {
    display: grid;
    gap: 3px;
    padding: 12px;
    color: var(--text);
    background: var(--bg-card-soft);
    border: 1px dashed var(--line);
    border-radius: 10px;
}

.notification-center {
    position: relative;
    flex: 0 0 auto;
}

.notification-trigger {
    position: relative;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    color: var(--text);
    background: var(--bg-card-soft);
    border: 1px solid var(--line);
    border-radius: 50%;
    cursor: pointer;
}

.notification-trigger span {
    width: 18px;
    height: 18px;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: var(--brand);
    border-radius: 50%;
    font-size: 12px;
    font-weight: 900;
}

.notification-trigger i {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    display: grid;
    place-items: center;
    padding: 0 4px;
    color: #ffffff;
    background: var(--danger);
    border: 2px solid var(--bg-header);
    border-radius: 999px;
    font-size: 10px;
    font-style: normal;
    font-weight: 900;
}

.notification-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 70;
    width: min(360px, calc(100vw - 24px));
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow);
}

.notification-dropdown[hidden] {
    display: none;
}

.notification-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px;
    border-bottom: 1px solid var(--line);
}

.notification-head button {
    color: var(--muted);
    background: transparent;
    border: 0;
    cursor: pointer;
}

.notification-head button:hover {
    color: var(--text);
}

.notification-list {
    display: grid;
    max-height: 420px;
    overflow: auto;
    padding: 8px;
}

.notification-item {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    width: 100%;
    padding: 10px;
    text-align: left;
    color: var(--text);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 12px;
    cursor: pointer;
}

.notification-item:hover,
.notification-item.is-unread {
    background: var(--bg-card-soft);
    border-color: var(--line);
}

.notification-item.is-unread {
    box-shadow: inset 3px 0 0 var(--brand);
}

.notification-item span {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.notification-item strong,
.notification-item small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.notification-item small,
.notification-item em,
.notification-empty {
    color: var(--muted);
}

.notification-item em {
    font-size: 11px;
    font-style: normal;
    white-space: nowrap;
}

.notification-empty {
    padding: 14px;
    text-align: center;
}

.docs-page {
    padding: 34px 0 70px;
    background: var(--bg-main);
}

.docs-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    color: var(--muted);
    font-size: 14px;
}

.docs-breadcrumb a:hover {
    color: var(--text);
}

.docs-breadcrumb strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text);
}

.docs-shell {
    display: grid;
    grid-template-columns: minmax(220px, 280px) minmax(0, 820px);
    gap: 24px;
    align-items: start;
}

.docs-shell-no-toc {
    grid-template-columns: minmax(0, 860px);
    justify-content: center;
}

.docs-toc {
    position: sticky;
    top: 128px;
    min-width: 0;
    padding: 16px;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: var(--shadow-soft);
}

.docs-toc summary {
    cursor: pointer;
    color: var(--text);
    font-weight: 900;
}

.docs-toc-links {
    display: grid;
    gap: 6px;
    margin-top: 12px;
}

.docs-toc-links a {
    padding: 7px 9px;
    color: var(--muted);
    border-radius: 9px;
}

.docs-toc-links a:hover,
.docs-toc-links a:focus {
    color: var(--text);
    background: var(--bg-card-soft);
}

.docs-toc-links a.is-child {
    padding-left: 20px;
    font-size: 13px;
}

.docs-content {
    min-width: 0;
    padding: clamp(22px, 4vw, 38px);
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: 22px;
    box-shadow: var(--shadow-soft);
}

.docs-article-head {
    display: grid;
    gap: 12px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--line);
}

.docs-article-head h1 {
    margin: 0;
    font-size: clamp(32px, 5vw, 56px);
    line-height: 1.03;
}

.docs-lead {
    max-width: 760px;
    margin: 0;
    color: var(--muted);
    font-size: 18px;
    line-height: 1.65;
}

.docs-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.docs-meta span,
.translation-note {
    display: inline-flex;
    min-height: 32px;
    align-items: center;
    padding: 6px 10px;
    color: var(--muted);
    background: var(--bg-card-soft);
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 13px;
}

.translation-note {
    margin: 0 0 14px;
    width: fit-content;
    border-color: rgba(245,184,75,.36);
}

.docs-body {
    padding-top: 26px;
    color: var(--text);
    line-height: 1.78;
}

.docs-body h2,
.docs-body h3,
.docs-body h4 {
    position: relative;
    scroll-margin-top: 130px;
    margin: 34px 0 12px;
    line-height: 1.16;
    color: var(--text);
}

.docs-body h2 {
    font-size: 30px;
}

.docs-body h3 {
    font-size: 23px;
}

.docs-body h4 {
    font-size: 18px;
}

.docs-body p,
.docs-body ul,
.docs-body ol,
.docs-body blockquote,
.docs-body pre {
    margin: 0 0 18px;
}

.docs-body ul,
.docs-body ol {
    padding-left: 24px;
}

.docs-body li + li {
    margin-top: 7px;
}

.docs-body a {
    color: var(--brand);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.docs-body code {
    padding: 2px 6px;
    color: var(--text);
    background: var(--bg-card-soft);
    border: 1px solid var(--line);
    border-radius: 6px;
}

.docs-body pre {
    overflow: auto;
    padding: 14px;
    background: var(--bg-card-soft);
    border: 1px solid var(--line);
    border-radius: 12px;
}

.docs-body pre code {
    padding: 0;
    background: transparent;
    border: 0;
}

.docs-body blockquote {
    padding: 12px 14px;
    color: var(--muted);
    background: var(--bg-card-soft);
    border: 1px solid var(--line);
    border-left: 4px solid var(--brand);
    border-radius: 12px;
}

.docs-body img {
    width: auto;
    max-width: 100%;
    height: auto;
    border: 1px solid var(--line);
    border-radius: 14px;
}

.docs-body .alert-info,
.docs-body .alert-warning,
.docs-body .alert-danger,
.docs-body .alert-success {
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
}

.docs-body .alert-info { border-left: 4px solid var(--brand); }
.docs-body .alert-warning { border-left: 4px solid var(--warning); }
.docs-body .alert-danger { border-left: 4px solid var(--danger); }
.docs-body .alert-success { border-left: 4px solid var(--success); }

.heading-anchor {
    margin-left: 8px;
    color: var(--muted) !important;
    opacity: 0;
    text-decoration: none !important;
    font-size: .72em;
}

.docs-body h2:hover .heading-anchor,
.docs-body h3:hover .heading-anchor,
.heading-anchor:focus {
    opacity: 1;
}

.docs-feedback {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 34px;
    padding-top: 18px;
    color: var(--muted);
    border-top: 1px solid var(--line);
}

.docs-feedback strong {
    color: var(--text);
}

body.gallery-lightbox-open {
    overflow: hidden;
}

.gallery-lightbox-stage img {
    max-width: 95vw;
    max-height: 85vh;
}

.gallery-lightbox-actions .pill {
    min-width: 46px;
    min-height: 46px;
    padding: 0 14px;
    border-radius: 50%;
    font-size: 20px;
}

.gallery-lightbox-actions [data-lightbox-close] {
    width: auto;
    border-radius: 999px;
    font-size: 14px;
}

@media (max-width: 860px) {
    .docs-shell {
        grid-template-columns: 1fr;
    }

    .docs-toc {
        position: static;
        order: -1;
    }

    .docs-content {
        border-radius: 18px;
    }

    .docs-feedback {
        display: grid;
    }
}

@media (max-width: 560px) {
    .notification-dropdown {
        right: -58px;
    }

    .docs-page {
        padding-top: 22px;
    }

    .docs-content {
        padding: 18px;
    }

    .docs-article-head h1 {
        font-size: 32px;
    }

    .docs-body h2 {
        font-size: 25px;
    }

    .docs-body h3 {
        font-size: 20px;
    }
}

/* Bolum 20: homepage social hero, community posts, stories and gallery UX */
.home-hero {
    min-height: 430px;
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(320px, 1.1fr);
    gap: 24px;
    align-items: stretch;
    padding: 42px 0 30px;
}

.home-hero-copy {
    display: grid;
    align-content: center;
    max-width: 760px;
    min-width: 0;
}

.home-hero h1 {
    max-width: 820px;
    font-size: clamp(34px, 4.6vw, 58px);
}

.home-social-panel {
    min-width: 0;
    display: grid;
    gap: 14px;
    align-self: center;
}

.home-community-feed,
.story-strip,
.community-composer,
.community-post-card,
.studio-community-list {
    min-width: 0;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow-soft);
}

.home-community-feed,
.community-composer,
.studio-community-list {
    padding: 14px;
}

.home-community-head,
.story-strip-head,
.community-composer-head,
.community-post-head,
.community-post-author,
.community-post-actions,
.community-composer-actions,
.story-composer-actions {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.home-community-head,
.story-strip-head,
.community-composer-head,
.community-post-head,
.community-composer-actions,
.story-composer-actions {
    justify-content: space-between;
}

.home-community-head a {
    color: var(--muted);
    font-size: 13px;
}

.story-strip {
    padding: 12px;
    overflow: hidden;
}

.story-add-btn {
    min-height: 34px;
    padding: 0 12px;
    font-size: 13px;
}

.story-strip-scroller {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 10px 2px 2px;
    scrollbar-width: thin;
}

.story-bubble {
    position: relative;
    width: 76px;
    flex: 0 0 76px;
    display: grid;
    justify-items: center;
    gap: 7px;
    padding: 0;
    color: var(--text);
    background: transparent;
    border: 0;
    cursor: pointer;
}

.story-ring {
    position: relative;
    width: 60px;
    height: 60px;
    display: grid;
    place-items: center;
    padding: 3px;
    border-radius: 50%;
    background: conic-gradient(from 20deg, var(--brand), #47d17c, #f5b84b, var(--brand));
}

.story-bubble.has-new-story .story-ring {
    background: conic-gradient(from 20deg, #1e018f, #20d67f, #ffbd4a, #d946ef, #1e018f);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 16%, transparent);
}

.story-bubble.is-seen .story-ring {
    background: color-mix(in srgb, var(--muted) 50%, transparent);
}

.story-ring img,
.story-ring em {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 3px solid var(--bg-card);
    border-radius: 50%;
    object-fit: cover;
    color: #fff;
    background: var(--brand);
    font-style: normal;
    font-weight: 900;
}

.story-bubble small {
    width: 100%;
    overflow: hidden;
    color: var(--muted);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.story-bubble-add {
    position: absolute;
    right: 8px;
    top: 42px;
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    color: #fff;
    background: var(--brand);
    border: 2px solid var(--bg-card);
    border-radius: 50%;
    font-size: 16px;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
}

.story-count {
    position: absolute;
    right: -2px;
    bottom: -2px;
    min-width: 20px;
    height: 20px;
    display: grid;
    place-items: center;
    padding: 0 5px;
    color: #fff;
    background: #1e018f;
    border: 2px solid var(--bg-card);
    border-radius: 999px;
    font-size: 11px;
    line-height: 1;
}

.story-empty {
    width: 100%;
    padding: 14px;
    color: var(--muted);
    background: var(--bg-card-soft);
    border: 1px dashed var(--line);
    border-radius: 8px;
}

.story-composer {
    margin-top: 12px;
    padding: 12px;
    background: var(--bg-card-soft);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.story-composer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(160px, .55fr);
    gap: 10px;
}

.story-composer label,
.community-composer label,
.community-poll-builder label {
    min-width: 0;
    display: grid;
    gap: 7px;
    color: var(--muted);
}

.story-composer input,
.story-composer textarea,
.community-composer input,
.community-composer textarea {
    width: 100%;
    min-width: 0;
    color: var(--text);
    background: var(--bg-card-soft);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 11px 12px;
    resize: vertical;
}

.story-file-drop,
.community-dropzone {
    min-height: 116px;
    place-items: center;
    text-align: center;
    border: 1px dashed color-mix(in srgb, var(--brand) 50%, var(--line));
    border-radius: 8px;
    cursor: pointer;
}

.story-file-drop input,
.community-dropzone input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.story-file-drop span,
.community-dropzone span {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    color: #fff;
    background: var(--brand);
    border-radius: 50%;
    font-weight: 900;
}

.story-file-drop.is-dragging,
.community-dropzone.is-dragging,
.community-dropzone:hover {
    border-color: var(--brand);
    background: color-mix(in srgb, var(--brand) 9%, var(--bg-card-soft));
}

.community-composer {
    display: grid;
    gap: 12px;
}

.community-composer h2,
.community-composer p {
    margin: 0;
}

.community-type-tabs {
    display: inline-flex;
    gap: 6px;
    padding: 4px;
    background: var(--bg-card-soft);
    border: 1px solid var(--line);
    border-radius: 999px;
}

.community-type-tabs button {
    min-height: 34px;
    padding: 0 12px;
    color: var(--muted);
    background: transparent;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
}

.community-type-tabs button.is-active {
    color: #fff;
    background: var(--brand);
}

.community-composer form,
.community-composer-panel,
.community-poll-builder {
    display: grid;
    gap: 10px;
}

.community-image-preview {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.community-image-preview img {
    width: 100%;
    max-height: 280px;
    object-fit: cover;
}

.community-image-preview button {
    position: absolute;
    right: 10px;
    bottom: 10px;
}

.community-option-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 40px;
    gap: 8px;
}

.profile-community-feed {
    display: grid;
    gap: 14px;
}

.profile-story-bar-wrap {
    margin-top: 16px;
}

.profile-story-bar-wrap .story-strip {
    box-shadow: none;
}

.community-post-card {
    display: grid;
    gap: 12px;
    padding: 14px;
}

.community-post-card + .community-post-card,
.home-community-feed .community-post-card + .community-post-card,
.studio-community-list .community-post-card + .community-post-card {
    margin-top: 12px;
}

.community-post-card.is-compact {
    padding: 12px;
    box-shadow: none;
}

.community-post-author {
    overflow: hidden;
    flex: 1 1 auto;
}

.community-post-author > span:last-child {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.community-post-author strong,
.community-post-author small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.community-post-author small,
.community-post-text,
.community-poll small {
    color: var(--muted);
}

.community-avatar {
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
}

.community-post-tools {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.community-mini-action {
    width: 34px;
    min-height: 34px;
}

.community-status-badge,
.status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 9px;
    color: var(--muted);
    background: var(--bg-card-soft);
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.status-published { color: var(--success); }
.status-pending_review { color: var(--warning); }
.status-blocked,
.status-deleted { color: var(--danger); }

.community-post-text {
    margin: 0;
    line-height: 1.62;
    overflow-wrap: anywhere;
}

.community-post-image {
    overflow: hidden;
    margin: 0;
    background: var(--bg-card-soft);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.community-post-image img {
    width: 100%;
    max-height: 420px;
    object-fit: cover;
}

.community-poll {
    display: grid;
    gap: 10px;
    padding: 12px;
    background: var(--bg-card-soft);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.community-poll-options {
    display: grid;
    gap: 8px;
}

.community-poll-option {
    position: relative;
    min-height: 42px;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 0 12px;
    color: var(--text);
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: 8px;
    cursor: pointer;
    text-align: left;
}

.community-poll-fill {
    position: absolute;
    inset: 0 auto 0 0;
    width: var(--poll-percent);
    background: color-mix(in srgb, var(--brand) 18%, transparent);
    pointer-events: none;
}

.community-poll-option > span:not(.community-poll-fill),
.community-poll-option em {
    position: relative;
    z-index: 1;
}

.community-poll-option em {
    color: var(--muted);
    font-style: normal;
    font-weight: 800;
}

.community-poll-option.is-selected {
    border-color: color-mix(in srgb, var(--brand) 64%, var(--line));
}

.community-post-actions {
    flex-wrap: wrap;
}

.community-post-actions .pill {
    min-height: 36px;
    padding: 0 12px;
    font-size: 13px;
}

.community-react.is-active {
    color: #fff;
    background: var(--brand);
    border-color: var(--brand);
}

.community-comments {
    display: grid;
    gap: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--line);
}

.community-comment-list,
.community-comment-form {
    display: grid;
    gap: 8px;
}

.community-comment {
    padding: 10px;
    background: var(--bg-card-soft);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.community-comment p {
    margin: 4px 0 0;
    color: var(--muted);
}

.community-comment-form textarea {
    width: 100%;
    min-height: 84px;
    color: var(--text);
    background: var(--bg-card-soft);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px;
    resize: vertical;
}

.profile-story-ring {
    position: relative;
    padding: 4px;
    border: 0;
    background: conic-gradient(from 25deg, var(--brand), #47d17c, #f5b84b, var(--brand));
    cursor: pointer;
}

.profile-story-ring img {
    border: 4px solid var(--bg-card);
}

.story-viewer {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: grid;
    place-items: center;
}

.story-viewer-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.9);
    z-index: 1;
    backdrop-filter: blur(12px);
}

.story-viewer-panel {
    position: relative;
    width: min(420px, calc(100vw - 28px));
    min-height: min(700px, calc(100vh - 40px));
    max-height: calc(100vh - 40px);
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto auto;
    gap: 12px;
    padding: 14px;
    color: #fff;
    background: #111;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 8px;
    box-shadow: 0 28px 90px rgba(0,0,0,.62);
}

.story-viewer-close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 3;
    width: 38px;
    height: 38px;
    color: #fff;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
}

.story-viewer-meta {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding-right: 48px;
}

.story-viewer-meta small {
    color: rgba(255,255,255,.66);
}

.story-viewer-media {
    min-height: 0;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: #050505;
    border-radius: 8px;
}

.story-viewer-media img {
    width: 100%;
    height: 100%;
    max-height: calc(100vh - 190px);
    object-fit: contain;
}

.story-text-card {
    width: 100%;
    min-height: 420px;
    display: grid;
    place-items: center;
    padding: 28px;
    text-align: center;
    color: #fff;
    background: linear-gradient(145deg, #1e018f, #101010 68%);
    font-size: 24px;
    font-weight: 800;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.story-viewer-nav {
    position: absolute;
    top: 50%;
    z-index: 2;
    width: 42px;
    height: 42px;
    color: #fff;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 50%;
    cursor: pointer;
    transform: translateY(-50%);
    font-size: 30px;
}

.story-viewer-nav.prev { left: 12px; }
.story-viewer-nav.next { right: 12px; }

.story-viewer-caption {
    color: rgba(255,255,255,.78);
    line-height: 1.5;
    overflow-wrap: anywhere;
}

body.story-viewer-open {
    overflow: hidden;
}

/* Acil story UI modernizasyonu. */
.story-bar {
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--brand) 5%, transparent), transparent 70%),
        var(--bg-card);
}

.story-create-bubble .story-create-ring {
    background: color-mix(in srgb, var(--brand) 14%, var(--bg-card-soft));
    border: 1px dashed color-mix(in srgb, var(--brand) 54%, var(--line));
}

.story-create-bubble .story-create-ring em {
    border-color: transparent;
    color: var(--brand);
    background: var(--bg-card);
    font-size: 28px;
}

.story-composer-shell {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 18px;
    align-items: stretch;
}

.story-phone-preview {
    min-height: 300px;
    display: grid;
    place-items: center;
    overflow: hidden;
    padding: 18px;
    color: #fff;
    background: #1e018f;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 8px;
    text-align: center;
    font-weight: 900;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.story-phone-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.story-phone-preview video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.story-composer-fields {
    display: grid;
    gap: 12px;
}

.story-mode-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.story-mode-tabs button {
    min-height: 42px;
    color: var(--muted);
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 800;
}

.story-mode-tabs button.is-active {
    color: #fff;
    background: var(--brand);
    border-color: var(--brand);
}

.story-color-row {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 8px;
}

.story-color-row button {
    width: 30px;
    height: 30px;
    padding: 0;
    background: var(--story-swatch);
    border: 2px solid transparent;
    border-radius: 50%;
    cursor: pointer;
}

.story-color-row button.is-active {
    border-color: #fff;
    box-shadow: 0 0 0 2px var(--brand);
}

.story-progress {
    position: absolute;
    top: 12px;
    left: 14px;
    right: 14px;
    z-index: 5;
    display: flex;
    gap: 5px;
}

.story-progress span {
    height: 3px;
    flex: 1 1 0;
    overflow: hidden;
    background: rgba(255,255,255,.28);
    border-radius: 999px;
}

.story-progress i {
    display: block;
    width: var(--story-progress, 0%);
    height: 100%;
    background: #fff;
}

.story-progress span.is-complete i {
    width: 100%;
}

.story-viewer-panel {
    width: min(1120px, calc(100vw - 64px));
    min-height: min(680px, calc(100vh - 72px));
    grid-template-rows: auto minmax(0, 1fr) auto auto;
    padding-top: 28px;
    background: #1f1f1f;
}

.story-viewer-actions {
    position: absolute;
    top: 26px;
    right: 18px;
    z-index: 6;
    display: inline-flex;
    gap: 8px;
}

.story-viewer-icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    color: #fff;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 50%;
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
}

.story-viewer-icon.is-active {
    color: #ff5b8f;
    background: rgba(255,91,143,.14);
}

.story-viewer-media {
    min-height: 420px;
}

.story-viewer-media img {
    max-height: calc(100vh - 190px);
}

.story-viewer-media video {
    width: 100%;
    height: 100%;
    max-height: calc(100vh - 190px);
    object-fit: contain;
    background: #050505;
}

.story-text-card {
    min-height: 100%;
    background:
        radial-gradient(circle at top right, rgba(255,255,255,.16), transparent 28%),
        var(--story-bg, #1e018f);
}

.story-tap-zone {
    position: absolute;
    top: 78px;
    bottom: 86px;
    z-index: 1;
    width: 28%;
    padding: 0;
    background: transparent;
    border: 0;
    cursor: pointer;
}

.story-tap-prev { left: 0; }
.story-tap-next { right: 0; }

.story-viewer-link,
.story-viewer-delete {
    justify-self: start;
}

@media (max-width: 760px) {
    .story-composer-shell {
        grid-template-columns: 1fr;
    }

    .story-phone-preview {
        min-height: 220px;
    }

    .story-viewer-panel {
        width: calc(100vw - 18px);
        min-height: calc(100vh - 18px);
        max-height: calc(100vh - 18px);
        border-radius: 8px;
    }

    .story-viewer-media {
        min-height: 0;
    }

    .story-viewer-nav {
        display: none;
    }
}

.gallery-lightbox {
    padding: 18px;
    background: rgba(0,0,0,.88);
    backdrop-filter: blur(16px);
}

.gallery-lightbox-bar {
    position: absolute;
    top: 14px;
    left: 18px;
    right: 18px;
    z-index: 5;
    padding: 0;
    background: transparent;
    border: 0;
}

.gallery-lightbox-counter {
    color: rgba(255,255,255,.82);
    font-weight: 800;
}

.gallery-lightbox-actions {
    gap: 8px;
}

.gallery-lightbox-actions .pill,
.gallery-lightbox-nav,
.gallery-lightbox-close {
    color: #fff;
    background: rgba(255,255,255,.13);
    border-color: rgba(255,255,255,.18);
    backdrop-filter: blur(12px);
}

.gallery-lightbox-close {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    cursor: pointer;
    font-size: 26px;
}

.gallery-lightbox-stage {
    width: 100%;
    min-height: 100vh;
    padding: 62px 72px 92px;
    background: transparent;
    border: 0;
    border-radius: 0;
}

.gallery-lightbox-stage img {
    max-width: 92vw;
    max-height: 82vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 30px 80px rgba(0,0,0,.62);
    cursor: zoom-in;
    user-select: none;
    touch-action: none;
    transition: transform .16s ease;
}

.gallery-lightbox-stage img.is-zoomed {
    cursor: grab;
}

.gallery-lightbox-stage img.is-panning {
    cursor: grabbing;
}

.gallery-lightbox-stage iframe,
.gallery-lightbox-stage model-viewer {
    width: min(92vw, 1180px);
    height: min(82vh, 720px);
    border-radius: 8px;
}

.gallery-lightbox-nav {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 56px;
    height: 56px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    cursor: pointer;
    transform: translateY(-50%);
    font-size: 34px;
}

.gallery-lightbox-nav.prev { left: 24px; }
.gallery-lightbox-nav.next { right: 24px; }

.gallery-lightbox-thumbs {
    position: absolute;
    left: 50%;
    bottom: 18px;
    z-index: 4;
    width: min(760px, calc(100vw - 40px));
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 8px;
    background: rgba(0,0,0,.34);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 8px;
    transform: translateX(-50%);
}

.gallery-lightbox-thumbs button {
    width: 72px;
    height: 44px;
    flex: 0 0 auto;
    overflow: hidden;
    padding: 0;
    color: #fff;
    background: rgba(255,255,255,.1);
    border: 2px solid transparent;
    border-radius: 7px;
    cursor: pointer;
}

.gallery-lightbox-thumbs button.is-active {
    border-color: #fff;
}

.gallery-lightbox-thumbs img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 980px) {
    .home-hero {
        grid-template-columns: 1fr;
        min-height: 0;
        padding-top: 30px;
    }

    .home-hero h1 {
        font-size: 36px;
    }

    .story-composer-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 620px) {
    .community-composer-head,
    .home-community-head {
        align-items: flex-start;
        display: grid;
    }

    .community-type-tabs {
        width: 100%;
        overflow-x: auto;
    }

    .community-post-head,
    .community-post-actions {
        align-items: flex-start;
    }

    .gallery-lightbox-stage {
        padding: 58px 10px 86px;
    }

    .gallery-lightbox-nav {
        width: 44px;
        height: 44px;
    }

    .gallery-lightbox-nav.prev { left: 10px; }
    .gallery-lightbox-nav.next { right: 10px; }
}

/* Homepage request refinements: games slider edges, horizontal community feed, notification polish */
.home-hero {
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 28px 0 24px;
}

.home-social-panel {
    width: 100%;
    align-self: stretch;
}

.home-community-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.home-community-scroller {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 4px 2px 8px;
    scroll-padding-inline: 2px;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
}

.home-community-scroller .community-post-card {
    width: clamp(280px, 38vw, 430px);
    flex: 0 0 clamp(280px, 38vw, 430px);
    scroll-snap-align: start;
}

.home-community-scroller .community-post-card + .community-post-card {
    margin-top: 0;
}

.home-community-scroller .community-post-text {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
}

.home-community-scroller .community-post-image img {
    max-height: 210px;
}

.home-community-scroller .community-comments {
    min-width: 0;
}

.game-slider-wrap {
    position: relative;
}

.game-slider-wrap .game-slider {
    padding-inline: 54px;
}

.game-slider-edge-controls {
    position: absolute;
    top: calc(50% + 22px);
    left: 8px;
    right: 8px;
    z-index: 5;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    transform: translateY(-50%);
}

.game-slider-edge-controls .icon-btn {
    width: 48px;
    height: 48px;
    color: var(--text);
    background: color-mix(in srgb, var(--bg-card) 88%, transparent);
    border-color: color-mix(in srgb, var(--line) 86%, var(--text));
    box-shadow: 0 14px 32px rgba(0,0,0,.24);
    pointer-events: auto;
}

.game-slider-edge-controls .icon-btn:hover {
    color: #fff;
    background: var(--brand);
    border-color: var(--brand);
}

.notification-trigger span {
    width: auto;
    height: auto;
    color: var(--text);
    background: transparent;
    border-radius: 0;
    font-size: 19px;
    line-height: 1;
}

.notification-head > span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.notification-head button {
    min-height: 30px;
    padding: 0 9px;
    background: var(--bg-card-soft);
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 12px;
}

.notification-head button[data-notification-clear]:hover {
    color: #fff;
    background: var(--danger);
    border-color: var(--danger);
}

button.dropdown-link {
    width: 100%;
    background: transparent;
    font: inherit;
    text-align: left;
    border: 0;
    cursor: pointer;
}

@media (max-width: 760px) {
    .home-community-scroller .community-post-card {
        width: min(86vw, 360px);
        flex-basis: min(86vw, 360px);
    }

    .game-slider-wrap .game-slider {
        padding-inline: 42px;
    }

    .game-slider-edge-controls {
        left: 2px;
        right: 2px;
    }

    .game-slider-edge-controls .icon-btn {
        width: 40px;
        height: 40px;
    }
}

/* Final override: profile pages inherit the active light/dark/system palette. */
.profile-v13,
.profile-page {
    background: var(--bg-main);
    color: var(--text-main);
}

.profile-v13 .profile-cover-hero {
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--bg-main) 8%, transparent), color-mix(in srgb, var(--bg-main) 88%, transparent)),
        linear-gradient(135deg, color-mix(in srgb, var(--color-primary) 62%, var(--bg-card-soft)), var(--bg-card-soft));
    border-color: var(--border-color);
    box-shadow: var(--shadow-soft);
}

.profile-v13 .profile-cover-hero.has-cover {
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--bg-main) 8%, transparent), color-mix(in srgb, var(--bg-main) 78%, transparent)),
        var(--profile-cover-image);
    background-size: cover;
    background-position: center;
}

.profile-v13 .profile-info-card,
.profile-v13 .profile-stats-grid span,
.profile-v13 .profile-tab-list,
.profile-v13 .profile-empty,
.profile-v13 .profile-lock-card,
.profile-v13 .profile-about-grid article {
    color: var(--text-main);
    background: var(--bg-card);
    border-color: var(--border-color);
}

.profile-v13 .profile-title-row h1,
.profile-v13 .profile-stats-grid strong,
.profile-v13 .profile-about-grid h2,
.profile-v13 .profile-summary-list dd,
.profile-v13 .profile-lock-card h1,
.profile-v13 .profile-lock-card h2,
.profile-v13 .profile-empty strong {
    color: var(--text-main);
}

.profile-v13 .profile-title-row p,
.profile-v13 .profile-about-lead,
.profile-v13 .profile-stats-grid span,
.profile-v13 .profile-lock-card p:not(.eyebrow),
.profile-v13 .profile-about-grid article > p:not(.eyebrow),
.profile-v13 .profile-summary-list dt {
    color: var(--text-muted);
}

.profile-v13 .profile-badge,
.profile-v13 .profile-socials a,
.profile-v13 .profile-tab-list button,
.profile-v13 .package-benefits li {
    color: var(--text-main);
    background: var(--bg-card-soft);
    border-color: var(--border-color);
}

.profile-v13 .profile-socials a:hover,
.profile-v13 .profile-tab-list button:hover {
    color: var(--text-main);
    background: var(--bg-card);
    border-color: color-mix(in srgb, var(--text-main) 16%, transparent);
}

.profile-v13 .profile-tab-list button.is-active,
.profile-v13 .profile-badge-creator,
.profile-v13 .profile-badge-admin,
.profile-v13 .profile-avatar-xl,
.profile-v13 .profile-lock-icon {
    color: #ffffff;
}

.profile-v13 .profile-avatar-xl {
    background: linear-gradient(135deg, var(--color-primary), color-mix(in srgb, var(--color-primary) 64%, var(--bg-card-soft)));
    border-color: var(--bg-card);
}

.profile-v13 .profile-info-card .profile-actions .pill:not(.primary):not(.is-active) {
    color: var(--text-main);
    background: var(--bg-card-soft);
    border-color: var(--border-color);
}

.profile-v13 .profile-info-card .profile-actions .pill.is-active {
    color: var(--text-main);
    background: color-mix(in srgb, var(--warning) 18%, var(--bg-card-soft));
    border-color: color-mix(in srgb, var(--warning) 45%, var(--border-color));
}

/* Games hub and container menu */
.games-index-page,
.game-detail-page,
.game-listing-page,
.zl-game-index,
.zl-game {
    padding-block: 28px 48px;
}

.games-grid,
.zl-game-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.game-card,
.zl-game-card,
.zl-game-panel,
.zl-game-list-card {
    color: var(--text-main);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
}

.game-card a,
.zl-game-list-card a {
    color: inherit;
    text-decoration: none;
}

.game-card-media,
.zl-game-card-media,
.zl-game-card-cover {
    aspect-ratio: 16 / 7;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, color-mix(in srgb, var(--color-primary) 72%, #111), #171717);
}

.game-card-media img,
.zl-game-card-media img,
.zl-game-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.game-card-body,
.zl-game-card-body,
.zl-game-panel {
    padding: 18px;
}

.zl-game-card {
    display: grid;
    color: var(--text-main);
    text-decoration: none;
}

.zl-game-card-body {
    display: grid;
    gap: 8px;
}

.zl-game-card-icon,
.zl-brand-card span {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    color: #fff;
    background: var(--color-primary);
    border-radius: 8px;
    font-weight: 800;
}

.zl-game-card-icon img,
.zl-brand-card img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: inherit;
}

.zl-game-card small,
.zl-game-card em,
.zl-brand-card em {
    color: var(--text-muted);
    font-style: normal;
}

.zl-game-hero {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) minmax(260px, 420px);
    gap: 20px;
    align-items: center;
    min-height: 220px;
    margin-bottom: 16px;
    padding: 26px;
    color: var(--text-main);
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--bg-card) 86%, var(--color-primary)), var(--bg-card));
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.zl-game-hero.has-cover::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, color-mix(in srgb, var(--bg-card) 96%, transparent), color-mix(in srgb, var(--bg-card) 64%, transparent)),
        var(--zl-game-cover);
    background-position: center;
    background-size: cover;
    opacity: .5;
}

.zl-game-hero > * {
    position: relative;
    z-index: 1;
}

.zl-game-hero-media {
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    color: #fff;
    background: color-mix(in srgb, var(--color-primary) 86%, #0b0b0b);
    border: 1px solid color-mix(in srgb, var(--color-primary) 42%, var(--border-color));
    border-radius: 8px;
    font-weight: 800;
}

.zl-game-hero-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
}

.zl-game-hero-copy {
    min-width: 0;
}

.zl-game-hero-copy h1 {
    margin: 6px 0 10px;
    font-size: 34px;
    line-height: 1.1;
    letter-spacing: 0;
}

.zl-game-hero-copy p:last-child {
    max-width: 720px;
    margin: 0;
    color: var(--text-muted);
}

.zl-game-stats {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.zl-game-stats span {
    min-height: 68px;
    display: grid;
    align-content: center;
    gap: 3px;
    padding: 12px;
    color: var(--text-muted);
    background: color-mix(in srgb, var(--bg-card-soft) 88%, transparent);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.zl-game-stats b {
    display: block;
    color: var(--text-main);
    font-size: 24px;
    line-height: 1;
}

.zl-game-container-menu {
    margin-bottom: 22px;
    padding: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.zl-game-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: thin;
}

.zl-game-tabs a {
    flex: 0 0 auto;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    color: var(--text-muted);
    background: var(--bg-card-soft);
    border: 1px solid transparent;
    border-radius: 8px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.zl-game-tabs a:hover,
.zl-game-tabs a.is-active {
    color: #fff;
    background: var(--color-primary);
    border-color: color-mix(in srgb, var(--color-primary) 62%, #fff);
}

.zl-game-section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    margin: 22px 0 14px;
}

.zl-game-section-head h2 {
    margin: 0;
    font-size: 22px;
    letter-spacing: 0;
}

.zl-game-overview-grid,
.zl-game-category-tree,
.zl-game-brand-grid,
.zl-brand-grid,
.zl-game-mod-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.zl-game-overview-grid a,
.zl-game-category-tree a,
.zl-brand-card {
    display: grid;
    gap: 8px;
    min-height: 92px;
    padding: 16px;
    color: var(--text-main);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    text-decoration: none;
}

.zl-game-category-tree {
    list-style: none;
    margin: 0;
    padding: 0;
}

.zl-game-category-tree li {
    min-width: 0;
}

.zl-game-category-tree ul {
    margin-top: 10px;
}

.zl-game-overview-grid span,
.zl-game-category-tree small {
    color: var(--text-muted);
}

.zl-brand-card {
    align-content: start;
}

.zl-game-empty {
    padding: 24px;
    color: var(--text-muted);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

/* Footer navigation builder output */
.site-footer {
    padding-bottom: 0;
}

.footer-primary {
    grid-template-columns: minmax(260px, 1.3fr) repeat(auto-fit, minmax(150px, 1fr));
    padding-bottom: 30px;
}

.footer-bottom-wrap {
    border-top: 1px solid color-mix(in srgb, var(--border-color) 76%, transparent);
}

.footer-bottom {
    min-height: 62px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    color: var(--text-muted);
    font-size: 13px;
}

.footer-social-column .social-links {
    margin: 0 0 14px;
}

/* Auth logo fallback */
.auth-logo {
    display: grid;
    justify-items: center;
    gap: 8px;
    margin-bottom: 18px;
    text-align: center;
}

.auth-logo img {
    max-width: 160px;
    width: min(160px, 62vw);
    height: auto;
    object-fit: contain;
}

.auth-logo span {
    color: var(--text-main);
    font-weight: 800;
}

/* Studio dashboard table polish */
.studio-dashboard-summary {
    margin: 18px 0;
}

.studio-summary-table-wrap {
    overflow-x: auto;
}

.studio-summary-table {
    width: 100%;
    min-width: 640px;
    border-collapse: collapse;
}

.studio-summary-table th,
.studio-summary-table td {
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
}

.studio-summary-table th {
    color: var(--text-muted);
    font-size: 12px;
    text-transform: uppercase;
}

.studio-summary-table td {
    color: var(--text-main);
}

@media (max-width: 980px) {
    .zl-game-hero {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .zl-game-stats {
        grid-column: 1 / -1;
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .zl-game-hero {
        grid-template-columns: 1fr;
        padding: 18px;
    }

    .zl-game-hero-media {
        width: 70px;
        height: 70px;
    }

    .zl-game-hero-copy h1 {
        font-size: 28px;
    }

    .zl-game-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .zl-game-section-head,
    .footer-bottom {
        align-items: center;
        display: grid;
        text-align: center;
    }
}/* GLOBAL MOBILE RESPONSIVE FIXES */
html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

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

img,
video,
iframe,
canvas,
svg {
  max-width: 100%;
}

.footer,
.site-footer,
.zx-footer,
.footer a,
.footer p,
.footer li,
.game-detail,
.zl-game-section,
.mod-card,
.category-card {
  overflow-wrap: anywhere;
  word-break: normal;
}

@media (max-width: 768px) {
  .container,
  .site-container,
  .page-container,
  .content-wrap,
  .game-detail,
  .zl-game-page,
  .zl-game-section,
  .game-section {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .site-header,
  .header-inner,
  .menubar,
  .zx-nav,
  .zx-mobile-nav {
    max-width: 100%;
    min-width: 0;
  }

  .zl-game-hero,
  .game-hero,
  .game-detail-hero {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
  }

  .zl-game-stats,
  .game-stats,
  .game-container-stats {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .zl-game-tabs,
  .game-tabs,
  .game-container-menu,
  .zl-game-container-menu .zl-game-tabs {
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
  }

  .mod-grid,
  .zl-mod-grid,
  .game-mod-grid,
  .zl-game-overview-grid {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    grid-template-columns: 1fr;
  }

  .mod-card,
  .zl-mod-card,
  .game-card,
  .category-card {
    max-width: 100%;
    min-width: 0;
  }

  .site-footer,
  .footer,
  .zx-footer {
    width: 100%;
    max-width: 100%;
    overflow: visible;
  }

  .site-footer .container,
  .footer .container,
  .zx-footer .container,
  .footer-inner,
  .footer-grid,
  .footer-columns,
  .footer-primary {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .footer-col,
  .footer-column,
  .footer-widget,
  .footer-logo {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .footer-social,
  .social-links,
  .footer-social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    max-width: 100%;
  }

  .mega-menu,
  .zx-mega,
  .dropdown-menu {
    left: 0;
    right: 0;
    width: 100%;
    max-width: calc(100vw - 24px);
    overflow-x: hidden;
  }

  .site-main,
  .main-content,
  .container,
  .page-container,
  .content-wrap,
  .zl-game-page,
  .zl-game-section,
  .game-detail,
  .game-section,
  .kategori-arsiv-container,
  .site-footer .container,
  .footer .container,
  .zx-footer .container {
    padding-left: 16px;
    padding-right: 16px;
    box-sizing: border-box;
  }
}

@media (max-width: 480px) {
  .zl-game-stats,
  .game-stats,
  .game-container-stats {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 420px) {
  .site-main,
  .main-content,
  .container,
  .page-container,
  .content-wrap,
  .zl-game-page,
  .zl-game-section,
  .game-detail,
  .game-section,
  .kategori-arsiv-container,
  .site-footer .container,
  .footer .container,
  .zx-footer .container {
    padding-left: 12px;
    padding-right: 12px;
  }
}

/* Single Item Layout Fixes */
.game-grid.has-single-item,
.mod-grid.has-single-item,
.music-grid.has-single-item,
.music-horizontal-list.has-single-item,
.grid.has-single-item {
    display: flex;
    flex-direction: column;
    max-width: 300px;
    margin: 0;
}

/* Story Music Spin Animation */
@keyframes spin { 
    100% { transform:rotate(360deg); } 
}

/* ==========================================================================
   ADVANCED STORY CREATOR MODAL (PREMIUM ZALOROX UI)
   ========================================================================== */
.sc-fullscreen-container {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    z-index: 99999; display: flex; flex-direction: column;
    color: #fff; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    overflow: hidden;
}
.sc-backdrop {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: #000;
}
.sc-container {
    position: relative; width: 100%; height: 100%;
    display: flex; flex-direction: column; z-index: 2;
}

/* Initial State */
.sc-initial-state {
    flex: 1; display: flex; align-items: center; justify-content: center; position: relative;
    background: #111;
}
.sc-close-main {
    position: absolute; top: 20px; left: 20px;
    background: rgba(255,255,255,0.1); border: none; color: #fff; cursor: pointer;
    border-radius: 50%; padding: 8px; transition: 0.2s;
}
.sc-close-main:hover { background: rgba(255,255,255,0.2); }
.sc-create-options { display: flex; gap: 40px; align-items: center; }
.sc-create-opt {
    background: transparent; border: none; color: #fff; cursor: pointer;
    display: flex; flex-direction: column; align-items: center; gap: 16px;
    transition: transform 0.2s;
}
.sc-create-opt:hover { transform: scale(1.05); }
.sc-opt-icon {
    width: 80px; height: 80px; border-radius: 50%;
    background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2);
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}
.sc-create-opt:first-child .sc-opt-icon { background: linear-gradient(135deg, #FF0055, #8A2BE2); border: none; }
.sc-create-opt span { font-weight: 600; font-size: 16px; }

/* Editor State */
.sc-editor-state {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
    position: relative; width: 100%;
}
.sc-editor-inner { width: 100%; height: 100%; position: relative; display: flex; flex-direction: column; }
.sc-canvas-wrapper {
    position: relative; width: 100%; max-width: 420px; height: 100%;
    display: flex; flex-direction: column; margin: auto;
    background: #000;
}
@media (min-width: 769px) {
    .sc-canvas-wrapper { height: min(82vh, 760px); aspect-ratio: 9/16; width: auto; max-width: none; border-radius: 16px; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,0.5); }
}
.sc-canvas {
    width: 100%; height: 100%; position: relative;
    background: linear-gradient(135deg, #111, #222);
    overflow: hidden; display: flex; align-items: center; justify-content: center;
}
.sc-media-container { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.sc-media-container img, .sc-media-container video {
    width: 100%; height: 100%; object-fit: contain; pointer-events: none; transition: filter 0.3s;
}
.sc-media-container.is-color-bg { background: linear-gradient(135deg, #FF0055, #8A2BE2); }

/* Toolbars */
.sc-top-toolbar {
    position: absolute; top: 0; left: 0; width: 100%;
    display: flex; justify-content: space-between; align-items: flex-start;
    padding: 20px 16px; z-index: 20;
    background: linear-gradient(to bottom, rgba(0,0,0,0.6), transparent);
}
.sc-bottom-toolbar {
    position: absolute; bottom: 0; left: 0; width: 100%;
    display: flex; justify-content: flex-end; align-items: center;
    padding: 20px 16px; z-index: 20;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
}
.sc-btn-icon {
    background: rgba(0,0,0,0.3); border: none; color: #fff; cursor: pointer;
    width: 40px; height: 40px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    backdrop-filter: blur(10px); transition: 0.2s; font-weight: bold; font-size: 16px;
}
.sc-btn-icon:hover { background: rgba(255,255,255,0.2); transform: scale(1.05); }
.sc-toolbar-tools { display: flex; gap: 12px; }

.sc-share-btn {
    background: #fff; color: #000; border: none;
    padding: 8px 16px 8px 8px; border-radius: 24px; font-weight: 700; font-size: 15px;
    display: flex; align-items: center; gap: 8px; cursor: pointer; transition: 0.2s;
}
.sc-share-btn:hover { transform: scale(1.05); }
.sc-avatar-mini { width: 32px; height: 32px; border-radius: 50%; background: #eee; overflow: hidden; }
.sc-avatar-mini img { width: 100%; height: 100%; object-fit: cover; }

/* Filter Panel Grid */
.sc-filter-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding: 10px;
}
.sc-filter-circle {
    background: none; border: none; color: #fff; cursor: pointer;
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    opacity: 0.7; transition: 0.2s;
}
.sc-filter-circle.is-active { opacity: 1; transform: scale(1.1); }
.sc-filter-circle .circle {
    width: 60px; height: 60px; border-radius: 50%;
    border: 2px solid transparent;
    background-image: url('https://picsum.photos/100/100?random=1'); /* dummy bg for preview */
    background-size: cover;
}
.sc-filter-circle.is-active .circle { border-color: #fff; }
.sc-filter-circle span { font-size: 12px; font-weight: 600; text-shadow: 0 1px 4px rgba(0,0,0,0.8); }
.sc-filter-circle .circle.warm { filter: sepia(0.22) saturate(1.18) brightness(1.04); }
.sc-filter-circle .circle.cool { filter: hue-rotate(8deg) saturate(1.1) contrast(1.04); }
.sc-filter-circle .circle.classic { filter: contrast(1.08) saturate(.9); }
.sc-filter-circle .circle.bright { filter: brightness(1.16) saturate(1.08); }
.sc-filter-circle .circle.contrast { filter: contrast(1.22) saturate(1.08); }
.sc-filter-circle .circle.bw { filter: grayscale(1) contrast(1.08); }
.sc-filter-circle .circle.matte { filter: contrast(.92) brightness(1.06) saturate(.9); }
.sc-filter-circle .circle.cinematic { filter: contrast(1.16) saturate(1.2) brightness(.95); }
.sc-filter-circle .circle.deep { filter: contrast(1.28) brightness(.9) saturate(1.18); }

/* Global media filter classes */
.sc-filter-warm { filter: sepia(0.22) saturate(1.18) brightness(1.04); }
.sc-filter-cool { filter: hue-rotate(8deg) saturate(1.1) contrast(1.04); }
.sc-filter-classic { filter: contrast(1.08) saturate(.9); }
.sc-filter-bright { filter: brightness(1.16) saturate(1.08); }
.sc-filter-contrast { filter: contrast(1.22) saturate(1.08); }
.sc-filter-bw { filter: grayscale(1) contrast(1.08); }
.sc-filter-matte { filter: contrast(.92) brightness(1.06) saturate(.9); }
.sc-filter-cinematic { filter: contrast(1.16) saturate(1.2) brightness(.95); }
.sc-filter-deep { filter: contrast(1.28) brightness(.9) saturate(1.18); }

/* Text Editor Overlay */
.sc-text-editor-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.75); z-index: 50; display: flex; flex-direction: column;
}
.sc-text-editor-top {
    display: flex; justify-content: space-between; align-items: center; padding: 20px;
}
.sc-btn-text { background: none; border: none; color: #fff; font-size: 16px; font-weight: 700; cursor: pointer; text-shadow: 0 1px 4px rgba(0,0,0,0.5); }
.sc-text-tools { display: flex; gap: 12px; }

.sc-text-editor-middle {
    flex: 1; display: flex; align-items: center; justify-content: center; position: relative;
}
.sc-text-size-slider {
    position: absolute; left: 20px; height: 60%; display: flex; align-items: center;
}
.sc-text-size-slider input[type=range] {
    -webkit-appearance: none; appearance: none; width: 4px; height: 100%; background: rgba(255,255,255,0.3); border-radius: 2px; outline: none; cursor: pointer;
}
.sc-text-size-slider input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none; width: 20px; height: 20px; border-radius: 50%; background: #fff; cursor: pointer; box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.sc-text-input-wrapper {
    width: 80%; text-align: center;
}
#sc-text-input {
    min-width: 10px; min-height: 40px; outline: none; word-wrap: break-word; white-space: pre-wrap;
    font-size: 32px; font-weight: 700; color: #fff; transition: 0.2s;
}
#sc-text-input:empty:before { content: attr(data-placeholder); color: rgba(255,255,255,0.5); }

/* Font Styles */
.sc-font-modern { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; font-weight: 700; }
.sc-font-classic { font-family: "Georgia", serif; font-weight: 600; }
.sc-font-signature { font-family: "Brush Script MT", cursive; font-weight: 400; font-style: italic; }

.sc-text-quick-stickers {
    padding: 12px; display: flex; gap: 12px; justify-content: center;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
}
.sc-text-quick-stickers button {
    background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2); color: #fff;
    padding: 8px 16px; border-radius: 20px; font-weight: 600; cursor: pointer; backdrop-filter: blur(10px);
}

/* Panels Wrapper (Bottom Sheets) */
.sc-panels-wrapper {
    position: absolute; bottom: 0; left: 0; width: 100%; height: 100%; z-index: 30;
    display: flex; flex-direction: column; justify-content: flex-end;
}
.sc-panel-backdrop {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5); backdrop-filter: blur(2px);
}
.sc-panel-container {
    position: relative; width: 100%; max-width: 420px; margin: 0 auto;
    background: rgba(25, 25, 25, 0.98); backdrop-filter: blur(20px);
    border-radius: 24px 24px 0 0; display: flex; flex-direction: column;
    max-height: 85vh; min-height: 50vh; box-shadow: 0 -10px 40px rgba(0,0,0,0.5);
    animation: slideUp 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.sc-panel-handle {
    width: 40px; height: 4px; background: rgba(255,255,255,0.3);
    border-radius: 2px; margin: 12px auto; cursor: pointer;
}
.sc-panel-header {
    display: flex; justify-content: space-between; align-items: center; padding: 16px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.sc-panel-header h4 { margin: 0; font-size: 16px; font-weight: 600; text-align: center; flex: 1; }
.sc-panel-content { padding: 20px; overflow-y: auto; flex: 1; }

/* Stickers Panel */
.sc-search-bar { display: flex; align-items: center; gap: 12px; background: rgba(255,255,255,0.1); border-radius: 12px; padding: 10px 16px; margin-bottom: 20px; }
.sc-search-bar input { background: transparent; border: none; color: #fff; outline: none; width: 100%; font-size: 15px; }
.sc-sticker-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.sc-sticker-card {
    background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); border-radius: 16px; padding: 16px 8px;
    display: flex; flex-direction: column; align-items: center; gap: 12px; color: #fff; cursor: pointer; transition: 0.2s;
}
.sc-sticker-card:hover { transform: scale(1.05); background: rgba(255,255,255,0.15); }
.sc-sticker-card .sc-icon { font-size: 28px; }
.sc-sticker-card .sc-brand-z { font-weight: 900; font-family: sans-serif; color: #FF0055; }
.sc-sticker-card .sc-text { font-size: 12px; font-weight: 700; letter-spacing: 0.5px; }
.sc-gradient-text { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.sc-rainbow-text { background: linear-gradient(to right, #ff0000, #ff7f00, #ffff00, #00ff00, #0000ff, #4b0082, #8b00ff); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

/* Music Picker Panel */
.sc-music-tabs { display: flex; gap: 16px; margin-bottom: 16px; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 12px; }
.sc-music-tabs button { background: none; border: none; color: #aaa; font-weight: 600; font-size: 14px; cursor: pointer; padding: 0; transition: 0.2s; }
.sc-music-tabs button.active { color: #fff; }
.sc-music-list { display: flex; flex-direction: column; gap: 8px; }
.sc-music-item {
    display: flex; align-items: center; gap: 12px; padding: 12px; background: rgba(255,255,255,0.05);
    border-radius: 12px; cursor: pointer; transition: 0.2s;
}
.sc-music-item:hover { background: rgba(255,255,255,0.1); }
.sc-music-item img { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; }
.sc-music-info { flex: 1; overflow: hidden; }
.sc-music-info .title { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-music-info .artist { font-size: 13px; color: #aaa; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
[data-story-music-list] {
    display: grid;
    gap: 10px;
    max-height: 360px;
    overflow-y: auto;
}
.story-music-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 64px;
    padding: 10px 12px;
    color: #fff;
    background: rgba(255,255,255,0.05);
    border: 0;
    border-radius: 10px;
    opacity: 1;
    visibility: visible;
    cursor: pointer;
    text-align: left;
}
.story-music-item:hover { background: rgba(255,255,255,0.1); }
.story-music-item img { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; background: rgba(255,255,255,0.08); flex: 0 0 auto; }
.story-music-meta { display: grid; gap: 3px; min-width: 0; flex: 1; }
.story-music-meta strong,
.story-music-meta small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.story-music-meta strong { font-size: 15px; font-weight: 700; }
.story-music-meta small { color: #aaa; font-size: 12px; }
.story-music-pick { color: #60a5fa; font-size: 13px; font-weight: 700; flex: 0 0 auto; }

/* Link & Music Edit Panels */
.sc-input-group { margin-bottom: 20px; }
.sc-input {
    width: 100%; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2);
    color: #fff; padding: 14px; border-radius: 12px; font-size: 15px; outline: none;
}
.sc-input:focus { border-color: #3b82f6; }
.sc-input-label { display: block; margin-bottom: 6px; font-size: 13px; color: rgba(255,255,255,0.7); font-weight: 500; }
.sc-music-preview-box { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; margin-bottom: 24px; }
.sc-music-preview-box img { width: 120px; height: 120px; border-radius: 12px; object-fit: cover; box-shadow: 0 8px 24px rgba(0,0,0,0.5); }
.sc-music-preview-box h5 { margin: 0; font-size: 18px; font-weight: 700; }
.sc-music-preview-box p { margin: 0; font-size: 14px; color: #aaa; }
.sc-slider-wrapper { background: rgba(255,255,255,0.05); padding: 20px; border-radius: 16px; }
.sc-slider-labels { display: flex; justify-content: space-between; margin-bottom: 12px; align-items: center; }
.sc-time-badge { background: #3b82f6; color: #fff; padding: 4px 8px; border-radius: 6px; font-size: 12px; font-weight: 700; }
.sc-styled-slider { width: 100%; accent-color: #3b82f6; }
.sc-video-trim-content { display: grid; gap: 16px; }
.sc-video-trim-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; color: #ddd; font-size: 13px; }
.sc-video-trim-summary span { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1); border-radius: 10px; padding: 10px; }
.sc-video-trim-summary strong { display: block; margin-top: 4px; color: #fff; font-size: 15px; }
.sc-video-duration-buttons { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.sc-video-duration-buttons button,
.sc-video-preview-btn {
    min-height: 42px; border: 1px solid rgba(255,255,255,0.15); border-radius: 10px;
    background: rgba(255,255,255,0.08); color: #fff; cursor: pointer; font-weight: 700;
}
.sc-video-duration-buttons button.is-active { background: #3b82f6; border-color: #3b82f6; }
.sc-video-duration-buttons button:disabled { opacity: .4; cursor: not-allowed; }
.sc-video-preview-btn { width: 100%; background: rgba(59,130,246,.22); }

/* Overlays (Canvas Items) */
.sc-overlays { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 10; pointer-events: none; }
.sc-overlay-item {
    position: absolute; pointer-events: auto; user-select: none; touch-action: none; will-change: transform;
    transform-origin: center center; display: flex; align-items: center; justify-content: center;
}
.sc-overlay-item[data-interactive="true"] { cursor: grab; }
.sc-overlay-item[data-interactive="true"]:active { cursor: grabbing; }

/* Rendered Custom Stickers */
.sc-sticker-text { white-space: pre-wrap; text-align: center; text-shadow: 0 1px 4px rgba(0,0,0,0.5); }
.sc-sticker-text.style-outline { -webkit-text-stroke: 1px #000; text-shadow: none; }
.sc-sticker-text.style-bg { background: #fff; color: #000; padding: 4px 12px; border-radius: 8px; text-shadow: none; }

.sc-rendered-link, .sc-rendered-poll, .sc-rendered-location, .sc-rendered-question {
    background: rgba(255, 255, 255, 0.95); color: #000; padding: 12px 24px; border-radius: 30px;
    font-weight: 700; font-size: 16px; box-shadow: 0 8px 24px rgba(0,0,0,0.3); display: flex; align-items: center; gap: 8px;
    white-space: nowrap;
}
.sc-location-sticker-card {
    max-width: min(78vw, 320px);
    min-height: 42px;
    padding: 10px 15px;
    border-radius: 999px;
    color: #fff;
    background: rgba(15, 18, 28, 0.72);
    border: 1px solid rgba(255,255,255,0.22);
    box-shadow: 0 12px 34px rgba(0,0,0,0.35);
    backdrop-filter: blur(14px);
    text-shadow: none;
    overflow: hidden;
}
.sc-location-sticker-card span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.sc-location-pin {
    flex: 0 0 auto;
}
.sc-location-style-light {
    color: #111827;
    background: rgba(255,255,255,0.96);
    border-color: rgba(255,255,255,0.86);
}
.sc-location-style-dark {
    color: #fff;
    background: rgba(7, 10, 18, 0.9);
    border-color: rgba(255,255,255,0.16);
}
.sc-location-style-brand {
    color: #fff;
    background: linear-gradient(135deg, #ff0055, #6d5dfc);
    border-color: rgba(255,255,255,0.24);
}
.sc-location-style-glass {
    color: #fff;
    background: rgba(255,255,255,0.13);
    border-color: rgba(255,255,255,0.24);
}
.sc-rendered-poll { flex-direction: column; border-radius: 16px; padding: 16px; min-width: 200px; gap: 12px; }
.sc-poll-question { font-size: 18px; text-align: center; }
.sc-poll-options { display: flex; width: 100%; gap: 8px; }
.sc-poll-option { flex: 1; background: #f0f0f0; border-radius: 8px; padding: 10px; text-align: center; color: #333; font-weight: 700; }

.sc-rendered-music {
    background: rgba(20, 20, 20, 0.85); backdrop-filter: blur(15px); color: #fff;
    padding: 12px 20px; border-radius: 16px; display: flex; align-items: center; gap: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4); border: 1px solid rgba(255,255,255,0.1);
}
.sc-rendered-music img { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; }
.sc-rendered-music .music-info { display: flex; flex-direction: column; }
.sc-rendered-music .music-title { font-weight: 700; font-size: 14px; margin-bottom: 2px; }
.sc-rendered-music .music-artist { font-size: 12px; color: #aaa; }
.sc-rendered-music .music-icon { font-size: 18px; margin-left: 8px; animation: scPulse 2s infinite; }
.story-music-sticker { color: inherit; text-decoration: none; display: inline-flex; }
@keyframes scPulse { 0% { transform: scale(1); } 50% { transform: scale(1.1); } 100% { transform: scale(1); } }

/* Story Tray */
.story-strip-scroller::-webkit-scrollbar { display: none; }
.story-bubble.has-new-story .story-ring {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    padding: 3px;
}
.story-bubble.has-new-story .story-ring img {
    border: 2px solid #111;
}
.story-bubble.is-seen .story-ring {
    background: #444;
    padding: 2px;
}
.story-bubble.is-seen .story-ring img {
    border: 2px solid #111;
}
.story-bubble.story-create-bubble .story-ring {
    background: rgba(255, 255, 255, 0.1);
}

/* Story Viewer Overrides for Fullscreen 9:16 mobile approach */
.story-viewer-panel {
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    max-width: 450px;
    height: 100vh;
    max-height: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
}
@media (max-width: 480px) {
    .story-viewer-panel {
        border-radius: 0;
        max-height: 100vh;
    }
}
.story-viewer-media {
    flex: 1;
    position: relative;
    isolation: isolate;
}
.story-viewer-media::before,
.story-viewer-media::after {
    content: none !important;
    display: none !important;
}
.story-viewer-media img,
.story-viewer-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 1 !important;
    mix-blend-mode: normal !important;
    position: relative;
    z-index: 1;
}
.story-viewer-media img:not([class*="sc-filter-"]),
.story-viewer-media video:not([class*="sc-filter-"]),
.story-viewer-media .story-media:not([class*="sc-filter-"]) {
    filter: none !important;
}

/* Viewer Sheet */
.story-viewers-sheet {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: #1c1c1e;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    z-index: 20;
    display: flex;
    flex-direction: column;
    max-height: 70vh;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.5);
    animation: sheetSlideUp 0.3s ease;
}
@keyframes sheetSlideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}
.story-viewers-sheet-head {
    display: flex; justify-content: space-between; align-items: center; padding: 16px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.story-viewers-sheet-list {
    overflow-y: auto;
    padding: 10px 0;
}
.story-viewers-sheet-list .viewer-item {
    display: flex; align-items: center; gap: 12px; padding: 10px 20px;
    color: inherit;
    text-decoration: none;
}
.story-viewers-sheet-list .viewer-item img {
    width: 40px; height: 40px; border-radius: 50%; object-fit: cover;
}

/* Bottom Bar */
.story-viewer-bottom-bar {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 16px;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    z-index: 10;
    display: flex; gap: 12px;
}
.story-viewer-bottom-bar input {
    flex: 1; background: rgba(255,255,255,0.2); border: 1px solid rgba(255,255,255,0.4);
    border-radius: 24px; padding: 10px 16px; color: white; outline: none;
}
.story-viewer-bottom-bar input::placeholder { color: rgba(255,255,255,0.7); }
.story-owner-stats {
    display: flex; align-items: center; justify-content: center; gap: 6px;
    background: rgba(255,255,255,0.2); padding: 8px 16px; border: 0; border-radius: 20px; cursor: pointer; color: #fff; flex: 1;
}
.story-mention-sticker {
    display: inline-flex;
    color: inherit;
    text-decoration: none;
}

.story-reply-form {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.story-reply-send {
    min-height: 42px;
    border: 0;
    border-radius: 22px;
    padding: 0 16px;
    background: #fff;
    color: #111;
    font-weight: 700;
    cursor: pointer;
}

.story-reply-send:disabled,
.story-reply-input:disabled {
    opacity: 0.65;
}

.story-reply-input {
    flex: 1;
    min-height: 42px;
    background: rgba(255,255,255,0.18);
    border: 1px solid rgba(255,255,255,0.35);
    border-radius: 24px;
    padding: 0 16px;
    color: #fff;
    outline: none;
    font-size: 15px;
}
.story-reply-input::placeholder {
    color: rgba(255,255,255,0.65);
}
.story-reply-input:focus {
    border-color: rgba(255,255,255,0.6);
    background: rgba(255,255,255,0.25);
}

.story-location-sticker {
    text-decoration: none;
    color: inherit;
    display: inline-flex;
    max-width: 100%;
}
.story-location-sticker:hover .sc-rendered-location {
    opacity: 0.85;
}

.story-media-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000;
}

.sc-location-panel {
    display: grid;
    gap: 12px;
    padding-top: 16px;
}

.sc-location-search-wrap {
    min-height: 52px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
    color: rgba(255,255,255,0.74);
    background: rgba(255,255,255,0.09);
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 16px;
}

.sc-location-search-wrap:focus-within {
    border-color: rgba(255,255,255,0.38);
    background: rgba(255,255,255,0.13);
}

.sc-location-search-wrap input {
    width: 100%;
    min-width: 0;
    color: #fff;
    background: transparent;
    border: 0;
    outline: 0;
    font-size: 15px;
}

.sc-location-search-wrap input::placeholder {
    color: rgba(255,255,255,0.45);
}

.sc-location-manual,
.sc-location-result,
.sc-location-delete {
    width: 100%;
    border: 0;
    cursor: pointer;
    font: inherit;
}

.sc-location-manual {
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    color: #fff;
    background: rgba(255, 0, 85, 0.18);
    border: 1px solid rgba(255, 0, 85, 0.36);
    border-radius: 16px;
    text-align: left;
}

.sc-location-manual span,
.sc-location-result-copy {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.sc-location-manual small,
.sc-location-result small,
.sc-location-section-title,
.sc-location-empty {
    color: rgba(255,255,255,0.62);
    font-size: 12px;
}

.sc-location-manual strong,
.sc-location-result strong {
    color: #fff;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sc-location-results {
    display: grid;
    gap: 8px;
    max-height: 230px;
    overflow-y: auto;
}

.sc-location-result {
    min-height: 58px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    color: #fff;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    text-align: left;
}

.sc-location-result:hover,
.sc-location-manual:hover {
    background: rgba(255,255,255,0.13);
}

.sc-location-result-pin {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    color: #fff;
    background: rgba(255,255,255,0.1);
    border-radius: 999px;
}

.sc-location-style-section {
    display: grid;
    gap: 8px;
    padding-top: 4px;
}

.sc-location-style-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.sc-location-style-grid button {
    min-height: 38px;
    color: rgba(255,255,255,0.72);
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 12px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
}

.sc-location-style-grid button.is-active {
    color: #fff;
    background: rgba(255, 0, 85, 0.28);
    border-color: rgba(255, 0, 85, 0.56);
}

.sc-location-delete {
    min-height: 42px;
    color: #fff;
    background: rgba(239,68,68,0.16);
    border: 1px solid rgba(239,68,68,0.34);
    border-radius: 14px;
    font-weight: 700;
}

.sc-location-empty {
    padding: 10px 4px;
}

@media (max-width: 420px) {
    .sc-location-style-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sc-location-sticker-card {
        max-width: min(84vw, 300px);
        font-size: 14px;
    }
}

.story-location-page {
    width: min(1120px, calc(100% - 32px));
    margin: 32px auto 56px;
    color: var(--text-primary, #fff);
}

.story-location-head {
    display: grid;
    gap: 16px;
    margin-bottom: 18px;
}

.story-location-head h1 {
    margin: 0;
    font-size: clamp(28px, 4vw, 46px);
}

.story-location-head p {
    margin: 6px 0 0;
    color: var(--text-muted, rgba(255,255,255,0.68));
}

.story-location-search {
    display: flex;
    gap: 8px;
    max-width: 520px;
}

.story-location-search input {
    flex: 1;
    min-height: 44px;
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 8px;
    padding: 0 14px;
    background: rgba(255,255,255,0.08);
    color: inherit;
}

.story-location-search button {
    min-height: 44px;
    border: 0;
    border-radius: 8px;
    padding: 0 18px;
    background: #ff0055;
    color: #fff;
    font-weight: 700;
}

.story-location-map-wrap {
    position: relative;
    min-height: 420px;
    border-radius: 8px;
    overflow: hidden;
    background: #142025;
    border: 1px solid rgba(255,255,255,0.1);
}

.story-location-map {
    width: 100%;
    height: 420px;
    min-height: 420px;
}

.story-location-marker-card {
    position: absolute;
    left: 18px;
    bottom: 18px;
    z-index: 402;
    display: grid;
    gap: 3px;
    padding: 12px 14px;
    border-radius: 8px;
    background: rgba(0,0,0,0.76);
    color: #fff;
    backdrop-filter: blur(10px);
}

.story-location-marker-card span {
    color: rgba(255,255,255,0.72);
    font-size: 13px;
}

.story-location-stories {
    margin-top: 24px;
}

.story-location-stories h2 {
    margin: 0 0 14px;
    font-size: 20px;
}

.story-location-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

.story-location-user {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 8px;
    padding: 12px;
    background: rgba(255,255,255,0.06);
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.story-location-avatar {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff0055, #1e018f);
    overflow: hidden;
    flex: 0 0 48px;
}

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

.story-location-user strong,
.story-location-user small {
    display: block;
}

.story-location-user small,
.story-location-empty {
    color: var(--text-muted, rgba(255,255,255,0.68));
}

@media (max-width: 640px) {
    .story-viewer-bottom-bar {
        padding: 12px 12px calc(12px + env(safe-area-inset-bottom));
    }

    .story-reply-send {
        padding: 0 13px;
    }

    .story-location-page {
        width: min(100% - 20px, 1120px);
        margin-top: 18px;
    }

    .story-location-search {
        max-width: none;
    }

    .story-location-map,
    .story-location-map-wrap {
        min-height: 340px;
        height: 340px;
    }
    }
}

/* Ensure inactive story viewers are fully hidden to prevent map overlap issues */
[data-story-viewer][hidden],
.story-viewer[hidden],
.story-viewer-overlay:not(.is-active):not(.active):not(.open) {
    display: none !important;
    pointer-events: none !important;
}

.story-viewer-media img,
.story-viewer-media video,
.story-media,
.story-media-image,
.story-media-video {
    opacity: 1 !important;
    filter: none !important;
    mix-blend-mode: normal !important;
    visibility: visible !important;
}

/* Story viewer backdrop must darken the page, not the story media. */
.story-viewer {
    position: fixed;
    inset: 0;
    z-index: 99990;
    display: none;
    align-items: center;
    justify-content: center;
    isolation: isolate;
}

.story-viewer:not([hidden]),
.story-viewer.is-active,
.story-viewer.active,
.story-viewer.open {
    display: flex !important;
}

.story-viewer-backdrop {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    pointer-events: auto;
}

.story-viewer-panel {
    position: relative;
    z-index: 2;
    isolation: isolate;
}

.story-viewer-media {
    position: relative;
    z-index: 1;
    background: transparent;
}

.story-viewer-media img,
.story-viewer-media video,
.story-media,
.story-media-image,
.story-media-video {
    opacity: 1 !important;
    filter: none !important;
    mix-blend-mode: normal !important;
    visibility: visible !important;
}

.story-viewer-meta,
.story-viewer-caption,
.story-viewer-music {
    position: relative;
    z-index: 5;
}

.story-viewer-actions,
.story-viewer-nav,
.story-viewer-bottom-bar,
.story-viewers-sheet {
    z-index: 5;
}

/* Admin-controlled, non-overlay AdSense placements. */
.zl-ad-slot {
    width: min(100% - 24px, 1120px);
    margin: 24px auto;
    padding: 10px 12px 12px;
    overflow: hidden;
    background: rgba(255, 255, 255, .018);
    border: 1px solid rgba(255, 255, 255, .07);
    border-radius: 14px;
}

.zl-ad-label {
    display: block;
    margin-bottom: 7px;
    color: var(--muted, #8f9a93);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-align: center;
    text-transform: uppercase;
}

.zl-ad-unit {
    width: 100%;
    max-width: 100%;
}

@media (max-width: 768px) {
    .zl-ad-slot {
        width: min(100% - 16px, 1120px);
        margin-block: 18px;
        padding-inline: 8px;
    }

    .zl-ad-slot[data-device="desktop"] {
        display: none !important;
    }
}

@media (min-width: 769px) {
    .zl-ad-slot[data-device="mobile"] {
        display: none !important;
    }
}
