/* 会社概要：Figma 1118:3 / 1118:6338、レビュー反映後の完成案。 */
.company-page :is(p, h3, figure, ol) {
  margin: 0;
}
.company-page :is(ol, ul) {
  list-style: none;
}
.company-page .lk-related-arrow svg {
  width: calc(22 * var(--pc-unit, 1px));
  height: calc(22 * var(--pc-unit, 1px));
}
.company-page section[id] {
  scroll-margin-top: 104px;
}
/* 自前配信Variableの字面をFigmaの見出し位置へ合わせる。区間の寸法は維持。 */
.company-page .lk-heading-en {
  transform: translateY(-0.15em);
}
.company-page .lk-heading h2 {
  transform: translateY(-0.125em);
}
.company-page :is(td, .company-card-detail, .company-history p) {
  line-break: strict;
}
.company-outline-panel {
  width: min(calc(1080 * var(--pc-unit, 1px)), 100%);
  margin: calc(56 * var(--pc-unit, 1px)) auto 0;
  padding: calc(24 * var(--pc-unit, 1px)) calc(64 * var(--pc-unit, 1px));
}
.company-outline {
  width: 100%;
  border-collapse: collapse;
  font-size: max(14px, calc(18 * var(--pc-unit, 1px)));
  line-height: max(24.88888889px, calc(32 * var(--pc-unit, 1px)));
}
.company-outline th,
.company-outline td {
  padding-block: calc(26 * var(--pc-unit, 1px));
  border-bottom: calc(1 * var(--pc-unit, 1px)) solid var(--ds-line);
  vertical-align: top;
}
.company-outline th {
  width: calc(240 * var(--pc-unit, 1px));
  padding-right: calc(40 * var(--pc-unit, 1px));
  font-weight: 700;
  letter-spacing: 0.05em;
  text-align: left;
}
.company-outline td {
  font-weight: 400;
  color: var(--ink);
}
.company-outline tr:last-child > * {
  border-bottom: 0;
}
.company-site-link {
  display: inline-flex;
  align-items: center;
  gap: calc(8 * var(--pc-unit, 1px));
  color: var(--orange);
}
.company-site-link > span:first-child {
  text-decoration: underline;
  text-underline-offset: calc(3 * var(--pc-unit, 1px));
}
.company-site-link svg {
  flex: none;
}
.company-history-lead {
  margin-top: calc(32 * var(--pc-unit, 1px)) !important;
  font-size: calc(36 * var(--pc-unit, 1px));
  line-height: calc(60 * var(--pc-unit, 1px));
  font-weight: 700;
  letter-spacing: 0.05em;
}
/* 沿革の年表（Figma 1371:23042。中央の縦線に年号の四角、右へ出来事） */
.company-page .company-history {
  --history-badge: calc(88 * var(--pc-unit, 1px));
  --history-gap: calc(36 * var(--pc-unit, 1px));
  --history-row: calc(44 * var(--pc-unit, 1px));
  --history-line: #c7c4bf;
  display: grid;
  grid-template-columns: minmax(0, calc(860 * var(--pc-unit, 1px)));
  justify-content: center;
  row-gap: var(--history-gap);
  width: min(calc(1240 * var(--pc-unit, 1px)), 100%);
  margin: calc(48 * var(--pc-unit, 1px)) auto 0;
  padding: calc(80 * var(--pc-unit, 1px)) calc(72 * var(--pc-unit, 1px));
}
.company-history-year {
  position: relative;
  display: grid;
  grid-template-columns: var(--history-badge) minmax(0, 1fr);
  align-items: start;
}
/* 年号の中心から次の年号の中心までを1区間として縦線を引く（最後の年は線なし） */
.company-history-year::before {
  content: '';
  position: absolute;
  top: calc(var(--history-badge) / 2);
  left: calc(var(--history-badge) / 2 - calc(1 * var(--pc-unit, 1px)));
  width: calc(2 * var(--pc-unit, 1px));
  height: calc(100% + var(--history-gap));
  background: var(--ink);
  transform-origin: top;
  transform: scaleY(var(--history-progress, 1));
}
.company-history-year:last-child::before {
  display: none;
}
.company-history-badge {
  position: relative;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: calc(2 * var(--pc-unit, 1px));
  width: var(--history-badge);
  height: var(--history-badge);
  margin: 0;
  padding-top: calc(30 * var(--pc-unit, 1px));
  border-radius: calc(6 * var(--pc-unit, 1px));
  background: var(--orange);
  color: #fff;
  line-height: 1;
}
.company-year {
  font-size: calc(26 * var(--pc-unit, 1px));
  font-weight: 900;
}
.company-year-unit {
  font-size: max(13px, calc(13 * var(--pc-unit, 1px)));
  font-weight: 700;
}
.company-history-events {
  position: relative;
  margin: calc(var(--history-badge) / 2 - var(--history-row) / 2) 0 0 calc(56 * var(--pc-unit, 1px));
  padding-left: calc(64 * var(--pc-unit, 1px));
  list-style: none;
}
.company-history-events li {
  position: relative;
  display: grid;
  grid-template-columns: calc(40 * var(--pc-unit, 1px)) minmax(0, 1fr);
  column-gap: calc(16 * var(--pc-unit, 1px));
  align-items: start;
  min-height: var(--history-row);
}
/* 年号の右端から出来事へ渡る細線 */
.company-history-events::before {
  content: '';
  position: absolute;
  top: calc(var(--history-row) / 2);
  left: calc(-56 * var(--pc-unit, 1px));
  width: calc(56 * var(--pc-unit, 1px));
  height: calc(1 * var(--pc-unit, 1px));
  background: var(--history-line);
  transform-origin: left;
}
/* 細線の続き（出来事の左余白を渡り、月の手前の線へつなぐ） */
.company-history-events li::before {
  content: '';
  position: absolute;
  top: calc(var(--history-row) / 2);
  left: calc(-64 * var(--pc-unit, 1px));
  width: calc(64 * var(--pc-unit, 1px));
  height: calc(1 * var(--pc-unit, 1px));
  background: var(--history-line);
  transform-origin: left;
}
/* 同じ年に2件あるときは、細線40px→縦の枝→各行への枝。月の列は1件の年と同じ位置（年号から120px） */
.is-multi .company-history-events {
  margin-left: calc(40 * var(--pc-unit, 1px));
  padding-left: calc(80 * var(--pc-unit, 1px));
}
.is-multi .company-history-events::before {
  left: calc(-40 * var(--pc-unit, 1px));
  width: calc(40 * var(--pc-unit, 1px));
}
.is-multi .company-history-events::after {
  content: '';
  position: absolute;
  top: calc(var(--history-row) / 2);
  bottom: calc(var(--history-row) / 2);
  left: 0;
  width: calc(1 * var(--pc-unit, 1px));
  background: var(--history-line);
  transform-origin: top;
}
.is-multi .company-history-events li::before {
  left: calc(-80 * var(--pc-unit, 1px));
  width: calc(80 * var(--pc-unit, 1px));
}
/* 月は右寄せ。左の空きは細線で埋め、月の8px手前まで線を通す */
.company-month {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  font-size: max(14px, calc(16 * var(--pc-unit, 1px)));
  font-weight: 700;
  line-height: var(--history-row);
  color: var(--orange);
  white-space: nowrap;
}
.company-month::before {
  content: '';
  flex: 1 1 0;
  /* 中央寄せだと行の高さ44pxの中で21.5pxになり、左の線（22px）と0.5pxずれて段になる。上端を揃える */
  align-self: flex-start;
  min-width: 0;
  height: calc(1 * var(--pc-unit, 1px));
  margin-top: calc(var(--history-row) / 2);
  margin-right: calc(8 * var(--pc-unit, 1px));
  background: var(--history-line);
}
.company-history-events p {
  font-weight: 500;
  font-size: max(14px, calc(20 * var(--pc-unit, 1px)));
  line-height: var(--history-row);
  color: var(--ink);
  /* 均等割り（pretty）だと院名の途中で折り返すので、「院名｜開院」の区切りで折り返す */
  text-wrap: wrap;
}

