:root {
    color-scheme: dark;
    --bg: #05080f;
    --bg-soft: #090d15;
    --panel: #0d131f;
    --panel-2: #101725;
    --line: #1f2735;
    --line-soft: #151c28;
    --text: #f7f8fb;
    --muted: #a8afbd;
    --muted-2: #778091;
    --pink: #ff2ba6;
    --pink-2: #bd32ff;
    --orange: #ff6537;
    --yellow: #ffc533;
    --green: #2fda77;
    --red: #ff4a70;
    --radius: 8px;
    --shadow: 0 22px 70px rgba(0, 0, 0, .42);
    --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
    letter-spacing: 0;
}

html {
    min-height: 100%;
    background: var(--bg);
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    font-family: var(--font);
    background:
        radial-gradient(circle at top left, rgba(255, 43, 166, .09), transparent 26rem),
        linear-gradient(180deg, #05070d 0%, #070a11 45%, #05080f 100%);
}

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

button,
input,
select,
textarea {
    font: inherit;
}

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

.site-body {
    overflow-x: hidden;
}

.app-shell {
    display: grid;
    grid-template-columns: 238px minmax(0, 1fr);
    gap: 18px;
    min-height: 100vh;
    padding: 14px 16px 28px;
}

.sidebar {
    position: sticky;
    top: 14px;
    align-self: start;
    height: calc(100vh - 28px);
    display: flex;
    flex-direction: column;
    gap: 14px;
}

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

.brand-mark {
    position: relative;
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    overflow: hidden;
    border-radius: 8px;
    background: linear-gradient(135deg, #ff2ba6 0%, #bd32ff 48%, #ff6537 100%);
    box-shadow: 0 10px 28px rgba(255, 43, 166, .34);
}

.brand-mark::before {
    content: "D";
    position: absolute;
    inset: 5px 8px 5px 5px;
    display: grid;
    place-items: center;
    border-radius: 6px 14px 14px 6px;
    background: #060810;
    color: #ff2ba6;
    font-weight: 900;
    font-size: 24px;
    line-height: 1;
}

.brand-mark span {
    position: absolute;
    right: 6px;
    width: 14px;
    height: 14px;
    border-radius: 999px;
    background: #ff6537;
}

.brand-text {
    font-size: 27px;
    line-height: 1;
    font-weight: 900;
}

.brand-text span {
    color: var(--pink);
}

.side-nav,
.score-card,
.showcase,
.panel,
.poll-card,
.post-list,
.admin-card,
.installer-card {
    border: 1px solid var(--line-soft);
    background: linear-gradient(180deg, rgba(17, 24, 37, .92), rgba(10, 15, 24, .94));
    box-shadow: var(--shadow);
    border-radius: var(--radius);
}

.side-nav {
    flex: 1;
    overflow: auto;
    padding: 18px 0;
}

.side-group {
    padding: 0 14px 18px;
}

.side-show-list {
    display: grid;
    gap: 2px;
}

.side-group + .side-group {
    border-top: 1px solid var(--line);
    padding-top: 16px;
}

.side-group p {
    margin: 0 8px 12px;
    color: var(--muted-2);
    font-size: 12px;
    font-weight: 800;
}

.side-group a {
    position: relative;
    display: flex;
    align-items: center;
    gap: 13px;
    min-height: 38px;
    padding: 9px 11px;
    border-radius: 6px;
    color: #c6ccd8;
    font-weight: 700;
    transition: background .18s ease, color .18s ease, transform .18s ease;
}

.side-group a img {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    border-radius: 6px;
    object-fit: cover;
}

.side-group a svg,
.tabbar svg,
.panel-head svg,
.post-stats svg,
.rating svg,
.detail-btn svg,
.icon-btn svg {
    width: 18px;
    height: 18px;
    stroke-width: 2.2;
}

.side-group a.is-active,
.side-group a:hover {
    color: var(--pink);
    background: rgba(255, 43, 166, .08);
}

.side-group a.is-active::before {
    content: "";
    position: absolute;
    left: -14px;
    top: 8px;
    bottom: 8px;
    width: 3px;
    border-radius: 3px;
    background: linear-gradient(180deg, var(--pink), var(--pink-2));
}

.score-card {
    padding: 20px;
}

.score-card > div:first-of-type {
    display: inline-grid;
}

.score-card {
    display: grid;
    grid-template-columns: 52px 1fr;
    gap: 12px;
}

.score-icon {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 8px;
    background: rgba(255, 197, 51, .12);
    font-size: 30px;
}

.score-card span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.score-card strong {
    display: block;
    margin-top: 4px;
    color: var(--pink);
    font-size: 27px;
    line-height: 1;
}

.score-meta {
    grid-column: 1 / -1;
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
}

.progress {
    grid-column: 1 / -1;
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: #242b37;
}

.progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--pink-2), var(--pink), #ff5c61);
}

