:root {
    color-scheme: dark;
    --bg: #0f0e17;
    --surface: #171625;
    --surface-2: #1e1b2e;
    --text: #f7f7fb;
    --muted: #b8b8c9;
    --line: rgba(255, 255, 255, .08);
    --primary: #6d28d9;
    --primary-2: #a78bfa;
    --accent: #2dd4bf;
    --danger: #ef4444;
    --success: #22c55e;
    --radius: 18px;
    --radius-sm: 12px;
    --shadow: 0 18px 42px rgba(0, 0, 0, .32);
    --shadow-soft: 0 10px 30px rgba(0, 0, 0, .22);
    --container: 1120px;
    --space: 1rem;
    font-family: Inter, "Noto Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-display: "Space Grotesk", Inter, "Noto Sans", system-ui, sans-serif;
}

[data-theme="light"] {
    color-scheme: light;
    --bg: #f8fafc;
    --surface: #ffffff;
    --surface-2: #eef2ff;
    --text: #111827;
    --muted: #4b5563;
    --line: rgba(15, 23, 42, .14);
    --primary-2: #6d28d9;
    --accent: #0f766e;
    --shadow: 0 18px 45px rgba(15, 23, 42, .10);
}

[data-theme="light"] body {
    background:
        linear-gradient(145deg, rgba(124, 58, 237, .10), transparent 34rem),
        linear-gradient(315deg, rgba(45, 212, 191, .08), transparent 26rem),
        var(--bg);
}

[data-theme="light"] .hero-mode-text .hero-copy,
[data-theme="light"] .hero-mode-text .hero-copy h1,
[data-theme="light"] .hero-mode-text .hero-copy p {
    color: var(--text) !important;
}

[data-theme="light"] .hero-mode-text .hero-copy > p:not(.eyebrow) {
    color: #475569 !important;
}

[data-theme="light"] .button-secondary {
    background: rgba(124, 58, 237, .07);
    color: #1f2937;
    border-color: rgba(124, 58, 237, .20);
}

[data-theme="light"] .button-secondary:hover {
    background: rgba(124, 58, 237, .13);
    color: #111827;
    border-color: rgba(124, 58, 237, .34);
}

[data-theme="light"] .button-ghost {
    background: rgba(15, 23, 42, .035);
    color: #111827;
}

[data-theme="light"] .featured-hero-card {
    background:
        radial-gradient(circle at 78% 12%, rgba(167, 139, 250, .18), transparent 30%),
        radial-gradient(circle at 0% 100%, rgba(45, 212, 191, .10), transparent 34%),
        linear-gradient(180deg, rgba(255, 255, 255, .90), rgba(248, 250, 252, .72)),
        var(--surface);
    box-shadow: 0 24px 72px rgba(109, 40, 217, .16), var(--shadow);
}

[data-theme="light"] .featured-hero-card::before {
    background:
        linear-gradient(rgba(15, 23, 42, .045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 23, 42, .035) 1px, transparent 1px);
}

[data-theme="light"] .featured-hero-card p {
    color: #475569;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
    padding: 0 !important;
    margin: -1px !important;
}

[data-theme="light"] .feature-pills span {
    background: rgba(15, 23, 42, .035);
    border-color: rgba(15, 23, 42, .09);
    color: #475569;
}

[data-theme="light"] .feature-pills i {
    background: rgba(124, 58, 237, .14);
    color: #6d28d9;
}

* { box-sizing: border-box; }
html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

@supports (overflow: clip) {
    html,
    body {
        overflow-x: clip;
    }
}
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: none; }
}
body {
    margin: 0;
    overflow-x: hidden;
    background:
        linear-gradient(145deg, rgba(109, 40, 217, .20), transparent 34rem),
        linear-gradient(315deg, rgba(45, 212, 191, .10), transparent 26rem),
        var(--bg);
    color: var(--text);
    line-height: 1.65;
    text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-color: rgba(167, 139, 250, .5); text-underline-offset: .18em; }
a:hover { color: var(--primary-2); }
button, input, textarea, select { font: inherit; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.08; margin: 0 0 .75rem; letter-spacing: 0; }
h1 { font-size: clamp(2.25rem, 7vw, 4.8rem); max-width: 12ch; }
h2 { font-size: clamp(1.5rem, 4vw, 2.2rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1rem; color: var(--muted); }

.container { width: min(var(--container), calc(100% - 2rem)); margin-inline: auto; }
.skip-link {
    position: absolute;
    left: 1rem;
    top: -10rem;
    background: var(--accent);
    color: #042f2e;
    padding: .6rem .8rem;
    border-radius: var(--radius);
    z-index: 20;
}
.skip-link:focus { top: 1rem; }
.reveal {
    opacity: 0;
    transform: translateY(18px);
}
.reveal.is-visible {
    animation: fadeUp .62s cubic-bezier(.22, 1, .36, 1) forwards;
}
.card-grid .reveal:nth-child(2),
.post-grid .reveal:nth-child(2) { animation-delay: .08s; }
.card-grid .reveal:nth-child(3),
.post-grid .reveal:nth-child(3) { animation-delay: .16s; }

.site-header {
    position: sticky;
    top: 0;
    z-index: 60;
    background: color-mix(in srgb, var(--bg) 86%, transparent);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
}
.nav { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: .7rem; font-weight: 800; text-decoration: none; }
.brand-mark {
    width: 2.35rem;
    height: 2.35rem;
    display: grid;
    place-items: center;
    border-radius: 11px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    font-size: clamp(.68rem, 1vw, .82rem);
    line-height: 1;
    text-align: center;
    letter-spacing: 0;
}
.nav-menu {
    display: flex;
    align-items: center;
    gap: .9rem;
}
.nav-links,
.nav-actions {
    display: flex;
    align-items: center;
}
.nav-links {
    gap: .2rem;
    padding: .25rem;
    border: 1px solid rgba(255, 255, 255, .055);
    border-radius: 999px;
    background: rgba(255, 255, 255, .026);
}
.nav-actions {
    gap: .45rem;
}
.nav-menu a, .admin-sidebar nav a {
    text-decoration: none;
    color: var(--muted);
    padding: .56rem .78rem;
    border-radius: 999px;
}
.nav-links a {
    position: relative;
    font-weight: 750;
    transition: color .18s ease, background .18s ease, transform .18s ease;
}
.nav-links a::after {
    content: "";
    position: absolute;
    left: .85rem;
    right: .85rem;
    bottom: .25rem;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, #7c3aed, #a78bfa);
    opacity: 0;
    transform: scaleX(.4);
    transition: opacity .18s ease, transform .18s ease;
}
.nav-links a:hover,
.nav-links a[aria-current="page"] {
    color: var(--text);
    background: rgba(167, 139, 250, .11);
}
.nav-links a:hover::after,
.nav-links a[aria-current="page"]::after {
    opacity: 1;
    transform: scaleX(1);
}
.nav-dropdown {
    position: relative;
}
.nav-dropdown > summary {
    list-style: none;
    cursor: pointer;
    font-weight: 750;
    color: var(--muted);
    padding: .56rem .78rem;
    border-radius: 999px;
}
.nav-dropdown > summary::-webkit-details-marker {
    display: none;
}
.nav-dropdown > summary:hover,
.nav-dropdown > summary[aria-current="page"] {
    color: var(--text);
    background: rgba(167, 139, 250, .11);
}
.nav-dropdown-panel {
    position: absolute;
    top: calc(100% + .5rem);
    left: 0;
    display: flex;
    flex-direction: column;
    min-width: 180px;
    padding: .4rem;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, .08);
    background: var(--surface, #14131f);
    box-shadow: 0 18px 40px rgba(0, 0, 0, .35);
    z-index: 40;
}
.nav-dropdown-panel a {
    padding: .5rem .7rem;
    border-radius: 10px;
    text-decoration: none;
    color: var(--muted);
    font-weight: 650;
}
.nav-dropdown-panel a:hover {
    color: var(--text);
    background: rgba(167, 139, 250, .11);
}
.nav-admin-link {
    border: 1px solid rgba(255, 255, 255, .10);
    background: rgba(255, 255, 255, .04);
    color: var(--text) !important;
    font-weight: 850;
}
.nav-admin-link:hover {
    border-color: rgba(167, 139, 250, .30);
    background: rgba(124, 58, 237, .14);
}
.lang-switch {
    display: inline-flex;
    align-items: center;
    gap: .2rem;
    padding: .22rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, .035);
}
.lang-switch a {
    min-width: 2.25rem;
    min-height: 2rem;
    display: inline-grid;
    place-items: center;
    padding: .25rem .55rem;
    border-radius: 999px;
    color: var(--muted);
    text-decoration: none;
    font-size: .78rem;
    font-weight: 850;
}
.lang-switch a[aria-current="true"] {
    color: white;
    background: rgba(124, 58, 237, .72);
    box-shadow: 0 8px 20px rgba(109, 40, 217, .22);
}
.admin-sidebar nav a[aria-current="page"] {
    color: var(--text);
    background: rgba(167, 139, 250, .12);
}
.nav-toggle, .theme-toggle {
    display: none;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text);
    border-radius: var(--radius);
    min-width: 2.5rem;
    min-height: 2.5rem;
}
.theme-toggle { display: inline-grid; place-items: center; border-radius: 999px; background: rgba(255, 255, 255, .04); }
.nav-search-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    min-height: 2.55rem;
    padding: 0 .82rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    text-decoration: none;
    font-weight: 800;
    transition: color .18s ease, border-color .18s ease, background .18s ease;
}
.nav-search-link svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.nav-search-link:hover,
.nav-search-link:focus-visible {
    color: var(--text);
    border-color: rgba(167, 139, 250, .34);
    background: rgba(124, 58, 237, .12);
}
.nav-toggle {
    gap: .28rem;
    flex-direction: column;
}
.nav-toggle span {
    width: 1.05rem;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    transition: transform .18s ease, opacity .18s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.7rem;
    padding: .72rem 1rem;
    border: 1px solid transparent;
    border-radius: 13px;
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    color: white;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 12px 24px rgba(109, 40, 217, .22);
    transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
}
.button:hover { color: white; background: #7c3aed; }
.button:active { transform: scale(.98); }
.button-secondary {
    background: rgba(167, 139, 250, .11);
    color: #efeafd;
    border-color: rgba(167, 139, 250, .26);
    box-shadow: none;
}
.button-secondary:hover {
    background: rgba(167, 139, 250, .18);
    color: white;
    border-color: rgba(167, 139, 250, .38);
}
.button-ghost { background: rgba(255, 255, 255, .035); border-color: var(--line); color: var(--text); box-shadow: none; }
.button-small { min-height: 2.15rem; padding: .45rem .7rem; font-size: .9rem; }
.button-danger { background: var(--danger); }
.actions, .card-actions, .row-actions { display: flex; flex-wrap: wrap; gap: .7rem; align-items: center; }

.hero { padding: 5.4rem 0 2.8rem; }
.hero-spacing-small { padding: 3rem 0 1.6rem; }
.hero-spacing-medium { padding: 4.4rem 0 2.2rem; }
.hero-spacing-large { padding: 5.4rem 0 2.8rem; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(300px, .7fr); gap: 2rem; align-items: center; }
.hero-grid.no-featured { grid-template-columns: minmax(0, 860px); }
.hero-copy p { max-width: 62ch; }
.hero-banner {
    min-height: var(--hero-banner-height, clamp(360px, 58vh, 620px));
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 22px;
    background:
        radial-gradient(circle at 22% 18%, rgba(167, 139, 250, .24), transparent 22rem),
        rgba(30, 27, 46, .82);
    box-shadow: var(--shadow);
}
.hero-banner img {
    width: 100%;
    height: 100%;
    min-height: inherit;
    display: block;
    object-fit: var(--hero-banner-fit, cover);
    object-position: var(--hero-banner-position, center center);
}
.hero-banner.has-dark-overlay::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(15, 14, 23, .78), rgba(15, 14, 23, .24));
}
.hero-banner-copy {
    position: absolute;
    inset: auto 2rem 2rem;
    z-index: 1;
    max-width: 760px;
}
.hero-banner-copy h1 {
    max-width: 12ch;
    margin: 0 0 .75rem;
}
.hero-banner-copy p {
    max-width: 60ch;
    color: inherit;
}
.hero-custom-html {
    padding: 2rem;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(255, 255, 255, .035);
    box-shadow: var(--shadow);
}
.eyebrow {
    color: var(--accent);
    text-transform: uppercase;
    font-size: .78rem;
    letter-spacing: .08em;
    font-weight: 800;
}
.hero-panel, .app-card, .post-card, .form-panel, .panel, .stat-grid article {
    background: linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .02)), color-mix(in srgb, var(--surface) 94%, transparent);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.hero-panel { padding: 1.25rem; min-height: 330px; display: flex; flex-direction: column; justify-content: end; }
.hero-panel h2 { font-size: clamp(2rem, 5vw, 3.2rem); }
.badge {
    display: inline-flex;
    width: max-content;
    padding: .32rem .62rem;
    border-radius: 999px;
    background: rgba(167, 139, 250, .12);
    color: var(--accent);
    font-size: .78rem;
    font-weight: 800;
}
.badge-featured {
    color: #f5f3ff;
    background: linear-gradient(135deg, rgba(124, 58, 237, .95), rgba(167, 139, 250, .42));
    border: 1px solid rgba(255, 255, 255, .16);
    box-shadow: 0 10px 26px rgba(124, 58, 237, .30);
}
.badge-success {
    color: #bbf7d0;
    background: rgba(34, 197, 94, .13);
    border: 1px solid rgba(34, 197, 94, .24);
}
.metric-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; margin-top: 1rem; }
.metric-row span { border: 1px solid var(--line); border-radius: var(--radius); padding: .75rem; color: var(--muted); }
.metric-row strong { display: block; color: var(--text); }

.featured-hero-card {
    position: relative;
    justify-content: space-between;
    min-height: 360px;
    padding: 1.15rem;
    border-color: rgba(167, 139, 250, .42);
    background:
        radial-gradient(circle at 78% 12%, rgba(167, 139, 250, .30), transparent 30%),
        radial-gradient(circle at 0% 100%, rgba(45, 212, 191, .14), transparent 34%),
        linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .025)),
        var(--surface);
    box-shadow: 0 24px 72px rgba(109, 40, 217, .26), var(--shadow);
    overflow: hidden;
}
.featured-hero-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
    background-size: 28px 28px;
    mask-image: linear-gradient(180deg, black, transparent 76%);
    pointer-events: none;
}
.featured-card-top {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .75rem;
}
.status-dot {
    display: inline-flex;
    align-items: center;
    gap: .42rem;
    color: #c4b5fd;
    font-weight: 800;
    font-size: .78rem;
}
.status-dot::before {
    content: "";
    width: .48rem;
    height: .48rem;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 18px rgba(34, 197, 94, .8);
}
.featured-icon {
    position: relative;
    z-index: 1;
    width: 88px;
    height: 88px;
    display: grid;
    place-items: center;
    margin: 1.1rem 0 .85rem;
    border-radius: 24px;
    background:
        linear-gradient(135deg, rgba(124, 58, 237, .94), rgba(45, 212, 191, .55)),
        rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .16);
    box-shadow: 0 18px 40px rgba(124, 58, 237, .35);
}
.featured-hero-card h2,
.featured-hero-card p,
.featured-hero-card .feature-pills,
.featured-hero-card .card-actions {
    position: relative;
    z-index: 1;
}
.featured-hero-card h2 { margin-bottom: .45rem; }
.featured-hero-card p { color: #e4e1f4; }
.feature-pills {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .55rem;
    margin: .25rem 0 1rem;
}
.feature-pills span {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: .55rem;
    align-items: center;
    min-height: 54px;
    padding: .62rem .7rem;
    border-radius: 15px;
    background: rgba(255, 255, 255, .055);
    border: 1px solid rgba(255, 255, 255, .085);
    color: var(--muted);
    font-size: .88rem;
}
.feature-pills i {
    grid-row: span 2;
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: rgba(124, 58, 237, .22);
    color: #ddd6fe;
    font-style: normal;
}
.feature-pills strong { color: var(--text); line-height: 1; }

.section, .page-hero { padding: 2.35rem 0; }
.page-hero h1 { max-width: 16ch; }
.page-hero p { max-width: 62ch; }
.section-head { display: flex; justify-content: space-between; gap: 1rem; align-items: end; margin-bottom: 1.25rem; }
.card-grid, .post-grid, .stat-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .9rem;
}
.app-card, .post-card {
    padding: .82rem;
    overflow: hidden;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.app-card:hover, .post-card:hover { transform: translateY(-2px); border-color: rgba(167, 139, 250, .28); }
.app-card:active, .post-card:active { transform: scale(.98); }
.featured-card {
    position: relative;
    border-color: rgba(167, 139, 250, .50);
    background:
        radial-gradient(circle at 20% 0%, rgba(124, 58, 237, .34), transparent 38%),
        linear-gradient(180deg, rgba(109, 40, 217, .18), rgba(23, 24, 42, .94));
    box-shadow: 0 22px 60px rgba(109, 40, 217, .24), var(--shadow-soft);
}
.featured-card::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(255, 255, 255, .16), transparent 34%);
    opacity: .55;
}
.app-shot {
    aspect-ratio: 16 / 9;
    display: grid;
    place-items: center;
    border-radius: 16px;
    margin-bottom: .85rem;
    background:
        radial-gradient(circle at 22% 18%, rgba(255, 255, 255, .26), transparent 20%),
        linear-gradient(135deg, rgba(124, 58, 237, .95), rgba(49, 46, 129, .9) 52%, rgba(45, 212, 191, .58));
    border: 1px solid rgba(255, 255, 255, .12);
    position: relative;
    overflow: hidden;
    min-height: 142px;
}
.app-shot::after {
    content: "";
    position: absolute;
    inset: auto -20% -48% 28%;
    height: 86%;
    border-radius: 999px;
    background: rgba(255, 255, 255, .12);
    filter: blur(10px);
}
.app-shot-image {
    background: rgba(30, 27, 46, .72);
}
.app-shot-image::after {
    display: none;
}
.app-shot-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform .25s ease, filter .25s ease;
    z-index: 0;
}
.app-card:hover .app-shot-image img {
    transform: scale(1.035);
    filter: saturate(1.06) contrast(1.03);
}
.app-shot svg, .featured-icon svg {
    width: 54px;
    height: 54px;
    fill: white;
    filter: drop-shadow(0 12px 20px rgba(0, 0, 0, .28));
    z-index: 1;
}
.app-preview-frame {
    position: absolute;
    inset: 18% 13% 16%;
    display: grid;
    gap: .45rem;
    padding: .8rem;
    border-radius: 15px;
    background: rgba(15, 14, 23, .52);
    border: 1px solid rgba(255, 255, 255, .18);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 20px 36px rgba(0, 0, 0, .24);
    backdrop-filter: blur(8px);
}
.app-preview-frame::before {
    content: "";
    width: 2.8rem;
    height: .45rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, .24);
}
.app-preview-frame span {
    width: 100%;
    height: .48rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, .16);
}
.app-preview-frame span:nth-child(2) { width: 72%; }
.app-preview-frame span:nth-child(3) { width: 46%; background: rgba(45, 212, 191, .42); }
.app-shot svg {
    position: absolute;
    right: 1rem;
    bottom: 1rem;
    width: 42px;
    height: 42px;
}
.app-shot-noteshare,
.app-shot-noteshare-en {
    background:
        radial-gradient(circle at 28% 20%, rgba(255, 255, 255, .26), transparent 21%),
        linear-gradient(135deg, rgba(79, 70, 229, .95), rgba(124, 58, 237, .78) 56%, rgba(14, 165, 233, .55));
}
.app-shot-promptbox,
.app-shot-promptbox-en {
    background:
        radial-gradient(circle at 28% 20%, rgba(255, 255, 255, .22), transparent 20%),
        linear-gradient(135deg, rgba(88, 28, 135, .92), rgba(124, 58, 237, .85) 50%, rgba(245, 158, 11, .52));
}
.app-orb {
    position: absolute;
    width: 76px;
    height: 76px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .13);
    border: 1px solid rgba(255, 255, 255, .18);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22);
}
.card-kicker { display: flex; justify-content: space-between; align-items: center; margin-bottom: .55rem; }
.card-copy { color: #d9d7e8; line-height: 1.55; margin-bottom: 1rem; }
.app-card h2, .app-card h3 { margin-bottom: .45rem; }
.meta, .form-note { color: var(--muted); font-size: .92rem; }

.filter-row, .pagination { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.25rem; }
.filter-row a, .pagination a {
    padding: .5rem .75rem;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    text-decoration: none;
    color: var(--muted);
}
.filter-row a.active, .pagination a.active { background: var(--primary); color: white; border-color: var(--primary); }

.post-card {
    display: grid;
    gap: .72rem;
}
.post-thumb {
    display: block;
    aspect-ratio: 16 / 8.6;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, .09);
    background:
        radial-gradient(circle at 24% 18%, rgba(167, 139, 250, .32), transparent 24%),
        linear-gradient(135deg, rgba(30, 27, 46, .96), rgba(109, 40, 217, .58) 55%, rgba(45, 212, 191, .24));
    position: relative;
    overflow: hidden;
}
.post-thumb-image {
    background: rgba(30, 27, 46, .72);
    text-decoration: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
}
.post-thumb-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform .25s ease, filter .25s ease;
}
.post-card:hover .post-thumb-image img {
    transform: scale(1.035);
    filter: saturate(1.05) contrast(1.03);
}
.post-thumb-image::before {
    display: none;
}
.post-thumb::before {
    content: "";
    position: absolute;
    left: 14%;
    right: 14%;
    top: 34%;
    height: 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .22);
    box-shadow: 0 22px 0 rgba(255, 255, 255, .13), 0 44px 0 rgba(255, 255, 255, .08);
}
.post-card .meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .65rem;
    margin: 0;
}
.tag-pill {
    display: inline-flex;
    align-items: center;
    min-height: 1.8rem;
    padding: .25rem .58rem;
    border-radius: 999px;
    background: rgba(167, 139, 250, .13);
    color: #ddd6fe;
    border: 1px solid rgba(167, 139, 250, .16);
    font-size: .78rem;
    font-weight: 800;
}
.post-card h2, .post-card h3 {
    margin: 0;
    font-size: 1.12rem;
}
.post-card h2 a, .post-card h3 a {
    text-decoration: none;
}
.read-link {
    width: max-content;
    color: #ddd6fe;
    font-weight: 800;
    text-decoration: none;
}
.read-link::after {
    content: " →";
}

