:root {
  --bg-page: #efe8dc;
  --bg-surface: #fffdf8;
  --bg-soft: #f8f1e8;
  --bg-tint: #f6e1df;
  --brand-red: #c91f26;
  --brand-red-strong: #ad171f;
  --brand-red-soft: #df6b62;
  --ink: #242321;
  --muted: #746f68;
  --muted-light: #9a9289;
  --line: #e5d8ca;
  --success: #627b52;
  --success-bg: #edf3e7;
  --shadow: 0 2px 8px rgba(36, 35, 33, 0.05), 0 18px 44px rgba(36, 35, 33, 0.11);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --nav-height: 78px;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  overscroll-behavior-x: none;
  overscroll-behavior-y: none;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(201, 31, 38, 0.05), transparent 32%),
    linear-gradient(180deg, #f3ecdf 0%, var(--bg-page) 100%);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

button,
input,
textarea {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

.app-shell {
  margin: 0 auto;
  max-width: 480px;
  min-height: 100dvh;
  overscroll-behavior: contain;
  overflow-x: hidden;
  position: relative;
}

.telegram-swipe-lock {
  overscroll-behavior: none;
}

html.telegram-swipe-lock,
body.telegram-swipe-lock {
  height: 100%;
  overflow: hidden;
}

body.telegram-swipe-lock .app-shell {
  height: 100dvh;
  min-height: 100dvh;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-x: none;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y;
}

.screen {
  min-height: 100dvh;
  padding: max(18px, env(safe-area-inset-top)) 16px calc(var(--nav-height) + 28px);
}

.screen-content {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.header {
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 6px 4px 12px;
}

.logo-row {
  align-items: center;
  display: flex;
  justify-content: center;
  width: 100%;
}

.logo {
  color: var(--brand-red);
  font-size: clamp(38px, 10.6vw, 55px);
  font-weight: 800;
  line-height: 0.95;
  text-align: center;
}

.logo-subtitle {
  color: var(--brand-red);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
  text-align: center;
}

.app-header {
  padding: 4px 0 12px;
}

.app-header-image {
  display: block;
  height: auto;
  margin: 0 auto;
  max-width: 430px;
  width: min(96vw, 430px);
}

.stitch-icon {
  --stitch-dark: var(--brand-red-strong);
  --stitch-light: #d64e46;
  display: inline-block;
  flex: 0 0 auto;
  height: 1em;
  position: relative;
  width: 1em;
}

.stitch-tone-muted {
  --stitch-dark: #5c5850;
  --stitch-light: #8e8982;
}

.stitch-tone-send {
  --stitch-dark: #fffdf8;
  --stitch-light: #f4c9c6;
}

.stitch-cell {
  height: 15%;
  position: absolute;
  transform: translate(-50%, -50%);
  width: 15%;
}

.stitch-cell::before,
.stitch-cell::after {
  border-radius: 999px;
  content: "";
  height: 20%;
  left: 50%;
  position: absolute;
  top: 50%;
  width: 96%;
}

.stitch-cell::before {
  background: var(--stitch-dark);
  transform: translate(-50%, -50%) rotate(-45deg);
}

.stitch-cell::after {
  background: var(--stitch-light);
  transform: translate(-50%, -50%) rotate(45deg);
}

.card {
  background: rgba(255, 253, 248, 0.94);
  border: 1px solid rgba(229, 216, 202, 0.72);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card-pad {
  padding: 22px;
}

.hero-card {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr auto;
}

.hero-title {
  font-size: clamp(26px, 7vw, 34px);
  font-weight: 750;
  line-height: 1.08;
  margin: 0;
}

.hero-text {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.45;
  margin: 8px 0 0;
}

.avatar {
  align-items: center;
  align-self: start;
  background: var(--bg-tint);
  border-radius: 999px;
  color: var(--brand-red);
  display: flex;
  font-size: 28px;
  font-weight: 800;
  height: 58px;
  justify-content: center;
  width: 58px;
}

.hint-row {
  align-items: center;
  color: var(--brand-red);
  display: flex;
  font-size: 14px;
  font-weight: 700;
  gap: 10px;
  grid-column: 1 / -1;
  line-height: 1.25;
}

.section-kicker {
  color: var(--brand-red);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  margin: 0 0 14px;
  text-transform: uppercase;
}

.lesson-mini {
  align-items: center;
  display: grid;
  gap: 14px;
  grid-template-columns: 72px 1fr;
}

.date-tile {
  align-items: center;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  height: 88px;
  justify-content: center;
  line-height: 1;
  width: 72px;
}

.date-tile.active {
  background: var(--brand-red);
  border-color: var(--brand-red);
  color: white;
}

.date-day {
  font-size: 30px;
  font-weight: 800;
}

.date-month {
  font-size: 13px;
  font-weight: 700;
  margin-top: 7px;
}

.date-weekday {
  font-size: 12px;
  margin-top: 7px;
}

.lesson-title {
  font-size: 20px;
  font-weight: 750;
  margin: 4px 0;
}

.lesson-meta {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}

.btn {
  align-items: center;
  border: 1px solid var(--brand-red);
  border-radius: 16px;
  cursor: pointer;
  display: inline-flex;
  font-weight: 750;
  gap: 8px;
  justify-content: center;
  min-height: 52px;
  padding: 12px 18px;
  transition:
    transform 0.16s ease,
    background 0.16s ease,
    color 0.16s ease;
  width: 100%;
}

.btn:active {
  transform: translateY(1px) scale(0.995);
}

.btn-primary {
  background: var(--brand-red);
  color: white;
}

.btn-secondary {
  background: transparent;
  color: var(--brand-red);
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--brand-red);
}

.quick-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr 1fr;
}

.quick-card {
  align-items: stretch;
  background: var(--bg-surface);
  border: 1px solid rgba(229, 216, 202, 0.8);
  border-radius: 22px;
  box-shadow: var(--shadow);
  color: inherit;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  min-height: 126px;
  padding: 18px;
  text-align: left;
}

.quick-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
}

.chevron {
  color: var(--brand-red);
  font-size: 26px;
  line-height: 1;
}

.quick-title {
  font-size: 16px;
  font-weight: 750;
  line-height: 1.15;
}

.quick-subtitle {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.25;
  margin-top: 7px;
}

.event-layout {
  display: grid;
  gap: 14px;
  grid-template-columns: 118px 1fr;
}

.event-image {
  background:
    linear-gradient(rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.18)),
    url("/assets/studio-event.png") center / cover;
  border-radius: 16px;
  min-height: 88px;
}

.event-title {
  font-size: 18px;
  font-weight: 750;
  line-height: 1.2;
  margin: 0;
}

.event-copy {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
  margin: 5px 0 0;
}

.direct-chat-card {
  align-items: flex-start;
  display: grid;
  gap: 16px;
  grid-template-columns: 56px 1fr;
}

.direct-chat-card .btn {
  grid-column: 1 / -1;
  width: 100%;
}

.contact-request-card {
  display: grid;
  gap: 14px;
}

.contact-request-card .event-title {
  margin-top: -6px;
}

.contact-topic-row .chip {
  flex: 1 1 132px;
}

.contact-request-card .btn {
  width: 100%;
}

.contact-lesson-context {
  background: rgba(201, 31, 38, 0.06);
  border: 1px solid rgba(201, 31, 38, 0.12);
  border-radius: 16px;
  display: grid;
  gap: 4px;
  padding: 12px;
}

.contact-lesson-context span,
.contact-lesson-context small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}

.contact-lesson-context strong {
  color: var(--ink);
  font-size: 15px;
  font-weight: 820;
  line-height: 1.15;
}

.link-button {
  appearance: none;
  background: transparent;
  border: 0;
  color: var(--brand-red);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 850;
  justify-self: start;
  padding: 2px 0 0;
}

.request-history-card {
  display: grid;
  gap: 14px;
}

