/* ==========================================================================
   金沢西みなとクリニック - オフィシャルサイト スタイルシート
   ========================================================================== */

:root {
  --primary-color: #059669;
  --primary-hover: #047857;
  --primary-light: #ecfdf5;

  --accent-purple: #8b5cf6;
  --accent-purple-light: #f5f3ff;
  --accent-blue: #0ea5e9;
  --accent-blue-light: #e0f2fe;

  --text-main: #2d3748;
  --text-muted: #64748b;
  --text-light: #94a3b8;

  --bg-main: #fafafa;
  --bg-card: #ffffff;
  --bg-subtle: #f8fafc;
  --border-color: #e2e8f0;

  --shadow-sm: 0 2px 5px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 6px 18px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 16px 36px rgba(0, 0, 0, 0.1);
  --shadow-polaroid: 0 16px 36px rgba(0, 0, 0, 0.18);

  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 28px;
  --radius-full: 9999px;

  --transition-fast: 0.25s ease;
  --transition-normal: 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow: 0.85s cubic-bezier(0.16, 1, 0.3, 1);
}

body.day-mode {
  --canvas-bg: #fafafa;
  --header-bg: rgba(255, 255, 255, 0.95);
}

body.night-mode {
  --primary-color: #10b981;
  --text-main: #f1f5f9;
  --text-muted: #cbd5e1;
  --bg-main: #0f172a;
  --bg-card: #1e293b;
  --bg-subtle: #1e293b;
  --border-color: #334155;
  --header-bg: rgba(15, 23, 42, 0.95);
}

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

html {
  scroll-behavior: smooth;
  font-size: 18px;
}

body {
  font-family: 'Noto Sans JP', 'Outfit', sans-serif;
  color: var(--text-main);
  background-color: var(--bg-main);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.container {
  max-width: 70%;
  margin: 0 auto;
  padding: 0 24px;
}

/* --------------------------------------------------------------------------
   Password Protection Gate Screen
   -------------------------------------------------------------------------- */
html.is-authenticated #pass-gate-overlay {
  display: none !important;
}

.pass-gate-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 9999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.pass-gate-overlay.hidden {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  display: none !important;
}

.pass-gate-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 32px 24px;
  max-width: 380px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
  animation: passGatePop 0.3s ease;
}

@keyframes passGatePop {
  from {
    opacity: 0;
    transform: scale(0.96);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.pass-gate-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 6px;
}

.pass-gate-desc {
  font-size: 0.88rem;
  color: #64748b;
  margin-bottom: 20px;
}

.pass-input-group {
  display: flex;
  gap: 8px;
}

#pass-gate-input {
  flex: 1;
  padding: 10px 14px;
  font-size: 0.95rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  outline: none;
  text-align: center;
  transition: border-color 0.2s ease;
}

#pass-gate-input:focus {
  border-color: #059669;
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.12);
}

#pass-gate-input.shake {
  animation: passShake 0.4s ease;
  border-color: #ef4444;
}

@keyframes passShake {

  0%,
  100% {
    transform: translateX(0);
  }

  20%,
  60% {
    transform: translateX(-6px);
  }

  40%,
  80% {
    transform: translateX(6px);
  }
}

#pass-gate-btn {
  padding: 10px 18px;
  font-size: 0.92rem;
  font-weight: 700;
  color: #ffffff;
  background: #059669;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s ease;
}

#pass-gate-btn:hover {
  background: #047857;
}

.pass-gate-error {
  font-size: 0.82rem;
  color: #ef4444;
  font-weight: 600;
  min-height: 1.2em;
  margin-top: 10px;
}

/* --------------------------------------------------------------------------
   Preloader Screen
   -------------------------------------------------------------------------- */
.preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #ffffff;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.9s cubic-bezier(0.77, 0, 0.175, 1), opacity 0.8s ease;
  will-change: transform, opacity;
}

.preloader.loaded {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-100%);
}

.preloader-content {
  text-align: center;
  animation: preloaderPulse 1.2s ease infinite alternate;
}

.preloader-badge {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--primary-color);
  letter-spacing: 0.15em;
  margin-bottom: 8px;
  opacity: 0;
  animation: fadeInDown 0.6s 0.2s forwards;
}

.preloader-title {
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--text-main);
  letter-spacing: -0.01em;
  margin-bottom: 24px;
  opacity: 0;
  animation: fadeInDown 0.6s 0.35s forwards;
}

.preloader-line-wrapper {
  width: 180px;
  height: 3px;
  background: #e2e8f0;
  border-radius: var(--radius-full);
  margin: 0 auto;
  overflow: hidden;
  position: relative;
}

.preloader-line {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-purple));
  border-radius: var(--radius-full);
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.preloader-percent-text {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-top: 10px;
  letter-spacing: 0.05em;
  font-family: inherit;
}

@keyframes fadeInDown {
  0% {
    opacity: 0;
    transform: translateY(-12px);
  }

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

@keyframes lineGrow {
  0% {
    width: 0%;
  }

  100% {
    width: 100%;
  }
}

@keyframes preloaderPulse {
  0% {
    transform: scale(0.99);
  }

  100% {
    transform: scale(1.01);
  }
}

/* --------------------------------------------------------------------------
   Scroll Reveal Base Classes
   -------------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(35px);
  transition: opacity var(--transition-slow), transform var(--transition-slow);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* --------------------------------------------------------------------------
   Header & Navigation
   -------------------------------------------------------------------------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--header-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-color);
  transition: all var(--transition-fast);
  opacity: 0;
  transform: translateY(-20px);
  animation: navbarFadeIn 0.8s 1.2s forwards;
}

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

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

.navbar.scrolled {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-group {
  display: flex;
  flex-direction: column;
}

.logo-sub {
  font-size: 0.72rem;
  color: var(--primary-color);
  font-weight: 600;
  letter-spacing: 0.05em;
}

.logo-main {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--primary-color);
  letter-spacing: -0.01em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 600;
  transition: color var(--transition-fast);
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary-color);
}

.nav-phone {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.phone-number {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 1.45rem;
  font-weight: 600;
  color: var(--primary-color);
  text-decoration: none;
  letter-spacing: 0.02em;
}

.phone-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.hamburger-btn {
  display: none;
}

/* --------------------------------------------------------------------------
   Hero Section
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  height: 100vh;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-top: 80px;
}

.canvas-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  z-index: 1;
  will-change: transform, opacity;
  transition: opacity 0.3s ease;
}

#iso-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.map-pins-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 8;
  pointer-events: none;
}

.map-pin {
  position: absolute;
  pointer-events: auto;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: translate(-50%, -100%);
  opacity: 0;
  animation: dropPin 0.75s cubic-bezier(0.175, 0.885, 0.32, 1.3) forwards;
  transition: transform 0.25s ease;
}

.map-pin:hover {
  transform: translate(-50%, -112%) scale(1.12);
  z-index: 10;
}

.map-pin.pin-delay-1 {
  animation-delay: 1.4s;
}

.map-pin.pin-delay-2 {
  animation-delay: 1.7s;
}

.map-pin.pin-delay-3 {
  animation-delay: 2.0s;
}

@keyframes dropPin {
  0% {
    opacity: 0;
    transform: translate(-50%, -240%) scale(0.3);
  }

  70% {
    opacity: 1;
    transform: translate(-50%, -90%) scale(1.15);
  }

  100% {
    opacity: 1;
    transform: translate(-50%, -100%) scale(1);
  }
}

.pin-marker {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #5b82a6, #3b6082);
  border: 3px solid #ffffff;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(59, 96, 130, 0.35);
}

.map-pin.purple .pin-marker {
  background: linear-gradient(135deg, #e7b04f, #cb9435);
  box-shadow: 0 4px 14px rgba(203, 148, 53, 0.35);
}

.map-pin.main-clinic .pin-marker {
  background: linear-gradient(135deg, #f07898, #d85072);
  box-shadow: 0 4px 16px rgba(240, 120, 152, 0.45);
  border: 3px solid #ffffff;
  animation: mainPinGlow 2.5s infinite alternate;
}

.map-pin.main-clinic .pin-pulse {
  background: rgba(240, 120, 152, 0.45);
}

.map-pin.main-clinic .pin-tooltip {
  background: linear-gradient(135deg, rgba(220, 85, 115, 0.95), rgba(195, 60, 90, 0.95));
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.5);
  font-weight: 800;
  box-shadow: 0 4px 16px rgba(220, 85, 115, 0.4);
}

@keyframes mainPinGlow {
  0% {
    transform: rotate(-45deg) scale(1.0);
    box-shadow: 0 4px 14px rgba(240, 120, 152, 0.45);
  }

  100% {
    transform: rotate(-45deg) scale(1.06);
    box-shadow: 0 6px 20px rgba(216, 80, 112, 0.65);
  }
}

.pin-marker-icon {
  transform: rotate(45deg);
  font-size: 1.3rem;
  color: #ffffff;
}

.pin-pulse {
  position: absolute;
  bottom: -6px;
  width: 30px;
  height: 10px;
  background: rgba(5, 150, 105, 0.35);
  border-radius: 50%;
  z-index: -1;
  animation: pinPulse 2s infinite ease-out;
}

@keyframes pinPulse {
  0% {
    transform: scale(0.6);
    opacity: 0.9;
  }

  100% {
    transform: scale(2.2);
    opacity: 0;
  }
}

.pin-tooltip {
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(8px);
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  white-space: nowrap;
  margin-bottom: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.hero-overlay {
  position: relative;
  z-index: 10;
  width: 100%;
  padding-bottom: 100px;
  pointer-events: none;
}

.hero-content-card {
  pointer-events: auto;
  max-width: 620px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: var(--radius-lg);
  padding: 32px 40px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
  margin-left: 24px;
  margin-bottom: 20px;
  opacity: 0;
  animation: heroCardEntrance 0.9s 1.1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  will-change: opacity, transform;
}

@keyframes heroCardEntrance {
  0% {
    opacity: 0;
    transform: translateY(30px) scale(0.96);
  }

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

.hero-edge-arrow {
  display: none;
}

.scroll-down-indicator {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 15;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  opacity: 0;
  animation: gentleFloat 3s infinite ease-in-out, fadeIn 0.8s 1.5s forwards;
  transition: opacity 0.35s ease, transform 0.25s ease;
  cursor: pointer;
}

.scroll-down-indicator:hover {
  transform: translateX(-50%) translateY(4px);
}

.scroll-text {
  font-family: 'Outfit', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--primary-color);
  letter-spacing: 0.25em;
  text-transform: uppercase;
}

.scroll-mouse-icon {
  width: 24px;
  height: 38px;
  border: 2px solid var(--primary-color);
  border-radius: 14px;
  position: relative;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 6px 18px rgba(5, 150, 105, 0.2);
  display: flex;
  justify-content: center;
  padding-top: 6px;
}

.scroll-wheel-dot {
  width: 4px;
  height: 8px;
  background: var(--primary-color);
  border-radius: var(--radius-full);
  animation: wheelSlide 1.8s infinite cubic-bezier(0.65, 0, 0.35, 1);
}

@keyframes wheelSlide {
  0% {
    transform: translateY(0);
    opacity: 1;
    height: 8px;
  }

  50% {
    opacity: 0.8;
    height: 12px;
  }

  100% {
    transform: translateY(14px);
    opacity: 0;
    height: 4px;
  }
}

@keyframes gentleFloat {

  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }

  50% {
    transform: translateX(-50%) translateY(6px);
  }
}

@keyframes fadeIn {
  0% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

/* --------------------------------------------------------------------------
   Main Content Wrapper
   -------------------------------------------------------------------------- */
.main-content-wrapper {
  position: relative;
  z-index: 20;
  background: transparent !important;
  min-height: 100vh;
}

.cloud-divider-svg .path-mobile {
  display: none;
}

.cloud-divider-wrapper {
  position: relative;
  width: 100%;
  height: 105px;
  margin-bottom: -1px;
  overflow: hidden;
  line-height: 0;
  pointer-events: none;
  z-index: 22;
 
}

.cloud-divider-svg {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.section-tag-badge {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #25a884;
  letter-spacing: 0.18em;
  margin-bottom: 30px;
  text-transform: uppercase;
}

/* ABOUT US Section */
.about-section {
  padding: 100px 0 0 0;
  background: #ffffff;
  text-align: center;
  position: relative;
  overflow: visible;
}

.about-clouds-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  overflow: visible;
}

.about-cloud {
  position: absolute;
  opacity: 1.0;
  filter: none;
}

.about-cloud img.cloud-svg-img {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
}

.about-cloud.side-cloud-left img.cloud-svg-img {
  transform: scaleX(-1);
}

.about-cloud.cloud-top-left {
  top: 30px;
  left: 1%;
  opacity: 0.95;
  animation: floatCloudLeft 7s ease-in-out infinite alternate;
}

.about-cloud.cloud-top-center {
  top: 160px;
  right: 18%;
  opacity: 0.88;
  animation: floatCloudLeft 9s ease-in-out infinite alternate-reverse;
}

.about-cloud.cloud-top-right {
  top: 10px;
  right: 1%;
  opacity: 0.95;
  animation: floatCloudRight 8s ease-in-out infinite alternate;
}

.about-cloud.side-cloud-left {
  top: 710px;
  left: -100px;
  width: 700px;
  opacity: 0;
  transition: opacity 1.5s cubic-bezier(0.25, 1, 0.5, 1);
  transition-delay: 0.35s;
  animation: floatCloudLeft 12s ease-in-out infinite alternate;
}

.about-cloud.side-cloud-right {
  top: 690px;
  right: -100px;
  width: 700px;
  opacity: 0;
  transition: opacity 1.5s cubic-bezier(0.25, 1, 0.5, 1);
  transition-delay: 0.35s;
  animation: floatCloudRight 14s ease-in-out infinite alternate-reverse;
}

.about-cloud.side-cloud-left.active,
.about-cloud.side-cloud-right.active {
  opacity: 0.95;
}

@keyframes floatCloudLeft {
  0% {
    transform: translateY(0px) translateX(0px) rotate(0deg);
  }

  50% {
    transform: translateY(-30px) translateX(20px) rotate(1.5deg);
  }

  100% {
    transform: translateY(0px) translateX(0px) rotate(0deg);
  }
}

@keyframes floatCloudRight {
  0% {
    transform: translateY(0px) translateX(0px) rotate(0deg);
  }

  50% {
    transform: translateY(32px) translateX(-22px) rotate(-1.5deg);
  }

  100% {
    transform: translateY(0px) translateX(0px) rotate(0deg);
  }
}

.about-content-container {
  position: relative;
  z-index: 10;
}

.about-main-title {
  font-size: 2.5rem;
  font-weight: 600;
  color: #1a202c;
  line-height: 1.4;
  margin-bottom: 30px;
}

.about-lead-text {
  font-size: 1.15rem;
  color: #4a5568;
  line-height: 2.15;
  max-width: 940px;
  margin: 0 auto 80px auto;
  font-weight: 500;
  text-align: left;
}

.iedemiru-link {
  color: rgb(31, 145, 113);
  font-weight: 700;
  text-decoration: underline;
  transition: opacity 0.2s ease;
}

.iedemiru-link:hover {
  opacity: 0.85;
}

.about-btn-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  text-align: center;
  margin-top: 36px;
}

