:root {
  --red: #b81917;
  --deep-red: #a90f13;
  --soft-red: #fff3f2;
  --gold: #d1965d;
  --light-gold: #f2c99c;
  --gold-dark: #9a5f2d;
  --dark: #332c2b;
  --ink: #332c2b;
  --muted: #766f6c;
  --line: #dedede;
  --paper: #ffffff;
  --page: #f4f4f4;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--page);
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  width: 100%;
}

button,
input {
  font: inherit;
}

[hidden] {
  display: none !important;
}

.wrap {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
}

.top-strip {
  border-top: 4px solid var(--line);
  background: #f7f7f7;
  font-size: 13px;
}

.strip-inner {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  min-height: 34px;
  align-items: center;
}

.strip-inner p {
  margin: 0;
}

.strip-inner strong {
  color: var(--red);
}

.brand-band {
  background:
          linear-gradient(180deg, #ffffff 0%, #ffffff 74%, #faf7f2 100%);
  border-bottom: 1px solid rgba(213, 153, 97, 0.28);
}

.brand-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
  align-items: center;
  min-height: 108px;
  padding: 18px 0;
}

.brand {
  display: flex;
  align-items: center;
  min-width: 0;
}

.brand-image {
  width: min(100%, 860px);
  max-height: 82px;
  object-fit: contain;
  object-position: left center;
}

.brand-seal {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  flex: 0 0 auto;
  color: #fff;
  background: var(--red);
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px var(--red);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.1;
}

.brand-logo-text,
.brand-name,
.brand-slogan {
  display: block;
}

.brand-logo-text {
  min-width: 186px;
}

.brand-name {
  color: var(--red);
  font-size: clamp(30px, 3vw, 40px);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.1;
}

