:root {
    color-scheme: dark;
    --bg: #08090d;
    --panel: #141820;
    --panel-2: #1d2330;
    --text: #f4f7fb;
    --muted: #9ba8ba;
    --line: #2c3442;
    --accent: #f2c14e;
    --accent-2: #54d6b6;
    --danger: #ff5f6d;
}


* {
    box-sizing: border-box;
}


body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: var(--bg);
    color: var(--text);
    padding-bottom: 78px;
}


body[data-theme="light"] {
    color-scheme: light;
    --bg: #f6f7fb;
    --panel: #ffffff;
    --panel-2: #eef2f7;
    --text: #12161f;
    --muted: #5d6878;
    --line: #d8e0eb;
    --accent: #bf7b00;
    --accent-2: #087c68;
    --danger: #ca3345;
}


a {
    color: inherit;
}


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


.topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 64px;
    padding: 12px 20px;
    background: color-mix(in srgb, var(--bg) 90%, transparent);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(14px);
}


.brand {
    color: var(--accent);
    font-weight: 800;
    text-decoration: none;
}


.top-icons {
    display: flex;
    align-items: center;
    gap: 8px;
}


.top-icons a {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    color: var(--text);
    text-decoration: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
}


.bottom-nav {
    position: fixed;
    left: 50%;
    bottom: 10px;
    z-index: 30;
    display: flex;
    justify-content: space-around;
    gap: 4px;
    width: min(560px, calc(100% - 20px));
    transform: translateX(-50%);
    border: 1px solid var(--line);
    border-radius: 22px;
    background: color-mix(in srgb, var(--panel) 90%, transparent);
    padding: 8px;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(18px);
}


.bottom-nav a {
    display: grid;
    place-items: center;
    min-width: 58px;
    padding: 6px 8px;
    border-radius: 16px;
    color: var(--muted);
    text-decoration: none;
}


.bottom-nav a span {
    font-size: 1.25rem;
    line-height: 1;
}


.bottom-nav a small {
    margin-top: 2px;
    font-size: 0.68rem;
    font-weight: 800;
}


.bottom-nav a.active {
    background: rgba(242, 193, 78, 0.16);
    color: var(--accent);
}


.button,
button {
    border: 0;
    border-radius: 8px;
    padding: 10px 14px;
    background: var(--accent);
    color: #111;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}


.button.small {
    padding: 8px 10px;
}


.button.ghost,
button.ghost {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--line);
}


.button.danger,
button.danger {
    background: var(--danger);
    color: white;
}


.text-button {
    background: transparent;
    color: var(--danger);
    padding: 0;
}


.flash-wrap {
    position: fixed;
    top: 76px;
    left: 50%;
    z-index: 20;
    width: min(92vw, 620px);
    transform: translateX(-50%);
}


.flash {
    margin: 0 0 8px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel-2);
}


.flash-success {
    border-color: rgba(84, 214, 182, 0.55);
}


.flash-warning {
    border-color: rgba(242, 193, 78, 0.65);
}


.flash-error {
    border-color: rgba(255, 95, 109, 0.65);
}


.placeholder {
    display: grid;
    place-items: center;
    color: var(--accent);
    font-size: clamp(4rem, 16vw, 10rem);
    font-weight: 900;
    background: linear-gradient(135deg, #10141b, #263242);
}


.byline,
.muted {
    color: var(--muted);
}


.meta-row,
.tags,
.article-actions,
.inline-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}


.badge,
.tags span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.13);
    font-size: 0.85rem;
}


.badge.danger {
    background: var(--danger);
    color: white;
}


.rail-link.primary {
    background: var(--accent);
    color: #111;
    font-weight: 800;
}


.empty-state,
.form-page,
.dashboard,
.article-shell {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
    padding: 96px 0 40px;
}


.form-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
}


.form-page.wide {
    display: block;
}


.panel {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    padding: 18px;
}


.form-panel {
    width: min(100%, 720px);
    display: grid;
    gap: 14px;
}


.form-panel label,
.suggest-form {
    display: grid;
    gap: 7px;
}


input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 11px 12px;
    background: #0d1016;
    color: var(--text);
}


textarea {
    resize: vertical;
}


.check {
    display: flex !important;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 9px;
}


.check input {
    width: auto;
}


.dashboard {
    display: grid;
    gap: 18px;
}


.dashboard-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
}


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


table {
    width: 100%;
    border-collapse: collapse;
}


th,
td {
    padding: 11px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}


.article-hero {
    width: 100%;
    max-height: 62vh;
    object-fit: cover;
    border-radius: 8px;
}


.article-header,
.article-body,
.comments {
    margin-top: 18px;
}


.article-body {
    display: grid;
    gap: 18px;
    font-size: 1.1rem;
    line-height: 1.7;
}


.article-body img {
    width: 100%;
    border-radius: 8px;
}


blockquote {
    margin: 0;
    padding: 18px;
    border-left: 4px solid var(--accent-2);
    background: var(--panel);
}


.blocked {
    margin-top: 18px;
    color: var(--danger);
    font-weight: 800;
}


.blurred {
    filter: blur(20px);
}


.embed {
    overflow: hidden;
    border-radius: 8px;
}


.comment,
.admin-item,
.suggestion {
    padding: 14px 0;
    border-top: 1px solid var(--line);
}


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


.compare > div,
.block-row {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel-2);
    padding: 12px;
}


.block-editor,
#blocks,
.block-row {
    display: grid;
    gap: 12px;
}


.block-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}


.tag-form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}


@media (max-width: 760px) {
    .topbar {
        align-items: flex-start;
        flex-direction: column;
    }


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


}
.topic-pill {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(84, 214, 182, 0.16);
    color: #c8fff1;
    border: 1px solid rgba(84, 214, 182, 0.38);
    font-size: 0.86rem;
    font-weight: 800;
}


.tags .tag {
    border: 1px solid rgba(255, 255, 255, 0.15);
    font-weight: 800;
}


.tag-unverified {
    background: rgba(242, 193, 78, 0.18) !important;
    color: #ffe39d;
    border-color: rgba(242, 193, 78, 0.48) !important;
}


.tag-verified {
    background: rgba(84, 214, 182, 0.18) !important;
    color: #bffceb;
    border-color: rgba(84, 214, 182, 0.5) !important;
}


.tag-inaccurate {
    background: rgba(255, 95, 109, 0.2) !important;
    color: #ffc5cb;
    border-color: rgba(255, 95, 109, 0.5) !important;
}


.rail-button strong {
    display: block;
    margin-top: 4px;
    color: var(--accent);
    font-size: 1.05rem;
}


.rail-icon {
    display: block;
}


.rail-link.primary {
    min-height: 66px;
}


/* Article page refresh */
.readable-page {
    width: min(880px, calc(100% - 32px));
}


.article-hero-wrap {
    margin: 0 calc(50% - 50vw);
    max-height: 70svh;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
}


.article-hero {
    width: 100%;
    max-height: 70svh;
    border-radius: 0;
}


.article-header {
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
}


.article-header h1 {
    font-size: clamp(2.25rem, 8vw, 4.8rem);
    line-height: 1;
    text-wrap: balance;
}


.article-actions {
    justify-content: space-between;
    margin: 18px 0 12px;
}


.article-control-bar {
    display: flex;
    gap: 9px;
    flex-wrap: wrap;
    align-items: center;
    margin: 12px 0;
}


.article-control-bar form {
    margin: 0;
}


.back-link {
    margin-bottom: 14px;
}


.article-body {
    gap: 22px;
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
    font-size: 1.12rem;
}


.article-body h2 {
    margin: 20px 0 0;
    font-size: clamp(1.55rem, 5vw, 2.4rem);
    line-height: 1.12;
}


.article-body p {
    margin: 0;
}


.media-block {
    position: relative;
    margin: 8px 0;
    overflow: hidden;
    border-radius: 8px;
    background: var(--panel);
}


.media-block img,
.embed iframe {
    display: block;
    width: 100%;
}


.embed iframe {
    min-height: 360px;
    border: 0;
}


.nsfw-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 10px;
    align-content: center;
    background: rgba(8, 9, 13, 0.58);
    text-align: center;
}


.nsfw-cover span {
    font-weight: 900;
    letter-spacing: 0;
}


.media-block.revealed .nsfw-cover {
    display: none;
}


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


.comment-form,
.report-panel form {
    display: grid;
    gap: 10px;
}


.report-panel {
    background: rgba(20, 24, 32, 0.55);
    border-color: rgba(255, 255, 255, 0.08);
}


.report-panel h2 {
    margin: 0 0 6px;
    color: var(--muted);
    font-size: 1rem;
}


.report-panel .button.danger {
    width: max-content;
    padding: 9px 12px;
}


.external-link {
    color: var(--accent-2);
    word-break: break-word;
}


/* Editor refresh */
.form-page.wide .form-panel {
    width: min(100%, 980px);
    margin: 0 auto;
}


.block-heading {
    align-items: flex-start;
}


.block-type-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}


.block-type-actions .button {
    min-height: 42px;
    padding: 9px 11px;
}


.block-row {
    gap: 10px;
}


.block-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}


.block-toolbar > div {
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
    justify-content: flex-end;
}


.block-toolbar button {
    padding: 7px 9px;
    background: #303949;
    color: var(--text);
}


.soft-hidden {
    opacity: 0.45;
}


.submit-bar {
    position: sticky;
    bottom: 0;
    z-index: 5;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    padding: 14px 0 0;
    background: linear-gradient(180deg, rgba(8, 9, 13, 0), var(--bg) 28%);
}


.submit-bar .button {
    min-height: 48px;
    flex: 1 1 150px;
}


.submit-bar .schedule {
    background: var(--accent-2);
}


.editor-section {
    display: grid;
    gap: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(29, 35, 48, 0.42);
    padding: 16px;
}


.editor-section h2 {
    margin: 0;
}


.mini-upload {
    padding: 12px;
    border-width: 1px;
}


.media-thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 8px;
    background: #05070a;
}


.embed video,
.embed iframe {
    width: 100%;
    max-height: 70vh;
    border: 0;
    border-radius: 8px;
}


/* Moderation workflow */
.moderation-queue,
.article-moderation-card,
.report-card {
    display: grid;
    gap: 14px;
}


.report-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}


.report-head h3 {
    margin: 0 0 5px;
}


.report-head p {
    margin: 0;
}


.moderation-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, max-content)) minmax(260px, 1fr);
    gap: 10px;
    align-items: center;
}


.moderation-actions form {
    margin: 0;
}


.status-reviewed {
    border-left: 4px solid var(--accent-2);
    padding-left: 14px;
}


.status-dismissed {
    opacity: 0.72;
}


.article-moderation-card .suggest-form {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}


.suggest-details {
    border-top: 1px solid var(--line);
    padding-top: 10px;
}


.suggest-details summary {
    cursor: pointer;
    color: var(--accent);
    font-weight: 800;
}


.suggest-details .suggest-form {
    margin-top: 12px;
}


/* Article status workflow */
.status-banner {
    display: grid;
    gap: 6px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel-2);
    padding: 14px;
}


.status-pill {
    display: inline-flex;
    width: max-content;
    min-height: 30px;
    align-items: center;
    border-radius: 999px;
    padding: 5px 11px;
    background: rgba(255, 255, 255, 0.12);
    font-weight: 900;
}


.status-published .status-pill {
    background: rgba(84, 214, 182, 0.18);
    color: #bffceb;
}


.status-scheduled .status-pill {
    background: rgba(242, 193, 78, 0.18);
    color: #ffe39d;
}


.status-hidden .status-pill {
    background: rgba(255, 95, 109, 0.2);
    color: #ffc5cb;
}


.status-archived .status-pill {
    background: rgba(155, 168, 186, 0.18);
    color: #d9e0ea;
}


.upload-dropzone {
    position: relative;
    display: grid !important;
    gap: 7px;
    border: 2px dashed #465267;
    border-radius: 8px;
    background: rgba(29, 35, 48, 0.66);
    padding: 18px;
    cursor: pointer;
}


.upload-dropzone.drag-over {
    border-color: var(--accent);
    background: rgba(242, 193, 78, 0.12);
}


.upload-dropzone input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}


.upload-dropzone strong,
.upload-dropzone small,
.upload-file-name {
    pointer-events: none;
}


.upload-file-name {
    color: var(--accent-2);
    font-style: normal;
}


.article-section {
    display: grid;
    gap: 12px;
}


.article-row-card {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(220px, 0.9fr) minmax(180px, auto);
    gap: 16px;
    align-items: start;
    border-top: 1px solid var(--line);
    padding-top: 14px;
}


.article-row-card h3 {
    margin: 0 0 6px;
}


.article-row-card p {
    margin: 0 0 6px;
}


.article-row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}


.article-row-actions form {
    margin: 0;
}


.article-row-actions .button,
.article-row-actions button {
    min-height: 42px;
}


/* Admin control center */
.admin-shell {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 96px 0 48px;
    display: grid;
    gap: 18px;
}


.admin-nav {
    position: sticky;
    top: 68px;
    z-index: 8;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(20, 24, 32, 0.94);
    backdrop-filter: blur(12px);
}


.admin-nav a {
    flex: 0 0 auto;
    border-radius: 8px;
    padding: 10px 12px;
    color: var(--text);
    text-decoration: none;
    background: rgba(255, 255, 255, 0.05);
}


.admin-nav a:hover {
    background: rgba(242, 193, 78, 0.16);
}


.admin-page-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}


.admin-page-heading h1 {
    margin: 0 0 6px;
    font-size: clamp(2rem, 6vw, 3.4rem);
    line-height: 1;
}


.admin-page-heading p {
    margin: 0;
}


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


.admin-metric-card {
    display: grid;
    gap: 10px;
    min-height: 132px;
    align-content: space-between;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    padding: 16px;
    text-decoration: none;
}


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


.admin-metric-card strong {
    font-size: 2.6rem;
    line-height: 1;
}


.admin-metric-card.good strong {
    color: var(--accent-2);
}


.admin-metric-card.urgent strong {
    color: var(--danger);
}


.admin-metric-card.scheduled strong {
    color: #85b8ff;
}


.admin-metric-card.neutral strong {
    color: #d9e0ea;
}


.filter-row,
.admin-search-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}


.admin-search-row input {
    flex: 1 1 260px;
}


.admin-search-row select {
    flex: 0 1 180px;
}


.filter-pill {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 9px 12px;
    color: var(--text);
    text-decoration: none;
    background: var(--panel);
}


.filter-pill.active {
    border-color: rgba(242, 193, 78, 0.58);
    background: rgba(242, 193, 78, 0.16);
    color: #ffe39d;
}


.admin-card-list,
.admin-list {
    display: grid;
    gap: 12px;
}


.admin-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
}


.admin-record-card {
    display: grid;
    gap: 13px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    padding: 16px;
}


.admin-record-card h2 {
    margin: 0 0 6px;
    font-size: 1.25rem;
}


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


.form-grid {
    display: grid;
    gap: 12px;
}


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


.settings-link-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
}


.admin-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: end;
}


.admin-card {
    display: grid;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    padding: 16px;
}


.admin-record-main,
.admin-record-meta,
.admin-action-row,
.admin-inline-form,
.admin-list-row {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}


.admin-record-main {
    justify-content: space-between;
    align-items: flex-start;
}


.admin-record-meta {
    color: var(--muted);
    font-size: 0.92rem;
}


.admin-action-row {
    align-items: stretch;
}


.admin-action-row form,
.admin-page-heading form {
    margin: 0;
}


.admin-details-panel {
    border-top: 1px solid var(--line);
    padding-top: 10px;
}


.admin-details-panel summary {
    cursor: pointer;
    color: var(--accent);
    font-weight: 800;
}


.admin-details-panel form {
    margin-top: 12px;
}


.badge-stack {
    display: flex;
    gap: 8px;
    align-items: flex-end;
    flex-direction: column;
}


.badge-stack.inline {
    align-items: flex-start;
    flex-direction: row;
    flex-wrap: wrap;
}


.status-badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    width: max-content;
    border-radius: 999px;
    padding: 5px 10px;
    background: rgba(255, 255, 255, 0.12);
    color: var(--text);
    font-size: 0.85rem;
    font-weight: 900;
}


.status-draft {
    background: rgba(155, 168, 186, 0.18);
    color: #d9e0ea;
}


.status-published,
.status-approved,
.status-reviewed {
    background: rgba(84, 214, 182, 0.18);
    color: #bffceb;
}


.status-scheduled {
    background: rgba(70, 139, 255, 0.18);
    color: #b8d4ff;
}


.status-hidden,
.status-open,
.status-pending,
.status-action_taken {
    background: rgba(255, 143, 95, 0.2);
    color: #ffd1bf;
}


.status-archived,
.status-dismissed,
.status-rejected {
    background: rgba(155, 168, 186, 0.14);
    color: #bac5d2;
}


.admin-list-row {
    justify-content: space-between;
    border-top: 1px solid var(--line);
    padding-top: 10px;
}


.admin-list-row p {
    margin: 0;
    flex: 1 1 280px;
}


.is-read {
    opacity: 0.65;
}


.location-feed-banner {
    position: fixed;
    top: 126px;
    left: 50%;
    z-index: 8;
    display: flex;
    gap: 12px;
    align-items: center;
    width: min(560px, calc(100% - 28px));
    transform: translateX(-50%);
    border: 1px solid rgba(247, 196, 83, 0.35);
    border-radius: 8px;
    background: rgba(19, 22, 29, 0.92);
    padding: 10px 12px;
    box-shadow: var(--shadow);
}