.main-area {
    min-width: 0;
}

.topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    margin-bottom: 22px;
}

.topbar-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.topbar-spacer {
    min-width: 1px;
}

.mobile-menu {
    display: none;
}

.search-wrap {
    position: relative;
    min-width: 47px;
    display: flex;
    justify-content: flex-end;
}

.search-toggle {
    position: relative;
    z-index: 2;
}

.search-wrap input {
    width: 0;
    height: 47px;
    border: 1px solid #232c3b;
    border-radius: var(--radius);
    outline: 0;
    color: var(--text);
    background: rgba(11, 16, 25, .86);
    padding: 0;
    opacity: 0;
    font-weight: 700;
    pointer-events: none;
    transition: width .22s ease, opacity .16s ease, padding .22s ease;
}

.search-wrap.is-open input,
.search-wrap:focus-within input {
    width: min(360px, 40vw);
    opacity: 1;
    padding: 0 14px;
    margin-left: 8px;
    pointer-events: auto;
}

.search-wrap input:focus {
    border-color: rgba(255, 43, 166, .72);
    box-shadow: 0 0 0 3px rgba(255, 43, 166, .12);
}

.search-results {
    position: absolute;
    z-index: 30;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #0c121d;
    box-shadow: var(--shadow);
}

.search-wrap:not(.is-open):not(:focus-within) .search-results {
    display: none;
}

.search-result {
    display: grid;
    grid-template-columns: 48px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 8px;
    border-radius: 6px;
}

.search-result:hover {
    background: rgba(255, 255, 255, .05);
}

.search-result img {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    object-fit: cover;
}

.search-result strong {
    display: block;
    font-size: 14px;
}

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

.btn,
.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 45px;
    border: 1px solid transparent;
    border-radius: var(--radius);
    color: var(--text);
    cursor: pointer;
    font-weight: 800;
    transition: transform .18s ease, border-color .18s ease, background .18s ease, opacity .18s ease;
}

.btn:hover,
.icon-btn:hover {
    transform: translateY(-1px);
}

.btn {
    padding: 0 24px;
}

.auth-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    min-width: max-content;
}

.auth-icon.has-badge {
    position: relative;
}

.auth-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 19px;
    height: 19px;
    padding: 0 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #080c13;
    border-radius: 999px;
    color: #fff;
    background: var(--red);
    font-size: 10px;
    line-height: 1;
    font-weight: 900;
}

.auth-icon.is-primary {
    border-color: rgba(255, 255, 255, .12);
    background: linear-gradient(135deg, var(--pink), var(--pink-2) 52%, var(--orange));
    box-shadow: 0 12px 28px rgba(255, 43, 166, .22);
}

.auth-text-btn svg {
    width: 18px;
    height: 18px;
}

.btn-primary {
    border-color: rgba(255, 255, 255, .12);
    background: linear-gradient(135deg, var(--pink), var(--pink-2) 52%, var(--orange));
    box-shadow: 0 12px 28px rgba(255, 43, 166, .22);
}

.btn-ghost {
    border-color: #242d3d;
    background: rgba(10, 15, 24, .72);
}

.btn-outline {
    border-color: rgba(255, 43, 166, .85);
    color: #ff4bb4;
    background: rgba(255, 43, 166, .05);
}

.btn-danger {
    border-color: rgba(255, 74, 112, .55);
    color: #fff;
    background: rgba(255, 74, 112, .16);
}

.icon-btn {
    width: 47px;
    padding: 0;
    border-color: #1d2635;
    background: rgba(13, 18, 29, .78);
}

.showcase {
    overflow: hidden;
}

