:root {
    --primary: #a50f3d;
    --primary-dark: #7d0b31;
    --secondary: #d61b55;
    --accent: #ffca38;
    --accent-soft: #ffd867;
    --surface: #ffffff;
    --surface-soft: #eef3fb;
    --surface-muted: #dce6f4;
    --text: #182744;
    --muted: #5b6b87;
    --footer: #0f0f12;
    --success: #22c55e;
    --discord: #5865f2;
    --rank-tag-size: 72px;
    --rank-tag-preview-size: 116px;
    --rank-tag-team-size: 170px;
    --border: rgba(24, 39, 68, 0.12);
    --shadow: 0 24px 70px rgba(35, 45, 78, 0.14);
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 16px;
    --radius-sm: 12px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Barlow", sans-serif;
    background: var(--surface-soft);
    color: var(--text);
}

body.modal-open {
    overflow: hidden;
}

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

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

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

.page-background {
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at top, color-mix(in srgb, var(--accent) 18%, transparent), transparent 25%),
        radial-gradient(circle at 20% 10%, color-mix(in srgb, var(--primary) 14%, transparent), transparent 20%),
        var(--surface-soft);
    pointer-events: none;
}

.site-shell {
    position: relative;
    z-index: 1;
}

.container {
    width: min(1400px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    height: 80px;
    background: linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 100%);
    box-shadow: 0 8px 30px rgba(73, 9, 29, 0.28);
}

.header-inner {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.brand-wrap {
    display: flex;
    align-items: center;
    gap: 18px;
}

.brand-link {
    display: flex;
    align-items: center;
}

.brand-logo {
    width: 64px;
    height: 64px;
    object-fit: contain;
}

.primary-nav {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.nav-button {
    border: 0;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 12px;
    background: transparent;
    color: #fff;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.nav-button.active,
.nav-button:hover {
    background: rgba(0, 0, 0, 0.18);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.icon-action,
.server-action,
.secondary-button,
.primary-button {
    border: 0;
    min-height: 48px;
    border-radius: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.icon-action:hover,
.server-action:hover,
.secondary-button:hover,
.primary-button:hover {
    transform: translateY(-1px);
}

.discord-action {
    min-width: 56px;
    padding: 0 18px;
    gap: 10px;
    background: var(--discord);
    color: #fff;
}

.header-icon-image {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

.server-action {
    padding: 0 22px;
    background: var(--accent);
    color: #1a1b1f;
    gap: 12px;
    cursor: pointer;
}

.server-action-icon {
    font-size: 0.9rem;
}

.server-action-copy {
    display: grid;
    text-align: left;
    line-height: 1.05;
}

.server-action-copy strong {
    font-size: 0.92rem;
    letter-spacing: 0.03em;
}

.server-action-copy small {
    font-size: 0.78rem;
    opacity: 0.84;
}

.account-slot {
    min-width: 120px;
    display: flex;
    justify-content: flex-end;
}

.page-main {
    padding-top: 20px;
}

.view-section {
    display: none;
}

.view-section.active {
    display: block;
}

.hero-band {
    background: linear-gradient(180deg, var(--primary) 0%, var(--secondary) 100%);
    padding: 22px 0 34px;
}

.hero-card {
    position: relative;
    overflow: hidden;
    min-height: 700px;
    border-radius: var(--radius-xl);
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--surface) 88%, var(--accent) 12%) 0%, color-mix(in srgb, var(--surface) 86%, var(--secondary) 14%) 100%);
    box-shadow: var(--shadow);
}

.hero-image {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--surface-soft) 88%, transparent), color-mix(in srgb, var(--surface) 92%, transparent)),
        linear-gradient(90deg, transparent 0 94%, color-mix(in srgb, var(--surface-muted) 75%, transparent) 94% 100%),
        linear-gradient(0deg, transparent 0 94%, color-mix(in srgb, var(--surface-muted) 75%, transparent) 94% 100%);
    background-size: auto, 56px 56px, 56px 56px;
    opacity: 0.96;
}

.hero-artwork {
    position: absolute;
    left: var(--hero-art-x, 68%);
    top: var(--hero-art-y, 48%);
    z-index: 1;
    width: var(--hero-art-width, 58%);
    max-width: 78%;
    min-width: 280px;
    max-height: 88%;
    transform: translate(-50%, -50%);
    object-fit: contain;
    filter: drop-shadow(0 28px 50px rgba(24, 39, 68, 0.24));
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, color-mix(in srgb, var(--surface) 42%, transparent) 0%, transparent 64%),
        radial-gradient(circle at top right, color-mix(in srgb, var(--accent) 10%, transparent), transparent 34%);
}