.location-feed-banner p {
    margin: 0;
    flex: 1;
    color: var(--muted);
}


.location-feed-banner a {
    color: var(--accent);
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}


.location-feed-banner.warning {
    border-color: rgba(255, 109, 109, 0.45);
}


.location-pill {
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    padding: 5px 8px;
    background: rgba(255, 255, 255, 0.1);
    color: #f8fbff;
    font-size: 0.78rem;
    font-weight: 800;
}


.score-debug {
    max-width: min(520px, 80vw);
    margin-top: 10px;
    color: var(--muted);
    font-size: 0.82rem;
}


.score-debug summary {
    cursor: pointer;
    color: var(--accent);
    font-weight: 800;
}


.reshare-kicker {
    color: var(--accent);
    font-weight: 900;
}


.reshare-caption {
    border-left: 3px solid var(--accent);
    padding-left: 10px;
    color: #fff6d8 !important;
}


.profile-shell {
    width: min(1100px, calc(100% - 32px));
    margin: 0 auto;
    padding: 96px 0 48px;
    display: grid;
    gap: 18px;
}


.profile-hero {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    padding: 20px;
}


.avatar-placeholder {
    display: grid;
    place-items: center;
    width: 86px;
    height: 86px;
    border-radius: 50%;
    background: var(--accent);
    color: #111;
    font-size: 2.6rem;
    font-weight: 900;
}


.profile-hero h1 {
    margin: 0 0 4px;
}


.profile-stat-row,
.profile-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}


.profile-stat-row a,
.profile-stat-row div,
.profile-tabs a {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    padding: 12px;
    color: var(--text);
    text-decoration: none;
}


.profile-stat-row strong {
    display: block;
    font-size: 1.6rem;
}


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


.reshare-card {
    border-color: rgba(242, 193, 78, 0.32);
}


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


.profile-hero-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
}


.icon-button {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--panel-2);
    color: var(--text);
    text-decoration: none;
    font-size: 1.2rem;
}


.settings-shell,
.confirm-shell {
    width: min(860px, calc(100% - 28px));
    margin: 0 auto;
    padding: 96px 0 42px;
}


.settings-header {
    margin-bottom: 14px;
}


.settings-section {
    display: grid;
    gap: 16px;
    margin-bottom: 14px;
}


.settings-section form {
    display: grid;
    gap: 12px;
}


.danger-zone {
    border-color: rgba(255, 95, 109, 0.35);
}


.danger-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}


.confirm-shell {
    min-height: 80svh;
    display: grid;
    place-items: center;
}


.confirm-card {
    width: min(520px, 100%);
    display: grid;
    gap: 14px;
}


.confirm-dialog {
    width: min(420px, calc(100% - 30px));
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--panel);
    color: var(--text);
    padding: 18px;
}


.confirm-dialog::backdrop {
    background: rgba(0, 0, 0, 0.58);
}


/* Modern social profile */
.profile-shell {
    width: min(1040px, calc(100% - 24px));
    margin: 0 auto;
    padding: 82px 0 112px;
    display: grid;
    gap: 18px;
}


.profile-banner {
    position: relative;
}


.profile-banner-art {
    min-height: 170px;
    border-radius: 0 0 28px 28px;
    background:
        radial-gradient(circle at 18% 12%, rgba(242, 193, 78, 0.55), transparent 28%),
        radial-gradient(circle at 78% 26%, rgba(84, 214, 182, 0.34), transparent 30%),
        linear-gradient(135deg, #202637, #0e1118 64%);
}


.profile-header-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 18px;
    align-items: end;
    margin-top: -54px;
    padding: 0 16px 8px;
}


.profile-avatar {
    position: relative;
    overflow: hidden;
    display: grid;
    place-items: center;
    width: 112px;
    height: 112px;
    border: 5px solid var(--bg);
    border-radius: 50%;
    background: var(--accent);
    color: #111;
    font-size: 3.2rem;
    font-weight: 900;
    box-shadow: 0 16px 35px rgba(0, 0, 0, 0.28);
}


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


.profile-avatar-wrap {
    position: relative;
    width: fit-content;
}


.profile-frame {
    position: absolute;
    inset: -18px;
    width: calc(100% + 36px);
    height: calc(100% + 36px);
    object-fit: contain;
    pointer-events: none;
    z-index: 2;
}


.profile-info {
    min-width: 0;
    padding-top: 60px;
}


.profile-title-row {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}


.profile-title-row h1,
.profile-title-row p,
.profile-bio,
.profile-meta {
    margin: 0;
}


.profile-title-row h1 {
    font-size: clamp(1.8rem, 7vw, 3rem);
}


.profile-title-row p,
.profile-meta {
    color: var(--muted);
}


.profile-bio {
    max-width: 720px;
    margin-top: 8px;
    line-height: 1.45;
}


.profile-meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 8px;
    font-size: 0.9rem;
}


.role-badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text);
    padding: 5px 10px;
    font-size: 0.78rem;
    font-weight: 900;
}


.role-admin,
.role-editor {
    background: rgba(84, 214, 182, 0.16);
    color: #8ff2dc;
}


.role-journalist {
    background: rgba(242, 193, 78, 0.16);
    color: #ffe39d;
}


.profile-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    padding-bottom: 8px;
}


.profile-gear {
    border-radius: 50%;
}


.profile-stats {
    display: flex;
    gap: 4px;
    justify-content: space-around;
    border-block: 1px solid var(--line);
    padding: 10px 0;
    overflow-x: auto;
}


.profile-stats a,
.profile-stats div {
    min-width: 82px;
    color: var(--text);
    text-align: center;
    text-decoration: none;
}


.profile-stats strong {
    display: block;
    font-size: 1.15rem;
}


.profile-stats span {
    color: var(--muted);
    font-size: 0.78rem;
}


.profile-tabs {
    position: sticky;
    top: 64px;
    z-index: 8;
    display: flex;
    gap: 4px;
    overflow-x: auto;
    border-bottom: 1px solid var(--line);
    background: color-mix(in srgb, var(--bg) 94%, transparent);
    padding: 8px 0;
    backdrop-filter: blur(12px);
}


.profile-tabs a {
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    padding: 9px 13px;
    white-space: nowrap;
}


.profile-tabs a.active,
.profile-tabs a:hover {
    background: rgba(242, 193, 78, 0.14);
    color: var(--accent);
}


.profile-section {
    scroll-margin-top: 120px;
}


.profile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 14px;
}


.social-card,
.reshare-preview-card {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    background: var(--panel);
}


.social-card-media,
.reshare-preview-media {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #10141b;
    text-decoration: none;
}


.social-card-media img,
.reshare-preview-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}


.social-card-placeholder {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    color: var(--accent);
    font-size: 2.8rem;
    font-weight: 900;
    background: linear-gradient(135deg, #10141b, #293346);
}


.social-card-body,
.reshare-preview-body {
    display: grid;
    gap: 9px;
    padding: 12px;
}


.social-card h3,
.reshare-preview-card h3 {
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.18;
}


.social-card p,
.reshare-preview-desc {
    display: -webkit-box;
    overflow: hidden;
    margin: 0;
    color: var(--muted);
    line-height: 1.35;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}


.social-card-footer,
.reshare-preview-stats,
.reshare-preview-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    color: var(--muted);
    font-size: 0.82rem;
}


.reshare-preview-media > .reshare-identity {
    position: absolute;
    left: 10px;
    top: 10px;
    border-radius: 999px;
    background: rgba(8, 9, 13, 0.72);
    color: #fff;
    padding: 5px 9px;
    font-size: 0.78rem;
    font-weight: 900;
    backdrop-filter: blur(8px);
}


.identity-row {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
}


.identity-badges {
    display: inline-flex;
    align-items: center;
    gap: 0.32rem;
    flex-wrap: wrap;
}


.asset-badge {
    max-width: 12rem;
}


.comment-author-line .identity-badges {
    margin-left: 0.35rem;
}


.reshare-identity .identity-badges,
.reshare-kicker .identity-badges {
    gap: 0.24rem;
}


.reshare-preview-card .reshare-caption {
    border-left: 3px solid var(--accent);
    padding-left: 9px;
    color: var(--text) !important;
}


.profile-empty {
    grid-column: 1 / -1;
    border: 1px dashed var(--line);
    border-radius: 18px;
    color: var(--muted);
    padding: 22px;
    text-align: center;
}


.compact-profile-page {
    width: min(720px, calc(100% - 24px));
}


.profile-list-header,
.profile-user-row {
    display: flex;
    gap: 12px;
    align-items: center;
}


.profile-list-header {
    margin-bottom: 6px;
}


.profile-user-list {
    display: grid;
    gap: 4px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--panel);
    overflow: hidden;
}


.profile-user-row {
    border-top: 1px solid var(--line);
    padding: 13px;
}


.profile-user-row:first-child {
    border-top: 0;
}


.profile-user-row > div {
    flex: 1;
    min-width: 0;
}


.profile-user-row h2,
.profile-user-row p {
    margin: 0;
}


.profile-user-row p {
    color: var(--muted);
}


.profile-user-row a {
    text-decoration: none;
}


.profile-user-avatar {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--accent);
    color: #111;
    font-weight: 900;
}


.line-clamp-2,
.compact-description {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}


.reshare-card {
    border: 0;
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.24);
}


.reshare-media {
    min-height: 220px;
}


.reshare-overlay {
    background:
        linear-gradient(180deg, rgba(8, 9, 13, 0.02), rgba(8, 9, 13, 0.06)),
        var(--panel);
}


.reshare-title {
    font-size: 1.18rem;
}


.reshare-meta {
    font-size: 0.86rem;
}


.reshare-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    padding-top: 2px;
}


.reshare-actions form {
    margin: 0;
}


.reshare-actions .icon-action,
.reshare-actions .icon-action-button {
    width: 46px;
    min-height: 46px;
    color: var(--text);
    text-shadow: none;
}


.reshare-actions .icon-action-count {
    font-size: 0.72rem;
}


.reshare-actions .icon-action small,
.reshare-action-rail .icon-action small {
    display: block;
    color: var(--muted);
    font-size: 0.56rem;
    font-weight: 800;
    line-height: 1;
}


.reshare-actions .icon-action.active,
.reshare-actions .icon-action.active .icon-action-button {
    color: var(--accent);
}




















/* Absolute profile background reset: remove the oversized dark blob/shell decoration. */
body:has(.profile-page),
main:has(.profile-page) {
    background: var(--bg) !important;
    overflow-x: hidden !important;
}


body:has(.profile-page)::before,
body:has(.profile-page)::after,
main:has(.profile-page)::before,
main:has(.profile-page)::after,
.profile-page.profile-shell::before,
.profile-page.profile-shell::after,
.profile-page .profile-banner::before,
.profile-page .profile-banner::after {
    content: none !important;
    display: none !important;
}


.profile-page.profile-shell {
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    outline: 0 !important;
    overflow: visible !important;
}


.profile-page .profile-banner,
.profile-page .profile-header,
.profile-page .profile-main-info {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    filter: none !important;
}


.profile-page .profile-banner-art {
    height: 150px !important;
    min-height: 0 !important;
    border-radius: 0 0 28px 28px !important;
    box-shadow: none !important;
    filter: none !important;
    transform: none !important;
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--profile-accent, var(--accent)) 32%, #242a38), #0f141d 62%) !important;
}


@media (min-width: 760px) {
    .profile-page .profile-banner-art {
        height: 190px !important;
    }


/* Final profile sizing override. Keep this at the end so older profile experiments cannot win. */
}
.profile-page.profile-shell {
    width: 100% !important;
    max-width: 820px !important;
    margin: 0 auto !important;
    padding: 74px 16px 104px !important;
    gap: 16px !important;
}


.profile-page .profile-banner {
    position: relative !important;
    min-height: 0 !important;
    overflow: visible !important;
}


.profile-page .profile-banner-art {
    height: 150px !important;
    min-height: 0 !important;
    border-radius: 0 0 28px 28px !important;
    overflow: hidden !important;
    background: linear-gradient(135deg, color-mix(in srgb, var(--profile-accent, var(--accent)) 34%, #162034), #0b0f19 58%) !important;
}


.profile-page .profile-banner-art::before,
.profile-page .profile-banner-art::after {
    content: none !important;
}


.profile-page .profile-header {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 14px !important;
    align-items: start !important;
    margin-top: -52px !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}


.profile-page .profile-avatar-wrap {
    position: relative !important;
    width: 112px !important;
    height: 112px !important;
    margin-left: 18px !important;
    z-index: 2 !important;
}


.profile-page .profile-avatar {
    width: 100% !important;
    height: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    display: grid !important;
    place-items: center !important;
    overflow: hidden !important;
    border: 4px solid var(--bg) !important;
    border-radius: 50% !important;
    background: linear-gradient(135deg, var(--profile-accent, var(--accent)), #111827) !important;
    color: #07111f !important;
    font-size: 3.1rem !important;
    font-weight: 950 !important;
    object-fit: cover !important;
}


.profile-page .profile-avatar img {
    width: 100% !important;
    height: 100% !important;
    display: block !important;
    object-fit: cover !important;
}


.profile-page .profile-frame {
    position: absolute !important;
    inset: -16px !important;
    width: calc(100% + 32px) !important;
    height: calc(100% + 32px) !important;
    object-fit: contain !important;
    pointer-events: none !important;
    z-index: 3 !important;
}


.profile-page .profile-frame-active {
    outline: 0 !important;
    box-shadow: 0 0 0 5px color-mix(in srgb, var(--profile-accent, var(--accent)) 18%, transparent) !important;
}


.profile-page .profile-main-info {
    display: grid !important;
    gap: 8px !important;
    padding: 0 4px !important;
}


.profile-page .profile-title-row {
    display: block !important;
}


.profile-page .profile-title-row h1 {
    margin: 0 !important;
    font-size: clamp(2rem, 8vw, 2.65rem) !important;
    line-height: 0.98 !important;
    letter-spacing: 0 !important;
}


.profile-page .profile-meta-row {
    margin-top: 8px !important;
    color: var(--muted) !important;
    font-size: 1rem !important;
    gap: 0.5rem !important;
}


.profile-page .identity-badges {
    gap: 0.38rem !important;
}


.profile-page .rank-badge {
    border-color: rgba(84, 214, 182, 0.38) !important;
    background: rgba(84, 214, 182, 0.14) !important;
    color: #a7f3e3 !important;
}


.profile-page .role-badge {
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}


.profile-page .profile-bio {
    max-width: 64ch !important;
    margin-top: 2px !important;
    color: var(--text) !important;
    font-size: 1rem !important;
}


.profile-page .profile-meta {
    margin-top: 2px !important;
}


.profile-page .profile-actions {
    justify-content: flex-start !important;
    padding: 0 4px 0 !important;
}


.profile-page .profile-stats {
    display: flex !important;
    justify-content: space-between !important;
    gap: 4px !important;
    width: 100% !important;
    margin-top: 2px !important;
    padding: 12px 0 !important;
    border-block: 1px solid var(--line) !important;
    overflow-x: auto !important;
    scrollbar-width: none !important;
}


.profile-page .profile-stats::-webkit-scrollbar {
    display: none !important;
}


.profile-page .profile-stats a,
.profile-page .profile-stats div {
    flex: 1 0 92px !important;
    min-width: 86px !important;
    padding: 0 6px !important;
}


.profile-page .profile-stats strong {
    font-size: 1.22rem !important;
}


.profile-page .profile-xp-card {
    width: min(620px, 100%) !important;
    margin: 0 auto !important;
    padding: 14px 16px !important;
    border-radius: 18px !important;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.035)) !important;
}


.profile-page .profile-xp-card div:first-child {
    align-items: center !important;
}


.profile-page .profile-xp-card strong {
    font-size: 1.18rem !important;
}


.profile-page .profile-xp-card span {
    color: var(--accent) !important;
    font-weight: 900 !important;
}


.profile-page .profile-tabs {
    top: 58px !important;
    margin-inline: -2px !important;
    padding: 8px 0 !important;
}


@media (min-width: 760px) {
    .profile-page.profile-shell {
        max-width: 860px !important;
        padding-top: 82px !important;
    }


    .profile-page .profile-banner-art {
        height: 190px !important;
    }


    .profile-page .profile-header {
        grid-template-columns: 132px minmax(0, 1fr) !important;
        column-gap: 18px !important;
        margin-top: -60px !important;
    }


    .profile-page .profile-avatar-wrap {
        width: 132px !important;
        height: 132px !important;
        margin-left: 24px !important;
    }


    .profile-page .profile-main-info {
        padding-top: 62px !important;
    }


    .profile-page .profile-title-row h1 {
        font-size: 2.65rem !important;
    }


    .profile-page .profile-actions {
        grid-column: 2 !important;
    }


/* Profile layout polish: compact social header, readable badges, no oversized banner blob. */
}
.profile-page.profile-shell {
    width: 100%;
    max-width: 820px;
    margin: 0 auto;
    padding: 74px 16px 104px;
    gap: 16px;
}


.profile-page .profile-banner {
    position: relative;
    overflow: visible;
    min-height: 0;
}


.profile-page .profile-banner-art {
    height: 150px;
    min-height: 0;
    border-radius: 0 0 28px 28px;
    overflow: hidden;
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--profile-accent, var(--accent)) 34%, #162034), #0b0f19 58%),
        radial-gradient(circle at 24% 18%, rgba(255, 255, 255, 0.16), transparent 30%);
}