/* 動き（JSが html.has-history-motion を付けたときだけ。reduced-motion では全部そのまま表示） */
html.has-history-motion [data-history-reveal] {
  opacity: 0;
  transform: translateY(calc(16 * var(--pc-unit, 1px)));
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
html.has-history-motion [data-history-reveal].is-revealed {
  opacity: 1;
  transform: none;
}
html.has-history-motion .company-history-year::before {
  transform: scaleY(var(--history-progress, 0));
}
html.has-history-motion .company-history-badge {
  opacity: 0;
  transform: translateY(calc(8 * var(--pc-unit, 1px)));
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}
html.has-history-motion .company-history-events::before,
html.has-history-motion .company-history-events::after,
html.has-history-motion .company-history-events li::before {
  transform: scaleX(0);
  transition: transform 0.3s ease-out 0.15s;
}
html.has-history-motion .company-history-events::after {
  transform: scaleY(0);
  transition-delay: 0.3s;
}
html.has-history-motion .company-history-events li::before {
  transition-delay: 0.4s;
}
html.has-history-motion .company-history-events li {
  opacity: 0;
  transition: opacity 0.5s ease-out 0.3s;
}
html.has-history-motion .company-history-events li + li {
  transition-delay: 0.4s;
}
html.has-history-motion .company-history-year.is-revealed .company-history-badge {
  opacity: 1;
  transform: none;
}
html.has-history-motion .company-history-year.is-revealed .company-history-events::before,
html.has-history-motion .company-history-year.is-revealed .company-history-events::after,
html.has-history-motion .company-history-year.is-revealed .company-history-events li::before {
  transform: none;
}
html.has-history-motion .company-history-year.is-revealed .company-history-events li {
  opacity: 1;
}
.company-filter-row {
  display: flex;
  align-items: center;
  gap: calc(32 * var(--pc-unit, 1px));
  margin-top: calc(48 * var(--pc-unit, 1px));
}
.company-filters {
  display: flex;
  gap: calc(12 * var(--pc-unit, 1px));
}
.company-filter {
  display: flex;
  align-items: center;
  justify-content: center;
  height: calc(48 * var(--pc-unit, 1px));
  padding: 0 calc(32 * var(--pc-unit, 1px));
  border: calc(2 * var(--pc-unit, 1px)) solid var(--orange);
  border-radius: calc(30 * var(--pc-unit, 1px));
  background: #fff;
  color: var(--orange);
  font: 700 max(14px, calc(17 * var(--pc-unit, 1px)))/max(16.47058824px, calc(20 * var(--pc-unit, 1px))) var(--site-font-family);
  letter-spacing: 0.05em;
}
.company-filter[aria-pressed='true'] {
  color: #fff;
  background: var(--orange);
}
.company-count {
  color: var(--muted);
  font-weight: 500;
  font-size: max(14px, calc(16 * var(--pc-unit, 1px)));
  line-height: max(21px, calc(24 * var(--pc-unit, 1px)));
}
.company-page .company-clinics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: calc(32 * var(--pc-unit, 1px)) calc(24 * var(--pc-unit, 1px));
  margin-top: calc(40 * var(--pc-unit, 1px));
  padding: 0;
}
.company-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border-radius: calc(24 * var(--pc-unit, 1px));
}
.company-card-photo {
  flex: none;
}
.company-card-photo img {
  width: 100%;
  aspect-ratio: 720 / 450;
  height: auto;
  object-fit: cover;
  border-radius: calc(24 * var(--pc-unit, 1px)) calc(24 * var(--pc-unit, 1px)) 0 0;
}
.company-card-heading {
  padding: calc(24 * var(--pc-unit, 1px)) calc(28 * var(--pc-unit, 1px)) 0;
}
.company-area {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: calc(56 * var(--pc-unit, 1px));
  height: calc(24 * var(--pc-unit, 1px));
  padding: 0 calc(14 * var(--pc-unit, 1px));
  border-radius: calc(20 * var(--pc-unit, 1px));
  background: var(--yellow);
  font-weight: 700;
  font-size: max(13px, calc(13 * var(--pc-unit, 1px)));
  line-height: calc(16 * var(--pc-unit, 1px));
  letter-spacing: 0.1em;
}
.company-card h3 {
  margin-top: calc(12 * var(--pc-unit, 1px));
  font-size: calc(24 * var(--pc-unit, 1px));
  line-height: calc(29 * var(--pc-unit, 1px));
  font-weight: 700;
  letter-spacing: 0.05em;
}
.company-card-details {
  flex-direction: column;
  gap: calc(12 * var(--pc-unit, 1px));
  padding: calc(12 * var(--pc-unit, 1px)) calc(28 * var(--pc-unit, 1px)) 0;
}
.company-card-detail {
  display: flex;
  gap: calc(8 * var(--pc-unit, 1px));
  color: var(--ink);
  font-size: max(14px, calc(15 * var(--pc-unit, 1px)));
  line-height: max(24.26666667px, calc(26 * var(--pc-unit, 1px)));
  font-weight: 500;
  font-style: normal;
}
.company-card-detail > svg {
  flex: none;
  margin-top: calc(4 * var(--pc-unit, 1px));
  color: var(--orange);
}
.company-card-detail > span {
  min-width: 0;
}
.company-postal {
  display: block;
}
.company-address-line {
  display: block;
}
.company-card-tel {
  display: inline-flex;
  align-items: center;
  gap: calc(8 * var(--pc-unit, 1px));
  align-self: flex-start;
  min-height: calc(44 * var(--pc-unit, 1px));
  margin-block: calc(-11 * var(--pc-unit, 1px));
  color: var(--ink);
  font-size: max(14px, calc(18 * var(--pc-unit, 1px)));
  line-height: max(17.11111111px, calc(22 * var(--pc-unit, 1px)));
  font-weight: 700;
  letter-spacing: 0.03em;
}
.company-card-tel svg {
  flex: none;
  color: var(--orange);
}
.company-card-link {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  gap: calc(8 * var(--pc-unit, 1px));
  min-height: calc(46 * var(--pc-unit, 1px));
  margin: auto calc(28 * var(--pc-unit, 1px)) calc(28 * var(--pc-unit, 1px));
  border: calc(2 * var(--pc-unit, 1px)) solid var(--orange);
  border-radius: calc(30 * var(--pc-unit, 1px));
  background: #fff;
  color: var(--orange);
  font-size: max(14px, calc(15 * var(--pc-unit, 1px)));
  line-height: max(16.8px, calc(18 * var(--pc-unit, 1px)));
  font-weight: 700;
}
.company-card-details + .company-card-link {
  margin-top: auto;
}
.company-card-link svg {
  flex: none;
}
.company-page .company-clinic-more {
  margin-top: calc(40 * var(--pc-unit, 1px));
  text-align: center;
}
.company-clinic-more a {
  display: inline-flex;
  align-items: center;
  gap: calc(8 * var(--pc-unit, 1px));
  color: var(--orange);
  font-weight: 700;
}
@media (hover: hover) {
  .company-filter[aria-pressed='false']:hover {
    background: #fff1e6;
  }
  .company-card-link:hover {
    background: var(--orange);
    color: #fff;
  }
}
@media (min-width: 768px) {
  .company-card {
    min-height: calc(638 * var(--pc-unit, 1px));
  }
  .company-card:nth-child(n + 13) {
    min-height: calc(612 * var(--pc-unit, 1px));
  }
  .company-card-details + .company-card-link {
    margin-top: auto;
  }
}
/* P02 PC正本 1118:3：目次上端の区切りA、正本にない白線・追加リンクを除く。 */
@media (min-width: 768px) {
  .company-anchor-band .lk-anchor-row {
    position: relative;
    z-index: 2;
  }
  .company-page .company-clinic-more {
    display: none;
  }
}
@media (max-width: 767.98px) {
  .company-page .lk-related-arrow svg {
    width: 18px;
    height: 18px;
  }
  .company-page section[id] {
    scroll-margin-top: 80px;
  }
  .company-outline-panel {
    margin-top: 28px;
    padding: 8px 20px;
  }
  .company-outline,
  .company-outline tbody,
  .company-outline tr,
  .company-outline th,
  .company-outline td {
    display: block;
    width: 100%;
  }
  .company-outline tr {
    padding-block: 16px;
    border-bottom: 1px solid var(--ds-line);
  }
  .company-outline tr:last-child {
    border: 0;
  }
  .company-outline th,
  .company-outline td {
    padding: 0;
    border: 0;
  }
  .company-outline th {
    font-size: 13px;
    line-height: 16px;
  }
  .company-outline td {
    margin-top: 4px;
    font-size: 15px;
    line-height: 26px;
  }
  .company-site-link svg {
    display: none;
  }
  .company-history-lead {
    margin-top: 20px !important;
    font-size: 20px;
    line-height: 34px;
  }
  /* SP: 年号を小さくして縦線を左に寄せる（Figma にSP版は無いので、PC案の比率を縮めた） */
  .company-page .company-history {
    --history-badge: 56px;
    --history-gap: 24px;
    --history-row: 24px;
    grid-template-columns: minmax(0, 1fr);
    justify-content: stretch;
    margin-top: 24px;
    padding: 32px 16px;
  }
  .company-history-badge {
    padding-top: 20px;
  }
  .company-year {
    font-size: 17px;
  }
  .company-year-unit {
    font-size: 10px;
  }
  .company-history-events,
  .is-multi .company-history-events {
    margin-left: 16px;
    padding-left: 12px;
  }
  .company-history-events::before,
  .is-multi .company-history-events::before {
    left: -16px;
    width: 16px;
  }
  .company-history-events li::before,
  .is-multi .company-history-events li::before {
    left: -12px;
    width: 12px;
  }
  .company-history-events li {
    grid-template-columns: 30px minmax(0, 1fr);
    column-gap: 8px;
    padding-bottom: 6px;
  }
  .company-history-events li:last-child {
    padding-bottom: 0;
  }
  .company-month {
    font-size: 12px;
  }
  .company-month::before {
    margin-right: 4px;
  }
  .company-history-events p {
    font-size: 14px;
  }
  .company-filter-row {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    margin-top: 24px;
  }
  .company-filters {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
  }
  .company-filter {
    height: 41px;
    padding: 0;
    line-height: 17px;
  }
  .company-count {
    font-size: 13px;
    line-height: 16px;
  }
  .company-page .company-clinics {
    grid-template-columns: 1fr;
    margin-top: 24px;
  }
  .company-card {
    display: grid;
  }
  .company-card-photo img {
    object-position: center 30%;
  }
  .company-card-heading {
    padding: 0;
  }
  .company-card-tel {
    margin-block: -12px;
  }
  .company-card-details + .company-card-link {
    grid-column: 1 / -1;
    margin: 8px 0 0;
    align-self: end;
  }
  .company-page .company-clinic-more {
    font-size: 14px;
  }
}
@media (min-width: 600px) and (max-width: 767.98px) {
  .company-page .company-clinics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .company-card {
    gap: 14px 12px;
  }
}
@media (max-width: 599px) {
  .company-outline tr:nth-child(5) .nb {
    display: block;
  }
  /* 沿革の本文は幅が狭いので句のまとまりを解き、自然に折り返す */
  .company-history-events .nb {
    display: inline;
  }
}