.article-layout {
    display: grid;
    grid-template-columns: minmax(0, 820px) 250px;
    justify-content: center;
    gap: 2.25rem;
    padding: 2.4rem 0 3.5rem;
}
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: 3px;
    background: transparent;
}
.reading-progress span {
    display: block;
    width: 100%;
    height: 100%;
    transform: scaleX(0);
    transform-origin: left center;
    background: linear-gradient(90deg, #7c3aed, #a78bfa, #2dd4bf);
    box-shadow: 0 0 18px rgba(124, 58, 237, .55);
}
.article-head, .article-content { grid-column: 1; }
.reader-head {
    display: grid;
    gap: .85rem;
}
.article-head h1 {
    max-width: 880px;
    font-size: clamp(2rem, 3.2vw, 3rem);
    line-height: 1.08;
    letter-spacing: 0;
    margin: 0;
}
.reader-meta,
.reader-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .55rem .75rem;
}
.reader-meta {
    color: var(--muted);
    font-size: .95rem;
}
.reader-meta span {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
}
.reader-meta span + span::before {
    content: "";
    width: 5px;
    height: 5px;
    border-radius: 999px;
    background: rgba(167, 139, 250, .58);
}
.cover {
    width: 100%;
    max-height: 520px;
    object-fit: cover;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, .08);
    margin-top: 1rem;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .28);
}
.toc {
    grid-column: 2;
    grid-row: 1 / span 2;
    position: sticky;
    top: 96px;
    align-self: start;
}
.reader-aside {
    display: grid;
    gap: .9rem;
    align-content: start;
}
.reader-progress-card {
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: .75rem;
    overflow: hidden;
    padding: .9rem .95rem 1rem;
    border: 1px solid rgba(167, 139, 250, .24);
    border-radius: 20px;
    background:
        linear-gradient(135deg, rgba(124, 58, 237, .18), rgba(45, 212, 191, .05)),
        rgba(255, 255, 255, .035);
    box-shadow: 0 16px 42px rgba(0, 0, 0, .22);
}
.reader-progress-card > span,
.toc-empty {
    color: var(--muted);
    font-size: .86rem;
}
.reader-progress-card strong {
    color: #ddd6fe;
    font-size: 1rem;
}
.reader-progress-card i {
    grid-column: 1 / -1;
    display: block;
    height: 5px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, .09);
}
.reader-progress-card i span {
    display: block;
    width: 100%;
    height: 100%;
    transform: scaleX(0);
    transform-origin: left center;
    border-radius: inherit;
    background: linear-gradient(90deg, #7c3aed, #a78bfa, #2dd4bf);
}
.toc-card {
    overflow: hidden;
    border: 1px solid rgba(167, 139, 250, .20);
    border-radius: 24px;
    background:
        radial-gradient(circle at 18% 0%, rgba(124, 58, 237, .22), transparent 9rem),
        linear-gradient(180deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .025)),
        rgba(12, 10, 20, .92);
    box-shadow: 0 22px 60px rgba(0, 0, 0, .28);
}
.toc-head {
    padding: 1rem 1rem .85rem;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.toc-head span {
    display: block;
    margin-bottom: .35rem;
    color: #2dd4bf;
    font-size: .7rem;
    font-weight: 900;
    letter-spacing: .12em;
    text-transform: uppercase;
}
.toc-head strong {
    display: block;
    color: #fff;
    font-size: 1.05rem;
    line-height: 1.2;
}
.toc-head small {
    display: block;
    margin-top: .35rem;
    color: var(--muted);
    font-size: .8rem;
}
.toc-list {
    display: grid;
    max-height: min(58vh, 520px);
    overflow-y: auto;
    padding: .55rem;
    scrollbar-width: thin;
}
.toc-link {
    position: relative;
    display: grid;
    grid-template-columns: 2.15rem minmax(0, 1fr);
    gap: .55rem;
    align-items: start;
    padding: .72rem .65rem;
    border: 1px solid transparent;
    border-radius: 16px;
    color: #c9c5d8;
    text-decoration: none;
    transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}
.toc-link:hover,
.toc-link.is-active {
    color: #fff;
    border-color: rgba(167, 139, 250, .30);
    background: rgba(124, 58, 237, .18);
    transform: translateX(2px);
}
.toc-link.is-active::before {
    content: "";
    position: absolute;
    inset: .62rem auto .62rem .18rem;
    width: 3px;
    border-radius: 999px;
    background: linear-gradient(180deg, #2dd4bf, #a78bfa);
}
.toc-index {
    display: grid;
    place-items: center;
    width: 1.85rem;
    height: 1.85rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, .07);
    color: #a78bfa;
    font-size: .72rem;
    font-weight: 900;
}
.toc-title {
    display: block;
    font-size: .88rem;
    font-weight: 750;
    line-height: 1.42;
}
.toc-l3 {
    margin-left: .75rem;
    grid-template-columns: 1.65rem minmax(0, 1fr);
    padding-block: .56rem;
}
.toc-l3 .toc-index {
    width: 1.35rem;
    height: 1.35rem;
    font-size: .62rem;
    background: rgba(45, 212, 191, .10);
    color: #5eead4;
}
.toc-l3 .toc-title {
    color: #aaa4bd;
    font-size: .82rem;
    font-weight: 650;
}
.toc-empty {
    display: block;
    padding: 1rem;
}
.reader-ad-stack {
    display: grid;
    gap: .8rem;
    margin-top: .85rem;
    padding-top: .95rem;
    border-top: 1px solid var(--line);
}
.reader-ad-card {
    position: relative;
    display: grid;
    gap: .45rem;
    min-height: 156px;
    padding: 1rem;
    overflow: hidden;
    border: 1px solid rgba(167, 139, 250, .18);
    border-radius: 20px;
    background:
        radial-gradient(circle at 84% 12%, rgba(124, 58, 237, .30), transparent 34%),
        radial-gradient(circle at 10% 100%, rgba(45, 212, 191, .13), transparent 36%),
        linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .025)),
        var(--surface);
    text-decoration: none;
    box-shadow: 0 18px 48px rgba(0, 0, 0, .22);
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.reader-ad-card:hover {
    transform: translateY(-2px);
    border-color: rgba(167, 139, 250, .34);
    box-shadow: 0 24px 62px rgba(124, 58, 237, .18);
}
.reader-ad-card span {
    width: max-content;
    padding: .22rem .5rem;
    border-radius: 999px;
    background: rgba(124, 58, 237, .18);
    color: #ddd6fe;
    font-size: .72rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.reader-ad-card strong {
    color: var(--text);
    font-size: 1.02rem;
    line-height: 1.25;
}
.reader-ad-card small {
    color: var(--muted);
    line-height: 1.5;
}
.reader-ad-card em {
    align-self: end;
    color: var(--accent);
    font-style: normal;
    font-weight: 850;
}
.reader-ad-admin-grid {
    align-items: start;
}
.reader-ad-admin-card {
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, .025);
}
.reader-ad-preview {
    min-height: 132px;
    margin-top: .75rem;
}
.reader-ad-preview:hover {
    transform: none;
}
.article-content {
    max-width: 820px;
    padding: 1.45rem 1.65rem;
    border: 1px solid rgba(255, 255, 255, .07);
    border-radius: 24px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .018)),
        rgba(23, 22, 37, .62);
    box-shadow: 0 24px 70px rgba(0, 0, 0, .22);
    color: #d8d4e8;
    font-size: 1.04rem;
    line-height: 1.82;
}
.article-content p {
    margin: 0 0 1.2rem;
    color: #c9c5d8;
}
.article-content > :first-child {
    margin-top: 0;
}
.article-content > :last-child {
    margin-bottom: 0;
}
.article-content h1,
.article-content h2,
.article-content h3 {
    color: #f8fafc;
    line-height: 1.2;
    letter-spacing: 0;
}
.article-content h1 {
    margin: .1rem 0 1rem;
    font-size: clamp(1.65rem, 2.6vw, 2.25rem);
}
.article-content h2 {
    margin: 2rem 0 .75rem;
    padding-top: .6rem;
    font-size: clamp(1.35rem, 2vw, 1.72rem);
}
.article-content h3 {
    margin: 1.55rem 0 .6rem;
    font-size: clamp(1.14rem, 1.7vw, 1.35rem);
    color: #ede9fe;
}
.article-content h2::before {
    content: "";
    display: block;
    width: 42px;
    height: 3px;
    margin-bottom: .8rem;
    border-radius: 999px;
    background: linear-gradient(90deg, #7c3aed, #2dd4bf);
}
.article-content code { background: var(--surface-2); padding: .1rem .3rem; border-radius: 4px; }
.article-content a {
    color: #a78bfa;
    font-weight: 800;
}
.article-content blockquote {
    margin: 1.35rem 0;
    padding: 1rem 1.1rem 1rem 1.2rem;
    border-left: 4px solid #7c3aed;
    border-radius: 0 18px 18px 0;
    background:
        linear-gradient(90deg, rgba(124, 58, 237, .20), rgba(124, 58, 237, .07)),
        rgba(124, 58, 237, .08);
    color: var(--text);
}
.article-content blockquote p:last-child {
    margin-bottom: 0;
}
.article-content ul,
.article-content ol {
    margin: .8rem 0 1.35rem;
    padding-left: 1.25rem;
    color: #c9c5d8;
}
.article-content li {
    margin: .35rem 0;
    padding-left: .2rem;
}
.article-content li::marker {
    color: #a78bfa;
    font-weight: 800;
}
.article-content .task-list-item {
    list-style: none;
}
.article-content .task-list-item input {
    width: auto;
    margin-right: .45rem;
    accent-color: #7c3aed;
}
.article-content img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 1.45rem auto;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 20px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, .22);
}
.article-content del {
    color: var(--muted);
}
.article-content figure.block-image {
    margin: 1.45rem 0;
}
.article-content figure.block-image img {
    margin: 0 auto .6rem;
}
.article-content figure.block-image figcaption {
    text-align: center;
    color: var(--muted);
    font-size: .85rem;
}
.article-content pre.block-code {
    background: var(--surface-2);
    padding: 1rem 1.2rem;
    border-radius: 14px;
    overflow-x: auto;
    margin: 1.2rem 0;
}
.article-content pre.block-code code {
    background: none;
    padding: 0;
}
.code-block {
    margin: 1.35rem 0;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, .24);
    border-radius: 16px;
    background: #0b1020;
    box-shadow: 0 18px 48px rgba(2, 6, 23, .26);
}
.code-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .8rem;
    min-height: 44px;
    padding: .62rem .82rem .62rem 1rem;
    border-bottom: 1px solid rgba(148, 163, 184, .18);
    background:
        linear-gradient(135deg, rgba(99, 102, 241, .16), rgba(45, 212, 191, .06)),
        rgba(15, 23, 42, .96);
}
.code-language {
    min-width: 0;
    overflow: hidden;
    color: #c4b5fd;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", ui-monospace, monospace;
    font-size: .76rem;
    font-weight: 850;
    letter-spacing: .06em;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}
