:root {
  color-scheme: light;
  --bg: #f6f3ec;
  --paper: #fffdf8;
  --ink: #20201d;
  --muted: #706b62;
  --line: #e4ddd0;
  --green: #27695f;
  --green-deep: #174b44;
  --rose: #b65d4b;
  --shadow: 0 10px 28px rgba(38, 44, 36, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at 18% 0%, rgba(182, 93, 75, 0.14), transparent 28%),
    linear-gradient(180deg, #fbf5ea 0%, var(--bg) 42%, #eef2ec 100%);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.app-shell {
  width: min(100%, 480px);
  min-height: 100vh;
  margin: 0 auto;
  padding: max(18px, env(safe-area-inset-top)) 16px max(20px, env(safe-area-inset-bottom));
}

.hero {
  padding: 16px 2px 10px;
}

.hero-copy h1 {
  margin: 0;
  color: var(--ink);
  font-size: 31px;
  line-height: 1.16;
  font-weight: 800;
}

.subtitle {
  margin: 12px 0 0;
  color: var(--green-deep);
  font-size: 20px;
  line-height: 1.35;
  font-weight: 700;
}

.hint {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.category-section {
  margin-top: 12px;
}

.category-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.category-button {
  min-height: 76px;
  padding: 14px 12px;
  border: 1px solid rgba(39, 105, 95, 0.14);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.92);
  box-shadow: 0 4px 14px rgba(38, 44, 36, 0.05);
  color: var(--ink);
  text-align: left;
  font: inherit;
}

.category-button:active {
  transform: translateY(1px);
  background: #eef5ef;
}

.category-title {
  display: block;
  font-size: 17px;
  line-height: 1.25;
  font-weight: 750;
}

.category-count {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.article-panel {
  position: fixed;
  inset: 0;
  z-index: 20;
  width: min(100%, 480px);
  margin: 0 auto;
  padding: max(16px, env(safe-area-inset-top)) 16px max(20px, env(safe-area-inset-bottom));
  overflow-y: auto;
  background: linear-gradient(180deg, #fbf5ea 0%, #f6f3ec 55%, #eef2ec 100%);
}

.panel-header {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
}

.icon-button {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--paper);
  color: var(--green-deep);
  font-size: 34px;
  line-height: 36px;
  font-family: Georgia, serif;
}

.panel-label {
  margin: 0 0 2px;
  color: var(--muted);
  font-size: 12px;
}

.panel-header h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.24;
}

.article-list {
  display: grid;
  gap: 12px;
}

.article-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.article-card h3 {
  margin: 0;
  color: var(--ink);
  font-size: 19px;
  line-height: 1.38;
}

.article-desc {
  margin: 10px 0 0;
  color: #4c4a45;
  font-size: 15px;
  line-height: 1.58;
}

.article-meta {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.article-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  margin-top: 14px;
  border-radius: 8px;
  background: var(--green);
  color: #fff;
  font-size: 16px;
  font-weight: 750;
  text-decoration: none;
}

.article-link:active {
  background: var(--green-deep);
}

.empty-state {
  padding: 22px 16px;
  border: 1px dashed #d6cbbd;
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.72);
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

@media (max-width: 360px) {
  .app-shell {
    padding-left: 12px;
    padding-right: 12px;
  }

  .hero-copy h1 {
    font-size: 28px;
  }

  .category-grid {
    gap: 8px;
  }

  .category-button {
    min-height: 72px;
    padding: 12px 10px;
  }

  .category-title {
    font-size: 16px;
  }
}
