:root {
    --primary-color: #5b4bdb;
    --primary-hover: #4938c5;
    --primary-soft: #eeecff;
    --secondary-color: #667085;
    --success-color: #15803d;
    --danger-color: #dc2626;
    --warning-color: #d97706;
    --info-color: #0284c7;
    --light-color: #f7f7fb;
    --dark-color: #17172b;
    --text-color: #29293d;
    --heading-color: #17172b;
    --muted-color: #737386;
    --surface: #ffffff;
    --surface-color: #ffffff;
    --surface-muted: #f3f3f8;
    --surface-soft: var(--surface-muted);
    --border-color: #e7e7ef;
    --border-radius: 0.8rem;
    --border-radius-lg: 1.35rem;
    --shadow-sm: 0 2px 10px rgba(24, 24, 50, 0.05);
    --shadow-md: 0 12px 32px rgba(24, 24, 50, 0.09);
    --shadow-lg: 0 24px 64px rgba(24, 24, 50, 0.14);
    --transition-fast: 160ms;
    --transition-speed: 240ms;
    --line-height-base: 1.7;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--text-color);
    background:
        radial-gradient(circle at 10% 0%, rgba(91, 75, 219, 0.08), transparent 30rem),
        var(--light-color);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: var(--line-height-base);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--heading-color);
    font-weight: 750;
    letter-spacing: -0.025em;
}

a {
    color: var(--primary-color);
}

a:hover {
    color: var(--primary-hover);
}

.bi {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 1em;
    height: 1em;
    font-style: normal;
    line-height: 1;
    vertical-align: -0.12em;
}

.site-main {
    flex: 1 0 auto;
    width: 100%;
}

.site-navbar {
    z-index: 1030;
    border-bottom: 1px solid rgba(231, 231, 239, 0.85);
    background: rgba(255, 255, 255, 0.88) !important;
    box-shadow: 0 1px 0 rgba(23, 23, 43, 0.02);
    backdrop-filter: blur(18px);
    transition: min-height var(--transition-speed), box-shadow var(--transition-speed), background-color var(--transition-speed);
}

.site-navbar.is-scrolled {
    background: rgba(255, 255, 255, 0.96) !important;
    box-shadow: 0 10px 30px rgba(23, 23, 43, 0.08);
}

.site-navbar .container {
    min-height: 4.5rem;
}

.navbar-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    color: var(--dark-color);
    font-size: 1.25rem;
    letter-spacing: -0.04em;
}

.navbar-brand i {
    display: grid;
    width: 2.25rem;
    height: 2.25rem;
    place-items: center;
    color: #fff;
    border-radius: 0.75rem;
    background: linear-gradient(135deg, #7768ee, #4938c5);
    box-shadow: 0 8px 20px rgba(91, 75, 219, 0.25);
}

.navbar-brand > svg {
    width: 2.25rem;
    height: 2.25rem;
    padding: 0.5rem;
    flex: 0 0 2.25rem;
    color: #fff;
    border-radius: 0.75rem;
    background: linear-gradient(135deg, #7768ee, #4938c5);
    box-shadow: 0 8px 20px rgba(91, 75, 219, 0.25);
    stroke-width: 2;
}

.site-search {
    width: min(24rem, 32vw);
}

.site-search .form-control {
    background: var(--surface-muted);
    border-color: transparent;
}

.site-navbar .navbar-collapse,
.site-navbar .navbar-nav,
.site-navbar .nav-item {
    align-items: center;
}

.site-navbar .navbar-nav {
    gap: 0.35rem;
}

.site-navbar .site-search .form-control,
.site-navbar .site-search > .btn,
.site-navbar .navbar-nav > .nav-item > .btn,
.site-navbar .theme-toggle,
.site-navbar .nav-icon-link {
    min-height: 2.75rem;
    height: 2.75rem;
}

.site-navbar .site-search > .btn,
.site-navbar .theme-toggle,
.site-navbar .nav-icon-link {
    width: 2.75rem;
    min-width: 2.75rem;
    padding: 0;
}

.site-navbar .nav-link {
    display: inline-flex;
    min-height: 2.75rem;
    align-items: center;
}

.site-navbar svg,
.site-navbar .bi {
    vertical-align: middle;
}

.site-navbar button > svg,
.site-navbar a > svg {
    display: block;
    margin: 0;
}

.navbar .nav-link {
    color: var(--text-color);
    font-weight: 600;
}

.navbar-toggler {
    display: inline-grid;
    width: 2.75rem;
    height: 2.75rem;
    padding: 0;
    place-items: center;
    color: var(--dark-color);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
}

.navbar-toggler i {
    font-size: 1.5rem;
    line-height: 1;
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.25rem rgba(91, 75, 219, 0.12);
}

.navbar-avatar {
    width: 2.35rem;
    height: 2.35rem;
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px var(--border-color);
}

.dropdown-menu {
    padding: 0.6rem;
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
}

.dropdown-item {
    padding: 0.65rem 0.8rem;
    border-radius: 0.65rem;
}

.dropdown-item:hover {
    background: var(--primary-soft);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.42rem;
    border-radius: 0.75rem;
    font-weight: 650;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), background-color var(--transition-fast);
}

.btn-primary {
    border-color: var(--primary-color);
    background: var(--primary-color);
    box-shadow: 0 7px 18px rgba(91, 75, 219, 0.2);
}

.btn-primary:hover,
.btn-primary:focus {
    border-color: var(--primary-hover);
    background: var(--primary-hover);
    box-shadow: 0 10px 24px rgba(91, 75, 219, 0.28);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: #c9c3fb;
}

.btn-outline-primary:hover {
    border-color: var(--primary-color);
    background: var(--primary-color);
}

.btn:active {
    transform: scale(0.97);
}

.btn:focus-visible,
a:focus-visible,
button:focus-visible {
    outline: 3px solid rgba(91, 75, 219, 0.3);
    outline-offset: 3px;
}

.card {
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-speed), box-shadow var(--transition-speed), border-color var(--transition-speed);
}