.code-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: .36rem;
    min-height: 30px;
    padding: .28rem .62rem;
    border: 1px solid rgba(226, 232, 240, .16);
    border-radius: 999px;
    background: rgba(255, 255, 255, .07);
    color: #e5e7eb;
    cursor: pointer;
    font-size: .76rem;
    font-weight: 850;
    line-height: 1;
    transition: transform .16s ease, border-color .16s ease, background .16s ease, color .16s ease;
}
.code-copy-btn:hover,
.code-copy-btn:focus-visible {
    transform: translateY(-1px);
    border-color: rgba(196, 181, 253, .45);
    background: rgba(255, 255, 255, .12);
    outline: none;
}
.code-copy-btn.is-copied {
    border-color: rgba(45, 212, 191, .48);
    color: #99f6e4;
}
.code-copy-icon {
    font-size: .82rem;
}
.code-block pre {
    margin: 0;
    padding: .85rem 0;
    overflow-x: auto;
    background:
        radial-gradient(circle at 16px 16px, rgba(255, 255, 255, .035) 0 1px, transparent 1px) 0 0 / 24px 24px,
        #0b1020;
}
.code-block code {
    display: block;
    min-width: max-content;
    padding: 0;
    background: transparent !important;
    color: #dbeafe;
    font-family: "JetBrains Mono", "Fira Code", "SFMono-Regular", Consolas, "Liberation Mono", ui-monospace, monospace;
    font-size: .9rem;
    line-height: 1.72;
    tab-size: 4;
    white-space: pre;
}
.code-line {
    display: grid;
    grid-template-columns: 4.2ch minmax(0, 1fr);
    min-height: 1.72em;
}
.code-line:hover {
    background: rgba(148, 163, 184, .075);
}
.code-line-number {
    padding-right: .8rem;
    color: #64748b;
    font-variant-numeric: tabular-nums;
    text-align: right;
    user-select: none;
}
.code-line-content {
    padding-right: 1rem;
}
.code-token-keyword { color: #c084fc; }
.code-token-string { color: #86efac; }
.code-token-comment { color: #94a3b8; font-style: italic; }
.code-token-number { color: #fbbf24; }
[data-codeblock-content] {
    min-height: 260px;
    font-family: "JetBrains Mono", "Fira Code", "SFMono-Regular", Consolas, ui-monospace, monospace;
    font-size: .9rem;
    line-height: 1.65;
    tab-size: 4;
}
@media (max-width: 760px) {
    .code-block {
        margin-inline: -2px;
        border-radius: 14px;
    }
    .code-header {
        padding: .55rem .62rem .55rem .75rem;
    }
    .code-copy-btn {
        min-height: 34px;
        padding-inline: .7rem;
    }
    .code-block code {
        font-size: .82rem;
    }
    .code-line {
        grid-template-columns: 3.4ch minmax(0, 1fr);
    }
}
.article-content p.block-button {
    margin: 1.2rem 0;
}
.article-content .block-embed {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    margin: 1.45rem 0;
    border-radius: 18px;
    overflow: hidden;
    background: rgba(255, 255, 255, .03);
}
.article-content .block-embed iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}
.article-content .block-embed-unsupported {
    color: var(--muted);
    font-size: .85rem;
    font-style: italic;
}
.article-content hr.block-divider {
    border: none;
    border-top: 1px solid var(--line);
    margin: 2rem 0;
}
.content-mode-tabs {
    display: inline-flex;
    gap: .4rem;
    padding: .3rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, .02);
    margin-bottom: 1rem;
}
.content-mode-tabs button {
    appearance: none;
    border: 0;
    background: transparent;
    color: var(--muted);
    font-weight: 700;
    font-size: .85rem;
    padding: .5rem 1rem;
    border-radius: 999px;
    cursor: pointer;
}
.content-mode-tabs button.is-active {
    background: linear-gradient(90deg, #7c3aed, #2dd4bf);
    color: #0b0a13;
}
.article-table-wrap {
    overflow-x: auto;
    margin: 1.35rem 0;
    border: 1px solid var(--line);
    border-radius: 16px;
}
.article-content table {
    width: 100%;
    min-width: 560px;
    border-collapse: collapse;
    background: rgba(255, 255, 255, .025);
}
.article-content th,
.article-content td {
    padding: .8rem .9rem;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}
.article-content th {
    color: var(--text);
    background: rgba(124, 58, 237, .12);
}
.article-content tr:last-child td {
    border-bottom: 0;
}
.post-nav {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}
.post-nav a {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    grid-template-rows: auto auto 1fr;
    gap: .25rem .85rem;
    min-height: 7.25rem;
    padding: .75rem;
    border: 1px solid var(--line);
    border-radius: 18px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .02)),
        var(--surface);
    text-decoration: none;
    box-shadow: var(--shadow-soft);
    transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.post-nav a:hover {
    transform: translateY(-2px);
    border-color: rgba(167, 139, 250, .28);
}
.post-nav-next {
    text-align: left;
}
.post-nav img,
.post-nav i {
    grid-row: 1 / span 3;
    width: 96px;
    height: 88px;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 14px;
    object-fit: cover;
}
.post-nav i {
    background:
        linear-gradient(135deg, rgba(124, 58, 237, .75), rgba(45, 212, 191, .42)),
        var(--surface-2);
}
.post-nav span {
    color: var(--accent);
    font-size: .78rem;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.post-nav strong {
    color: var(--text);
    font-size: 1.05rem;
    line-height: 1.35;
}
.post-nav small {
    display: -webkit-box;
    overflow: hidden;
    color: var(--muted);
    font-size: .86rem;
    line-height: 1.45;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.related-section {
    padding-top: 0;
}
.related-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.site-search-form {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) auto;
    gap: .75rem;
    max-width: 760px;
    margin-top: 1.25rem;
}
.site-search-form input {
    min-height: 3.2rem;
    border-radius: 999px;
    padding-inline: 1.1rem;
}
.search-summary {
    color: var(--muted);
    margin-top: .9rem;
}
.search-results {
    padding-top: 1rem;
}
.compact-app-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.compact-app-grid .app-card {
    min-height: auto;
}

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.check-list { padding-left: 1.2rem; color: var(--muted); }
.narrow { max-width: 760px; }
.auth-shell { min-height: 70vh; display: grid; grid-template-columns: 1fr minmax(280px, 440px); gap: 2rem; align-items: center; padding-block: 4rem; }
.form-panel, .panel { padding: 1rem; }
label { display: grid; gap: .35rem; color: var(--text); font-weight: 700; margin-bottom: .85rem; }
input, textarea, select {
    width: 100%;
    border: 1px solid var(--line);
    background: var(--bg);
    color: var(--text);
    border-radius: var(--radius);
    padding: .72rem .8rem;
}
textarea { resize: vertical; }
input:focus, textarea:focus, select:focus, button:focus-visible, a:focus-visible {
    outline: 3px solid rgba(45, 212, 191, .45);
    outline-offset: 2px;
}
.alert { padding: .75rem 1rem; border-radius: var(--radius); margin-block: 1rem; border: 1px solid var(--line); }
.alert-success { background: rgba(34, 197, 94, .12); color: #bbf7d0; }
.alert-error { background: rgba(239, 68, 68, .12); color: #fecaca; }
.alert-warning { background: rgba(245, 158, 11, .14); color: #fde68a; border-color: rgba(245, 158, 11, .32); }
.admin-flash {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    transition: opacity .18s ease, transform .18s ease;
}
.admin-flash > span { min-width: 0; }
.admin-flash > button {
    flex: 0 0 auto;
    border: 0;
    background: transparent;
    color: currentColor;
    font: inherit;
    font-size: 1.25rem;
    line-height: 1;
    opacity: .72;
    cursor: pointer;
}
.admin-flash > button:hover { opacity: 1; }
.admin-flash.is-leaving { opacity: 0; transform: translateY(-.35rem); }
.has-validation-error {
    border-color: #f87171 !important;
    box-shadow: 0 0 0 3px rgba(248, 113, 113, .12);
}
.field-validation-message {
    display: block;
    margin: -.45rem 0 .75rem;
    color: #fca5a5;
    font-size: .82rem;
    font-weight: 700;
}
.admin-validation-summary {
    margin: 0 0 1rem;
}
.admin-validation-summary > strong { display: block; margin-bottom: .45rem; }
.admin-validation-summary ul { margin: 0; padding-left: 1.1rem; }
.admin-validation-summary li + li { margin-top: .25rem; }
.admin-validation-summary button {
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    text-decoration: underline;
    text-underline-offset: .18em;
    cursor: pointer;
}
.incident-filter-form { align-items: end; }
.incident-table td { vertical-align: top; }
.incident-table td strong,
.incident-table td small,
.incident-table td code { display: block; }
.incident-table td small { margin-top: .25rem; color: var(--muted); }
.incident-table td code { margin-top: .35rem; max-width: 34rem; white-space: normal; overflow-wrap: anywhere; }
.button[data-admin-save-primary]::after {
    content: attr(data-shortcut-label);
    margin-left: .45rem;
    padding: .1rem .35rem;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: .35rem;
    color: currentColor;
    font-size: .68em;
    font-weight: 700;
    line-height: 1.2;
    opacity: .7;
}
.admin-action-feedback {
    position: fixed;
    z-index: 1200;
    right: 1rem;
    bottom: 1rem;
    display: flex;
    align-items: center;
    gap: .7rem;
    max-width: min(28rem, calc(100vw - 2rem));
    padding: .85rem 1rem;
    border: 1px solid rgba(139, 92, 246, .45);
    border-radius: .85rem;
    background: rgba(20, 18, 32, .96);
    color: #f5f3ff;
    box-shadow: 0 1rem 2.5rem rgba(0, 0, 0, .32);
}
.admin-action-feedback[hidden] { display: none; }
.admin-unsaved-indicator {
    position: fixed;
    z-index: 1190;
    left: calc(260px + 1rem);
    bottom: 1rem;
    display: flex;
    align-items: center;
    gap: .6rem;
    max-width: min(24rem, calc(100vw - 2rem));
    padding: .72rem .9rem;
    border: 1px solid rgba(245, 158, 11, .42);
    border-radius: .8rem;
    background: rgba(40, 30, 16, .96);
    color: #fde68a;
    box-shadow: 0 .8rem 2rem rgba(0, 0, 0, .26);
}
.admin-unsaved-indicator[hidden] { display: none; }
.admin-unsaved-indicator > span {
    width: .58rem;
    height: .58rem;
    border-radius: 999px;
    background: #f59e0b;
    box-shadow: 0 0 0 .25rem rgba(245, 158, 11, .14);
}
.admin-confirm-dialog {
    width: min(30rem, calc(100vw - 2rem));
    padding: 0;
    border: 1px solid rgba(148, 163, 184, .24);
    border-radius: 1rem;
    background: #171522;
    color: #f8fafc;
    box-shadow: 0 1.5rem 5rem rgba(0, 0, 0, .48);
}
.admin-confirm-dialog::backdrop {
    background: rgba(5, 4, 12, .72);
    backdrop-filter: blur(4px);
}
.admin-confirm-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: .9rem 1rem;
    padding: 1.15rem;
}
.admin-confirm-card h2 { margin: 0 0 .35rem; font-size: 1.15rem; }
.admin-confirm-card p { margin: 0; color: #cbd5e1; line-height: 1.55; }
.admin-confirm-icon {
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    background: rgba(248, 113, 113, .14);
    color: #fca5a5;
    font-weight: 900;
}
.admin-confirm-actions {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
    gap: .65rem;
    margin-top: .35rem;
}
@media (max-width: 980px) {
    .admin-unsaved-indicator { left: 1rem; }
}
.admin-action-feedback > span,
.is-submitting::before {
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(255, 255, 255, .35);
    border-top-color: currentColor;
    border-radius: 999px;
    animation: admin-submit-spin .7s linear infinite;
}
.is-submitting::before { content: ''; display: inline-block; margin-right: .45rem; vertical-align: -.12rem; }
@keyframes admin-submit-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
    .admin-flash { transition: none; }
    .admin-action-feedback > span, .is-submitting::before { animation: none; }
}

.site-footer {
    border-top: 1px solid var(--line);
    padding: 2.35rem 0;
    margin-top: 2rem;
    background:
        radial-gradient(circle at 12% 0%, rgba(124, 58, 237, .13), transparent 28rem),
        rgba(255, 255, 255, .015);
}
.footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 2rem;
    align-items: start;
}
.footer-brand {
    max-width: 560px;
}
.footer-brand .brand {
    margin-bottom: .8rem;
}
.footer-brand small {
    color: var(--muted);
}
.footer-groups {
    display: flex;
    gap: 2rem;
}
.footer-links {
    display: grid;
    gap: .3rem;
    min-width: 120px;
}
.footer-links strong {
    color: var(--text);
    font-size: .9rem;
}
.footer-links a {
    color: var(--muted);
    text-decoration: none;
}
.footer-links a:hover {
    color: var(--primary-2);
}
.admin-title-link {
    display: inline-block;
    color: var(--text);
    font-weight: 850;
    line-height: 1.35;
    text-decoration: none;
}
.admin-title-link:hover {
    color: #ddd6fe;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
}

.admin-body { display: grid; grid-template-columns: 260px minmax(0, 1fr); min-height: 100vh; }
.admin-drawer-toggle,
.admin-drawer-backdrop {
    display: none;
}
.admin-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 1rem;
    border-right: 1px solid var(--line);
    background: var(--surface);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.admin-sidebar nav {
    display: grid;
    gap: .65rem;
    overflow-y: auto;
    padding-right: .15rem;
}
.admin-main { padding: 2.2rem 1.25rem 1.25rem; min-width: 0; }
.admin-head { display: flex; justify-content: space-between; gap: 1rem; align-items: center; margin-bottom: 1.25rem; }
.admin-head h1 { max-width: none; }
.stat-grid article { padding: 1rem; }
.stat-grid strong { display: block; font-size: 2rem; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 680px; }
th, td { text-align: left; padding: .8rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-size: .85rem; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.check-inline { display: flex; align-items: center; gap: .6rem; }
.check-inline input { width: auto; }
.check-row {
    display: flex;
    align-items: center;
    gap: .6rem;
    width: max-content;
    padding: .7rem .85rem;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, .035);
}
.check-row input {
    width: 1rem;
    height: 1rem;
    accent-color: var(--primary);
}
.app-editor-form {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr);
    gap: 1rem;
    align-items: start;
}
.app-editor-main,
.app-editor-side {
    display: grid;
    gap: .95rem;
}
.app-editor-side {
    position: sticky;
    top: 1rem;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .025);
}
.app-editor-side .image-preview {
    min-height: 168px;
    margin: 0;
}
.app-editor-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
}
.hero-settings-form {
    display: block;
}
.hero-admin-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
    gap: 1rem;
    align-items: start;
}
.hero-admin-main {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}
.hero-admin-layout-pro .hero-admin-main {
    grid-template-columns: 1fr;
}
.hero-admin-layout-pro .hero-mode-note {
    border-color: rgba(45, 212, 191, .28);
    background:
        radial-gradient(circle at top right, rgba(45, 212, 191, .12), transparent 28rem),
        linear-gradient(135deg, rgba(124, 58, 237, .08), rgba(15, 23, 42, .24)),
        rgba(255, 255, 255, .02);
}
.hero-admin-layout-pro .hero-mode-note p:not(.eyebrow) {
    max-width: 860px;
    color: var(--muted);
    line-height: 1.65;
}
.hero-admin-card {
    padding: 1rem;
}
.hero-admin-card label {
    margin-bottom: .8rem;
}
.hero-admin-card textarea {
    min-height: 0;
}
.hero-admin-side {
    display: grid;
    gap: 1rem;
    position: sticky;
    top: 1rem;
}
.hero-sticky-card {
    display: grid;
    gap: .85rem;
}
.hero-image-tools {
    display: grid;
    grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
    gap: .8rem;
    align-items: end;
}
.hero-image-preview {
    min-height: 220px;
    max-height: 360px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .025);
    color: var(--muted);
}
.hero-image-preview img {
    width: 100%;
    height: 100%;
    max-height: 360px;
    display: block;
    object-fit: contain;
}
.hero-slider-admin-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .95rem;
    align-items: start;
}
.hero-slider-admin-item {
    display: grid;
    gap: .65rem;
    padding: .85rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .025);
    cursor: grab;
    transition: border-color .18s ease, opacity .18s ease, transform .18s ease;
}
.hero-slider-admin-item label {
    margin-bottom: .45rem;
}
.hero-slider-admin-item .hero-image-tools {
    gap: .6rem;
}
.hero-slider-admin-item:active {
    cursor: grabbing;
}
.hero-slider-admin-item.is-dragging {
    opacity: .58;
    border-color: rgba(45, 212, 191, .55);
    transform: scale(.992);
}
.hero-slider-admin-top {
    display: flex;
    justify-content: space-between;
    gap: .85rem;
    align-items: center;
}
.hero-slider-admin-top label {
    margin: 0;
}
.compact-input {
    max-width: 96px;
}
.hero-slider-admin-item .hero-image-preview {
    min-height: 108px;
    max-height: 140px;
}
.hero-slider-admin-item .hero-image-preview img {
    max-height: 140px;
    object-fit: cover;
}
.form-grid.four {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
.compact-check {
    width: 100%;
    margin: 0;
}
.hero-admin-preview {
    min-height: 180px;
    padding: 1rem;
    display: grid;
    align-content: center;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background:
        radial-gradient(circle at 12% 10%, rgba(124, 58, 237, .22), transparent 20rem),
        rgba(15, 14, 23, .52);
}
.hero-admin-preview h3 {
    max-width: 12ch;
    margin: .35rem 0;
    font-size: clamp(1.65rem, 3vw, 2.7rem);
}
.hero-admin-preview p:last-child {
    max-width: 62ch;
    color: var(--muted);
}

.admin-subtitle {
    margin: .25rem 0 0;
    color: var(--muted);
}
.admin-sidebar {
    background:
        linear-gradient(180deg, rgba(124, 58, 237, .10), transparent 18rem),
        var(--surface);
}
.admin-sidebar .brand {
    padding: .55rem;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .035);
    border: 1px solid var(--line);
}
.admin-site-switch,
.admin-sidebar nav a,
.admin-sidebar form .button {
    display: flex;
    align-items: center;
    gap: .62rem;
    min-height: 2.45rem;
}
.admin-site-switch {
    padding: .58rem .65rem;
    border-radius: var(--radius);
    border: 1px solid rgba(167, 139, 250, .18);
    background:
        radial-gradient(circle at 12% 0%, rgba(167, 139, 250, .18), transparent 48%),
        rgba(255, 255, 255, .035);
    color: #ddd6fe;
    text-decoration: none;
    font-weight: 850;
    box-shadow: 0 12px 28px rgba(109, 40, 217, .12);
}
.admin-site-switch:hover {
    color: white;
    border-color: rgba(167, 139, 250, .32);
    background: rgba(124, 58, 237, .16);
}
.nav-icon {
    flex: 0 0 auto;
    width: 1.05rem;
    height: 1.05rem;
}
.admin-sidebar nav a .nav-icon,
.admin-sidebar form .button .nav-icon,
.admin-site-switch .nav-icon {
    width: 1.9rem;
    height: 1.9rem;
    padding: .43rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, .045);
    color: #a78bfa;
}
.admin-sidebar nav a:hover .nav-icon,
.admin-sidebar nav a[aria-current="page"] .nav-icon,
.admin-site-switch:hover .nav-icon {
    background: rgba(124, 58, 237, .24);
    color: white;
}
.admin-sidebar nav a span,
.admin-site-switch span,
.admin-sidebar form .button span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.admin-sidebar form .button {
    justify-content: flex-start;
    width: 100%;
}
.admin-nav-group {
    display: grid;
    gap: .25rem;
}
.admin-nav-group summary {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 1.85rem;
    padding: .25rem .35rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .08em;
    font-size: .72rem;
    font-weight: 900;
    cursor: pointer;
}
.admin-nav-group summary::-webkit-details-marker {
    display: none;
}
.admin-nav-group summary::after {
    content: "";
    width: .48rem;
    height: .48rem;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform .16s ease;
}
.admin-nav-group:not([open]) summary::after {
    transform: rotate(-45deg);
}
.admin-nav-group > div {
    display: grid;
    gap: .25rem;
}
.admin-main {
    background:
        radial-gradient(circle at 78% -10%, rgba(124, 58, 237, .14), transparent 28rem),
        transparent;
}
.stat-grid-wide {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    margin-bottom: 1rem;
}
.stat-grid article {
    display: grid;
    gap: .25rem;
    min-height: 122px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .02)),
        var(--surface);
    border-color: rgba(255, 255, 255, .075);
}
.stat-grid article span {
    color: var(--muted);
    font-size: .86rem;
    font-weight: 800;
}
.stat-grid article small {
    color: var(--muted);
}
.cockpit-head {
    align-items: center;
}
.cockpit-actions {
    display: flex;
    align-items: center;
    gap: .7rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.cockpit-stats article {
    position: relative;
    overflow: hidden;
}
.cockpit-stats article::after {
    content: "";
    position: absolute;
    inset: auto -18% -36% 44%;
    height: 82px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(45, 212, 191, .18), transparent 68%);
    pointer-events: none;
}
.cockpit-grid {
    grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
}
.cockpit-checklist .compact-item {
    background: linear-gradient(135deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .015));
}
.ops-list {
    display: grid;
    gap: .65rem;
}
.ops-list > div {
    display: flex;
    justify-content: space-between;
    gap: .8rem;
    align-items: center;
    padding: .76rem .82rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, .025);
}
.ops-list span {
    color: var(--muted);
    font-size: .84rem;
    font-weight: 800;
}
.security-callout {
    display: grid;
    gap: .35rem;
    padding: .95rem 1rem;
    border: 1px solid rgba(245, 158, 11, .32);
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, rgba(245, 158, 11, .16), rgba(124, 58, 237, .08));
    color: var(--text);
}
.security-callout strong {
    color: #fde68a;
}
.security-callout span {
    color: var(--muted);
}
.security-callout code {
    color: #fff7ed;
}
.admin-grid-two {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}
.system-summary-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: .85rem;
    margin-bottom: 1rem;
}
.system-summary-card {
    display: grid;
    gap: .2rem;
    min-height: 126px;
}
.system-summary-card span {
    color: var(--muted);
    font-size: .82rem;
    font-weight: 900;
}
.system-summary-card strong {
    font-size: clamp(1.55rem, 3vw, 2.25rem);
    line-height: 1.05;
}
.system-summary-card small {
    color: var(--muted);
}
.system-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}
.system-check-list,
.system-path-list {
    display: grid;
    gap: .65rem;
}
.system-check-item,
.system-path-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .85rem;
    padding: .8rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, .025);
}
.system-check-item small,
.system-path-item code {
    display: block;
    max-width: 100%;
    margin-top: .18rem;
    color: var(--muted);
    font-size: .8rem;
}
.system-path-item > div {
    min-width: 0;
}
.system-path-item code {
    overflow-wrap: anywhere;
}
.system-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
}
.panel-head {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 1rem;
    margin-bottom: 1rem;
}
.mini-chart {
    height: 180px;
    display: flex;
    align-items: end;
    gap: .55rem;
    padding-top: 1rem;
}
.mini-chart .bar {
    flex: 1;
    min-height: 12px;
    border-radius: 999px 999px 6px 6px;
    background: linear-gradient(180deg, #a78bfa, #6d28d9);
    position: relative;
    box-shadow: 0 10px 24px rgba(109, 40, 217, .24);
}
.mini-chart .bar span {
    position: absolute;
    left: 50%;
    bottom: calc(100% + .35rem);
    transform: translateX(-50%);
    color: var(--muted);
    font-size: .75rem;
    font-weight: 800;
}
.compact-list {
    display: grid;
    gap: .55rem;
}
.compact-item {
    display: flex;
    justify-content: space-between;
    gap: .8rem;
    align-items: center;
    padding: .72rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    text-decoration: none;
    background: rgba(255, 255, 255, .025);
}
.compact-item small, .table-sub {
    display: block;
    color: var(--muted);
    font-size: .8rem;
    margin-top: .15rem;
}
.admin-toolbar {
    margin-bottom: 1rem;
}
.user-toolbar {
    width: fit-content;
    max-width: 100%;
    padding: .85rem;
}
.filter-form {
    display: grid;
    grid-template-columns: minmax(180px, 1.4fr) repeat(4, minmax(130px, 1fr)) auto;
    gap: .75rem;
    align-items: end;
}
.user-filter-form {
    grid-template-columns: minmax(280px, 420px) 190px 190px auto;
    justify-content: start;
    max-width: 960px;
}
.user-filter-form label:first-child {
    max-width: 420px;
}
.user-inline-fields {
    display: grid;
    grid-template-columns: minmax(170px, 1fr) minmax(150px, .85fr);
    gap: .55rem;
    min-width: 360px;
}
.user-inline-fields label {
    gap: .28rem;
    margin: 0;
    color: var(--muted);
    font-size: .76rem;
}
.user-inline-fields input {
    min-height: 2.45rem;
    padding: .55rem .7rem;
    font-size: .88rem;
}
.status-open,
.status-locked {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    min-height: 1.8rem;
    padding: .2rem .55rem;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 850;
}
.status-open {
    color: #bbf7d0;
    border: 1px solid rgba(34, 197, 94, .18);
    background: rgba(34, 197, 94, .10);
}
.status-locked {
    color: #fecaca;
    border: 1px solid rgba(239, 68, 68, .18);
    background: rgba(239, 68, 68, .10);
}
.filter-form label {
    margin: 0;
    font-size: .86rem;
}
.toolbar-actions {
    display: flex;
    gap: .5rem;
    align-items: center;
}
.bulk-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    margin-bottom: .75rem;
}
.bulk-controls {
    display: flex;
    gap: .5rem;
    align-items: center;
}
.bulk-controls select {
    min-width: 180px;
}
.table-count {
    margin: 0;
    color: var(--muted);
    font-size: .9rem;
}
.admin-table {
    border-collapse: separate;
    border-spacing: 0;
}
.admin-table th {
    background: rgba(255, 255, 255, .035);
    color: #d7d2e8;
    font-weight: 800;
    white-space: nowrap;
}
.admin-table th:first-child { border-radius: 12px 0 0 12px; }
.admin-table th:last-child { border-radius: 0 12px 12px 0; }
.admin-table td {
    color: #edeaf8;
}
.admin-table tr:hover td {
    background: rgba(255, 255, 255, .018);
}
.status-badge, .code-chip, .tag-mini {
    display: inline-flex;
    align-items: center;
    width: max-content;
    min-height: 1.72rem;
    padding: .22rem .55rem;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 800;
    border: 1px solid rgba(255, 255, 255, .10);
}
.status-published { color: #bbf7d0; background: rgba(34, 197, 94, .12); }
.status-draft { color: #fde68a; background: rgba(245, 158, 11, .12); }
.status-scheduled { color: #bfdbfe; background: rgba(59, 130, 246, .12); }
.status-hidden { color: #fecaca; background: rgba(239, 68, 68, .12); }
.code-chip {
    color: #ddd6fe;
    background: rgba(124, 58, 237, .12);
}
.tag-mini {
    color: #c4b5fd;
    background: rgba(167, 139, 250, .10);
    margin: .12rem;
}
.table-action {
    appearance: none;
    border: 0;
    background: transparent;
    color: #ddd6fe;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    padding: 0;
    text-decoration: none;
}
.table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
    align-items: center;
}
.inline-form {
    display: inline-flex;
    margin: 0;
}
.danger-link {
    color: #fca5a5;
}
.admin-pagination {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin-top: 1rem;
}
.admin-pagination a {
    min-width: 2.2rem;
    min-height: 2.2rem;
    display: grid;
    place-items: center;
    border-radius: 10px;
    border: 1px solid var(--line);
    text-decoration: none;
    color: var(--muted);
}
.admin-pagination a.active {
    color: white;
    background: var(--primary);
    border-color: var(--primary);
}
.empty-state {
    color: var(--muted);
    text-align: center;
    padding: 1.5rem;
}
.switch-inline {
    display: inline-flex;
    grid-template-columns: none;
    align-items: center;
    gap: .5rem;
    margin: 0;
    color: var(--muted);
}
.switch-inline input {
    width: auto;
}
.settings-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-bottom: 1rem;
}
.settings-tabs a {
    padding: .55rem .75rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    text-decoration: none;
    color: var(--muted);
    background: rgba(255, 255, 255, .025);
}
.settings-section {
    padding: 1rem 0;
    border-top: 1px solid var(--line);
}
.settings-section-head {
    margin-bottom: .9rem;
}
.settings-section-head p {
    margin: 0;
}
.setting-toggle {
    width: max-content;
    padding: .75rem .9rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, .025);
}
.security-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .75rem;
    margin-bottom: 1rem;
}
.security-grid div {
    padding: .85rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, .025);
}
.security-grid strong,
.security-grid span {
    display: block;
}
.security-grid span {
    color: var(--muted);
    margin-top: .25rem;
}

