:root {
  color-scheme: light;
  --cream: #fffdf8;
  --linen: #faf6ee;
  --sage: #6eb92b;
  --sage-2: #8bcf4a;
  --sage-soft: #edf8e5;
  --sage-deep: #2f6f1d;
  --ink: #243b36;
  --muted: #5d6f73;
  --line: #e8dfd2;
  --blue: #2f6f9f;
  --white: #ffffff;
  --section-band: rgba(250, 246, 238, .68);
  --section-card: rgba(255, 253, 248, .9);
  --section-accent: rgba(110, 185, 43, .46);
  --section-rule: linear-gradient(90deg, transparent 0%, rgba(36, 59, 54, .12) 16%, rgba(110, 185, 43, .32) 50%, rgba(36, 59, 54, .12) 84%, transparent 100%);
  --soft: 0 12px 36px rgba(36, 59, 54, .08);
  --lift: 0 18px 44px rgba(36, 59, 54, .12);
  --h5-max: 430px;
  --type-section-label: 13px;
  --type-body: 14px;
  --type-card-title: 16px;
  background: var(--cream);
  color: var(--ink);
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  line-height: 1.6;
  scroll-behavior: smooth;
}

* {
  box-sizing: border-box;
}

html {
  background: #f2eee5;
}

body {
  width: min(100%, var(--h5-max));
  min-width: 320px;
  margin: 0 auto;
  overflow-x: hidden;
  background: transparent;
  letter-spacing: 0;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(90deg, rgba(36, 59, 54, .055) 1px, transparent 1px),
    linear-gradient(180deg, rgba(36, 59, 54, .045) 1px, transparent 1px);
  background-size: 28px 28px;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}

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

img,
svg {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

[id] {
  scroll-margin-top: 86px;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 120;
  transform: translateY(-140%);
  padding: 8px 12px;
  border: 1px solid var(--ink);
  border-radius: 6px;
  background: var(--white);
  color: var(--ink);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 20px 0;
  background: transparent;
}

main {
  background: linear-gradient(180deg, var(--cream) 0%, rgba(250, 246, 238, .72) 100%);
  box-shadow: 0 24px 80px rgba(36, 59, 54, .12);
}

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

.brand img {
  width: 136px;
  height: auto;
}

.brand-tagline {
  display: block;
  flex: 0 1 auto;
  width: clamp(124px, 39vw, 154px);
  height: auto;
  margin-left: auto;
}

.section {
  padding: 52px 20px;
}

.section-inner,
.tg-section-inner {
  width: min(100%, 1120px);
  margin: 0 auto;
}

.section-head.wide {
  max-width: 760px;
  margin-bottom: 28px;
}

.schedule-section .section-head.wide {
  margin-left: 0;
}

.section-head h2 {
  margin-bottom: 16px;
  color: var(--ink);
  font-family: inherit;
  font-size: 30px;
  font-weight: 900;
  line-height: 1.18;
}

.section-head p {
  color: var(--muted);
}

.schedule-section {
  position: relative;
  background: var(--section-band);
}

.schedule-section::before {
  position: absolute;
  top: 24px;
  right: 20px;
  left: 20px;
  height: 1px;
  content: "";
  background: var(--section-rule);
}

.schedule-section .section-inner::before {
  display: block;
  width: 42px;
  height: 4px;
  margin: 0 0 14px;
  border-radius: 999px;
  background: var(--section-accent);
  content: "";
}

.course-intro-section {
  background: var(--section-band);
}

.course-intro-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 24px;
}

.course-intro-card {
  min-width: 0;
  border: 1px solid var(--course-border, rgba(110, 185, 43, .18));
  border-radius: 8px;
  padding: 18px 16px;
  background: var(--section-card);
  box-shadow: 0 12px 30px rgba(36, 59, 54, .08);
}

.course-intro-math {
  --course-accent: #6eb92b;
  --course-border: rgba(105, 155, 82, .26);
}

.course-intro-english {
  --course-accent: #f16064;
  --course-border: rgba(194, 62, 65, .24);
}

.course-intro-chinese {
  --course-accent: #bd76bd;
  --course-border: rgba(161, 90, 161, .24);
}

.course-intro-card span {
  display: block;
  color: var(--course-accent, var(--sage));
  font-size: var(--type-section-label);
  font-weight: 800;
  line-height: 1.28;
}

.course-intro-card h3 {
  margin: 8px 0 10px;
  color: var(--ink);
  font-size: var(--type-card-title);
  font-weight: 800;
  line-height: 1.48;
}

