


:root {
    --bg: #eef4fb;
    --bg-2: #e6f0fa;
    --card: #ffffff;
    --card-2: #f7fbff;
    --card-3: #f1f7fe;
    --text: #26374a;
    --heading: #16283d;
    --muted: #7b8da3;
    --muted-2: #9aabbd;
    --border: #e4edf7;
    --border-strong: #d5e3f2;
    --primary: #2f7fd6;
    --primary-strong: #2368b5;
    --primary-soft: #e9f3fd;
    --primary-soft-2: #dcecff;
    --accent: #5bc0eb;
    --gold: #c8912f;
    --gold-soft: #fdf4e1;
    --gold-strong: #a9771f;
    --danger: #d95c5c;
    --danger-soft: #fdecec;
    --success: #2e9e74;
    --success-soft: #e6f7ef;
    --shadow-sm: 0 2px 10px rgba(31, 86, 140, .05);
    --shadow: 0 10px 30px rgba(31, 86, 140, .08);
    --shadow-lg: 0 24px 60px rgba(31, 86, 140, .15);
    --radius: 18px;
    --radius-sm: 12px;
    --radius-lg: 24px;
    --container: 1180px;
    --font: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", sans-serif;
    --mono: "JetBrains Mono", "Cascadia Code", Consolas, "SFMono-Regular", monospace;
    --nav-height: 66px;
}

html[data-accent="teal"] {
    --primary: #159290;
    --primary-strong: #0d7a78;
    --primary-soft: #e3f7f5;
    --primary-soft-2: #d2f1ee;
    --accent: #38c6b8;
}

html[data-accent="violet"] {
    --primary: #7357e8;
    --primary-strong: #5b41c4;
    --primary-soft: #efebff;
    --primary-soft-2: #e3dbff;
    --accent: #a78bfa;
}

html[data-accent="rose"] {
    --primary: #dd5b80;
    --primary-strong: #c14266;
    --primary-soft: #fdebf1;
    --primary-soft-2: #fbd9e4;
    --accent: #f08fae;
}

html[data-accent="amber"] {
    --primary: #cf8425;
    --primary-strong: #b06d16;
    --primary-soft: #fdf2e0;
    --primary-soft-2: #fbe6c7;
    --accent: #f0b455;
}

html[data-theme="dark"] {
    --bg: #0c1622;
    --bg-2: #101d2c;
    --card: #142233;
    --card-2: #18283b;
    --card-3: #1b2c41;
    --text: #c6d6e7;
    --heading: #eef6ff;
    --muted: #8ba0b7;
    --muted-2: #6c8299;
    --border: #223449;
    --border-strong: #2c415a;
    --primary: #4c9df0;
    --primary-strong: #6fb3f7;
    --primary-soft: #17314d;
    --primary-soft-2: #1b3a5c;
    --gold: #e0b257;
    --gold-soft: #332813;
    --gold-strong: #f0c878;
    --danger: #ef7b7b;
    --danger-soft: #3a1e22;
    --success: #52c496;
    --success-soft: #123328;
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, .25);
    --shadow: 0 12px 34px rgba(0, 0, 0, .32);
    --shadow-lg: 0 28px 70px rgba(0, 0, 0, .45);
}


*, *::before, *::after { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.7;
    color: var(--text);
    background:
        radial-gradient(900px 420px at 8% -8%, rgba(123, 190, 240, .18), transparent 60%),
        radial-gradient(760px 380px at 96% 6%, rgba(160, 210, 250, .16), transparent 62%),
        linear-gradient(180deg, var(--bg) 0%, var(--bg) 60%, var(--bg-2) 100%);
    background-attachment: fixed;
    min-height: 100vh;
    overflow-x: hidden;
}

html[data-theme="dark"] body {
    background:
        radial-gradient(900px 420px at 8% -8%, rgba(38, 92, 150, .25), transparent 60%),
        radial-gradient(760px 380px at 96% 6%, rgba(44, 88, 140, .2), transparent 62%),
        linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
}

