/* ============ 基础 ============ */
:root {
    --ink: #33251d;
    --muted: #8a7a6d;
    --paper: #fffaf2;
    --bg: #f7f0e5;
    --accent: #c9542f;
    --accent-2: #e58b43;
    --green: #6f9e6a;
    --line: #e7dac7;
    --shadow: 0 12px 32px rgba(82, 56, 32, .12);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    color: var(--ink);
    background: var(--bg);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: "Songti SC", "STSong", "SimSun", Georgia, serif; margin: 0; }
p { margin: 0 0 12px; }

/* ============ 顶部导航 ============ */
.site-header {
    background: rgba(255, 250, 242, .96);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 40;
    backdrop-filter: blur(8px);
}
.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    gap: 26px;
}
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand-icon {
    width: 42px; height: 42px; border-radius: 12px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #fff; display: grid; place-items: center;
    font-family: "Songti SC", serif; font-size: 24px;
    box-shadow: 0 6px 14px rgba(201, 84, 47, .28);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-family: "Songti SC", serif; font-size: 19px; }
.brand-text small { font-size: 11px; color: var(--muted); }
.main-nav { display: flex; gap: 20px; font-size: 14px; color: #6b5b4d; }
.main-nav a:hover { color: var(--accent); }
.header-search { margin-left: auto; display: flex; border: 1px solid var(--line); border-radius: 24px; overflow: hidden; background: #fff; }
.header-search input { border: 0; outline: 0; padding: 8px 14px; width: 210px; font-size: 13px; background: transparent; }
.header-search button { border: 0; background: var(--accent); color: #fff; padding: 8px 16px; font-size: 13px; cursor: pointer; }
.header-search button:hover { background: #b34522; }
.site-main { min-height: 60vh; }

/* ============ 按钮 ============ */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 10px 20px; border-radius: 8px; border: 1px solid transparent;
    font-size: 14px; cursor: pointer; transition: .18s; font-family: inherit;
}
.btn.primary { background: var(--accent); color: #fff; box-shadow: 0 4px 12px rgba(201, 84, 47, .22); }
.btn.primary:hover { background: #b34522; transform: translateY(-1px); }
.btn.ghost { background: #fff; border-color: var(--line); color: #6b5b4d; }
.btn.ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn.text { background: transparent; color: var(--muted); padding: 10px 8px; }
.btn.text:hover { color: var(--accent); }
.btn.small { padding: 6px 12px; font-size: 12px; }

/* ============ 首页大图区 ============ */
.hero {
    background:
        radial-gradient(circle at 12% 20%, rgba(229, 139, 67, .16), transparent 35%),
        radial-gradient(circle at 88% 80%, rgba(111, 158, 106, .16), transparent 35%),
        linear-gradient(160deg, #fffaf2, #f3e7d6);
    border-bottom: 1px solid var(--line);
}
.hero-inner {
    max-width: 1200px; margin: 0 auto; padding: 56px 24px 64px;
    display: grid; grid-template-columns: 1.05fr .95fr; gap: 50px; align-items: center;
}
.hero-kicker { color: var(--accent); font-size: 13px; letter-spacing: 3px; font-weight: 700; }
.hero h1 { font-size: clamp(34px, 4.2vw, 54px); line-height: 1.28; margin: 14px 0 18px; }
.hero-copy > p { color: #6b5b4d; font-size: 15px; margin-bottom: 26px; }
.hero-search {
    display: flex; align-items: center; background: #fff; border: 2px solid var(--accent);
    border-radius: 14px; padding: 6px; max-width: 560px; box-shadow: var(--shadow);
}
.hero-search .search-icon {
    width: 34px; height: 34px; border-radius: 50%; background: #fbe7dc; color: var(--accent);
    display: grid; place-items: center; font-size: 13px; font-weight: 700; flex-shrink: 0;
}
.hero-search input { flex: 1; border: 0; outline: 0; padding: 8px 12px; font-size: 15px; background: transparent; min-width: 0; }
.hero-search button { background: var(--accent); color: #fff; border: 0; border-radius: 9px; padding: 11px 24px; font-size: 15px; cursor: pointer; font-weight: 600; }
.hero-search button:hover { background: #b34522; }
.quick-tags { margin-top: 16px; font-size: 13px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.quick-tags a { padding: 3px 11px; border: 1px solid var(--line); border-radius: 20px; background: rgba(255,255,255,.7); }
.quick-tags a:hover { border-color: var(--accent); color: var(--accent); }

.hero-art { display: grid; place-items: center; perspective: 1400px; }
.hero-book {
    display: flex; width: min(100%, 460px); height: 310px;
    transform: rotateY(-14deg) rotateZ(2deg); filter: drop-shadow(0 24px 30px rgba(80,50,25,.25));
}
.hero-book-page { flex: 1; background: #fffdf7; padding: 26px; border: 1px solid #e8dcc9; }
.hero-book-page.left { border-radius: 12px 2px 2px 12px; display: flex; flex-direction: column; justify-content: center; gap: 22px; font-family: "Songti SC", serif; color: #8a7763; font-size: 20px; }
.hero-book-page.right { border-radius: 2px 12px 12px 2px; text-align: center; display: flex; flex-direction: column; justify-content: center; gap: 10px; }
.hero-book-page.right img { border-radius: 10px; width: 100%; }
.hero-book-page.right strong { font-family: "Songti SC", serif; color: var(--accent); }

/* ============ 搜索结果头 ============ */
.result-head { background: #fff; border-bottom: 1px solid var(--line); padding: 34px 24px 22px; }
.result-head-inner { max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.result-head h1 { font-size: 28px; }
.result-head p { color: var(--muted); font-size: 14px; margin-top: 6px; }
.result-head strong { color: var(--accent); font-size: 18px; }
.result-tokens { max-width: 1200px; margin: 16px auto 0; display: flex; gap: 8px; flex-wrap: wrap; }
.result-tokens span { background: #fbe7dc; color: var(--accent); padding: 4px 12px; border-radius: 20px; font-size: 12px; }

/* ============ 内容区 ============ */
.content-section { max-width: 1200px; margin: 0 auto; padding: 44px 24px 70px; }
.section-title { display: flex; align-items: baseline; gap: 14px; margin-bottom: 18px; }
.section-title h2 { font-size: 26px; }
.section-title span { color: var(--muted); font-size: 13px; }
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.filter-chip { padding: 6px 16px; border-radius: 22px; background: #fff; border: 1px solid var(--line); font-size: 13px; color: #6b5b4d; }
.filter-chip:hover { border-color: var(--accent); color: var(--accent); }
.filter-chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.filter-chip.small { padding: 5px 12px; font-size: 12px; }
.filter-divider { color: var(--muted); font-size: 12px; margin: 0 4px 0 12px; align-self: center; }

.recipe-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 22px; }
.recipe-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: 0 4px 16px rgba(80,50,25,.05); transition: .2s; display: flex; flex-direction: column; }
.recipe-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card-cover { position: relative; display: block; background: #fbf2e6; }
.card-cover img { width: 100%; height: 180px; object-fit: cover; transition: .4s; }
.recipe-card:hover .card-cover img { transform: scale(1.04); }
.card-method { position: absolute; left: 12px; top: 12px; background: rgba(255,255,255,.92); color: var(--accent); font-size: 12px; padding: 3px 10px; border-radius: 14px; font-weight: 600; }
.card-match { position: absolute; right: 12px; top: 12px; background: var(--green); color: #fff; font-size: 11px; padding: 3px 10px; border-radius: 14px; }
.card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.card-body h3 { font-size: 20px; margin-bottom: 6px; }
.card-body h3 a:hover { color: var(--accent); }
.card-meta { display: flex; gap: 10px; color: var(--muted); font-size: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.card-meta span + span::before { content: "·"; margin-right: 10px; }
.card-ingredients { font-size: 12px; color: #7a6a5b; background: #fdf7ee; border-radius: 8px; padding: 8px 10px; margin-bottom: 14px; display: flex; flex-direction: column; gap: 3px; }
.card-ingredients .ok { color: var(--green); }
.card-ingredients .miss { color: #9c7b59; }
.card-actions { margin-top: auto; display: flex; align-items: center; gap: 6px; }
.card-actions .btn.primary { padding: 7px 16px; font-size: 13px; }
.card-actions .btn.text { font-size: 12px; }

.empty-state { text-align: center; padding: 80px 20px; background: #fff; border: 1px dashed var(--line); border-radius: 16px; }
.empty-icon { width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 50%; background: #f6e6d8; color: var(--accent); display: grid; place-items: center; font-family: "Songti SC", serif; font-size: 28px; }
.empty-state h3 { font-size: 22px; margin-bottom: 8px; }
.empty-state p { color: var(--muted); margin-bottom: 20px; }

/* ============ 文字版菜谱 ============ */
.recipe-text { max-width: 1080px; margin: 0 auto; padding: 40px 24px 80px; }
.text-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 30px; }
.crumbs { font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.crumbs a:hover { color: var(--accent); }
.text-head h1 { font-size: 38px; }
.text-sub { color: var(--muted); font-size: 14px; margin-top: 8px; }
.text-actions { display: flex; gap: 8px; flex-shrink: 0; }
.text-layout { display: grid; grid-template-columns: 280px 1fr; gap: 36px; align-items: start; }
.text-side { position: sticky; top: 90px; }
.text-cover { border-radius: 12px; border: 1px solid var(--line); box-shadow: var(--shadow); }
.info-box { background: #fff; border: 1px solid var(--line); border-radius: 12px; margin-top: 16px; padding: 8px 16px; }
.info-box div { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
.info-box div:last-child { border-bottom: 0; }
.info-box span { color: var(--muted); }
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.tag-list span { font-size: 11px; background: #fbe7dc; color: var(--accent); padding: 3px 10px; border-radius: 14px; }
.text-block { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 28px 32px; margin-bottom: 24px; }
.text-block h2 { font-size: 24px; margin-bottom: 18px; padding-left: 12px; border-left: 4px solid var(--accent); }
.ingredient-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.ingredient-table th, .ingredient-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.ingredient-table th { color: var(--muted); font-size: 12px; font-weight: 500; }
.ingredient-table tr:nth-child(even) { background: #fdf9f3; }
.step-list { list-style: none; padding: 0; margin: 0; }
.step-list li { padding: 18px 0; border-bottom: 1px dashed var(--line); }
.step-list li:last-child { border-bottom: 0; }
.step-list h3 { color: var(--accent); font-size: 17px; margin-bottom: 8px; }
.step-list p { font-size: 15px; }
.step-list img { border-radius: 10px; width: min(100%, 480px); margin-top: 12px; border: 1px solid var(--line); }
.tips-block { background: #fff8ec; border-color: #f0d9b6; }
.tips-block p { font-size: 15px; }

/* ============ 书本模式 ============ */
.book-wrap { max-width: 1140px; margin: 0 auto; padding: 26px 24px 70px; }
.book-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.toolbar-left, .toolbar-right { display: flex; align-items: center; gap: 8px; }
.toolbar-title { font-family: "Songti SC", serif; font-size: 20px; margin-left: 8px; }
.book-stage { perspective: 1800px; }
.book {
    position: relative; display: flex; width: 100%; height: 590px;
    border-radius: 12px; transform-style: preserve-3d;
    box-shadow: 0 26px 50px rgba(70, 45, 25, .26), 0 4px 10px rgba(70,45,25,.12);
}
.book-spine {
    position: absolute; left: 50%; top: 0; bottom: 0; width: 26px; margin-left: -13px; z-index: 5;
    background: linear-gradient(90deg, rgba(90,60,35,.18), rgba(255,255,255,.5), rgba(90,60,35,.18));
    pointer-events: none;
}
.book-page {
    width: 50%; height: 100%; padding: 40px 44px; background: var(--paper);
    overflow: auto; position: relative; font-family: "Songti SC", "STSong", "SimSun", serif;
}
.book-page::-webkit-scrollbar { width: 6px; }
.book-page::-webkit-scrollbar-thumb { background: #e0cfb8; border-radius: 4px; }
.page-left { border-radius: 10px 0 0 10px; box-shadow: inset -14px 0 22px -16px rgba(80,50,25,.5); border: 1px solid #e7dac7; border-right: 0; }
.page-right { border-radius: 0 10px 10px 0; box-shadow: inset 14px 0 22px -16px rgba(80,50,25,.5); border: 1px solid #e7dac7; border-left: 0; }
.page-right::after { content: ""; position: absolute; right: 10px; bottom: 10px; font-size: 11px; color: #cbbba6; }
.book-turn {
    position: absolute; top: 0; right: 0; width: 50%; height: 100%;
    background: var(--paper); border: 1px solid #e7dac7; border-left: 0; border-radius: 0 10px 10px 0;
    transform-origin: left center; backface-visibility: hidden; opacity: 0; pointer-events: none;
    z-index: 10; padding: 40px 44px; overflow: hidden;
}
.book-turn.show { opacity: 1; }
.book-turn.on-left { right: auto; left: 0; transform-origin: right center; border-radius: 10px 0 0 10px; border-left: 1px solid #e7dac7; border-right: 0; }
.book-turn.flip-next { animation: flipNext .55s cubic-bezier(.4,.05,.2,1) forwards; }
.book-turn.flip-prev { animation: flipPrev .55s cubic-bezier(.4,.05,.2,1) forwards; }
@keyframes flipNext { from { transform: rotateY(0deg); } to { transform: rotateY(-180deg); } }
@keyframes flipPrev { from { transform: rotateY(0deg); } to { transform: rotateY(180deg); } }

.page-label { font-size: 11px; letter-spacing: 2px; color: var(--accent); margin-bottom: 12px; font-family: sans-serif; }
.page-section h2 { font-size: 27px; margin-bottom: 18px; }
.page-cover { display: flex; flex-direction: column; height: 100%; align-items: center; justify-content: center; text-align: center; }
.cover-img { width: min(100%, 300px); flex-shrink: 0; border-radius: 12px; overflow: hidden; box-shadow: 0 10px 24px rgba(80,50,25,.16); }
.cover-info { flex-shrink: 0; margin-top: 14px; }
.cover-cat { display: inline-block; background: #fbe7dc; color: var(--accent); font-size: 12px; padding: 4px 14px; border-radius: 16px; font-family: sans-serif; }
.cover-info h1 { font-size: 40px; margin: 8px 0 4px; }
.cover-desc { color: var(--muted); font-size: 14px; font-family: sans-serif; }
.cover-stats { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; font-size: 12px; color: #7a6a5b; margin: 10px 0 14px; font-family: sans-serif; }
.cover-stats span { background: #f8f0e4; padding: 4px 12px; border-radius: 14px; }
.cover-start { font-family: sans-serif; }
.ing-list { list-style: none; padding: 0; margin: 0; }
.ing-list li { display: flex; justify-content: space-between; padding: 10px 4px; border-bottom: 1px dashed #e4d6c2; font-size: 16px; }
.ing-amount { color: var(--accent); font-size: 14px; }
.page-notes { display: flex; gap: 12px; margin-top: 20px; }
.page-notes div { flex: 1; background: #f8f0e4; border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.page-notes b { font-size: 11px; color: var(--muted); font-family: sans-serif; }
.page-notes span { font-size: 16px; color: var(--accent); }
.page-tags { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 6px; font-family: sans-serif; }
.page-tags span { font-size: 11px; background: #eef3e8; color: var(--green); padding: 3px 10px; border-radius: 14px; }
.step-page .step-img { border-radius: 10px; overflow: hidden; border: 1px solid var(--line); margin-bottom: 16px; }
.step-page .step-img img { width: 100%; max-height: 260px; object-fit: cover; }
.step-text { font-size: 17px; line-height: 2; color: #4a382b; }
.tips-card { display: flex; gap: 14px; background: #fff5e5; border: 1px solid #f0d9b6; border-radius: 12px; padding: 18px; font-size: 16px; line-height: 1.9; }
.tips-mark { width: 32px; height: 32px; flex-shrink: 0; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-family: sans-serif; font-weight: bold; }
.finish-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; font-family: sans-serif; }

.book-controls { display: flex; justify-content: center; align-items: center; gap: 24px; margin-top: 26px; }
.nav-btn { background: #fff; border: 1px solid var(--line); border-radius: 24px; padding: 9px 22px; font-size: 14px; cursor: pointer; color: #6b5b4d; }
.nav-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.nav-btn:disabled { opacity: .45; cursor: not-allowed; }
.page-indicator { font-size: 14px; color: var(--muted); min-width: 70px; text-align: center; }
.page-indicator span:first-child { color: var(--accent); font-weight: 700; font-size: 18px; }
.book-hint { text-align: center; color: #a08f7d; font-size: 12px; margin-top: 14px; }

.toc-panel { position: fixed; right: 0; top: 0; bottom: 0; width: 280px; background: #fffdf7; border-left: 1px solid var(--line); box-shadow: -10px 0 30px rgba(70,45,25,.12); z-index: 60; transform: translateX(100%); transition: .25s; padding: 22px; overflow: auto; }
.toc-panel.open { transform: translateX(0); }
.toc-head { display: flex; justify-content: space-between; align-items: center; font-size: 18px; font-family: "Songti SC", serif; margin-bottom: 16px; }
.toc-head button { background: none; border: 0; font-size: 26px; cursor: pointer; color: var(--muted); }
.toc-panel ul { list-style: none; padding: 0; margin: 0; }
.toc-panel li a { display: block; padding: 9px 12px; border-radius: 8px; font-size: 14px; }
.toc-panel li a:hover, .toc-panel li a.active { background: #fbe7dc; color: var(--accent); }

/* ============ 后台 ============ */
.admin-section { max-width: 1100px; margin: 0 auto; padding: 44px 24px 80px; }
.login-card { max-width: 420px; margin: 30px auto; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 36px; box-shadow: var(--shadow); }
.login-card h1 { font-size: 26px; margin-bottom: 8px; }
.login-card > p { color: var(--muted); font-size: 14px; }
.login-card form { margin-top: 22px; }
.login-note { font-size: 12px !important; margin-top: 16px !important; color: #a08f7d !important; }
.admin-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.admin-head h1 { font-size: 28px; }
.alert { padding: 12px 16px; border-radius: 10px; margin-bottom: 18px; font-size: 14px; }
.alert.error { background: #fdeaea; color: #a33; }
.alert.ok { background: #eaf6e8; color: #3d7a3a; }
.admin-layout { display: grid; grid-template-columns: 1.6fr 1fr; gap: 28px; align-items: start; }
.admin-form { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 26px; display: flex; flex-direction: column; gap: 16px; }
.admin-form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: #6b5b4d; }
.admin-form input, .admin-form textarea { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; font-size: 14px; font-family: inherit; outline: 0; background: #fffdf8; }
.admin-form input:focus, .admin-form textarea:focus { border-color: var(--accent); }
.form-row { display: grid; gap: 14px; }
.form-row.two { grid-template-columns: 1fr 1fr; }
.form-row.three { grid-template-columns: 1fr 1fr 1fr; }
.admin-side { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 22px; }
.admin-side h2 { font-size: 20px; margin-bottom: 12px; }
.admin-list { list-style: none; padding: 0; margin: 0; }
.admin-list li { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.admin-list button { border: 0; background: none; color: #b35a4a; font-size: 12px; cursor: pointer; }
.muted { color: var(--muted); font-size: 13px; }
.admin-tip { margin-top: 22px; background: #fff8ec; border-radius: 10px; padding: 14px; }
.admin-tip h3 { font-size: 15px; margin-bottom: 6px; }
.admin-tip p { font-size: 12px; color: #7a6a5b; }
.admin-tip code { background: #f3e5d3; padding: 1px 5px; border-radius: 4px; }

/* ============ 页脚 ============ */
.site-footer { background: #3c2f26; color: #e6d9c8; padding: 30px 24px; text-align: center; }
.footer-inner p { margin: 4px 0; font-size: 13px; }
.footer-note { color: #a89784; font-size: 12px !important; }

/* ============ 响应式 ============ */
@media (max-width: 900px) {
    .header-inner { flex-wrap: wrap; gap: 12px; }
    .header-search { order: 3; width: 100%; margin-left: 0; }
    .header-search input { flex: 1; width: auto; }
    .hero-inner { grid-template-columns: 1fr; padding: 40px 20px; }
    .hero-art { display: none; }
    .text-layout { grid-template-columns: 1fr; }
    .text-side { position: static; display: grid; grid-template-columns: 200px 1fr; gap: 16px; align-items: start; }
    .info-box { margin-top: 0; }
    .tag-list { grid-column: 1 / -1; }
    .admin-layout { grid-template-columns: 1fr; }
    .toolbar-title { max-width: 40vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .toolbar-right .btn:nth-child(3) { display: none; }
    .book { height: 620px; }
    .book-page { width: 100%; padding: 30px 28px; }
    .page-left { display: none; }
    .book-turn { width: 100%; }
    .book-spine { left: 6px; width: 12px; margin-left: 0; }
}
@media (max-width: 560px) {
    .main-nav { display: none; }
    .brand-text small { display: none; }
    .toolbar-title { display: none; }
    .toolbar-right .btn:nth-child(2) { display: none; }
    .hero h1 { font-size: 32px; }
    .hero-search { flex-wrap: wrap; }
    .hero-search input { width: 100%; flex-basis: 100%; }
    .hero-search button { width: 100%; }
    .form-row.two, .form-row.three { grid-template-columns: 1fr; }
    .text-head { flex-direction: column; align-items: flex-start; }
    .text-side { display: block; }
    .info-box { margin-top: 14px; }
    .book { height: 640px; }
    .book-page, .book-turn { padding: 24px 22px; }
    .cover-info h1 { font-size: 34px; }
    .page-section h2 { font-size: 22px; }
    .step-text { font-size: 15px; }
}

/* ============ AI 找菜 ============ */
.hero-ai-link { margin-top: 12px; font-size: 13px; color: var(--muted); }
.hero-ai-link a { color: var(--accent); font-weight: 600; border-bottom: 1px dashed var(--accent); }
.empty-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.ask-section { max-width: 1100px; margin: 0 auto; padding: 48px 24px 80px; }
.ask-head { text-align: center; margin-bottom: 28px; }
.ask-head h1 { font-size: 38px; margin: 10px 0; }
.ask-head p { color: var(--muted); font-size: 14px; max-width: 680px; margin: 0 auto; }
.ask-form { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 20px; box-shadow: var(--shadow); }
.ask-form textarea { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 14px; font-size: 15px; font-family: inherit; resize: vertical; outline: 0; background: #fffdf8; }
.ask-form textarea:focus { border-color: var(--accent); }
.ask-form .btn { margin-top: 12px; }
.ask-examples { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 16px 0 10px; font-size: 13px; color: var(--muted); }
.ask-examples a { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 4px 12px; font-size: 12px; color: #6b5b4d; }
.ask-examples a:hover { border-color: var(--accent); color: var(--accent); }
.ask-usage { font-size: 12px; color: #a08f7d; }
.ask-result-head { margin: 32px 0 18px; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.ask-result-head h2 { font-size: 24px; }
.ask-result-head span { font-size: 12px; color: var(--green); }
.alert a { color: inherit; text-decoration: underline; }
.ai-settings { margin-top: 34px; }
.ai-settings-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 14px; }
.ai-settings-head h2 { font-size: 24px; margin-bottom: 4px; }
.ai-form .check-line { flex-direction: row; align-items: center; font-size: 14px; }
.ai-form .check-line input { width: auto; }
.ai-form textarea { font-family: inherit; }
.footer-links { font-size: 12px !important; margin: 8px 0 !important; }
.footer-links a:hover { color: #fff; text-decoration: underline; }
@media (max-width: 560px) {
    .ask-head h1 { font-size: 30px; }
    .ai-settings-head { flex-direction: column; }
}

/* ============ 打印 ============ */
@media print {
    .site-header, .site-footer, .book-toolbar, .book-controls, .book-hint, .toc-panel, .text-actions { display: none !important; }
    body { background: #fff; }
    .book { box-shadow: none; height: auto; display: block; }
    .book-page { width: 100%; height: auto; overflow: visible; page-break-after: always; border: 0; }
    .page-left { display: block; }
}