.about-green-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: #25a884;
  color: #ffffff;
  font-size: 1.15rem;
  font-weight: 700;
  padding: 16px 48px;
  border-radius: 9999px;
  text-decoration: none;
  box-shadow: none;
  transition: all 0.3s ease;
}

.about-green-pill-btn:hover {
  background: #1f9171;
  transform: translateY(-2px);
  box-shadow: none;
}

/* 3D Pop-Up Storybook Animation & Mini Visit Car */
.about-illustration-wrapper {
  position: relative;
  z-index: 5;
  margin-top: 40px;
  background: transparent;
  overflow: visible;
  padding-top: 20px;
  perspective: 1200px;
}

.machinami-bg {
  position: absolute;
  bottom: 125px;
  left: 0;
  width: 100%;
  height: 220px;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.8s ease 0.2s;
}

.about-illustration-wrapper.popup-active .machinami-bg {
  opacity: 1;
}

.machinami-track {
  display: flex;
  height: 100%;
  width: max-content;
  will-change: transform;
  animation: moveMachinami 50s linear infinite;
}

.machinami-img {
  height: 100%;
  width: auto;
  flex-shrink: 0;
}

@keyframes moveMachinami {
  0% {
    transform: translateX(-33.33333%);
  }

  100% {
    transform: translateX(0%);
  }
}

.green-hill-bg {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
  transform-origin: bottom center;
  transform: scaleY(0.1);
  opacity: 0;
  transition: transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.5s ease;
}

.about-illustration-wrapper.popup-active .green-hill-bg {
  transform: scaleY(1);
  opacity: 1;
}

.green-hill-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.illustration-container {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  position: relative;
  z-index: 10;
  min-height: 340px;
  padding: 0 40px;
}

.illustration-container.centered-illustration {
  justify-content: center;
  align-items: flex-end;
}

.visit-car-wrapper {
  position: relative;
  height: 180px;
  width: auto;
  display: inline-block;
  z-index: 11;
  margin-bottom: 140px;
  transform-origin: bottom center;
  transform: translateY(140px) rotateX(-80deg) scale(0.3);
  opacity: 0;
  transition: transform 0.9s cubic-bezier(0.175, 0.885, 0.32, 1.25), opacity 0.5s ease;
  transition-delay: 0.25s;
}

.about-illustration-wrapper.popup-active .visit-car-wrapper {
  transform: translateY(0) rotateX(0deg) scale(1);
  opacity: 1;
  animation: comicalCarBounce 4.5s ease-in-out infinite 1.2s;
}

.visit-car-body {
  height: 180px;
  width: auto;
  display: block;
  object-fit: contain;
}

/* ミニ訪問診療車（境界線用）のレイアウト＆アニメーション */
.mini-visit-car-container {
  position: absolute;
  right: 25%;
  bottom: 14px;
  z-index: 10;
  pointer-events: auto;
}

.visit-car-wrapper.mini-car {
  height: 85px;
  margin-bottom: 0;
  transform: scale(1);
  opacity: 1;
  animation: comicalCarBounce 4s ease-in-out infinite;
}

.visit-car-wrapper.mini-car .visit-car-body {
  height: 85px;
}

@keyframes spinWheel {
  from {
    transform: translate(-50%, -50%) rotate(0deg);
  }

  to {
    transform: translate(-50%, -50%) rotate(-360deg);
  }
}

.visit-car-wheel {
  position: absolute;
  height: 39.5%;
  width: auto;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 12;
  animation: spinWheel 0.8s linear infinite;
}

.visit-car-wheel.wheel-rear {
  left: 12.0%;
  top: 86.8%;
}

.visit-car-wheel.wheel-front {
  left: 88.6%;
  top: 86.8%;
}

@keyframes comicalCarBounce {

  0%,
  60%,
  100% {
    transform: translateY(0) rotate(0deg);
  }

  65% {
    transform: translateY(4px) rotate(-1.5deg);
  }

  72% {
    transform: translateY(-18px) rotate(2.5deg);
  }

  78% {
    transform: translateY(3px) rotate(-1deg);
  }

  84% {
    transform: translateY(-7px) rotate(1deg);
  }

  90% {
    transform: translateY(1px) rotate(0deg);
  }
}

/* --------------------------------------------------------------------------
   Green Band Section (Flowing Square Photo Cards - COLUMN)
   -------------------------------------------------------------------------- */
.green-wave-cards-section {
  background: #acc65c;
  padding: 10px 0 120px 0;
  margin-top: 0px;
  position: relative;
  z-index: 2;
  overflow: hidden;
  width: 100%;
}

.marquee-header-container {
  text-align: center;
  margin-bottom: 16px;
  padding-top: 5px;
}

.section-tag-badge.white-badge {
  color: #ffffff;
  margin-bottom: 50px;
}

.news-marquee-container {
  width: 100%;
  overflow: hidden;
  position: relative;
  background: #acc65c;
  padding-bottom: 80px;
}

.news-marquee-track {
  display: flex;
  gap: 10px;
  width: max-content;
  animation: newsMarqueeScroll 85s linear infinite;
}

.news-marquee-track:hover {
  animation-play-state: paused;
}

.white-tile-card.news-card {
  width: 290px;
  height: 290px;
  flex-shrink: 0;
  background: #ffffff;
  border-radius: 20px;
  padding: 0;
  box-shadow: none;
  overflow: hidden;
  transition: transform 0.3s ease;
  cursor: pointer;
}

.white-tile-card.news-card:hover {
  transform: scale(1.02);
  box-shadow: none;
}

.news-card-link {
  display: block;
  width: 100%;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

.news-thumbnail-wrap {
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  margin-bottom: 0;
  box-shadow: none;
  background: #ffffff;
  border: 1px solid #000000;
}

.news-thumb-inner.grey-placeholder {
  width: 100%;
  height: 100%;
  background: #ffffff;
  border-radius: 20px;
  box-shadow: none;
}

.news-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.white-tile-card.news-card:hover .news-thumb-img {
  transform: scale(1.06);
}

.news-thumb-placeholder {
  width: 100%;
  height: 100%;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000000;
  font-size: 3rem;
}

/* 下部の黒グラデーションフィルター */
.news-thumb-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 30px 14px 12px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.5) 60%, rgba(0, 0, 0, 0) 100%);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 4px;
  pointer-events: none;
}

.news-thumb-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.68rem;
  line-height: 1;
}

.news-thumb-date {
  color: rgba(255, 255, 255, 0.85);
  font-family: 'Outfit', sans-serif;
  font-weight: 500;
}

