/* ========================================
   Variables (LP Specific)
   ======================================== */

body.is-subpage {
  overflow-x: visible !important;
  overflow-y: visible !important;
}

.nowrap-phrase {
  display: inline-block;
}

:root {
  --color-main: #6B4E31;
  /* Deep Walnut */
  --color-main-light: #8D6E63;
  --color-main-dark: #4E342E;
  --color-accent: #C5A059;
  /* Elegant Gold */
  --color-accent-soft: rgba(197, 160, 89, 0.1);
  --color-cta: #D35400;
  /* Deep Orange */
  --color-cta-dark: #A04000;
  --color-cta-soft: rgba(211, 84, 0, 0.15);
  --color-text-primary: #2C2C2C;
  --color-text-secondary: #5D4037;
  --color-bg-light: #FDFBF9;
  --color-bg-secondary: #F5F1EE;
  --color-white: #ffffff;

  /* Gradients */
  --grad-main: linear-gradient(135deg, var(--color-main) 0%, var(--color-main-light) 100%);
  --grad-cta: linear-gradient(135deg, var(--color-cta) 0%, var(--color-cta-dark) 100%);

  /* Shadow & Transitions */
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  --shadow-extra: 0 35px 60px -15px rgba(0, 0, 0, 0.2);
  --shadow-glass: 0 8px 32px 0 rgba(31, 38, 135, 0.1);

  --transition-base: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.5s, border-color 0.5s, box-shadow 0.5s;
  --transition-slow: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.8s;
  --transition-bounce: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.6s;

  /* Typography */
  --font-family: 'Outfit', 'Noto Sans JP', sans-serif;
  --font-serif: 'Playfair Display', 'Shippori Mincho', serif;

  --bg-white: #ffffff;
  --white: #ffffff;

  /* Layout */
  --container-width: 1200px;
  --section-padding: 100px 0;
}

/* Visibility Utilities */
@media (min-width: 1151px) {

  .sp-only,
  .nav-sp,
  .hamburger,
  .sp-nav,
  .sp-accordion,
  .sp-accordion-btn,
  .sp-accordion-content {
    display: none !important;
  }
}

@media (max-width: 1150px) {
  .pc-only {
    display: none !important;
  }
}

/* Executive Micro-interactions */
.btn-secondary {
  background: #fff;
  color: var(--color-main);
  border: 2px solid var(--color-main);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.btn-secondary:hover {
  background: var(--color-bg-light);
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.btn-primary {
  position: relative;
  overflow: hidden;
}

.btn-primary::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg,
      transparent 45%,
      rgba(255, 255, 255, 0.2) 50%,
      transparent 55%);
  transform: rotate(-45deg);
  transition: left 0.6s ease, top 0.6s ease;
  pointer-events: none;
}

.btn-primary:hover::after {
  left: 100%;
  top: 100%;
}

.executive-card {
  background: var(--color-white);
  border-radius: 24px;
  padding: 40px;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(0, 0, 0, 0.03);
  transition: var(--transition-base);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.executive-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0));
  z-index: -1;
}

.executive-card:hover {
  transform: translateY(-12px) scale(1.02);
  box-shadow: var(--shadow-extra);
  border-color: var(--color-accent);
}

.executive-card:hover .card-icon {
  transform: scale(1.1) rotate(5deg);
  color: var(--color-accent);
}

/* ========================================
   Guide Section (First-Timers)
   ======================================== */
.guide-section {
  padding: 100px 0;
  background: var(--color-white);
}

.guide-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.guide-card {
  padding: 40px;
  background: var(--color-bg-secondary);
  border-radius: 20px;
  position: relative;
  transition: var(--transition-base);
}

.guide-card::before {
  content: "STEP";
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--color-accent);
  opacity: 0.5;
}

.guide-step-num {
  font-family: var(--font-serif);
  font-size: 3rem;
  color: var(--color-accent);
  line-height: 1;
  margin-bottom: 20px;
}

.guide-card h3 {
  font-size: 1.3rem;
  margin-bottom: 15px;
  color: var(--color-main);
}

/* ========================================
   Testimonials (Customer Voices)
   ======================================== */
.testimonials-section {
  padding: 100px 0;
  background: var(--color-bg-secondary);
}

.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.testimonial-card {
  background: var(--color-white);
  padding: 40px;
  border-radius: 24px;
  box-shadow: var(--shadow-md);
}

.testimonial-header {
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 15px;
}

.testimonial-tag {
  background: var(--color-accent-soft);
  color: var(--color-main);
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 700;
}

.testimonial-text {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--color-text-primary);
  font-style: italic;
}

.testimonial-footer {
  margin-top: 25px;
  font-weight: 700;
  color: var(--color-text-secondary);
}

/* ========================================
   Services Section 
   ======================================== */
.services {
  padding: 100px 0;
}

/* -----------------------------------------
   Step-type Diagnosis Tool Styles
   ----------------------------------------- */
.diag-section {
  padding: 100px 0;
  background: var(--color-bg-secondary);
  position: relative;
  overflow: hidden;
}

.diag-card {
  max-width: 800px;
  margin: 0 auto;
  background: var(--color-white);
  border-radius: 30px;
  padding: 50px;
  box-shadow: var(--shadow-lg);
  position: relative;
}

.diag-progress-container {
  margin-bottom: 40px;
}

.diag-progress-bar {
  height: 8px;
  background: #E2E8F0;
  border-radius: 4px;
  overflow: hidden;
}

.diag-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-main), var(--color-accent));
  border-radius: 10px;
  width: 0%;
  transition: width 0.5s ease;
}

.diag-step {
  display: none;
  animation: fadeIn 0.5s ease;
}

.diag-step.is-active {
  display: block;
}

.diag-question {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  color: var(--color-main);
  margin-bottom: 30px;
  text-align: center;
}

.diag-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.diag-option {
  padding: 25px;
  border: 2px solid #E2E8F0;
  border-radius: 20px;
  cursor: pointer;
  transition: var(--transition-base);
  text-align: center;
  background: #F8FAFC;
}

.diag-option:hover {
  border-color: var(--color-accent);
  background: rgba(212, 175, 55, 0.05);
  transform: scale(1.02);
}

.diag-option i {
  font-size: 2.5rem;
  margin-bottom: 15px;
  display: block;
  font-style: normal;
  line-height: 1;
}

.diag-option span {
  font-weight: 700;
  font-size: 1.1rem;
}

.diag-result {
  text-align: center;
}

.diag-result-title {
  font-family: var(--font-serif);
  font-size: 2rem;
  color: var(--color-main);
  margin-bottom: 20px;
}

.diag-result-desc {
  font-size: 1.1rem;
  margin-bottom: 35px;
  line-height: 1.8;
}

/* ========================================
   Intro / Pain Points Section
   ======================================== */
.intro-points {
  padding: 100px 0;
  background: #fff;
}

.pain-points-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.pain-point-item {
  background: #fff;
  padding: 40px 30px;
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-base);
  text-align: center;
}

.pain-point-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.pain-point-icon {
  margin-bottom: 20px;
}

.pain-point-text {
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--color-text-primary);
}

@media (max-width: 768px) {
  .pain-points-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

/* Floating Interactive CTA */
.floating-cta {
  position: fixed;
  bottom: 280px; /* Moved up to avoid overlapping with new navigation buttons */
  right: 20px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 15px;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
@media (max-width: 1150px) {
  .floating-cta { display: none !important; } /* Hidden on mobile in favor of sticky footer/nav bar */
}

.f-cta-btn {
  width: 70px;
  height: 70px;
  border-radius: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: var(--shadow-lg);
  transition: var(--transition-base);
  text-decoration: none;
  position: relative;
}

.f-cta-btn:hover {
  transform: scale(1.1) rotate(5deg);
}

.f-cta-btn.tel {
  background: var(--color-main);
  display: none;
}

.f-cta-btn.line {
  background: #06C755;
}

.f-cta-btn.form {
  background: var(--color-accent);
}

.f-cta-btn i {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 1.8rem;
  font-style: normal;
  line-height: 1;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", sans-serif;
  position: relative;
  z-index: 1;
}

.f-cta-label {
  position: absolute;
  right: 85px;
  background: white;
  color: #333;
  padding: 8px 15px;
  border-radius: 8px;
  white-space: nowrap;
  font-weight: 700;
  box-shadow: var(--shadow-md);
  opacity: 0;
  transform: translateX(20px);
  transition: var(--transition-base);
  pointer-events: none;
}

.f-cta-btn:hover .f-cta-label {
  opacity: 1;
  transform: translateX(0);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 768px) {
  .diag-options {
    grid-template-columns: 1fr;
  }

  .diag-question {
    font-size: 1.4rem;
  }

  .floating-cta {
    bottom: 20px;
    right: 20px;
  }

  .f-cta-btn {
    width: 60px;
    height: 60px;
  }

  .f-cta-btn.tel {
    display: flex;
  }
}

.executive-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 0;
  background: var(--color-accent);
  transition: height 0.4s ease;
}

.executive-card:hover::before {
  height: 100%;
}

/* Counter Animation Styles */
.stat-number {
  font-family: var(--font-serif);
  font-weight: 800;
  font-size: 3.5rem;
  color: var(--color-main);
  line-height: 1;
  display: block;
}

.stat-unit {
  font-size: 1.2rem;
  font-weight: 700;
  margin-left: 4px;
}

/* Glassmorphism Classes */
.glass-panel {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: var(--shadow-glass);
}

/* Premium Reveal Animations */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: var(--transition-slow);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: var(--transition-slow);
}

.reveal-left.is-visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition: var(--transition-slow);
}

.reveal-right.is-visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.9);
  transition: var(--transition-bounce);
}

.reveal-scale.is-visible {
  opacity: 1;
  transform: scale(1);
}

/* Staggered Delay Helpers */
.delay-100 {
  transition-delay: 100ms;
}

.delay-200 {
  transition-delay: 200ms;
}

.delay-300 {
  transition-delay: 300ms;
}

.delay-400 {
  transition-delay: 400ms;
}

.delay-500 {
  transition-delay: 500ms;
}

/* Parallax Background Helper */
.parallax-bg {
  transform: translateY(var(--parallax-y, 0));
  transition: transform 0.1s linear;
}

/* Accessibility: Skip Link */
.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  background: var(--color-main);
  color: #ffffff;
  padding: 8px 16px;
  z-index: 9999;
  text-decoration: none;
  font-weight: bold;
  transition: top 0.3s ease;
  border-radius: 0 0 8px 0;
}

.skip-link:focus {
  top: 0;
}

/* ========================================
   Knowledge Category Filter Styles
   ======================================== */
.filter-container {
  margin-bottom: 50px;
  text-align: center;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  list-style: none;
  padding: 0;
}

.filter-btn {
  padding: 12px 28px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 50px;
  color: #64748b;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.3s, opacity 0.3s, background-color 0.3s, border-color 0.3s, box-shadow 0.3s, color 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  font-size: 0.95rem;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
}

.filter-btn:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(197, 160, 89, 0.15);
}

.filter-btn.active {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
  box-shadow: 0 8px 20px rgba(197, 160, 89, 0.3);
}

/* Base style for animated filtering */
.category-card {
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.category-card.is-hidden {
  display: none;
  opacity: 0;
  transform: scale(0.95);
}

@media (max-width: 768px) {
  .filter-bar {
    gap: 8px;
  }

  .filter-btn {
    padding: 10px 20px;
    font-size: 0.85rem;
    flex: 1 1 calc(50% - 10px);
    max-width: 200px;
  }
}

/* ========================================
   Knowledge Sequential Navigation (Phase 10)
   ======================================== */
.knowledge-navigation {
  margin: 60px 0;
  padding-top: 40px;
  border-top: 1px solid #eee;
}

.k-nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  gap: 20px;
}

.k-nav-link {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 24px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  text-decoration: none;
  transition: transform 0.3s, opacity 0.3s, background-color 0.3s, border-color 0.3s, box-shadow 0.3s, color 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  position: relative;
  max-width: 45%;
}

.k-nav-link:hover {
  transform: translateY(-5px);
  border-color: var(--color-accent);
  box-shadow: 0 12px 20px -5px rgba(197, 160, 89, 0.2);
}

.k-nav-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--color-accent);
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}

.k-nav-title {
  display: block;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-main);
  line-height: 1.4;
}

.k-nav-link.next {
  text-align: right;
  align-items: flex-end;
}

.k-nav-link.next::after {
  content: "→";
  position: absolute;
  right: 20px;
  bottom: 20px;
  font-size: 1.2rem;
  opacity: 0.3;
  transition: transform 0.3s;
}

.k-nav-link.prev::after {
  content: "←";
  position: absolute;
  left: 20px;
  bottom: 20px;
  font-size: 1.2rem;
  opacity: 0.3;
  transition: transform 0.3s;
}

.k-nav-link:hover::after {
  opacity: 1;
  color: var(--color-accent);
}

.k-nav-link.next:hover::after {
  transform: translateX(5px);
}

.k-nav-link.prev:hover::after {
  transform: translateX(-5px);
}

.k-nav-index {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  color: #64748b;
  font-weight: 700;
  font-size: 0.9rem;
  border-radius: 50px;
  transition: transform 0.3s, opacity 0.3s, background-color 0.3s, border-color 0.3s, box-shadow 0.3s, color 0.3s;
}

.k-nav-index:hover {
  color: var(--color-accent);
  background: var(--color-bg-secondary);
}

.k-nav-spacer {
  flex: 1;
  max-width: 45%;
}

@media (max-width: 768px) {
  .k-nav-inner {
    flex-direction: column;
    align-items: center;
  }

  .k-nav-link {
    max-width: 100%;
    width: 100%;
    padding: 20px;
  }

  .k-nav-index {
    order: 3;
    padding: 15px;
    width: 100%;
    margin-top: 10px;
  }

  .k-nav-link.prev {
    order: 2;
  }

  .k-nav-link.next {
    order: 1;
  }
}

/* ========================================
   Phase 4: Horizontal Scroll Roadmap Styles
   ======================================== */
.roadmap {
  background: var(--color-bg-light);
  /* overflow: hidden; */
}

.hz-scroll-wrapper {
  height: 300vh;
  /* Control how long the scroll lasts */
}

.hz-sticky-container {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  /* overflow: hidden; */
  z-index: 10;
}

.hz-track {
  display: flex;
  gap: 30px;
  padding: 0 50vw 0 5vw;
  width: max-content;
  transition: transform 0.1s ease-out;
  will-change: transform;
}

.roadmap-card {
  width: 350px;
  flex-shrink: 0;
  padding: 40px;
  border-radius: 20px;
  position: relative;
  transition: var(--transition-bounce);
}

.roadmap-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-premium);
}

.step-badge {
  background: var(--color-accent);
  color: white;
  display: inline-block;
  padding: 5px 15px;
  border-radius: 20px;
  font-weight: bold;
  margin-bottom: 20px;
  letter-spacing: 0.1em;
}

.hz-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
}

/* Scroll snap for mobile devices */
@media (max-width: 768px) {
  .hz-scroll-wrapper {
    height: auto;
    /* Disable scroll-jacking on mobile */
  }

  .hz-sticky-container {
    position: relative;
    height: auto;
    overflow: visible;
    padding: 60px 0;
  }

  .hz-track {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 20px;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
  }

  /* Hide scrollbar for a cleaner look */
  .hz-track::-webkit-scrollbar {
    display: none;
  }

  .hz-track {
    -ms-overflow-style: none;
    scrollbar-width: none;
  }

  .roadmap-card {
    scroll-snap-align: center;
    width: 300px;
  }

  .hz-arrow {
    display: none;
    /* Mobile view might not need arrows, or adjust as needed */
  }
}

/* ========================================
   Comparison Section Refinements
   ======================================== */
.comparison-table-wrapper.glass-panel {
  border-radius: 30px;
  overflow: hidden;
  margin-top: 40px;
}

.comparison-table {
  border-collapse: collapse;
}

.col-lawyer {
  background: rgba(197, 160, 89, 0.08);
  /* Highlighted lawyer column */
  border-left: 1px solid var(--color-accent-soft);
  border-right: 1px solid var(--color-accent-soft);
}

.cell-best {
  color: var(--color-cta);
  font-weight: 900;
  font-size: 1.4rem;
}

/* ========================================
   Phase 2: Advanced Content Styles
   ======================================== */

