:root {
  color-scheme: light dark;
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-soft: #eef1f4;
  --text: #202428;
  --muted: #68717a;
  --line: #dde2e7;
  --accent: #e75f8d;
  --accent-strong: #c84270;
  --teal: #2aa7a1;
  --shadow: 0 10px 24px rgba(32, 36, 40, 0.08);
}

* { box-sizing: border-box; }

html { background: var(--bg); }

body {
  margin: 0;
  min-width: 280px;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}

button { font: inherit; }

.home-shell {
  width: min(100%, 980px);
  margin: 0 auto;
  padding: max(18px, env(safe-area-inset-top)) 16px calc(34px + env(safe-area-inset-bottom));
}

.home-header,
.section-heading,
.notice-strip {
  display: flex;
  align-items: center;
}

.home-header {
  min-height: 64px;
  justify-content: space-between;
  margin-bottom: 16px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--accent-strong);
  font-size: 11px;
  font-weight: 700;
}

h1, h2, h3, p { margin-top: 0; }

h1 { margin-bottom: 0; font-size: 28px; line-height: 1.15; }

.icon-button {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
}

.icon-button svg,
.notice-icon svg,
.empty-mark svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-button.is-loading svg { animation: spin 0.8s linear infinite; }

.notice-strip {
  gap: 12px;
  padding: 13px 14px;
  margin-bottom: 22px;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 7%, var(--surface));
}

.notice-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: var(--accent-strong);
}

.notice-copy { min-width: 0; font-size: 13px; line-height: 1.55; }
.notice-copy button { padding: 0; border: 0; background: transparent; color: inherit; text-align: left; }
.notice-copy p { margin: 0; }
.notice-copy p + p { margin-top: 5px; }

.section-heading { justify-content: space-between; margin-bottom: 12px; }
.section-heading h2 { margin-bottom: 0; font-size: 17px; }
.section-heading span { color: var(--muted); font-size: 12px; }

.feed-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }

.feed-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.card-hit { width: 100%; padding: 0; border: 0; background: transparent; color: inherit; text-align: left; }
.card-media { position: relative; aspect-ratio: 16 / 8.8; overflow: hidden; background: var(--surface-soft); }
.card-media img { width: 100%; height: 100%; display: block; object-fit: cover; }
.card-media[hidden] { display: none; }
.card-body { padding: 15px; }
.card-category { display: inline-block; margin-bottom: 8px; color: var(--teal); font-size: 11px; font-weight: 700; }
.card-body h3 { margin-bottom: 7px; font-size: 18px; line-height: 1.35; overflow-wrap: anywhere; }
.card-subtitle { margin-bottom: 10px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.card-text { color: var(--muted); font-size: 13px; line-height: 1.65; }
.card-text p { margin: 0 0 8px; }
.card-text p:last-child { margin-bottom: 0; }
.card-action { display: inline-flex; margin-top: 13px; color: var(--accent-strong); font-size: 13px; font-weight: 700; }

.empty-state,
.error-state {
  padding: 54px 20px;
  text-align: center;
  color: var(--muted);
}

.empty-mark { width: 48px; height: 48px; display: grid; place-items: center; margin: 0 auto 14px; color: var(--muted); }
.empty-state h2, .error-state h2 { margin-bottom: 8px; color: var(--text); font-size: 17px; }
.empty-state p, .error-state p { margin-bottom: 18px; font-size: 13px; }

.primary-button {
  min-height: 40px;
  padding: 0 18px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: white;
  font-weight: 700;
}

[hidden] { display: none !important; }

@media (min-width: 680px) {
  .home-shell { padding-left: 24px; padding-right: 24px; }
  .feed-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17191c;
    --surface: #222529;
    --surface-soft: #2b2f34;
    --text: #f2f4f5;
    --muted: #a9b0b7;
    --line: #383d43;
    --accent: #ed6e9a;
    --accent-strong: #f08bad;
    --teal: #64c9c3;
    --shadow: none;
  }
}

@keyframes spin { to { transform: rotate(360deg); } }
