.home-v3 .nav-shell {
  min-height: 78px;
}

.home-v3 .site-header .brand {
  gap: 14px;
}

.home-v3 .site-header .brand img {
  width: 68px;
  height: 52px;
}

.home-v3 .site-header .brand span {
  font-size: 1.12rem;
}

.diagnostic-float {
  position: fixed;
  z-index: 28;
  top: 46%;
  right: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 48px;
  padding: 12px 18px 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-right: 0;
  border-radius: 18px 0 0 18px;
  background: rgba(16, 35, 63, 0.94);
  box-shadow: 0 14px 34px rgba(16, 35, 63, 0.22);
  color: #fff;
  text-decoration: none;
  backdrop-filter: blur(12px);
  transition: transform 180ms ease, background 180ms ease;
}

.diagnostic-float span {
  color: #80dedc;
}

.diagnostic-float:hover,
.diagnostic-float:focus-visible {
  background: #0d7f88;
  transform: translateX(-5px);
}

.home-v3 .hero h1 {
  max-width: 760px;
}

.home-v3 .journey-visual::after {
  position: absolute;
  z-index: 1;
  top: 51%;
  left: 50%;
  width: clamp(434px, 75.6%, 644px);
  aspect-ratio: 1.25;
  border-radius: 50%;
  background:
    url("../../home/damei-logo.webp") center / contain no-repeat,
    radial-gradient(circle, rgba(255, 255, 255, 0.84) 0%, rgba(177, 224, 224, 0.28) 38%, transparent 69%);
  filter:
    drop-shadow(0 24px 15px rgba(31, 70, 87, 0.4))
    drop-shadow(0 0 27px rgba(119, 211, 215, 0.53));
  content: "";
  opacity: 0.98;
  transform: translate(-50%, -61%);
  pointer-events: none;
  animation: journey-logo-float 6s ease-in-out infinite;
}

@keyframes journey-logo-float {
  0%, 100% { transform: translate(-50%, -61%) translateY(0); }
  50% { transform: translate(-50%, -61%) translateY(-12px); }
}

.home-v3 #about .pain-grid {
  perspective: 1400px;
}

.home-v3 #about .pain-card {
  display: block;
  min-height: 360px;
  padding: 0;
  border: 0;
  overflow: visible;
  background: transparent;
  box-shadow: none;
  text-align: left;
  transform: none;
}

.home-v3 #about .pain-card::after {
  content: none;
}

.home-v3 #about .pain-card:hover,
.home-v3 #about .pain-card[aria-expanded="true"] {
  border: 0;
  background: transparent;
  box-shadow: none;
  transform: none;
}

.pain-card-inner {
  position: relative;
  display: block;
  width: 100%;
  height: 360px;
  transform-style: preserve-3d;
  transition: transform 620ms cubic-bezier(.2, .7, .2, 1);
}

.pain-card[aria-expanded="true"] .pain-card-inner {
  transform: rotateY(180deg);
}

.pain-face {
  position: absolute;
  inset: 0;
  display: flex;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 26px;
  box-shadow: 0 22px 50px rgba(4, 18, 29, 0.3);
  backface-visibility: hidden;
}

.pain-card-toggle {
  width: 100%;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.45);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.pain-front {
  flex-direction: column;
  background: #f9fbfc;
}

.home-v3 #about .pain-photo {
  display: block;
  height: 242px;
  overflow: hidden;
}

.home-v3 #about .pain-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 380ms ease;
}

.home-v3 #about .pain-card:hover .pain-photo img {
  transform: scale(1.035);
}

.pain-front-copy {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 24px;
  color: #132943;
}

.pain-front-copy strong {
  max-width: 78%;
  font-size: 1.18rem;
  line-height: 1.5;
}

.pain-front-copy small {
  color: #187f87;
  font-weight: 800;
  white-space: nowrap;
}