.profile-page .profile-banner-art::before,
.profile-page .profile-banner-art::after {
    content: none !important;
}


.profile-page .profile-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    align-items: start;
    margin-top: -52px;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}


.profile-page .profile-avatar-wrap {
    position: relative;
    width: 112px;
    height: 112px;
    margin-left: 18px;
    z-index: 2;
}


.profile-page .profile-avatar {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 4px solid var(--bg);
    border-radius: 50%;
    background: linear-gradient(135deg, var(--profile-accent, var(--accent)), #111827);
    color: #07111f;
    font-size: 3.1rem;
    font-weight: 950;
    object-fit: cover;
}


.profile-page .profile-avatar img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}


.profile-page .profile-frame {
    position: absolute;
    inset: -16px;
    width: calc(100% + 32px);
    height: calc(100% + 32px);
    object-fit: contain;
    pointer-events: none;
    z-index: 3;
}


.profile-page .profile-frame-active {
    outline: 0;
    box-shadow: 0 0 0 5px color-mix(in srgb, var(--profile-accent, var(--accent)) 18%, transparent);
}


.profile-page .profile-main-info {
    display: grid;
    gap: 8px;
    padding: 0 4px;
}


.profile-page .profile-title-row {
    display: block;
}


.profile-page .profile-title-row h1 {
    margin: 0;
    font-size: clamp(2rem, 8vw, 2.65rem);
    line-height: 0.98;
    letter-spacing: 0;
}


.profile-page .profile-meta-row {
    margin-top: 8px;
    color: var(--muted);
    font-size: 1rem;
    gap: 0.5rem;
}


.profile-page .identity-badges {
    gap: 0.38rem;
}


.profile-page .rank-badge {
    border-color: rgba(84, 214, 182, 0.38);
    background: rgba(84, 214, 182, 0.14);
    color: #a7f3e3;
}


.profile-page .role-badge {
    border: 1px solid rgba(255, 255, 255, 0.1);
}


.profile-page .profile-bio {
    max-width: 64ch;
    margin-top: 2px;
    color: var(--text);
    font-size: 1rem;
}


.profile-page .profile-meta {
    margin-top: 2px;
}


.profile-page .profile-actions {
    justify-content: flex-start;
    padding: 0 4px 0;
}


.profile-page .profile-stats {
    display: flex;
    justify-content: space-between;
    gap: 4px;
    width: 100%;
    margin-top: 2px;
    padding: 12px 0;
    border-block: 1px solid var(--line);
    overflow-x: auto;
    scrollbar-width: none;
}


.profile-page .profile-stats::-webkit-scrollbar {
    display: none;
}


.profile-page .profile-stats a,
.profile-page .profile-stats div {
    flex: 1 0 92px;
    min-width: 86px;
    padding: 0 6px;
}


.profile-page .profile-stats strong {
    font-size: 1.22rem;
}


.profile-page .profile-xp-card {
    width: min(620px, 100%);
    margin: 0 auto;
    padding: 14px 16px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.035));
}


.profile-page .profile-xp-card div:first-child {
    align-items: center;
}


.profile-page .profile-xp-card strong {
    font-size: 1.18rem;
}


.profile-page .profile-xp-card span {
    color: var(--accent);
    font-weight: 900;
}


.profile-page .profile-tabs {
    top: 58px;
    margin-inline: -2px;
    padding: 8px 0;
}


@media (min-width: 760px) {
    .profile-page.profile-shell {
        max-width: 860px;
        padding-top: 82px;
    }


    .profile-page .profile-banner-art {
        height: 190px;
    }


    .profile-page .profile-header {
        grid-template-columns: 132px minmax(0, 1fr);
        column-gap: 18px;
        margin-top: -60px;
    }


    .profile-page .profile-avatar-wrap {
        width: 132px;
        height: 132px;
        margin-left: 24px;
    }


    .profile-page .profile-main-info {
        padding-top: 62px;
    }


    .profile-page .profile-title-row h1 {
        font-size: 2.65rem;
    }


    .profile-page .profile-actions {
        grid-column: 2;
    }


/* Visual polish pass: social surfaces, SVG-mask icons, premium badges. */
.app-icon,
}
.icon-action-icon {
    --icon-size: 1.35rem;
    display: inline-grid !important;
    place-items: center;
    width: var(--icon-size);
    height: var(--icon-size);
    overflow: hidden;
    color: currentColor;
    font-size: 0 !important;
    line-height: 0 !important;
    text-indent: -999px;
}


.app-icon::before,
.icon-action-icon::before {
    content: "" !important;
    display: block;
    width: var(--icon-size);
    height: var(--icon-size);
    background: currentColor;
    -webkit-mask: var(--svg-icon) center / contain no-repeat;
    mask: var(--svg-icon) center / contain no-repeat;
}


.icon-home { --svg-icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 11.2 12 4l8 7.2V20a1 1 0 0 1-1 1h-5v-6h-4v6H5a1 1 0 0 1-1-1v-8.8Z' fill='none' stroke='black' stroke-width='2.2' stroke-linejoin='round'/%3E%3C/svg%3E"); }

.icon-local { --svg-icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 21s7-6.4 7-12A7 7 0 1 0 5 9c0 5.6 7 12 7 12Z' fill='none' stroke='black' stroke-width='2.2'/%3E%3Ccircle cx='12' cy='9' r='2.6' fill='none' stroke='black' stroke-width='2.2'/%3E%3C/svg%3E"); }

.icon-create { --svg-icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 5v14M5 12h14' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round'/%3E%3C/svg%3E"); }

.icon-studio { --svg-icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m4 20 4.6-1 10-10a2.1 2.1 0 0 0-3-3l-10 10L4 20Z' fill='none' stroke='black' stroke-width='2.1' stroke-linejoin='round'/%3E%3Cpath d='m14 6 4 4' stroke='black' stroke-width='2.1'/%3E%3C/svg%3E"); }

.icon-profile { --svg-icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='12' cy='8' r='4' fill='none' stroke='black' stroke-width='2.2'/%3E%3Cpath d='M4.5 21a7.5 7.5 0 0 1 15 0' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E"); }

.icon-settings { --svg-icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 8.4a3.6 3.6 0 1 0 0 7.2 3.6 3.6 0 0 0 0-7.2Z' fill='none' stroke='black' stroke-width='2.1'/%3E%3Cpath d='m19 12 .9-2-2-3.4-2.2.3a7 7 0 0 0-1.5-.9L13.2 4H10.8L9.9 6a7 7 0 0 0-1.5.9l-2.2-.3-2 3.4.9 2-.9 2 2 3.4 2.2-.3c.5.4 1 .7 1.5.9l.9 2h2.4l.9-2c.5-.2 1-.5 1.5-.9l2.2.3 2-3.4-.8-2Z' fill='none' stroke='black' stroke-width='1.8' stroke-linejoin='round'/%3E%3C/svg%3E"); }

.icon-search { --svg-icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5' fill='none' stroke='black' stroke-width='2.3'/%3E%3Cpath d='m16 16 5 5' stroke='black' stroke-width='2.3' stroke-linecap='round'/%3E%3C/svg%3E"); }

.icon-notification { --svg-icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M18 9a6 6 0 1 0-12 0c0 7-2.5 7-2.5 9h17S18 16 18 9Z' fill='none' stroke='black' stroke-width='2.1' stroke-linejoin='round'/%3E%3Cpath d='M9.5 21a3 3 0 0 0 5 0' fill='none' stroke='black' stroke-width='2.1' stroke-linecap='round'/%3E%3C/svg%3E"); }

.icon-like,
[data-action-kind="article-like"] .icon-action-icon,
.icon-action[title="Like"] .icon-action-icon,
.icon-action[title="Article Like"] .icon-action-icon { --svg-icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 20.5S4 15.8 4 9.4A4.4 4.4 0 0 1 12 6.8a4.4 4.4 0 0 1 8 2.6c0 6.4-8 11.1-8 11.1Z' fill='none' stroke='black' stroke-width='2.15' stroke-linejoin='round'/%3E%3C/svg%3E"); }

.icon-dislike,
[data-action-kind="article-dislike"] .icon-action-icon,
[data-action-kind="reshare-dislike"] .icon-action-icon,
.icon-action[title*="Dislike"] .icon-action-icon { --svg-icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 4h10v11h-4l-1 5-4-5H5a2 2 0 0 1-2-2V8a4 4 0 0 1 4-4Z' fill='none' stroke='black' stroke-width='2.15' stroke-linejoin='round'/%3E%3C/svg%3E"); }

.icon-comment,
.icon-action[title="Comments"] .icon-action-icon { --svg-icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5 5h14a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-6l-5 4v-4H5a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2Z' fill='none' stroke='black' stroke-width='2.1' stroke-linejoin='round'/%3E%3C/svg%3E"); }

.icon-reshare,
[data-action-kind="reshare-like"] .icon-action-icon,
.icon-action[title="Reshare"] .icon-action-icon,
.icon-action[title="Reshare Like"] .icon-action-icon { --svg-icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M17 3 21 7l-4 4' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M3 11V9a2 2 0 0 1 2-2h16' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'/%3E%3Cpath d='m7 21-4-4 4-4' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M21 13v2a2 2 0 0 1-2 2H3' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E"); }

.icon-share,
.share-button .icon-action-icon { --svg-icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8 12h8M13 7l5 5-5 5' fill='none' stroke='black' stroke-width='2.35' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M4 5v14h8' fill='none' stroke='black' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }

.icon-report,
.icon-action[title="Report"] .icon-action-icon { --svg-icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 3 22 20H2L12 3Z' fill='none' stroke='black' stroke-width='2.1' stroke-linejoin='round'/%3E%3Cpath d='M12 9v5M12 17.5h.01' stroke='black' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E"); }


.icon-action,
.icon-action-button {
    color: rgba(255, 255, 255, 0.82);
}


.article-control-bar-clean .icon-action,
.article-control-bar-clean .icon-action-button,
.reshare-actions .icon-action,
.reshare-actions .icon-action-button {
    color: color-mix(in srgb, var(--text) 78%, transparent);
}


.icon-action.active,
.icon-action.active .icon-action-button,
.icon-action-button.active {
    color: var(--accent);
}


.profile-shell {
    width: min(980px, calc(100% - 22px));
    gap: 14px;
}


.profile-banner-art {
    min-height: clamp(148px, 30vw, 238px);
    border-radius: 0 0 34px 34px;
    box-shadow: 0 22px 70px rgba(0, 0, 0, 0.28);
}


.profile-header-card {
    align-items: end;
    margin-top: -62px;
    padding: 0 10px 4px;
}


.profile-avatar-wrap {
    position: relative;
}


.profile-avatar-frame {
    border: 5px solid var(--bg);
    background:
        linear-gradient(var(--bg), var(--bg)) padding-box,
        linear-gradient(135deg, var(--profile-accent), rgba(255, 255, 255, 0.5)) border-box;
}


.profile-title-row h1 {
    letter-spacing: 0;
}


.profile-actions .button,
.profile-gear {
    border: 0;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.18);
}


.profile-stats {
    justify-content: space-around;
    gap: 0;
    padding: 0.85rem 0.35rem;
    border: 0;
    border-radius: 0;
    background: transparent;
}


.profile-stats a,
.profile-stats div {
    min-width: 70px;
    border: 0;
    background: transparent;
    padding: 0.4rem 0.5rem;
    text-align: center;
}


.profile-stats strong {
    font-size: clamp(1.08rem, 3vw, 1.45rem);
    letter-spacing: 0;
}


.profile-stats span {
    display: block;
    margin-top: 0.15rem;
    color: var(--muted);
    font-size: 0.78rem;
}


.profile-tabs {
    position: sticky;
    top: 68px;
    z-index: 5;
    gap: 0.35rem;
    justify-content: center;
    padding: 0.45rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: blur(16px);
}


.profile-tabs a {
    border: 0;
    border-radius: 999px;
    background: transparent;
    padding: 0.52rem 0.82rem;
}


.profile-tabs a.active {
    background: var(--text);
    color: var(--bg);
}


.profile-section,
.profile-grid {
    border: 0;
}


.social-card,
.reshare-card {
    border: 0 !important;
    background: rgba(255, 255, 255, 0.055);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.22);
}


.settings-app-shell {
    width: min(720px, calc(100% - 22px));
}


.settings-group,
.settings-category-list {
    border: 0;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.045);
    box-shadow: none;
    overflow: hidden;
}


.settings-group h2 {
    padding: 0.85rem 1rem 0.25rem;
    color: var(--muted);
    font-size: 0.76rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}


.settings-row,
.settings-category-row {
    min-height: 72px;
    border: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background: transparent;
}


.settings-row:first-of-type {
    border-top: 0;
}


.settings-editor {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(0, 0, 0, 0.12);
}


.danger-group {
    background: rgba(255, 70, 86, 0.08);
}


.reshare-tile {
    overflow: hidden;
    border-radius: 24px;
}


.reshare-tile-media {
    min-height: 300px;
}


.reshare-tile-media img,
.reshare-media img {
    min-height: 100%;
    object-fit: cover;
}


.reshare-preview-body {
    margin-top: -92px;
    padding-top: 108px;
    background: linear-gradient(180deg, transparent, rgba(5, 7, 10, 0.95) 34%);
}


.reshare-caption {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    border-left: 0;
    padding-left: 0;
    color: color-mix(in srgb, var(--accent) 86%, white) !important;
    font-size: 0.93rem;
    font-weight: 750;
}


.reshare-preview-desc,
.compact-description {
    color: var(--muted);
    font-size: 0.84rem;
}


.reshare-preview-stats {
    position: absolute;
    top: 0.8rem;
    right: 0.8rem;
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}


.reshare-preview-stats span {
    border-radius: 999px;
    padding: 0.32rem 0.55rem;
    background: rgba(0, 0, 0, 0.44);
    color: #fff;
    font-size: 0.72rem;
    backdrop-filter: blur(12px);
}


.badge-gold {
    border-color: rgba(255, 210, 95, 0.72) !important;
    background: linear-gradient(135deg, #fff0a6, #d8a727 48%, #8a5b08) !important;
    color: #171004 !important;
}


.badge-elite {
    border-color: rgba(125, 211, 252, 0.75) !important;
    background: linear-gradient(135deg, #e0f7ff, #7dd3fc 40%, #4f46e5) !important;
    color: #050816 !important;
    animation: elitePulse 3.6s ease-in-out infinite;
}


.badge-max {
    border-color: rgba(255, 255, 255, 0.95) !important;
    background: conic-gradient(from 180deg, #fff, #7dd3fc, #f8d66d, #fff) !important;
    color: #050816 !important;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.22), 0 0 30px rgba(125, 211, 252, 0.32);
}


@keyframes elitePulse {
    0%, 100% { filter: saturate(1); }

    50% { filter: saturate(1.35) brightness(1.08); }


}
.comment-name-level {
    padding: 0.08rem 0.32rem;
    font-size: 0.62rem;
}


.custom-emote,
.emote-inline {
    border-radius: 6px;
}


.custom-emote {
    width: 1.35em;
    height: 1.35em;
    vertical-align: -0.25em;
    object-fit: contain;
}


.comment-form {
    position: relative;
}


.emote-picker-wrap {
    position: relative;
    display: flex;
    justify-content: flex-start;
}


.emote-fab {
    display: none;
    align-items: center;
    justify-content: center;
    width: 2.15rem;
    height: 2.15rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
    font-size: 1.2rem;
    font-weight: 900;
    cursor: pointer;
}


.emote-picker-wrap.is-typing .emote-fab,
.emote-fab:focus-visible {
    display: inline-flex;
}


.floating-picker {
    position: absolute;
    left: 0;
    bottom: calc(100% + 0.5rem);
    z-index: 20;
    display: block;
    width: min(330px, calc(100vw - 2rem));
    max-height: 260px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: color-mix(in srgb, var(--bg) 94%, transparent);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.38);
    backdrop-filter: blur(18px);
}


.emote-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.35rem;
    padding: 0.55rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}


.emote-tabs button {
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    padding: 0.45rem 0.7rem;
    font-weight: 800;
    cursor: pointer;
}


.emote-tabs button.active {
    background: var(--accent);
    color: #07111f;
}


.emote-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.45rem;
    max-height: 196px;
    overflow-y: auto;
    padding: 0.65rem;
}


.emote-choice {
    display: grid;
    place-items: center;
    gap: 0.25rem;
    min-height: 4rem;
    border: 0;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.07);
    color: var(--text);
    padding: 0.45rem;
    cursor: pointer;
}


.emote-choice:hover {
    background: rgba(255, 255, 255, 0.13);
}


.emote-choice.locked {
    cursor: not-allowed;
    opacity: 0.46;
}


.picker-emote-preview {
    width: 2.1rem;
    height: 2.1rem;
    vertical-align: middle;
}


.emote-choice span {
    display: grid;
    place-items: center;
    width: 2.1rem;
    height: 2.1rem;
    border-radius: 12px;
    background: color-mix(in srgb, var(--accent) 28%, transparent);
    font-size: 0.78rem;
    font-weight: 900;
}


.emote-choice small {
    max-width: 100%;
    overflow: hidden;
    color: var(--muted);
    font-size: 0.66rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}


.emote-picker-item img {
    width: 42px;
    height: 42px;
    object-fit: contain;
}


.report-dialog {
    width: min(460px, calc(100% - 28px));
    border: 1px solid var(--border);
    border-radius: 22px;
    background: color-mix(in srgb, var(--bg) 95%, transparent);
    color: var(--text);
    padding: 1rem;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(18px);
}


.report-dialog::backdrop {
    background: rgba(0, 0, 0, 0.58);
}


.report-dialog form {
    display: grid;
    gap: 0.85rem;
}


.report-dialog .icon-button {
    width: 36px;
    height: 36px;
    border: 0;
}


.profile-tab-panel[hidden],
.emote-choice[hidden] {
    display: none !important;
}


.bottom-nav {
    position: fixed;
    z-index: 60;
    left: 50%;
    transform: translateX(-50%) translateZ(0);
}


.bottom-nav {
    justify-content: center;
}


.custom-emote.gif-emote {
    width: 5.4em;
    height: 5.4em;
    max-width: min(180px, 42vw);
    max-height: 180px;
    vertical-align: middle;
}


.comment .custom-emote.gif-emote {
    display: inline-block;
    margin: 0.25rem 0.15rem;
}


.application-form {
    display: grid;
    gap: 1rem;
}


.application-form .settings-group {
    padding: 1rem;
}


.application-form .settings-group > h2 {
    padding: 0 0 0.75rem;
}


.topic-check-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.55rem;
}


.application-status-card {
    display: grid;
    gap: 0.75rem;
    padding: 1rem;
}


.application-status-card.accepted,
.application-status-card.status-accepted {
    border-color: rgba(84, 214, 182, 0.42);
}


.application-status-card.status-denied {
    border-color: rgba(255, 95, 109, 0.42);
}


.application-summary {
    display: grid;
    gap: 0.45rem;
    padding: 1rem;
}


.asset-admin-card {
    grid-template-columns: 96px minmax(0, 1fr);
    align-items: start;
}


.asset-preview {
    display: grid;
    place-items: center;
    width: 86px;
    height: 86px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.07);
}


.asset-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}


.asset-preview span {
    color: var(--accent);
    font-weight: 900;
}


.asset-help-panel {
    display: grid;
    gap: 0.35rem;
}


.span-all {
    grid-column: 1 / -1;
}


.rarity-legendary {
    border-color: rgba(248, 214, 109, 0.4);
}


.rarity-max {
    border-color: rgba(125, 211, 252, 0.5);
}


.reward-emote-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}


.reward-emote-preview {
    width: 2.25rem;
    height: 2.25rem;
}


/* Keep the reaction picker off to the side of the article/comment text. */
.floating-picker {
    left: auto;
    right: calc(100% + 0.75rem);
    bottom: 0;
    width: min(340px, calc(100vw - 2rem));
}


.emote-picker-close {
    position: absolute;
    top: 0.55rem;
    right: 0.55rem;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 1.8rem;
    height: 1.8rem;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text);
    font-weight: 900;
    cursor: pointer;
}


.emote-tabs {
    padding-right: 2.75rem;
}


@media (max-width: 820px) {
    .floating-picker {
        position: fixed;
        right: 0.75rem;
        bottom: calc(74px + env(safe-area-inset-bottom));
        left: 0.75rem;
        width: auto;
        max-height: min(300px, 48svh);
    }


}
@media (max-width: 700px) {
    .profile-header-card {
        grid-template-columns: 1fr;
        gap: 0.6rem;
    }


    .profile-avatar-wrap {
        margin-left: 0.35rem;
    }


    .profile-info {
        padding-top: 0;
    }


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


    .profile-tabs {
        justify-content: flex-start;
        overflow-x: auto;
    }


    .reshare-tile-media {
        min-height: 240px;
    }


/* Custom app icons replace default emoji/glyph rendering while keeping the markup lightweight. */
.app-icon,
}
.icon-action-icon {
    display: inline-grid;
    place-items: center;
    width: 1.35rem;
    height: 1.35rem;
    font-size: 0;
    line-height: 1;
}


.app-icon::before,
.icon-action-icon::before {
    font-size: 1.08rem;
    font-weight: 800;
    line-height: 1;
}


.icon-home::before { content: "⌂"; }

.icon-local::before { content: "◎"; }

.icon-create::before { content: "+"; }

.icon-studio::before { content: "✎"; }

.icon-profile::before { content: "◡"; }

.icon-settings::before { content: "⚙"; }

.icon-like::before,
[data-action-kind="article-like"] .icon-action-icon::before,
.icon-action[title="Like"] .icon-action-icon::before,
.icon-action[title="Article Like"] .icon-action-icon::before { content: "♡"; }

.icon-dislike::before,
[data-action-kind="article-dislike"] .icon-action-icon::before,
[data-action-kind="reshare-dislike"] .icon-action-icon::before,
.icon-action[title*="Dislike"] .icon-action-icon::before { content: "↓"; }

.icon-comment::before,
.icon-action[title="Comments"] .icon-action-icon::before { content: "□"; }

.icon-reshare::before,
[data-action-kind="reshare-like"] .icon-action-icon::before,
.icon-action[title="Reshare"] .icon-action-icon::before,
.icon-action[title="Reshare Like"] .icon-action-icon::before { content: "↻"; }

.icon-share::before,
.share-button .icon-action-icon::before { content: "↗"; }

.icon-report::before,
.icon-action[title="Report"] .icon-action-icon::before { content: "!"; }

.icon-search::before { content: "⌕"; }

.icon-notification::before { content: "◊"; }


.icon-action.active .icon-action-icon::before,
.icon-action-button.active .icon-action-icon::before {
    color: var(--accent);
}


.level-pill,
.rank-pill,
.profile-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.18rem 0.48rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
    font-size: 0.72rem;
    font-weight: 800;
    vertical-align: middle;
}


.badge-inline-img {
    width: 1.15em;
    height: 1.15em;
    object-fit: contain;
}


.rank-pill {
    color: var(--accent);
}


.profile-badge {
    width: fit-content;
    border-color: color-mix(in srgb, var(--accent) 55%, transparent);
}


.profile-badge.mini {
    padding: 0.12rem 0.38rem;
    font-size: 0.68rem;
}


.profile-shell {
    --profile-accent: var(--accent);
}


.profile-banner-art {
    background:
        radial-gradient(circle at 20% 20%, color-mix(in srgb, var(--profile-accent) 45%, transparent), transparent 34%),
        linear-gradient(135deg, color-mix(in srgb, var(--profile-accent) 30%, #111827), #0b0f19 65%);
}


.profile-frame-active {
    outline: 3px solid var(--profile-accent);
    box-shadow: 0 0 0 7px color-mix(in srgb, var(--profile-accent) 22%, transparent);
}


.profile-link {
    color: var(--profile-accent);
    font-size: 0.92rem;
    font-weight: 700;
    word-break: break-word;
}


.profile-level-strip,
.level-card {
    max-width: 960px;
    margin: 0 auto 1rem;
    padding: 1rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
}


.profile-level-strip {
    display: grid;
    gap: 0.65rem;
}


.profile-level-strip div:first-child,
.level-card-top {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}


.level-token {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 3rem;
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    background: var(--accent);
    color: #07111f;
    font-weight: 900;
}


.level-progress {
    height: 0.55rem;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
}


.level-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--accent), #7dd3fc);
}


.rewards-shell {
    padding-bottom: 7rem;
}


.perk-list,
.emote-library {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}


.perk-list span,
.emote-chip {
    padding: 0.45rem 0.7rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border);
    font-size: 0.88rem;
}


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


.reward-card {
    display: grid;
    gap: 0.45rem;
    align-content: start;
    padding: 1rem;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.06);
    text-align: left;
}


.reward-card.active {
    border-color: var(--accent);
}


.reward-card.locked {
    opacity: 0.5;
}


.reward-token {
    display: inline-grid;
    place-items: center;
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--accent) 28%, transparent);
    color: var(--text);
    font-weight: 900;
}


