/* ===== Reset & Base ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --primary: #1a56db;
  --primary-dark: #1e40af;
  --primary-light: #dbeafe;
  --accent: #f59e0b;
  --accent-dark: #d97706;
  --success: #10b981;
  --danger: #ef4444;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-500: #6b7280;
  --gray-700: #374151;
  --gray-900: #111827;
  --white: #ffffff;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
  --shadow: 0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -1px rgba(0,0,0,.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -2px rgba(0,0,0,.05);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,.1), 0 10px 10px -5px rgba(0,0,0,.04);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --font: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Hiragino Sans', sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--gray-50);
  color: var(--gray-900);
  line-height: 1.6;
  font-size: 15px;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; }

/* ===== Header ===== */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo {
  font-size: 20px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.5px;
}

.site-logo span {
  color: var(--accent);
}

.header-nav {
  display: flex;
  gap: 8px;
}

.header-nav a {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-700);
  transition: background .15s, color .15s;
}

.header-nav a:hover,
.header-nav a.active {
  background: var(--primary-light);
  color: var(--primary);
  text-decoration: none;
}

/* ===== Hero ===== */
.hero {
  background: linear-gradient(135deg, #1a56db 0%, #1e40af 50%, #1d4ed8 100%);
  color: var(--white);
  padding: 72px 20px 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-inner {
  max-width: 700px;
  margin: 0 auto;
  position: relative;
}

.hero-badge {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 20px;
  padding: 4px 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.hero h1 {
  font-size: clamp(28px, 5vw, 44px);
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 16px;
  letter-spacing: -1px;
}

.hero p {
  font-size: 16px;
  opacity: 0.85;
  max-width: 500px;
  margin: 0 auto 32px;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: var(--white);
  padding: 14px 32px;
  border-radius: 50px;
  font-size: 15px;
  font-weight: 800;
  box-shadow: 0 4px 14px rgba(245,158,11,.5);
  transition: transform .15s, box-shadow .15s;
}

.hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(245,158,11,.6);
  text-decoration: none;
  color: var(--white);
}

/* ===== Container ===== */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== Section ===== */
.section {
  padding: 60px 20px;
}

.section-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.section-sub {
  color: var(--gray-500);
  font-size: 14px;
  margin-bottom: 36px;
}

/* ===== Tool Cards ===== */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.tool-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: transform .2s, box-shadow .2s;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tool-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.tool-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius);
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.tool-card h3 {
  font-size: 17px;
  font-weight: 800;
  color: var(--gray-900);
}

.tool-card p {
  font-size: 13px;
  color: var(--gray-500);
  line-height: 1.7;
  flex: 1;
}

.tool-tag {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 20px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 700;
}

.tool-tag.new {
  background: #fef3c7;
  color: var(--accent-dark);
}

.tool-btn {
  display: inline-block;
  background: var(--primary);
  color: var(--white);
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  transition: background .15s;
}

.tool-btn:hover {
  background: var(--primary-dark);
  text-decoration: none;
  color: var(--white);
}

/* ===== Affiliate Banner ===== */
.affiliate-section {
  background: var(--white);
  border-top: 1px solid var(--gray-200);
  border-bottom: 1px solid var(--gray-200);
  padding: 48px 20px;
}

.affiliate-label {
  text-align: center;
  font-size: 11px;
  color: var(--gray-500);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 20px;
  font-weight: 600;
}

.affiliate-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
  max-width: 900px;
  margin: 0 auto;
}

.aff-card {
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color .15s, box-shadow .15s;
  background: var(--white);
}

.aff-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow);
  text-decoration: none;
}

.aff-logo {
  font-size: 22px;
  font-weight: 900;
  color: var(--gray-900);
}

.aff-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--gray-700);
}

.aff-points {
  font-size: 12px;
  color: var(--gray-500);
  line-height: 1.8;
  list-style: none;
}

.aff-points li::before {
  content: "✓ ";
  color: var(--success);
  font-weight: 700;
}

.aff-cta {
  margin-top: auto;
  background: var(--primary);
  color: var(--white);
  border-radius: 6px;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  transition: background .15s;
  display: block;
}

.aff-card:hover .aff-cta {
  background: var(--primary-dark);
}

.aff-badge {
  display: inline-block;
  background: #fef3c7;
  color: var(--accent-dark);
  border-radius: 4px;
  padding: 2px 7px;
  font-size: 10px;
  font-weight: 700;
}

/* ===== Footer ===== */
.site-footer {
  background: var(--gray-900);
  color: var(--gray-300);
  padding: 40px 20px 24px;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.footer-brand {
  font-size: 20px;
  font-weight: 800;
  color: var(--white);
}

.footer-brand span { color: var(--accent); }

.footer-brand p {
  font-size: 12px;
  color: var(--gray-500);
  margin-top: 6px;
  max-width: 260px;
}

.footer-links {
  display: flex;
  gap: 48px;
  flex-wrap: wrap;
}

.footer-links h4 {
  font-size: 12px;
  font-weight: 700;
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.footer-links ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-links a {
  color: var(--gray-500);
  font-size: 13px;
  transition: color .15s;
}

.footer-links a:hover {
  color: var(--white);
  text-decoration: none;
}

.footer-bottom {
  border-top: 1px solid #374151;
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-bottom p {
  font-size: 12px;
  color: var(--gray-500);
}

.footer-disclaimer {
  font-size: 11px;
  color: var(--gray-500);
  margin-top: 16px;
  line-height: 1.8;
  border-top: 1px solid #374151;
  padding-top: 16px;
}

/* ===== Responsive ===== */
/* ===== Hamburger Menu ===== */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-sm);
  transition: background .15s;
}

.hamburger:hover { background: var(--gray-100); }

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--gray-700);
  border-radius: 2px;
  transition: transform .25s, opacity .2s;
}

.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav {
  display: none;
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--white);
  z-index: 99;
  padding: 16px;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
  border-top: 1px solid var(--gray-200);
  box-shadow: var(--shadow-lg);
}

.mobile-nav.open { display: flex; }

.mobile-nav a {
  padding: 14px 16px;
  font-size: 15px;
  font-weight: 700;
  color: var(--gray-700);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: background .1s, color .1s;
}

.mobile-nav a:hover,
.mobile-nav a.active {
  background: var(--primary-light);
  color: var(--primary);
  text-decoration: none;
}

/* ===== Responsive ===== */
@media (max-width: 640px) {
  .header-nav { display: none; }
  .hamburger { display: flex; }
  .hero { padding: 48px 20px 56px; }
  .tools-grid { grid-template-columns: 1fr; }
  .footer-links { gap: 24px; }
}