.pain-back {
  flex-direction: column;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(circle at 85% 15%, rgba(255, 255, 255, 0.9), transparent 36%),
    linear-gradient(145deg, #f2e7f1, #e7f4f3 64%, #d6e7f2);
  color: #17314c;
  transform: rotateY(180deg);
}

.pain-back small {
  margin-bottom: 7px;
  color: #76517f;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.pain-back strong {
  margin-bottom: 12px;
  font-size: 1.08rem;
  line-height: 1.55;
}

.pain-course-links {
  display: grid;
  gap: 8px;
}

.pain-course-link {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 9px;
  min-height: 48px;
  padding: 9px 12px;
  border: 1px solid rgba(64, 132, 143, 0.24);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.74);
  color: #17314c;
  font-size: 0.84rem;
  font-weight: 800;
  line-height: 1.35;
  text-decoration: none;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.pain-course-link span {
  color: #1a7983;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.pain-course-link b {
  color: #1a7983;
  font-size: 1rem;
}

.pain-course-link:hover {
  border-color: rgba(26, 121, 131, 0.55);
  background: #fff;
  transform: translateX(3px);
}

.pain-course-link--program {
  border-color: rgba(118, 81, 127, 0.34);
  background: linear-gradient(110deg, rgba(255, 255, 255, 0.92), rgba(240, 228, 242, 0.9));
}

.pain-course-link--program span,
.pain-course-link--program b {
  color: #76517f;
}

.pain-card-return {
  align-self: flex-start;
  min-height: 38px;
  margin-top: 10px;
  padding: 6px 2px;
  border: 0;
  background: transparent;
  color: #1a7983;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}

.pain-card-toggle:focus-visible,
.pain-course-link:focus-visible,
.pain-card-return:focus-visible {
  outline: 3px solid #83dedc;
  outline-offset: 3px;
}

.iso-badge-cloud {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  min-height: 430px;
  align-content: center;
  padding: 30px 24px;
  border: 1px solid rgba(102, 172, 181, 0.24);
  border-radius: 38px;
  background:
    radial-gradient(circle at 18% 22%, rgba(112, 207, 207, 0.2), transparent 34%),
    radial-gradient(circle at 83% 76%, rgba(171, 133, 180, 0.2), transparent 38%),
    rgba(249, 252, 253, 0.86);
  box-shadow: 0 28px 70px rgba(26, 55, 73, 0.12);
}

.iso-badge {
  --badge-color: #468f9a;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 1;
  min-height: 0;
  padding: 18px 8px;
  border: 5px solid var(--badge-color);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 25%, #fff 0 35%, #edf8f8 100%);
  box-shadow: 0 11px 24px rgba(35, 89, 102, 0.14), inset 0 0 0 3px #fff;
  text-align: center;
}

.iso-badge:nth-child(4n + 2) {
  --badge-color: #836790;
}

.iso-badge:nth-child(4n + 3) {
  --badge-color: #b78b4d;
}

.iso-badge:nth-child(4n + 4) {
  --badge-color: #386a83;
}

.iso-badge::before {
  position: absolute;
  inset: 7px;
  border: 1px dashed var(--badge-color);
  border-radius: 50%;
  content: "";
}

.iso-badge::after {
  position: absolute;
  right: 0;
  bottom: 14%;
  left: 0;
  color: var(--badge-color);
  content: "✦";
  font-size: 0.68rem;
  line-height: 1;
}

.iso-badge small {
  position: relative;
  z-index: 1;
  color: var(--badge-color);
  font-size: clamp(0.55rem, 0.9vw, 0.7rem);
  font-weight: 800;
}

.iso-badge strong {
  position: relative;
  z-index: 1;
  margin-top: 5px;
  color: #17314c;
  font-size: clamp(0.65rem, 1.05vw, 0.94rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.iso-badge-theme {
  background: radial-gradient(circle at 35% 25%, #fff 0 35%, #f5eef6 100%);
}

.home-v3 .original-site-footer {
  border-top: 1px solid #e2e9ed;
  background: #f8fafb;
  color: #667987;
}

.home-v3 .original-site-footer .original-footer-cta,
.home-v3 .original-site-footer .original-footer-bottom {
  border-color: #dbe5e9;
}

.home-v3 .original-site-footer .original-footer-cta strong,
.home-v3 .original-site-footer .original-footer-brand strong {
  color: #132a43;
}

.home-v3 .original-site-footer .original-footer-cta span,
.home-v3 .original-site-footer .original-footer-brand p {
  color: #677b89;
}

.home-v3 .original-site-footer .original-footer-main b,
.home-v3 .original-site-footer .original-footer-main a:hover,
.home-v3 .original-site-footer .original-footer-main a:focus-visible {
  color: #087e87;
}

.home-v3 .original-site-footer .original-footer-main a {
  color: #425a6b;
}

.home-v3 .original-site-footer .original-footer-brand small,
.home-v3 .original-site-footer .original-footer-bottom {
  color: #76909d;
}

.home-v3 .original-site-footer .original-footer-actions a:first-child {
  border-color: #168e96;
  color: #0e6570;
}

@media (max-width: 1200px) {
  .home-v3 .site-header .brand img {
    width: 58px;
    height: 45px;
  }

  .home-v3 .site-header .brand span {
    font-size: 0.98rem;
  }
}

@media (max-width: 960px) {
  .diagnostic-float {
    top: auto;
    right: 16px;
    bottom: 16px;
    border-right: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 999px;
  }

  .home-v3 .journey-visual::after {
    width: clamp(336px, 63%, 504px);
  }

  .pain-card-inner,
  .home-v3 #about .pain-card {
    min-height: 340px;
    height: 340px;
  }

  .home-v3 #about .pain-photo {
    height: 220px;
  }
}

@media (max-width: 700px) {
  .home-v3 .site-header .brand img {
    width: 60px;
    height: 46px;
  }

  .home-v3 .journey-visual::after {
    top: 50%;
    width: clamp(238px, 64.4%, 350px);
  }

  .home-v3.theme-b .journey-visual::before {
    inset: auto;
    top: 50%;
    left: 50%;
    width: 76%;
    height: auto;
    aspect-ratio: 1;
    transform: translate(-50%, -50%);
  }

  .pain-card-inner,
  .home-v3 #about .pain-card {
    min-height: 350px;
    height: 350px;
  }

  .iso-badge-cloud {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-height: 0;
    padding: 20px;
  }

  .iso-badge {
    padding: 15px 8px;
  }
}

@media (max-width: 460px) {
  .diagnostic-float {
    min-height: 44px;
    padding: 10px 14px;
    font-size: 0.86rem;
  }

  .pain-front-copy {
    padding: 18px;
  }

  .pain-front-copy strong {
    max-width: 72%;
    font-size: 1rem;
  }

  .pain-back {
    padding: 20px;
  }

  .pain-course-link {
    padding: 8px 10px;
    font-size: 0.8rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pain-card-inner,
  .diagnostic-float {
    transition: none;
  }

  .home-v3 .journey-visual::after {
    animation: none;
  }
}
