/* Shared Japanese typography and mobile wrapping fixes */
html {
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  word-break: normal;
  line-break: strict;
  overflow-wrap: break-word;
}

.availability-bar {
  width: 100%;
  padding: 7px 16px;
  background: #fff3c4;
  color: #173f2b;
  border-bottom: 1px solid #e4ca72;
  text-align: center;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.5;
}

h1,
h2,
h3,
.section-title,
.card-title,
.faq-q,
summary {
  text-wrap: balance;
}

p,
li,
td,
th,
.faq-a,
.card-desc,
.panel-dialogue {
  text-wrap: pretty;
}

/* Keep the "被害を放置すると" section consistent across service pages. */
.risk-flow {
  margin: 0 0 24px;
  padding: 20px;
  border: 1px solid #ead5b5;
  border-radius: 8px;
  background: #fff9f0;
}

.risk-flow ol {
  margin: 0;
  padding-left: 22px;
}

.risk-flow li {
  margin-bottom: 10px;
}

.risk-flow li:last-child {
  margin-bottom: 0;
}

ol.process-flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 0;
  margin: 24px 0 32px;
  list-style: none;
  counter-reset: process-step;
}

ol.process-flow > li {
  position: relative;
  min-width: 0;
  margin: 0;
  padding: 48px 16px 18px;
  border: 1px solid #cfe0d4;
  border-radius: 8px;
  background: #f7fbf8;
  counter-increment: process-step;
}

ol.process-flow > li::before {
  content: counter(process-step);
  position: absolute;
  top: 14px;
  left: 16px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #155c35;
  color: #fff;
  font-weight: 700;
  line-height: 1;
}

ol.process-flow > li:not(:last-child)::after {
  content: "→";
  position: absolute;
  top: 50%;
  right: -17px;
  z-index: 2;
  color: #155c35;
  font-size: 20px;
  font-weight: 700;
  transform: translateY(-50%);
}

ol.process-flow > li > strong {
  display: block;
  margin-bottom: 8px;
  color: #155c35;
  line-height: 1.5;
}

a,
button,
th,
td {
  max-width: 100%;
}

.cta-line,
.cta-tel,
.btn-line,
.btn-tel,
.hero-line,
.hero-tel,
.fcta-line,
.fcta-tel,
.risk-line,
.risk-tel,
.btn {
  justify-content: center;
  text-align: center;
}

/* Conversion CTA polish: a restrained sparkle that keeps every existing label intact. */
.cta-line,
.cta-tel,
.btn-line,
.btn-tel,
.hero-line,
.hero-tel,
.fcta-line,
.fcta-tel,
.risk-line,
.risk-tel,
.btn[href*="lin.ee"],
.btn[href^="tel:"],
.mobile-cta a {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  transform: translateZ(0);
  box-shadow:
    0 7px 18px rgba(15, 61, 46, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.48),
    inset 0 -2px 0 rgba(0, 0, 0, 0.1);
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.cta-line::before,
.cta-tel::before,
.btn-line::before,
.btn-tel::before,
.hero-line::before,
.hero-tel::before,
.fcta-line::before,
.fcta-tel::before,
.risk-line::before,
.risk-tel::before,
.btn[href*="lin.ee"]::before,
.btn[href^="tel:"]::before,
.mobile-cta a::before {
  content: "";
  position: absolute;
  z-index: 1;
  top: -45%;
  bottom: -45%;
  left: -72%;
  width: 42%;
  pointer-events: none;
  background: linear-gradient(
    110deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.08) 28%,
    rgba(255, 255, 255, 0.9) 48%,
    rgba(255, 225, 119, 0.68) 55%,
    rgba(255, 255, 255, 0) 78%
  );
  transform: skewX(-18deg);
  animation: cta-sparkle-sweep 3.6s ease-in-out infinite;
}

