:root {
    color-scheme: dark;
    --bg: #080c15;
    --bg-elevated: #0d1320;
    --surface: #111827;
    --surface-2: #172033;
    --surface-3: #1c2840;
    --text: #f4f7fb;
    --text-soft: #d6deea;
    --muted: #91a0b5;
    --line: #263247;
    --line-strong: #34445e;
    --accent: #f97316;
    --accent-hover: #fb923c;
    --accent-ink: #170b02;
    --accent-soft: rgba(249, 115, 22, 0.13);
    --cyan: #22d3ee;
    --cyan-soft: rgba(34, 211, 238, 0.12);
    --success: #34d399;
    --success-soft: rgba(52, 211, 153, 0.12);
    --warning: #fbbf24;
    --warning-soft: rgba(251, 191, 36, 0.12);
    --danger: #f87171;
    --danger-soft: rgba(248, 113, 113, 0.12);
    --shadow: 0 18px 60px rgba(0, 0, 0, 0.24);
    --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.16);
    --radius: 8px;
    --container: 1240px;
    --font: Inter, "HarmonyOS Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

html[data-theme="light"] {
    color-scheme: light;
    --bg: #eaf2fb;
    --bg-elevated: #f4f9ff;
    --surface: #ffffff;
    --surface-2: #f4f8fd;
    --surface-3: #e9f1fb;
    --text: #172033;
    --text-soft: #334155;
    --muted: #6b7d93;
    --line: #dce7f4;
    --line-strong: #c7d8ea;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --accent-ink: #ffffff;
    --accent-soft: #e9f2ff;
    --cyan: #0891b2;
    --cyan-soft: #e5f8fc;
    --success: #087f5b;
    --success-soft: #e8f8f1;
    --warning: #b45309;
    --warning-soft: #fff6e6;
    --danger: #dc2626;
    --danger-soft: #fff0f0;
    --shadow: 0 18px 50px rgba(67, 110, 160, 0.10);
    --shadow-soft: 0 10px 30px rgba(67, 110, 160, 0.075);
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
    min-width: 320px;
    scroll-behavior: smooth;
    letter-spacing: 0;
}

body {
    min-height: 100vh;
    margin: 0;
    background-color: var(--bg);
    background-image:
        linear-gradient(rgba(120, 143, 172, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(120, 143, 172, 0.035) 1px, transparent 1px);
    background-size: 32px 32px;
    color: var(--text);
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

body.admin-body { background-image: none; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; }
img { max-width: 100%; }
h1, h2, h3, p, dl, dd { margin: 0; }
h1, h2, h3, strong, button { letter-spacing: 0; }
h1 { font-size: 52px; line-height: 1.08; font-weight: 720; }
h2 { font-size: 24px; line-height: 1.25; font-weight: 700; }
h3 { font-size: 18px; line-height: 1.35; }
p { color: var(--muted); }
button { cursor: pointer; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--cyan) 72%, white 28%); outline-offset: 3px; }
.icon { flex: 0 0 auto; }

.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;
}

.skip-link {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 1000;
    transform: translateY(-180%);
    padding: 10px 14px;
    border-radius: var(--radius);
    background: var(--accent);
    color: var(--accent-ink);
    font-weight: 700;
}
.skip-link:focus { transform: translateY(0); }
.eyebrow {
    margin-bottom: 8px;
    color: var(--accent);
    font-size: 11px;
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: 0;
}

.site-shell { width: min(calc(100% - 40px), var(--container)); margin: 0 auto; }
.site-header {
    position: sticky;
    top: 14px;
    z-index: 50;
    display: grid;
    grid-template-columns: minmax(210px, 1fr) auto minmax(270px, 1fr);
    align-items: center;
    gap: 20px;
    min-height: 72px;
    margin-top: 14px;
    padding: 12px 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--surface) 90%, transparent);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(18px);
}

.brand { display: inline-flex; align-items: center; gap: 11px; min-width: 0; width: fit-content; }
.brand-mark {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border-radius: 8px;
    background: var(--accent);
    color: var(--accent-ink);
    font-size: 20px;
    font-weight: 850;
    line-height: 1;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}