.tabbar {
    display: flex;
    align-items: center;
    gap: 18px;
    min-height: 57px;
    overflow-x: auto;
    padding: 0 32px;
    border-bottom: 1px solid var(--line);
}

.tabbar button {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: max-content;
    height: 57px;
    border: 0;
    color: #c8cfdb;
    background: transparent;
    cursor: pointer;
    font-weight: 800;
}

.tabbar button.is-active {
    color: var(--pink);
}

.tabbar button.is-active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--pink), var(--orange));
}

.hero-carousel {
    position: relative;
    padding: 20px 18px 34px;
}

.hero-track {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(272px, 1fr);
    gap: 12px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
}

.hero-track::-webkit-scrollbar {
    display: none;
}

.show-card {
    position: relative;
    min-height: 374px;
    overflow: hidden;
    border: 1px solid #252d3a;
    border-radius: var(--radius);
    background: #0a0e15;
}

.show-card img {
    width: 100%;
    height: 100%;
    min-height: 374px;
    object-fit: cover;
}

.show-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, .04) 34%, rgba(3, 7, 12, .72) 72%, rgba(3, 7, 12, .96) 100%);
}

.badge {
    position: absolute;
    top: 11px;
    left: 11px;
    padding: 8px 10px;
    border-radius: 5px;
    color: #fff;
    background: linear-gradient(135deg, var(--pink), var(--orange));
    font-size: 11px;
    font-weight: 900;
}

.show-card:nth-child(2) .badge {
    background: linear-gradient(135deg, #7049ff, #3368ff);
}

.show-card-body {
    position: absolute;
    left: 15px;
    right: 15px;
    bottom: 13px;
}

.show-card-body h2 {
    margin: 0 0 5px;
    font-size: 22px;
    line-height: 1.1;
}

.show-card-body p {
    margin: 0 0 14px;
    color: var(--muted);
    font-weight: 650;
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.rating,
.detail-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 800;
}

.rating svg {
    fill: var(--yellow);
    stroke: var(--yellow);
}

.detail-btn {
    min-height: 34px;
    padding: 0 13px;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 6px;
    background: rgba(12, 17, 26, .62);
}

.carousel-nav {
    position: absolute;
    z-index: 2;
    top: 48%;
    display: grid;
    place-items: center;
    width: 50px;
    height: 50px;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 999px;
    color: #fff;
    background: rgba(25, 31, 44, .8);
    cursor: pointer;
    transform: translateY(-50%);
}

.carousel-nav svg {
    width: 26px;
    height: 26px;
}

.carousel-nav.prev {
    left: 10px;
}

.carousel-nav.next {
    right: 10px;
}

.slider-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    display: flex;
    gap: 9px;
    transform: translateX(-50%);
}

.slider-dots span {
    width: 14px;
    height: 5px;
    border-radius: 999px;
    background: #303746;
}

.slider-dots span.is-active {
    background: var(--pink);
}

.content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 430px;
    gap: 24px;
    margin-top: 40px;
}

.feed-column,
.right-column {
    min-width: 0;
}

.feed-column {
    display: grid;
    gap: 10px;
}

.right-column {
    display: grid;
    align-content: start;
    gap: 14px;
}

.poll-card {
    position: relative;
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr) auto;
    gap: 20px;
    align-items: center;
    min-height: 124px;
    overflow: hidden;
    padding: 24px 22px;
}

.poll-feedback {
    grid-column: 1 / -1;
    color: var(--green);
    font-weight: 800;
}

.ribbon {
    position: absolute;
    left: -26px;
    top: 16px;
    width: 98px;
    height: 30px;
    display: grid;
    place-items: center;
    transform: rotate(-45deg);
    background: linear-gradient(135deg, var(--pink), var(--orange));
    font-size: 12px;
    font-weight: 900;
}

.poll-icon {
    display: grid;
    place-items: center;
    width: 66px;
    height: 66px;
    border-radius: 50%;
    color: #d247ff;
    background: radial-gradient(circle, rgba(210, 71, 255, .28), rgba(255, 43, 166, .13));
}

.poll-icon svg {
    width: 34px;
    height: 34px;
}

.poll-content h2 {
    margin: 0 0 16px;
    font-size: 20px;
}

.reaction-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.reaction-row button {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-width: 78px;
    height: 37px;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: #dfe4ed;
    background: rgba(13, 19, 31, .9);
    cursor: pointer;
}