/* CHECKLIST SECTION */
.checklist-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 40px;
}

.checklist-item {
  position: relative;
  padding: 30px 20px;
  text-align: center;
  transition: var(--transition-bounce);
}

.checklist-period {
  display: inline-block;
  background: var(--color-accent);
  color: var(--color-white);
  padding: 5px 15px;
  border-radius: 20px;
  font-weight: 800;
  font-size: 0.85rem;
  margin-bottom: 15px;
}

.checklist-item h3 {
  font-size: 1.1rem;
  margin-bottom: 10px;
  color: var(--color-main);
}

.checklist-list {
  text-align: left;
  list-style: none;
  padding: 0;
  font-size: 0.9rem;
}

.checklist-list li {
  margin-bottom: 8px;
  padding-left: 20px;
  position: relative;
}

.checklist-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--color-accent);
  font-weight: bold;
}

@media (max-width: 991px) {
  .checklist-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 576px) {
  .checklist-container {
    grid-template-columns: 1fr;
  }
}

/* AKIYA / REAL ESTATE SECTION */
.akiya-section {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  position: relative;
  overflow: hidden;
}

.akiya-content {
  display: flex;
  align-items: center;
  gap: 50px;
}

.akiya-text {
  flex: 1;
}

.akiya-image-box {
  flex: 1;
  position: relative;
}

.akiya-badge {
  display: inline-block;
  background: #e2e8f0;
  color: #475569;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: bold;
  margin-bottom: 15px;
}

.akiya-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 30px;
}

.akiya-feature-card {
  padding: 20px;
  border-left: 4px solid var(--color-accent);
  transition: var(--transition-base);
}

@media (max-width: 768px) {
  .akiya-content {
    flex-direction: column;
  }

  .akiya-features {
    grid-template-columns: 1fr;
  }
}

/* PREMIUM SHINE EFFECT */
.premium-shine {
  position: relative;
  overflow: hidden;
}

.premium-shine::after {
  content: "";
  position: absolute;
  top: -110%;
  left: -210%;
  width: 200%;
  height: 200%;
  opacity: 0;
  transform: rotate(30deg);
  background: rgba(255, 255, 255, 0.13);
  background: linear-gradient(to right,
      rgba(255, 255, 255, 0.13) 0%,
      rgba(255, 255, 255, 0.13) 77%,
      rgba(255, 255, 255, 0.5) 92%,
      rgba(255, 255, 255, 0.0) 100%);
}

.premium-shine:hover::after {
  opacity: 1;
  top: -30%;
  left: -30%;
  transition-property: left, top, opacity;
  transition-duration: 0.7s, 0.7s, 0.15s;
  transition-timing-function: ease;
}

/* ========================================
   Mobile Floating Navigation (Phase 2)
   ======================================== */
.floating-nav {
  position: fixed;
  bottom: 20px;
  left: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  padding: 12px 20px;
  border-radius: 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  z-index: 9999;
  transform: translateY(150%);
  transition: transform 0.5s cubic-bezier(0.19, 1, 0.22, 1);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.floating-nav.is-visible {
  transform: translateY(0);
}

.floating-nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: #64748b;
  font-size: 0.65rem;
  font-weight: bold;
  text-decoration: none;
  flex: 1;
}

.floating-nav-btn i {
  font-size: 1.2rem;
}

.floating-nav-btn.primary {
  background: var(--color-accent);
  color: var(--color-white);
  padding: 8px 15px;
  border-radius: 30px;
  flex: 2;
  flex-direction: row;
  justify-content: center;
  gap: 8px;
  font-size: 0.9rem;
}

@media (min-width: 769px) {
  .floating-nav {
    display: none;
  }
}

/* MODAL SYSTEM (Phase 2) */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(8px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.is-active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: var(--color-white);
  width: 90%;
  max-width: 700px;
  max-height: 85vh;
  border-radius: 30px;
  padding: 40px;
  position: relative;
  overflow-y: auto;
  transform: scale(0.9) translateY(20px);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.modal-overlay.is-active .modal-content {
  transform: scale(1) translateY(0);
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  background: #f1f5f9;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.2rem;
  transition: background 0.2s;
}

.modal-close:hover {
  background: #e2e8f0;
}

/* SVG ANIMATIONS (Phase 2) */
.svg-anim {
  width: 60px;
  height: 60px;
  margin-bottom: 15px;
}

.draw-anim {
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  animation: draw 1.5s ease forwards;
}

@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}

.pulse-anim {
  animation: pulse 2s infinite ease-in-out;
  transform-origin: center;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 0.8;
  }

  50% {
    transform: scale(1.1);
    opacity: 1;
  }

  100% {
    transform: scale(1);
    opacity: 0.8;
  }
}

.wave-anim {
  animation: wave 3s infinite linear;
}

@keyframes wave {
  0% {
    transform: translateX(-5%);
  }

  50% {
    transform: translateX(5%);
  }

  100% {}
}

/* ========================================
   Phase 15: Hash Navigation Highlight Effect
   ======================================== */
.category-highlight-pulse {
  animation: highlightPulse 2s ease-out;
  border-radius: 16px;
  /* Matches category cards */
}

@keyframes highlightPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(192, 164, 123, 0.7);
    background-color: rgba(192, 164, 123, 0.1);
  }

  50% {
    box-shadow: 0 0 0 15px rgba(192, 164, 123, 0);
    background-color: rgba(192, 164, 123, 0.05);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(192, 164, 123, 0);
    background-color: transparent;
  }
}

:root {
  /* Phase 3: Ultra-Premium & Editorial Tokens */
  --font-editorial: 'Outfit', 'Inter', 'Noto Sans JP', sans-serif;
  /* --texture-grain removed for performance (7.5s layout cost) */
  --mesh-gradient: radial-gradient(at 0% 0%, hsla(217, 100%, 97%, 1) 0, transparent 50%),
    radial-gradient(at 50% 0%, hsla(225, 100%, 95%, 1) 0, transparent 50%),
    radial-gradient(at 100% 0%, hsla(210, 100%, 90%, 1) 0, transparent 50%);
  --spacing-editorial: 1.8;
  --tracking-editorial: 0.05em;
}

/* ========================================
   Editorial Layout & Texture Base
   ======================================== */
/* body::before grain texture removed for performance (7.5s Style & Layout recalculation bottleneck) */

.editorial-layout {
  font-family: var(--font-editorial);
  line-height: var(--spacing-editorial);
  letter-spacing: var(--tracking-editorial);
}

.mesh-bg {
  background: var(--mesh-gradient);
  background-attachment: fixed;
  position: relative;
  overflow: hidden;
}

.mesh-bg::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: inherit;
  filter: blur(80px);
  z-index: -1;
  opacity: 0.5;
}

/* Tactile Feedback (Phase 3) */
.tactile-btn {
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
}

.tactile-btn:active {
  transform: scale(0.96);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.hover-lift {
  transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.hover-lift:hover {
  transform: translateY(-8px) scale(1.02);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-family);
  color: var(--color-text-primary);
  line-height: 1.8;
  /* Slightly looser for readability especially for older audience */
  background-color: var(--color-white);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  vertical-align: bottom;
}

a {
  color: var(--color-main);
  text-decoration: none;
  transition: opacity 0.3s;
}

a:hover {
  opacity: 0.8;
}

ul,
ol {
  list-style: none;
}

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: var(--section-padding);
}

@media (max-width: 768px) {
  .section {
    padding: var(--section-padding-sp);
  }
}

.section-title {
  font-size: 2.5rem;
  font-weight: bold;
  text-align: center;
  margin-bottom: 20px;
  color: var(--color-main);
  letter-spacing: 0.05em;
}

.section-subtitle {
  font-size: 1.1rem;
  text-align: center;
  margin-bottom: 60px;
  color: var(--color-text-secondary);
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 768px) {
  .section-title {
    font-size: 1.8rem;
  }

  .section-subtitle {
    font-size: 1rem;
    margin-bottom: 40px;
    text-align: left;
    /* Easier to read on mobile */
  }
}

.text-highlight {
  font-weight: bold;
  color: #c0392b;
  /* Red for emphasis text */
}

.marker-yellow {
  background: linear-gradient(transparent 60%, #fff3cd 60%);
  font-weight: bold;
}

/* ========================================
   Header & Navigation
   ======================================== */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  transition: transform 0.4s, opacity 0.4s, background-color 0.4s, border-color 0.4s, box-shadow 0.4s, color 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

header.is-scrolled,
body.subpage header {
  top: 20px;
}

.header-container {
  pointer-events: auto;
  transition: transform 0.4s, opacity 0.4s, background-color 0.4s, border-color 0.4s, box-shadow 0.4s, color 0.4s ease;
  width: 100%;
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 20px;
}

.header-inner {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 110px;
  padding: 10px 40px;
  background: transparent;
  border-radius: 0;
  transition: transform 0.4s, opacity 0.4s, background-color 0.4s, border-color 0.4s, box-shadow 0.4s, color 0.4s ease;
}

header.is-scrolled .header-inner,
body.subpage header .header-inner {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-radius: 40px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
  min-height: 90px;
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding-bottom: 5px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.header-bottom {
  display: flex;
  justify-content: center;
  width: 100%;
  padding-top: 5px;
}

.header-logo a {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.logo-img {
  height: 45px;
  width: auto;
}

.logo-text .office-name {
  font-size: 0.9rem;
  color: var(--color-main);
  font-weight: 800;
  letter-spacing: 0.05em;
}

/* Gnav */
.gnav.pc-only {
  display: flex;
}

.gnav>ul {
  display: flex;
  gap: 20px;
}

.gnav-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 5px 10px;
  color: var(--color-text-primary);
  font-weight: bold;
  font-family: var(--font-serif);
  position: relative;
}

.gnav-link small {
  font-size: 0.6rem;
  color: var(--color-main);
  opacity: 0.7;
  text-transform: uppercase;
}

.gnav-link:hover {
  color: var(--color-accent);
}

/* Dropdown Menu */
.gnav-item {
  position: relative;
}

.gnav-item.has-dropdown:hover .gnav-link {
  color: var(--color-accent);
}

.dropdown-menu {
  display: block;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  width: 260px;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  border-radius: 12px;
  opacity: 0;
  visibility: hidden;
  display: none;
  transition: transform 0.3s, opacity 0.3s, background-color 0.3s, border-color 0.3s, box-shadow 0.3s, color 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
  z-index: 1100;
  border: 1px solid rgba(0, 64, 112, 0.1);
  padding: 10px 0;
  margin-top: 5px;
}

.dropdown-menu::before {
  content: '';
  position: absolute;
  top: -20px;
  left: 0;
  width: 100%;
  height: 20px;
}

.gnav-item:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  display: block;
  transform: translateX(-50%) translateY(0);
}

.dropdown-item a {
  display: block;
  padding: 12px 24px;
  color: var(--color-text-primary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: transform 0.2s, opacity 0.2s, background-color 0.2s, border-color 0.2s, box-shadow 0.2s, color 0.2s;
  text-align: left;
  border-bottom: 1px solid rgba(0, 0, 0, 0.03);
  font-family: var(--font-serif);
}

.dropdown-item:last-child a {
  border-bottom: none;
}

.dropdown-item a:hover {
  background: var(--color-bg-secondary);
  color: var(--color-main);
  padding-left: 28px;
}

/* Mega Menu Base */
.gnav-item.has-mega {
  position: static;
}

/* ホバー時の隙間を埋めるための不可視のバッファ */
.gnav-item.has-mega .gnav-link::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  height: 20px;
  z-index: 1040;
}

.mega-menu {
  position: absolute;
  top: calc(100% - 15px);
  /* ヘッダーとの隙間を埋めるために少し上に配置 */
  left: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  padding: 0;
  opacity: 0;
  visibility: hidden;
  display: none;
  transform: translateY(15px);
  transition: transform 0.4s, opacity 0.4s, background-color 0.4s, border-color 0.4s, box-shadow 0.4s, color 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  z-index: 1050;
  border-radius: 0 0 30px 30px;
  overflow: hidden;
}

.header.is-scrolled .mega-menu,
body.subpage header .mega-menu {
  top: calc(100% - 20px);
  /* スクロール時やサブページではさらに重なりを確保 */
}

.gnav-item.has-mega:hover .mega-menu {
  opacity: 1;
  visibility: visible;
  display: block;
  transform: translateY(0);
}

.mega-tabbed-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  background: #fff;
}

.mega-tab-sidebar {
  width: 280px;
  background: #f8fafc;
  border-right: 1px solid #f0f0f0;
  padding: 30px 0;
  background: #fafafa;
  padding: 20px 0;
  border-right: 1px solid rgba(0, 0, 0, 0.05);
}

.mega-tab {
  padding: 18px 30px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  color: #777;
  transition: transform 0.4s, opacity 0.4s, background-color 0.4s, border-color 0.4s, box-shadow 0.4s, color 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  border-left: 4px solid transparent;
  position: relative;
}

.mega-tab:hover {
  color: #333;
  background: rgba(192, 164, 123, 0.05);
}

.mega-tab.active {
  background: #fff;
  color: #c0a47b;
  border-left-color: #c0a47b;
  box-shadow: 10px 0 20px rgba(0, 0, 0, 0.02);
  z-index: 1;
}

.mega-tab-content {
  flex: 1;
  padding: 40px 50px;
  background: #fff;
  position: relative;
}

.mega-pane {
  display: none;
  opacity: 0;
  transform: translateY(10px);
  animation: megaFadeIn 0.4s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

@keyframes megaFadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mega-pane.active {
  display: block;
}

.mega-pane-title {
  font-size: 20px;
  margin-bottom: 30px;
  color: #222;
  font-weight: 700;
  border-bottom: 2px solid #f4f4f4;
  padding-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.mega-pane-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px 25px;
}

.mega-grid-item {
  position: relative;
  padding-left: 20px;
}

.mega-grid-item::before {
  content: "→";
  position: absolute;
  left: 0;
  color: #c0a47b;
  opacity: 0;
  transform: translateX(-5px);
  transition: transform 0.3s, opacity 0.3s, background-color 0.3s, border-color 0.3s, box-shadow 0.3s, color 0.3s ease;
}

.mega-grid-item:hover::before {
  opacity: 1;
  transform: translateX(0);
}

.mega-grid-item a {
  color: #444;
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  transition: transform 0.3s, opacity 0.3s, background-color 0.3s, border-color 0.3s, box-shadow 0.3s, color 0.3s ease;
  display: block;
}

.mega-grid-item a:hover {
  color: #c0a47b;
  transform: translateX(5px);
}

/* Legacy container for backward compatibility during rollout */
.mega-menu-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px 30px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 30px 20px;
}

.mega-menu-footer {
  padding: 30px 0;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  background: #fdfdfd;
  text-align: center;
}

.mega-menu-footer a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 30px;
  background: #f8fafc;
  color: var(--color-accent);
  font-weight: bold;
  font-size: 0.95rem;
  border-radius: 30px;
  border: 1px solid var(--color-accent);
  transition: transform 0.3s, opacity 0.3s, background-color 0.3s, border-color 0.3s, box-shadow 0.3s, color 0.3s ease;
}

.mega-menu-footer a:hover {
  background: var(--color-accent);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(192, 164, 123, 0.2);
}

.mega-category {
  animation: fadeIn 0.5s ease backwards;
}

.mega-category:nth-child(1) {
  animation-delay: 0.1s;
}

.mega-category:nth-child(2) {
  animation-delay: 0.15s;
}

.mega-category:nth-child(3) {
  animation-delay: 0.2s;
}

.mega-category:nth-child(4) {
  animation-delay: 0.25s;
}

.mega-category-title {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: var(--color-main);
  border-bottom: 2px solid var(--color-accent);
  padding-bottom: 8px;
  margin-bottom: 15px;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 8px;
}

.mega-list {
  list-style: none;
  padding: 0;
}

.mega-item {
  margin-bottom: 4px;
}

.mega-item a {
  display: block;
  padding: 5px 0;
  color: #555;
  font-size: 0.85rem;
  transition: transform 0.2s, opacity 0.2s, background-color 0.2s, border-color 0.2s, box-shadow 0.2s, color 0.2s;
  line-height: 1.4;
}

.mega-item a:hover {
  color: var(--color-accent);
  padding-left: 5px;
}

