/*
 * Unified Calm Theme Adjustments — 2026-05-01
 * Scope: 全ページ最終読込で、表の左寄せ統一と細部トーンの平準化を行う。
 */

:root {
  --kiko-calm-border: #d8d6d1;
  --kiko-calm-shadow: 0 2px 10px rgba(26, 43, 63, 0.06);
  --kiko-calm-shadow-hover: 0 6px 18px rgba(26, 43, 63, 0.10);
  --kiko-calm-tint: #f3f6fa;
}

/* 0) サブページ共通タイトル帯: 上下余白なし・コンパクト */
body:not(.home-page) .sz-page-hero {
  padding-block: 0 !important;
  padding-inline: clamp(14px, 4vw, 36px) !important;
  height: auto !important;
  min-height: 0 !important;
}

body:not(.home-page) .sz-page-hero--has-image {
  height: auto !important;
  min-height: 0 !important;
}

body:not(.home-page) .sz-page-hero__content {
  padding-block: 0.75rem;
}

body:not(.home-page) .sz-page-hero__en {
  margin-bottom: 0.22rem;
  font-size: clamp(0.58rem, 0.53rem + 0.18vw, 0.7rem);
}

body:not(.home-page) .sz-page-hero__title {
  font-size: clamp(1.25rem, 1rem + 1vw, 1.7rem);
  line-height: 1.2;
}

@media (max-width: 767px) {
  body:not(.home-page) .sz-page-hero {
    padding-block: 0 !important;
    padding-inline: 12px !important;
    min-height: 0 !important;
  }

  body:not(.home-page) .sz-page-hero--has-image {
    min-height: 0 !important;
  }

  body:not(.home-page) .sz-page-hero__content {
    padding-block: 0.65rem;
  }
}

/* 1) 表のタイトル・本文を左寄せに統一 */
#main-content table caption,
#main-content table th,
#main-content table td,
#main-content .sakura-table caption,
#main-content .sakura-table th,
#main-content .sakura-table td,
#main-content .schedule-table th,
#main-content .schedule-table td,
#main-content .schedule-table--specialized th,
#main-content .schedule-table--specialized td,
#main-content .sz-hours-table th,
#main-content .sz-hours-table td,
#main-content .sz-simple-table th,
#main-content .sz-simple-table td,
#main-content .sz-schedule-table th,
#main-content .sz-schedule-table td,
#main-content .sz-fee-table th,
#main-content .sz-fee-table td,
#main-content .sz-dept-schedule__table th,
#main-content .sz-dept-schedule__table td,
#main-content .gobyou-schedule__table th,
#main-content .gobyou-schedule__table td,
#main-content .dept-table-modern th,
#main-content .dept-table-modern td,
#main-content .access-hours-table th,
#main-content .access-hours-table td,
#main-content .schedule-table tbody td,
#main-content .schedule-table--specialized td,
#main-content .schedule-table__time {
  text-align: left !important;
  vertical-align: top;
}

#main-content table caption,
#main-content .sakura-table caption {
  color: var(--color-text-sub);
  font-weight: 600;
  padding-bottom: 0.5rem;
}

/* 2) ボタン・囲み・カードの質感を落ち着いた方向に統一 */
#main-content .sakura-content-box,
#main-content .sakura-contact-box,
#main-content .sakura-info-box,
#main-content .sakura-intro-box,
#main-content .sakura-note-box,
#main-content .sakura-related-card,
#main-content .c-card,
#main-content .dept-table-modern,
#main-content .sakura-table-wrapper,
#main-content .access-map-section,
#main-content .sakura-section {
  border-color: var(--kiko-calm-border);
}

#main-content .sakura-content-box,
#main-content .sakura-contact-box,
#main-content .sakura-related-card,
#main-content .c-card {
  box-shadow: var(--kiko-calm-shadow);
}

#main-content .sakura-related-card,
#main-content .c-card,
#main-content .sakura-table-wrapper,
#main-content .dept-table-modern {
  background: var(--color-surface);
}

/* テーブル系は二重枠を避けるため内側カード化を抑制 */
body:not(.home-page) #main-content .sakura-table-wrapper,
body:not(.home-page) #main-content .dept-table-modern {
  box-shadow: none;
  border-radius: 10px;
}

body:not(.home-page) #main-content .sakura-section .sakura-table-wrapper,
body:not(.home-page) #main-content .sakura-section .dept-table-modern {
  border-color: rgba(17, 79, 161, 0.08);
}

#main-content .c-button,
#main-content .sakura-btn {
  border-radius: 10px;
  letter-spacing: 0.01em;
  box-shadow: 0 1px 3px rgba(26, 43, 63, 0.08);
}

#main-content .c-button:hover,
#main-content .sakura-btn:hover {
  box-shadow: var(--kiko-calm-shadow-hover);
}

#main-content .c-button--secondary,
#main-content .sakura-btn--white,
#main-content .sakura-btn--ghost {
  background: var(--kiko-calm-tint);
}