.news-thumb-cat {
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(4px);
  color: #ffffff;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 0.5rem;
  font-weight: 600;
  white-space: nowrap;
}

.news-thumb-title {
  font-size: 0.6rem !important;
  font-weight: 700 !important;
  color: #ffffff !important;
  margin: 0 !important;
  line-height: 1.35 !important;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

@keyframes newsMarqueeScroll {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(calc(-50% - 5px));
  }
}

.green-bottom-hill-bg {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 90px;
  z-index: 2;
  pointer-events: none;
  line-height: 0;
}

.green-bottom-hill-svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* --------------------------------------------------------------------------
   DOCTOR Section
   -------------------------------------------------------------------------- */
.doctor-section {
  padding: 100px 0;
  background: #faf7f2;
  text-align: center;
}

.doctor-section .container {
  max-width: 1500px;
  padding: 0 32px;
  margin: 0 auto;
}

.green-bottom-hill-svg path {
  fill: #faf7f2;
}

.doctor-main-title {
  font-size: 2.3rem;
  font-weight: 600;
  color: #1a202c;
  margin-bottom: 52px;
}

.doctor-profile-card {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 56px;
  max-width: 1500px;
  width: 100%;
  margin: 0 auto;
  text-align: left;
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}

/* 新・院長紹介カードスタイル (フェルト人形風イラスト＋円形背景) */
.doctor-profile-card-v2 {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  position: relative;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  text-align: left;
}

.doctor-illustration-container {
  position: relative;
  flex-shrink: 0;
  width: 300px;
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  margin-right: -45px;
}

.doctor-circle-bg {
  position: absolute;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background-color: transparent;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
}

.doctor-illustration-img {
  position: relative;
  z-index: 2;
  width: 270px;
  height: auto;
  max-height: 310px;
  object-fit: contain;
  display: block;
}

.doctor-profile-card-v2 .doctor-info-card {
  flex: 1;
  background: #ffffff;
  border-radius: 20px;
  padding: 44px 44px 40px 70px;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.04);
  border: 1px solid #f2f0eb;
  z-index: 1;
  position: relative;
  overflow: visible;
}

.doctor-profile-card-v2 .doctor-role-text {
  font-size: 0.95rem;
  font-weight: 700;
  color: #333333;
  margin-bottom: 6px;
}

.doctor-profile-card-v2 .doctor-name {
  font-size: 1.6rem;
  font-weight: 700;
  color: #111111;
  margin-bottom: 24px;
}

.doctor-profile-card-v2 .doctor-ruby {
  font-size: 0.95rem;
  font-weight: 500;
  color: #333333;
}

.doctor-profile-card-v2 .doctor-details-block {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.doctor-profile-card-v2 .doctor-detail-title {
  color: #395CA3;
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: 0.02em;
}

.doctor-profile-card-v2 .specialty-tag {
  background: #F4F3EF;
  color: #333333;
  font-size: 0.84rem;
  font-weight: 600;
  padding: 6px 18px;
  border-radius: 999px;
  display: inline-block;
  border: none;
  box-shadow: none;
}

.doctor-profile-card-v2 .doctor-detail-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.doctor-profile-card-v2 .doctor-detail-list li {
  font-size: 0.88rem;
  color: #333333;
  line-height: 1.75;
  position: relative;
  padding-left: 0;
  font-weight: 500;
}

.doctor-profile-card-v2 .doctor-detail-list li::before {
  display: none;
}

@media (max-width: 768px) {
  .doctor-profile-card-v2 {
    flex-direction: column;
    align-items: center;
  }
  .doctor-illustration-container {
    width: 220px;
    height: 220px;
    margin-right: 0;
    margin-bottom: -40px;
  }
  .doctor-circle-bg {
    width: 200px;
    height: 200px;
  }
  .doctor-illustration-img {
    width: 205px;
    max-height: 230px;
  }
  .doctor-profile-card-v2 .doctor-info-card {
    width: 100%;
    padding: 55px 20px 32px;
    border-radius: 20px;
  }
}

.doctor-photo-container {
  position: relative;
  flex-shrink: 0;
  width: 500px;
  margin-top: 14px;
}

.doctor-photo-offset-bg {
  position: absolute;
  top: 20px;
  left: -20px;
  width: 100%;
  height: 100%;
  background: #e2e8f0;
  border: 1px solid #000;
  border-radius: 20px;
  z-index: 1;
}

.doctor-photo-wrap {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 450px;
  border-radius: 20px;
  border: 1px solid #000;
  overflow: hidden;
  background: #ffffff;
}

.doctor-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 0.5s ease;
}

.doctor-photo-wrap:hover .doctor-photo {
  transform: scale(1.03);
}

.doctor-info-card {
  position: relative;
  flex: 1;
  background: #ffffff;
  border-radius: 24px;
  padding: 48px 56px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.02);
  border: 1px solid #f1f5f9;
  overflow: visible;
}

.doctor-card-peeking-img {
  position: absolute;
  top: -85px;
  right: 25px;
  height: 210px;
  width: auto;
  object-fit: contain;
  z-index: 10;
  pointer-events: none;
  filter: none;
  transition: transform 0.4s ease;
}

.doctor-info-card:hover .doctor-card-peeking-img {
  transform: translateY(-6px) rotate(4deg);
}

.doctor-role-text {
  font-size: 1.25rem;
  font-weight: 500;
  color: #1a202c;
  margin-bottom: 8px;
}

.doctor-name {
  font-size: 1.75rem;
  font-weight: 600;
  color: #1a202c;
  margin-bottom: 28px;
  letter-spacing: 0.02em;
}

.doctor-ruby {
  font-size: 1.25rem;
  font-weight: 500;
  color: #1a202c;
  margin-left: 6px;
}

.doctor-details-block {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.doctor-detail-group {
  background: transparent;
  padding: 0;
  border: none;
  box-shadow: none;
}

.doctor-detail-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #25a884;
  margin-bottom: 14px;
  display: block;
}

.doctor-specialty-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.specialty-tag {
  background: #f5f2ed;
  color: #1a202c;
  border: none;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 8px 22px;
  border-radius: 99px;
  box-shadow: none;
  transition: background 0.2s ease;
}

.specialty-tag:hover {
  background: #e8e3db;
}

.doctor-detail-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.doctor-detail-list li {
  font-size: 0.92rem;
  color: #1a202c;
  font-weight: 500;
  position: relative;
  padding-left: 0;
  line-height: 1.7;
}

.doctor-detail-list li::before {
  display: none;
}

/* --------------------------------------------------------------------------
   Footer Info Cards Section (Fix for Schedule Table Layout)
   -------------------------------------------------------------------------- */
.footer-info-section {
  position: relative;
  padding: 80px 0;
  background: #fff;
  width: 100%;
  overflow: hidden;
}

.footer-bg-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  z-index: 0;
  filter: blur(4px) opacity(0.32) saturate(0.85);
  transform: translateY(0) scale(1.15);
  will-change: transform;
}

.footer-info-section .container {
  position: relative;
  z-index: 1;
  max-width: 1500px;
  margin: 0 auto;
  padding: 0 32px;
}

.footer-three-cards-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 28px;
  width: 100%;
  align-items: stretch;
}

.info-card-box {
  background: #ffffff;
  border-radius: 24px;
  padding: 32px 28px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  height: 100%;
  box-sizing: border-box;
}

.card-combined-group {
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: space-between;
  gap: 24px;
}

.combined-sub-block {
  display: flex;
  flex-direction: column;
}

.contact-block-inline {
  margin-top: auto;
  padding-top: 24px;
  border-top: 1px dashed #e2e8f0;
  text-align: center;
}

.contact-card-full {
  margin-top: 28px;
  padding: 36px 28px;
  text-align: center;
  width: 100%;
  height: auto;
  align-items: center;
  justify-content: center;
}

.contact-full-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.info-card-badge {
  display: inline-block;
  align-self: center;
  background: #eef2f6;
  color: #25a884;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 6px 20px;
  border-radius: 9999px;
  margin-bottom: 20px;
}

.info-zip {
  font-size: 0.9rem;
  font-weight: 600;
  color: #718096;
  margin-bottom: 4px;
}

.info-address {
  font-size: 1.05rem;
  font-weight: 600;
  color: #2d3748;
  margin-bottom: 20px;
}

.map-area-box {
  width: 100%;
  height: 280px;
  background: #e2e8f0;
  border-radius: 16px;
  overflow: hidden;
  margin-top: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.map-area-box iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* --------------------------------------------------------------------------
   Footer Info Cards Section (診療時間表のレイアウト調整版)
   -------------------------------------------------------------------------- */
.timetable-wrapper {
  overflow-x: auto;
  margin-bottom: 12px;
  width: 100%;
}

.schedule-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  /* 列幅を均等かつコンパクトに保つ設定 */
  table-layout: auto;
}

.schedule-table th {
  background: #f1f5f9;
  color: #334155;
  font-weight: 700;
  font-size: 0.82rem;
  padding: 8px 4px;
  border: 1px solid #e2e8f0;
  text-align: center;
  white-space: nowrap;
}

.schedule-table td {
  padding: 6px 4px;
  text-align: center;
  border: 1px solid #e2e8f0;
  vertical-align: middle;
  font-size: 0.85rem;
}

/* 「午 前」「午 後」セル */
.schedule-table td.schedule-category {
  font-size: 0.9rem;
  font-weight: 600;
  color: #25a884;
  background: #f8fafc;
  padding: 6px 4px;
  white-space: nowrap;
  width: 1%;
  /* 必要最低限の幅に固定 */
  border-right: 2px solid #e2e8f0;
}

/* 「外来受付」「訪問診療」および時間の詳細セル */
.schedule-table td.schedule-detail {
  text-align: center;
  font-weight: 600;
  color: #334155;
  padding: 6px 6px;
  white-space: nowrap;
  background: #ffffff;
  border-right: 2px solid #e2e8f0;
  /* min-width を撤去し、テキストにピッタリ沿う最小幅にする */
  width: 1%;
}

.schedule-table .detail-label {
  display: block;
  font-size: 0.78rem;
  color: #1e293b;
  font-weight: 700;
  line-height: 1.3;
}

.schedule-table .detail-time {
  display: block;
  font-size: 0.7rem;
  color: #64748b;
  font-weight: 600;
  border-top: 1px dashed #cbd5e1;
  margin-top: 2px;
  padding-top: 2px;
  line-height: 1.2;
}

/* 月〜日の各○・／マーク列 */
.schedule-table td.circle {
  font-size: 1.05rem;
  color: #25a884;
  font-weight: 700;
  padding: 6px 2px;
}

.schedule-table td.off {
  font-size: 0.9rem;
  color: #94a3b8;
  font-weight: 700;
  padding: 6px 2px;
}

.schedule-subtext {
  font-size: 0.78rem;
  color: #718096;
  line-height: 1.6;
  margin-top: 10px;
}

