:root {
  --bg: #f5f5f7;
  --card-bg: #ffffff;
  --text: #1a1a1a;
  --text-muted: #6b6b6b;
  --accent: #d92323;
  --border: #e5e5e5;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Hiragino Sans", "Yu Gothic", "Meiryo", -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.site-header {
  max-width: 900px;
  margin: 0 auto;
  padding: 32px 16px 16px;
  text-align: center;
}

.site-title {
  margin: 0 0 4px;
  font-size: 1.6rem;
  font-weight: 700;
}

.site-subtitle {
  margin: 0 0 20px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.search-bar {
  max-width: 480px;
  margin: 0 auto;
}

#search-input {
  width: 100%;
  padding: 12px 16px;
  font-size: 1rem;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--card-bg);
  box-shadow: var(--shadow);
  outline: none;
}

#search-input:focus {
  border-color: var(--accent);
}

.result-count {
  margin: 12px 0 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

main {
  max-width: 900px;
  margin: 0 auto;
  padding: 8px 16px 48px;
}

.article-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.article-item {
  display: flex;
  gap: 16px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  box-shadow: var(--shadow);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.article-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.article-thumb-wrap {
  flex: 0 0 auto;
  width: 160px;
  height: 100px;
  border-radius: 8px;
  overflow: hidden;
  background: #ddd;
}

.article-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.article-thumb-wrap.no-image {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  font-size: 0.75rem;
}

.article-info {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}

.article-title {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.45;
  font-weight: 600;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.article-price {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.78rem;
  color: #fff;
  background: var(--accent);
}

.article-price.is-free {
  background: #2a9d5c;
}

.empty-state,
.loading-state {
  text-align: center;
  color: var(--text-muted);
  padding: 40px 0;
}

@media (max-width: 560px) {
  .article-thumb-wrap {
    width: 110px;
    height: 74px;
  }

  .article-title {
    font-size: 0.9rem;
  }
}
