/* ==========================================================================
   MARC369 前台统一主题 / front-theme.css
   纯白底 · 墨绿文字与按钮 · 极少量铜金点缀 · 清爽留白的编辑式版式
   供首页、登录页、注册页及公共头/页脚共用。
   选择器均带 am- 前缀或限定作用域，避免污染 layui / Bootstrap。
   ========================================================================== */

:root {
    --am-forest-900: #162E26;
    --am-forest-800: #1F3D34;
    --am-forest-700: #2C5546;
    --am-forest-600: #3E6E5B;
    --am-forest-soft: rgba(31, 61, 52, .05);

    --am-white: #FFFFFF;
    --am-surface: #FAFBFA;
    --am-line: #E5EAE5;
    --am-line-soft: #F0F3F0;

    --am-copper: #B88746;
    --am-copper-deep: #96692F;
    --am-copper-light: #D9B57C;
    --am-copper-soft: rgba(184, 135, 70, .09);

    --am-ink: #22302A;
    --am-body: #5C665E;
    --am-muted: #8C968E;
    --am-success: #3F7A52;
    --am-danger: #A8443C;

    --am-serif: Georgia, "Songti SC", "STSong", "Noto Serif SC", "SimSun", "Times New Roman", serif;
    --am-sans: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Segoe UI", Arial, sans-serif;

    --am-radius: 3px;
    --am-radius-md: 4px;
    --am-shadow: 0 6px 22px rgba(31, 61, 52, .055);
    --am-ease: cubic-bezier(.22, .68, 0, 1);

    /* 历史类名兼容，统一指向白色主题 */
    --am-navy-900: #162E26;
    --am-navy-800: #1F3D34;
    --am-navy-700: #2C5546;
    --am-blue: #3E6E5B;
    --am-gold: #D9B57C;
    --am-gold-deep: #B88746;
    --am-bg: #FFFFFF;
}