/* 2026-10-15 確定FigmaのPC・SP差分。 */

.company-filter-total { margin-left: .15em; font-size: .86em; }
.company-card { background: #fff; border: calc(1 * var(--pc-unit, 1px)) solid #e2dbd3; }
.company-card-details { display: grid; grid-template-columns: minmax(0,1fr) auto; padding-bottom: calc(28 * var(--pc-unit, 1px)); }
.company-card-detail { grid-column: 1/-1; }
.company-card-details .company-card-link { margin: 0; padding: 0; align-self: center; font-size: max(14px, calc(14 * var(--pc-unit, 1px))); white-space: nowrap; }
.company-card-details .company-card-tel { margin: 0; min-height: calc(32 * var(--pc-unit, 1px)); }
.company-clinic-more { display: flex; align-items: center; justify-content: center; gap: calc(12 * var(--pc-unit, 1px)); width: max-content; max-width: 100%; margin: calc(24 * var(--pc-unit, 1px)) auto 0; min-height: calc(54 * var(--pc-unit, 1px)); padding: calc(12 * var(--pc-unit, 1px)) calc(32 * var(--pc-unit, 1px)); border: calc(2 * var(--pc-unit, 1px)) solid var(--orange); border-radius: calc(999 * var(--pc-unit, 1px)); color: var(--orange); background: #fff; font: 700 calc(15 * var(--pc-unit, 1px))/calc(24 * var(--pc-unit, 1px)) var(--site-font-family); cursor: pointer; }
.company-clinic-more[hidden], .company-card[hidden] { display: none; }
.company-clinic-more > span[aria-hidden] { display: flex; } .company-clinic-more svg.hinode-arrow { display: block; width: max(20px, calc(22 * var(--pc-unit, 1px))); height: auto; flex: none; }
@media (max-width: 767.98px) {
  .company-outline th { color: #000; }
  .company-page .company-clinics { gap: 12px; }
  .company-card { grid-template-columns: 84px minmax(0,1fr); grid-template-rows: auto 1fr; gap: 6px 14px; padding: 14px; border-radius: 16px; }
  .company-card-photo { grid-column: 1; grid-row: 1/3; align-self: start; }
  .company-card-photo img { width: 84px; height: 84px; border-radius: 10px; }
  .company-card-heading { grid-column: 2; align-self: start; }
  .company-area { height: 18px; min-width: 46px; padding-inline: 10px; font-size: 11px; line-height: 16px; }
  .company-card h3 { margin-top: 4px; font-size: 16px; line-height: 24px; letter-spacing: 0; }
  .company-card-details { grid-column: 2; gap: 4px 8px; padding: 0; }
  .company-card-detail { gap: 6px; font-size: 13px; line-height: 21px; }
  .company-card-detail > svg { width: 15px; height: 15px; margin-top: 3px; }
  .company-postal { display: none; }
  .company-card-detail .nb { display: inline; white-space: normal; }
  .company-card-tel { gap: 6px; font-size: 13px; line-height: 21px; letter-spacing: 0; }
  .company-card-tel svg { width: 15px; height: 15px; }
  .company-card-details .company-card-link { gap: 4px; font-size: 13px; line-height: 21px; }
  .company-card-link svg { width: 13px; height: 13px; }
  .company-filter { font-size: 13px; letter-spacing: 0; }
}
@media (max-width: 359px) {
  .company-card { grid-template-columns: 68px minmax(0,1fr); gap: 6px 10px; padding: 12px; }
  .company-card-photo img { width: 68px; height: 68px; }
  .company-card-details { grid-template-columns: 1fr; }
}

.company-card-details .company-card-link { border: 0; border-radius: 0; min-height: calc(32 * var(--pc-unit, 1px)); text-decoration: underline; text-underline-offset: calc(3 * var(--pc-unit, 1px)); }
.company-filter-row .company-count { position: absolute; width: calc(1 * var(--pc-unit, 1px)); height: calc(1 * var(--pc-unit, 1px)); padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.company-clinic-external { display: none; }
@media (max-width: 767.98px) {
  .company-address-prefecture { display: none; }
  .company-card-heading { line-height: 18px; }
  .company-page .company-clinic-more { margin-top: 24px; }
  .company-card-details .company-card-link { min-height: 21px; }
}
@media (max-width: 767.98px) {
  .company-card-details .company-card-tel { min-height: 21px; }
}
/* 2026-10-15 SP：目次ボタンが区切りA（32px）の端に重なるので、弧の下端から24px離す。 */
@media (max-width: 767.98px) {
  .company-anchor-band .lk-anchor-nav {
    padding-top: 56px;
  }
}