.contact-sub-label {
  font-size: 0.9rem;
  color: #718096;
  margin-bottom: 0px;
  font-weight: 600;
}

.contact-large-phone {
  font-size: 2.1rem;
  font-weight: 600;
  color: #25a884;
  text-decoration: none;
  display: inline-block;
  margin: 0px 0 0px 0;
  transition: transform 0.2s ease;
}

.contact-large-phone:hover {
  transform: scale(1.05);
}

.site-bottom-footer {
  background: #ffffff;
  padding: 24px 0;
  border-top: 1px solid #edf2f7;
  text-align: center;
}

.copyright-text {
  font-size: 0.85rem;
  color: #718096;
}

/* --------------------------------------------------------------------------
   Subpage Base & Navigation Dropdown
   -------------------------------------------------------------------------- */
.subpage-hero-banner {
  background: #f7f7f8;
  color: #1a202c;
  padding: 130px 24px 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.subpage-cloud-divider {
  background: #f7f7f8;
  height: 125px;
  overflow: visible;
  filter: none;
  margin-bottom: -1px;
}

.subpage-hero-container {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.subpage-tag-badge {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 600;
  color: #25a884;
  background: #edf7f4;
  border: 1px solid #cce8e0;
  padding: 6px 18px;
  border-radius: 9999px;
  letter-spacing: 0.18em;
  margin-bottom: 16px;
  text-transform: uppercase;
}

.subpage-hero-title {
  font-size: 2.5rem;
  font-weight: 600;
  color: #1a202c;
  margin-bottom: 14px;
  letter-spacing: 0.04em;
}

.subpage-hero-desc {
  font-size: 1.05rem;
  color: #4a5568;
  line-height: 1.7;
}

body.subpage .info-card-box {
  box-shadow: none;
  border: 1px solid #edf4f1;
}

.subpage-card {
  background: #ffffff;
  border-radius: 24px;
  border: 1px solid #edf4f1;
  padding: 50px;
  box-shadow: none;
  transition: transform 0.3s ease;
}

.subpage-card:hover {
  box-shadow: none;
}

.subpage-section-header {
  margin-bottom: 24px;
}

.subpage-section-title {
  font-size: 1.75rem;
  font-weight: 600;
  color: #1a202c;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
}

.subpage-section-title::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 28px;
  background: #25a884;
  border-radius: 4px;
}

.specialty-pills {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.specialty-pill {
  background: #edf7f4;
  color: #1f9171;
  font-size: 1.15rem;
  font-weight: 600;
  padding: 12px 28px;
  border-radius: 9999px;
  border: 1px solid #cce8e0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.checkup-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.checkup-item-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 16px 20px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #2d3748;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.2s ease;
}

.checkup-item-card:hover {
  background: #ffffff;
  border-color: #25a884;
  color: #1f9171;
  transform: translateY(-2px);
  box-shadow: none;
}

.checkup-item-card .check-icon {
  color: #25a884;
  font-weight: 600;
}

.first-visit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.first-visit-card {
  background: #f8fafc;
  border-radius: 16px;
  padding: 20px 24px;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  gap: 14px;
}

.first-visit-card .icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #edf7f4;
  color: #25a884;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 600;
  flex-shrink: 0;
}

.first-visit-card .text-content {
  font-size: 0.95rem;
  font-weight: 600;
  color: #2d3748;
  line-height: 1.4;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

.nav-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding-bottom: 4px;
  margin-bottom: -4px;
}

.dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}

.dropdown-arrow {
  font-size: 0.65rem;
  transition: transform 0.25s ease;
  display: inline-block;
}

.nav-dropdown:hover .dropdown-arrow {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 14px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.12);
  padding: 8px 0;
  min-width: 150px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
  z-index: 1000;
}

.nav-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.dropdown-menu a {
  display: block;
  padding: 10px 20px;
  color: #2d3748 !important;
  font-size: 0.9rem !important;
  font-weight: 600 !important;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease;
  text-align: center;
  border-radius: 6px;
  margin: 2px 6px;
}

.dropdown-menu a:hover {
  background: #edf7f4 !important;
  color: #25a884 !important;
}

/* --------------------------------------------------------------------------
   Modal Overlays Style Block (厳格な初期非表示設定)
   -------------------------------------------------------------------------- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

.modal-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 40px;
  max-width: 480px;
  width: 90%;
  text-align: center;
  box-shadow: var(--shadow-lg);
  transform: translateY(20px) scale(0.95);
  transition: transform 0.3s ease;
}

.modal-overlay.active .modal-card {
  transform: translateY(0) scale(1);
}

.area-modal-card {
  max-width: 1360px !important;
  width: 95vw !important;
  height: 92vh !important;
  max-height: 920px !important;
  padding: 0 !important;
  border-radius: 20px !important;
  overflow: hidden !important;
  position: relative;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35) !important;
}

.area-modal-body-grid {
  display: flex;
  width: 100%;
  height: 100%;
}

.area-modal-sidebar {
  width: 350px;
  min-width: 320px;
  padding: 32px 28px;
  background: var(--bg-card);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  z-index: 2;
  overflow-y: auto;
}

.area-modal-badge {
  display: inline-block;
  align-self: flex-start;
  background: var(--primary-light);
  color: var(--primary-color);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 4px 14px;
  border-radius: 99px;
  margin-bottom: 12px;
}

.area-modal-title {
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.35;
  margin-bottom: 14px;
}

.area-modal-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 20px;
}

.area-tag-header {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.area-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 24px;
}

.area-tag {
  background: var(--bg-subtle);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 4px 11px;
  border-radius: 6px;
}

.area-sidebar-footer {
  margin-top: auto;
  padding-top: 16px;
}

.area-close-btn {
  width: 100%;
  padding: 12px 24px;
  background: var(--primary-color);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.2);
  transition: background 0.2s ease, transform 0.2s ease;
}

.area-close-btn:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.area-modal-map-wrap {
  flex: 1;
  height: 100%;
  position: relative;
  background: var(--bg-subtle);
}

.area-map-box {
  width: 100%;
  height: 100% !important;
  min-height: 100% !important;
  border-radius: 0 !important;
  border: none !important;
  margin-bottom: 0 !important;
  z-index: 1;
}

.area-modal-close-x {
  position: absolute;
  top: 16px;
  right: 18px;
  z-index: 999;
  background: rgba(255, 255, 255, 0.92);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--text-main);
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.area-modal-close-x:hover {
  transform: scale(1.1);
  background: #ffffff;
}

/* --------------------------------------------------------------------------
   Responsive Media Queries
   -------------------------------------------------------------------------- */
@media (max-width: 992px), (max-width: 1024px) and (orientation: portrait) {
  .nav-links {
    display: none;
  }

  .services-layout {
    grid-template-columns: 1fr;
  }

  .footer-content-grid {
    grid-template-columns: 1fr;
  }

  .footer-info-section .container {
    padding: 0 20px;
  }

  .footer-three-cards-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .hero-content-card {
    margin: 0 16px 20px 16px;
    padding: 24px 20px;
  }
}

@media (max-width: 860px), (max-width: 1024px) and (orientation: portrait) {
  .area-modal-body-grid {
    flex-direction: column;
    overflow-y: auto;
  }

  .area-modal-sidebar {
    width: 100%;
    min-width: 100%;
    height: auto;
    padding: 24px 20px;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
  }

  .area-modal-map-wrap {
    height: 55vh;
    min-height: 320px;
  }
}

@media (max-width: 768px), (max-width: 1024px) and (orientation: portrait) {
  .doctor-profile-card {
    flex-direction: column;
    text-align: center;
    padding: 28px;
  }

  .doctor-photo-wrap {
    width: 200px;
    height: 200px;
    margin: 0 auto;
  }

  .doctor-card-peeking-img {
    height: 140px;
    top: -55px;
    right: 15px;
  }
}

@media (max-width: 640px) {
  .doctor-car-group {
    transform: scale(0.8);
    transform-origin: bottom right;
  }
}

/* --------------------------------------------------------------------------
   Leaflet Area Map Labels & Modal Styles
   -------------------------------------------------------------------------- */
.map-label-main {
  background: rgba(195, 60, 90, 0.9) !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 6px !important;
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  padding: 4px 10px !important;
  white-space: nowrap !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
}

.map-label-main::before {
  display: none !important;
}

.map-label-sub {
  background: rgba(26, 32, 44, 0.85) !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 5px !important;
  font-size: 0.7rem !important;
  font-weight: 600 !important;
  padding: 3px 8px !important;
  white-space: nowrap !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15) !important;
}

.map-label-sub::before {
  display: none !important;
}

.area-map-modal-backdrop {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease-out;
}

.area-map-modal-backdrop.is-active {
  opacity: 1;
  pointer-events: auto;
}

.area-map-modal-card {
  opacity: 0;
  transform: translateY(20px) scale(0.97);
  transition: opacity 0.25s ease-out, transform 0.25s ease-out;
  will-change: transform, opacity;
}

.area-map-modal-backdrop.is-active .area-map-modal-card {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.area-map-modal-backdrop.is-closing {
  opacity: 0;
}

.area-map-modal-backdrop.is-closing .area-map-modal-card {
  opacity: 0;
  transform: translateY(15px) scale(0.97);
}



/* --------------------------------------------------------------------------
   CLINIC (医院紹介) & 院内写真ギャラリー (5枚) スタイル
   -------------------------------------------------------------------------- */
.clinic-photos-section {
  margin-top: 64px;
  text-align: center;
  width: 100%;
  box-sizing: border-box;
}

.clinic-photos-title {
  font-size: 1.35rem;
  font-weight: 600;
  color: #1a202c;
  margin-bottom: 28px;
  position: relative;
  display: inline-block;
}

.clinic-photos-title::after {
  content: '';
  display: block;
  width: 36px;
  height: 3px;
  background: #25a884;
  margin: 10px auto 0 auto;
  border-radius: 9999px;
}

.clinic-photos-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 20px;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
}

.clinic-photo-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

/* ご指定の news-thumbnail-wrap と同一の正方形・角丸20px・黒枠線スタイル */
.clinic-photo-wrap {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  margin-bottom: 0;
  box-shadow: none;
  background: #ffffff;
  border: 1px solid #000000;
  transition: transform 0.3s ease;
  box-sizing: border-box;
}

.clinic-photo-wrap:hover {
  transform: scale(1.03);
}

.clinic-photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.clinic-photo-wrap:hover .clinic-photo-img {
  transform: scale(1.05);
}

.clinic-photo-placeholder {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000000;
  font-size: 2.2rem;
  box-sizing: border-box;
}

.clinic-photo-caption {
  font-size: 0.85rem;
  font-weight: 600;
  color: #4a5568;
  margin-top: 10px;
  line-height: 1.4;
}

/* レスポンシブ対応 */
@media (max-width: 1024px) {
  .clinic-photos-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }
}

@media (max-width: 640px) {
  .clinic-photos-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
}