.request-history-head {
  align-items: start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.request-history-head .event-title {
  margin-top: -6px;
}

.request-history-refresh {
  min-height: 36px;
  padding: 8px 12px;
  white-space: nowrap;
}

.request-history-list {
  border: 1px solid var(--line);
  border-radius: 18px;
  display: grid;
  overflow: hidden;
}

.request-history-row {
  align-items: start;
  background: rgba(255, 253, 248, 0.86);
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 8px 12px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 12px;
}

.request-history-row:last-child {
  border-bottom: 0;
}

.request-history-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.request-history-main strong {
  font-size: 15px;
  font-weight: 780;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.request-history-main small,
.request-history-row p,
.request-history-reply span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}

.request-history-row p {
  grid-column: 1 / -1;
  margin: 0;
}

.request-history-lesson {
  background: rgba(201, 31, 38, 0.06);
  border-radius: 12px;
  color: var(--brand-red);
  font-size: 12px;
  font-weight: 760;
  grid-column: 1 / -1;
  line-height: 1.25;
  padding: 8px 10px;
}

.request-history-status {
  align-items: center;
  background: var(--bg-soft);
  border-radius: 999px;
  color: var(--ink);
  display: inline-flex;
  font-size: 11px;
  font-weight: 850;
  min-height: 24px;
  padding: 4px 9px;
  white-space: nowrap;
}

.request-history-row.waiting_user .request-history-status {
  background: rgba(98, 132, 83, 0.12);
  color: var(--success);
}

.request-history-row.closed .request-history-status {
  color: var(--muted);
}

.request-history-reply {
  background: rgba(98, 132, 83, 0.08);
  border: 1px solid rgba(98, 132, 83, 0.14);
  border-radius: 14px;
  display: grid;
  gap: 3px;
  grid-column: 1 / -1;
  padding: 10px;
}

.request-history-reply b {
  color: var(--success);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.2;
}

.chat-screen {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  min-height: 100dvh;
  overflow: hidden;
  padding-top: max(8px, env(safe-area-inset-top));
}

.chat-screen-content {
  flex: 1;
  gap: 8px;
  min-height: 0;
}

.client-chat-card {
  display: grid;
  flex: 1;
  gap: 10px;
  min-height: 0;
}

.client-chat-thread {
  align-content: end;
  background: transparent;
  border: 0;
  border-radius: 0;
  display: grid;
  gap: 10px;
  min-height: 240px;
  max-height: none;
  overflow-y: auto;
  padding: 0 0 8px;
  -webkit-overflow-scrolling: touch;
}

.client-chat-message {
  display: flex;
}

.client-chat-message.client {
  justify-content: flex-end;
}

.client-chat-message.admin {
  justify-content: flex-start;
}

.client-chat-bubble {
  border: 1px solid var(--line);
  border-radius: 17px;
  display: grid;
  gap: 4px;
  max-width: 82%;
  padding: 9px 11px;
}

.client-chat-message.client .client-chat-bubble {
  background: rgba(201, 31, 38, 0.1);
  border-color: rgba(201, 31, 38, 0.16);
}

.client-chat-message.admin .client-chat-bubble {
  background: rgba(98, 132, 83, 0.08);
  border-color: rgba(98, 132, 83, 0.14);
}

.client-chat-bubble span,
.client-chat-bubble time,
.client-chat-empty span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
  line-height: 1.25;
}

.client-chat-bubble p {
  color: var(--ink);
  font-size: 13px;
  font-weight: 640;
  line-height: 1.35;
  margin: 0;
  overflow-wrap: anywhere;
}

.client-chat-empty {
  background: var(--bg-soft);
  border-radius: 14px;
  display: grid;
  gap: 4px;
  padding: 14px;
}

.client-chat-empty strong {
  color: var(--ink);
  font-size: 15px;
  font-weight: 820;
  line-height: 1.2;
}

.client-chat-compose-card {
  align-items: end;
  background: rgba(255, 253, 248, 0.92);
  border: 1px solid rgba(229, 216, 202, 0.9);
  border-radius: 22px;
  box-shadow: 0 10px 30px rgba(36, 35, 33, 0.08);
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 6px;
  position: sticky;
  bottom: 0;
  z-index: 5;
}

.client-chat-compose-card .contact-lesson-context {
  grid-column: 1 / -1;
}

.client-chat-compose-card .client-chat-send {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  height: 40px;
  justify-content: center;
  max-height: 40px;
  min-height: 40px;
  padding: 0;
  width: 40px;
}

.client-chat-compose-card .client-chat-input {
  background: rgba(255, 253, 248, 0.92);
  border-radius: 17px;
  font-size: 14px;
  height: 42px;
  line-height: 1.28;
  max-height: 96px;
  min-height: 42px;
  overflow-y: auto;
  padding: 11px 12px;
  resize: none;
}

.send-plane-icon {
  display: block;
  height: 18px;
  width: 18px;
}