/* 3) ページ内アンカー再デザイン（横スライド禁止・上品なカード調） */
#main-content .c-page-anchor-nav {
  margin: clamp(0.75rem, 2.2vw, 1.1rem) auto clamp(1rem, 3vw, 1.35rem);
  max-width: min(1080px, calc(100% - 1.5rem));
  padding: clamp(0.75rem, 1.8vw, 1rem);
  border: 1px solid var(--kiko-calm-border);
  border-radius: 14px;
  background: #f9fbfd;
  box-shadow: 0 1px 8px rgba(26, 43, 63, 0.05);
}

#main-content .c-page-anchor-nav__title {
  margin: 0 0 0.55rem;
  color: #4f6780;
  font-size: clamp(0.72rem, 0.68rem + 0.18vw, 0.82rem);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

#main-content .c-page-anchor-nav__list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
  padding: 0;
  overflow: visible !important;
  scrollbar-width: auto;
}

#main-content .c-page-anchor-nav__link {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 2.35rem;
  padding: 0.5rem 0.8rem;
  border: 1px solid #d4dde8;
  border-radius: 10px;
  background: #fff;
  color: #274760;
  text-decoration: none;
  font-size: clamp(0.76rem, 0.72rem + 0.18vw, 0.86rem);
  font-weight: 500;
  line-height: 1.35;
  white-space: normal;
  box-shadow: 0 1px 2px rgba(39, 71, 96, 0.05);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

#main-content .c-page-anchor-nav__link.is-active {
  background: #ecf3f9;
  border-color: #90a9c0;
  color: #1f415c;
  font-weight: 600;
  box-shadow: 0 3px 10px rgba(31, 65, 92, 0.12);
}

#main-content .c-page-anchor-nav__link:hover,
#main-content .c-page-anchor-nav__link:focus-visible {
  background: #f2f6fa;
  border-color: #9fb1c3;
  box-shadow: 0 4px 12px rgba(39, 71, 96, 0.12);
  transform: translateY(-1px);
}

@media (max-width: 1023px) {
  #main-content .c-page-anchor-nav__list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  #main-content .c-page-anchor-nav {
    max-width: calc(100% - 1rem);
    padding: 0.65rem;
    border-radius: 12px;
  }

  #main-content .c-page-anchor-nav__title {
    margin-bottom: 0.45rem;
    font-size: 0.72rem;
    letter-spacing: 0.06em;
  }

  #main-content .c-page-anchor-nav__list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.45rem;
  }

  #main-content .c-page-anchor-nav__link {
    min-height: 2.2rem;
    padding: 0.45rem 0.65rem;
    font-size: 0.76rem;
  }
}

@media (max-width: 399px) {
  #main-content .c-page-anchor-nav__list {
    grid-template-columns: 1fr;
  }
}

/* 4) サーバー側ページ内アンカー（.page-anchor-nav）も同デザインへ統一 */
body:not(.home-page) .page-anchor-nav {
  margin: clamp(0.75rem, 2.2vw, 1.1rem) auto clamp(1rem, 3vw, 1.35rem);
  max-width: min(1080px, calc(100% - 1.5rem));
  padding: clamp(0.75rem, 1.8vw, 1rem);
  border: 1px solid var(--kiko-calm-border);
  border-radius: 14px;
  background: #f9fbfd;
  box-shadow: 0 1px 8px rgba(26, 43, 63, 0.05);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
  overflow: visible !important;
}

body:not(.home-page) .page-anchor-nav__pill {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.35rem;
  min-height: 2.35rem;
  padding: 0.5rem 0.8rem;
  border: 1px solid #d4dde8;
  border-radius: 10px;
  background: #fff;
  color: #274760;
  text-decoration: none;
  font-size: clamp(0.76rem, 0.72rem + 0.18vw, 0.86rem);
  font-weight: 500;
  line-height: 1.35;
  white-space: normal;
  box-shadow: 0 1px 2px rgba(39, 71, 96, 0.05);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

body:not(.home-page) .page-anchor-nav__pill:hover,
body:not(.home-page) .page-anchor-nav__pill:focus-visible {
  background: #f2f6fa;
  border-color: #9fb1c3;
  box-shadow: 0 4px 12px rgba(39, 71, 96, 0.12);
  transform: translateY(-1px);
}

body:not(.home-page) .page-anchor-nav__icon {
  font-size: 1rem;
  opacity: 0.72;
}

@media (max-width: 1023px) {
  body:not(.home-page) .page-anchor-nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  body:not(.home-page) .page-anchor-nav {
    max-width: calc(100% - 1rem);
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.45rem;
    padding: 0.65rem;
    border-radius: 12px;
  }

  body:not(.home-page) .page-anchor-nav__pill {
    min-height: 2.2rem;
    padding: 0.45rem 0.65rem;
    font-size: 0.76rem;
  }
}

@media (max-width: 399px) {
  body:not(.home-page) .page-anchor-nav {
    grid-template-columns: 1fr;
  }
}

/* 4.5) サブページ可視化カード（KPI・ゲージ） */
body:not(.home-page) .sp-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}