.reaction-row button.is-selected,
.reaction-row button:hover {
    border-color: rgba(255, 43, 166, .56);
    background: rgba(255, 43, 166, .1);
}

.reaction-row.is-prompted button {
    border-color: rgba(255, 43, 166, .42);
    box-shadow: 0 0 0 3px rgba(255, 43, 166, .08);
}

.post-list {
    overflow: hidden;
}

.post-item {
    display: grid;
    grid-template-columns: 152px minmax(0, 1fr) 116px;
    gap: 16px;
    align-items: center;
    min-height: 117px;
    padding: 13px 20px;
}

.post-item + .post-item {
    border-top: 1px solid var(--line);
}

.post-item img {
    width: 152px;
    height: 86px;
    border-radius: 6px;
    object-fit: cover;
}

.post-copy {
    min-width: 0;
}

.post-copy h3 {
    margin: 0 0 8px;
    font-size: 19px;
    line-height: 1.2;
}

.post-copy p {
    margin: 0 0 9px;
    color: var(--muted);
}

.post-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    color: #bbc2cf;
    font-size: 13px;
    font-weight: 800;
}

.post-stats span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.post-action {
    display: grid;
    justify-items: end;
    gap: 8px;
}

.post-action small {
    color: var(--muted);
}

.panel {
    padding: 20px;
}

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

.panel-head h2 {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0;
    font-size: 19px;
}

.panel-head a {
    color: #cf5fff;
    font-weight: 900;
    font-size: 14px;
}