.plugin-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .85rem;
}
.plugin-card {
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .02)),
        rgba(255, 255, 255, .018);
}
.plugin-card-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: start;
    margin-bottom: .85rem;
}
.plugin-card h3 {
    margin-bottom: .35rem;
}
.plugin-card p {
    margin: 0;
}
.plugin-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .55rem;
    margin: 0 0 1rem;
}
.plugin-meta div {
    padding: .62rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, .025);
}
.plugin-meta dt {
    color: var(--muted);
    font-size: .76rem;
    font-weight: 800;
}
.plugin-meta dd {
    margin: .15rem 0 0;
    color: var(--text);
    overflow-wrap: anywhere;
}
.plugin-stats {
    margin-bottom: 1rem;
}
.plugin-list {
    display: grid;
    gap: .7rem;
}
.plugin-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    padding: .9rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .025);
}
.plugin-row-main {
    display: flex;
    gap: .85rem;
    align-items: flex-start;
    min-width: 0;
}
.plugin-icon {
    flex: 0 0 auto;
    width: 2.8rem;
    height: 2.8rem;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(124, 58, 237, .95), rgba(45, 212, 191, .62));
    color: white;
    font-weight: 900;
    font-size: .82rem;
    box-shadow: 0 12px 28px rgba(109, 40, 217, .24);
}
.plugin-title-line {
    display: flex;
    align-items: center;
    gap: .55rem;
    flex-wrap: wrap;
}
.plugin-title-line h3 {
    margin: 0;
}
.plugin-row p {
    margin: .25rem 0 .45rem;
}
.plugin-inline-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
}
.plugin-inline-meta span {
    padding: .18rem .5rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    font-size: .78rem;
    font-weight: 800;
}
.plugin-row-actions {
    display: flex;
    gap: .45rem;
    align-items: center;
}
.score-pill {
    display: inline-grid;
    place-items: center;
    min-width: 3.6rem;
    min-height: 2rem;
    padding: .25rem .6rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .10);
    font-weight: 900;
}
.score-good { color: #bbf7d0; background: rgba(34, 197, 94, .12); }
.score-warn { color: #fde68a; background: rgba(245, 158, 11, .12); }
.score-bad { color: #fecaca; background: rgba(239, 68, 68, .12); }
.check-list-mini {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
}
.check-list-mini span {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    min-height: 1.7rem;
    padding: .2rem .5rem;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 800;
    border: 1px solid rgba(255, 255, 255, .08);
}
.check-list-mini .passed {
    color: #bbf7d0;
    background: rgba(34, 197, 94, .10);
}
.check-list-mini .failed {
    color: #fecaca;
    background: rgba(239, 68, 68, .10);
}
.seo-pro-form {
    display: grid;
    gap: 1rem;
    margin-bottom: 1rem;
}
.seo-overview-grid {
    display: grid;
    grid-template-columns: minmax(420px, .92fr) minmax(420px, 1.08fr);
    gap: 1rem;
    align-items: stretch;
}
.seo-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 0;
}
.seo-stat-grid article,
.seo-index-panel {
    height: 100%;
}
.seo-index-panel {
    margin: 0;
}
.seo-settings-grid {
    display: grid;
    grid-template-columns: minmax(280px, 1.3fr) minmax(240px, .7fr);
    gap: 1rem;
    align-items: start;
}
.seo-settings-compact {
    display: grid;
    gap: .85rem;
}
.seo-settings-compact textarea {
    min-height: 150px;
    resize: vertical;
}
.seo-og-preview {
    display: block;
    width: min(100%, 360px);
    aspect-ratio: 1.91 / 1;
    margin-top: .8rem;
    border-radius: 14px;
    border: 1px solid var(--line);
    object-fit: cover;
    background: var(--surface-soft);
}
.redirect-table input,
.redirect-table select {
    min-width: 180px;
}
.panel-note {
    margin: 0;
    color: var(--muted);
    font-size: .9rem;
}
.security-grid.single {
    grid-template-columns: 1fr;
}

.media-upload-form {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) auto;
    gap: .75rem;
    align-items: end;
}
.media-upload-form .upload-drop {
    min-height: 72px;
    padding: .72rem .9rem;
}
.media-upload-form .upload-drop input {
    max-width: 100%;
}
.media-studio-toolbar {
    display: grid;
    gap: 1rem;
}
.media-studio-head {
    margin-bottom: 1.15rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--line);
}
.media-studio-head h1 {
    margin: .15rem 0 .3rem;
    font-size: clamp(2.3rem, 4vw, 4.25rem);
    letter-spacing: -.055em;
}
.media-studio-head .admin-subtitle {
    max-width: 680px;
    margin: 0;
}
.media-head-actions {
    display: flex;
    gap: .65rem;
    align-items: center;
}
.media-upload-panel {
    margin-bottom: 1rem;
    border-color: rgba(124, 58, 237, .3);
    background: linear-gradient(135deg, rgba(124, 58, 237, .10), rgba(34, 211, 238, .035));
}
.media-upload-panel[hidden] { display: none; }
.media-upload-intro {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: start;
    margin-bottom: .9rem;
}
.media-upload-intro p {
    margin: .25rem 0 0;
    color: var(--muted);
}
.media-command-bar {
    margin-bottom: 1rem;
    padding: .9rem;
}
.media-command-bar .filter-form {
    grid-template-columns: minmax(260px, 1.4fr) auto minmax(145px, .7fr) minmax(145px, .7fr) auto auto;
    gap: .65rem;
    align-items: end;
}
.media-command-bar label {
    gap: .34rem;
    font-size: .73rem;
    color: var(--muted);
}
.media-command-bar input,
.media-command-bar select {
    min-height: 2.65rem;
}
.media-command-bar .toolbar-actions {
    flex-wrap: nowrap;
}
.media-filter-pills {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}
.media-filter-pills legend {
    margin-bottom: .34rem;
    color: var(--muted);
    font-size: .73rem;
    font-weight: 800;
}
.media-filter-pills > div {
    display: flex;
    min-height: 2.65rem;
    padding: .22rem;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: var(--input);
}
.media-filter-pills button {
    min-width: 0;
    padding: .45rem .7rem;
    border: 0;
    border-radius: 10px;
    color: var(--muted);
    background: transparent;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    white-space: nowrap;
}
.media-filter-pills button:hover { color: var(--text); }
.media-filter-pills button.is-active {
    color: #fff;
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    box-shadow: 0 5px 14px rgba(124, 58, 237, .24);
}
.media-grid,
.media-picker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
    gap: 1rem;
}
.media-summary-strip {
    display: grid;
    grid-template-columns: 1.35fr repeat(4, 1fr);
    gap: .65rem;
    margin-bottom: 1.25rem;
}
.media-summary-strip article,
.media-summary-strip .media-stat-card {
    display: grid;
    align-content: center;
    min-height: 92px;
    padding: .85rem 1rem;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .02));
}
.media-summary-strip .media-stat-card {
    color: var(--text);
    text-decoration: none;
    transition: transform .16s ease, border-color .16s ease, background .16s ease;
}
.media-summary-strip .media-stat-card:hover {
    transform: translateY(-1px);
    border-color: rgba(167, 139, 250, .36);
}
.media-summary-strip .media-stat-warning.has-issue {
    border-color: rgba(245, 158, 11, .36);
    background: linear-gradient(135deg, rgba(245, 158, 11, .12), rgba(255, 255, 255, .02));
}
.media-summary-strip .media-stat-warning.has-issue strong { color: #f59e0b; }
.media-summary-strip .media-stat-danger.has-issue {
    border-color: rgba(248, 113, 113, .38);
    background: linear-gradient(135deg, rgba(248, 113, 113, .12), rgba(255, 255, 255, .02));
}
.media-summary-strip .media-stat-danger.has-issue strong { color: #f87171; }
.media-summary-strip span {
    display: block;
    margin-bottom: .18rem;
    color: var(--muted);
    font-size: .76rem;
    font-weight: 800;
}
.media-summary-strip strong {
    font-size: 1.35rem;
}
.media-summary-strip small {
    display: block;
    margin-top: .22rem;
    color: var(--muted);
    font-size: .7rem;
}
.media-studio-summary .media-score-card {
    border-color: rgba(45, 212, 191, .26);
    background: linear-gradient(135deg, rgba(45, 212, 191, .13), rgba(124, 58, 237, .08));
}
.media-summary-strip .media-health-meter {
    display: block;
    width: 100%;
    height: 5px;
    margin-top: .65rem;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, .09);
    font-size: 0;
}
.media-health-meter i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #2dd4bf, #8b5cf6);
}
.media-studio-actions {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1.1rem;
    padding-top: .2rem;
}
.media-studio-actions h2 { margin: 0 0 .18rem; font-size: 1.15rem; }
.media-studio-actions p { margin: 0; }
.media-studio-actions .table-count {
    max-width: 720px;
    color: var(--muted);
}
.media-card {
    position: relative;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, .025);
    overflow: hidden;
    transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}
.media-card-quick {
    position: absolute;
    z-index: 4;
    top: .55rem;
    left: .55rem;
    display: flex;
    gap: .38rem;
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity .16s ease, transform .16s ease;
}
.media-card:hover .media-card-quick,
.media-card:focus-within .media-card-quick {
    opacity: 1;
    transform: none;
}
.media-card-quick form { margin: 0; }
.media-card-quick button {
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 10px;
    color: #fff;
    background: rgba(15, 14, 23, .82);
    box-shadow: 0 8px 18px rgba(0, 0, 0, .24);
    cursor: pointer;
    backdrop-filter: blur(10px);
}
.media-card-quick button:hover { background: #7c3aed; }
.media-card-quick form button:hover { background: #b91c1c; }
.media-card-quick button.is-copied { color: #bbf7d0; background: #166534; }
.media-card-quick svg {
    width: 1rem;
    height: 1rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.media-selecting .media-card-quick { display: none; }
.media-card:hover,
.media-card:focus-within {
    border-color: rgba(167, 139, 250, .34);
    box-shadow: 0 16px 42px rgba(0, 0, 0, .22);
    transform: translateY(-1px);
}
.media-quality-warn {
    border-color: rgba(245, 158, 11, .22);
}
.media-quality-bad {
    border-color: rgba(248, 113, 113, .28);
}
.media-card-meta {
    display: grid;
    gap: .25rem;
    padding: .72rem .78rem .82rem;
}
.media-card-facts {
    display: flex;
    justify-content: space-between;
    gap: .5rem;
    color: var(--muted);
    font-size: .68rem;
}
.media-card-facts span {
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
}
.media-card-meta strong {
    font-size: .86rem;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.media-meta-chips {
    display: flex;
    flex-wrap: wrap;
    gap: .32rem;
    align-items: center;
}
.media-card-meta span,
.media-meta-chips span {
    width: fit-content;
    padding: .18rem .45rem;
    border: 1px solid rgba(167, 139, 250, .16);
    border-radius: 999px;
    color: #ddd6fe;
    background: rgba(124, 58, 237, .12);
    font-size: .72rem;
    font-weight: 800;
}
.media-card-meta .media-card-facts span {
    width: auto;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    color: var(--muted);
    font-size: .68rem;
    font-weight: 700;
}
.media-card-meta span.is-unused {
    color: #fde68a;
    border-color: rgba(245, 158, 11, .18);
    background: rgba(245, 158, 11, .10);
}
.media-meta-chips span.is-warning {
    color: #fecaca;
    border-color: rgba(248, 113, 113, .22);
    background: rgba(248, 113, 113, .11);
}
.media-card-meta .media-quality-badge {
    margin-left: auto;
    border-color: rgba(255, 255, 255, .14);
    color: var(--muted);
    background: rgba(255, 255, 255, .055);
}
.media-card-meta .media-quality-badge-good {
    color: #bbf7d0;
    border-color: rgba(34, 197, 94, .22);
    background: rgba(34, 197, 94, .10);
}
.media-card-meta .media-quality-badge-warn {
    color: #fde68a;
    border-color: rgba(245, 158, 11, .24);
    background: rgba(245, 158, 11, .11);
}
.media-card-meta .media-quality-badge-bad {
    color: #fecaca;
    border-color: rgba(248, 113, 113, .26);
    background: rgba(248, 113, 113, .11);
}
.media-thumb,
.media-picker-item {
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    text-align: left;
}
.media-thumb {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
}
.media-thumb img,
.media-picker-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.media-thumb > span {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    color: var(--muted);
    font-weight: 900;
}
.media-thumb small {
    position: absolute;
    inset: auto .55rem .55rem;
    padding: .45rem .55rem;
    border-radius: 12px;
    background: rgba(15, 14, 23, .82);
    color: white;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity .16s ease, transform .16s ease;
    overflow-wrap: anywhere;
}
.media-thumb:hover small {
    opacity: 1;
    transform: none;
}
.media-check {
    position: absolute;
    z-index: 2;
    top: .5rem;
    left: .5rem;
    width: auto;
    margin: 0;
    display: none;
}
.media-check input {
    width: 1.15rem;
    height: 1.15rem;
}
.media-selecting .media-check {
    display: block;
}
.media-bulk-action {
    display: none;
}
.media-selecting .media-bulk-action {
    display: inline-flex;
}
.media-selected-inline {
    display: none;
    color: var(--muted);
    font-size: .78rem;
    font-weight: 800;
    white-space: nowrap;
}
.media-selecting .media-selected-inline { display: inline-flex; align-items: center; }
.media-selection-dock {
    position: fixed;
    z-index: 85;
    left: 50%;
    bottom: max(1rem, env(safe-area-inset-bottom));
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    min-width: min(520px, calc(100vw - 2rem));
    padding: .72rem .78rem .72rem 1rem;
    border: 1px solid rgba(167, 139, 250, .3);
    border-radius: 18px;
    background: rgba(23, 22, 37, .94);
    box-shadow: 0 22px 54px rgba(0, 0, 0, .42);
    transform: translateX(-50%);
    backdrop-filter: blur(18px);
}
.media-selection-dock > div { display: flex; gap: .5rem; }
.media-selecting .media-selection-dock { display: flex; }
.media-selecting .admin-main { padding-bottom: 6rem; }
.media-detail-preview {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .025);
    margin-bottom: 1rem;
}
.media-detail-preview img {
    width: 100%;
    max-height: 56vh;
    object-fit: contain;
}
.media-meta-form {
    display: grid;
    gap: .7rem;
    margin: 1rem 0;
    padding: .8rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, .025);
}
.media-meta-form small {
    display: block;
    margin-top: .25rem;
    color: var(--muted);
    font-size: .76rem;
}
.media-process-form {
    display: grid;
    gap: .75rem;
    margin: 1rem 0;
    padding: .9rem;
    border: 1px solid rgba(34, 211, 238, .24);
    border-radius: var(--radius-sm);
    background: rgba(34, 211, 238, .045);
}
.media-process-head small {
    display: block;
    margin-top: .2rem;
    color: var(--muted);
}
.media-process-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .7rem;
}
.media-process-form output {
    float: right;
    color: var(--accent);
    font-weight: 800;
}
.media-process-form input[type="range"] {
    padding: 0;
}
.media-studio-note {
    margin: .7rem 0 0;
    padding: .7rem .8rem;
    border: 1px solid rgba(245, 158, 11, .22);
    border-radius: var(--radius-sm);
    color: #fde68a;
    background: rgba(245, 158, 11, .08);
}
.media-detail-dialog {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(680px, calc(100vw - 280px));
    height: 100dvh;
    max-height: none;
    margin: 0;
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 24px 0 0 24px;
    padding: 1.1rem;
    color: var(--text);
    background: var(--surface);
    box-shadow: -24px 0 70px rgba(0, 0, 0, .34);
}
.media-detail-dialog[open] {
    animation: media-drawer-in .22s cubic-bezier(.2, .8, .2, 1);
}
@keyframes media-drawer-in {
    from { transform: translateX(100%); opacity: .65; }
    to { transform: translateX(0); opacity: 1; }
}
.media-detail-dialog::backdrop {
    background: rgba(0, 0, 0, .16);
    backdrop-filter: none;
}
@media (max-width: 620px) {
    .media-process-grid { grid-template-columns: 1fr; }
}
.modal {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(0, 0, 0, .62);
    backdrop-filter: blur(10px);
}
.modal.is-open {
    display: flex;
}
.modal-panel {
    width: min(880px, 100%);
    max-height: min(760px, calc(100vh - 2rem));
    overflow: auto;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}
.media-picker-search {
    display: block;
    margin: .85rem 0;
}
.media-picker-item {
    display: grid;
    gap: .45rem;
    padding: .5rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, .025);
}
.media-picker-item img {
    aspect-ratio: 1 / 1;
    border-radius: 10px;
}
.media-picker-item span {
    color: var(--muted);
    font-size: .82rem;
    overflow-wrap: anywhere;
}
.media-picker-item small {
    color: var(--muted);
    font-size: .72rem;
    opacity: .82;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.menu-table input {
    min-width: 180px;
}
.menu-order {
    color: var(--muted);
    font-weight: 900;
}
.menu-tree {
    display: flex;
    flex-direction: column;
    gap: .6rem;
    margin: 1rem 0;
}
.menu-card {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .6rem;
    padding: .85rem 1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, .025);
}
.menu-card-children {
    display: flex;
    flex-direction: column;
    gap: .6rem;
    margin-left: 1.6rem;
    padding-left: 1rem;
    border-left: 2px solid rgba(167, 139, 250, .25);
}
.menu-card.is-child {
    background: rgba(167, 139, 250, .05);
}
.menu-card-info {
    display: flex;
    flex-direction: column;
    gap: .15rem;
    min-width: 0;
}
.menu-card-info strong {
    font-size: .95rem;
}
.menu-card-url {
    color: var(--muted);
    font-size: .78rem;
    font-family: monospace;
    overflow-wrap: anywhere;
}
.menu-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    align-items: center;
}
.menu-item-modal-panel {
    width: min(420px, 100%);
    display: flex;
    flex-direction: column;
    gap: .85rem;
}
.menu-item-modal-panel label {
    display: flex;
    flex-direction: column;
    gap: .3rem;
    font-weight: 700;
    font-size: .85rem;
    color: var(--muted);
}
.widget-modal-panel {
    width: min(560px, 100%);
}
.block-modal-panel {
    width: min(980px, calc(100vw - 2rem));
    max-height: min(860px, calc(100vh - 2rem));
    padding: 1.15rem;
}
.block-modal-panel .panel-head {
    position: sticky;
    top: -1.15rem;
    z-index: 2;
    margin: -1.15rem -1.15rem .2rem;
    padding: 1.15rem;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(180deg, var(--surface) 72%, rgba(25, 22, 38, .92));
    backdrop-filter: blur(14px);
}
.block-modal-panel label {
    gap: .45rem;
}
.block-modal-panel textarea {
    min-height: clamp(280px, 45vh, 560px);
    resize: vertical;
    line-height: 1.65;
    font-family: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    tab-size: 4;
}
.block-modal-panel [data-block-field-wrap="quote"] textarea,
.block-modal-panel [data-block-field-wrap="list"] textarea {
    min-height: clamp(220px, 34vh, 440px);
}
.block-modal-panel .actions:last-child {
    position: sticky;
    bottom: -1.15rem;
    z-index: 2;
    margin: .4rem -1.15rem -1.15rem;
    padding: 1rem 1.15rem;
    border-top: 1px solid var(--line);
    background: linear-gradient(0deg, var(--surface) 76%, rgba(25, 22, 38, .88));
    backdrop-filter: blur(14px);
}
@media (max-width: 760px) {
    #block-item-modal.modal {
        align-items: stretch;
        padding: .5rem;
    }
    .block-modal-panel {
        width: 100%;
        max-height: calc(100dvh - 1rem);
        border-radius: 18px;
    }
    .block-modal-panel textarea {
        min-height: 52vh;
    }
}
.widget-block {
    padding: 1.4rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .025);
}
.widget-title {
    margin: 0 0 .7rem;
    font-size: 1.05rem;
}
.widget-content {
    color: var(--muted);
}
.widget-cta-description {
    color: var(--muted);
    margin-bottom: .8rem;
}
.widget-entries {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: .8rem;
}
.widget-entry-link {
    display: flex;
    gap: .8rem;
    align-items: flex-start;
    text-decoration: none;
    color: inherit;
}
.widget-entry-thumb {
    flex: 0 0 auto;
    width: 64px;
    height: 64px;
    border-radius: 10px;
    overflow: hidden;
    background: rgba(255, 255, 255, .04);
}
.widget-entry-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.widget-entry-body {
    display: flex;
    flex-direction: column;
    gap: .2rem;
    min-width: 0;
}
.widget-entry-title {
    font-weight: 700;
    color: var(--text);
}
.widget-entry-link:hover .widget-entry-title {
    color: var(--accent, #a78bfa);
}
.widget-entry-excerpt {
    font-size: .82rem;
    color: var(--muted);
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.widget-entry-date {
    font-size: .74rem;
    color: var(--muted);
    opacity: .8;
}
.widget-chips {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
}
.widget-chip {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .5rem .85rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, .03);
    color: var(--text);
    text-decoration: none;
    font-weight: 650;
    font-size: .85rem;
}
.widget-chip:hover {
    border-color: rgba(167, 139, 250, .45);
    background: rgba(167, 139, 250, .1);
}
.widget-chip-link {
    font-weight: 600;
}
.homepage-widgets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.1rem;
}
.menu-actions {
    max-width: 520px;
}
.modal-close {
    float: right;
    border: 1px solid var(--line);
    border-radius: 999px;
    width: 2rem;
    height: 2rem;
    background: rgba(255, 255, 255, .04);
    color: var(--text);
    cursor: pointer;
}