.course-intro-card p {
  margin: 0;
  color: var(--muted);
  font-size: var(--type-body);
  line-height: 1.72;
}

.course-intro-card p + p {
  margin-top: 10px;
}

.syllabus-panel + .syllabus-panel {
  margin-top: 30px;
}

.syllabus-scroll {
  margin-inline: 0;
  padding: 4px 0 24px;
  overflow: hidden;
}

.syllabus-scroll:focus-visible {
  outline: 3px solid rgba(47, 111, 159, .28);
  outline-offset: 3px;
}

.syllabus-sheet {
  width: min(780px, calc(200vw - 80px));
  overflow: hidden;
  border: 1px solid var(--syllabus-frame);
  border-radius: 24px;
  padding: 30px 18px 22px;
  background: linear-gradient(180deg, #fff 0%, var(--syllabus-frame-bg) 100%);
  box-shadow: 0 16px 42px rgba(36, 59, 54, .1);
  color: #050505;
  font-family: inherit;
  zoom: .5;
}

.tg-saveable-area {
  -webkit-user-select: none;
  user-select: none;
}

.tg-saveable-area.is-pressing {
  outline: 2px solid rgba(110, 185, 43, .24);
  outline-offset: 3px;
}

.syllabus-sheet h3 {
  margin: 0 0 14px;
  color: #050505;
  font-size: 28px;
  font-weight: 900;
  line-height: 1.18;
  text-align: center;
}

.syllabus-sheet h3 span {
  color: var(--syllabus-color);
}

.syllabus-time {
  margin: 0 0 22px;
  color: #050505;
  font-size: 20px;
  font-weight: 900;
  line-height: 1.2;
  text-align: center;
}

.syllabus-table {
  width: 100%;
  border: 2px solid #111;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 19px;
  line-height: 1.28;
}

.col-session {
  width: 10%;
}

.col-title {
  width: 27%;
}

.col-content {
  width: 63%;
}

.syllabus-table th,
.syllabus-table td {
  border: 2px solid #111;
  padding: 8px 9px;
  text-align: center;
  vertical-align: middle;
}

.syllabus-table th {
  background: var(--syllabus-color);
  font-size: 19px;
  font-weight: 900;
}

.syllabus-table th:first-child {
  white-space: nowrap;
}

.syllabus-table tbody tr:nth-child(odd):not(.syllabus-periods) td {
  background: var(--syllabus-tint);
}

.syllabus-periods td {
  height: 78px;
  background: #fff;
  vertical-align: top;
}

.syllabus-periods td:last-child {
  padding: 13px 15px;
  text-align: left;
  vertical-align: top;
}

.syllabus-periods p {
  margin: 0 0 8px;
  color: #111;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.35;
}

.syllabus-periods p:last-child {
  margin-bottom: 0;
}

.math-panel {
  --syllabus-color: #b8d99b;
  --syllabus-tint: #eef6e9;
  --syllabus-frame: rgba(105, 155, 82, .38);
  --syllabus-frame-bg: #f8fcf3;
}

.english-panel {
  --syllabus-color: #f16064;
  --syllabus-tint: #fde7e7;
  --syllabus-frame: rgba(194, 62, 65, .3);
  --syllabus-frame-bg: #fff5f5;
}

.chinese-panel {
  --syllabus-color: #bd76bd;
  --syllabus-tint: #f1e7f1;
  --syllabus-frame: rgba(161, 90, 161, .3);
  --syllabus-frame-bg: #fbf5fb;
}

.tg-section {
  position: relative;
  padding: 56px 20px;
  scroll-margin-top: 18px;
}

.tg-section.tg-separated {
  padding-top: 58px;
}

.tg-section.tg-separated::before {
  position: absolute;
  top: 24px;
  right: 20px;
  left: 20px;
  height: 1px;
  content: "";
  background: var(--section-rule);
}

.tg-section.tg-separated .tg-section-inner::before {
  display: block;
  width: 42px;
  height: 4px;
  margin-bottom: 14px;
  border-radius: 999px;
  background: var(--section-accent);
  content: "";
}

#contact {
  scroll-margin-top: 18px;
}

.tg-section:last-of-type {
  padding-bottom: 56px;
}

.tg-band {
  background: var(--section-band);
}

.tg-eyebrow {
  margin: 0 0 12px;
  color: var(--sage);
  font-size: var(--type-section-label);
  font-weight: 800;
  line-height: 1.28;
}

