/* ガジェログ — mobile-first stylesheet (dark tech theme) */
:root {
  --color-bg: #0b0f14;
  --color-surface: #141a22;
  --color-text: #e8edf4;
  --color-text-muted: #9aa4b2;
  --color-border: #243041;
  --color-primary: #22d3ee;
  --color-primary-hover: #67e8f9;
  --color-primary-soft: rgba(34, 211, 238, 0.12);
  --color-accent: #2dd4bf;
  --color-amazon: #f0a500;
  --color-amazon-text: #0b0f14;
  --color-rank: #22d3ee;
  --color-star: #fbbf24;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(34, 211, 238, 0.06);
  --font: "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  --container: 1080px;
  --header-h: 64px;
  --focus: 0 0 0 3px rgba(34, 211, 238, 0.4);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-primary);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--color-primary-hover);
}

:focus-visible {
  outline: none;
  box-shadow: var(--focus);
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 1000;
  padding: 0.5rem 1rem;
  background: var(--color-primary);
  color: #0b0f14;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 600;
}

.skip-link:focus {
  top: 1rem;
}

.container {
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 15, 20, 0.78);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid rgba(36, 48, 65, 0.9);
  box-shadow: 0 1px 0 rgba(34, 211, 238, 0.06);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
  gap: 1rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--color-text);
  font-weight: 700;
  font-size: 1.15rem;
}

.logo:hover {
  color: var(--color-text);
}

.logo-mark {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  background: linear-gradient(135deg, #22d3ee, #2dd4bf);
  color: #0b0f14;
  font-size: 0.95rem;
  font-weight: 700;
  box-shadow: 0 0 16px rgba(34, 211, 238, 0.35);
}

.logo-mark.small {
  width: 1.6rem;
  height: 1.6rem;
  font-size: 0.8rem;
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  cursor: pointer;
}

.nav-toggle-bar {
  display: block;
  height: 2px;
  background: var(--color-text);
  border-radius: 1px;
  transition: transform 0.2s, opacity 0.2s;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.site-nav {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: var(--header-h);
  background: rgba(20, 26, 34, 0.98);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(12px);
}

.site-nav.is-open {
  display: block;
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0.75rem 1rem 1rem;
}

.nav-list a {
  display: block;
  padding: 0.75rem 0.5rem;
  color: var(--color-text);
  text-decoration: none;
  font-weight: 500;
  border-radius: var(--radius-sm);
}

.nav-list a:hover,
.nav-list a[aria-current="page"] {
  background: var(--color-primary-soft);
  color: var(--color-primary);
}

@media (min-width: 768px) {
  .nav-toggle {
    display: none;
  }

  .site-nav {
    display: block;
    position: static;
    border: none;
    box-shadow: none;
    background: transparent;
    backdrop-filter: none;
  }

  .nav-list {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0;
  }

  .nav-list a {
    padding: 0.45rem 0.75rem;
    font-size: 0.95rem;
  }
}

/* Hero */
.hero {
  padding: 3rem 0 2.5rem;
  background:
    radial-gradient(ellipse 80% 60% at 10% 0%, rgba(34, 211, 238, 0.12), transparent),
    radial-gradient(ellipse 60% 50% at 90% 20%, rgba(45, 212, 191, 0.08), transparent),
    var(--color-bg);
}

.hero-eyebrow {
  margin: 0 0 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--color-accent);
}

.hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  line-height: 1.35;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.hero-lead {
  margin: 0 0 1.75rem;
  max-width: 36em;
  color: var(--color-text-muted);
  font-size: 1.05rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.sp-only {
  display: inline;
}

@media (min-width: 640px) {
  .sp-only {
    display: none;
  }

  .hero {
    padding: 4.5rem 0 3.5rem;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.7rem 1.2rem;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.btn-primary {
  background: var(--color-primary);
  color: #0b0f14;
  box-shadow: 0 0 20px rgba(34, 211, 238, 0.25);
}

.btn-primary:hover {
  background: var(--color-primary-hover);
  color: #0b0f14;
}

.btn-ghost {
  background: var(--color-surface);
  color: var(--color-text);
  border-color: var(--color-border);
}

.btn-ghost:hover {
  background: var(--color-primary-soft);
  color: var(--color-primary);
  border-color: rgba(34, 211, 238, 0.35);
}

.btn-amazon {
  background: var(--color-amazon);
  color: var(--color-amazon-text);
}

.btn-amazon:hover {
  background: #dda000;
  color: var(--color-amazon-text);
}

.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border-color: rgba(34, 211, 238, 0.35);
}

.btn-outline:hover {
  background: var(--color-primary-soft);
  color: var(--color-primary-hover);
}

/* Sections */
.section {
  padding: 3rem 0;
}

.section-header {
  margin-bottom: 1.75rem;
}

.section-eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-primary);
}

.section-header h2 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  line-height: 1.4;
}

