/* 书林智友 · 基础样式：温暖书香色 */
:root {
    --paper: #f6eedf;
    --paper-2: #efe3cc;
    --paper-3: #e6d5b8;
    --ink: #3b2f25;
    --ink-2: #6b5a48;
    --ink-3: #9a8771;
    --cinnabar: #b8432f;
    --cinnabar-2: #d0644c;
    --gold: #c79a3a;
    --jade: #5e8a6e;
    --line: rgba(107, 90, 72, .18);
    --shadow: 0 6px 24px rgba(74, 52, 30, .12);
    --shadow-lg: 0 18px 50px rgba(74, 52, 30, .22);
    --r: 18px;
    --serif: "STKaiti", "KaiTi", "楷体", "Songti SC", "SimSun", serif;
    --sans: -apple-system, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
    --ease: cubic-bezier(.22, .9, .3, 1);
    --tab-h: 64px;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--sans);
    color: var(--ink);
    background: var(--paper);
    background-image:
        radial-gradient(circle at 15% 10%, rgba(255, 255, 255, .55), transparent 40%),
        radial-gradient(circle at 85% 90%, rgba(199, 154, 58, .08), transparent 45%),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .4 0 0 0 0 .3 0 0 0 0 .2 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-attachment: fixed;
    min-height: 100vh;
    line-height: 1.65;
    font-size: 16px;
}
img { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 8px; }

.serif { font-family: var(--serif); }
.muted { color: var(--ink-3); }
.ic { width: 22px; height: 22px; flex-shrink: 0; }
.hide { display: none !important; }

/* 页面进入动画 */
.page-anim { animation: pageIn .45s var(--ease) both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.rise { animation: pageIn .5s var(--ease) both; }
.rise:nth-child(2) { animation-delay: .06s; } .rise:nth-child(3) { animation-delay: .12s; }
.rise:nth-child(4) { animation-delay: .18s; } .rise:nth-child(5) { animation-delay: .24s; }
.rise:nth-child(6) { animation-delay: .3s; } .rise:nth-child(7) { animation-delay: .36s; }

/* 容器 */
.wrap { max-width: 560px; margin: 0 auto; padding: 0 16px calc(var(--tab-h) + 28px + env(safe-area-inset-bottom)); }
.theme-wide .wrap, .theme-big .wrap { max-width: 1180px; padding-bottom: 40px; }
.section-title { font-family: var(--serif); font-size: 20px; margin: 24px 4px 12px; display: flex; align-items: center; gap: 8px; }
.section-title::before { content: ""; width: 6px; height: 18px; border-radius: 3px; background: var(--cinnabar); }

/* 纸面卡片 */
.paper {
    background: linear-gradient(180deg, #fffaf0, #fbf3e3);
    border: 1px solid var(--line);
    border-radius: var(--r);
    box-shadow: var(--shadow);
}
.card { padding: 18px; }
.glass {
    background: rgba(255, 250, 240, .78);
    backdrop-filter: blur(14px) saturate(1.2);
    -webkit-backdrop-filter: blur(14px) saturate(1.2);
    border: 1px solid rgba(255, 255, 255, .6);
    border-radius: var(--r);
    box-shadow: var(--shadow);
}

/* 按钮 */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; flex-shrink: 0;
    padding: 11px 20px; border-radius: 999px; font-weight: 600; font-size: 15px;
    transition: transform .2s var(--ease), box-shadow .2s, background .2s, opacity .2s;
}
.btn:active { transform: scale(.96); }
.btn:disabled { opacity: .45; pointer-events: none; }
.btn-primary { background: linear-gradient(135deg, var(--cinnabar-2), var(--cinnabar)); color: #fff; box-shadow: 0 6px 18px rgba(184, 67, 47, .35); }
.btn-primary:hover { box-shadow: 0 10px 24px rgba(184, 67, 47, .45); }
.btn-gold { background: linear-gradient(135deg, #ddb45a, var(--gold)); color: #fff; box-shadow: 0 6px 18px rgba(199, 154, 58, .35); }
.btn-ghost { background: rgba(255, 255, 255, .7); border: 1px solid var(--line); color: var(--ink-2); }
.btn-ghost:hover { background: #fff; }
.btn-block { width: 100%; }
.btn-lg { padding: 15px 26px; font-size: 17px; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: var(--ink-2); transition: background .2s; }
.icon-btn:hover { background: rgba(255, 255, 255, .7); }
.icon-btn-ph { width: 40px; display: inline-block; }

/* 输入框 */
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 14px; color: var(--ink-2); margin-bottom: 6px; font-weight: 600; }
.input, .textarea, .select {
    width: 100%; padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--paper-3);
    background: #fffdf8; transition: border-color .2s, box-shadow .2s; font-size: 16px;
}
.input:focus, .textarea:focus, .select:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px rgba(199, 154, 58, .15); }
.textarea { resize: vertical; min-height: 110px; line-height: 1.7; }
.hint { font-size: 13px; color: var(--ink-3); margin-top: 4px; }

/* 标签、印章 */
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 12px; border-radius: 999px; font-size: 13px; background: rgba(255, 255, 255, .75); border: 1px solid var(--line); color: var(--ink-2); }
.chip.on { background: var(--cinnabar); border-color: var(--cinnabar); color: #fff; }
button.chip { transition: background .2s, transform .15s; }
button.chip:active { transform: scale(.95); }
.seal { display: inline-grid; place-items: center; background: var(--cinnabar); color: #fff8ee; font-family: var(--serif); border-radius: 6px; box-shadow: inset 0 0 0 2px rgba(255, 240, 220, .35); }
.ai-tag { display: inline-block; font-size: 10px; padding: 1px 6px; border-radius: 4px; background: rgba(94, 138, 110, .14); color: var(--jade); margin-left: 6px; vertical-align: middle; font-weight: 600; }
.stars { display: inline-flex; gap: 2px; }
.stars .ic { width: 18px; height: 18px; color: var(--paper-3); fill: var(--paper-3); }
.stars .ic.on { color: var(--gold); fill: var(--gold); }
