@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;700;900&display=swap');

:root {
  /* King of Affiliate Palette - High Contrast */
  --color-primary: #003366; /* Deep Navy - Trust */
  --color-secondary: #004080; /* Brighter Navy - Secondary UI */
  --color-accent: #ff8c00;  /* Vivid Orange - Action */
  --color-accent-light: #fff3e0;
  --color-danger: #e63946;  /* Red - Crucial info */
  --color-success: #28a745;
  --color-warning: #ffc107;
  
  --bg-white: #ffffff;
  --bg-light: #f4f7f9;
  --bg-subtle: #f9f9f9;
  
  --text-dark: #333333;
  --text-main: #444444;
  --text-muted: #777777;
  --text-white: #ffffff;
  
  --border-color: #dee2e6;
  --shadow-standard: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-strong: 0 8px 24px rgba(0,0,0,0.15);
  
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  
  --transition: 0.2s ease-in-out;
}

/* Global */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Noto Sans JP', sans-serif;
  color: var(--text-main);
  background-color: var(--bg-light);
  line-height: 1.7;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.container--narrow {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
}

/* コラム記事用のコンテナ拡張 */
.column-container {
  max-width: 1100px;
  margin: 40px auto;
  padding: 60px 50px;
  line-height: 1.9;
  background-color: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-standard);
}

.column-container p {
  margin-bottom: 25px;
}

.column-container ul, .column-container ol {
  padding-left: 1.8em;
  margin-bottom: 25px;
}

.column-container li {
  margin-bottom: 12px;
  line-height: 1.8;
}

.column-container h2 {
  margin: 60px 0 30px;
  padding-bottom: 15px;
}

.column-container h3 {
  margin: 40px 0 20px;
}

.column-container img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  margin: 30px auto;
  display: block;
  box-shadow: var(--shadow-standard);
}

.section { padding: 60px 0; }
.section--white { background-color: var(--bg-white); }

/* Typography */
h1, h2, h3, h4 { color: var(--color-primary); font-weight: 700; line-height: 1.3; }
.text-center { text-align: center; }
.text-danger { color: var(--color-danger); font-weight: 700; }

/* Header - Traditional High-Impact */
.header {
  background-color: var(--bg-white);
  height: 80px;
  border-bottom: 3px solid var(--color-primary);
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
}

.header__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.header__logo {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--color-primary);
  text-decoration: none;
}
.header__logo span { color: var(--color-accent); }

.header__nav {
  display: flex;
  gap: 25px;
}

.header__nav-link {
  text-decoration: none;
  color: var(--text-main);
  font-weight: 700;
  font-size: 0.95rem;
  transition: var(--transition);
}

.header__nav-link:hover {
  color: var(--color-accent);
}

