/* ============================================================
   AKIMOMO 漫画屋 — 前台公共样式
   风格：黑白纸张 + 金色点缀，移动端优先
   ============================================================ */
:root {
  --ink: #0a0a0a;
  --paper: #f5f1e8;
  --paper-2: #efe9da;
  --accent: #d9a031;
  --line: rgba(10,10,10,0.14);
  --muted: rgba(10,10,10,0.6);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: "PingFang SC","Microsoft YaHei","Hiragino Sans GB","Noto Sans SC",sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  padding-top: 64px; /* 顶部导航高度 */
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
.serif { font-family: "Songti SC","SimSun",serif; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 5vw; }

/* ---------- 顶部导航 ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 5vw;
  background: rgba(245,241,232,0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.brand { font-weight: 700; letter-spacing: 0.08em; font-size: 1.05rem; }
.brand small { font-weight: 400; color: var(--muted); }
.nav-links { display: flex; gap: 22px; align-items: center; }
.nav-links a { font-size: 0.92rem; color: var(--muted); transition: color .15s; }
.nav-links a:hover, .nav-links a.active { color: var(--ink); }
.nav-toggle { display: none; background: none; border: none; font-size: 1.4rem; cursor: pointer; }

@media (max-width: 680px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: 100%; right: 0; left: 0;
    flex-direction: column; gap: 4px;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 10px 5vw 14px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 8px 0; font-size: 1rem; }
}

/* ---------- 通用区块 ---------- */
.section { padding: 56px 0; }
.section-title {
  font-family: "Songti SC","SimSun",serif;
  font-size: clamp(1.6rem, 4vw, 2.4rem); font-weight: 700;
  margin-bottom: 8px; letter-spacing: 0.02em;
}
.section-sub { color: var(--muted); margin-bottom: 28px; font-size: 0.96rem; }
.tag { font-size: 0.74rem; letter-spacing: 0.3em; color: var(--accent); text-transform: uppercase; }

/* ---------- 首页轮播 ---------- */
.hero { position: relative; min-height: 70vh; overflow: hidden; }
.slides { position: relative; height: 70vh; }
.slide {
  position: absolute; inset: 0; opacity: 0; transition: opacity 1s ease;
  background-size: cover; background-position: center;
}
.slide.active { opacity: 1; }
.slide::after { content:""; position:absolute; inset:0; background:linear-gradient(180deg, rgba(0,0,0,0.1), rgba(0,0,0,0.55)); }
.hero-cap {
  position: absolute; left: 5vw; bottom: 12vh; color: #fff; z-index: 2;
}
.hero-cap .tag { color: var(--accent); }
.hero-cap h2 { font-family:"Songti SC","SimSun",serif; font-size: clamp(2rem,6vw,3.6rem); margin: 8px 0 10px; }
.hero-cap p { max-width: 30ch; opacity: .9; }
.dots { position: absolute; bottom: 4vh; left: 5vw; display: flex; gap: 8px; z-index: 2; }
.dots button { width: 8px; height: 8px; border-radius: 50%; border: none; background: rgba(255,255,255,.5); cursor: pointer; }
.dots button.active { background: var(--accent); }

/* ---------- 店铺卡片 ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.card { background: #fff; border: 1px solid var(--line); padding: 22px; box-shadow: 4px 4px 0 rgba(10,10,10,0.06); }
.card h3 { font-family:"Songti SC","SimSun",serif; font-size: 1.15rem; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 0.92rem; }

/* ---------- 书单：筛选 + 封面墙 ---------- */
.toolbar {
  display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center;
  padding: 14px 16px; background: #fff; border: 1px solid var(--line);
  margin-bottom: 22px;
}
.toolbar select, .toolbar input[type=search] {
  border: 1px solid var(--line); background: var(--paper);
  padding: 8px 10px; font-size: 0.9rem; font-family: inherit;
}
.toolbar input[type=search] { flex: 1; min-width: 140px; }
.toolbar .search-btn { border: 1px solid var(--ink); background: var(--ink); color: var(--paper); padding: 8px 16px; cursor: pointer; font-size: 0.9rem; }

.grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 18px;
}
.book {
  cursor: pointer; display: flex; flex-direction: column; gap: 8px;
}
.book .cover {
  aspect-ratio: 3/4; background: var(--paper-2);
  background-size: cover; background-position: center;
  border: 1px solid var(--line); box-shadow: 3px 3px 0 rgba(10,10,10,0.08);
  transition: transform .15s;
}
.book:hover .cover { transform: translateY(-3px); }
.book .b-title { font-size: 0.88rem; font-weight: 600; line-height: 1.35; }
.book .b-meta { font-size: 0.74rem; color: var(--muted); }