body:not(.home-page) .sp-kpi-card {
  border: 1px solid #d6e1ec;
  border-radius: 14px;
  background: #f8fbff;
  padding: 0.9rem;
  box-shadow: 0 2px 10px rgba(26, 43, 63, 0.06);
}

body:not(.home-page) .sp-kpi-card__label {
  margin: 0;
  font-size: 0.74rem;
  letter-spacing: 0.05em;
  color: #57708a;
  font-weight: 700;
}

body:not(.home-page) .sp-kpi-card__value {
  margin: 0.28rem 0 0.5rem;
  font-size: 1.03rem;
  font-weight: 700;
  color: #1d3e5a;
}

body:not(.home-page) .sp-kpi-card__meta {
  margin: 0.48rem 0 0;
  font-size: 0.78rem;
  color: #4d6175;
}

body:not(.home-page) .sp-kpi-card__gauge {
  position: relative;
  height: 10px;
  border-radius: 999px;
  background: #dce6f1;
  overflow: hidden;
}

body:not(.home-page) .sp-kpi-card__gauge > span {
  display: block;
  width: var(--sp-kpi, 70%);
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #1c5eb5, #53ad9e);
}

body:not(.home-page) .sp-action-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
  margin-top: 0.85rem;
}

body:not(.home-page) .sp-action-card {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.7rem;
  border: 1px solid #cbd9e7;
  border-radius: 10px;
  background: #fff;
  color: #244b6a;
  text-decoration: none;
  font-size: 0.83rem;
  font-weight: 600;
  padding: 0.5rem 0.72rem;
}

body:not(.home-page) .sp-action-card:hover,
body:not(.home-page) .sp-action-card:focus-visible {
  background: #eef5fc;
}

@media (max-width: 1023px) {
  body:not(.home-page) .sp-kpi-grid,
  body:not(.home-page) .sp-action-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  body:not(.home-page) .sp-kpi-grid,
  body:not(.home-page) .sp-action-grid {
    grid-template-columns: 1fr;
  }
}

/* 5) サイド未設定ページ向けフォールバックサイドバーの視認性調整 */
body:not(.home-page) .page-sidebar-sakura--fallback .page-sidebar-sakura__category {
  letter-spacing: 0.02em;
}

body:not(.home-page) .page-sidebar-sakura--fallback .page-sidebar-sakura__list > li > a {
  font-size: 0.87rem;
}

@media (min-width: 1024px) {
  body:not(.home-page) .page-sidebar-sakura--fallback {
    top: 96px;
  }
}

@media (max-width: 767px) {
  body:not(.home-page) .page-sidebar-sakura {
    display: block;
    position: static;
    margin-bottom: 1rem;
  }

  body:not(.home-page) .page-sidebar-sakura--fallback {
    margin-bottom: 1rem;
  }

  body:not(.home-page) .page-sidebar-sakura--fallback .page-sidebar-sakura__links-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* 5.5) WEB問診の主表示を画面幅に対して自然に拡張 */
body:not(.home-page) .monshin-form-area {
  max-width: min(980px, 100%);
  padding-inline: clamp(0.35rem, 1.2vw, 0.9rem);
}

body:not(.home-page) .monshin-card {
  border: 1px solid #d9e2ed;
}

@media (min-width: 1200px) {
  body:not(.home-page) .monshin-template-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  body:not(.home-page) .monshin-card__body {
    padding: 1rem;
    gap: 1rem;
  }

  body:not(.home-page) .monshin-template-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
  }
}

@media (max-width: 359px) {
  body:not(.home-page) .monshin-template-grid {
    grid-template-columns: 1fr;
  }
}

/* 6) ウェアラブル画面の幅・配置をデバイス幅に合わせて強化 */
body:not(.home-page) .hd-main {
  max-width: min(1120px, calc(100% - 1rem));
  padding-inline: clamp(0.75rem, 2vw, 1.5rem);
}

body:not(.home-page) .hd-section {
  border: 1px solid #dde7f2;
}

@media (min-width: 992px) {
  body:not(.home-page) .hd-main {
    gap: 1.2rem;
  }

  body:not(.home-page) .hd-summary-bar {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  body:not(.home-page) .hd-quick-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  body:not(.home-page) .hd-tips-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1280px) {
  body:not(.home-page) .hd-main {
    max-width: min(1220px, calc(100% - 2rem));
  }

  body:not(.home-page) .hd-metrics-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  body:not(.home-page) .hd-quick-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  body:not(.home-page) .hd-page {
    padding-bottom: 6.2rem;
  }

  body:not(.home-page) .hd-main {
    max-width: calc(100% - 0.5rem);
    padding: 0.7rem;
    gap: 0.75rem;
  }

  body:not(.home-page) .hd-section {
    padding: 0.9rem;
    border-radius: 14px;
  }

  body:not(.home-page) .hd-metrics-grid,
  body:not(.home-page) .hd-summary-bar,
  body:not(.home-page) .hd-quick-grid,
  body:not(.home-page) .hd-tips-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
  }

  body:not(.home-page) .hd-quick-card {
    min-height: 76px;
  }
}