.brand-copy { display: grid; min-width: 0; line-height: 1.15; }
.brand-copy strong { overflow: hidden; color: var(--text); font-size: 15px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.brand-copy small { margin-top: 4px; color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: 0; }
.main-nav { display: flex; align-items: center; gap: 3px; }
.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 42px;
    padding: 0 12px;
    border-radius: 6px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 650;
    transition: background-color 180ms ease, color 180ms ease, transform 180ms ease;
}
.nav-link:hover { background: var(--surface-2); color: var(--text); }
.nav-link.is-active { background: var(--accent-soft); color: var(--accent); }
.header-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    width: min(200px, 18vw);
    height: 42px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-2);
    color: var(--muted);
    transition: border-color 180ms ease, background-color 180ms ease;
}
.search-box:focus-within { border-color: var(--cyan); background: var(--surface-3); }
.search-box input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 14px; }
.search-box input::placeholder { color: var(--muted); }
.icon-button {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-2);
    color: var(--muted);
    transition: border-color 180ms ease, background-color 180ms ease, color 180ms ease, transform 180ms ease;
}
.icon-button:hover { border-color: var(--line-strong); background: var(--surface-3); color: var(--text); transform: translateY(-1px); }
html[data-theme="dark"] .theme-icon-sun,
html[data-theme="light"] .theme-icon-moon { display: none; }
.flash-stack { display: grid; gap: 8px; margin: 16px 0 0; }
.flash {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 11px 13px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text-soft);
    font-size: 14px;
    box-shadow: var(--shadow-soft);
}
.flash-success { border-color: color-mix(in srgb, var(--success) 45%, var(--line)); background: var(--success-soft); }
.flash-error { border-color: color-mix(in srgb, var(--danger) 45%, var(--line)); background: var(--danger-soft); }
.flash-warning { border-color: color-mix(in srgb, var(--warning) 45%, var(--line)); background: var(--warning-soft); }
.site-main { min-height: calc(100vh - 260px); padding: 28px 0 42px; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-soft); }
.home-layout { display: grid; grid-template-columns: 292px minmax(0, 1fr); gap: 20px; align-items: start; }
.profile-card {
    position: sticky;
    top: 105px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}