a { color: var(--primary); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--primary-strong); }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4, p { margin: 0; }
ul, ol { margin: 0; }
textarea { resize: vertical; }
::selection { background: var(--primary); color: #fff; }

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

.muted { color: var(--muted); }
[hidden] { display: none !important; }
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.icon {
    width: 18px;
    height: 18px;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    vertical-align: -.16em;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .16em;
    color: var(--primary);
    text-transform: uppercase;
}
.eyebrow .icon { width: 14px; height: 14px; }


.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 10px 18px;
    border-radius: 12px;
    border: 1px solid transparent;
    background: var(--card-3);
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease, border-color .18s ease;
}
.btn .icon { width: 16px; height: 16px; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-strong));
    color: #fff;
    box-shadow: 0 8px 20px rgba(47, 127, 214, .24);
}
.btn-primary:hover { color: #fff; box-shadow: 0 12px 26px rgba(47, 127, 214, .32); }
.btn-ghost {
    background: var(--card);
    border-color: var(--border-strong);
    color: var(--text);
}
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.btn-soft { background: var(--primary-soft); color: var(--primary); }
.btn-soft:hover { background: var(--primary-soft-2); }
.btn-gold {
    background: linear-gradient(135deg, #f0c46e, #d09a35);
    color: #3d2b08;
    box-shadow: 0 8px 18px rgba(200, 145, 47, .28);
}
.btn-gold:hover { color: #3d2b08; box-shadow: 0 12px 24px rgba(200, 145, 47, .36); }
.btn-gold-outline {
    background: var(--gold-soft);
    border-color: rgba(200, 145, 47, .35);
    color: var(--gold-strong);
}
.btn-gold-outline:hover { background: #fbe9c4; color: var(--gold-strong); }
.btn-disabled { background: var(--card-3); color: var(--muted-2); cursor: not-allowed; border-color: var(--border); }
.btn-lg { padding: 14px 26px; font-size: 15px; border-radius: 14px; }
.btn-sm { padding: 8px 14px; font-size: 13px; border-radius: 10px; }
.btn-xs { padding: 6px 10px; font-size: 12px; border-radius: 8px; }
.btn-block { width: 100%; }
.btn.danger { color: var(--danger); }
.btn.danger:hover { background: var(--danger-soft); border-color: rgba(217, 92, 92, .35); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 0;
    border-radius: 11px;
    background: transparent;
    color: var(--muted);
    transition: background .18s ease, color .18s ease, transform .18s ease;
}
.icon-btn:hover { background: var(--primary-soft); color: var(--primary); }
.icon-btn.small { width: 30px; height: 30px; border-radius: 9px; }
.icon-btn.small .icon { width: 15px; height: 15px; }
.icon-btn.danger:hover { background: var(--danger-soft); color: var(--danger); }
.icon-btn.active { color: var(--gold); background: var(--gold-soft); }


.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    border-radius: 7px;
    background: var(--card-3);
    color: var(--muted);
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1.6;
}
.badge .icon { width: 12px; height: 12px; }
.badge-vip { background: var(--gold-soft); color: var(--gold-strong); border: 1px solid rgba(200, 145, 47, .22); }
.badge-admin { background: var(--primary-soft); color: var(--primary); }
.badge-author { background: var(--success-soft); color: var(--success); }
.badge-platform { background: var(--primary-soft); color: var(--primary); }

.tag-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 9px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.6;
    color: var(--text);
    background: var(--card-3);
    border: 1px solid transparent;
    transition: transform .18s ease, border-color .18s ease;
}
.tag-chip span { opacity: .55; font-size: 10.5px; }
.tag-chip:hover { transform: translateY(-1px); border-color: var(--border-strong); }
.tag-sky { background: #e8f3fe; color: #2c6da8; }
.tag-mint { background: #e5f7ef; color: #1f7d5b; }
.tag-violet { background: #efeaff; color: #6448c9; }
.tag-amber { background: #fdf1dd; color: #a06a18; }
.tag-rose { background: #fdebf1; color: #b7476b; }
.tag-blue { background: #e9eefb; color: #3f5fa8; }
html[data-theme="dark"] .tag-sky { background: #16324a; color: #8cc7f5; }
html[data-theme="dark"] .tag-mint { background: #12382b; color: #7ad7b3; }
html[data-theme="dark"] .tag-violet { background: #2a2350; color: #b9a8ff; }
html[data-theme="dark"] .tag-amber { background: #3a2c15; color: #eec37a; }
html[data-theme="dark"] .tag-rose { background: #3a2029; color: #f0a2b9; }
html[data-theme="dark"] .tag-blue { background: #1c2a4a; color: #a3b8ea; }

.status {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border-radius: 7px;
    font-size: 11.5px;
    font-weight: 600;
    background: var(--card-3);
    color: var(--muted);
    white-space: nowrap;
}
.status-published { background: var(--success-soft); color: var(--success); }
.status-draft { background: var(--card-3); color: var(--muted); }
.status-top { background: var(--gold-soft); color: var(--gold-strong); }

.chip-soft {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 8px;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 11.5px;
    font-weight: 600;
}
.chip-soft.gold { background: var(--gold-soft); color: var(--gold-strong); }

.meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 9px;
    border-radius: 8px;
    background: var(--card-3);
    color: var(--muted);
    font-size: 12px;
    line-height: 1.6;
    white-space: nowrap;
}
.meta-chip .icon { width: 13px; height: 13px; }
.meta-category { background: var(--primary-soft); color: var(--primary); }
.meta-category::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--cat, var(--primary));
}
.pin-chip { background: var(--gold-soft); color: var(--gold-strong); }
.amount.income { color: var(--success); font-weight: 600; }
.amount.expense { color: var(--danger); font-weight: 600; }


.card {
    background: var(--card);
    border: 1px solid rgba(255, 255, 255, .55);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
html[data-theme="dark"] .card { border-color: var(--border); }
.card-soft { background: var(--card-2); }

.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; }
.field-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text);
}
.field-label em { font-style: normal; font-weight: 400; color: var(--muted-2); font-size: 11.5px; }
.field input[type="text"],
.field input[type="email"],
.field input[type="password"],
.field input[type="number"],
.field input[type="search"],
.field input[type="url"],
.field select,
.field textarea {
    width: 100%;
    padding: 10px 13px;
    border: 1px solid var(--border-strong);
    border-radius: 11px;
    background: var(--card-2);
    color: var(--text);
    font-size: 13.5px;
    outline: none;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
    border-color: var(--primary);
    background: var(--card);
    box-shadow: 0 0 0 4px var(--primary-soft);
}
.field input:disabled { opacity: .65; cursor: not-allowed; }
.field input[type="color"] { width: 100%; height: 42px; padding: 4px; border: 1px solid var(--border-strong); border-radius: 11px; background: var(--card-2); }
.field-help { font-size: 11.5px; color: var(--muted-2); }
.field-error { font-size: 11.5px; color: var(--danger); }
.field.has-error input, .field.has-error textarea { border-color: var(--danger); }
.field-control {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 0 13px;
    border: 1px solid var(--border-strong);
    border-radius: 11px;
    background: var(--card-2);
    color: var(--muted);
}
.field-control:focus-within { border-color: var(--primary); background: var(--card); box-shadow: 0 0 0 4px var(--primary-soft); }
.field-control input { border: 0 !important; background: transparent !important; padding: 11px 0 !important; box-shadow: none !important; }
.field-control .icon { width: 17px; height: 17px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-row.three { grid-template-columns: repeat(3, 1fr); }
.form-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 700;
    color: var(--heading);
    margin-bottom: 18px;
}
.form-title .icon { width: 18px; height: 18px; color: var(--primary); }
.form-note { display: flex; gap: 7px; align-items: flex-start; font-size: 12px; color: var(--muted); line-height: 1.7; margin-top: 14px; }
.form-note .icon { width: 14px; height: 14px; margin-top: 3px; color: var(--muted-2); }
.form-alert {
    display: flex;
    gap: 12px;
    padding: 16px 18px;
    border-radius: 14px;
    background: var(--danger-soft);
    border: 1px solid rgba(217, 92, 92, .25);
    color: var(--danger);
    margin-bottom: 18px;
    font-size: 13px;
}
.form-alert ul { padding-left: 18px; margin-top: 4px; }
.check-line { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text); cursor: pointer; }
.check-line input { width: 15px; height: 15px; accent-color: var(--primary); }

input[type="file"] { font-size: 12px; color: var(--muted); max-width: 100%; }
input[type="file"]::file-selector-button {
    margin-right: 10px;
    padding: 7px 12px;
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    background: var(--card);
    color: var(--text);
    font-family: var(--font);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color .18s ease, color .18s ease;
}
input[type="file"]::file-selector-button:hover { border-color: var(--primary); color: var(--primary); }


.hero {
    position: relative;
    height: 340px;
    background: #1f6cba;
    overflow: hidden;
}
.hero-art {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center 42%;
    transform: scale(1.01);
}
.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(8, 38, 70, .28) 0%, rgba(8, 38, 70, 0) 42%),
        linear-gradient(180deg, transparent 55%, var(--bg) 100%);
}
.site-header {
    position: relative;
    z-index: 8;
    padding-top: 22px;
}
.nav-card {
    display: flex;
    align-items: center;
    gap: 14px;
    height: var(--nav-height);
    padding: 0 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 16px 40px rgba(9, 45, 84, .18);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, .75);
}
html[data-theme="dark"] .nav-card { background: rgba(18, 32, 48, .92); border-color: rgba(255, 255, 255, .06); }

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--heading); }
.brand:hover { color: var(--heading); }
.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 11px;
    background: var(--primary-soft);
    color: var(--primary);
    flex: none;
}
.brand-mark .icon { width: 21px; height: 21px; }
.brand-text { font-size: 17.5px; font-weight: 800; letter-spacing: .2px; white-space: nowrap; }

.nav-menu { display: flex; align-items: center; gap: 2px; margin: 0 auto; }
.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 9px 13px;
    border-radius: 10px;
    color: #4c637c;
    font-size: 14.5px;
    font-weight: 500;
    background: transparent;
    border: 0;
    white-space: nowrap;
}
html[data-theme="dark"] .nav-link { color: #b2c4d8; }
.nav-link:hover { color: var(--primary); background: var(--primary-soft); }
.nav-link.active { color: var(--primary); background: var(--primary-soft); font-weight: 700; }
.nav-dropdown { position: relative; }
.nav-more-icon { width: 13px; height: 13px; transform: rotate(90deg); }
.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translate(-50%, 6px);
    min-width: 150px;
    padding: 8px;
    border-radius: 13px;
    background: var(--card);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transition: opacity .18s ease, transform .18s ease, visibility .18s;
    z-index: 30;
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.nav-dropdown-menu a { display: block; padding: 8px 12px; border-radius: 8px; font-size: 13.5px; color: var(--text); }
.nav-dropdown-menu a:hover { background: var(--primary-soft); color: var(--primary); }

.nav-tools { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.theme-mode-btn .icon { width: 19px; height: 19px; }
.theme-mode-btn .icon-sun { display: none; }
html[data-theme="dark"] .theme-mode-btn .icon-sun { display: block; }
html[data-theme="dark"] .theme-mode-btn .icon-moon { display: none; }
.nav-avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; border: 2px solid #fff; box-shadow: 0 4px 10px rgba(20, 60, 100, .2); display: block; }
.nav-login {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 11px;
    background: var(--primary);
    color: #fff;
    font-size: 13.5px;
    font-weight: 600;
    margin-left: 4px;
}
.nav-login:hover { color: #fff; background: var(--primary-strong); }
.nav-login .icon { width: 16px; height: 16px; }
.nav-burger { display: none; margin-left: auto; }

.user-menu { position: relative; }
.user-menu summary { list-style: none; cursor: pointer; display: flex; }
.user-menu summary::-webkit-details-marker { display: none; }
.user-dropdown {
    position: absolute;
    top: calc(100% + 14px);
    right: 0;
    width: 228px;
    padding: 8px;
    border-radius: 16px;
    background: var(--card);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    z-index: 40;
}
.user-drop-head { padding: 10px 12px 12px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.user-drop-head strong { display: block; font-size: 14px; color: var(--heading); }
.user-drop-head span { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.user-dropdown a, .user-dropdown button {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    padding: 9px 12px;
    border-radius: 9px;
    border: 0;
    background: transparent;
    color: var(--text);
    font-size: 13px;
    text-align: left;
}
.user-dropdown a:hover, .user-dropdown button:hover { background: var(--primary-soft); color: var(--primary); }
.user-dropdown .icon { width: 16px; height: 16px; color: var(--muted); }
.user-dropdown form { margin-top: 4px; border-top: 1px solid var(--border); padding-top: 4px; }

.search-panel {
    position: absolute;
    left: 24px;
    right: 24px;
    top: calc(100% + 10px);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    border-radius: 16px;
    background: var(--card);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    z-index: 20;
}
.search-panel-icon { color: var(--primary); width: 20px; height: 20px; }
.search-panel input {
    flex: 1;
    border: 0;
    outline: none;
    background: transparent;
    font-size: 15px;
    color: var(--text);
}
.search-hint { font-size: 11.5px; color: var(--muted-2); white-space: nowrap; }
.search-result-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    margin-bottom: 14px;
    border-radius: 12px;
    background: var(--card);
    border: 1px solid var(--border);
    font-size: 12.5px;
    color: var(--muted);
}
.search-result-bar strong { color: var(--primary); }
.search-result-bar a { margin-left: auto; font-size: 12px; }


.site-main { position: relative; z-index: 4; margin-top: -52px; padding-bottom: 64px; }
.layout-grid { display: grid; grid-template-columns: 256px minmax(0, 1fr); gap: 22px; align-items: start; }
.content-col { min-width: 0; }
.sidebar { display: flex; flex-direction: column; gap: 18px; position: sticky; top: 18px; }

.side-card {
    background: var(--card);
    border: 1px solid rgba(255, 255, 255, .55);
    border-radius: 18px;
    box-shadow: var(--shadow);
    overflow: hidden;
}
html[data-theme="dark"] .side-card { border-color: var(--border); }
.side-head {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 15px 16px 11px;
}
.side-head h3 { font-size: 14.5px; font-weight: 700; color: var(--heading); }
.side-bar { width: 4px; height: 15px; border-radius: 3px; background: linear-gradient(180deg, var(--primary), var(--accent)); }
.side-extra { margin-left: auto; font-size: 11.5px; color: var(--muted); }
a.side-extra:hover { color: var(--primary); }


.profile-card { padding: 12px; }
.profile-cover { position: relative; border-radius: 13px; overflow: hidden; aspect-ratio: 1 / 1; background: var(--primary-soft); }
.profile-cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s ease; }
.profile-card:hover .profile-cover img { transform: scale(1.03); }
.profile-badge {
    position: absolute;
    left: 10px;
    bottom: 10px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 9px;
    border-radius: 8px;
    background: rgba(255, 255, 255, .9);
    color: var(--gold-strong);
    font-size: 11px;
    font-weight: 700;
    backdrop-filter: blur(8px);
}
.profile-badge .icon { width: 13px; height: 13px; }
.profile-body { padding: 16px 6px 4px; text-align: center; }
.profile-name { font-size: 17px; font-weight: 800; color: var(--heading); letter-spacing: .2px; }
.profile-tagline { font-size: 12px; color: var(--muted); margin-top: 3px; }
.profile-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    margin: 15px 0;
    padding: 12px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.profile-stats div { display: flex; flex-direction: column; gap: 2px; }
.profile-stats div + div { border-left: 1px solid var(--border); }
.profile-stats strong { font-size: 15px; color: var(--heading); font-weight: 800; }
.profile-stats span { font-size: 10.5px; color: var(--muted); }



.tags-card { padding-bottom: 16px; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 7px; padding: 4px 16px 0; }


.notice {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 16px;
    border-radius: 16px;
    background: linear-gradient(120deg, var(--primary-soft), rgba(255, 255, 255, .9));
    border: 1px solid rgba(47, 127, 214, .14);
    margin-bottom: 18px;
    box-shadow: var(--shadow-sm);
}
html[data-theme="dark"] .notice { background: linear-gradient(120deg, var(--primary-soft), var(--card)); border-color: var(--border); }
.notice-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: #fff; color: var(--primary); flex: none; box-shadow: 0 4px 10px rgba(47, 127, 214, .12); }
html[data-theme="dark"] .notice-icon { background: var(--card-2); }
.notice p { flex: 1; font-size: 12.5px; color: #4e6c8a; line-height: 1.7; }
html[data-theme="dark"] .notice p { color: var(--text); }
.notice-link { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.notice-link .icon { width: 13px; height: 13px; }

.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.section-head.compact { margin-bottom: 12px; }
.breadcrumb { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted-2); margin-bottom: 5px; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--primary); }
.section-title { font-size: 24px; font-weight: 800; color: var(--heading); letter-spacing: -.3px; line-height: 1.3; }
.section-sub { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.section-aside { display: flex; align-items: center; gap: 10px; padding-bottom: 2px; }
.section-count { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.section-count .icon { width: 14px; height: 14px; }

.post-list { display: flex; flex-direction: column; gap: 18px; }
.post-card {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 204px;
    gap: 22px;
    padding: 22px;
    border-radius: var(--radius);
    background: var(--card);
    border: 1px solid rgba(255, 255, 255, .6);
    box-shadow: var(--shadow);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
html[data-theme="dark"] .post-card { border-color: var(--border); }
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: rgba(47, 127, 214, .22); }
.post-pin {
    position: absolute;
    top: 16px;
    left: 16px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 7px;
    background: var(--gold-soft);
    color: var(--gold-strong);
    font-size: 10.5px;
    font-weight: 700;
    z-index: 2;
}
.post-pin .icon { width: 11px; height: 11px; }
.post-main { min-width: 0; display: flex; flex-direction: column; }
.post-title { position: relative; padding-left: 15px; font-size: 21px; font-weight: 800; line-height: 1.5; letter-spacing: -.2px; }
.post-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: .42em;
    width: 4px;
    height: 1.05em;
    border-radius: 4px;
    background: linear-gradient(180deg, var(--primary), var(--accent));
}
.post-title a { color: var(--heading); display: inline; }
.post-title a:hover { color: var(--primary); }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-top: 10px; }
.post-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.post-tags a { font-size: 11.5px; color: var(--primary); background: var(--primary-soft); padding: 2px 8px; border-radius: 6px; line-height: 1.7; }
.post-tags a:hover { background: var(--primary-soft-2); }
.post-excerpt {
    font-size: 13.5px;
    line-height: 1.85;
    color: var(--muted);
    margin: 12px 0 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.post-foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: auto; }
.post-stats { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.post-stats span { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); }
.post-stats .icon { width: 14px; height: 14px; }
.post-stats .stat-download { color: var(--gold-strong); }
.read-more { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600; color: var(--primary); white-space: nowrap; }
.read-more .icon { width: 14px; height: 14px; transition: transform .2s ease; }
.read-more:hover .icon { transform: translateX(3px); }
.post-thumb {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 13px;
    overflow: hidden;
    background: var(--primary-soft);
    align-self: center;
}
.post-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .55s ease; }
.post-card:hover .post-thumb img { transform: scale(1.05); }


.pager { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 28px; flex-wrap: wrap; }
.pager-btn {
    display: inline-grid;
    place-items: center;
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    border-radius: 11px;
    background: var(--card);
    border: 1px solid var(--border);
    color: var(--muted);
    font-size: 12.5px;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}
.pager-btn:hover { color: var(--primary); border-color: var(--primary); }
.pager-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.pager-btn.disabled { opacity: .45; pointer-events: none; }


.empty-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 56px 24px;
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, .5);
}
.empty-icon { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 20px; background: var(--primary-soft); color: var(--primary); margin-bottom: 16px; }
.empty-icon .icon { width: 30px; height: 30px; }
.empty-card h3 { font-size: 17px; color: var(--heading); }
.empty-card p { font-size: 13px; color: var(--muted); margin: 6px 0 18px; }


.post-detail {
    background: var(--card);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, .6);
    box-shadow: var(--shadow);
    padding: 34px 38px 30px;
}
html[data-theme="dark"] .post-detail { border-color: var(--border); }
.detail-badges { display: flex; flex-wrap: wrap; gap: 7px; }
.detail-title { font-size: 33px; line-height: 1.4; font-weight: 800; color: var(--heading); letter-spacing: -.6px; margin: 14px 0 16px; }
.detail-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 13px; font-size: 12px; color: var(--muted); }
.detail-meta > span { display: inline-flex; align-items: center; gap: 4px; }
.detail-meta .icon { width: 14px; height: 14px; }
.detail-author { display: inline-flex; align-items: center; gap: 8px; color: var(--text); font-weight: 600; }
.detail-author img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
.detail-author:hover { color: var(--primary); }
.detail-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--border-strong); padding: 0 !important; }
.detail-edit { display: inline-flex; align-items: center; gap: 2px; margin-left: auto; }
.detail-edit form { display: flex; }
.detail-cover { margin: 24px 0 6px; border-radius: 16px; overflow: hidden; aspect-ratio: 2.05 / 1; background: var(--primary-soft); }
.detail-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }

.prose { font-size: 15.5px; line-height: 1.95; color: var(--text); overflow-wrap: anywhere; }
.prose > *:first-child { margin-top: 0; }
.prose > *:last-child { margin-bottom: 0; }
.prose p { margin: 1.05em 0; }
.prose h1, .prose h2, .prose h3, .prose h4 { color: var(--heading); line-height: 1.45; margin: 1.6em 0 .7em; font-weight: 800; }
.prose h1 { font-size: 28px; }
.prose h2 { font-size: 23px; }
.prose h3 { font-size: 19px; }
.prose h4 { font-size: 16.5px; }
.prose a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.prose strong { color: var(--heading); font-weight: 700; }
.prose ul, .prose ol { padding-left: 1.5em; margin: 1em 0; }
.prose li { margin: .45em 0; }
.prose li::marker { color: var(--primary); }
.prose blockquote {
    margin: 1.4em 0;
    padding: 14px 18px;
    border-left: 4px solid var(--primary);
    border-radius: 0 12px 12px 0;
    background: var(--primary-soft);
    color: var(--text);
}
.prose blockquote p { margin: .3em 0; }
.prose code {
    font-family: var(--mono);
    font-size: .88em;
    padding: 2px 6px;
    border-radius: 5px;
    background: var(--card-3);
    color: var(--primary-strong);
}
.prose pre {
    margin: 1.4em 0;
    padding: 18px 20px;
    border-radius: 14px;
    background: #0f1c2e;
    color: #d9e6f5;
    overflow-x: auto;
    font-size: 13px;
    line-height: 1.7;
}
.prose pre code { background: transparent; color: inherit; padding: 0; font-size: inherit; }
.prose hr { border: 0; height: 1px; background: var(--border); margin: 2em 0; }
.prose img {
    display: block;
    max-width: 100% !important;
    height: auto !important;
    margin: 1.5em auto;
    border-radius: 12px;
    object-fit: contain;
}
.prose figure { margin: 1.6em 0; max-width: 100%; }
.prose figure img { margin: 0 auto; }
.prose figcaption { text-align: center; font-size: 12px; color: var(--muted); margin-top: 8px; }
.prose .table-wrap { overflow-x: auto; margin: 1.4em 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.prose th, .prose td { padding: 9px 12px; border: 1px solid var(--border); text-align: left; }
.prose th { background: var(--card-3); font-weight: 700; color: var(--heading); }
.prose video { max-width: 100%; border-radius: 12px; }
.prose iframe { max-width: 100%; }

.detail-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--border); }
.detail-tags { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; font-size: 12px; color: var(--muted); }
.detail-tags .icon { width: 14px; height: 14px; }
.detail-tags a { padding: 3px 9px; border-radius: 7px; background: var(--card-3); color: var(--muted); font-size: 11.5px; }
.detail-tags a:hover { background: var(--primary-soft); color: var(--primary); }