@media (max-width: 359px) {
  body:not(.home-page) .hd-metrics-grid,
  body:not(.home-page) .hd-summary-bar,
  body:not(.home-page) .hd-quick-grid,
  body:not(.home-page) .hd-tips-grid {
    grid-template-columns: 1fr;
  }

  body:not(.home-page) .hd-quick-type {
    min-height: 34px;
    font-size: 0.74rem;
  }

  body:not(.home-page) .hd-sos {
    width: 52px;
    height: 52px;
    right: 0.8rem;
    bottom: 1rem;
  }
}

/* 7) Home final overrides: screenshot regressions (priority fix) */
body.home-page .c-emergency-banner-container {
  margin-block-start: var(--header-mobile-height, 3.5rem) !important;
}

@media (min-width: 1280px) {
  body.home-page .c-emergency-banner-container {
    margin-block-start: var(--header-height, 98px) !important;
  }
}

body.home-page .c-emergency-banner-container + .sz-hero-v2,
body.home-page .sz-hero-v2 {
  margin-top: 0 !important;
}

@media (min-width: 1280px) {
  body.home-page .sz-hero-v2 {
    margin-top: 0 !important;
  }
}

body.home-page .saikazo-main {
  padding-top: 0 !important;
}

body.home-page .sz-news-sns-wrap {
  padding-block: 0.9rem 0.35rem;
}

body.home-page .sz-home-app-hub {
  padding-block: 0.35rem 0.95rem;
}

body.home-page .sz-news-sns-wrap__inner,
body.home-page .sz-home-app-hub__inner {
  width: 100%;
  min-width: 0;
  margin-inline: auto;
}

body.home-page .sz-news-sns-wrap__inner {
  gap: clamp(1rem, 2vw, 1.5rem);
}

body.home-page .sz-home-app-hub__inner {
  min-width: 0;
  overflow: clip;
  padding: clamp(0.95rem, 2.1vw, 1.15rem);
}

body.home-page .sz-home-app-hub__head {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  align-items: start;
  gap: 0.35rem 1.25rem;
  margin-bottom: 0.6rem;
}

body.home-page .sz-home-app-hub__eyebrow,
body.home-page .sz-home-app-hub__title {
  grid-column: 1;
}

body.home-page .sz-home-app-hub__title {
  margin: 0.05rem 0 0;
}

body.home-page .sz-home-app-hub__lead {
  grid-column: 2;
  align-self: center;
  margin: 0;
  max-inline-size: 34rem;
  min-width: 0;
  font-size: 0.82rem;
  line-height: 1.62;
}

body.home-page .sz-home-app-hub__status-rail {
  margin-bottom: 0.62rem;
}

body.home-page .sz-home-app-hub__panels,
body.home-page .sz-home-app-hub__panel,
body.home-page .sz-home-app-hub__tile-grid,
body.home-page .sz-home-app-hub__news-list,
body.home-page .sz-home-app-hub__actions,
body.home-page .sz-home-app-hub__info-list {
  min-width: 0;
}

body.home-page .sz-home-app-hub__panels {
  gap: 0.68rem;
}

body.home-page .sz-home-app-hub__panel {
  padding: 0.58rem;
}

body.home-page .sz-home-app-hub__info-list div {
  grid-template-columns: minmax(5.9rem, 7rem) minmax(0, 1fr);
}

body.home-page .sz-home-app-hub__info-list dd,
body.home-page .sz-home-app-hub__news-list a > span:last-child,
body.home-page .sz-home-app-hub__news-list span > span:last-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

body.home-page .sz-home-summary {
  padding-block: 0.35rem 1.1rem;
}

body.home-page .sz-home-summary__visual {
  border-radius: 14px;
  box-shadow: 0 6px 20px rgba(17, 79, 161, 0.08);
  max-height: 300px !important;
  overflow: hidden !important;
}

body.home-page .sz-home-summary__media {
  min-height: 200px !important;
  max-height: 300px !important;
}

body.home-page .sz-home-summary__media img {
  max-height: 300px !important;
  object-fit: cover !important;
}

body.home-page .sz-home-summary__body {
  padding: 0.7rem 0.82rem;
  gap: 0.34rem;
}

body.home-page .sz-home-summary__lead {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.48;
}

body.home-page .sz-home-summary__stats {
  gap: 0.32rem;
  margin-top: 0.12rem;
}

body.home-page .sz-home-summary__stats li {
  padding: 0.28rem 0.25rem;
  min-height: 58px;
}