.hero-content {
    position: relative;
    z-index: 3;
    width: min(560px, 100%);
    margin: 48px;
    padding: 34px 40px;
    border-radius: var(--radius-lg);
    background: color-mix(in srgb, var(--surface) 84%, transparent);
    backdrop-filter: blur(8px);
}

.eyebrow,
.hero-tags span,
.small-label {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.84rem;
    font-weight: 700;
}

.hero-title,
.section-title,
.card-title,
.footer-title,
.profile-name,
.modal-card h2,
.team-role,
.join-title {
    font-family: "Baloo 2", sans-serif;
}

.hero-title {
    margin: 0 0 8px;
    font-size: clamp(2.6rem, 5vw, 4.2rem);
    line-height: 0.92;
}

.hero-subtitle {
    margin: 0 0 18px;
    font-size: 1.35rem;
    font-weight: 700;
}

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}

.hero-tags span {
    padding: 8px 16px;
    border-radius: 10px;
    background: linear-gradient(180deg, var(--secondary), var(--primary));
    color: #fff;
}

.hero-text {
    margin: 0;
    color: #344865;
    font-size: 1.2rem;
    line-height: 1.55;
}

.hero-switch {
    position: absolute;
    left: 50%;
    bottom: 26px;
    z-index: 3;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 18px;
    background: rgba(11, 16, 27, 0.58);
    backdrop-filter: blur(10px);
}

.hero-switch button {
    width: 58px;
    height: 58px;
    border: 0;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-weight: 700;
    overflow: hidden;
    padding: 0;
}

.hero-switch button.active {
    background: var(--accent);
    color: #171717;
}

.hero-switch button img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-switch button span {
    display: inline-flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
}

.section-block {
    padding: 56px 0;
}

.section-head {
    margin-bottom: 28px;
}

.section-title {
    margin: 0 0 8px;
    font-size: clamp(2.3rem, 4vw, 3.4rem);
    line-height: 0.95;
}

.section-copy {
    margin: 0;
    max-width: 900px;
    color: var(--muted);
    font-size: 1.12rem;
}

.featured-grid,
.blog-grid,
.team-grid,
.panel-grid,
.stats-grid {
    display: grid;
    gap: 28px;
}

.featured-grid {
    grid-template-columns: 1.2fr 1fr;
}

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

.card,
.feature-card,
.banner-card,
.pixel-card,
.panel-card,
.team-card,
.ticket-card,
.blog-detail-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.feature-card,
.blog-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.blog-card-image,
.featured-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 16px;
    object-fit: cover;
    transition: transform 180ms ease;
}

.blog-card:hover .blog-card-image,
.feature-card:hover .featured-image {
    transform: scale(0.98);
}

.blog-card-body,
.feature-body,
.panel-card,
.team-card,
.ticket-card,
.blog-detail-card {
    padding: 22px;
}

.meta-line {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    color: var(--muted);
    font-size: 0.95rem;
}

.category-pill {
    font-weight: 700;
    text-transform: uppercase;
}

.banner-card {
    display: grid;
    grid-template-columns: 1.1fr 320px;
    gap: 30px;
    align-items: center;
    min-height: 260px;
    padding: 36px 44px;
    color: #fff;
    background: linear-gradient(135deg, var(--discord) 0%, #6671ff 100%);
}

.banner-badge {
    display: inline-flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 14px;
}

.online-pill {
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.26);
    font-weight: 700;
}

.banner-image {
    max-height: 260px;
    justify-self: center;
}