.download-card { padding: 26px 30px; margin-top: 20px; }
.download-info { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 20px; padding: 20px 26px; border: 1px solid var(--border); border-radius: 18px; background: linear-gradient(135deg, var(--primary-soft), var(--surface) 60%); }
.download-info-main { min-width: 0; }
.download-info-main h3 { display: flex; align-items: center; gap: 7px; margin: 0 0 6px; font-size: 14px; color: var(--heading); }
.download-info-main h3 .icon { width: 17px; height: 17px; color: var(--primary); }
.download-info-text { font-size: 12.5px; line-height: 1.9; color: var(--muted); overflow-wrap: anywhere; }
.download-qr { flex: none; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.download-qr img { width: 112px; height: 112px; object-fit: contain; border-radius: 10px; background: #fff; padding: 5px; border: 1px solid var(--border); }
.download-qr span { font-size: 10.5px; color: var(--muted-2); }
.download-info + .download-card { margin-top: 12px; }
.block-head { display: flex; align-items: flex-start; gap: 13px; }
.block-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--primary-soft); color: var(--primary); flex: none; }
.block-icon .icon { width: 21px; height: 21px; }
.block-head-text { flex: 1; min-width: 0; }
.block-head-text h2 { display: flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 800; color: var(--heading); }
.block-head-text p { font-size: 12px; color: var(--muted); margin-top: 3px; line-height: 1.7; }
.block-count { display: inline-grid; place-items: center; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 6px; background: var(--primary-soft); color: var(--primary); font-size: 11px; font-weight: 700; }
.vip-ribbon {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 11px;
    border-radius: 9px;
    background: var(--gold-soft);
    color: var(--gold-strong);
    font-size: 11.5px;
    font-weight: 700;
    white-space: nowrap;
}
.vip-ribbon .icon { width: 13px; height: 13px; }
.vip-ribbon-muted { background: var(--card-3); color: var(--muted); }
.download-login {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: 12px;
    background: var(--primary-soft);
    color: var(--primary-strong);
    font-size: 12.5px;
}
.download-login .icon { width: 16px; height: 16px; }
.download-login span { flex: 1; }
.download-list { margin-top: 14px; }
.download-item {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 15px 0;
    border-top: 1px solid var(--border);
}
.file-badge {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    width: 54px;
    height: 58px;
    border-radius: 11px;
    background: linear-gradient(160deg, #e9f3ff, #d7e8fb);
    color: #2f6da8;
}
.file-badge .icon { width: 20px; height: 20px; }
.file-badge span { font-size: 9px; font-weight: 800; letter-spacing: .5px; }
.file-badge[data-ext="zip"], .file-badge[data-ext="rar"], .file-badge[data-ext="7z"] { background: linear-gradient(160deg, #fdf1dc, #f7dfb6); color: #9a6a1a; }
.file-badge[data-ext="pdf"] { background: linear-gradient(160deg, #fdebee, #f9d4da); color: #b24058; }
.file-badge[data-ext="doc"], .file-badge[data-ext="docx"] { background: linear-gradient(160deg, #e9f1ff, #d3e3fb); color: #2b5da8; }
.file-badge[data-ext="psd"], .file-badge[data-ext="ai"] { background: linear-gradient(160deg, #f0ebff, #e0d6ff); color: #6245c4; }
.file-badge[data-ext="mp3"], .file-badge[data-ext="mp4"] { background: linear-gradient(160deg, #e6f8f1, #cff0e2); color: #1f8360; }
.file-info { min-width: 0; }
.file-info h3 { font-size: 14.5px; font-weight: 700; color: var(--heading); line-height: 1.5; }
.file-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 4px; font-size: 11.5px; color: var(--muted); }
.file-meta span { display: inline-flex; align-items: center; gap: 4px; }
.file-meta .icon { width: 12px; height: 12px; }
.file-name { max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; opacity: .8; }
.file-actions { display: flex; flex-direction: column; align-items: stretch; gap: 6px; min-width: 156px; }
.file-actions form { display: flex; }
.file-actions .btn { width: 100%; }
.file-hint { font-size: 10.5px; color: var(--muted); text-align: center; }
.file-hint.ok { color: var(--success); display: inline-flex; align-items: center; justify-content: center; gap: 3px; }
.file-hint .icon { width: 11px; height: 11px; }
.download-note { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted-2); border-top: 1px dashed var(--border); padding-top: 12px; margin-top: 4px; }
.download-note .icon { width: 13px; height: 13px; }

.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 20px; }
.post-nav-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 15px 18px;
    border-radius: 14px;
    background: var(--card);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}
.post-nav-item span { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: var(--muted); }
.post-nav-item strong { font-size: 13px; color: var(--heading); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.post-nav-item:hover strong { color: var(--primary); }
.post-nav-item.next { text-align: right; }
.post-nav-item.next span { justify-content: flex-end; }
.post-nav-item.disabled { opacity: .55; background: var(--card-2); }


.comments { padding: 26px 30px; margin-top: 20px; }
.comment-form { display: flex; gap: 14px; margin-top: 18px; padding: 15px; border-radius: 14px; background: var(--card-2); border: 1px solid var(--border); }
.comment-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: none; }
.comment-input { flex: 1; min-width: 0; }
.comment-input textarea {
    width: 100%;
    min-height: 82px;
    padding: 11px 13px;
    border: 1px solid var(--border-strong);
    border-radius: 11px;
    background: var(--card);
    outline: none;
    font-size: 13.5px;
    line-height: 1.7;
    color: var(--text);
}
.comment-input textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.comment-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; }
.comment-actions span { font-size: 11px; color: var(--muted-2); }
.comment-login { display: flex; align-items: center; gap: 8px; margin-top: 16px; padding: 14px 16px; border-radius: 12px; background: var(--card-2); font-size: 12.5px; color: var(--muted); }
.comment-login .btn { margin-left: auto; }
.comment-list { margin-top: 8px; }
.comment-item { display: flex; gap: 14px; padding: 18px 0; border-top: 1px solid var(--border); }
.comment-body { flex: 1; min-width: 0; }
.comment-head { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.comment-head strong { font-size: 13.5px; color: var(--heading); }
.comment-head time { margin-left: auto; font-size: 11px; color: var(--muted-2); }
.comment-text { font-size: 13.5px; color: var(--text); line-height: 1.8; margin-top: 6px; word-break: break-word; }
.comment-delete { margin-top: 6px; }
.comment-delete button { display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; color: var(--muted-2); font-size: 11px; padding: 2px 0; }
.comment-delete button:hover { color: var(--danger); }
.comment-delete .icon { width: 12px; height: 12px; }
.comment-empty { text-align: center; font-size: 12.5px; color: var(--muted-2); padding: 26px 0 8px; }


.editor-page { max-width: 100%; }
.editor-layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 20px; align-items: start; }
.editor-card { overflow: hidden; }
.editor-titlebar { display: flex; align-items: center; gap: 12px; padding: 18px 22px 8px; }
.editor-title {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: none;
    background: transparent;
    font-size: 26px;
    font-weight: 800;
    color: var(--heading);
    letter-spacing: -.4px;
    padding: 6px 0;
}
.editor-title::placeholder { color: var(--muted-2); font-weight: 700; }
.editor-title-count { font-size: 11px; color: var(--muted-2); white-space: nowrap; }
.editor-title-count b { color: var(--muted); }
.editor-toolbar-row { display: flex; align-items: center; gap: 12px; padding: 8px 22px 12px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.mode-tabs { display: flex; gap: 3px; padding: 3px; border-radius: 10px; background: var(--card-3); }
.mode-tab { display: inline-flex; align-items: center; gap: 5px; padding: 6px 12px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 12.5px; font-weight: 600; }
.mode-tab .icon { width: 14px; height: 14px; }
.mode-tab.active { background: var(--card); color: var(--primary); box-shadow: var(--shadow-sm); }
.editor-tip { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--muted-2); }
.editor-tip .icon { width: 12px; height: 12px; color: var(--gold); }
.editor-save-top { margin-left: auto; }
.rte-toolbar { display: flex; align-items: center; gap: 4px; padding: 9px 18px; background: var(--card-2); border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.tool-group { display: flex; align-items: center; gap: 2px; }
.tool-sep { width: 1px; height: 18px; background: var(--border-strong); margin: 0 5px; }
.tool-spacer { flex: 1; }
.tool-btn { display: grid; place-items: center; min-width: 30px; height: 30px; padding: 0 6px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 700; }
.tool-btn .icon { width: 15px; height: 15px; }
.tool-btn:hover { background: var(--primary-soft); color: var(--primary); }
.color-tools { gap: 4px; }
.color-tool-label { font-size: 12px; font-weight: 800; color: var(--muted); border-bottom: 3px solid #1f2937; line-height: 1; padding-bottom: 1px; margin-right: 2px; }
.color-dot { width: 16px; height: 16px; padding: 0; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .12); background: var(--dot); cursor: pointer; }
.color-dot:hover { transform: scale(1.15); }
.color-reset { font-size: 11px; color: var(--muted); border-bottom: 2px solid #1f2937; border-radius: 0; height: 24px; min-width: 22px; }
.tool-select { height: 30px; padding: 0 6px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface); color: var(--muted); font-size: 11px; }
.rte-editor { min-height: 520px; padding: 24px 26px; outline: none; font-size: 15.5px; line-height: 1.95; overflow-wrap: anywhere; }
.rte-editor:empty::before { content: attr(data-placeholder); color: var(--muted-2); pointer-events: none; }
.rte-editor img { max-width: 100% !important; height: auto !important; border-radius: 10px; }
.rte-editor figure { margin: 1.2em 0; }
.rte-editor figcaption { font-size: 12px; color: var(--muted); text-align: center; }
.rte-editor:focus { background: var(--card); }
.rte-editor.is-dragover { background: var(--primary-soft); box-shadow: inset 0 0 0 2px var(--primary); border-radius: 10px; }
.rte-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 22px; border-top: 1px solid var(--border); font-size: 11px; color: var(--muted-2); }
.rte-footer span { display: inline-flex; align-items: center; gap: 4px; }
.rte-footer .icon { width: 12px; height: 12px; }
.rte-footer b { color: var(--muted); }

.md-grid { display: grid; grid-template-columns: 1fr 1fr; min-height: 560px; }
.md-input {
    width: 100%;
    min-height: 560px;
    padding: 22px 24px;
    border: 0;
    border-right: 1px solid var(--border);
    outline: none;
    resize: vertical;
    background: var(--card);
    color: var(--text);
    font-family: var(--mono);
    font-size: 13.5px;
    line-height: 1.85;
}
.md-preview { padding: 22px 24px; overflow-y: auto; max-height: 720px; border-left: 0; background: var(--card-2); }
.md-result { padding: 24px; }
.md-toolbar-preview { display: none; }
.md-grid.is-preview-only { grid-template-columns: 1fr; }
.md-grid.is-preview-only .md-input { display: none; }
.md-grid.is-preview-only .md-preview { border-left: 0; }
.editor-underbar { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.editor-autosave-hint { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--muted-2); margin-left: auto; }
.editor-autosave-hint .icon { width: 12px; height: 12px; }
.editor-side { display: flex; flex-direction: column; gap: 18px; position: sticky; top: 18px; }
.side-form { padding: 20px; }
.side-form-title { display: flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 700; color: var(--heading); margin-bottom: 16px; }
.side-form-title .icon { width: 16px; height: 16px; color: var(--primary); }
.side-form .field { margin-bottom: 13px; }
.side-form .btn + .btn { margin-top: 8px; }
.side-form .field input, .side-form .field select, .side-form .field textarea { font-size: 13px; padding: 9px 11px; }

.cover-picker { display: flex; flex-direction: column; gap: 8px; }
.cover-preview { position: relative; aspect-ratio: 4 / 3; border-radius: 12px; border: 1px dashed var(--border-strong); background: var(--card-2); overflow: hidden; display: grid; place-items: center; cursor: pointer; }
.cover-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover-preview.has-image { border-style: solid; }
.cover-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--muted-2); font-size: 11.5px; }
.cover-empty .icon { width: 24px; height: 24px; }
.cover-loading { display: flex; align-items: center; gap: 6px; position: absolute; inset: 0; background: rgba(10, 30, 50, .5); color: #fff; font-size: 12px; justify-content: center; }
.cover-loading .icon { width: 15px; height: 15px; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.cover-actions { display: flex; gap: 6px; }
.cover-actions .btn { flex: 1; }

.tips-card { padding: 20px; }
.tips-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.tips-list li { position: relative; padding-left: 15px; font-size: 11.5px; line-height: 1.75; color: var(--muted); }
.tips-list li::before { content: ""; position: absolute; left: 0; top: .62em; width: 5px; height: 5px; border-radius: 50%; background: var(--primary); opacity: .6; }
.tips-list li strong { color: var(--text); }
.tips-list.compact li { font-size: 11px; }
.tips-list code, .form-note code { font-family: var(--mono); font-size: .95em; background: var(--card-3); padding: 1px 4px; border-radius: 4px; }


.attach-admin { padding: 26px 30px; margin-top: 20px; }
.attach-list { margin-top: 16px; }
.attach-row {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr) 200px auto;
    gap: 14px;
    align-items: end;
    padding: 14px 0;
    border-top: 1px solid var(--border);
}
.attach-fields { display: grid; grid-template-columns: 1.5fr 1fr; gap: 10px; }
.attach-fields .field { margin: 0; }
.attach-channels { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; padding-bottom: 8px; }
.attach-meta { font-size: 10.5px; color: var(--muted-2); }
.attach-actions { display: flex; flex-direction: column; gap: 5px; padding-bottom: 2px; }
.attach-upload { margin-top: 20px; padding-top: 20px; border-top: 1px dashed var(--border); }
.attach-upload h3 { display: flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 700; color: var(--heading); margin-bottom: 14px; }
.attach-upload h3 .icon { width: 16px; height: 16px; color: var(--primary); }
.attach-upload-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px 16px; }
.attach-upload-grid .field { margin-bottom: 12px; }
.attach-empty { display: flex; align-items: center; gap: 8px; padding: 24px 0 8px; font-size: 12.5px; color: var(--muted-2); }
.attach-empty .icon { width: 18px; height: 18px; }
.attach-hint { display: flex; gap: 14px; align-items: flex-start; padding: 22px 26px; margin-top: 20px; }
.attach-hint h3 { font-size: 14.5px; color: var(--heading); margin-bottom: 4px; }
.attach-hint p { font-size: 12.5px; color: var(--muted); line-height: 1.8; }

.attach-inline { padding: 22px 26px; margin-top: 18px; }
.attach-inline .mini-head { margin: 0 0 6px; }
.attach-inline .form-note { margin: 4px 0 0; }
.new-attach-head, .new-attach-row {
    display: grid;
    grid-template-columns: 104px minmax(180px, 1.6fr) minmax(140px, 1fr) 96px 128px 34px;
    gap: 10px;
    align-items: center;
}
.new-attach-head {
    margin-top: 14px;
    padding: 0 2px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .04em;
    color: var(--muted-2);
    text-transform: uppercase;
}
.new-attach-row { padding: 8px 0; border-top: 1px dashed var(--border); }
.new-attach-row input, .new-attach-row select { width: 100%; }
.new-attach-value { min-width: 0; }
.new-attach-row input[type="file"] { font-size: 11.5px; padding: 7px 8px; }
.attach-row-remove {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--surface);
    color: var(--muted);
    cursor: pointer;
}
.attach-row-remove:hover { color: #c0392b; border-color: #f0c9c4; background: #fdf3f2; }
.attach-row-remove .icon { width: 15px; height: 15px; }
.attach-add { margin-top: 14px; }
.field-wide { grid-column: 1 / -1; }
.file-badge[data-ext="url"] { background: linear-gradient(160deg, #e7f2ff, #d3e5ff); color: #2b6cb0; }
@media (max-width: 900px) {
    .new-attach-head { display: none; }
    .new-attach-row {
        grid-template-columns: 1fr 1fr;
        padding: 12px;
        margin-top: 10px;
        border: 1px solid var(--border);
        border-radius: 12px;
    }
    .new-attach-row .new-attach-value { grid-column: 1 / -1; }
    .attach-row-remove { justify-self: end; }
}


.account-grid { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 24px; align-items: start; }
.account-side { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 18px; }
.account-profile { padding: 22px 20px; text-align: center; }
.account-avatar { position: relative; width: 86px; height: 86px; margin: 0 auto 12px; }
.account-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 3px solid var(--card); box-shadow: 0 8px 22px rgba(31, 86, 140, .18); }
.avatar-crown { position: absolute; right: 0; bottom: 0; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: linear-gradient(135deg, #f2c76e, #d09a35); color: #fff; border: 2px solid var(--card); }
.avatar-crown .icon { width: 12px; height: 12px; }
.account-profile h2 { font-size: 17px; font-weight: 800; color: var(--heading); }
.account-handle { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.account-badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 5px; margin-top: 10px; }
.account-balance { margin: 16px 0; padding: 12px; border-radius: 12px; background: var(--card-2); border: 1px solid var(--border); }
.account-balance span { display: block; font-size: 10.5px; color: var(--muted); }
.account-balance strong { display: block; font-size: 20px; font-weight: 800; color: var(--primary); letter-spacing: -.3px; }
.account-menu { padding: 8px; display: flex; flex-direction: column; gap: 2px; }
.account-menu-link { display: flex; align-items: center; gap: 9px; padding: 10px 12px; border-radius: 9px; color: var(--muted); font-size: 13px; font-weight: 500; }
.account-menu-link .icon { width: 16px; height: 16px; }
.account-menu-link .menu-arrow { width: 13px; height: 13px; margin-left: auto; opacity: .5; }
.account-menu-link:hover { background: var(--primary-soft); color: var(--primary); }
.account-menu-link.active { background: var(--primary-soft); color: var(--primary); font-weight: 700; }
.account-menu-recharge { margin-top: 4px; color: var(--gold-strong); background: var(--gold-soft); border: 1px solid rgba(200, 145, 47, .18); }
.account-menu-recharge:hover, .account-menu-recharge.active { color: var(--gold-strong); background: #fbe9c4; }
html[data-theme="dark"] .account-menu-recharge:hover, html[data-theme="dark"] .account-menu-recharge.active { background: var(--gold-soft); color: var(--gold-strong); }
.account-head-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.account-logout { border-top: 1px solid var(--border); margin-top: 4px; padding-top: 4px; }
.account-logout button { display: flex; align-items: center; gap: 9px; width: 100%; padding: 10px 12px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-size: 13px; text-align: left; }
.account-logout button:hover { background: var(--danger-soft); color: var(--danger); }
.account-main { min-width: 0; }
.account-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.account-head h1 { font-size: 26px; font-weight: 800; color: var(--heading); margin-top: 4px; letter-spacing: -.4px; }
.account-head p { font-size: 12.5px; color: var(--muted); margin-top: 4px; }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stat-card { display: flex; align-items: center; gap: 12px; padding: 16px; border-radius: 15px; background: var(--card); border: 1px solid rgba(255, 255, 255, .5); box-shadow: var(--shadow-sm); }
html[data-theme="dark"] .stat-card { border-color: var(--border); }
.stat-card > div { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.stat-card strong { font-size: 18px; font-weight: 800; color: var(--heading); letter-spacing: -.3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-card span { font-size: 10.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; flex: none; }
.stat-icon .icon { width: 20px; height: 20px; }
.stat-icon.sky { background: var(--primary-soft); color: var(--primary); }
.stat-icon.mint { background: var(--success-soft); color: var(--success); }
.stat-icon.amber { background: var(--gold-soft); color: var(--gold-strong); }
.stat-icon.violet { background: #efeaff; color: #6c4fd6; }
html[data-theme="dark"] .stat-icon.violet { background: #2a2350; color: #b9a8ff; }

.dashboard-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 18px; }
.dashboard-grid > .card { padding: 18px 20px; }
.mini-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.mini-head.padded { padding: 18px 20px 0; }
.mini-head h2 { display: flex; align-items: center; gap: 7px; font-size: 14.5px; font-weight: 700; color: var(--heading); }
.mini-head h2 .icon { width: 16px; height: 16px; color: var(--primary); }
.mini-head > a { display: inline-flex; align-items: center; gap: 2px; font-size: 11.5px; color: var(--muted); }
.mini-head > a:hover { color: var(--primary); }
.mini-head > a .icon { width: 12px; height: 12px; }
.mini-list { list-style: none; padding: 0; margin-top: 10px; }
.mini-list li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--border); }
.mini-list li:first-child { border-top: 0; }
.mini-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--card-3); color: var(--muted); flex: none; font-size: 13px; font-weight: 700; }
.mini-icon .icon { width: 15px; height: 15px; }
.mini-icon.plus { background: var(--success-soft); color: var(--success); }
.mini-icon.minus { background: var(--danger-soft); color: var(--danger); }
.mini-text { flex: 1; min-width: 0; }
.mini-text strong { display: block; font-size: 12.5px; color: var(--heading); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-text span { display: block; font-size: 10.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-amount { font-size: 12px; font-weight: 700; white-space: nowrap; }
.mini-empty { font-size: 12px; color: var(--muted-2); padding: 20px 0 10px; text-align: center; }
.mini-empty.padded { padding: 20px; }
.quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 18px; }
.quick-card { display: flex; flex-direction: column; gap: 4px; padding: 16px; border-radius: 15px; background: var(--card); border: 1px solid rgba(255, 255, 255, .5); box-shadow: var(--shadow-sm); transition: transform .2s ease, box-shadow .2s ease; }
html[data-theme="dark"] .quick-card { border-color: var(--border); }
.quick-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.quick-card strong { font-size: 13px; color: var(--heading); margin-top: 4px; }
.quick-card > span:last-child { font-size: 10.5px; color: var(--muted); line-height: 1.6; }


.table-card { padding: 0; overflow: hidden; }
.table-wrap { width: 100%; overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.table th {
    padding: 12px 14px;
    text-align: left;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--muted-2);
    background: var(--card-2);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
.table td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; color: var(--text); }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--card-2); }
.table .th-actions { text-align: right; }
.cell-title { min-width: 220px; }
.cell-title > a { display: block; font-size: 13.5px; font-weight: 700; color: var(--heading); line-height: 1.5; }
.cell-title > a:hover { color: var(--primary); }
.cell-sub { display: inline-flex; align-items: center; gap: 6px; font-size: 10.5px; color: var(--muted); margin-top: 3px; }
.cell-stats { display: flex; flex-wrap: wrap; gap: 10px; font-size: 11px; color: var(--muted); }
.cell-stats span { display: inline-flex; align-items: center; gap: 3px; }
.cell-stats .icon { width: 12px; height: 12px; }
.cell-date { font-size: 11px; color: var(--muted); white-space: nowrap; }
.cell-actions { display: flex; align-items: center; justify-content: flex-end; gap: 2px; }
.cell-actions form { display: flex; }
.cell-actions .btn { white-space: nowrap; }
.cell-title-inline { display: block; font-size: 12.5px; font-weight: 600; color: var(--heading); }
.cell-muted { font-size: 11px; color: var(--muted-2); white-space: nowrap; }
.cell-note { max-width: 280px; font-size: 11.5px; color: var(--muted); overflow-wrap: anywhere; }
.cell-ellipsis { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell-empty { text-align: center; color: var(--muted-2); padding: 34px 0 !important; }
.table-compact th, .table-compact td { padding: 10px 12px; }
.card-foot { padding: 14px 16px; border-top: 1px solid var(--border); }
.card-foot .pager { margin: 0; }


.profile-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 18px; align-items: start; }
.profile-form { padding: 24px 26px; }
.profile-side { display: flex; flex-direction: column; gap: 18px; }
.profile-side .card { padding: 20px; }
.avatar-editor { display: flex; align-items: center; gap: 16px; padding: 14px; border-radius: 14px; background: var(--card-2); border: 1px solid var(--border); margin-bottom: 20px; }
.avatar-editor img { width: 76px; height: 76px; border-radius: 50%; object-fit: cover; border: 3px solid var(--card); box-shadow: 0 6px 16px rgba(31, 86, 140, .16); flex: none; }
.avatar-editor-info { min-width: 0; }
.avatar-editor-info strong { display: block; font-size: 13px; color: var(--heading); }
.avatar-editor-info > span { display: block; font-size: 10.5px; color: var(--muted); margin: 2px 0 8px; line-height: 1.6; }
.info-list { list-style: none; padding: 0; display: flex; flex-direction: column; }
.info-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px dashed var(--border); font-size: 12px; }
.info-list li:first-child { border-top: 0; }
.info-list span { color: var(--muted); }
.info-list strong { color: var(--heading); font-weight: 600; text-align: right; }
.password-form .field { margin-bottom: 12px; }


.balance-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 24px;
    align-items: center;
    padding: 28px 30px;
    border-radius: 20px;
    background: linear-gradient(120deg, #1f6cc0 0%, #2f8ada 55%, #55b6e9 100%);
    color: #fff;
    box-shadow: 0 20px 44px rgba(31, 108, 192, .3);
    overflow: hidden;
}
.balance-label { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; opacity: .85; }
.balance-label .icon { width: 15px; height: 15px; }
.balance-value { display: block; font-size: 38px; font-weight: 800; letter-spacing: -1px; line-height: 1.25; margin: 4px 0 2px; }
.balance-hero-main p { font-size: 11.5px; opacity: .75; }
.balance-hero-side { display: flex; flex-direction: column; gap: 3px; padding: 14px 18px; border-radius: 14px; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .22); backdrop-filter: blur(8px); min-width: 176px; }
.balance-hero-side strong { font-size: 16px; font-weight: 800; }
.balance-hero-side > span:last-child { font-size: 10.5px; opacity: .78; }
.vip-pill { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; opacity: .9; }
.vip-pill .icon { width: 12px; height: 12px; }
.vip-pill.muted { opacity: .7; }
.balance-glow { position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .18); pointer-events: none; }
.balance-glow.g1 { width: 220px; height: 220px; right: -60px; top: -100px; }
.balance-glow.g2 { width: 130px; height: 130px; right: 130px; bottom: -90px; background: rgba(255, 255, 255, .1); }
.balance-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 18px; margin-top: 18px; align-items: start; }
.balance-grid > .card { padding: 20px 22px; }
.card-desc { font-size: 12px; color: var(--muted); line-height: 1.7; margin: 8px 0 14px; }
.redeem-form { margin-bottom: 12px; }
.redeem-input { display: flex; align-items: center; gap: 9px; padding: 5px 5px 5px 13px; border: 1px solid var(--border-strong); border-radius: 13px; background: var(--card-2); }
.redeem-input > .icon { color: var(--muted); width: 18px; height: 18px; }
.redeem-input input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; font-family: var(--mono); font-size: 12.5px; letter-spacing: .04em; text-transform: uppercase; }
.redeem-input .btn { padding: 8px 14px; font-size: 12.5px; }
.vip-plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.vip-plan {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 13px 12px 11px;
    border-radius: 12px;
    background: var(--card-2);
    border: 1px solid var(--border);
    text-align: center;
}
.vip-plan.featured { border-color: rgba(200, 145, 47, .4); background: var(--gold-soft); }
.plan-tag { position: absolute; top: -8px; left: 50%; transform: translateX(-50%); padding: 2px 8px; border-radius: 6px; background: linear-gradient(135deg, #f0c46e, #d09a35); color: #402d09; font-size: 9px; font-weight: 800; white-space: nowrap; }
.plan-name { font-size: 11px; color: var(--muted); font-weight: 600; }
.plan-price { font-size: 16px; font-weight: 800; color: var(--heading); letter-spacing: -.4px; white-space: nowrap; }
.plan-price em { font-style: normal; font-size: 9px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.plan-desc { font-size: 9px; color: var(--muted-2); line-height: 1.45; min-height: 26px; }
.vip-plan .btn { margin-top: 5px; }


.auth-body { background: var(--bg); }
.auth-shell { display: grid; grid-template-columns: 1.05fr .95fr; min-height: 100vh; }
.auth-visual { position: relative; overflow: hidden; background: #0a2540; color: #fff; }
.auth-visual-art { position: absolute; inset: 0; background-size: cover; background-position: center; transform: scale(1.04); }
.auth-visual::after { content: ""; position: absolute; inset: 0; background: linear-gradient(160deg, rgba(8, 33, 60, .55), rgba(8, 33, 60, .72)); }
.auth-visual-content { position: relative; z-index: 2; display: flex; flex-direction: column; justify-content: space-between; min-height: 100vh; padding: 44px 48px; }
.brand-light { color: #fff; }
.brand-light:hover { color: #fff; }
.brand-light .brand-mark { background: rgba(255, 255, 255, .16); color: #fff; }
.auth-quote { max-width: 440px; }
.auth-quote-mark { display: block; font-size: 64px; line-height: .6; opacity: .3; font-family: Georgia, serif; }
.auth-quote p { font-size: 20px; line-height: 1.9; font-weight: 600; margin: 12px 0 14px; letter-spacing: .3px; }
.auth-quote-by { font-size: 12px; opacity: .7; }
.auth-visual-foot { display: flex; flex-direction: column; gap: 8px; font-size: 11.5px; opacity: .75; }
.auth-visual-foot span { display: inline-flex; align-items: center; gap: 7px; }
.auth-visual-foot .icon { width: 14px; height: 14px; }
.auth-main { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 72px 28px 32px; background:
    radial-gradient(600px 300px at 80% 0%, var(--primary-soft), transparent 60%),
    var(--bg); }
.auth-topbar { position: absolute; top: 22px; left: 28px; right: 28px; display: flex; align-items: center; justify-content: space-between; }
.auth-back { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--muted); }
.auth-back:hover { color: var(--primary); }
.auth-back .icon { width: 14px; height: 14px; }
.auth-card { width: min(430px, 100%); background: var(--card); border-radius: 24px; padding: 34px 34px 30px; box-shadow: var(--shadow-lg); border: 1px solid rgba(255, 255, 255, .6); }
html[data-theme="dark"] .auth-card { border-color: var(--border); }
.auth-head { margin-bottom: 22px; }
.auth-eyebrow { display: inline-flex; align-items: center; gap: 5px; font-size: 10px; font-weight: 800; letter-spacing: .18em; color: var(--primary); }
.auth-eyebrow .icon { width: 13px; height: 13px; }
.auth-head h1 { font-size: 26px; font-weight: 800; color: var(--heading); margin: 6px 0 5px; letter-spacing: -.4px; }
.auth-head p { font-size: 12px; color: var(--muted); line-height: 1.7; }
.auth-form .field { margin-bottom: 14px; }
.auth-form .btn-lg { margin-top: 4px; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 18px 0 12px; font-size: 11px; color: var(--muted-2); }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.auth-agree { font-size: 10.5px; color: var(--muted-2); line-height: 1.6; margin-top: 10px; text-align: center; }
.auth-demo { margin-top: 18px; padding: 12px 14px; border-radius: 12px; background: var(--card-2); border: 1px dashed var(--border-strong); }
.auth-demo-title { display: flex; align-items: center; gap: 5px; font-size: 10.5px; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
.auth-demo-title .icon { width: 12px; height: 12px; }
.auth-demo-row { display: flex; align-items: center; justify-content: space-between; font-size: 11px; color: var(--muted); padding: 2px 0; }
.auth-demo-row code { font-family: var(--mono); font-size: 10.5px; color: var(--primary); background: var(--primary-soft); padding: 2px 6px; border-radius: 5px; }
.auth-foot { margin-top: 20px; font-size: 10.5px; color: var(--muted-2); text-align: center; }


.site-footer { position: relative; z-index: 3; background: var(--card); border-top: 1px solid var(--border); padding: 36px 0 0; }
.footer-inner { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 32px; padding-bottom: 28px; }
.footer-brand p { font-size: 12px; color: var(--muted); line-height: 1.8; margin-top: 12px; max-width: 300px; }
.footer-links { display: flex; flex-direction: column; gap: 7px; }
.footer-links h4 { font-size: 12px; font-weight: 700; color: var(--heading); margin-bottom: 3px; }
.footer-links a, .footer-links span { font-size: 11.5px; color: var(--muted); }
.footer-links a:hover { color: var(--primary); }
.footer-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; color: var(--muted-2); }
.footer-badge .icon { width: 12px; height: 12px; }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 24px 18px; border-top: 1px solid var(--border); font-size: 11px; color: var(--muted-2); flex-wrap: wrap; }
.footer-meta { display: flex; align-items: center; gap: 14px; }
.footer-meta a { color: var(--muted-2); }

.back-top {
    position: fixed;
    right: 22px;
    bottom: 22px;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 13px;
    background: var(--card);
    color: var(--primary);
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity .25s ease, transform .25s ease, visibility .25s;
    z-index: 50;
}
.back-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.back-top .icon { transform: rotate(-90deg); width: 18px; height: 18px; }


.toast-stack { position: fixed; top: 20px; right: 20px; display: flex; flex-direction: column; gap: 10px; z-index: 999; max-width: min(360px, calc(100vw - 40px)); }
.toast {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding: 12px 14px;
    border-radius: 13px;
    background: var(--card);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    font-size: 12.5px;
    color: var(--text);
    animation: toast-in .3s cubic-bezier(.2, .8, .2, 1);
}
.toast > .icon { width: 17px; height: 17px; margin-top: 1px; flex: none; }
.toast-symbol {
    display: grid;
    place-items: center;
    width: 18px;
    height: 18px;
    margin-top: 1px;
    border-radius: 50%;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 11px;
    font-weight: 800;
    flex: none;
}
.toast-success .toast-symbol { background: var(--success-soft); color: var(--success); }
.toast-error .toast-symbol { background: var(--danger-soft); color: var(--danger); }
.toast-warning .toast-symbol { background: var(--gold-soft); color: var(--gold-strong); }
.toast > span:not(.toast-symbol) { flex: 1; line-height: 1.6; }
.toast-success > .icon { color: var(--success); }
.toast-error > .icon { color: var(--danger); }
.toast-warning > .icon { color: var(--gold); }
.toast-info > .icon { color: var(--primary); }
.toast-close { border: 0; background: none; color: var(--muted-2); padding: 0; display: grid; place-items: center; }
.toast-close .icon { width: 13px; height: 13px; }
.toast.hide { animation: toast-out .25s ease forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px) scale(.98); } }
@keyframes toast-out { to { opacity: 0; transform: translateX(16px); } }


.admin-body { background: var(--bg); }
.admin-shell { display: flex; min-height: 100vh; }
.admin-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 248px;
    display: flex;
    flex-direction: column;
    padding: 22px 16px 16px;
    background: linear-gradient(180deg, #0e2035 0%, #0b1a2b 100%);
    color: #a9bccf;
    z-index: 60;
    transition: transform .28s ease;
}
.admin-brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 20px; color: #fff; }
.admin-brand:hover { color: #fff; }
.admin-brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: linear-gradient(135deg, #3f8fe0, #2a6cb4); color: #fff; flex: none; }
.admin-brand-mark .icon { width: 21px; height: 21px; }
.admin-brand-text { display: flex; flex-direction: column; min-width: 0; }
.admin-brand-text strong { font-size: 14px; font-weight: 800; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin-brand-text em { font-style: normal; font-size: 10px; color: #7c94ab; letter-spacing: .06em; }
.admin-nav { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; padding-top: 8px; }
.admin-nav::-webkit-scrollbar { width: 4px; }
.admin-nav::-webkit-scrollbar-thumb { background: #24384f; border-radius: 4px; }
.admin-nav-group { padding: 14px 12px 5px; font-size: 9.5px; font-weight: 700; letter-spacing: .14em; color: #5c748c; text-transform: uppercase; }
.admin-nav-link { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 9px; color: #9fb3c8; font-size: 13px; font-weight: 500; }
.admin-nav-link .icon { width: 17px; height: 17px; opacity: .85; }
.admin-nav-link:hover { background: rgba(76, 157, 240, .1); color: #e6f1fb; }
.admin-nav-link.active { background: linear-gradient(90deg, rgba(76, 157, 240, .24), rgba(76, 157, 240, .08)); color: #fff; font-weight: 600; box-shadow: inset 2px 0 0 #4c9df0; }
.admin-side-foot { padding-top: 12px; border-top: 1px solid #1c3046; }
.admin-back { display: flex; align-items: center; gap: 7px; padding: 8px 12px; font-size: 11.5px; color: #7f98b0; }
.admin-back:hover { color: #cfe2f3; }
.admin-back .icon { width: 13px; height: 13px; }
.admin-user { display: flex; align-items: center; gap: 9px; padding: 10px 8px 2px; }
.admin-user img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }
.admin-user > div { flex: 1; min-width: 0; }
.admin-user strong { display: block; font-size: 12px; color: #e3eef9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin-user span { display: block; font-size: 9.5px; color: #6e869e; }
.admin-user form button { display: grid; place-items: center; width: 28px; height: 28px; border: 0; border-radius: 8px; background: transparent; color: #7f98b0; }
.admin-user form button:hover { background: rgba(239, 123, 123, .14); color: #ef7b7b; }
.admin-user form .icon { width: 14px; height: 14px; }

.admin-main { flex: 1; min-width: 0; margin-left: 248px; display: flex; flex-direction: column; }
.admin-topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    gap: 14px;
    height: 64px;
    padding: 0 28px;
    background: rgba(255, 255, 255, .86);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
}
html[data-theme="dark"] .admin-topbar { background: rgba(20, 34, 51, .88); }
.admin-crumb { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); }
.admin-crumb .icon { width: 12px; height: 12px; }
.admin-crumb strong { color: var(--heading); font-weight: 600; }
.admin-top-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.admin-nav-toggle { display: none; }
.admin-content { flex: 1; padding: 26px 28px 50px; max-width: 1400px; width: 100%; margin: 0 auto; }

.admin-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.admin-head h1 { font-size: 25px; font-weight: 800; color: var(--heading); letter-spacing: -.4px; margin-top: 3px; }
.admin-head p { font-size: 12px; color: var(--muted); margin-top: 3px; }
.admin-head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.admin-stats { margin-bottom: 12px; }
.admin-mini-stats {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    padding: 11px 16px;
    margin-bottom: 18px;
    border-radius: 12px;
    background: var(--card);
    border: 1px solid var(--border);
    font-size: 11.5px;
    color: var(--muted);
    box-shadow: var(--shadow-sm);
}
.admin-mini-stats span { display: inline-flex; align-items: center; gap: 5px; }
.admin-mini-stats .icon { width: 13px; height: 13px; color: var(--primary); }
.admin-mini-stats strong { color: var(--heading); }
.admin-mini-stats > a { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; }
.admin-mini-stats > a .icon { width: 12px; height: 12px; }
.admin-grid-2 { display: grid; grid-template-columns: 1.25fr .75fr; gap: 18px; margin-bottom: 18px; }
.backup-restore-grid { grid-template-columns: 1fr 1fr; margin-top: 18px; align-items: start; }
.backup-restore-grid > .card { padding: 20px 22px; }
.cell-nowrap { white-space: nowrap; }
.restore-upload { margin-top: 14px; }
.restore-upload-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.restore-upload-row input[type="file"] { flex: 1; min-width: 220px; }
.restore-upload-row .btn { flex: none; }
.admin-grid-2 > .card { padding: 18px 20px; }
.admin-grid-side { display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 18px; align-items: start; }
.admin-grid-side > .card { padding: 20px 22px; }
.user-mini-list { list-style: none; padding: 0; margin-top: 8px; }
.user-mini-list li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--border); }
.user-mini-list li:first-child { border-top: 0; }
.user-mini-list img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.user-mini-list div { flex: 1; min-width: 0; }
.user-mini-list strong { display: block; font-size: 12px; color: var(--heading); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-mini-list span { display: block; font-size: 10px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-balance { font-size: 11.5px; font-weight: 700; color: var(--primary); }

.filter-bar { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.filter-tabs { display: flex; gap: 3px; padding: 3px; border-radius: 10px; background: var(--card-3); }
.filter-tab { padding: 6px 13px; border-radius: 8px; font-size: 12px; font-weight: 600; color: var(--muted); }
.filter-tab:hover { color: var(--primary); }
.filter-tab.active { background: var(--card); color: var(--primary); box-shadow: var(--shadow-sm); }
.filter-search { display: flex; align-items: center; gap: 7px; margin-left: auto; }
.filter-search .icon { width: 15px; height: 15px; color: var(--muted-2); }
.filter-search input, .filter-search select {
    padding: 7px 11px;
    border: 1px solid var(--border-strong);
    border-radius: 9px;
    background: var(--card-2);
    font-size: 12px;
    outline: none;
    color: var(--text);
}
.filter-search input:focus, .filter-search select:focus { border-color: var(--primary); }
.filter-search input { width: 210px; }

.user-cell { display: flex; align-items: center; gap: 9px; min-width: 170px; }
.user-cell img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex: none; }
.user-cell.small img { width: 28px; height: 28px; }
.user-cell div { min-width: 0; }
.user-cell strong { display: block; font-size: 12.5px; color: var(--heading); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-cell span { display: block; font-size: 10px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.comment-cell { max-width: 360px; white-space: normal; line-height: 1.7; }
.code-cell { font-family: var(--mono); font-size: 11.5px; letter-spacing: .02em; color: var(--heading); }
.manage-drop { position: relative; margin-left: auto; }
.manage-drop summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.manage-drop summary::-webkit-details-marker { display: none; }
.manage-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    width: 290px;
    padding: 13px;
    border-radius: 13px;
    background: var(--card);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    z-index: 30;
    text-align: left;
}
.manage-block { display: flex; flex-direction: column; gap: 6px; padding-bottom: 11px; margin-bottom: 11px; border-bottom: 1px dashed var(--border); }
.manage-block > strong { font-size: 11.5px; color: var(--heading); }
.manage-block input, .manage-block select {
    padding: 6px 9px;
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    background: var(--card-2);
    font-size: 11.5px;
    outline: none;
}
.manage-row { display: flex; align-items: center; gap: 6px; }
.manage-row input { flex: 1; min-width: 0; }
.manage-row .field-help { white-space: nowrap; }
.manage-buttons { display: flex; flex-wrap: wrap; gap: 5px; }
.manage-buttons form { display: flex; }
.manage-buttons .btn { padding: 5px 8px; font-size: 10.5px; }


.card-key-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.mini-stat { padding: 13px 16px; border-radius: 13px; background: var(--card); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.mini-stat span { display: block; font-size: 10.5px; color: var(--muted); }
.mini-stat strong { display: block; font-size: 19px; font-weight: 800; color: var(--heading); letter-spacing: -.3px; }
.gen-card { padding: 20px 22px; margin-bottom: 18px; }
.gen-form { display: grid; grid-template-columns: repeat(4, 1fr) auto; gap: 12px; align-items: start; margin-top: 14px; }
.gen-form .field { margin: 0; }
.gen-form .btn { height: 40px; align-self: end; margin-bottom: 1px; }


.category-list { margin-top: 10px; }
.category-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--border); }
.category-row:first-child { border-top: 0; }
.category-dot { width: 11px; height: 11px; border-radius: 4px; flex: none; }
.category-info { flex: 1; min-width: 0; }
.category-info strong { display: block; font-size: 13px; color: var(--heading); }
.category-info span { display: block; font-size: 10.5px; color: var(--muted); word-break: break-all; }
.category-actions { display: flex; gap: 2px; }
.category-actions form { display: flex; }


.settings-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 18px; align-items: start; }
.settings-main { display: flex; flex-direction: column; gap: 18px; }
.settings-main .card, .settings-side .card { padding: 20px 22px; }
.settings-side { display: flex; flex-direction: column; gap: 18px; }
.admin-form .field { margin-bottom: 14px; }
.admin-form .field:last-child { margin-bottom: 0; }
.switch-line { display: flex; align-items: center; gap: 14px; padding: 11px 0; border-top: 1px solid var(--border); cursor: pointer; position: relative; }
.switch-line:first-child { border-top: 0; }
.switch-line > span { flex: 1; }
.switch-line strong { display: block; font-size: 12.5px; color: var(--heading); }
.switch-line em { display: block; font-style: normal; font-size: 10.5px; color: var(--muted); }
.switch-line input { position: absolute; opacity: 0; pointer-events: none; }
.switch-ui { position: relative; width: 40px; height: 22px; border-radius: 22px; background: var(--border-strong); transition: background .2s ease; flex: none; }
.switch-ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .2s ease; box-shadow: 0 1px 4px rgba(0, 0, 0, .2); }
.switch-line input:checked + .switch-ui { background: var(--primary); }
.switch-line input:checked + .switch-ui::after { transform: translateX(18px); }
.settings-save { display: flex; justify-content: flex-end; }
.qr-preview { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.qr-preview img { width: 96px; height: 96px; object-fit: contain; padding: 5px; border: 1px solid var(--border); border-radius: 10px; background: #fff; }
.qr-preview span { font-size: 10.5px; color: var(--muted); }
@media (max-width: 700px) {
    .download-info { flex-direction: column; align-items: flex-start; }
    .download-qr { align-self: flex-end; }
}


.reveal-ready [data-reveal] { opacity: 0; transform: translateY(14px); transition: opacity .55s ease, transform .55s ease; }
.reveal-ready [data-reveal].is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
    .reveal-ready [data-reveal] { opacity: 1; transform: none; }
}


@media (max-width: 1180px) {
    :root { --container: 100%; }
    .container { padding: 0 20px; }
    .post-card { grid-template-columns: minmax(0, 1fr) 190px; }
    .detail-title { font-size: 30px; }
}

@media (max-width: 1024px) {
    .layout-grid { grid-template-columns: 232px minmax(0, 1fr); gap: 18px; }
    .account-grid { grid-template-columns: 232px minmax(0, 1fr); gap: 18px; }
    .editor-layout { grid-template-columns: minmax(0, 1fr) 280px; }
    .admin-grid-side { grid-template-columns: 340px minmax(0, 1fr); }
    .settings-grid { grid-template-columns: minmax(0, 1fr) 290px; }
    .gen-form { grid-template-columns: repeat(2, 1fr); }
    .gen-form .btn { grid-column: 1 / -1; }
    .admin-sidebar { transform: translateX(-100%); }
    .admin-shell.nav-open .admin-sidebar { transform: none; box-shadow: 20px 0 50px rgba(0, 0, 0, .25); }
    .admin-main { margin-left: 0; }
    .admin-nav-toggle { display: inline-flex; }
    .auth-shell { grid-template-columns: .9fr 1.1fr; }
    .auth-quote p { font-size: 17px; }
}

@media (max-width: 900px) {
    .hero { height: 300px; }
    .nav-menu {
        position: absolute;
        top: calc(100% + 10px);
        left: 20px;
        right: 20px;
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
        padding: 10px;
        border-radius: 16px;
        background: var(--card);
        border: 1px solid var(--border);
        box-shadow: var(--shadow-lg);
        display: none;
        z-index: 30;
    }
    .nav-menu.open { display: flex; }
    .nav-burger { display: inline-flex; order: 2; }
    .nav-card { flex-wrap: nowrap; }
    .nav-tools { order: 3; margin-left: 0; }
    .brand-text { font-size: 16px; }
    .layout-grid { grid-template-columns: 1fr; }
    .sidebar { position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
    .profile-card { grid-row: span 2; }
    .site-main { margin-top: -34px; }
    .detail-title { font-size: 27px; }
    .post-detail { padding: 26px 26px 24px; }
    .detail-cover { margin-left: -26px; margin-right: -26px; border-radius: 0; }
    .account-grid { grid-template-columns: 1fr; }
    .account-side { position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
    .account-profile { display: flex; flex-direction: column; justify-content: center; }
    .account-menu { align-self: start; }
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
    .dashboard-grid { grid-template-columns: 1fr; }
    .quick-grid { grid-template-columns: repeat(2, 1fr); }
    .editor-layout { grid-template-columns: 1fr; }
    .editor-side { position: static; display: grid; grid-template-columns: 1fr 1fr; }
    .balance-grid { grid-template-columns: 1fr; }
    .profile-grid { grid-template-columns: 1fr; }
    .footer-inner { grid-template-columns: 1fr 1fr; gap: 24px; }
    .admin-grid-2 { grid-template-columns: 1fr; }
    .admin-grid-side { grid-template-columns: 1fr; }
    .settings-grid { grid-template-columns: 1fr; }
    .auth-shell { grid-template-columns: 1fr; }
    .auth-visual { display: none; }
    .auth-main { min-height: 100vh; }
    .attach-row { grid-template-columns: 54px minmax(0, 1fr); }
    .attach-channels { grid-column: 2; padding-bottom: 0; }
    .attach-actions { grid-column: 2; flex-direction: row; }
    .attach-upload-grid { grid-template-columns: 1fr; }
    .card-key-stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
    body { font-size: 14px; }
    .container { padding: 0 16px; }
    .hero { height: 264px; }
    .site-header { padding-top: 14px; }
    .nav-card { height: 58px; padding: 0 10px; border-radius: 15px; gap: 8px; }
    .brand { gap: 7px; }
    .brand-mark { width: 32px; height: 32px; border-radius: 9px; }
    .brand-mark .icon { width: 18px; height: 18px; }
    .brand-text { font-size: 15px; }
    .nav-tools .theme-accent-btn { display: none; }
    .nav-avatar { width: 30px; height: 30px; }
    .nav-login { padding: 7px 11px; font-size: 12px; }
    .nav-login span { display: none; }
    .site-main { margin-top: -26px; }
    .sidebar { grid-template-columns: 1fr; }
    .profile-card { grid-row: auto; display: grid; grid-template-columns: 92px 1fr; gap: 14px; align-items: center; padding: 12px; }
    .profile-cover { aspect-ratio: 1; grid-row: span 1; }
    .profile-body { text-align: left; padding: 0; }
    .profile-stats { margin: 8px 0; padding: 7px 0; }
    .profile-stats strong { font-size: 13px; }
    .profile-body .btn { width: auto; }
    .post-card { grid-template-columns: 1fr; gap: 14px; padding: 18px; }
    .post-thumb { order: -1; aspect-ratio: 16 / 8; }
    .post-title { font-size: 19px; }
    .post-excerpt { -webkit-line-clamp: 3; }
    .section-title { font-size: 21px; }
    .section-aside .section-count { display: none; }
    .notice { flex-wrap: wrap; gap: 9px; }
    .notice p { flex-basis: calc(100% - 46px); }
    .notice-link { margin-left: 46px; }
    .detail-title { font-size: 23px; }
    .post-detail { padding: 22px 18px; border-radius: 18px; }
    .detail-cover { margin-left: -18px; margin-right: -18px; aspect-ratio: 16 / 9; }
    .detail-meta { gap: 9px; font-size: 11px; }
    .detail-edit { margin-left: 0; }
    .prose { font-size: 15px; }
    .download-card, .comments { padding: 20px 18px; }
    .download-item { grid-template-columns: 46px minmax(0, 1fr); align-items: start; }
    .file-badge { width: 46px; height: 50px; }
    .file-actions { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; min-width: 0; }
    .file-actions form { flex: 1; min-width: 130px; }
    .file-actions .btn { width: 100%; }
    .file-hint { flex: 1 0 100%; text-align: left; }
    .block-head { flex-wrap: wrap; }
    .vip-ribbon { margin-left: 55px; }
    .post-nav { grid-template-columns: 1fr; }
    .md-grid { grid-template-columns: 1fr; }
    .md-input { border-right: 0; border-bottom: 1px solid var(--border); min-height: 320px; }
    .md-preview { max-height: none; }
    .editor-title { font-size: 21px; }
    .editor-toolbar-row { padding: 8px 14px 10px; }
    .rte-editor { padding: 18px 16px; min-height: 400px; }
    .editor-side { grid-template-columns: 1fr; }
    .editor-underbar .editor-autosave-hint { display: none; }
    .account-head { flex-direction: column; align-items: flex-start; }
    .account-head h1 { font-size: 22px; }
    .account-side { grid-template-columns: 1fr; }
    .account-profile { display: block; }
    .balance-hero { grid-template-columns: 1fr; padding: 22px; }
    .balance-hero-side { min-width: 0; }
    .balance-value { font-size: 32px; }
    .vip-plans { grid-template-columns: 1fr; }
    .vip-plan { flex-direction: row; align-items: center; text-align: left; gap: 8px; padding: 12px; flex-wrap: wrap; }
    .vip-plan .plan-desc { min-height: 0; flex: 1 1 100%; }
    .vip-plan .btn { margin-left: auto; width: auto; margin-top: 0; }
    .vip-plan .plan-tag { position: static; transform: none; }
    .quick-grid { grid-template-columns: 1fr 1fr; }
    .auth-card { padding: 26px 22px; border-radius: 20px; }
    .auth-main { padding: 64px 16px 24px; }
    .auth-topbar { top: 16px; left: 16px; right: 16px; }
    .auth-head h1 { font-size: 23px; }
    .footer-inner { grid-template-columns: 1fr; gap: 18px; }
    .footer-brand p { max-width: none; }
    .footer-bottom { flex-direction: column; align-items: flex-start; padding: 12px 16px 16px; }
    .admin-content { padding: 18px 16px 40px; }
    .admin-topbar { padding: 0 16px; height: 58px; }
    .admin-head h1 { font-size: 21px; }
    .admin-stats { grid-template-columns: 1fr 1fr; }
    .admin-mini-stats { gap: 10px; }
    .admin-mini-stats > a { margin-left: 0; }
    .filter-search { margin-left: 0; width: 100%; }
    .filter-search input { width: 100%; flex: 1; }
    .gen-form { grid-template-columns: 1fr 1fr; }
    .attach-admin { padding: 20px 18px; }
    .action-col { display: none; }
    .back-top { right: 14px; bottom: 14px; }
    .toast-stack { top: 12px; right: 12px; left: 12px; max-width: none; }
}

@media (max-width: 480px) {
    .post-stats .stat-download { display: none; }
    .post-title { font-size: 18px; }
    .section-aside { display: none; }
    .detail-meta > span:nth-of-type(n + 5) { display: none; }
    .stat-grid { grid-template-columns: 1fr; }
    .quick-grid { grid-template-columns: 1fr; }
    .form-row, .form-row.three { grid-template-columns: 1fr; }
    .balance-grid > .card, .dashboard-grid > .card { padding: 16px; }
    .avatar-editor { flex-direction: column; text-align: center; }
    .avatar-editor-actions .btn { width: 100%; }
    .attach-fields { grid-template-columns: 1fr; }
    .attach-row { grid-template-columns: 42px 1fr; gap: 10px; }
    .file-badge { width: 42px; height: 46px; }
    .file-badge span { font-size: 8px; }
    .file-badge .icon { width: 17px; height: 17px; }
    .download-login { flex-wrap: wrap; }
    .comment-form { flex-direction: column; }
    .comment-actions { flex-direction: column; align-items: flex-start; }
    .comment-actions .btn { width: 100%; }
    .editor-tip { display: none; }
    .editor-save-top { margin-left: 0; width: 100%; }
    .admin-stats { grid-template-columns: 1fr; }
    .card-key-stats { grid-template-columns: 1fr 1fr; }
}
