:root {
  --bg: #f8fafc;
  --bg-soft: #eef4fb;
  --surface: #ffffff;
  --surface-muted: #f1f5f9;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #d7e0ea;
  --primary: #1e3a8a;
  --primary-strong: #172f70;
  --navy: #0f172a;
  --accent: #b45309;
  --accent-soft: #fff7ed;
  --chip: #eef4fb;
  --success: #0f766e;
  --ring: rgba(30, 58, 138, 0.28);
  --shadow-sm: 0 8px 22px rgba(15, 23, 42, 0.06);
  --shadow: 0 18px 54px rgba(15, 23, 42, 0.1);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --radius: 8px;
  --max: 1320px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
  scroll-snap-type: y proximity;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family:
    "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", sans-serif;
  line-height: 1.55;
}

body.dialog-open {
  overflow: hidden;
}

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

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
  touch-action: manipulation;
}

button,
a,
input,
summary {
  transition:
    background-color 180ms var(--ease),
    border-color 180ms var(--ease),
    color 180ms var(--ease),
    box-shadow 180ms var(--ease),
    transform 180ms var(--ease);
}

:focus-visible {
  outline: 3px solid var(--ring);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 999;
  padding: 10px 14px;
  color: #fff;
  background: var(--primary);
  border-radius: var(--radius);
  font-weight: 900;
  transform: translateY(-160%);
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 76px;
  padding: 0 clamp(18px, 4vw, 56px);
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

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

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: #fff;
  background: var(--navy);
  border-radius: var(--radius);
  font-weight: 900;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  color: var(--ink);
  font-size: 18px;
  line-height: 1.1;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 3vw, 34px);
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.header-nav a {
  position: relative;
}

.header-nav a::after {
  position: absolute;
  right: 0;
  bottom: -8px;
  left: 0;
  height: 2px;
  background: var(--primary);
  border-radius: 999px;
  content: "";
  opacity: 0;
}

.header-nav a:hover {
  color: var(--primary);
}

.header-nav a:hover::after {
  opacity: 1;
}

.mobile-menu {
  position: relative;
  display: none;
}

.mobile-menu summary {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 44px;
  height: 44px;
  padding: 0;
  background: var(--navy);
  border-radius: 999px;
  cursor: pointer;
  list-style: none;
}

.mobile-menu summary::-webkit-details-marker {
  display: none;
}

.mobile-menu summary span {
  display: block;
  width: 18px;
  height: 2px;
  background: #fff;
  border-radius: 999px;
}

.mobile-menu-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  display: grid;
  gap: 4px;
  min-width: 150px;
  padding: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.mobile-menu-panel a {
  padding: 10px 12px;
  color: var(--ink);
  border-radius: 6px;
  font-size: 14px;
  font-weight: 800;
}

.mobile-menu-panel a:hover {
  color: var(--primary);
  background: var(--surface-muted);
}

.header-action,
.primary-button,
.secondary-button,
.ghost-button,
.finder-reset {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 5px;
  font-weight: 800;
  white-space: nowrap;
}

.header-action,
.primary-button {
  color: #fff;
  background: var(--primary);
}

.header-action:hover,
.primary-button:hover {
  background: var(--primary-strong);
  box-shadow: 0 10px 20px rgba(30, 58, 138, 0.16);
}

.secondary-button,
.ghost-button,
.finder-reset {
  color: var(--primary);
  background: #fff;
  border-color: rgba(30, 58, 138, 0.32);
}

.secondary-button:hover,
.ghost-button:hover,
.finder-reset:hover {
  border-color: var(--primary);
  box-shadow: 0 8px 18px rgba(30, 58, 138, 0.08);
}

.header-action:active,
.primary-button:active,
.secondary-button:active,
.ghost-button:active,
.finder-reset:active,
.search-button:active,
.chip:active {
  transform: translateY(1px);
}