.frame-token {
    border: 3px solid var(--accent);
    background: transparent;
}


.emote-inline {
    display: inline-flex;
    vertical-align: -0.15em;
    max-width: 1.35em;
    max-height: 1.35em;
}


.emote-text {
    max-width: none;
    max-height: none;
    padding: 0 0.25em;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--accent);
    font-weight: 800;
}


.comment-sort {
    display: flex;
    gap: 0.45rem;
    margin-bottom: 0.75rem;
}


.comment-sort a {
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    color: var(--muted);
    border: 1px solid transparent;
}


.comment-sort a.active {
    color: var(--text);
    border-color: var(--border);
    background: rgba(255, 255, 255, 0.08);
}


.emote-picker-wrap {
    display: grid;
    gap: 0.5rem;
}


.emote-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}


.emote-choice {
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
    padding: 0.4rem 0.6rem;
    cursor: pointer;
}


.emote-choice.locked,
.emote-chip.locked {
    opacity: 0.45;
}


.comment-author-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
}


.reshare-actions .danger {
    min-height: 36px;
    border-radius: 999px;
    padding: 8px 10px;
    font-size: 0.78rem;
}


.reshare-feed-card .reshare-kicker {
    display: inline-flex;
    width: fit-content;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff6d8;
    padding: 6px 10px;
}


.reshare-feed-card .reshare-caption {
    max-width: 640px;
    border-left: 3px solid var(--accent);
    padding-left: 10px;
}


.reshare-action-rail {
    gap: 5px;
}


.reshare-action-rail .icon-action,
.reshare-action-rail .icon-action-button {
    min-height: 43px;
}


@media (max-width: 760px) {
    .profile-shell {
        width: min(100% - 18px, 1040px);
        padding-top: 74px;
    }


    .profile-banner-art {
        min-height: 142px;
        border-radius: 0 0 22px 22px;
    }


    .profile-header-card {
        grid-template-columns: auto minmax(0, 1fr);
        gap: 12px;
        margin-top: -46px;
        padding-inline: 8px;
    }


    .profile-avatar {
        width: 92px;
        height: 92px;
        font-size: 2.55rem;
    }


    .profile-info {
        padding-top: 50px;
    }


    .profile-actions {
        grid-column: 1 / -1;
        justify-content: flex-start;
        padding-left: 104px;
    }


    .profile-stats {
        justify-content: flex-start;
        padding-bottom: 12px;
    }


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


    .profile-user-row {
        align-items: flex-start;
    }


}
.settings-app-shell {
    width: min(720px, calc(100% - 24px));
    margin: 0 auto;
    padding: 88px 0 112px;
}


.settings-app-header {
    display: flex;
    gap: 14px;
    align-items: center;
    margin-bottom: 16px;
}


.settings-app-header h1 {
    margin: 0;
    font-size: 2rem;
}


.settings-back {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--panel);
    color: var(--text);
    font-size: 1.8rem;
    line-height: 1;
    text-decoration: none;
}


.settings-account-preview {
    display: flex;
    gap: 14px;
    align-items: center;
    margin-bottom: 22px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 22px;
    background:
        linear-gradient(135deg, rgba(242, 193, 78, 0.13), transparent 42%),
        var(--panel);
    padding: 16px;
}


.settings-avatar {
    display: grid;
    place-items: center;
    width: 62px;
    height: 62px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--accent);
    color: #111;
    font-size: 1.8rem;
    font-weight: 900;
}


.settings-account-preview h2,
.settings-account-preview p,
.settings-account-preview small {
    margin: 0;
}


.settings-account-preview small,
.settings-account-preview p {
    color: var(--muted);
}


.settings-group {
    margin-bottom: 18px;
}


.settings-group > h2 {
    margin: 0 0 8px 4px;
    color: var(--muted);
    font-size: 0.78rem;
    letter-spacing: 0;
    text-transform: uppercase;
}


.settings-group {
    border: 1px solid var(--line);
    border-radius: 18px;
    background: color-mix(in srgb, var(--panel) 94%, transparent);
    overflow: hidden;
}


.settings-group > h2 {
    padding: 14px 14px 0;
}


.settings-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    gap: 12px;
    align-items: center;
    width: 100%;
    min-height: 68px;
    border: 0;
    border-top: 1px solid var(--line);
    border-radius: 0;
    background: transparent;
    color: var(--text);
    padding: 12px 14px;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}


.settings-row:first-of-type {
    border-top: 0;
}


.settings-row:hover,
.settings-row[aria-expanded="true"] {
    background: rgba(255, 255, 255, 0.055);
}


.settings-icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.09);
    color: #eef4ff;
}


.settings-icon svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}


.settings-icon.danger {
    background: rgba(255, 95, 109, 0.16);
    color: #ff8791;
}


.settings-row-copy {
    display: grid;
    gap: 3px;
}


.settings-row-copy strong {
    font-size: 0.98rem;
}


.settings-row-copy small {
    color: var(--muted);
    line-height: 1.3;
}


.settings-row-value {
    max-width: 160px;
    overflow: hidden;
    color: var(--muted);
    font-size: 0.82rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}


.settings-chevron {
    color: var(--muted);
    font-size: 1.45rem;
}


.settings-row.danger {
    color: var(--danger);
}


.danger-group {
    border-color: rgba(255, 95, 109, 0.28);
}


.settings-editor {
    display: none;
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.035);
    padding: 14px;
}


.settings-editor.open {
    display: block;
}


.settings-editor form,
.theme-settings-form {
    display: grid;
    gap: 12px;
}


.theme-settings-form {
    border-top: 1px solid var(--line);
    padding: 14px;
}


.theme-segmented {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--bg);
    padding: 5px;
}


.theme-segmented label {
    display: grid;
    place-items: center;
    min-height: 38px;
    border-radius: 999px;
    color: var(--muted);
    cursor: pointer;
}


.theme-segmented label.active {
    background: var(--accent);
    color: #111;
    font-weight: 900;
}


.theme-segmented input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}


.rail-icon {
    display: block;
    font-size: 1.35rem;
    line-height: 1;
}


.rail-button strong,
.rail-link strong {
    display: block;
    margin-top: 3px;
    color: #fff;
    font-size: 0.82rem;
}


.rail-link.primary {
    min-height: 46px;
    border-radius: 999px;
    background: var(--accent);
    color: #111;
    text-shadow: none;
    font-weight: 900;
}


.compact-form {
    width: 100%;
}


.changed-field {
    border: 1px solid rgba(242, 193, 78, 0.42);
    border-radius: 8px;
    background: rgba(242, 193, 78, 0.1);
    padding: 10px;
}


.mini-blocks {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}


.mini-blocks p {
    margin: 0;
    word-break: break-word;
}


@media (max-width: 760px) {
    .topbar {
        min-height: 58px;
        padding: 9px 12px;
        gap: 7px;
    }


    .brand {
        font-size: 0.98rem;
    }


    .nav {
        gap: 9px;
        width: 100%;
        overflow-x: auto;
        flex-wrap: nowrap;
        justify-content: flex-start;
    }


    .nav a {
        font-size: 0.84rem;
    }


    .location-feed-banner {
        top: 116px;
        align-items: flex-start;
        flex-direction: column;
    }


    .rail-link.primary {
        min-height: 62px;
    }


    .empty-state,
    .form-page,
    .dashboard,
    .article-shell {
        width: min(100% - 20px, 1120px);
        padding-top: 96px;
    }


    .article-actions {
        align-items: flex-start;
        flex-direction: column;
    }


    .block-heading,
    .block-toolbar {
        flex-direction: column;
    }


    .block-type-actions,
    .block-toolbar > div {
        justify-content: flex-start;
    }


    .report-head,
    .moderation-actions {
        grid-template-columns: 1fr;
    }


    .report-head {
        flex-direction: column;
    }


    .article-row-card {
        grid-template-columns: 1fr;
    }


    .article-row-actions {
        justify-content: flex-start;
    }


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


    .admin-shell {
        width: min(100% - 20px, 1240px);
        padding-top: 112px;
    }


    .admin-nav {
        top: 92px;
    }


    .admin-page-heading,
    .admin-record-main,
    .admin-inline-form {
        flex-direction: column;
        align-items: stretch;
    }


    .badge-stack {
        align-items: flex-start;
        flex-direction: row;
        flex-wrap: wrap;
    }


    .admin-action-row .button,
    .admin-action-row button,
    .admin-inline-form button {
        width: 100%;
    }


/* Final social-control polish overrides */
}
.bottom-nav-item {
    -webkit-tap-highlight-color: transparent;
}


.icon-action,
.icon-action-button {
    display: grid;
    place-items: center;
    gap: 3px;
    width: 48px;
    min-width: 0;
    min-height: 48px;
    margin: 0;
    padding: 5px;
    border: 0 !important;
    border-radius: 50%;
    background: transparent !important;
    box-shadow: none !important;
    color: #fff;
    text-decoration: none;
    text-align: center;
    line-height: 1;
    cursor: pointer;
    text-shadow: 0 1px 9px rgba(0, 0, 0, 0.72);
    -webkit-tap-highlight-color: transparent;
}


.article-control-bar-clean .icon-action,
.article-control-bar-clean .icon-action-button {
    color: var(--text);
    text-shadow: none;
}


.icon-action:hover,
.icon-action:focus-visible,
.icon-action-button:hover,
.icon-action-button:focus-visible {
    background: rgba(255, 255, 255, 0.13) !important;
    outline: none;
}


.article-control-bar-clean .icon-action:hover,
.article-control-bar-clean .icon-action-button:hover {
    background: var(--panel-2) !important;
}


.icon-action-icon {
    display: block;
    font-size: 1.45rem;
    line-height: 1;
}


.icon-action-count {
    display: block;
    min-height: 0.86rem;
    color: inherit;
    font-size: 0.76rem;
    font-weight: 900;
    line-height: 1;
}