.cta-line:hover,
.cta-tel:hover,
.btn-line:hover,
.btn-tel:hover,
.hero-line:hover,
.hero-tel:hover,
.fcta-line:hover,
.fcta-tel:hover,
.risk-line:hover,
.risk-tel:hover,
.btn[href*="lin.ee"]:hover,
.btn[href^="tel:"]:hover,
.mobile-cta a:hover {
  transform: translateY(-2px);
  filter: brightness(1.04) saturate(1.06);
  box-shadow:
    0 10px 24px rgba(15, 61, 46, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.58),
    inset 0 -2px 0 rgba(0, 0, 0, 0.08);
}

.cta-line:active,
.cta-tel:active,
.btn-line:active,
.btn-tel:active,
.hero-line:active,
.hero-tel:active,
.fcta-line:active,
.fcta-tel:active,
.risk-line:active,
.risk-tel:active,
.btn[href*="lin.ee"]:active,
.btn[href^="tel:"]:active,
.mobile-cta a:active {
  transform: translateY(1px) scale(0.99);
  box-shadow:
    0 3px 9px rgba(15, 61, 46, 0.2),
    inset 0 2px 3px rgba(0, 0, 0, 0.12);
}

@keyframes cta-sparkle-sweep {
  0%,
  48% {
    left: -72%;
    opacity: 0;
  }
  54% {
    opacity: 1;
  }
  76% {
    left: 138%;
    opacity: 1;
  }
  77%,
  100% {
    left: 138%;
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cta-line::before,
  .cta-tel::before,
  .btn-line::before,
  .btn-tel::before,
  .hero-line::before,
  .hero-tel::before,
  .fcta-line::before,
  .fcta-tel::before,
  .risk-line::before,
  .risk-tel::before,
  .btn[href*="lin.ee"]::before,
  .btn[href^="tel:"]::before,
  .mobile-cta a::before {
    animation: none;
    display: none;
  }
}

@media (max-width: 640px) {
  .availability-bar {
    padding: 6px 10px;
    font-size: 13px;
  }

  h1,
  h2,
  h3,
  .section-title,
  .card-title,
  .faq-q,
  summary {
    line-height: 1.45;
  }

  .cta-line,
  .cta-tel,
  .hero-line,
  .hero-tel,
  .fcta-line,
  .fcta-tel,
  .risk-line,
  .risk-tel,
  .btn {
    white-space: normal;
    line-height: 1.45;
    text-wrap: balance;
  }

  .cta-buttons,
  .hero-ctas,
  .final-ctas,
  .risk-cta-buttons,
  .cta-row {
    width: 100%;
  }

  .cta-buttons > a,
  .hero-ctas > a,
  .final-ctas > a,
  .risk-cta-buttons > a,
  .cta-row > a {
    max-width: 100%;
  }

  table {
    width: 100%;
    table-layout: fixed;
  }

  th,
  td {
    overflow-wrap: anywhere;
  }

  .address-line {
    display: block;
    white-space: nowrap;
  }

  ol.process-flow {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  ol.process-flow > li {
    padding: 46px 16px 18px;
  }

  ol.process-flow > li:not(:last-child)::after {
    content: "↓";
    top: auto;
    right: 50%;
    bottom: -24px;
    transform: translateX(50%);
  }

  /* The manga LP used desktop-authored <br> tags inside large headings. */
  .manga-lp .story-copy h2 br,
  .manga-lp .mid-cta h2 br,
  .manga-lp .aftercare h2 br,
  .manga-lp .final-cta h2 br {
    display: none;
  }

  .manga-lp .hero h1 {
    font-size: 27px;
    line-height: 1.4;
  }

  .manga-lp .hero-lead {
    font-size: 15px;
  }

  .manga-lp .section-title h2,
  .manga-lp .story-copy h2,
  .manga-lp .comic-intro h2,
  .manga-lp .mid-cta h2,
  .manga-lp .aftercare h2,
  .manga-lp .final-cta h2 {
    font-size: clamp(24px, 7vw, 28px);
    line-height: 1.45;
  }

  .manga-lp .section-compare .story-copy h2 {
    font-size: 23px;
  }
}