.trend-list {
    display: grid;
    gap: 13px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.trend-list li {
    display: grid;
    grid-template-columns: 32px 38px minmax(0, 1fr) auto;
    gap: 11px;
    align-items: center;
}

.rank {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: #555d6b;
    color: #fff;
    font-weight: 900;
    font-size: 13px;
}

.trend-list li:nth-child(1) .rank {
    color: #111;
    background: var(--yellow);
}

.trend-list li:nth-child(3) .rank {
    background: #d56a22;
}

.trend-list img {
    width: 34px;
    height: 34px;
    border-radius: 5px;
    object-fit: cover;
}

.trend-list strong {
    display: block;
    overflow: hidden;
    font-size: 14px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.trend-list small {
    color: var(--muted);
}

.trend-list em {
    color: var(--green);
    font-style: normal;
    font-weight: 900;
}

.trend-list em.is-down {
    color: var(--red);
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.tag-cloud a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 36px;
    padding: 0 12px;
    border-radius: 6px;
    color: #e179ff;
    background: rgba(145, 65, 190, .16);
    font-weight: 900;
}

.tag-cloud span {
    color: #cdd3df;
    font-size: 13px;
}

.installer-body,
.admin-body {
    background:
        radial-gradient(circle at top center, rgba(255, 43, 166, .14), transparent 28rem),
        #05080f;
}

.installer-shell {
    display: grid;
    place-items: center;
    min-height: 100vh;
    padding: 28px;
}

.installer-card {
    width: min(820px, 100%);
    padding: 30px;
}

.login-card {
    width: min(460px, 100%);
}

.installer-brand {
    margin-bottom: 22px;
}

.installer-card h1,
.admin-card h1 {
    margin: 0 0 8px;
    font-size: 26px;
}

.muted,
.admin-card-head p {
    color: var(--muted);
}

.install-form,
.admin-grid {
    display: grid;
    gap: 15px;
}

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

.install-form label,
.admin-grid label {
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

input,
select,
textarea {
    min-width: 0;
    width: 100%;
    height: 42px;
    border: 1px solid #273141;
    border-radius: 6px;
    outline: 0;
    color: var(--text);
    background: rgba(7, 11, 18, .84);
    padding: 0 12px;
}

textarea {
    min-height: 110px;
    height: auto;
    padding: 12px;
    resize: vertical;
}

input[type="file"] {
    display: flex;
    align-items: center;
    padding: 8px;
}

select {
    appearance: none;
}

input:focus,
select:focus,
textarea:focus {
    border-color: rgba(255, 43, 166, .72);
}

.span-2 {
    grid-column: span 2;
}

.full {
    width: 100%;
}

.alert {
    margin: 16px 0;
    padding: 13px 15px;
    border-radius: var(--radius);
    font-weight: 800;
}

.alert-error {
    border: 1px solid rgba(255, 74, 112, .4);
    color: #ffdce4;
    background: rgba(255, 74, 112, .12);
}

.alert-success {
    border: 1px solid rgba(47, 218, 119, .4);
    color: #d8ffe8;
    background: rgba(47, 218, 119, .12);
}

.install-success {
    display: grid;
    gap: 14px;
    justify-items: start;
}

.success-icon {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 999px;
    color: #06120b;
    background: var(--green);
    font-size: 28px;
    font-weight: 900;
}

.install-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.admin-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 22px 0 42px;
}

.admin-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}

.admin-top nav {
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-card {
    margin-bottom: 16px;
    padding: 22px;
}

.admin-card-head {
    margin-bottom: 18px;
}

.admin-card-head p {
    margin: 0;
}

.admin-editor {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(6, 10, 17, .36);
}

.admin-editor + .admin-editor {
    margin-top: 10px;
}

.admin-editor summary {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 54px;
    padding: 12px 14px;
    cursor: pointer;
    font-weight: 900;
}

.admin-editor summary img {
    width: 44px;
    height: 44px;
    border-radius: 6px;
    object-fit: cover;
}

.admin-editor summary span {
    margin-left: auto;
    color: var(--muted);
    font-size: 13px;
}

.admin-editor .admin-grid {
    padding: 14px;
    border-top: 1px solid var(--line);
}

.admin-list {
    display: grid;
    gap: 10px;
    margin-top: 16px;
}

.check-row {
    display: flex !important;
    grid-template-columns: none !important;
    align-items: center;
    min-height: 42px;
}

.check-row input {
    width: 18px;
    height: 18px;
    accent-color: var(--pink);
}

.delete-form {
    display: flex;
    justify-content: flex-end;
    padding: 0 14px 14px;
}

.reaction-edit {
    display: grid;
    grid-template-columns: 70px 1fr 110px 110px;
    gap: 10px;
}

.admin-layout {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 22px;
    width: min(1380px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 42px;
}

.admin-layout .admin-shell {
    width: auto;
    margin: 0;
    padding: 0;
}

.admin-sidebar {
    position: sticky;
    top: 18px;
    align-self: start;
    display: grid;
    gap: 18px;
}

.admin-menu {
    display: grid;
    gap: 6px;
    padding: 12px;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    background: linear-gradient(180deg, rgba(17, 24, 37, .92), rgba(10, 15, 24, .94));
}

.admin-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 0 12px;
    border-radius: 6px;
    color: #c6ccd8;
    font-weight: 800;
}

.admin-menu a.is-active,
.admin-menu a:hover {
    color: var(--pink);
    background: rgba(255, 43, 166, .09);
}

.admin-menu svg {
    width: 18px;
    height: 18px;
}

.admin-top h1 {
    margin: 0 0 6px;
    font-size: 26px;
}

.admin-top p {
    margin: 0;
    color: var(--muted);
}

.admin-card h2 {
    margin: 0 0 8px;
    font-size: 22px;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.admin-stat {
    padding: 18px;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    background: linear-gradient(180deg, rgba(17, 24, 37, .92), rgba(10, 15, 24, .94));
}

.admin-stat span {
    display: block;
    color: var(--muted);
    font-weight: 800;
}

.admin-stat strong {
    display: block;
    margin-top: 8px;
    font-size: 28px;
}

.admin-row {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(6, 10, 17, .34);
}

.admin-row img {
    width: 64px;
    height: 48px;
    border-radius: 6px;
    object-fit: cover;
}

.admin-row strong,
.admin-row small {
    display: block;
}

.admin-row small {
    margin-top: 4px;
    color: var(--muted);
}

.detail-shell {
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 42px;
}

.detail-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.detail-topbar nav {
    display: flex;
    align-items: center;
    gap: 10px;
}

.show-detail-hero {
    position: relative;
    min-height: 430px;
    overflow: hidden;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    background: #0a0e15;
    box-shadow: var(--shadow);
}

.show-detail-hero img {
    width: 100%;
    height: 430px;
    object-fit: cover;
}

.show-detail-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(4, 7, 12, .95), rgba(4, 7, 12, .58), rgba(4, 7, 12, .18)),
        linear-gradient(180deg, rgba(4, 7, 12, .08), rgba(4, 7, 12, .84));
}

.show-detail-copy {
    position: absolute;
    left: 34px;
    right: 34px;
    bottom: 94px;
    max-width: 720px;
    z-index: 2;
}

.favorite-form {
    margin-top: 16px;
    position: relative;
    z-index: 5;
}

.show-detail-tabs {
    position: absolute;
    left: 24px;
    right: 24px;
    bottom: 18px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    pointer-events: auto;
    z-index: 4;
}

.show-detail-tabs button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 15px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: var(--radius);
    color: #dfe4ef;
    background: rgba(8, 13, 22, .78);
    cursor: pointer;
    font-weight: 900;
}