.small {
  min-height: 44px;
  padding-inline: 14px;
  font-size: 14px;
}

main {
  overflow: hidden;
}

.hero-section,
.finder-section,
.feedback-section,
.contact-section,
.quick-links-section {
  width: min(var(--max), calc(100% - 64px));
  margin: 0 auto;
}

.hero-section {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 880px);
  grid-template-rows: auto minmax(0, 1fr);
  gap: clamp(20px, 4vw, 34px);
  align-items: start;
  align-content: space-between;
  min-height: calc(100svh - 76px);
  padding: clamp(34px, 6vw, 72px) 0 clamp(16px, 3vw, 28px);
  scroll-snap-align: start;
}

.hero-section::before,
.hero-section::after {
  position: absolute;
  display: none;
  color: var(--navy);
  font-size: 56px;
  line-height: 1;
  content: "";
}

.hero-section::before {
  top: 86px;
  left: -18px;
  width: 44px;
  height: 28px;
  border-top: 3px solid var(--navy);
  border-left: 3px solid var(--navy);
  transform: rotate(-20deg);
}

.hero-section::after {
  right: 0;
  bottom: 88px;
  width: 24px;
  height: 24px;
  background:
    linear-gradient(45deg, transparent 43%, var(--navy) 43%, var(--navy) 57%, transparent 57%),
    linear-gradient(-45deg, transparent 43%, var(--navy) 43%, var(--navy) 57%, transparent 57%);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 680px;
  margin: 0;
  color: var(--ink);
  font-size: clamp(38px, 5.8vw, 62px);
  line-height: 1.18;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(26px, 3.2vw, 38px);
  line-height: 1.2;
  letter-spacing: 0;
}

h3 {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.25;
  letter-spacing: 0;
}

.hero-text {
  max-width: 620px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: clamp(16px, 2vw, 19px);
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.hero-image {
  width: min(760px, 100%);
  height: clamp(220px, 36svh, 390px);
  margin: 0;
  overflow: hidden;
  align-self: end;
  background: var(--surface-muted);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.hero-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 62%;
}

.center-heading {
  max-width: 720px;
  margin: 0 auto 34px;
  text-align: center;
}

.center-heading p:last-child {
  margin: 10px auto 0;
  color: var(--muted);
}

.finder-section {
  padding: 38px 0 54px;
  scroll-margin-top: 76px;
  scroll-snap-align: start;
}

.finder-panel {
  display: grid;
  gap: 20px;
  padding: 0;
  background: transparent;
}

.search-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 142px;
  width: min(900px, 100%);
  margin: 0 auto;
  overflow: hidden;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: var(--radius);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.search-box input {
  width: 100%;
  height: 64px;
  padding: 0 24px;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: none;
  font-size: 18px;
}

.search-box input::placeholder {
  color: #9ca3af;
}

.search-box input:focus {
  box-shadow: inset 0 0 0 3px rgba(37, 99, 235, 0.16);
}

.search-button {
  display: grid;
  min-height: 64px;
  place-items: center;
  color: #fff;
  background: #356bf3;
  border: 0;
}

.search-button:hover {
  background: #2457db;
}

.search-button svg {
  width: 31px;
  height: 31px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
}

.filters {
  display: grid;
  gap: 0;
  padding: 20px 30px;
  background: var(--surface);
  border: 1px solid rgba(215, 224, 234, 0.92);
  border-radius: var(--radius);
  box-shadow: 0 20px 44px rgba(30, 58, 138, 0.1);
}

.filter-group {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  padding: 13px 0;
  border-bottom: 1px solid rgba(226, 232, 240, 0.78);
}

.filter-group:last-child {
  border-bottom: 0;
}

.filter-group > span {
  padding-top: 4px;
  color: #94a3b8;
  font-size: 14px;
  font-weight: 800;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
}

.chip {
  position: relative;
  min-height: 32px;
  padding: 0 0 5px;
  color: #334155;
  background: transparent;
  border: 0;
  border-radius: 0;
  font-size: 15px;
  font-weight: 800;
  white-space: nowrap;
}

.chip::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  background: #356bf3;
  border-radius: 999px;
  content: "";
  opacity: 0;
  transform: translateY(3px);
}