.hover-lift:hover {
    border-color: #d7d2fb;
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.card-body {
    padding: 1.4rem;
}

.card-title {
    color: var(--dark-color);
    font-size: 1.08rem;
    line-height: 1.35;
}

.card-text {
    color: var(--muted-color);
    font-size: 0.95rem;
}

.card-img-top {
    width: 100%;
    height: 13rem;
    object-fit: cover;
}

.card-footer {
    padding: 0.9rem 1.4rem 1.25rem;
    border-color: var(--border-color);
}

.card-footer .d-flex.justify-content-between {
    gap: 0.75rem;
    flex-wrap: wrap;
}

.card-footer .d-flex.align-items-center {
    min-width: 0;
}

.hero-section {
    isolation: isolate;
    overflow: hidden;
    min-height: 32rem !important;
    border-radius: 1.75rem;
    box-shadow: var(--shadow-lg);
}

.hero-section::after {
    position: absolute;
    z-index: -1;
    inset: 0;
    content: "";
    background: linear-gradient(180deg, rgba(18, 15, 49, 0.05), rgba(18, 15, 49, 0.45));
}

.hero-title {
    max-width: 18ch;
    margin-inline: auto;
    color: #fff;
    text-wrap: balance;
    text-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
}

.hero-section .lead {
    max-width: 46rem;
    margin-inline: auto;
    color: rgba(255, 255, 255, 0.9);
}

.form-control,
.form-select {
    min-height: 3rem;
    padding: 0.7rem 0.9rem;
    border-color: var(--border-color);
    border-radius: 0.75rem;
    background-color: #fff;
}

textarea.form-control {
    min-height: auto;
}

.form-control:focus,
.form-select:focus {
    border-color: #a9a0f3;
    box-shadow: 0 0 0 0.25rem rgba(91, 75, 219, 0.12);
}

form.d-flex .form-control {
    min-width: 0;
}

form.d-flex .btn {
    flex: 0 0 auto;
}

.form-label {
    color: var(--dark-color);
    font-weight: 650;
}

.input-group-text {
    display: flex;
    min-width: 2.7rem;
    align-items: center;
    justify-content: center;
    border-color: var(--border-color);
    border-radius: 0.75rem 0 0 0.75rem;
    background: var(--surface-muted);
}

.input-group > .form-control {
    position: relative;
    z-index: 1;
}

.input-group .form-control {
    border-left: 0;
}

.alert {
    border: 1px solid transparent;
    border-radius: 1rem;
}

.alert-success { border-color: #bbf7d0; }
.alert-danger { border-color: #fecaca; }
.alert-info { border-color: #bae6fd; }

.badge {
    padding: 0.45em 0.7em;
    border-radius: 999px;
    font-weight: 650;
}

.breadcrumb {
    margin-bottom: 0;
    padding: 0.5rem 0;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    color: var(--muted-color);
}

.story-content {
    color: #242438;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.05rem, 1rem + 0.25vw, 1.2rem);
    line-height: 1.9;
}

.story-content h1,
.story-content h2,
.story-content h3 {
    margin-top: 1.8em;
    font-family: Inter, ui-sans-serif, system-ui, sans-serif;
}

.story-content img {
    max-width: 100%;
    height: auto;
    border-radius: 1rem;
}

.story-content blockquote {
    margin: 1.5rem 0;
    padding: 1rem 1.25rem;
    color: #4b476a;
    border-left: 4px solid var(--primary-color);
    border-radius: 0 0.8rem 0.8rem 0;
    background: var(--primary-soft);
}

.comments-section {
    margin-top: 2.5rem;
}

.comments-section > h3 {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.comments-section .card .d-flex.justify-content-between {
    gap: 0.5rem 1rem;
    flex-wrap: wrap;
}

.comments-section small {
    white-space: nowrap;
}

.comment-text {
    color: var(--text-color);
    overflow-wrap: anywhere;
}

.comment-text p:last-child {
    margin-bottom: 0;
}

.pagination {
    gap: 0.35rem;
}

.pagination .page-link {
    min-width: 2.55rem;
    color: var(--primary-color);
    text-align: center;
    border: 1px solid var(--border-color);
    border-radius: 0.7rem !important;
}

.pagination .active .page-link {
    border-color: var(--primary-color);
    background: var(--primary-color);
}

.nav-tabs {
    gap: 0.5rem;
    border-bottom: 0;
}

.nav-tabs .nav-link {
    color: var(--muted-color);
    border: 1px solid transparent;
    border-radius: 0.75rem;
    font-weight: 650;
}

.nav-tabs .nav-link.active {
    color: var(--primary-color);
    border-color: #dcd8fc;
    background: var(--primary-soft);
}

.markdownx,
.django-markdownx,
div.markdownx {
    width: 100% !important;
    max-width: 100% !important;
}

.markdownx textarea,
textarea.markdownx-editor,
.django-markdownx textarea {
    width: 100% !important;
    min-height: 28rem !important;
    padding: 1rem !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 0.9rem !important;
    font: 0.96rem/1.7 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace !important;
    resize: vertical !important;
}

.markdownx-preview {
    padding: 1rem;
}

.password-strength-meter {
    height: 0.4rem;
    overflow: hidden;
    border-radius: 999px;
    background: var(--border-color);
}

.password-strength-bar {
    width: 0;
    height: 100%;
    border-radius: inherit;
    transition: width var(--transition-speed), background-color var(--transition-speed);
}

.site-footer {
    margin-top: 5rem;
    color: #b9b9c9;
    background: #17172b;
}

.site-footer h5 {
    color: #fff;
}

.site-footer .text-muted {
    color: #aaaabd !important;
}

.reading-progress {
    position: fixed;
    z-index: 1100;
    top: 0;
    right: 0;
    left: 0;
    height: 3px;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-fast);
}

.reading-progress.is-visible {
    opacity: 1;
}

.reading-progress span {
    display: block;
    width: 100%;
    height: 100%;
    transform: scaleX(0);
    transform-origin: left center;
    background: linear-gradient(90deg, #7768ee, #ec4899);
    box-shadow: 0 0 10px rgba(91, 75, 219, 0.45);
}

.back-to-top {
    position: fixed;
    z-index: 1020;
    right: 1.35rem;
    bottom: 1.35rem;
    display: grid;
    width: 3rem;
    height: 3rem;
    padding: 0;
    place-items: center;
    color: #fff;
    border: 0;
    border-radius: 50%;
    background: var(--primary-color);
    box-shadow: 0 12px 28px rgba(91, 75, 219, 0.32);
    opacity: 0;
    transform: translateY(0.75rem) scale(0.9);
    pointer-events: none;
    transition: opacity var(--transition-speed), transform var(--transition-speed), background-color var(--transition-fast);
}

.back-to-top:hover {
    background: var(--primary-hover);
}

.back-to-top.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.site-toast {
    position: fixed;
    z-index: 1200;
    left: 50%;
    bottom: 1.5rem;
    max-width: min(90vw, 24rem);
    padding: 0.75rem 1rem;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    background: rgba(23, 23, 43, 0.94);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    transform: translate(-50%, 1rem);
    pointer-events: none;
    transition: opacity var(--transition-speed), transform var(--transition-speed);
    backdrop-filter: blur(12px);
}

.site-toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

.reveal-item {
    opacity: 0;
    transform: translateY(1.25rem);
    transition: opacity 520ms ease, transform 520ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.reveal-item.is-revealed {
    opacity: 1;
    transform: translateY(0);
}

.icon-pop {
    animation: icon-pop 420ms cubic-bezier(0.2, 0.9, 0.3, 1.4);
}

@keyframes icon-pop {
    0% { transform: scale(1); }
    45% { transform: scale(1.45) rotate(-8deg); }
    100% { transform: scale(1); }
}

.min-vh-75 {
    min-height: 70vh;
}

/* Homepage */
.page-section {
    padding-block: clamp(3.5rem, 7vw, 6.5rem);
}

.section-heading {
    display: flex;
    gap: 2rem;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.section-heading h1,
.section-heading h2 {
    margin: 0;
    font-size: clamp(2rem, 1.65rem + 1.2vw, 3rem);
    text-wrap: balance;
}

.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.65rem;
    color: var(--primary-color);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.section-kicker--light {
    color: #c9c3ff;
}

.home-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(22rem, 0.75fr);
    gap: clamp(2rem, 5vw, 5rem);
    align-items: center;
    min-height: clamp(42rem, 78vh, 52rem);
    padding-block: clamp(3rem, 7vw, 6rem);
}

.home-hero__content h1 {
    max-width: 13ch;
    margin-bottom: 1.25rem;
    font-size: clamp(2.75rem, 3.5vw + 1rem, 5.6rem);
    line-height: 0.98;
    letter-spacing: -0.06em;
    text-wrap: balance;
}

.home-hero__content > p {
    max-width: 42rem;
    margin-bottom: 1.75rem;
    color: var(--muted-color);
    font-size: clamp(1.05rem, 0.95rem + 0.4vw, 1.3rem);
}

.hero-search {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 0.7rem;
    align-items: center;
    max-width: 43rem;
    padding: 0.55rem;
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    background: #fff;
    box-shadow: var(--shadow-md);
}

.hero-search > .bi {
    margin-left: 0.65rem;
    color: var(--muted-color);
}

.hero-search input {
    width: 100%;
    min-width: 0;
    padding: 0.7rem 0;
    border: 0;
    outline: 0;
    background: transparent;
}

.home-hero__actions {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    margin-top: 1.25rem;
}

.hero-trust {
    display: flex;
    gap: 0.7rem 1.25rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
    color: var(--muted-color);
    font-size: 0.86rem;
}

.hero-trust span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.hero-trust .bi {
    color: #16a34a;
}

.hero-feature {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    min-height: 34rem;
    border-radius: 2rem;
    box-shadow: var(--shadow-lg);
}

.hero-feature > img {
    position: absolute;
    z-index: -2;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-feature__overlay {
    position: absolute;
    z-index: -1;
    inset: 0;
    background: linear-gradient(180deg, rgba(10, 9, 30, 0.04) 10%, rgba(10, 9, 30, 0.9) 90%);
}

.hero-feature__content {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    padding: clamp(1.5rem, 4vw, 2.5rem);
    color: #fff;
}

.hero-feature .badge {
    color: #241e66;
    background: #fff;
}

.hero-feature .badge-ghost {
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(10px);
}

.hero-feature h2 {
    margin: 1rem 0 0.5rem;
    font-size: clamp(2rem, 3vw, 3.4rem);
}

.hero-feature h2 a {
    color: #fff;
    text-decoration: none;
}

.hero-feature p {
    color: rgba(255, 255, 255, 0.78);
}

.hero-feature--empty {
    display: grid;
    padding: 3rem;
    place-content: center;
    text-align: center;
    border: 1px dashed #c9c3fb;
    background: var(--primary-soft);
}

.hero-feature--empty > .bi {
    width: auto;
    height: auto;
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-size: 4rem;
}

.story-meta {
    display: flex;
    gap: 0.55rem;
    align-items: center;
    font-size: 0.88rem;
}

.story-meta img {
    width: 2rem;
    height: 2rem;
    object-fit: cover;
    border-radius: 50%;
}

.story-meta--light {
    color: rgba(255, 255, 255, 0.9);
}

.category-strip-section {
    padding-top: 1rem;
}

.category-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.8rem;
}

.category-chip {
    display: flex;
    gap: 0.8rem;
    align-items: center;
    min-width: 0;
    padding: 1rem;
    color: var(--text-color);
    text-decoration: none;
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    background: #fff;
    transition: border-color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
}

.category-chip:hover {
    color: var(--text-color);
    border-color: #c9c3fb;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.category-chip__icon {
    display: grid;
    width: 2.75rem;
    height: 2.75rem;
    flex: 0 0 auto;
    place-items: center;
    color: var(--primary-color);
    border-radius: 0.8rem;
    background: var(--primary-soft);
}

.category-chip > span:nth-child(2) {
    display: flex;
    min-width: 0;
    flex: 1;
    flex-direction: column;
}

.category-chip strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.category-chip small {
    color: var(--muted-color);
}

.popular-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
}

.popular-story {
    display: grid;
    grid-template-columns: 8.5rem minmax(0, 1fr);
    overflow: hidden;
    min-height: 13rem;
    border: 1px solid var(--border-color);
    border-radius: 1.25rem;
    background: #fff;
    box-shadow: var(--shadow-sm);
}

.popular-story__cover {
    position: relative;
    overflow: hidden;
}

.popular-story__cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 500ms ease;
}

.popular-story:hover .popular-story__cover img {
    transform: scale(1.05);
}

.popular-story__rank {
    position: absolute;
    bottom: 0.6rem;
    left: 0.6rem;
    color: #fff;
    font-size: 1.8rem;
    font-weight: 900;
    text-shadow: 0 2px 12px #000;
}

.popular-story__body {
    display: flex;
    min-width: 0;
    padding: 1.1rem;
    flex-direction: column;
}

.story-category {
    margin-bottom: 0.4rem;
    color: var(--primary-color);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-decoration: none;
    text-transform: uppercase;
}

.popular-story h3 {
    margin-bottom: 0.4rem;
    font-size: 1.1rem;
}

.popular-story h3 a {
    color: var(--dark-color);
    text-decoration: none;
}

.popular-story p {
    display: -webkit-box;
    overflow: hidden;
    margin-bottom: 0.75rem;
    color: var(--muted-color);
    font-size: 0.86rem;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.story-stats {
    display: flex;
    gap: 0.8rem;
    align-items: center;
    margin-top: auto;
    color: var(--muted-color);
    font-size: 0.78rem;
}

.story-stats span {
    display: inline-flex;
    gap: 0.28rem;
    align-items: center;
    white-space: nowrap;
}

.story-grid-card__cover {
    position: relative;
    overflow: hidden;
}

.story-grid-card__cover img {
    transition: transform 500ms ease;
}

.story-grid-card:hover .story-grid-card__cover img {
    transform: scale(1.035);
}

.story-grid-card__category {
    position: absolute;
    top: 0.9rem;
    left: 0.9rem;
    padding: 0.35rem 0.65rem;
    color: #fff;
    border-radius: 999px;
    background: rgba(23, 23, 43, 0.72);
    font-size: 0.72rem;
    font-weight: 700;
    backdrop-filter: blur(10px);
}

.story-grid-card .card-title {
    font-size: 1.2rem;
}

.authors-section {
    padding-top: 2rem;
}

.authors-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.author-card {
    display: flex;
    gap: 0.85rem;
    align-items: center;
    min-width: 0;
    padding: 1rem;
    color: var(--text-color);
    text-decoration: none;
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    background: #fff;
    box-shadow: var(--shadow-sm);
}

.author-card:hover {
    color: var(--text-color);
}

.author-card > img {
    width: 3.25rem;
    height: 3.25rem;
    flex: 0 0 auto;
    object-fit: cover;
    border-radius: 50%;
}

.author-card__body {
    display: flex;
    min-width: 0;
    flex: 1;
    flex-direction: column;
}

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

.author-card__body small {
    color: var(--muted-color);
}

.creator-cta {
    display: flex;
    gap: 2rem;
    align-items: center;
    justify-content: space-between;
    margin-block: 3rem 6rem;
    padding: clamp(2rem, 5vw, 4rem);
    color: #fff;
    border-radius: 2rem;
    background:
        radial-gradient(circle at 80% 20%, rgba(236, 72, 153, 0.3), transparent 22rem),
        linear-gradient(135deg, #25205e, #17172b);
    box-shadow: var(--shadow-lg);
}

.creator-cta h2 {
    margin-bottom: 0.5rem;
    color: #fff;
    font-size: clamp(2rem, 4vw, 3.5rem);
}

.creator-cta p {
    max-width: 42rem;
    margin: 0;
    color: rgba(255, 255, 255, 0.72);
}

.empty-state {
    padding: 4rem 2rem;
    text-align: center;
    border: 1px dashed #c9c3fb;
    border-radius: 1.5rem;
    background: var(--primary-soft);
}

.empty-state > .bi {
    width: auto;
    height: auto;
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-size: 3rem;
}

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

.search-results-page {
    min-height: 70vh;
}

@media (max-width: 1199.98px) {
    .popular-grid {
        grid-template-columns: 1fr;
    }

    .popular-story {
        grid-template-columns: 11rem minmax(0, 1fr);
    }

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

@media (max-width: 991.98px) {
    .site-navbar .container {
        min-height: 4rem;
    }

    .navbar-collapse {
        margin-top: 0.8rem;
        padding: 1rem;
        border: 1px solid var(--border-color);
        border-radius: 1rem;
        background: #fff;
        box-shadow: var(--shadow-md);
    }

    .site-search {
        width: 100%;
        margin: 0 0 0.8rem !important;
    }

    .navbar-nav {
        align-items: stretch !important;
        gap: 0.5rem;
    }

    .navbar-nav .btn {
        width: 100%;
        justify-content: center;
        margin: 0 !important;
    }

    .hero-section {
        min-height: 27rem !important;
        border-radius: 1.25rem;
    }

    .home-hero {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .home-hero__content h1 {
        max-width: 15ch;
    }

    .hero-feature {
        min-height: 30rem;
    }
}

@media (max-width: 767.98px) {
    .site-main {
        padding-inline: 0.75rem !important;
        margin-top: 1rem !important;
    }

    .hero-section {
        min-height: 24rem !important;
        border-radius: 1rem;
    }

    .hero-title {
        font-size: clamp(2rem, 10vw, 3rem);
    }

    .card-body {
        padding: 1.1rem;
    }

    .card-img-top {
        height: 11rem;
    }

    article {
        padding: 1.15rem !important;
    }

    article h1 {
        font-size: clamp(1.8rem, 9vw, 2.5rem);
    }

    .comments-section .d-flex.align-items-start {
        gap: 0.25rem;
    }

    .comments-section img.rounded-circle {
        width: 2.5rem;
        height: 2.5rem;
        margin-right: 0.7rem !important;
    }

    .markdownx textarea,
    textarea.markdownx-editor,
    .django-markdownx textarea {
        min-height: 20rem !important;
    }

    .site-footer {
        text-align: center;
    }

    .site-footer .text-md-end {
        margin-top: 1rem;
        text-align: center !important;
    }

    .back-to-top {
        right: 1rem;
        bottom: 1rem;
        width: 2.75rem;
        height: 2.75rem;
    }

    .page-section {
        padding-block: 3.5rem;
    }

    .section-heading,
    .creator-cta {
        align-items: flex-start;
        flex-direction: column;
    }

    .home-hero {
        padding-top: 2rem;
    }

    .home-hero__content h1 {
        font-size: clamp(2.7rem, 14vw, 4rem);
    }

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

    .hero-search .btn {
        grid-column: 1 / -1;
        width: 100%;
    }

    .home-hero__actions .btn {
        width: 100%;
    }

    .hero-trust {
        align-items: flex-start;
        flex-direction: column;
    }

    .hero-feature {
        min-height: 27rem;
        border-radius: 1.25rem;
    }

    .category-strip,
    .authors-grid {
        grid-template-columns: 1fr;
    }

    .popular-story {
        grid-template-columns: 7.5rem minmax(0, 1fr);
    }

    .creator-cta {
        margin-bottom: 4rem;
        border-radius: 1.25rem;
    }

    .creator-cta .btn {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }


    .reveal-item {
        opacity: 1;
        transform: none;
    }
}

/* Inner pages: shared visual language */
.modern-page {
    position: relative;
    padding-top: 1rem;
    padding-bottom: 4rem;
}

.modern-page::before {
    position: absolute;
    z-index: -1;
    top: -5rem;
    right: -8rem;
    width: 24rem;
    height: 24rem;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(91, 75, 219, .14), transparent 68%);
    content: "";
    pointer-events: none;
}

.modern-page .breadcrumb {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 1.75rem;
    padding: .62rem 1rem;
    border: 1px solid rgba(91, 75, 219, .12);
    border-radius: 999px;
    background: rgba(255, 255, 255, .78);
    box-shadow: 0 .5rem 1.5rem rgba(32, 25, 77, .06);
    backdrop-filter: blur(14px);
}

.modern-page .breadcrumb a { color: var(--primary-color); text-decoration: none; }
.modern-page .breadcrumb-item.active { color: var(--muted-color); }

.modern-page > .d-flex:first-child,
.modern-page > .mb-5,
.modern-page > .row > [class*="col-"] > h1,
.editor-page .col-lg-10 > h1,
.profile-edit-page .col-lg-10 > h1 {
    position: relative;
}

.modern-page h1 {
    letter-spacing: -.045em;
    line-height: 1.05;
}

.modern-page h2 { letter-spacing: -.025em; }

.modern-page .card,
.modern-page article.bg-white,
.modern-page .alert-light {
    overflow: hidden;
    border: 1px solid rgba(34, 27, 78, .09) !important;
    border-radius: 1.35rem !important;
    background: rgba(255, 255, 255, .9) !important;
    box-shadow: 0 1.1rem 3rem rgba(32, 25, 77, .09) !important;
    backdrop-filter: blur(16px);
}

.modern-page .card-header {
    padding: 1.15rem 1.35rem;
    border-bottom: 1px solid rgba(34, 27, 78, .08) !important;
    background: linear-gradient(135deg, rgba(91, 75, 219, .07), rgba(255, 255, 255, .9)) !important;
}

.modern-page .btn { min-height: 2.7rem; }
.modern-page .btn-sm { min-height: 2.2rem; }

.modern-page .form-control,
.modern-page .form-select,
.modern-page .input-group-text {
    min-height: 3rem;
    border-color: rgba(34, 27, 78, .13);
    background-color: rgba(248, 247, 253, .9);
}

.modern-page textarea.form-control { min-height: 10rem; }
.modern-page .form-control:focus,
.modern-page .form-select:focus {
    border-color: rgba(91, 75, 219, .55);
    background: #fff;
    box-shadow: 0 0 0 .25rem rgba(91, 75, 219, .12);
}

/* Story reading page */
.story-detail-page article {
    position: relative;
    padding: clamp(1.4rem, 4vw, 3.5rem) !important;
}

.story-detail-page article::before {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: .35rem;
    background: linear-gradient(90deg, var(--primary-color), #9d79ff, #ff8c69);
    content: "";
}

.story-detail-page article header h1 {
    max-width: 18ch;
    font-size: clamp(2.25rem, 6vw, 4.4rem);
}

.story-detail-page article > .mb-4 img {
    max-height: 34rem;
    border-radius: 1.1rem !important;
    object-fit: cover;
}

.story-detail-page .story-content {
    color: #29243d;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.08rem, 1.5vw, 1.22rem);
    line-height: 1.9;
}

.story-detail-page .story-content p { margin-bottom: 1.45em; }
.story-detail-page .story-content h2,
.story-detail-page .story-content h3 { margin-top: 1.8em; font-family: inherit; }
.story-detail-page article .btn-link { border-radius: .8rem; }
.story-detail-page article .btn-link:hover { background: var(--primary-soft); }

/* Author and category */
.author-page > .card:first-of-type,
.category-page > .mb-5 {
    position: relative;
    padding: clamp(1.25rem, 3vw, 2.25rem);
    border: 1px solid rgba(91, 75, 219, .1);
    border-radius: 1.6rem;
    background: linear-gradient(135deg, #fff 35%, #f0edff 100%);
    box-shadow: 0 1.3rem 3.5rem rgba(32, 25, 77, .09);
}

.author-page > .card:first-of-type .card-body { padding: 0; }
.author-page img.rounded-circle {
    width: 9rem !important;
    height: 9rem !important;
    border: .35rem solid #fff;
    object-fit: cover;
}

.author-page .bg-light.rounded {
    height: 100%;
    border: 1px solid rgba(91, 75, 219, .1);
    border-radius: 1rem !important;
    background: rgba(255, 255, 255, .8) !important;
}

.category-page > .mb-5 > .d-flex > .bg-primary {
    width: 4.5rem !important;
    height: 4.5rem !important;
    box-shadow: 0 .8rem 2rem rgba(91, 75, 219, .28);
}

/* Dashboard */
.dashboard-page > .d-flex:first-child {
    padding: 1.6rem 1.8rem;
    border-radius: 1.45rem;
    color: #fff;
    background: linear-gradient(125deg, #241c55, #5b4bdb 64%, #806cff);
    box-shadow: 0 1.25rem 3rem rgba(49, 37, 125, .22);
}

.dashboard-page > .d-flex:first-child h1 { margin: 0; }
.dashboard-page > .d-flex:first-child .btn { border-color: #fff; background: #fff; color: var(--primary-color); }
.dashboard-page .card-img-top { height: 15rem; object-fit: cover; }
.dashboard-page .list-group-item { padding: 1rem 1.25rem; border-color: rgba(34, 27, 78, .07); background: transparent; }
.dashboard-page .nav-tabs {
    gap: .45rem;
    padding: .42rem;
    border: 1px solid rgba(34, 27, 78, .08);
    border-radius: 1rem;
    background: #fff;
}
.dashboard-page .nav-tabs .nav-link { border: 0; border-radius: .75rem; color: var(--muted-color); }
.dashboard-page .nav-tabs .nav-link.active { color: var(--primary-color); background: var(--primary-soft); }

/* Editors and account forms */
.editor-page .col-lg-10 > h1,
.profile-edit-page .col-lg-10 > h1 {
    margin-bottom: 1.4rem !important;
    padding: 1.6rem 1.8rem;
    border-radius: 1.35rem;
    color: #fff;
    background: linear-gradient(125deg, #241c55, #5b4bdb);
    box-shadow: 0 1.1rem 2.8rem rgba(49, 37, 125, .2);
}

.editor-page .card-body,
.profile-edit-page .card-body { padding: clamp(1.3rem, 4vw, 2.5rem) !important; }
.editor-page #currentCover,
.editor-page #coverPreviewImage { border-radius: 1rem !important; }
.profile-edit-page #avatarPreview { border: .4rem solid #fff; box-shadow: 0 1rem 2.5rem rgba(32, 25, 77, .16) !important; }

/* Authentication */
.auth-page { max-width: 74rem; }
.auth-page > .row { min-height: calc(100vh - 14rem); }
.auth-page .card { position: relative; }
.auth-page .card::before {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: .3rem;
    background: linear-gradient(90deg, var(--primary-color), #a578ff, #ff8c69);
    content: "";
}
.auth-page .display-3 {
    display: inline-grid;
    width: 5rem;
    height: 5rem;
    place-items: center;
    border-radius: 1.4rem;
    background: var(--primary-soft);
    box-shadow: 0 .9rem 2.2rem rgba(91, 75, 219, .14);
}

/* Delete confirmation */
.delete-page > .row .alert-danger {
    border-radius: 1.35rem;
    background: linear-gradient(135deg, #fff1f2, #fff) !important;
    box-shadow: 0 1rem 2.6rem rgba(163, 38, 57, .1);
}

@media (max-width: 767.98px) {
    .modern-page { padding-top: .25rem; padding-bottom: 2.5rem; }
    .modern-page .breadcrumb { display: flex; border-radius: 1rem; }
    .dashboard-page > .d-flex:first-child { align-items: stretch !important; flex-direction: column; gap: 1rem; }
    .dashboard-page > .d-flex:first-child .btn { width: 100%; }
    .story-detail-page article header h1 { font-size: clamp(2rem, 11vw, 3rem); }
    .author-page > .card:first-of-type,
    .category-page > .mb-5 { padding: 1.15rem; border-radius: 1.25rem; }
    .editor-page .col-lg-10 > h1,
    .profile-edit-page .col-lg-10 > h1 { padding: 1.25rem; font-size: 1.8rem; }
    .auth-page > .row { min-height: auto; padding-top: 1rem !important; }
    .auth-page { width: 100%; padding-inline: 0 !important; }
    .auth-page > .row { width: 100%; margin-inline: 0; }
    .auth-page > .row > [class*="col-"] { width: 100%; min-width: 0; padding-inline: 0; }
    .auth-page .card { width: 100%; }
    .auth-page .card-body { padding: 1.4rem !important; }
    .auth-page .input-group { min-width: 0; flex-wrap: nowrap; }
    .auth-page .input-group .form-control { min-width: 0; }
    .auth-page .form-text,
    .auth-page .form-text li { overflow-wrap: anywhere; }
}
/* Focused story editor */
.writer-page{max-width:96rem}.writer-topbar{display:flex;align-items:flex-end;justify-content:space-between;gap:2rem;margin-bottom:1.35rem;padding:1rem .25rem}.writer-topbar h1{margin:.45rem 0 .35rem;font-size:clamp(2rem,4vw,3.2rem)}.writer-back{color:var(--muted-color);font-size:.9rem;font-weight:650;text-decoration:none}.writer-back:hover{color:var(--primary-color)}.writer-save-state{margin:0;color:var(--muted-color);font-size:.88rem}.writer-save-state .bi{margin-right:.3rem;color:#22a06b}.writer-topbar__actions{display:flex;gap:.65rem}.writer-topbar__actions .btn{white-space:nowrap}.draft-restore{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin-bottom:1rem;padding:.8rem 1rem;border:1px solid #d8d2ff;border-radius:1rem;background:#f4f1ff;color:#37305b;font-size:.9rem}.draft-restore[hidden]{display:none}.draft-restore>div:first-child{display:flex;align-items:center;gap:.65rem}.writer-layout{display:grid;grid-template-columns:minmax(0,1fr) 22rem;align-items:start;gap:1.4rem}.writer-canvas{min-width:0}.writer-paper{overflow:hidden;min-height:46rem;border:1px solid rgba(34,27,78,.08);border-radius:1.5rem;background:rgba(255,255,255,.96);box-shadow:0 1.4rem 4rem rgba(32,25,77,.09)}.writer-title-field{position:relative;padding:clamp(1.5rem,4vw,3.4rem) clamp(1.4rem,5vw,4.2rem) 1.4rem}.writer-title-input.form-control{height:auto;padding:0 4.5rem .75rem 0;border:0;border-bottom:1px solid rgba(34,27,78,.09);border-radius:0;background:transparent;color:#1c1830;font-family:Georgia,"Times New Roman",serif;font-size:clamp(2rem,5vw,3.6rem);font-weight:700;letter-spacing:-.045em;line-height:1.08}.writer-title-input.form-control:focus{border-color:rgba(91,75,219,.35);box-shadow:none}.writer-title-field>span{position:absolute;right:clamp(1.4rem,5vw,4.2rem);bottom:1.85rem;color:#aaa5bb;font-size:.75rem}.writer-toolbar{position:sticky;z-index:4;top:5rem;display:flex;align-items:center;gap:.25rem;margin-inline:clamp(1.4rem,5vw,4.2rem);padding:.55rem 0;border-bottom:1px solid rgba(34,27,78,.08);background:rgba(255,255,255,.95);backdrop-filter:blur(10px)}.writer-toolbar button{display:grid;width:2.4rem;height:2.4rem;padding:0;place-items:center;border:0;border-radius:.65rem;color:#49435f;background:transparent}.writer-toolbar button:hover{color:var(--primary-color);background:var(--primary-soft)}.writer-toolbar>span{width:1px;height:1.4rem;margin-inline:.3rem;background:var(--border-color)}.writer-content-field{padding:1rem clamp(1.4rem,5vw,4.2rem) 0}.writer-content-field .markdownx{display:block}.writer-content-field .markdownx-editor{width:100%}.writer-content-field .markdownx-preview{display:none}.writer-textarea.form-control{width:100%!important;min-height:32rem!important;padding:.7rem 0 2rem;resize:vertical;border:0;background:transparent;color:#29243d;font-family:Georgia,"Times New Roman",serif;font-size:1.16rem;line-height:1.9}.writer-textarea.form-control:focus{box-shadow:none}.writer-metrics{display:flex;flex-wrap:wrap;gap:1.2rem;padding:.9rem clamp(1.4rem,5vw,4.2rem);border-top:1px solid rgba(34,27,78,.07);color:var(--muted-color);font-size:.8rem}.writer-metrics strong{color:#3f3954;font-weight:650}.writer-sidebar{position:sticky;top:6rem;display:grid;gap:1rem}.writer-sidecard{padding:1.15rem;border:1px solid rgba(34,27,78,.08);border-radius:1.2rem;background:rgba(255,255,255,.92);box-shadow:0 .85rem 2.5rem rgba(32,25,77,.07)}.writer-sidecard__heading{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;margin-bottom:1rem;font-weight:750}.writer-sidecard__heading div{display:grid}.writer-sidecard__heading small{margin-top:.15rem;color:var(--muted-color);font-size:.7rem;font-weight:450}.writer-sidecard__heading>.bi{color:var(--primary-color)}.cover-dropzone{display:grid;overflow:hidden;min-height:11rem;place-items:center;border:1.5px dashed #c9c2eb;border-radius:1rem;background:#f8f7fc;cursor:pointer;transition:.2s ease}.cover-dropzone:hover,.cover-dropzone.is-dragging{border-color:var(--primary-color);background:var(--primary-soft);transform:translateY(-2px)}.cover-dropzone img{width:100%;height:11rem;object-fit:cover}.cover-dropzone span{display:grid;justify-items:center;gap:.25rem;padding:1rem;color:var(--muted-color);text-align:center}.cover-dropzone span .bi{color:var(--primary-color);font-size:2rem}.cover-dropzone span strong{color:#403a56;font-size:.84rem}.cover-dropzone span small{font-size:.72rem}.writer-help{display:block;margin-top:.55rem;color:var(--muted-color);font-size:.68rem}.writer-remove-cover{width:100%;min-height:2rem!important;margin-top:.25rem;color:#b4233d;font-size:.75rem}.writer-field+.writer-field{margin-top:1rem}.writer-field label{display:block;margin-bottom:.4rem;color:#3d374f;font-size:.78rem;font-weight:700}.writer-field .form-control,.writer-field .form-select{min-height:2.8rem;font-size:.86rem}.writer-field textarea.form-control{min-height:7.5rem;resize:vertical}.writer-field-meta{display:flex;justify-content:space-between;gap:.5rem;margin-top:.35rem;color:var(--muted-color);font-size:.68rem}.field-error{margin-top:.45rem;color:#c6203e;font-size:.78rem}.writer-tip{display:flex;gap:.8rem;background:linear-gradient(135deg,#f1efff,#fff)}.writer-tip>.bi{color:#e29b12;font-size:1.25rem}.writer-tip strong{font-size:.8rem}.writer-tip p{margin:.25rem 0 0;color:var(--muted-color);font-size:.72rem;line-height:1.5}.writer-delete{padding:.5rem;color:#b4233d;font-size:.8rem;text-align:center;text-decoration:none}.writer-preview{padding:clamp(1.5rem,5vw,4.2rem)}.writer-preview[hidden]{display:none}.writer-preview__label{color:var(--primary-color);font-size:.75rem;font-weight:800;letter-spacing:.09em;text-transform:uppercase}.writer-preview>h1{max-width:18ch;font-size:clamp(2.4rem,6vw,4.5rem)}.writer-preview__excerpt{color:var(--muted-color);font-size:1.2rem}.writer-preview .story-content{margin-top:2.5rem}.writer-mobile-actions{display:none}
@media(max-width:991.98px){.writer-layout{grid-template-columns:1fr}.writer-sidebar{position:static;grid-template-columns:repeat(2,minmax(0,1fr))}.writer-cover-card{grid-row:span 2}.writer-delete{grid-column:1/-1}}
@media(max-width:767.98px){.writer-page{padding-inline:0!important}.writer-topbar{align-items:flex-start;padding-inline:.2rem}.writer-topbar__actions .btn-light,.writer-topbar__actions .btn-primary{display:none}.writer-topbar__actions .btn span{display:none}.writer-paper{min-height:38rem;border-radius:1.15rem}.writer-sidebar{grid-template-columns:1fr}.writer-title-field{padding-top:1.5rem}.writer-toolbar{top:4.4rem;overflow-x:auto}.writer-textarea.form-control{min-height:27rem!important}.writer-mobile-actions{position:sticky;z-index:8;bottom:.7rem;display:grid;grid-template-columns:1fr 1.3fr;gap:.6rem;margin-top:1rem;padding:.65rem;border:1px solid rgba(34,27,78,.1);border-radius:1rem;background:rgba(255,255,255,.92);box-shadow:0 1rem 3rem rgba(32,25,77,.18);backdrop-filter:blur(15px)}.draft-restore{align-items:flex-start;flex-direction:column}}

/* TipTap visual editor */
.visual-editor__content{min-height:32rem;padding:.7rem 0 2rem;outline:0;color:#29243d;font-family:Georgia,"Times New Roman",serif;font-size:1.16rem;line-height:1.9}.visual-editor__content>*+*{margin-top:1em}.visual-editor__content p{margin-bottom:1em}.visual-editor__content h2,.visual-editor__content h3{margin:1.5em 0 .55em;color:#1f1a35;line-height:1.25}.visual-editor__content h2{font-size:1.85rem}.visual-editor__content h3{font-size:1.4rem}.visual-editor__content blockquote{margin:1.5rem 0;padding:.7rem 1.1rem;border-left:.25rem solid var(--primary-color);border-radius:0 .65rem .65rem 0;background:var(--primary-soft);color:#4c4567}.visual-editor__content ul,.visual-editor__content ol{padding-left:1.6rem}.visual-editor__content a{color:var(--primary-color);text-decoration:underline}.visual-editor__content p.is-editor-empty:first-child::before{float:left;height:0;color:#aaa5bb;content:attr(data-placeholder);pointer-events:none}.writer-toolbar button.is-active{color:var(--primary-color);background:var(--primary-soft);box-shadow:inset 0 0 0 1px rgba(91,75,219,.12)}.writer-content-field:focus-within{background:linear-gradient(90deg,rgba(91,75,219,.025),transparent 20%)}
@media(max-width:767.98px){.visual-editor__content{min-height:27rem;font-size:1.05rem}.visual-editor__content h2{font-size:1.55rem}}

/* Server revisions */
.revision-card #revisionList{display:grid;gap:.35rem}.revision-card #revisionList button{display:grid;padding:.55rem .6rem;border:1px solid transparent;border-radius:.65rem;color:var(--dark-color);background:var(--surface-muted);text-align:left}.revision-card #revisionList button:hover{border-color:var(--primary-color);background:var(--primary-soft)}.revision-card #revisionList strong{font-size:.68rem}.revision-card #revisionList small{overflow:hidden;color:var(--muted-color);font-size:.6rem;text-overflow:ellipsis;white-space:nowrap}

/* Advanced story editor */
.writer-content-field{position:relative}.slash-menu{position:absolute;z-index:12;top:4rem;left:clamp(1.4rem,5vw,4.2rem);display:grid;width:min(22rem,calc(100% - 2.8rem));padding:.5rem;border:1px solid var(--border-color);border-radius:1rem;background:var(--surface-color);box-shadow:var(--shadow-lg)}.slash-menu[hidden]{display:none}.slash-menu>span{padding:.45rem .55rem;color:var(--muted-color);font-size:.62rem;font-weight:800;text-transform:uppercase;letter-spacing:.08em}.slash-menu>button{display:grid;grid-template-columns:2rem minmax(0,1fr);column-gap:.55rem;padding:.55rem;border:0;border-radius:.65rem;color:var(--dark-color);background:transparent;text-align:left}.slash-menu>button:hover{color:var(--primary-color);background:var(--primary-soft)}.slash-menu>button i{grid-row:1/3;display:grid;width:2rem;height:2rem;place-items:center;border-radius:.55rem;background:var(--surface-muted)}.slash-menu>button strong{font-size:.72rem}.slash-menu>button small{color:var(--muted-color);font-size:.62rem}.readiness-card .writer-sidecard__heading>strong{color:var(--primary-color);font-size:1.25rem}.readiness-progress{height:.4rem;overflow:hidden;margin-bottom:.85rem;border-radius:1rem;background:var(--surface-muted)}.readiness-progress span{display:block;width:0;height:100%;border-radius:inherit;background:linear-gradient(90deg,#5b4bdb,#18a7b8);transition:width .3s ease}.readiness-card ul{display:grid;gap:.45rem;margin:0;padding:0;list-style:none}.readiness-card li{display:flex;align-items:center;gap:.45rem;color:var(--muted-color);font-size:.68rem}.readiness-card li i{color:#aaa5b5}.readiness-card li.is-ready{color:var(--dark-color)}.readiness-card li.is-ready i{color:#22a06b}.outline-card nav{display:grid;gap:.2rem}.outline-card nav p{margin:0;color:var(--muted-color);font-size:.68rem;line-height:1.5}.outline-card nav button{overflow:hidden;padding:.45rem .5rem;border:0;border-radius:.55rem;color:var(--muted-color);background:transparent;font-size:.68rem;text-align:left;text-overflow:ellipsis;white-space:nowrap}.outline-card nav button:hover{color:var(--primary-color);background:var(--primary-soft)}.outline-card .outline-level-3{padding-left:1.2rem;font-size:.64rem}.preview-devices{position:absolute;top:1rem;right:1rem;display:flex;gap:.2rem;padding:.2rem;border-radius:.7rem;background:var(--surface-muted)}.writer-preview{position:relative;transition:width .25s ease}.preview-devices button{display:grid;width:2rem;height:2rem;place-items:center;border:0;border-radius:.55rem;color:var(--muted-color);background:transparent}.preview-devices button.is-active{color:var(--primary-color);background:var(--surface-color);box-shadow:var(--shadow-sm)}.writer-preview[data-device="tablet"]{width:min(100%,48rem);margin-inline:auto}.writer-preview[data-device="mobile"]{width:min(100%,25rem);margin-inline:auto;border-radius:1.5rem}.writer-preview[data-device="mobile"]>h1{font-size:2.2rem}.writer-save-state .bi-wifi-off{color:#d58a00}
@media(max-width:767.98px){.readiness-card{order:-2}.outline-card{order:-1}.preview-devices{position:static;width:max-content;margin:0 0 1rem auto}.slash-menu{position:fixed;top:auto;right:.75rem;bottom:5.5rem;left:.75rem;width:auto;max-height:55vh;overflow-y:auto}}

/* Creator dashboard */
.creator-dashboard{max-width:96rem}.creator-dashboard__header{display:flex;align-items:center;justify-content:space-between;gap:2rem;margin-bottom:1.5rem}.creator-welcome{display:flex;align-items:center;gap:1rem}.creator-welcome>img{width:4.2rem;height:4.2rem;border:.25rem solid #fff;border-radius:1.25rem;box-shadow:0 .7rem 2rem rgba(32,25,77,.14);object-fit:cover}.creator-welcome h1{margin:.1rem 0 .2rem;font-size:clamp(1.8rem,4vw,2.75rem)}.creator-welcome p{margin:0;color:var(--muted-color)}.dashboard-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:1rem;margin-bottom:1rem}.metric-card{display:flex;align-items:center;gap:1rem;padding:1.25rem;border:1px solid rgba(34,27,78,.07);border-radius:1.25rem;background:rgba(255,255,255,.92);box-shadow:0 .8rem 2.5rem rgba(32,25,77,.07)}.metric-card>.bi{display:grid;width:3.2rem;height:3.2rem;flex:0 0 auto;place-items:center;border-radius:1rem;font-size:1.35rem}.metric-card>div{display:grid}.metric-card span{color:var(--muted-color);font-size:.76rem;font-weight:650}.metric-card strong{color:#231e38;font-size:1.85rem;line-height:1.15}.metric-card small{color:#aaa5b5;font-size:.65rem}.metric-card--violet>.bi{color:#5b4bdb;background:#eeecff}.metric-card--amber>.bi{color:#b9790c;background:#fff5d9}.metric-card--rose>.bi{color:#d23b62;background:#ffebf0}.metric-card--cyan>.bi{color:#168b9c;background:#e6f8fa}.continue-draft{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:1.2rem;margin-bottom:1rem;padding:1.25rem 1.4rem;border-radius:1.3rem;color:#fff;background:linear-gradient(120deg,#251d58,#5b4bdb 62%,#806cff);box-shadow:0 1rem 2.8rem rgba(49,37,125,.2)}.continue-draft__icon{display:grid;width:3.6rem;height:3.6rem;place-items:center;border-radius:1rem;background:rgba(255,255,255,.13);font-size:1.4rem}.continue-draft__content>span{color:#d5d0ff;font-size:.7rem;font-weight:750;text-transform:uppercase;letter-spacing:.08em}.continue-draft h2{margin:.15rem 0;font-size:1.25rem}.continue-draft p{overflow:hidden;margin:0;color:#e5e1ff;font-size:.8rem;text-overflow:ellipsis;white-space:nowrap}.continue-draft small{color:#bdb6ef;font-size:.68rem}.continue-draft .btn{color:#413399}.dashboard-grid{display:grid;grid-template-columns:minmax(0,2fr) minmax(18rem,.78fr);gap:1rem;margin-bottom:1rem}.dashboard-grid--content{grid-template-columns:minmax(0,2.25fr) minmax(18rem,.75fr);align-items:start}.dashboard-panel{border:1px solid rgba(34,27,78,.07);border-radius:1.3rem;background:rgba(255,255,255,.94);box-shadow:0 .9rem 2.8rem rgba(32,25,77,.07)}.dashboard-panel__head{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;padding:1.2rem 1.3rem;border-bottom:1px solid rgba(34,27,78,.07)}.dashboard-panel__head h2{margin:.1rem 0 0;font-size:1.15rem}.dashboard-chart{height:18rem;padding:1rem 1.2rem}.chart-legend{display:flex;gap:1rem;color:var(--muted-color);font-size:.7rem}.chart-legend span{display:flex;align-items:center;gap:.35rem}.chart-dot{width:.5rem;height:.5rem;border-radius:50%}.chart-dot--likes{background:#6654e8}.chart-dot--comments{background:#18a7b8}.profile-progress{padding-bottom:1.2rem;text-align:center}.profile-progress .dashboard-panel__head{text-align:left}.profile-progress .dashboard-panel__head>strong{color:var(--primary-color);font-size:1.25rem}.profile-progress__bar{height:.35rem;margin:1rem 1.3rem 1.2rem;overflow:hidden;border-radius:1rem;background:#eeecf4}.profile-progress__bar span{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#5b4bdb,#9b7cf4)}.profile-progress>img{width:5rem;height:5rem;border-radius:1.2rem;object-fit:cover}.profile-progress h3{margin:.65rem 0 .2rem;font-size:1rem}.profile-progress p{min-height:2.8rem;margin:.2rem 1.2rem 1rem;color:var(--muted-color);font-size:.73rem;line-height:1.5}.profile-progress>.btn{width:calc(100% - 2.4rem)!important}.stories-manager{overflow:hidden}.stories-manager__head{align-items:center}.story-view-toggle{display:flex;gap:.2rem;padding:.2rem;border-radius:.7rem;background:#f2f0f7}.story-view-toggle button{display:grid;width:2rem;height:2rem;place-items:center;border:0;border-radius:.55rem;color:#8d879c;background:transparent}.story-view-toggle button.is-active{color:var(--primary-color);background:#fff;box-shadow:0 .2rem .7rem rgba(32,25,77,.09)}.story-filters{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:1rem 1.3rem;border-bottom:1px solid rgba(34,27,78,.07)}.dashboard-search{display:flex;align-items:center;min-width:12rem;max-width:18rem;gap:.5rem;padding:.55rem .75rem;border:1px solid rgba(34,27,78,.1);border-radius:.75rem;background:#f8f7fb;color:#aaa5b5}.dashboard-search input{width:100%;min-width:0;border:0;outline:0;background:transparent;font-size:.78rem}.filter-chips{display:flex;gap:.35rem}.filter-chips button{padding:.45rem .65rem;border:0;border-radius:.65rem;color:#787286;background:transparent;font-size:.7rem;font-weight:650}.filter-chips button span{margin-left:.2rem;color:#aaa5b5}.filter-chips button.is-active{color:var(--primary-color);background:var(--primary-soft)}.dashboard-stories{display:grid}.dashboard-story-row{display:grid;grid-template-columns:5.2rem minmax(0,1fr) auto;align-items:center;gap:1rem;padding:1rem 1.3rem;border-bottom:1px solid rgba(34,27,78,.07);transition:.18s ease}.dashboard-story-row:hover{background:#fbfaff}.dashboard-story-row[hidden]{display:none}.dashboard-story-row__cover img{width:5.2rem;height:4.2rem;border-radius:.8rem;object-fit:cover}.dashboard-story-row__title{display:flex;gap:.4rem;color:var(--muted-color);font-size:.65rem}.story-status{padding:.17rem .38rem;border-radius:.35rem;font-weight:750}.story-status--pb{color:#137453;background:#e6f7ef}.story-status--df{color:#9a6412;background:#fff4d9}.dashboard-story-row__main{min-width:0}.dashboard-story-row__main h3{margin:.25rem 0;font-size:.95rem}.dashboard-story-row__main h3 a{color:#28223d;text-decoration:none}.dashboard-story-row__main p{overflow:hidden;margin:0;color:var(--muted-color);font-size:.7rem;text-overflow:ellipsis;white-space:nowrap}.dashboard-story-row__meta{display:flex;gap:.8rem;margin-top:.35rem;color:#aaa5b5;font-size:.63rem}.dashboard-story-row__actions{display:flex;align-items:center;gap:.35rem}.dashboard-story-row__actions .btn span{margin-left:.25rem}.icon-action{display:grid;width:2.3rem;height:2.3rem;place-items:center;border:1px solid rgba(34,27,78,.09);border-radius:.65rem;color:#716b80;text-decoration:none}.icon-action:hover{color:var(--primary-color);background:var(--primary-soft)}.icon-action--danger:hover{color:#c52242;background:#fff0f2}.dashboard-stories.is-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:.8rem;padding:1rem}.dashboard-stories.is-grid .dashboard-story-row{grid-template-columns:4rem minmax(0,1fr);border:1px solid rgba(34,27,78,.08);border-radius:1rem}.dashboard-stories.is-grid .dashboard-story-row__cover img{width:4rem;height:4rem}.dashboard-stories.is-grid .dashboard-story-row__actions{grid-column:1/-1;justify-content:flex-end}.dashboard-empty{padding:3rem 1rem;text-align:center}.dashboard-empty[hidden]{display:none}.dashboard-empty>.bi{color:#b7b0db;font-size:2.5rem}.dashboard-empty h3{margin:.7rem 0 .2rem;font-size:1rem}.dashboard-empty p{color:var(--muted-color);font-size:.75rem}.recent-feedback{overflow:hidden}.recent-feedback .dashboard-panel__head>.bi{color:var(--primary-color);font-size:1.3rem}.feedback-list article{display:flex;gap:.7rem;padding:1rem 1.15rem;border-bottom:1px solid rgba(34,27,78,.07)}.feedback-list article>img{width:2.3rem;height:2.3rem;flex:0 0 auto;border-radius:.7rem;object-fit:cover}.feedback-list article>div{min-width:0}.feedback-list article>div>div{display:flex;justify-content:space-between;gap:.6rem}.feedback-list strong{font-size:.72rem}.feedback-list time{color:#aaa5b5;font-size:.58rem}.feedback-list p{margin:.2rem 0;color:#5f596c;font-size:.68rem;line-height:1.45}.feedback-list a{display:block;overflow:hidden;color:var(--primary-color);font-size:.62rem;text-decoration:none;text-overflow:ellipsis;white-space:nowrap}.feedback-empty{padding:3rem 1rem;color:var(--muted-color);text-align:center}.feedback-empty .bi{font-size:2rem}
@media(max-width:1199.98px){.dashboard-metrics{grid-template-columns:repeat(2,1fr)}.dashboard-grid,.dashboard-grid--content{grid-template-columns:1fr}.profile-progress{display:grid;grid-template-columns:auto 1fr;align-items:center;text-align:left}.profile-progress .dashboard-panel__head,.profile-progress__bar{grid-column:1/-1}.profile-progress>img{margin-left:1.2rem}.profile-progress p{min-height:0}.profile-progress>.btn{grid-column:1/-1}.recent-feedback .feedback-list{display:grid;grid-template-columns:repeat(2,1fr)}}
@media(max-width:767.98px){.creator-dashboard{padding-inline:0!important}.creator-dashboard__header{align-items:flex-start;flex-direction:column}.creator-dashboard__header>.btn{width:100%}.creator-welcome>img{width:3.5rem;height:3.5rem}.creator-welcome p{font-size:.75rem}.dashboard-metrics{grid-template-columns:1fr 1fr;gap:.65rem}.metric-card{align-items:flex-start;flex-direction:column;padding:1rem}.metric-card>.bi{width:2.7rem;height:2.7rem}.continue-draft{grid-template-columns:auto 1fr}.continue-draft .btn{grid-column:1/-1;width:100%}.story-filters{align-items:stretch;flex-direction:column}.dashboard-search{max-width:none}.filter-chips{overflow-x:auto}.filter-chips button{white-space:nowrap}.dashboard-story-row{grid-template-columns:4rem minmax(0,1fr);padding:.85rem}.dashboard-story-row__cover img{width:4rem;height:4rem}.dashboard-story-row__actions{grid-column:1/-1;justify-content:flex-end}.dashboard-story-row__actions .btn{margin-right:auto}.dashboard-stories.is-grid{grid-template-columns:1fr}.recent-feedback .feedback-list{grid-template-columns:1fr}.chart-legend{display:none}}

/* Themes and Lucide icon system */
[data-lucide]{width:1.15rem;height:1.15rem;flex:0 0 auto;vertical-align:-.18em}.navbar-brand [data-lucide]{width:2.25rem;height:2.25rem;flex-basis:2.25rem;vertical-align:middle}.site-footer [data-lucide]{width:1.35rem;height:1.35rem}.theme-toggle{display:grid;width:2.75rem;height:2.75rem;place-items:center;border:1px solid var(--border-color);border-radius:.85rem;color:var(--dark-color);background:var(--surface-color);transition:.2s ease}.theme-toggle:hover{color:var(--primary-color);background:var(--primary-soft);transform:translateY(-1px)}
html[data-theme="dark"]{--dark-color:#f4f1ff;--muted-color:#aaa4bd;--border-color:#302a46;--surface-color:#191624;--surface-muted:#211d2e;--primary-soft:#292242;color-scheme:dark}html[data-theme="dark"] body{color:#eeeaf8;background:#121019}html[data-theme="dark"] .site-navbar,html[data-theme="dark"] .navbar-collapse{border-color:#302a46;background:rgba(24,21,34,.94)!important}html[data-theme="dark"] .site-footer{background:#0d0b13}html[data-theme="dark"] .card,html[data-theme="dark"] .modern-page .card,html[data-theme="dark"] .modern-page article.bg-white,html[data-theme="dark"] .dashboard-panel,html[data-theme="dark"] .metric-card,html[data-theme="dark"] .writer-paper,html[data-theme="dark"] .writer-sidecard,html[data-theme="dark"] .author-page>.card:first-of-type{border-color:#302a46!important;background:rgba(27,24,38,.96)!important;color:#eeeaf8}html[data-theme="dark"] .form-control,html[data-theme="dark"] .form-select,html[data-theme="dark"] .input-group-text,html[data-theme="dark"] .dashboard-search{border-color:#39324e;background:#211d2e;color:#eeeaf8}html[data-theme="dark"] .form-control::placeholder{color:#7f788f}html[data-theme="dark"] .dropdown-menu{border-color:#39324e;background:#211d2e}html[data-theme="dark"] .dropdown-item{color:#e8e4f1}html[data-theme="dark"] .dropdown-item:hover{background:#2c2640}html[data-theme="dark"] .text-muted{color:#aaa4bd!important}html[data-theme="dark"] .story-grid-card,html[data-theme="dark"] .popular-story,html[data-theme="dark"] .category-tile,html[data-theme="dark"] .author-card{background:#1b1826}html[data-theme="dark"] .dashboard-story-row:hover{background:#211d2e}html[data-theme="dark"] .dashboard-story-row__main h3 a,html[data-theme="dark"] .metric-card strong,html[data-theme="dark"] .writer-title-input.form-control,html[data-theme="dark"] .visual-editor__content{color:#eeeaf8}html[data-theme="dark"] .writer-toolbar{background:rgba(27,24,38,.95)}html[data-theme="dark"] .visual-editor__content h2,html[data-theme="dark"] .visual-editor__content h3{color:#f5f2ff}html[data-theme="dark"] .story-content{color:#ddd8e8}html[data-theme="dark"] .breadcrumb{background:rgba(27,24,38,.85)}html[data-theme="dark"] .btn-light{border-color:#39324e;background:#282338;color:#eeeaf8}
.nav-icon-link{position:relative;display:grid;width:2.7rem;height:2.7rem;place-items:center;border-radius:.8rem;color:var(--muted-color);text-decoration:none}.nav-icon-link:hover{color:var(--primary-color);background:var(--primary-soft)}.nav-icon-link>span{position:absolute;top:.15rem;right:.1rem;display:grid;min-width:1rem;height:1rem;padding:0 .2rem;place-items:center;border:2px solid var(--surface-color);border-radius:1rem;color:#fff;background:#e33c5c;font-size:.55rem;font-weight:800}
.story-author-modern{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:1rem;margin:1rem 0 3rem;padding:1.3rem;border:1px solid var(--border-color);border-radius:1.3rem;background:var(--surface-color);box-shadow:var(--shadow-sm)}.story-author-modern>img{width:4.5rem;height:4.5rem;border-radius:1.1rem;object-fit:cover}.story-author-modern span{color:var(--primary-color);font-size:.65rem;font-weight:800;text-transform:uppercase;letter-spacing:.08em}.story-author-modern h2{margin:.15rem 0;font-size:1.15rem}.story-author-modern p{margin:0;color:var(--muted-color);font-size:.78rem}.related-stories{margin-bottom:3rem}.reading-resume{position:fixed;z-index:15;right:1.2rem;bottom:5rem;box-shadow:0 1rem 2.5rem rgba(49,37,125,.25)}#bookmarkStory.is-active{color:var(--primary-color);background:var(--primary-soft)}.social-page{max-width:52rem}.social-page__header{margin-bottom:1.5rem}.social-page__header h1{margin:.2rem 0}.social-page__header p{color:var(--muted-color)}.notification-list{overflow:hidden;border:1px solid var(--border-color);border-radius:1.3rem;background:var(--surface-color);box-shadow:var(--shadow-md)}.notification-item{display:flex;gap:1rem;padding:1.1rem 1.2rem;border-bottom:1px solid var(--border-color);color:var(--dark-color);text-decoration:none}.notification-item:hover{background:var(--surface-muted)}.notification-item.is-unread{background:var(--primary-soft)}.notification-item__icon{display:grid;width:2.6rem;height:2.6rem;flex:0 0 auto;place-items:center;border-radius:.8rem;color:var(--primary-color);background:var(--primary-soft)}.notification-item strong{font-size:.75rem}.notification-item p{margin:.15rem 0;color:var(--muted-color);font-size:.82rem}.notification-item time{color:#aaa5b5;font-size:.65rem}.social-empty{display:grid;min-height:20rem;place-content:center;justify-items:center;padding:2rem;color:var(--muted-color);text-align:center}.social-empty>.bi{font-size:3rem}.chat-page{max-width:90rem}.chat-shell{display:grid;grid-template-columns:20rem minmax(0,1fr);overflow:hidden;min-height:42rem;border:1px solid var(--border-color);border-radius:1.5rem;background:var(--surface-color);box-shadow:var(--shadow-lg)}.chat-sidebar{border-right:1px solid var(--border-color)}.chat-sidebar>header,.chat-main__header{padding:1.2rem 1.3rem;border-bottom:1px solid var(--border-color)}.chat-sidebar h1{margin:.2rem 0 0;font-size:1.5rem}.chat-contact{display:flex;align-items:center;gap:.75rem;padding:.85rem 1rem;color:var(--dark-color);text-decoration:none}.chat-contact:hover,.chat-contact.is-active{background:var(--primary-soft)}.chat-contact img{width:2.8rem;height:2.8rem;border-radius:.85rem;object-fit:cover}.chat-contact div{display:grid}.chat-contact strong{font-size:.8rem}.chat-contact span{color:var(--muted-color);font-size:.65rem}.chat-main{display:grid;grid-template-rows:auto 1fr auto;min-width:0}.chat-main__header h2{margin:0;font-size:1rem}.chat-main__header span{color:var(--muted-color);font-size:.68rem}.chat-messages{display:flex;overflow:auto;max-height:34rem;flex-direction:column;gap:.55rem;padding:1.2rem;background:var(--surface-muted)}.chat-message{display:flex}.chat-message>div{max-width:min(75%,32rem);padding:.65rem .8rem;border:1px solid var(--border-color);border-radius:.9rem .9rem .9rem .2rem;background:var(--surface-color)}.chat-message.is-own{justify-content:flex-end}.chat-message.is-own>div{border-color:transparent;border-radius:.9rem .9rem .2rem .9rem;color:#fff;background:var(--primary-color)}.chat-message p{margin:0;font-size:.82rem}.chat-message time{display:block;margin-top:.2rem;color:var(--muted-color);font-size:.58rem}.chat-message.is-own time{color:#d9d4ff}.chat-composer{display:grid;grid-template-columns:1fr auto;gap:.6rem;padding:.85rem;border-top:1px solid var(--border-color)}.chat-composer textarea{max-height:8rem;padding:.7rem;border:1px solid var(--border-color);border-radius:.8rem;outline:0;resize:none;background:var(--surface-muted);color:var(--dark-color)}.chat-empty-small{padding:1rem;color:var(--muted-color);font-size:.72rem;text-align:center}@media(max-width:767.98px){.story-author-modern{grid-template-columns:auto 1fr}.story-author-modern>.btn{grid-column:1/-1;width:100%}.chat-shell{grid-template-columns:1fr}.chat-sidebar{display:none;border:0}.chat-main{min-height:38rem}.chat-page:has(.chat-main .social-empty) .chat-main{display:none}.chat-page:has(.chat-main .social-empty) .chat-sidebar{display:block}}
@media(max-width:767.98px){.chat-sidebar{display:none}.chat-page:has(.chat-main .social-empty) .chat-sidebar{display:block}}
/* Interactive creator dashboard */
.dashboard-chart-controls{display:flex;justify-content:flex-end;gap:.25rem;padding:.75rem 1.2rem 0}.dashboard-chart-controls button{padding:.35rem .6rem;border:0;border-radius:.6rem;color:var(--muted-color);background:transparent;font-size:.68rem;font-weight:700}.dashboard-chart-controls button.is-active{color:var(--primary-color);background:var(--primary-soft)}.dashboard-story-row{grid-template-columns:1.4rem 5.2rem minmax(0,1fr) auto}.dashboard-story-select{display:grid;place-items:center;cursor:pointer}.dashboard-story-select input{position:absolute;opacity:0}.dashboard-story-select span{display:block;width:1rem;height:1rem;border:1.5px solid var(--border-color);border-radius:.3rem;background:var(--surface-color)}.dashboard-story-select input:checked+span{border-color:var(--primary-color);background:var(--primary-color);box-shadow:inset 0 0 0 .2rem var(--surface-color)}.dashboard-bulk{display:flex;align-items:center;gap:1rem;padding:.65rem 1.2rem;border-bottom:1px solid var(--border-color);background:var(--primary-soft);font-size:.7rem}.dashboard-bulk[hidden]{display:none}.dashboard-bulk>strong{color:var(--primary-color)}.dashboard-bulk>div{display:flex;gap:.3rem;margin-left:auto}.dashboard-bulk button{padding:.4rem .6rem;border:1px solid var(--border-color);border-radius:.55rem;color:var(--dark-color);background:var(--surface-color);font-size:.65rem}.dashboard-bulk button.is-danger{color:#c6203e}.activity-center{margin-bottom:1rem;overflow:hidden}.activity-center .dashboard-panel__head>a{font-size:.7rem;text-decoration:none}.activity-feed{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.activity-feed__item{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:.7rem;padding:.85rem 1rem;border-bottom:1px solid var(--border-color);color:var(--dark-color);text-decoration:none}.activity-feed__item:nth-child(odd){border-right:1px solid var(--border-color)}.activity-feed__item:hover,.activity-feed__item.is-unread{background:var(--primary-soft)}.activity-feed__icon{display:grid;width:2.2rem;height:2.2rem;place-items:center;border-radius:.65rem;color:var(--primary-color);background:var(--surface-color)}.activity-feed__item>span:nth-child(2){display:grid;min-width:0}.activity-feed__item strong{font-size:.68rem}.activity-feed__item small{overflow:hidden;color:var(--muted-color);font-size:.62rem;text-overflow:ellipsis;white-space:nowrap}.activity-feed__item time{color:var(--muted-color);font-size:.58rem}.command-trigger{position:fixed;z-index:12;right:1.2rem;bottom:1.2rem;display:flex;align-items:center;gap:.7rem;padding:.65rem .8rem;border:1px solid var(--border-color);border-radius:.8rem;color:var(--dark-color);background:var(--surface-color);box-shadow:var(--shadow-md);font-size:.7rem}.command-trigger kbd,.command-palette kbd{padding:.18rem .35rem;border:1px solid var(--border-color);border-radius:.35rem;color:var(--muted-color);background:var(--surface-muted);font-size:.58rem}.command-palette{position:fixed;z-index:1100;inset:0;display:grid;place-items:start center;padding-top:12vh}.command-palette[hidden]{display:none}.command-palette__backdrop{position:absolute;inset:0;border:0;background:rgba(12,9,25,.58);backdrop-filter:blur(5px)}.command-palette>section{position:relative;width:min(92vw,38rem);overflow:hidden;border:1px solid var(--border-color);border-radius:1.1rem;background:var(--surface-color);box-shadow:0 2rem 6rem rgba(10,7,28,.35)}.command-palette header{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:.7rem;padding:.8rem 1rem;border-bottom:1px solid var(--border-color)}.command-palette header input{width:100%;border:0;outline:0;background:transparent;color:var(--dark-color)}.command-results{display:grid;max-height:60vh;overflow-y:auto;padding:.55rem}.command-results>span{padding:.55rem;color:var(--muted-color);font-size:.58rem;font-weight:800;text-transform:uppercase;letter-spacing:.08em}.command-results>a{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:.7rem;padding:.65rem .7rem;border-radius:.65rem;color:var(--dark-color);text-decoration:none}.command-results>a:hover{color:var(--primary-color);background:var(--primary-soft)}.command-results>a[hidden]{display:none}.command-results>a strong{overflow:hidden;font-size:.72rem;text-overflow:ellipsis;white-space:nowrap}.command-results>a small{color:var(--muted-color);font-size:.6rem}.command-open{overflow:hidden}.dashboard-stories.is-grid .dashboard-story-row{grid-template-columns:1.4rem 4rem minmax(0,1fr)}
@media(max-width:767.98px){.dashboard-story-row{grid-template-columns:1.2rem 4rem minmax(0,1fr)}.dashboard-story-row__actions{grid-column:2/-1}.dashboard-bulk{align-items:flex-start;flex-wrap:wrap}.dashboard-bulk>div{width:100%;margin-left:0;overflow-x:auto}.activity-feed{grid-template-columns:1fr}.activity-feed__item:nth-child(odd){border-right:0}.command-trigger span{display:none}.command-palette{padding-top:6vh}}

/* Interactive chat */
.chat-sidebar header{display:grid;gap:.3rem}.chat-search{display:flex;align-items:center;gap:.55rem;margin-top:.8rem;padding:.55rem .7rem;border:1px solid var(--border-color);border-radius:.75rem;background:var(--surface-muted);color:var(--muted-color)}.chat-search input{width:100%;min-width:0;border:0;outline:0;background:transparent;color:var(--dark-color);font-size:.72rem}.chat-contact{position:relative}.chat-contact__avatar{position:relative;flex:0 0 auto}.chat-contact__avatar i{position:absolute;right:-.1rem;bottom:0;width:.65rem;height:.65rem;border:2px solid var(--surface-color);border-radius:50%;background:#22a06b}.chat-contact>div{min-width:0;flex:1}.chat-contact>div span{overflow:hidden;max-width:12rem;text-overflow:ellipsis;white-space:nowrap}.chat-contact>time{color:var(--muted-color);font-size:.58rem}.chat-main__header{display:flex;align-items:center;gap:.8rem}.chat-main__header>div{flex:1}.chat-back,.chat-header-action{display:grid;width:2.4rem;height:2.4rem;place-items:center;border:0;border-radius:.7rem;color:var(--muted-color);background:var(--surface-muted);text-decoration:none}.chat-back{display:none}.chat-presence i{display:inline-block;width:.45rem;height:.45rem;margin-right:.2rem;border-radius:50%;background:#22a06b}.chat-offline .chat-presence i{background:#d58a00}.chat-message-search{display:flex;gap:.5rem;padding:.65rem .85rem;border-bottom:1px solid var(--border-color)}.chat-message-search input{width:100%;padding:.55rem .7rem;border:1px solid var(--border-color);border-radius:.7rem;outline:0;background:var(--surface-muted);color:var(--dark-color)}.chat-message-search button{border:0;color:var(--muted-color);background:transparent;font-size:1.4rem}.chat-date{display:flex;justify-content:center;margin:.5rem 0}.chat-date span{padding:.2rem .55rem;border-radius:2rem;color:var(--muted-color);background:var(--surface-color);font-size:.58rem}.chat-bubble{position:relative}.chat-message__menu{position:absolute;top:.25rem;right:calc(100% + .35rem);border:0;color:var(--muted-color);background:transparent;opacity:0;transition:.15s}.chat-message:not(.is-own) .chat-message__menu{right:auto;left:calc(100% + .35rem)}.chat-message:hover .chat-message__menu,.chat-message__menu:focus{opacity:1}.chat-context{position:absolute;z-index:9;right:calc(100% + .4rem);bottom:0;min-width:11rem;padding:.35rem;border:1px solid var(--border-color);border-radius:.8rem;background:var(--surface-color);box-shadow:var(--shadow-md)}.chat-message:not(.is-own) .chat-context{right:auto;left:calc(100% + .4rem)}.chat-context>button{display:block;width:100%;padding:.48rem .55rem;border:0;border-radius:.5rem;color:var(--dark-color);background:transparent;font-size:.68rem;text-align:left}.chat-context>button:hover{background:var(--surface-muted)}.chat-context>button.is-danger{color:#c6203e}.chat-reaction-picker{display:flex;gap:.15rem;padding:.25rem}.chat-reaction-picker button{padding:.2rem;border:0;border-radius:.4rem;background:transparent}.chat-reaction-picker button:hover{background:var(--primary-soft);transform:scale(1.15)}.chat-quote{display:grid;width:100%;margin-bottom:.45rem;padding:.4rem .55rem;border:0;border-left:3px solid currentColor;border-radius:.35rem;color:inherit;background:rgba(127,127,127,.13);text-align:left}.chat-quote strong{font-size:.62rem}.chat-quote span{overflow:hidden;max-width:22rem;font-size:.62rem;text-overflow:ellipsis;white-space:nowrap}.chat-reactions{display:flex;flex-wrap:wrap;gap:.25rem}.chat-reactions:empty{display:none}.chat-reactions button{padding:.14rem .35rem;border:1px solid var(--border-color);border-radius:2rem;background:var(--surface-color);font-size:.62rem}.chat-message.is-deleted{opacity:.65;font-style:italic}.chat-message.is-highlighted .chat-bubble{animation:chat-highlight 1.2s ease}.chat-reply-preview{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.55rem 1rem;border-top:1px solid var(--border-color);background:var(--surface-muted)}.chat-reply-preview>div{display:grid;min-width:0}.chat-reply-preview strong{color:var(--primary-color);font-size:.65rem}.chat-reply-preview span{overflow:hidden;color:var(--muted-color);font-size:.65rem;text-overflow:ellipsis;white-space:nowrap}.chat-reply-preview button{border:0;color:var(--muted-color);background:transparent;font-size:1.2rem}.chat-new-messages{position:absolute;z-index:7;right:1rem;bottom:5rem;padding:.45rem .7rem;border:0;border-radius:2rem;color:#fff;background:var(--primary-color);box-shadow:var(--shadow-md);font-size:.68rem}.chat-main{position:relative}@keyframes chat-highlight{50%{box-shadow:0 0 0 .35rem var(--primary-soft)}}
.chat-inline-edit{display:grid;gap:.45rem;min-width:min(22rem,65vw)}.chat-inline-edit textarea{width:100%;padding:.55rem;border:1px solid var(--border-color);border-radius:.6rem;outline:0;resize:vertical;background:var(--surface-muted);color:var(--dark-color)}.chat-inline-edit>div{display:flex;justify-content:flex-end;gap:.35rem}
@media(max-width:767.98px){.chat-back{display:grid}.chat-page{padding-inline:0!important}.chat-shell{min-height:calc(100vh - 7rem);border-radius:1rem}.chat-message>div{max-width:86%}.chat-context,.chat-message:not(.is-own) .chat-context{position:fixed;right:.75rem;bottom:5.5rem;left:.75rem;min-width:0}.chat-message__menu{opacity:1}.chat-composer{position:sticky;bottom:0;background:var(--surface-color)}.chat-inline-edit{min-width:65vw}}
@media(prefers-reduced-motion:reduce){.chat-message.is-highlighted .chat-bubble{animation:none}}

/* Chat attachments */
.chat-attach-button{display:grid;width:2.45rem;height:2.45rem;flex:0 0 auto;place-items:center;border-radius:.75rem;color:var(--muted-color);cursor:pointer}.chat-attach-button:hover{color:var(--primary-color);background:var(--primary-soft)}.chat-attachment-preview{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.6rem 1rem;border-top:1px solid var(--border-color);background:var(--surface-muted)}.chat-attachment-preview>div{display:flex;align-items:center;min-width:0;gap:.6rem}.chat-attachment-preview>div>i{color:var(--primary-color);font-size:1.25rem}.chat-attachment-preview span{display:grid;min-width:0}.chat-attachment-preview strong{overflow:hidden;max-width:25rem;font-size:.7rem;text-overflow:ellipsis;white-space:nowrap}.chat-attachment-preview small{color:var(--muted-color);font-size:.6rem}.chat-attachment-preview>button{border:0;color:var(--muted-color);background:transparent;font-size:1.25rem}.chat-attachment{display:flex;overflow:hidden;align-items:center;gap:.55rem;margin-bottom:.45rem;border-radius:.75rem;color:inherit;text-decoration:none}.chat-attachment--image{display:grid}.chat-attachment--image img{width:min(22rem,65vw);max-height:18rem;border-radius:.75rem;object-fit:cover}.chat-attachment--image span{overflow:hidden;padding:0 .25rem;font-size:.58rem;text-overflow:ellipsis;white-space:nowrap}.chat-attachment--file{padding:.65rem;background:rgba(127,127,127,.14)}.chat-attachment--file>i{font-size:1.4rem}.chat-attachment--file span{overflow:hidden;max-width:16rem;font-size:.65rem;text-overflow:ellipsis;white-space:nowrap}.chat-messages.is-file-dragging{outline:3px dashed var(--primary-color);outline-offset:-.75rem;background:var(--primary-soft)}.chat-unread{display:grid;min-width:1.15rem;height:1.15rem;margin:.25rem 0 0 auto;place-items:center;border-radius:1rem;color:#fff;background:var(--primary-color);font-size:.55rem}

/* Responsive layout hardening */
html,body{max-width:100%;overflow-x:clip}
img,svg,video,canvas{max-width:100%}
.container,.container-fluid,.row,.row>*,.site-main,.modern-page,.home-hero,.home-hero>*,.auth-page,.story-detail-page{min-width:0}
.home-hero__content h1{max-width:12ch;font-size:clamp(3.35rem,5.25vw,5.45rem);line-height:1.01;text-wrap:balance}
.story-detail-page article header h1{max-width:18ch;font-size:clamp(2.8rem,5vw,4.6rem);line-height:1.08;overflow-wrap:anywhere}
.story-detail-page article header .text-muted{font-size:.78rem;line-height:1.6}
.story-detail-page .story-content{color:var(--text-color);font-size:clamp(1.05rem,1.35vw,1.18rem);line-height:1.85}
.story-detail-page .story-content h2,.story-detail-page .story-content h3{font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
@media(max-width:991.98px){.site-navbar .container{width:100%;max-width:none;padding-inline:1rem}.navbar-toggler{display:inline-grid;flex:0 0 2.75rem;margin-left:auto}.navbar-collapse{width:100%}.navbar-nav .nav-icon-item{display:inline-flex}.navbar-nav .theme-toggle{width:100%}}
@media(max-width:767.98px){.site-main{width:100%;padding-inline:1rem!important}.site-navbar .container,.home-hero.container,.modern-page.container,.story-detail-page.container{width:calc(100vw - 2rem)!important;max-width:calc(100vw - 2rem)!important;margin-inline:auto}.home-page,.modern-page,.story-detail-page,.auth-page{max-width:100%}.home-hero.container{gap:2.25rem;padding-inline:0;padding-top:1.25rem}.home-hero__content h1{max-width:10.5ch;font-size:clamp(2.65rem,12vw,3.55rem);line-height:1.02;letter-spacing:-.055em}.home-hero__content p{max-width:100%;font-size:1rem;overflow-wrap:anywhere}.hero-search,.home-hero__actions,.hero-feature{width:100%;max-width:100%}.hero-search{padding:.65rem}.hero-search input{width:100%}.hero-feature{min-height:22rem}.auth-page{padding-inline:0!important}.auth-page>.row{width:auto;margin-inline:0}.auth-page>.row>[class*="col-"]{padding-inline:0}.auth-page .card{width:100%;max-width:100%;overflow:hidden}.auth-page .card-footer,.auth-page .card-body{min-width:0;padding-inline:1.25rem!important}.auth-page .form-text,.auth-page .form-text a,.auth-page+.form-text,.auth-page~.form-text{max-width:100%;overflow-wrap:anywhere}.story-detail-page .breadcrumb{display:flex;overflow-x:auto;flex-wrap:nowrap;max-width:100%;white-space:nowrap;scrollbar-width:none}.story-detail-page article{width:100%;padding:1.25rem!important;border-radius:1.2rem}.story-detail-page article header h1{max-width:100%;font-size:clamp(2.05rem,10.5vw,3rem);line-height:1.08}.story-detail-page article header .text-muted{display:flex;flex-wrap:wrap;gap:.45rem;font-size:.72rem}.story-detail-page .story-content{font-size:1.03rem;line-height:1.78;overflow-wrap:anywhere}.story-detail-page article footer .d-flex{flex-wrap:wrap}}
@media(max-width:399.98px){.site-main{padding-inline:.75rem!important}.navbar-brand{font-size:1.1rem}.home-hero__content h1{font-size:clamp(2.35rem,11.5vw,3rem)}.auth-page .card-body,.auth-page .card-footer{padding-inline:1rem!important}}

/* Achievements */
.achievement-strip{display:grid;grid-template-columns:18rem 1fr;gap:1rem;margin-bottom:1rem;padding:1rem;border:1px solid var(--border-color);border-radius:1.3rem;background:var(--surface-color);box-shadow:var(--shadow-sm)}.achievement-level{display:flex;align-items:center;gap:1rem;padding:1rem;border-radius:1rem;color:#fff;background:linear-gradient(135deg,#251d58,#6654e8)}.achievement-level>div:first-child{display:grid;justify-items:center}.achievement-level>div:first-child span{font-size:.65rem}.achievement-level>div:first-child strong{font-size:2rem}.achievement-level__progress{flex:1}.achievement-level__progress>div{height:.4rem;overflow:hidden;border-radius:1rem;background:rgba(255,255,255,.2)}.achievement-level__progress>div span{display:block;height:100%;border-radius:inherit;background:#fff}.achievement-level__progress small{font-size:.6rem}.achievement-badges{display:flex;overflow-x:auto;gap:.65rem}.achievement-badge{display:flex;min-width:11rem;align-items:center;gap:.6rem;padding:.7rem;border:1px solid var(--border-color);border-radius:.9rem}.achievement-badge>.bi{font-size:1.35rem}.achievement-badge div{display:grid}.achievement-badge strong{font-size:.68rem}.achievement-badge span{color:var(--muted-color);font-size:.58rem}.achievement-badge--rare>.bi{color:#168b9c}.achievement-badge--epic>.bi{color:#7a49d8}.achievement-badge--legendary>.bi{color:#d58a00}@media(max-width:767.98px){.achievement-strip{grid-template-columns:1fr}.achievement-badges{padding-bottom:.25rem}}
/* Shared modern surfaces */
.surface-card{min-width:0;border:1px solid var(--border-color);border-radius:1.25rem;background:var(--surface-color);box-shadow:var(--shadow-sm)}
/* Profile settings */
.profile-settings-page{max-width:92rem}.profile-settings-header{display:flex;align-items:flex-end;justify-content:space-between;gap:1rem;margin-bottom:1.2rem}.profile-settings-header h1{margin:.15rem 0;font-size:clamp(1.8rem,4vw,2.6rem)}.profile-settings-header p{margin:0;color:var(--muted-color)}.profile-settings-layout{display:grid;grid-template-columns:minmax(0,1fr) 20rem;align-items:start;gap:1rem}.profile-settings-main{overflow:hidden}.settings-tabs{display:flex;gap:.25rem;padding:.75rem;border-bottom:1px solid var(--border-color)}.settings-tab{display:flex;align-items:center;gap:.45rem;padding:.65rem .8rem;border:0;border-radius:.75rem;color:var(--muted-color);background:transparent;font-size:.72rem;font-weight:750}.settings-tab:hover{background:var(--surface-soft)}.settings-tab.is-active{color:#fff;background:#6954dc}.settings-panel{padding:1.4rem}.settings-panel[hidden]{display:none}.settings-section-head{margin-bottom:1.2rem}.settings-section-head h2{margin:0;font-size:1.15rem}.settings-section-head p{margin:.25rem 0 0;color:var(--muted-color);font-size:.75rem}.avatar-editor{display:flex;align-items:center;gap:1.2rem;margin-bottom:1.5rem;padding:1rem;border:1px dashed var(--border-color);border-radius:1rem;background:var(--surface-soft)}.avatar-dropzone{position:relative;width:6.2rem;height:6.2rem;flex:0 0 auto;border-radius:1.3rem;cursor:pointer;transition:.2s ease}.avatar-dropzone img{width:100%;height:100%;border-radius:inherit;object-fit:cover}.avatar-dropzone>span{position:absolute;right:-.25rem;bottom:-.25rem;display:grid;width:2rem;height:2rem;place-items:center;border:3px solid var(--surface-color);border-radius:.7rem;color:#fff;background:#6954dc}.avatar-dropzone.is-dragging{transform:scale(1.04);box-shadow:0 0 0 .35rem rgba(105,84,220,.15)}.profile-file-input{position:absolute;width:1px;height:1px;overflow:hidden;opacity:0;pointer-events:none}.avatar-editor-copy{display:grid;gap:.35rem}.avatar-editor-copy>p{margin:0;color:var(--muted-color);font-size:.7rem}.avatar-editor-copy>div{display:flex;gap:.35rem}.settings-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem}.field-group{display:grid;align-content:start;gap:.4rem}.field-group>span{font-size:.72rem;font-weight:750}.field-group>small{color:var(--muted-color);font-size:.63rem}.field-group input,.field-group textarea{width:100%;padding:.72rem .8rem;border:1px solid var(--border-color);border-radius:.78rem;outline:0;color:var(--text-color);background:var(--surface-color);font-size:.78rem;transition:border-color .2s ease,box-shadow .2s ease}.field-group textarea{min-height:7.5rem;resize:vertical}.field-group input:focus,.field-group textarea:focus{border-color:#8069e4;box-shadow:0 0 0 .2rem rgba(105,84,220,.12)}.field-wide{grid-column:1/-1}.field-error,.errorlist{margin:0;padding:0;color:#c92d4d;font-size:.65rem;list-style:none}.privacy-list,.security-list{display:grid;gap:.6rem}.privacy-row,.security-row{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:1rem;border:1px solid var(--border-color);border-radius:.9rem}.privacy-row>span,.security-row>div{display:grid}.privacy-row strong,.security-row strong{font-size:.76rem}.privacy-row small,.security-row small{color:var(--muted-color);font-size:.65rem}.privacy-row input{position:relative;width:2.65rem;height:1.45rem;flex:0 0 auto;border:0;border-radius:1rem;appearance:none;background:#d8d5e1;cursor:pointer;transition:.2s ease}.privacy-row input::after{position:absolute;top:.2rem;left:.2rem;width:1.05rem;height:1.05rem;border-radius:50%;content:"";background:#fff;box-shadow:0 .1rem .25rem rgba(0,0,0,.15);transition:.2s ease}.privacy-row input:checked{background:#6954dc}.privacy-row input:checked::after{transform:translateX(1.2rem)}.security-row{justify-content:flex-start}.security-row>div{flex:1}.security-icon{display:grid;width:2.5rem;height:2.5rem;place-items:center;border-radius:.8rem;color:#6954dc;background:rgba(105,84,220,.1)}.security-badge{padding:.3rem .55rem;border-radius:.5rem;color:#137453;background:#e6f7ef;font-size:.62rem;font-weight:750}.settings-actions{position:sticky;bottom:0;z-index:2;display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:1rem 1.4rem;border-top:1px solid var(--border-color);background:color-mix(in srgb,var(--surface-color) 92%,transparent);backdrop-filter:blur(14px)}.settings-actions>div{display:flex;gap:.5rem}.unsaved-indicator{color:var(--muted-color);font-size:.65rem}.unsaved-indicator i{margin-right:.3rem;color:#22a06b;font-size:.45rem}.unsaved-indicator.is-dirty i{color:#d58a00}.profile-settings-aside{position:sticky;top:5.5rem;display:grid;gap:1rem}.profile-preview,.profile-real-stats{padding:1.1rem}.profile-preview{text-align:center}.profile-preview-top{display:flex;justify-content:space-between;margin-bottom:.55rem;color:var(--muted-color);font-size:.65rem;font-weight:750;text-align:left}.profile-completion{color:#6954dc}.profile-completion-track{height:.3rem;margin-bottom:1.2rem;overflow:hidden;border-radius:1rem;background:var(--surface-soft)}.profile-completion-track span{display:block;height:100%;background:linear-gradient(90deg,#6954dc,#a176f1)}.profile-preview>img{width:6rem;height:6rem;border-radius:1.4rem;object-fit:cover;box-shadow:0 .8rem 2rem rgba(39,28,95,.14)}.profile-preview h2{margin:.75rem 0 .05rem;font-size:1.15rem}.profile-preview-handle{color:var(--muted-color);font-size:.68rem}.profile-preview>p{min-height:2.4rem;margin:.65rem 0;color:var(--muted-color);font-size:.72rem;line-height:1.5}.profile-preview-genres{display:flex;flex-wrap:wrap;justify-content:center;gap:.3rem}.profile-preview-genres span{padding:.25rem .45rem;border-radius:.5rem;color:#6954dc;background:rgba(105,84,220,.09);font-size:.6rem}.profile-real-stats h2{margin:0 0 .8rem;font-size:.85rem}.profile-real-stats>div{display:grid;grid-template-columns:repeat(2,1fr);gap:.5rem}.profile-real-stats span{display:grid;padding:.65rem;border-radius:.75rem;background:var(--surface-soft);text-align:center}.profile-real-stats strong{font-size:1rem}.profile-real-stats small{color:var(--muted-color);font-size:.58rem}@media(max-width:991.98px){.profile-settings-layout{grid-template-columns:1fr}.profile-settings-aside{position:static;grid-template-columns:repeat(2,1fr);grid-row:1}.profile-settings-main{grid-row:2}}@media(max-width:767.98px){.profile-settings-header{align-items:flex-start;flex-direction:column}.settings-tabs{overflow-x:auto}.settings-tab{flex:0 0 auto}.profile-settings-aside{grid-template-columns:1fr}.settings-form-grid{grid-template-columns:1fr}.field-wide{grid-column:auto}.settings-actions{align-items:stretch;flex-direction:column}.settings-actions>div{display:grid;grid-template-columns:1fr 1fr}.avatar-editor{align-items:flex-start}}@media(max-width:480px){.settings-panel{padding:1rem}.avatar-editor{flex-direction:column}.privacy-row{align-items:flex-start}.profile-settings-header .btn{width:100%}}
.profile-settings-page{width:100%;margin-inline:auto}.profile-settings-layout,.profile-settings-main,.profile-settings-aside,.settings-panel,.settings-form-grid,.field-group{min-width:0}.settings-tabs{max-width:100%;scrollbar-width:thin}.settings-panel input:not([type="checkbox"]):not([type="file"]),.settings-panel textarea{display:block;max-width:100%;box-sizing:border-box}.profile-preview h2,.profile-preview p,.field-group{overflow-wrap:anywhere}@media(max-width:991.98px){.profile-settings-aside{grid-row:auto}.profile-settings-main{grid-row:auto}.profile-settings-layout{display:flex;flex-direction:column}.profile-settings-main,.profile-settings-aside{width:100%}.profile-settings-aside{order:-1}}@media(max-width:575.98px){.profile-settings-page{padding-inline:0}.profile-settings-header{padding-inline:.25rem}.settings-tabs{padding:.55rem}.settings-tab{padding:.58rem .65rem}.settings-tab i{display:none}.settings-panel{padding:1rem}.profile-settings-aside{display:block}.profile-real-stats{margin-top:1rem}.settings-actions{position:static;padding:1rem}.avatar-editor-copy,.avatar-editor-copy>div{width:100%;flex-wrap:wrap}}
/* Achievement journey */
.achievements-page{display:grid;gap:1rem}.achievements-hero{align-items:flex-end}.achievement-summary{display:grid;grid-template-columns:repeat(4,minmax(6rem,1fr));gap:.65rem}.achievement-summary>div{display:grid;gap:.15rem;padding:.85rem 1rem;border:1px solid rgba(255,255,255,.18);border-radius:1rem;background:rgba(255,255,255,.09);backdrop-filter:blur(12px)}.achievement-summary strong{font-size:1.35rem}.achievement-summary span{font-size:.72rem;opacity:.75}.achievement-section-head{display:flex;align-items:flex-end;justify-content:space-between;gap:1rem;margin-bottom:1.25rem}.achievement-section-head h2{margin:.15rem 0 0;font-size:1.2rem}.level-current-label,.section-hint{color:var(--muted-color);font-size:.76rem}.achievement-level-map,.achievement-next,.achievement-history{padding:1.25rem}.level-path{position:relative;display:grid;grid-template-columns:repeat(5,1fr);gap:.75rem}.level-path::before{position:absolute;top:1.3rem;right:10%;left:10%;height:2px;content:"";background:var(--border-color)}.level-step{position:relative;z-index:1;display:grid;justify-items:center;gap:.3rem;color:var(--muted-color);text-align:center}.level-node{display:grid;width:2.65rem;height:2.65rem;place-items:center;border:2px solid var(--border-color);border-radius:50%;background:var(--surface-color);transition:transform .2s ease,box-shadow .2s ease}.level-step strong{font-size:.75rem}.level-step small{font-size:.65rem}.level-step.is-reached{color:var(--text-color)}.level-step.is-reached .level-node{border-color:#7c65e8;color:#fff;background:linear-gradient(135deg,#6954dc,#9b72f2)}.level-step.is-current .level-node{transform:scale(1.12);box-shadow:0 0 0 .4rem rgba(117,91,226,.13),0 .6rem 1.5rem rgba(65,45,150,.22)}.achievement-insights{display:grid;grid-template-columns:repeat(3,1fr);gap:1rem}.insight-card{display:flex;align-items:center;gap:.85rem;padding:1rem}.insight-card>div{display:grid}.insight-card strong{font-size:1.1rem}.insight-card span:last-child{color:var(--muted-color);font-size:.72rem}.insight-icon,.next-goal-icon{display:grid;flex:0 0 auto;width:2.7rem;height:2.7rem;place-items:center;border-radius:.9rem;color:#6b54d8;background:rgba(109,84,216,.11);font-size:1.15rem}.next-goals-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:.75rem}.next-goal{display:flex;align-items:center;gap:.7rem;padding:.8rem;border:1px solid var(--border-color);border-radius:1rem;color:var(--text-color);text-align:left;background:var(--surface-soft);transition:transform .2s ease,border-color .2s ease,box-shadow .2s ease}.next-goal:hover{transform:translateY(-2px);border-color:rgba(109,84,216,.42);box-shadow:var(--shadow-sm)}.next-goal-copy{display:grid;min-width:0;flex:1}.next-goal-copy strong,.next-goal-copy small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.next-goal-copy strong{font-size:.75rem}.next-goal-copy small{color:var(--muted-color);font-size:.65rem}.next-goal-percent{font-size:.7rem;font-weight:800}.achievement-toolbar{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.7rem}.achievement-filters{display:flex;flex-wrap:wrap;gap:.35rem}.achievement-filter{padding:.52rem .8rem;border:0;border-radius:.7rem;color:var(--muted-color);background:transparent;font-size:.72rem;font-weight:700}.achievement-filter:hover,.achievement-filter.is-active{color:#fff;background:#6954dc}.achievement-result-count{padding-right:.5rem;color:var(--muted-color);font-size:.7rem}.achievement-collection{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1rem}.achievement-card{display:flex;gap:1rem;padding:1.1rem;border:1px solid var(--border-color);border-radius:1.15rem;background:var(--surface-color);box-shadow:var(--shadow-sm);cursor:pointer;transition:transform .2s ease,border-color .2s ease,box-shadow .2s ease}.achievement-card:hover{transform:translateY(-3px);border-color:rgba(109,84,216,.38);box-shadow:var(--shadow-md)}.achievement-card:focus-visible{outline:3px solid rgba(109,84,216,.25);outline-offset:2px}.achievement-card.is-locked{opacity:.78}.achievement-card[hidden]{display:none}.achievement-card.is-highlighted{animation:achievementPulse 1.4s ease}.achievement-emblem{position:relative;display:grid;flex:0 0 auto;width:3.2rem;height:3.2rem;place-items:center;border-radius:1rem;background:var(--surface-soft);font-size:1.35rem}.achievement-emblem.rarity-rare{color:#168b9c}.achievement-emblem.rarity-epic{color:#7a49d8}.achievement-emblem.rarity-legendary{color:#d58a00}.earned-check{position:absolute;right:-.25rem;bottom:-.25rem;display:grid;width:1.25rem;height:1.25rem;place-items:center;border:2px solid var(--surface-color);border-radius:50%;color:#fff;background:#22a06b;font-size:.6rem}.achievement-card-body{display:grid;min-width:0;flex:1;gap:.55rem}.achievement-card-topline,.achievement-progress-meta,.achievement-card-footer{display:flex;align-items:center;justify-content:space-between;gap:.6rem}.rarity-label,.achievement-xp{font-size:.62rem;font-weight:800;text-transform:uppercase;letter-spacing:.04em}.achievement-xp{color:#6954dc}.achievement-card h2{margin:0;font-size:.95rem}.achievement-card p{margin:0;color:var(--muted-color);font-size:.72rem;line-height:1.55}.achievement-progress-meta{font-size:.62rem}.achievement-progress-track{height:.38rem;overflow:hidden;border-radius:1rem;background:var(--surface-soft)}.achievement-progress-track span{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#6954dc,#a076f4);transition:width .35s ease}.achievement-card-footer{flex-wrap:wrap;color:var(--muted-color);font-size:.62rem}.achievement-feature{display:inline-flex;align-items:center;gap:.3rem;margin-left:auto;padding:.35rem .5rem;border:0;border-radius:.55rem;color:var(--muted-color);background:var(--surface-soft);font-size:.62rem}.achievement-feature.is-featured{color:#6954dc;background:rgba(109,84,216,.1)}.achievement-timeline{display:grid;gap:.15rem}.timeline-item{display:flex;align-items:center;gap:.8rem;padding:.75rem;border-radius:.85rem}.timeline-item:hover{background:var(--surface-soft)}.timeline-icon{display:grid;width:2.2rem;height:2.2rem;place-items:center;border-radius:.7rem;color:#6954dc;background:rgba(109,84,216,.1)}.timeline-item>div{display:grid;flex:1}.timeline-item strong{font-size:.75rem}.timeline-item small{color:var(--muted-color);font-size:.65rem}.achievement-drawer{position:fixed;z-index:1090;inset:0}.achievement-drawer[hidden]{display:none}.achievement-drawer-backdrop{position:absolute;inset:0;width:100%;height:100%;border:0;background:rgba(15,13,28,.55);backdrop-filter:blur(3px)}.achievement-drawer-panel{position:absolute;top:0;right:0;display:flex;width:min(27rem,92vw);height:100%;flex-direction:column;gap:1rem;padding:2rem;overflow-y:auto;color:var(--text-color);background:var(--surface-color);box-shadow:-1rem 0 3rem rgba(0,0,0,.16);animation:drawerIn .25s ease}.drawer-close{align-self:flex-end;width:2.3rem;height:2.3rem;border:0;border-radius:.75rem;color:var(--text-color);background:var(--surface-soft)}.drawer-emblem{display:grid;width:4.8rem;height:4.8rem;place-items:center;border-radius:1.35rem;color:#fff;background:linear-gradient(135deg,#6954dc,#a176f1);box-shadow:0 1rem 2rem rgba(83,57,185,.2);font-size:2rem}.achievement-drawer-panel h2{margin:0;font-size:1.55rem}.achievement-drawer-panel>p{color:var(--muted-color);line-height:1.7}.drawer-progress>div:first-child{display:flex;justify-content:space-between;margin-bottom:.45rem;font-size:.72rem}.drawer-stats{display:grid;gap:.65rem;margin:0}.drawer-stats>div{display:flex;align-items:center;justify-content:space-between;padding:.8rem;border-radius:.85rem;background:var(--surface-soft)}.drawer-stats dt{color:var(--muted-color);font-size:.7rem}.drawer-stats dd{margin:0;font-size:.72rem;font-weight:800}.achievement-drawer-open{overflow:hidden}@keyframes drawerIn{from{transform:translateX(100%)}to{transform:translateX(0)}}@keyframes achievementPulse{0%,100%{box-shadow:var(--shadow-sm)}50%{box-shadow:0 0 0 .35rem rgba(109,84,216,.18),var(--shadow-md)}}@media(max-width:991.98px){.achievement-summary{grid-template-columns:repeat(2,1fr)}.achievement-collection,.next-goals-grid{grid-template-columns:repeat(2,1fr)}}@media(max-width:767.98px){.achievement-insights{grid-template-columns:1fr}.level-path{overflow-x:auto;grid-template-columns:repeat(5,6.5rem);padding-bottom:.5rem}.achievement-collection,.next-goals-grid{grid-template-columns:1fr}}@media(max-width:575.98px){.achievement-summary{width:100%;grid-template-columns:repeat(2,1fr)}.achievement-toolbar,.achievement-section-head{align-items:flex-start;flex-direction:column}.achievement-result-count{padding-left:.5rem}.achievement-card{padding:.9rem}.achievement-card-footer{align-items:flex-start;flex-direction:column}.achievement-feature{margin-left:0}.achievement-drawer-panel{padding:1.25rem}}
/* Public author profile */
.public-author-page{display:grid;width:100%;max-width:92rem;gap:1rem;margin-inline:auto}.author-hero{overflow:hidden}.author-cover{position:relative;height:11rem;overflow:hidden;background:radial-gradient(circle at 18% 20%,rgba(255,255,255,.24),transparent 24%),radial-gradient(circle at 82% 45%,rgba(255,255,255,.18),transparent 22%),linear-gradient(125deg,#221a59,#5945cd 58%,#9573f2)}.author-cover::after{position:absolute;right:7%;bottom:-6rem;width:18rem;height:18rem;border:1px solid rgba(255,255,255,.17);border-radius:50%;content:""}.author-cover-orb{position:absolute;top:-4rem;left:40%;width:12rem;height:12rem;border-radius:50%;background:rgba(255,255,255,.08);filter:blur(2px)}.author-hero-content{display:grid;grid-template-columns:auto minmax(0,1fr);gap:1.3rem;padding:0 1.5rem 1.3rem}.author-avatar{position:relative;width:9rem;height:9rem;margin-top:-4.3rem;border:.4rem solid var(--surface-color);border-radius:2rem;background:var(--surface-color);box-shadow:0 1rem 2.8rem rgba(34,25,87,.22);object-fit:cover}.author-identity{min-width:0;padding-top:1rem}.author-name-row{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem}.author-name-row h1{margin:0;font-size:clamp(1.65rem,4vw,2.45rem)}.author-name-row>div:first-child>span{color:var(--muted-color);font-size:.72rem}.author-actions{display:flex;align-items:center;gap:.45rem}.author-actions form{margin:0}.author-icon-action{display:grid;width:2.7rem;height:2.7rem;place-items:center;border:1px solid var(--border-color);border-radius:.8rem;color:var(--text-color);background:var(--surface-color)}.author-headline{max-width:48rem;margin:.7rem 0 .4rem;font-size:.88rem;font-weight:650}.author-meta,.author-links{display:flex;flex-wrap:wrap;gap:.75rem;margin-top:.55rem;color:var(--muted-color);font-size:.68rem}.author-meta a,.author-links a{color:var(--primary-color);text-decoration:none}.author-links a{padding:.3rem .5rem;border-radius:.5rem;background:var(--primary-soft)}.author-stat-strip{display:grid;grid-template-columns:repeat(6,1fr);border-top:1px solid var(--border-color)}.author-stat-strip>div,.author-stat-strip>button{display:grid;gap:.08rem;padding:.9rem;border:0;border-right:1px solid var(--border-color);color:var(--text-color);background:transparent;text-align:center}.author-stat-strip>button:hover{background:var(--primary-soft)}.author-stat-strip strong{font-size:1.05rem}.author-stat-strip span{color:var(--muted-color);font-size:.6rem}.author-tabs{display:flex;overflow-x:auto;gap:.25rem;padding:.45rem}.author-tabs button{display:flex;flex:0 0 auto;align-items:center;gap:.4rem;padding:.62rem .85rem;border:0;border-radius:.7rem;color:var(--muted-color);background:transparent;font-size:.72rem;font-weight:750}.author-tabs button:hover{background:var(--surface-muted)}.author-tabs button.is-active{color:#fff;background:#6954dc}.author-tab-panel[hidden]{display:none}.author-content-head{display:flex;align-items:flex-end;justify-content:space-between;gap:1rem;margin:.8rem 0 1rem}.author-content-head h2,.author-achievement-head h2,.author-about-main h2,.author-activity h2{margin:.1rem 0 0;font-size:1.3rem}.author-story-tools{display:flex;align-items:center;gap:.5rem}.author-story-search{display:flex;align-items:center;gap:.45rem;min-width:13rem;padding:.52rem .7rem;border:1px solid var(--border-color);border-radius:.7rem;color:var(--muted-color);background:var(--surface-color)}.author-story-search input{width:100%;min-width:0;border:0;outline:0;color:var(--text-color);background:transparent;font-size:.7rem}.author-sort,.author-view-switch{display:flex;gap:.2rem;padding:.2rem;border:1px solid var(--border-color);border-radius:.7rem;background:var(--surface-color)}.author-sort a{padding:.38rem .5rem;border-radius:.5rem;color:var(--muted-color);font-size:.62rem;text-decoration:none}.author-sort a.is-active{color:var(--primary-color);background:var(--primary-soft)}.author-view-switch button{display:grid;width:2rem;height:2rem;place-items:center;border:0;border-radius:.5rem;color:var(--muted-color);background:transparent}.author-view-switch button.is-active{color:var(--primary-color);background:var(--primary-soft)}.author-category-chips{display:flex;overflow-x:auto;gap:.35rem;margin-bottom:1rem}.author-category-chips button{flex:0 0 auto;padding:.42rem .65rem;border:1px solid var(--border-color);border-radius:2rem;color:var(--muted-color);background:var(--surface-color);font-size:.65rem}.author-category-chips button.is-active{border-color:#6954dc;color:#fff;background:#6954dc}.author-category-chips span{opacity:.7}.author-story-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1rem}.author-story-card{display:grid;min-width:0;overflow:hidden;border:1px solid var(--border-color);border-radius:1.15rem;background:var(--surface-color);box-shadow:var(--shadow-sm);transition:transform .2s ease,box-shadow .2s ease}.author-story-card:hover{transform:translateY(-4px);box-shadow:var(--shadow-md)}.author-story-card[hidden]{display:none}.author-story-cover{position:relative;display:block;height:11rem;overflow:hidden}.author-story-cover img{width:100%;height:100%;transition:transform .35s ease;object-fit:cover}.author-story-card:hover .author-story-cover img{transform:scale(1.035)}.author-story-cover>span{position:absolute;right:.65rem;bottom:.65rem;padding:.25rem .4rem;border-radius:.45rem;color:#fff;background:rgba(19,15,40,.72);backdrop-filter:blur(8px);font-size:.58rem}.author-story-body{display:grid;align-content:start;gap:.55rem;padding:1rem}.author-story-kicker,.author-story-card footer{display:flex;align-items:center;justify-content:space-between;gap:.6rem;color:var(--muted-color);font-size:.6rem}.author-story-kicker>span{color:var(--primary-color);font-weight:750}.author-story-card h3{margin:0;font-size:.95rem}.author-story-card h3 a{color:var(--text-color);text-decoration:none}.author-story-card p{display:-webkit-box;overflow:hidden;margin:0;color:var(--muted-color);font-size:.7rem;line-height:1.5;-webkit-box-orient:vertical;-webkit-line-clamp:2}.author-story-card footer{padding-top:.55rem;border-top:1px solid var(--border-color)}.author-story-card footer>a{margin-left:auto;color:var(--primary-color);font-weight:750;text-decoration:none}.author-story-grid.is-list{grid-template-columns:1fr}.author-story-grid.is-list .author-story-card{grid-template-columns:14rem minmax(0,1fr)}.author-story-grid.is-list .author-story-cover{height:100%;min-height:9rem}.author-empty{grid-column:1/-1;display:grid;min-height:18rem;place-content:center;justify-items:center;padding:2rem;text-align:center}.author-empty>i{color:#8b76e9;font-size:2.5rem}.author-empty h2{margin:.6rem 0 .2rem;font-size:1.1rem}.author-empty p{color:var(--muted-color)}.author-search-empty{display:grid;min-height:12rem;place-content:center;justify-items:center;color:var(--muted-color)}.author-search-empty i{font-size:2rem}.author-pagination{display:flex;align-items:center;justify-content:center;gap:1rem;margin-top:1.2rem}.author-pagination a{padding:.5rem .7rem;border:1px solid var(--border-color);border-radius:.65rem;color:var(--primary-color);background:var(--surface-color);text-decoration:none}.author-pagination span{color:var(--muted-color);font-size:.7rem}.author-about-grid{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(17rem,.6fr);gap:1rem}.author-about-main,.author-facts,.author-activity{padding:1.35rem}.author-about-main>p{color:var(--muted-color);line-height:1.75;white-space:pre-line}.author-about-main h3{margin-top:1.3rem;font-size:.85rem}.author-genre-list{display:flex;flex-wrap:wrap;gap:.4rem}.author-genre-list span{padding:.35rem .55rem;border-radius:.55rem;color:var(--primary-color);background:var(--primary-soft);font-size:.65rem}.author-facts h2{margin:0 0 .8rem;font-size:1rem}.author-facts>div{display:grid;gap:.5rem}.author-facts span{display:grid;grid-template-columns:auto 1fr;column-gap:.6rem;padding:.7rem;border-radius:.75rem;background:var(--surface-muted)}.author-facts i{grid-row:1/3;align-self:center;color:var(--primary-color)}.author-facts strong{font-size:.72rem}.author-facts small{color:var(--muted-color);font-size:.6rem}.author-achievement-head{display:flex;align-items:flex-end;justify-content:space-between;margin:.8rem 0}.author-achievement-head>div:last-child{display:grid;text-align:right}.author-achievement-head>div:last-child span{color:var(--muted-color);font-size:.65rem}.author-level-track{height:.38rem;margin-bottom:1rem;overflow:hidden;border-radius:1rem;background:var(--surface-muted)}.author-level-track span{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#6954dc,#a176f1)}.author-achievement-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:1rem}.author-achievement-grid article{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:.8rem;padding:1rem}.author-achievement-grid article>span{display:grid;width:3rem;height:3rem;place-items:center;border-radius:.9rem;color:#6954dc;background:var(--primary-soft);font-size:1.25rem}.author-achievement-grid small{color:var(--muted-color);font-size:.58rem;text-transform:uppercase}.author-achievement-grid h3{margin:.1rem 0;font-size:.8rem}.author-achievement-grid p{margin:0;color:var(--muted-color);font-size:.62rem}.author-achievement-grid article>strong{color:var(--primary-color);font-size:.65rem}.author-activity>a{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:.8rem;padding:.75rem;border-radius:.8rem;color:var(--text-color);text-decoration:none}.author-activity>a:hover{background:var(--surface-muted)}.author-activity>a>span{display:grid;width:2.4rem;height:2.4rem;place-items:center;border-radius:.7rem;color:var(--primary-color);background:var(--primary-soft)}.author-activity>a>div{display:grid}.author-activity strong{font-size:.72rem}.author-activity small{color:var(--muted-color);font-size:.62rem}@media(max-width:1100px){.author-story-grid{grid-template-columns:repeat(2,1fr)}.author-content-head{align-items:flex-start;flex-direction:column}.author-story-tools{width:100%;flex-wrap:wrap}.author-story-search{flex:1}.author-achievement-grid{grid-template-columns:repeat(2,1fr)}}@media(max-width:767.98px){.author-cover{height:8rem}.author-hero-content{grid-template-columns:1fr;justify-items:center;padding-inline:1rem;text-align:center}.author-avatar{width:7.5rem;height:7.5rem;margin-top:-4rem}.author-identity{width:100%;padding-top:0}.author-name-row{align-items:center;flex-direction:column}.author-actions{width:100%;justify-content:center;flex-wrap:wrap}.author-meta,.author-links{justify-content:center}.author-stat-strip{display:flex;overflow-x:auto}.author-stat-strip>div,.author-stat-strip>button{min-width:6.5rem;flex:1}.author-story-grid,.author-achievement-grid{grid-template-columns:1fr}.author-about-grid{grid-template-columns:1fr}.author-story-tools{display:grid;grid-template-columns:1fr auto}.author-story-search{grid-column:1/-1}.author-sort{overflow-x:auto}.author-story-grid.is-list .author-story-card{grid-template-columns:8rem minmax(0,1fr)}}@media(max-width:480px){.public-author-page{padding-inline:0}.author-story-card,.author-hero,.author-tabs,.author-about-main,.author-facts,.author-activity{border-radius:1rem}.author-sort{grid-column:1/-1}.author-view-switch{display:none}.author-story-grid.is-list .author-story-card{grid-template-columns:1fr}.author-story-grid.is-list .author-story-cover{height:10rem}.author-actions .btn{flex:1}.author-achievement-grid article{grid-template-columns:auto 1fr}.author-achievement-grid article>strong{grid-column:2}}
/* Threaded comments */
.comment-card{display:grid;grid-template-columns:auto 1fr;gap:.8rem;padding:1rem;border:1px solid var(--border-color);border-radius:1rem;background:var(--surface-color)}.comment-card>img{width:2.8rem;height:2.8rem;border-radius:.8rem;object-fit:cover}.comment-card__body{min-width:0}.comment-card__body>header{display:flex;justify-content:space-between;gap:1rem}.comment-card__body>header a{color:var(--dark-color);font-size:.8rem;font-weight:750;text-decoration:none}.comment-card__body>header time{color:var(--muted-color);font-size:.65rem}.comment-card .comment-text{margin-top:.45rem;font-size:.82rem}.comment-actions{display:flex;gap:.8rem}.comment-actions button{padding:0;border:0;color:var(--muted-color);background:transparent;font-size:.68rem}.comment-actions button:hover{color:var(--primary-color)}.comment-replies{display:grid;gap:.6rem;margin-top:.8rem;padding-left:1rem;border-left:2px solid var(--primary-soft)}.comment-card--reply{padding:.75rem;border:0;background:var(--surface-muted)}.reply-form,.comment-inline-edit{display:grid;gap:.5rem;margin-top:.7rem}.reply-form textarea,.comment-inline-edit textarea{width:100%;padding:.65rem;border:1px solid var(--border-color);border-radius:.7rem;resize:vertical;background:var(--surface-muted);color:var(--dark-color)}.reply-form>div{display:flex;justify-content:flex-end;gap:.4rem}@media(max-width:575.98px){.comment-card{grid-template-columns:2.3rem 1fr}.comment-card>img{width:2.3rem;height:2.3rem}.comment-card__body>header{flex-direction:column;gap:.1rem}.comment-replies{padding-left:.35rem}}
/* System states */
.system-state{display:grid;min-height:65vh;place-content:center;justify-items:center;padding:2rem;text-align:center}.system-state>span{color:var(--primary-soft);font-size:clamp(5rem,18vw,11rem);font-weight:900;letter-spacing:-.08em;line-height:.8}.system-state>.bi{margin-top:-2rem;color:var(--primary-color);font-size:3rem}.system-state h1{margin:1rem 0 .4rem;font-size:clamp(1.8rem,5vw,3rem)}.system-state p{max-width:32rem;margin-bottom:1.4rem;color:var(--muted-color)}
/* Live search */
.live-search{position:relative}.search-suggestions{position:absolute;z-index:30;top:calc(100% + .55rem);right:0;left:0;overflow:hidden;border:1px solid var(--border-color);border-radius:1rem;background:var(--surface-color);box-shadow:var(--shadow-lg)}.search-suggestions[hidden]{display:none}.search-suggestions a{display:flex;align-items:center;gap:.65rem;padding:.65rem;color:var(--dark-color);text-decoration:none}.search-suggestions a:hover{background:var(--primary-soft)}.search-suggestions img{width:2.7rem;height:2.2rem;border-radius:.5rem;object-fit:cover}.search-suggestions span{display:grid;min-width:0}.search-suggestions strong{overflow:hidden;font-size:.72rem;text-overflow:ellipsis;white-space:nowrap}.search-suggestions small{color:var(--muted-color);font-size:.62rem}.social-page-wide{max-width:82rem}
html[data-theme="dark"] h1,html[data-theme="dark"] h2,html[data-theme="dark"] h3,html[data-theme="dark"] h4,html[data-theme="dark"] h5,html[data-theme="dark"] h6,html[data-theme="dark"] .card-title,html[data-theme="dark"] .nav-link,html[data-theme="dark"] .btn-link,html[data-theme="dark"] .text-dark{color:#f2eefb!important}html[data-theme="dark"] .home-hero__content p,html[data-theme="dark"] .section-heading p,html[data-theme="dark"] article header .text-muted{color:#b9b2c9!important}html[data-theme="dark"] .story-content blockquote{color:#c9c3d7}html[data-theme="dark"] .hero-feature h2,html[data-theme="dark"] .continue-draft h2{color:#fff!important}
.chat-typing{padding:.35rem 1.2rem;color:var(--muted-color);background:var(--surface-muted);font-size:.65rem}.chat-typing[hidden]{display:none}.chat-offline .chat-main__header span::after{margin-left:.4rem;color:#d58a00;content:'· переподключение…'}
/* Editor link dialog */
.editor-link-dialog{width:min(92vw,32rem);padding:0;border:1px solid var(--border-color);border-radius:1.25rem;color:var(--text-color);background:var(--surface-color);box-shadow:0 2rem 6rem rgba(20,14,54,.35)}.editor-link-dialog::backdrop{background:rgba(21,16,45,.55);backdrop-filter:blur(5px)}.editor-link-dialog form{display:grid;gap:1rem;padding:1.25rem}.editor-link-dialog header,.editor-link-dialog footer{display:flex;align-items:center;justify-content:space-between;gap:1rem}.editor-link-dialog header span{color:var(--primary-color);font-size:.62rem;font-weight:800;text-transform:uppercase}.editor-link-dialog h2{margin:.1rem 0;font-size:1.25rem}.editor-link-dialog header>button{border:0;color:var(--muted-color);background:transparent;font-size:1.5rem}.editor-link-dialog label{display:grid;gap:.4rem;font-size:.72rem;font-weight:750}.editor-link-dialog input{width:100%;padding:.75rem .8rem;border:1px solid var(--border-color);border-radius:.75rem;outline:0;color:var(--text-color);background:var(--surface-muted)}.editor-link-dialog input:focus{border-color:var(--primary-color);box-shadow:0 0 0 .2rem var(--primary-soft)}.editor-link-dialog p{display:flex;gap:.5rem;margin:0;color:var(--muted-color);font-size:.65rem}.editor-link-dialog footer>div{display:flex;gap:.4rem}

/* Comment moderation and sorting */
.comments-heading{display:flex;align-items:center;justify-content:space-between;gap:1rem}.comment-sort{display:flex;gap:.25rem;padding:.2rem;border:1px solid var(--border-color);border-radius:.75rem;background:var(--surface-color)}.comment-sort a{padding:.4rem .6rem;border-radius:.55rem;color:var(--muted-color);font-size:.65rem;text-decoration:none}.comment-sort a.is-active{color:var(--primary-color);background:var(--primary-soft)}.comment-card.is-pinned{border-color:rgba(105,84,220,.4);box-shadow:0 0 0 .2rem rgba(105,84,220,.07)}.comment-pinned{margin-right:auto;padding:.18rem .4rem;border-radius:.4rem;color:var(--primary-color);background:var(--primary-soft);font-size:.58rem;font-weight:750}@media(max-width:575.98px){.comments-heading{align-items:flex-start;flex-direction:column}.comment-sort{margin-bottom:1rem}}

/* Achievement collection */
.achievements-page{max-width:92rem}.achievements-hero{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:1.5rem;margin-bottom:1.2rem;padding:clamp(1.4rem,4vw,2.5rem);border-radius:1.6rem;color:#fff;background:radial-gradient(circle at 80% 20%,rgba(161,126,255,.55),transparent 25%),linear-gradient(125deg,#1e174b,#5b4bdb 65%,#795fff);box-shadow:0 1.4rem 3.8rem rgba(49,37,125,.24)}.achievements-hero h1{margin:.2rem 0;font-size:clamp(2.2rem,5vw,4rem)}.achievements-hero p{margin:0;color:#d9d4ff}.level-orbit{display:grid;width:8rem;height:8rem;place-items:center;border-radius:50%;background:conic-gradient(#fff calc(var(--progress)*1%),rgba(255,255,255,.18) 0);box-shadow:0 0 2.5rem rgba(255,255,255,.15)}.level-orbit::before{position:absolute;width:6.7rem;height:6.7rem;border-radius:50%;background:#493bc0;content:''}.level-orbit>div{position:relative;display:grid;justify-items:center}.level-orbit span{font-size:.65rem;text-transform:uppercase}.level-orbit strong{font-size:2.5rem;line-height:1}.achievement-summary{grid-column:1/-1;display:flex;gap:1rem;padding-top:1rem;border-top:1px solid rgba(255,255,255,.15)}.achievement-summary span{padding-right:1rem;border-right:1px solid rgba(255,255,255,.15);color:#d9d4ff;font-size:.7rem}.achievement-summary strong{color:#fff;font-size:1rem}.achievement-filters{display:flex;overflow-x:auto;gap:.4rem;margin-bottom:1.2rem;padding:.35rem;border:1px solid var(--border-color);border-radius:1rem;background:var(--surface-color)}.achievement-filters button{padding:.6rem .9rem;border:0;border-radius:.75rem;color:var(--muted-color);background:transparent;font-size:.75rem;font-weight:700;white-space:nowrap}.achievement-filters button.is-active{color:var(--primary-color);background:var(--primary-soft)}.achievement-collection{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1rem}.achievement-card{position:relative;display:grid;overflow:hidden;grid-template-columns:auto 1fr;gap:1rem;padding:1.2rem;border:1px solid var(--border-color);border-radius:1.25rem;background:var(--surface-color);box-shadow:var(--shadow-sm);transition:transform .25s ease,box-shadow .25s ease}.achievement-card:hover{transform:translateY(-5px);box-shadow:var(--shadow-lg)}.achievement-card[hidden]{display:none}.achievement-card__shine{position:absolute;top:-100%;left:-40%;width:35%;height:300%;background:linear-gradient(90deg,transparent,rgba(255,255,255,.25),transparent);transform:rotate(22deg);transition:left .7s ease}.achievement-card.is-earned:hover .achievement-card__shine{left:120%}.achievement-emblem{display:grid;width:4.5rem;height:4.5rem;place-items:center;border-radius:50%;background:conic-gradient(var(--rarity-color) calc(var(--progress)*1%),var(--surface-muted) 0)}.achievement-emblem>div{display:grid;width:3.7rem;height:3.7rem;place-items:center;border-radius:50%;color:var(--rarity-color);background:var(--surface-color)}.achievement-emblem svg{width:1.7rem;height:1.7rem}.achievement-card__content{min-width:0}.rarity-label{color:var(--rarity-color);font-size:.6rem;font-weight:850;text-transform:uppercase;letter-spacing:.09em}.achievement-card h2{margin:.2rem 0;font-size:1rem}.achievement-card p{margin:0;color:var(--muted-color);font-size:.7rem;line-height:1.45}.achievement-card__progress{grid-column:1/-1;display:grid;grid-template-columns:1fr auto;align-items:center;gap:.6rem}.achievement-card__progress>div{height:.35rem;overflow:hidden;border-radius:1rem;background:var(--surface-muted)}.achievement-card__progress>div span{display:block;height:100%;border-radius:inherit;background:var(--rarity-color)}.achievement-card__progress small{color:var(--muted-color);font-size:.62rem}.achievement-card footer{grid-column:1/-1;display:flex;justify-content:space-between;padding-top:.65rem;border-top:1px solid var(--border-color);color:var(--muted-color);font-size:.62rem}.achievement-card footer span{display:flex;align-items:center;gap:.25rem}.achievement-card>time{color:var(--muted-color);font-size:.58rem}.feature-achievement{display:flex;justify-self:end;align-items:center;gap:.25rem;padding:.25rem .45rem;border:0;border-radius:.5rem;color:var(--muted-color);background:var(--surface-muted);font-size:.6rem}.feature-achievement.is-active{color:#9b6600;background:#fff1ba}.achievement-card--common{--rarity-color:#77808f}.achievement-card--rare{--rarity-color:#168da5}.achievement-card--epic{--rarity-color:#7a4bd7}.achievement-card--legendary{--rarity-color:#d89611}.achievement-card--legendary.is-earned{border-color:rgba(216,150,17,.45);box-shadow:0 1rem 3rem rgba(216,150,17,.12)}.achievement-card.is-locked{filter:saturate(.35);opacity:.75}.achievement-card.is-locked .achievement-emblem>div{color:var(--muted-color)}.achievement-all-link{display:flex;align-items:center;align-self:center;gap:.3rem;color:var(--primary-color);font-size:.7rem;font-weight:750;text-decoration:none;white-space:nowrap}.achievement-unlock{position:fixed;z-index:100;top:50%;left:50%;display:grid;width:min(92vw,25rem);justify-items:center;padding:2rem;border:1px solid rgba(255,255,255,.2);border-radius:1.5rem;color:#fff;background:radial-gradient(circle at 50% 15%,#806cff,#30246e 60%,#17132e);box-shadow:0 2rem 6rem rgba(13,9,39,.5);text-align:center;opacity:0;transform:translate(-50%,-45%) scale(.9);transition:.35s ease}.achievement-unlock.is-visible{opacity:1;transform:translate(-50%,-50%) scale(1)}.achievement-unlock>button{position:absolute;top:.7rem;right:.8rem;border:0;color:#d9d4ff;background:transparent;font-size:1.5rem}.achievement-unlock>span{color:#c9c1ff;font-size:.65rem;font-weight:850;text-transform:uppercase;letter-spacing:.13em}.achievement-unlock__icon{display:grid;width:5rem;height:5rem;margin:1rem;place-items:center;border-radius:50%;color:#fff;background:linear-gradient(135deg,#a589ff,#6048e2);box-shadow:0 0 2.5rem rgba(164,132,255,.65)}.achievement-unlock__icon svg{width:2.4rem;height:2.4rem}.achievement-unlock h2{margin:0;color:#fff!important}.achievement-unlock p{color:#d8d2ef}.achievement-unlock>strong{margin-bottom:1rem;color:#ffd86b}.achievement-unlock__particles{position:absolute;inset:50%;pointer-events:none}.achievement-unlock__particles i{position:absolute;width:.35rem;height:.35rem;border-radius:50%;background:#ffd86b;animation:achievement-particle 1.4s ease-out var(--delay) both;transform:rotate(var(--angle)) translateX(0)}@keyframes achievement-particle{70%,100%{opacity:0;transform:rotate(var(--angle)) translateX(10rem)}}@media(max-width:991.98px){.achievement-collection{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:575.98px){.achievements-hero{grid-template-columns:1fr}.level-orbit{width:6.5rem;height:6.5rem}.level-orbit::before{width:5.4rem;height:5.4rem}.achievement-summary{overflow-x:auto}.achievement-summary span{white-space:nowrap}.achievement-collection{grid-template-columns:1fr}}@media(prefers-reduced-motion:reduce){.achievement-card__shine,.achievement-unlock__particles{display:none}.achievement-unlock{transition:none}}
