:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --border: #e2e8f0;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --accent: #f97316;
  --success: #16a34a;
  --radius: 14px;
  --shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, "Noto Sans JP", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { max-width: 1140px; margin: 0 auto; padding: 0 20px; }

.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 30;
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: 14px;
  flex-wrap: wrap;
  padding: 8px 0;
}
.brand {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.brand:hover { text-decoration: none; }
.nav-right { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.nav-links { display: flex; gap: 14px; font-size: 0.92rem; font-weight: 600; }
.nav-links a { color: var(--muted); }
.nav-links a:hover { color: var(--primary); text-decoration: none; }

.lang-switcher {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #f1f5f9;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px;
}
.lang-pill {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
  padding: 4px 9px;
  border-radius: 999px;
  transition: all 0.15s ease;
}
.lang-pill:hover { color: var(--text); text-decoration: none; background: #e2e8f0; }
.lang-pill.active { background: var(--primary); color: #fff; }

.hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 52%, #2563eb 100%);
  color: #fff;
  padding: 48px 0 44px;
  margin-bottom: 30px;
}
.hero h1 { font-size: clamp(1.6rem, 3vw, 2.35rem); line-height: 1.25; margin-bottom: 12px; }
.hero p { color: #dbeafe; max-width: 700px; font-size: 1.02rem; margin-bottom: 22px; }
.search-bar {
  display: flex;
  max-width: 580px;
  background: #fff;
  border-radius: 12px;
  padding: 6px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}
.search-bar input {
  flex: 1;
  border: none;
  outline: none;
  padding: 10px 14px;
  font-size: 0.96rem;
  color: var(--text);
}
.search-bar span {
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.88rem;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
  align-items: center;
  justify-content: space-between;
}
.pill-group { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.15s ease;
}
.pill:hover, .pill.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.count-note { color: var(--muted); font-size: 0.9rem; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 22px;
  margin-bottom: 48px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 10px 28px rgba(15, 23, 42, 0.1); }
.card-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.provider-badge {
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
}
.region-badge {
  background: #f1f5f9;
  color: #334155;
  font-size: 0.74rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
}
.discount-badge {
  background: #fff7ed;
  color: #c2410c;
  border: 1px solid #fed7aa;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
}
.card h2 { font-size: 1.1rem; line-height: 1.38; }
.card h2 a { color: var(--text); }
.card h2 a:hover { color: var(--primary); text-decoration: none; }
.card-excerpt { color: var(--muted); font-size: 0.92rem; flex: 1; }
.card-date { font-size: 0.82rem; color: #64748b; }

.coupon-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f1f5f9;
  border: 1.5px dashed #94a3b8;
  border-radius: 10px;
  padding: 8px 12px;
  gap: 8px;
}
.coupon-code { font-family: ui-monospace, Consolas, monospace; font-weight: 800; font-size: 0.92rem; letter-spacing: 0.4px; color: var(--text); }
.btn-copy {
  background: var(--text);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}
.btn-copy:hover { opacity: 0.88; }

.card-actions { display: flex; gap: 10px; margin-top: 4px; }
.btn-primary {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: #fff;
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.92rem;
  text-align: center;
}
.btn-primary:hover { background: var(--primary-dark); text-decoration: none; }
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9rem;
}
.btn-secondary:hover { background: #f1f5f9; text-decoration: none; }

.article-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
  margin: 28px auto 56px;
  align-items: start;
}
@media (max-width: 860px) { .article-wrap { grid-template-columns: 1fr; } }
.article-main {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
}
.breadcrumbs { font-size: 0.86rem; color: var(--muted); margin-bottom: 14px; }
.article-main h1 { font-size: clamp(1.45rem, 2.8vw, 2.02rem); line-height: 1.3; margin: 12px 0 14px; }
.article-body h2 { font-size: 1.28rem; margin: 24px 0 10px; color: #0f172a; }
.article-body h3 { font-size: 1.08rem; margin: 18px 0 8px; }
.article-body p { margin-bottom: 14px; color: #1e293b; }
.article-body ul, .article-body ol { margin: 0 0 16px 22px; }
.article-body li { margin-bottom: 8px; }

.cta-box {
  background: linear-gradient(135deg, #eff6ff 0%, #fff7ed 100%);
  border: 1.5px solid #bfdbfe;
  border-radius: var(--radius);
  padding: 22px;
  margin: 22px 0;
}
.cta-box h3 { margin-bottom: 8px; font-size: 1.08rem; }
.sidebar-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  position: sticky;
  top: 84px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.highlight-list { list-style: none; display: flex; flex-direction: column; gap: 8px; font-size: 0.92rem; }
.highlight-list li::before { content: "✓ "; color: var(--success); font-weight: 800; }
.related-list { list-style: none; display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.related-list a { font-size: 0.9rem; font-weight: 600; color: var(--text); }
.related-list a:hover { color: var(--primary); }

footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 28px 0;
  color: var(--muted);
  font-size: 0.88rem;
}
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #0f172a;
  color: #fff;
  padding: 12px 18px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  opacity: 0;
  transform: translateY(12px);
  transition: all 0.2s ease;
  pointer-events: none;
  z-index: 99;
}
.toast.show { opacity: 1; transform: translateY(0); }