.show-detail-tabs button.is-active {
    border-color: rgba(255, 43, 166, .7);
    color: #fff;
    background: linear-gradient(135deg, rgba(255, 43, 166, .92), rgba(189, 50, 255, .74));
}

.show-detail-tabs svg {
    width: 18px;
    height: 18px;
}

.show-tab-content {
    margin-top: 18px;
}

.show-detail-copy .badge {
    position: static;
    display: inline-flex;
    margin-bottom: 16px;
}

.show-detail-copy h1,
.episode-detail-copy h1 {
    margin: 0 0 10px;
    font-size: 46px;
    line-height: 1.02;
}

.show-detail-copy p,
.episode-detail-copy p {
    margin: 0 0 18px;
    color: #d9deea;
    font-size: 18px;
    font-weight: 750;
}

.show-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.show-meta-row span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 6px;
    background: rgba(8, 13, 22, .62);
    font-weight: 850;
}

.show-meta-row svg {
    width: 17px;
    height: 17px;
}

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 18px;
    margin-top: 18px;
}

.detail-side {
    display: grid;
    align-content: start;
    gap: 14px;
}

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

.episode-row {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(7, 11, 18, .48);
}

.episode-row img {
    width: 96px;
    height: 58px;
    border-radius: 6px;
    object-fit: cover;
}

.episode-row strong,
.episode-row small {
    display: block;
}

.episode-row small,
.episode-row span {
    color: var(--muted);
}

.about-text {
    margin: 0;
    color: #d6dbe6;
    line-height: 1.7;
}

.actor-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.actor-list span {
    min-height: 34px;
    padding: 7px 10px;
    border-radius: 6px;
    color: #e179ff;
    background: rgba(145, 65, 190, .16);
    font-weight: 850;
}

.actor-grid span {
    min-width: 150px;
}

.episode-detail {
    display: grid;
    grid-template-columns: 420px minmax(0, 1fr);
    gap: 24px;
    padding: 22px;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    background: linear-gradient(180deg, rgba(17, 24, 37, .92), rgba(10, 15, 24, .94));
    box-shadow: var(--shadow);
}

.episode-hero {
    position: relative;
    min-height: 470px;
    overflow: hidden;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    background: #0a0e15;
    box-shadow: var(--shadow);
}

.episode-hero > img {
    width: 100%;
    height: 470px;
    object-fit: cover;
}

.episode-hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(4, 7, 12, .96), rgba(4, 7, 12, .62), rgba(4, 7, 12, .28)),
        linear-gradient(180deg, rgba(4, 7, 12, .1), rgba(4, 7, 12, .88));
}

.episode-hero .episode-detail-copy {
    position: absolute;
    left: 34px;
    right: 34px;
    bottom: 34px;
    max-width: 800px;
    z-index: 2;
}

.episode-body {
    margin-top: 18px;
}

.episode-cover {
    width: 100%;
    aspect-ratio: 3 / 4;
    border-radius: var(--radius);
    object-fit: cover;
}

.detail-kicker {
    display: inline-flex;
    margin-bottom: 14px;
    color: var(--pink);
    font-weight: 900;
}

.episode-content {
    margin-top: 26px;
    color: #d8deea;
    line-height: 1.75;
    overflow-wrap: anywhere;
}

.episode-body .episode-content {
    margin-top: 0;
    font-size: 16px;
}

.admin-note {
    align-self: end;
    min-height: 42px;
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border: 1px dashed rgba(255, 43, 166, .45);
    border-radius: 6px;
    color: var(--muted);
    background: rgba(255, 43, 166, .06);
    font-size: 13px;
    font-weight: 800;
}