.header__tel {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Hero Section - Classic High CVR */
.hero {
  background-color: var(--bg-white);
  padding: 40px 0;
  border-bottom: 1px solid var(--border-color);
}

.hero__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.hero__content h1 {
  font-size: 2.2rem;
  margin-bottom: 20px;
  line-height: 1.2;
}

.hero__content h1 mark {
  background: linear-gradient(transparent 70%, #fff176 0%);
  color: inherit;
}

.hero__points {
  margin-bottom: 30px;
  list-style: none;
}

.hero__points li {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero__points li::before {
  content: '✓';
  color: var(--color-danger);
  font-size: 1.4rem;
}

.hero__image {
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-strong);
  aspect-ratio: 16/9;
  background-color: #eee;
  position: relative;
}

/* CTA Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 20px 40px;
  font-size: 1.3rem;
  font-weight: 900;
  text-decoration: none;
  border-radius: 50px;
  cursor: pointer;
  transition: var(--transition);
  border: none;
}

.btn--primary {
  background-color: var(--color-accent);
  color: white;
  box-shadow: 0 4px 0 #cc7000;
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 #cc7000;
  background-color: #ffa000;
}

.btn--pulse {
  animation: pulse 2s infinite;
}

.btn--white {
  background-color: white;
  color: var(--color-primary);
  box-shadow: 0 4px 0 #cccccc;
}

.btn--white:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 #cccccc;
  background-color: #f8f9fa;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

/* Ranking Card - King Style */
.ranking-box {
  background-color: var(--bg-white);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 40px;
  position: relative;
  overflow: hidden;
}

.ranking-box--1 { border-color: var(--color-danger); }

.ranking-box__header {
  background-color: var(--bg-subtle);
  padding: 15px 25px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ranking-box--1 .ranking-box__header { background-color: #fff9f9; }

.ranking-box__title {
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  gap: 15px;
}

.rank-badge {
  background-color: var(--color-primary);
  color: white;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-weight: 900;
}

.rank-badge--1 { background-color: var(--color-danger); }

.ranking-box__main {
  padding: 30px;
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 30px;
}

.ranking-box__img {
  width: 100%;
  aspect-ratio: 4/3;
  background-color: #eee;
  border: 1px solid #ddd;
  border-radius: var(--radius-sm);
}

.ranking-box__desc h4 { font-size: 1.2rem; margin-bottom: 15px; border-bottom: 1px solid #eee; padding-bottom: 5px; }

.ranking-box__points {
  background-color: var(--color-accent-light);
  padding: 15px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
}

.ranking-box__points ul {
  list-style: none;
}

.ranking-box__points li {
  font-weight: 700;
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ranking-box__points li::before {
  content: '●';
  color: var(--color-accent);
}

.ranking-box__actions {
  display: flex;
  flex-direction: column;
  gap: 15px;
  align-items: center;
}

/* Comparison Table - High Clarity */
.comp-table {
  width: 100%;
  background-color: white;
  border-collapse: collapse;
  box-shadow: var(--shadow-standard);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.comp-table th, .comp-table td {
  padding: 15px;
  text-align: center;
  border: 1px solid var(--border-color);
}

.comp-table th { background-color: var(--color-primary); color: white; }
.comp-table .best-col { background-color: #fffde7; }

/* Responsive */
@media (max-width: 768px) {
  .hero__grid { grid-template-columns: 1fr; }
  .ranking-box__main { grid-template-columns: 1fr; }
  .hero__content h1 { font-size: 1.8rem; }
  .header__inner { flex-direction: column; height: auto; padding: 15px 0; gap: 15px; }
  .header { height: auto; }
  .header__nav { gap: 12px; flex-wrap: wrap; justify-content: center; }
  .header__nav-link { font-size: 0.85rem; }
}

/* --- Phase 2 Improvements --- */

/* Ticker (Activity Feed) */
.ticker {
  background-color: #fff9c4;
  overflow: hidden;
  padding: 8px 0;
  border-bottom: 1px solid #fbc02d;
  font-size: 0.9rem;
  font-weight: 700;
  color: #856404;
}
.ticker__content {
  display: flex;
  white-space: nowrap;
  animation: ticker-scroll 30s linear infinite;
}
.ticker__item {
  margin-right: 50px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.ticker__item::before { content: '🔔'; }
@keyframes ticker-scroll {
  0% { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

/* Trust Stats (Triple Crown) */
.trust-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 40px 0;
}
.stat-card {
  background: white;
  padding: 20px;
  border-radius: var(--radius-md);
  text-align: center;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-standard);
}
.stat-card__number {
  display: block;
  font-size: 2rem;
  font-weight: 900;
  color: var(--color-danger);
  line-height: 1;
  margin-bottom: 5px;
}
.stat-card__number span { font-size: 1rem; }
.stat-card__label { font-size: 0.9rem; font-weight: 700; color: var(--color-primary); }

/* LINE Button Style */
.btn--line {
  background-color: #06c755;
  color: white;
  box-shadow: 0 4px 0 #05a346;
}
.btn--line:hover {
  background-color: #0edb61;
  box-shadow: 0 6px 0 #05a346;
}

/* Floating Bottom CTA (Mobile Only) */
.floating-cta {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  padding: 10px 15px;
  box-shadow: 0 -4px 10px rgba(0,0,0,0.1);
  z-index: 2000;
  backdrop-filter: blur(5px);
}
@media (max-width: 768px) {
  .floating-cta {
    display: flex;
    gap: 10px;
  }
  .floating-cta .btn {
    flex: 1;
    padding: 12px 10px;
    font-size: 1rem;
    border-radius: 8px;
  }
}

/* Badge for Ranking (New Level) */
.rank-trust-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--color-danger);
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 900;
  transform: rotate(5deg);
  box-shadow: 2px 2px 5px rgba(0,0,0,0.2);
}

/* --- Diagnosis Modal Styles --- */
.diagnosis-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 3000;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.diagnosis-modal.is-active {
  display: flex;
}

.modal-content {
  background: white;
  width: 100%;
  max-width: 600px;
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  animation: modal-in 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(30px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  padding: 30px;
  text-align: center;
  color: white;
}

.modal-header h2 {
  color: white;
  margin-bottom: 5px;
  font-size: 1.5rem;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.5); /* 濃い背景で視認性確保 */
  color: white;
  border: 2px solid white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: normal;
  transition: all 0.3s ease;
  z-index: 4000; /* 全ての要素（リボン等）より上に配置 */
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.modal-close:hover {
  background: rgba(0, 0, 0, 0.8);
  transform: scale(1.1) rotate(90deg);
}

.diagnosis-body {
  padding: 40px;
}

.diagnosis-step {
  display: none;
}

.diagnosis-step.is-active {
  display: block;
}

.diagnosis-step h3 {
  text-align: center;
  margin-bottom: 30px;
  font-size: 1.3rem;
  color: var(--text-dark);
}

.choice-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 15px;
}

.choice-btn {
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  padding: 20px;
  border-radius: 12px;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 15px;
}

.choice-btn:hover {
  border-color: var(--color-accent);
  background: var(--color-accent-light);
  transform: translateX(5px);
}

.choice-btn span {
  background: white;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid #cbd5e1;
  font-size: 0.8rem;
  color: #64748b;
}

/* Loading */
.diagnosis-loading {
  padding: 60px 40px;
  text-align: center;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 5px solid #f3f3f3;
  border-top: 5px solid var(--color-accent);
  border-radius: 50%;
  margin: 0 auto 20px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Result Area */
.diagnosis-result {
  display: none;
  padding: 40px;
  text-align: center;
}

.diagnosis-result.is-active {
  display: block;
  animation: fade-in 0.5s ease;
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.result-card {
  background: #fffdf0;
  border: 3px solid var(--color-warning);
  padding: 30px;
  border-radius: 15px;
  margin: 20px 0;
  position: relative; /* Ribbon positioning context */
  overflow: hidden; /* Clamp ribbon */
}

.result-card h4 {
  font-size: 1.8rem;
  color: var(--color-danger);
  margin-bottom: 10px;
}

.result-card h4 a:hover {
  text-decoration: underline !important;
  opacity: 0.8;
}

.result-reason-box {
  background: white;
  padding: 20px;
  border-radius: 10px;
  margin-top: 15px;
  text-align: left;
  font-size: 0.95rem;
  border-left: 5px solid var(--color-accent);
}

.result-btn {
  margin-top: 25px;
  width: 100%;
  max-width: 400px;
}

.result-close-link {
  display: inline-block;
  margin-top: 20px;
  color: #888;
  font-size: 0.9rem;
  text-decoration: underline;
  cursor: pointer;
}

.result-close-link:hover {
  color: var(--color-primary);
}

/* --- Prominent Diagnosis Button Enhancements --- */
.btn--primary {
  position: relative;
  overflow: hidden;
}

/* キラリと光るエフェクト */
.btn--primary::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    to bottom right,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0) 40%,
    rgba(255, 255, 255, 0.4) 50%,
    rgba(255, 255, 255, 0) 60%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: rotate(45deg);
  animation: shine 4s infinite;
}

@keyframes shine {
  0% { transform: scale(0) rotate(45deg); opacity: 0; }
  80% { transform: scale(0) rotate(45deg); opacity: 0.5; }
  81% { transform: scale(4) rotate(45deg); opacity: 1; }
  100% { transform: scale(50) rotate(45deg); opacity: 0; }
}

.js-start-diagnosis {
  border: 2px solid white;
  box-shadow: 0 10px 20px rgba(255, 140, 0, 0.3);
}

.js-start-diagnosis::before {
  content: "AI診断";
  position: absolute;
  top: -20px;
  right: -10px;
  background: #d32f2f;
  color: white;
  font-size: 0.65rem;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 900;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  z-index: 10;
}

/* Result Card Upgrade */
.result-card::before {
  content: "RECOMMEND";
  position: absolute;
  top: 10px;
  right: -30px;
  background: #d32f2f;
  color: white;
  padding: 5px 35px;
  font-size: 0.7rem;
  font-weight: 900;
  transform: rotate(45deg);
}

/* Market Simulator */
.market-simulator {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  padding: 60px 40px;
  border-radius: 30px;
  color: white;
  margin: 60px 0;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.market-simulator::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

.sim-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 40px;
  align-items: flex-start;
}

@media (max-width: 991px) {
  .sim-grid { grid-template-columns: 1fr; }
}

.sim-form {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
  padding: 30px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.sim-group {
  margin-bottom: 20px;
}

.sim-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #94a3b8;
  margin-bottom: 8px;
}

.sim-select, .sim-input {
  width: 100%;
  padding: 12px 15px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  color: white;
  font-size: 1rem;
  outline: none;
}

.sim-range {
  width: 100%;
  height: 6px;
  background: #334155;
  border-radius: 5px;
  appearance: none;
  cursor: pointer;
}

.sim-range::-webkit-slider-thumb {
  appearance: none;
  width: 20px;
  height: 20px;
  background: #3b82f6;
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}

.sim-val-display {
  text-align: right;
  font-size: 1.1rem;
  font-weight: 700;
  color: #60a5fa;
  margin-top: 5px;
}

.sim-result-area {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
  transition: all 0.5s;
}

.sim-price-card {
  background: rgba(59, 130, 246, 0.05);
  padding: 50px 30px;
  border-radius: 25px;
  border: 1px solid rgba(59, 130, 246, 0.2);
  text-align: center;
  position: relative;
}

.sim-price-label {
  font-size: 1.2rem;
  color: #94a3b8;
  margin-bottom: 15px;
}

.sim-price-value {
  font-size: 3.2rem;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 0 30px rgba(59, 130, 246, 0.6);
  margin-bottom: 10px;
}

.sim-price-note {
  font-size: 0.85rem;
  color: #64748b;
  margin-top: 15px;
}

.sim-cta-box {
  margin-top: 40px;
  text-align: center;
}
