/* Madame Marie-Claude Tutorat: crayons, paper and sunshine. */

:root {
  --paper: #fff8ec;
  --paper-2: #fff2dc;
  --card: #ffffff;
  --ink: #2d2a4a;
  --ink-soft: #5d5a7a;
  --line: #efe3cf;
  --sun: #ffc93c;
  --sun-soft: #fff1c2;
  --coral: #ff7a6b;
  --coral-soft: #ffe1dc;
  --sky: #3fa9e8;
  --sky-soft: #dcf0fc;
  --mint: #2fbf93;
  --mint-soft: #d8f5ea;
  --grape: #7b5cf0;
  --grape-soft: #ebe5ff;
  --pink: #ff8fc0;
  --danger: #d9443a;
  --radius: 22px;
  --radius-sm: 14px;
  --shadow: 0 6px 0 rgba(45, 42, 74, 0.08), 0 14px 30px rgba(45, 42, 74, 0.08);
  --font-title: "Fredoka", "Baloo 2", "Comic Sans MS", system-ui, sans-serif;
  --font-body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    radial-gradient(circle at 12px 12px, rgba(255, 201, 60, 0.22) 2.5px, transparent 3px),
    radial-gradient(circle at 42px 38px, rgba(63, 169, 232, 0.16) 2.5px, transparent 3px),
    radial-gradient(circle at 70px 16px, rgba(255, 122, 107, 0.16) 2.5px, transparent 3px);
  background-size: 84px 56px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--grape); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--coral); }

h1, h2, h3, h4 {
  font-family: var(--font-title);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: 0.2px;
}
h1 { font-size: clamp(2rem, 4.5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; }

img { max-width: 100%; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.wrap-narrow { max-width: 760px; }

/* Header ------------------------------------------------------------------ */

.topbar {
  background: var(--card);
  position: relative;
  z-index: 5;
}
.topbar::after {
  content: "";
  display: block;
  height: 8px;
  background: linear-gradient(90deg,
    var(--coral) 0 16.6%, var(--sun) 16.6% 33.2%, var(--mint) 33.2% 49.8%,
    var(--sky) 49.8% 66.4%, var(--grape) 66.4% 83%, var(--pink) 83% 100%);
}
.topbar-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 76px;
  padding-top: 8px;
  padding-bottom: 8px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  flex-shrink: 0;
}
.brand svg { width: 48px; height: 48px; flex-shrink: 0; transition: transform .3s; }
.brand:hover svg { transform: rotate(-8deg) scale(1.05); }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name { font-family: var(--font-title); font-weight: 600; font-size: 1.25rem; }
.brand-tag {
  font-family: var(--font-title);
  font-size: .85rem;
  color: var(--coral);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-top: 4px;
}
.brand:hover { color: var(--ink); }

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  flex-wrap: wrap;
}
.nav a, .nav button.linklike {
  font-family: var(--font-title);
  font-weight: 500;
  font-size: 1rem;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  padding: 8px 11px;
  border-radius: 999px;
  position: relative;
}
.nav a:hover, .nav button.linklike:hover { background: var(--sun-soft); color: var(--ink); }
.nav a.active { background: var(--grape-soft); color: var(--grape); }
.nav .badge { margin-left: 4px; }
.nav form { margin: 0; }

button.linklike {
  background: none;
  border: 0;
  cursor: pointer;
  font: inherit;
}

.lang-toggle {
  display: inline-flex;
  background: var(--paper-2);
  border: 2px solid var(--line);
  border-radius: 999px;
  padding: 3px;
  margin-left: 8px;
  flex-shrink: 0;
}
.lang-toggle a {
  font-family: var(--font-title);
  font-weight: 600;
  font-size: .9rem;
  text-decoration: none;
  color: var(--ink-soft);
  padding: 5px 11px;
  border-radius: 999px;
}
.lang-toggle a.on { background: var(--sun); color: var(--ink); box-shadow: 0 2px 0 rgba(45,42,74,.15); }
.lang-toggle a:not(.on):hover { color: var(--ink); }

.menu-btn {
  display: none;
  margin-left: auto;
  background: var(--sun-soft);
  border: 0;
  border-radius: 12px;
  width: 44px;
  height: 44px;
  cursor: pointer;
  font-size: 1.4rem;
  color: var(--ink);
}

.account-menu { position: relative; }
.account-menu summary {
  list-style: none;
  cursor: pointer;
  font-family: var(--font-title);
  font-weight: 500;
  white-space: nowrap;
  padding: 8px 12px;
  border-radius: 999px;
  border: 2px solid var(--line);
  background: var(--paper-2);
}
.account-menu summary::-webkit-details-marker { display: none; }
.account-menu summary:hover, .account-menu[open] summary { background: var(--sun-soft); border-color: var(--sun); }
.account-menu summary.active { background: var(--grape-soft); border-color: #c9bdf7; color: var(--grape); }
.account-menu .caret { font-size: .75em; margin-left: 2px; display: inline-block; transition: transform .15s; }
.account-menu[open] .caret { transform: rotate(180deg); }
.account-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 230px;
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 16px 40px rgba(45, 42, 74, .18);
  padding: 8px;
  z-index: 30;
  display: flex;
  flex-direction: column;
}
.account-panel a, .account-panel button.linklike {
  display: block;
  width: 100%;
  text-align: left;
  padding: 9px 12px;
  border-radius: 12px;
  font-family: var(--font-title);
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
}
.account-panel a:hover, .account-panel button.linklike:hover { background: var(--sun-soft); }
.account-panel a.active { background: var(--grape-soft); color: var(--grape); }
.account-panel hr { border: 0; border-top: 2px dashed var(--line); margin: 6px 4px; width: auto; }
.account-panel form { margin: 0; }
.account-heading { display: none; padding: 4px 12px; font-size: .8rem; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--ink-soft); }

