:root {
  --bg: #ffffff;
  --panel: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --accent: #111827;
}
* { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: #fafafa;
  color: var(--text);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", sans-serif;
}
.container {
  max-width: 1040px;
  margin: 0 auto;
  padding: 32px 20px 60px;
}
.container.narrow { max-width: 820px; }
.hero {
  padding: 12px 0 20px;
}
.eyebrow {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 8px;
}
h1 {
  margin: 0 0 10px;
  font-size: 40px;
  line-height: 1.1;
}
.subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}
.toolbar { margin: 28px 0 12px; }
input[type="text"] {
  width: 100%;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 16px;
  min-height: 52px;
}
.meta {
  color: var(--muted);
  margin-bottom: 18px;
  font-size: 14px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.card, .detail-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px;
}
.card h3, .detail-card h2 {
  margin: 0 0 10px;
  font-size: 22px;
  line-height: 1.35;
  word-break: break-word;
}
.desc {
  color: var(--muted);
  line-height: 1.7;
  word-break: break-word;
}
.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  border-radius: 12px;
  text-decoration: none;
  border: 1px solid var(--accent);
  color: #fff;
  background: var(--accent);
  min-height: 44px;
  line-height: 1.3;
}
.button.secondary {
  background: #fff;
  color: var(--accent);
}
.back {
  display: inline-block;
  margin: 12px 0 18px;
  text-decoration: none;
  color: var(--muted);
}
.empty {
  padding: 28px;
  border: 1px dashed var(--line);
  border-radius: 16px;
  text-align: center;
  color: var(--muted);
  background: #fff;
}
.reader-page {
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
}
.reader-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 10;
}
.pdf-frame {
  flex: 1;
  width: 100%;
  border: 0;
  background: #f3f4f6;
  min-height: 0;
}
@media (max-width: 900px) {
  .container {
    padding: 24px 16px 44px;
  }
  h1 {
    font-size: 34px;
  }
}
@media (max-width: 640px) {
  .container {
    padding: 18px 14px 34px;
  }
  h1 {
    font-size: 28px;
  }
  .subtitle {
    font-size: 15px;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .card, .detail-card {
    padding: 16px;
    border-radius: 16px;
  }
  .card h3, .detail-card h2 {
    font-size: 20px;
  }
  .actions {
    flex-direction: column;
  }
  .actions .button,
  .actions .back {
    width: 100%;
  }
  .reader-topbar {
    flex-direction: column;
    align-items: stretch;
    padding: 10px 12px;
  }
  .reader-topbar .back,
  .reader-topbar .button {
    width: 100%;
    text-align: center;
    margin: 0;
  }
}
@media (max-width: 380px) {
  input[type="text"] {
    padding: 14px 14px;
  }
  h1 {
    font-size: 24px;
  }
}