.icon-action.active,
.icon-action.active .icon-action-button,
.icon-action-button.active {
    color: var(--accent);
}


.article-control-bar-clean {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}


.reshare-actions .icon-action,
.reshare-actions .icon-action-button {
    color: var(--text);
    text-shadow: none;
}


.reshare-actions .icon-action:hover,
.reshare-actions .icon-action-button:hover {
    background: var(--panel-2) !important;
}


.reshare-actions .icon-action.active,
.reshare-actions .icon-action.active .icon-action-button {
    color: var(--accent);
}


/* Final profile sizing override. Keep this after social-control polish so older profile rules cannot win. */
.profile-page.profile-shell {
    width: 100% !important;
    max-width: 820px !important;
    margin: 0 auto !important;
    padding: 74px 16px 104px !important;
    gap: 16px !important;
}


.profile-page .profile-banner {
    position: relative !important;
    min-height: 0 !important;
    overflow: visible !important;
}


.profile-page .profile-banner-art {
    height: 150px !important;
    min-height: 0 !important;
    border-radius: 0 0 28px 28px !important;
    overflow: hidden !important;
    background: linear-gradient(135deg, color-mix(in srgb, var(--profile-accent, var(--accent)) 34%, #162034), #0b0f19 58%) !important;
}


.profile-page .profile-banner-art::before,
.profile-page .profile-banner-art::after {
    content: none !important;
}


.profile-page .profile-header {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 14px !important;
    align-items: start !important;
    margin-top: -52px !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}


.profile-page .profile-avatar-wrap {
    position: relative !important;
    width: 112px !important;
    height: 112px !important;
    margin-left: 18px !important;
    z-index: 2 !important;
}


.profile-page .profile-avatar {
    width: 100% !important;
    height: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    display: grid !important;
    place-items: center !important;
    overflow: hidden !important;
    border: 4px solid var(--bg) !important;
    border-radius: 50% !important;
    background: linear-gradient(135deg, var(--profile-accent, var(--accent)), #111827) !important;
    color: #07111f !important;
    font-size: 3.1rem !important;
    font-weight: 950 !important;
    object-fit: cover !important;
}


.profile-page .profile-avatar img {
    width: 100% !important;
    height: 100% !important;
    display: block !important;
    object-fit: cover !important;
}


.profile-page .profile-frame {
    position: absolute !important;
    inset: -16px !important;
    width: calc(100% + 32px) !important;
    height: calc(100% + 32px) !important;
    object-fit: contain !important;
    pointer-events: none !important;
    z-index: 3 !important;
}


.profile-page .profile-frame-active {
    outline: 0 !important;
    box-shadow: 0 0 0 5px color-mix(in srgb, var(--profile-accent, var(--accent)) 18%, transparent) !important;
}


.profile-page .profile-main-info {
    display: grid !important;
    gap: 8px !important;
    padding: 0 4px !important;
}


.profile-page .profile-title-row {
    display: block !important;
}


.profile-page .profile-title-row h1 {
    margin: 0 !important;
    font-size: clamp(2rem, 8vw, 2.65rem) !important;
    line-height: 0.98 !important;
    letter-spacing: 0 !important;
}


.profile-page .profile-meta-row {
    margin-top: 8px !important;
    color: var(--muted) !important;
    font-size: 1rem !important;
    gap: 0.5rem !important;
}


.profile-page .identity-badges {
    gap: 0.38rem !important;
}


.profile-page .rank-badge {
    border-color: rgba(84, 214, 182, 0.38) !important;
    background: rgba(84, 214, 182, 0.14) !important;
    color: #a7f3e3 !important;
}


.profile-page .role-badge {
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}


.profile-page .profile-bio {
    max-width: 64ch !important;
    margin-top: 2px !important;
    color: var(--text) !important;
    font-size: 1rem !important;
}


.profile-page .profile-meta {
    margin-top: 2px !important;
}


.profile-page .profile-actions {
    justify-content: flex-start !important;
    padding: 0 4px 0 !important;
}


.profile-page .profile-stats {
    display: flex !important;
    justify-content: space-between !important;
    gap: 4px !important;
    width: 100% !important;
    margin-top: 2px !important;
    padding: 12px 0 !important;
    border-block: 1px solid var(--line) !important;
    overflow-x: auto !important;
    scrollbar-width: none !important;
}


.profile-page .profile-stats::-webkit-scrollbar {
    display: none !important;
}


.profile-page .profile-stats a,
.profile-page .profile-stats div {
    flex: 1 0 92px !important;
    min-width: 86px !important;
    padding: 0 6px !important;
}


.profile-page .profile-stats strong {
    font-size: 1.22rem !important;
}


.profile-page .profile-xp-card {
    width: min(620px, 100%) !important;
    margin: 0 auto !important;
    padding: 14px 16px !important;
    border-radius: 18px !important;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.035)) !important;
}


.profile-page .profile-xp-card div:first-child {
    align-items: center !important;
}


.profile-page .profile-xp-card strong {
    font-size: 1.18rem !important;
}


.profile-page .profile-xp-card span {
    color: var(--accent) !important;
    font-weight: 900 !important;
}


.profile-page .profile-tabs {
    top: 58px !important;
    margin-inline: -2px !important;
    padding: 8px 0 !important;
}


@media (min-width: 760px) {
    .profile-page.profile-shell {
        max-width: 860px !important;
        padding-top: 82px !important;
    }


    .profile-page .profile-banner-art {
        height: 190px !important;
    }


    .profile-page .profile-header {
        grid-template-columns: 132px minmax(0, 1fr) !important;
        column-gap: 18px !important;
        margin-top: -60px !important;
    }


    .profile-page .profile-avatar-wrap {
        width: 132px !important;
        height: 132px !important;
        margin-left: 24px !important;
    }


    .profile-page .profile-main-info {
        padding-top: 62px !important;
    }


    .profile-page .profile-title-row h1 {
        font-size: 2.65rem !important;
    }


    .profile-page .profile-actions {
        grid-column: 2 !important;
    }




















/* True EOF profile background reset: kill oversized dark blob/shell decoration. */
body:has(.profile-page),
}
main:has(.profile-page) {
    background: var(--bg) !important;
    overflow-x: hidden !important;
}


body:has(.profile-page)::before,
body:has(.profile-page)::after,
main:has(.profile-page)::before,
main:has(.profile-page)::after,
.profile-page.profile-shell::before,
.profile-page.profile-shell::after,
.profile-page .profile-banner::before,
.profile-page .profile-banner::after,
.profile-page .profile-banner-art::before,
.profile-page .profile-banner-art::after {
    content: none !important;
    display: none !important;
}


.profile-page.profile-shell {
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    outline: 0 !important;
    overflow: visible !important;
}


.profile-page .profile-banner,
.profile-page .profile-header,
.profile-page .profile-main-info {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    filter: none !important;
}


.profile-page .profile-banner-art {
    height: 150px !important;
    min-height: 0 !important;
    border-radius: 0 0 28px 28px !important;
    box-shadow: none !important;
    filter: none !important;
    transform: none !important;
    background: linear-gradient(135deg, color-mix(in srgb, var(--profile-accent, var(--accent)) 32%, #242a38), #0f141d 62%) !important;
}


@media (min-width: 760px) {
    .profile-page .profile-banner-art {
        height: 190px !important;
    }


}
.profile-meta-row {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex-wrap: wrap !important;
}


/* True EOF responsive feed/article/comment/nav polish. */
body {
    padding-bottom: 96px !important;
}


.bottom-nav {
    left: 50% !important;
    right: auto !important;
    bottom: max(10px, env(safe-area-inset-bottom)) !important;
    width: min(520px, calc(100% - 22px)) !important;
    transform: translateX(-50%) !important;
    border-radius: 24px !important;
    padding: 7px !important;
}


.bottom-nav a {
    min-width: 0 !important;
    flex: 1 1 0 !important;
    padding: 7px 6px !important;
}


.icon-action,
.icon-action-button {
    width: 54px !important;
    min-height: 54px !important;
    border-radius: 50% !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}


.icon-action:hover,
.icon-action-button:hover,
.icon-action:focus-visible,
.icon-action-button:focus-visible {
    background: rgba(255, 255, 255, 0.14) !important;
}


.icon-action-icon {
    width: 1.72rem !important;
    height: 1.72rem !important;
    font-size: 1.55rem !important;
}


.icon-action-count {
    font-size: 0.78rem !important;
}


.article-shell.readable-page {
    width: min(860px, calc(100% - 32px)) !important;
    padding-top: 96px !important;
    padding-bottom: 112px !important;
}


.article-hero-wrap {
    margin-inline: 0 !important;
    border-radius: 18px !important;
    max-height: 54svh !important;
    border: 1px solid var(--line) !important;
}


.article-hero {
    max-height: 54svh !important;
    object-fit: cover !important;
}


.article-header {
    padding-top: 18px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}


.article-header h1 {
    font-size: clamp(2.25rem, 6vw, 4.5rem) !important;
    line-height: 1.02 !important;
    margin-top: 10px !important;
}


.article-header p {
    max-width: 760px !important;
}


.article-author-row {
    justify-content: flex-start !important;
    gap: 10px !important;
    margin: 14px 0 10px !important;
}


.article-author-row form {
    margin: 0 !important;
}


.article-author-row .button {
    min-height: 34px !important;
    padding: 7px 12px !important;
    border-radius: 999px !important;
}


.article-control-bar-clean {
    gap: 8px !important;
    align-items: center !important;
    margin: 14px 0 !important;
}


.article-control-bar-clean .icon-action,
.article-control-bar-clean .icon-action-button {
    width: 46px !important;
    min-height: 46px !important;
    color: var(--text) !important;
}


.comments.panel {
    margin-top: 30px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
}


.comments .section-title-row {
    padding: 0 0 12px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}


.comment-sort {
    margin: 12px 0 14px !important;
}


.comment-form {
    position: relative !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto auto !important;
    gap: 10px !important;
    align-items: end !important;
    margin: 0 0 20px !important;
    padding: 12px !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 22px !important;
    background: rgba(255, 255, 255, 0.045) !important;
}


.comment-form textarea {
    min-height: 70px !important;
    border-radius: 16px !important;
    resize: vertical !important;
}


.emote-picker-wrap {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}


.emote-fab {
    display: inline-flex !important;
    width: 42px !important;
    height: 42px !important;
}


.floating-picker,
.emote-drawer {
    position: absolute !important;
    left: 0 !important;
    right: auto !important;
    bottom: calc(100% + 10px) !important;
    top: auto !important;
    z-index: 40 !important;
    width: min(420px, calc(100vw - 36px)) !important;
    max-height: 330px !important;
    overflow: hidden !important;
    border-radius: 20px !important;
}


.emote-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    max-height: 250px !important;
    overflow-y: auto !important;
}


.emote-picker-close {
    position: absolute !important;
    top: 8px !important;
    right: 8px !important;
    z-index: 2 !important;
    width: 30px !important;
    height: 30px !important;
    padding: 0 !important;
    border-radius: 50% !important;
}


.comment {
    display: grid !important;
    grid-template-columns: 44px minmax(0, 1fr) !important;
    gap: 11px !important;
    align-items: start !important;
    padding: 14px 0 !important;
    border: 0 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    background: transparent !important;
    box-shadow: none !important;
}


.comment-avatar {
    display: grid !important;
    place-items: center !important;
    width: 44px !important;
    height: 44px !important;
    overflow: hidden !important;
    border-radius: 50% !important;
    background: linear-gradient(135deg, var(--accent), #54d6b6) !important;
    color: #07111f !important;
    font-weight: 900 !important;
}


.comment-avatar img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}


.comment-main {
    min-width: 0 !important;
}


.comment-author-line {
    gap: 6px !important;
    margin-bottom: 4px !important;
}


.comment-username {
    color: var(--muted) !important;
    font-size: 0.86rem !important;
}


.comment p {
    margin: 0 !important;
    color: color-mix(in srgb, var(--text) 90%, transparent) !important;
    line-height: 1.45 !important;
}


.comment-remove {
    margin-top: 6px !important;
    color: var(--muted) !important;
    font-size: 0.76rem !important;
}


@media (max-width: 720px) {
    body {
        padding-bottom: 92px !important;
    }


    .icon-action,
    .icon-action-button {
        width: 48px !important;
        min-height: 48px !important;
    }


    .article-shell.readable-page {
        width: min(100% - 24px, 860px) !important;
        padding-top: 88px !important;
    }


    .article-hero-wrap {
        border-radius: 14px !important;
    }


    .comment-form {
        grid-template-columns: minmax(0, 1fr) auto !important;
    }


    .comment-form textarea {
        grid-column: 1 / -1 !important;
    }


    .floating-picker,
    .emote-drawer {
        position: fixed !important;
        left: 10px !important;
        right: 10px !important;
        bottom: calc(82px + env(safe-area-inset-bottom)) !important;
        width: auto !important;
        max-height: 42svh !important;
    }


    .emote-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
        max-height: calc(42svh - 58px) !important;
    }


    .bottom-nav {
        width: min(100% - 16px, 520px) !important;
    }


/* EOF emote drawer anchoring: attach picker to the whole comment composer, not the tiny + button. */
}
.comment-form .emote-picker-wrap {
    position: static !important;
}


.comment-form .emote-picker[hidden],
.comment-form .floating-picker[hidden] {
    display: none !important;
}


.comment-form .floating-picker {
    left: 12px !important;
    bottom: calc(100% + 10px) !important;
}


@media (max-width: 720px) {
    .comment-form .floating-picker {
        left: 10px !important;
        right: 10px !important;
        bottom: calc(82px + env(safe-area-inset-bottom)) !important;
    }


/* True EOF admin control center polish. */
}
.admin-shell {
    width: min(1180px, calc(100% - 28px)) !important;
    max-width: 1180px !important;
    margin: 0 auto !important;
    padding: 92px 0 128px !important;
    display: grid !important;
    gap: 18px !important;
}


.admin-container {
    width: min(1180px, calc(100% - 28px));
    margin: 0 auto;
}


.admin-shared-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.035));
}


.admin-shared-header strong {
    display: block;
    font-size: 1.1rem;
}


.admin-eyebrow {
    display: inline-flex;
    margin-bottom: 2px;
    color: var(--accent);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}


.admin-home-link {
    white-space: nowrap;
}


.admin-nav {
    position: sticky !important;
    top: 70px !important;
    z-index: 18 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    overflow: visible !important;
}


.admin-nav-scroll {
    display: flex !important;
    gap: 8px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    padding: 8px !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 22px !important;
    background: color-mix(in srgb, var(--bg) 88%, transparent) !important;
    backdrop-filter: blur(16px) !important;
    scrollbar-width: none !important;
}


.admin-nav-scroll::-webkit-scrollbar {
    display: none !important;
}


.admin-nav a,
.admin-nav-item {
    flex: 0 0 auto !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 38px !important;
    padding: 9px 13px !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: transparent !important;
    color: var(--muted) !important;
    font-size: 0.88rem !important;
    font-weight: 900 !important;
    text-decoration: none !important;
    white-space: nowrap !important;
}


.admin-nav a:hover,
.admin-nav-item:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    color: var(--text) !important;
}


.admin-nav a.active,
.admin-nav-item.active {
    background: var(--accent) !important;
    color: #111 !important;
    box-shadow: 0 10px 28px rgba(242, 193, 78, 0.18) !important;
}


.admin-page-heading,
.admin-page-head,
.admin-page-header {
    display: flex !important;
    align-items: flex-end !important;
    justify-content: space-between !important;
    gap: 16px !important;
    margin: 2px 0 0 !important;
    padding: 6px 2px !important;
}


.admin-page-heading h1,
.admin-page-head h1,
.admin-page-header h1 {
    margin: 0 !important;
    font-size: clamp(2rem, 5vw, 3.2rem) !important;
    line-height: 1 !important;
    letter-spacing: 0 !important;
}


.admin-page-heading p,
.admin-page-head p,
.admin-subtitle {
    max-width: 680px !important;
    margin: 8px 0 0 !important;
    color: var(--muted) !important;
}


.admin-grid,
.admin-metric-grid,
.admin-card-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)) !important;
    gap: 14px !important;
}


.admin-stat-card,
.admin-metric-card {
    position: relative !important;
    display: grid !important;
    gap: 10px !important;
    min-height: 128px !important;
    padding: 18px !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 22px !important;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.035)) !important;
    color: var(--text) !important;
    text-decoration: none !important;
    overflow: hidden !important;
}


.admin-metric-card::before {
    content: "";
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.08);
}


.admin-metric-card.urgent::before { background: rgba(255, 95, 109, 0.22); }

.admin-metric-card.good::before { background: rgba(84, 214, 182, 0.22); }

.admin-metric-card.scheduled::before { background: rgba(101, 212, 255, 0.22); }

.admin-metric-card.neutral::before { background: rgba(242, 193, 78, 0.18); }


.admin-metric-card span {
    color: var(--muted) !important;
    font-size: 0.88rem !important;
    font-weight: 900 !important;
}


.admin-metric-card strong {
    font-size: clamp(2rem, 5vw, 3.1rem) !important;
    line-height: 0.9 !important;
}


.admin-card,
.admin-record-card,
.panel {
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 22px !important;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.032)) !important;
    box-shadow: none !important;
}


.admin-card,
.admin-record-card {
    padding: 16px !important;
}


.admin-card-header,
.admin-record-main,
.split-row,
.section-title-row {
    display: flex !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    gap: 14px !important;
}