/* Signed-in staff have more links: switch to the menu button sooner. */
@media (max-width: 1100px) {
  .topbar-staff .topbar-inner { flex-wrap: wrap; }
  .topbar-staff .menu-btn { display: inline-flex; align-items: center; justify-content: center; order: 3; margin-left: 8px; }
  .topbar-staff .lang-toggle { order: 2; margin-left: auto; }
  .topbar-staff .nav { display: none; order: 5; width: 100%; flex-direction: column; align-items: stretch; padding: 8px 0 4px; }
  .topbar-staff .nav.open { display: flex; }
  .topbar-staff .nav a, .topbar-staff .nav button.linklike { text-align: left; width: 100%; }
  /* On small screens the account menu opens in place, below the public links. */
  .account-menu summary { display: none; }
  .account-menu .account-panel { display: flex; position: static; box-shadow: none; border-width: 2px 0 0; border-radius: 0; padding: 8px 0 0; margin-top: 6px; min-width: 0; }
  .account-menu:not([open]) .account-panel { display: flex; }
  .account-heading { display: block !important; }
}

@media (max-width: 860px) {
  .topbar-inner { flex-wrap: wrap; }
  .topbar-inner { gap: 8px; }
  .menu-btn { display: inline-flex; align-items: center; justify-content: center; order: 3; margin-left: 0; }
  .lang-toggle { order: 2; margin-left: auto; }
  .brand-text { min-width: 0; }
  .nav {
    display: none;
    order: 5;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    padding: 8px 0 4px;
  }
  .nav.open { display: flex; }
  .nav a, .nav button.linklike { text-align: left; width: 100%; }
  .brand-name { font-size: 1.05rem; }
  .brand svg { width: 40px; height: 40px; }
}

@media (max-width: 440px) {
  .brand { gap: 7px; }
  .brand svg { width: 34px; height: 34px; }
  .brand-name { font-size: .95rem; }
  .brand-tag { font-size: .7rem; letter-spacing: 1.5px; }
  .lang-toggle { padding: 2px; }
  .lang-toggle a { padding: 4px 8px; font-size: .82rem; }
  .menu-btn, .topbar-staff .menu-btn { width: 40px; height: 40px; margin-left: 0; }
}

/* Layout ------------------------------------------------------------------ */

main { flex: 1; padding: 32px 0 56px; }