.section-desc {
  margin: 0;
  color: var(--color-text-muted);
  max-width: 40em;
}

/* Ranking / products */
.ranking {
  background: var(--color-surface);
  border-block: 1px solid var(--color-border);
}

.product-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}

@media (min-width: 640px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .product-grid > li:nth-child(4),
  .product-grid > li:nth-child(5) {
    grid-column: span 1;
  }
}

.product-card {
  display: flex;
  gap: 0.85rem;
  padding: 1.15rem;
  background: #10161e;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.15s, border-color 0.15s;
}

.product-card:hover {
  box-shadow: var(--shadow-md);
  border-color: rgba(34, 211, 238, 0.4);
}

.product-rank {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--color-rank);
  color: #0b0f14;
  font-weight: 700;
  font-size: 0.9rem;
}

.product-card:nth-child(1) .product-rank {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #0b0f14;
}

.product-card:nth-child(2) .product-rank {
  background: linear-gradient(135deg, #94a3b8, #64748b);
  color: #0b0f14;
}

.product-card:nth-child(3) .product-rank {
  background: linear-gradient(135deg, #d97706, #b45309);
  color: #fff;
}

.product-body {
  flex: 1;
  min-width: 0;
}

.product-name {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  line-height: 1.4;
}

.stars {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.5rem;
  color: var(--color-star);
  font-size: 0.95rem;
  letter-spacing: 0.05em;
}

.stars-score {
  color: var(--color-text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0;
}

.product-reason {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.65;
}

.merit-label {
  display: inline-block;
  margin-right: 0.35rem;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  border: 1px solid var(--color-border, #2a3544);
  color: var(--color-accent, #5eead4);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  vertical-align: middle;
}

.product-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.product-actions .btn {
  padding: 0.5rem 0.9rem;
  font-size: 0.85rem;
}

/* Articles */
.article-grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 640px) {
  .article-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .article-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.article-card {
  display: flex;
  flex-direction: column;
  padding: 1.25rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.15s, border-color 0.15s;
}

.article-card:hover {
  box-shadow: var(--shadow-md);
  border-color: rgba(34, 211, 238, 0.4);
}

.article-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.tag {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: var(--color-primary-soft);
  color: var(--color-primary);
  font-size: 0.75rem;
  font-weight: 600;
}

.article-meta time {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  white-space: nowrap;
}

.article-title {
  margin: 0 0 0.6rem;
  font-size: 1.05rem;
  line-height: 1.45;
}

.article-title a {
  color: var(--color-text);
  text-decoration: none;
}

.article-title a:hover {
  color: var(--color-primary);
}

.article-excerpt {
  margin: 0 0 1rem;
  flex: 1;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.article-more {
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
}

.article-more::after {
  content: " →";
}

/* Categories */
.categories {
  background: var(--color-surface);
  border-block: 1px solid var(--color-border);
}

.chip-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  background: #10161e;
  border: 1px solid var(--color-border);
  color: var(--color-text);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.chip:hover {
  background: var(--color-primary-soft);
  border-color: rgba(34, 211, 238, 0.45);
  color: var(--color-primary);
}

/* CTA band */
.cta-band {
  background:
    linear-gradient(135deg, rgba(34, 211, 238, 0.08), rgba(45, 212, 191, 0.06));
  border-block: 1px solid rgba(36, 48, 65, 0.6);
}

.cta-inner {
  text-align: center;
  max-width: 36rem;
}

.cta-inner h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
}

.cta-inner p {
  margin: 0 0 1.5rem;
  color: var(--color-text-muted);
}

/* Footer */
.site-footer {
  padding: 2.5rem 0 2rem;
  background: #06090d;
  color: #9aa4b2;
  border-top: 1px solid var(--color-border);
}

.footer-inner {
  display: grid;
  gap: 1.25rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: #e8edf4;
  font-size: 1.05rem;
}

.affiliate-disclaimer {
  margin: 0;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  line-height: 1.7;
  color: #7b8794;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
}

.footer-nav a {
  color: #c5ced9;
  text-decoration: none;
  font-size: 0.9rem;
}

.footer-nav a:hover {
  color: var(--color-primary);
  text-decoration: underline;
}

.copyright {
  margin: 0;
  font-size: 0.85rem;
  color: #5c6672;
}

/* About page */
.page-hero {
  padding: 2.5rem 0 1.5rem;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}

.page-hero h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.5rem, 4vw, 2rem);
}

.page-hero p {
  margin: 0;
  color: var(--color-text-muted);
}

.prose {
  padding: 2.5rem 0 3.5rem;
}

.prose h2 {
  margin: 2rem 0 0.75rem;
  font-size: 1.25rem;
}

.prose h2:first-child {
  margin-top: 0;
}

.prose p,
.prose ul {
  color: var(--color-text-muted);
}

.prose ul {
  padding-left: 1.25rem;
}

.prose li + li {
  margin-top: 0.35rem;
}
