/* Inugokoro Design System - Soul Bond Theme v8.0 (Love & Connection) */

@import url('save_modal.css');
@import url('print.css');

:root {
  /* Brand Colors - Warm "Love" Theme */
  --color-primary: #E05D5D;
  /* Warm Red/Pink for Love */
  --color-primary-dark: #C04D4D;
  --color-bg-start: #FFF0F5;
  /* Lavender Blush */
  --color-bg-end: #FFE4E1;
  /* Misty Rose */
  --color-text-main: #4A3B3B;
  /* Warm Charcoal */
  --color-text-muted: #7D6E6E;
  --color-accent: #FF8C94;
  /* Soft Salmon Accent */
  --color-white: #FFFFFF;

  /* Dimensions */
  --radius-card: 24px;
  --radius-btn: 16px;

  /* Typography */
  --font-main: "Zen Maru Gothic", sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-main);
  background: linear-gradient(135deg, var(--color-bg-start) 0%, var(--color-bg-end) 100%);
  color: var(--color-text-main);
  line-height: 1.7;
  font-size: 17px;
  display: block;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  position: relative;
}

/* Background Pattern Overlay - Cleaner Dot Pattern */
body::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: radial-gradient(#E05D5D 1.5px, transparent 1.5px);
  background-size: 24px 24px;
  opacity: 0.1;
  pointer-events: none;
  z-index: 0;
}

/* 1. PAGE WIDTH FIXES */
.quiz-container {
  width: 100%;
  max-width: 100%;
  padding: 0 16px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

@media (min-width: 768px) {
  .quiz-container {
    width: 90%;
    max-width: 720px;
    padding: 0 24px;
  }
}

@media (min-width: 1024px) {
  .quiz-container {
    width: 80%;
    max-width: 900px;
    padding: 0 32px;
  }
}

/* 2. LOGO */
header {
  text-align: center;
  margin-bottom: -20px;
  margin-top: 10px;
  position: relative;
  z-index: 10;
}

.logo-area {
  display: flex;
  justify-content: center;
  align-items: center;
}

.logo-img {
  height: 90px;
  width: auto;
  max-width: 90%;
  object-fit: contain;
}

/* Card Styles */
.card {
  background: var(--color-white);
  border-radius: var(--radius-card);
  padding: 24px 20px;
  box-shadow: 0 8px 32px rgba(255, 150, 100, 0.12);
  margin-bottom: 20px;
  border: none;
  width: 100%;
}

/* 3. COVER PAGE */
.cover-hero {
  position: relative;
  width: 100%;
  max-width: 400px;
  margin: 0 auto 16px;
}

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

/* H1 Headline */
.title-large {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 16px;
  line-height: 1.4;
  text-align: center;
  letter-spacing: -0.02em;
}

.result-desc p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--color-text-main);
}

/* Emotional Hook Text */
.emotional-questions {
  color: #EB853C !important;
  /* Deeper orange to match '人間' in image phase */
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 8px;
}

/* Typography Tweaks */
p,
h1,
h2,
button {
  word-break: auto-phrase;
  overflow-wrap: break-word;
}

/* 5. BUTTONS */
.btn {
  display: block;
  width: 100%;
  border: none;
  font-family: var(--font-main);
  font-size: 1rem;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  position: relative;
  overflow: visible;
  -webkit-tap-highlight-color: transparent;
}