/* Sidebar for Subpages */
.service-sidebar {
  position: sticky;
  top: 130px;
  background: #fff;
  border-radius: 20px;
  padding: 30px;
  box-shadow: var(--shadow-md);
  height: fit-content;
}

.sidebar-title {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: var(--color-main);
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid #eee;
}

.sidebar-menu {
  list-style: none;
  padding: 0;
}

.sidebar-menu li {
  margin-bottom: 10px;
}

.sidebar-menu a {
  display: block;
  padding: 10px 15px;
  background: #f8fafc;
  border-radius: 8px;
  color: #444;
  font-size: 0.9rem;
  transition: transform 0.3s, opacity 0.3s, background-color 0.3s, border-color 0.3s, box-shadow 0.3s, color 0.3s;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
  background: var(--color-main);
  color: #fff;
}

/* Header Right */
.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.header-contact {
  text-align: right;
  line-height: 1.1;
}

.header-tel-label {
  font-size: 0.7rem;
  color: var(--color-text-secondary);
  display: block;
}

.header-tel-number {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--color-main);
}

.header-cta-btn {
  background: linear-gradient(135deg, var(--color-cta) 0%, var(--color-cta-dark) 100%);
  color: #fff !important;
  padding: 12px 25px;
  border-radius: 50px;
  font-weight: bold;
  font-size: 0.9rem;
  box-shadow: 0 5px 15px rgba(212, 175, 55, 0.4);
  transition: transform 0.3s;
}

.header-cta-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

/* Hamburger */
.hamburger {
  display: none;
  width: 40px;
  height: 40px;
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1100;
  pointer-events: auto;
}

.hamburger {
  display: none;
  position: relative;
  z-index: 2000;
  width: 40px;
  height: 40px;
  cursor: pointer;
  background: transparent;
  border: none;
  padding: 0;
}

.hamburger span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--color-main);
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  transition: transform 0.3s, opacity 0.3s, background-color 0.3s, border-color 0.3s, box-shadow 0.3s, color 0.3s;
}

.hamburger span:nth-child(1) {
  top: 12px;
}

.hamburger span:nth-child(2) {
  top: 19px;
}

.hamburger span:nth-child(3) {
  top: 26px;
}

.hamburger.is-active span:nth-child(1) {
  transform: translate(-50%, 7px) rotate(45deg);
}

.hamburger.is-active span:nth-child(2) {
  opacity: 0;
}

.hamburger.is-active span:nth-child(3) {
  transform: translate(-50%, -7px) rotate(-45deg);
}

/* Visibility Utilities */
@media (min-width: 1151px) {

  .sp-only,
  .nav-sp {
    display: none !important;
  }
}

@media (max-width: 1150px) {
  .pc-only {
    display: none !important;
  }
}

/* Mobile Nav */
.nav-sp {
  position: fixed;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100vh;
  background: rgba(255, 255, 255, 0.98);
  z-index: 1050;
  padding: 120px 20px 80px;
  transition: left 0.4s ease;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
}

.nav-sp.is-active {
  left: 0;
  pointer-events: auto;
}

.nav-sp .gnav {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.nav-sp .gnav-link {
  font-size: 1.2rem;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid #eee;
}

@media (max-width: 1150px) {
  .header-bottom {
    display: none;
  }

  .header-contact {
    display: none;
  }

  .header-cta-btn.pc-only {
    display: none;
  }

  .hamburger {
    display: block;
  }

  .header-inner {
    min-height: 70px;
    padding: 5px 20px;
  }

  header.is-scrolled .header-inner,
  body.subpage header .header-inner {
    min-height: 60px;
  }

  header {
    top: 10px !important;
  }

  .header-inner {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 40px !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    min-height: 70px !important;
    padding: 5px 20px;
    position: relative;
    z-index: 2005;
    border: 1px solid rgba(255, 255, 255, 0.5);
  }

  /* Ensure hamburger is visible inside the capsule */
  .hamburger {
    display: block;
    z-index: 2006;
    /* Ensure it stays clickable */
  }

  header.is-scrolled .header-inner,
  body.subpage header .header-inner {
    min-height: 70px;
    top: 0;
    /* Reset top relative to header container if needed, but header has top:10px */
  }

  header.is-scrolled,
  body.subpage header {
    top: 10px;
  }
}



/* ========================================
   Hero Section
   ======================================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  overflow: hidden;
  background: #f0f0f0;
  padding-top: 0;
}

.hero-slider {
  position: relative;
  width: 100%;
  height: 100vh;
}

.hero-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1s ease;
}

.hero-slide.is-active {
  opacity: 1;
}

.slide-background {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
}

.slide-background video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
}

.video-placeholder {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
}

.video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 10;
  max-width: 800px;
  /* Increased to prevent wrapping with Mincho font */
  margin-left: 10%;
  padding: 40px;
  padding-top: 170px;
  /* Reduced to 170px to ensure CTA button fits */
  /* Glass effect for Hero Card if needed, or transparent if clean */
}

.hero-title {
  font-family: var(--font-serif);
  font-size: 3.5rem;
  font-weight: 900;
  /* Premium feel */
  line-height: 1.4;
  /* Slightly increased for readability */
  margin-bottom: 25px;
  color: var(--color-text-primary);
  text-shadow: 2px 2px 20px rgba(255, 255, 255, 0.8);
}

.hero-description {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  margin-bottom: 30px;
  color: var(--color-text-secondary);
  font-weight: 500;
  text-shadow: 1px 1px 10px rgba(255, 255, 255, 0.8);
}

.hero-cta .btn {
  font-size: 1.2rem;
  padding: 20px 60px;
}

@media (max-width: 768px) {
  .hero {
    /* No padding needed on container as we use hero-content padding */
    padding-top: 0;
  }

  .hero-content {
    margin-left: 0 !important;
    padding: 30px 15px !important;
    padding-top: 130px !important;
    width: 100% !important;
    max-width: 100% !important;
    text-align: center !important;
  }

  .hero-title {
    font-size: 1.8rem !important;
    line-height: 1.5 !important;
    margin-bottom: 20px !important;
  }

  .hero-description {
    font-size: 0.95rem !important;
    line-height: 1.6 !important;
    margin-bottom: 25px !important;
  }
}

.hero-dots {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  display: flex;
  gap: 15px;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.2);
  border: 2px solid #fff;
  cursor: pointer;
  transition: transform 0.3s, opacity 0.3s, background-color 0.3s, border-color 0.3s, box-shadow 0.3s, color 0.3s ease;
}

.dot.is-active {
  background: var(--color-cta);
  border-color: var(--color-cta);
  transform: scale(1.2);
}

.dot:hover {
  background: rgba(255, 255, 255, 0.5);
}

@media (max-width: 768px) {
  .hero-dots {
    bottom: 20px;
  }
}

/* Form Validation Errors */
.input-error {
  border: 2px solid #e53e3e !important;
  background-color: #fff5f5 !important;
}

.category-error {
  border: 2px solid #e53e3e !important;
  background-color: #fff5f5 !important;
  box-shadow: 0 0 0 2px rgba(229, 62, 62, 0.2) !important;
}

/* ========================================
   Buttons
   ======================================== */
.btn {
  display: inline-block;
  padding: 18px 45px;
  border-radius: 100px;
  transition: transform 0.3s, opacity 0.3s, background-color 0.3s, border-color 0.3s, box-shadow 0.3s, color 0.3s;
  cursor: pointer;
  border: none;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  line-height: 1.2;
}

.btn-outline {
  background: #f9f9f9;
  color: #555;
  border: 2px solid #eaeaea;
}

.btn-outline:hover {
  background: #f0f0f0;
  transform: translateY(-2px);
}

.ft-btn.active {
  background: var(--color-main);
  color: #fff;
  border-color: var(--color-main);
  box-shadow: var(--shadow-sm);
}

.btn-secondary {
  background: #fff;
  color: var(--color-main);
  border: 2px solid var(--color-main);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.btn-secondary:hover {
  background: var(--color-bg-light);
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-cta) 0%, var(--color-cta-dark) 100%);
  color: #fff;
  box-shadow: 0 10px 20px rgba(181, 149, 47, 0.4);
}

.btn-primary:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(181, 149, 47, 0.5);
}

/* ========================================
   Pain Points
   ======================================== */
.pain-points-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.pain-point-item {
  background: #fff;
  padding: 30px 20px;
  border-radius: 20px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid #f0f0f0;
}

.pain-point-text {
  font-weight: bold;
  line-height: 1.6;
}

@media (max-width: 900px) {
  .pain-points-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .pain-points-grid {
    grid-template-columns: 1fr;
  }
}

/* ========================================
   Comparison Table (NEW)
   ======================================== */
.comparison-table-wrapper {
  overflow-x: auto;
  /* Allow horizontal scroll on mobile */
  margin-bottom: 20px;
  border-radius: 20px;
  box-shadow: var(--shadow-md);
  padding-top: 15px;
  background: #fff;
}

.comparison-table {
  width: 100%;
  border-collapse: separate;
  /* For border-radius */
  border-spacing: 0;
  background: #fff;
  min-width: 600px;
  /* Force width on mobile */
}

.comparison-table th,
.comparison-table td {
  padding: 20px;
  text-align: center;
  vertical-align: middle;
  border-bottom: 1px solid #eee;
}

.comparison-table th {
  background: #f5f5f5;
  color: #555;
  font-weight: bold;
}

/* Highlight Lawyer Column */
.comparison-table .col-lawyer {
  background: var(--color-main);
  color: #fff;
  position: relative;
  width: 28%;
}

.comparison-table .col-lawyer::before {
  content: "BEST";
  display: block;
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-accent);
  color: #fff;
  font-size: 0.7rem;
  padding: 2px 10px;
  border-radius: 10px;
}

.row-head {
  text-align: left;
  font-weight: bold;
  background: #fafafa;
  width: 20%;
}

.cell-ok {
  color: var(--color-main-light);
  font-size: 1.5rem;
  font-weight: bold;
}

.cell-ng {
  color: #ccc;
  font-size: 1.5rem;
}

.cell-best {
  color: #c0392b;
  /* Red circle */
  font-size: 1.8rem;
  font-weight: 900;
  background: rgba(192, 57, 43, 0.05);
  /* Faint highlight */
}

.comparison-table td.cell-best {
  border-left: 2px solid var(--color-accent);
  border-right: 2px solid var(--color-accent);
}

/* Bottom border for lawyer column */
.comparison-table tr:last-child td.cell-best {
  border-bottom: 2px solid var(--color-accent);
}

.comparison-note {
  font-size: 0.9rem;
  color: #666;
  margin-top: 15px;
}

/* ========================================
   User Path Navigator (Situational UX)
   ======================================== */
.user-path-navigator {
  margin-bottom: 40px;
}

.path-navigator-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 30px;
}

.path-card {
  display: flex;
  align-items: center;
  padding: 35px 30px;
  border-radius: 24px;
  text-decoration: none;
  transition: var(--transition-base);
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.path-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0) 100%);
  z-index: 1;
}

.path-card:hover,
.path-card.active {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-accent);
}

.path-card.active {
  background-color: var(--color-bg-light);
  /* Fallback */
  box-shadow: 0 0 0 3px var(--color-accent-soft);
}

.path-card.receive {
  background: linear-gradient(135deg, #fdfcf0 0%, #f8f1d7 100%);
}

.path-card.leave {
  background: linear-gradient(135deg, #f0f9f6 0%, #def0ea 100%);
}

.path-icon {
  font-size: 3.5rem;
  margin-right: 25px;
  z-index: 2;
  filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.1));
}

.path-content {
  z-index: 2;
  flex: 1;
}

.path-label {
  display: block;
  font-size: 0.9rem;
  font-weight: bold;
  color: var(--color-accent);
  margin-bottom: 5px;
  letter-spacing: 0.05em;
}

.path-title {
  display: block;
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--color-main);
  margin-bottom: 10px;
  line-height: 1.2;
}

.path-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.path-tag {
  background: rgba(255, 255, 255, 0.6);
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: bold;
  color: var(--color-text-secondary);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.path-arrow {
  margin-left: 15px;
  font-size: 1.2rem;
  color: var(--color-accent);
  transition: transform 0.3s;
  z-index: 2;
}

.path-card:hover .path-arrow {
  transform: translateX(5px);
}

/* Goal Shortcuts */
.goal-shortcuts {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

.goal-btn {
  display: flex;
  align-items: center;
  padding: 12px 25px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 100px;
  font-weight: bold;
  color: var(--color-text-primary);
  cursor: pointer;
  transition: var(--transition-base);
  font-size: 0.95rem;
  box-shadow: var(--shadow-sm);
}

.goal-btn i {
  margin-right: 10px;
  font-style: normal;
  font-size: 1.1rem;
}

.goal-btn:hover,
.goal-btn.active {
  background: var(--color-main);
  color: #fff;
  border-color: var(--color-main);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

/* Active Filter State for Service Grid */
.solution-item.is-dimmed {
  opacity: 0.3;
  filter: grayscale(0.8);
  pointer-events: none;
}

.solution-item.is-highlighted {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-soft);
  transform: scale(1.02);
}

@media (max-width: 900px) {
  .path-navigator-grid {
    grid-template-columns: 1fr;
  }

  .path-icon {
    font-size: 2.8rem;
    margin-right: 15px;
  }
}

@media (max-width: 480px) {
  .goal-btn {
    width: 100%;
    justify-content: center;
  }
}

/* ========================================
   Services / Solution Grid
   ======================================== */
.solution-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  /* 4 items for 32 items grid */
  gap: 15px;
  margin-top: 50px;
}

@media (max-width: 1400px) {
  .solution-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 900px) {
  .solution-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 500px) {
  .solution-grid {
    grid-template-columns: 1fr;
  }
}

.solution-item {
  background: #fff;
  padding: 25px 20px;
  border-radius: 20px;
  text-align: center;
  box-shadow: var(--shadow-md);
  transition: transform 0.3s, box-shadow 0.3s;
  border: 1px solid rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.solution-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-accent);
}

.solution-title {
  font-size: 1.1rem;
  font-weight: bold;
  margin: 15px 0 10px;
  color: var(--color-main);
  line-height: 1.4;
}

.solution-description {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--color-text-secondary);
}

.solution-link {
  text-decoration: none;
  display: block;
  height: 100%;
}

.solution-link:hover {
  text-decoration: none;
}

/* FAQ Directory Styles */
.faq-directory {
  max-width: 1000px;
  margin: 0 auto;
  background: #fff;
  border-radius: 30px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.faq-tabs {
  display: flex;
  background: #f8fafc;
  border-bottom: 2px solid #e2e8f0;
}

.fd-tab {
  flex: 1;
  padding: 20px 10px;
  border: none;
  background: transparent;
  font-weight: 700;
  color: #64748b;
  cursor: pointer;
  transition: transform 0.3s, opacity 0.3s, background-color 0.3s, border-color 0.3s, box-shadow 0.3s, color 0.3s;
  font-size: 0.95rem;
  border-bottom: 3px solid transparent;
}

.fd-tab.active {
  color: var(--color-main);
  border-bottom-color: var(--color-accent);
  background: #fff;
}

@media (max-width: 768px) {
  .faq-tabs {
    flex-wrap: wrap;
  }

  .fd-tab {
    flex: none;
    width: 50%;
    border-bottom: 1px solid #e2e8f0;
  }

  .fd-tab.active {
    background: #fdfcf8;
  }
}

.faq-content {
  padding: 30px;
}

.fd-category-content {
  display: none;
  animation: fadeIn 0.4s ease;
}

.fd-category-content.active {
  display: block;
}

.faq-item {
  background: #fff;
  margin-bottom: 15px;
  border: 1px solid #f1f5f9;
  border-radius: 12px;
  transition: box-shadow 0.3s;
}

.faq-item:hover {
  box-shadow: var(--shadow-sm);
}

.faq-question {
  padding: 20px 25px;
  font-weight: bold;
  cursor: pointer;
  position: relative;
  padding-right: 50px;
  font-size: 1.05rem;
}

.faq-question::after {
  content: var(--icon, '+');
  position: absolute;
  right: 25px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.4rem;
  color: var(--color-accent);
  font-weight: 400;
}

.faq-answer {
  padding: 0 25px 25px;
  color: #475569;
  line-height: 1.8;
  font-size: 0.95rem;
  border-top: 1px dashed #f1f5f9;
  padding-top: 15px;
  margin-top: 5px;
}

.faq-cta {
  text-align: center;
  margin-top: 60px;
  padding: 50px;
  background: linear-gradient(rgba(248, 250, 252, 0.5), rgba(248, 250, 252, 1));
  border-radius: 0 0 30px 30px;
}



/* ========================================
   Lawyer Profile
   ======================================== */
.lawyer-profile {
  display: flex;
  gap: 40px;
  align-items: center;
  background: #fff;
  padding: 50px;
  border-radius: 30px;
  box-shadow: var(--shadow-md);
}

.lawyer-img {
  width: 300px;
  flex-shrink: 0;
}

.lawyer-img img {
  border-radius: 20px;
}

.lawyer-info h3 {
  font-size: 2rem;
  margin-bottom: 20px;
}

@media (max-width: 768px) {
  .lawyer-profile {
    flex-direction: column;
    padding: 30px;
  }

  .lawyer-img {
    width: 100%;
    max-width: 300px;
  }
}

/* ========================================
   Contact Form
   ======================================== */
.contact-form {
  background: #fdfdfd;
}

.form-wrapper {
  max-width: 700px;
  margin: 0 auto;
  background: #fff;
  padding: 40px;
  border-radius: 20px;
  box-shadow: var(--shadow-md);
}

.form-group {
  margin-bottom: 20px;
}

.form-control {
  width: 100%;
  padding: 15px;
  border: 1px solid #ddd;
  border-radius: 10px;
  font-size: 1rem;
}

.form-label {
  font-weight: bold;
  display: block;
  margin-bottom: 8px;
}

.required {
  color: red;
  font-size: 0.8rem;
  margin-left: 5px;
}

.form-wrapper .btn {
  padding: 20px;
  font-size: 1.2rem;
  font-weight: bold;
}

/* ========================================
   Footer
   ======================================== */
footer {
  background: var(--color-main);
  color: #fff;
  padding: 60px 0;
  text-align: center;
}

.footer-logo {
  font-size: 1.2rem;
  font-weight: bold;
  margin-bottom: 20px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.8);
  margin: 0 10px;
}