.profile-visual {
    position: relative;
    display: grid;
    place-items: end center;
    min-height: 342px;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
    background-color: var(--bg-elevated);
    background-image: linear-gradient(rgba(103, 132, 166, 0.075) 1px, transparent 1px), linear-gradient(90deg, rgba(103, 132, 166, 0.075) 1px, transparent 1px);
    background-size: 24px 24px;
}
.profile-visual::after { content: ""; position: absolute; inset: auto 18px 14px; height: 1px; background: linear-gradient(90deg, transparent, var(--accent), transparent); opacity: 0.65; }
.profile-visual img { position: relative; z-index: 1; width: 92%; max-height: 355px; object-fit: contain; object-position: bottom center; filter: drop-shadow(0 20px 20px rgba(0, 0, 0, 0.22)); }
.availability {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 9px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: color-mix(in srgb, var(--surface) 88%, transparent);
    color: var(--text-soft);
    font-size: 10px;
    font-weight: 750;
    backdrop-filter: blur(10px);
}
.availability > span { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 4px var(--success-soft); }
.profile-copy { padding: 22px 20px 20px; }
.profile-copy h1 { font-size: 32px; line-height: 1.1; }
.profile-copy h1 span { color: var(--accent); }
.profile-tagline { margin-top: 12px; color: var(--text-soft); font-size: 14px; line-height: 1.7; }
.profile-meta { display: grid; gap: 7px; margin: 18px 0; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.profile-meta span { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.profile-meta .icon { color: var(--accent); }
.text-link { display: inline-flex; align-items: center; gap: 6px; color: var(--text-soft); font-size: 13px; font-weight: 700; transition: color 180ms ease, gap 180ms ease; }
.text-link:hover { gap: 10px; color: var(--accent); }
.home-content { display: grid; gap: 20px; min-width: 0; }
.home-content > .link-panel { padding: 0; border: 0; background: transparent; box-shadow: none; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 16px; }
.section-heading h2 { font-size: 23px; }
.section-heading .eyebrow { margin-bottom: 4px; }
.section-count {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-width: 40px;
    min-height: 30px;
    justify-content: center;
    padding: 0 9px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface-2);
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
}
.section-link { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 12px; font-weight: 700; transition: color 180ms ease, gap 180ms ease; }
.section-link:hover { gap: 8px; color: var(--accent); }
.link-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.link-card {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 13px;
    min-height: 108px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-soft);
    transition: transform 200ms ease, border-color 200ms ease, background-color 200ms ease;
}
.link-card::before { content: ""; position: absolute; top: 16px; bottom: 16px; left: 0; width: 2px; border-radius: 0 2px 2px 0; background: var(--accent); opacity: 0; transform: scaleY(0.55); transition: opacity 200ms ease, transform 200ms ease; }
.link-card:hover { transform: translateY(-3px); border-color: var(--line-strong); background: var(--surface-2); }
.link-card:hover::before { opacity: 1; transform: scaleY(1); }
.link-card-index { align-self: start; color: var(--accent); font-size: 11px; font-weight: 850; }
.link-card-body { display: grid; gap: 6px; min-width: 0; }
.link-card-body strong { overflow: hidden; color: var(--text); font-size: 16px; font-weight: 720; text-overflow: ellipsis; white-space: nowrap; }
.link-card-body span { display: -webkit-box; overflow: hidden; color: var(--muted); font-size: 12px; line-height: 1.55; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.link-card-arrow { color: var(--muted); transition: color 180ms ease, transform 180ms ease; }
.link-card:hover .link-card-arrow { color: var(--accent); transform: translate(2px, -2px); }
.latest-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.compact-panel { padding: 20px; }
.mini-list { display: grid; gap: 8px; }
.mini-item { display: grid; grid-template-columns: 40px minmax(0, 1fr) 36px; align-items: center; gap: 11px; min-height: 58px; padding: 8px 0; border-top: 1px solid var(--line); }
.mini-item:first-child { border-top: 0; }
.item-mark, .download-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 7px; background: var(--accent-soft); color: var(--accent); font-size: 16px; font-weight: 800; }
.item-mark.accent-cyan, .download-icon.accent-cyan { background: var(--cyan-soft); color: var(--cyan); }
.mini-copy { display: grid; min-width: 0; }
.mini-copy strong { overflow: hidden; color: var(--text-soft); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.mini-copy span { margin-top: 2px; color: var(--muted); font-size: 11px; }
.mini-button { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-2); color: var(--muted); transition: color 180ms ease, border-color 180ms ease, background-color 180ms ease; }
.mini-button:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.empty-state { display: grid; justify-items: center; gap: 8px; padding: 46px 24px; text-align: center; color: var(--muted); }
.empty-state > .icon { color: var(--accent); }
.empty-state h2 { font-size: 20px; }
.empty-state p { max-width: 42ch; font-size: 13px; }
.empty-state span { font-size: 12px; }
.empty-state.compact { padding: 28px 18px; border: 1px dashed var(--line-strong); border-radius: var(--radius); }
.empty-state.small { padding: 24px 12px; }
.site-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 26px 4px 38px; border-top: 1px solid var(--line); }
.site-footer > div { display: grid; gap: 2px; }
.site-footer strong { color: var(--text-soft); font-size: 13px; }
.site-footer span, .site-footer p { color: var(--muted); font-size: 11px; }
.mobile-nav { display: none; }
.page-heading {
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 28px;
    overflow: hidden;
    margin-bottom: 20px;
    padding: 34px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background-color: var(--surface);
    background-image: linear-gradient(90deg, transparent 49.7%, var(--line) 50%, transparent 50.3%), linear-gradient(var(--line) 1px, transparent 1px);
    background-size: 100% 100%, 100% 46px;
}
.page-heading::after { content: ""; position: absolute; top: 0; right: 0; width: 28%; height: 3px; background: linear-gradient(90deg, transparent, var(--accent)); }
.page-heading h1 { font-size: 48px; }
.page-heading p:not(.eyebrow) { max-width: 620px; margin-top: 10px; font-size: 14px; }
.page-heading-icon { display: grid; place-items: center; width: 72px; height: 72px; flex: 0 0 72px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--accent-soft); color: var(--accent); }
.page-heading-icon.accent-cyan { background: var(--cyan-soft); color: var(--cyan); }
.download-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.download-card { display: flex; flex-direction: column; gap: 16px; padding: 22px; transition: transform 200ms ease, border-color 200ms ease; }
.download-card:hover { transform: translateY(-2px); border-color: var(--line-strong); }
.download-card-head { display: flex; align-items: center; gap: 13px; }
.download-icon { width: 48px; height: 48px; font-size: 18px; }
.download-title { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; min-width: 0; }
.download-title h2 { overflow-wrap: anywhere; font-size: 19px; }
.version-pill { padding: 3px 7px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface-2); color: var(--muted); font-size: 10px; font-weight: 700; }
.download-description { display: -webkit-box; min-height: 46px; overflow: hidden; color: var(--text-soft); font-size: 13px; line-height: 1.75; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.download-meta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: auto; padding-top: 13px; border-top: 1px solid var(--line); }
.download-meta span { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 11px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border: 1px solid transparent; border-radius: 8px; font-size: 13px; font-weight: 750; line-height: 1.2; transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease; }
.button:hover { transform: translateY(-1px); }
.button-primary { background: var(--accent); color: var(--accent-ink); }
.button-primary:hover { background: var(--accent-hover); }
.button-secondary { border-color: var(--line); background: var(--surface-2); color: var(--text-soft); }
.button-secondary:hover { border-color: var(--line-strong); background: var(--surface-3); color: var(--text); }
.button-ghost { border-color: transparent; background: transparent; color: var(--muted); }
.button-ghost:hover { background: var(--surface-2); color: var(--text); }
.button-block { width: 100%; }
.button-small { min-height: 36px; padding: 0 12px; font-size: 11px; }
.danger-text { color: var(--danger); }
.file-note { display: flex; align-items: flex-start; gap: 10px; margin-top: 18px; padding: 13px 15px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--muted); }
.file-note .icon { margin-top: 2px; color: var(--success); }
.file-note p { font-size: 12px; }
.about-layout { display: grid; grid-template-columns: minmax(0, 1fr) 286px; gap: 20px; align-items: start; }
.about-main { display: grid; gap: 20px; }
.about-intro { display: grid; grid-template-columns: 190px minmax(0, 1fr); align-items: center; gap: 28px; overflow: hidden; padding: 24px; }
.about-portrait {
    overflow: hidden;
    height: 210px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background-color: var(--bg-elevated);
    background-image: linear-gradient(rgba(120, 143, 172, 0.06) 1px, transparent 1px), linear-gradient(90deg, rgba(120, 143, 172, 0.06) 1px, transparent 1px);
    background-size: 20px 20px;
}
.about-portrait img { width: 100%; height: 100%; object-fit: contain; object-position: bottom center; }
.about-intro h1 { font-size: 38px; }
.about-intro p:not(.eyebrow) { margin-top: 12px; color: var(--text-soft); font-size: 14px; line-height: 1.8; }
.prose-panel, .feedback-panel { padding: 26px; }
.prose-panel h2, .feedback-panel h2 { margin-bottom: 14px; }
.prose { color: var(--text-soft); font-size: 14px; line-height: 1.9; }
.about-aside { position: sticky; top: 105px; display: grid; gap: 20px; }
.about-aside .panel { padding: 22px; }
.info-list { display: grid; gap: 0; margin-top: 16px; }
.info-list > div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 12px; }
.info-list dt { color: var(--muted); }
.info-list dd { color: var(--text-soft); text-align: right; overflow-wrap: anywhere; }
.info-list a { color: var(--accent); }
.security-badge, .safe-badge { display: inline-flex; align-items: center; gap: 6px; margin-top: 18px; padding: 5px 8px; border: 1px solid color-mix(in srgb, var(--success) 35%, var(--line)); border-radius: 5px; background: var(--success-soft); color: var(--success); font-size: 10px; font-weight: 750; }
.aside-copy p:last-child { margin-top: 8px; color: var(--text-soft); font-size: 13px; }
.form-stack { display: grid; gap: 16px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.field { display: grid; gap: 7px; min-width: 0; }
.field > span { color: var(--text-soft); font-size: 12px; font-weight: 750; }
.field > span small { color: var(--muted); font-size: 10px; font-weight: 500; }
.field input, .field textarea, .search-page-form input {
    width: 100%;
    min-height: 46px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 7px;
    outline: 0;
    background: var(--surface-2);
    color: var(--text);
    font-size: 14px;
    transition: border-color 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}
.field textarea { min-height: 110px; resize: vertical; line-height: 1.65; }
.field input:focus, .field textarea:focus, .search-page-form input:focus { border-color: var(--cyan); background: var(--surface-3); box-shadow: 0 0 0 3px var(--cyan-soft); }
.field input::placeholder, .field textarea::placeholder, .search-page-form input::placeholder { color: color-mix(in srgb, var(--muted) 80%, transparent); }
.field-hint { color: var(--muted); font-size: 11px; line-height: 1.6; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.search-page { display: grid; gap: 18px; }
.compact-heading { margin-bottom: 0; padding: 25px 28px; }
.compact-heading h1 { font-size: 40px; }
.search-page-form { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 12px; }
.search-page-form > .icon { margin-left: 4px; color: var(--muted); }
.search-page-form input { border-color: transparent; background: transparent; }
.search-page-form input:focus { border-color: transparent; box-shadow: none; background: transparent; }
.result-summary { color: var(--muted); font-size: 12px; }
.search-section { padding: 22px; }
.error-page { display: grid; justify-items: center; max-width: 640px; margin: 7vh auto; padding: 60px 30px; text-align: center; }
.error-code { margin-bottom: 20px; color: var(--accent); font-size: 96px; font-weight: 850; line-height: 1; opacity: 0.9; }
.error-page h1 { font-size: 38px; }
.error-page p:not(.eyebrow) { max-width: 48ch; margin: 12px 0 24px; }
.auth-body { min-height: 100vh; background-color: var(--bg); }
.auth-shell { display: grid; grid-template-columns: minmax(0, 1fr) minmax(430px, 0.82fr); min-height: 100vh; }
.auth-brand-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    min-height: 100vh;
    padding: 36px 48px;
    border-right: 1px solid var(--line);
    background-color: var(--bg-elevated);
    background-image: linear-gradient(rgba(110, 136, 167, 0.06) 1px, transparent 1px), linear-gradient(90deg, rgba(110, 136, 167, 0.06) 1px, transparent 1px);
    background-size: 40px 40px;
}
.brand-on-dark { position: relative; z-index: 2; }
.auth-mascot { position: absolute; right: -5%; bottom: -7%; width: min(66vw, 720px); max-height: 92vh; object-fit: contain; object-position: bottom right; opacity: 0.94; filter: drop-shadow(0 30px 35px rgba(0, 0, 0, 0.35)); }
.auth-brand-copy { position: relative; z-index: 2; max-width: 500px; padding: 24px; border-left: 2px solid var(--accent); background: color-mix(in srgb, var(--bg) 80%, transparent); backdrop-filter: blur(12px); }
.auth-brand-copy h1 { max-width: 12ch; font-size: 48px; }
.auth-brand-copy p:not(.eyebrow) { max-width: 48ch; margin-top: 14px; color: var(--text-soft); font-size: 14px; }
.auth-form-panel { display: grid; place-items: center; padding: 40px; background: var(--surface); }
.auth-form-wrap { width: min(100%, 420px); }
.auth-back { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 12px; font-weight: 650; }
.auth-back .icon { transform: rotate(180deg); }
.auth-back:hover { color: var(--accent); }
.auth-heading { margin: 36px 0 26px; }
.auth-lock { display: grid; place-items: center; width: 54px; height: 54px; margin-bottom: 20px; border: 1px solid var(--line); border-radius: 8px; background: var(--accent-soft); color: var(--accent); }
.auth-heading h2 { font-size: 38px; }
.auth-heading p:last-child { margin-top: 9px; font-size: 13px; }
.auth-form { gap: 14px; }
.auth-security-list { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.auth-security-list span { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 10px; }
.admin-body { background: var(--bg); }
.admin-shell { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; }
.admin-sidebar { position: sticky; top: 0; z-index: 80; display: flex; flex-direction: column; height: 100vh; padding: 18px 14px; border-right: 1px solid var(--line); background: var(--bg-elevated); }
.admin-brand { padding: 4px 6px 20px; }
.admin-nav { display: grid; gap: 4px; min-height: 0; overflow-y: auto; padding-top: 16px; border-top: 1px solid var(--line); }
.admin-nav-label { padding: 0 10px 7px; color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: 0; }
.admin-nav-link { display: flex; align-items: center; gap: 10px; min-height: 43px; padding: 0 11px; border: 1px solid transparent; border-radius: 6px; color: var(--muted); font-size: 12px; font-weight: 650; transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease; }
.admin-nav-link:hover { background: var(--surface); color: var(--text); }
.admin-nav-link.is-active { border-color: color-mix(in srgb, var(--accent) 26%, var(--line)); background: var(--accent-soft); color: var(--accent); }
.admin-sidebar-footer { display: grid; gap: 6px; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); }
.admin-site-link, .admin-logout { display: flex; align-items: center; gap: 9px; width: 100%; min-height: 40px; padding: 0 10px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font-size: 11px; font-weight: 650; text-align: left; }
.admin-site-link:hover, .admin-logout:hover { background: var(--surface); color: var(--text); }
.admin-logout:hover { color: var(--danger); }
.admin-workspace { min-width: 0; }
.admin-topbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 80px; padding: 14px 28px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(14px); }
.admin-title-row { display: flex; align-items: center; gap: 12px; }
.admin-title-row h1 { font-size: 22px; }
.admin-title-row .eyebrow { margin-bottom: 2px; font-size: 8px; }
.admin-menu-toggle { display: none; }
.admin-user-chip { display: flex; align-items: center; gap: 9px; }
.admin-avatar { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 7px; background: var(--accent); color: var(--accent-ink); font-size: 14px; font-weight: 800; }
.admin-user-chip > span:last-child { display: grid; line-height: 1.25; }
.admin-user-chip strong { color: var(--text-soft); font-size: 11px; }
.admin-user-chip small { color: var(--muted); font-size: 9px; }
.admin-flashes { margin: 14px 28px 0; }
.admin-main { padding: 26px 28px 50px; }
.admin-section { display: grid; gap: 20px; max-width: 1280px; margin: 0 auto; }
.admin-welcome {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    overflow: hidden;
    min-height: 148px;
    padding: 28px;
    background-image: linear-gradient(90deg, transparent 60%, var(--line) 60%, transparent 60.2%), linear-gradient(var(--line) 1px, transparent 1px);
    background-size: 100% 100%, 100% 46px;
}
.admin-welcome::after { content: ""; position: absolute; top: 0; left: 0; width: 110px; height: 3px; background: var(--accent); }
.admin-welcome h2 { font-size: 28px; }
.admin-welcome p:last-child { max-width: 58ch; margin-top: 8px; font-size: 13px; }
.admin-welcome-mark { color: var(--accent); font-size: 96px; font-weight: 850; line-height: 1; opacity: 0.13; }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.stat-card { display: grid; gap: 2px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); transition: border-color 180ms ease, transform 180ms ease; }
.stat-card:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.stat-card > span { color: var(--accent); }
.stat-card strong { margin-top: 11px; color: var(--text); font-size: 30px; line-height: 1; }
.stat-card small { color: var(--muted); font-size: 10px; }
.stat-card.has-alert strong { color: var(--danger); }
.admin-two-column { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.admin-two-column > .panel, .admin-section > .panel { padding: 22px; }
.admin-feedback-list { display: grid; }
.admin-feedback-row { display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; align-items: start; gap: 10px; padding: 11px 0; border-top: 1px solid var(--line); }
.admin-feedback-row:first-child { border-top: 0; }
.status-dot { width: 6px; height: 6px; margin-top: 7px; border-radius: 50%; background: var(--line-strong); }
.status-dot.is-unread { background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.admin-feedback-row strong { color: var(--text-soft); font-size: 11px; }
.admin-feedback-row p { display: -webkit-box; overflow: hidden; margin-top: 2px; font-size: 11px; -webkit-box-orient: vertical; -webkit-line-clamp: 1; }
.admin-feedback-row time { color: var(--muted); font-size: 9px; }
.security-checklist { display: grid; gap: 0; margin: 0 0 16px; padding: 0; list-style: none; }
.security-checklist li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 9px 0; border-top: 1px solid var(--line); }
.security-checklist li:first-child { border-top: 0; }
.security-checklist .icon { color: var(--success); }
.security-checklist span { color: var(--text-soft); font-size: 11px; }
.security-checklist small { color: var(--muted); font-size: 9px; }
.table-wrap { width: 100%; overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 11px; }
.data-table th, .data-table td { padding: 10px 12px; border-top: 1px solid var(--line); text-align: left; vertical-align: top; }
.data-table th { border-top: 0; color: var(--muted); font-size: 9px; font-weight: 750; text-transform: uppercase; }
.data-table td { color: var(--text-soft); }
.data-table code { padding: 2px 5px; border-radius: 4px; background: var(--surface-2); color: var(--accent); font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace; font-size: 10px; }
.table-empty { padding: 22px !important; color: var(--muted) !important; text-align: center !important; }
.admin-page-copy { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.admin-page-copy h2 { font-size: 29px; }
.admin-page-copy p:last-child { max-width: 66ch; margin-top: 7px; font-size: 12px; }
.admin-editor-layout { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 20px; align-items: start; }
.sticky-form { position: sticky; top: 20px; }
.admin-form { display: grid; gap: 15px; padding: 22px; }
.admin-list-panel { min-width: 0; padding: 22px; }
.admin-link-list, .admin-download-list { display: grid; gap: 8px; }
.admin-link-row { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: start; gap: 10px; padding: 13px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-2); }
.admin-link-number { color: var(--accent); font-size: 10px; font-weight: 800; }
.admin-link-copy { display: grid; gap: 3px; min-width: 0; }
.admin-link-copy strong { color: var(--text-soft); font-size: 12px; }
.admin-link-copy a { overflow: hidden; color: var(--cyan); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.admin-link-copy p { font-size: 10px; }
.row-actions { display: flex; align-items: center; gap: 5px; }
.row-actions .icon-button { width: 32px; height: 32px; flex-basis: 32px; }
.row-actions .icon-button.danger:hover { border-color: var(--danger); background: var(--danger-soft); color: var(--danger); }
.admin-download-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 11px; padding: 12px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-2); }
.download-icon.small { width: 40px; height: 40px; font-size: 14px; }
.admin-download-copy { display: grid; min-width: 0; }
.admin-download-copy strong { overflow: hidden; color: var(--text-soft); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.admin-download-copy strong small { color: var(--muted); font-size: 9px; font-weight: 500; }
.admin-download-copy span, .admin-download-copy > small { overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.visibility-pill { display: inline-flex; align-items: center; min-height: 24px; padding: 0 7px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); color: var(--muted); font-size: 8px; font-weight: 750; white-space: nowrap; }
.visibility-pill.is-visible { border-color: color-mix(in srgb, var(--success) 35%, var(--line)); background: var(--success-soft); color: var(--success); }
.switch-row { display: flex; align-items: center; gap: 9px; color: var(--text-soft); font-size: 12px; cursor: pointer; }
.switch-row input { position: absolute; opacity: 0; pointer-events: none; }
.switch-control { position: relative; width: 38px; height: 22px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface-3); transition: background-color 180ms ease, border-color 180ms ease; }
.switch-control::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--muted); transition: transform 180ms ease, background-color 180ms ease; }
.switch-row input:checked + .switch-control { border-color: var(--accent); background: var(--accent-soft); }
.switch-row input:checked + .switch-control::after { background: var(--accent); transform: translateX(16px); }
.switch-row input:focus-visible + .switch-control { outline: 3px solid color-mix(in srgb, var(--cyan) 72%, white 28%); outline-offset: 3px; }
.file-field input[type="file"] { padding: 9px; color: var(--muted); font-size: 11px; }
.file-field input::file-selector-button { min-height: 32px; margin-right: 9px; padding: 0 10px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface-3); color: var(--text-soft); font: inherit; font-weight: 650; cursor: pointer; }
.feedback-inbox { display: grid; gap: 12px; }
.feedback-card { padding: 18px; }
.feedback-card.is-unread { border-left: 3px solid var(--accent); }
.feedback-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.feedback-identity { display: flex; align-items: center; gap: 10px; }
.feedback-avatar { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 7px; background: var(--surface-2); color: var(--accent); font-size: 13px; font-weight: 800; }
.feedback-identity > div { display: grid; line-height: 1.3; }
.feedback-identity strong { color: var(--text-soft); font-size: 12px; }
.feedback-identity span { color: var(--muted); font-size: 9px; }
.feedback-contact { margin-top: 12px; color: var(--cyan); font-size: 10px; }
.feedback-message { margin-top: 8px; color: var(--text-soft); font-size: 13px; line-height: 1.8; }
.feedback-actions { display: flex; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.settings-form { padding: 26px; }
.two-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.form-footer p { font-size: 11px; }
.security-notice { display: flex; gap: 12px; padding: 15px; border: 1px solid color-mix(in srgb, var(--warning) 40%, var(--line)); border-radius: var(--radius); background: var(--warning-soft); color: var(--warning); }
.security-notice > div { display: grid; gap: 2px; }
.security-notice strong { font-size: 12px; }
.security-notice p { color: var(--text-soft); font-size: 11px; }
.account-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.form-section-title { display: flex; gap: 11px; padding-top: 9px; border-top: 1px solid var(--line); }
.form-section-title > span { color: var(--accent); font-size: 10px; font-weight: 800; }
.form-section-title h3 { font-size: 14px; }
.form-section-title p { margin-top: 2px; font-size: 10px; }
.account-aside { display: grid; gap: 20px; }
.account-aside .panel { padding: 22px; }
.admin-backdrop { display: none; }

@media (max-width: 1100px) {
    .site-header { grid-template-columns: minmax(190px, 1fr) auto minmax(124px, 0.7fr); }
    .search-box { width: 124px; }
    .nav-link { padding: 0 9px; }
    .home-layout { grid-template-columns: 258px minmax(0, 1fr); }
    .profile-visual { min-height: 300px; }
    .profile-visual img { max-height: 310px; }
    .download-grid { grid-template-columns: 1fr; }
    .admin-editor-layout { grid-template-columns: 320px minmax(0, 1fr); }
    .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
    .site-shell { width: min(calc(100% - 28px), var(--container)); }
    .site-header { grid-template-columns: 1fr auto; }
    .main-nav { display: none; }
    .search-box { width: 170px; }
    .home-layout, .about-layout, .account-layout { grid-template-columns: 1fr; }
    .profile-card, .about-aside { position: static; }
    .profile-card { display: grid; grid-template-columns: 260px minmax(0, 1fr); }
    .profile-visual { min-height: 100%; border-right: 1px solid var(--line); border-bottom: 0; }
    .profile-visual img { width: 100%; max-height: 330px; }
    .link-grid { grid-template-columns: 1fr; }
    .latest-grid { grid-template-columns: 1fr; }
    .about-aside { grid-row: 1; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .auth-shell { grid-template-columns: 1fr; }
    .auth-brand-panel { display: none; }
    .auth-form-panel { min-height: 100vh; }
    .admin-shell { display: block; }
    .admin-sidebar { position: fixed; left: 0; top: 0; width: 276px; transform: translateX(-102%); transition: transform 220ms ease; }
    .admin-body.menu-open .admin-sidebar { transform: translateX(0); }
    .admin-menu-toggle { display: inline-grid; }
    .admin-backdrop { position: fixed; inset: 0; z-index: 70; display: block; background: rgba(2, 6, 14, 0.68); backdrop-filter: blur(3px); }
    .admin-backdrop[hidden] { display: none; }
    .admin-topbar { padding-inline: 18px; }
    .admin-main { padding: 20px 18px 42px; }
    .admin-flashes { margin-inline: 18px; }
    .admin-editor-layout { grid-template-columns: 1fr; }
    .sticky-form { position: static; }
    .account-aside { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
    body { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
    body.admin-body, body.auth-body { padding-bottom: 0; }
    .site-shell { width: min(calc(100% - 20px), var(--container)); }
    .site-header { top: 8px; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; min-height: 62px; margin-top: 8px; padding: 10px; }
    .brand-mark { width: 34px; height: 34px; flex-basis: 34px; font-size: 18px; }
    .brand-copy strong { max-width: 150px; font-size: 13px; }
    .brand-copy small { font-size: 7px; }
    .search-box { display: none; }
    .header-actions { gap: 6px; }
    .header-actions .icon-button { width: 38px; height: 38px; flex-basis: 38px; }
    .site-main { padding: 18px 0 28px; }
    .home-layout { gap: 18px; }
    .profile-card { grid-template-columns: 128px minmax(0, 1fr); }
    .profile-visual { min-height: 248px; }
    .profile-visual::after { inset-inline: 10px; }
    .availability { top: 9px; left: 9px; padding: 4px 6px; font-size: 8px; }
    .profile-copy { padding: 16px 14px; }
    .profile-copy h1 { font-size: 24px; }
    .profile-tagline { margin-top: 8px; font-size: 12px; }
    .profile-meta { gap: 5px; margin: 12px 0; padding: 9px 0; }
    .profile-meta span { font-size: 10px; }
    .link-card { min-height: 94px; padding: 14px; }
    .section-heading h2 { font-size: 20px; }
    .compact-panel { padding: 16px; }
    .page-heading { align-items: center; padding: 24px 18px; }
    .page-heading h1 { font-size: 36px; }
    .page-heading-icon { width: 54px; height: 54px; flex-basis: 54px; }
    .about-intro { grid-template-columns: 112px minmax(0, 1fr); gap: 16px; padding: 16px; }
    .about-portrait { height: 156px; }
    .about-intro h1 { font-size: 28px; }
    .prose-panel, .feedback-panel { padding: 18px; }
    .about-aside, .account-aside { grid-template-columns: 1fr; }
    .form-grid, .two-columns, .textarea-columns { grid-template-columns: 1fr; }
    .search-page-form { grid-template-columns: auto minmax(0, 1fr); }
    .search-page-form .button { grid-column: 1 / -1; }
    .site-footer { align-items: flex-start; flex-direction: column; padding-bottom: 18px; }
    .mobile-nav { position: fixed; right: 10px; bottom: calc(8px + env(safe-area-inset-bottom)); left: 10px; z-index: 60; display: grid; grid-template-columns: repeat(4, 1fr); min-height: 60px; padding: 6px; border: 1px solid var(--line); border-radius: var(--radius); background: color-mix(in srgb, var(--surface) 92%, transparent); box-shadow: 0 14px 50px rgba(0, 0, 0, 0.3); backdrop-filter: blur(18px); }
    .mobile-nav-link { display: grid; place-items: center; align-content: center; gap: 3px; min-height: 46px; border-radius: 6px; color: var(--muted); font-size: 9px; font-weight: 700; }
    .mobile-nav-link.is-active { background: var(--accent-soft); color: var(--accent); }
    .auth-form-panel { padding: 22px; }
    .auth-heading { margin-top: 24px; }
    .auth-heading h2 { font-size: 32px; }
    .admin-topbar { min-height: 70px; padding: 10px 12px; }
    .admin-title-row h1 { font-size: 18px; }
    .admin-user-chip > span:last-child { display: none; }
    .admin-main { padding: 16px 12px 32px; }
    .admin-flashes { margin: 12px 12px 0; }
    .admin-welcome { min-height: 132px; padding: 22px; }
    .admin-welcome h2 { font-size: 23px; }
    .admin-welcome-mark { display: none; }
    .stat-grid, .admin-two-column { grid-template-columns: 1fr; }
    .admin-page-copy { align-items: flex-start; flex-direction: column; }
    .admin-link-row { grid-template-columns: 24px minmax(0, 1fr); }
    .admin-link-row .row-actions { grid-column: 2; }
    .admin-download-row { grid-template-columns: auto minmax(0, 1fr) auto; }
    .admin-download-row .visibility-pill { display: none; }
    .admin-download-row .row-actions { grid-column: 2 / -1; }
    .admin-form, .admin-list-panel, .settings-form { padding: 16px; }
    .form-footer { align-items: flex-start; flex-direction: column; }
    .form-footer .button { width: 100%; }
    .feedback-actions { flex-wrap: wrap; }
    h1 { font-size: 36px; }
    h2 { font-size: 21px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}
.compact-panel .empty-state.compact,
.admin-two-column .empty-state.compact {
    padding: 22px 12px;
    border: 0;
}

.home-content > .link-panel .empty-state.compact {
    border-color: var(--line);
}
.mobile-search-link { display: none; }

@media (max-width: 640px) {
    .mobile-search-link { display: inline-grid; }
}
html[data-theme="light"] body.public-body,
html[data-theme="light"] body.auth-body,
html[data-theme="light"] body.admin-body {
    background-color: #eaf2fb;
    background-image: none;
}

html[data-theme="light"] .site-header {
    border-color: rgba(220, 231, 244, 0.9);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 8px 28px rgba(67, 110, 160, 0.075);
}

html[data-theme="light"] .brand-mark {
    background: var(--accent);
    color: #ffffff;
}

html[data-theme="light"] .brand-copy strong {
    color: var(--accent);
}

html[data-theme="light"] .profile-visual,
html[data-theme="light"] .about-portrait {
    background-color: #f8fbff;
    background-image: none;
}

html[data-theme="light"] .profile-visual::after {
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

html[data-theme="light"] .page-heading,
html[data-theme="light"] .admin-welcome {
    background-color: #ffffff;
    background-image: none;
}

html[data-theme="light"] .auth-brand-panel {
    background-color: #edf6ff;
    background-image: none;
}

html[data-theme="light"] .auth-brand-copy {
    background: rgba(255, 255, 255, 0.86);
}

html[data-theme="light"] .admin-sidebar {
    background: #f8fbff;
}

html[data-theme="light"] .admin-topbar {
    background: rgba(255, 255, 255, 0.92);
}

html[data-theme="light"] .mobile-nav {
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 14px 44px rgba(67, 110, 160, 0.16);
}

html[data-theme="light"] .link-card,
html[data-theme="light"] .panel,
html[data-theme="light"] .stat-card,
html[data-theme="light"] .search-page-form {
    box-shadow: var(--shadow-soft);
}

html[data-theme="light"] .site-footer {
    border-top-color: #d9e5f2;
}