.send-plane-icon path {
  fill: currentColor;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.send-plane-icon path:first-child {
  stroke-width: 0;
}

.send-plane-icon path + path {
  fill: none;
}

.payment-history-card {
  display: grid;
  gap: 14px;
}

.payment-history-head {
  align-items: start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.payment-history-head .event-title {
  margin-top: -6px;
}

.payment-history-head > span {
  align-items: center;
  background: var(--bg-soft);
  border-radius: 999px;
  color: var(--brand-red);
  display: inline-flex;
  font-size: 13px;
  font-weight: 800;
  height: 30px;
  justify-content: center;
  min-width: 30px;
  padding: 0 10px;
}

.payment-history-list {
  border: 1px solid var(--line);
  border-radius: 18px;
  display: grid;
  overflow: hidden;
}

.payment-history-row {
  align-items: center;
  background: rgba(255, 253, 248, 0.86);
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 12px;
}

.payment-history-row:last-child {
  border-bottom: 0;
}

.payment-history-row span {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.payment-history-row strong {
  font-size: 15px;
  font-weight: 760;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.payment-history-row small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
}

.payment-history-row b {
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}

.payment-history-row.created b,
.payment-history-row.created small {
  color: var(--brand-red);
}

.payment-history-action {
  grid-column: 1 / -1;
  justify-self: stretch;
}

.lesson-history-card {
  display: grid;
  gap: 14px;
}

.lesson-history-head {
  align-items: start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.lesson-history-head .event-title {
  margin-top: -6px;
}

.lesson-history-head > span {
  align-items: center;
  background: var(--bg-soft);
  border-radius: 999px;
  color: var(--brand-red);
  display: inline-flex;
  font-size: 13px;
  font-weight: 800;
  height: 30px;
  justify-content: center;
  min-width: 30px;
  padding: 0 10px;
}

.lesson-history-list {
  border: 1px solid var(--line);
  border-radius: 18px;
  display: grid;
  overflow: hidden;
}

.lesson-history-row {
  align-items: center;
  background: rgba(255, 253, 248, 0.86);
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 12px;
  grid-template-columns: 54px minmax(0, 1fr);
  padding: 12px;
}

.lesson-history-row:last-child {
  border-bottom: 0;
}

.lesson-history-row time {
  align-items: center;
  background: rgba(201, 31, 38, 0.08);
  border-radius: 14px;
  color: var(--brand-red);
  display: grid;
  font-size: 20px;
  font-weight: 900;
  justify-items: center;
  line-height: 1;
  min-height: 52px;
  padding: 7px 4px;
  text-align: center;
}

.lesson-history-row time small {
  color: inherit;
  font-size: 10px;
  font-weight: 850;
  line-height: 1.1;
}

.lesson-history-row span {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.lesson-history-row strong {
  font-size: 15px;
  font-weight: 780;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lesson-history-row small,
.lesson-history-row em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.25;
}

.lesson-history-row.attended em,
.lesson-history-row.written_off em {
  color: var(--success);
  font-weight: 800;
}

.lesson-history-row.no_show em,
.lesson-history-row.cancelled_student em {
  color: var(--brand-red);
  font-weight: 800;
}

.lesson-history-contact {
  width: 100%;
}

.direct-chat-icon {
  align-items: center;
  background: var(--rose);
  border-radius: 18px;
  color: var(--brand-red);
  display: inline-flex;
  height: 56px;
  justify-content: center;
  width: 56px;
}

.direct-chat-icon svg {
  height: 28px;
  width: 28px;
}

.page-title {
  font-size: clamp(34px, 10vw, 46px);
  font-weight: 800;
  line-height: 1.05;
  margin: 0;
}

.page-lead {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.45;
  margin: 8px 0 0;
}

.topline {
  align-items: flex-start;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  padding: 8px 2px 4px;
}

.segmented {
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  display: flex;
  flex: 0 0 auto;
  overflow: hidden;
}

.segment {
  background: transparent;
  border: 0;
  color: var(--muted);
  cursor: pointer;
  font-weight: 650;
  min-width: 74px;
  padding: 12px 14px;
}

.segment.active {
  box-shadow: inset 0 0 0 1px var(--brand-red);
  color: var(--brand-red);
}

.week-strip {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(54px, 1fr));
  margin: 2px 0 10px;
}

.week-day {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 14px;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  min-height: 76px;
  padding: 8px 3px;
}

.week-day.active {
  background: var(--bg-soft);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--brand-red);
}

.week-name {
  font-size: 12px;
}

.week-number {
  color: var(--ink);
  font-size: 24px;
  font-weight: 750;
  margin-top: 5px;
}

.week-day.active .week-number {
  color: var(--brand-red);
}

.week-month {
  font-size: 12px;
  margin-top: 3px;
}

.schedule-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.schedule-list-title {
  margin: 4px 2px 0;
}

.schedule-item {
  align-items: center;
  display: grid;
  gap: 14px;
  grid-template-columns: 48px 1fr auto;
  padding: 18px;
}

.schedule-open-button {
  font-size: 13px;
  justify-self: end;
  min-height: 38px;
  padding: 7px 10px;
  width: auto;
}

.small-icon {
  align-items: center;
  background: var(--bg-tint);
  border-radius: 16px;
  color: var(--brand-red);
  display: flex;
  height: 48px;
  justify-content: center;
  width: 48px;
}

.small-icon svg {
  height: 25px;
  width: 25px;
}

.status {
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  justify-content: center;
  min-width: 92px;
  padding: 7px 10px;
}

.status-success {
  background: var(--success-bg);
  color: var(--success);
}

.status-action {
  background: var(--brand-red);
  color: white;
}

.lesson-hero {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.lesson-detail-title {
  font-size: clamp(34px, 10vw, 46px);
  font-weight: 800;
  line-height: 1.05;
  margin: 0;
}

.detail-grid {
  display: grid;
  gap: 12px;
}

.detail-row {
  align-items: center;
  color: var(--muted);
  display: flex;
  font-size: 16px;
  gap: 12px;
}

.detail-row svg {
  color: var(--brand-red);
  flex: 0 0 auto;
  height: 22px;
  width: 22px;
}

.action-row {
  display: grid;
  gap: 10px;
}

.prep-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
}

.prep-list li {
  align-items: center;
  color: var(--muted);
  display: flex;
  font-size: 16px;
  gap: 10px;
  list-style: none;
}

.prep-list li::before {
  color: var(--brand-red);
  content: "✓";
  font-size: 20px;
  font-weight: 800;
}

.teacher-note {
  align-items: center;
  display: grid;
  gap: 14px;
  grid-template-columns: 58px 1fr;
}

.studio-address-card {
  min-height: 152px;
}

.studio-address-card .event-copy {
  min-height: 45px;
}

.teacher-photo {
  background:
    radial-gradient(circle at 45% 30%, #d7d0c8 0 14%, transparent 15%),
    linear-gradient(145deg, #bdb5ad, #55504c);
  border-radius: 999px;
  height: 58px;
  width: 58px;
}

.trial-stepper {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr 1fr 1fr;
}

.step-pill {
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  display: flex;
  font-size: 13px;
  font-weight: 750;
  gap: 8px;
  justify-content: center;
  min-height: 44px;
  padding: 9px 8px;
}

.step-pill.active {
  background: var(--brand-red);
  border-color: var(--brand-red);
  color: white;
}

.step-number {
  align-items: center;
  background: rgba(255, 255, 255, 0.82);
  border-radius: 999px;
  color: var(--brand-red);
  display: flex;
  height: 24px;
  justify-content: center;
  width: 24px;
}

.step-pill:not(.active) .step-number {
  background: var(--bg-soft);
  color: var(--muted);
}

.control-group {
  display: grid;
  gap: 10px;
}

.control-label {
  font-size: 20px;
  font-weight: 760;
  margin: 2px 0 0;
}

.option-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, 1fr);
}

.option-card,
.chip {
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--ink);
  cursor: pointer;
  font-weight: 650;
  min-height: 58px;
  padding: 14px;
  text-align: left;
}

.option-card.selected,
.chip.selected {
  border-color: var(--brand-red);
  box-shadow: inset 0 0 0 1px var(--brand-red);
  color: var(--brand-red);
}

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

.chip {
  min-height: 44px;
  padding: 10px 14px;
  text-align: center;
}

.time-row {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(4, 1fr);
}

.time-chip {
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: 13px;
  color: var(--muted);
  cursor: pointer;
  min-height: 43px;
}

.time-chip.selected {
  border-color: var(--brand-red);
  color: var(--brand-red);
}

.text-field {
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--ink);
  min-height: 124px;
  outline: 0;
  padding: 16px;
  resize: vertical;
  width: 100%;
}

.text-input {
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--ink);
  min-height: 54px;
  outline: 0;
  padding: 0 16px;
  width: 100%;
}

.text-input:focus,
.text-field:focus {
  border-color: var(--brand-red);
  box-shadow: 0 0 0 3px rgba(201, 31, 38, 0.09);
}

.privacy-check {
  align-items: flex-start;
  color: var(--muted);
  display: flex;
  font-size: 14px;
  gap: 10px;
  line-height: 1.4;
}

.privacy-check input {
  appearance: none;
  align-items: center;
  background: rgba(255, 253, 248, 0.96);
  border: 1.5px solid var(--muted-light);
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 auto;
  height: 20px;
  justify-content: center;
  margin-top: 1px;
  position: relative;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
  width: 20px;
}

.privacy-check input::before {
  border-bottom: 2px solid #fff;
  border-left: 2px solid #fff;
  content: "";
  height: 5px;
  margin-top: -2px;
  transform: rotate(-45deg) scale(0);
  transform-origin: center;
  transition: transform 0.2s cubic-bezier(0.18, 0.9, 0.2, 1.35);
  width: 10px;
}

.privacy-check input:checked {
  animation: checkbox-pop 0.26s cubic-bezier(0.18, 0.9, 0.2, 1) both;
  background: var(--brand-red);
  border-color: var(--brand-red);
  box-shadow: 0 8px 18px rgba(201, 31, 38, 0.18);
}

.privacy-check input:checked::before {
  transform: rotate(-45deg) scale(1);
}

.privacy-check input:focus-visible {
  outline: 3px solid rgba(201, 31, 38, 0.16);
  outline-offset: 3px;
}

@keyframes checkbox-pop {
  0% {
    transform: scale(0.9);
  }

  68% {
    transform: scale(1.08);
  }

  100% {
    transform: scale(1);
  }
}

.legal-text {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.48;
}

.legal-text h2 {
  color: var(--ink);
  font-size: 18px;
  line-height: 1.25;
  margin: 22px 0 8px;
}

.legal-text h2:first-child {
  margin-top: 0;
}