/* --------------------------------------------------------------------------
   写真拡大 Lightbox モーダル (フェード＆スライダーアニメーション対応)
   -------------------------------------------------------------------------- */
.lightbox-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.lightbox-modal.is-active {
  opacity: 1;
}

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transform: scale(0.92);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.lightbox-modal.is-active .lightbox-content {
  transform: scale(1);
}

.lightbox-img {
  max-width: 90vw;
  max-height: 75vh;
  object-fit: contain;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
  user-select: none;
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.lightbox-img.is-swapping {
  opacity: 0;
  transform: scale(0.96);
}

.lightbox-caption-text {
  color: #ffffff;
  font-size: 1.05rem;
  font-weight: 600;
  margin-top: 14px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
  text-align: center;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #ffffff;
  font-size: 1.8rem;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.2s ease;
  z-index: 100001;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.35);
  transform: scale(1.08);
}

.lightbox-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #ffffff;
  font-size: 2.2rem;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.2s ease;
  user-select: none;
  z-index: 100001;
}

.lightbox-btn:hover {
  background: rgba(255, 255, 255, 0.35);
  transform: translateY(-50%) scale(1.08);
}

.lightbox-prev {
  left: 24px;
}

.lightbox-next {
  right: 24px;
}

.lightbox-counter {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.85rem;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  letter-spacing: 0.1em;
  background: rgba(0, 0, 0, 0.5);
  padding: 4px 16px;
  border-radius: 9999px;
}

/* ── Information Accordion & Fee Table Styles ── */
.info-accordion-group {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 32px;
}

.info-accordion {
  background: #ffffff;
  border-radius: 20px;
  border: 1px solid #edf4f1;
  overflow: hidden;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.info-accordion:hover {
  border-color: #cce8e0;
}

.info-accordion[open] {
  border-color: #25a884;
  box-shadow: 0 4px 20px rgba(37, 168, 132, 0.08);
}

.info-accordion-summary {
  padding: 26px 50px;
  font-size: 1.15rem;
  font-weight: 600;
  color: #1a202c;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
  list-style: none;
  background: #ffffff;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.info-accordion-summary::-webkit-details-marker,
.info-accordion-summary::marker {
  display: none;
}

.info-accordion-summary:hover {
  background-color: #f7faf9;
  color: #25a884;
}

.info-accordion-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #edf7f4;
  color: #25a884;
  transition: transform 0.3s ease, background 0.2s ease, color 0.2s ease;
  flex-shrink: 0;
  margin-left: 12px;
}

.info-accordion-summary:hover .info-accordion-icon {
  background: #25a884;
  color: #ffffff;
}

.info-accordion[open] .info-accordion-icon {
  transform: rotate(180deg);
  background: #25a884;
  color: #ffffff;
}

.info-accordion-content {
  padding: 40px 50px 50px;
  border-top: 1px solid #edf4f1;
  background: #ffffff;
  color: #4a5568;
  font-size: 0.95rem;
  line-height: 1.75;
}

@media (max-width: 768px), (max-width: 1024px) and (orientation: portrait) {
  .subpage-card,
  .homecare-sub-card {
    padding: 24px;
  }
  .info-accordion-summary {
    padding: 20px 24px;
  }
  .info-accordion-content {
    padding: 24px;
  }
}

/* 施設基準等 */
.facility-item {
  margin-bottom: 24px;
}

.facility-item:last-child {
  margin-bottom: 0;
}

.facility-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1a202c;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.facility-title::before {
  content: '●';
  color: #25a884;
  font-size: 0.85rem;
}

.facility-desc {
  color: #4a5568;
  margin-bottom: 10px;
}

.facility-list {
  list-style: none;
  padding: 0;
  margin: 0 0 10px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.facility-list li {
  position: relative;
  padding-left: 20px;
  color: #4a5568;
}

.facility-list li::before {
  content: '・';
  position: absolute;
  left: 4px;
  top: 0;
  color: #25a884;
  font-weight: bold;
}

.facility-note {
  background: #f7faf9;
  border-left: 4px solid #25a884;
  padding: 14px 18px;
  border-radius: 0 10px 10px 0;
  font-size: 0.9rem;
  color: #4a5568;
  margin-top: 12px;
  line-height: 1.7;
}

/* 保険外負担金 テーブル (2列グリッド対応) */
.fee-table-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 992px) {
  .fee-table-grid {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }
}

.fee-table-wrapper {
  overflow-x: auto;
  border-radius: 14px;
  border: 1px solid #edf4f1;
  background: #ffffff;
}

.fee-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.93rem;
  text-align: left;
}

.fee-table th {
  background: #edf7f4;
  color: #1f9171;
  font-weight: 700;
  padding: 14px 20px;
  border-bottom: 1px solid #cce8e0;
}

.fee-table th:last-child {
  text-align: right;
}

.fee-table td {
  padding: 13px 20px;
  border-bottom: 1px solid #edf4f1;
  color: #2d3748;
}

.fee-table tr:last-child td {
  border-bottom: none;
}

.fee-table tr:nth-child(even) td {
  background-color: #fafdfc;
}

.fee-table tr:hover td {
  background-color: #f0f9f6;
}

.fee-price {
  text-align: right;
  font-weight: 600;
  white-space: nowrap;
  color: #1a202c;
}

/* ── Homecare Sub-Cards & Details ── */
.homecare-sub-card {
  background: #ffffff;
  border-radius: 24px;
  border: 1px solid #edf4f1;
  padding: 50px;
  margin-top: 32px;
}

.homecare-card-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: #1a202c;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
}


/* 訪問診療でできること List */
.homecare-services-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.homecare-service-item {
  background: #fcfdfe;
  border: 1px solid #edf4f1;
  border-radius: 16px;
  padding: 20px 24px;
  display: flex;
  align-items: flex-start;
  gap: 20px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.homecare-service-item:hover {
  border-color: #cce8e0;
  box-shadow: 0 4px 14px rgba(37, 168, 132, 0.06);
}

.homecare-service-num {
  background: #edf7f4;
  color: #1f9171;
  font-size: 1.1rem;
  font-weight: 800;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-family: 'Outfit', sans-serif;
}

.homecare-service-body {
  flex: 1;
}

.homecare-service-heading {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1a202c;
  margin-bottom: 6px;
}

.homecare-service-desc {
  font-size: 0.93rem;
  color: #4a5568;
  line-height: 1.7;
  margin: 0;
}

/* 費用の目安 */
.homecare-cost-intro {
  font-size: 0.96rem;
  color: #4a5568;
  line-height: 1.75;
  margin-bottom: 24px;
}

.homecare-cost-box {
  background: #f7faf9;
  border: 1px solid #cce8e0;
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 20px;
}

.homecare-cost-box-title {
  font-size: 1rem;
  font-weight: 700;
  color: #1f9171;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.homecare-cost-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.homecare-cost-item {
  background: #ffffff;
  border: 1px solid #e2ece8;
  border-radius: 12px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.homecare-cost-ratio {
  font-size: 0.95rem;
  font-weight: 600;
  color: #2d3748;
}

.homecare-cost-amount {
  font-size: 1.05rem;
  font-weight: 700;
  color: #25a884;
}

.homecare-cost-notes {
  font-size: 0.88rem;
  color: #718096;
  line-height: 1.75;
}

.homecare-cost-notes p {
  margin: 4px 0 0 0;
}

/* 相談案内 */
.homecare-consult-box {
  background: linear-gradient(135deg, #ffffff 0%, #f4fbf8 100%);
  border: 2px dashed #25a884;
  border-radius: 20px;
  padding: 28px;
  margin-top: 32px;
  text-align: center;
}

.homecare-consult-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #1f9171;
  margin-bottom: 10px;
}

.homecare-consult-desc {
  font-size: 0.95rem;
  color: #4a5568;
  line-height: 1.7;
  margin-bottom: 18px;
}

.homecare-consult-phone {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #25a884;
  color: #ffffff;
  font-size: 1.25rem;
  font-weight: 700;
  font-family: 'Outfit', sans-serif;
  padding: 12px 32px;
  border-radius: 9999px;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.15s ease;
}

.homecare-consult-phone:hover {
  background: #1f9171;
  transform: translateY(-2px);
  color: #ffffff;
}

/* --------------------------------------------------------------------------
   Hero WebM Animation (tsumu.webm) & Official Caption
   -------------------------------------------------------------------------- */
@keyframes floatHeroDog {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes floatHeroDogMetronome {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  25% {
    transform: translateY(-8px) rotate(-6deg);
  }
  50% {
    transform: translateY(0) rotate(0deg);
  }
  75% {
    transform: translateY(-8px) rotate(6deg);
  }
}

.hero-dog-container {
  position: absolute;
  bottom: 62px;
  left: 4%;
  height: 36vh;
  z-index: 30;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.hero-dog-video {
  height: 36vh;
  width: auto;
  display: block;
  pointer-events: none;
  object-fit: contain;
  animation: floatHeroDog 3.5s ease-in-out infinite;
}

/* Dog Caption Label ("イエDEミル公式キャラクター「つむりん」") */
.dog-name-caption {
  position: absolute;
  bottom: -30px;
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  opacity: 0;
  pointer-events: none;
  z-index: 26;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 0.68rem;
  font-weight: 500;
  color: #000000;
  white-space: nowrap;
  letter-spacing: 0.03em;
  transition: transform 0.5s ease-out, opacity 0.5s ease-out;
}

.hero-dog-container.is-caption-shown .dog-name-caption,
.hero-con-container.is-caption-shown .dog-name-caption {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

@media (max-width: 768px), (max-width: 1024px) and (orientation: portrait) {
  .hero-dog-container {
    height: 25vh;
    bottom: 55px;
    left: 4%;
  }
  .hero-dog-video {
    height: 25vh;
    animation: floatHeroDogMetronome 4.5s ease-in-out infinite;
    transform-origin: bottom center;
  }
}

/* ==========================================================================
   Top Hero Sparkle Spots & Inline Character Pop Engine
   ========================================================================== */

/* Sparkle Spots Wrapper (Overlays Hero Canvas Area) */
.sparkle-spots-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 25;
}

/* Individual Sparkle Spot Button */
.sparkle-spot-btn {
  position: absolute;
  width: 44px;
  height: 44px;
  margin-left: -22px;
  margin-top: -22px;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  pointer-events: auto;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.3);
  transition: opacity 0.3s ease, visibility 0.3s ease;
  outline: none;
}

.sparkle-spot-btn.is-active {
  opacity: 1;
  visibility: visible;
  animation: sparklePulse5Times 6s cubic-bezier(0.36, 0, 0.66, 1) forwards;
}

/* Glowing Sparkle Core */
.sparkle-core {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 32px;
  height: 32px;
  margin-left: -16px;
  margin-top: -16px;
  background: radial-gradient(circle, #ffffff 30%, #ffd700 70%, #ff9800 100%);
  border-radius: 50%;
  box-shadow: 0 0 16px #ffe600, 0 0 30px #ff9800, inset 0 0 8px #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sparkle-star-icon {
  width: 20px;
  height: 20px;
  fill: #ffffff;
  filter: drop-shadow(0 0 4px #ff5722);
}

/* Aura Rings */
.sparkle-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 50%;
  border: 2px solid #ffe600;
  pointer-events: none;
}

.sparkle-ring.ring-1 {
  width: 44px;
  height: 44px;
  margin-left: -22px;
  margin-top: -22px;
  animation: ringExpand 1.5s infinite linear;
}

.sparkle-ring.ring-2 {
  width: 60px;
  height: 60px;
  margin-left: -30px;
  margin-top: -30px;
  animation: ringExpand 1.5s infinite linear 0.75s;
}

/* 5 Flashes Animation (Pulse 5 times then fade) */
@keyframes sparklePulse5Times {
  0% {
    opacity: 0;
    transform: scale(0.2) rotate(0deg);
  }
  10% {
    opacity: 1;
    transform: scale(1.3) rotate(72deg);
    filter: drop-shadow(0 0 15px #ffe600);
  }
  20% {
    opacity: 0.3;
    transform: scale(0.8) rotate(144deg);
  }
  30% {
    opacity: 1;
    transform: scale(1.35) rotate(216deg);
    filter: drop-shadow(0 0 18px #ff9800);
  }
  40% {
    opacity: 0.3;
    transform: scale(0.8) rotate(288deg);
  }
  50% {
    opacity: 1;
    transform: scale(1.4) rotate(360deg);
    filter: drop-shadow(0 0 20px #ffe600);
  }
  60% {
    opacity: 0.3;
    transform: scale(0.8) rotate(432deg);
  }
  70% {
    opacity: 1;
    transform: scale(1.35) rotate(504deg);
    filter: drop-shadow(0 0 18px #ff9800);
  }
  80% {
    opacity: 0.3;
    transform: scale(0.8) rotate(576deg);
  }
  90% {
    opacity: 1;
    transform: scale(1.3) rotate(648deg);
  }
  100% {
    opacity: 0;
    transform: scale(0.2) rotate(720deg);
  }
}

@keyframes ringExpand {
  0% {
    transform: scale(0.5);
    opacity: 1;
  }
  100% {
    transform: scale(1.5);
    opacity: 0;
  }
}

/* Click Particle Burst */
.sparkle-click-burst {
  position: fixed;
  pointer-events: none;
  z-index: 99999;
}

.burst-particle {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  animation: burstParticleAnim 0.7s ease-out forwards;
}

@keyframes burstParticleAnim {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate(calc(cos(var(--angle)) * var(--distance)), calc(sin(var(--angle)) * var(--distance))) scale(0);
    opacity: 0;
  }
}

/* ==========================================================================
   Inline Character Pop-out Element at Clicked Location (c1-2.png ~ c15-2.png)
   ========================================================================== */
.char-spot-pop-element {
  position: absolute;
  pointer-events: none;
  z-index: 999;
  transform: translate(-50%, -50%);
  animation: charSpotPopOut 0.85s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

.char-spot-pop-element.is-fading {
  animation: charSpotPopFade 0.4s ease forwards !important;
}

.char-spot-pop-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.char-spot-pop-img {
  height: 180px;
  width: auto;
  max-width: 300px;
  object-fit: contain;
  filter: drop-shadow(0 14px 28px rgba(0, 0, 0, 0.3)) drop-shadow(0 0 20px rgba(255, 230, 0, 0.85));
}

@media (max-width: 768px) {
  .char-spot-pop-img {
    height: 130px;
    max-width: 220px;
  }
}

@keyframes charSpotPopOut {
  0% {
    opacity: 0;
    transform: translate(-50%, -20%) scale(0.15) rotate(-12deg);
  }
  45% {
    opacity: 1;
    transform: translate(-50%, -75%) scale(1.15) rotate(5deg);
  }
  70% {
    transform: translate(-50%, -85%) scale(0.97) rotate(-2deg);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -90%) scale(1) rotate(0deg);
  }
}

@keyframes charSpotPopFade {
  0% {
    opacity: 1;
    transform: translate(-50%, -90%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -115%) scale(0.5);
  }
}

/* Fullscreen Backdrop (Click outside to close) */
.char-pop-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 999998;
  opacity: 0;
  animation: charBackdropFadeIn 0.45s ease forwards;
  cursor: pointer;
}

.char-pop-backdrop.is-closing {
  animation: charBackdropFadeOut 0.35s ease forwards;
}

@keyframes charBackdropFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes charBackdropFadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

/* Character Popup Card Container (Square-like Centered Modal) */
.char-pop-card-container {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 999999;
  pointer-events: auto;
  width: 520px;
  min-height: 520px;
  max-width: 92vw;
  max-height: 90vh;
  overflow: visible !important;
  background: #ffffff;
  border-radius: 36px;
  padding: 28px 28px 24px;
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.32), 0 0 0 3px rgba(255, 255, 255, 0.95);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  transform-origin: center center;
  animation: charCardComicPopIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
}

.char-pop-card-container.is-closing {
  animation: charCardComicPopOut 0.35s cubic-bezier(0.5, 0, 0.75, 0) forwards !important;
}

/* Comical Pop-in Animations */
@keyframes charCardComicPopIn {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.2) rotate(-10deg);
  }
  60% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.05) rotate(2deg);
  }
  80% {
    transform: translate(-50%, -50%) scale(0.97) rotate(-1deg);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1) rotate(0deg);
  }
}

