:root {
  --canvas: #f4f7f1;
  --paper: #fffefa;
  --ink: #203c32;
  --muted: #5b6c60;
  --green: #24654f;
  --green-dark: #194e3d;
  --mint: #e3f0dd;
  --line: #dce5d6;
  --card-padding: 20px;
  font-family: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-width: 0;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background-color: var(--canvas);
  background-image: radial-gradient(#d3dfcc 0.8px, transparent 0.8px);
  background-size: 22px 22px;
}

button,
a {
  font: inherit;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

button {
  cursor: pointer;
}

.icon-definitions {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.page-shell {
  display: grid;
  min-height: 100vh;
  min-height: 100svh;
  padding: 12px;
  padding-top: max(12px, env(safe-area-inset-top));
  padding-right: max(12px, env(safe-area-inset-right));
  padding-bottom: max(12px, env(safe-area-inset-bottom));
  padding-left: max(12px, env(safe-area-inset-left));
  place-items: start center;
}

.contact-card {
  width: min(100%, 780px);
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--paper);
  box-shadow: 0 16px 56px rgba(45, 77, 44, 0.09), 0 2px 8px rgba(45, 77, 44, 0.03);
}

.card-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px var(--card-padding) 12px;
}

.color-dots {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
}

.color-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #79ab80;
}

.color-dots span:nth-child(2) {
  background: #c3a6ed;
}

.color-dots span:nth-child(3) {
  background: #edb85f;
}

.language-switcher {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 2px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f5f7f0;
}

.language-button {
  min-width: 44px;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: var(--muted);
  background: transparent;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.04em;
}

.language-button.is-active {
  border-color: #d6e7ce;
  color: var(--green-dark);
  background: #e3f0dd;
}

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 0 var(--card-padding) 28px;
  text-align: center;
}

.illustration {
  width: 124px;
  max-width: 100%;
  aspect-ratio: 152 / 128;
}

.illustration svg {
  display: block;
  width: 100%;
  height: 100%;
}

.child-name {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 7px 14px;
  border: 1px solid #dbe8d4;
  border-radius: 999px;
  color: var(--green-dark);
  background: #edf5e7;
  font-size: 0.86rem;
  font-weight: 750;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.child-name::before {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #75a16d;
  content: "";
}

h1 {
  max-width: 620px;
  margin: 0;
  font-size: clamp(1.75rem, 4.6vw, 2.65rem);
  font-weight: 800;
  line-height: 1.13;
  letter-spacing: -0.04em;
  text-wrap: balance;
  overflow-wrap: anywhere;
}

.intro {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.6;
  text-wrap: pretty;
  overflow-wrap: anywhere;
}

.contacts {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  padding: 0 var(--card-padding) 24px;
}

.parent-card {
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 12px;
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--parent-line, var(--line));
  border-radius: 24px;
  background: var(--parent-surface, #fff);
}

.parent-card--mum {
  --parent-surface: #f6f1fc;
  --parent-line: #e5dbef;
  --avatar-surface: #e8daf5;
  --avatar-ink: #755194;
}

.parent-card--dad {
  --parent-surface: #fff7e9;
  --parent-line: #eee1c9;
  --avatar-surface: #f9e5bc;
  --avatar-ink: #86602e;
}

.parent-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.parent-heading > div {
  min-width: 0;
}

.parent-icon {
  display: grid;
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  color: var(--avatar-ink, var(--green-dark));
  background: var(--avatar-surface, var(--mint));
  font-size: 0.9rem;
  font-weight: 850;
  letter-spacing: -0.025em;
  place-items: center;
}

h2 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1.25;
}

.parent-name {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.phone-number {
  display: flex;
  min-height: 44px;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  color: var(--ink);
  font-size: clamp(1rem, 2.5vw, 1.13rem);
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  line-height: 1.5;
  text-decoration: none;
  text-underline-offset: 4px;
  overflow-wrap: anywhere;
}

.contact-actions {
  display: grid;
  align-self: end;
  gap: 6px;
  min-width: 0;
}

.button,
.copy-button {
  display: inline-flex;
  width: 100%;
  min-width: 0;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  line-height: 1.3;
}

.button {
  min-height: 54px;
  padding: 14px 16px;
  border: 1px solid var(--green);
  border-radius: 16px;
  font-weight: 750;
  text-decoration: none;
}

.button--primary {
  color: #fff;
  background: var(--green);
  box-shadow: 0 4px 0 rgba(25, 78, 61, 0.11);
}

.button--secondary {
  color: var(--green-dark);
  background: var(--paper);
}

.copy-button {
  min-height: 44px;
  padding: 10px 8px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: var(--green-dark);
  background: transparent;
  font-size: 0.83rem;
  font-weight: 650;
}

.button span,
.copy-label {
  min-width: 0;
  overflow-wrap: anywhere;
}

.action-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.noscript-note {
  margin: 0 var(--card-padding) 24px;
  padding: 12px;
  border: 1px solid #e9ddbc;
  border-radius: 12px;
  color: var(--muted);
  background: #fff8e6;
  font-size: 0.8rem;
  line-height: 1.5;
}

footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 20px var(--card-padding);
  border-top: 1px solid var(--line);
  border-radius: 0 0 27px 27px;
  background: #f3f6ed;
}

.footer-heart {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: #d8e7c7;
  stroke: #6f8c55;
  stroke-width: 1.5;
  stroke-linejoin: round;
}

footer p {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.6;
  text-align: center;
  overflow-wrap: anywhere;
}

:focus-visible {
  outline: 3px solid #8760b4;
  outline-offset: 3px;
}

@media (hover: hover) {
  .language-button:hover:not(.is-active) {
    color: var(--green-dark);
    background: #e9efe2;
  }

  .button--primary:hover {
    border-color: var(--green-dark);
    background: var(--green-dark);
  }

  .button--secondary:hover,
  .copy-button:hover {
    background: rgba(36, 101, 79, 0.07);
  }

  .phone-number:hover {
    text-decoration: underline;
  }
}

@media (max-width: 359px) {
  :root {
    --card-padding: 16px;
  }

  .parent-card {
    padding: 16px;
  }

  .hero {
    gap: 14px;
  }
}

@media (min-width: 640px) {
  :root {
    --card-padding: 32px;
  }

  .page-shell {
    padding: 32px 24px;
    padding-top: max(32px, env(safe-area-inset-top));
    padding-right: max(24px, env(safe-area-inset-right));
    padding-bottom: max(32px, env(safe-area-inset-bottom));
    padding-left: max(24px, env(safe-area-inset-left));
    place-items: center;
  }

  .contact-card {
    border-radius: 36px;
  }

  .card-topbar {
    padding-top: 24px;
  }

  .illustration {
    width: 136px;
  }

  .hero {
    padding-bottom: 32px;
  }

  .intro {
    font-size: 1rem;
  }

  .contacts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-bottom: 32px;
  }

  footer {
    border-radius: 0 0 35px 35px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .button,
  .language-button,
  .copy-button {
    transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
  }

  .button:active {
    transform: translateY(2px);
  }
}