.brand-divider {
  align-self: stretch;
  width: 2px;
  min-height: 58px;
  background: linear-gradient(#f0c1b9, #d7877f);
}

.brand-slogan {
  color: var(--red);
  white-space: nowrap;
}

.brand-slogan span {
  display: block;
  font-size: clamp(24px, 2.2vw, 34px);
  font-weight: 800;
  line-height: 1.05;
}

.medical-badge {
  display: grid;
  min-width: 88px;
  min-height: 64px;
  place-items: center;
  padding: 8px 10px;
  color: #fff;
  background: var(--red);
  border-radius: 6px;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
  box-shadow: 0 8px 18px rgba(183, 32, 36, 0.18);
}

.header-tools {
  display: grid;
  justify-items: end;
  align-items: center;
}

.search-shell {
  position: relative;
  width: 100%;
  max-width: 320px;
}

.search-box {
  display: flex;
  width: 100%;
  height: 40px;
  border: 1px solid rgba(213, 153, 97, 0.5);
  background: #fff;
  box-shadow: 0 8px 22px rgba(51, 44, 43, 0.06);
}

.search-box input {
  min-width: 0;
  flex: 1;
  border: 0;
  padding: 0 12px;
  outline: none;
}

.search-box button {
  position: relative;
  width: 44px;
  border: 0;
  color: transparent;
  background: var(--light-gold);
  font-size: 0;
  font-weight: 700;
  cursor: pointer;
}

.search-box button::before {
  content: "";
  position: absolute;
  top: 11px;
  left: 12px;
  width: 14px;
  height: 14px;
  border: 2px solid #fff;
  border-radius: 50%;
}

.search-box button::after {
  content: "";
  position: absolute;
  top: 26px;
  left: 27px;
  width: 9px;
  height: 2px;
  background: #fff;
  transform: rotate(45deg);
  transform-origin: left center;
}

.search-suggest {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  left: 0;
  z-index: 40;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 16px 28px rgba(51, 44, 43, 0.1);
}

.search-suggest .suggest-title {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
}

.search-suggest .suggest-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.search-suggest button {
  padding: 6px 10px;
  border: 1px solid var(--line);
  color: var(--dark);
  background: #fff;
  font-size: 13px;
  cursor: pointer;
}

.search-suggest button:hover,
.search-suggest button:focus-visible {
  color: var(--deep-red);
  background: var(--light-gold);
}

.quick-codes {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  text-align: center;
  font-size: 12px;
  color: #333;
}

.quick-codes p {
  margin: 6px 0 0;
}

.qr {
  display: block;
  width: 62px;
  height: 62px;
  margin: 0 auto;
  border: 5px solid #fff;
  background:
          linear-gradient(90deg, #111 10px, transparent 10px 16px, #111 16px 23px, transparent 23px),
          linear-gradient(#111 10px, transparent 10px 16px, #111 16px 23px, transparent 23px),
          var(--soft-red);
  background-size: 23px 23px;
  box-shadow: 0 0 0 1px #d7d7d7;
}

.qr-alt {
  background-color: var(--light-gold);
}

.main-nav {
  position: sticky;
  top: 0;
  z-index: 30;
  background: #D59961;
}

.nav-inner {
  display: grid;
  grid-template-columns: repeat(8, minmax(96px, 1fr));
  min-height: 50px;
}

.nav-item {
  position: relative;
  min-width: 0;
}

.nav-link {
  display: grid;
  min-height: 50px;
  place-items: center;
  border-left: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  transition: background 0.18s ease, box-shadow 0.18s ease, color 0.18s ease;
}

.nav-item:last-child .nav-link {
  border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.nav-item.is-active .nav-link {
  color: #fff;
  background: #d4a67b;
  font-weight: 800;
}

.nav-inner:hover .nav-item.is-active:not(:hover):not(:focus-within) .nav-link,
.nav-inner:focus-within .nav-item.is-active:not(:hover):not(:focus-within) .nav-link {
  color: #fff;
  background: #D59961;
  box-shadow: none;
}

.nav-item:hover .nav-link,
.nav-item:focus-within .nav-link {
  color: #fff;
  background: #d4a67b;
  font-weight: 800;
  box-shadow: none;
}

.nav-link:focus-visible,
.sub-nav a:focus-visible,
.search-box input:focus-visible,
.search-box button:focus-visible,
.activity-nav:focus-visible,
.activity-pager button:focus-visible,
.tab-list a:focus-visible,
.portal-list a:focus-visible,
.doctor-card:focus-visible,
.mobile-toolbar a:focus-visible,
.mobile-toolbar button:focus-visible {
  outline: 2px solid var(--gold-dark);
  outline-offset: 2px;
}

.sub-nav {
  position: absolute;
  top: 100%;
  left: 0;
  display: grid;
  width: 100%;
  min-width: 148px;
  visibility: hidden;
  overflow: hidden;
  opacity: 0;
  transform: translateY(0);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
  background: rgba(212, 166, 123, 0.86);
  box-shadow: none;
}

.nav-item:hover .sub-nav,
.nav-item:focus-within .sub-nav {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}

.sub-nav a {
  display: grid;
  min-height: 34px;
  place-items: center;
  padding: 6px 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.26);
  border-left: 1px solid rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.82);
  background:
          linear-gradient(rgba(213, 153, 97, 0.78), rgba(213, 153, 97, 0.78)),
          var(--sub-nav-image, transparent);
  background-position: center;
  background-size: cover;
  font-size: 14px;
  font-weight: 700;
}

.sub-nav a:hover,
.sub-nav a:focus-visible,
.sub-nav a.is-current {
  color: #fff;
  background: rgba(212, 166, 123, 0.96);
  font-weight: 800;
}

.home-portal {
  display: grid;
  gap: 18px;
  padding: 24px 0 34px;
}

.portal-feature {
  display: grid;
  grid-template-columns: 0.84fr 1.16fr;
  gap: 18px;
}

.activity-card,
.tab-news,
.info-panel,
.team-section {
  background: #fff;
  border: 1px solid var(--line);
}

.activity-card {
  position: relative;
  padding: 6px;
  cursor: pointer;
}

.activity-card:focus-visible {
  outline: 2px solid var(--gold-dark);
  outline-offset: 2px;
}

.activity-image {
  position: relative;
  overflow: hidden;
  min-height: 286px;
  background: var(--red);
}

.activity-image img {
  height: 286px;
  object-fit: cover;
}

.activity-image p {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  padding: 8px 12px;
  color: #fff;
  background: rgba(51, 44, 43, 0.72);
  font-size: 14px;
  font-weight: 700;
}

.activity-nav {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 34px;
  height: 34px;
  border: 0;
  color: #fff;
  background: rgba(51, 44, 43, 0.6);
  cursor: pointer;
  transform: translateY(-50%);
}

.activity-prev {
  left: 12px;
}

.activity-next {
  right: 12px;
}

.activity-pager {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: flex;
  gap: 3px;
}

.activity-pager button {
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  padding: 0;
  border: 0;
  color: #fff;
  background: var(--dark);
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
}

.activity-pager .is-current {
  background: var(--red);
}

.tab-news {
  display: grid;
  grid-template-columns: 120px 1fr;
  min-height: 300px;
}

.tab-list {
  display: grid;
  align-content: stretch;
  background: var(--gold);
}

.tab-list a {
  display: grid;
  min-height: 48px;
  place-items: center;
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.28);
  font-size: 16px;
  font-weight: 700;
}

.tab-list a:hover,
.tab-list a.is-active {
  color: #fff;
  background: rgba(213, 153, 97);
}

.tab-list a[aria-selected="true"] {
  color: #fff;
  background: rgba(213, 153, 97);
}

.tab-content {
  padding: 18px 22px 12px;
}

.tab-content h2 {
  margin: 0 0 14px;
  padding-bottom: 14px;
  color: #111;
  border-bottom: 1px solid var(--line);
  font-size: 25px;
  line-height: 1.3;
}

.tab-summary {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
}

.portal-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.portal-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 98px;
  gap: 14px;
  align-items: center;
  min-height: 34px;
  border-bottom: 1px dashed var(--line);
  font-size: 14px;
  cursor: pointer;
}