.footer-links {
  margin: 20px 0;
}

/* Sticky Footer (SP) */
.sticky-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: #fff;
  display: flex;
  z-index: 2000;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  display: none;
  /* Default hidden */
}

@media (max-width: 768px) {
  .sticky-footer {
    display: flex;
  }
}

.sticky-btn {
  flex: 1;
  text-align: center;
  padding: 15px;
  font-weight: bold;
}

.sticky-tel {
  background: #fff;
  color: var(--color-main);
}

.sticky-mail {
  background: var(--color-main);
  color: #fff;
}

/* Utilities */
.pc-only {
  display: block;
}

.sp-only {
  display: none;
}

@media (max-width: 1150px) {
  .pc-only {
    display: none !important;
  }

  .sp-only {
    display: block !important;
  }
}

/* ========================================
   Cost Section (NEW)
   ======================================== */
.cost-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 20px;
}

.cost-item {
  background: #fff;
  padding: 30px 20px;
  border-radius: 20px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid #eee;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  position: relative;
  transition: transform 0.3s;
}

.cost-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.cost-item.featured {
  border: 2px solid var(--color-accent);
  background: #fffcf5;
}

.cost-item .badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-accent);
  color: #fff;
  font-size: 0.8rem;
  font-weight: bold;
  padding: 4px 15px;
  border-radius: 20px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.cost-title {
  font-size: 1.1rem;
  font-weight: bold;
  color: var(--color-main);
  margin-bottom: 15px;
  padding-bottom: 15px;
  border-bottom: 1px solid #eee;
  position: relative;
}

.cost-title::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 2px;
  background: var(--color-accent);
}

.cost-price {
  margin-bottom: 20px;
  color: var(--color-text-primary);
}

.price-prefix {
  font-size: 0.8rem;
  display: block;
  color: #888;
  margin-bottom: 5px;
}

.price-val {
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--color-main);
  line-height: 1;
}

.price-unit {
  font-size: 1rem;
  font-weight: bold;
  margin-left: 2px;
}

.cost-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  width: 100%;
  margin-bottom: 12px;
  border-bottom: 1px dotted #ccc;
  padding-bottom: 5px;
}

.cost-label {
  font-size: 0.9rem;
  font-weight: bold;
  color: #555;
}

.cost-value {
  font-size: 1.1rem;
  font-weight: bold;
  color: var(--color-main);
  text-align: right;
}

.cost-desc {
  font-size: 0.85rem;
  color: #666;
  margin-top: auto;
  line-height: 1.6;
  background: #f9f9f9;
  padding: 10px;
  border-radius: 8px;
  width: 100%;
}

.cost-note {
  text-align: right;
  font-size: 0.8rem;
  color: #777;
  margin-top: 20px;
}

@media (max-width: 1150px) {
  .cost-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .cost-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .cost-item {
    padding: 25px;
  }
}

/* ========================================
   Interactive Tools (Simulator & Tax Check)
   ======================================== */
.interactive-tools {
  background: linear-gradient(to bottom, #f8fafc 0%, #ffffff 100%);
}

.tools-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-top: 50px;
}

@media (max-width: 900px) {
  .tools-grid {
    grid-template-columns: 1fr;
  }
}

.tool-card {
  background: #fff;
  border-radius: 30px;
  padding: 40px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s;
  border: 1px solid rgba(0, 0, 0, 0.03);
}

.tool-card:hover {
  transform: translateY(-5px);
}

.tool-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 15px;
}

.tool-icon {
  font-size: 2.5rem;
}

.tool-title {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--color-main);
  margin-bottom: 0;
}

.tool-desc {
  font-size: 1rem;
  color: #64748b;
  margin-bottom: 30px;
}

.tool-body {
  flex: 1;
}

.input-group {
  margin-bottom: 25px;
}

.input-group label {
  display: block;
  font-weight: bold;
  margin-bottom: 10px;
  color: var(--color-text-primary);
}

/* Range Input Styling */
.range-display {
  font-size: 2rem;
  font-weight: 900;
  color: var(--color-main);
  text-align: center;
  margin-bottom: 10px;
}

.tool-range {
  width: 100%;
  height: 8px;
  background: #e2e8f0;
  border-radius: 4px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.tool-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  background: var(--color-accent);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s;
}

.tool-range::-webkit-slider-thumb:hover {
  transform: scale(1.1);
}

.range-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: #94a3b8;
  margin-top: 8px;
}

/* Tool Tip/Result Area */
.result-area {
  background: #f1f5f9;
  border-radius: 20px;
  padding: 25px;
  margin-bottom: 25px;
}

.result-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 0.95rem;
  color: #475569;
}

.result-total {
  border-top: 2px solid #e2e8f0;
  margin-top: 15px;
  padding-top: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.result-total span:first-child {
  font-weight: bold;
  color: var(--color-text-primary);
}

.total-val {
  color: var(--color-main);
}

.total-val strong {
  font-size: 2rem;
  font-weight: 900;
}

/* Tax Tool Specifics */
.tool-input-num {
  width: 100px;
  padding: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 1.2rem;
  font-weight: bold;
  text-align: right;
  margin-right: 5px;
}

.heir-selector {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.heir-btn {
  flex: 1;
  padding: 10px;
  border: 1px solid #e2e8f0;
  background: #fff;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.3s, opacity 0.3s, background-color 0.3s, border-color 0.3s, box-shadow 0.3s, color 0.3s;
  font-weight: bold;
}

.heir-btn:hover {
  background: #f8fafc;
  border-color: var(--color-main);
}

.heir-btn.active {
  background: var(--color-main);
  color: #fff;
  border-color: var(--color-main);
}

.result-box {
  padding: 20px;
  border-radius: 15px;
  text-align: center;
}

.result-box.positive {
  background: #fff1f2;
  border: 1px solid #fecdd3;
  color: #9f1239;
}

.result-box.negative {
  background: #f0fdf4;
  border: 1px solid #dcfce7;
  color: #166534;
}

.res-status {
  font-weight: 900;
  margin-bottom: 10px;
  font-size: 1.1rem;
}

.tax-result p {
  font-size: 0.9rem;
  line-height: 1.6;
}

.tool-footer {
  margin-top: auto;
}

.tool-footer .note {
  font-size: 0.8rem;
  color: #94a3b8;
  margin-bottom: 20px;
  text-align: center;
}

.tool-footer .btn {
  width: 100%;
  padding: 18px;
}

@media (max-width: 480px) {
  .tool-card {
    padding: 30px 20px;
  }
}

/* ==========================================================================
   Glossary Page Styles (LP6 Adaptation)
   ========================================================================== */
/* Subpage Header Compatibility */
/* Subpage Header Compatibility - Standardized to solid capsule */

body.service-subpage header.is-scrolled .header-inner {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-radius: 40px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
}

.page-hero--service {
  background-image: linear-gradient(135deg, #1A252F 0%, #2C3E50 100%), url('assets/images/header_bg_faq.webp');
  /* Fallback to FAQ bg or gradient */
  background-blend-mode: overlay;
}

.service-subpage {
  padding-top: 0 !important;
  /* Let hero handle it */
}

/* Subpage Hero Styles */
.page-hero {
  background-size: cover;
  background-position: center;
  color: #fff;
  padding: 160px 0 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 64, 112, 0.6);
  /* Brand Blue with transparency */
  z-index: 1;
}

.page-hero h1 {
  font-size: 2.5rem;
  font-weight: 900;
  margin-bottom: 10px;
  text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
  position: relative;
  z-index: 2;
}

.page-hero p {
  font-size: 1.1rem;
  opacity: 0.9;
  letter-spacing: 0.1em;
  font-family: serif;
  position: relative;
  z-index: 2;
}

/* Individual Page Modifiers */
.page-hero--faq {
  background-image: url('assets/images/header_bg_faq.webp');
  padding-top: 195px;
}

.page-hero--glossary {
  background-image: url('assets/images/header_bg_glossary.webp');
}

.page-hero--knowledge {
  background-image: url('assets/images/header_bg_knowledge_top.webp');
}

.page-hero--knowledge-top {
  background-image: url('assets/images/header_bg_knowledge_top.webp');
}

.page-hero--flow {
  background-image: url('assets/images/header_bg_flow.webp');
}

.page-hero--procedure {
  background-image: url('assets/images/header_bg_procedure.webp');
}

.page-hero--investigation {
  background-image: url('assets/images/header_bg_investigation.webp');
}

.page-hero--will {
  background-image: url('assets/images/header_bg_will.webp');
}

.page-hero--division {
  background-image: url('assets/images/header_bg_division.webp');
}

.page-hero--portion {
  background-image: url('assets/images/header_bg_portion.webp');
}

.page-hero--tax {
  background-image: url('assets/images/header_bg_tax.webp');
}

.breadcrumbs {
  background: #f5f5f5;
  padding: 12px 0;
  font-size: 0.85rem;
  color: #666;
  border-bottom: 1px solid #eee;
}

.breadcrumbs a {
  color: #666;
  text-decoration: none;
  transition: color 0.3s ease;
}

.breadcrumbs a:hover {
  text-decoration: underline;
  color: var(--color-main);
}

.glossary-wrapper {
  background-color: var(--color-bg-light);
}

.glossary-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 50px;
  padding: 60px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

/* Sidebar TOC */

.glossary-toc {
  background: #fff;
  padding: 30px;
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 140px;
  /* Adjust for sticky header */
}

.glossary-toc h3 {
  font-size: 1.2rem;
  color: var(--color-main);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--color-accent);
}

.toc-list li {
  margin-bottom: 12px;
}

.toc-list a {
  color: var(--color-text-secondary);
  display: block;
  padding: 10px 15px;
  border-radius: 8px;
  font-weight: 500;
  transition: transform 0.3s, opacity 0.3s, background-color 0.3s, border-color 0.3s, box-shadow 0.3s, color 0.3s;
  font-size: 0.95rem;
  border-left: 3px solid transparent;
}

.toc-list a:hover {
  color: var(--color-main);
  background: var(--color-bg-secondary);
  transform: translateX(5px);
}

.toc-list a.active {
  color: var(--color-main);
  font-weight: 700;
  border-left: 3px solid var(--color-accent);
  background: rgba(212, 175, 55, 0.1);
  /* Gold tint */
  padding-left: 15px;
}

/* Glossary Content */
.glossary-content {
  display: flex;
  flex-direction: column;
  gap: 60px;
}

.search-container {
  position: relative;
  margin-bottom: 20px;
}

.search-container input {
  width: 100%;
  padding: 15px 20px 15px 50px;
  border: 1px solid #ddd;
  border-radius: 50px;
  font-size: 1rem;
  transition: transform 0.3s, opacity 0.3s, background-color 0.3s, border-color 0.3s, box-shadow 0.3s, color 0.3s ease;
  box-shadow: var(--shadow-sm);
}

.search-container input:focus {
  border-color: var(--color-main);
  outline: none;
  box-shadow: 0 4px 15px rgba(0, 64, 112, 0.15);
}

.search-icon {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.2rem;
  opacity: 0.5;
}

/* Categories */
.glossary-category {
  background: #fff;
  border-radius: 30px;
  padding: 40px;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(0, 0, 0, 0.03);
}

.category-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid #eee;
}

.category-icon {
  font-size: 2.5rem;
  background: var(--color-bg-secondary);
  width: 70px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--color-main);
}

.category-title {
  font-size: 1.8rem;
  color: var(--color-main);
  margin: 0;
  font-weight: 900;
}

/* Terms Grid */
.terms-grid {
  display: grid;
  gap: 25px;
}

.term-card {
  background: #fdfdfd;
  border: 1px solid #f0f0f0;
  border-left: 5px solid var(--color-main);
  border-radius: 12px;
  padding: 25px;
  transition: transform 0.4s, opacity 0.4s, background-color 0.4s, border-color 0.4s, box-shadow 0.4s, color 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.term-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  background: #fff;
}

.term-header {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.term-dt {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--color-text-primary);
}

.term-dd {
  line-height: 1.8;
  color: var(--color-text-secondary);
  font-size: 1rem;
}

.term-dd strong {
  background: linear-gradient(transparent 60%, rgba(212, 175, 55, 0.3) 60%);
  font-weight: 700;
}

/* Scroll To Top */
.scroll-to-top {
  position: fixed;
  bottom: 180px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: var(--color-main);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  z-index: 900;
  opacity: 0;
  visibility: hidden;
  transition: transform 0.3s, opacity 0.3s, background-color 0.3s, border-color 0.3s, box-shadow 0.3s, color 0.3s;
  text-decoration: none;
}

.scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
}

/* ========================================
   Animations
   ======================================== */
.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.scroll-to-top:hover {
  background: var(--color-accent);
  transform: translateY(-5px);
}

/* Responsive */
@media (max-width: 900px) {
  .glossary-layout {
    grid-template-columns: 1fr;
    padding: 40px 15px;
    gap: 30px;
  }

  .glossary-toc {
    display: none;
    /* Hide TOC on mobile for simplicity */
  }

  .category-title {
    font-size: 1.5rem;
  }

  .glossary-category {
    padding: 25px;
  }

  .category-icon {
    width: 50px;
    height: 50px;
    font-size: 1.8rem;
  }
}

/* Information Center Section */
.info-center {
  background-color: #f9f9f9;
  padding: 80px 0;
}

.info-center .section-title {
  color: var(--color-main);
  text-align: center;
  font-size: 2rem;
  margin-bottom: 10px;
}

.info-center .section-subtitle {
  text-align: center;
  margin-bottom: 50px;
  color: #666;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.info-card {
  background: #fff;
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s, box-shadow 0.3s;
  border-bottom: 4px solid var(--color-accent);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.info-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.info-icon {
  font-size: 3.5rem;
  margin-bottom: 20px;
  color: var(--color-main);
}

.info-title {
  font-size: 1.4rem;
  color: #333;
  margin-bottom: 15px;
  font-weight: bold;
}

.info-desc {
  font-size: 0.95rem;
  color: #666;
  line-height: 1.6;
  margin-bottom: 25px;
  flex-grow: 1;
  /* Push button to bottom */
}

.info-btn {
  display: inline-block;
  padding: 10px 25px;
  background: #fff;
  color: var(--color-main);
  border: 1px solid var(--color-main);
  border-radius: 30px;
  text-decoration: none;
  transition: transform 0.3s, opacity 0.3s, background-color 0.3s, border-color 0.3s, box-shadow 0.3s, color 0.3s;
  font-weight: bold;
}

.info-card:hover .info-btn {
  background: var(--color-main);
  color: #fff;
}

@media (max-width: 768px) {
  .info-grid {
    grid-template-columns: 1fr;
  }
}

.glossary-toc h2 {
  font-size: 1.2rem;
  color: var(--color-main);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--color-accent);
}

