/* ==========================================================================
   iliuye.com — 首页（索引馆 / 卡片目录）
   米石纸底 / 深绿 + 黄铜 / 目录卡与借阅卡；内页不共用此骨架。
   ========================================================================== */

.page-home { background: var(--paper); }

/* ---------- Hero ---------- */
.hall-hero {
  position: relative;
  padding: 20px 0 64px;
  background:
    radial-gradient(circle at 82% 20%, rgba(201, 162, 90, .1), transparent 42%),
    var(--paper);
  border-bottom: 1px solid var(--line);
}
.hall-masthead {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 22px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 2px;
  color: #99917f;
}
.hall-masthead span:nth-child(2) { color: var(--accent-deep); }
.hall-grid {
  display: grid;
  grid-template-columns: .98fr 1.02fr;
  gap: 52px;
  align-items: center;
  padding-top: 44px;
}
.hall-kicker {
  display: inline-block;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 2.6px;
  color: var(--accent-deep);
}
.hall-copy h1 {
  margin-top: 14px;
  font-family: var(--serif);
  font-size: clamp(42px, 5.2vw, 68px);
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -1px;
  color: var(--green);
}
.hall-copy h1 em {
  display: block;
  margin-top: 16px;
  font-family: var(--font);
  font-style: normal;
  font-size: clamp(16px, 1.8vw, 20px);
  font-weight: 400;
  line-height: 1.75;
  letter-spacing: 0;
  color: #6d6657;
}
.hall-lead {
  margin-top: 20px;
  max-width: 540px;
  font-size: 15px;
  line-height: 2.05;
  color: #4a463c;
}
.hall-lead strong { color: var(--green); font-weight: 700; }
.hall-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}
.hall-actions .btn-primary { background: var(--green); box-shadow: 0 12px 26px rgba(19, 53, 44, .2); }
.hall-actions .btn-primary:hover { background: var(--green-2); }
.hall-actions .btn-room { color: var(--ink); border-color: var(--line-strong); }
.hall-actions .btn-room b { color: var(--accent-deep); }
.hall-meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 32px;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}
.hall-meta > div { padding: 12px 10px 12px 0; }
.hall-meta > div + div { padding-left: 14px; border-left: 1px solid var(--line); }
.hall-meta dt {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 1.6px;
  color: #99917f;
}
.hall-meta dd {
  margin-top: 3px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--green);
}
.hall-figure {
  border: 1px solid var(--line-strong);
  background: var(--green);
  padding: 9px;
  box-shadow: 0 30px 60px rgba(30, 40, 30, .18);
}
.hall-figure img { width: 100%; }
.hall-figure figcaption {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 4px 2px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 1.8px;
  color: #9fb3a7;
}

/* ---------- 状态条 ---------- */
.hall-ticker {
  background: var(--green);
  color: #d5ddd2;
  padding: 13px 0;
}
.hall-ticker .marquee-track {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 1px;
  color: #b7c6bb;
}
.hall-ticker span { white-space: nowrap; }
.hall-ticker b { color: var(--brass); margin-right: 7px; }
.hall-ticker em {
  font-style: normal;
  margin-left: 7px;
  color: #8fc7a8;
  font-size: 9px;
}

/* ---------- section ---------- */
.hall-section { padding: 76px 0; }
.hall-section.is-tint { background: var(--paper-2); }
.hall-section.is-dark { background: var(--green); color: #e2e8dd; }
.hall-section .container.narrow { max-width: 900px; }

.hall-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 38px;
}
.hall-head h2 {
  font-family: var(--serif);
  font-size: clamp(26px, 2.9vw, 36px);
  line-height: 1.35;
  font-weight: 700;
  letter-spacing: -.3px;
  color: var(--green);
}
.hall-note {
  max-width: 340px;
  font-size: 13px;
  line-height: 1.9;
  color: var(--muted);
  text-align: right;
}

