/* ==========================================================================
   漫屿 MANYU · 基础层
   0. 变量  1. 重置  2. 排版  3. 布局  4. 通用组件  5. 骨架屏
   ========================================================================== */

/* ---------- 0. 变量 ---------- */
:root {
    --paper: #f6f1e6;
    --paper-2: #fdfaf3;
    --card: #fffdf8;
    --card-2: #faf6ec;
    --ink: #1b1a16;
    --ink-2: #575249;
    --ink-3: #8f887a;
    --line: #e5dbc8;
    --line-2: #d3c5ab;
    --brand: #2046c9;
    --brand-d: #16339a;
    --brand-soft: #e9edfb;
    --coral: #df5539;
    --coral-soft: #fbeae5;
    --gold: #a97b1c;
    --deep: #161a2c;
    --r: 4px;
    --serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", serif;
    --mono: "DIN Alternate", "SF Mono", "Consolas", "Roboto Mono", monospace;

    /* 后台弹窗脚本沿用的旧变量名，保持配色一致 */
    --bg: var(--paper);
    --bg-2: var(--card);
    --bg-100: var(--card-2);
    --bg-200: var(--paper);
    --surface: var(--card);
    --surface-3: var(--card-2);
    --fg: var(--ink);
    --fg-2: var(--ink-2);
    --fg-3: var(--ink-3);
    --fg-4: #b2aa9b;
    --ink-1: var(--ink);
    --accent: var(--brand);
    --accent-d: var(--brand-d);
    --accent-soft: var(--brand-soft);
    --lime: var(--brand);
    --lime-d: var(--brand-d);
    --navy: var(--deep);
    --danger: #cf3f2c;
    --amber: var(--gold);
    --ac-500: var(--brand);
    --ac-600: var(--brand-d);
}

/* ---------- 1. 重置 ---------- */
* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    margin: 0;
    color: var(--ink);
    background-color: var(--paper);
    background-image:
        radial-gradient(circle at 12% 8%, rgba(32, 70, 201, .035), transparent 42%),
        radial-gradient(circle at 88% 0%, rgba(223, 85, 57, .035), transparent 38%);
    background-repeat: no-repeat;
    font: 14px/1.65 "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, p, dl, dd, dt, figure { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; border: 0; vertical-align: middle; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
table { border-collapse: collapse; border-spacing: 0; }
em, i { font-style: normal; }
strong, b { font-weight: 700; }
svg { overflow: hidden; }

::selection { background: var(--brand); color: #fff; }

::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: var(--paper); }
::-webkit-scrollbar-thumb { background: #c9bda5; border: 3px solid var(--paper); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #b3a58a; }

/* ---------- 2. 排版 ---------- */
h1, h2, h3, h4 {
    color: var(--ink);
    font-family: var(--serif);
    font-weight: 800;
    letter-spacing: .01em;
}

/* ---------- 3. 布局 ---------- */
.wrap { width: 1240px; max-width: 100%; margin: 0 auto; padding: 0 22px; }

.page-main { min-height: 62vh; padding: 24px 0 64px; }

.icon {
    width: 1em;
    height: 1em;
    display: inline-block;
    vertical-align: -.14em;
    fill: currentColor;
    flex: none;
}

/* ---------- 4. 通用组件 ---------- */
.u-hidden { display: none !important; }
.hide { display: none !important; }
.t-brand { color: var(--brand); }
.t-coral { color: var(--coral); }
.t-gold { color: var(--gold); }
.t-mute { color: var(--ink-3); }
.t-num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.t-ellipsis { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

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

.pic { display: block; position: relative; overflow: hidden; background: #e8e1d3; }
.pic img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .35s ease; }
.pic.is-ready img { opacity: 1; }

.crumb {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 18px;
    color: var(--ink-3);
    font-size: 12.5px;
}
.crumb a:hover { color: var(--brand); }
.crumb .sep { color: #c3b9a5; }
.crumb strong { color: var(--ink-2); font-weight: 600; }

.empty {
    padding: 56px 22px;
    background: var(--card);
    border: 1px dashed var(--line-2);
    border-radius: var(--r);
    text-align: center;
    color: var(--ink-3);
    font-size: 13px;
    line-height: 1.95;
}
.empty b { display: block; margin-bottom: 7px; color: var(--ink); font-family: var(--serif); font-size: 17px; }
.empty a:not(.btn) { color: var(--brand); }

.pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 34px 0 4px;
}
.pager a, .pager span {
    min-width: 36px;
    height: 36px;
    padding: 0 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--r);
    color: var(--ink-2);
    font-size: 13px;
    font-variant-numeric: tabular-nums;
    transition: all .18s ease;
}
.pager a:hover { border-color: var(--brand); color: var(--brand); }
.pager .on { background: var(--brand); border-color: var(--brand); color: #fff; }
.pager .is-disabled { opacity: .42; pointer-events: none; }

/* 轻提示 */
.toast-wrap {
    position: fixed;
    left: 50%;
    top: 82px;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    pointer-events: none;
}
.toast {
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 440px;
    padding: 10px 17px;
    background: rgba(22, 26, 44, .94);
    color: #fff;
    border-radius: var(--r);
    font-size: 13px;
    box-shadow: 0 16px 36px -16px rgba(0, 0, 0, .55);
    animation: toastIn .22s ease both;
}
.toast .icon { color: #ffd36e; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* ---------- 5. 骨架屏 ---------- */
.sk {
    position: fixed;
    inset: 0;
    z-index: 900;
    padding: 28px 0;
    background: var(--paper);
    overflow: hidden;
    transition: opacity .32s ease;
}
.sk.is-off { opacity: 0; }
.sk__body { width: 1240px; max-width: 100%; margin: 0 auto; padding: 0 22px; }
.sk__bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 26px; }
.sk__line, .sk__box {
    display: block;
    background: linear-gradient(90deg, #e8e0d0 25%, #f4eee2 42%, #e8e0d0 62%);
    background-size: 420% 100%;
    animation: skShine 1.3s linear infinite;
    border-radius: 3px;
}
.sk__line { height: 13px; margin-bottom: 12px; }
.sk__line:last-child { margin-bottom: 0; }
.sk__box { border-radius: 4px; }
.sk__hero { display: grid; grid-template-columns: 300px 1fr; gap: 32px; margin-bottom: 32px; }
.sk__cover { height: 404px; }
.sk__rows { padding-top: 4px; }
.sk__grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 18px; }
.sk__card { height: 272px; }

/* 骨架屏顶部品牌标记 */
.sk__mark {
    display: flex;
    align-items: baseline;
    gap: 10px;
    font-family: var(--serif);
    font-size: 21px;
    font-weight: 800;
    letter-spacing: .1em;
    color: var(--ink-3);
}
.sk__mark span { font-family: var(--mono); font-size: 10px; letter-spacing: .28em; color: var(--line-2); }

@keyframes skShine {
    0% { background-position: 100% 0; }
    100% { background-position: -20% 0; }
}

@media (max-width: 1260px) {
    .sk__body { width: 100%; }
}