/* ========================================
   Strength Section (New)
   ======================================== */
.strength-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-top: 40px;
}

.strength-item {
  background: #fff;
  padding: 40px 30px;
  border-radius: 20px;
  text-align: center;
  box-shadow: var(--shadow-md);
  transition: transform 0.3s, box-shadow 0.3s;
  border-top: 5px solid var(--color-main);
  position: relative;
  overflow: hidden;
}

.strength-item:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
}

.strength-icon {
  font-size: 3.5rem;
  margin-bottom: 20px;
  background: var(--color-bg-secondary);
  width: 90px;
  height: 90px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--color-main);
}

.strength-item h3 {
  font-size: 1.4rem;
  color: var(--color-main);
  margin-bottom: 15px;
  font-weight: 900;
}

.strength-item p {
  color: var(--color-text-secondary);
  line-height: 1.7;
}

@media (max-width: 900px) {
  .strength-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

/* ========================================
   Case Studies Section (New)
   ======================================== */
.case-studies {
  background-color: #fcfcfc;
}

.case-study-list {
  display: flex;
  flex-direction: column;
  gap: 40px;
  max-width: 900px;
  margin: 0 auto;
}

.step-form-wrapper {
  background: #fff;
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  padding: 40px;
  position: relative;
  z-index: 10;
  overflow: hidden;
  max-width: 800px;
  margin: 0 auto;
  scroll-margin-top: 140px;
}

.case-card {
  background: #fff;
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  border: 1px solid #eee;
  transition: transform 0.3s;
}

.case-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.case-header {
  background: var(--color-main);
  color: #fff;
  padding: 20px 30px;
  position: relative;
}

.case-badge {
  display: inline-block;
  background: var(--color-accent);
  color: #fff;
  font-size: 0.8rem;
  font-weight: bold;
  padding: 3px 12px;
  border-radius: 20px;
  margin-bottom: 10px;
}

.case-title {
  font-size: 1.3rem;
  font-weight: bold;
  line-height: 1.4;
  margin: 0;
}

.case-body {
  padding: 30px;
}

.case-flow {
  display: flex;
  align-items: stretch;
  gap: 20px;
}

.case-step {
  flex: 1;
  background: #f9f9f9;
  padding: 20px;
  border-radius: 12px;
}

.case-step h4 {
  font-size: 1rem;
  color: var(--color-main);
  margin-bottom: 10px;
  border-bottom: 2px solid #ddd;
  padding-bottom: 5px;
  display: inline-block;
}

.case-step.situation h4 {
  border-color: #999;
  color: #555;
}

.case-step.result h4 {
  border-color: var(--color-cta);
  color: var(--color-cta-dark);
}

.case-step p {
  font-size: 0.95rem;
  color: #333;
}

.case-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #ccc;
}

@media (max-width: 768px) {
  .case-flow {
    flex-direction: column;
    gap: 10px;
  }

  .case-arrow {
    transform: rotate(90deg);
    /* Down arrow */
    height: 30px;
  }
}

/* Visual Guide Section Styles */
.visual-guide-section {
  background: #fff;
  padding: 100px 0;
}

.visual-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-top: 50px;
}

@media (max-width: 1150px) {
  .visual-grid {
    grid-template-columns: 1fr;
  }
}

.visual-card {
  background: #f8fafc;
  border-radius: 24px;
  padding: 35px;
  border: 1px solid #e2e8f0;
  transition: transform 0.3s;
}

.visual-card:hover {
  transform: translateY(-5px);
}

.visual-header {
  margin-bottom: 25px;
  display: flex;
  align-items: center;
  gap: 15px;
}

.step-num {
  background: var(--color-main);
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 0.9rem;
}

.visual-header h3 {
  font-size: 1.25rem;
  font-weight: bold;
  color: var(--color-main);
}

.diagram-placeholder {
  background: #fff;
  border-radius: 16px;
  height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  border: 1px dashed #cbd5e1;
  overflow: hidden;
  position: relative;
}

.ft-node {
  background: var(--color-main);
  color: #fff;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  text-align: center;
  font-weight: bold;
}

.visual-desc {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #475569;
  font-weight: 500;
}

/* ========================================
   Animation & Premium Tweaks
   ======================================== */
.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Enhanced Typography */
body {
  font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ========================================
   Typography Overrides (Premium Font)
   ======================================== */
.section-title,
.section-subtitle,
.solution-title,
.case-title,
.info-title,
.flow-content h3,
.lawyer-info h3,
.strength-item h3,
h1,
h2,
h3 {
  font-family: var(--font-serif);
}

/* ========================================
   Mouse Follow Glow
   ======================================== */
.mouse-glow {
  position: absolute;
  top: 0;
  left: 0;
  width: 600px;
  height: 600px;
  margin-left: -300px;
  /* Center adjustment */
  margin-top: -300px;
  /* Center adjustment */
  background: radial-gradient(circle at center, rgba(0, 255, 200, 0.25) 0%, transparent 70%);
  z-index: 6;
  pointer-events: none;
  mix-blend-mode: screen;
  filter: blur(40px);
  opacity: 0;
  transition: opacity 0.6s ease;
  will-change: transform;
  transform: translate3d(0, 0, 0);
  /* Force GPU */
}

.hero:hover .mouse-glow {
  opacity: 1;
}

/* ========================================
   Shimmer Effect
   ======================================== */
.shimmer-btn {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: inline-block;
}

.shimmer-btn::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -60%;
  width: 20%;
  height: 200%;
  background: rgba(255, 255, 255, 0.4);
  transform: rotate(30deg);
  animation: shimmer 3s infinite;
  will-change: left;
  pointer-events: none;
}

@keyframes shimmer {
  0% {
    left: -60%;
  }

  100% {
    left: 150%;
  }
}

/* Fix Floating CTA overlaps on Mobile */
@media (max-width: 768px) {
  .floating-cta {
    display: none !important;
  }

  .scroll-to-top {
    bottom: 80px;
    right: 20px;
    width: 45px;
    height: 45px;
    font-size: 1.2rem;
  }
}

/* Sidebar Sticky Fix */
.glossary-sidebar {
  position: -webkit-sticky;
  position: sticky;
  top: 120px;
}

/* ========================================
   Service Subpages (FD Framework)
   ======================================== */
.service-subpage {
  background: var(--color-bg-light);
}

.service-hero {
  padding: 140px 0 80px;
  background: linear-gradient(135deg, #1a2a3a 0%, #2c3e50 100%);
  color: #fff;
  text-align: center;
}

.service-hero-inner {
  max-width: 900px;
  margin: 0 auto;
}

.service-hero h1 {
  font-family: var(--font-serif);
  font-size: 3rem;
  margin-bottom: 20px;
}

.service-hero .badge {
  display: inline-block;
  background: var(--color-accent);
  color: #fff;
  padding: 6px 15px;
  border-radius: 4px;
  font-weight: 700;
  margin-bottom: 20px;
}

.service-section {
  padding: 80px 0;
}

.service-content-card {
  background: #fff;
  border-radius: 30px;
  padding: 60px;
  box-shadow: var(--shadow-md);
  margin-bottom: 40px;
}

.service-content-card .section-title {
  text-align: left;
  margin-bottom: 30px;
}

/* Service Page Layout */
.service-layout {
  display: flex;
  gap: 40px;
  align-items: flex-start;
}

.service-main-content {
  flex: 1;
  min-width: 0;
}

.service-sidebar {
  width: 280px;
  flex-shrink: 0;
  position: -webkit-sticky;
  position: sticky;
  top: 120px;
}

.sidebar-title {
  font-size: 1.25rem;
  color: var(--color-main);
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid var(--color-accent);
  font-family: var(--font-serif);
}

.sidebar-menu {
  list-style: none;
  padding: 0;
  margin-bottom: 30px;
}

.sidebar-menu li {
  margin-bottom: 10px;
}

.sidebar-menu a {
  display: block;
  padding: 12px 18px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  color: #475569;
  font-weight: 500;
  transition: transform 0.3s, opacity 0.3s, background-color 0.3s, border-color 0.3s, box-shadow 0.3s, color 0.3s ease;
  font-size: 0.95rem;
}

.sidebar-menu a:hover {
  background: #f8fafc;
  border-color: var(--color-main);
  color: var(--color-main);
  transform: translateX(5px);
}

.sidebar-menu a.active {
  background: var(--color-main);
  color: #fff;
  border-color: var(--color-main);
  font-weight: 700;
}

.sidebar-cta-box {
  margin-top: 30px;
  background: #fff9e6;
  padding: 20px;
  border-radius: 12px;
  border: 1px solid #f39c12;
}

.sidebar-cta-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #d35400;
  margin-bottom: 10px;
}

.sidebar-cta-text {
  font-size: 0.8rem;
  line-height: 1.5;
  margin-bottom: 15px;
}

.problem-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  padding: 0;
}

.problem-item {
  background: #fdf2f2;
  padding: 20px;
  border-radius: 12px;
  border-left: 4px solid #ef4444;
  font-size: 0.95rem;
}

.illust-box-inner {
  text-align: center;
}

.illust-icon {
  font-size: 5rem;
  display: block;
  margin-bottom: 20px;
}

.illust-text {
  font-weight: 700;
  color: #475569;
}

.cost-note {
  margin-top: 20px;
  font-size: 0.9rem;
  color: #64748b;
}

/* Illustration Containers */
.illust-box {
  background: #f8fafc;
  border-radius: 24px;
  padding: 40px;
  margin-bottom: 30px;
  border: 1px dashed #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 250px;
  position: relative;
}

.illust-box span {
  font-size: 4rem;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

/* Key Points Grid */
.points-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.point-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 30px;
  text-align: center;
  transition: transform 0.3s;
}

.point-card:hover {
  transform: translateY(-5px);
  border-color: var(--color-accent);
}

.point-num {
  width: 50px;
  height: 50px;
  background: var(--color-main);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 900;
  margin: 0 auto 20px;
}

/* Process Timeline (Subpage Version) */
.timeline-v2 {
  max-width: 800px;
  margin: 50px auto;
  position: relative;
}

.timeline-v2::before {
  content: '';
  position: absolute;
  left: 40px;
  top: 0;
  bottom: 0;
  width: 4px;
  background: #e2e8f0;
}

.timeline-v2-item {
  display: flex;
  gap: 30px;
  margin-bottom: 40px;
  position: relative;
}

.t-v2-icon {
  width: 84px;
  height: 84px;
  background: #fff;
  border: 4px solid var(--color-main);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  flex-shrink: 0;
  z-index: 1;
}

.t-v2-content {
  background: #fff;
  padding: 25px;
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  flex-grow: 1;
}

.t-v2-content h3 {
  color: var(--color-main);
  margin-bottom: 10px;
  font-family: var(--font-serif);
}

/* Cost Detailed Table */
.cost-table-detailed {
  width: 100%;
  border-collapse: collapse;
  margin-top: 30px;
}

.cost-table-detailed th,
.cost-table-detailed td {
  padding: 20px;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
}

.cost-table-detailed th {
  background: #f8fafc;
  color: var(--color-main);
  font-weight: 700;
  width: 30%;
}

@media (max-width: 768px) {
  .service-hero {
    padding: 100px 0 60px;
  }

  .service-hero h1 {
    font-size: 2rem;
  }

  .service-content-card {
    padding: 30px;
  }

  .points-grid {
    grid-template-columns: 1fr;
  }

  .timeline-v2::before {
    left: 20px;
  }

  .t-v2-icon {
    width: 44px;
    height: 44px;
    font-size: 1.2rem;
  }

  .timeline-v2-item {
    gap: 15px;
  }

  .cost-table-detailed th {
    width: 40%;
    padding: 12px;
    font-size: 0.9rem;
  }

  .cost-table-detailed td {
    padding: 12px;
    font-size: 0.9rem;
  }

  /* Layout Adjustments */
  .service-layout {
    flex-direction: column;
    gap: 40px;
    width: 100%;
  }

  .service-sidebar {
    width: 100%;
    position: static;
    flex-shrink: 1;
  }

  .service-content-card {
    padding: 30px 20px;
  }
}

/* ========================================
   FAQ & Glossary Accordion Styles
   ======================================== */
.term-card {
  border-bottom: 1px solid #e2e8f0;
  margin-bottom: 15px;
  background: #fff;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.term-header {
  padding: 20px 25px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: transform 0.3s, opacity 0.3s, background-color 0.3s, border-color 0.3s, box-shadow 0.3s, color 0.3s ease;
  background: #fff;
}

.term-header:hover {
  background: #f8fafc;
}

.term-header.is-open {
  background: #fdfbf9;
  color: var(--color-main);
  border-bottom: 1px solid #f1f5f9;
}

.term-dt {
  font-weight: 700;
  color: var(--color-main);
  font-size: 1.05rem;
  line-height: 1.5;
  width: 90%;
  margin: 0;
}

.term-header::after {
  content: '';
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--color-cta);
  border-bottom: 2px solid var(--color-cta);
  transform: rotate(45deg);
  transition: transform 0.3s ease;
  margin-left: 15px;
  display: block;
}

.term-header.is-open::after {
  transform: rotate(-135deg);
}

.term-dd {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.4s ease;
  background: #fff;
  font-size: 0.95rem;
  line-height: 1.8;
  color: #444;
  padding: 0 25px;
  opacity: 0;
  box-sizing: border-box;
}

.term-dd.is-open {
  padding-top: 20px;
  padding-bottom: 25px;
  opacity: 1;
}

/* Adjustments for Mobile */
@media (max-width: 768px) {
  .term-header {
    padding: 15px 20px;
  }

  .term-dt {
    font-size: 0.95rem;
  }

  .term-header::after {
    width: 8px;
    height: 8px;
  }
}

/* ========================================
   Inheritance Diagrams (Family Tree)
   ======================================== */
.inheritance-tree {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 30px 0;
  padding: 30px 20px;
  background: #fdfdfd;
  border: 1px solid #eee;
  border-radius: 12px;
}

.tree-row {
  display: flex;
  justify-content: center;
  gap: 40px;
  width: 100%;
  position: relative;
}

.tree-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #fff;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  padding: 15px 10px;
  width: 130px;
  position: relative;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
  transition: transform 0.2s;
  z-index: 2;
}

.tree-node.main {
  border-color: #555;
  background: #555;
  color: #fff;
}

.tree-node.spouse {
  border-color: #e91e63;
  background: #fce4ec;
}

.tree-node.child {
  border-color: #2196f3;
  background: #e3f2fd;
}

.tree-node.parent {
  border-color: #ff9800;
  background: #fff3e0;
}

.tree-node.sibling {
  border-color: #4caf50;
  background: #e8f5e9;
}

.node-icon {
  font-size: 2.2rem;
  margin-bottom: 5px;
  line-height: 1;
}

.node-label {
  font-weight: bold;
  font-size: 0.9rem;
  margin-bottom: 8px;
  text-align: center;
  line-height: 1.3;
}

.node-share {
  background: #333;
  color: #fff;
  padding: 3px 12px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: bold;
  letter-spacing: 0.5px;
}

.tree-node.spouse .node-share {
  background: #e91e63;
  color: #fff;
}

.tree-node.child .node-share {
  background: #2196f3;
  color: #fff;
}

.tree-node.parent .node-share {
  background: #ff9800;
  color: #fff;
}

.tree-node.sibling .node-share {
  background: #4caf50;
  color: #fff;
}

.tree-node.main .node-status {
  font-size: 0.8rem;
  opacity: 0.9;
  margin-top: 5px;
}

/* Connectors */
.connector-vertical {
  width: 2px;
  height: 30px;
  background: #ccc;
  margin: 0 auto;
}

.connector-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.connector-line-horizontal {
  height: 2px;
  background: #ccc;
  width: 170px;
  /* Fixed width for perfect alignment (130/2 + 40 + 130/2) */
  margin: 0 auto;
  position: relative;
  top: -15px;
  z-index: 1;
}