body.home-page .sz-home-summary__stats strong {
  font-size: 0.84rem;
}

body.home-page .sz-home-summary__stats span {
  font-size: 0.6rem;
}

body.home-page .sz-home-summary__primary-link {
  display: inline-flex;
  inline-size: auto;
  block-size: auto;
  align-self: start;
  margin-top: 0.05rem;
  padding: 0.44rem 0.72rem;
  border-radius: 999px;
  font-size: 0.76rem;
  white-space: nowrap;
}

body.home-page .sz-home-summary__contact-bar {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  align-items: start;
}

body.home-page .sz-home-summary__contact-accordion {
  border-radius: 12px;
  align-self: start;
  background: transparent;
}

body.home-page .sz-home-summary__contact-accordion > summary {
  list-style: none;
}

body.home-page .sz-home-summary__contact-accordion > summary::-webkit-details-marker {
  display: none;
}

body.home-page .sz-home-summary__contact-card {
  min-height: 56px;
  padding: 0.44rem 0.68rem;
  border-radius: 12px;
  font-size: 0.74rem;
  line-height: 1.35;
  width: 100%;
  cursor: pointer;
  justify-content: space-between;
  box-shadow: 0 6px 18px rgba(17, 79, 161, 0.08);
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, border-radius 0.2s ease;
}

body.home-page .sz-home-summary__contact-accordion[open] > .sz-home-summary__contact-card {
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
  box-shadow: 0 10px 26px rgba(17, 79, 161, 0.14);
}

body.home-page .sz-home-summary__contact-card,
body.home-page .sz-home-summary__contact-card .material-symbols-outlined,
body.home-page .sz-home-summary__contact-card span,
body.home-page .sz-home-summary__contact-card small {
  color: #ffffff;
}

body.home-page .sz-home-summary__contact-card--ghost,
body.home-page .sz-home-summary__contact-card--ghost .material-symbols-outlined,
body.home-page .sz-home-summary__contact-card--ghost span,
body.home-page .sz-home-summary__contact-card--ghost small {
  color: #114fa1;
}

body.home-page .sz-home-summary__contact-card:hover,
body.home-page .sz-home-summary__contact-card:focus-visible {
  background: #ffffff;
  color: #114fa1;
}

body.home-page .sz-home-summary__contact-card:hover .material-symbols-outlined,
body.home-page .sz-home-summary__contact-card:hover span,
body.home-page .sz-home-summary__contact-card:hover small,
body.home-page .sz-home-summary__contact-card:focus-visible .material-symbols-outlined,
body.home-page .sz-home-summary__contact-card:focus-visible span,
body.home-page .sz-home-summary__contact-card:focus-visible small {
  color: #114fa1;
}

body.home-page .sz-home-summary__contact-card--ghost:hover,
body.home-page .sz-home-summary__contact-card--ghost:focus-visible {
  background: #114fa1;
  color: #ffffff;
}

body.home-page .sz-home-summary__contact-card--ghost:hover .material-symbols-outlined,
body.home-page .sz-home-summary__contact-card--ghost:hover span,
body.home-page .sz-home-summary__contact-card--ghost:hover small,
body.home-page .sz-home-summary__contact-card--ghost:focus-visible .material-symbols-outlined,
body.home-page .sz-home-summary__contact-card--ghost:focus-visible span,
body.home-page .sz-home-summary__contact-card--ghost:focus-visible small {
  color: #ffffff;
}

body.home-page .sz-home-summary__contact-card span {
  display: grid;
  font-size: 0.76rem;
  gap: 0.08rem;
}

body.home-page .sz-home-summary__contact-chevron {
  margin-left: auto;
  font-size: 1.15rem;
  transition: transform 0.2s ease;
}

body.home-page .sz-home-summary__contact-accordion[open] .sz-home-summary__contact-chevron {
  transform: rotate(180deg);
}

body.home-page .sz-home-summary__contact-panel {
  margin-top: 0.32rem;
  padding: 0.82rem;
  border: 1px solid rgba(17, 79, 161, 0.12);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 12px 28px rgba(17, 79, 161, 0.1);
}

body.home-page .sz-home-summary__contact-panel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.58rem;
}

body.home-page .sz-home-summary__contact-detail-link,
body.home-page .sz-home-summary__contact-detail-static {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 76px;
  padding: 0.72rem 0.8rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(17, 79, 161, 0.1);
  color: #114fa1;
  text-decoration: none;
}

body.home-page .sz-home-summary__contact-detail-link .material-symbols-outlined,
body.home-page .sz-home-summary__contact-detail-static .material-symbols-outlined,
body.home-page .sz-home-summary__map-links .material-symbols-outlined {
  flex: 0 0 auto;
  font-size: 1.15rem;
}

body.home-page .sz-home-summary__contact-detail-link > span:last-child,
body.home-page .sz-home-summary__contact-detail-static > span:last-child,
body.home-page .sz-home-summary__map-links a > span:last-child {
  min-width: 0;
}