#courseIntro .tg-eyebrow,
#schedule .tg-eyebrow,
#contact .tg-eyebrow,
.tg-lead-sheet-panel > .tg-eyebrow {
  color: var(--sage);
  font-size: var(--type-section-label);
}

.tg-section h2,
.tg-lead-sheet-panel h2 {
  max-width: 760px;
  margin: 0;
  color: var(--ink);
  font-family: inherit;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.22;
}

.tg-primary,
.tg-secondary,
.tg-submit,
.tg-sticky a {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0 24px;
  font-weight: 700;
  transition: transform .22s ease, border-color .22s ease, background .22s ease, box-shadow .22s ease;
}

.tg-primary,
.tg-secondary,
.tg-submit {
  cursor: pointer;
}

.tg-primary,
.tg-submit,
.tg-sticky a {
  border: 0;
  background: var(--ink);
  color: #fff;
  box-shadow: var(--soft);
}

.tg-secondary {
  border: 1px solid var(--line);
  background: var(--cream);
  color: var(--ink);
}

.tg-contact-card {
  margin-top: 22px;
  border: 1px solid rgba(110, 185, 43, .18);
  border-radius: 28px;
  padding: 22px;
  background: var(--section-card);
  box-shadow: var(--soft);
}

.tg-contact-card > p {
  margin-top: 0;
  color: var(--muted);
  font-size: var(--type-body);
  line-height: 1.72;
}

.tg-contact-card dl {
  display: grid;
  gap: 14px;
  margin: 22px 0 0;
}

.tg-contact-card dt {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--sage);
  font-size: var(--type-section-label);
  font-weight: 800;
  line-height: 1.32;
}

.tg-contact-icon {
  display: inline-flex;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(110, 185, 43, .12);
  color: #2f7c20;
}

.tg-contact-icon svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.tg-contact-card dd {
  margin: 4px 0 0;
  color: var(--ink);
  font-size: var(--type-body);
  line-height: 1.62;
  white-space: pre-line;
}

#contact .tg-contact-address {
  white-space: normal;
}

.tg-form {
  display: grid;
  gap: 14px;
  margin-top: 22px;
  border: 1px solid rgba(232, 223, 210, .86);
  border-radius: 24px;
  padding: 18px;
  background: rgba(255, 253, 248, .82);
}

.tg-form label {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-size: var(--type-body);
  font-weight: 700;
}

.tg-form input,
.tg-form select {
  box-sizing: border-box;
  width: 100%;
  height: 52px;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0 14px;
  outline: 0;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  line-height: 1.2;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.tg-form select {
  padding-right: 42px;
  -webkit-appearance: none;
  appearance: none;
  background-color: #fff;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(36, 59, 54, .9) 50%),
    linear-gradient(135deg, rgba(36, 59, 54, .9) 50%, transparent 50%);
  background-position:
    calc(100% - 21px) 50%,
    calc(100% - 15px) 50%;
  background-repeat: no-repeat;
  background-size: 7px 7px, 7px 7px;
}

.tg-form input:focus,
.tg-form select:focus {
  border-color: rgba(110, 185, 43, .7);
  box-shadow: 0 0 0 4px rgba(110, 185, 43, .12);
}

.tg-submit {
  width: 100%;
  margin-top: 4px;
}

.tg-submit:disabled {
  cursor: wait;
  opacity: .68;
}

.tg-form p {
  margin: 0;
  color: rgba(36, 59, 54, .56);
  font-size: var(--type-section-label);
  line-height: 1.7;
}

.tg-lock-scroll,
.tg-lock-scroll body {
  overflow: hidden;
}

.tg-lead-sheet {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  align-items: end;
  justify-items: center;
}

.tg-lead-sheet[hidden] {
  display: none;
}

.tg-lead-sheet-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(36, 59, 54, .46);
  cursor: pointer;
}

.tg-lead-sheet-panel {
  position: relative;
  width: min(100%, 430px);
  max-height: min(88vh, 760px);
  overflow: auto;
  border: 1px solid rgba(232, 223, 210, .96);
  border-radius: 28px 28px 0 0;
  padding: 22px 20px calc(22px + env(safe-area-inset-bottom));
  background: var(--cream);
  box-shadow: 0 -24px 70px rgba(36, 59, 54, .24);
  opacity: 0;
  transform: translateY(100%);
  transition: opacity .22s ease, transform .22s ease;
}