/* ---------- 目录卡 ---------- */
.catalog {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.catalog-card {
  display: flex;
  flex-direction: column;
  padding: 20px 18px 18px;
  background: #fffdf7;
  min-height: 176px;
  transition: background .2s, box-shadow .2s;
}
.catalog-card:hover { background: #fff; box-shadow: inset 0 0 0 1px var(--accent-line); }
.cat-no {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 1.6px;
  color: var(--accent-deep);
}
.catalog-card h3 {
  margin-top: 10px;
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.45;
  font-weight: 700;
  color: var(--green);
  word-break: break-word;
}
.catalog-card p {
  margin-top: 6px;
  flex: 1;
  font-size: 11.8px;
  line-height: 1.8;
  color: var(--muted);
}
.catalog-card i {
  margin-top: 12px;
  font-style: normal;
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 1.2px;
  color: #a08858;
}

/* ---------- 数据 ---------- */
.hall-band { background: #0f1f19; color: #e4eadf; }
.band-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.band-item { padding: 28px 10px; text-align: center; border-left: 1px solid rgba(255, 255, 255, .1); }
.band-item:first-child { border-left: 0; }
.band-item strong {
  display: block;
  font-family: var(--mono);
  font-size: clamp(24px, 3vw, 37px);
  font-weight: 700;
  color: var(--brass);
  letter-spacing: -1px;
}
.band-item span:last-child {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  letter-spacing: 1.2px;
  color: #8b9c8e;
}

/* ---------- 三层 ---------- */
.stack {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}
.stack article { border-top: 2px solid var(--green); padding-top: 20px; }
.stack span {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 2.2px;
  color: var(--accent-deep);
}
.stack h3 {
  margin-top: 10px;
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 700;
}
.stack p { margin-top: 7px; font-size: 13.5px; line-height: 1.95; color: var(--muted); }

/* ---------- 路径 ---------- */
.route-panel {
  padding: 26px;
  border: 1px solid var(--line);
  background: #fffdf7;
}
.route-panel .tab { border-radius: 2px; }
.route-panel .tab.is-active { background: var(--green); border-color: var(--green); }
.route-panel .tab-panel { margin-top: 24px; }
.route-panel h3 { font-family: var(--serif); font-size: 21px; font-weight: 700; color: var(--green); }
.route-panel p { margin-top: 10px; max-width: 820px; font-size: 14px; line-height: 2; color: #4a463c; }
.route-panel p a { color: var(--accent-deep); border-bottom: 1px solid var(--accent-line); }
.route-points { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.route-points li {
  padding: 6px 12px;
  border: 1px dashed var(--line-strong);
  font-size: 12px;
  color: var(--muted);
}
.route-points li::before { content: "· "; color: var(--accent); font-weight: 700; }

/* ---------- 五步 ---------- */
.visit-steps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border-top: 1px solid var(--line-strong);
}
.visit-steps li { position: relative; padding: 22px 18px 0 0; }
.visit-steps li::before {
  content: "";
  position: absolute;
  left: 0; top: -4px;
  width: 7px; height: 7px;
  background: var(--accent);
}
.visit-steps li + li { padding-left: 18px; border-left: 1px solid var(--line); }
.visit-steps span { font-family: var(--mono); font-size: 10px; letter-spacing: 1.6px; color: var(--accent-deep); }
.visit-steps h3 { margin-top: 7px; font-family: var(--serif); font-size: 17px; font-weight: 700; }
.visit-steps p { margin-top: 5px; font-size: 12.5px; line-height: 1.9; color: var(--muted); }

/* ---------- 表 ---------- */
.dir-wrap { overflow-x: auto; border: 1px solid var(--line); background: #fffdf7; }
.dir-table { min-width: 660px; font-size: 13px; }
.dir-table th, .dir-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
.dir-table tbody tr:last-child th,
.dir-table tbody tr:last-child td { border-bottom: 0; }
.dir-table thead th {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 1.5px;
  font-weight: 400;
  color: #8b8474;
  background: var(--paper-2);
}
.dir-table tbody th { font-weight: 700; color: var(--green); }
.dir-table tbody td { color: #4a463c; }
.dir-table tbody td a { color: var(--accent-deep); border-bottom: 1px solid var(--accent-line); }

/* ---------- 房间 ---------- */
.hall-section.is-dark .hall-kicker { color: var(--brass); }
.hall-section.is-dark .hall-head h2 { color: #f2f0e7; }
.hall-section.is-dark .hall-note { color: #9caf9f; }
.room-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.room-grid article {
  padding: 22px 20px;
  border: 1px solid rgba(255, 255, 255, .13);
  background: rgba(255, 255, 255, .03);
}
.room-grid span { font-family: var(--mono); font-size: 10px; letter-spacing: 2px; color: var(--brass); }
.room-grid h3 { margin-top: 7px; font-family: var(--serif); font-size: 18px; font-weight: 700; color: #fff; }
.room-grid p { margin-top: 5px; font-size: 12.5px; line-height: 1.9; color: #a4b5a8; }
.room-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.room-actions .btn-room { color: #fff; border-color: rgba(255, 255, 255, .3); }
.room-actions .btn-room b { color: var(--brass); }

/* ---------- 书架 ---------- */
.shelf-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 22px; }
.shelf-grid article { padding: 28px 26px; border: 1px solid var(--line); }
.shelf-tool { background: #fffdf7; border-top: 3px solid var(--green); }
.shelf-culture { background: #f5ead8; border-top: 3px solid var(--accent); }
.shelf-grid article > span { font-family: var(--mono); font-size: 9px; letter-spacing: 2.2px; color: #8b8474; }
.shelf-grid h3 { margin-top: 9px; font-family: var(--serif); font-size: 23px; font-weight: 700; color: var(--green); }
.shelf-grid p { margin-top: 9px; font-size: 13.5px; line-height: 1.95; color: #4a463c; }
.shelf-links { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 16px; }
.shelf-links a {
  padding: 5px 11px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .5);
  font-size: 12px;
  color: var(--green);
}
.shelf-links a:hover { border-color: var(--accent); color: var(--accent-deep); }

/* ---------- 安全 ---------- */
.safety-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.safety-grid article { padding-top: 20px; border-top: 1px solid var(--line-strong); }
.safety-grid h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 700;
}
.safety-grid h3::before { content: ""; width: 7px; height: 7px; background: var(--accent); transform: rotate(45deg); }
.safety-grid p { margin-top: 8px; font-size: 13.5px; line-height: 1.95; color: var(--muted); }

/* ---------- CTA ---------- */
.hall-cta { padding: 64px 0; background: var(--green); color: #e2e8dd; }
.hall-cta .hall-kicker { color: var(--brass); }
.cta-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 30px; }
.cta-inner h2 { font-family: var(--serif); font-size: clamp(25px, 3vw, 36px); font-weight: 700; color: #fff; }
.cta-inner p { margin-top: 10px; max-width: 560px; font-size: 13.5px; line-height: 1.9; color: #a4b5a8; }
.cta-inner p strong { color: var(--brass); }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.cta-actions .tg-link { color: #fff; border-color: rgba(255, 255, 255, .4); }
.cta-actions .tg-link:hover { background: rgba(255, 255, 255, .08); border-color: var(--brass); }
.cta-actions .btn-outline { color: #fff; border-color: rgba(255, 255, 255, .4); }

/* ---------- 延伸 ---------- */
.read-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.read-grid a { padding: 18px 16px; background: #fffdf7; transition: background .2s; }
.read-grid a:hover { background: #fff; }
.read-grid span { font-family: var(--mono); font-size: 9px; letter-spacing: 1.6px; color: var(--accent-deep); }
.read-grid h3 { margin-top: 7px; font-family: var(--serif); font-size: 15px; font-weight: 700; color: var(--green); }
.read-grid p { margin-top: 4px; font-size: 11.5px; line-height: 1.8; color: var(--muted); }

/* ---------- 响应式 ---------- */
@media (max-width: 1080px) {
  .hall-grid { grid-template-columns: 1fr; gap: 34px; }
  .hall-figure { max-width: 720px; }
  .catalog { grid-template-columns: repeat(3, 1fr); }
  .stack { grid-template-columns: 1fr 1fr; }
  .visit-steps { grid-template-columns: repeat(3, 1fr); row-gap: 24px; }
  .visit-steps li:nth-child(4) { padding-left: 0; border-left: 0; }
  .room-grid { grid-template-columns: 1fr 1fr; }
  .shelf-grid { grid-template-columns: 1fr; }
  .read-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 760px) {
  .hall-section { padding: 52px 0; }
  .hall-hero { padding: 14px 0 46px; }
  .hall-masthead { font-size: 8.5px; letter-spacing: 1.4px; }
  .hall-copy h1 { letter-spacing: -.5px; }
  .hall-actions { flex-direction: column; align-items: stretch; }
  .hall-actions .btn { width: 100%; }
  .hall-meta { grid-template-columns: 1fr 1fr; }
  .hall-meta > div:nth-child(3) { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); }
  .hall-meta > div:nth-child(4) { border-top: 1px solid var(--line); }
  .hall-head { flex-direction: column; align-items: flex-start; gap: 12px; }
  .hall-note { text-align: left; max-width: none; }
  .catalog { grid-template-columns: 1fr 1fr; }
  .band-grid { grid-template-columns: 1fr 1fr; }
  .band-item:nth-child(3) { border-left: 0; }
  .stack { grid-template-columns: 1fr; gap: 20px; }
  .route-panel { padding: 20px; }
  .visit-steps { grid-template-columns: 1fr; row-gap: 20px; }
  .visit-steps li { padding-left: 0 !important; border-left: 0 !important; padding-right: 0; }
  .room-grid { grid-template-columns: 1fr; }
  .safety-grid { grid-template-columns: 1fr; gap: 22px; }
  .read-grid { grid-template-columns: 1fr 1fr; }
  .cta-actions { width: 100%; }
  .cta-actions .tg-link,
  .cta-actions .btn { width: 100%; }
}

@media (max-width: 420px) {
  .catalog { grid-template-columns: 1fr; }
  .read-grid { grid-template-columns: 1fr; }
}