.tree-group {
  display: flex;
  justify-content: center;
  gap: 20px;
}

.cross-sign {
  font-size: 1.5rem;
  color: #ccc;
  align-self: center;
  margin: 0 10px;
}

@media (max-width: 600px) {
  .tree-row {
    gap: 10px;
    flex-wrap: nowrap;
    /* Prevent stacking on mobile */
  }

  .tree-node {
    width: 100px;
    padding: 10px 5px;
  }

  .node-icon {
    font-size: 1.8rem;
  }

  .node-label {
    font-size: 0.8rem;
  }

  .node-share {
    font-size: 0.8rem;
    padding: 2px 8px;
  }

  .connector-line-horizontal {
    width: 110px;
    /* (100/2 + 10 + 100/2) */
  }
}

.inheritance-patterns {
  margin-top: 30px;
}

.pattern-title {
  background: #f4f6f9;
  padding: 10px 15px;
  border-left: 5px solid var(--color-main);
  font-size: 1.1rem;
  margin-top: 40px;
  margin-bottom: 20px;
  color: #333;
}

/* ========================================
   Service Page: Posthumous Divorce (Shigo Rikon)
   ======================================== */
.shigorikon-page .page-hero--shigorikon {
  background-image: url('assets/images/hero-shigorikon.webp');
}