@keyframes am-fade-up {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* --------------------------------------------------------------------------
   1. 基础
   -------------------------------------------------------------------------- */
body.am-body {
    margin: 0;
    background: var(--am-white);
    color: var(--am-ink);
    font-family: var(--am-sans);
    font-size: 15px;
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
body.am-auth-page { background: var(--am-white); }
body.am-body a { text-decoration: none; transition: color .25s var(--am-ease); }
body.am-body a:hover { text-decoration: none; }
body.am-body img { max-width: 100%; }
body.am-body ::selection { background: #E4EFE8; color: var(--am-forest-900); }

.am-reveal { opacity: 0; }
.am-reveal.am-in { animation: am-fade-up .65s var(--am-ease) forwards; }

/* --------------------------------------------------------------------------
   2. 通用元件
   -------------------------------------------------------------------------- */
.am-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 38px;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: var(--am-radius);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .4px;
    cursor: pointer;
    white-space: nowrap;
    transition: transform .25s var(--am-ease), background .25s var(--am-ease),
                color .25s var(--am-ease), border-color .25s var(--am-ease);
}
.am-btn:hover { transform: translateY(-2px); }
.am-btn-gold,
.am-btn-blue { color: #fff; background: var(--am-forest-800); border-color: var(--am-forest-800); }
.am-btn-gold:hover,
.am-btn-blue:hover { color: #fff; background: var(--am-forest-700); border-color: var(--am-forest-700); }
.am-btn-ghost { color: var(--am-forest-800); border-color: var(--am-line); background: #fff; }
.am-btn-ghost:hover { color: var(--am-forest-700); border-color: var(--am-forest-600); background: var(--am-surface); }

.am-eyebrow { display: inline-flex; align-items: center; gap: 9px; color: var(--am-copper-deep); font-size: 11px; font-weight: 700; letter-spacing: 2.4px; text-transform: uppercase; }
.am-eyebrow:before { content: ""; width: 18px; height: 1px; background: var(--am-copper); }

.am-text-link { display: inline-flex; align-items: center; gap: 8px; padding-bottom: 4px; border-bottom: 1px solid var(--am-forest-600); color: var(--am-forest-800); font-size: 13px; font-weight: 600; }
.am-text-link:hover { color: var(--am-forest-600); gap: 13px; }

/* --------------------------------------------------------------------------
   3. 顶部导航
   -------------------------------------------------------------------------- */
.am-header a,
.am-footer a { text-decoration: none; }
.am-header {
    position: sticky;
    top: 0;
    z-index: 1200;
    width: 100%;
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--am-line);
}
.am-header-inner { display: flex; align-items: center; gap: 30px; max-width: 1200px; min-height: 82px; margin: 0 auto; padding: 0 22px; }
.am-brand { display: flex; align-items: center; gap: 11px; flex-shrink: 0; }
/* 品牌徽标：墨绿渐变方块 + 铜金内框与底饰，衬线 M 居中 */
.am-brand-mark { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 3px; background: linear-gradient(145deg, #2C5546 0%, #162E26 74%); color: #FFFFFF; font-size: 21px; font-weight: 700; font-family: var(--am-serif); letter-spacing: -1px; line-height: 1; text-shadow: 0 1px 2px rgba(0, 0, 0, .22); overflow: hidden; box-shadow: 0 5px 14px rgba(22, 46, 38, .18); transition: transform .35s var(--am-ease), box-shadow .35s var(--am-ease); }
.am-brand-mark:before { content: ""; position: absolute; inset: 3px; border: 1px solid rgba(224, 198, 148, .58); border-radius: 2px; pointer-events: none; }
.am-brand-mark:after { content: ""; position: absolute; left: 9px; right: 9px; bottom: 4px; height: 2px; border-radius: 1px; background: linear-gradient(90deg, #B88746, #E4D6B8); pointer-events: none; }
.am-header .am-brand-mark { width: 42px; height: 42px; font-size: 23px; }
.am-brand:hover .am-brand-mark { transform: translateY(-2px) rotate(-4deg); box-shadow: 0 9px 20px rgba(22, 46, 38, .26); }
.am-brand-text { display: flex; flex-direction: column; line-height: 1.12; }
.am-brand-text b { color: var(--am-forest-800); font-family: var(--am-serif); font-size: 20px; font-weight: 700; letter-spacing: 1.2px; }
.am-header .am-brand-text b { font-size: 22px; letter-spacing: 1.4px; }
.am-brand-text small { color: var(--am-muted); font-size: 10px; letter-spacing: 1px; margin-top: 3px; }
.am-header .am-brand-text small { font-size: 11px; letter-spacing: 1.2px; }

.am-nav { display: flex; align-items: center; gap: 2px; flex: 1; flex-wrap: wrap; }
.am-nav-link { position: relative; padding: 10px 13px; color: var(--am-body) !important; font-size: 15px; font-weight: 500; letter-spacing: .3px; white-space: nowrap; }
.am-nav-link:after { content: ""; position: absolute; left: 13px; right: 13px; bottom: 4px; height: 1px; background: var(--am-forest-600); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--am-ease); }
.am-nav-link:hover { color: var(--am-forest-800) !important; }
.am-nav-link:hover:after { transform: scaleX(1); }

.am-header-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.am-header-actions .am-btn { height: 38px; padding: 0 18px; font-size: 13.5px; }
.am-user-chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 15px; border: 1px solid var(--am-line); border-radius: var(--am-radius); color: var(--am-forest-800) !important; background: var(--am-surface); font-size: 13.5px; font-weight: 600; }
.am-user-chip:hover { border-color: var(--am-forest-600); }
.am-mobile-toggle { display: none; width: 40px; height: 40px; align-items: center; justify-content: center; border: 1px solid var(--am-line); border-radius: var(--am-radius); background: #fff; color: var(--am-forest-800); font-size: 19px; cursor: pointer; }

/* --------------------------------------------------------------------------
   4. 首屏（纯白 · 左文案 / 右检索）
   -------------------------------------------------------------------------- */
.am-hero { position: relative; background: #fff; border-bottom: 1px solid var(--am-line); }
.am-hero-wrap { max-width: 1200px; margin: 0 auto; padding: 0 22px; }
.am-masthead { display: flex; align-items: center; gap: 16px; padding: 18px 0 14px; border-bottom: 1px solid var(--am-line-soft); color: var(--am-muted); font-size: 10px; letter-spacing: 2px; text-transform: uppercase; }
.am-masthead-name { color: var(--am-forest-800); font-weight: 700; letter-spacing: 2px; }
.am-masthead-rule { flex: 1; height: 1px; background: var(--am-line-soft); }

.am-hero-grid { display: grid; grid-template-columns: 1.18fr .82fr; gap: 72px; align-items: center; padding: 66px 0 58px; }
.am-hero-lead { animation: am-fade-up .7s var(--am-ease) both; }
.am-hero-kicker { display: block; margin-bottom: 22px; color: var(--am-forest-600); font-size: 10.5px; font-weight: 700; letter-spacing: 3px; text-transform: uppercase; }
.am-hero-title { margin: 0; color: var(--am-forest-900); font-family: var(--am-serif); font-size: clamp(32px, 3.7vw, 50px); font-weight: 700; line-height: 1.32; letter-spacing: -.5px; }
.am-hero-title em { font-style: normal; color: var(--am-forest-600); }
.am-hero-rule { display: block; width: 56px; height: 2px; margin: 26px 0 22px; background: var(--am-copper); }
.am-hero-desc { max-width: 500px; margin: 0 0 26px; color: var(--am-body); font-size: 14px; line-height: 2; }
.am-hero-actions { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.am-hero-actions .am-text-link-ghost { color: var(--am-muted); font-size: 12.5px; }
.am-hero-actions .am-text-link-ghost:hover { color: var(--am-forest-800); }

.am-hero-aside { animation: am-fade-up .75s .1s var(--am-ease) both; }
.am-search-card { padding: 26px 26px 22px; border: 1px solid var(--am-line); border-top: 2px solid var(--am-forest-800); background: #fff; box-shadow: var(--am-shadow); }
.am-search-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 18px; padding-bottom: 12px; border-bottom: 1px solid var(--am-line-soft); }
.am-search-card-head span { color: var(--am-forest-900); font-family: var(--am-serif); font-size: 19px; font-weight: 700; }
.am-search-card-head small { color: var(--am-muted); font-size: 9.5px; letter-spacing: 1.8px; text-transform: uppercase; }
.am-hero-search { display: flex; flex-direction: column; border: 1px solid var(--am-line); background: #fff; }
.am-hero-field { width: 100%; height: 42px; padding: 0 14px; border: 0; border-bottom: 1px solid var(--am-line-soft); outline: none; background-color: var(--am-surface); background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%233E6E5B' stroke-width='1.6' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; color: var(--am-ink); font-size: 13px; font-family: inherit; appearance: none; -webkit-appearance: none; cursor: pointer; }
.am-hero-input { width: 100%; height: 50px; padding: 0 14px; border: 0; outline: none; background: transparent; color: var(--am-ink); font-size: 14px; font-family: inherit; box-sizing: border-box; }
.am-hero-input::placeholder { color: #AEB6AE; }
.am-hero-submit { width: 100%; height: 46px; border: 0; border-top: 1px solid var(--am-line-soft); background: var(--am-forest-800); color: #fff; font-size: 13.5px; font-weight: 700; font-family: inherit; letter-spacing: 2.5px; cursor: pointer; transition: background .25s var(--am-ease); }
.am-hero-submit:hover { background: var(--am-forest-700); }
.am-quick-list { margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--am-line-soft); }
.am-quick-label { display: block; margin-bottom: 6px; color: var(--am-muted); font-size: 9.5px; letter-spacing: 1.8px; text-transform: uppercase; }
.am-quick-list a { display: flex; align-items: center; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid var(--am-line-soft); color: var(--am-body); font-size: 12.5px; }
.am-quick-list a:last-child { border-bottom: 0; }
.am-quick-list a span { color: var(--am-copper); font-family: var(--am-serif); font-size: 10.5px; }
.am-quick-list a:hover { color: var(--am-forest-700); padding-left: 5px; }

.am-metrics { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--am-line-soft); }
.am-stat { padding: 20px 24px 22px; border-left: 1px solid var(--am-line-soft); }
.am-stat:first-child { border-left: 0; padding-left: 0; }
.am-stat-num { display: block; color: var(--am-forest-800); font-family: var(--am-serif); font-size: 22px; font-weight: 700; line-height: 1.2; }
.am-stat-label { display: block; margin-top: 5px; color: var(--am-muted); font-size: 11px; letter-spacing: 1px; }

/* --------------------------------------------------------------------------
   5. 内容版块（更轻的章节头 · 更大留白 · 细线分栏）
   -------------------------------------------------------------------------- */
.am-ed { max-width: 1200px; margin: 0 auto; padding: 0 22px 10px; }
.am-ed-section { padding: 68px 0 64px; border-bottom: 1px solid var(--am-line-soft); }
.am-ed-section:last-of-type { border-bottom: 0; }
.am-ed-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 30px; }
.am-ed-num { flex: 0 0 auto; color: var(--am-copper); font-family: var(--am-serif); font-size: 12px; font-weight: 700; letter-spacing: 1px; }
.am-ed-title { flex: 0 0 auto; margin: 0; color: var(--am-forest-900); font-family: var(--am-serif); font-size: clamp(22px, 2.3vw, 28px); font-weight: 700; letter-spacing: .5px; }
.am-ed-line { flex: 1; height: 1px; background: var(--am-line); }
.am-ed-more { flex: 0 0 auto; color: var(--am-forest-600); font-size: 12px; }
.am-ed-more:hover { color: var(--am-copper-deep); }

.am-ed-split { display: grid; grid-template-columns: 1.5fr 1fr; gap: 54px; align-items: start; }
.am-ed-sidecol { border-left: 1px solid var(--am-line-soft); padding-left: 38px; }
.am-ed-cols3 { display: grid; grid-template-columns: repeat(3, 1fr); }
.am-ed-col { padding: 0 30px; border-left: 1px solid var(--am-line-soft); }
.am-ed-col:first-child { padding-left: 0; border-left: 0; }
.am-ed-col:last-child { padding-right: 0; }

.am-ed-subtitle { margin: 0 0 14px; padding-bottom: 10px; border-bottom: 1px solid var(--am-line); color: var(--am-forest-900); font-size: 14px; font-weight: 700; letter-spacing: .5px; }
.am-ed-note { margin: 0 0 18px; color: var(--am-body); font-size: 13px; line-height: 1.95; }
.am-ed-item { display: flex; align-items: baseline; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--am-line-soft); }
.am-ed-item:hover { background: var(--am-forest-soft); }
.am-ed-item .am-ed-index { flex: 0 0 20px; color: var(--am-copper); font-family: var(--am-serif); font-size: 11px; }
.am-ed-item .am-ed-text { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.am-ed-item .am-ed-text a { color: var(--am-ink); font-size: 13px; }
.am-ed-item .am-ed-text a:hover { color: var(--am-forest-600); }
.am-ed-item .am-ed-date { flex: 0 0 auto; color: var(--am-muted); font-size: 10.5px; }

.am-ed-thumbs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.am-ed-thumbs a { display: block; }
.am-ed-thumbs img { display: block; width: 100%; height: 108px; object-fit: cover; border: 1px solid var(--am-line-soft); background: var(--am-surface); transition: transform .3s var(--am-ease); }
.am-ed-thumbs a:hover img { transform: translateY(-3px); }
.am-ed-thumbs .am-ed-thumb-title { display: block; margin-top: 6px; color: var(--am-body); font-size: 11.5px; line-height: 1.5; }

.am-carousel-wrap { border: 1px solid var(--am-line); background: var(--am-surface); overflow: hidden; }
.am-carousel-wrap .layui-carousel,
.am-carousel-wrap .layui-carousel > [carousel-item] > * { background: var(--am-surface); }
.am-carousel-wrap .layui-carousel img { display: block; width: 100%; height: 100%; object-fit: cover; }
.am-carousel-wrap .layui-carousel-ind ul { background: rgba(31, 61, 52, .55); border-radius: 0; padding: 4px 9px; }
.am-carousel-wrap .layui-carousel-ind li { background: rgba(255, 255, 255, .55); }
.am-carousel-wrap .layui-carousel-ind li.layui-this { background: #fff; }
.am-carousel-wrap .layui-carousel-arrow { background: rgba(31, 61, 52, .55); border-radius: 0; }

.am-book-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.am-book-entry { display: block; }
.am-book-entry img { display: block; width: 100%; height: 190px; object-fit: cover; border: 1px solid var(--am-line-soft); background: var(--am-surface); transition: transform .3s var(--am-ease); }
.am-book-entry:hover img { transform: translateY(-4px); }
.am-book-entry .am-book-no { display: block; margin-top: 12px; color: var(--am-copper); font-family: var(--am-serif); font-size: 10.5px; letter-spacing: 1.2px; }
.am-book-entry .am-book-title { display: block; margin-top: 5px; color: var(--am-forest-900); font-size: 14.5px; font-weight: 700; line-height: 1.5; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.am-book-entry:hover .am-book-title { color: var(--am-forest-600); }
.am-book-entry .am-book-meta { display: block; margin-top: 4px; color: var(--am-muted); font-size: 11px; }

.am-reading-nav { display: flex; gap: 22px; margin: 0 0 24px; padding: 0; border-bottom: 1px solid var(--am-line); }
.am-reading-nav a { display: inline-block; padding: 0 0 9px; color: var(--am-muted); font-size: 12.5px; }
.am-reading-nav a:hover { color: var(--am-forest-700); }
.am-reading-nav a.am-reading-active { color: var(--am-forest-800); font-weight: 700; border-bottom: 2px solid var(--am-forest-800); }

.am-tag-list { display: flex; flex-wrap: wrap; gap: 7px 18px; }
.am-tag-list a { padding-bottom: 3px; border-bottom: 1px solid transparent; color: var(--am-body); font-size: 12.5px; }
.am-tag-list a:hover { color: var(--am-forest-700); border-bottom-color: var(--am-forest-600); }
.am-ed-figure { margin-top: 24px; }
.am-ed-figure img { display: block; width: 100%; border: 1px solid var(--am-line-soft); }

/* 首页广告位：沿用原页面三处相对位置（书目区左栏 / 分类栏下方 / 检索区右栏） */
.am-catalogue-grid { display: grid; grid-template-columns: 14% minmax(0, 1fr) 23%; gap: 30px; align-items: start; }
.am-catalogue-grid .am-book-grid { gap: 20px; }
.am-catalogue-grid .am-book-entry img { height: 168px; }
.am-search-grid { display: grid; grid-template-columns: minmax(0, 1fr) 17%; gap: 34px; align-items: start; }
.am-search-main { min-width: 0; }
.am-ad-rail { min-width: 0; }
.am-ad-rail img { display: block; width: 100%; border: 1px solid var(--am-line-soft); background: var(--am-surface); }
.am-ad-tall img { height: 300px; object-fit: cover; }
.am-ad-wide { margin-top: 24px; }
.am-ad-wide img { height: 160px; object-fit: cover; }

.am-search-bar { display: flex; align-items: stretch; border: 1px solid var(--am-line); background: #fff; }
.am-search-bar:focus-within { border-color: var(--am-forest-600); }
.am-search-bar select { flex: 0 0 126px; padding: 0 15px; border: 0; border-right: 1px solid var(--am-line); outline: none; background: var(--am-surface); color: var(--am-ink); font-size: 13px; font-family: inherit; cursor: pointer; }
.am-search-bar input { flex: 1; min-width: 0; height: 48px; padding: 0 16px; border: 0; outline: none; background: transparent; color: var(--am-ink); font-size: 14px; font-family: inherit; }
.am-search-bar input::placeholder { color: #AEB6AE; }
.am-search-bar button { flex: 0 0 112px; border: 0; background: var(--am-forest-800); color: #fff; font-size: 13.5px; font-weight: 700; font-family: inherit; letter-spacing: 2px; cursor: pointer; transition: background .25s var(--am-ease); }
.am-search-bar button:hover { background: var(--am-forest-700); }

.am-main #search_result,
#search_result { margin-top: 24px; border-top: 1px solid var(--am-line); overflow-x: auto; }
#search_result .layui-table { margin: 0; }
#search_result .layui-table th { background: var(--am-surface); color: var(--am-forest-900); font-weight: 700; border-color: var(--am-line); }
#search_result .layui-table td { color: var(--am-ink); border-color: var(--am-line-soft); }
#search_result .layui-table tr:hover td { background: var(--am-surface); }
#search_result .layui-btn-primary { border: 1px solid var(--am-line); border-radius: var(--am-radius); background: #fff; color: var(--am-forest-700); }
#search_result .layui-btn-primary:hover { color: #fff; background: var(--am-forest-800); border-color: var(--am-forest-800); }
#search_result table:not(.layui-table) { width: 100%; border-collapse: collapse; }
#search_result table:not(.layui-table) th { padding: 11px 12px; background: var(--am-surface); color: var(--am-forest-900); text-align: left; font-size: 12.5px; border-bottom: 1px solid var(--am-line); }
#search_result table:not(.layui-table) td { padding: 10px 12px; border-bottom: 1px solid var(--am-line-soft); font-size: 12.5px; }

.am-links { max-width: 1200px; margin: 0 auto; padding: 26px 22px 44px; border-top: 1px solid var(--am-line-soft); }
.am-links-label { display: inline-block; margin-right: 16px; color: var(--am-forest-800); font-size: 12.5px; font-weight: 700; letter-spacing: 1px; }
.am-links a { display: inline-block; margin: 5px 12px 5px 0; color: var(--am-muted); font-size: 12px; }
.am-links a:hover { color: var(--am-forest-700); }

/* 其它页面可能仍在使用的旧类 */
.am-main { padding-bottom: 10px; }
.am-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: 0 0 16px; padding-bottom: 10px; border-bottom: 1px solid var(--am-line); }
.am-section-title { margin: 0; color: var(--am-forest-900); font-family: var(--am-serif); font-size: 20px; font-weight: 700; }
.am-section-more { color: var(--am-muted); font-size: 12px; }
.am-section-more:hover { color: var(--am-forest-700); }
.am-main .article_list dl dd { display: flex; gap: 12px; margin: 0; padding: 9px 0; border-bottom: 1px solid var(--am-line-soft); }
.am-main .article_list dl dd p { flex: 1; margin: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.am-main .article_list dl dd p a { color: var(--am-ink); font-size: 13px; }
.am-main .article_list dl dd p a:hover { color: var(--am-forest-700); }
.am-main .article_list dl dd span { color: var(--am-muted); font-size: 11px; }
.am-main .book-cover { display: block; width: 100%; border: 1px solid var(--am-line-soft); }

/* --------------------------------------------------------------------------
   6. 页脚（白底细线，保持轻盈）
   -------------------------------------------------------------------------- */
.am-footer { position: relative; margin-top: 10px; padding: 42px 22px 24px; background: #fff; border-top: 1px solid var(--am-line); color: var(--am-muted); }
.am-footer:before { content: ""; position: absolute; left: 50%; top: -1px; width: 96px; height: 2px; background: var(--am-forest-800); transform: translateX(-50%); }
.am-footer-inner { max-width: 1200px; margin: 0 auto; text-align: center; }
.am-footer-brand { display: block; margin-bottom: 8px; color: var(--am-forest-900); font-family: var(--am-serif); font-size: 19px; font-weight: 700; letter-spacing: 1.2px; }
.am-footer-brand span { color: var(--am-forest-600); }
.am-footer-desc { margin: 0 0 20px; color: var(--am-muted); font-size: 12px; }
.am-footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 0; margin-bottom: 20px; }
.am-footer-links a { padding: 0 15px; border-right: 1px solid var(--am-line); color: var(--am-body) !important; font-size: 12px; }
.am-footer-links a:first-child { padding-left: 15px; }
.am-footer-links a:last-child { border-right: 0; }
.am-footer-links a:hover { color: var(--am-forest-700) !important; }
.am-footer-copy { padding-top: 16px; border-top: 1px solid var(--am-line-soft); color: var(--am-muted); font-size: 11px; }

/* --------------------------------------------------------------------------
   7. 认证页（纯白 · 左侧叙事 / 右侧表单，一条细线分隔）
   -------------------------------------------------------------------------- */
.am-auth { position: relative; min-height: 100vh; overflow-x: hidden; color: var(--am-ink); background: #fff; font-family: var(--am-sans); }
.am-auth:before { content: ""; position: absolute; left: 46%; top: 0; bottom: 0; width: 1px; background: var(--am-line); pointer-events: none; }
.am-auth:after,
.am-auth-grid { display: none; }

.am-auth-topbar { position: relative; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 16px; max-width: 1180px; margin: 0 auto; padding: 24px 24px 8px; }
.am-auth-topbar .am-brand-mark { background: var(--am-forest-800); color: #fff; }
.am-auth-topbar .am-brand-text b { color: var(--am-forest-800); }
.am-auth-topbar .am-brand-text small { color: var(--am-muted); }
.am-auth-top-link { color: var(--am-muted); font-size: 12.5px; }
.am-auth-top-link b { color: var(--am-forest-800); font-weight: 700; border-bottom: 1px solid var(--am-forest-600); padding-bottom: 2px; }
.am-auth-top-link:hover b { color: var(--am-forest-600); }

.am-auth-wrap { position: relative; z-index: 2; display: flex; align-items: center; gap: 56px; max-width: 1180px; margin: 0 auto; padding: 28px 24px 60px; }
.am-auth-hero { flex: 1 1 46%; color: var(--am-ink); animation: am-fade-up .75s var(--am-ease) both; }
.am-auth-hero h1 { margin: 20px 0 18px; color: var(--am-forest-900); font-family: var(--am-serif); font-size: clamp(26px, 3vw, 38px); font-weight: 700; line-height: 1.5; }
.am-auth-hero h1 em { font-style: normal; color: var(--am-forest-600); }
.am-auth-hero > p { max-width: 450px; color: var(--am-body); font-size: 13.5px; line-height: 2; }
.am-auth-points { list-style: none; margin: 26px 0 0; padding: 0; }
.am-auth-points li { display: flex; align-items: flex-start; gap: 11px; margin-bottom: 12px; color: var(--am-body); font-size: 12.5px; }
.am-auth-points li i { flex: 0 0 19px; display: inline-flex; align-items: center; justify-content: center; width: 19px; height: 19px; margin-top: 3px; border: 1px solid var(--am-forest-600); color: var(--am-forest-600); font-size: 10px; font-style: normal; }
.am-auth-note { max-width: 430px; margin-top: 28px; padding: 16px 20px; border-left: 2px solid var(--am-copper); background: var(--am-surface); }
.am-auth-note b { display: block; margin-bottom: 7px; color: var(--am-forest-800); font-size: 11.5px; letter-spacing: 1.2px; }
.am-auth-note p { margin: 0; color: var(--am-body); font-size: 12px; line-height: 1.9; }
.am-auth-steps { display: flex; margin-top: 28px; }
.am-auth-step { flex: 1; position: relative; padding-right: 14px; }
.am-auth-step i { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border: 1px solid var(--am-line); color: var(--am-forest-700); font-size: 11px; font-style: normal; font-weight: 700; }
.am-auth-step span { display: block; margin-top: 8px; color: var(--am-muted); font-size: 11.5px; }
.am-auth-step:after { content: ""; position: absolute; left: 32px; right: 8px; top: 13px; height: 1px; background: var(--am-line); }
.am-auth-step:last-child:after { display: none; }

.am-auth-panel { flex: 0 0 400px; max-width: 100%; margin-left: auto; animation: am-fade-up .8s .1s var(--am-ease) both; }
.am-auth-card { padding: 4px 0 0; }
.am-auth-card.am-wide { padding: 2px 0 0; }
.am-auth-title { margin: 0 0 5px; color: var(--am-forest-900); font-family: var(--am-serif); font-size: 29px; font-weight: 700; }
.am-auth-subtitle { margin: 0 0 24px; padding-bottom: 18px; border-bottom: 1px solid var(--am-line); color: var(--am-muted); font-size: 12.5px; }
.am-auth-card .form-group { margin-bottom: 16px; }
.am-field-label { display: block; margin-bottom: 7px; color: var(--am-forest-800); font-size: 12px; font-weight: 600; }
.am-field-shell { display: flex; align-items: center; height: 46px; padding: 0 14px; border: 1px solid var(--am-line); border-radius: var(--am-radius); background: var(--am-surface); transition: border-color .25s var(--am-ease), box-shadow .25s var(--am-ease); }
.am-field-shell:focus-within { border-color: var(--am-forest-600); background: #fff; box-shadow: 0 0 0 3px var(--am-forest-soft); }
.am-field-shell > span { flex: 0 0 auto; margin-right: 11px; color: var(--am-forest-600); font-size: 13px; }
.am-field-shell input.form-control,
.am-field-shell input.layui-input { flex: 1; min-width: 0; height: 44px; padding: 0; border: 0; outline: none; box-shadow: none; background: transparent; color: var(--am-ink); font-size: 14px; font-family: inherit; }
.am-field-shell input::placeholder { color: #AEB6AE; }
.am-field-hint { margin-top: 5px; color: var(--am-muted); font-size: 11px; }
.am-field-error { color: var(--am-danger); font-size: 12px; }

.am-submit { display: block; width: 100%; height: 48px; margin-top: 6px; border: 0; border-radius: var(--am-radius); background: var(--am-forest-800); color: #fff; font-size: 14.5px; font-weight: 700; font-family: inherit; letter-spacing: 2.5px; cursor: pointer; transition: background .25s var(--am-ease); }
.am-submit:hover { background: var(--am-forest-700); }
.am-submit:disabled { opacity: .6; cursor: not-allowed; }
.am-auth-actions { display: flex; align-items: center; justify-content: space-between; margin-top: 18px; font-size: 12.5px; }
.am-auth-actions a { color: var(--am-muted); }
.am-auth-actions a:hover { color: var(--am-forest-700); }
.am-auth-actions .am-primary-link { color: var(--am-forest-800); font-weight: 700; border-bottom: 1px solid var(--am-forest-600); padding-bottom: 2px; }
.am-auth-agreement { margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--am-line-soft); color: var(--am-muted); font-size: 11px; line-height: 1.9; }
.am-auth-bottom { position: relative; z-index: 2; padding: 0 24px 22px; color: var(--am-muted); font-size: 11px; text-align: right; }

.am-alert { display: none; margin-bottom: 16px; padding: 10px 13px; border-left: 2px solid var(--am-danger); background: rgba(168, 68, 60, .06); font-size: 12.5px; line-height: 1.6; }
.am-alert.am-show { display: block; animation: am-fade-up .3s var(--am-ease) both; }
.am-alert-error { color: var(--am-danger); }
.am-alert-success { border-left-color: var(--am-success); background: rgba(63, 122, 82, .07); color: var(--am-success); }

.am-auth-card .layui-form-item { margin-bottom: 15px; }
.am-auth-card .layui-form-label { width: 94px; padding: 9px 8px 9px 0; color: var(--am-forest-800); font-size: 12px; font-weight: 600; text-align: left; }
.am-auth-card .layui-input-block { margin-left: 94px; min-height: 40px; }
.am-auth-card .layui-input,
.am-auth-card .layui-select { height: 42px; border: 1px solid var(--am-line); border-radius: var(--am-radius); background: var(--am-surface); font-size: 13.5px; }
.am-auth-card .layui-input:focus { border-color: var(--am-forest-600) !important; box-shadow: 0 0 0 3px var(--am-forest-soft) !important; }
.am-auth-card label.error { display: block; margin-top: 4px; color: var(--am-danger); font-size: 11.5px; font-weight: 400; }
.am-auth-card .am-form-section { margin: 2px 0 16px; padding-bottom: 7px; border-bottom: 1px solid var(--am-line-soft); color: var(--am-forest-900); font-size: 13.5px; font-weight: 700; }
.am-auth-card .am-form-section:not(:first-child) { margin-top: 22px; }
.am-auth-card .am-form-section span { display: inline-block; width: 3px; height: 12px; margin-right: 7px; background: var(--am-forest-600); vertical-align: -2px; }
.am-sms-btn { height: 42px; border-radius: var(--am-radius); background: var(--am-forest-800); color: #fff; font-size: 12.5px; }
.am-sms-btn.disabled,
.am-sms-btn[disabled] { background: #C9D0C9 !important; color: #fff !important; }
.am-auth-panel-wide { flex: 0 1 510px; }
.am-auth-card .am-sms-row { display: flex; align-items: stretch; gap: 9px; }
.am-auth-card .am-sms-row .am-sms-input { flex: 1 1 auto; min-width: 0; }
.am-auth-card .am-sms-row .am-sms-btn { flex: 0 0 112px; height: 42px; padding: 0 8px; border: 0; border-radius: var(--am-radius); cursor: pointer; font-size: 12px; font-weight: 600; }
.am-auth-card .am-agree-row { margin: 2px 0 16px; }
.am-auth-card .am-agree-row label { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--am-muted); font-size: 12px; font-weight: 400; cursor: pointer; }
.am-auth-card .am-agree-row input[type="checkbox"] { width: 14px; height: 14px; margin: 0; accent-color: var(--am-forest-800); }

/* 站点地图等轻内容页 */
.am-page-head { margin: 0; padding: 48px 0 26px; border-bottom: 1px solid var(--am-line); color: var(--am-forest-900); }
.am-page-head .am-eyebrow { margin-bottom: 12px; }
.am-page-head h1 { margin: 0 0 8px; font-family: var(--am-serif); font-size: clamp(26px, 3vw, 38px); font-weight: 700; }
.am-page-head p { margin: 0; color: var(--am-muted); font-size: 13px; }
.am-sitemap-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 0 28px; margin: 8px 0 36px; }
.am-sitemap-grid a { display: block; padding: 11px 0; border-bottom: 1px solid var(--am-line-soft); color: var(--am-ink); font-size: 13px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.am-sitemap-grid a:hover { color: var(--am-forest-700); padding-left: 5px; }
.am-empty-tip { padding: 36px; color: var(--am-muted); text-align: center; border: 1px dashed var(--am-line); }

/* --------------------------------------------------------------------------
   8. 响应式
   -------------------------------------------------------------------------- */
@media (max-width: 1100px) {
    .am-nav-link { padding: 8px 9px; font-size: 13.5px; }
    .am-nav-link:after { left: 9px; right: 9px; }
    .am-header-inner { gap: 16px; min-height: 74px; }
    .am-hero-grid { gap: 42px; }
    .am-ed-split { gap: 34px; }
    .am-ed-sidecol { padding-left: 26px; }
    .am-ed-col { padding: 0 20px; }
    .am-auth-wrap { gap: 34px; }
    .am-auth-panel { flex-basis: 390px; }
}
@media (max-width: 960px) {
    .am-nav, .am-header-actions .am-nav-hide { display: none; }
    .am-mobile-toggle { display: inline-flex; }
    .am-hero-grid { grid-template-columns: 1fr; gap: 36px; padding: 48px 0 44px; }
    .am-hero-title { font-size: clamp(32px, 5vw, 46px); }
    .am-search-card { max-width: 500px; }
    .am-ed-split { grid-template-columns: 1fr; gap: 28px; }
    .am-ed-sidecol { border-left: 0; border-top: 1px solid var(--am-line-soft); padding: 24px 0 0; }
    .am-ed-cols3 { grid-template-columns: 1fr; }
    .am-ed-col { padding: 22px 0; border-left: 0; border-top: 1px solid var(--am-line-soft); }
    .am-ed-col:first-child { padding-top: 0; border-top: 0; }
    .am-book-grid { grid-template-columns: repeat(2, 1fr); gap: 22px; }
    .am-auth:before { display: none; }
    .am-auth-hero { display: none; }
    .am-auth-wrap { justify-content: center; padding-top: 22px; }
    .am-auth-panel { flex: 0 1 450px; margin-left: 0; }
    .am-auth-panel-wide { flex: 0 1 520px; }
    .am-auth-bottom { text-align: center; }
}
@media (max-width: 680px) {
    .am-header-inner { min-height: 68px; padding: 0 14px; }
    .am-brand-text small { display: none; }
    .am-brand-text b { font-size: 17px; }
    .am-header .am-brand-text b { font-size: 19px; }
    .am-header-actions .am-btn { height: 34px; padding: 0 14px; font-size: 12.5px; }
    .am-masthead { letter-spacing: 1.2px; font-size: 9.5px; }
    .am-masthead-meta { display: none; }
    .am-hero-grid { padding: 36px 0 32px; }
    .am-hero-desc { font-size: 13px; }
    .am-search-card { padding: 20px 18px; }
    .am-metrics { grid-template-columns: repeat(2, 1fr); }
    .am-stat { padding: 16px 12px; border-left: 0; border-top: 1px solid var(--am-line-soft); }
    .am-stat:first-child, .am-stat:nth-child(2) { border-top: 0; }
    .am-stat:nth-child(even) { border-left: 1px solid var(--am-line-soft); padding-left: 16px; }
    .am-stat-num { font-size: 20px; }
    .am-ed { padding: 0 16px 10px; }
    .am-ed-section { padding: 42px 0 38px; }
    .am-ed-head { gap: 10px; margin-bottom: 22px; }
    .am-ed-more { margin-left: auto; }
    .am-book-entry img { height: 140px; }
    .am-search-bar { flex-wrap: wrap; }
    .am-search-bar select { flex: 1 1 100%; height: 40px; border-right: 0; border-bottom: 1px solid var(--am-line); }
    .am-search-bar input, .am-search-bar button { flex: 1 1 100%; }
    .am-search-bar button { height: 42px; }
    .am-links { padding: 22px 16px 30px; }
    .am-auth-topbar { padding: 16px 16px 6px; }
    .am-auth-wrap { padding: 18px 16px 36px; }
    .am-auth-title { font-size: 26px; }
    .am-auth-card .layui-form-label { width: 100%; padding: 0 0 5px; text-align: left; }
    .am-auth-card .layui-input-block { margin-left: 0; }
    .am-auth-panel-wide { flex: 0 1 100%; }
    .am-auth-card .am-sms-row .am-sms-btn { flex-basis: 96px; }
    .am-page-head { padding: 32px 0 20px; }
    .am-footer { padding: 32px 16px 20px; }
    .am-footer-links a { padding: 0 10px 0 0; border-right: 0; margin-right: 10px; }
}
/* 首页广告栏响应式：窄屏退化为单列，广告仍跟随原版块 */
@media (max-width: 1100px) {
    .am-catalogue-grid, .am-search-grid { gap: 22px; }
}
@media (max-width: 960px) {
    .am-catalogue-grid, .am-search-grid { grid-template-columns: 1fr; gap: 26px; }
    .am-ad-left, .am-ad-right { max-width: 300px; }
    .am-catalogue-grid .am-book-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 680px) {
    .am-catalogue-grid .am-book-grid { grid-template-columns: repeat(2, 1fr); gap: 18px; }
}
@media (prefers-reduced-motion: reduce) {
    .am-reveal.am-in, .am-hero-lead, .am-hero-aside, .am-auth-hero, .am-auth-panel { animation: none !important; opacity: 1 !important; }
    * { scroll-behavior: auto !important; }
}