.tg-lead-sheet.is-open .tg-lead-sheet-panel {
  opacity: 1;
  transform: translateY(0);
}

.tg-lead-sheet-panel h2 {
  margin: 6px 44px 0 0;
  font-size: 24px;
  line-height: 1.25;
}

.tg-lead-intro {
  margin: 10px 0 0;
  color: rgba(36, 59, 54, .68);
  font-size: var(--type-body);
  line-height: 1.7;
}

.tg-lead-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

.tg-lead-sheet .tg-form {
  margin-top: 18px;
  border: 0;
  padding: 0;
  background: transparent;
}

.tg-wechat-block {
  margin-top: 22px;
}

.tg-wechat-block p {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: var(--type-body);
  font-weight: 700;
  line-height: 1.5;
}

.tg-wechat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.tg-wechat-card {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.tg-wechat-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  padding: 8px;
}

.tg-wechat-card figcaption {
  border-top: 1px solid var(--line);
  padding: 8px 4px 9px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
}

.tg-footer {
  display: grid;
  gap: 6px;
  padding: 34px 20px calc(104px + env(safe-area-inset-bottom));
  color: rgba(36, 59, 54, .58);
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
}

.tg-footer p {
  margin: 0;
}

.tg-footer-tech {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .28em;
  flex-wrap: wrap;
}

.tg-footer-brand {
  display: inline-flex;
  align-items: center;
  gap: .08em;
  color: rgba(36, 59, 54, .68);
}

.tg-footer-brand img {
  width: 1.15em;
  height: 1.15em;
  object-fit: contain;
  vertical-align: -0.14em;
}

.tg-footer-separator {
  margin: 0;
  line-height: 1;
}

.tg-save-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(36, 59, 54, .48);
}

.tg-save-modal[hidden] {
  display: none;
}

.tg-save-dialog {
  position: relative;
  width: min(100%, 460px);
  max-height: min(88vh, 820px);
  overflow: auto;
  border: 1px solid rgba(232, 223, 210, .92);
  border-radius: 24px;
  padding: 12px;
  background: #fffdf8;
  box-shadow: 0 24px 64px rgba(36, 59, 54, .2);
}

.tg-save-dialog img {
  display: block;
  width: 100%;
  max-height: calc(88vh - 40px);
  height: auto;
  border-radius: 16px;
  object-fit: contain;
  user-select: auto;
  -webkit-user-select: auto;
  -webkit-touch-callout: default;
}

.tg-save-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(36, 59, 54, .1);
  border-radius: 999px;
  background: rgba(255, 253, 248, .92);
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
  box-shadow: 0 8px 20px rgba(36, 59, 54, .14);
  cursor: pointer;
}

.tg-sticky {
  position: fixed;
  inset: auto 0 0;
  z-index: 20;
  display: grid;
  border-top: 1px solid var(--line);
  padding: 10px 20px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255, 253, 248, .96);
  box-shadow: 0 -12px 36px rgba(36, 59, 54, .08);
  backdrop-filter: blur(16px);
}

.tg-sticky a {
  min-height: 52px;
  font-size: 16px;
}

.tg-toast {
  position: fixed;
  left: 50%;
  bottom: calc(84px + env(safe-area-inset-bottom));
  z-index: 100;
  width: min(calc(100% - 40px), 390px);
  border-radius: 999px;
  padding: 14px 18px;
  background: rgba(36, 59, 54, .96);
  box-shadow: 0 14px 34px rgba(36, 59, 54, .18);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity .22s ease, transform .22s ease;
}

.tg-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--sage);
  outline-offset: 4px;
}

@media (hover: hover) {
  .tg-primary:hover,
  .tg-secondary:hover {
    transform: translateY(-3px);
  }
}

@media (min-width: 520px) {
  .tg-sticky {
    left: 50%;
    right: auto;
    width: min(100%, 430px);
    transform: translateX(-50%);
  }

  .tg-lead-sheet {
    align-items: center;
    padding: 22px;
  }

  .tg-lead-sheet-panel {
    width: min(100%, 390px);
    border-radius: 28px;
    padding-bottom: 22px;
    box-shadow: 0 24px 70px rgba(36, 59, 54, .2);
    transform: translateY(12px) scale(.98);
  }

  .tg-lead-sheet.is-open .tg-lead-sheet-panel {
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 410px) {
  .syllabus-sheet {
    zoom: .5;
  }
}

@media (max-width: 430px) {
  body {
    box-shadow: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}
