:root {
  /* serve_web.py watches this file; open browsers reload on a new server generation. */
  color-scheme: light;
  --bg: #f4f1ec;
  --paper: #fffdf9;
  --ink: #252320;
  --muted: #746e67;
  --line: #ddd5cc;
  --terra: #205b4a;
  --terra-deep: #123e34;
  --champagne: #c9a777;
  --terra-soft: #e4f2ec;
  --human: #e8effc;
  --danger: #a33d38;
  --app-height: 100dvh;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: clip;
  background:
    radial-gradient(circle at 10% 0%, #fff7df 0, transparent 28rem),
    radial-gradient(circle at 90% 8%, #dceee6 0, transparent 30rem),
    var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Noto Sans KR", sans-serif;
  line-height: 1.55;
}

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

.shell { width: min(1120px, calc(100% - 40px)); margin: 0 auto; padding: 30px 0 80px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid #205b4a2e;
  border-radius: 50%;
  background: linear-gradient(145deg, #fff, #e0eee8);
  color: var(--terra);
  font-family: Georgia, serif;
  font-size: 24px;
  font-style: italic;
  box-shadow: 0 8px 24px #205b4a17;
}
.clinic-quick-contact { display: flex; margin-left: auto; align-items: center; gap: 13px; color: #66706b; font-size: 11px; font-weight: 700; }
.clinic-quick-contact a { padding: 8px 12px; border: 1px solid #205b4a36; border-radius: 99px; color: var(--terra); text-decoration: none; }
.menu-button { display: grid; flex: 0 0 44px; width: 44px; height: 44px; padding: 10px; place-content: center; gap: 5px; border: 1px solid var(--line); border-radius: 12px; background: #ffffffcc; }
.menu-button span { display: block; width: 20px; height: 2px; border-radius: 2px; background: var(--ink); transition: transform .2s ease, opacity .2s ease; }
.menu-open .menu-button span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-open .menu-button span:nth-child(2) { opacity: 0; }
.menu-open .menu-button span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.eyebrow { margin: 0 0 3px; color: var(--terra); font-size: 10px; font-weight: 850; letter-spacing: .16em; }
h1 { margin: 0; font-size: 20px; line-height: 1.05; letter-spacing: -.03em; }
.subtitle { margin: 12px 0 0; color: var(--muted); }
.language-control { display: flex; margin-left: auto; align-items: center; gap: 7px; color: #66706b; font-size: 10px; }
.language-control span { font-weight: 800; letter-spacing: .05em; }
.language-control select { width: auto; min-width: 92px; padding: 7px 26px 7px 9px; border-radius: 99px; background: #ffffffbf; color: var(--terra-deep); font-size: 11px; font-weight: 750; }
.clinic-quick-contact { margin-left: 0; }

.landing {
  display: grid;
  position: relative;
  padding: clamp(44px, 7vw, 82px) 0 40px;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, .95fr);
  gap: clamp(28px, 5vw, 68px);
  align-items: center;
}
.landing > *, .treatment-card { min-width: 0; }
html:not([lang="ko-KR"]) .hero-description,
html:not([lang="ko-KR"]) .treatment-heading p,
html:not([lang="ko-KR"]) .treatment-effect,
html:not([lang="ko-KR"]) .treatment-comparison figcaption { word-break: normal; overflow-wrap: anywhere; }
.hero-copy { position: relative; z-index: 2; }
.hero-kicker {
  display: flex;
  margin: 0 0 18px;
  align-items: center;
  gap: 9px;
  color: var(--terra);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .04em;
}
.hero-kicker span { width: 26px; height: 1px; background: var(--champagne); }
.hero-copy h2 {
  margin: 0;
  color: #1e2925;
  font-size: clamp(42px, 5vw, 64px);
  font-weight: 760;
  line-height: 1.12;
  letter-spacing: -.055em;
  text-wrap: balance;
}
.hero-copy h2 em {
  color: var(--terra);
  font-family: Georgia, "Noto Serif KR", serif;
  font-weight: 500;
  font-style: italic;
  letter-spacing: -.05em;
}
.hero-description {
  max-width: 560px;
  margin: 27px 0 0;
  color: #5f6964;
  font-size: 17px;
  line-height: 1.8;
  word-break: keep-all;
}
.hero-actions { display: flex; margin-top: 34px; align-items: center; gap: 13px; }
.hero-primary, .hero-secondary {
  min-height: 56px;
  padding: 0 22px;
  border-radius: 99px;
  font-weight: 800;
}
.hero-primary {
  display: flex;
  min-width: 230px;
  align-items: center;
  justify-content: space-between;
  background: var(--terra-deep);
  color: white;
  box-shadow: 0 16px 38px #123e3433;
  transition: transform .25s ease, box-shadow .25s ease;
}
.hero-primary:hover { transform: translateY(-2px); box-shadow: 0 20px 42px #123e3442; }
.hero-primary span { font-size: 21px; font-weight: 400; }
.hero-secondary { background: transparent; color: var(--terra); }
.hero-secondary:hover { background: #ffffff8a; }
.hero-trust { display: flex; margin-top: 34px; flex-wrap: wrap; gap: 10px 20px; color: #66706b; font-size: 12px; font-weight: 700; }
.hero-trust span::before { margin-right: 7px; color: var(--champagne); content: "✦"; }

.hero-visual { position: relative; margin: 0; animation: visual-arrive .9s cubic-bezier(.2,.8,.2,1) both; }
.consultation-visual img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: 26px;
  object-fit: cover;
  object-position: 68% center;
  box-shadow: 0 28px 70px #31453d24;
}
.clinic-trust {
  display: grid;
  margin-top: 8px;
  padding: 25px 28px;
  grid-column: 1 / -1;
  grid-template-columns: .9fr 1.6fr;
  gap: 28px;
  border-radius: 22px;
  background: var(--terra-deep);
  color: white;
  box-shadow: 0 20px 55px #123e3424;
}
.trust-intro p { margin: 0 0 6px; color: #cbb48f; font-size: 9px; font-weight: 850; letter-spacing: .16em; }
.trust-intro h2 { margin: 0; font-size: 20px; }
.trust-intro span { display: block; margin-top: 7px; color: #d9e5e1; font-size: 12px; }
.clinic-trust dl { display: grid; margin: 0; grid-template-columns: 1.15fr .75fr 1.5fr; gap: 17px; }
.clinic-trust dl div { padding-left: 17px; border-left: 1px solid #ffffff29; }
.clinic-trust dt { margin-bottom: 6px; color: #b8cbc4; font-size: 10px; font-weight: 750; }
.clinic-trust dd { margin: 0; font-size: 12px; line-height: 1.55; }
.clinic-trust dd a { color: white; font-size: 15px; font-weight: 800; text-decoration: none; }

.treatment-section {
  width: 100%;
  margin-top: 30px;
  grid-column: 1 / -1;
  scroll-margin-top: 24px;
}
.treatment-heading {
  display: flex;
  margin-bottom: 24px;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
}
.section-kicker {
  margin: 0 0 8px;
  color: var(--champagne);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .16em;
}
.treatment-heading h2 { margin: 0; font-size: clamp(28px, 3.4vw, 42px); letter-spacing: -.045em; }
.treatment-heading p:not(.section-kicker) {
  max-width: 700px;
  margin: 11px 0 0;
  color: #626b67;
  font-size: 14px;
  line-height: 1.7;
  word-break: keep-all;
}
.treatment-heading a {
  flex: 0 0 auto;
  padding: 9px 0;
  border-bottom: 1px solid #205b4a66;
  color: var(--terra);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}
.treatment-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.treatment-card {
  display: flex;
  position: relative;
  min-height: 300px;
  padding: 22px;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #d8d3ca;
  border-radius: 20px;
  background: #fffdf9d9;
  box-shadow: 0 14px 38px #40372c0b;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.treatment-card::after {
  position: absolute;
  width: 130px;
  height: 130px;
  top: -54px;
  right: -50px;
  border-radius: 50%;
  background: var(--card-glow, #dcebe5);
  content: "";
  filter: blur(2px);
  opacity: .65;
}
.treatment-card:hover { transform: translateY(-4px); border-color: #b7c9c1; box-shadow: 0 20px 48px #31453d17; }
.treatment-card.skin-correction { --card-glow: #cde4da; }
.treatment-card.lifting { --card-glow: #eadacb; }
.treatment-card.petit { --card-glow: #e8dadd; }
.treatment-card.aesthetic { --card-glow: #d8e3eb; }
.treatment-number { color: #a8afa9; font-family: Georgia, serif; font-size: 13px; font-style: italic; }
.treatment-category { margin: 31px 0 3px; color: var(--terra); font-size: 9px; font-weight: 850; letter-spacing: .17em; }
.treatment-card h3 { margin: 0; font-size: 23px; letter-spacing: -.04em; }
.treatment-effect { margin: 10px 0 12px; color: #263f37; font-size: 11px; font-weight: 750; line-height: 1.55; word-break: keep-all; }
.treatment-effect span { display: block; margin-bottom: 3px; color: #9a7650; font-size: 9px; font-weight: 850; letter-spacing: .09em; }
.treatment-comparison { margin: 0 0 10px; }
.treatment-image { position: relative; overflow: hidden; border-radius: 12px; background: #e8e1d7; }
.treatment-image img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.treatment-ba-label { position: absolute; bottom: 7px; padding: 4px 6px; border-radius: 99px; background: #fffdf0e8; color: #28332f; font-size: 8px; font-weight: 850; backdrop-filter: blur(5px); }
.treatment-ba-label.before { left: 7px; }
.treatment-ba-label.after { left: calc(50% + 7px); }
.treatment-comparison figcaption { margin-top: 6px; color: #858984; font-size: 9px; line-height: 1.45; word-break: keep-all; }
.treatment-description { min-height: 58px; margin: 7px 0 11px; color: #68706c; font-size: 11px; line-height: 1.55; }
.treatment-card ul { display: flex; margin: 0 0 20px; padding: 0; flex-wrap: wrap; gap: 6px; list-style: none; }
.treatment-card li { padding: 5px 8px; border-radius: 99px; background: #f1eee8; color: #4d5652; font-size: 10px; }
.treatment-start {
  display: flex;
  width: 100%;
  min-height: 44px;
  margin-top: auto;
  padding: 0;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #ded9d0;
  background: transparent;
  color: var(--terra-deep);
  font-size: 12px;
  font-weight: 850;
}
.treatment-start span { font-size: 18px; font-weight: 400; }
.treatment-disclaimer { margin: 13px 2px 0; color: #68706c; font-size: 12px; }

.comparison-section {
  display: grid;
  margin-top: 24px;
  padding: clamp(25px, 4vw, 44px);
  grid-column: 1 / -1;
  grid-template-columns: .72fr 1.28fr;
  gap: clamp(24px, 4vw, 52px);
  align-items: center;
  border: 1px solid #d8d3ca;
  border-radius: 26px;
  background: #f9f6f0cc;
}
.comparison-copy h2 { margin: 0; font-size: clamp(27px, 3vw, 39px); line-height: 1.18; letter-spacing: -.045em; }
.comparison-copy > p:not(.section-kicker) { margin: 16px 0; color: #5f6864; font-size: 13px; line-height: 1.75; }
.comparison-copy ul { display: grid; margin: 0 0 20px; padding: 0; gap: 8px; list-style: none; }
.comparison-copy li { color: #39433f; font-size: 12px; }
.comparison-copy li::before { margin-right: 8px; color: var(--champagne); content: "✓"; font-weight: 900; }
.comparison-start { max-width: 240px; }
.comparison-figure { margin: 0; }
.comparison-image { position: relative; overflow: hidden; border-radius: 20px; background: #ddd; box-shadow: 0 18px 50px #40372c19; }
.comparison-image img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.comparison-label {
  position: absolute;
  bottom: 12px;
  padding: 6px 9px;
  border-radius: 99px;
  background: #fffdf0e6;
  color: #28332f;
  font-size: 10px;
  font-weight: 850;
  backdrop-filter: blur(6px);
}
.comparison-label.label-a { left: 12px; }
.comparison-label.label-b { left: calc(50% + 12px); }
.medical-note {
  max-width: 900px;
  margin: -38px 0 0;
  grid-column: 1 / -1;
  color: #5f6964;
  font-size: 12px;
  line-height: 1.65;
  text-align: left;
}

body:not(.landing-mode) .landing { display: none; }
body.landing-mode .menu-button { display: none; }
.survey-panel { max-width: 960px; margin: 42px auto 18px; }
.panel { margin-bottom: 18px; border: 1px solid var(--line); border-radius: 24px; background: color-mix(in srgb, var(--paper) 94%, transparent); box-shadow: 0 18px 50px #49392712; overflow: hidden; }
.section-title { display: flex; align-items: center; gap: 13px; padding: 22px 24px; border-bottom: 1px solid var(--line); }
.section-title > span { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 50%; background: var(--ink); color: white; font-size: 12px; font-weight: 800; }
.section-title h2, .section-title p { margin: 0; }
.section-title h2 { font-size: 19px; }
.section-title p { color: var(--muted); font-size: 13px; }
.section-title.compact { position: sticky; top: 0; z-index: 2; background: #fffdf9f2; backdrop-filter: blur(10px); }

#surveyForm { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; padding: 24px; }
label { display: grid; gap: 7px; color: #4d4843; font-size: 14px; font-weight: 700; }
fieldset { min-width: 0; }
.concern-fieldset { grid-column: 1 / -1; margin: 0; padding: 0; border: 0; }
.concern-fieldset legend { margin-bottom: 8px; color: #4d4843; font-size: 14px; font-weight: 700; }
.concern-fieldset small { margin-left: 5px; color: var(--muted); font-weight: 500; }
.choice-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.category-grid { grid-template-columns: repeat(5, 1fr); }
.choice-grid label { display: flex; min-height: 46px; padding: 10px 12px; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 12px; background: white; cursor: pointer; }
.choice-grid input { width: 18px; height: 18px; margin: 0; accent-color: var(--terra); }
input, select, textarea { width: 100%; border: 1px solid var(--line); border-radius: 12px; background: white; color: var(--ink); outline: 0; }
:where(a, button, input, select, textarea, summary):focus-visible {
  outline: 3px solid var(--terra);
  outline-offset: 3px;
}
input, select { height: 48px; padding: 0 12px; }
textarea { resize: vertical; min-height: 78px; max-height: 220px; padding: 13px 14px; }
input:focus, select:focus, textarea:focus { border-color: var(--terra); box-shadow: 0 0 0 3px #205b4a1a; }
button { border: 0; cursor: pointer; }
.primary { min-height: 48px; padding: 0 20px; border-radius: 12px; background: var(--terra); color: white; font-weight: 800; }
#surveyForm .primary { align-self: end; }
.ghost { padding: 9px 13px; border: 1px solid var(--line); border-radius: 10px; background: #ffffff99; }
.danger { color: var(--danger); }
button:disabled { cursor: wait; opacity: .55; }

.menu-backdrop { position: fixed; z-index: 19; inset: 0; background: #17161266; backdrop-filter: blur(2px); }
.session-panel { position: fixed; z-index: 20; top: 0; right: 0; width: min(430px, 92vw); height: var(--app-height); overflow-y: auto; border-left: 1px solid var(--line); background: var(--paper); box-shadow: -18px 0 60px #201a142b; }
.drawer-title { display: flex; position: sticky; z-index: 1; top: 0; padding: 22px 20px; align-items: flex-start; justify-content: space-between; border-bottom: 1px solid var(--line); background: #fffdf9f2; backdrop-filter: blur(10px); }
.drawer-title h2, .drawer-title p { margin: 0; }
.drawer-title h2 { font-size: 21px; }
.drawer-title p { margin-top: 3px; color: var(--muted); font-size: 13px; }
.icon-button { width: 38px; height: 38px; border-radius: 50%; background: var(--bg); font-size: 25px; line-height: 1; }
.drawer-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; padding: 18px 18px 4px; }
.drawer-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; margin: 14px 18px 0; padding: 4px; border-radius: 12px; background: var(--bg); }
.drawer-tabs button { min-height: 40px; border-radius: 9px; background: transparent; color: var(--muted); font-weight: 750; }
.drawer-tabs button.active { background: white; color: var(--terra); box-shadow: 0 2px 10px #49392712; }
.session-list-title { margin: 18px 18px 0; font-size: 14px; }
.session-list { display: grid; gap: 10px; padding: 12px 18px 24px; }
.reservation-list { display: grid; gap: 10px; padding: 12px 18px 24px; }
.session-empty { padding: 10px; color: var(--muted); text-align: center; }
.session-card { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; padding: 14px 15px; border: 1px solid var(--line); border-radius: 14px; background: white; }
.session-card h3, .session-card p { margin: 0; }
.session-card h3 { font-size: 15px; }
.session-card p { margin-top: 3px; color: var(--muted); font-size: 12px; }
.session-actions { display: flex; gap: 7px; }
.session-actions button { min-height: 38px; padding: 0 12px; border-radius: 9px; font-size: 12px; font-weight: 750; }
.session-actions .load { background: var(--terra); color: white; }
.session-actions .delete { border: 1px solid #e5c5c2; background: white; color: var(--danger); }
.reservation-card { position: relative; padding: 15px; border: 1px solid var(--line); border-radius: 14px; background: white; }
.reservation-card h3, .reservation-card p { margin: 0; }
.reservation-card h3 { padding-right: 68px; font-size: 15px; }
.reservation-card p { margin-top: 5px; color: var(--muted); font-size: 12px; }
.reservation-card .reservation-reason { margin: 10px 0; padding: 9px; border-radius: 9px; background: var(--bg); color: var(--ink); }
.reservation-status { position: absolute; top: 13px; right: 13px; padding: 4px 7px; border-radius: 99px; background: var(--terra-soft); color: var(--terra); font-size: 11px; font-weight: 800; }
.reservation-card .load { width: 100%; min-height: 40px; border-radius: 9px; background: var(--terra); color: white; font-weight: 750; }

.chat-panel { min-height: 620px; }
.status { margin-left: auto; padding: 7px 10px; border-radius: 99px; background: var(--terra-soft); color: var(--terra); font-size: 12px; font-weight: 800; }
.status.busy::before { display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: currentColor; content: ""; animation: status-pulse 1s ease-in-out infinite; }
.messages { min-height: 410px; max-height: 62vh; overflow-y: auto; padding: 22px; scroll-behavior: smooth; }
.message { width: min(84%, 690px); margin: 0 0 16px; }
.message.user { margin-left: auto; }
.message.manager { margin-right: auto; }
.bubble { padding: 13px 15px; border-radius: 16px; white-space: pre-wrap; overflow-wrap: anywhere; }
.user .bubble { background: var(--human); border-bottom-right-radius: 5px; }
.manager .bubble { background: var(--terra-soft); border-bottom-left-radius: 5px; }
.booking-form { display: grid; gap: 10px; margin-top: 9px; padding: 14px; border: 1px solid #b9d5c9; border-radius: 14px; background: white; }
.booking-form label { font-size: 12px; }
.booking-form input { height: 44px; }
.booking-form textarea { min-height: 70px; max-height: 120px; }
.booking-form .primary { width: 100%; margin-top: 2px; }
.booking-field-label { margin: 0 0 6px; font-size: 12px; }
.booking-calendar { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.calendar-toolbar { display: grid; grid-template-columns: 42px 1fr 42px; align-items: center; padding: 5px; border-bottom: 1px solid var(--line); text-align: center; }
.calendar-nav { min-height: 38px; border-radius: 9px; background: transparent; color: var(--terra); font-size: 25px; }
.calendar-nav:disabled { color: #c6c0b9; }
.calendar-weekdays, .calendar-days { display: grid; grid-template-columns: repeat(7, 1fr); }
.calendar-weekdays { padding: 7px 6px 2px; color: var(--muted); font-size: 11px; text-align: center; }
.calendar-weekdays span:first-child { color: var(--danger); }
.calendar-days { gap: 3px; padding: 3px 6px 8px; }
.calendar-day, .calendar-blank { min-width: 0; min-height: 36px; }
.calendar-day { border-radius: 9px; background: transparent; color: var(--ink); font-size: 13px; }
.calendar-day:hover:not(:disabled) { background: var(--terra-soft); }
.calendar-day.selected { background: var(--terra); color: white; font-weight: 800; }
.calendar-day:disabled { color: #c6c0b9; cursor: not-allowed; text-decoration: line-through; }
.selected-date { margin: 8px 2px 10px; color: var(--terra); font-size: 13px; font-weight: 800; }
.time-slots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.time-slot { min-height: 39px; border: 1px solid var(--line); border-radius: 9px; background: white; color: var(--ink); font-size: 12px; }
.time-slot.selected { border-color: var(--terra); background: var(--terra); color: white; font-weight: 800; }
.schedule-help { margin: 7px 1px 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.schedule-error { margin: 6px 1px 0; color: var(--danger); font-size: 12px; font-weight: 700; }
.booking-saved { margin-top: 8px; padding: 11px 13px; border-radius: 11px; background: #d9eee5; color: var(--terra); font-size: 13px; font-weight: 800; }
.typing-bubble { display: flex; width: fit-content; align-items: center; gap: 10px; color: var(--muted); }
.typing-dots { display: inline-flex; gap: 3px; align-items: center; }
.typing-dots i { display: block; width: 6px; height: 6px; border-radius: 50%; background: var(--terra); animation: typing-bounce 1.1s ease-in-out infinite; }
.typing-dots i:nth-child(2) { animation-delay: .14s; }
.typing-dots i:nth-child(3) { animation-delay: .28s; }
.meta { display: flex; gap: 8px; align-items: center; margin: 0 4px 5px; color: var(--muted); font-size: 12px; }
.user .meta { justify-content: flex-end; }
.meta strong { color: var(--ink); }
.decision { margin: 7px 3px 0; font-size: 12px; color: var(--muted); }
.decision summary { cursor: pointer; }
.decision-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 7px; }
.decision-grid div { padding: 9px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.decision-grid b { display: block; color: var(--ink); margin-bottom: 3px; }
.system-message { margin: 14px auto; color: var(--danger); text-align: center; font-size: 13px; }
.composer { position: sticky; bottom: 0; padding: 16px; border-top: 1px solid var(--line); background: #fffdf9f2; backdrop-filter: blur(10px); }
.composer-actions { display: flex; align-items: center; justify-content: space-between; margin-top: 9px; }
#counter { color: var(--muted); font-size: 12px; }
.composer .primary { min-width: 110px; }

body.chat-mode { height: var(--app-height); overflow: hidden; }
body.chat-mode .shell { display: grid; width: min(960px, calc(100% - 24px)); height: var(--app-height); padding: 10px 0; grid-template-rows: auto minmax(0, 1fr); }
body.chat-mode .topbar { min-height: 50px; align-items: center; }
body.chat-mode .eyebrow,
body.chat-mode .subtitle,
body.chat-mode .notice,
body.chat-mode .clinic-quick-contact { display: none; }
body.chat-mode h1 { font-size: 21px; letter-spacing: -.02em; }
body.chat-mode .chat-panel { display: grid; min-height: 0; height: 100%; margin: 0; grid-template-rows: auto minmax(0, 1fr) auto; }
body.chat-mode .messages { min-height: 0; max-height: none; }
body.chat-mode .composer { position: static; padding-bottom: max(12px, env(safe-area-inset-bottom)); }

@keyframes typing-bounce {
  0%, 65%, 100% { transform: translateY(0); opacity: .4; }
  35% { transform: translateY(-4px); opacity: 1; }
}

@keyframes status-pulse {
  0%, 100% { opacity: .35; }
  50% { opacity: 1; }
}

@keyframes visual-arrive {
  from { transform: translateY(18px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes organic-float {
  from { transform: rotate(-1deg) scale(.99); border-radius: 46% 54% 43% 57% / 55% 42% 58% 45%; }
  to { transform: rotate(1deg) scale(1.015); border-radius: 55% 45% 56% 44% / 43% 57% 45% 55%; }
}

@keyframes card-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@media (max-width: 680px) {
  .shell { width: min(100% - 20px, 960px); padding-top: 24px; }
  .brand-mark { width: 37px; height: 37px; font-size: 21px; }
  h1 { font-size: 17px; }
  .clinic-quick-contact span { display: none; }
  .clinic-quick-contact { display: none; }
  .clinic-quick-contact a { padding: 7px 9px; font-size: 10px; }
  body:not(.landing-mode) .clinic-quick-contact { display: none; }
  .topbar { gap: 9px; }
  .language-control { margin-left: auto; }
  .language-control span { display: none; }
  .language-control select { min-width: 82px; padding: 6px 23px 6px 8px; }
  .landing {
    padding: 38px 3px 30px;
    grid-template-columns: 1fr;
    gap: 22px;
  }
  .hero-copy h2 { font-size: clamp(36px, 10.8vw, 46px); line-height: 1.16; letter-spacing: -.045em; }
  html[lang="en-US"] .hero-copy h2 { font-size: clamp(31px, 9vw, 38px); line-height: 1.18; }
  .hero-description { margin-top: 20px; font-size: 15px; line-height: 1.75; }
  .hero-actions { display: grid; margin-top: 27px; grid-template-columns: 1fr; gap: 5px; }
  .hero-primary { width: 100%; }
  .hero-secondary { min-height: 44px; }
  .hero-trust { margin-top: 22px; gap: 8px 13px; }
  .hero-visual { margin: 0; order: 1; }
  .consultation-visual img { aspect-ratio: 5 / 4; border-radius: 19px; object-position: 68% center; }
  .clinic-trust { padding: 20px; order: 6; grid-template-columns: 1fr; gap: 18px; border-radius: 18px; }
  .clinic-trust dl { grid-template-columns: 1fr 1fr; gap: 14px 8px; }
  .clinic-trust dl div { padding-left: 11px; }
  .clinic-trust dl div:nth-child(3) { grid-column: 1 / -1; }
  .treatment-section { order: 3; margin-top: 10px; }
  .treatment-heading { display: block; margin-bottom: 18px; }
  .treatment-heading h2 { font-size: 29px; }
  .treatment-heading p:not(.section-kicker) { font-size: 13px; }
  .treatment-heading a { display: inline-block; margin-top: 10px; }
  .treatment-grid { grid-template-columns: 1fr; }
  .treatment-card { min-height: 0; padding: 20px; }
  .treatment-card:hover { transform: none; }
  .treatment-category { margin-top: 20px; }
  .treatment-description { min-height: 0; }
  .comparison-section { padding: 21px 17px; order: 4; grid-template-columns: 1fr; border-radius: 20px; }
  .comparison-copy h2 { font-size: 29px; }
  .comparison-label { bottom: 8px; }
  .medical-note { grid-column: 1; margin: 0; order: 5; font-size: 12px; text-align: left; }
  .survey-panel { margin-top: 28px; }
  input, select, textarea { font-size: 16px; }
  #surveyForm { grid-template-columns: 1fr; padding: 18px; }
  .concern-fieldset { grid-column: auto; }
  .choice-grid { grid-template-columns: 1fr 1fr; }
  .category-grid { grid-template-columns: 1fr 1fr; }
  .section-title { padding: 17px; }
  .message { width: 94%; }
  .decision-grid { grid-template-columns: 1fr; }
  .messages { padding: 16px 12px; max-height: 58vh; }
  .ghost { font-size: 12px; }
  .session-card { grid-template-columns: 1fr; }
  .session-actions { justify-content: flex-end; }
  body.chat-mode .shell { width: 100%; padding: 0; }
  body.chat-mode .topbar { padding: max(7px, env(safe-area-inset-top)) 12px 7px; }
  body.chat-mode .topbar { padding-right: 66px; }
  body.chat-mode .menu-button { position: fixed; z-index: 18; top: max(7px, env(safe-area-inset-top)); right: 12px; }
  body.chat-mode .chat-panel { border-width: 1px 0 0; border-radius: 0; }
  body.chat-mode .chat-panel .section-title { padding: 10px 12px; }
  body.chat-mode .chat-panel .section-title > span { display: none; }
  body.chat-mode .messages { padding: 12px 10px; }
  body.chat-mode textarea { min-height: 48px; max-height: 96px; resize: none; }
  body.chat-mode .composer { padding: 9px 10px max(9px, env(safe-area-inset-bottom)); }
  body.chat-mode .composer-actions { margin-top: 6px; }
  body.chat-mode .composer .primary { min-width: 88px; min-height: 42px; }
  .drawer-actions { grid-template-columns: 1fr; }
  .booking-form { padding: 12px; }
}

@media (min-width: 681px) and (max-width: 900px) {
  .landing { grid-template-columns: 1fr .8fr; gap: 22px; }
  .hero-visual { min-height: 440px; }
  .floating-note { font-size: 10px; }
  .treatment-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

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