.comments-panel {
    margin-top: 18px;
}

.comment-form {
    display: grid;
    grid-template-columns: minmax(180px, 260px) minmax(0, 1fr) auto;
    gap: 12px;
    align-items: end;
    margin-bottom: 18px;
}

.comment-form label {
    display: grid;
    gap: 7px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 850;
}

.comment-form label.span-2 {
    grid-column: 1 / 3;
}

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

.comment-item {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(7, 11, 18, .5);
}

.comment-avatar {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    color: #fff;
    background: linear-gradient(135deg, var(--pink), var(--orange));
    font-weight: 900;
}

.comment-item header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.comment-item small,
.comment-item p {
    color: var(--muted);
}

.comment-item p {
    margin: 8px 0 0;
    line-height: 1.6;
}

.mobile-bottom-nav {
    display: none;
}

.account-panel h1 {
    margin: 0 0 8px;
}

.account-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

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

.favorite-card {
    display: grid;
    gap: 9px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(7, 11, 18, .48);
}

.favorite-card img {
    width: 100%;
    aspect-ratio: 16 / 10;
    border-radius: 6px;
    object-fit: cover;
}

.favorite-card span {
    color: var(--muted);
}

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

.notification-item {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(7, 11, 18, .46);
}

.notification-item.is-new {
    border-color: rgba(255, 43, 166, .55);
}

.notification-item p {
    margin: 6px 0;
    color: var(--muted);
}

@media (max-width: 1180px) {
    .app-shell {
        grid-template-columns: 88px minmax(0, 1fr);
    }

    .sidebar .brand-text,
    .side-group p,
    .side-group a span,
    .score-card {
        display: none;
    }

    .side-group a {
        justify-content: center;
    }

    .content-grid {
        grid-template-columns: minmax(0, 1fr);
    }

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

    .admin-layout {
        grid-template-columns: 92px minmax(0, 1fr);
    }

    .admin-sidebar .brand-text,
    .admin-menu span {
        display: none;
    }

    .admin-menu a {
        justify-content: center;
    }

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

    .episode-detail,
    .detail-grid {
        grid-template-columns: 1fr;
    }

    .episode-cover {
        aspect-ratio: 16 / 8;
    }
}