.page-head { margin-bottom: 24px; }
.page-head p { color: var(--ink-soft); max-width: 640px; }
.page-head .eyebrow {
  display: inline-block;
  font-family: var(--font-title);
  font-weight: 600;
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--coral);
  margin-bottom: 6px;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  border: 2px solid var(--line);
}
.card + .card { margin-top: 20px; }
.card h2:first-child, .card h3:first-child { margin-top: 0; }
.card-sun { border-color: var(--sun); background: #fffbef; }
.card-mint { border-color: #a9e8d3; background: #f5fdf9; }
.card-coral { border-color: #ffc2ba; background: #fff7f5; }

.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cards { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
@media (max-width: 900px) {
  .grid-2, .grid-3, .split { grid-template-columns: minmax(0, 1fr); }
}

.stack > * + * { margin-top: 16px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row-between { justify-content: space-between; }
.muted { color: var(--ink-soft); }
.small { font-size: .9rem; }
.center { text-align: center; }
.sticky { position: sticky; top: 16px; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Buttons ---------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 1.05rem;
  line-height: 1;
  padding: 14px 22px;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  color: var(--ink);
  background: var(--sun);
  box-shadow: 0 4px 0 #e0a800;
  transition: transform .08s, box-shadow .08s, background .15s;
  white-space: nowrap;
}
.btn:hover { color: var(--ink); background: #ffd25e; }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #e0a800; }
.btn:focus-visible { outline: 3px solid var(--grape); outline-offset: 3px; }
.btn-grape { background: var(--grape); color: #fff; box-shadow: 0 4px 0 #5638c9; }
.btn-grape:hover { background: #8d71f5; color: #fff; }
.btn-grape:active { box-shadow: 0 1px 0 #5638c9; }
.btn-mint { background: var(--mint); color: #fff; box-shadow: 0 4px 0 #1f9372; }
.btn-mint:hover { background: #3fd1a4; color: #fff; }
.btn-mint:active { box-shadow: 0 1px 0 #1f9372; }
.btn-ghost { background: var(--card); border: 2px solid var(--line); box-shadow: 0 3px 0 var(--line); }
.btn-ghost:hover { background: var(--paper-2); }
.btn-ghost:active { box-shadow: 0 0 0 var(--line); }
.btn-danger { background: var(--card); color: var(--danger); border: 2px solid #f6c3be; box-shadow: 0 3px 0 #f6c3be; }
.btn-danger:hover { background: #fff1ef; color: var(--danger); }
.btn-sm { font-size: .92rem; padding: 9px 15px; }
.btn-lg { font-size: 1.2rem; padding: 18px 30px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* Badges ----------------------------------------------------------------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-title);
  font-weight: 600;
  font-size: .8rem;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--paper-2);
  color: var(--ink);
  white-space: nowrap;
}
.badge-count { background: var(--coral); color: #fff; min-width: 22px; justify-content: center; padding: 2px 7px; }
.status-pending { background: var(--sun-soft); color: #8a5a00; }
.status-confirmed { background: var(--mint-soft); color: #11795a; }
.status-declined, .status-cancelled { background: #ffe4e1; color: #b33228; }
.status-completed { background: var(--sky-soft); color: #1d6fa1; }
.status-no_show { background: #ece9f3; color: #5d5a7a; }
.pill-lang { background: var(--sky-soft); color: #1d6fa1; }
.pay-unpaid { background: #ece9f3; color: #5d5a7a; }
.pay-due { background: #ffe1dc; color: #b33228; }
.pay-paid { background: var(--mint-soft); color: #11795a; }

/* Messages --------------------------------------------------------------- */

.messages { list-style: none; margin: 0 0 20px; padding: 0; }
.messages li {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  background: var(--mint-soft);
  border: 2px solid #a9e8d3;
  font-weight: 600;
}
.messages li + li { margin-top: 8px; }
.messages li.error { background: #fff1ef; border-color: #f6c3be; color: #9c2a21; }
.alert {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  background: #fff1ef;
  border: 2px solid #f6c3be;
  color: #9c2a21;
  font-weight: 600;
  margin-bottom: 16px;
}
.note {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  background: var(--sky-soft);
  border: 2px dashed #9dd2f3;
}

/* Forms ------------------------------------------------------------------ */

.field { margin-bottom: 18px; }
.field > label, .field-label {
  display: block;
  font-weight: 700;
  margin-bottom: 6px;
}
.field .help { font-size: .88rem; color: var(--ink-soft); margin-top: 4px; }
.field .errorlist { color: var(--danger); font-weight: 600; font-size: .92rem; list-style: none; padding: 0; margin: 4px 0 0; }
.errorlist.nonfield { list-style: none; padding: 14px 18px; margin: 0 0 16px; border-radius: var(--radius-sm); background: #fff1ef; border: 2px solid #f6c3be; color: #9c2a21; font-weight: 600; }

input[type=text], input[type=email], input[type=tel], input[type=password], input[type=number],
input[type=date], input[type=time], input[type=url], input:not([type]), select, textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: #fffdf9;
  border: 2px solid var(--line);
  border-radius: 12px;
  padding: 11px 14px;
  transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--grape);
  box-shadow: 0 0 0 4px var(--grape-soft);
}
input[type=checkbox], input[type=radio] { accent-color: var(--grape); width: 20px; height: 20px; vertical-align: -4px; }
input[type=file] { font: inherit; }

.choice-list { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; }
.choice-list > div { display: contents; }
.choice-list label, .radio-chips label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: #fffdf9;
  cursor: pointer;
  font-weight: 600;
}
.choice-list label:has(input:checked), .radio-chips label:has(input:checked) {
  border-color: var(--grape);
  background: var(--grape-soft);
}
.check-row { display: flex; gap: 10px; align-items: center; font-weight: 600; }

.honey { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

.form-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 8px; }

/* Tables ----------------------------------------------------------------- */

.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: separate; border-spacing: 0; }
.table th, .table td { padding: 12px 10px; text-align: left; border-bottom: 2px dashed var(--line); vertical-align: middle; }
.table th { font-family: var(--font-title); font-weight: 600; font-size: .9rem; color: var(--ink-soft); }
.table tr:last-child td { border-bottom: 0; }
.table td.num, .table th.num { text-align: right; }
.table a.rowlink { font-weight: 700; text-decoration: none; }

dl.details { display: grid; grid-template-columns: max-content 1fr; gap: 10px 18px; margin: 0; }
dl.details dt { font-weight: 700; color: var(--ink-soft); }
dl.details dd { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }
@media (max-width: 520px) {
  dl.details { grid-template-columns: 1fr; gap: 2px; }
  dl.details dd { margin-bottom: 10px; }
}

.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.tabs a {
  font-family: var(--font-title);
  font-weight: 600;
  text-decoration: none;
  color: var(--ink-soft);
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--card);
  border: 2px solid var(--line);
}
.tabs a.on { background: var(--grape); border-color: var(--grape); color: #fff; }

.pager { display: flex; gap: 10px; justify-content: center; align-items: center; margin-top: 18px; }

/* Home ------------------------------------------------------------------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 32px;
  align-items: center;
  padding: 16px 0 36px;
}
.hero h1 { font-size: clamp(2.2rem, 5.5vw, 3.6rem); }
.hero h1 .hl {
  background: linear-gradient(transparent 62%, var(--sun) 62% 92%, transparent 92%);
  padding: 0 4px;
}
.hero p.lead { font-size: 1.2rem; color: var(--ink-soft); max-width: 520px; }
.hero-art svg { width: 100%; height: auto; max-width: 480px; display: block; margin: 0 auto; }
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; text-align: center; }
  .hero p.lead { margin-left: auto; margin-right: auto; }
  .hero .row { justify-content: center; }
  .hero-art svg { max-width: 340px; }
}

.float { animation: float 5s ease-in-out infinite; transform-origin: center; transform-box: fill-box; }
.float-2 { animation-delay: -1.5s; }
.float-3 { animation-delay: -3s; }
.twinkle { animation: twinkle 2.8s ease-in-out infinite; transform-origin: center; transform-box: fill-box; }
@keyframes float { 50% { transform: translateY(-10px) rotate(3deg); } }
@keyframes twinkle { 50% { transform: scale(.7) rotate(20deg); opacity: .7; } }
@media (prefers-reduced-motion: reduce) {
  .float, .twinkle { animation: none; }
}

.feature { text-align: center; }
.feature .icon {
  width: 72px;
  height: 72px;
  border-radius: 24px;
  display: grid;
  place-items: center;
  margin: 0 auto 12px;
  font-size: 2.1rem;
  transform: rotate(-4deg);
}
.feature:nth-child(2) .icon { transform: rotate(4deg); }

.ribbon {
  background: var(--grape);
  color: #fff;
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  box-shadow: var(--shadow);
  margin-top: 36px;
}
.ribbon h2 { margin: 0; color: #fff; }
a.ribbon { text-decoration: none; color: #fff; }
a.ribbon:hover { color: #fff; background: #8b70f2; }
.ribbon p { margin: 4px 0 0; opacity: .9; }

/* Teachers --------------------------------------------------------------- */

.avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 1.6rem;
  color: #fff;
  border: 4px solid #fff;
  box-shadow: 0 0 0 3px var(--sun);
}
.avatar-sm { width: 44px; height: 44px; font-size: 1rem; border-width: 2px; box-shadow: 0 0 0 2px var(--sun); }
.avatar-c0 { background: var(--coral); }
.avatar-c1 { background: var(--sky); }
.avatar-c2 { background: var(--mint); }
.avatar-c3 { background: var(--grape); }
.avatar-c4 { background: #f2a516; }

.teacher-card { display: flex; flex-direction: column; gap: 14px; }
.teacher-card .who { display: flex; gap: 14px; align-items: center; }
.teacher-card h3 { margin: 0 0 4px; }
.teacher-card .bio { color: var(--ink-soft); font-size: .95rem; flex: 1; }
.teacher-card .btn { align-self: flex-start; }
.price-list { display: flex; flex-wrap: wrap; gap: 6px; }

.teacher-pick { display: flex; gap: 10px; flex-wrap: wrap; }
.teacher-pick a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 16px 6px 6px;
  border-radius: 999px;
  border: 2px solid var(--line);
  background: var(--card);
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
}
.teacher-pick a.on { border-color: var(--grape); background: var(--grape-soft); }

/* About ------------------------------------------------------------------ */

.profile {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 36px;
  align-items: center;
  padding: 32px;
}
.profile + .profile { margin-top: 28px; }
.profile.flip { grid-template-columns: minmax(0, 1fr) 240px; }
.profile.flip .profile-photo { order: 2; }
.profile-solo { grid-template-columns: 300px minmax(0, 1fr); max-width: 980px; margin: 0 auto; }
.profile-photo { position: relative; width: 100%; aspect-ratio: 1; }
.profile-photo img, .profile-initials {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: grid;
  place-items: center;
  border-radius: 44% 56% 52% 48% / 50% 44% 56% 50%;
  border: 6px solid #fff;
  box-shadow: 0 0 0 5px var(--sun), var(--shadow);
}
.profile:nth-of-type(3n+2) .profile-photo img { box-shadow: 0 0 0 5px var(--sky), var(--shadow); }
.profile:nth-of-type(3n) .profile-photo img { box-shadow: 0 0 0 5px var(--mint), var(--shadow); }
.profile-initials { font-family: var(--font-title); font-weight: 600; font-size: 4.5rem; color: #fff; }
.profile-star { position: absolute; width: 54px; height: 54px; top: -10px; right: -6px; }
.profile.flip .profile-star { right: auto; left: -6px; }
.profile-text h2 { margin-bottom: 8px; }
.profile-bio { color: var(--ink-soft); font-size: 1.05rem; }
.profile-bio p:last-child { margin-bottom: 18px; }
@media (max-width: 760px) {
  .profile, .profile.flip, .profile-solo { grid-template-columns: 1fr; text-align: center; padding: 24px; gap: 20px; }
  .profile.flip .profile-photo { order: 0; }
  .profile-photo { width: 200px; margin: 0 auto; }
  .profile-text .row { justify-content: center; }
}

/* Admin: home page editor */
.icon-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 8px; }
.icon-choice { cursor: pointer; }
.icon-choice input { position: absolute; opacity: 0; }
.icon-choice span {
  display: grid; place-items: center; height: 52px; border-radius: 16px; font-size: 1.6rem;
  background: var(--paper-2); border: 2px solid transparent; transition: transform .1s;
}
.icon-choice:hover span { transform: rotate(-4deg) scale(1.06); }
.icon-choice input:checked + span { background: var(--bubble); border-color: var(--grape); box-shadow: 0 0 0 3px var(--grape-soft); }
.icon-choice input:focus-visible + span { outline: 3px solid var(--grape); outline-offset: 2px; }
.ribbon .hl { background: none; color: var(--sun); }

/* Learning space ----------------------------------------------------------- */

.space-section { position: relative; }
.space-section + .space-section { margin-top: 28px; }
.space-section:nth-of-type(even) { background: #fffbf3; }
.space-section h2 { margin-bottom: 12px; }
.space-body { font-size: 1.05rem; }
.space-body h2 { font-size: 1.5rem; margin: 18px 0 8px; }
.space-body h3 { font-size: 1.2rem; margin: 16px 0 6px; }
.space-body > :first-child { margin-top: 0; }
.space-body > :last-child { margin-bottom: 0; }
.space-body ul, .space-body ol { padding-left: 22px; }
.space-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 28px; align-items: center; }
.space-right .space-split { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
.space-right .space-split .space-photo { order: 2; }
.space-nophoto .space-split { grid-template-columns: 1fr; }
.space-photo { margin: 0; }
.space-photo img {
  width: 100%;
  border-radius: 18px;
  display: block;
  box-shadow: 0 0 0 4px #fff, 0 0 0 7px var(--sun), var(--shadow);
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.space-section:nth-of-type(3n+2) .space-photo img { box-shadow: 0 0 0 4px #fff, 0 0 0 7px var(--sky), var(--shadow); }
.space-section:nth-of-type(3n) .space-photo img { box-shadow: 0 0 0 4px #fff, 0 0 0 7px var(--mint), var(--shadow); }
.space-photo figcaption { font-size: .9rem; color: var(--ink-soft); text-align: center; margin-top: 10px; }
.space-gallery { display: grid; gap: 20px; margin-top: 24px; }
.space-gallery-1 { grid-template-columns: 1fr; }
.space-gallery-1 .space-photo img { aspect-ratio: 16 / 9; }
.space-gallery-2, .space-gallery-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.space-gallery-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.space-staff { display: flex; gap: 8px; justify-content: flex-end; align-items: center; margin: -8px -8px 8px 0; }
@media (max-width: 760px) {
  .space-split, .space-right .space-split { grid-template-columns: 1fr; }
  .space-right .space-split .space-photo { order: 0; }
  .space-gallery-3, .space-gallery-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .space-gallery-3 .space-photo:last-child { grid-column: 1 / -1; }
}

/* Admin: section editor */
.space-thumb { width: 64px; height: 48px; object-fit: cover; border-radius: 10px; flex-shrink: 0; }
.space-thumb-empty { display: grid; place-items: center; background: var(--paper-2); font-size: 1.3rem; }
.rt { border: 2px solid var(--line); border-radius: 12px; background: #fffdf9; overflow: hidden; }
.rt:focus-within { border-color: var(--grape); box-shadow: 0 0 0 4px var(--grape-soft); }
.rt-bar { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; padding: 6px; background: var(--paper-2); border-bottom: 2px solid var(--line); }
.rt-btn {
  min-width: 32px; height: 32px; padding: 0 8px;
  border: 1px solid transparent; border-radius: 8px; background: transparent;
  font: inherit; font-size: .95rem; color: var(--ink); cursor: pointer;
}
.rt-btn:hover { background: #fff; border-color: var(--line); }
.rt-h { font-family: var(--font-title); font-weight: 600; font-size: 1.1rem; }
.rt-h3 { font-family: var(--font-title); font-weight: 600; font-size: .9rem; }
.rt-swatch { min-width: 22px; width: 22px; height: 22px; padding: 0; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); }
.rt-swatch:hover { transform: scale(1.15); border-color: #fff; }
.rt-sep { width: 1px; height: 22px; background: var(--line); margin: 0 4px; }
.rt-area { min-height: 180px; padding: 12px 14px; outline: none; }
.rt-area h2 { font-size: 1.4rem; margin: 10px 0 6px; }
.rt-area h3 { font-size: 1.15rem; margin: 8px 0 4px; }
.rt-area p { margin: 0 0 .8em; }
.photo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.photo-slot { display: flex; flex-direction: column; gap: 6px; }
.photo-slot img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; display: block; }
.photo-slot[hidden], .photo-preview[hidden], .photo-pick[hidden] { display: none !important; }
.photo-preview { position: relative; }
.photo-x {
  position: absolute; top: 8px; right: 8px; width: 34px; height: 34px; border-radius: 50%;
  border: 2px solid #fff; background: rgba(45, 42, 74, .75); color: #fff; font-size: 1rem; cursor: pointer;
}
.photo-x:hover { background: var(--danger); }
.photo-pick small { display: block; font-weight: 600; font-size: .8rem; margin-top: 4px; opacity: .8; }
.photo-slot input[type=text] { font-size: .9rem; padding: 7px 10px; }
.photo-pick {
  position: relative;
  aspect-ratio: 4 / 3; border: 2px dashed var(--line); border-radius: 12px;
  display: grid; place-items: center; cursor: pointer; color: var(--ink-soft); font-weight: 700; text-align: center; padding: 8px;
  overflow: hidden;
}
.photo-pick:hover, .photo-pick.picked { border-color: var(--grape); color: var(--grape); background: var(--grape-soft); }
.photo-pick input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.layout-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.layout-choice {
  display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center;
  border: 2px solid var(--line); border-radius: 12px; padding: 10px 6px; cursor: pointer; font-size: .85rem; font-weight: 700;
}
.layout-choice:has(input:checked) { border-color: var(--grape); background: var(--grape-soft); }
.layout-choice input { position: absolute; opacity: 0; }
.layout-pic { width: 64px; height: 44px; display: grid; gap: 3px; padding: 4px; background: #fff; border-radius: 6px; border: 1px solid var(--line); }
.layout-pic i { background: var(--sky); border-radius: 3px; }
.layout-pic b { background: var(--line); border-radius: 2px; height: 5px; }
.layout-pic-text { grid-template-rows: repeat(3, 5px); align-content: center; }
.layout-pic-text i { display: none; }
.layout-pic-left { grid-template-columns: 1fr 1.3fr; grid-template-rows: repeat(3, 5px); align-content: center; }
.layout-pic-left i { grid-row: 1 / 4; height: 26px; }
.layout-pic-right { grid-template-columns: 1.3fr 1fr; grid-template-rows: repeat(3, 5px); align-content: center; }
.layout-pic-right i { grid-row: 1 / 4; grid-column: 2; height: 26px; }
.layout-pic-gallery { grid-template-rows: 5px 5px 1fr; }
.layout-pic-gallery i { grid-row: 3; }
.layout-pic-gallery b:last-child { display: none; }

/* Booking widget --------------------------------------------------------- */

.step { position: relative; padding-left: 52px; }
.step + .step { margin-top: 28px; }
.step-num {
  position: absolute;
  left: 0;
  top: -2px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--font-title);
  font-weight: 600;
  color: #fff;
  background: var(--coral);
  box-shadow: 0 3px 0 rgba(0, 0, 0, .12);
}
.step:nth-of-type(2) .step-num { background: var(--sky); }
.step:nth-of-type(3) .step-num { background: var(--mint); }
.step:nth-of-type(4) .step-num { background: var(--grape); }
.step h3 { margin-bottom: 12px; padding-top: 4px; }
@media (max-width: 520px) {
  .step { padding-left: 0; }
  .step-num { position: static; display: inline-grid; margin-bottom: 8px; width: 32px; height: 32px; }
}

.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  font: inherit;
  font-weight: 700;
  border: 2px solid var(--line);
  background: #fffdf9;
  color: var(--ink);
  border-radius: 16px;
  padding: 10px 16px;
  cursor: pointer;
  transition: transform .08s, border-color .15s, background .15s;
  text-align: center;
}
.chip small { display: block; font-weight: 600; color: var(--ink-soft); }
.chip:hover { border-color: var(--sky); transform: translateY(-2px); }
.chip.on { border-color: var(--grape); background: var(--grape); color: #fff; }
.chip.on small { color: #e6defe; }
.chip:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }

.month { max-width: 440px; }
.month-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.month-head strong { font-family: var(--font-title); font-size: 1.2rem; text-transform: capitalize; }
.month-nav {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: var(--card);
  cursor: pointer;
  font-size: 1.1rem;
  color: var(--ink);
}
.month-nav:disabled { opacity: .35; cursor: default; }
.month-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.month-grid .dow { text-align: center; font-size: .78rem; font-weight: 800; color: var(--ink-soft); text-transform: uppercase; padding: 4px 0; }
.day {
  aspect-ratio: 1;
  border-radius: 14px;
  border: 2px solid transparent;
  background: transparent;
  font: inherit;
  font-weight: 700;
  color: #bdb6a8;
  display: grid;
  place-items: center;
  padding: 0;
}
.day.avail { background: var(--mint-soft); color: #0f6b50; border-color: #a9e8d3; cursor: pointer; }
.day.avail:hover { background: #c3f0df; transform: scale(1.06); }
.day.on { background: var(--grape); border-color: var(--grape); color: #fff; }
.day.today { box-shadow: inset 0 0 0 2px var(--sun); }
.month-loading { opacity: .5; pointer-events: none; }

.times { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.empty {
  padding: 18px;
  border-radius: var(--radius-sm);
  background: var(--paper-2);
  color: var(--ink-soft);
  text-align: center;
}

.for-child {
  font-size: 1.15rem;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: var(--mint-soft);
  border: 2px solid #a9e8d3;
  margin: 0 0 18px;
}

.summary h3 { display: flex; align-items: center; gap: 8px; }
.summary dl.details { grid-template-columns: max-content 1fr; }
.summary .total { font-family: var(--font-title); font-size: 1.6rem; color: var(--grape); }

/* Status hero on the booking page */
.status-hero { display: flex; gap: 18px; align-items: center; }
.status-hero .big-emoji { font-size: 3rem; line-height: 1; }

/* Teacher calendar ------------------------------------------------------- */

.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: .9rem; font-weight: 600; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 16px; height: 16px; border-radius: 5px; display: inline-block; }

.cal-wrap { background: var(--card); border-radius: var(--radius); padding: 14px; border: 2px solid var(--line); box-shadow: var(--shadow); }
.cal-wrap .fc { font-size: .92rem; }
.fc .fc-toolbar-title { font-family: var(--font-title); font-weight: 600; font-size: 1.3rem; text-transform: capitalize; }
.fc .fc-button-primary {
  background: var(--paper-2); color: var(--ink); border: 2px solid var(--line);
  font-family: var(--font-title); font-weight: 600; text-transform: capitalize; border-radius: 12px;
}
.fc .fc-button-primary:hover { background: var(--sun-soft); color: var(--ink); border-color: var(--sun); }
.fc .fc-button-primary:not(:disabled).fc-button-active, .fc .fc-button-primary:not(:disabled):active {
  background: var(--grape); border-color: var(--grape); color: #fff;
}
.fc .fc-button-primary:disabled { background: var(--paper-2); color: var(--ink-soft); border-color: var(--line); }
.fc .fc-button:focus { box-shadow: 0 0 0 3px var(--grape-soft) !important; }
.fc-theme-standard td, .fc-theme-standard th, .fc-theme-standard .fc-scrollgrid { border-color: #f1e8d9; }
.fc .fc-col-header-cell-cushion { font-family: var(--font-title); font-weight: 600; color: var(--ink); text-transform: capitalize; padding: 6px 2px; text-decoration: none; }
.fc .fc-timegrid-slot-label-cushion { color: var(--ink-soft); font-weight: 600; }
.fc .fc-day-today { background: #fffbec !important; }
.fc .fc-highlight { background: rgba(123, 92, 240, .18); }

.fc-event.av-open { background: var(--mint-soft); border: 2px solid var(--mint); color: #0f6b50; }
.fc-event.av-block { background: var(--sky-soft); border: 2px dashed var(--sky); color: #155e8a; }
.fc-event.av .fc-event-main { color: inherit; font-weight: 700; }
.fc-event.av-once { box-shadow: inset 5px 0 0 var(--sun); }
.fc-event.av-once .fc-event-main { padding-left: 6px; }
.fc-event.bk { border: 0; border-left: 5px solid; font-weight: 700; box-shadow: 0 2px 6px rgba(45, 42, 74, .25); }
/* Bookings sit on top of the availability they use, nearly full width. */
.fc-timegrid-event-harness:has(> .fc-event.bk) { left: 10% !important; right: 2px !important; z-index: 4 !important; }
.fc-event.bk .fc-event-main { color: inherit; }
.fc-event.bk-pending { background: #ffe8a8; border-color: #f2a516; color: #6b4600; }
.fc-event.bk-confirmed { background: var(--grape); border-color: #4f30c4; color: #fff; }
.fc-event.bk-completed, .fc-event.bk-no_show { background: #e8e5f0; border-color: #a19cb8; color: #4c4866; }
.fc-event.dayinfo { background: var(--paper-2); border: 1px solid var(--line); color: var(--ink-soft); font-size: .78rem; cursor: pointer; font-weight: 700; }
.fc-event.dayinfo .fc-event-main { color: inherit; }
.fc-event.dayinfo-changed { background: var(--sun-soft); border-color: var(--sun); color: #7a5300; }
.fc-event.dayinfo-off { background: #ffe4e1; border-color: #f6c3be; color: #9c2a21; }
.fc-event { cursor: pointer; }
.fc-weekly .fc-col-header-cell-cushion { pointer-events: none; }

dialog.modal {
  border: 0;
  border-radius: var(--radius);
  padding: 0;
  width: min(460px, calc(100vw - 32px));
  box-shadow: 0 30px 80px rgba(45, 42, 74, .35);
  color: var(--ink);
  background: var(--card);
}
dialog.modal::backdrop { background: rgba(45, 42, 74, .45); }
dialog.modal form { padding: 24px; }
dialog.modal h3 { margin-bottom: 4px; }
dialog.modal .sub { color: var(--ink-soft); margin-bottom: 18px; font-weight: 600; }
dialog.modal .form-actions { justify-content: flex-end; margin-top: 18px; }
dialog.modal .form-actions .spacer { flex: 1; }
.option-card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  cursor: pointer;
  margin-bottom: 10px;
}
.option-card:has(input:checked) { border-color: var(--grape); background: var(--grape-soft); }
.option-card input { margin-top: 3px; }
.option-card strong { display: block; }
.option-card span { font-size: .9rem; color: var(--ink-soft); }

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(20px);
  background: var(--ink);
  color: #fff;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 700;
  opacity: 0;
  transition: opacity .2s, transform .2s;
  z-index: 50;
  max-width: calc(100vw - 32px);
  text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.error { background: var(--danger); }

.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 2px dashed var(--line); }
.checklist li:last-child { border-bottom: 0; }
.checklist .tick {
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; flex-shrink: 0;
  background: var(--paper-2); border: 2px solid var(--line); font-weight: 800;
}
.checklist li.done .tick { background: var(--mint); border-color: var(--mint); color: #fff; }
.checklist li.done .label { text-decoration: line-through; color: var(--ink-soft); }

.booking-row { display: flex; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 2px dashed var(--line); }
.booking-row:last-child { border-bottom: 0; }
.booking-row .when {
  flex-shrink: 0;
  width: 64px;
  text-align: center;
  border-radius: 14px;
  background: var(--sun-soft);
  padding: 6px 0;
  font-family: var(--font-title);
  line-height: 1.1;
}
.booking-row .when b { display: block; font-size: 1.5rem; }
.booking-row .when span { font-size: .75rem; text-transform: uppercase; font-weight: 600; }
.booking-row .what { flex: 1; min-width: 0; }
.booking-row .what strong { display: block; }

.order-buttons { display: flex; flex-direction: column; gap: 4px; }
.order-buttons form { margin: 0; }
.order-btn {
  width: 34px; height: 26px;
  border-radius: 8px;
  border: 2px solid var(--line);
  background: var(--card);
  color: var(--ink);
  font-size: .7rem;
  cursor: pointer;
}
.order-btn:hover:not(:disabled) { background: var(--sun-soft); border-color: var(--sun); }
.order-btn:disabled { opacity: .3; cursor: default; }

.child-row { display: flex; gap: 14px; align-items: center; margin-bottom: 10px; }
.booking-row form { margin: 0; }

.copy-field { display: flex; gap: 8px; }
.copy-field input { font-size: .85rem; }

.history { list-style: none; padding: 0; margin: 0; font-size: .92rem; }
.history li { padding: 8px 0; border-bottom: 1px dashed var(--line); }
.history li:last-child { border-bottom: 0; }

/* Footer ----------------------------------------------------------------- */

.footer {
  background: var(--ink);
  color: #e9e6f7;
  padding: 28px 0;
  margin-top: auto;
  position: relative;
}
.footer::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: -14px;
  height: 14px;
  background: radial-gradient(circle at 10px 14px, var(--ink) 10px, transparent 10.5px) repeat-x;
  background-size: 20px 14px;
}
.footer a { color: var(--sun); }
.footer .row { justify-content: space-between; }

/* Extras */
.fc-event.bk-extra { background: var(--sun-soft); border-color: var(--sun); color: var(--ink); border-style: dashed; }
.extras-pick { margin: 16px 0 0; }
.extras-pick h4 { margin: 0 0 4px; }
.extra-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; padding: 6px 0; border-top: 1px solid var(--line, rgba(45,42,74,.12)); }
.timeline { list-style: none; margin: 0; padding: 0; white-space: normal; display: grid; gap: 6px; }
.timeline li { padding: 6px 10px; border-radius: 10px; border-left: 4px solid var(--grape); background: rgba(255,255,255,.7); }
.timeline li.tl-extra { border-left-color: var(--sun); background: var(--sun-soft); }
.breakdown { display: grid; grid-template-columns: 1fr max-content; gap: 4px 18px; white-space: normal; }
.breakdown > :nth-child(even) { text-align: right; }
.extras-offer { display: grid; gap: 10px; margin-top: 12px; }
.extra-card { display: block; padding: 12px 14px; border: 2px solid var(--line, rgba(45,42,74,.15)); border-radius: 14px; cursor: pointer; background: #fff; }
.extra-card.on { border-color: var(--grape); background: rgba(123,92,240,.06); }
.extra-card.off { opacity: .55; cursor: not-allowed; }
.extra-card .extra-head { display: flex; gap: 10px; align-items: baseline; justify-content: space-between; font-weight: 700; }
.extra-card .extra-head label, .extra-card .extra-head span.pick { display: flex; gap: 10px; align-items: center; }
.extra-card p { margin: 6px 0 0 28px; }

/* Time the extras of a slot would take: busy (mandatory) or possibly busy (optional). */
.fc-event.xt { pointer-events: none; border: 0; font-size: .75rem; font-weight: 700; color: #6b4600; z-index: 3; }
.fc-event.xt-must { background: repeating-linear-gradient(135deg, #ffd66b 0 8px, #ffc93c 8px 16px); border-left: 4px solid #f2a516; }
.fc-event.xt-maybe { background: repeating-linear-gradient(135deg, rgba(255,201,60,.35) 0 8px, rgba(255,201,60,.12) 8px 16px); border-left: 4px dashed #f2a516; }
.fc-timegrid-event-harness:has(> .fc-event.xt) { left: 0 !important; right: 0 !important; z-index: 3 !important; }
.fc-event.xt .fc-event-main { color: inherit; }