.chip:hover {
  color: var(--primary);
}

.chip.active {
  color: #2563eb;
  background: transparent;
}

.chip.active::after {
  opacity: 1;
  transform: translateY(0);
}

.finder-reset {
  justify-self: end;
  min-height: 38px;
  padding-inline: 14px;
  font-size: 13px;
}

.result-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 28px 0 18px;
  color: var(--muted);
  font-size: 14px;
}

.result-bar p {
  margin: 0;
}

.small-note {
  color: var(--muted);
}

.teacher-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 34px 52px;
}

.teacher-card {
  position: relative;
  display: grid;
  min-height: 100%;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: var(--shadow-sm);
  animation: cardIn 220ms var(--ease) both;
}

.teacher-card:hover {
  border-color: rgba(30, 58, 138, 0.34);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.1);
  transform: translateY(-1px);
}

.teacher-photo {
  position: relative;
  display: grid;
  min-height: 294px;
  align-items: end;
  margin: 8px 8px 0;
  overflow: hidden;
  padding: 18px;
  background: var(--surface-muted);
  border: 1px solid var(--line);
  border-radius: 4px;
}

.teacher-photo::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 6px;
  background: var(--portrait);
  opacity: 0.92;
  content: "";
}

.teacher-photo::after {
  position: absolute;
  top: 18px;
  left: 18px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  content: "HIT3133";
}

.portrait-card {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 16px;
  align-items: end;
  width: 100%;
  padding-top: 52px;
}

.portrait-meta {
  display: grid;
  gap: 4px;
  min-width: 0;
  justify-items: end;
  text-align: right;
}

.portrait-meta span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.portrait-meta strong {
  color: var(--primary);
  font-size: 46px;
  line-height: 1;
}

.portrait-meta small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.portrait-mark {
  position: relative;
  z-index: 1;
  display: grid;
  width: 104px;
  height: 132px;
  place-items: center;
  color: #fff;
  background: color-mix(in srgb, var(--portrait) 82%, black);
  border-radius: 6px;
  font-size: 54px;
  font-weight: 900;
}

.teacher-body {
  display: grid;
  gap: 12px;
  padding: 18px 18px 20px;
}

.teacher-card-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
}

.teacher-card-head h3 {
  font-size: 22px;
}

.teacher-card-head p {
  margin: 5px 0 0;
  color: var(--ink);
  font-size: 14px;
}

.teacher-rating {
  flex: 0 0 auto;
  color: var(--ink);
  text-align: right;
}

.teacher-rating strong,
.teacher-rating span {
  display: block;
}

.teacher-rating strong {
  font-size: 13px;
}

.teacher-rating span {
  margin-top: 3px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
}