.pixel-card {
    position: relative;
    overflow: hidden;
    min-height: 360px;
    padding: 70px 0 0;
    background:
        linear-gradient(180deg, transparent 0 76px, #6a4427 76px 100%),
        linear-gradient(90deg, rgba(72, 48, 29, 0.82) 0 48px, rgba(98, 67, 40, 0.82) 48px 96px),
        linear-gradient(180deg, #5baa3b 0 24px, #9fd36b 24px 34px, #7d5433 34px 100%);
    background-size: 100% 100%, 96px 96px, 100% 100%;
    color: #fff;
}

.pixel-card .section-head {
    text-align: center;
}

.join-title {
    font-size: clamp(2.4rem, 4vw, 3.6rem);
}

.pixel-panel {
    width: min(520px, calc(100% - 40px));
    margin: 18px auto 0;
    padding: 18px;
    background: rgba(0, 0, 0, 0.78);
    border: 4px solid #d6d6d6;
    box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.24);
    font-family: "VT323", monospace;
    color: #fff;
}

.pixel-panel input,
.pixel-panel button {
    font-family: "VT323", monospace;
    font-size: 2rem;
}

.pixel-panel input {
    width: 100%;
    height: 52px;
    padding: 8px 10px;
    background: #0d0d0d;
    color: #fff;
    border: 3px solid #d6d6d6;
}

.pixel-panel button {
    width: 100%;
    margin-top: 14px;
    min-height: 52px;
    background: #bcbcbc;
    color: #fff;
    border: 3px solid #808080;
}

.site-footer {
    margin-top: 28px;
    padding: 36px 0 44px;
    background: var(--footer);
    color: #fff;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr 0.8fr 1fr;
    gap: 28px;
}

.footer-title {
    margin: 0 0 14px;
    font-size: 2rem;
}

.footer-links,
.social-list {
    display: grid;
    gap: 12px;
}

.social-list {
    grid-template-columns: repeat(4, 48px);
}

.social-link {
    height: 48px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
}

.partner-list {
    display: grid;
    gap: 18px;
}

.partner-list img {
    max-height: 64px;
    width: auto;
    object-fit: contain;
}

.footer-bottom {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
    color: rgba(255, 255, 255, 0.68);
}

.profile-trigger {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 10px;
    border: 0;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.profile-avatar {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.18);
}

.profile-menu {
    position: relative;
}

.profile-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 320px;
    padding: 18px;
    border-radius: 18px;
    background: var(--surface);
    box-shadow: var(--shadow);
    color: var(--text);
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: opacity 160ms ease, transform 160ms ease;
}

.profile-menu.open .profile-dropdown {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.profile-head,
.ticket-head {
    display: flex;
    gap: 14px;
    align-items: center;
}

.profile-stack,
.stack-form {
    display: grid;
    gap: 14px;
}

.profile-button {
    border: 0;
    min-height: 44px;
    border-radius: 12px;
    background: var(--surface-soft);
    color: var(--text);
    font-weight: 700;
}

.profile-footer {
    margin-top: 14px;
}

.wide-button {
    width: 100%;
}

.secondary-button {
    padding: 0 20px;
    background: linear-gradient(180deg, var(--secondary) 0%, var(--primary) 100%);
    color: #fff;
}

.primary-button {
    padding: 0 22px;
    background: var(--accent);
    color: #171717;
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 100;
}

.modal.hidden {
    display: none;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 17, 24, 0.52);
    backdrop-filter: blur(6px);
}

.modal-card {
    position: relative;
    z-index: 1;
    width: min(560px, calc(100% - 26px));
    margin: 80px auto;
    padding: 28px;
    border-radius: 22px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.modal-wide {
    width: min(980px, calc(100% - 26px));
}

.modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: var(--surface-soft);
    font-size: 1.6rem;
}

.field {
    display: grid;
    gap: 8px;
}

.input-action-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
}

.field span,
.section-label {
    font-weight: 700;
    color: var(--muted);
}

input,
select,
textarea,
.quill-shell {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px 16px;
    background: #fff;
    color: var(--text);
}

input[type="color"] {
    appearance: none;
    -webkit-appearance: none;
    padding: 4px;
    min-height: 48px;
    background: var(--picker-color, #ffffff);
    cursor: pointer;
    overflow: hidden;
    border: 1px solid var(--border);
}

input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

input[type="color"]::-webkit-color-swatch {
    border: 0;
    border-radius: 10px;
}

input[type="color"]::-moz-color-swatch {
    border: 0;
    border-radius: 10px;
}

textarea {
    min-height: 120px;
    resize: vertical;
}

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

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

.panel-card {
    display: grid;
    gap: 18px;
}

.panel-card h3 {
    margin: 0;
    font-family: "Baloo 2", sans-serif;
    font-size: 2rem;
}

.panel-toolbar,
.filter-pills,
.ticket-actions,
.list-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.pill-button,
.small-button {
    border: 1px solid #b9c6da;
    min-height: 42px;
    padding: 0 16px;
    border-radius: 12px;
    background: #f5f8fc;
    color: var(--text);
    font-weight: 700;
}

.pill-button.active {
    background: var(--surface-muted);
    box-shadow: inset 0 0 0 2px rgba(24, 39, 68, 0.18);
}

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

.ticket-card,
.team-card {
    display: grid;
    gap: 16px;
}

.ticket-meta,
.text-muted {
    color: var(--muted);
}

.ticket-thread {
    display: grid;
    gap: 12px;
}

.ticket-reply {
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--surface-soft);
}