@keyframes charCardComicPopOut {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1) rotate(0deg);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.3) rotate(12deg) translateY(20px);
  }
}

/* Close Button (Top-Right) */
.char-pop-close-btn {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #f0f3f5;
  border: 1px solid #e2e8f0;
  color: #444444;
  font-size: 17px;
  line-height: 1;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 30;
  outline: none;
}

.char-pop-close-btn:hover {
  background: #ff4757;
  color: #ffffff;
  border-color: #ff4757;
  transform: scale(1.15) rotate(90deg);
}

/* Header Section */
.char-pop-header {
  text-align: center;
  margin-bottom: 8px;
  width: 100%;
}

.char-pop-entry-no {
  display: block;
  width: 100%;
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  color: #333333;
  margin-bottom: 4px;
  letter-spacing: 0.5px;
}

.entry-prefix {
  display: none;
}

.vote-title-text {
  font-size: 0.82em;
  font-weight: 500;
  color: #555555;
  margin: 0 3px;
}

/* Simple Muted Rank Text Colors (くすみカラー) */
.rank-text {
  font-weight: 800;
  margin-left: 6px;
}

.rank-text.rank-top {
  color: #ab4642; /* 最優秀賞: くすみワインレッド */
}

.rank-text.rank-1st {
  color: #aa7227; /* 1位: くすみマスタードゴールド */
}

.rank-text.rank-2nd {
  color: #5a6d7c; /* 2位: くすみスレートグレー */
}

.rank-text.rank-3rd {
  color: #9e5932; /* 3位: くすみテラコッタブロンズ */
}

.rank-text.rank-prize {
  color: #3f786d; /* 入賞: くすみセージグリーン */
}

.char-pop-title-wrap {
  position: relative;
  display: block;
  width: 100%;
  text-align: center;
  margin-top: 2px;
}

.char-pop-title {
  display: block;
  width: 100%;
  text-align: center;
  font-size: 28px;
  font-weight: 900;
  color: #111111;
  margin: 0;
  letter-spacing: 0.5px;
  line-height: 1.2;
  white-space: nowrap;
  position: relative;
  z-index: 1;
}

}

/* Body Section (Centered Layout with Floating Overflow Bubble) */
.char-pop-body {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  margin: 8px 0 12px;
  overflow: visible !important;
}

/* Giant Character Illustration Centered */
.char-pop-img-wrapper {
  width: 380px;
  height: 380px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin: 0 auto;
}

.char-pop-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 16px 32px rgba(0, 0, 0, 0.22));
  animation: charPlayfulFloat 3s ease-in-out infinite;
  transform-origin: center center;
}

@keyframes charPlayfulFloat {
  0%, 100% {
    transform: translateY(0) rotate(0deg) scale(var(--char-scale, 1));
  }
  25% {
    transform: translateY(-10px) rotate(-3deg) scale(calc(var(--char-scale, 1) * 1.03));
  }
  50% {
    transform: translateY(0) rotate(0deg) scale(var(--char-scale, 1));
  }
  75% {
    transform: translateY(-5px) rotate(3deg) scale(calc(var(--char-scale, 1) * 0.98));
  }
}

/* Speech Bubble (Horizontal Wide Banner between Character Name and Character Image) */
.char-pop-speech-bubble {
  position: relative;
  width: 440px;
  max-width: 95%;
  margin: 8px auto 14px;
  background: #ffffff;
  border: 3px solid #222222;
  border-radius: 20px;
  padding: 12px 18px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.12);
  z-index: 20;
  opacity: 0;
  transform: scale(0.3) translateY(-10px);
  animation: bubbleDelayedComicPopIn 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) 0.55s forwards;
}