.teacher-expertise {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.teacher-desc {
  min-height: 42px;
  margin: 0;
  color: #475569;
  font-size: 14px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag {
  padding: 4px 8px;
  color: var(--primary);
  background: var(--chip);
  border: 1px solid rgba(30, 58, 138, 0.08);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.meta-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.meta-list div {
  min-width: 0;
  padding: 9px 10px;
  background: var(--surface-muted);
  border: 1px solid var(--line);
  border-radius: 5px;
}

.meta-list dt {
  color: var(--muted);
  font-size: 12px;
}

.meta-list dd {
  margin: 2px 0 0;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.card-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  align-items: center;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 28px;
  color: var(--muted);
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  text-align: center;
}

.contact-section {
  padding: 54px 0;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.feedback-section {
  width: 100%;
  padding: 82px max(32px, calc((100vw - var(--max)) / 2)) 70px;
  background: var(--bg-soft);
}

.testimonial-list {
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr;
  gap: 16px;
  width: min(var(--max), 100%);
  margin: 0 auto;
}

.testimonial-card {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 220px;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.testimonial-card.featured {
  border-color: rgba(30, 58, 138, 0.28);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.1);
}

.testimonial-card span {
  width: fit-content;
  padding: 5px 9px;
  color: var(--primary);
  background: var(--chip);
  border: 1px solid rgba(30, 58, 138, 0.1);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.testimonial-card strong {
  color: var(--ink);
  font-size: clamp(17px, 1.8vw, 22px);
  line-height: 1.45;
}

.testimonial-card p {
  margin: 0;
  color: var(--muted);
}

.contact-card {
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.contact-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 450px);
  gap: 40px;
  align-items: center;
}

.contact-section p {
  max-width: 680px;
  color: var(--muted);
}

.contact-card {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.quick-links-section {
  padding: 6px 0 60px;
}

.quick-links-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.quick-links-head h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
}

.quick-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.quick-tag-list a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  color: var(--primary);
  background: #fff;
  border: 1px solid rgba(30, 58, 138, 0.18);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 900;
}

.quick-tag-list a:hover {
  background: var(--chip);
  border-color: rgba(30, 58, 138, 0.34);
  box-shadow: 0 8px 18px rgba(30, 58, 138, 0.08);
}

.qr-placeholder {
  display: grid;
  width: 118px;
  height: 118px;
  place-items: center;
  color: var(--muted);
  background:
    linear-gradient(90deg, rgba(30, 58, 138, 0.12) 1px, transparent 1px),
    linear-gradient(rgba(30, 58, 138, 0.12) 1px, transparent 1px),
    #fff;
  background-size: 12px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 900;
  text-align: center;
}

.teacher-dialog {
  width: min(980px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  padding: 0;
  background: transparent;
  border: 0;
}

.teacher-dialog::backdrop {
  background: rgba(17, 20, 30, 0.58);
}

.dialog-shell {
  position: relative;
  max-height: calc(100vh - 24px);
  padding: 22px;
  overflow: auto;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.teacher-dialog[open] .dialog-shell {
  animation: dialogIn 180ms var(--ease) both;
}

.close-dialog {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 5;
  margin: 0;
}

.icon-button {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  color: var(--primary);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 24px;
  line-height: 1;
}

#teacherDetail {
  display: grid;
  gap: 20px;
  padding-top: 52px;
}

.detail-hero {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 20px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.detail-avatar {
  display: grid;
  aspect-ratio: 4 / 5;
  place-items: center;
  color: #fff;
  background: var(--avatar-bg, var(--primary));
  border-radius: var(--radius);
  font-size: 64px;
  font-weight: 900;
}

.detail-title h2 {
  margin-top: 6px;
}

.detail-title p {
  margin: 10px 0 0;
  color: var(--muted);
}

.detail-score-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.detail-score-row span {
  padding: 8px 10px;
  color: var(--ink);
  background: var(--surface-muted);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 900;
}

.detail-content {
  display: grid;
  gap: 20px;
  padding: 0;
}

.detail-section {
  display: grid;
  gap: 12px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.detail-section p {
  margin: 0;
  color: #475569;
}

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

.detail-box {
  padding: 12px;
  background: var(--surface-muted);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.detail-box span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.detail-box strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 14px;
}

.video-grid,
.review-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.video-card {
  display: grid;
  min-height: 128px;
  padding: 14px;
  align-content: space-between;
  color: #fff;
  background: var(--primary);
  border-radius: var(--radius);
}

.video-card strong {
  font-size: 16px;
}

.video-card span {
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
}

.play-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: var(--primary);
  background: #fff;
  border-radius: 999px;
  font-weight: 900;
}

.review-card {
  padding: 14px;
  background: var(--surface-muted);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.review-card p {
  color: #3e444d;
}

.review-card span {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 6px;
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes dialogIn {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.99);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 1080px) {
  .hero-section {
    grid-template-columns: 1fr;
  }

  .finder-panel {
    grid-template-columns: 1fr;
  }

  .teacher-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .testimonial-list {
    grid-template-columns: 1fr;
  }

  .contact-section {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  html {
    scroll-padding-top: 66px;
  }

  .site-header {
    min-height: 66px;
    align-items: center;
  }

  .header-nav,
  .header-action {
    display: none;
  }

  .mobile-menu {
    display: block;
  }

  .hero-section,
  .finder-section,
  .feedback-section,
  .contact-section,
  .quick-links-section {
    width: min(100% - 24px, var(--max));
  }

  .hero-section {
    min-height: calc(100svh - 66px);
    padding: 22px 0 16px;
  }

  .hero-section::before,
  .hero-section::after {
    display: none;
  }

  h1 {
    font-size: clamp(34px, 10vw, 44px);
    line-height: 1.08;
  }

  .hero-text {
    margin-top: 14px;
    font-size: 16px;
    line-height: 1.65;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 20px;
  }

  .hero-image {
    height: clamp(190px, 34svh, 260px);
    border-radius: 6px;
  }

  .finder-section {
    padding-top: 28px;
    scroll-margin-top: 66px;
  }

  .center-heading {
    margin-bottom: 22px;
    text-align: left;
  }

  .finder-panel {
    gap: 14px;
    padding: 0;
  }

  .search-box {
    grid-template-columns: minmax(0, 1fr) 68px;
    width: 100%;
  }

  .search-box input {
    height: 56px;
    padding: 0 14px;
    font-size: 15px;
  }

  .search-button {
    min-height: 56px;
  }

  .search-button svg {
    width: 26px;
    height: 26px;
  }

  .filters {
    padding: 12px 16px;
  }

  .filter-group {
    grid-template-columns: 62px minmax(0, 1fr);
    gap: 12px;
    padding: 11px 0;
  }

  .filter-group > span {
    padding-top: 5px;
  }

  .chip-row {
    flex-wrap: nowrap;
    gap: 20px;
    margin-right: -16px;
    padding-bottom: 4px;
    overflow-x: auto;
  }

  .chip {
    flex: 0 0 auto;
    min-height: 32px;
    font-size: 14px;
  }

  .finder-reset {
    justify-self: stretch;
  }

  .result-bar,
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .teacher-grid,
  .detail-grid,
  .video-grid,
  .review-grid {
    grid-template-columns: 1fr;
  }

  .teacher-grid {
    gap: 18px;
  }

  .teacher-photo {
    min-height: 250px;
  }

  .portrait-card {
    grid-template-columns: 92px minmax(0, 1fr);
  }

  .portrait-mark {
    width: 92px;
    height: 116px;
    font-size: 46px;
  }

  .meta-list,
  .card-actions {
    grid-template-columns: 1fr;
  }

  .feedback-section {
    padding: 54px 12px;
  }

  .contact-card {
    grid-template-columns: 1fr;
  }

  .quick-links-section {
    padding-bottom: 44px;
  }

  .quick-links-head {
    align-items: flex-start;
  }

  .quick-tag-list {
    flex-wrap: nowrap;
    margin-right: -12px;
    padding-bottom: 4px;
    overflow-x: auto;
  }

  .quick-tag-list a {
    flex: 0 0 auto;
  }

  .detail-hero {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .detail-avatar {
    width: min(220px, 100%);
  }

  .dialog-shell {
    padding: 14px;
  }

  #teacherDetail {
    gap: 14px;
    padding-top: 50px;
  }

}

@media (max-width: 420px) {
  .brand small {
    display: none;
  }

  h1 {
    font-size: 36px;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .primary-button,
  .secondary-button,
  .ghost-button {
    padding-inline: 12px;
  }

  .teacher-card-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .teacher-rating {
    text-align: left;
  }
}

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