:root {
    --primary: #a65e2e;
    --bg: #fcfaf7;
    --text: #2c2c2c;
    --sub: #8e8e93;
    --line: #efede9;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}
.wrap { max-width: 500px; margin: 0 auto; min-height: 100vh; }
.page { padding: 18px 18px 24px; }
h1 { font-size: 22px; font-weight: 600; margin: 10px 0 16px; }
.card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 14px;
}
.f { display: block; font-size: 13px; color: var(--sub); margin-bottom: 6px; }
input[type="text"], input[type="password"], input[type="tel"], input[type="datetime-local"], select, textarea {
    width: 100%;
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 10px;
    padding: 12px;
    font-size: 16px;
    margin-bottom: 12px;
    font-family: inherit;
}
textarea { min-height: 96px; resize: vertical; }
button, .btn {
    display: block;
    width: 100%;
    height: 48px;
    line-height: 48px;
    text-align: center;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 24px;
    font-size: 16px;
    text-decoration: none;
    cursor: pointer;
}
.btn.ghost, button.ghost {
    background: #fff;
    color: var(--primary);
    border: 1px solid var(--primary);
    margin-top: 10px;
}
.err, .ok { padding: 10px 12px; border-radius: 8px; margin-bottom: 12px; font-size: 14px; }
.err { background: #fff1f0; color: #b42318; }
.ok { background: #f3f8f2; color: #2f6b2f; }
.muted { color: var(--sub); font-size: 13px; line-height: 1.7; }
.muted a { color: var(--primary); text-decoration: none; }
.row-line { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.row-line span { color: var(--sub); }
.lv-head { display: flex; align-items: center; gap: 12px; }
.lv-icon, .lv-fallback {
    width: 44px;
    height: 44px;
    border-radius: 22px;
    object-fit: cover;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f6efe8;
    color: var(--primary);
    font-weight: 600;
}
.price { margin: 8px 0; font-size: 15px; }
.price b { color: var(--primary); font-size: 18px; }
.login-tabs {
    display: flex;
    gap: 8px;
    margin: 0 0 16px;
}
.login-tabs a {
    flex: 1;
    height: 40px;
    line-height: 40px;
    text-align: center;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--line);
    color: var(--text);
    text-decoration: none;
    font-size: 14px;
}
.login-tabs a.on {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}
.sms-row {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    align-items: stretch;
}
.sms-row input {
    flex: 1;
    margin-bottom: 0;
}
.sms-row button {
    width: auto;
    min-width: 110px;
    height: 46px;
    line-height: 46px;
    border-radius: 10px;
    padding: 0 12px;
    flex-shrink: 0;
}
.links { margin-top: 14px; display: flex; justify-content: space-between; font-size: 14px; }
.links a { color: var(--primary); text-decoration: none; }
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.modal.show { display: flex; }
.modal .card { width: 100%; max-width: 420px; margin: 0; }
.tag {
    display: inline-block;
    font-size: 12px;
    color: var(--primary);
    background: #f6efe8;
    border-radius: 999px;
    padding: 2px 8px;
    margin-left: 6px;
}
.menu {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 14px;
}
.menu a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 16px;
    color: var(--text);
    text-decoration: none;
    border-bottom: 1px solid var(--line);
    font-size: 16px;
}
.menu a:last-child { border-bottom: none; }
.menu a::after { content: "›"; color: #c7c7cc; font-size: 22px; line-height: 1; }
.empty {
    text-align: center;
    padding: 36px 12px 18px;
    color: var(--sub);
    line-height: 1.7;
}
.answer { white-space: pre-wrap; line-height: 1.8; font-size: 15px; }
.pan-card { padding: 0; border: none; background: transparent; border-radius: 0; margin-left: -18px; margin-right: -18px; }
.pan-card .muted { padding: 0 18px 8px; }
.qm-pan { width: 100%; background: #fff; }
.answer.typing::after {
    content: "";
    display: inline-block;
    width: 2px;
    height: 1em;
    margin-left: 2px;
    background: var(--primary);
    vertical-align: text-bottom;
    animation: caret 1s steps(1) infinite;
}
@keyframes caret { 50% { opacity: 0; } }
button:disabled { opacity: 0.55; cursor: default; }
.q-item { display: block; color: inherit; text-decoration: none; padding: 12px 0; border-bottom: 1px solid var(--line); }
.q-item:last-child { border-bottom: none; }
.q-item b { display: block; font-weight: 600; margin-bottom: 4px; }
.lib-cats { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.lib-cats a {
    padding: 6px 12px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--line);
    color: var(--text);
    text-decoration: none;
    font-size: 13px;
}
.lib-cats a.on { background: var(--primary); color: #fff; border-color: var(--primary); }
.lib-excerpt { display: block; color: var(--sub); font-size: 13px; line-height: 1.6; margin-top: 6px; }
.lib-body { line-height: 1.85; font-size: 15px; overflow: hidden; }
.lib-body p { margin: 0 0 12px; }
.lib-body h2 { font-size: 18px; margin: 18px 0 10px; }
.lib-body h3 { font-size: 16px; margin: 16px 0 8px; }
.lib-body ul, .lib-body ol { margin: 0 0 12px; padding-left: 1.4em; }
.lib-body img { max-width: 100%; height: auto; display: block; margin: 10px 0; border-radius: 8px; }
.lib-body a { color: var(--primary); }
.search { margin-bottom: 14px; }
.search input[type="text"],
.search input[type="search"] {
    display: block;
    width: 100%;
    flex: none;
    margin-bottom: 0;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 16px;
    font-family: inherit;
    background: #fff;
    -webkit-appearance: none;
    appearance: none;
}
.pager { margin: 8px 0 16px; display: flex; flex-wrap: wrap; gap: 6px; }
.pager a, .pager span {
    min-width: 32px;
    text-align: center;
    padding: 6px 8px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 6px;
    text-decoration: none;
    color: var(--text);
    font-size: 14px;
}
.pager span { background: var(--primary); color: #fff; border-color: var(--primary); }
.lib-body blockquote {
    margin: 0 0 12px;
    padding: 8px 12px;
    border-left: 3px solid var(--primary);
    color: var(--sub);
    background: #faf7f3;
}