/* CTA Button (Enhanced) */
.btn-primary {
  background: linear-gradient(135deg, #E05D5D 0%, #C04D4D 100%);
  color: var(--color-white);
  font-size: 22px;
  /* Much larger as requested */
  /* Much larger as requested */
  padding: 16px 32px;
  border-radius: 16px;
  /* Matched to user request */
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(224, 93, 93, 0.3);
  transition: all 0.3s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(224, 93, 93, 0.4);
  filter: brightness(1.02);
}

.btn-primary:active {
  transform: translateY(1px);
  box-shadow: 0 2px 8px rgba(224, 93, 93, 0.3);
}

.btn-option {
  background-color: var(--color-white);
  border: 2px solid #EEE;
  color: var(--color-text-main);
  border-radius: 16px;
  margin-bottom: 16px;
  text-align: center;
  /* Centered as requested */
  padding: 20px 24px;
  box-shadow: 0 4px 0 #EEE;
  font-weight: 700;
  font-size: 1.1rem;
  transition: transform 0.1s ease, background-color 0.2s;
}

.btn-option:hover {
  border-color: var(--color-primary);
  background-color: #FAFAFA;
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(224, 93, 93, 0.15);
}

.btn-option:active {
  transform: scale(0.98) translateY(0);
  box-shadow: none;
}

/* Paw Pop Element */
.paw-pop {
  position: fixed;
  font-size: 32px;
  pointer-events: none;
  z-index: 9999;
  animation: pawPopAnim 0.6s ease-out forwards;
}

@keyframes pawPopAnim {
  0% {
    opacity: 0;
    transform: scale(0.5) translateY(0);
  }

  30% {
    opacity: 1;
    transform: scale(1.2) translateY(-10px);
  }

  100% {
    opacity: 0;
    transform: scale(1.5) translateY(-40px);
  }
}

/* Quiz Progress */
.progress-bar-container {
  width: 100%;
  height: 16px;
  background-color: #EEE;
  border-radius: 99px;
  margin-bottom: 32px;
  overflow: hidden;
  border: 3px solid #fff;
}

.progress-bar-fill {
  height: 100%;
  background-color: var(--color-accent);
  width: 0%;
  transition: width 0.4s ease-out;
  border-radius: 99px;
}

/* Result Screen */
.result-container {
  background: #fff;
  border-radius: 24px;
  padding: 0;
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(255, 150, 100, 0.15);
  margin-bottom: 40px;
  width: 100%;
}

.result-hero {
  background: radial-gradient(circle at center, var(--color-bg-start) 0%, #fff 75%);
  padding: 40px 20px;
  text-align: center;
  border-bottom: 4px solid var(--color-bg-start);
}

.result-hero-badge {
  width: 240px;
  height: 240px;
  object-fit: contain;
  margin: 0 auto 16px;
  filter: drop-shadow(0 12px 24px rgba(127, 171, 92, 0.2));
  display: block;
  opacity: 0;
  animation: bounceInUp 1s ease-out forwards;
  animation-delay: 0.2s;
}

@keyframes bounceInUp {
  0% {
    opacity: 0;
    transform: translateY(50px);
  }

  60% {
    opacity: 1;
    transform: translateY(-10px);
  }

  80% {
    transform: translateY(5px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Logic for Save Image: Disable animations/transforms */
.no-animation,
.no-animation * {
  animation: none !important;
  transition: none !important;
  opacity: 1 !important;
  transform: none !important;
}

.result-type-name {
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-primary);
  margin-bottom: 8px;
  margin-top: 0;
}

.result-subtitle {
  font-size: 1.2rem;
  color: var(--color-text-muted);
  font-weight: 700;
  margin-bottom: 24px;
  /* Space before content starts */
}

.result-content {
  padding: 40px 32px;
}

.section-title {
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--color-text-main);
  margin: 40px 0 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-title::before {
  content: '';
  display: block;
  width: 32px;
  height: 8px;
  background: var(--color-accent);
  border-radius: 4px;
}

.story-box {
  background: var(--color-bg-start);
  padding: 24px;
  border-radius: 16px;
  margin-bottom: 32px;
  line-height: 1.9;
  text-align: justify;
  font-size: 1.1rem;
  border-left: 6px solid var(--color-primary);
}

.trait-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-bottom: 32px;
}

.trait-pill {
  background: #fff;
  border: 2px solid var(--color-primary);
  color: var(--color-primary);
  padding: 10px 24px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1.05rem;
}

.relatable-list li {
  padding: 16px;
  margin-bottom: 12px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #EEE;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 1.1rem;
}

.relatable-list li::before {
  content: '✓';
  color: var(--color-accent);
  font-weight: 900;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.product-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.product-card {
  background: #fff;
  border: 1px solid #E0E0E0;
  border-radius: 16px;
  overflow: hidden;
  padding-bottom: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.product-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: #eee;
}

.product-info {
  padding: 20px;
}

.product-title {
  font-weight: 700;
  font-size: 1.2rem;
  margin-bottom: 8px;
}

.product-price {
  color: var(--color-accent);
  font-weight: 900;
  font-size: 1.3rem;
}

/* 7. SNS SHARE BUTTONS */
.share-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 32px;
}

.btn-share {
  padding: 16px;
  border-radius: 12px;
  font-weight: 700;
  color: white;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 1rem;
  transition: transform 0.1s;
  border: none;
  cursor: pointer;
  width: 100%;
}

.btn-share:active {
  transform: scale(0.96);
}

.share-x {
  background: #000;
}

.share-line {
  background: #06C755;
}

.share-insta {
  background: linear-gradient(45deg, #f09433 0%, #bc1888 100%);
}

.share-save {
  background: var(--color-primary);
}

.hidden {
  display: none !important;
}

.fade-in {
  animation: fadeIn ease 0.6s;
}

@keyframes fadeIn {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* YouTube CTA Box */
.cta-box {
  background: #FFFFFF;
  border: 4px solid #FFE4E1;
  /* Soft pink border */
  border-radius: 20px;
  padding: 16px 24px;
  margin: 30px auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  max-width: 100%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  gap: 16px;
}

.cta-icon {
  width: auto;
  height: 50px;
  flex-shrink: 0;
  object-fit: contain;
}

.cta-content {
  flex: 1;
  /* Takes available space */
  min-width: 0;
  /* Allows text truncation if needed */
  margin-right: 8px;
}

.cta-content h3 {
  font-size: 1.05rem;
  color: #333333;
  /* Hardcoded to avoid var issues if any */
  margin-bottom: 4px;
  font-weight: 900;
  line-height: 1.4;
}

.cta-content p {
  font-size: 0.8rem;
  color: #888;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cta-btn {
  background: #FF0000;
  color: #FFFFFF;
  font-weight: 900;
  padding: 12px 24px;
  border-radius: 30px;
  text-decoration: none;
  font-size: 0.95rem;
  box-shadow: 0 4px 0 #CC0000;
  white-space: nowrap;
  flex-shrink: 0;
  /* Prevents squishing */
  transition: transform 0.1s;
}

.cta-btn:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #CC0000;
}

/* Footer for PDF ONLY */
.result-footer-pdf {
  display: none;
  /* Hidden on screen */
  margin-top: 40px;
  border-top: 2px dashed #E0E0E0;
  padding-top: 20px;
  text-align: center;
  color: #666;
  font-weight: 700;
}

.footer-logo {
  height: 40px;
  opacity: 0.8;
  margin-bottom: 8px;
}

@media (max-width: 600px) {
  .cta-box {
    flex-direction: column;
    text-align: center;
  }
}

/* Stylish Product Card (No Image) v8.0 */
a.product-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
  height: 100%;
}

.product-card-stylish {
  background: #fff;
  border: 3px solid var(--color-accent);
  /* Changed to Accent (Orange) for visibility */
  border-radius: 20px;
  padding: 24px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: relative;
  overflow: visible;
  /* Allow badge to pop out */
  box-shadow: 0 8px 20px rgba(255, 153, 102, 0.15);
  /* Orange tinted shadow */
  margin-top: 10px;
  /* Space for the badge */
}

/* Add "Recommended" Badge */
.product-card-stylish::before {
  content: 'あなたへのオススメ';
  position: absolute;
  top: -14px;
  left: 20px;
  background: var(--color-accent);
  color: white;
  font-size: 0.8rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 20px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.product-card-stylish:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(255, 153, 102, 0.25);
  border-color: var(--color-primary);
  /* Switch to Green on hover */
}

.product-card-stylish:hover::before {
  background: var(--color-primary);
}

.product-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.product-icon-badge {
  background: #FFF5E8;
  color: #FF9966;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.product-title-stylish {
  font-weight: 800;
  font-size: 1.1rem;
  line-height: 1.4;
  color: var(--color-text-main);
  padding-top: 2px;
}

.product-desc-stylish {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  line-height: 1.6;
  margin-bottom: 20px;
  flex-grow: 1;
}

.product-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #FFF5E8;
  /* Light orange bg */
  color: var(--color-accent);
  /* Orange text */
  font-weight: 800;
  padding: 14px;
  border-radius: 14px;
  transition: background 0.2s, color 0.2s, transform 0.2s;
  font-size: 1rem;
  border: 2px solid #FFE4D1;
  /* Subtle border */
}

.product-card-stylish:hover .product-cta {
  background: var(--color-accent);
  color: white;
  border-color: var(--color-accent);
  transform: scale(1.02);
}

/* 8. RECOMMENDED ARTICLES SECTION */
.articles-section {
  max-width: 900px;
  margin: 0 auto 48px;
  padding: 0 16px;
}

.articles-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

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

.article-card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.article-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 24px rgba(224, 93, 93, 0.15);
}

.article-img-container {
  height: 160px;
  background: #FFF0F5;
  position: relative;
  overflow: hidden;
}

.article-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.article-card:hover .article-img {
  transform: scale(1.05);
}

.article-badge {
  position: absolute;
  bottom: 0;
  right: 0;
  background: var(--color-primary);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 12px;
  border-top-left-radius: 12px;
}

.article-content {
  padding: 16px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.article-title {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--color-text-main);
  margin-bottom: 8px;
  line-height: 1.4;
  transition: color 0.2s;
}

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

.article-desc {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}