.shigorikon-page h1 {
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.shigorikon-page .section-title {
  border-left-color: #009688;
}

.shigorikon-page .intro-card {
  border-top: 5px solid #009688;
}

.highlight-box {
  margin-top: 2rem;
  box-shadow: 0 4px 6px rgba(0, 150, 136, 0.1);
}

.pain-points-list li {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.pain-points-list li:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.icon-card {
  text-align: center;
  background: #fff;
  padding: 30px 20px;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  border-bottom: 4px solid #4caf50;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.icon-circle {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.2rem;
  margin: 0 auto 15px;
}

.timeline-v2-item .t-v2-icon {
  background: #80cbc4;
  /* Teal accent */
  color: #fff;
}

/* Button Customization for this page */
.shigorikon-page .btn-secondary {
  background: #fff;
  color: var(--color-main);
  border: 2px solid var(--color-main);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.shigorikon-page .btn-secondary:hover {
  background: var(--color-bg-light);
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.shigorikon-page .btn-primary {
  background: linear-gradient(135deg, #009688 0%, #004d40 100%) !important;
  box-shadow: 0 4px 15px rgba(0, 150, 136, 0.4);
}

.shigorikon-page .btn-primary:hover {
  filter: brightness(1.1);
  box-shadow: 0 6px 20px rgba(0, 150, 136, 0.5);
}

/* ========================================
   Service Page: Bar Association Inquiry (Shoukai Chosha)
   ======================================== */
.chosha-page .page-hero--chosha {
  background-image: url('assets/images/hero-chosha.webp');
}

.chosha-page .section-title {
  border-left-color: #1a237e;
}

.chosha-page .intro-card {
  border-top: 5px solid #1a237e;
}

/* Reusing highlight-box and card styles from shigo-rikon but with overrides if needed */
.chosha-page .highlight-box {
  background: #e8eaf6;
  border-left-color: #1a237e;
  box-shadow: 0 4px 6px rgba(26, 35, 126, 0.1);
}

.chosha-page .highlight-box h3 {
  color: #1a237e;
}

/* Timeline Override */
.chosha-page .timeline-v2-item .t-v2-icon {
  background: #3949ab;
  /* Indigo accent */
}

/* Button Customization for this page */
.chosha-page .btn-secondary {
  background: #fff;
  color: var(--color-main);
  border: 2px solid var(--color-main);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.chosha-page .btn-secondary:hover {
  background: var(--color-bg-light);
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.chosha-page .btn-primary {
  background: linear-gradient(135deg, #1a237e 0%, #0d47a1 100%) !important;
  box-shadow: 0 4px 15px rgba(26, 35, 126, 0.4);
}

.chosha-page .btn-primary:hover {
  filter: brightness(1.2);
  box-shadow: 0 6px 20px rgba(26, 35, 126, 0.5);
}

/* ========================================
   Service Page: Special Authority (Special Representative)
   ======================================== */
.special-auth-page .page-hero--special-auth {
  background-image: url('assets/images/hero-special-auth.webp');
}

.special-auth-page .section-title {
  border-left-color: #ef6c00;
}

.special-auth-page .intro-card {
  border-top: 5px solid #ef6c00;
}

.special-auth-page .highlight-box {
  background: #fff3e0;
  border-left-color: #ef6c00;
  box-shadow: 0 4px 6px rgba(239, 108, 0, 0.1);
}

.special-auth-page .highlight-box h3 {
  color: #e65100;
}

/* Timeline Override */
.special-auth-page .timeline-v2-item .t-v2-icon {
  background: #ff9800;
  /* Orange accent */
}

/* Button Customization */
.special-auth-page .btn-secondary {
  background: #fff;
  color: var(--color-main);
  border: 2px solid var(--color-main);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.special-auth-page .btn-secondary:hover {
  background: var(--color-bg-light);
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.special-auth-page .btn-primary {
  background: linear-gradient(135deg, #ef6c00 0%, #e65100 100%) !important;
  box-shadow: 0 4px 15px rgba(230, 81, 0, 0.4);
}

.special-auth-page .btn-primary:hover {
  filter: brightness(1.1);
  box-shadow: 0 6px 20px rgba(230, 81, 0, 0.5);
}

/* Icon Card Circle Override */
.special-auth-page .icon-circle {
  background: #ffcc80 !important;
  color: #e65100 !important;
}

/* ========================================
   Service Page: Adopted Child (Adoption & Inheritance)
   ======================================== */
.adopted-page .page-hero--adopted {
  background-image: url('assets/images/hero-adopted.webp');
}

.adopted-page .section-title {
  border-left-color: #66bb6a;
}

.adopted-page .intro-card {
  border-top: 5px solid #66bb6a;
}

.adopted-page .highlight-box {
  background: #e8f5e9;
  border-left-color: #66bb6a;
  box-shadow: 0 4px 6px rgba(102, 187, 106, 0.1);
}

.adopted-page .highlight-box h3 {
  color: #2e7d32;
}

/* Timeline Override */
.adopted-page .timeline-v2-item .t-v2-icon {
  background: #66bb6a;
  /* Green accent */
}

/* Button Customization */
.adopted-page .btn-secondary {
  background: #fff;
  color: var(--color-main);
  border: 2px solid var(--color-main);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.adopted-page .btn-secondary:hover {
  background: var(--color-bg-light);
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.adopted-page .btn-primary {
  background: linear-gradient(135deg, #66bb6a 0%, #43a047 100%) !important;
  box-shadow: 0 4px 15px rgba(56, 142, 60, 0.4);
}

.adopted-page .btn-primary:hover {
  filter: brightness(1.1);
  box-shadow: 0 6px 20px rgba(56, 142, 60, 0.5);
}

/* Icon Card Circle Override */
.adopted-page .icon-circle {
  background: #ffcc80 !important;
  color: #e65100 !important;
}

/* ========================================
   Service Page: Real Estate Shared Ownership (Kyoyu)
   ======================================== */
.kyoyu-page .page-hero--kyoyu {
  background-image: url('assets/images/hero-kyoyu.webp');
}

.kyoyu-page .section-title {
  border-left-color: #607d8b;
}

.kyoyu-page .intro-card {
  border-top: 5px solid #607d8b;
}

.kyoyu-page .highlight-box {
  background: #eceff1;
  border-left-color: #607d8b;
  box-shadow: 0 4px 6px rgba(96, 125, 139, 0.1);
}

.kyoyu-page .highlight-box h3 {
  color: #455a64;
}

/* Timeline Override */
.kyoyu-page .timeline-v2-item .t-v2-icon {
  background: #607d8b;
  /* Blue Grey accent */
}

/* Button Customization */
.kyoyu-page .btn-secondary {
  background: #fff;
  color: var(--color-main);
  border: 2px solid var(--color-main);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.kyoyu-page .btn-secondary:hover {
  background: var(--color-bg-light);
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.kyoyu-page .btn-primary {
  background: linear-gradient(135deg, #607d8b 0%, #455a64 100%) !important;
  box-shadow: 0 4px 15px rgba(69, 90, 100, 0.4);
}

.kyoyu-page .btn-primary:hover {
  filter: brightness(1.1);
  box-shadow: 0 6px 20px rgba(69, 90, 100, 0.5);
}

/* Icon Card Circle Override */
.kyoyu-page .icon-circle {
  background: #cfd8dc !important;
  color: #455a64 !important;
}

/* ========================================
   Service Page: Inheritance Status Litigation (Status)
   ======================================== */
.status-page .page-hero--status {
  background-image: url('assets/images/hero-status.webp');
}

.status-page .section-title {
  border-left-color: #1a237e;
}

.status-page .intro-card {
  border-top: 5px solid #1a237e;
}

.status-page .highlight-box {
  background: #e8eaf6;
  border-left-color: #1a237e;
  box-shadow: 0 4px 6px rgba(26, 35, 126, 0.1);
}

.status-page .highlight-box h3 {
  color: #1a237e;
}

/* Timeline Override */
.status-page .timeline-v2-item .t-v2-icon {
  background: #1a237e;
  /* Deep Navy accent */
}

/* Button Customization */
.status-page .btn-secondary {
  background: #fff;
  color: var(--color-main);
  border: 2px solid var(--color-main);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.status-page .btn-secondary:hover {
  background: var(--color-bg-light);
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.status-page .btn-primary {
  background: linear-gradient(135deg, #1a237e 0%, #0d47a1 100%) !important;
  box-shadow: 0 4px 15px rgba(26, 35, 126, 0.4);
}

.status-page .btn-primary:hover {
  filter: brightness(1.2);
  /* Slightly brighter for navy */
  box-shadow: 0 6px 20px rgba(26, 35, 126, 0.5);
}

/* Icon Card Circle Override */
.status-page .icon-circle {
  background: #ffd700 !important;
  color: #1a237e !important;
}

/* ========================================
   Service Page: Heirs Disqualification and Disinheritance (Kekkaku)
   ======================================== */
.kekkaku-page .page-hero--kekkaku {
  background-image: url('assets/images/hero-kekkaku.webp');
}

.kekkaku-page .section-title {
  border-left-color: #6b111a;
}

.kekkaku-page .intro-card {
  border-top: 5px solid #6b111a;
}

.kekkaku-page .highlight-box {
  background: #fdf5f6;
  border-left-color: #6b111a;
  box-shadow: 0 4px 6px rgba(107, 17, 26, 0.1);
}

.kekkaku-page .highlight-box h3 {
  color: #6b111a;
}

/* Timeline Override */
.kekkaku-page .timeline-v2-item .t-v2-icon {
  background: #6b111a;
  /* Burgundy accent */
}

/* Button Customization */
.kekkaku-page .btn-secondary {
  background: #fff;
  color: var(--color-main);
  border: 2px solid var(--color-main);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.kekkaku-page .btn-secondary:hover {
  background: var(--color-bg-light);
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.kekkaku-page .btn-primary {
  background: linear-gradient(135deg, #6b111a 0%, #4a0b12 100%) !important;
  box-shadow: 0 4px 15px rgba(107, 17, 26, 0.4);
}

.kekkaku-page .btn-primary:hover {
  filter: brightness(1.2);
  box-shadow: 0 6px 20px rgba(107, 17, 26, 0.5);
}

/* Icon Card Circle Override */
.kekkaku-page .icon-circle {
  background: #e0e0e0 !important;
  color: #6b111a !important;
}

/* ========================================
   Service Page: Land Evaluation (Land Eval)
   ======================================== */
.land-eval-page .page-hero--land-eval {
  background-image: url('assets/images/hero-land-eval.webp');
}

.land-eval-page .section-title {
  border-left-color: #2e7d32;
}

.land-eval-page .intro-card {
  border-top: 5px solid #2e7d32;
}

.land-eval-page .highlight-box {
  background: #f1f8e9;
  border-left-color: #2e7d32;
  box-shadow: 0 4px 6px rgba(46, 125, 50, 0.1);
}

.land-eval-page .highlight-box h3 {
  color: #2e7d32;
}

/* Timeline Override */
.land-eval-page .timeline-v2-item .t-v2-icon {
  background: #2e7d32;
  /* Forest Green accent */
}

/* Button Customization */
.land-eval-page .btn-secondary {
  background: #fff;
  color: var(--color-main);
  border: 2px solid var(--color-main);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.land-eval-page .btn-secondary:hover {
  background: var(--color-bg-light);
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.land-eval-page .btn-primary {
  background: linear-gradient(135deg, #2e7d32 0%, #1b5e20 100%) !important;
  box-shadow: 0 4px 15px rgba(46, 125, 50, 0.4);
}

.land-eval-page .btn-primary:hover {
  filter: brightness(1.2);
  box-shadow: 0 6px 20px rgba(46, 125, 50, 0.5);
}

/* Icon Card Circle Override */
.land-eval-page .icon-circle {
  background: #bcaaa4 !important;
  color: #3e2723 !important;
}

/* ========================================
   Service Page: Memento Dispute (Memento)
   ======================================== */
.memento-page .page-hero--memento {
  background-image: url('assets/images/hero-memento.webp');
}

.memento-page .section-title {
  border-left-color: #8d6e63;
}

.memento-page .intro-card {
  border-top: 5px solid #8d6e63;
}

.memento-page .highlight-box {
  background: #fdfaf6;
  border-left-color: #8d6e63;
  box-shadow: 0 4px 6px rgba(141, 110, 99, 0.1);
}

.memento-page .highlight-box h3 {
  color: #5d4037;
}

/* Timeline Override */
.memento-page .timeline-v2-item .t-v2-icon {
  background: #8d6e63;
  /* Warm Terracotta accent */
}

/* Button Customization */
.memento-page .btn-secondary {
  background: #fff;
  color: var(--color-main);
  border: 2px solid var(--color-main);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.memento-page .btn-secondary:hover {
  background: var(--color-bg-light);
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.memento-page .btn-primary {
  background: linear-gradient(135deg, #8d6e63 0%, #5d4037 100%) !important;
  box-shadow: 0 4px 15px rgba(141, 110, 99, 0.4);
}

.memento-page .btn-primary:hover {
  filter: brightness(1.15);
  box-shadow: 0 6px 20px rgba(141, 110, 99, 0.5);
}

/* Icon Card Circle Override */
.memento-page .icon-circle {
  background: #d7ccc8 !important;
  color: #4e342e !important;
}

/* ========================================
   Service Page: Mistake Invalidity (Invalidity)
   ======================================== */
.invalidity-page .page-hero--invalidity {
  background-image: url('assets/images/hero-invalidity.webp');
}

.invalidity-page .section-title {
  border-left-color: #00695c;
}

.invalidity-page .intro-card {
  border-top: 5px solid #00695c;
}

.invalidity-page .highlight-box {
  background: #eef2f5;
  border-left-color: #00695c;
  box-shadow: 0 4px 6px rgba(0, 105, 92, 0.1);
}

.invalidity-page .highlight-box h3 {
  color: #004d40;
}

/* Timeline Override */
.invalidity-page .timeline-v2-item .t-v2-icon {
  background: #00695c;
  /* Deep Teal accent */
}

/* Button Customization */
.invalidity-page .btn-secondary {
  background: #fff;
  color: var(--color-main);
  border: 2px solid var(--color-main);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.invalidity-page .btn-secondary:hover {
  background: var(--color-bg-light);
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.invalidity-page .btn-primary {
  background: linear-gradient(135deg, #00695c 0%, #004d40 100%) !important;
  box-shadow: 0 4px 15px rgba(0, 105, 92, 0.4);
}

.invalidity-page .btn-primary:hover {
  filter: brightness(1.2);
  box-shadow: 0 6px 20px rgba(0, 105, 92, 0.5);
}

/* Icon Card Circle Override */
.invalidity-page .icon-circle {
  background: #e0f2f1 !important;
  color: #004d40 !important;
}

/* ========================================
   Service Page: Special Rights (Special Rights)
   ======================================== */
.special-rights-page .page-hero--special-rights {
  background-image: url('assets/images/hero-special-rights.webp');
}

.special-rights-page .section-title {
  border-left-color: #1565c0;
}

.special-rights-page .intro-card {
  border-top: 5px solid #1565c0;
}

.special-rights-page .highlight-box {
  background: #f5f7fa;
  border-left-color: #1565c0;
  box-shadow: 0 4px 6px rgba(21, 101, 192, 0.1);
}

.special-rights-page .highlight-box h3 {
  color: #0d47a1;
}

/* Timeline Override */
.special-rights-page .timeline-v2-item .t-v2-icon {
  background: #1565c0;
  /* Royal Blue accent */
}

/* Button Customization */
.special-rights-page .btn-secondary {
  background: #fff;
  color: var(--color-main);
  border: 2px solid var(--color-main);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.special-rights-page .btn-secondary:hover {
  background: var(--color-bg-light);
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.special-rights-page .btn-primary {
  background: linear-gradient(135deg, #1565c0 0%, #0d47a1 100%) !important;
  box-shadow: 0 4px 15px rgba(21, 101, 192, 0.4);
}

.special-rights-page .btn-primary:hover {
  filter: brightness(1.15);
  box-shadow: 0 6px 20px rgba(21, 101, 192, 0.5);
}

/* Icon Card Circle Override */
.special-rights-page .icon-circle {
  background: #e3f2fd !important;
  color: #0d47a1 !important;
}

/* ========================================
   Service Page: Successive Inheritance (Successive)
   ======================================== */
.successive-page .page-hero--successive {
  background-image: url('assets/images/hero-successive.webp');
}

.successive-page .section-title {
  border-left-color: #283593;
}

.successive-page .intro-card {
  border-top: 5px solid #283593;
}

.successive-page .highlight-box {
  background: #e8eaf6;
  border-left-color: #283593;
  box-shadow: 0 4px 6px rgba(40, 53, 147, 0.1);
}

.successive-page .highlight-box h3 {
  color: #1a237e;
}

/* Timeline Override */
.successive-page .timeline-v2-item .t-v2-icon {
  background: #283593;
  /* Deep Indigo accent */
}

/* Button Customization */
.successive-page .btn-secondary {
  background: #fff;
  color: var(--color-main);
  border: 2px solid var(--color-main);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.successive-page .btn-secondary:hover {
  background: var(--color-bg-light);
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.successive-page .btn-primary {
  background: linear-gradient(135deg, #283593 0%, #1a237e 100%) !important;
  box-shadow: 0 4px 15px rgba(40, 53, 147, 0.4);
}

.successive-page .btn-primary:hover {
  filter: brightness(1.2);
  box-shadow: 0 6px 20px rgba(40, 53, 147, 0.5);
}

/* Icon Card Circle Override */
.successive-page .icon-circle {
  background: #e8eaf6 !important;
  color: #1a237e !important;
}

/* ========================================
   Service Page: Tax Correction (Tax Correction)
   ======================================== */
.tax-correction-page .page-hero--tax-correction {
  background-image: url('assets/images/hero-tax-correction.webp');
}

.tax-correction-page .section-title {
  border-left-color: #2e7d32;
}

.tax-correction-page .intro-card {
  border-top: 5px solid #2e7d32;
}

.tax-correction-page .highlight-box {
  background: #e8f5e9;
  border-left-color: #2e7d32;
  box-shadow: 0 4px 6px rgba(46, 125, 50, 0.1);
}

.tax-correction-page .highlight-box h3 {
  color: #1b5e20;
}

/* Timeline Override */
.tax-correction-page .timeline-v2-item .t-v2-icon {
  background: #2e7d32;
  /* Forest Green accent */
}

/* Button Customization */
.tax-correction-page .btn-secondary {
  background: #fff;
  color: var(--color-main);
  border: 2px solid var(--color-main);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.tax-correction-page .btn-secondary:hover {
  background: var(--color-bg-light);
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.tax-correction-page .btn-primary {
  background: linear-gradient(135deg, #2e7d32 0%, #1b5e20 100%) !important;
  box-shadow: 0 4px 15px rgba(46, 125, 50, 0.4);
}

.tax-correction-page .btn-primary:hover {
  filter: brightness(1.15);
  box-shadow: 0 6px 20px rgba(46, 125, 50, 0.5);
}

/* Icon Card Circle Override */
.tax-correction-page .icon-circle {
  background: #e8f5e9 !important;
  color: #1b5e20 !important;
}

/* ========================================
   Service Page: Vacant House (Vacant House)
   ======================================== */
.vacant-house-page .page-hero--vacant-house {
  background-image: url('assets/images/hero-vacant-house.webp');
}

.vacant-house-page .section-title {
  border-left-color: #d84315;
}

.vacant-house-page .intro-card {
  border-top: 5px solid #d84315;
}

.vacant-house-page .highlight-box {
  background: #fbe9e7;
  border-left-color: #d84315;
  box-shadow: 0 4px 6px rgba(216, 67, 21, 0.1);
}

.vacant-house-page .highlight-box h3 {
  color: #bf360c;
}

/* Timeline Override */
.vacant-house-page .timeline-v2-item .t-v2-icon {
  background: #d84315;
  /* Warm Terracotta accent */
}

/* Button Customization */
.vacant-house-page .btn-secondary {
  background: #fff;
  color: var(--color-main);
  border: 2px solid var(--color-main);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.vacant-house-page .btn-secondary:hover {
  background: var(--color-bg-light);
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.vacant-house-page .btn-primary {
  background: linear-gradient(135deg, #d84315 0%, #bf360c 100%) !important;
  box-shadow: 0 4px 15px rgba(216, 67, 21, 0.4);
}

.vacant-house-page .btn-primary:hover {
  filter: brightness(1.15);
  box-shadow: 0 6px 20px rgba(216, 67, 21, 0.5);
}

/* Icon Card Circle Override */
.vacant-house-page .icon-circle {
  background: #fbe9e7 !important;
  color: #bf360c !important;
}

/* ========================================
   Service Page: Will Probate (Will Probate)
   ======================================== */
.will-probate-page .page-hero--will-probate {
  background-image: url('assets/images/hero-will-probate.webp');
}

.will-probate-page .section-title {
  border-left-color: #4a148c;
}

.will-probate-page .intro-card {
  border-top: 5px solid #4a148c;
}

.will-probate-page .highlight-box {
  background: #f3e5f5;
  border-left-color: #4a148c;
  box-shadow: 0 4px 6px rgba(74, 20, 140, 0.1);
}

.will-probate-page .highlight-box h3 {
  color: #311b92;
}

/* Timeline Override */
.will-probate-page .timeline-v2-item .t-v2-icon {
  background: #4a148c;
  /* Royal Purple accent */
}

/* Button Customization */
.will-probate-page .btn-secondary {
  background: #fff;
  color: var(--color-main);
  border: 2px solid var(--color-main);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.will-probate-page .btn-secondary:hover {
  background: var(--color-bg-light);
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.will-probate-page .btn-primary {
  background: linear-gradient(135deg, #4a148c 0%, #311b92 100%) !important;
  box-shadow: 0 4px 15px rgba(74, 20, 140, 0.4);
}

.will-probate-page .btn-primary:hover {
  filter: brightness(1.2);
  box-shadow: 0 6px 20px rgba(74, 20, 140, 0.5);
}

/* Icon Card Circle Override */
.will-probate-page .icon-circle {
  background: #f3e5f5 !important;
  color: #4a148c !important;
}

/* ========================================
   Service Page: Will Storage (Will Storage System)
   ======================================== */
.will-storage-page .page-hero--will-storage {
  background-image: url('assets/images/hero-will-storage.webp');
}

.will-storage-page .section-title {
  border-left-color: #1565c0;
}

.will-storage-page .intro-card {
  border-top: 5px solid #1565c0;
}

.will-storage-page .highlight-box {
  background: #f0f4f8;
  border-left-color: #1565c0;
  box-shadow: 0 4px 6px rgba(21, 101, 192, 0.1);
}

.will-storage-page .highlight-box h3 {
  color: #0d47a1;
}

/* Timeline Override */
.will-storage-page .timeline-v2-item .t-v2-icon {
  background: #1565c0;
  /* Trust Blue accent */
}

/* Button Customization */
.will-storage-page .btn-secondary {
  background: #fff;
  color: var(--color-main);
  border: 2px solid var(--color-main);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.will-storage-page .btn-secondary:hover {
  background: var(--color-bg-light);
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.will-storage-page .btn-primary {
  background: linear-gradient(135deg, #1565c0 0%, #0d47a1 100%) !important;
  box-shadow: 0 4px 15px rgba(21, 101, 192, 0.4);
}

.will-storage-page .btn-primary:hover {
  filter: brightness(1.2);
  box-shadow: 0 6px 20px rgba(21, 101, 192, 0.5);
}

/* Icon Card Circle Override */
.will-storage-page .icon-circle {
  background: #f0f4f8 !important;
  color: #1565c0 !important;
}

/* ========================================
   Inheritance Starting Point Flow 
   ======================================== */
.starting-point-flow {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin: 30px 0;
}

.sp-card {
  background: var(--color-white, #ffffff);
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 25px 20px;
  flex: 1;
  text-align: center;
  box-shadow: var(--shadow-sm);
  position: relative;
  transition: transform 0.3s ease;
}

.sp-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-accent);
}

.sp-badge {
  background: var(--color-main);
  color: white;
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: bold;
  margin-bottom: 15px;
}

.sp-title {
  color: var(--color-main);
  font-size: 1.05rem;
  font-weight: bold;
  margin-bottom: 15px;
  line-height: 1.4;
}

.sp-event {
  font-size: 0.95rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg-secondary);
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 15px;
}

.sp-arrow {
  font-size: 1.5rem;
  color: var(--color-accent);
  margin-bottom: 15px;
  font-weight: bold;
}

.sp-result {
  font-size: 1.05rem;
  color: var(--color-cta);
  background: #fff9f5;
  padding: 15px 10px;
  border-radius: 8px;
  border: 1px dashed var(--color-cta);
}

@media (max-width: 900px) {
  .starting-point-flow {
    flex-direction: column;
  }

  .sp-event {
    min-height: auto;
  }
}

/* ========================================
   Inheritance Risk Grid
   ======================================== */
.risk-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 25px;
  margin: 40px 0;
}

.risk-card {
  background: var(--color-white, #ffffff);
  border-top: 5px solid var(--color-cta, #D35400);
  border-radius: 12px;
  padding: 30px;
  box-shadow: var(--shadow-md);
  transition: transform 0.3s ease;
  position: relative;
  overflow: hidden;
}

.risk-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.risk-card::before {
  content: '⚠️';
  position: absolute;
  top: -15px;
  right: -15px;
  font-size: 6rem;
  opacity: 0.04;
  pointer-events: none;
}

.risk-title {
  font-size: 1.25rem;
  color: var(--color-cta, #D35400);
  font-weight: 800;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.risk-title i {
  font-style: normal;
}

.risk-desc {
  font-size: 0.95rem;
  color: var(--color-text-primary);
  line-height: 1.7;
}

.risk-highlight {
  background: #fff5f0;
  color: var(--color-cta, #D35400);
  padding: 10px;
  border-radius: 6px;
  font-weight: bold;
  font-size: 0.95rem;
  margin-top: 20px;
  text-align: center;
}

@media (max-width: 768px) {
  .risk-grid {
    grid-template-columns: 1fr;
  }
}

/* ========================================
   Statutory Inheritance Simulator
   ======================================== */
.simulator-box {
  background: #fff;
  border-radius: 12px;
  padding: 30px;
  margin-top: 20px;
  margin-bottom: 40px;
  border: 1px solid #e2e8f0;
}

.simulator-box.shadow-card {
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

.sim-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
  border-bottom: 1px dashed #e2e8f0;
  gap: 15px;
  flex-wrap: wrap;
}

.sim-row:last-child {
  border-bottom: none;
}

.sim-row label {
  font-weight: bold;
  color: #334155;
  min-width: 150px;
}

.toggle-group,
.number-control {
  display: flex;
  align-items: center;
}

.input-group input[type="number"] {
  width: 150px;
  padding: 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: bold;
  text-align: right;
  margin-right: 10px;
  outline: none;
  transition: border-color 0.2s;
}

.input-group input[type="number"]:focus {
  border-color: var(--color-main);
  box-shadow: 0 0 0 3px rgba(0, 64, 112, 0.1);
}

.unit {
  font-size: 1rem;
  color: #64748b;
  font-weight: bold;
}

.toggle-btn {
  display: inline-block;
  cursor: pointer;
}

.toggle-btn input[type="radio"] {
  display: none;
}

.toggle-btn span {
  display: inline-block;
  padding: 10px 25px;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #475569;
  font-weight: bold;
  transition: transform 0.2s, opacity 0.2s, background-color 0.2s, border-color 0.2s, box-shadow 0.2s, color 0.2s;
  position: relative;
}

.toggle-btn:first-child span {
  border-radius: 8px 0 0 8px;
}

.toggle-btn:last-child span {
  border-radius: 0 8px 8px 0;
  margin-left: -1px;
}

.toggle-btn input[type="radio"]:checked+span {
  background: var(--color-main);
  color: #fff;
  border-color: var(--color-main);
  z-index: 1;
}

.number-control {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.num-btn {
  width: 40px;
  height: 44px;
  background: #f8fafc;
  border: none;
  font-size: 1.2rem;
  color: #475569;
  cursor: pointer;
  transition: background 0.2s;
  display: flex;
  justify-content: center;
  align-items: center;
}

.num-btn:hover {
  background: #e2e8f0;
}

.num-btn:disabled,
.number-control input:disabled {
  background: #f1f5f9;
  color: #94a3b8;
  cursor: not-allowed;
}

.number-control input[type="number"] {
  width: 60px;
  height: 44px;
  border: none;
  border-left: 1px solid #cbd5e1;
  border-right: 1px solid #cbd5e1;
  text-align: center;
  font-size: 1.1rem;
  font-weight: bold;
  color: #334155;
  -moz-appearance: textfield;
  appearance: textfield;
}

.number-control input::-webkit-outer-spin-button,
.number-control input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
}

.sim-row.disabled label {
  color: #94a3b8;
}

.sim-results {
  margin-top: 30px;
  padding: 25px;
  background: #f8fafc;
  border-radius: 12px;
  border-left: 5px solid var(--color-accent);
}

.result-title {
  margin-top: 0;
  margin-bottom: 20px;
  font-size: 1.3rem;
  color: #1e293b;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 10px;
}

.result-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
  border-bottom: 1px solid #e2e8f0;
}

.result-item:last-child {
  border-bottom: none;
}

.result-name {
  font-weight: bold;
  font-size: 1.1rem;
  color: #334155;
  display: flex;
  align-items: center;
  gap: 10px;
}

.result-share {
  font-size: 0.9rem;
  color: #64748b;
  background: #e2e8f0;
  padding: 3px 8px;
  border-radius: 4px;
}

.result-amount {
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--color-main);
}

.sim-note {
  margin-top: 20px;
  font-size: 0.85rem;
  color: #64748b;
  line-height: 1.6;
}

@media (max-width: 768px) {
  .sim-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .input-group input[type="number"] {
    width: 200px;
  }

  .sim-row label {
    margin-bottom: 5px;
  }

  .result-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}




/* ========================================
   Mobile Accordion Nav
   ======================================== */
.sp-accordion {
  width: 100%;
  border-bottom: 1px solid #eee;
}

.sp-accordion-btn {
  width: 100%;
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  background: none;
  border: none;
  padding: 10px 0;
  color: var(--color-main);
  font-weight: bold;
  font-size: 1.2rem;
  text-align: left;
  cursor: pointer;
  position: relative;
  font-family: 'Noto Sans JP', sans-serif;
  text-decoration: none;
}

.sp-accordion-btn small {
  font-size: 0.70rem;
  color: #94a3b8;
  margin-left: 10px;
  font-family: Arial, sans-serif;
}

.sp-accordion-btn::after {
  content: '+';
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
  color: #94a3b8;
  transition: transform 0.3s;
  font-weight: 300;
}

.sp-accordion-btn.is-open::after {
  content: '-';
}

.sp-accordion-content {
  display: none;
  flex-direction: column;
  background: #f8fafc;
  padding: 10px 15px;
  border-radius: 4px;
  margin-bottom: 10px;
}

.sp-accordion-content.is-open {
  display: flex;
}

.sp-accordion-content a {
  display: block;
  padding: 12px 10px;
  color: #475569;
  text-decoration: none;
  border-bottom: 1px dashed #cbd5e1;
  font-size: 0.95rem;
  position: relative;
}

.sp-accordion-content a:last-child {
  border-bottom: none;
}

.sp-accordion-content a::before {
  content: '・';
  color: var(--color-main);
  margin-right: 5px;
}

/* ========================================
   Phase 16: LP Search Modal
   ======================================== */
.search-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(20, 30, 40, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 99999;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  opacity: 0;
  visibility: hidden;
  transition: transform 0.3s, opacity 0.3s, background-color 0.3s, border-color 0.3s, box-shadow 0.3s, color 0.3s ease;
  overflow-y: auto;
  padding: 40px 20px;
}

.search-modal-overlay.is-active {
  opacity: 1;
  visibility: visible;
}

.search-modal-container {
  background: var(--color-white);
  width: 100%;
  max-width: 800px;
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  position: relative;
  transform: translateY(-20px);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.search-modal-overlay.is-active .search-modal-container {
  transform: translateY(0);
}

.search-modal-close {
  position: absolute;
  top: 15px;
  right: 20px;
  background: none;
  border: none;
  font-size: 28px;
  color: #999;
  cursor: pointer;
  z-index: 10;
  transition: color 0.2s;
}

.search-modal-close:hover {
  color: var(--color-accent);
}

.search-modal-header {
  padding: 30px 40px 20px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.search-modal-header h2 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--color-main);
  margin-bottom: 15px;
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 15px;
  font-style: normal;
  font-size: 1.2rem;
  color: #94a3b8;
}

#lp-search-input {
  width: 100%;
  padding: 16px 45px 16px 45px;
  font-size: 1.1rem;
  border: 2px solid #cbd5e1;
  border-radius: 8px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

#lp-search-input:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(192, 164, 123, 0.2);
}

.search-clear-btn {
  position: absolute;
  right: 15px;
  background: none;
  border: none;
  font-size: 20px;
  color: #94a3b8;
  cursor: pointer;
  padding: 0;
}

.search-modal-body {
  padding: 0;
  max-height: 60vh;
  overflow-y: auto;
}

.search-results-count {
  padding: 15px 40px 0;
  font-size: 0.9rem;
  color: #64748b;
  font-weight: bold;
}

.search-results-list {
  list-style: none;
  padding: 15px 20px 30px;
  margin: 0;
}

.search-empty-state {
  text-align: center;
  padding: 40px 20px;
  color: #94a3b8;
  font-size: 1rem;
}

.search-result-item {
  border-radius: 8px;
  margin-bottom: 8px;
  transition: background 0.2s;
}

.search-result-item:hover {
  background: #f1f5f9;
}

.search-result-link {
  display: block;
  padding: 15px 20px;
  text-decoration: none;
  color: inherit;
}

.search-result-category {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-accent);
  margin-bottom: 5px;
}

.search-result-title {
  font-size: 1.1rem;
  color: var(--color-main);
  font-weight: bold;
  margin-bottom: 8px;
}

.search-result-title mark,
.search-result-tags span mark {
  background: rgba(192, 164, 123, 0.3);
  color: var(--color-main);
  padding: 0 2px;
  border-radius: 2px;
}

.search-result-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.search-result-tags span {
  font-size: 0.75rem;
  background: #e2e8f0;
  color: #475569;
  padding: 2px 8px;
  border-radius: 4px;
}

@media (max-width: 768px) {
  .search-modal-overlay {
    padding: 20px 10px;
  }

  .search-modal-header {
    padding: 20px;
  }

  .search-results-count {
    padding: 15px 20px 0;
  }

  .search-results-list {
    padding: 10px;
  }
}

/* Header UI Overrides */
.header-search-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  color: var(--color-main);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.3s;
  padding: 8px 12px;
  border-radius: 6px;
}

.header-search-btn:hover {
  color: var(--color-accent);
  background: rgba(192, 164, 123, 0.1);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 15px;
}

@media (max-width: 1000px) {
  .header-search-btn.sp-only {
    display: flex;
    font-size: 1.2rem;
    padding: 8px;
    background: none;
    border: none;
    color: var(--color-main);
  }
}

/* ========================================
   UX Animations (Tilt, Glow) & Subpage Specifics
   ======================================== */
.tilt-card {
  transition: transform 0.1s ease-out;
}

.stagger-item {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.stagger-item.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ========================================
   Phase 3: Step-by-Step Form Styles
   ======================================== */
.step-form-wrapper {
  transition: min-height 0.4s ease;
  position: relative;
  z-index: 10;
  scroll-margin-top: 140px;
}

.step-indicator {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #eee;
  color: #999;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  position: relative;
  z-index: 2;
  transition: all 0.4s ease;
}

.step-indicator.active {
  background: var(--color-accent);
  color: #fff;
  box-shadow: 0 0 10px rgba(197, 160, 89, 0.5);
  transform: scale(1.1);
}

.step-indicator.completed {
  background: var(--color-main);
  color: #fff;
}

.form-step {
  animation: fadeUp 0.5s ease;
}

@keyframes fadeUp {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 15px;
}

.category-btn {
  cursor: pointer;
  display: block;
}

.category-btn .hidden-radio {
  display: none;
}

.category-content {
  background: #f8f9fa;
  border: 2px solid transparent;
  border-radius: 12px;
  padding: 20px 15px;
  text-align: center;
  transition: all 0.3s ease;
  font-weight: bold;
  color: #444;
}

.category-btn:hover .category-content {
  background: #fff;
  border-color: var(--color-accent-soft);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transform: translateY(-2px);
}

.category-btn .hidden-radio:checked+.category-content {
  background: var(--color-bg-light);
  border-color: var(--color-accent);
  color: var(--color-main);
  box-shadow: 0 4px 15px rgba(197, 160, 89, 0.2);
}

.confirm-box span {
  font-size: 1.05rem;
  color: var(--color-main);
  display: block;
  margin-top: 5px;
  margin-bottom: 15px;
}

/* ========================================
   Phase 3: Interactive Family Tree Styles
   ======================================== */
.ft-btn {
  border-radius: 20px;
  padding: 8px 16px;
  font-size: 0.9rem;
  background: #f8f9fa;
  border-color: #cbd5e1;
  color: #475569;
  transition: all 0.3s ease;
}

.ft-btn:hover {
  background: #e2e8f0;
}

.ft-btn.active {
  background: var(--color-main);
  color: #fff;
  border-color: var(--color-main);
  box-shadow: 0 4px 10px rgba(107, 78, 49, 0.3);
}

.ft-path {
  transition: stroke 0.5s ease;
}

.ft-node-group {
  transition: all 0.5s ease;
  cursor: pointer;
}

.ft-node-group circle {
  transition: all 0.5s ease;
}

.ft-node-group.active circle.node-bg {
  stroke: var(--color-accent);
  stroke-width: 4;
  filter: url(#glow);
}

.ft-node-group.active text {
  fill: var(--color-main);
}

.ft-node-group .node-ratio {
  transition: opacity 0.5s ease, transform 0.5s ease;
  transform: translateY(10px);
}

.ft-node-group.active .node-ratio {
  opacity: 1;
  transform: translateY(0);
}

.animated-arrow {
  transition: opacity 0.3s ease;
}

.animated-arrow.active {
  opacity: 1;
  animation: dashDrive 1.5s linear forwards;
  /* Run once and stay */
}

@keyframes dashDrive {
  to {
    stroke-dashoffset: 0;
  }
}

/* -------------------------------------
   Gamified Risk Diagnosis (Phase 4)
   ------------------------------------- */

.risk-diag-btn {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 15px;
  background: #fff;
  border: 2px solid #e1e8f0;
  border-radius: 12px;
  padding: 18px 25px;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-dark);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
  width: 100%;
}

.risk-diag-btn .icon {
  font-size: 1.5rem;
}

.risk-diag-btn:hover {
  transform: translateY(-2px);
  border-color: var(--color-accent);
  box-shadow: 0 8px 15px rgba(243, 156, 18, 0.15);
  background-color: #fdfaf6;
}

.risk-diag-btn:active {
  transform: translateY(1px);
}

.risk-diag-step {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  visibility: hidden;
  opacity: 0;
  transform: translateX(50px);
  pointer-events: none;
  transition: all 0.4s ease;
}

.risk-diag-step.is-active {
  position: relative;
  visibility: visible;
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

/* Simulator is-disabled state */
.sim-form-group.is-disabled {
  opacity: 0.5;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

/* ========================================
   UX & Gamification Enhancements
   ======================================== */

/* Diagnosis Quiz Styles */
#diagnosis-quiz-container {
  max-width: 700px;
  margin: 40px auto;
}

.quiz-card,
.quiz-result-card {
  background: #fff;
  border-radius: 24px;
  padding: 40px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08);
  /* Using raw value for safety */
  border: 1px solid rgba(0, 0, 0, 0.05);
  text-align: center;
}

.quiz-progress-bar {
  height: 6px;
  background: #f0f0f0;
  border-radius: 3px;
  margin-bottom: 20px;
  overflow: hidden;
}

.quiz-progress-fill {
  height: 100%;
  background: #C5A059;
  /* Elegant Gold */
  transition: width 0.4s ease;
}

.quiz-step-indicator {
  font-size: 0.9rem;
  color: #C5A059;
  font-weight: 700;
  margin-bottom: 10px;
}

.quiz-question-text {
  font-size: 1.5rem;
  color: #6B4E31;
  margin-bottom: 30px;
  line-height: 1.5;
}

.quiz-options {
  display: flex;
  gap: 20px;
  justify-content: center;
}

.quiz-btn {
  padding: 15px 40px;
  border-radius: 50px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.btn-yes {
  background: #D35400;
  /* Deep Orange */
  color: #fff;
  border: none;
}

.btn-yes:hover {
  background: #A04000;
  transform: translateY(-3px);
}

.btn-no {
  background: #f8fafc;
  color: #64748b;
  border: 2px solid #e2e8f0;
}

.btn-no:hover {
  background: #f1f5f9;
  transform: translateY(-3px);
}

/* Quiz Results */
.quiz-result-card.risk-s {
  border-top: 8px solid #e74c3c;
}

.quiz-result-card.risk-a {
  border-top: 8px solid #f39c12;
}

.quiz-result-card.risk-b {
  border-top: 8px solid #2ecc71;
}

.quiz-result-header {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 15px;
  color: #94a3b8;
}

.quiz-result-title {
  font-size: 1.4rem;
  margin-bottom: 20px;
  color: #6B4E31;
}

.quiz-result-advice {
  line-height: 1.8;
  color: #475569;
  margin-bottom: 30px;
}

.quiz-result-cta {
  display: flex;
  flex-direction: column;
  gap: 15px;
  align-items: center;
}

/* Parallax Effect */
.hero {
  overflow: hidden;
}

.slide-background {
  will-change: transform;
}

/* Digital Assets Section Extra Styles */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 40px;

  .feature-item h3 {
    font-size: 1.25rem;
    color: #6B4E31;
    margin-bottom: 15px;
  }

  .feature-item {
    background: #fff;
    padding: 35px;
    border-radius: 20px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border-bottom: 4px solid #C5A059;
  }

}

.input-error {
  border-color: #e74c3c !important;
  background-color: #fff5f5 !important;
  box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1) !important;
}

.shake-error {
  animation: shake 0.5s cubic-bezier(.36, .07, .19, .97) both;
}

@keyframes shake {

  10%,
  90% {
    transform: translate3d(-1px, 0, 0);
  }

  20%,
  80% {
    transform: translate3d(2px, 0, 0);
  }

  30%,
  50%,
  70% {
    transform: translate3d(-4px, 0, 0);
  }

  40%,
  60% {
    transform: translate3d(4px, 0, 0);
  }
}








/* Premium Global Navigation Styles */
.section-nav-container { position: fixed; right: 10px; top: 50%; transform: translateY(-50%); z-index: 10020; display: flex; flex-direction: column; gap: 12px; }
.section-nav-dot { width: 12px; height: 12px; background: rgba(0,0,0,0.2); border: 2px solid #fff; border-radius: 50%; cursor: pointer; transition: all 0.3s ease; position: relative; }
.section-nav-dot:hover { background: var(--accent-orange, #f39c12); transform: scale(1.2); }
.section-nav-dot.is-active { background: var(--accent-orange, #f39c12); transform: scale(1.3); }
.section-nav-label { position: absolute; right: 24px; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,0.8); color: #fff; padding: 4px 8px; border-radius: 4px; font-size: 12px; white-space: nowrap; opacity: 0; pointer-events: none; transition: all 0.3s ease; }
.section-nav-dot:hover .section-nav-label { opacity: 1; right: 28px; }

.page-top-btn { position: fixed; right: 30px; bottom: 30px; width: 60px; height: 60px; background: var(--main-blue, #003366); color: #fff; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-decoration: none; z-index: 10021; box-shadow: 0 4px 12px rgba(0,0,0,0.2); transition: all 0.3s ease; border: none; cursor: pointer; opacity: 0; visibility: hidden; }
.page-top-btn.is-visible { opacity: 1; visibility: visible; }
.page-top-btn:hover { background: var(--accent-orange, #f39c12); transform: translateY(-5px); }
.page-top-btn svg { width: 24px; height: 24px; margin-bottom: 2px; }
.page-top-btn span { font-size: 10px; font-weight: bold; }

.mobile-nav-container { position: fixed; right: 30px; bottom: 110px; z-index: 10022; }
.mobile-nav-trigger { width: 60px; height: 60px; background: var(--accent-orange, #f39c12); color: #fff; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; box-shadow: 0 4px 12px rgba(0,0,0,0.2); border: 2px solid #fff; cursor: pointer; padding-top: 4px; }
.trigger-icon { width: 24px; height: 2px; background: #fff; position: relative; transition: all 0.3s; margin-bottom: 2px; }
.trigger-icon::before, .trigger-icon::after { content: ''; width: 24px; height: 2px; background: #fff; position: absolute; left: 0; transition: all 0.3s; }
.trigger-icon::before { top: -8px; }
.trigger-icon::after { top: 8px; }
.trigger-label { font-size: 10px; font-weight: bold; margin-top: 14px; letter-spacing: 0.05em; }
.mobile-nav-container.is-open .trigger-icon { background: transparent; }
.mobile-nav-container.is-open .trigger-icon::before { transform: rotate(45deg); top: 0; }
.mobile-nav-container.is-open .trigger-icon::after { transform: rotate(-45deg); top: 0; }

.mobile-nav-menu { position: absolute; bottom: 70px; right: 0; background: #fff; border-radius: 16px; box-shadow: 0 10px 30px rgba(0,0,0,0.15); width: 220px; opacity: 0; visibility: hidden; transform: translateY(20px) scale(0.9); transition: all 0.3s cubic-bezier(0.16,1,0.3,1); overflow: hidden; }
.mobile-nav-container.is-open .mobile-nav-menu { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }
.mobile-nav-list { padding: 10px 0; list-style: none; margin: 0; }
.mobile-nav-item { display: flex; align-items: center; gap: 12px; padding: 12px 20px; color: #333; text-decoration: none; font-size: 14px; font-weight: 600; border-bottom: 1px solid #f0f0f0; }
.mobile-nav-item:last-child { border-bottom: none; }
.mobile-nav-item:active { background: #f8f9fa; }

@media (max-width: 1150px) { 
  .section-nav-container { display: none; } 
  .page-top-btn { bottom: 220px; right: 15px; width: 50px; height: 50px; } 
  .mobile-nav-container { bottom: 155px; right: 15px; } 
}

/* Fix Inheritance LP Floating Footer layout and overlap */
.floating-nav { left: 0 !important; right: 0 !important; margin: 0 auto !important; width: 95% !important; max-width: 500px !important; bottom: 85px !important; z-index: 10015 !important; transform: translateY(150%) !important; position: fixed !important; }
.floating-nav.is-visible { transform: translateY(0) !important; }
.read-progress-bar { position: absolute; bottom: 0; left: 0; height: 3px; background: var(--accent-orange, #f39c12); transition: width 0.1s; border-radius: 0 0 40px 40px; }

/* 電話受付時間追加に伴う調整 */
.header-tel-label, .contact-label {
  display: block;
  font-size: 12px !important;
  color: var(--main-blue, #003366);
  margin-bottom: 2px;
  font-weight: 500;
  white-space: nowrap;
}