.legal-text p {
  margin: 0;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.faq-item {
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  transition:
    border-color 0.24s ease,
    box-shadow 0.28s ease,
    transform 0.28s cubic-bezier(0.2, 0.72, 0.2, 1);
}

.faq-item.open {
  border-color: rgba(201, 31, 38, 0.24);
  box-shadow: 0 10px 26px rgba(36, 35, 33, 0.07);
}

.faq-question {
  align-items: center;
  background: transparent;
  border: 0;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  font-weight: 750;
  justify-content: space-between;
  padding: 16px;
  text-align: left;
  width: 100%;
}

.faq-toggle {
  align-items: center;
  color: var(--brand-red);
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 24px;
  height: 28px;
  justify-content: center;
  line-height: 1;
  margin-left: 14px;
  transition: transform 0.28s cubic-bezier(0.18, 0.9, 0.2, 1.2);
  width: 28px;
}

.faq-item.open .faq-toggle {
  transform: rotate(180deg);
}

.faq-answer {
  color: var(--muted);
  display: grid;
  font-size: 15px;
  grid-template-rows: 0fr;
  line-height: 1.45;
  opacity: 0;
  padding: 0 16px;
  transform: translateY(-4px);
  transition:
    grid-template-rows 0.34s cubic-bezier(0.2, 0.72, 0.2, 1),
    opacity 0.22s ease,
    padding 0.34s cubic-bezier(0.2, 0.72, 0.2, 1),
    transform 0.34s cubic-bezier(0.2, 0.72, 0.2, 1);
}

.faq-answer-inner {
  min-height: 0;
  overflow: hidden;
}

.faq-item.open .faq-answer {
  grid-template-rows: 1fr;
  opacity: 1;
  padding-bottom: 16px;
  transform: translateY(0);
}

.bottom-nav {
  background: rgba(255, 253, 248, 0.98);
  border-top: 1px solid var(--line);
  bottom: 0;
  box-shadow: 0 -10px 24px rgba(36, 35, 33, 0.05);
  display: grid;
  grid-template-columns: repeat(var(--nav-item-count, 4), 1fr);
  height: calc(var(--nav-height) + env(safe-area-inset-bottom));
  left: 50%;
  max-width: 480px;
  overflow: hidden;
  padding-bottom: env(safe-area-inset-bottom);
  position: fixed;
  transform: translateX(-50%);
  width: 100%;
  z-index: 20;
}

.nav-indicator {
  height: 4px;
  left: 0;
  pointer-events: none;
  position: absolute;
  top: 0;
  transform: translateX(calc(var(--nav-active-index, 0) * 100%));
  transition: transform 0.28s cubic-bezier(0.2, 0.72, 0.2, 1);
  width: calc(100% / var(--nav-item-count, 4));
  z-index: 0;
}

.nav-indicator::after {
  background: var(--brand-red);
  border-radius: 999px;
  content: "";
  display: block;
  height: 100%;
  margin: 0 auto;
  width: 52%;
}

.nav-button {
  align-items: center;
  background: transparent;
  border: 0;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  font-size: 12px;
  font-weight: 500;
  gap: 6px;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.nav-button.active {
  color: var(--brand-red);
}

.nav-button.active::before {
  display: none;
}

.nav-button .stitch-icon {
  font-size: 29px;
}

.nav-button .nav-stitch-icon .stitch-cell {
  height: 10.9%;
  width: 10.9%;
}

.toast {
  align-items: center;
  background:
    radial-gradient(circle at 88% 10%, rgba(201, 31, 38, 0.1), transparent 34%),
    rgba(255, 253, 248, 0.98);
  border: 1px solid rgba(201, 31, 38, 0.14);
  border-radius: 30px;
  box-shadow: 0 28px 72px rgba(58, 48, 36, 0.28);
  color: var(--ink);
  display: grid;
  gap: 14px;
  grid-template-columns: auto minmax(0, 1fr);
  left: 50%;
  line-height: 1.18;
  max-width: min(360px, calc(100vw - 40px));
  min-width: min(320px, calc(100vw - 40px));
  opacity: 0;
  padding: 18px 20px;
  pointer-events: none;
  position: fixed;
  text-align: left;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.92);
  transform-origin: center;
  transition:
    opacity 0.24s ease,
    transform 0.34s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 90;
}

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

.toast-icon {
  align-items: center;
  background: rgba(201, 31, 38, 0.08);
  border-radius: 22px;
  display: inline-flex;
  height: 58px;
  justify-content: center;
  width: 58px;
}

.toast-message {
  display: block;
  font-size: 20px;
  font-weight: 820;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.toast-status-icon {
  display: block;
  height: 46px;
  overflow: visible;
  width: 46px;
}

.toast-ring,
.toast-check-path,
.toast-cross-path {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.toast-ring {
  opacity: 0.18;
  stroke-width: 4;
}

.toast-check-path,
.toast-cross-path {
  stroke-width: 5;
}

.toast-check-path {
  stroke-dasharray: 42;
  stroke-dashoffset: 42;
}

.toast-cross-path {
  stroke-dasharray: 26;
  stroke-dashoffset: 26;
}

.toast.visible .toast-check-path {
  animation: toast-draw 0.42s 0.12s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.toast.visible .toast-cross-path-a {
  animation: toast-draw 0.26s 0.12s ease-out forwards;
}

.toast.visible .toast-cross-path-b {
  animation: toast-draw 0.26s 0.26s ease-out forwards;
}

.toast-success {
  color: #2d7d57;
}

.toast-error {
  color: var(--brand-red);
}

.toast-info {
  color: var(--brand-red);
}

.toast-info-dot {
  background: currentColor;
  border-radius: 999px;
  box-shadow: 0 0 0 9px rgba(201, 31, 38, 0.12);
  display: block;
  height: 14px;
  width: 14px;
}

.toast-info .toast-message,
.toast-error .toast-message,
.toast-success .toast-message {
  color: var(--ink);
}

@keyframes toast-draw {
  to {
    stroke-dashoffset: 0;
  }
}

@media (max-width: 380px) {
  .screen {
    padding-left: 12px;
    padding-right: 12px;
  }

  .trial-empty-actions {
    grid-template-columns: 1fr;
  }

  .quick-grid,
  .option-grid {
    grid-template-columns: 1fr;
  }

  .event-layout,
  .schedule-item {
    grid-template-columns: 1fr;
  }

  .event-image {
    min-height: 140px;
  }
}

@media (max-width: 430px) {
  .certificate-recipient-grid {
    grid-template-columns: 1fr;
  }

  .topline {
    flex-direction: column;
  }

  .segmented {
    width: 100%;
  }

  .segment {
    flex: 1;
  }
}

/* Visual pass v2: bring the web app closer to the Figma mobile concept. */
:root {
  --bg-page: #f0e8dc;
  --bg-surface: #fffdf7;
  --bg-soft: #f7efe4;
  --bg-tint: #f6dfdd;
  --brand-red: #c91f26;
  --ink: #252321;
  --muted: #746f68;
  --line: #e2d4c4;
  --shadow: 0 2px 8px rgba(36, 35, 33, 0.05), 0 14px 34px rgba(36, 35, 33, 0.1);
  --radius-xl: 24px;
  --nav-height: 76px;
}

body {
  background:
    radial-gradient(circle at 50% -12%, rgba(255, 253, 248, 0.92), transparent 34%),
    linear-gradient(180deg, #f5eee4 0%, #ede4d8 100%);
}

.app-shell {
  max-width: 430px;
}

.screen {
  padding: max(12px, env(safe-area-inset-top)) 16px calc(var(--nav-height) + 22px);
}

.screen-content {
  gap: 12px;
}

.header {
  padding: 8px 0 14px;
}

.logo-row {
  display: flex;
  justify-content: center;
}

.brand-logo {
  display: block;
  justify-self: center;
  max-width: 238px;
  width: 62vw;
}

.app-header-image {
  max-width: 410px;
  width: min(94vw, 410px);
}

.logo,
.logo-subtitle {
  display: none;
}

.card {
  border-color: rgba(226, 212, 196, 0.8);
}

.card-pad {
  padding: 18px;
}

.page-title {
  font-size: 32px;
  line-height: 1.05;
  letter-spacing: 0;
}

.page-lead {
  font-size: 16px;
  line-height: 1.42;
}

.hero-title,
.lesson-detail-title {
  font-size: 26px;
}

.hero-text {
  font-size: 15px;
}

.app-loading-panel {
  align-items: center;
  display: grid;
  gap: 12px;
  justify-items: center;
  min-height: 220px;
  text-align: center;
}

.app-loading-spinner {
  animation: app-loading-spin 0.8s linear infinite;
  border: 3px solid rgba(201, 31, 38, 0.18);
  border-top-color: var(--brand-red);
  border-radius: 999px;
  height: 38px;
  width: 38px;
}

@keyframes app-loading-spin {
  to {
    transform: rotate(360deg);
  }
}

.section-kicker {
  font-size: 11px;
  letter-spacing: 1.3px;
  margin-bottom: 10px;
}

.btn {
  border-radius: 15px;
  font-size: 15px;
  min-height: 48px;
  padding: 11px 16px;
}

.quick-card {
  border-radius: 20px;
  min-height: 112px;
  padding: 16px;
}

.small-icon {
  height: 44px;
  width: 44px;
}

.inline-icon {
  border-radius: 14px;
  height: 38px;
  width: 38px;
}

.small-icon .stitch-icon,
.inline-icon .stitch-icon,
.detail-row .stitch-icon,
.direct-chat-icon .stitch-icon {
  font-size: 24px;
}

.inline-icon .stitch-icon {
  font-size: 22px;
}

.quick-title {
  font-size: 15px;
}

.quick-subtitle,
.event-copy,
.lesson-meta {
  font-size: 13px;
}

.lesson-title {
  font-size: 18px;
}

.date-tile {
  border-radius: 14px;
  height: 78px;
  width: 64px;
}

.date-day {
  font-size: 27px;
}

.bottom-nav {
  height: calc(var(--nav-height) + env(safe-area-inset-bottom));
  max-width: 430px;
}

.nav-button {
  font-size: 10px;
}

.nav-button .stitch-icon {
  font-size: 27px;
}

.nav-button .nav-stitch-icon {
  font-size: 27px;
}

.onboarding-screen {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  overflow: hidden;
  padding: max(10px, env(safe-area-inset-top)) 16px max(12px, env(safe-area-inset-bottom));
}

.onboarding-screen .header {
  flex: 0 0 auto;
  padding-bottom: 8px;
}

.onboarding-screen .brand-logo {
  max-width: 170px;
}

.onboarding-screen .app-header-image {
  max-width: 330px;
  width: min(88vw, 330px);
}

.onboarding-screen .screen-content {
  flex: 1 1 auto;
  gap: 8px;
  justify-content: space-between;
  min-height: 0;
  overflow: hidden;
}

.onboarding-screen form.screen-content {
  gap: 6px;
  justify-content: flex-start;
}

.onboarding-intro-screen .screen-content {
  gap: 12px;
  justify-content: flex-start;
}

.onboarding-screen .page-title {
  font-size: clamp(24px, 6.5vw, 31px);
  line-height: 1.01;
}

.onboarding-screen .page-lead {
  font-size: 13.5px;
  line-height: 1.24;
  margin-top: 4px;
}

.onboarding-progress {
  --progress-from-step: var(--progress-step);
  background: rgba(255, 253, 248, 0.74);
  border: 1px solid rgba(229, 216, 202, 0.86);
  border-radius: 18px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  isolation: isolate;
  padding: 4px;
  position: relative;
  --progress-step: 1;
}

.progress-fill {
  background: var(--brand-red);
  border-radius: 14px;
  bottom: 4px;
  box-shadow: inset 0 -10px 20px rgba(173, 23, 31, 0.18);
  left: 4px;
  position: absolute;
  top: 4px;
  transition:
    width 0.46s cubic-bezier(0.18, 0.9, 0.22, 1),
    border-radius 0.46s cubic-bezier(0.18, 0.9, 0.22, 1);
  width: calc((100% - 8px) * var(--progress-step) / 3);
  z-index: 0;
}

.onboarding-progress.animating .progress-fill {
  animation: progress-fill-melt 0.56s cubic-bezier(0.18, 0.9, 0.2, 1) both;
}

@keyframes progress-fill-melt {
  0% {
    border-radius: 14px;
    filter: saturate(1);
    width: calc((100% - 8px) * var(--progress-from-step) / 3);
  }

  42% {
    border-radius: 18px;
    filter: saturate(1.08);
  }

  100% {
    border-radius: 14px;
    filter: saturate(1);
    width: calc((100% - 8px) * var(--progress-step) / 3);
  }
}

.progress-step {
  appearance: none;
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 14px;
  color: var(--muted);
  cursor: pointer;
  display: grid;
  gap: 2px;
  justify-items: center;
  min-height: 42px;
  padding: 5px 4px;
  position: relative;
  transition:
    color 0.22s ease,
    transform 0.22s ease;
  z-index: 1;
}

.progress-step b {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  display: flex;
  font-size: 12px;
  height: 20px;
  justify-content: center;
  transition:
    background 0.22s ease,
    border-color 0.22s ease,
    color 0.22s ease;
  width: 20px;
}

.progress-step small {
  font-size: 10px;
  font-weight: 700;
  line-height: 1.1;
}

.progress-step.active {
  color: #fff;
}

.progress-step.active b {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.72);
}

.progress-step.current {
  transform: translateY(-1px);
}

.onboarding-progress.animating .progress-step.current b {
  animation: progress-dot-pop 0.42s cubic-bezier(0.18, 0.9, 0.2, 1) both;
}

@keyframes progress-dot-pop {
  0% {
    transform: scale(0.86);
  }

  68% {
    transform: scale(1.08);
  }

  100% {
    transform: scale(1);
  }
}

.onboarding-intro-card {
  background:
    radial-gradient(circle at 88% 10%, rgba(201, 31, 38, 0.1), transparent 34%),
    linear-gradient(180deg, rgba(255, 253, 248, 0.99), rgba(255, 253, 248, 0.9));
  display: grid;
  gap: 9px;
  min-height: 0;
  padding: 16px;
}

.intro-icon {
  align-items: center;
  background: var(--bg-tint);
  border-radius: 18px;
  color: var(--brand-red);
  display: flex;
  height: 48px;
  justify-content: center;
  width: 48px;
}

.intro-icon svg {
  height: 24px;
  width: 24px;
}

.intro-list {
  display: grid;
  padding: 6px 14px;
}

.intro-row {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: 40px 1fr;
  min-height: 58px;
}

.intro-row + .intro-row {
  border-top: 1px solid var(--line);
}

.intro-row strong {
  display: block;
  font-size: 15px;
  font-weight: 780;
  line-height: 1.18;
}

.intro-row small {
  color: var(--muted);
  display: block;
  font-size: 12.5px;
  line-height: 1.22;
  margin-top: 2px;
}

.intro-row .small-icon {
  height: 38px;
  width: 38px;
}

.onboarding-actions {
  display: grid;
  gap: 7px;
}

.onboarding-intro-screen .onboarding-actions {
  margin-top: auto;
}

.onboarding-actions .btn,
.onboarding-screen form > .btn {
  min-height: 44px;
  padding: 9px 14px;
}

.onboarding-hero {
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.98), rgba(255, 253, 248, 0.9)),
    radial-gradient(circle at 100% 0, rgba(201, 31, 38, 0.08), transparent 32%);
  min-height: 0;
  padding: 12px 14px;
}

.onboarding-hero .page-title {
  max-width: 320px;
}

.onboarding-summary {
  align-items: center;
  color: var(--brand-red);
  display: flex;
  font-size: 12.5px;
  font-weight: 650;
  gap: 8px;
  line-height: 1.25;
  margin-top: 9px;
}

.onboarding-hero .onboarding-summary {
  display: none;
}

.form-card {
  display: grid;
  gap: 5px;
  padding: 12px 14px;
}

.control-group {
  gap: 6px;
}

.control-label {
  font-size: 13px;
  line-height: 1.2;
}

.text-input {
  background: rgba(255, 253, 248, 0.88);
  border-radius: 13px;
  font-size: 13.5px;
  min-height: 36px;
  padding: 8px 11px;
}

.chip-row {
  gap: 6px;
}

.chip,
.option-card {
  border-radius: 13px;
  font-size: 13px;
  min-height: 36px;
  padding: 8px 10px;
}

.compact-control-group {
  display: grid;
  gap: 5px;
}

.compact-chip-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.compact-chip-row .chip {
  justify-content: center;
  min-width: 0;
  text-align: center;
  white-space: nowrap;
}

.privacy-card {
  display: grid;
  gap: 6px;
  padding: 11px 13px;
}

.privacy-card .btn {
  justify-content: flex-start;
  min-height: auto;
  padding: 0;
}

.privacy-check {
  font-size: 11px;
  line-height: 1.2;
}

.privacy-check input {
  height: 16px;
  width: 16px;
}

.privacy-check input::before {
  height: 4px;
  width: 8px;
}

.week-strip {
  gap: 5px;
}

.week-day {
  min-height: 66px;
}

.week-number {
  font-size: 21px;
}

.schedule-item {
  grid-template-columns: 44px 1fr;
}

.schedule-open-button {
  grid-column: 2;
  justify-self: start;
  margin-top: 6px;
}

.topline {
  gap: 10px;
}

.segmented {
  border-radius: 14px;
}

.segment {
  min-width: 0;
  padding: 10px 12px;
}

.start-screen {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  overflow: hidden;
  padding: max(12px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
}

.start-screen .header {
  flex: 0 0 auto;
  padding-bottom: 12px;
}

.start-screen .app-header {
  padding-top: 0;
}

.start-screen .app-header-image {
  max-width: 360px;
  width: min(86vw, 360px);
}

.start-screen .brand-logo {
  max-width: 206px;
}

.start-content {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  gap: 14px;
  justify-content: center;
  min-height: 0;
}

.start-welcome-card {
  display: grid;
  gap: 15px;
  padding: 14px;
}

.start-copy {
  padding: 0 4px 4px;
}

.start-kicker {
  color: var(--brand-red);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.1px;
  line-height: 1.25;
  margin: 0 0 8px;
  text-transform: uppercase;
}

.start-title {
  color: var(--ink);
  font-size: clamp(31px, 8.6vw, 39px);
  font-weight: 820;
  line-height: 1.02;
  margin: 0;
  max-width: 390px;
}

.start-lead {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.34;
  margin: 10px 0 0;
}

.start-image {
  background:
    linear-gradient(180deg, rgba(36, 35, 33, 0.02), rgba(36, 35, 33, 0.14)),
    url("/assets/studio-hero.png") center / cover;
  aspect-ratio: 16 / 10;
  border: 1px solid rgba(226, 212, 196, 0.8);
  border-radius: 22px;
  min-height: 0;
}

.feature-list {
  display: grid;
  gap: 0;
  padding: 14px 16px;
}

.feature-row {
  align-items: center;
  display: grid;
  gap: 14px;
  grid-template-columns: 48px 1fr;
  min-height: 74px;
}

.feature-row + .feature-row {
  border-top: 1px solid var(--line);
}

.feature-row strong,
.profile-row strong {
  display: block;
  font-size: 17px;
  font-weight: 760;
  line-height: 1.18;
}

.feature-row small,
.profile-row small {
  color: var(--muted);
  display: block;
  font-size: 14px;
  line-height: 1.25;
  margin-top: 5px;
}

.start-note p:last-child {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.4;
  margin: 0;
}

.start-actions {
  display: grid;
  gap: 8px;
}

.start-actions .btn {
  min-height: 52px;
}

.demo-note {
  color: var(--muted-light);
  font-size: 13px;
  line-height: 1.35;
  margin: -2px 0 0;
  text-align: center;
}

.profile-identity {
  align-items: center;
  display: grid;
  gap: 16px;
  grid-template-columns: 72px 1fr;
}

.avatar-large {
  height: 72px;
  width: 72px;
}

.membership-card {
  display: grid;
  gap: 12px;
}

.membership-count {
  align-items: baseline;
  display: flex;
  gap: 8px;
}

.membership-count strong {
  color: var(--brand-red);
  font-size: 40px;
  line-height: 1;
}

.membership-count span {
  color: var(--ink);
  font-size: 18px;
  font-weight: 720;
}

.membership-progress {
  display: flex;
  gap: 7px;
  margin: 2px 0 6px;
}

.membership-progress span,
.membership-progress i {
  border-radius: 999px;
  display: block;
  height: 8px;
  width: 100%;
}

.membership-progress span {
  background: var(--brand-red);
}

.membership-progress i {
  background: #dacfc2;
}

.profile-list {
  display: grid;
}

.profile-row {
  align-items: center;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  cursor: pointer;
  display: grid;
  gap: 14px;
  grid-template-columns: 48px 1fr 20px;
  padding: 16px;
  text-align: left;
}

.profile-row:last-child {
  border-bottom: 0;
}

.profile-row .chevron {
  align-self: center;
  justify-self: end;
}

.screen-transition {
  animation: screen-slide-in 0.24s cubic-bezier(0.2, 0.72, 0.2, 1) both;
}

@keyframes screen-slide-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.992);
  }

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

.nav-button {
  transition:
    color 0.18s ease,
    transform 0.18s ease;
}

.nav-button > .stitch-icon,
.nav-button > span {
  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
}

.nav-button.active > .stitch-icon {
  transform: translateY(-1px) scale(1.06);
}

.avatar {
  overflow: hidden;
}

.avatar img {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.avatar svg {
  height: 30px;
  width: 30px;
}

.date-tile {
  gap: 5px;
  min-width: 68px;
}

.date-caption {
  font-size: 12px;
  font-weight: 760;
  line-height: 1;
  white-space: nowrap;
}

.home-next-card .lesson-mini {
  align-items: start;
}

.home-next-card .date-tile.active {
  align-self: start;
  height: 67px;
  margin-bottom: 11px;
}

.home-next-card .lesson-summary {
  align-self: start;
  padding-top: 1px;
}

.home-next-card .state-note {
  margin-bottom: 10px;
}

.schedule-next-card .date-tile {
  height: 66px;
  margin-bottom: 12px;
}

.schedule-next-card .lesson-title {
  line-height: 1.12;
  margin: -1px 4px -1px 0;
  padding-bottom: 1px;
}

.state-note {
  border-radius: 14px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  padding: 11px 12px;
}

.success-note {
  background: var(--success-bg);
  color: var(--success);
}

.hint-row.confirmed {
  color: var(--success);
}

.hint-row.confirmed .inline-icon {
  background: var(--success-bg);
  color: var(--success);
  font-size: 22px;
  font-weight: 820;
}

.btn-confirmed {
  background: var(--success-bg);
  border-color: #b7c9a9;
  color: var(--success);
}

.btn:disabled {
  cursor: default;
  opacity: 0.82;
}

.empty-next-card {
  display: grid;
  gap: 12px;
}

.trial-empty-state {
  align-items: stretch;
}

.trial-empty-actions {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.empty-state-card {
  box-shadow: none;
}

.trial-card {
  display: grid;
  gap: 10px;
}

.trial-card .event-title {
  margin: 0;
}

.trial-filter-block {
  display: grid;
  gap: 7px;
}

.trial-filter-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.trial-option-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.trial-option-grid .option-card {
  display: grid;
  gap: 3px;
  min-height: 54px;
}

.trial-option-grid .option-card strong {
  font-size: 14px;
  line-height: 1.05;
}

.trial-option-grid .option-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
}

.trial-teacher-rail {
  display: flex;
  gap: 8px;
  margin: 0 -2px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  padding: 2px 2px 6px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y;
}

.trial-teacher-rail::-webkit-scrollbar {
  display: none;
}

.trial-teacher {
  background: rgba(255, 253, 248, 0.82);
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--ink);
  cursor: pointer;
  display: grid;
  flex: 0 0 148px;
  gap: 3px;
  min-height: 58px;
  padding: 9px 10px;
  text-align: left;
}

.trial-teacher.selected {
  border-color: var(--brand-red);
  box-shadow: inset 0 0 0 1px var(--brand-red);
  color: var(--brand-red);
}

.trial-teacher strong {
  color: inherit;
  font-size: 13px;
  font-weight: 860;
  line-height: 1.1;
}

.trial-teacher small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.trial-day-rail {
  display: flex;
  gap: 8px;
  margin: 2px -2px 0;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  padding: 2px 2px 6px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y;
}

.trial-day-rail::-webkit-scrollbar {
  display: none;
}

.trial-day {
  background: rgba(255, 253, 248, 0.82);
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--ink);
  cursor: pointer;
  display: grid;
  flex: 0 0 72px;
  gap: 2px;
  min-height: 72px;
  padding: 8px 5px;
  place-items: center;
}