.portal-list a {
  overflow: hidden;
  min-width: 0;
  color: #333;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portal-list a::before {
  content: "›";
  margin-right: 8px;
  color: var(--gold);
}

.portal-list a:hover {
  color: var(--red);
}

.portal-list li:hover a {
  color: var(--red);
}

.portal-list time {
  color: #999;
  font-size: 13px;
  text-align: right;
}

.info-board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.info-panel {
  padding: 16px 18px 18px;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 36px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.panel-heading h2 {
  margin: 0;
  color: var(--deep-red);
  font-size: 20px;
}

.panel-heading a {
  color: var(--gold-dark);
  font-size: 13px;
}

.portal-list.compact li {
  min-height: 32px;
}

.team-section {
  overflow: hidden;
  padding: 22px 28px 30px;
}

.doctor-marquee {
  position: relative;
  overflow: hidden;
  padding: 14px 0 4px;
}

.doctor-marquee::before,
.doctor-marquee::after {
  content: "";
  position: absolute;
  top: 0;
  z-index: 2;
  width: 56px;
  height: 100%;
  pointer-events: none;
}

.doctor-marquee::before {
  left: 0;
  background: linear-gradient(90deg, #fff, rgba(255, 255, 255, 0));
}

.doctor-marquee::after {
  right: 0;
  background: linear-gradient(270deg, #fff, rgba(255, 255, 255, 0));
}

.doctor-track {
  display: flex;
  width: max-content;
  gap: 34px;
  animation: doctor-scroll 28s linear infinite;
}

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

.doctor-card {
  display: grid;
  grid-template-columns: 142px 230px;
  gap: 18px;
  width: 390px;
  min-height: 178px;
  align-items: center;
  padding: 10px 12px;
  background: #fff;
  cursor: pointer;
}

.doctor-photo {
  display: grid;
  width: 142px;
  height: 170px;
  place-items: center;
  color: #fff;
  background:
          linear-gradient(160deg, rgba(183, 32, 36, 0.88), rgba(213, 153, 97, 0.86)),
          var(--red);
  border: 1px solid var(--line);
  font-size: 54px;
  font-weight: 800;
}

.doctor-card h3 {
  margin: 0 0 10px;
  color: var(--dark);
  font-size: 24px;
}

.doctor-card p {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.72;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

@keyframes doctor-scroll {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(calc(-50% - 17px));
  }
}

.hero {
  background:
          linear-gradient(90deg, #f0f0f0 0 13%, transparent 13% 87%, #f0f0f0 87% 100%),
          #fff;
}

.hero-frame {
  position: relative;
  overflow: hidden;
  min-height: 350px;
  background:
          linear-gradient(120deg, rgba(154, 27, 32, 0.92), rgba(183, 32, 36, 0.82)),
          var(--red);
}

.hero-frame img {
  height: 350px;
  object-fit: cover;
  opacity: 0.9;
}

.hero-copy {
  position: absolute;
  left: clamp(28px, 6vw, 82px);
  bottom: 34px;
  max-width: 680px;
  color: #fff;
  text-shadow: 0 3px 8px rgba(51, 44, 43, 0.3);
}

.hero-copy p,
.hero-copy h1 {
  margin: 0;
}

.hero-copy p {
  color: var(--light-gold);
  font-size: clamp(16px, 2vw, 24px);
  font-weight: 700;
}

.hero-copy h1 {
  margin-top: 6px;
  font-size: clamp(32px, 5vw, 58px);
  line-height: 1.1;
  letter-spacing: 0;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 1;
  width: 50px;
  height: 50px;
  border: 0;
  background: rgba(51, 44, 43, 0.58);
  cursor: pointer;
  transform: translateY(-50%);
}

.hero-arrow::before {
  content: "";
  position: absolute;
  inset: 15px;
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
}

.hero-prev {
  left: 0;
}

.hero-prev::before {
  transform: rotate(-45deg);
}

.hero-next {
  right: 0;
}

.hero-next::before {
  transform: rotate(135deg);
}

.notice-band {
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.notice-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
}

.notice-grid a {
  display: grid;
  min-height: 82px;
  align-content: center;
  padding: 14px 22px;
  background: #fff;
  border-top: 4px solid transparent;
}

.notice-grid a:hover {
  border-top-color: var(--light-gold);
}

.notice-grid strong {
  color: var(--deep-red);
  font-size: 18px;
}

.notice-grid span {
  color: var(--muted);
  font-size: 13px;
}

.content-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.85fr;
  gap: 20px;
  padding: 30px 0;
}

.news-panel,
.feature-panel,
.page-list-panel,
.page-intro {
  background: #fff;
  padding: 12px 16px 22px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  border-bottom: 1px solid var(--line);
}

.section-heading h2 {
  margin: 0;
  color: var(--deep-red);
  font-size: 23px;
  font-weight: 700;
}

.section-heading a {
  padding: 0 6px;
  border: 1px solid #cfcfcf;
  color: var(--gold-dark);
  font-size: 10px;
}

.news-list {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.news-list li {
  display: grid;
  grid-template-columns: 1fr 54px;
  gap: 18px;
  align-items: center;
  min-height: 34px;
  border-bottom: 1px dashed #eeeeee;
  font-size: 15px;
}

.news-list a {
  overflow: hidden;
  min-width: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.news-list a:hover {
  color: var(--red);
}

.news-list time {
  color: #999;
  text-align: right;
}

.feature-image {
  overflow: hidden;
  margin-top: 12px;
  border: 1px solid #d8d8d8;
  aspect-ratio: 16 / 9;
}

.feature-image img {
  height: 100%;
  object-fit: cover;
}

.feature-panel h3 {
  margin: 14px 0 6px;
  color: var(--deep-red);
  font-size: 22px;
}

.feature-panel p {
  margin: 0;
  color: var(--muted);
}

.services {
  padding: 34px 0 42px;
  background:
          linear-gradient(90deg, rgba(154, 27, 32, 0.96), rgba(183, 32, 36, 0.96)),
          var(--red);
}

.section-heading-light {
  border-bottom-color: rgba(255, 255, 255, 0.24);
}

.section-heading-light h2 {
  color: #fff;
}

.section-heading-light a {
  border-color: rgba(255, 255, 255, 0.5);
  color: var(--light-gold);
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 22px;
}

.service-card {
  min-height: 170px;
  padding: 22px;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.service-card:hover {
  color: var(--dark);
  background: var(--light-gold);
}

.service-card span {
  display: block;
  color: rgba(255, 255, 255, 0.68);
  font-size: 32px;
  font-weight: 800;
}

.service-card:hover span {
  color: var(--gold-dark);
}

.service-card h3 {
  margin: 16px 0 8px;
  font-size: 22px;
}

.service-card p {
  margin: 0;
  font-size: 14px;
}

.home-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  padding: 30px 0;
}

.home-column {
  min-height: 150px;
  padding: 24px;
  background: #fff;
  border-top: 5px solid var(--gold);
}

.home-column:hover {
  border-top-color: var(--red);
}

.home-column span {
  color: var(--red);
  font-size: 13px;
  font-weight: 800;
}

.home-column h2 {
  margin: 10px 0 0;
  color: var(--dark);
  font-size: 22px;
  line-height: 1.35;
}

.sub-hero {
  position: relative;
  overflow: hidden;
  padding: 54px 0 58px;
  color: #fff;
  background:
          linear-gradient(90deg, rgba(0, 0, 0, 0.58) 0%, rgba(0, 0, 0, 0.46) 52%, rgba(0, 0, 0, 0.38) 100%),
          var(--subpage-hero-image, url("/assets/img/hero-dental.png")) center / cover,
          #5b4640;
}

.sub-hero::after {
  content: "";
  position: absolute;
  right: clamp(24px, 9vw, 150px);
  bottom: -36px;
  width: 260px;
  height: 110px;
  border: 1px solid rgba(255, 217, 166, 0.35);
  border-radius: 999px 999px 0 0;
  opacity: 0.55;
}

.sub-hero .wrap {
  position: relative;
  z-index: 1;
}

.sub-hero h1 {
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

.sub-hero p {
  margin: 0 0 10px;
  color: var(--light-gold);
  font-size: 14px;
  font-weight: 700;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
}

.sub-hero h1 {
  margin: 0;
  font-size: clamp(38px, 4.4vw, 58px);
  line-height: 1.1;
}

.sub-hero span {
  display: block;
  max-width: 760px;
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
}

.page-layout {
  display: grid;
  grid-template-columns: 248px 1fr;
  gap: 24px;
  padding: 34px 0 46px;
}

.side-menu {
  align-self: start;
  background: #fff;
  border-top: 5px solid var(--red);
  box-shadow: 0 16px 36px rgba(51, 44, 43, 0.08);
}

.side-menu h2 {
  margin: 0;
  padding: 18px 20px;
  color: var(--deep-red);
  background: linear-gradient(90deg, #fff8ec, #ffffff);
  font-size: 22px;
}

.side-menu a {
  position: relative;
  display: block;
  padding: 14px 18px 14px 24px;
  border-bottom: 1px solid var(--line);
  color: var(--dark);
  background: #fff;
  font-weight: 700;
}

.side-menu a:hover,
.side-menu a.is-current {
  color: var(--deep-red);
  background: var(--light-gold);
}

.page-content {
  display: grid;
  gap: 18px;
}

.page-intro {
  padding: 22px 24px;
  border-left: 5px solid var(--gold);
  box-shadow: 0 12px 30px rgba(51, 44, 43, 0.06);
}

.page-intro h2 {
  margin: 0;
  color: var(--deep-red);
  font-size: 28px;
}

.page-intro p {
  margin: 8px 0 0;
  color: var(--muted);
}

.page-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.page-cards article {
  min-height: 168px;
  padding: 22px;
  color: #fff;
  background:
          linear-gradient(145deg, rgba(154, 27, 32, 0.96), rgba(183, 32, 36, 0.9)),
          var(--red);
  border-top: 4px solid var(--gold);
  box-shadow: 0 14px 30px rgba(183, 32, 36, 0.12);
}

.page-cards h3 {
  margin: 0 0 10px;
  color: #fff;
  font-size: 21px;
}

.page-cards p {
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 14px;
}

.page-list-panel {
  box-shadow: 0 12px 30px rgba(51, 44, 43, 0.06);
}

.site-footer {
  padding: 34px 0 38px;
  color: var(--muted);
  background: #fff;
  border-top: 1px solid var(--line);
}

.footer-grid {
  display: grid;
  grid-template-columns: 250px minmax(420px, 1fr) minmax(320px, 0.78fr);
  gap: 46px;
  align-items: start;
}

.footer-codes {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 18px;
  text-align: center;
}

.footer-codes p,
.footer-info p,
.footer-info h2 {
  margin: 0;
}

.footer-qr {
  display: block;
  width: 86px;
  height: 86px;
  margin: 0 auto 6px;
  border: 5px solid #fff8ec;
  background:
          linear-gradient(90deg, #111 9px, transparent 9px 15px, #111 15px 22px, transparent 22px),
          linear-gradient(#111 9px, transparent 9px 15px, #111 15px 22px, transparent 22px),
          #fff8ec;
  background-size: 22px 22px;
  box-shadow: 0 0 0 2px var(--gold);
}

.footer-codes p {
  color: var(--muted);
  font-size: 13px;
}

.footer-info {
  display: grid;
  gap: 7px;
  padding-top: 6px;
  font-size: 15px;
  line-height: 1.55;
}

.footer-info h2 {
  margin-bottom: 4px;
  color: var(--dark);
  font-size: 20px;
}

.top-strip a,
.footer-info a {
  color: var(--deep-red);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.footer-info strong {
  color: var(--deep-red);
}

.mobile-toolbar {
  display: none;
}

@media (max-width: 980px) {
  .brand-row {
    grid-template-columns: 1fr;
    gap: 16px;
    min-height: auto;
  }

  .header-tools {
    justify-items: stretch;
  }

  .nav-inner {
    overflow-x: auto;
    grid-template-columns: repeat(8, 116px);
    width: 100%;
  }

  .sub-nav {
    min-width: 116px;
  }

  .portal-feature,
  .info-board,
  .content-grid,
  .service-grid,
  .notice-grid,
  .home-columns,
  .page-layout,
  .page-cards,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .tab-news {
    grid-template-columns: 1fr;
  }

  .tab-list {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer-grid {
    align-items: start;
  }
}

@media (max-width: 640px) {
  html,
  body {
    overflow-x: hidden;
  }

  .wrap {
    width: min(100% - 22px, 1220px);
  }

  .strip-inner {
    display: grid;
    gap: 2px;
    padding: 6px 0;
  }

  .brand {
    align-items: flex-start;
  }

  .brand-seal {
    width: 48px;
    height: 48px;
    font-size: 15px;
  }

  .brand-name {
    font-size: 28px;
  }

  .brand {
    flex-wrap: wrap;
  }

  .brand-image {
    max-height: 64px;
    object-position: center;
  }

  .search-shell {
    max-width: none;
  }

  .search-box {
    height: 42px;
  }

  .nav-inner {
    display: flex;
    overflow-x: auto;
    min-height: 46px;
    padding: 0;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
  }

  .nav-item {
    flex: 0 0 112px;
    scroll-snap-align: start;
  }

  .nav-link {
    min-height: 46px;
    font-size: 14px;
  }

  .sub-nav {
    position: absolute;
    min-width: 132px;
  }

  .sub-nav a {
    min-height: 36px;
    font-size: 13px;
  }

  .brand-divider {
    display: none;
  }

  .brand-slogan span {
    font-size: 22px;
  }

  .medical-badge {
    min-height: 48px;
    font-size: 16px;
  }

  .hero-frame,
  .hero-frame img {
    min-height: 270px;
    height: 270px;
  }

  .hero-copy {
    right: 24px;
    bottom: 26px;
  }

  .hero-copy h1 {
    font-size: 32px;
  }

  .home-portal {
    padding-top: 14px;
  }

  .portal-feature {
    gap: 12px;
  }

  .activity-image,
  .activity-image img {
    min-height: 220px;
    height: 220px;
  }

  .tab-list {
    display: flex;
    overflow-x: auto;
    background: #f7eadb;
  }

  .tab-list a {
    flex: 0 0 108px;
    min-height: 44px;
    font-size: 14px;
  }

  .tab-content {
    padding: 14px 14px 10px;
  }

  .tab-content h2 {
    font-size: 20px;
  }

  .info-panel,
  .team-section {
    padding: 16px;
  }

  .hero-arrow {
    width: 42px;
    height: 42px;
  }

  .news-list li {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 8px 0;
  }

  .news-list time {
    text-align: left;
  }

  .portal-list li {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 7px 0;
  }

  .portal-list time {
    text-align: left;
  }

  .doctor-card {
    grid-template-columns: 92px 180px;
    width: 294px;
    min-height: 122px;
    gap: 12px;
  }

  .doctor-photo {
    width: 92px;
    height: 112px;
    font-size: 36px;
  }

  .doctor-card h3 {
    font-size: 19px;
  }

  .doctor-card p {
    font-size: 14px;
  }

  .doctor-track {
    gap: 18px;
    animation-duration: 24s;
  }

  .mobile-toolbar {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 50;
    display: flex;
    padding-bottom: env(safe-area-inset-bottom);
    background: var(--line);
    box-shadow: 0 -8px 24px rgba(51, 44, 43, 0.12);
  }

  .mobile-toolbar a,
  .mobile-toolbar button {
    display: grid;
    place-items: center;
    flex: 1;
    min-height: 48px;
    border: 0;
    color: var(--dark);
    background: #fff;
    font-weight: 700;
    cursor: pointer;
  }

  .mobile-toolbar button {
    background: var(--light-gold);
  }

  body {
    padding-bottom: 56px;
  }
}

@media (max-width: 768px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
    background: #f5f5f5;
  }

  .wrap {
    width: 100%;
    padding-right: 12px;
    padding-left: 12px;
  }

  .top-strip {
    border-top-width: 2px;
    font-size: 12px;
  }

  .strip-inner {
    display: block;
    min-height: 0;
    padding: 6px 12px;
  }

  .strip-inner p {
    overflow: hidden;
    line-height: 1.7;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .brand-row {
    display: block;
    min-height: 0;
    padding: 12px;
  }

  .brand {
    justify-content: center;
  }

  .brand-image {
    width: min(100%, 340px);
    max-height: 58px;
    object-position: center;
  }

  .header-tools {
    margin-top: 10px;
  }

  .search-shell {
    max-width: none;
  }

  .search-box {
    height: 42px;
    border-color: #f0d3b1;
    box-shadow: none;
  }

  .search-box input {
    font-size: 14px;
  }

  .search-box button {
    width: 44px;
    background: var(--light-gold);
  }

  .search-suggest {
    right: 0;
    left: 0;
    z-index: 80;
  }

  .main-nav {
    position: sticky;
    top: 0;
    overflow: hidden;
  }

  .nav-inner {
    display: flex;
    width: 100%;
    min-height: 44px;
    overflow-x: auto;
    padding: 0;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .nav-inner::-webkit-scrollbar {
    display: none;
  }

  .nav-item {
    flex: 0 0 108px;
    scroll-snap-align: start;
  }

  .nav-link {
    min-height: 44px;
    padding: 0 10px;
    border-left-color: rgba(255, 255, 255, 0.18);
    font-size: 14px;
    white-space: nowrap;
  }

  .sub-nav {
    display: none;
  }

  .home-portal {
    gap: 12px;
    padding: 12px 12px 24px;
  }

  .portal-feature,
  .info-board,
  .team-section {
    gap: 12px;
  }

  .activity-card,
  .tab-news,
  .info-panel,
  .team-section {
    border-color: #eeeeee;
    box-shadow: 0 8px 18px rgba(51, 44, 43, 0.05);
  }

  .activity-card {
    padding: 4px;
  }

  .activity-image,
  .activity-image img {
    height: 210px;
    min-height: 210px;
  }

  .activity-image p {
    padding: 8px 10px;
    font-size: 13px;
  }

  .tab-news {
    display: block;
    min-height: 0;
    overflow: hidden;
  }

  .tab-list {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .tab-list::-webkit-scrollbar {
    display: none;
  }

  .tab-list a {
    flex: 0 0 auto;
    min-width: 92px;
    min-height: 42px;
    padding: 0 12px;
    font-size: 14px;
    white-space: nowrap;
  }

  .tab-content {
    min-height: 190px;
    padding: 14px 14px 10px;
  }

  .tab-content h2 {
    display: -webkit-box;
    overflow: hidden;
    margin-bottom: 10px;
    padding-bottom: 10px;
    font-size: 18px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .portal-list li {
    display: block;
    min-height: 0;
    padding: 10px 0;
    font-size: 14px;
  }

  .portal-list a {
    display: block;
    white-space: normal;
  }

  .portal-list time {
    display: block;
    margin-top: 4px;
    text-align: left;
  }

  .info-panel {
    padding: 14px;
  }

  .panel-heading h2 {
    font-size: 18px;
  }

  .team-section {
    padding: 16px 14px 20px;
  }

  .footer-grid {
    display: grid;
    gap: 14px;
    padding: 18px 12px 22px;
  }

  .footer-codes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 14px;
    background: #fff;
    border: 1px solid #eeeeee;
    box-shadow: 0 8px 18px rgba(51, 44, 43, 0.05);
  }

  .footer-codes > div {
    min-width: 0;
  }

  .footer-qr {
    width: 74px;
    height: 74px;
    margin-bottom: 6px;
    border-width: 3px;
  }

  .footer-codes p {
    overflow: hidden;
    font-size: 12px;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .footer-info {
    display: block;
    padding: 14px;
    background: #fff;
    border: 1px solid #eeeeee;
    font-size: 13px;
    line-height: 1.75;
    box-shadow: 0 8px 18px rgba(51, 44, 43, 0.05);
  }

  .footer-info h2 {
    margin: 0 0 8px;
    color: var(--deep-red);
    font-size: 17px;
    line-height: 1.35;
  }

  .footer-info p {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 6px;
    align-items: baseline;
    margin: 0;
  }

  .footer-info p + p {
    margin-top: 4px;
  }

  .site-footer {
    padding: 0 0 18px;
    background: #f5f5f5;
  }

  .mobile-toolbar {
    border-top: 1px solid rgba(183, 32, 36, 0.16);
  }

  .mobile-toolbar a,
  .mobile-toolbar button {
    min-width: 0;
    border-right: 1px solid #eeeeee;
    background: #fff;
    font-size: 14px;
  }

  .mobile-toolbar a:last-child,
  .mobile-toolbar button:last-child {
    border-right: 0;
  }
}