.editor-head {
    align-items: flex-start;
}
.post-editor-form {
    display: block;
}
.post-editor-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
    gap: 1rem;
    align-items: start;
}
.editor-main {
    padding: 1.1rem;
}
.editor-sidebar {
    display: grid;
    gap: 1rem;
    position: sticky;
    top: 1rem;
}
.title-field input {
    min-height: 3.25rem;
    padding: .72rem .9rem;
    font-size: clamp(1.32rem, 2vw, 1.85rem);
    font-weight: 850;
    line-height: 1.18;
    letter-spacing: 0;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .02)),
        var(--bg);
    border-color: rgba(167, 139, 250, .20);
}
.field-help {
    color: var(--muted);
    font-size: .82rem;
    font-weight: 500;
}
.field-help.is-good { color: #86efac; }
.field-help.is-warn { color: #fde68a; }
.field-help.is-bad { color: #fca5a5; }
.field-help code {
    color: #ddd6fe;
    background: rgba(124, 58, 237, .10);
    border: 1px solid rgba(167, 139, 250, .12);
    border-radius: 8px;
    padding: .12rem .35rem;
    word-break: break-all;
}
.turnstile-box {
    padding: .75rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, .035);
}
.security-grid span code {
    display: inline-block;
    margin: .18rem .25rem .18rem 0;
}
.editor-block {
    margin-top: 1rem;
}
.toast-editor-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin-bottom: .75rem;
}
.editor-topbar-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: .45rem;
}
.editor-topbar-actions .button.is-active {
    border-color: rgba(167, 139, 250, .45);
    background: rgba(124, 58, 237, .22);
    color: #fff;
}
.toast-editor-topbar div {
    display: grid;
    gap: .15rem;
}
.toast-editor-topbar .editor-topbar-actions {
    display: flex;
    gap: .45rem;
}
.toast-editor-topbar strong {
    color: var(--text);
    font-size: 1rem;
}
.toast-editor-topbar span {
    color: var(--muted);
    font-size: .86rem;
    font-weight: 600;
}
.toast-editor-topbar em {
    color: #a78bfa;
    font-size: .78rem;
    font-style: normal;
    font-weight: 800;
}
.toast-editor-topbar em::before {
    content: "";
    display: inline-block;
    width: .55rem;
    height: .55rem;
    margin-right: .4rem;
    border: 2px solid rgba(167, 139, 250, .38);
    border-top-color: #c4b5fd;
    border-radius: 999px;
    vertical-align: -.08rem;
    animation: spin 850ms linear infinite;
}
.toast-editor-ready .toast-editor-topbar em::before,
.toast-editor-failed .toast-editor-topbar em::before {
    display: none;
}
.toast-editor-wrap {
    min-height: 520px;
}
.editor-autosave-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .75rem;
    margin: 0 0 .75rem;
    padding: .75rem;
    border: 1px solid rgba(167, 139, 250, .22);
    border-radius: 14px;
    background: rgba(124, 58, 237, .12);
}
.editor-autosave-card[hidden] {
    display: none;
}
.editor-autosave-card span {
    display: grid;
    gap: .15rem;
}
.editor-autosave-card small {
    color: var(--muted);
}
.editor-autosave-card > div {
    display: flex;
    gap: .45rem;
}
.toast-editor-block.toast-editor-ready .markdown-fallback {
    display: none;
}
.toast-editor-block:not(.toast-editor-ready) .toast-editor-wrap {
    min-height: 0;
}
.toast-editor-block.toast-editor-failed .toast-editor-wrap {
    display: none;
}
.toast-editor-block.toast-editor-ready .toast-editor-wrap {
    min-height: 520px;
}
.format-assist-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .6rem;
    padding: .72rem;
    margin-bottom: .75rem;
    border: 1px solid rgba(167, 139, 250, .18);
    border-radius: 16px;
    background:
        linear-gradient(135deg, rgba(124, 58, 237, .16), rgba(20, 184, 166, .10)),
        rgba(255, 255, 255, .035);
}
.format-group {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .34rem;
    padding-right: .55rem;
    border-right: 1px solid rgba(255, 255, 255, .10);
}
.format-group:last-of-type {
    border-right: 0;
}
.format-group > span,
.format-control {
    color: #ddd6fe;
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .02em;
}
.format-btn,
.format-control select {
    min-height: 2.42rem;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 11px;
    background: rgba(255, 255, 255, .07);
    color: #fff;
    font-weight: 800;
}
.format-btn {
    padding: 0 .72rem;
    cursor: pointer;
}
.format-icon {
    min-width: 2.45rem;
    display: inline-grid;
    place-items: center;
    font-size: .95rem;
    letter-spacing: -.02em;
}
.format-group-primary .format-icon {
    border-color: rgba(45, 212, 191, .18);
    background: rgba(8, 13, 28, .32);
}
.format-icon strong,
.format-icon em {
    color: inherit;
    font-size: 1.05rem;
    line-height: 1;
}
.format-btn:hover,
.format-btn:focus-visible,
.format-control select:hover,
.format-control select:focus-visible {
    border-color: rgba(45, 212, 191, .55);
    background: rgba(45, 212, 191, .15);
    outline: none;
}
.format-control {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
}
.format-control span {
    display: inline-grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, .08);
    color: #fff;
    font-weight: 900;
}
.format-control select {
    padding: 0 2rem 0 .75rem;
}
.format-control select option {
    background: #ffffff;
    color: #111827;
}
.toast-editor-block .toastui-editor-defaultUI {
    overflow: hidden;
    border: 1px solid rgba(167, 139, 250, .18);
    border-radius: 18px;
    background: #100f1b;
    color: var(--text);
    box-shadow: 0 18px 46px rgba(0, 0, 0, .24);
}
.toast-editor-block .toastui-editor-toolbar {
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .02)),
        #181626;
}
.toast-editor-block .toastui-editor-defaultUI-toolbar {
    gap: .25rem;
    min-height: 3.2rem;
    padding: .55rem;
    border-bottom: 0;
    background: transparent;
    overflow-x: auto;
    scrollbar-width: thin;
}
.toast-editor-block .toastui-editor-toolbar-group {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: .2rem;
    padding: 0 .35rem;
    border-right-color: rgba(255, 255, 255, .10);
}
.toast-editor-block .toastui-editor-toolbar-icons {
    width: 2.25rem;
    height: 2.25rem;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 10px;
    background-color: rgba(255, 255, 255, .055);
    filter: invert(1) opacity(.82);
}
.toast-editor-block .toastui-editor-toolbar-icons:hover,
.toast-editor-block .toastui-editor-toolbar-icons.active {
    border-color: rgba(167, 139, 250, .42);
    background-color: rgba(124, 58, 237, .35);
    filter: invert(1) opacity(1);
}
.toast-editor-block .toastui-editor-main,
.toast-editor-block .toastui-editor-md-container,
.toast-editor-block .toastui-editor-md-preview,
.toast-editor-block .toastui-editor-ww-container {
    background: #0d0c15;
    color: var(--text);
}
.toast-editor-block .toastui-editor-contents,
.toast-editor-block .toastui-editor-contents p,
.toast-editor-block .toastui-editor-contents li {
    color: #f4f2fb;
    font-size: 1rem;
    line-height: 1.75;
}
.toast-editor-block .toastui-editor-contents h1,
.toast-editor-block .toastui-editor-contents h2,
.toast-editor-block .toastui-editor-contents h3 {
    color: #fff;
    letter-spacing: 0;
}
.toast-editor-block .toastui-editor-contents blockquote {
    color: #ddd6fe;
    border-left-color: var(--primary-2);
    background: rgba(124, 58, 237, .12);
}
.toast-editor-block .ProseMirror,
.toast-editor-block .toastui-editor-md-splitter,
.toast-editor-block .toastui-editor-md-preview {
    color: var(--text);
}
.toast-editor-block .toastui-editor-md-container .toastui-editor,
.toast-editor-block .toastui-editor-md-container .toastui-editor textarea {
    color: #f8fafc;
    background: #0b0a12;
    font-family: Inter, system-ui, sans-serif;
    font-size: 1rem;
    line-height: 1.7;
}
.toast-editor-block .toastui-editor-mode-switch {
    border-top: 1px solid rgba(255, 255, 255, .08);
    background: #151323;
}
.toast-editor-block .toastui-editor-mode-switch .tab-item {
    color: var(--muted);
    background: transparent;
    border-color: transparent;
}
.toast-editor-block .toastui-editor-mode-switch .tab-item.active {
    color: #fff;
    border-color: rgba(167, 139, 250, .28);
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
}
.toast-editor-block .toastui-editor-popup,
.toast-editor-block .toastui-editor-popup-body,
.toast-editor-block .toastui-editor-dropdown-toolbar {
    border-color: rgba(167, 139, 250, .18);
    background: #181626;
    color: var(--text);
}
.toast-editor-block .toastui-editor-dropdown-toolbar button,
.toast-editor-block .toastui-editor-popup button,
.toast-editor-block .toastui-editor-popup-body button,
.toast-editor-block .toastui-editor-toolbar .toastui-editor-popup button {
    color: #f8fafc;
    background: transparent;
}
.toast-editor-block .toastui-editor-dropdown-toolbar button,
.toast-editor-block .toastui-editor-popup .toastui-editor-toolbar-icons,
.toast-editor-block .toastui-editor-popup-body .toastui-editor-toolbar-icons {
    filter: none;
}
.toast-editor-block .toastui-editor-dropdown-toolbar button,
.toast-editor-block .toastui-editor-dropdown-toolbar button span,
.toast-editor-block .toastui-editor-popup button,
.toast-editor-block .toastui-editor-popup button span {
    color: #f8fafc !important;
    opacity: 1 !important;
    text-shadow: none;
}
.toast-editor-block .toastui-editor-dropdown-toolbar button:hover,
.toast-editor-block .toastui-editor-popup button:hover,
.toast-editor-block .toastui-editor-popup-body button:hover {
    color: #ffffff;
    background: rgba(124, 58, 237, .28);
}
.toast-editor-block .toastui-editor-dropdown-toolbar button * ,
.toast-editor-block .toastui-editor-popup button * ,
.toast-editor-block .toastui-editor-popup-body button * {
    color: inherit;
}
.toast-editor-block .toastui-editor-popup input,
.toast-editor-block .toastui-editor-popup textarea {
    color: #fff;
    background: #0d0c15;
    border-color: rgba(167, 139, 250, .18);
}
.toast-editor-block .te-heading-add,
.toast-editor-block .te-heading-add .tui-popup-body {
    background: #111827 !important;
    color: #f8fafc !important;
}
.toast-editor-block .te-heading-add ul li,
.toast-editor-block .te-heading-add h1,
.toast-editor-block .te-heading-add h2,
.toast-editor-block .te-heading-add h3,
.toast-editor-block .te-heading-add h4,
.toast-editor-block .te-heading-add h5,
.toast-editor-block .te-heading-add h6,
.toast-editor-block .te-heading-add p {
    color: #f8fafc !important;
    opacity: 1 !important;
}
.toast-editor-block .te-heading-add ul li:hover {
    background: rgba(45, 212, 191, .18) !important;
}
.markdown-toolbar {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: .55rem;
    width: 100%;
    max-width: 100%;
    padding: .58rem;
    margin-bottom: .85rem;
    border: 1px solid var(--line);
    border-radius: 18px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .018)),
        rgba(15, 14, 27, .88);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 14px 34px rgba(0, 0, 0, .18);
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: thin;
}
.wordpad-toolbar {
    min-height: 3.75rem;
}
.toolbar-style-control {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: .5rem;
    margin: 0;
    color: #ede9fe;
    font-size: .78rem;
    font-weight: 850;
    white-space: nowrap;
}
.toolbar-style-control select {
    width: auto;
    min-width: 10.5rem;
    min-height: 2.45rem;
    margin: 0;
    padding: 0 2rem 0 .85rem;
    border-radius: 12px;
    border-color: rgba(167, 139, 250, .22);
    background-color: rgba(255, 255, 255, .055);
    color: #fff;
    font-size: .9rem;
    font-weight: 800;
}
.toolbar-group {
    display: flex;
    flex: 0 0 auto;
    gap: .35rem;
    padding: 0 .6rem;
    border-right: 1px solid var(--line);
}
.toolbar-group:last-child {
    border-right: 0;
}
.toolbar-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    min-width: auto;
    height: 2.45rem;
    padding: 0 .9rem;
    border: 1px solid rgba(255, 255, 255, .07);
    border-radius: 12px;
    background: rgba(255, 255, 255, .055);
    color: #e6e1f5;
    font-weight: 800;
    font-size: .88rem;
    letter-spacing: 0;
    cursor: pointer;
    line-height: 1;
    transition: background .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.toolbar-btn:hover,