/* 分页 */
.pager { display: flex; gap: 8px; justify-content: center; margin: 32px 0; flex-wrap: wrap; }
.pager button {
  border: 1px solid var(--line); background: #fff; padding: 6px 12px;
  cursor: pointer; font-size: 0.88rem; font-family: inherit;
}
.pager button.active { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.pager button:disabled { opacity: .4; cursor: default; }

/* ---------- 浮层详情 ---------- */
.modal-mask {
  position: fixed; inset: 0; background: rgba(10,10,10,0.55); z-index: 100;
  display: none; align-items: center; justify-content: center; padding: 5vw;
}
.modal-mask.open { display: flex; }
.modal {
  background: var(--paper); max-width: 720px; width: 100%; max-height: 88vh;
  overflow: auto; position: relative; border: 1px solid var(--ink);
  box-shadow: 8px 8px 0 rgba(10,10,10,0.15);
}
.modal-close {
  position: absolute; top: 10px; right: 14px; background: none; border: none;
  font-size: 1.6rem; cursor: pointer; line-height: 1;
}
.modal-body { display: grid; grid-template-columns: 200px 1fr; gap: 22px; padding: 22px; }
.modal-cover { aspect-ratio: 3/4; background-size: cover; background-position: center; border: 1px solid var(--line); }
.modal h2 { font-family:"Songti SC","SimSun",serif; font-size: 1.5rem; margin-bottom: 6px; }
.modal .m-row { font-size: 0.86rem; color: var(--muted); margin: 2px 0; }
.modal .m-desc { margin-top: 12px; font-size: 0.92rem; }
@media (max-width: 560px) {
  .modal-body { grid-template-columns: 1fr; }
  .modal-cover { max-width: 200px; }
}

/* 评论 */
.comments { padding: 0 22px 22px; border-top: 1px dashed var(--line); margin-top: 8px; padding-top: 18px; }
.comments h4 { font-family:"Songti SC","SimSun",serif; margin-bottom: 12px; }
.cmt { padding: 8px 0; border-bottom: 1px dashed var(--line); }
.cmt:last-child { border-bottom: none; }
.cmt .c-nick { font-weight: 600; font-size: 0.86rem; }
.cmt .c-time { color: var(--muted); font-size: 0.74rem; margin-left: 8px; }
.cmt .c-body { font-size: 0.9rem; margin-top: 2px; }
.cmt-form { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.cmt-form input, .cmt-form textarea {
  border: 1px solid var(--line); background: #fff; padding: 8px 10px;
  font-family: inherit; font-size: 0.9rem;
}
.cmt-form textarea { min-height: 70px; resize: vertical; }
.cmt-form button {
  align-self: flex-start; background: var(--ink); color: var(--paper);
  border: none; padding: 8px 18px; cursor: pointer; font-size: 0.9rem;
}

/* ---------- 留言区 ---------- */
.msg-board { display: grid; grid-template-columns: 1.4fr 1fr; gap: 30px; }
@media (max-width: 760px) { .msg-board { grid-template-columns: 1fr; } }
.msg-list { display: flex; flex-direction: column; gap: 12px; }
.msg {
  background: #fff; border: 1px solid var(--line); padding: 14px 16px;
  box-shadow: 3px 3px 0 rgba(10,10,10,0.05);
}
.msg .m-nick { font-weight: 600; }
.msg .m-time { color: var(--muted); font-size: 0.76rem; margin-left: 8px; }
.msg .m-body { margin-top: 4px; font-size: 0.94rem; }

.msg-form { display: flex; flex-direction: column; gap: 10px; position: sticky; top: 80px; }
.msg-form input, .msg-form textarea {
  border: 1px solid var(--line); background: #fff; padding: 10px 12px;
  font-family: inherit; font-size: 0.92rem;
}
.msg-form textarea { min-height: 90px; resize: vertical; }
.msg-form button {
  background: var(--ink); color: var(--paper); border: none; padding: 10px 20px;
  cursor: pointer; font-size: 0.92rem; align-self: flex-start;
}

.photo-wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
.photo {
  aspect-ratio: 3/4; background-size: cover; background-position: center;
  border: 1px solid var(--line); box-shadow: 3px 3px 0 rgba(10,10,10,0.06);
  position: relative; overflow: hidden;
}
.photo .caption {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(0deg, rgba(0,0,0,.65), transparent);
  color: #fff; padding: 18px 10px 8px; font-size: 0.8rem;
}

/* ---------- 页脚 ---------- */
.site-footer {
  border-top: 1px solid var(--line); margin-top: 40px;
  padding: 24px 5vw; display: flex; justify-content: space-between;
  flex-wrap: wrap; gap: 10px; font-size: 0.84rem; color: var(--muted);
}

/* 空状态 */
.empty { text-align: center; color: var(--muted); padding: 40px 0; }