@keyframes bubbleDelayedComicPopIn {
  0% {
    opacity: 0;
    transform: scale(0.3) translateY(-10px);
  }
  60% {
    opacity: 1;
    transform: scale(1.05) translateY(2px);
  }
  80% {
    transform: scale(0.97) translateY(-1px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.char-pop-speech-text {
  font-size: 14.5px;
  font-weight: 700;
  color: #222222;
  line-height: 1.5;
  text-align: center;
  word-break: break-word;
}

/* Speech Bubble Tail (Pointing Downwards towards character image below) */
.char-pop-speech-tail {
  position: absolute;
  bottom: -13px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 13px solid #222222;
  z-index: 2;
}

.char-pop-speech-tail::after {
  content: "";
  position: absolute;
  top: -16px;
  left: -7px;
  width: 0;
  height: 0;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-top: 11px solid #ffffff;
}

/* Footer Section */
.char-pop-footer {
  border-top: 1px dashed #cbd5e1;
  padding-top: 12px;
  text-align: center;
  width: 100%;
}

.char-pop-creator {
  font-size: 15px;
  font-weight: 800;
  color: #1e293b;
  letter-spacing: 0.3px;
}

/* Responsive Mobile Scaling */
@media (max-width: 580px) {
  .char-pop-card-container {
    width: 92vw;
    min-height: auto;
    padding: 24px 18px 20px;
    border-radius: 26px;
  }
  .char-pop-img-wrapper {
    width: 260px;
    height: 260px;
  }
  .char-pop-speech-bubble {
    width: 100%;
    margin: 6px 0 10px;
    padding: 10px 14px;
  }
  .char-pop-speech-text {
    font-size: 13px;
  }
  .char-pop-title {
    font-size: 24px;
  }
}

/* ==========================================================================
   Fairy Hint Container & Character WebM (con.webm)
   ========================================================================== */
.hero-con-container {
  position: absolute;
  bottom: 62px;
  right: 4%;
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.con-text-group {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.fairy-hint-bubble {
  position: relative;
  margin-bottom: 10px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1.5px solid #3b82f6;
  border-radius: 99px;
  padding: 4px 10px 4px 9px;
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.18), 0 2px 6px rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  gap: 4px;
  pointer-events: auto;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  color: #1e293b;
  white-space: nowrap;
  animation: hintBubbleFloat 3.5s ease-in-out infinite;
}

.fairy-hint-bubble::after {
  content: '';
  position: absolute;
  bottom: -7px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 7px solid #3b82f6;
}

.fairy-hint-icon {
  font-size: 0.85rem;
  animation: fairySparklePulse 1.5s ease-in-out infinite alternate;
}

/* Character Video Container & Video (con.webm - 2/3 of Tsumurin's height) */
.hero-con-wrapper {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  pointer-events: none;
}

.hero-con-video {
  height: 24vh; /* 2/3 size of Tsumurin (36vh * 2/3 = 24vh) */
  width: auto;
  display: block;
  pointer-events: none;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.12));
}

@keyframes hintBubbleFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@keyframes fairySparklePulse {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(1.2); opacity: 1; filter: drop-shadow(0 0 6px #ffe600); }
}

@media (max-width: 768px), (max-width: 1024px) and (orientation: portrait) {
  .hero-con-container {
    bottom: 55px;
    right: 3%;
  }

  .hero-con-video {
    height: 20vh; /* slightly larger size on mobile */
    animation: floatHeroDog 4.2s ease-in-out infinite;
  }

  .fairy-hint-bubble {
    font-size: 0.60rem;
    padding: 3px 8px 3px 7px;
    margin-bottom: 6px;
  }
}

/* Subpage Cloud Divider Tsumurin Character ("tsumu.webm") */
.subpage-tsumu-container {
  position: absolute;
  right: 12%;
  bottom: -125px;
  z-index: 10;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.subpage-tsumu-video {
  height: 220px;
  width: auto;
  display: block;
  pointer-events: none;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.1));
  animation: floatHeroDog 3.5s ease-in-out infinite;
}

@media (max-width: 768px), (max-width: 1024px) and (orientation: portrait) {
  .subpage-tsumu-container {
    right: 8%;
    bottom: -115px;
  }
  .subpage-tsumu-video {
    height: 140px;
  }
}

/* --------------------------------------------------------------------------
   Position Adjuster Panels (Buildings & Map Pins) - Hidden by default
   -------------------------------------------------------------------------- */
.bg-adjuster-panel {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  position: fixed;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(12px);
  color: #f8fafc;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
  padding: 14px;
  font-family: 'Outfit', -apple-system, sans-serif;
  font-size: 0.82rem;
  width: 380px;
  max-width: calc(100vw - 32px);
  z-index: 9999;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Active Adjuster Mode */
body.adjuster-mode-active .bg-adjuster-panel {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

body.adjuster-mode-active .map-pin {
  pointer-events: auto !important;
  cursor: grab !important;
}

#bg-adjuster-panel {
  top: 16px;
  right: 16px;
}

#road-adjuster-panel {
  top: 16px;
  right: 412px;
}

#pin-adjuster-panel {
  top: 16px;
  left: 16px;
}

.bg-adjuster-panel.collapsed .bg-adj-body {
  display: none !important;
}

.bg-adj-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
  font-size: 0.9rem;
  color: #38bdf8;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 10px;
}

.bg-adj-btn-mini {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}
.bg-adj-btn-mini:hover {
  background: rgba(255, 255, 255, 0.25);
}

.bg-adj-tabs {
  display: grid;
  gap: 4px;
  margin-bottom: 12px;
}

.bg-adj-tab {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bg-adj-tab:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.bg-adj-tab.active {
  background: #0284c7;
  border-color: #38bdf8;
  color: #fff;
  font-weight: 700;
}

.bg-adj-row {
  margin-bottom: 10px;
}

.bg-adj-row label {
  display: block;
  font-size: 0.75rem;
  color: #94a3b8;
  margin-bottom: 4px;
}

.bg-adj-row label span {
  color: #38bdf8;
  font-weight: 700;
}

.bg-adj-input-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.bg-adj-input-group input[type="range"] {
  flex: 1;
  accent-color: #38bdf8;
  cursor: pointer;
}

.bg-adj-input-group input[type="number"] {
  width: 60px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  border-radius: 4px;
  padding: 3px 6px;
  font-size: 0.75rem;
  text-align: right;
}

.bg-adj-step {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #e2e8f0;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.7rem;
  cursor: pointer;
}
.bg-adj-step:hover {
  background: rgba(255, 255, 255, 0.25);
}

.bg-adj-code-section {
  margin-top: 12px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.bg-adj-code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.72rem;
  color: #94a3b8;
  margin-bottom: 6px;
}

.bg-adj-copy-btn {
  background: #10b981;
  border: none;
  color: #fff;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease;
}
.bg-adj-copy-btn:hover {
  background: #059669;
}

#bg-adj-code-box, #pin-adj-code-box {
  width: 100%;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #38bdf8;
  font-family: monospace;
  font-size: 0.7rem;
  padding: 6px;
  border-radius: 6px;
  resize: vertical;
}

.bg-adj-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #0284c7;
  color: #ffffff;
  padding: 10px 24px;
  border-radius: 9999px;
  font-weight: 700;
  font-size: 0.88rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  z-index: 10000;
}

html, body {
  width: 100vw;
  max-width: 100%;
  overflow-x: hidden !important;
}

/* --------------------------------------------------------------------------
   Responsive Layout & Hero Mobile Aspect Ratio / Horizontal Scroll Engine
   -------------------------------------------------------------------------- */
/* PC Medium & Desktop Screen Positioning: Tsumurin & hero-content-card barely touching distance */
@media (min-width: 769px) and (orientation: landscape), (min-width: 1025px) {
  .hero-dog-container {
    position: absolute;
    height: min(34vh, 260px);
    bottom: 48px;
    left: 16px;
    z-index: 35;
  }
  .hero-dog-video {
    height: min(34vh, 260px);
  }
  .hero-content-card {
    margin-left: 55px !important;
    max-width: min(580px, calc(100% - 70px)) !important;
    padding: 26px 34px;
  }
}

/* Dog & Con Caption Labels (Smaller & refined) */
.dog-name-caption {
  position: absolute;
  bottom: -22px;
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  opacity: 0;
  pointer-events: none;
  z-index: 26;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 0.52rem;
  font-weight: 500;
  color: #1e293b;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(4px);
  padding: 1px 6px;
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  white-space: nowrap;
  letter-spacing: 0.02em;
  transition: transform 0.5s ease-out, opacity 0.5s ease-out;
}

.hero-scroll-hint {
  display: none;
}