.ticket-reply.internal {
    border-left: 4px solid var(--accent);
}

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

.team-card {
    text-align: center;
}

.team-head {
    display: grid;
    place-items: center;
    gap: 4px;
}

.team-avatar {
    width: 110px;
    height: 110px;
    border-radius: 28px;
}

.blog-detail-card {
    display: grid;
    gap: 18px;
}

.editor-shell {
    display: grid;
    gap: 10px;
}

.toast-area {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 120;
    display: grid;
    gap: 10px;
}

.toast {
    min-width: 260px;
    max-width: 360px;
    padding: 14px 16px;
    border-radius: 14px;
    background: rgba(19, 25, 36, 0.92);
    color: #fff;
    box-shadow: var(--shadow);
}

.toast.error {
    background: rgba(157, 33, 60, 0.95);
}

.empty-state {
    padding: 24px;
    border-radius: 18px;
    background: var(--surface);
    box-shadow: var(--shadow);
    text-align: center;
}

.hidden {
    display: none !important;
}

.mobile-toggle {
    display: none;
}

@media (max-width: 1200px) {
    .featured-grid,
    .blog-grid,
    .team-grid,
    .panel-grid,
    .footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .banner-card {
        grid-template-columns: 1fr;
        text-align: left;
    }
}

@media (max-width: 900px) {
    .primary-nav {
        display: none;
        position: absolute;
        top: 74px;
        left: 16px;
        right: 16px;
        padding: 16px;
        border-radius: 16px;
        background: rgba(72, 8, 29, 0.96);
        box-shadow: var(--shadow);
    }

    .primary-nav.open {
        display: grid;
    }

    .mobile-toggle {
        display: inline-flex;
        width: 42px;
        height: 42px;
        border: 0;
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.12);
        color: #fff;
        align-items: center;
        justify-content: center;
        font-size: 1.2rem;
    }

    .header-actions {
        gap: 8px;
    }

    .hero-card {
        min-height: 560px;
    }

    .hero-content {
        margin: 24px;
        padding: 24px;
    }

    .hero-artwork {
        width: min(var(--hero-art-width, 58%), 74%);
        max-width: 72%;
    }

    .featured-grid,
    .blog-grid,
    .team-grid,
    .panel-grid,
    .footer-grid,
    .inline-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .container {
        width: min(100% - 20px, 1400px);
    }

    .brand-logo {
        width: 54px;
        height: 54px;
    }

    .server-action {
        padding: 0 14px;
        gap: 8px;
    }

    .hero-card {
        min-height: 520px;
    }

    .hero-content {
        width: auto;
        margin: 18px;
    }

    .hero-artwork {
        width: min(var(--hero-art-width, 58%), 72%);
        max-width: 74%;
        min-width: 220px;
        top: max(var(--hero-art-y, 48%), 52%);
    }

    .hero-switch {
        gap: 8px;
        bottom: 18px;
    }

    .hero-switch button {
        width: 48px;
        height: 48px;
    }

    .profile-dropdown {
        width: min(320px, calc(100vw - 32px));
        right: -8px;
    }
}

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

.support-grid,
.admin-grid {
    align-items: start;
}

.admin-shell {
    display: grid;
    gap: 26px;
}