.admin-record-main[href],
.admin-list-row {
    color: var(--text) !important;
    text-decoration: none !important;
}


.admin-record-card h2,
.admin-card h2,
.admin-card h3,
.asset-admin-card h3 {
    margin: 0 0 6px !important;
    line-height: 1.12 !important;
}


.admin-card-list {
    display: grid !important;
    gap: 14px !important;
}


.admin-card-actions,
.admin-action-row {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex-wrap: wrap !important;
    margin-top: 12px !important;
}


.admin-action-row form,
.admin-card-actions form {
    margin: 0 !important;
}


.admin-action-row .button,
.admin-action-row button,
.admin-card-actions .button,
.admin-card-actions button {
    min-height: 36px !important;
    border-radius: 999px !important;
    padding: 8px 12px !important;
    font-size: 0.84rem !important;
}


.admin-action-row button:not(.danger):not(.ghost),
.admin-action-row .button:not(.danger):not(.ghost) {
    background: var(--accent) !important;
    color: #111 !important;
}


.admin-action-row button.danger,
button.danger,
.button.danger {
    background: var(--danger) !important;
    color: #fff !important;
}


.admin-action-row button.ghost,
.admin-action-row .button.ghost,
button.ghost,
.button.ghost {
    background: rgba(255, 255, 255, 0.045) !important;
    color: var(--text) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}


.admin-filter-bar,
.admin-search-row,
.filter-row,
.filter-tabs {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    padding: 10px !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 20px !important;
    background: rgba(255, 255, 255, 0.04) !important;
    scrollbar-width: none !important;
}


.admin-filter-bar::-webkit-scrollbar,
.admin-search-row::-webkit-scrollbar,
.filter-row::-webkit-scrollbar,
.filter-tabs::-webkit-scrollbar {
    display: none !important;
}


.admin-search-row input,
.admin-search-row select,
.admin-filter-bar select,
.admin-filter-bar input {
    min-height: 40px !important;
    border-radius: 14px !important;
}


.admin-search-row input {
    min-width: min(420px, 58vw) !important;
    flex: 1 1 auto !important;
}


.filter-pill,
.filter-tabs a {
    flex: 0 0 auto !important;
    display: inline-flex !important;
    min-height: 36px !important;
    align-items: center !important;
    border-radius: 999px !important;
    padding: 8px 12px !important;
    color: var(--muted) !important;
    text-decoration: none !important;
    font-weight: 900 !important;
}


.filter-pill.active,
.filter-tabs a.active {
    background: var(--accent) !important;
    color: #111 !important;
}


.admin-badge,
.status-badge,
.badge-stack .status-badge {
    display: inline-flex !important;
    align-items: center !important;
    min-height: 26px !important;
    border-radius: 999px !important;
    padding: 5px 9px !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    background: rgba(255, 255, 255, 0.07) !important;
    color: var(--text) !important;
    font-size: 0.76rem !important;
    font-weight: 900 !important;
    text-transform: capitalize !important;
}


.admin-badge-success,
.status-published,
.status-accepted {
    background: rgba(84, 214, 182, 0.16) !important;
    color: #bffceb !important;
    border-color: rgba(84, 214, 182, 0.38) !important;
}


.admin-badge-warning,
.status-scheduled,
.status-reviewing,
.status-unreviewed {
    background: rgba(242, 193, 78, 0.16) !important;
    color: #ffe39d !important;
    border-color: rgba(242, 193, 78, 0.38) !important;
}


.admin-badge-danger,
.status-hidden,
.status-denied,
.status-dismissed,
.status-archived {
    background: rgba(255, 95, 109, 0.16) !important;
    color: #ffc5cb !important;
    border-color: rgba(255, 95, 109, 0.38) !important;
}


.admin-badge-info,
.status-draft,
.status-reviewed,
.status-action_taken {
    background: rgba(101, 212, 255, 0.14) !important;
    color: #c9f2ff !important;
    border-color: rgba(101, 212, 255, 0.32) !important;
}


.admin-empty-state,
.admin-card-list > .panel,
.admin-card-grid > .panel {
    padding: 24px !important;
    text-align: center !important;
    color: var(--muted) !important;
}


.admin-accordion,
.admin-details-panel {
    margin-top: 10px !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 16px !important;
    background: rgba(255, 255, 255, 0.035) !important;
    overflow: hidden !important;
}


.admin-details-panel summary {
    list-style: none !important;
    cursor: pointer !important;
    padding: 11px 13px !important;
    color: var(--text) !important;
    font-weight: 900 !important;
}


.admin-details-panel summary::-webkit-details-marker {
    display: none !important;
}


.admin-details-panel summary::after {
    content: "+";
    float: right;
    color: var(--accent);
}


.admin-details-panel[open] summary::after {
    content: "-";
}


.admin-inline-form,
.inline-form,
.tag-form {
    display: flex !important;
    gap: 8px !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    padding: 12px !important;
}


.admin-inline-form input,
.admin-inline-form select,
.inline-form input,
.inline-form select,
.tag-form input,
.tag-form select {
    min-height: 38px !important;
    border-radius: 12px !important;
}


.admin-list {
    display: grid !important;
    gap: 8px !important;
}


.admin-list-row {
    display: grid !important;
    gap: 4px !important;
    padding: 12px !important;
    border-radius: 16px !important;
    background: rgba(255, 255, 255, 0.04) !important;
}


.admin-list-row span,
.admin-record-meta,
.admin-record-meta span {
    color: var(--muted) !important;
    font-size: 0.82rem !important;
}


.admin-record-meta {
    display: flex !important;
    gap: 10px !important;
    flex-wrap: wrap !important;
    margin-top: 8px !important;
}


.admin-record-card.is-read,
.admin-list-row.is-read {
    opacity: 0.68 !important;
}


.admin-record-card > a {
    text-decoration: none !important;
}


.admin-card-grid .admin-record-card,
.admin-card-grid .admin-card {
    min-height: 100% !important;
}


.admin-card-grid:has(.admin-record-card) {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)) !important;
}


.badge-stack,
.badge-stack.inline {
    display: flex !important;
    gap: 6px !important;
    flex-wrap: wrap !important;
    align-items: center !important;
}


.asset-help-panel {
    padding: 16px !important;
}


.asset-help-panel h2 {
    margin-top: 0 !important;
}


.asset-help-panel p {
    margin: 4px 0 !important;
    color: var(--muted) !important;
}


.asset-admin-card {
    display: grid !important;
    grid-template-columns: 96px minmax(0, 1fr) !important;
    gap: 14px !important;
    align-items: start !important;
}


.asset-preview {
    display: grid !important;
    place-items: center !important;
    width: 96px !important;
    height: 96px !important;
    overflow: hidden !important;
    border-radius: 20px !important;
    background:
        radial-gradient(circle at 25% 20%, rgba(242, 193, 78, 0.2), transparent 35%),
        rgba(255, 255, 255, 0.055) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
}


.asset-preview img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    padding: 8px !important;
}


.asset-preview-placeholder,
.asset-preview span {
    display: grid !important;
    place-items: center !important;
    width: 52px !important;
    height: 52px !important;
    border-radius: 16px !important;
    background: rgba(242, 193, 78, 0.16) !important;
    color: var(--accent) !important;
    font-weight: 950 !important;
}


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


.form-grid.two > label,
.form-grid.two .span-all {
    min-width: 0 !important;
}


.mini-upload,
.upload-dropzone.mini-upload {
    min-height: 150px !important;
    border-radius: 18px !important;
}


.submit-bar {
    position: sticky !important;
    bottom: 96px !important;
    z-index: 8 !important;
    display: flex !important;
    justify-content: flex-end !important;
    padding: 12px !important;
    border-radius: 18px !important;
    background: color-mix(in srgb, var(--bg) 88%, transparent) !important;
    backdrop-filter: blur(14px) !important;
}


.responsive-table,
.table-card {
    display: grid !important;
    gap: 8px !important;
}


.table-card {
    grid-template-columns: 1.2fr 1fr auto auto !important;
    align-items: center !important;
    padding: 12px !important;
    border-radius: 14px !important;
    background: rgba(255, 255, 255, 0.04) !important;
}


.admin-card .muted:last-child,
.admin-card > p.muted:last-child {
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace !important;
    font-size: 0.78rem !important;
    line-height: 1.45 !important;
}


@media (min-width: 980px) {
    .admin-card-grid {
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)) !important;
    }


    .admin-card-grid:has(.admin-record-card) {
        grid-template-columns: repeat(auto-fit, minmax(245px, 1fr)) !important;
    }


}
@media (max-width: 760px) {
    .admin-shell {
        width: min(100% - 20px, 1180px) !important;
        padding-top: 84px !important;
        padding-bottom: 132px !important;
    }


    .admin-shared-header,
    .admin-page-heading,
    .admin-page-head,
    .admin-page-header,
    .admin-record-main,
    .split-row,
    .section-title-row {
        align-items: stretch !important;
        flex-direction: column !important;
    }


    .admin-nav {
        top: 64px !important;
    }


    .admin-search-row,
    .admin-filter-bar {
        align-items: stretch !important;
        flex-wrap: wrap !important;
    }


    .admin-search-row input,
    .admin-search-row select,
    .admin-search-row button,
    .admin-filter-bar label,
    .admin-filter-bar select,
    .admin-filter-bar button {
        width: 100% !important;
        min-width: 0 !important;
    }


    .admin-action-row .button,
    .admin-action-row button {
        flex: 1 1 auto !important;
    }


    .asset-admin-card {
        grid-template-columns: 76px minmax(0, 1fr) !important;
    }


    .asset-preview {
        width: 76px !important;
        height: 76px !important;
    }


    .form-grid.two {
        grid-template-columns: 1fr !important;
    }


    .submit-bar {
        bottom: 88px !important;
    }


    .table-card {
        grid-template-columns: 1fr !important;
    }


/* True EOF full UI bugfix/polish pass. */
}
body {
    padding-bottom: 96px !important;
}


main,
.page-shell,
.admin-shell,
.studio-shell,
.dashboard,
.form-page,
.media-library {
    padding-bottom: 120px !important;
}


.flash-wrap {
    top: 76px !important;
    right: 16px !important;
    left: auto !important;
    z-index: 80 !important;
    width: min(420px, calc(100vw - 24px)) !important;
    transform: none !important;
    pointer-events: none !important;
}


.flash,
.toast {
    position: relative !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: center !important;
    gap: 10px !important;
    min-height: 48px !important;
    padding: 12px 12px 12px 14px !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 16px !important;
    background: color-mix(in srgb, var(--panel) 94%, transparent) !important;
    color: var(--text) !important;
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.34) !important;
    pointer-events: auto !important;
    animation: toast-in 180ms ease-out, toast-progress 3500ms linear forwards !important;
    overflow: hidden !important;
}


.flash::after,
.toast::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    height: 3px;
    width: 100%;
    background: var(--accent);
    transform-origin: left;
    animation: toast-bar 3500ms linear forwards;
}


.flash-success::after { background: var(--accent-2); }

.flash-error::after { background: var(--danger); }

.flash-warning::after { background: var(--accent); }

.flash-info::after { background: #65d4ff; }


.flash.is-hiding,
.toast.is-hiding {
    opacity: 0 !important;
    transform: translateY(-8px) scale(0.98) !important;
    transition: opacity 280ms ease, transform 280ms ease !important;
}


.flash-close {
    display: grid !important;
    place-items: center !important;
    width: 28px !important;
    height: 28px !important;
    padding: 0 !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.08) !important;
    color: var(--text) !important;
    border: 0 !important;
    box-shadow: none !important;
}


@keyframes toast-in {
    from { opacity: 0; transform: translateY(-8px) scale(0.98); }

    to { opacity: 1; transform: translateY(0) scale(1); }


}
@keyframes toast-bar {
    from { transform: scaleX(1); }

    to { transform: scaleX(0); }


.icon-action,
}
.icon-action-button {
    width: 56px !important;
    min-height: 56px !important;
}


.form-page.wide {
    width: min(1040px, calc(100% - 24px)) !important;
    margin: 0 auto !important;
    padding-top: 92px !important;
}


.form-page.wide .form-panel {
    display: grid !important;
    gap: 14px !important;
    border-radius: 24px !important;
    background: rgba(255, 255, 255, 0.045) !important;
}


.editor-section {
    padding: 16px !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 18px !important;
    background: rgba(255, 255, 255, 0.035) !important;
}


.editor-section h2 {
    margin-top: 0 !important;
    font-size: 1.15rem !important;
}


.upload-dropzone {
    min-height: 138px !important;
    border-radius: 18px !important;
}


.mini-upload,
.upload-dropzone.mini-upload {
    min-height: 112px !important;
}


.block-type-actions {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
}


.block-type-actions .button {
    min-height: 34px !important;
    padding: 7px 10px !important;
    border-radius: 999px !important;
    font-size: 0.82rem !important;
}


.block-row {
    border-radius: 18px !important;
    background: rgba(255, 255, 255, 0.04) !important;
}


.form-page .submit-bar {
    bottom: 94px !important;
    flex-wrap: wrap !important;
}


.dashboard {
    width: min(1080px, calc(100% - 24px)) !important;
    padding-top: 92px !important;
}


.dashboard-heading {
    gap: 14px !important;
}


.article-section.panel {
    padding: 14px !important;
}


.article-section > .muted,
.article-section .section-title-row + .muted {
    margin: 6px 0 0 !important;
    padding: 10px 12px !important;
    border-radius: 14px !important;
    background: rgba(255, 255, 255, 0.035) !important;
}


.article-row-card {
    display: grid !important;
    grid-template-columns: minmax(0, 1.4fr) minmax(190px, 0.8fr) auto !important;
    gap: 14px !important;
    align-items: center !important;
    padding: 14px !important;
    border-radius: 18px !important;
    background: rgba(255, 255, 255, 0.045) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
}


.article-row-card h3 {
    margin: 0 0 5px !important;
}


.article-row-actions {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    justify-content: flex-end !important;
}


.article-row-actions form {
    margin: 0 !important;
}


.media-library.admin-card-grid {
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)) !important;
    gap: 14px !important;
}


.media-card {
    display: grid !important;
    gap: 10px !important;
    min-width: 0 !important;
    overflow: hidden !important;
    padding: 10px !important;
}


.media-thumb {
    width: 100% !important;
    aspect-ratio: 16 / 10 !important;
    height: auto !important;
    max-height: none !important;
    object-fit: cover !important;
    border-radius: 14px !important;
    background: rgba(255, 255, 255, 0.04) !important;
}


.media-card-body {
    display: grid !important;
    gap: 6px !important;
    min-width: 0 !important;
}


.media-card h2 {
    max-width: 100% !important;
    margin: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    font-size: 0.95rem !important;
}


.media-card .copy-filename {
    min-height: 34px !important;
    border-radius: 999px !important;
    padding: 7px 10px !important;
    font-size: 0.78rem !important;
}


.admin-record-card a,
.admin-list-row,
.filter-tabs a {
    text-decoration: none !important;
}


.admin-record-card form button,
.admin-record-card .button {
    white-space: nowrap !important;
}


.admin-card-list .admin-record-card {
    overflow: hidden !important;
}


.profile-page.profile-shell {
    max-width: 820px !important;
}


.profile-page .profile-stats {
    padding-block: 10px !important;
}


.profile-page .profile-xp-card {
    width: min(620px, calc(100% - 12px)) !important;
}


@media (max-width: 820px) {
    .flash-wrap {
        left: 12px !important;
        right: 12px !important;
        width: auto !important;
    }


    .article-row-card {
        grid-template-columns: 1fr !important;
        align-items: stretch !important;
    }


    .article-row-actions {
        justify-content: flex-start !important;
    }


    .dashboard-heading,
    .block-heading {
        align-items: stretch !important;
        flex-direction: column !important;
    }


    .inline-actions {
        align-items: stretch !important;
    }


    .inline-actions .button {
        flex: 1 1 auto !important;
    }


/* Level display is generated from user.level only. Badges render as separate equipped asset icons. */
}
.user-level-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  min-height: 26px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.02em;
  white-space: nowrap;
  border: 1px solid rgba(255,255,255,.22);
  box-shadow: 0 4px 12px rgba(0,0,0,.28);
  opacity: 1 !important;
  filter: none !important;
  mix-blend-mode: normal !important;
}

.profile-meta-row .user-level-pill {
  min-width: 88px;
  min-height: 32px;
  font-size: 0.88rem;
  padding: 7px 14px;
}

.profile-meta-row .equipped-badge-icon {
  width: 26px;
  height: 26px;
}


.equipped-badge-fallback {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.18);
  color: var(--text);
  font-size: .62rem;
  font-weight: 900;
  text-transform: uppercase;
}


.profile-meta-row .equipped-badge-fallback {
  width: 26px;
  height: 26px;
  font-size: .68rem;
}


.equipped-badge-slots {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0 16px;
}