@media (max-width: 768px), (max-width: 1024px) and (orientation: portrait) {
  .hero {
    position: relative;
    height: 100vh;
    min-height: 100vh;
    width: 100vw;
    max-width: 100vw;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x pan-y;
    scrollbar-width: none;
  }
  .hero::-webkit-scrollbar {
    display: none;
  }

  /* JS Dynamic 16:9 Container (Synchronized to 100vh height) */
  .canvas-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    transform: none;
    min-width: 0;
  }

  #iso-canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
  }

  .main-content-wrapper {
    margin-top: -50px;
  }

  .cloud-divider-svg .path-pc {
    display: none;
  }
  .cloud-divider-svg .path-mobile {
    display: block;
  }

  .hero-overlay {
    display: none !important;
  }

  .hero-content-card {
    display: none !important;
  }

  /* Tsumurin on Mobile - Slightly larger and moved lower down */
  .hero-dog-container {
    position: fixed;
    bottom: 20px;
    left: 10px;
    height: min(24vh, 155px);
    z-index: 45;
  }
  .hero-dog-video {
    height: min(24vh, 155px);
  }

  /* Header Phone Hidden on Mobile & Hamburger Menu Styles */
  .nav-phone {
    display: none !important;
  }

  .hamburger-btn {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 6px;
    background: var(--surface-card, #ffffff);
    border: 1px solid var(--border-color, #cbd5e1);
    border-radius: 10px;
    cursor: pointer;
    z-index: 1001;
    transition: all 0.25s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  }

  .hamburger-btn span {
    display: block;
    width: 20px;
    height: 2px;
    background-color: var(--text-main, #1e293b);
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .hamburger-btn.is-active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .hamburger-btn.is-active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
  }
  .hamburger-btn.is-active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .nav-links {
    display: flex !important;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100vw;
    max-height: calc(100vh - 70px);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    flex-direction: column;
    padding: 20px 16px 28px;
    gap: 10px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.15);
    border-bottom: 1px solid var(--border-color, #e2e8f0);
    overflow-y: auto;
    transform: translateY(-20px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease, visibility 0.25s ease;
    z-index: 1000;
  }

  .nav-links.is-open {
    display: flex !important;
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .nav-links a {
    font-size: 1.02rem;
    font-weight: 700;
    padding: 12px 16px;
    border-radius: 12px;
    width: 100%;
    text-align: center;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: var(--text-main, #1e293b);
  }

  .nav-links a.active {
    background: #f8fafc;
    color: var(--text-main, #1e293b) !important;
  }

  /* Mobile Container */
  .container {
    max-width: 90%;
    margin: 0 auto;
    padding: 0 24px;
  }

  /* About Section Mobile Adjustments & Clouds */
  .about-content-container {
    font-size: 0.9rem;
  }
  .about-main-title {
    font-size: 1.6rem !important;
    margin-bottom: 18px !important;
  }
  .about-lead-text {
    font-size: 0.92rem !important;
    line-height: 1.65 !important;
    margin-bottom: 36px !important;
  }

  .about-cloud.cloud-top-left {
    top: 15px;
    left: -10px;
  }
  .about-cloud.cloud-top-left svg {
    width: 200px;
    height: auto;
  }

  .about-cloud.cloud-top-right {
    top: 75px;
    right: -10px;
  }
  .about-cloud.cloud-top-right svg {
    width: 170px;
    height: auto;
  }

  .about-cloud.side-cloud-left {
    top: auto;
    bottom: 150px;
    left: -100px;
    width: 400px;
  }

  .about-cloud.side-cloud-right {
    top: auto;
    bottom: 150px;
    right: -100px;
    width: 400px;
  }

  /* Visit Car Mobile Scaling */
  .visit-car-wrapper,
  .visit-car-body {
    height: 120px !important;
  }

  /* News Marquee & White Tile Cards Mobile Scaling & Swipe */
  .news-marquee-container {
    touch-action: pan-x;
    user-select: none;
    -webkit-user-select: none;
    cursor: grab;
  }
  .news-marquee-container:active {
    cursor: grabbing;
  }
  .white-tile-card.news-card {
    width: 220px !important;
    height: 220px !important;
  }
  .news-thumb-overlay {
    padding: 20px 10px 10px !important;
  }
  .news-thumb-title {
    font-size: 0.75rem !important;
  }

  /* Subpage & Doctor Main Title Mobile Scaling */
  .doctor-main-title {
    font-size: 1.6rem !important;
    margin-bottom: 24px !important;
  }
  .subpage-hero-title {
    font-size: 1.6rem !important;
    margin-bottom: 12px !important;
  }
  .article-body-text {
    font-size: 0.95rem !important;
    line-height: 1.7 !important;
  }

  /* Doctor Section Mobile Styling */
  .doctor-profile-card {
    flex-direction: column !important;
    text-align: left !important;
    padding: 24px 20px !important;
  }
  .doctor-photo-container {
    position: relative;
    flex-shrink: 0;
    width: 100%;
    margin-top: 14px;
  }
  .doctor-photo-offset-bg {
    position: absolute;
    top: 20px;
    left: -20px;
    width: 100%;
    height: 100%;
    background: #e2e8f0;
    border: 1px solid #000;
    border-radius: 20px;
    z-index: 1;
  }
  .doctor-photo-wrap {
    width: 100% !important;
    height: 260px !important;
    margin: 0 0 20px 0 !important;
  }
  .doctor-photo {
    width: 100% !important;
    height: 100% !important;
  }
  .doctor-role-text {
    font-size: 0.95rem !important;
  }
  .doctor-name {
    font-size: 1.35rem !important;
    margin-bottom: 20px !important;
  }
  .doctor-ruby {
    font-size: 0.95rem !important;
  }
  .doctor-info-card {
    text-align: left !important;
    padding: 0 !important;
    box-shadow: none !important;
    border: none !important;
    background: transparent !important;
  }
  .doctor-details-block {
    text-align: left !important;
    align-items: flex-start !important;
  }
  .doctor-detail-group {
    text-align: left !important;
  }
  .doctor-specialty-tags {
    justify-content: flex-start !important;
  }

  /* Service Area Map Modal Vertical Stacking on Mobile */
  .area-modal-body {
    flex-direction: column !important;
    overflow-y: auto !important;
  }
  .area-modal-sidebar {
    width: 100% !important;
    flex-shrink: 1 !important;
    border-right: none !important;
    border-bottom: 1px solid #e2e8f0 !important;
    padding: 16px !important;
    gap: 14px !important;
    overflow-y: visible !important;
  }
  .area-modal-map-wrap {
    width: 100% !important;
    height: 350px !important;
    min-height: 300px !important;
    flex: none !important;
  }

  .nav-dropdown {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  .dropdown-toggle {
    width: 100%;
    text-align: center;
  }

  .dropdown-menu {
    position: static;
    display: flex !important;
    flex-direction: row !important;
    box-shadow: none;
    border: none;
    background: transparent;
    padding: 0;
    gap: 8px;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    width: 100%;
    min-width: 0;
  }

  .dropdown-menu a {
    flex: 1 1 50% !important;
    width: 50% !important;
    text-align: center;
    background: #ffffff !important;
    border: 1.5px solid var(--primary-color, #059669) !important;
    color: var(--primary-color, #059669) !important;
    font-size: 0.90rem !important;
    font-weight: 700 !important;
    padding: 10px 6px !important;
    border-radius: 10px !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04) !important;
    margin: 0 !important;
    transition: all 0.2s ease;
  }

  .dropdown-menu a:active,
  .dropdown-menu a:hover {
    background: var(--primary-color, #059669) !important;
    color: #ffffff !important;
  }

  /* Hartly on Mobile - Top-Right under Header with speech bubble on Left */
  .hero-con-container {
    position: fixed;
    top: 104px;
    right: 8px;
    bottom: auto;
    left: auto;
    z-index: 50;
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    justify-content: flex-end;
    gap: 6px;
    pointer-events: none;
  }

  .con-text-group {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    pointer-events: auto;
    align-self: flex-start;
    margin-top: 6px;
  }

  .hero-con-video {
    height: min(16vh, 105px);
    width: auto;
    display: block;
    animation: floatHeroDog 4.2s ease-in-out infinite;
  }

  .fairy-hint-bubble {
    position: relative;
    top: auto;
    bottom: auto;
    left: auto;
    right: auto;
    margin: 0 0 2px 0;
    font-size: 0.58rem;
    padding: 3px 9px;
    white-space: nowrap;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.95);
    border: 1.5px solid #3b82f6;
    box-shadow: 0 3px 12px rgba(59, 130, 246, 0.2);
  }

  .fairy-hint-bubble::after {
    display: block;
    content: '';
    position: absolute;
    top: 50%;
    right: -6px;
    left: auto;
    bottom: auto;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    border-left: 6px solid #3b82f6;
    border-right: none;
  }

  .con-name-caption {
    position: static;
    transform: none !important;
    opacity: 1 !important;
    font-size: 0.50rem;
    color: #1e293b;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(4px);
    padding: 1px 6px;
    border-radius: 4px;
    white-space: nowrap;
    text-align: right;
    margin-top: 2px;
  }


  /* Scroll Down Indicator on Mobile - Stays in Hero (doesn't follow page scroll) */
  .scroll-down-indicator {
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    right: auto;
    z-index: 45;
  }

  /* Mobile Periodic Semi-Transparent Edge Arrows */
  .hero-edge-arrow {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.76);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1.5px solid rgba(255, 255, 255, 0.95);
    color: #0284c7;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.16);
    z-index: 60;
    cursor: pointer;
    padding: 0;
    outline: none;
    transition: opacity 0.4s ease, transform 0.3s ease;
    animation: edgeArrowPeriodicPulse 4s ease-in-out infinite;
  }

  .hero-edge-arrow.left {
    left: 10px;
  }

  .hero-edge-arrow.right {
    right: 10px;
  }

  .hero-edge-arrow svg {
    width: 22px;
    height: 22px;
    stroke: var(--primary-color, #059669);
  }

  .hero-edge-arrow.is-hidden {
    opacity: 0 !important;
    pointer-events: none !important;
  }

  @keyframes edgeArrowPeriodicPulse {
    0%, 100% {
      opacity: 0.35;
      transform: translateY(-50%) scale(0.94);
    }
    40%, 60% {
      opacity: 0.88;
      transform: translateY(-50%) scale(1.1);
      box-shadow: 0 6px 18px rgba(5, 150, 105, 0.35);
    }
  }

  /* Horizontal Scroll Hint Badge on Mobile */
  .hero-scroll-hint {
    display: flex;
    align-items: center;
    gap: 6px;
    position: absolute;
    top: 76px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 60;
    pointer-events: none;
    background: rgba(15, 23, 42, 0.86);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #ffffff;
    padding: 5px 13px;
    border-radius: 999px;
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.18);
    transition: opacity 0.6s ease, visibility 0.6s ease;
  }

  .hero-scroll-hint.is-hidden {
    opacity: 0;
    visibility: hidden;
  }

  .scroll-hint-arrow {
    width: 14px;
    height: 14px;
    stroke: #38bdf8;
    flex-shrink: 0;
  }

  .scroll-hint-arrow.left {
    animation: hintArrowLeft 1.2s infinite ease-in-out;
  }

  .scroll-hint-arrow.right {
    animation: hintArrowRight 1.2s infinite ease-in-out;
  }
}

@keyframes hintArrowLeft {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(-3px); }
}

@keyframes hintArrowRight {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(3px); }
}

/* -------------------------------------------------------------------------- */
/* TikTok / SNS Link Banner Section                                           */
/* -------------------------------------------------------------------------- */
.tiktok-banner-section {
  position: relative;
  z-index: 5;
  width: 100%;
  padding: 24px 0 16px 0;
  background-color: #ffffff;
}

.tiktok-banner-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.sns-banner-card {
  position: relative;
  width: 100%;
  max-width: 750px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s ease;
  background-color: #ffffff;
}

.sns-banner-card:hover {
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.14);
}

.sns-banner-image-wrapper {
  position: relative;
  width: 100%;
  display: block;
}

.sns-banner-bg-img {
  width: 100%;
  height: auto;
  display: block;
}

.sns-banner-overlay {
  position: absolute;
  bottom: 4%;
  left: 0;
  right: 0;
  padding: 0 3%;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2;
}

.sns-buttons-wrapper {
  display: flex;
  gap: 10px;
  width: 100%;
  justify-content: space-between;
  align-items: stretch;
}

.sns-btn {
  flex: 1;
  min-width: 0;
  text-decoration: none;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
  border: 2px solid #ffffff;
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.25s ease, border-color 0.25s ease;
}

.sns-btn:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.16);
}

.sns-btn.tiktok-btn:hover {
  border-color: #000000;
}

.sns-btn.insta-btn:hover {
  border-color: #e1306c;
}

.sns-btn-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  height: 100%;
  box-sizing: border-box;
  gap: 6px;
}

.sns-btn-info {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.sns-icon-box {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.sns-icon-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.tiktok-icon-box {
  background: transparent;
}

.insta-icon-box {
  background: transparent;
}

.sns-btn-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

.sns-service-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #111111;
  line-height: 1.1;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.sns-account-name {
  font-size: 0.68rem;
  font-weight: 500;
  color: #555555;
  margin-top: 2px;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.sns-qr-code {
  width: 58px;
  height: 58px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background: #ffffff;
  border: 1px solid #e0e0e0;
  padding: 3px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.sns-qr-code:empty {
  display: none;
}

.qr-img,
.qr-svg {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.tiktok-banner-caption {
  margin-top: 12px;
  font-size: 0.8rem;
  color: #666666;
  text-align: center;
  font-weight: 400;
  line-height: 1.5;
}

@media (max-width: 768px) {
  .tiktok-banner-section {
    padding: 16px 0 10px 0;
  }
  .tiktok-banner-container {
    padding: 0 16px;
  }
  .sns-qr-code {
    display: none !important;
  }
  .sns-banner-overlay {
    bottom: 4%;
    padding: 0 2.5%;
  }
  .sns-buttons-wrapper {
    gap: 6px;
  }
  .sns-btn-inner {
    padding: 6px 8px;
    gap: 6px;
    justify-content: center;
  }
  .sns-btn-info {
    gap: 6px;
  }
  .sns-icon-box {
    width: 26px;
    height: 26px;
    border-radius: 6px;
  }
  .sns-service-title {
    font-size: 0.68rem;
  }
  .sns-account-name {
    font-size: 0.58rem;
  }
  .tiktok-banner-caption {
    font-size: 0.725rem;
    margin-top: 8px;
  }
}

@media (max-width: 480px) {
  .sns-buttons-wrapper {
    gap: 4px;
  }
  .sns-btn-inner {
    padding: 4px 4px;
    gap: 4px;
  }
  .sns-btn-info {
    gap: 4px;
  }
  .sns-icon-box {
    width: 22px;
    height: 22px;
    border-radius: 4px;
  }
  .sns-service-title {
    font-size: 0.6rem;
  }
  .sns-account-name {
    font-size: 0.52rem;
  }
}