:root {
  --bg: #f7f2e8;
  --paper: #fffdfa;
  --ink: #182028;
  --muted: #5d676d;
  --line: #d8cdbc;
  --gold: #c58a2e;
  --forest: #36563c;
  --navy: #24455e;
  --berry: #914c48;
  --mint: #dfeadf;
  --sand: #efe0c7;
  --shadow: 0 18px 50px rgba(33, 31, 28, 0.09);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(197, 138, 46, 0.18), transparent 30%),
    radial-gradient(circle at bottom right, rgba(54, 86, 60, 0.12), transparent 28%),
    linear-gradient(180deg, #f8f3eb 0%, #f4ede2 100%);
  font-family: "Microsoft JhengHei", "PingFang TC", sans-serif;
  line-height: 1.65;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header,
.site-footer,
main {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 22px 0 18px;
}

.brand-block {
  display: grid;
  gap: 4px;
}

.brand {
  font-family: "Microsoft JhengHei", "PingFang TC", sans-serif;
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.eyebrow {
  margin: 0;
  font-size: 0.82rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.site-nav a {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.95rem;
}

.site-nav a.active,
.site-nav a:hover {
  background: rgba(36, 69, 94, 0.08);
  color: var(--navy);
}

.hero,
.section,
.page-hero,
.content-grid,
.timeline,
.contact-grid,
.notice-board {
  margin-bottom: 34px;
}

.hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 26px;
  align-items: stretch;
  padding: 22px 0 6px;
}

.hero-copy,
.hero-panel,
.content-card,
.feature-card,
.track-card,
.gallery-card,
.notice-card {
  background: var(--paper);
  border: 1px solid rgba(216, 205, 188, 0.65);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-copy {
  padding: 48px;
}

.hero-copy h1,
.page-hero h1,
.section-head h2 {
  margin: 10px 0 14px;
  font-family: "Microsoft JhengHei", "PingFang TC", sans-serif;
  line-height: 1.15;
}

.hero-copy h1 {
  font-size: clamp(2.2rem, 5vw, 4.2rem);
}

.hero-text,
.body-text {
  color: var(--muted);
  font-size: 1.04rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 170px;
  padding: 12px 18px;
  border-radius: 999px;
  font-weight: 700;
}

.button.primary {
  background: var(--navy);
  color: white;
}

.button.secondary {
  border: 1px solid var(--line);
  color: var(--forest);
}

.hero-panel {
  position: relative;
  overflow: hidden;
  padding: 28px;
  background:
    linear-gradient(145deg, rgba(36, 69, 94, 0.98), rgba(47, 85, 70, 0.95));
  color: white;
}

.panel-badge {
  display: inline-flex;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 0.88rem;
}

.pillar-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 24px;
}

.pillar-grid article {
  padding: 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(4px);
}

.hero-alt {
  padding: 0;
}

.hero-kicker {
  margin: 0;
  font-size: 0.95rem;
  color: var(--forest);
  letter-spacing: 0.08em;
}

.hero-a {
  grid-template-columns: 1.1fr 0.9fr;
}

.hero-a-copy,
.hero-a-side {
  background: var(--paper);
  border: 1px solid rgba(216, 205, 188, 0.65);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-a-copy {
  padding: 52px;
}

.hero-a-side {
  padding: 24px;
  display: grid;
  gap: 18px;
  background:
    radial-gradient(circle at top right, rgba(197, 138, 46, 0.2), transparent 28%),
    linear-gradient(160deg, #f8f0e4, #fffdfa);
}

.hero-stat {
  padding: 20px 22px;
  border-radius: 22px;
  background: rgba(36, 69, 94, 0.06);
}

.hero-stat span {
  display: block;
  color: var(--muted);
  margin-bottom: 8px;
}

.hero-stat strong {
  font-size: 1.25rem;
  color: var(--navy);
}

.hero-mini-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.hero-mini-card {
  margin: 0;
  overflow: hidden;
  border-radius: 20px;
  background: white;
  border: 1px solid rgba(216, 205, 188, 0.72);
}

.hero-mini-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

.hero-mini-card figcaption {
  padding: 12px 14px 14px;
  color: var(--muted);
}

.hero-b {
  position: relative;
  grid-template-columns: 1fr;
  min-height: 560px;
  overflow: hidden;
  border-radius: 32px;
  box-shadow: var(--shadow);
}

.hero-b-image img {
  width: 100%;
  height: 560px;
  object-fit: cover;
  display: block;
  filter: saturate(0.92);
}

.hero-b-overlay {
  position: absolute;
  inset: 0;
  padding: 52px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: white;
  background:
    linear-gradient(180deg, rgba(18, 28, 34, 0.14), rgba(18, 28, 34, 0.76)),
    linear-gradient(120deg, rgba(36, 69, 94, 0.18), rgba(145, 76, 72, 0.2));
}

.hero-b-overlay .hero-kicker,
.hero-b-overlay .eyebrow,
.hero-b-overlay .hero-text {
  color: rgba(255, 247, 232, 0.94);
}

.hero-b-overlay h1 {
  max-width: 760px;
  margin: 8px 0 14px;
  font-size: clamp(2.3rem, 5vw, 4.3rem);
  line-height: 1.08;
}

.hero-title {
  max-width: 760px;
}

.hero-desc {
  max-width: 660px;
  margin: 0 0 22px;
  font-size: 1.08rem;
  line-height: 1.8;
  color: rgba(255, 247, 232, 0.94);
}

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 176px;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.btn-primary {
  background: #fff6e8;
  color: var(--navy);
  box-shadow: 0 12px 26px rgba(12, 22, 28, 0.18);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.14);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.btn-primary:hover,
.btn-secondary:hover {
  transform: translateY(-2px);
}

.latest-section {
  margin-bottom: 34px;
  padding: 30px 0 6px;
}

.section-header {
  margin-bottom: 18px;
}

.section-header h2 {
  margin: 10px 0 10px;
  font-family: "Microsoft JhengHei", "PingFang TC", sans-serif;
  font-size: clamp(1.9rem, 3vw, 3rem);
  line-height: 1.14;
}

.section-header p {
  margin: 0;
  max-width: 680px;
  color: var(--muted);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(36, 69, 94, 0.08);
  color: var(--navy);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  font-weight: 700;
}

.event-banner {
  margin-bottom: 34px;
}

.banner-content {
  padding: 28px 30px;
  border-radius: 28px;
  background:
    radial-gradient(circle at top right, rgba(255, 227, 176, 0.24), transparent 26%),
    linear-gradient(145deg, rgba(36, 69, 94, 0.96), rgba(58, 97, 73, 0.94));
  color: white;
  box-shadow: var(--shadow);
}

.banner-content h3 {
  margin: 0 0 8px;
  font-size: 1.6rem;
}

.banner-content p {
  margin: 0 0 18px;
  color: rgba(255, 247, 232, 0.92);
}

.footer-content {
  display: flex;
  width: 100%;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.footer-links {
  display: flex;
  gap: 12px;
}

.hero-c {
  grid-template-columns: 1.02fr 0.98fr;
  gap: 18px;
}

.hero-c-copy {
  padding: 54px 48px;
  border-radius: 30px;
  color: white;
  background:
    radial-gradient(circle at top left, rgba(255, 227, 176, 0.22), transparent 28%),
    linear-gradient(145deg, #24455e, #355f47 55%, #8a5a4a);
  box-shadow: var(--shadow);
}

.hero-c-copy .hero-kicker,
.hero-c-copy .eyebrow,
.hero-c-copy .hero-text {
  color: rgba(255, 243, 221, 0.94);
}

.hero-c-copy h1 {
  margin: 12px 0 14px;
  font-size: clamp(2.4rem, 5vw, 4.6rem);
  line-height: 1.04;
}

.hero-c-stack {
  display: grid;
  gap: 16px;
}

.hero-c-stack article {
  padding: 24px 24px 26px;
  border-radius: 26px;
  background: var(--paper);
  border: 1px solid rgba(216, 205, 188, 0.7);
  box-shadow: var(--shadow);
}

.hero-c-stack span {
  display: inline-flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: var(--sand);
  color: var(--berry);
  font-weight: 700;
}

.hero-c-stack h2 {
  margin: 16px 0 8px;
  font-size: 1.45rem;
}

.hero-c-stack p {
  margin: 0;
  color: var(--muted);
}

.pillar-grid h2 {
  margin: 0 0 8px;
  font-size: 1.15rem;
}

.section {
  padding: 8px 0;
}

.section.soft {
  padding: 28px;
  border-radius: 28px;
  background: rgba(255, 253, 250, 0.74);
  border: 1px solid rgba(216, 205, 188, 0.6);
}

.section-head {
  margin-bottom: 18px;
}

.feature-grid,
.track-grid,
.gallery-grid,
.content-grid,
.contact-grid,
.photo-grid {
  display: grid;
  gap: 18px;
}

.feature-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.notice-two-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  width: 100%;
}

.notice-three-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  width: 100%;
}

.notice-two-grid .feature-card {
  padding: 34px 36px;
  min-height: 330px;
}

.notice-three-grid .feature-card {
  min-height: 260px;
}

.exhibition-info-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 20px;
}

.exhibition-info-grid .feature-card {
  padding: 24px;
  min-height: 150px;
}

.exhibition-info-grid .feature-card h3 {
  margin-top: 0;
}

.exhibition-info-grid .feature-card p {
  color: var(--ink);
  font-size: 1.2rem;
  font-weight: 800;
}

.exhibition-preview-head {
  margin-top: 34px;
}

.exhibition-preview-grid {
  margin-top: 12px;
}

.feature-card,
.gallery-card {
  padding: 24px;
}

.feature-card span {
  display: inline-flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--sand);
  color: var(--berry);
  font-weight: 700;
}

.feature-card h3,
.track-card h2,
.gallery-card h2,
.content-card h2,
.notice-card h2,
.notice-card h3 {
  margin: 14px 0 10px;
}

.track-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.photo-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.photo-grid-single {
  grid-template-columns: 1fr;
}

.photo-grid.two-up {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 18px;
}

.track-card {
  padding: 26px;
}

.track-card.warm {
  background: linear-gradient(160deg, #fff3e2, #fffaf2);
}

.track-card.deep {
  background: linear-gradient(160deg, #e6f1f8, #fbfdff);
}

.track-card.earth {
  background: linear-gradient(160deg, #edf5ea, #fffef8);
}

.track-card.bright {
  background: linear-gradient(160deg, #fff6eb, #fffdf8);
}

.track-card.soft-green {
  background: linear-gradient(160deg, #e5f0e6, #fbfdfb);
}

.track-card.soft-red {
  background: linear-gradient(160deg, #faece9, #fffdfc);
}

.split {
  display: grid;
  grid-template-columns: 1fr 0.95fr;
  gap: 22px;
  align-items: start;
}

.notice-stack,
.notice-board {
  display: grid;
  gap: 16px;
}

.notice-card {
  padding: 22px;
}

.photo-card {
  margin: 0;
  overflow: hidden;
  border-radius: 24px;
  background: var(--paper);
  border: 1px solid rgba(216, 205, 188, 0.65);
  box-shadow: var(--shadow);
}

.photo-card.large {
  grid-column: span 2;
}

.featured-photo {
  grid-column: span 1;
}

.featured-photo-image {
  object-fit: contain !important;
  object-position: center center !important;
  background: #fff;
}

.photo-card img {
  display: block;
  width: 100%;
  height: 280px;
  object-fit: cover;
}

.photo-card.large img {
  height: 360px;
}

.diagram-card {
  padding: 16px;
}

.diagram-card img.diagram-image,
.diagram-card.large img.diagram-image {
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
  border-radius: 16px;
  background: #fff;
}

.diagram-card figcaption {
  padding: 12px 4px 0;
}

.diagram-focus {
  max-width: 1200px;
  margin: 0 auto;
}

.photo-card figcaption {
  padding: 14px 16px 16px;
  color: var(--muted);
  font-size: 0.95rem;
}

.grade-section + .grade-section {
  margin-top: 28px;
}

.grade-head {
  margin-bottom: 16px;
}

.grade-head h3 {
  margin: 0 0 6px;
  font-size: 1.35rem;
}

.grade-head p {
  margin: 0;
  color: var(--muted);
}

.media-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-top: 2rem;
  padding: 1.5rem;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(216, 205, 188, 0.72);
  box-shadow: var(--shadow);
}

.media-card h3 {
  margin: 0.25rem 0 0.75rem;
}

.media-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.promo-video {
  width: 100%;
  border-radius: 18px;
  background: #000;
  box-shadow: 0 14px 30px rgba(17, 24, 12, 0.18);
}

.notice-date {
  margin: 0;
  color: var(--gold);
  font-size: 0.84rem;
  letter-spacing: 0.08em;
}

.inner-page {
  padding: 10px 0 22px;
}

.page-hero {
  padding: 36px;
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(36, 69, 94, 0.92), rgba(145, 76, 72, 0.88));
  color: white;
  box-shadow: var(--shadow);
}

.page-hero .eyebrow {
  color: rgba(255, 236, 199, 0.9);
}

.page-hero h1 {
  font-size: clamp(2rem, 4vw, 3.3rem);
  margin-bottom: 0;
}

.content-grid {
  grid-template-columns: 1.2fr 1fr 1fr;
}

.content-card {
  padding: 28px;
}

.content-card.large {
  grid-column: span 2;
}

.timeline {
  display: grid;
  gap: 16px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 18px;
  padding: 20px 24px;
  border-radius: 24px;
  background: rgba(255, 253, 250, 0.78);
  border: 1px solid rgba(216, 205, 188, 0.7);
}

.timeline-item span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  background: var(--navy);
  color: white;
  font-weight: 700;
  min-height: 72px;
}

.contact-grid {
  grid-template-columns: 1.15fr 1fr 1fr;
}

.contact-number {
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--navy);
}

.teacher-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.teacher-card {
  overflow: hidden;
  border-radius: 24px;
  background: rgba(255, 253, 250, 0.88);
  border: 1px solid rgba(216, 205, 188, 0.72);
  box-shadow: var(--shadow);
}

.teacher-photo {
  display: block;
  width: 100%;
  height: 320px;
  object-fit: contain;
  object-position: center center;
  background: linear-gradient(135deg, rgba(36, 69, 94, 0.08), rgba(145, 76, 72, 0.08));
}

.teacher-photo.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 0.08em;
}

.teacher-body {
  padding: 18px 18px 20px;
}

.teacher-body h3 {
  margin: 0 0 6px;
  font-size: 1.18rem;
}

.teacher-body p {
  margin: 0;
  color: var(--muted);
}

.teacher-avatar {
  position: relative;
  display: grid;
  place-items: center;
  height: 260px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 48%, #ffe6c7 0 52px, transparent 54px),
    radial-gradient(circle at 50% 84%, rgba(45, 122, 123, 0.9) 0 82px, transparent 84px),
    linear-gradient(145deg, rgba(255, 215, 168, 0.55), rgba(255, 253, 248, 0.92));
}

.teacher-avatar::before {
  content: "";
  position: absolute;
  width: 120px;
  height: 78px;
  top: 74px;
  border-radius: 55px 55px 36px 36px;
  background: #3d332c;
  box-shadow:
    -34px 30px 0 -12px #3d332c,
    34px 30px 0 -12px #3d332c;
}

.teacher-avatar::after {
  content: "";
  position: absolute;
  width: 76px;
  height: 76px;
  top: 96px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 42%, #2c2824 0 4px, transparent 5px),
    radial-gradient(circle at 70% 42%, #2c2824 0 4px, transparent 5px),
    radial-gradient(ellipse at 50% 68%, #d97b63 0 8px, transparent 9px),
    #ffe6c7;
  z-index: 1;
}

.teacher-avatar span {
  position: relative;
  z-index: 2;
  margin-top: 120px;
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: #b65928;
  font-size: 1.6rem;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(55, 45, 32, 0.12);
}

.teacher-avatar.avatar-a { background-color: #fff3df; }
.teacher-avatar.avatar-b { background-color: #eaf7f1; }
.teacher-avatar.avatar-c { background-color: #fff0ef; }
.teacher-avatar.avatar-d { background-color: #f0f5ff; }
.teacher-avatar.avatar-e { background-color: #fff7d9; }
.teacher-avatar.avatar-f { background-color: #eef8e9; }

/* Refined teacher avatars: clean illustrated name badges instead of real photos */
.teacher-avatar {
  height: 240px;
  background:
    radial-gradient(circle at 24% 20%, rgba(255, 255, 255, 0.74), transparent 18%),
    radial-gradient(circle at 80% 18%, rgba(255, 215, 168, 0.38), transparent 22%),
    linear-gradient(145deg, var(--avatar-bg, #fff3df), #fffdf8);
}

.teacher-avatar::before {
  content: "";
  position: absolute;
  width: 126px;
  height: 126px;
  top: 44px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 42% 42% 48% 48%;
  background:
    radial-gradient(circle at 34% 44%, #2f2a26 0 4px, transparent 5px),
    radial-gradient(circle at 66% 44%, #2f2a26 0 4px, transparent 5px),
    radial-gradient(ellipse at 50% 66%, #db8068 0 8px, transparent 9px),
    linear-gradient(180deg, #ffe6c7 0 64%, #ffd7b8 100%);
  box-shadow:
    inset 0 18px 0 var(--hair, #3f342e),
    0 14px 28px rgba(55, 45, 32, 0.12);
  z-index: 1;
}

.teacher-avatar::after {
  content: "";
  position: absolute;
  width: 150px;
  height: 74px;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  border-radius: 52px 52px 26px 26px;
  background: linear-gradient(145deg, var(--shirt, #2d7a7b), rgba(45, 122, 123, 0.72));
}

.teacher-avatar span {
  position: absolute;
  right: 22px;
  bottom: 20px;
  z-index: 3;
  margin: 0;
  width: 58px;
  height: 58px;
  border: 3px solid rgba(255, 255, 255, 0.88);
  background: rgba(255, 255, 255, 0.94);
  color: var(--avatar-ink, #b65928);
  font-size: 1.45rem;
}

.teacher-avatar.avatar-a {
  --avatar-bg: #fff3df;
  --avatar-ink: #b65928;
  --shirt: #ef8f57;
  --hair: #3d332c;
}

.teacher-avatar.avatar-b {
  --avatar-bg: #eaf7f1;
  --avatar-ink: #2d7a7b;
  --shirt: #2d7a7b;
  --hair: #4a342a;
}

.teacher-avatar.avatar-c {
  --avatar-bg: #fff0ef;
  --avatar-ink: #b85e68;
  --shirt: #b85e68;
  --hair: #2f2a26;
}

.teacher-avatar.avatar-d {
  --avatar-bg: #eef4ff;
  --avatar-ink: #4f6fa3;
  --shirt: #4f6fa3;
  --hair: #46352d;
}

.teacher-avatar.avatar-e {
  --avatar-bg: #fff7d9;
  --avatar-ink: #9c7521;
  --shirt: #d59a3d;
  --hair: #3d332c;
}

.teacher-avatar.avatar-f {
  --avatar-bg: #eef8e9;
  --avatar-ink: #5a8a48;
  --shirt: #6d915e;
  --hair: #3a312b;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 0 36px;
  color: var(--muted);
}

.site-footer p {
  margin: 0;
}

.footer-title {
  margin: 0 0 6px;
  color: var(--ink);
  font-weight: 800;
}

.footer-qr {
  display: grid;
  justify-items: center;
  gap: 8px;
  flex: 0 0 auto;
  color: var(--forest);
  font-size: 0.9rem;
  font-weight: 700;
  text-align: center;
}

.footer-qr img {
  width: 104px;
  height: 104px;
  padding: 8px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(239, 143, 87, 0.22);
  box-shadow: 0 12px 24px rgba(55, 45, 32, 0.1);
}

@media (max-width: 960px) {
  .hero,
  .split,
  .content-grid,
  .contact-grid,
  .teacher-grid,
  .feature-grid,
  .track-grid,
  .photo-grid {
    grid-template-columns: 1fr;
  }

  .content-card.large {
    grid-column: auto;
  }

  .photo-card.large {
    grid-column: auto;
  }

  .site-header,
  .site-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-qr {
    justify-items: start;
    text-align: left;
  }

  .site-nav {
    justify-content: flex-start;
  }

  .hero-b {
    min-height: auto;
  }

  .hero-b-image img {
    height: 420px;
  }

  .hero-b-overlay {
    position: static;
    border-radius: 0 0 32px 32px;
  }
}

@media (max-width: 640px) {
  .hero-copy,
  .hero-panel,
  .page-hero,
  .content-card,
  .feature-card,
  .track-card,
  .gallery-card,
  .notice-card {
    padding: 22px;
  }

  .pillar-grid {
    grid-template-columns: 1fr;
  }

  .timeline-item {
    grid-template-columns: 1fr;
  }

  .timeline-item span {
    min-height: auto;
    padding: 10px 14px;
  }
}

/* B homepage visual language applied across inner pages */
:root {
  --bg: #fff7ec;
  --paper: #fffdf8;
  --ink: #24333d;
  --muted: #5e6a6d;
  --line: rgba(239, 143, 87, 0.22);
  --gold: #ef8f57;
  --forest: #2d7a7b;
  --navy: #2d7a7b;
  --berry: #b65928;
  --mint: #eaf5ef;
  --sand: #ffe2bd;
  --shadow: 0 20px 40px rgba(55, 45, 32, 0.12);
  --radius: 30px;
}

body {
  background:
    radial-gradient(circle at top left, rgba(255, 215, 168, 0.6), transparent 28%),
    radial-gradient(circle at bottom right, rgba(45, 122, 123, 0.12), transparent 24%),
    linear-gradient(180deg, #fff6e8, #fdf0df 52%, #fffaf2);
  font-family: "Microsoft JhengHei", "PingFang TC", sans-serif;
}

.brand,
.hero-copy h1,
.page-hero h1,
.section-head h2 {
  font-family: "Microsoft JhengHei", "PingFang TC", sans-serif;
}

.site-header {
  padding: 24px 0 18px;
}

.brand {
  font-size: 1.7rem;
  font-weight: 800;
}

.eyebrow {
  color: var(--gold);
  letter-spacing: 0.16em;
  font-weight: 700;
}

.site-nav a {
  border-radius: 999px;
  color: var(--muted);
}

.site-nav a.active,
.site-nav a:hover {
  background: rgba(239, 143, 87, 0.12);
  color: #af5a26;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 44px;
  border-radius: 36px;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.34), transparent 26%),
    linear-gradient(140deg, #f08e59, #f5b35d 52%, #ffd88f);
  color: #fff;
  box-shadow: var(--shadow);
}

.page-hero::before,
.page-hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  pointer-events: none;
}

.page-hero::before {
  width: 180px;
  height: 180px;
  top: -50px;
  right: -40px;
}

.page-hero::after {
  width: 120px;
  height: 120px;
  bottom: -30px;
  left: -10px;
}

.page-hero .eyebrow,
.page-hero h1,
.page-hero p {
  color: #fff;
}

.page-hero h1 {
  margin: 10px 0 0;
  max-width: 900px;
  font-size: clamp(2.1rem, 4vw, 4rem);
  line-height: 1.1;
}

.content-card,
.feature-card,
.track-card,
.gallery-card,
.notice-card,
.photo-card,
.timeline-item,
.teacher-card {
  background: rgba(255, 253, 248, 0.9);
  border: 1px solid rgba(239, 143, 87, 0.18);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.content-card h2,
.feature-card h3,
.track-card h3,
.notice-card h2,
.notice-card h3,
.teacher-body h3,
.grade-head h3,
.contact-number {
  color: var(--forest);
}

.feature-card span,
.timeline-item span {
  background: rgba(239, 143, 87, 0.15);
  color: #b65928;
}

.section.soft {
  background: rgba(255, 253, 248, 0.62);
  border: 1px solid rgba(239, 143, 87, 0.16);
  border-radius: 34px;
}

.track-card.warm,
.track-card.deep,
.track-card.earth,
.track-card.bright,
.banner-content,
.quote-card {
  background: linear-gradient(160deg, #2d7a7b, #5b9b84);
  color: #fff;
}

.track-card.warm p,
.track-card.deep p,
.track-card.earth p,
.track-card.bright p,
.banner-content p,
.quote-card p {
  color: rgba(255, 255, 255, 0.9);
}

.photo-card img {
  filter: saturate(1.02) contrast(1.02);
}

.photo-card figcaption {
  background: #fffdf8;
}

.teacher-photo {
  background: linear-gradient(135deg, rgba(239, 143, 87, 0.12), rgba(45, 122, 123, 0.1));
}

.site-footer {
  color: var(--muted);
}

@media (max-width: 640px) {
  .page-hero {
    padding: 30px 24px;
  }
}

/* Stronger alignment with the finalized B homepage */
.site-header,
.site-footer,
main {
  width: min(1200px, calc(100% - 30px));
}

.site-header {
  align-items: center;
  gap: 24px;
}

.site-nav {
  gap: 10px;
}

.site-nav a {
  padding: 10px 14px;
  font-size: 1rem;
}

.inner-page {
  padding-top: 10px;
}

.page-hero,
.content-card,
.feature-card,
.notice-card,
.teacher-card,
.timeline-item,
.photo-card,
.diagram-card {
  border-radius: 30px;
}

.page-hero {
  margin-bottom: 28px;
}

.page-hero h1 {
  max-width: 980px;
  font-weight: 800;
}

.content-grid,
.contact-grid,
.notice-board,
.feature-grid,
.teacher-grid,
.photo-grid,
.track-grid {
  gap: 18px;
}

.content-card,
.feature-card,
.notice-card {
  padding: 26px;
}

.content-card.large {
  background:
    radial-gradient(circle at top right, rgba(255, 215, 168, 0.34), transparent 26%),
    rgba(255, 253, 248, 0.92);
}

.timeline-item {
  background: rgba(255, 253, 248, 0.74);
  backdrop-filter: blur(4px);
}

.timeline-item span {
  border-radius: 20px;
  min-height: 76px;
}

.section-head h2 {
  color: var(--ink);
  font-weight: 800;
}

.grade-section {
  margin-top: 26px;
}

.grade-head h3 {
  font-size: 1.55rem;
}

.photo-card {
  background: #fffdf8;
}

.photo-card img {
  border-radius: 0;
}

.photo-card figcaption {
  padding: 16px 18px 18px;
  color: var(--muted);
}


.photo-grid.mentor-layout {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
}

.mentor-side {
  display: grid;
  grid-template-rows: auto 1fr;
}

.mentor-side img {
  height: 250px;
}

.mentor-side-image {
  object-fit: contain !important;
  object-position: center center !important;
  background: #f7f1e7;
}

@media (max-width: 900px) {
  .photo-grid.mentor-layout {
    grid-template-columns: 1fr;
  }

  .mentor-side img {
    height: 280px;
  }
}

.diagram-card {
  padding: 12px;
}

.diagram-image {
  border-radius: 22px;
}

.photo-grid-single .diagram-card {
  width: 100%;
}

.photo-grid-single .diagram-image {
  display: block;
  width: 100%;
}

.notice-date {
  color: #b65928;
  font-weight: 800;
}

.curriculum-table-wrap {
  margin-top: 22px;
  overflow-x: auto;
}

.curriculum-card {
  margin-top: 24px;
}

.section-head-centered {
  text-align: center;
  margin-bottom: 18px;
}

.section-head-centered h2 {
  margin: 0;
  font-size: 2rem;
}

.curriculum-map-layout {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 12px;
  align-items: start;
  margin-top: 12px;
}

.map-stair {
  display: grid;
  grid-template-rows: 78px repeat(4, 92px);
  align-items: center;
  justify-items: end;
  gap: 0;
  margin-top: 88px;
}

.map-step-spacer {
  width: 100%;
}

.map-step {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  color: #fff;
  background: #787878;
  font-weight: 800;
  font-size: 1.02rem;
  box-shadow: inset 0 -10px 0 rgba(255, 255, 255, 0.14);
}

.step-6 { width: 52px; }
.step-5 { width: 72px; }
.step-4 { width: 92px; }
.step-3 { width: 112px; }

.map-band {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  min-height: 352px;
  padding: 10px 0;
  border-radius: 10px;
  background: linear-gradient(180deg, #ffd84d, #ffe98b);
  color: #7a6416;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.map-band-top {
  writing-mode: horizontal-tb;
  min-height: 44px;
  width: fit-content;
  padding: 10px 18px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.between-card-badge {
  display: flex;
  justify-content: center;
  margin: -4px 0 14px;
}

.map-table-board {
  background: rgba(255, 253, 248, 0.72);
  border: 1px solid rgba(226, 214, 198, 0.92);
  border-radius: 18px;
  padding: 12px 12px 10px;
}

.scan-board {
  display: grid;
  grid-template-columns: 0.84fr 1.36fr;
  gap: 12px;
  align-items: start;
}

.scan-grid {
  display: grid;
  border: 1px solid rgba(178, 171, 160, 0.82);
  background: rgba(255, 255, 255, 0.5);
}

.scan-column {
  min-width: 0;
}

.special-scan-grid {
  --side-col: 76px;
  --topic-col: 1fr;
  grid-template-columns: var(--side-col) var(--topic-col) var(--topic-col);
  grid-template-rows: 78px repeat(4, 92px);
}

.subject-scan-grid {
  --side-col: 76px;
  --subject-col-1: 1.18fr;
  --subject-col-2: 1.14fr;
  --subject-col-3: 1fr;
  --subject-col-4: 1fr;
  grid-template-columns: var(--side-col) var(--subject-col-1) var(--subject-col-2) var(--subject-col-3) var(--subject-col-4);
  grid-template-rows: 78px 184px 184px;
}

.scan-cell {
  padding: 12px 10px;
  border-right: 1px solid rgba(178, 171, 160, 0.82);
  border-bottom: 1px solid rgba(178, 171, 160, 0.82);
  color: var(--ink);
  font-size: 1.28rem;
  line-height: 1.45;
  background: rgba(255, 255, 255, 0.42);
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.scan-cell.head {
  background: rgba(248, 215, 181, 0.2);
  font-size: 1.72rem;
  font-weight: 800;
  text-align: center;
}

.scan-cell.grade-cell,
.scan-cell.level-cell {
  background: rgba(45, 122, 123, 0.04);
  font-size: 1.62rem;
  font-weight: 800;
  text-align: center;
}

.middle-level-cell {
  line-height: 1.35;
}

.tall-row-cell {
  height: 184px;
}

.scan-cell.blank-cell {
  background: rgba(255, 249, 242, 0.28);
}

.scan-section-title {
  margin: 0 0 8px;
  padding: 0 0 4px;
  color: #2d7a7b;
  font-size: 1.72rem;
  font-weight: 800;
  text-align: center;
  background: transparent;
  width: 100%;
}

.scan-section-title-left {
  padding-left: 0;
}

.scan-column {
  display: grid;
  justify-items: stretch;
}

.scan-column:first-child .scan-section-title {
  justify-self: start;
  width: calc(100% - var(--title-offset, 76px));
  margin-left: var(--title-offset, 76px);
}

.scan-column:nth-child(2) .scan-section-title {
  justify-self: start;
  width: max-content;
  margin-left: calc(var(--title-offset, 76px) + (100% - var(--title-offset, 76px)) * 0.535);
  transform: translateX(-50%);
}

.special-scan-grid > .scan-cell:nth-child(3n),
.subject-scan-grid > .scan-cell:nth-child(5n) {
  border-right: 0;
}

.special-scan-grid > .scan-cell:nth-last-child(-n + 3),
.subject-scan-grid > .scan-cell:nth-last-child(-n + 5) {
  border-bottom: 0;
}

@media (max-width: 760px) {
  .curriculum-map-layout {
    grid-template-columns: 1fr;
  }

  .map-stair {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-template-rows: auto;
    justify-items: stretch;
    gap: 10px;
    margin-top: 0;
  }

  .map-step-spacer {
    display: none;
  }

  .map-step,
  .step-6,
  .step-5,
  .step-4,
  .step-3 {
    width: 100%;
  }

  .map-band {
    writing-mode: horizontal-tb;
    min-height: 44px;
    align-self: auto;
  }

  .map-table-board {
    overflow-x: auto;
    padding: 10px;
    -webkit-overflow-scrolling: touch;
  }

  .scan-board {
    grid-template-columns: 1fr;
    min-width: 430px;
  }

  .scan-column {
    justify-self: start;
    width: max-content;
  }

  .scan-column:first-child .scan-section-title {
    --title-offset: 56px;
  }

  .scan-column:nth-child(2) .scan-section-title {
    --title-offset: 56px;
    margin-left: calc(var(--title-offset) + (100% - var(--title-offset)) * 0.5);
  }

  .special-scan-grid {
    --side-col: 56px;
    --topic-col: 102px;
    width: 260px;
  }

  .subject-scan-grid {
    --side-col: 56px;
    --subject-col-1: 93px;
    --subject-col-2: 93px;
    --subject-col-3: 93px;
    --subject-col-4: 93px;
    width: 428px;
  }

  .scan-cell {
    padding: 10px 8px;
    font-size: 1rem;
    line-height: 1.38;
  }

  .scan-cell.head,
  .scan-section-title {
    font-size: 1.28rem;
  }

  .scan-cell.grade-cell,
  .scan-cell.level-cell {
    font-size: 1.32rem;
  }

  .scan-grid > .scan-cell {
    border-right: 1px solid rgba(178, 171, 160, 0.82);
  }

  .special-scan-grid > .scan-cell:nth-child(3n),
  .subject-scan-grid > .scan-cell:nth-child(5n) {
    border-right: 0;
  }

  .scan-grid > .scan-cell:last-child,
  .special-scan-grid > .scan-cell:nth-last-child(-n + 3),
  .subject-scan-grid > .scan-cell:nth-last-child(-n + 5) {
    border-bottom: 0;
  }
}

.notice-board .notice-card:first-child,
.contact-grid .content-card.large {
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.28), transparent 26%),
    linear-gradient(140deg, #f08e59, #f5b35d 52%, #ffd88f);
  color: #fff;
}

.notice-board .notice-card:first-child h2,
.notice-board .notice-card:first-child p,
.notice-board .notice-card:first-child .notice-date,
.contact-grid .content-card.large h2,
.contact-grid .content-card.large p,
.contact-grid .content-card.large .contact-number {
  color: #fff;
}

.site-footer {
  border-top: 1px solid rgba(239, 143, 87, 0.18);
  margin-top: 4px;
}

.org-chart-section {
  margin-bottom: 34px;
}

.org-chart {
  display: grid;
  justify-items: center;
  gap: 10px;
}

.org-level {
  display: flex;
  justify-content: center;
  width: 100%;
}

.org-node {
  min-width: min(100%, 280px);
  padding: 20px 24px;
  text-align: center;
  background: rgba(255, 253, 248, 0.92);
  border: 1px solid rgba(239, 143, 87, 0.22);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.org-node h3 {
  margin: 0;
  color: var(--forest);
}

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

.org-connector.vertical {
  width: 2px;
  height: 28px;
  background: linear-gradient(180deg, rgba(239, 143, 87, 0.3), rgba(45, 122, 123, 0.55));
  border-radius: 999px;
}

.org-branch-connectors {
  position: relative;
  width: min(100%, 860px);
  height: 34px;
}

.org-branch-connectors::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 2px;
  height: 16px;
  background: rgba(45, 122, 123, 0.55);
  transform: translateX(-50%);
}

.org-branch-connectors span:nth-child(1) {
  position: absolute;
  top: 16px;
  left: 10%;
  right: 10%;
  height: 2px;
  background: rgba(45, 122, 123, 0.55);
  border-radius: 999px;
}

.org-branch-connectors span:nth-child(2),
.org-branch-connectors span:nth-child(3),
.org-branch-connectors span:nth-child(4) {
  position: absolute;
  top: 16px;
  width: 2px;
  height: 18px;
  background: rgba(45, 122, 123, 0.55);
  border-radius: 999px;
}

.org-branch-connectors span:nth-child(2) {
  left: 10%;
}

.org-branch-connectors span:nth-child(3) {
  left: 50%;
  transform: translateX(-50%);
}

.org-branch-connectors span:nth-child(4) {
  right: 10%;
}

.org-branch-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  width: min(100%, 960px);
}

@media (max-width: 760px) {
  .org-branch-connectors {
    display: none;
  }

  .org-branch-grid {
    grid-template-columns: 1fr;
  }
}

/* Keep the about intro cards filling one row on desktop */
@media (min-width: 980px) {
  .content-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .content-card.large {
    grid-column: auto;
  }
}

/* Fill activity photo sections more evenly */
.grade-section .photo-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.grade-section .photo-card.large {
  grid-column: auto;
}

.grade-section .photo-card img,
.grade-section .photo-card.large img {
  height: 300px;
}

.media-card-image {
  object-position: center 22%;
}

/* Let single-photo sections use the full available width */
.section > .photo-grid:has(.photo-card:only-child) {
  grid-template-columns: 1fr;
}

.section > .photo-grid:has(.photo-card:only-child) .photo-card.large {
  grid-column: auto;
}

.section > .photo-grid:has(.photo-card:only-child) .photo-card img {
  height: min(520px, 58vw);
}

@media (min-width: 980px) {
  .grade-section .photo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

.grade-section .photo-grid:has(.photo-card:nth-child(3):last-child) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Final typography lock: keep every visible text in Microsoft JhengHei */
body,
button,
input,
textarea,
select,
.brand,
.eyebrow,
.site-nav a,
h1,
h2,
h3,
h4,
p,
a,
span,
figcaption,
li {
  font-family: "Microsoft JhengHei", "PingFang TC", sans-serif !important;
}

.brand {
  font-weight: 800;
  letter-spacing: 0;
}

.page-hero h1,
.section-head h2,
.content-card h2,
.notice-card h2,
.notice-card h3,
.grade-head h3 {
  line-break: strict;
  overflow-wrap: normal;
  text-wrap: balance;
  word-break: normal;
}

p,
figcaption,
li {
  line-break: strict;
  overflow-wrap: break-word;
  word-break: normal;
}

.text-keep {
  white-space: nowrap;
}

.page-hero h1,
.section-head h2,
.grade-head h3,
.content-card h2,
.feature-card h3,
.notice-card h2,
.notice-card h3 {
  font-family: "Microsoft JhengHei", "PingFang TC", sans-serif !important;
  font-weight: 800 !important;
  letter-spacing: 0 !important;
}

@media (max-width: 640px) {
  .page-hero h1 {
    font-size: clamp(1.82rem, 7vw, 2.35rem);
    line-height: 1.22;
  }

  .section-head h2,
  .content-card h2,
  .notice-card h2,
  .notice-card h3,
  .grade-head h3 {
    line-height: 1.28;
  }
}