.admin-jumpnav {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.admin-group {
    display: grid;
    gap: 18px;
    scroll-margin-top: 110px;
}

.admin-group-head {
    display: grid;
    gap: 6px;
}

.admin-group-head h3,
.admin-group-head p {
    margin: 0;
}

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

.admin-card {
    align-content: start;
    border: 1px solid rgba(24, 39, 68, 0.08);
    box-shadow: 0 20px 48px rgba(35, 45, 78, 0.1);
}

.admin-card-wide {
    grid-column: 1 / -1;
}

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

.profile-meta {
    display: grid;
    gap: 4px;
}

.profile-rank-line {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 58px;
    flex-wrap: wrap;
}

.profile-rank-line.centered {
    justify-content: center;
}

.rank-prefix {
    display: block;
    height: var(--rank-tag-size);
    max-width: 100%;
    width: auto;
    object-fit: contain;
}

.rank-text {
    font-size: 1.35rem;
    font-weight: 700;
}

.editor-section {
    display: grid;
    gap: 14px;
    padding: 18px;
    border-radius: 18px;
    background: var(--surface-soft);
    border: 1px solid var(--border);
}

.editor-section.nested {
    background: rgba(255, 255, 255, 0.7);
}

.editor-empty-placeholder {
    padding: 16px 18px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px dashed var(--border);
    color: var(--muted);
    font-weight: 700;
}

.editor-section-head,
.editor-row-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.editor-list {
    display: grid;
    gap: 14px;
}

.editor-row {
    display: grid;
    gap: 12px;
    padding: 16px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid rgba(24, 39, 68, 0.08);
}

.compact-row {
    gap: 10px;
}

.icon-remove {
    border: 0;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 10px;
    background: rgba(165, 15, 61, 0.08);
    color: var(--primary-dark);
    font-weight: 700;
}

.checkbox-field {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 52px;
    padding: 0 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fff;
}

.checkbox-field input {
    width: 18px;
    height: 18px;
}

.checkbox-field span {
    color: var(--text);
}

.rank-preview {
    display: flex;
    justify-content: flex-start;
}

.rank-preview-card {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-height: 54px;
    padding: 10px 14px;
    border-radius: 14px;
    background: var(--surface-soft);
    border: 1px solid var(--border);
}

.rank-preview-card .rank-prefix {
    height: var(--rank-tag-preview-size);
}

.rank-preview-card .rank-text {
    font-size: 1.7rem;
}

.page-editor-shell .ql-editor {
    min-height: 260px;
}

.teamchat-shell {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.teamchat-sidebar,
.teamchat-panel,
.teamchat-messages {
    display: grid;
    gap: 14px;
}

.teamchat-sidebar {
    padding: 18px;
    border-radius: 20px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.teamchat-channel {
    display: grid;
    gap: 6px;
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface-soft);
    color: var(--text);
    text-align: left;
}

.teamchat-channel.active {
    background: linear-gradient(
        180deg,
        color-mix(in srgb, var(--secondary) 14%, transparent),
        color-mix(in srgb, var(--primary) 16%, transparent)
    );
    border-color: color-mix(in srgb, var(--primary) 22%, transparent);
}

.teamchat-channel span {
    color: var(--muted);
    font-size: 0.92rem;
}

.teamchat-panel {
    padding: 22px;
    border-radius: 20px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.teamchat-messages {
    max-height: 520px;
    overflow: auto;
    padding-right: 6px;
}

.teamchat-message {
    display: grid;
    gap: 10px;
    padding: 16px;
    border-radius: 16px;
    background: var(--surface-soft);
    border: 1px solid rgba(24, 39, 68, 0.08);
}

.teamchat-message-head,
.teamchat-message-user {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.teamchat-message-user {
    justify-content: flex-start;
}

.profile-avatar.small {
    width: 40px;
    height: 40px;
    border-radius: 12px;
}

.rich-text-view {
    color: var(--text);
    line-height: 1.65;
}

.rich-text-view .content-route-link {
    color: #2563eb;
    text-decoration: underline;
    font-weight: 700;
}

.rich-text-view img {
    max-width: 100%;
    height: auto;
    border-radius: 16px;
}

.compact-empty-state {
    min-height: 180px;
    display: grid;
    place-items: center;
}

.team-card .profile-rank-line {
    min-height: 0;
    margin-top: 0;
}

.team-card .rank-prefix {
    height: var(--rank-tag-team-size);
    max-width: min(100%, 360px);
}

.team-card .rank-text {
    font-size: 2.3rem;
    line-height: 1.1;
}

.team-card .team-role {
    font-size: 1.2rem;
    font-weight: 700;
}

.team-rank-line {
    margin-top: -2px;
    margin-bottom: 0;
}

#category-form .editor-section-head .small-button {
    display: none;
}

#sections-form .editor-section.nested > .editor-section-head .small-button {
    display: none;
}

@media (max-width: 1200px) {
    .promo-grid,
    .color-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

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

    .promo-grid,
    .color-grid {
        grid-template-columns: 1fr;
    }

    .admin-card-wide {
        grid-column: auto;
    }

    .admin-jumpnav {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 4px;
    }
}