.toolbar-btn:focus-visible {
    background: rgba(124, 58, 237, .18);
    border-color: rgba(167, 139, 250, .32);
    color: #fff;
    box-shadow: 0 10px 24px rgba(124, 58, 237, .18);
    outline: none;
}
.toolbar-btn.is-active,
.editor-block.is-split .toolbar-btn[data-md="side"],
.editor-block.is-fullscreen .toolbar-btn[data-md="fullscreen"] {
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    border-color: rgba(167, 139, 250, .44);
    color: #fff;
    box-shadow: 0 12px 28px rgba(109, 40, 217, .26);
}
.toolbar-btn:active {
    transform: scale(.97);
}
.toolbar-btn span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1em;
    white-space: nowrap;
}
.toolbar-italic {
    font-style: italic;
}
.toolbar-strike {
    text-decoration: line-through;
}
.toolbar-btn svg {
    display: block;
    width: 17px;
    height: 17px;
    flex: 0 0 17px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.editor-block.is-sticky-toolbar .markdown-toolbar {
    position: sticky;
    top: 0;
    z-index: 5;
    backdrop-filter: blur(6px);
}
.editor-meta {
    display: flex;
    justify-content: flex-end;
    gap: .75rem;
    margin: .4rem 0 .7rem;
    color: var(--muted);
    font-size: .8rem;
    font-weight: 700;
}
.editor-assist-card,
.editor-preview-card {
    padding: .85rem;
}
.editor-assist-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .55rem;
    margin-bottom: .85rem;
}
.editor-assist-grid div {
    display: grid;
    gap: .15rem;
    padding: .72rem;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, .025);
}
.editor-assist-grid strong {
    font-size: 1.35rem;
}
.editor-assist-grid span,
.editor-toc-box .field-help {
    color: var(--muted);
    font-size: .78rem;
}
.editor-toc-box {
    display: grid;
    gap: .45rem;
}
.editor-toc-box > strong {
    font-size: .86rem;
}
[data-editor-toc] {
    display: grid;
    gap: .35rem;
    max-height: 180px;
    overflow: auto;
}
.editor-toc-item {
    display: block;
    padding: .45rem .55rem;
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--muted);
    font-size: .82rem;
    font-weight: 800;
}
.editor-toc-item.level-3 {
    margin-left: .6rem;
    font-size: .78rem;
    opacity: .9;
}
.editor-device-preview {
    overflow: hidden;
    min-height: 300px;
    max-height: 480px;
    border: 1px solid rgba(167, 139, 250, .18);
    border-radius: 18px;
    background: #0f0e17;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .03);
}
.editor-device-preview.is-mobile {
    width: min(260px, 100%);
    margin-inline: auto;
    border-radius: 24px;
}
.editor-device-preview > div {
    max-height: 480px;
    overflow: auto;
    padding: 1rem;
}
.editor-device-preview h1,
.editor-device-preview h2,
.editor-device-preview h3 {
    max-width: none;
    margin: .75rem 0 .45rem;
    font-size: 1.08rem;
}
.editor-device-preview p,
.editor-device-preview li {
    color: var(--muted);
    font-size: .86rem;
    line-height: 1.65;
}
.editor-device-preview blockquote {
    margin: .8rem 0;
    padding: .7rem .8rem;
    border-left: 3px solid #7c3aed;
    border-radius: 0 12px 12px 0;
    background: rgba(124, 58, 237, .13);
}
.editor-device-preview img {
    max-width: 100%;
    border-radius: 12px;
}
.seo-coach-panel {
    overflow: hidden;
}
.seo-score-badge {
    display: inline-grid;
    place-items: center;
    min-width: 44px;
    height: 44px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, .04);
    color: #fff;
    font-weight: 900;
}
.seo-score-badge.is-good {
    color: #bbf7d0;
    border-color: rgba(34, 197, 94, .35);
    background: rgba(34, 197, 94, .15);
}
.seo-score-badge.is-warn {
    color: #fde68a;
    border-color: rgba(245, 158, 11, .35);
    background: rgba(245, 158, 11, .14);
}
.seo-score-badge.is-bad {
    color: #fecaca;
    border-color: rgba(239, 68, 68, .35);
    background: rgba(239, 68, 68, .13);
}
.content-intelligence-meters {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .5rem;
    margin: .8rem 0 .65rem;
}
.content-intelligence-meters article {
    padding: .65rem;
    border: 1px solid rgba(255, 255, 255, .09);
    border-radius: 16px;
    background:
        radial-gradient(circle at top right, rgba(45, 212, 191, .14), transparent 58%),
        rgba(255, 255, 255, .035);
}
.content-intelligence-meters span {
    display: block;
    color: var(--muted);
    font-size: .68rem;
    font-weight: 900;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.content-intelligence-meters strong {
    display: block;
    margin-top: .2rem;
    color: #fff;
    font-size: 1.05rem;
    line-height: 1;
}
.content-intelligence-focus {
    display: grid;
    gap: .45rem;
    margin: .65rem 0 .8rem;
}
.content-intelligence-focus span {
    display: block;
    padding: .65rem .72rem;
    border: 1px solid rgba(245, 158, 11, .22);
    border-radius: 14px;
    background:
        linear-gradient(135deg, rgba(245, 158, 11, .12), rgba(124, 58, 237, .08)),
        rgba(255, 255, 255, .035);
    color: var(--muted);
    font-size: .78rem;
    line-height: 1.45;
}
.content-intelligence-focus b {
    display: block;
    margin-bottom: .2rem;
    color: #fff7ed;
    font-size: .82rem;
}
.content-intelligence-focus .is-ok {
    border-color: rgba(34, 197, 94, .22);
    background: rgba(34, 197, 94, .08);
    color: #bbf7d0;
}
.seo-checklist {
    display: grid;
    gap: .4rem;
    margin: .75rem 0;
}
.seo-checklist span {
    padding: .48rem .55rem;
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--muted);
    font-size: .78rem;
    font-weight: 850;
}
.seo-checklist .is-ok {
    color: #bbf7d0;
    border-color: rgba(34, 197, 94, .22);
    background: rgba(34, 197, 94, .08);
}
.seo-checklist .is-missing {
    color: #fecaca;
    border-color: rgba(239, 68, 68, .22);
    background: rgba(239, 68, 68, .08);
}
.seo-preview-stack {
    display: grid;
    gap: .75rem;
}
.seo-serp-preview,
.seo-social-preview {
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, .035);
}
.seo-serp-preview {
    padding: .8rem;
}
.seo-serp-preview span {
    display: block;
    color: #86efac;
    font-size: .76rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.seo-serp-preview strong {
    display: block;
    margin: .22rem 0;
    color: #93c5fd;
    font-size: .98rem;
    line-height: 1.25;
}
.seo-serp-preview p,
.seo-social-preview small {
    margin: 0;
    color: var(--muted);
    font-size: .8rem;
    line-height: 1.45;
}
.seo-social-preview {
    display: grid;
    grid-template-columns: 84px 1fr;
    gap: .7rem;
    padding: .65rem;
    align-items: center;
}
.seo-social-preview div {
    display: grid;
    place-items: center;
    min-height: 68px;
    border-radius: 12px;
    background:
        linear-gradient(135deg, rgba(45, 212, 191, .28), rgba(124, 58, 237, .28)),
        rgba(255, 255, 255, .04);
    background-size: cover;
    background-position: center;
    color: #ccfbf1;
    font-weight: 900;
}
.seo-social-preview strong,
.seo-social-preview small {
    display: block;
}
.seo-social-preview strong {
    color: #fff;
    line-height: 1.25;
    margin-bottom: .2rem;
}
.editor-tabs {
    display: inline-flex;
    gap: .25rem;
    padding: .25rem;
    margin-bottom: .75rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, .035);
}
.editor-tabs button {
    min-height: 2.25rem;
    padding: .35rem .85rem;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    font-weight: 800;
    cursor: pointer;
}
.editor-tabs button.active {
    color: white;
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    box-shadow: 0 10px 24px rgba(109, 40, 217, .24);
}
.editor-pane {
    display: none;
}
.editor-pane.active {
    display: grid;
}
.editor-pane textarea {
    min-height: 520px;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: .96rem;
    line-height: 1.7;
    resize: vertical;
}
.editor-block.is-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: .85rem;
}
.editor-block.is-split .markdown-toolbar,
.editor-block.is-split .editor-tabs,
.editor-block.is-split .editor-meta {
    grid-column: 1 / -1;
}
.editor-block.is-split [data-editor-pane] {
    display: grid;
}
.editor-block.is-split .markdown-preview {
    margin-top: 1.45rem;
}
.markdown-preview {
    min-height: 520px;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg);
    color: var(--text);
}
.markdown-preview h1,
.markdown-preview h2,
.markdown-preview h3 {
    margin-top: 1.25rem;
}
.markdown-preview h1:first-child,
.markdown-preview h2:first-child,
.markdown-preview h3:first-child {
    margin-top: 0;
}
.markdown-preview p,
.markdown-preview li {
    color: #dedbed;
}
.markdown-preview blockquote {
    margin: 1rem 0;
    padding: .8rem 1rem;
    border-left: 3px solid var(--primary-2);
    border-radius: 0 12px 12px 0;
    background: rgba(124, 58, 237, .10);
    color: var(--muted);
}
.markdown-preview hr {
    border: 0;
    border-top: 1px solid var(--line);
    margin: 1.4rem 0;
}
.markdown-preview img {
    max-height: 420px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    margin: .8rem 0;
    object-fit: contain;
}
.markdown-preview code {
    background: var(--surface-2);
    border-radius: 6px;
    padding: .1rem .3rem;
}
.editor-block.is-fullscreen {
    position: fixed;
    inset: .75rem;
    z-index: 120;
    display: flex;
    flex-direction: column;
    padding: .9rem;
    border: 1px solid rgba(167, 139, 250, .25);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: 0 30px 90px rgba(0, 0, 0, .55);
}
.editor-block.is-fullscreen .editor-pane.active {
    flex: 1;
    min-height: 0;
}
.editor-block.is-fullscreen textarea,
.editor-block.is-fullscreen .markdown-preview {
    min-height: 0;
    height: 100%;
}
body.editor-fullscreen-open {
    overflow: hidden;
}
.publish-card {
    position: sticky;
    top: 1rem;
    z-index: 2;
    border-color: rgba(167, 139, 250, .18);
}
.panel-head.compact {
    margin-bottom: .65rem;
}
.panel-head.compact h2 {
    margin: 0;
    font-size: 1.08rem;
}
.editor-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .55rem;
    margin-top: .75rem;
}
.mobile-publish-bar {
    display: none;
}
.tag-editor,
.tag-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
}
.tag-editor {
    min-height: 2.4rem;
    padding: .55rem;
    border: 1px dashed rgba(167, 139, 250, .22);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, .025);
    margin-bottom: .75rem;
}
.tag-editor button,
.tag-suggestions button {
    border: 1px solid rgba(167, 139, 250, .16);
    border-radius: 999px;
    background: rgba(167, 139, 250, .11);
    color: #ddd6fe;
    min-height: 2rem;
    padding: .28rem .62rem;
    font-weight: 800;
    cursor: pointer;
}
.tag-editor button span {
    margin-left: .35rem;
    color: #fca5a5;
}
.tag-suggestions button {
    background: rgba(255, 255, 255, .035);
    color: var(--muted);
}
.upload-drop {
    min-height: 112px;
    place-content: center;
    text-align: center;
    padding: .9rem;
    border: 1px dashed rgba(167, 139, 250, .28);
    border-radius: var(--radius);
    background:
        radial-gradient(circle at 50% 0%, rgba(124, 58, 237, .15), transparent 65%),
        rgba(255, 255, 255, .025);
    cursor: pointer;
}
.upload-drop input {
    border: 0;
    padding: .5rem 0 0;
    background: transparent;
}
.upload-drop span {
    color: var(--muted);
    font-size: .82rem;
    font-weight: 500;
}
.upload-drop.is-dragging {
    border-color: #a78bfa;
    background: rgba(124, 58, 237, .12);
}
.image-preview {
    margin-top: .75rem;
    min-height: 140px;
    display: grid;
    place-items: center;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, .025);
    overflow: hidden;
    color: var(--muted);
}
.image-preview.has-image {
    min-height: 0;
}
.image-preview img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

/* Light theme contrast layer for frontend and admin surfaces. */
[data-theme="light"] {
    --surface: #ffffff;
    --surface-2: #f1f5f9;
    --text: #0f172a;
    --muted: #475569;
    --line: rgba(15, 23, 42, .16);
}

[data-theme="light"] body {
    background:
        linear-gradient(145deg, rgba(124, 58, 237, .09), transparent 34rem),
        linear-gradient(315deg, rgba(45, 212, 191, .08), transparent 26rem),
        #f8fafc;
}

[data-theme="light"] .site-header,
[data-theme="light"] .admin-sidebar {
    background: color-mix(in srgb, #ffffff 88%, transparent);
}

[data-theme="light"] .nav-links,
[data-theme="light"] .lang-switch,
[data-theme="light"] .nav-admin-link,
[data-theme="light"] .nav-search-link,
[data-theme="light"] .theme-toggle,
[data-theme="light"] .nav-toggle,
[data-theme="light"] .admin-sidebar .brand,
[data-theme="light"] .admin-site-switch,
[data-theme="light"] .admin-sidebar form .button {
    background: rgba(15, 23, 42, .035);
    border-color: rgba(15, 23, 42, .12);
}

[data-theme="light"] .nav-menu a,
[data-theme="light"] .nav-search-link,
[data-theme="light"] .admin-sidebar nav a,
[data-theme="light"] .lang-switch a,
[data-theme="light"] .admin-site-switch {
    color: #334155;
}

[data-theme="light"] .nav-links a:hover,
[data-theme="light"] .nav-links a[aria-current="page"],
[data-theme="light"] .admin-sidebar nav a:hover,
[data-theme="light"] .admin-sidebar nav a[aria-current="page"] {
    color: #0f172a;
    background: rgba(124, 58, 237, .10);
}

[data-theme="light"] .hero-mode-text .hero-copy,
[data-theme="light"] .hero-mode-text .hero-copy h1,
[data-theme="light"] .hero-mode-text .hero-copy p,
[data-theme="light"] .hero-mode-text .hero-copy [style] {
    color: #0f172a !important;
}

[data-theme="light"] .hero-mode-text .hero-copy > p:not(.eyebrow),
[data-theme="light"] .hero-mode-text .hero-copy p[style] {
    color: #475569 !important;
}

[data-theme="light"] .eyebrow {
    color: #0f766e !important;
}

[data-theme="light"] .hero-panel,
[data-theme="light"] .app-card,
[data-theme="light"] .post-card,
[data-theme="light"] .form-panel,
[data-theme="light"] .panel,
[data-theme="light"] .stat-grid article,
[data-theme="light"] .compact-item,
[data-theme="light"] .media-card,
[data-theme="light"] .media-picker-item,
[data-theme="light"] .check-row,
[data-theme="light"] .image-preview,
[data-theme="light"] .hero-image-preview,
[data-theme="light"] .media-detail-preview,
[data-theme="light"] .markdown-toolbar {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(248, 250, 252, .86)),
        #ffffff;
    border-color: rgba(15, 23, 42, .14);
    box-shadow: 0 18px 42px rgba(15, 23, 42, .08);
}

[data-theme="light"] .featured-hero-card {
    background:
        radial-gradient(circle at 78% 12%, rgba(167, 139, 250, .18), transparent 30%),
        radial-gradient(circle at 0% 100%, rgba(45, 212, 191, .10), transparent 34%),
        linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(248, 250, 252, .86)),
        #ffffff;
    border-color: rgba(124, 58, 237, .28);
    box-shadow: 0 24px 72px rgba(109, 40, 217, .16), 0 18px 42px rgba(15, 23, 42, .08);
}

[data-theme="light"] .featured-hero-card::before {
    background:
        linear-gradient(rgba(15, 23, 42, .045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 23, 42, .035) 1px, transparent 1px);
}

[data-theme="light"] .featured-hero-card h2,
[data-theme="light"] .featured-hero-card p,
[data-theme="light"] .feature-pills strong {
    color: #0f172a;
}

[data-theme="light"] .featured-hero-card p,
[data-theme="light"] .feature-pills span,
[data-theme="light"] .meta,
[data-theme="light"] .form-note,
[data-theme="light"] .table-sub,
[data-theme="light"] .compact-item small,
[data-theme="light"] .field-help,
[data-theme="light"] .table-count,
[data-theme="light"] .empty-state,
[data-theme="light"] .footer-links a,
[data-theme="light"] .footer-brand small,
[data-theme="light"] p {
    color: #475569;
}

[data-theme="light"] .article-content p,
[data-theme="light"] .article-content ul,
[data-theme="light"] .article-content ol,
[data-theme="light"] .reader-meta,
[data-theme="light"] .search-summary,
[data-theme="light"] .toc-empty,
[data-theme="light"] .reader-progress-card span {
    color: #475569;
}

[data-theme="light"] .article-content {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(248, 250, 252, .9)),
        #ffffff;
    border-color: rgba(15, 23, 42, .12);
    box-shadow: 0 24px 60px rgba(15, 23, 42, .08);
    color: #1e293b;
}

[data-theme="light"] .article-content h1,
[data-theme="light"] .article-content h2,
[data-theme="light"] .article-content h3 {
    color: #0f172a;
}

[data-theme="light"] .article-content h3 {
    color: #312e81;
}

[data-theme="light"] .article-content blockquote {
    background:
        linear-gradient(90deg, rgba(124, 58, 237, .12), rgba(124, 58, 237, .035)),
        #ffffff;
    color: #1e293b;
}

[data-theme="light"] .toc a {
    color: #64748b;
}

[data-theme="light"] .toc a:hover {
    color: #111827;
}

[data-theme="light"] .reader-progress-card {
    background: rgba(124, 58, 237, .075);
    border-color: rgba(124, 58, 237, .16);
}

[data-theme="light"] .toc-card {
    border-color: rgba(124, 58, 237, .18);
    background:
        radial-gradient(circle at 18% 0%, rgba(124, 58, 237, .12), transparent 9rem),
        linear-gradient(180deg, #ffffff, #f8fafc);
    box-shadow: 0 20px 45px rgba(15, 23, 42, .10);
}

[data-theme="light"] .toc-head {
    border-bottom-color: rgba(15, 23, 42, .08);
}

[data-theme="light"] .toc-head strong,
[data-theme="light"] .toc-link:hover,
[data-theme="light"] .toc-link.is-active {
    color: #111827;
}

[data-theme="light"] .toc-link {
    color: #475569;
}

[data-theme="light"] .toc-link:hover,
[data-theme="light"] .toc-link.is-active {
    border-color: rgba(124, 58, 237, .18);
    background: rgba(124, 58, 237, .08);
}

[data-theme="light"] .toc-index {
    background: rgba(124, 58, 237, .10);
}

[data-theme="light"] .toc-l3 .toc-title {
    color: #64748b;
}

[data-theme="light"] .reader-ad-card {
    background:
        radial-gradient(circle at 84% 12%, rgba(124, 58, 237, .16), transparent 34%),
        radial-gradient(circle at 10% 100%, rgba(45, 212, 191, .10), transparent 36%),
        linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(248, 250, 252, .88)),
        #ffffff;
    border-color: rgba(124, 58, 237, .18);
    box-shadow: 0 18px 42px rgba(15, 23, 42, .08);
}

[data-theme="light"] .reader-ad-card strong {
    color: #0f172a;
}

[data-theme="light"] .reader-ad-card small {
    color: #475569;
}

[data-theme="light"] .post-nav a {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(248, 250, 252, .86)),
        #ffffff;
}

[data-theme="light"] .reader-progress-card strong {
    color: #6d28d9;
}

[data-theme="light"] .feature-pills span {
    background: rgba(15, 23, 42, .035);
    border-color: rgba(15, 23, 42, .10);
}

[data-theme="light"] .toast-editor-block .toastui-editor-defaultUI,
[data-theme="light"] .toast-editor-block .toastui-editor-main,
[data-theme="light"] .toast-editor-block .toastui-editor-md-container,
[data-theme="light"] .toast-editor-block .toastui-editor-md-preview,
[data-theme="light"] .toast-editor-block .toastui-editor-ww-container {
    background: #ffffff;
    color: #111827;
}
[data-theme="light"] .toast-editor-block .toastui-editor-toolbar,
[data-theme="light"] .toast-editor-block .toastui-editor-mode-switch {
    background: #f8fafc;
}
[data-theme="light"] .format-assist-toolbar {
    border-color: rgba(79, 70, 229, .14);
    background:
        linear-gradient(135deg, rgba(79, 70, 229, .08), rgba(20, 184, 166, .07)),
        #ffffff;
}
[data-theme="light"] .format-group > span,
[data-theme="light"] .format-control {
    color: #4338ca;
}
[data-theme="light"] .format-btn,
[data-theme="light"] .format-control select {
    border-color: rgba(15, 23, 42, .12);
    background: #ffffff;
    color: #111827;
}
[data-theme="light"] .format-btn:hover,
[data-theme="light"] .format-btn:focus-visible,
[data-theme="light"] .format-control select:hover,
[data-theme="light"] .format-control select:focus-visible {
    border-color: rgba(79, 70, 229, .35);
    background: #eef2ff;
}
[data-theme="light"] .toast-editor-block .toastui-editor-popup,
[data-theme="light"] .toast-editor-block .toastui-editor-popup-body,
[data-theme="light"] .toast-editor-block .toastui-editor-dropdown-toolbar {
    background: #ffffff;
    color: #111827;
}
[data-theme="light"] .toast-editor-block .toastui-editor-dropdown-toolbar button,
[data-theme="light"] .toast-editor-block .toastui-editor-popup button,
[data-theme="light"] .toast-editor-block .toastui-editor-popup-body button {
    color: #111827 !important;
    opacity: 1 !important;
    text-shadow: none;
}
[data-theme="light"] .toast-editor-block .toastui-editor-dropdown-toolbar button:hover,
[data-theme="light"] .toast-editor-block .toastui-editor-popup button:hover,
[data-theme="light"] .toast-editor-block .toastui-editor-popup-body button:hover {
    background: #ede9fe;
    color: #4c1d95;
}
[data-theme="light"] .toast-editor-block .toastui-editor-contents,
[data-theme="light"] .toast-editor-block .toastui-editor-contents p,
[data-theme="light"] .toast-editor-block .toastui-editor-contents li,
[data-theme="light"] .toast-editor-block .toastui-editor-contents h1,
[data-theme="light"] .toast-editor-block .toastui-editor-contents h2,
[data-theme="light"] .toast-editor-block .toastui-editor-contents h3,
[data-theme="light"] .toast-editor-block .ProseMirror {
    color: #111827;
}
[data-theme="light"] .toast-editor-block .toastui-editor-toolbar-icons {
    filter: none;
    background-color: #fff;
}
[data-theme="light"] .editor-device-preview {
    background: #ffffff;
}
[data-theme="light"] .editor-device-preview p,
[data-theme="light"] .editor-device-preview li,
[data-theme="light"] .editor-assist-grid span,
[data-theme="light"] .editor-toc-item {
    color: #475569;
}