.equipped-badge-slot {
  min-height: 74px;
  border-radius: 18px;
  padding: 12px;
  background: rgba(255,255,255,.055);
  border: 1px solid rgba(255,255,255,.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
}


.equipped-badge-slot small,
.equipped-badge-slot .muted {
  font-size: .72rem;
}


.level-style-1 { background: linear-gradient(135deg, #1f2933, #4b5563); color: #f8fafc; }

.level-style-2 { background: linear-gradient(135deg, #26313d, #5b6675); color: #f8fafc; }

.level-style-3 { background: linear-gradient(135deg, #2d3745, #6b7280); color: #f8fafc; }

.level-style-4 { background: linear-gradient(135deg, #343f4d, #7b8492); color: #ffffff; }

.level-style-5 { background: linear-gradient(135deg, #3b4655, #8b95a3); color: #ffffff; }

.level-style-6 { background: linear-gradient(135deg, #434f5e, #9aa3b0); color: #0f172a; }

.level-style-7 { background: linear-gradient(135deg, #4b5563, #a8b0bc); color: #0f172a; }

.level-style-8 { background: linear-gradient(135deg, #566171, #b8c0cc); color: #0f172a; }

.level-style-9 { background: linear-gradient(135deg, #606b7c, #cad1dc); color: #0f172a; }

.level-style-10 { background: linear-gradient(135deg, #6b7280, #e5e7eb); color: #0f172a; }

.level-style-11 { background: linear-gradient(135deg, #3b2614, #8b5e34); color: #fff7ed; }

.level-style-12 { background: linear-gradient(135deg, #4a2d16, #9a6738); color: #fff7ed; }

.level-style-13 { background: linear-gradient(135deg, #57361a, #aa7240); color: #fff7ed; }

.level-style-14 { background: linear-gradient(135deg, #633f1f, #b77b45); color: #fff7ed; }

.level-style-15 { background: linear-gradient(135deg, #704826, #c3864c); color: #1f1208; }

.level-style-16 { background: linear-gradient(135deg, #7c512b, #d09153); color: #1f1208; }

.level-style-17 { background: linear-gradient(135deg, #8a5a30, #dc9b5a); color: #1f1208; }

.level-style-18 { background: linear-gradient(135deg, #986337, #e7a765); color: #1f1208; }

.level-style-19 { background: linear-gradient(135deg, #a66d3e, #f0b170); color: #1f1208; }

.level-style-20 { background: linear-gradient(135deg, #7a3f16, #cd7f32, #f3c08a); color: #1f1208; }

.level-style-21 { background: linear-gradient(135deg, #052e16, #15803d); color: #f0fdf4; }

.level-style-22 { background: linear-gradient(135deg, #063d1d, #168a44); color: #f0fdf4; }

.level-style-23 { background: linear-gradient(135deg, #064b24, #16a34a); color: #f0fdf4; }

.level-style-24 { background: linear-gradient(135deg, #075a2c, #22b455); color: #f0fdf4; }

.level-style-25 { background: linear-gradient(135deg, #0b6b35, #32c866); color: #052e16; }

.level-style-26 { background: linear-gradient(135deg, #0d7a3d, #4ade80); color: #052e16; }

.level-style-27 { background: linear-gradient(135deg, #128a49, #6ee7a0); color: #052e16; }

.level-style-28 { background: linear-gradient(135deg, #159b55, #86efac); color: #052e16; }

.level-style-29 { background: linear-gradient(135deg, #16a34a, #a7f3d0); color: #052e16; }

.level-style-30 { background: linear-gradient(135deg, #064e3b, #22c55e, #bbf7d0); color: #052e16; }

.level-style-31 { background: linear-gradient(135deg, #042f2e, #0f766e); color: #ecfeff; }

.level-style-32 { background: linear-gradient(135deg, #073d3a, #0d9488); color: #ecfeff; }

.level-style-33 { background: linear-gradient(135deg, #0b4d49, #14a79b); color: #ecfeff; }

.level-style-34 { background: linear-gradient(135deg, #0e5e59, #18b9ad); color: #ecfeff; }

.level-style-35 { background: linear-gradient(135deg, #0f6f69, #2dd4bf); color: #042f2e; }

.level-style-36 { background: linear-gradient(135deg, #0f7f78, #5eead4); color: #042f2e; }

.level-style-37 { background: linear-gradient(135deg, #0d8f88, #67e8f9); color: #083344; }

.level-style-38 { background: linear-gradient(135deg, #0891b2, #7dd3fc); color: #083344; }

.level-style-39 { background: linear-gradient(135deg, #0e7490, #a5f3fc); color: #083344; }

.level-style-40 { background: linear-gradient(135deg, #083344, #06b6d4, #ccfbf1); color: #083344; }

.level-style-41 { background: linear-gradient(135deg, #172554, #1d4ed8); color: #eff6ff; }

.level-style-42 { background: linear-gradient(135deg, #1e2f73, #2563eb); color: #eff6ff; }

.level-style-43 { background: linear-gradient(135deg, #1e3a8a, #2f75ff); color: #eff6ff; }

.level-style-44 { background: linear-gradient(135deg, #1d4ed8, #3b82f6); color: #eff6ff; }

.level-style-45 { background: linear-gradient(135deg, #2563eb, #60a5fa); color: #0f172a; }

.level-style-46 { background: linear-gradient(135deg, #1e40af, #7db7ff); color: #0f172a; }

.level-style-47 { background: linear-gradient(135deg, #1d4ed8, #93c5fd); color: #0f172a; }

.level-style-48 { background: linear-gradient(135deg, #1e3a8a, #38bdf8); color: #eff6ff; }

.level-style-49 { background: linear-gradient(135deg, #172554, #60a5fa, #bfdbfe); color: #0f172a; }

.level-style-50 { background: linear-gradient(135deg, #0f172a, #3b82f6, #dbeafe); color: #0f172a; }

.level-style-51 { background: linear-gradient(135deg, #2e1065, #6d28d9); color: #f5f3ff; }

.level-style-52 { background: linear-gradient(135deg, #3b1478, #7c3aed); color: #f5f3ff; }

.level-style-53 { background: linear-gradient(135deg, #4c1d95, #8b5cf6); color: #f5f3ff; }

.level-style-54 { background: linear-gradient(135deg, #581c87, #9d6cff); color: #f5f3ff; }

.level-style-55 { background: linear-gradient(135deg, #6b21a8, #a78bfa); color: #1e1b4b; }

.level-style-56 { background: linear-gradient(135deg, #741fb5, #b794ff); color: #1e1b4b; }

.level-style-57 { background: linear-gradient(135deg, #7e22ce, #c084fc); color: #2e1065; }

.level-style-58 { background: linear-gradient(135deg, #86198f, #d8b4fe); color: #2e1065; }

.level-style-59 { background: linear-gradient(135deg, #4c1d95, #a855f7, #e9d5ff); color: #2e1065; }

.level-style-60 { background: linear-gradient(135deg, #2e1065, #8b5cf6, #f0abfc); color: #ffffff; }

.level-style-61 { background: linear-gradient(135deg, #500724, #be185d); color: #fff1f2; }

.level-style-62 { background: linear-gradient(135deg, #64102d, #db2777); color: #fff1f2; }

.level-style-63 { background: linear-gradient(135deg, #831843, #ec4899); color: #fff1f2; }

.level-style-64 { background: linear-gradient(135deg, #9d174d, #f472b6); color: #500724; }

.level-style-65 { background: linear-gradient(135deg, #881337, #fb7185); color: #fff1f2; }

.level-style-66 { background: linear-gradient(135deg, #991b1b, #ef4444); color: #fef2f2; }

.level-style-67 { background: linear-gradient(135deg, #7f1d1d, #f87171); color: #450a0a; }

.level-style-68 { background: linear-gradient(135deg, #7f1d1d, #fb7185, #fecdd3); color: #450a0a; }

.level-style-69 { background: linear-gradient(135deg, #4c0519, #e11d48, #f9a8d4); color: #ffffff; }

.level-style-70 { background: linear-gradient(135deg, #450a0a, #ef4444, #fda4af); color: #ffffff; }

.level-style-71 { background: linear-gradient(135deg, #431407, #c2410c); color: #fff7ed; }

.level-style-72 { background: linear-gradient(135deg, #5a1b09, #ea580c); color: #fff7ed; }

.level-style-73 { background: linear-gradient(135deg, #7c2d12, #f97316); color: #fff7ed; }

.level-style-74 { background: linear-gradient(135deg, #9a3412, #fb923c); color: #431407; }

.level-style-75 { background: linear-gradient(135deg, #92400e, #f59e0b); color: #fffbeb; }

.level-style-76 { background: linear-gradient(135deg, #a16207, #fbbf24); color: #422006; }

.level-style-77 { background: linear-gradient(135deg, #854d0e, #fde047); color: #422006; }

.level-style-78 { background: linear-gradient(135deg, #713f12, #eab308, #fef08a); color: #422006; }

.level-style-79 { background: linear-gradient(135deg, #78350f, #f59e0b, #fde68a); color: #1c1200; }

.level-style-80 { background: linear-gradient(135deg, #4a2c00, #d4af37, #fff3a3, #b8860b); color: #1b1200; }

.level-style-81 { background: linear-gradient(135deg, #111827, #94a3b8, #e5e7eb); color: #0f172a; }

.level-style-82 { background: linear-gradient(135deg, #0f172a, #a8b3c3, #f8fafc); color: #0f172a; }

.level-style-83 { background: linear-gradient(135deg, #1f2937, #cbd5e1, #ffffff); color: #0f172a; }

.level-style-84 { background: linear-gradient(135deg, #0f172a, #60a5fa, #e2e8f0); color: #0f172a; }

.level-style-85 { background: linear-gradient(135deg, #111827, #38bdf8, #f8fafc); color: #0f172a; }

.level-style-86 { background: linear-gradient(135deg, #1e1b4b, #a78bfa, #f8fafc); color: #1e1b4b; }

.level-style-87 { background: linear-gradient(135deg, #020617, #d1d5db, #facc15); color: #111827; }

.level-style-88 { background: linear-gradient(135deg, #0f172a, #e5e7eb, #67e8f9); color: #0f172a; }

.level-style-89 { background: linear-gradient(135deg, #020617, #f8fafc, #a78bfa); color: #0f172a; }

.level-style-90 { background: linear-gradient(135deg, #020617, #cbd5e1, #ffffff, #38bdf8); color: #0f172a; }

.level-style-91 { background: linear-gradient(135deg, #020617, #312e81, #7c3aed); color: #ffffff; }

.level-style-92 { background: linear-gradient(135deg, #020617, #4c1d95, #a855f7); color: #ffffff; }

.level-style-93 { background: linear-gradient(135deg, #020617, #6d28d9, #ec4899); color: #ffffff; }

.level-style-94 { background: linear-gradient(135deg, #020617, #0ea5e9, #a855f7); color: #ffffff; }

.level-style-95 { background: linear-gradient(135deg, #020617, #14b8a6, #8b5cf6); color: #ffffff; }

.level-style-96 { background: linear-gradient(135deg, #020617, #f59e0b, #e11d48); color: #ffffff; }

.level-style-97 { background: linear-gradient(135deg, #000000, #facc15, #fb7185, #a855f7); color: #ffffff; }

.level-style-98 { background: linear-gradient(135deg, #000000, #38bdf8, #ffffff, #a855f7); color: #ffffff; }

.level-style-99 { background: linear-gradient(135deg, #000000, #facc15, #ffffff, #facc15, #000000); color: #111827; }

.level-style-100 { background: linear-gradient(135deg, #0a0500, #facc15 18%, #fff7ad 42%, #d97706 68%, #000000 100%); color: #111827; border: 1px solid rgba(255, 241, 180, .95); box-shadow: 0 0 0 1px rgba(255,255,255,.22) inset, 0 0 18px rgba(250,204,21,.55), 0 8px 22px rgba(0,0,0,.45); }


@media (max-width: 640px) {
  .equipped-badge-slots {
    grid-template-columns: 1fr;
  }


/* Theme normalization pass: semantic tokens with aliases for the older CSS names. */
:root,
}
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #060b14;
  --bg-elevated: #0d1420;
  --bg-card: #111a28;
  --bg-soft: #162131;
  --text: #f5f7fb;
  --text-soft: #b7c2d3;
  --text-muted: #8ea0b8;
  --border: rgba(255,255,255,0.08);
  --border-strong: rgba(255,255,255,0.14);
  --accent: #e0a11b;
  --accent-strong: #f2bb39;
  --success: #4ec9b0;
  --danger: #ff5d73;
  --warning: #f0b63f;
  --chip-bg: rgba(255,255,255,0.08);
  --chip-text: #f5f7fb;
  --input-bg: #0a111c;
  --input-text: #f5f7fb;
  --input-border: rgba(255,255,255,0.10);
  --nav-bg: rgba(15,22,34,0.92);
  --nav-text: #d8e1ef;
  --shadow-soft: 0 10px 30px rgba(0,0,0,0.28);
  --panel: var(--bg-card);
  --panel-2: var(--bg-soft);
  --muted: var(--text-muted);
  --line: var(--border);
  --accent-2: var(--success);
}


[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f6fb;
  --bg-elevated: #ffffff;
  --bg-card: #ffffff;
  --bg-soft: #eef2f8;
  --text: #0f1728;
  --text-soft: #334155;
  --text-muted: #64748b;
  --border: rgba(15,23,40,0.08);
  --border-strong: rgba(15,23,40,0.14);
  --accent: #d49610;
  --accent-strong: #b87b00;
  --success: #158f78;
  --danger: #d94b61;
  --warning: #b67b00;
  --chip-bg: #eef2f7;
  --chip-text: #1e293b;
  --input-bg: #ffffff;
  --input-text: #0f1728;
  --input-border: rgba(15,23,40,0.12);
  --nav-bg: rgba(255,255,255,0.95);
  --nav-text: #334155;
  --shadow-soft: 0 12px 30px rgba(30,41,59,0.10);
  --panel: var(--bg-card);
  --panel-2: var(--bg-soft);
  --muted: var(--text-muted);
  --line: var(--border);
  --accent-2: var(--success);
}


html,
body {
  background: var(--bg) !important;
  color: var(--text) !important;
}


body,
main,
.readable-page,
.page-shell,
.profile-page,
.settings-app-shell,
.admin-shell,
.studio-shell,
.form-page,
.media-library {
  color: var(--text) !important;
}


.muted,
.help-text,
.admin-subtitle,
.profile-meta,
.comment-username,
small {
  color: var(--text-muted) !important;
}


.topbar {
  background: color-mix(in srgb, var(--bg-elevated) 92%, transparent) !important;
  border-bottom-color: var(--border) !important;
  box-shadow: var(--shadow-soft) !important;
}


.top-icons a,
.icon-button {
  background: var(--chip-bg) !important;
  color: var(--text) !important;
}


.bottom-nav {
  background: var(--nav-bg) !important;
  border-color: var(--border-strong) !important;
  color: var(--nav-text) !important;
  box-shadow: var(--shadow-soft) !important;
}


.bottom-nav a,
.bottom-nav-item {
  color: var(--nav-text) !important;
}


.bottom-nav a.active,
.bottom-nav-item.active {
  background: color-mix(in srgb, var(--accent) 18%, transparent) !important;
  color: var(--accent-strong) !important;
}


.button.ghost,
button.ghost,
.secondary-button,
.text-button:not(.danger) {
  background: transparent !important;
  color: var(--text) !important;
  border: 1px solid var(--border-strong) !important;
}


.button.danger,
button.danger,
.danger {
  background: var(--danger) !important;
  color: #ffffff !important;
}


input,
select,
textarea,
.comment-form textarea,
.admin-search-row input,
.admin-search-row select,
.admin-filter-bar input,
.admin-filter-bar select,
.admin-inline-form input,
.admin-inline-form select,
.inline-form input,
.inline-form select,
.tag-form input,
.tag-form select {
  background: var(--input-bg) !important;
  color: var(--input-text) !important;
  border-color: var(--input-border) !important;
  box-shadow: none !important;
}


input::placeholder,
textarea::placeholder {
  color: color-mix(in srgb, var(--text-muted) 76%, transparent) !important;
}


.panel,
.card,
.social-card,
.reshare-card,
.reward-card,
.level-card,
.settings-group,
.settings-category-row,
.admin-card,
.admin-record-card,
.admin-stat-card,
.admin-metric-card,
.asset-admin-card,
.media-card,
.article-form-section,
.block-row,
.studio-card,
.dashboard-card,
.notification-card,
.application-card,
.user-card {
  background: var(--bg-card) !important;
  color: var(--text) !important;
  border-color: var(--border) !important;
  box-shadow: var(--shadow-soft) !important;
}


.tag,
.badge,
.status-badge,
.topic-pill,
.location-pill,
.role-badge,
.rank-badge,
.admin-badge,
.chip,
.level-token,
.emote-chip {
  background: var(--chip-bg) !important;
  color: var(--chip-text) !important;
  border-color: var(--border-strong) !important;
}


.tag-verified,
.admin-badge-success,
.status-published,
.badge-success {
  background: color-mix(in srgb, var(--success) 18%, var(--bg-card)) !important;
  color: var(--success) !important;
  border-color: color-mix(in srgb, var(--success) 34%, transparent) !important;
}


.tag-inaccurate,
.admin-badge-danger,
.status-hidden,
.badge-danger,
.badge.danger {
  background: color-mix(in srgb, var(--danger) 16%, var(--bg-card)) !important;
  color: var(--danger) !important;
  border-color: color-mix(in srgb, var(--danger) 34%, transparent) !important;
}


.tag-unverified,
.admin-badge-warning,
.status-draft,
.status-scheduled,
.badge-warning {
  background: color-mix(in srgb, var(--warning) 18%, var(--bg-card)) !important;
  color: var(--warning) !important;
  border-color: color-mix(in srgb, var(--warning) 36%, transparent) !important;
}


.article-shell,
.article-header,
.article-body,
.comments,
.profile-shell,
.settings-app-shell,
.admin-container,
.studio-container {
  background: transparent !important;
}


.article-header,
.comments .section-title-row,
.profile-stats,
.profile-tabs,
.admin-card-header,
.section-title-row,
hr {
  border-color: var(--border) !important;
}


.comment {
  background: color-mix(in srgb, var(--bg-card) 96%, var(--bg-soft)) !important;
  color: var(--text) !important;
  border-color: var(--border) !important;
}


.profile-banner-art {
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 28%, var(--bg-card)), var(--bg-soft) 70%) !important;
}


.profile-xp-card,
.profile-level-strip {
  background: var(--bg-card) !important;
  border-color: var(--border) !important;
}


.flash,
.toast {
  background: color-mix(in srgb, var(--bg-card) 96%, transparent) !important;
  color: var(--text) !important;
  border-color: var(--border-strong) !important;
  box-shadow: var(--shadow-soft) !important;
  animation: toast-in 180ms ease-out, toast-progress var(--toast-duration, 3500ms) linear forwards !important;
}


.flash::after,
.toast::after {
  animation-duration: var(--toast-duration, 3500ms) !important;
}


.flash-close {
  background: var(--chip-bg) !important;
  color: var(--text) !important;
}


[data-theme="light"] .topbar,
[data-theme="light"] .bottom-nav,
[data-theme="light"] .flash,
[data-theme="light"] .toast,
[data-theme="light"] .panel,
[data-theme="light"] .admin-card,
[data-theme="light"] .admin-record-card,
[data-theme="light"] .settings-group,
[data-theme="light"] .reward-card,
[data-theme="light"] .comment,
[data-theme="light"] .media-card {
  box-shadow: var(--shadow-soft) !important;
}


[data-theme="light"] .button.ghost,
[data-theme="light"] button.ghost {
  background: #ffffff !important;
  color: var(--text) !important;
}


.flash,
.toast {
  animation: toast-in 180ms ease-out !important;
}


/* Public rank system: only Member Rank and Journalist Rank. */
.rank-badge-member {
  background: linear-gradient(135deg, #334155, #64748b, #dbeafe) !important;
  color: #0f1728 !important;
  border: 1px solid rgba(100, 116, 139, 0.45) !important;
}


.rank-badge-journalist {
  background: linear-gradient(135deg, #5d3500, #facc15 45%, #fff3a3 62%, #b45309) !important;
  color: #1b1200 !important;
  border: 1px solid rgba(255, 238, 150, 0.72) !important;
  box-shadow: 0 0 16px rgba(250, 204, 21, 0.22) !important;
}


.role-member {
  background: var(--chip-bg) !important;
  color: var(--chip-text) !important;
}


.comment .user-level-pill,
.comment-row .user-level-pill {
  min-width: 58px;
  min-height: 22px;
  font-size: 0.68rem;
  padding: 4px 8px;
}


[data-theme="light"] .user-level-pill,
[data-theme="dark"] .user-level-pill {
  opacity: 1 !important;
  filter: none !important;
  mix-blend-mode: normal !important;
}


/* Normal pages use theme colors; article detail chips stay readable in light mode. */
.article-shell {
  color: var(--text) !important;
}


.article-shell .article-header h1,
.article-shell .article-body,
.article-shell .comments,
.article-shell .comment-main,
.article-shell .comment-form textarea {
  color: var(--text) !important;
}


.article-shell .tag,
.article-shell .badge,
.article-shell .status-badge,
.article-shell .topic-pill,
.article-shell .location-pill {
  background: var(--chip-bg) !important;
  color: var(--chip-text) !important;
  border-color: var(--border-strong) !important;
}


[data-theme="light"] .article-shell .tag-verified,
[data-theme="light"] .article-shell .status-published {
  background: #dcfce7 !important;
  color: #14532d !important;
  border-color: #86efac !important;
}


[data-theme="light"] .article-shell .tag-unverified,
[data-theme="light"] .article-shell .status-draft,
[data-theme="light"] .article-shell .status-scheduled {
  background: #fef3c7 !important;
  color: #78350f !important;
  border-color: #fbbf24 !important;
}


[data-theme="light"] .article-shell .tag-inaccurate,
[data-theme="light"] .article-shell .status-hidden,
[data-theme="light"] .article-shell .badge.danger {
  background: #ffe4e6 !important;
  color: #9f1239 !important;
  border-color: #fda4af !important;
}


/* Settings rows should be calm surfaces, with gold as accent only. */
.settings-group {
  background: transparent !important;
  box-shadow: none !important;
  border-color: transparent !important;
}


.settings-row,
.settings-category-row,
.settings-row.static-row {
  background: var(--bg-card) !important;
  color: var(--text) !important;
  border: 1px solid var(--border) !important;
  box-shadow: var(--shadow-soft) !important;
}


[data-theme="light"] .settings-row,
[data-theme="light"] .settings-category-row,
[data-theme="light"] .settings-row.static-row {
  background: #ffffff !important;
  color: #0f1728 !important;
  border-color: rgba(15,23,40,.08) !important;
}


.settings-row:hover,
.settings-row[aria-expanded="true"],
.settings-category-row:hover {
  background: color-mix(in srgb, var(--bg-card) 88%, var(--accent) 12%) !important;
  border-color: color-mix(in srgb, var(--accent) 42%, var(--border)) !important;
}


.settings-icon {
  background: color-mix(in srgb, var(--accent) 16%, var(--bg-card)) !important;
  color: var(--accent-strong) !important;
  border: 1px solid color-mix(in srgb, var(--accent) 32%, transparent) !important;
}


.settings-icon svg {
  stroke: currentColor !important;
}


.settings-row.danger {
  background: color-mix(in srgb, var(--bg-card) 88%, var(--danger) 12%) !important;
  color: var(--text) !important;
  border-color: color-mix(in srgb, var(--danger) 34%, var(--border)) !important;
}


[data-theme="light"] .settings-row.danger {
  background: #fff1f2 !important;
  color: #881337 !important;
  border-color: #fecdd3 !important;
}


/* Navigation and links: avoid broad light-mode link overrides inside protected components. */
[data-theme="light"] .bottom-nav {
  background: rgba(255,255,255,.96) !important;
  border-color: rgba(15,23,40,.12) !important;
  box-shadow: 0 16px 38px rgba(30,41,59,.16) !important;
}


[data-theme="light"] .bottom-nav a:not(.active) {
  color: #64748b !important;
}


[data-theme="light"] .bottom-nav a.active {
  background: rgba(212,150,16,.16) !important;
  color: #9a6500 !important;
}


/* Level pills are fixed reward colors and must ignore theme. */
.user-level-pill,
[data-theme="light"] .user-level-pill,
[data-theme="dark"] .user-level-pill {
  opacity: 1 !important;
  filter: none !important;
  mix-blend-mode: normal !important;
}


/* Toast timing and dismissal. */
.flash,
.toast {
  animation: toast-in 180ms ease-out !important;
}


.flash::after,
.toast::after {
  animation: toast-bar var(--toast-duration, 3500ms) linear forwards !important;
}


.flash.is-hiding,
.toast.is-hiding {
  opacity: 0 !important;
  transform: translateY(-8px) scale(.98) !important;
  transition: opacity 280ms ease, transform 280ms ease !important;
}


/* Targeted bugfix layer: stop theme/button bleed into settings and feed. */
button {
  background: transparent;
}


.settings-row button,
.settings-category-row button,
.settings-action-row button {
  background: transparent !important;
  color: inherit !important;
}


.settings-row,
.settings-category-row,
.settings-action-row,
.settings-list-row,
.settings-group a,
.settings-group button:not(.danger):not(.theme-option):not(.save-theme-button) {
  background: var(--bg-card) !important;
  color: var(--text) !important;
  border-color: var(--border) !important;
}


[data-theme="light"] .settings-row,
[data-theme="light"] .settings-category-row,
[data-theme="light"] .settings-action-row,
[data-theme="light"] .settings-list-row,
[data-theme="light"] .settings-group a,
[data-theme="light"] .settings-group button:not(.danger):not(.theme-option):not(.save-theme-button) {
  background: #ffffff !important;
  color: #0f1728 !important;
  border-color: rgba(15, 23, 40, 0.10) !important;
}


.settings-row:hover,
.settings-category-row:hover,
.settings-action-row:hover,
.settings-list-row:hover {
  background: color-mix(in srgb, var(--bg-card) 94%, var(--accent) 6%) !important;
  border-color: color-mix(in srgb, var(--border) 76%, var(--accent) 24%) !important;
}


.settings-icon,
.settings-row-icon {
  background: color-mix(in srgb, var(--accent) 14%, transparent) !important;
  color: var(--accent-strong) !important;
}


[data-theme="light"] .settings-icon,
[data-theme="light"] .settings-row-icon {
  background: rgba(212, 150, 16, 0.12) !important;
  color: #9a6500 !important;
}
/* Clean feed system: one full-screen TikTok-style layout. */
main:has(.feed) {
  height: 100svh;
  overflow: hidden;
  padding-bottom: 0 !important;
}

.feed {
  height: 100svh;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  overscroll-behavior-y: contain;
  background: #07101b;
  scrollbar-width: none;
}

.feed::-webkit-scrollbar {
  display: none;
}

.feed-page,
.feed-card,
[data-theme="light"] .feed,
[data-theme="light"] .feed-page,
[data-theme="light"] .feed-card {
  background: #07101b !important;
  color: #f8fafc !important;
}

.feed-card {
  position: relative;
  isolation: isolate;
  height: 100svh;
  min-height: 100svh;
  overflow: hidden;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  background: #07101b;
  color: #f8fafc;
}

.feed-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.feed-image,
.feed-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.feed-placeholder {
  position: absolute;
  inset: 0;
  display: block;
  background:
    radial-gradient(circle at 18% 28%, rgba(242,193,78,0.22), transparent 28%),
    radial-gradient(circle at 82% 20%, rgba(84,214,182,0.18), transparent 32%),
    linear-gradient(135deg, #27384f, #07101b 64%);
}

.feed-placeholder::before {
  content: none !important;
}

.feed-placeholder-mark {
  position: absolute;
  left: 7vw;
  bottom: 20vh;
  z-index: 0;
  font-size: clamp(4rem, 10vw, 8rem);
  font-weight: 950;
  color: rgba(248,250,252,0.72);
  line-height: 0.9;
  pointer-events: none;
}

.feed-placeholder-topic {
  position: absolute;
  left: 19vw;
  bottom: 13vh;
  z-index: 0;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(242,193,78,0.14);
  border: 1px solid rgba(242,193,78,0.42);
  color: #f8fafc;
  font-size: 0.78rem;
  font-weight: 900;
  pointer-events: none;
}

.feed-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(0,0,0,0.72), rgba(0,0,0,0.34) 48%, rgba(0,0,0,0.58)),
    linear-gradient(180deg, rgba(0,0,0,0.12), rgba(0,0,0,0.64));
}

.feed-watermark {
  position: absolute;
  left: 50%;
  top: 52%;
  transform: translate(-50%, -50%);
  z-index: 1;
  width: max-content;
  max-width: 96vw;
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
  text-align: center;
  font-size: clamp(72px, 12vw, 190px);
  font-weight: 950;
  letter-spacing: -0.04em;
  line-height: 0.9;
  color: rgba(255,255,255,0.055);
}

.feed-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 84px;
  align-items: end;
  gap: 18px;
  padding: 132px 60px 108px 64px;
  background: transparent;
}

.feed-copy {
  width: min(820px, 100%);
  min-width: 0;
}

.feed-title {
  margin: 10px 0 10px;
  color: #f8fafc !important;
  font-size: clamp(3.2rem, 6.4vw, 5.8rem);
  line-height: 0.96;
  letter-spacing: -0.045em;
  text-wrap: balance;
  opacity: 1 !important;
  filter: none !important;
}

.feed-description {
  max-width: 680px;
  margin: 0 0 12px;
  color: rgba(248,250,252,0.92) !important;
  font-size: clamp(0.95rem, 1.2vw, 1.08rem);
  line-height: 1.45;
  opacity: 1 !important;
}

.feed-author,
.feed-author a,
.feed-meta,
.feed-copy .byline {
  color: rgba(248,250,252,0.9) !important;
}

.feed-card .tag,
.feed-card .badge,
.feed-card .topic-pill,
.feed-card .location-pill {
  background: rgba(255,255,255,0.14) !important;
  color: #f8fafc !important;
  border-color: rgba(255,255,255,0.22) !important;
}

.action-rail,
.action-rail-clean {
  align-self: center;
  justify-self: end;
  width: 72px;
  display: grid;
  gap: 10px;
}

.action-rail form,
.action-rail-clean form {
  margin: 0;
}

.feed-card .icon-action,
.feed-card .icon-action-button,
.action-rail button,
.action-rail a {
  min-height: 42px;
  width: 100%;
  display: grid;
  place-items: center;
  background: transparent !important;
  color: #f8fafc !important;
  border: 0 !important;
  box-shadow: none !important;
  text-decoration: none;
}

.feed-card .icon-action-icon {
  font-size: 1.28rem;
  line-height: 1;
}

.feed-card .icon-action-count {
  margin-top: 2px;
  color: #f8fafc !important;
  font-size: 0.78rem;
  font-weight: 900;
}

.view-more-pill {
  width: 64px;
  min-height: 64px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--accent) !important;
  color: #111827 !important;
  font-size: 0.78rem;
  font-weight: 900;
  text-align: center;
  line-height: 1.05;
}

.feed-tabs {
  position: fixed;
  top: 82px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 12;
  display: flex;
  gap: 4px;
  border-radius: 999px;
  padding: 6px;
  background: rgba(5,10,18,0.82) !important;
  border: 1px solid rgba(255,255,255,0.14) !important;
  backdrop-filter: blur(12px);
}

.feed-tabs a,
.feed-filter-button {
  border-radius: 999px;
  padding: 9px 14px;
  color: rgba(248,250,252,0.78) !important;
  background: transparent !important;
  border: 0 !important;
  text-decoration: none;
  font-weight: 800;
}

.feed-tabs a.active {
  background: var(--accent) !important;
  color: #111827 !important;
}

[data-theme="light"] .feed-copy h1,
[data-theme="light"] .feed-title,
[data-theme="light"] .feed-copy p,
[data-theme="light"] .feed-description,
[data-theme="light"] .feed-author,
[data-theme="light"] .feed-meta,
[data-theme="light"] .feed-card .byline {
  color: #f8fafc !important;
}

@media (max-width: 900px) {
  .feed-overlay {
    grid-template-columns: minmax(0, 1fr) 68px;
    padding: 118px 16px 100px 18px;
  }

  .feed-title {
    font-size: clamp(2.4rem, 12vw, 4.2rem);
  }

  .action-rail,
  .action-rail-clean {
    width: 62px;
  }

  .feed-placeholder-mark {
    left: 7vw;
    bottom: 23vh;
    font-size: clamp(3.6rem, 18vw, 7rem);
  }

  .feed-placeholder-topic {
    left: 40vw;
    bottom: 15vh;
  }
}

@media (max-width: 520px) {
  .feed-overlay {
    grid-template-columns: minmax(0, 1fr) 56px;
    padding: 112px 10px 94px 14px;
  }

  .feed-title {
    font-size: clamp(2rem, 13vw, 3.4rem);
  }

  .feed-description {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
  }

  .action-rail,
  .action-rail-clean {
    width: 52px;
    gap: 7px;
  }

  .view-more-pill {
    width: 52px;
    min-height: 52px;
    font-size: 0.66rem;
  }
}

/* Top chrome and Local notice sit above the cinematic feed without changing card layout. */
.topbar {
  z-index: 1000 !important;
  height: 64px;
  min-height: 64px;
  background: rgba(7, 16, 27, 0.92) !important;
  backdrop-filter: blur(16px);
}

.top-icons {
  position: relative;
  z-index: 1001 !important;
  display: flex !important;
  align-items: center;
  gap: 10px;
}

.top-icons a {
  display: grid !important;
  place-items: center;
  width: 40px;
  height: 40px;
  opacity: 1 !important;
  visibility: visible !important;
  color: var(--text) !important;
  background: rgba(255, 255, 255, 0.08) !important;
  border-radius: 50%;
  text-decoration: none;
}

[data-theme="light"] .topbar {
  background: rgba(255, 255, 255, 0.92) !important;
}

[data-theme="light"] .top-icons a {
  color: #0f1728 !important;
  background: rgba(15, 23, 40, 0.06) !important;
}

.feed-tabs {
  z-index: 900;
}

.location-feed-banner {
  position: fixed;
  top: 124px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 890;
  width: min(520px, calc(100% - 28px));
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  background: rgba(7, 16, 27, 0.88);
  border: 1px solid rgba(242, 193, 78, 0.32);
  color: rgba(248, 250, 252, 0.88);
  box-shadow: none;
  backdrop-filter: blur(14px);
}

.location-feed-banner p {
  margin: 0;
  flex: 1;
  color: rgba(248, 250, 252, 0.88);
  font-size: 0.88rem;
  line-height: 1.25;
}

.location-feed-banner a {
  color: var(--accent);
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}

.location-feed-banner.warning {
  border-color: rgba(255, 109, 109, 0.45);
}

.location-banner-close {
  background: transparent !important;
  border: 0;
  color: rgba(248, 250, 252, 0.72) !important;
  padding: 4px;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}

.location-feed-banner.is-hidden {
  display: none !important;
}

.bottom-nav {
  z-index: 1000 !important;
}