body.home-page .sz-home-summary__contact-detail-link strong,
body.home-page .sz-home-summary__contact-detail-static strong,
body.home-page .sz-home-summary__map-links strong {
  display: block;
  font-size: 0.8rem;
  line-height: 1.3;
}

body.home-page .sz-home-summary__contact-detail-link small,
body.home-page .sz-home-summary__contact-detail-static small,
body.home-page .sz-home-summary__map-links small {
  display: block;
  margin-top: 0.14rem;
  font-size: 0.66rem;
  color: #5b6f92;
}

body.home-page .sz-home-summary__contact-detail-link:hover,
body.home-page .sz-home-summary__contact-detail-link:focus-visible {
  background: #114fa1;
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(17, 79, 161, 0.18);
}

body.home-page .sz-home-summary__contact-detail-link:hover small,
body.home-page .sz-home-summary__contact-detail-link:focus-visible small {
  color: #e9f2ff;
}

body.home-page .sz-home-summary__map-wrap {
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(17, 79, 161, 0.1);
  background: #eaf2fb;
}

body.home-page .sz-home-summary__map-wrap iframe {
  display: block;
  width: 100%;
  min-height: 240px;
  border: 0;
}

body.home-page .sz-home-summary__contact-panel--map {
  display: grid;
  gap: 0.7rem;
}

body.home-page .sz-home-summary__map-links {
  display: grid;
  gap: 0.58rem;
  margin-top: 0;
  align-content: start;
}

body.home-page .sz-home-summary__map-links p {
  margin: 0;
  padding: 0.78rem 0.82rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(17, 79, 161, 0.08);
  font-size: 0.72rem;
  line-height: 1.55;
  color: #42526f;
}

body.home-page .sz-home-summary__contact-detail-link--ghost {
  min-height: 72px;
}

/* 12) Subpage global enhancement (departments / region / other) */
body:not(.home-page) .page-container-sakura {
  width: min(100%, var(--content-max-width, 1200px));
  margin-inline: auto;
  padding: clamp(1.1rem, 2.4vw, 2rem) clamp(0.85rem, 2.2vw, 1.5rem) clamp(1.6rem, 2.8vw, 2.6rem);
  gap: clamp(0.85rem, 2vw, 1.35rem);
}

body:not(.home-page) .page-main-sakura {
  min-width: 0;
  display: grid;
  gap: clamp(0.95rem, 2.1vw, 1.45rem);
}

body:not(.home-page) .page-main-sakura :is(h2, h3, h4) {
  overflow-wrap: anywhere;
}

body:not(.home-page) .page-main-sakura :is(p, li, dd) {
  line-height: 1.78;
  color: #2d3a4d;
}

body:not(.home-page) .sakura-section {
  margin-bottom: clamp(1.05rem, 2.2vw, 1.7rem);
  border: 1px solid rgba(17, 79, 161, 0.09);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  box-shadow: 0 6px 18px rgba(17, 79, 161, 0.06);
  padding: clamp(0.9rem, 2.2vw, 1.35rem);
}

body:not(.home-page) .sakura-section:last-child {
  margin-bottom: 0;
}

body:not(.home-page) .sakura-section__title {
  margin: 0 0 0.9rem;
  padding: 0.52rem 0.72rem;
  border-inline-start-width: 4px;
  border-radius: 10px;
  background: #f4f8fe;
}

body:not(.home-page) .sakura-box,
body:not(.home-page) .sakura-content-box,
body:not(.home-page) .sakura-contact-box,
body:not(.home-page) .sakura-info-box,
body:not(.home-page) .sakura-note-box {
  border: 1px solid rgba(17, 79, 161, 0.11);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 4px 14px rgba(17, 79, 161, 0.05);
}

body:not(.home-page) .sakura-table-wrapper,
body:not(.home-page) .sakura-table,
body:not(.home-page) .sz-simple-table,
body:not(.home-page) .sz-hours-table {
  width: 100%;
  max-width: 100%;
}

body:not(.home-page) .sakura-table-wrapper {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid rgba(17, 79, 161, 0.1);
  box-shadow: 0 4px 14px rgba(17, 79, 161, 0.05);
}

body:not(.home-page) .sakura-table th,
body:not(.home-page) .sakura-table td,
body:not(.home-page) .sz-simple-table th,
body:not(.home-page) .sz-simple-table td,
body:not(.home-page) .sz-hours-table th,
body:not(.home-page) .sz-hours-table td {
  padding: clamp(0.5rem, 1.35vw, 0.75rem) clamp(0.55rem, 1.4vw, 0.82rem);
}

body:not(.home-page) .sakura-related__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.62rem;
}