[data-theme="light"] .feature-pills i,
[data-theme="light"] .admin-sidebar nav a .nav-icon,
[data-theme="light"] .admin-sidebar form .button .nav-icon,
[data-theme="light"] .admin-site-switch .nav-icon {
    background: rgba(124, 58, 237, .13);
    color: #6d28d9;
}

[data-theme="light"] .toolbar-btn,
[data-theme="light"] .tag-editor,
[data-theme="light"] .tag-suggestions button,
[data-theme="light"] .upload-drop {
    background: rgba(15, 23, 42, .035);
    border-color: rgba(15, 23, 42, .12);
    color: #0f172a;
}

[data-theme="light"] .button-secondary,
[data-theme="light"] .button-ghost {
    background: rgba(124, 58, 237, .07);
    color: #1f2937;
    border-color: rgba(124, 58, 237, .22);
}

[data-theme="light"] .button-secondary:hover,
[data-theme="light"] .button-ghost:hover {
    background: rgba(124, 58, 237, .13);
    color: #111827;
    border-color: rgba(124, 58, 237, .34);
}

[data-theme="light"] input,
[data-theme="light"] textarea,
[data-theme="light"] select {
    background: #ffffff;
    color: #0f172a;
    border-color: rgba(15, 23, 42, .16);
}

[data-theme="light"] input::placeholder,
[data-theme="light"] textarea::placeholder {
    color: #64748b;
}

[data-theme="light"] .admin-table th {
    background: rgba(15, 23, 42, .045);
    color: #334155;
}

[data-theme="light"] .admin-table td,
[data-theme="light"] td,
[data-theme="light"] label,
[data-theme="light"] .markdown-preview,
[data-theme="light"] .markdown-preview p,
[data-theme="light"] .markdown-preview li,
[data-theme="light"] .footer-links strong,
[data-theme="light"] .admin-subtitle {
    color: #0f172a;
}

[data-theme="light"] .admin-table tr:hover td {
    background: rgba(124, 58, 237, .045);
}

[data-theme="light"] .status-badge,
[data-theme="light"] .code-chip,
[data-theme="light"] .tag-mini,
[data-theme="light"] .score-pill,
[data-theme="light"] .check-list-mini span {
    border-color: rgba(15, 23, 42, .12);
}

[data-theme="light"] .status-published,
[data-theme="light"] .score-good,
[data-theme="light"] .check-list-mini .passed {
    color: #166534;
    background: rgba(34, 197, 94, .12);
}

[data-theme="light"] .status-draft,
[data-theme="light"] .score-warn {
    color: #92400e;
    background: rgba(245, 158, 11, .14);
}

[data-theme="light"] .status-hidden,
[data-theme="light"] .score-bad,
[data-theme="light"] .check-list-mini .failed {
    color: #991b1b;
    background: rgba(239, 68, 68, .12);
}

[data-theme="light"] .code-chip,
[data-theme="light"] .tag-mini,
[data-theme="light"] .table-action,
[data-theme="light"] .read-link,
[data-theme="light"] .field-help code {
    color: #5b21b6;
}

[data-theme="light"] .site-footer {
    background:
        radial-gradient(circle at 12% 0%, rgba(124, 58, 237, .08), transparent 28rem),
        #ffffff;
}

@media (max-width: 1400px) {
    .media-command-bar .filter-form {
        grid-template-columns: minmax(240px, 1.5fr) repeat(2, minmax(140px, 1fr));
    }
    .media-command-bar .toolbar-actions {
        align-self: end;
    }
}

@media (max-width: 1024px) {
    :root { --container: 920px; }
    .hero-grid {
        grid-template-columns: minmax(0, 1fr) minmax(280px, .88fr);
        gap: 1.2rem;
    }
    .card-grid, .post-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .stat-grid-wide {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .system-summary-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .admin-body {
        grid-template-columns: 248px minmax(0, 1fr);
    }
    .media-detail-dialog {
        width: min(640px, calc(100vw - 248px));
    }
}

@media (max-width: 860px) {
    body {
        background:
            radial-gradient(circle at 50% -8%, rgba(124, 58, 237, .28), transparent 34rem),
            linear-gradient(180deg, #0f0e17, #11101d 40%, #0f0e17);
    }
    h1 { font-size: 2.62rem; max-width: 11ch; }
    h2 { font-size: 1.72rem; }
    p { line-height: 1.6; }
    .container { width: min(var(--container), calc(100% - 1.25rem)); }
    .site-header {
        background: rgba(15, 14, 23, .78);
        backdrop-filter: blur(18px) saturate(150%);
    }
    .nav { min-height: 64px; }
    .brand-mark {
        width: 2.15rem;
        height: 2.15rem;
        border-radius: 12px;
    }
    .nav-toggle {
        position: fixed;
        top: max(.72rem, env(safe-area-inset-top));
        right: max(.72rem, env(safe-area-inset-right));
        z-index: 90;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: rgba(23, 22, 37, .92);
        backdrop-filter: blur(14px);
        box-shadow: 0 12px 26px rgba(0, 0, 0, .28);
    }
    .nav-menu {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        left: auto;
        z-index: 80;
        height: 100vh;
        height: 100svh;
        width: min(86vw, 360px);
        max-width: calc(100dvw - .75rem);
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        padding: 5.25rem 1rem 1rem;
        background:
            radial-gradient(circle at 30% 0%, rgba(124, 58, 237, .22), transparent 18rem),
            rgba(23, 22, 37, .98);
        backdrop-filter: blur(22px);
        border-left: 1px solid var(--line);
        box-shadow: -28px 0 60px rgba(0, 0, 0, .36);
        transform: translate3d(100%, 0, 0);
        transition: transform .22s ease;
        will-change: transform;
        overflow-y: auto;
        overscroll-behavior: contain;
    }
    .nav-menu.is-open { transform: translate3d(0, 0, 0); }
    body.nav-open::before {
        content: "";
        position: fixed;
        inset: 0;
        z-index: 43;
        background: rgba(0, 0, 0, .56);
        backdrop-filter: blur(5px);
    }
    body.nav-open {
        overflow: hidden;
        touch-action: none;
        overscroll-behavior: contain;
    }
    .nav-links,
    .nav-actions {
        display: grid;
        align-items: stretch;
        gap: .45rem;
    }
    .nav-links {
        padding: .35rem;
        border-radius: 22px;
    }
    .nav-links a,
    .nav-search-link,
    .nav-admin-link {
        min-height: 3rem;
        display: flex;
        align-items: center;
        border-radius: 16px;
    }
    .nav-links a::after { display: none; }
    .lang-switch {
        justify-content: center;
        width: max-content;
    }
    .hero-grid, .card-grid, .post-grid, .split, .auth-shell, .article-layout, .form-grid, .app-editor-form, .hero-admin-layout, .hero-admin-main, .hero-image-tools, .hero-slider-admin-list, .form-grid.four { grid-template-columns: 1fr; }
    .app-editor-side { position: static; }
    .app-editor-actions { grid-template-columns: 1fr; }
    .hero-admin-side { position: static; }
    .hero { padding: 3.25rem 0 1.6rem; }
    .hero-copy p { font-size: 1rem; }
    .hero-banner {
        min-height: var(--hero-banner-mobile-height, 420px);
        border-radius: 18px;
    }
    .hero-banner-copy {
        inset: auto 1rem 1rem;
    }
    .actions { gap: .55rem; }
    .button {
        min-height: 2.85rem;
        padding-inline: .9rem;
    }
    .hero-panel {
        min-height: 0;
        margin-top: .3rem;
    }
    .featured-hero-card {
        padding: 1rem;
        border-radius: 20px;
    }
    .featured-icon {
        width: 72px;
        height: 72px;
        border-radius: 20px;
        margin: .9rem 0 .65rem;
    }
    .featured-icon svg { width: 44px; height: 44px; }
    .feature-pills {
        grid-template-columns: 1fr;
        gap: .48rem;
    }
    .feature-pills span {
        min-height: 48px;
        padding: .54rem .62rem;
    }
    .section, .page-hero { padding: 1.9rem 0; }
    .page-hero h1 { font-size: 2.15rem; max-width: 13ch; }
    .section-head { margin-bottom: .9rem; }
    .card-grid, .post-grid { gap: .75rem; }
    .app-card, .post-card {
        padding: .72rem;
        border-radius: 20px;
    }
    .app-shot {
        min-height: 132px;
        border-radius: 17px;
        margin-bottom: .72rem;
    }
    .app-shot svg { width: 48px; height: 48px; }
    .card-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: .5rem;
    }
    .card-actions .button { width: 100%; }
    .post-thumb { border-radius: 17px; }
    .post-card .meta {
        align-items: flex-start;
        flex-direction: column;
        gap: .45rem;
    }
    .filter-row {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: .25rem;
        scrollbar-width: none;
    }
    .filter-row::-webkit-scrollbar { display: none; }
    .filter-row a { flex: 0 0 auto; }
    .article-layout {
        padding: 1.65rem 0 2.4rem;
        gap: 1.15rem;
    }
    .article-head h1 {
        max-width: none;
        font-size: clamp(1.85rem, 9vw, 2.55rem);
        line-height: 1.1;
    }
    .reader-meta {
        font-size: .9rem;
    }
    .cover {
        max-height: 320px;
        border-radius: 18px;
        margin-top: .65rem;
    }
    .article-content {
        padding: 1rem;
        border-radius: 20px;
        font-size: 1rem;
        line-height: 1.78;
    }
    .article-content h1 {
        font-size: 1.55rem;
    }
    .article-content h2 {
        font-size: 1.28rem;
    }
    .article-content h3 {
        font-size: 1.12rem;
    }
    .article-content ul,
    .article-content ol {
        padding-left: 1.15rem;
    }
    .toc {
        position: static;
        grid-column: 1;
        grid-row: auto;
        padding: 0;
    }
    .reader-aside {
        gap: .75rem;
    }
    .toc-card {
        border-radius: 22px;
    }
    .toc-head {
        padding: .95rem .95rem .75rem;
    }
    .toc-list {
        max-height: none;
        padding: .5rem;
    }
    .toc-link {
        grid-template-columns: 2rem minmax(0, 1fr);
        padding: .75rem .65rem;
    }
    .toc-title {
        font-size: .95rem;
    }
    .toc-l3 {
        margin-left: .35rem;
    }
    .reader-ad-stack {
        display: none;
    }
    .post-nav,
    .related-grid,
    .compact-app-grid,
    .site-search-form {
        grid-template-columns: 1fr;
    }
    .post-nav a,
    .post-nav-next {
        grid-template-columns: 82px minmax(0, 1fr);
    }
    .post-nav img,
    .post-nav i {
        grid-column: 1;
        width: 82px;
        height: 76px;
    }
    .reader-actions .button,
    .site-search-form .button {
        width: 100%;
    }
    .admin-body { display: block; min-height: 100vh; }
    .admin-drawer-toggle {
        position: sticky;
        top: .65rem;
        left: .75rem;
        z-index: 75;
        display: inline-flex;
        align-items: center;
        gap: .45rem;
        min-height: 2.55rem;
        margin: .65rem 0 0 .75rem;
        padding: .45rem .75rem;
        border: 1px solid rgba(167, 139, 250, .22);
        border-radius: 999px;
        background: rgba(23, 22, 37, .88);
        color: var(--text);
        font-weight: 850;
        box-shadow: 0 14px 28px rgba(0, 0, 0, .26);
        backdrop-filter: blur(16px);
    }
    .admin-drawer-toggle .nav-icon {
        width: 1rem;
        height: 1rem;
    }
    .admin-drawer-backdrop {
        position: fixed;
        inset: 0;
        z-index: 94;
        display: block;
        background: rgba(0, 0, 0, .58);
        opacity: 0;
        pointer-events: none;
        transition: opacity .18s ease;
        backdrop-filter: blur(5px);
    }
    .admin-sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 95;
        width: min(86vw, 320px);
        height: 100dvh;
        transform: translateX(-105%);
        transition: transform .22s ease;
        box-shadow: 26px 0 60px rgba(0, 0, 0, .38);
    }
    .admin-nav-open .admin-sidebar {
        transform: translateX(0);
    }
    .admin-nav-open .admin-drawer-backdrop {
        opacity: 1;
        pointer-events: auto;
    }
    .admin-nav-open {
        overflow: hidden;
    }
    [data-theme="light"] body {
        background:
            linear-gradient(145deg, rgba(124, 58, 237, .09), transparent 34rem),
            linear-gradient(315deg, rgba(45, 212, 191, .08), transparent 26rem),
            #f8fafc;
    }
    [data-theme="light"] .admin-drawer-toggle,
    [data-theme="light"] .mobile-publish-bar {
        background: rgba(255, 255, 255, .92);
        color: #0f172a;
        border-color: rgba(15, 23, 42, .14);
    }
    .admin-main { padding: .9rem 1rem 6rem; }
    .stat-grid-wide { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .system-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .admin-grid-two { grid-template-columns: 1fr; }
    .system-check-item,
    .system-path-item {
        align-items: flex-start;
        flex-direction: column;
    }
    .post-editor-layout { grid-template-columns: 1fr; }
    .editor-sidebar, .publish-card { position: static; }
    .editor-main { padding: .78rem; }
    .title-field input {
        min-height: 2.9rem;
        font-size: 1.18rem;
    }
    .toast-editor-topbar {
        align-items: stretch;
        flex-direction: column;
    }
    .editor-topbar-actions {
        justify-content: stretch;
    }
    .toast-editor-topbar .button {
        width: 100%;
    }
    .editor-autosave-card {
        align-items: stretch;
        flex-direction: column;
    }
    .editor-autosave-card > div {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
    .toast-editor-wrap,
    .toast-editor-block .toastui-editor-defaultUI {
        min-height: 450px;
    }
    .toast-editor-block .toastui-editor-defaultUI-toolbar {
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: .4rem;
        min-height: 3.75rem;
        padding: .65rem .5rem;
        scrollbar-width: none;
    }
    .toast-editor-block .toastui-editor-defaultUI-toolbar::-webkit-scrollbar { display: none; }
    .toast-editor-block .toastui-editor-toolbar {
        position: sticky;
        top: .5rem;
        z-index: 20;
    }
    .toast-editor-block .toastui-editor-toolbar-icons {
        width: 2.75rem;
        min-width: 2.75rem;
        height: 2.75rem;
        margin: .125rem .25rem;
    }
    .toast-editor-block .toastui-editor-contents,
    .toast-editor-block .toastui-editor-contents p,
    .toast-editor-block .toastui-editor-contents li,
    .toast-editor-block .ProseMirror,
    .toast-editor-block .toastui-editor-md-container .toastui-editor,
    .toast-editor-block .toastui-editor-md-container .toastui-editor textarea {
        line-height: 1.85;
    }
    .markdown-toolbar {
        position: sticky;
        top: .5rem;
        z-index: 4;
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: none;
        border-radius: 14px;
        padding: .55rem;
        gap: .45rem;
    }
    .markdown-toolbar::-webkit-scrollbar { display: none; }
    .toolbar-style-control {
        flex-direction: column;
        align-items: flex-start;
        gap: .25rem;
        font-size: .72rem;
    }
    .toolbar-style-control select {
        min-width: 9.75rem;
        min-height: 2.55rem;
        font-size: .86rem;
    }
    .toolbar-group {
        flex: 0 0 auto;
        gap: .3rem;
        padding: 0 .38rem;
    }
    .toolbar-btn {
        flex: 0 0 auto;
        min-width: auto;
        height: 2.55rem;
        padding: 0 .86rem;
        font-size: .84rem;
    }
    .editor-tabs {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
        border-radius: 14px;
    }
    .editor-tabs button {
        border-radius: 11px;
    }
    .editor-block.is-split {
        grid-template-columns: 1fr;
    }
    .editor-block.is-split .markdown-preview {
        margin-top: 0;
    }
    .editor-pane textarea, .markdown-preview { min-height: max(450px, 52vh); }
    .editor-actions { grid-template-columns: 1fr; }
    .publish-card .editor-actions {
        display: none;
    }
    .mobile-publish-bar {
        position: fixed;
        left: .75rem;
        right: .75rem;
        bottom: max(.75rem, env(safe-area-inset-bottom));
        z-index: 70;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: .55rem;
        padding: .55rem;
        border: 1px solid rgba(167, 139, 250, .24);
        border-radius: 18px;
        background: rgba(23, 22, 37, .92);
        box-shadow: 0 18px 42px rgba(0, 0, 0, .36);
        backdrop-filter: blur(18px);
    }
    .filter-form, .user-filter-form { grid-template-columns: 1fr; }
    .seo-overview-grid { grid-template-columns: 1fr; }
    .toolbar-actions, .bulk-row, .bulk-controls { align-items: stretch; flex-direction: column; }
    .bulk-controls select, .toolbar-actions .button, .bulk-controls .button { width: 100%; }
    .media-upload-form { grid-template-columns: 1fr; }
    .media-studio-head, .media-upload-intro { align-items: stretch; }
    .media-head-actions { width: 100%; }
    .media-head-actions .button { flex: 1; }
    .media-command-bar .filter-form { grid-template-columns: 1fr; }
    .media-filter-pills > div { width: 100%; }
    .media-filter-pills button { flex: 1; }
    .media-summary-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .media-studio-actions { align-items: stretch; flex-direction: column; }
    .media-grid { grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); }
    .media-detail-dialog {
        width: min(620px, 100vw);
        border-radius: 20px 0 0 20px;
    }
    .security-grid { grid-template-columns: 1fr; }
    .seo-settings-grid { grid-template-columns: 1fr; }
    .plugin-grid { grid-template-columns: 1fr; }
    .plugin-card-head { flex-direction: column; }
    .plugin-meta { grid-template-columns: 1fr; }
    .plugin-row, .plugin-row-main, .plugin-row-actions {
        align-items: stretch;
        flex-direction: column;
    }
.plugin-row-actions .button,
    .plugin-row-actions form {
        width: 100%;
    }
    .settings-tabs { overflow-x: auto; flex-wrap: nowrap; padding-bottom: .25rem; }
    .settings-tabs a { flex: 0 0 auto; }
    .footer-grid {
        display: flex;
        align-items: start;
        flex-direction: column;
    }
    .footer-groups {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        justify-content: stretch;
        gap: 1.25rem;
    }
    .section-head, .admin-head { align-items: start; flex-direction: column; }
}

@media (hover: none) {
    .media-card-quick {
        opacity: 1;
        transform: none;
    }
}

@media (max-width: 620px) {
    .media-detail-dialog {
        width: 100vw;
        border-radius: 0;
    }
    .media-selection-dock {
        gap: .65rem;
        min-width: calc(100vw - 1rem);
        padding-left: .75rem;
    }
    .media-selection-dock > div { gap: .35rem; }
}

@media (max-width: 420px) {
    h1 { font-size: 2.32rem; }
    .hero { padding-top: 2.65rem; }
    .hero-copy .actions { grid-template-columns: 1fr; display: grid; }
    .hero-copy .actions .button { width: 100%; }
    .footer-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem; }
    .footer-links { min-width: 0; }
    .featured-hero-card h2 { font-size: 2.15rem; }
    .app-card h2, .app-card h3 { font-size: 1.22rem; }
    .post-card h2, .post-card h3 { font-size: 1.08rem; }
    .admin-main { padding-inline: .75rem; }
    .admin-head h1 { font-size: 2.1rem; }
    .seo-stat-grid { grid-template-columns: 1fr; }
    .editor-block.is-fullscreen {
        inset: .35rem;
        padding: .6rem;
        border-radius: 16px;
    }
    .mobile-publish-bar {
        left: .5rem;
        right: .5rem;
        grid-template-columns: 1fr 1fr;
    }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
    .reveal { opacity: 1 !important; transform: none !important; }
}