@media (max-width: 820px) {
    .app-shell {
        display: block;
        padding: 12px;
    }

    .sidebar {
        position: static;
        z-index: auto;
        width: auto;
        height: auto;
        transform: none;
        margin-bottom: 12px;
    }

    .sidebar .brand-text,
    .side-group p,
    .side-group a span,
    .score-card {
        display: flex;
    }

    .score-card {
        display: grid;
    }

    .side-group a {
        justify-content: flex-start;
    }

    .side-nav {
        flex: none;
        overflow: hidden;
        padding: 12px 0;
    }

    .side-group {
        padding: 0 12px;
    }

    .side-show-list {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        padding-bottom: 2px;
        scrollbar-width: none;
    }

    .side-show-list::-webkit-scrollbar {
        display: none;
    }

    .side-show-list a {
        flex: 0 0 136px;
        min-height: 48px;
        padding: 8px;
        border: 1px solid rgba(255, 255, 255, .08);
        background: rgba(255, 255, 255, .03);
    }

    .side-show-list a img {
        width: 34px;
        height: 34px;
        flex-basis: 34px;
    }

    .topbar {
        grid-template-columns: minmax(0, 1fr);
        margin-bottom: 14px;
    }

    .topbar-spacer {
        display: none;
    }

    .mobile-menu {
        display: none;
    }

    .auth-actions {
        display: none;
    }

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

    .search-wrap.is-open input,
    .search-wrap:focus-within input {
        width: min(260px, 72vw);
    }

    body {
        padding-bottom: 76px;
    }

    .mobile-bottom-nav {
        position: fixed;
        z-index: 60;
        left: 10px;
        right: 10px;
        bottom: 10px;
        display: grid;
        grid-auto-flow: column;
        grid-auto-columns: 1fr;
        gap: 6px;
        padding: 8px;
        border: 1px solid rgba(255, 255, 255, .12);
        border-radius: 14px;
        background: rgba(11, 16, 25, .94);
        box-shadow: 0 16px 46px rgba(0, 0, 0, .48);
        backdrop-filter: blur(12px);
    }

    .mobile-bottom-nav a {
        display: grid;
        justify-items: center;
        gap: 3px;
        min-width: 0;
        padding: 7px 4px;
        border-radius: 10px;
        color: #c8cfdb;
        font-size: 11px;
        font-weight: 850;
    }

    .mobile-bottom-nav a.is-active {
        color: #fff;
        background: rgba(255, 43, 166, .22);
    }

    .mobile-bottom-nav svg {
        width: 19px;
        height: 19px;
    }

    .mobile-nav-icon {
        position: relative;
        display: inline-grid;
        place-items: center;
    }

    .mobile-nav-badge {
        position: absolute;
        top: -8px;
        right: -10px;
        min-width: 17px;
        height: 17px;
        padding: 0 4px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border: 2px solid #0a0f18;
        border-radius: 999px;
        color: #fff;
        background: var(--red);
        font-size: 9px;
        line-height: 1;
        font-style: normal;
        font-weight: 900;
    }

    .tabbar {
        padding: 0 16px;
    }

    .hero-carousel {
        padding-inline: 12px;
    }

    .carousel-nav {
        display: none;
    }

    .content-grid {
        margin-top: 20px;
    }

    .poll-card {
        grid-template-columns: 62px minmax(0, 1fr);
    }

    .poll-card > .btn {
        grid-column: 1 / -1;
        width: 100%;
    }

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

    .post-item img {
        width: 104px;
        height: 76px;
    }

    .post-action {
        grid-column: 1 / -1;
        grid-template-columns: 1fr auto;
        justify-items: stretch;
        align-items: center;
    }

    .right-column,
    .form-grid,
    .admin-grid {
        grid-template-columns: 1fr;
    }

    .span-2 {
        grid-column: span 1;
    }

    .admin-top,
    .admin-top nav {
        align-items: flex-start;
        flex-direction: column;
    }

    .admin-layout {
        display: block;
        width: min(100% - 24px, 760px);
        padding-top: 12px;
    }

    .admin-sidebar {
        position: static;
        margin-bottom: 16px;
    }

    .admin-sidebar .brand-text,
    .admin-menu span {
        display: inline;
    }

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

    .admin-menu a {
        justify-content: flex-start;
    }

    .detail-topbar,
    .detail-topbar nav {
        align-items: flex-start;
        flex-direction: column;
    }

    .show-detail-copy h1,
    .episode-detail-copy h1 {
        font-size: 34px;
    }

    .show-detail-copy {
        left: 20px;
        right: 20px;
        bottom: 96px;
    }

    .show-detail-tabs {
        left: 14px;
        right: 14px;
        bottom: 14px;
        justify-content: flex-start;
        overflow-x: auto;
    }

    .episode-hero,
    .episode-hero > img {
        min-height: 420px;
        height: 420px;
    }

    .episode-hero .episode-detail-copy {
        left: 18px;
        right: 18px;
        bottom: 22px;
    }

    .show-detail-tabs button {
        min-width: max-content;
    }

    .show-detail-hero,
    .show-detail-hero img {
        min-height: 430px;
        height: 430px;
    }

    .episode-row {
        grid-template-columns: 82px minmax(0, 1fr);
    }

    .episode-row span {
        grid-column: 2;
    }

    .reaction-edit {
        grid-template-columns: 1fr;
    }

    .comment-form {
        grid-template-columns: 1fr;
    }

    .comment-form label.span-2 {
        grid-column: 1;
    }
}

@media (max-width: 520px) {
    .hero-track {
        grid-auto-columns: 86%;
    }

    .show-card,
    .show-card img {
        min-height: 330px;
    }

    .poll-card {
        padding: 22px 16px;
    }

    .poll-icon {
        width: 56px;
        height: 56px;
    }

    .post-item {
        grid-template-columns: 1fr;
    }

    .post-item img {
        width: 100%;
        height: 150px;
    }

    .installer-shell {
        padding: 14px;
    }

    .installer-card,
    .admin-card {
        padding: 18px;
    }

    .admin-stats,
    .admin-menu,
    .admin-row,
    .episode-row,
    .episode-detail {
        grid-template-columns: 1fr;
    }

    .admin-row img,
    .episode-row img {
        width: 100%;
        height: 150px;
    }
}