body:not(.home-page) .sakura-related__card {
  min-width: 0;
  border-radius: 12px;
  border: 1px solid rgba(17, 79, 161, 0.12);
  background: #ffffff;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

body:not(.home-page) .sakura-related__card:hover,
body:not(.home-page) .sakura-related__card:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(17, 79, 161, 0.24);
  box-shadow: 0 6px 18px rgba(17, 79, 161, 0.1);
}

@media (min-width: 1280px) {
  body:not(.home-page) .page-container-sakura {
    width: min(100%, 1320px);
  }
}

@media (min-width: 1600px) {
  body:not(.home-page) .page-container-sakura {
    width: min(100%, 1440px);
  }
}

@media (max-width: 1023px) {
  body:not(.home-page) .page-container-sakura {
    padding-inline: 0.7rem;
  }

  body:not(.home-page) .sakura-section {
    padding: 0.82rem;
  }

  body:not(.home-page) .page-main-sakura :is(p, li, dd) {
    line-height: 1.7;
  }
}

@media (min-width: 1024px) {
  body:not(.home-page) .page-sidebar-sakura {
    position: sticky;
    top: calc(var(--header-height, 98px) + 0.7rem);
    align-self: start;
  }
}

body:not(.home-page) .page-sidebar-sakura,
body:not(.home-page) .page-sidebar-sakura__header,
body:not(.home-page) .page-sidebar-sakura__accordion-toggle,
body:not(.home-page) .page-sidebar-sakura__list > li > a,
body:not(.home-page) .page-sidebar-sakura__link-card,
body:not(.home-page) .page-sidebar-sakura__link-wide {
  border-color: rgba(17, 79, 161, 0.12);
}

body:not(.home-page) .page-sidebar-sakura {
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(17, 79, 161, 0.06);
}

body:not(.home-page) .page-sidebar-sakura__list > li > a {
  min-height: 2.55rem;
}

body:not(.home-page) .page-sidebar-sakura__item--group {
  border-bottom: 1px solid rgba(17, 79, 161, 0.12);
}

body:not(.home-page) .page-sidebar-sakura__subaccordion {
  border: 0;
}

/* サマリー: アイコンが左、リンクが右 */
body:not(.home-page) .page-sidebar-sakura__subaccordion-toggle {
  display: flex;
  align-items: stretch;
  gap: 0;
  padding: 0;
  list-style: none;
  cursor: pointer;
}

body:not(.home-page) .page-sidebar-sakura__subaccordion-toggle::-webkit-details-marker {
  display: none;
}

/* +/- アイコンエリア（左端） */
body:not(.home-page) .page-sidebar-sakura__subaccordion-icon {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2.4rem;
  min-height: 2.55rem;
  background: rgba(17, 79, 161, 0.06);
  border-right: 1px solid rgba(17, 79, 161, 0.12);
}

body:not(.home-page) .page-sidebar-sakura__subaccordion-icon::before,
body:not(.home-page) .page-sidebar-sakura__subaccordion-icon::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  background: #114fa1;
  transform: translate(-50%, -50%);
}

body:not(.home-page) .page-sidebar-sakura__subaccordion-icon::before {
  width: 14px;
  height: 2px;
}

body:not(.home-page) .page-sidebar-sakura__subaccordion-icon::after {
  width: 2px;
  height: 14px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* 展開時: - (マイナス) */
body:not(.home-page) .page-sidebar-sakura__subaccordion[open] .page-sidebar-sakura__subaccordion-icon::after {
  transform: translate(-50%, -50%) scaleY(0);
  opacity: 0;
}

/* 診療科名リンク */
body:not(.home-page) .page-sidebar-sakura__subaccordion-link {
  flex: 1;
  display: flex;
  align-items: center;
  min-height: 2.55rem;
  padding: 0.72rem 1rem;
  color: inherit;
  text-decoration: none;
  font-size: 0.92rem;
}

body:not(.home-page) .page-sidebar-sakura__subaccordion-link.is-active {
  background: #edf4ff;
  color: #114fa1;
  font-weight: 600;
}

body:not(.home-page) .page-sidebar-sakura__subaccordion[open] .page-sidebar-sakura__subaccordion-icon {
  background: rgba(17, 79, 161, 0.10);
}

/* 子項目リスト */
body:not(.home-page) .page-sidebar-sakura__sublist {
  list-style: none;
  margin: 0;
  padding: 0;
  background: #f4f8ff;
  border-left: 3px solid #114fa1;
  margin-left: 2.4rem;
}

body:not(.home-page) .page-sidebar-sakura__sublist > li > a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.45rem;
  padding: 0.6rem 1.1rem 0.6rem 1.8rem;
  color: #1f2d3d;
  text-decoration: none;
  border-bottom: 1px solid rgba(17, 79, 161, 0.08);
}

body:not(.home-page) .page-sidebar-sakura__sublist > li:last-child > a {
  border-bottom: 0;
}

body:not(.home-page) .page-sidebar-sakura__sublist > li > a::before {
  content: '';
  width: 5px;
  height: 5px;
  border-top: 2px solid #9aa1ab;
  border-right: 2px solid #9aa1ab;
  transform: rotate(45deg);
  flex-shrink: 0;
}