.install-panel {
    border-color: rgba(45, 212, 191, 0.22);
    background: linear-gradient(135deg, rgba(45, 212, 191, 0.08), rgba(124, 58, 237, 0.12)), var(--panel);
}

.upload-inline-form {
    display: flex;
    gap: 0.85rem;
    align-items: center;
    flex-wrap: wrap;
}

.upload-inline-form input[type="file"] {
    min-width: min(100%, 360px);
    padding: 0.85rem 1rem;
    border: 1px dashed rgba(255, 255, 255, 0.18);
    border-radius: 1rem;
    background: rgba(10, 8, 18, 0.72);
    color: var(--text);
}

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

.theme-card {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1.3rem;
    background: rgba(18, 16, 30, 0.84);
    box-shadow: var(--shadow-soft);
}

.theme-card.is-active {
    border-color: rgba(45, 212, 191, 0.45);
    box-shadow: 0 0 0 1px rgba(45, 212, 191, 0.18), var(--shadow-soft);
}

.theme-preview {
    aspect-ratio: 16 / 9;
    background: radial-gradient(circle at 25% 20%, rgba(45, 212, 191, 0.22), transparent 34%), #0f0b1f;
}

.theme-preview img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.theme-preview-fallback {
    display: grid;
    min-height: 220px;
    place-items: center;
    font-size: clamp(2.2rem, 7vw, 5rem);
    font-weight: 900;
    color: rgba(255, 255, 255, 0.86);
}

.theme-card-body {
    padding: 1.1rem;
}

.theme-card-body p {
    margin: 0.65rem 0 0;
    color: var(--muted);
}

.theme-supports {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 0.9rem;
}

.theme-supports span {
    padding: 0.34rem 0.55rem;
    border-radius: 999px;
    background: rgba(124, 58, 237, 0.18);
    color: var(--muted-strong);
    font-size: 0.78rem;
    font-weight: 800;
}

.theme-actions {
    display: flex;
    gap: 0.55rem;
    flex-wrap: wrap;
    align-items: center;
    padding: 0 1.1rem 1.1rem;
}

.theme-preset-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.9rem;
    margin: 1rem 0 1.15rem;
}

.theme-studio-actions {
    display: flex;
    gap: 0.7rem;
    align-items: center;
    flex-wrap: wrap;
}

.theme-preset-card {
    display: grid;
    gap: 1rem;
    align-content: space-between;
    min-height: 170px;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1.15rem;
    background:
        radial-gradient(circle at 100% 0%, rgba(45, 212, 191, 0.12), transparent 36%),
        rgba(18, 16, 30, 0.74);
    box-shadow: var(--shadow-soft);
}

.theme-preset-card-top {
    display: flex;
    gap: 0.7rem;
    align-items: flex-start;
    justify-content: space-between;
}

.theme-preset-card h3 {
    margin: 0;
    font-size: 1rem;
}

.theme-preset-card p {
    margin: 0.55rem 0 0;
    color: var(--muted);
    line-height: 1.55;
}

.theme-preset-card small {
    display: inline-flex;
    gap: 0.35rem;
    align-items: center;
    margin-top: 0.8rem;
    color: var(--muted);
    font-weight: 700;
}

.theme-preset-card code,
.theme-import-guide code {
    color: var(--muted-strong);
}

.theme-import-guide {
    display: flex;
    gap: 0.9rem;
    align-items: flex-start;
    justify-content: space-between;
    padding: 0.9rem 1rem;
    border: 1px solid rgba(45, 212, 191, 0.16);
    border-radius: 1rem;
    background: linear-gradient(135deg, rgba(45, 212, 191, 0.08), rgba(124, 58, 237, 0.07));
}

.theme-import-guide strong {
    min-width: 220px;
    color: var(--text);
}

.theme-import-guide div {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    justify-content: flex-end;
}

.theme-import-guide span {
    padding: 0.34rem 0.58rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--muted-strong);
    font-size: 0.78rem;
    font-weight: 850;
}

.theme-import-preview {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
    padding: 1rem;
    border: 1px solid rgba(45, 212, 191, 0.18);
    border-radius: 1.15rem;
    background:
        radial-gradient(circle at 0 0, rgba(45, 212, 191, 0.1), transparent 32%),
        rgba(8, 18, 24, 0.68);
}

.theme-import-preview.is-blocked {
    border-color: rgba(248, 113, 113, 0.3);
    background:
        radial-gradient(circle at 0 0, rgba(248, 113, 113, 0.12), transparent 32%),
        rgba(20, 10, 18, 0.68);
}

.theme-import-preview-head {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    justify-content: space-between;
}

.theme-import-preview-head h3 {
    margin: 0.2rem 0 0;
}

.theme-import-preview-head p {
    margin: 0.55rem 0 0;
    color: var(--muted);
}

.theme-import-diff {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
}

.theme-import-diff-row {
    display: grid;
    grid-template-columns: minmax(150px, 0.9fr) minmax(180px, 1fr) minmax(180px, 1fr) minmax(96px, 0.45fr);
    gap: 0.7rem;
    align-items: start;
    padding: 0.8rem 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--muted);
}

.theme-import-diff-row:first-child {
    border-top: 0;
}

.theme-import-diff-head {
    background: rgba(255, 255, 255, 0.05);
    color: var(--muted-strong);
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.theme-import-diff-row strong {
    display: block;
    color: var(--text);
}

.theme-import-diff-row code {
    display: inline-block;
    margin-top: 0.25rem;
    color: var(--muted);
    font-size: 0.76rem;
}

.diff-status {
    display: inline-flex;
    border-radius: 999px;
    padding: 0.32rem 0.55rem;
    font-size: 0.74rem;
    font-weight: 900;
}

.diff-change { background: rgba(45, 212, 191, 0.14); color: #99f6e4; }
.diff-same { background: rgba(148, 163, 184, 0.14); color: #cbd5e1; }
.diff-blocked { background: rgba(248, 113, 113, 0.16); color: #fecaca; }

.theme-import-confirm-actions {
    display: flex;
    gap: 0.7rem;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.theme-import-confirm-actions .button:disabled {
    cursor: not-allowed;
    opacity: 0.52;
    filter: grayscale(0.35);
}

.theme-import-form {
    display: grid;
    grid-template-columns: minmax(220px, 0.85fr) minmax(280px, 1.15fr) auto;
    gap: 0.9rem;
    align-items: end;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.theme-import-form label {
    display: block;
    margin-bottom: 0.45rem;
    color: var(--muted-strong);
    font-weight: 900;
}

.theme-import-form input[type="file"],
.theme-import-form textarea {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 1rem;
    background: rgba(10, 8, 18, 0.72);
    color: var(--text);
}

.theme-import-form input[type="file"] {
    padding: 0.85rem 1rem;
}

.theme-import-form textarea {
    min-height: 118px;
    padding: 0.9rem 1rem;
    resize: vertical;
    font-family: var(--font-mono, monospace);
}

.theme-preset-card .button:disabled {
    cursor: not-allowed;
    opacity: 0.52;
    filter: grayscale(0.35);
}

@media (max-width: 760px) {
    .theme-grid { grid-template-columns: 1fr; }
    .theme-preset-grid, .theme-import-form { grid-template-columns: 1fr; }
    .theme-studio-actions, .theme-import-guide { align-items: stretch; flex-direction: column; }
    .theme-import-preview-head { flex-direction: column; }
    .theme-import-diff-row { grid-template-columns: 1fr; }
    .theme-import-diff-head { display: none; }
    .theme-import-confirm-actions { justify-content: stretch; }
    .theme-import-confirm-actions form, .theme-import-confirm-actions .button { width: 100%; }
    .theme-import-guide strong { min-width: 0; }
    .theme-import-guide div { justify-content: flex-start; }
    .upload-inline-form, .theme-actions { align-items: stretch; }
    .upload-inline-form .button, .theme-actions .button, .theme-actions form, .theme-import-form .button, .theme-studio-actions .button { width: 100%; }
}

/* v3.0.0-beta.4 admin workbench */
.cockpit-workbench {
  margin-bottom: 18px;
}
.workbench-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.workbench-card {
  display: grid;
  gap: 8px;
  min-height: 132px;
  padding: 18px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 20px;
  background: linear-gradient(160deg, rgba(255,255,255,.06), rgba(255,255,255,.025));
  color: var(--text);
  text-decoration: none;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.workbench-card:hover {
  transform: translateY(-2px);
  border-color: rgba(45, 212, 191, .35);
}
.workbench-card span {
  justify-self: start;
  border-radius: 999px;
  padding: 5px 9px;
  background: rgba(124, 92, 255, .14);
  color: #d8ccff;
  font-size: .75rem;
  font-weight: 900;
}
.workbench-card strong {
  font-size: 1rem;
  line-height: 1.35;
}
.workbench-card small {
  color: var(--muted);
  line-height: 1.55;
}
.workbench-danger span { background: rgba(248, 113, 113, .16); color: #fecaca; }
.workbench-warning span { background: rgba(245, 158, 11, .16); color: #fde68a; }
.workbench-ok span { background: rgba(34, 197, 94, .16); color: #bbf7d0; }

@media (max-width: 1100px) {
  .workbench-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .workbench-grid { grid-template-columns: 1fr; }
}

.plugin-studio-panel {
    position: relative;
    overflow: hidden;
    border-color: rgba(45, 212, 191, .28);
    background:
        radial-gradient(circle at top right, rgba(45, 212, 191, .13), transparent 34rem),
        linear-gradient(135deg, rgba(124, 58, 237, .07), rgba(15, 23, 42, .24)),
        rgba(255, 255, 255, .018);
}
.plugin-studio-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: .28;
    background-image:
        linear-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .06) 1px, transparent 1px);
    background-size: 34px 34px;
    mask-image: linear-gradient(135deg, black, transparent 72%);
}
.plugin-studio-panel > * {
    position: relative;
    z-index: 1;
}
.plugin-studio-head {
    align-items: flex-start;
}
.plugin-studio-actions {
    display: flex;
    gap: .6rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.plugin-runtime-warning {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: .9rem 1rem;
    margin: 1rem 0;
    border: 1px solid rgba(251, 191, 36, .28);
    border-radius: var(--radius);
    background: linear-gradient(135deg, rgba(251, 191, 36, .12), rgba(124, 58, 237, .08));
    color: #fde68a;
}
.plugin-runtime-warning strong,
.plugin-runtime-warning span {
    display: block;
}
.plugin-runtime-warning span {
    color: var(--muted);
}
.plugin-capability-cloud,
.plugin-capability-list {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
}
.plugin-capability-cloud span {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .55rem .75rem;
    border: 1px solid rgba(255, 255, 255, .10);
    border-radius: 999px;
    background: rgba(255, 255, 255, .045);
    color: var(--text);
    font-size: .82rem;
    font-weight: 900;
}
.plugin-capability-cloud strong {
    min-width: 1.35rem;
    min-height: 1.35rem;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(45, 212, 191, .18);
    color: #99f6e4;
    font-size: .76rem;
}
.plugin-health-badge {
    display: inline-flex;
    align-items: center;
    padding: .22rem .55rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .10);
    font-size: .72rem;
    font-weight: 900;
}
.plugin-health-ok {
    color: #bbf7d0;
    background: rgba(34, 197, 94, .13);
    border-color: rgba(34, 197, 94, .25);
}
.plugin-health-warn {
    color: #fde68a;
    background: rgba(245, 158, 11, .13);
    border-color: rgba(245, 158, 11, .25);
}
.plugin-health-broken {
    color: #fecaca;
    background: rgba(239, 68, 68, .14);
    border-color: rgba(239, 68, 68, .28);
}
.plugin-capability-list {
    margin-top: .65rem;
}
.plugin-capability-list span {
    padding: .24rem .55rem;
    border: 1px solid rgba(45, 212, 191, .18);
    border-radius: 999px;
    background: rgba(45, 212, 191, .08);
    color: #ccfbf1;
    font-size: .74rem;
    font-weight: 900;
}
.plugin-issue-list {
    margin: .65rem 0 0;
    padding: .65rem .75rem .65rem 1.65rem;
    border: 1px solid rgba(248, 113, 113, .22);
    border-radius: var(--radius-sm);
    background: rgba(248, 113, 113, .08);
    color: #fecaca;
}
.plugin-issue-list li + li {
    margin-top: .25rem;
}
.plugin-row-ok {
    border-color: rgba(34, 197, 94, .16);
}
.plugin-row-warn {
    border-color: rgba(245, 158, 11, .28);
}
.plugin-row-broken {
    border-color: rgba(239, 68, 68, .34);
}

@media (max-width: 760px) {
    .plugin-studio-head,
    .plugin-runtime-warning {
        flex-direction: column;
        align-items: stretch;
    }
    .plugin-studio-actions,
    .plugin-studio-actions .button {
        width: 100%;
    }
    .plugin-studio-actions .button {
        justify-content: center;
    }
}

.plugin-studio-strip {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .5rem;
    margin: -.25rem 0 1rem;
    padding: .48rem;
    width: fit-content;
    max-width: 100%;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, .035);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}
.plugin-studio-strip span {
    display: inline-flex;
    align-items: center;
    gap: .38rem;
    padding: .34rem .62rem;
    border-radius: 999px;
    color: var(--muted);
    font-size: .78rem;
    font-weight: 900;
    white-space: nowrap;
}
.plugin-studio-strip span + span {
    border-left: 1px solid rgba(255, 255, 255, .08);
    border-radius: 0;
}
.plugin-studio-strip strong {
    color: var(--text);
    font-size: .98rem;
    line-height: 1;
}
@media (max-width: 760px) {
    .plugin-studio-strip {
        width: 100%;
        border-radius: var(--radius);
    }
    .plugin-studio-strip span {
        flex: 1 1 calc(50% - .5rem);
        justify-content: center;
        background: rgba(255, 255, 255, .035);
    }
    .plugin-studio-strip span + span {
        border-left: 0;
        border-radius: 999px;
    }
}

/* Knowledge Graph / Internal Linking Studio */
.knowledge-hero-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1.4rem;
    align-items: center;
    border-color: rgba(45, 212, 191, .22);
    background:
        radial-gradient(circle at top right, rgba(45, 212, 191, .15), transparent 34%),
        linear-gradient(135deg, rgba(124, 58, 237, .12), rgba(15, 23, 42, .34)),
        var(--panel);
}
.knowledge-hero-panel h2 {
    margin: .2rem 0 .35rem;
    font-size: clamp(1.8rem, 4vw, 3rem);
    line-height: 1.02;
}
.knowledge-hero-panel p:last-child {
    max-width: 760px;
    color: var(--muted);
    line-height: 1.7;
}
.knowledge-health-ring {
    --score: 0;
    width: 148px;
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    align-content: center;
    border-radius: 999px;
    background:
        radial-gradient(circle at center, rgba(16, 14, 28, .96) 0 56%, transparent 57%),
        conic-gradient(#2dd4bf calc(var(--score) * 1%), rgba(255, 255, 255, .08) 0);
    box-shadow: 0 22px 55px rgba(0, 0, 0, .3);
}
.knowledge-health-ring strong {
    color: #fff;
    font-size: 2rem;
    line-height: 1;
}
.knowledge-health-ring span {
    color: var(--muted);
    font-size: .74rem;
    font-weight: 850;
}
.knowledge-stat-strip {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: .75rem;
    margin: 1rem 0;
}
.knowledge-stat-strip article {
    padding: .85rem 1rem;
    border: 1px solid var(--line);
    border-radius: 18px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .06), rgba(45, 212, 191, .06)),
        var(--panel);
}
.knowledge-stat-strip span,
.knowledge-cluster-top span {
    display: block;
    color: var(--muted);
    font-size: .72rem;
    font-weight: 900;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.knowledge-stat-strip strong {
    display: block;
    margin-top: .25rem;
    color: #fff;
    font-size: 1.75rem;
}
.knowledge-cluster-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .9rem;
}
.knowledge-cluster-card {
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: 20px;
    background:
        radial-gradient(circle at top right, rgba(124, 58, 237, .12), transparent 42%),
        rgba(255, 255, 255, .035);
}
.knowledge-cluster-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.knowledge-cluster-top strong,
.knowledge-suggestion-score {
    display: inline-grid;
    place-items: center;
    min-width: 44px;
    height: 36px;
    border-radius: 999px;
    background: rgba(45, 212, 191, .12);
    color: #99f6e4;
    font-weight: 950;
}
.knowledge-cluster-card h3 {
    margin: .8rem 0 .35rem;
    color: #fff;
    font-size: 1.2rem;
}
.knowledge-cluster-card p,
.knowledge-cluster-card small {
    color: var(--muted);
    line-height: 1.55;
}
.knowledge-mini-list {
    display: grid;
    gap: .35rem;
    margin-top: .85rem;
}
.knowledge-mini-list a {
    padding: .5rem .6rem;
    border: 1px solid rgba(255, 255, 255, .07);
    border-radius: 12px;
    color: #e9d5ff;
    text-decoration: none;
    font-weight: 800;
}
.knowledge-work-grid {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    gap: 1rem;
}
.knowledge-list,
.knowledge-suggestion-list {
    display: grid;
    gap: .75rem;
}
.knowledge-list article,
.knowledge-suggestion-list article {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: .8rem;
    align-items: center;
    padding: .85rem;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, .035);
}
.knowledge-list strong,
.knowledge-suggestion-list strong {
    color: #fff;
}
.knowledge-list small,
.knowledge-suggestion-list small,
.knowledge-suggestion-list span {
    display: block;
    margin-top: .18rem;
    color: var(--muted);
}
.knowledge-suggestion-list code {
    display: block;
    margin: .5rem 0;
    padding: .5rem .6rem;
    border: 1px solid rgba(45, 212, 191, .16);
    border-radius: 12px;
    background: rgba(0, 0, 0, .24);
    color: #ccfbf1;
    white-space: normal;
}
@media (max-width: 1100px) {
    .knowledge-stat-strip,
    .knowledge-cluster-grid,
    .knowledge-work-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 760px) {
    .knowledge-hero-panel,
    .knowledge-stat-strip,
    .knowledge-cluster-grid,
    .knowledge-work-grid,
    .knowledge-list article,
    .knowledge-suggestion-list article {
        grid-template-columns: 1fr;
    }
    .knowledge-health-ring {
        width: 126px;
    }
}