.trial-day.selected {
  border-color: var(--brand-red);
  box-shadow: inset 0 0 0 1px var(--brand-red);
  color: var(--brand-red);
}

.trial-day span {
  color: inherit;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.trial-day strong {
  color: inherit;
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
}

.trial-day small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 760;
  line-height: 1;
}

.trial-slot-summary {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.trial-slot-summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 780;
}

.trial-slot-summary strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 860;
}

.date-choice-row {
  display: grid;
  gap: 7px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.date-choice {
  background: rgba(255, 253, 248, 0.78);
  border: 1px solid var(--line);
  border-radius: 15px;
  color: var(--ink);
  cursor: pointer;
  font-size: 13px;
  font-weight: 760;
  min-height: 42px;
  padding: 9px 10px;
  text-align: center;
}

.date-choice.selected {
  border-color: var(--brand-red);
  box-shadow: inset 0 0 0 1px var(--brand-red);
  color: var(--brand-red);
}

.trial-slot-list {
  display: grid;
  gap: 10px;
}

.trial-slot {
  align-items: center;
  background: rgba(255, 253, 248, 0.82);
  border: 1px solid var(--line);
  border-radius: 20px;
  color: var(--ink);
  cursor: pointer;
  display: grid;
  gap: 12px;
  grid-template-columns: 96px 1fr;
  min-height: 74px;
  padding: 10px;
  text-align: left;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.trial-slot.selected {
  border-color: var(--brand-red);
  box-shadow: inset 0 0 0 1px var(--brand-red), 0 14px 28px rgba(201, 31, 38, 0.08);
}

.trial-slot:active {
  transform: scale(0.99);
}

.compact-date-tile {
  border-radius: 18px;
  height: 72px;
  width: 72px;
}

.trial-slot-time {
  align-items: center;
  background: rgba(201, 31, 38, 0.07);
  border-radius: 14px;
  color: var(--brand-red);
  display: inline-flex;
  font-size: 15px;
  font-weight: 880;
  justify-content: center;
  min-height: 48px;
  padding: 7px 8px;
  text-align: center;
}

.trial-slot-body {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.trial-slot-body strong {
  color: var(--ink);
  font-size: 18px;
  font-weight: 860;
}

.trial-slot-body small {
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.2;
}

.prep-card {
  overflow: visible;
}

.prep-card .event-title {
  margin-bottom: 14px;
}

.prep-list {
  gap: 12px;
}

.prep-list li {
  align-items: flex-start;
  line-height: 1.35;
}

.lesson-info-card {
  align-items: start;
  display: grid;
  gap: 14px;
  grid-template-columns: 48px 1fr;
}

.back-link {
  align-self: flex-start;
  background: transparent;
  border: 0;
  color: var(--brand-red);
  cursor: pointer;
  font-size: 15px;
  font-weight: 760;
  padding: 4px 2px;
}

.purchase-grid {
  display: grid;
  gap: 10px;
}

.purchase-card {
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  color: var(--ink);
  cursor: pointer;
  display: grid;
  gap: 4px;
  min-height: 82px;
  padding: 18px;
  text-align: left;
}

.purchase-card strong {
  font-size: 20px;
  font-weight: 800;
}

.purchase-card span {
  color: var(--muted);
  font-size: 14px;
}

.packages-screen .screen-content {
  gap: 14px;
}

.app-header {
  background: transparent;
}

.app-header-image {
  background: transparent;
  max-width: 430px;
  width: min(100%, 430px);
}

.packages-hero {
  background: rgba(255, 253, 248, 0.98);
  display: grid;
  gap: 18px;
  padding: 22px;
}

.packages-hero-copy {
  display: grid;
  gap: 8px;
}

.packages-hero .page-title {
  max-width: 330px;
}

.packages-current {
  align-items: end;
  border-top: 1px solid rgba(201, 31, 38, 0.18);
  color: var(--muted);
  display: flex;
  gap: 10px;
  padding-top: 16px;
}

.packages-current-number {
  color: var(--brand-red);
  font-size: 52px;
  font-weight: 850;
  line-height: 0.86;
}

.package-grid {
  display: grid;
  gap: 12px;
}

.package-family {
  background: rgba(255, 253, 248, 0.96);
  border: 1px solid rgba(226, 212, 196, 0.92);
  border-radius: 24px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 12px;
  padding: 16px;
}

.package-family-cover {
  display: grid;
  gap: 10px;
}

.package-family-label {
  background: var(--brand-red);
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 999px;
  color: white;
  display: inline-flex;
  font-size: 12px;
  font-weight: 850;
  justify-self: start;
  letter-spacing: 0.5px;
  line-height: 1;
  padding: 9px 12px;
  text-transform: uppercase;
}

.package-section-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.package-section-tags span {
  background: rgba(201, 31, 38, 0.08);
  border: 1px solid rgba(201, 31, 38, 0.16);
  border-radius: 999px;
  color: var(--brand-red);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.1;
  padding: 6px 8px;
}

.package-list {
  display: grid;
  gap: 10px;
}

.membership-plan-card {
  background: #fffdf8;
  border: 1px solid transparent;
  border-radius: 20px;
  box-shadow: 0 14px 30px rgba(36, 35, 33, 0.07);
  display: grid;
  gap: 10px;
  isolation: isolate;
  padding: 14px;
  position: relative;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.membership-plan-card.popular {
  margin-bottom: 32px;
  box-shadow:
    0 0 0 1px rgba(201, 31, 38, 0.16),
    0 0 28px 8px rgba(201, 31, 38, 0.095),
    0 22px 46px rgba(201, 31, 38, 0.13),
    0 30px 62px rgba(201, 31, 38, 0.07);
}

.membership-plan-card.popular::before {
  content: none;
}

.membership-plan-card.popular::after {
  background: linear-gradient(180deg, rgba(201, 31, 38, 0.13), rgba(201, 31, 38, 0.09));
  border-radius: 0 0 18px 18px;
  box-shadow: 0 9px 17px rgba(201, 31, 38, 0.085);
  content: "";
  display: block;
  height: 30px;
  left: 0;
  pointer-events: none;
  position: absolute;
  right: 0;
  top: calc(100% - 1px);
  z-index: 0;
}

.membership-plan-card.selected {
  border-color: transparent;
  box-shadow:
    0 0 0 1px rgba(201, 31, 38, 0.14),
    0 0 22px 7px rgba(201, 31, 38, 0.08),
    0 18px 38px rgba(201, 31, 38, 0.12);
}

.membership-plan-card.popular.selected {
  box-shadow:
    0 0 0 1px rgba(201, 31, 38, 0.16),
    0 0 28px 8px rgba(201, 31, 38, 0.095),
    0 22px 46px rgba(201, 31, 38, 0.13),
    0 30px 62px rgba(201, 31, 38, 0.07);
}

.membership-plan-ribbon-label {
  color: rgba(201, 31, 38, 0.75);
  font-size: 10px;
  font-weight: 850;
  left: 0;
  letter-spacing: 0.4px;
  line-height: 1;
  pointer-events: none;
  position: absolute;
  right: 0;
  text-align: center;
  text-transform: uppercase;
  top: calc(100% + 8px);
  z-index: 3;
}

.membership-plan-card.popular.selected .membership-plan-ribbon-label {
  color: rgba(201, 31, 38, 0.75);
}

.membership-plan-select {
  appearance: none;
  background: transparent;
  border: 0;
  color: inherit;
  cursor: pointer;
  display: grid;
  gap: 10px;
  padding: 0;
  position: relative;
  text-align: left;
  width: 100%;
  z-index: 2;
}

.membership-plan-main {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.membership-plan-eyebrow {
  color: var(--brand-red);
  display: block;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.membership-plan-main strong {
  display: block;
  font-size: 28px;
  font-weight: 850;
  line-height: 1;
}

.membership-plan-price {
  background: rgba(201, 31, 38, 0.08);
  border-radius: 16px;
  color: var(--brand-red);
  flex: 0 0 auto;
  font-size: 19px;
  font-weight: 850;
  padding: 10px 12px;
}

.membership-plan-action {
  appearance: none;
  background: transparent;
  border: 1px solid rgba(201, 31, 38, 0.76);
  border-radius: 16px;
  color: var(--brand-red);
  cursor: pointer;
  font: inherit;
  font-size: 15px;
  font-weight: 850;
  min-height: 46px;
  padding: 10px 14px;
  position: relative;
  text-align: center;
  z-index: 2;
}

.membership-plan-action.selected {
  background: var(--brand-red);
  color: white;
}

.membership-plan-card.popular .membership-plan-action {
  background: var(--brand-red);
  color: white;
}

.package-card {
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.98), rgba(255, 253, 248, 0.92));
  border: 1px solid rgba(226, 212, 196, 0.92);
  border-radius: 24px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 12px;
  overflow: hidden;
  padding: 16px;
  transition:
    border-color 0.22s ease,
    box-shadow 0.22s ease,
    transform 0.22s ease;
}

.package-card.selected {
  border-color: var(--brand-red);
  box-shadow: 0 2px 8px rgba(201, 31, 38, 0.08), 0 18px 42px rgba(36, 35, 33, 0.13);
}

.package-card.featured {
  background:
    linear-gradient(135deg, #bf1c24 0%, #d3232b 54%, #ab171f 100%);
  border-color: rgba(173, 23, 31, 0.9);
  color: white;
}

.package-select {
  appearance: none;
  background: transparent;
  border: 0;
  color: inherit;
  cursor: pointer;
  display: grid;
  gap: 12px;
  padding: 0;
  text-align: left;
  width: 100%;
}

.package-topline,
.package-main {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.package-eyebrow {
  color: var(--brand-red);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

.package-card.featured .package-eyebrow {
  color: rgba(255, 255, 255, 0.82);
}

.package-badge {
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  color: white;
  font-size: 11px;
  font-weight: 850;
  padding: 5px 9px;
  text-transform: uppercase;
}

.package-main strong {
  display: block;
  font-size: 30px;
  font-weight: 850;
  line-height: 1;
}

.package-main small {
  color: var(--muted);
  display: block;
  font-size: 13px;
  font-weight: 650;
  margin-top: 6px;
}

.package-card.featured .package-main small {
  color: rgba(255, 255, 255, 0.72);
}

.package-price {
  background: rgba(201, 31, 38, 0.08);
  border-radius: 16px;
  color: var(--brand-red);
  flex: 0 0 auto;
  font-size: 19px;
  font-weight: 850;
  padding: 10px 12px;
}

.package-card.featured .package-price {
  background: rgba(255, 255, 255, 0.16);
  color: white;
}

.package-fit {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.35;
}

.package-card.featured .package-fit {
  color: rgba(255, 255, 255, 0.82);
}

.package-includes {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.package-includes span {
  background: rgba(201, 31, 38, 0.08);
  border-radius: 999px;
  color: var(--brand-red);
  font-size: 12px;
  font-weight: 760;
  padding: 7px 9px;
}

.package-card.featured .package-includes span {
  background: rgba(255, 255, 255, 0.14);
  color: white;
}

.package-buy-button {
  width: 100%;
}

.package-card.featured .btn-primary,
.package-card.featured .btn-secondary {
  background: white;
  border-color: white;
  color: var(--brand-red);
}

.package-summary-card {
  align-items: start;
  display: grid;
  gap: 14px;
  grid-template-columns: 48px 1fr;
}

@media (hover: hover) {
  .package-card:hover {
    transform: translateY(-2px);
  }

  .membership-plan-card:hover {
    border-color: rgba(201, 31, 38, 0.24);
    transform: translateY(-1px);
  }
}

@media (max-width: 380px) {
  .packages-hero,
  .package-family,
  .package-card {
    border-radius: 20px;
  }

  .packages-hero,
  .package-card {
    padding: 14px;
  }

  .package-family-cover,
  .membership-plan-card {
    padding: 14px;
  }

  .package-main,
  .membership-plan-main {
    align-items: flex-start;
    flex-direction: column;
  }

  .package-price,
  .membership-plan-price {
    align-self: flex-start;
  }
}

.toggle-pill {
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  justify-self: end;
  min-width: 44px;
  padding: 7px 9px;
  text-align: center;
}

.toggle-pill.on {
  background: var(--success-bg);
  color: var(--success);
}

.event-detail-card {
  display: grid;
  gap: 16px;
}

.event-card-list {
  display: grid;
  gap: 14px;
}

.event-mode-copy {
  background: rgba(201, 31, 38, 0.07);
  border-radius: 14px;
  color: var(--brand-red);
  font-weight: 720;
  padding: 8px 10px;
}

.event-layout-large {
  align-items: center;
}

.event-layout-large .event-image {
  min-height: 112px;
}

.certificates-hero {
  background:
    radial-gradient(circle at 88% 14%, rgba(201, 31, 38, 0.14), transparent 30%),
    linear-gradient(135deg, rgba(255, 253, 248, 0.98), rgba(248, 225, 220, 0.92));
}

.certificate-card {
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.98), rgba(255, 247, 238, 0.95));
}

.certificate-recipient-card {
  display: grid;
  gap: 10px;
}

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

.certificate-recipient-grid .field {
  display: grid;
  gap: 6px;
}

.certificate-recipient-grid .field span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 780;
}

.certificate-recipient-grid .field.full {
  grid-column: 1 / -1;
}

.certificate-message-input {
  min-height: 72px;
  padding-top: 10px;
  resize: vertical;
}

.payment-card,
.payment-hero {
  display: grid;
  gap: 16px;
}

.payment-hero {
  background:
    radial-gradient(circle at 85% 12%, rgba(201, 31, 38, 0.14), transparent 32%),
    linear-gradient(180deg, rgba(255, 253, 248, 0.99), rgba(255, 247, 238, 0.94));
}

.payment-total {
  color: var(--brand-red);
  font-size: 48px;
  font-weight: 860;
  line-height: 1;
}

@media (prefers-reduced-motion: reduce) {
  .screen-transition,
  .nav-button,
  .nav-indicator,
  .nav-button > .stitch-icon,
  .nav-button > span,
  .faq-answer,
  .faq-item,
  .faq-toggle,
  .toast,
  .toast-check-path,
  .toast-cross-path {
    animation: none;
    transition: none;
  }

  .toast-check-path,
  .toast-cross-path {
    stroke-dashoffset: 0;
  }
}

@media (max-width: 380px) {
  .start-title {
    font-size: 36px;
  }

  .start-lead {
    font-size: 15px;
  }

  .feature-row strong,
  .profile-row strong {
    font-size: 15px;
  }
}

@media (max-width: 720px) {
  input,
  textarea,
  select,
  .text-input,
  .certificate-message-input {
    font-size: 16px !important;
  }
}