body:not(.home-page) .page-sidebar-sakura__sublist > li > a.is-active {
  background: #eaf1ff;
  color: #114fa1;
  font-weight: 600;
}

body:not(.home-page) .page-sidebar-sakura__sublist > li > a.is-active::before {
  border-color: #114fa1;
}

body:not(.home-page) .page-sidebar-sakura__link-card,
body:not(.home-page) .page-sidebar-sakura__link-wide {
  border-radius: 10px;
}

body.home-page .sz-home-summary__contact-card small {
  font-size: 0.58rem;
  letter-spacing: 0.06em;
  opacity: 0.9;
}

@media (min-width: 1280px) {
  body.home-page .c-emergency-banner-container {
    margin-block-start: var(--header-height, 98px) !important;
  }

  body.home-page .sz-news-sns-wrap__inner {
    gap: 1.35rem;
  }

  body.home-page .sz-home-app-hub__inner {
    padding: 1rem 1.05rem;
  }

  body.home-page .sz-home-app-hub__panels {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.72rem;
  }

  body.home-page .sz-home-summary__media {
    min-height: 280px;
    max-height: 280px !important;
  }

  body.home-page .sz-home-summary__body {
    padding: 0.66rem 0.78rem;
  }

  body.home-page .sz-home-summary__contact-panel--map {
    grid-template-columns: minmax(0, 1.15fr) minmax(250px, 0.85fr);
    align-items: stretch;
  }
}

@media (min-width: 1600px) {
  body.home-page .sz-news-sns-wrap__inner,
  body.home-page .sz-home-app-hub__inner {
    max-inline-size: 1440px;
  }
}

@media (max-width: 1023px) {
  body.home-page .sz-home-app-hub__head {
    grid-template-columns: 1fr;
    gap: 0.3rem;
  }

  body.home-page .sz-home-app-hub__lead {
    grid-column: 1;
    max-inline-size: none;
  }

  body.home-page .sz-home-summary__contact-bar,
  body.home-page .sz-home-summary__contact-panel-grid {
    grid-template-columns: 1fr;
  }

  body.home-page .sz-home-summary__contact-card {
    min-height: 52px;
    padding: 0.5rem 0.7rem;
  }

  body.home-page .sz-home-summary__contact-panel {
    padding: 0.68rem;
  }

  body.home-page .sz-home-summary__map-wrap iframe {
    min-height: 200px;
  }
}

/* 8) Header CTA final tuning (desktop) */
@media (min-width: 1280px) {
  .sz-header__cta-group {
    gap: 0.32rem;
  }

  .sz-header__cta-group .sz-header__cta-btn {
    min-height: 2.45rem;
    padding: 0.4rem 0.7rem;
    border-radius: 999px;
    font-size: 0.82rem;
    border-width: 1px;
  }

  .sz-header__cta-group .sz-header__cta-btn--webmonshin {
    background: #ffffff;
    border-color: #114fa1;
    color: #114fa1;
  }

  .sz-header__cta-group .sz-header__cta-btn--webmonshin:hover {
    background: #114fa1;
    color: #ffffff;
  }

  .sz-header__cta-group .sz-header__cta-btn--ai {
    background: #114fa1;
    border-color: #114fa1;
    color: #ffffff;
  }

  .sz-header__cta-group .sz-header__cta-btn--ai:hover {
    background: #ffffff;
    color: #114fa1;
  }
}

/* 9) Departments mega menu: non-科 items as 内科 sub links */
.sz-mega__photo-links--sub {
  margin-top: 0.25rem;
  padding-left: 0.9rem;
  border-left: 2px solid rgba(17, 79, 161, 0.16);
  gap: 0.08rem;
}

.sz-mega__dept-sub-link {
  font-size: 0.92em;
  opacity: 0.92;
}

/* 10) Floating actions: ページトップ導線を footer-pagetop に一本化 */
.c-recruit-float {
  display: grid;
  gap: 0.5rem;
  justify-items: end;
}

.c-recruit-float__link {
  background: #ffffff;
  color: #114fa1;
  border: 1px solid #114fa1;
}

.c-recruit-float__link:hover {
  background: #114fa1;
  color: #ffffff;
}

.c-recruit-float__link:hover .c-recruit-float__sub,
.c-recruit-float__link:focus-visible .c-recruit-float__sub {
  color: rgba(255, 255, 255, 0.92);
}

/* 下側の既存ボタン機能を活かしつつ、上側デザインへ統一 */
.footer-pagetop {
  background: #ffffff;
  color: #114fa1;
  border: 1px solid #114fa1;
  box-shadow: 0 6px 14px rgba(15, 63, 130, 0.16);
}

.footer-pagetop:hover {
  background: #114fa1;
  color: #ffffff;
  border-color: #114fa1;
}
