:root {
  color-scheme: light;
  --bg: #f8f6ff;
  --paper: #fff;
  --ink: #242044;
  --muted: #645c79;
  --line: #e8e1f3;
  --purple: #6033d5;
  --deep: #482296;
  --lav: #eee6ff;
  --coral: #ffe4db;
  --coral-ink: #9c3528;
  --mint: #c9f5e9;
  --mint-ink: #116052;
  --sky: #e0edff;
  --sky-ink: #244e96;
  --yellow: #ffefae;
  --yellow-ink: #74520b;
  --shadow: 0 4px 12px #33175208;
  font: 16px/1.4 system-ui,-apple-system,'Segoe UI',sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #e9e1fc;
  color: var(--ink);
}

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

button {
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: .65;
}

[hidden] {
  display: none!important;
}

button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 3px solid #8560ff;
  outline-offset: 2px;
}

button, a, input, select, textarea, summary {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: var(--deep);
}

svg {
  width: 22px;
  height: 22px;
  flex: none;
  vertical-align: middle;
}

button {
  color: inherit;
}

h1, h2, h3, p {
  margin: 0;
}

.shell {
  background: var(--bg);
  min-height: 100dvh;
  max-width: 480px;
  margin: auto;
}

.topbar {
  height: auto;
  min-height: 72px;
  padding: calc(13px + env(safe-area-inset-top)) 19px 11px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  font-weight: 850;
  letter-spacing: -.035em;
  font-size: 1.43rem;
}

.brand-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  background: var(--purple);
  color: #fff;
  border-radius: 13px;
}

.app-version {
  color: var(--muted);
  font-size: .875rem;
  font-weight: 650;
  letter-spacing: 0;
  white-space: nowrap;
}

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

.avatar {
  margin-left: auto;
  border: 0;
  background: var(--lav);
  color: var(--deep);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-weight: 800;
}

.demo-tag {
  margin-left: auto;
  font-size: .78rem;
  color: var(--deep);
  font-weight: 750;
  background: var(--lav);
  padding: 4px 8px;
  border-radius: 8px;
}

.demo-tag+.avatar {
  margin-left: 0;
}

.content {
  padding: 18px 18px calc(99px + env(safe-area-inset-bottom));
  min-width: 0;
}

.heading {
  margin: 0 0 20px;
}

.heading h1 {
  font-family: Georgia,serif;
  font-weight: 500;
  letter-spacing: -.055em;
  font-size: clamp(1.95rem,8vw,2.45rem);
  line-height: 1.15;
  margin-bottom: 6px;
}

.heading p, .muted {
  color: var(--muted);
  font-size: .9rem;
}

.home-date {
  margin-bottom: 10px;
}

.nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(100%,480px);
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4,1fr);
  background: var(--paper);
  border-top: 1px solid var(--line);
  padding: 6px 5px calc(8px + env(safe-area-inset-bottom));
  box-shadow: 0 -8px 25px #3d277709;
}

.nav button {
  display: grid;
  justify-items: center;
  gap: 4px;
  border: 0;
  background: none;
  padding: 3px 0;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 700;
  min-height: 53px;
  border-radius: 10px;
}

.nav span:first-child {
  height: 27px;
  min-width: 50px;
  display: grid;
  place-items: center;
  border-radius: 12px;
}

.nav [aria-current=page] {
  color: var(--deep);
}

.nav [aria-current=page] span:first-child {
  background: var(--lav);
}

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: linear-gradient(113deg,#5324c2 5%,#6432da 61%,#8153ef);
  color: white;
  min-height: 132px;
  padding: 17px 49px 17px 17px;
  border-radius: 20px;
  display: grid;
  gap: 5px;
  align-content: center;
  margin-bottom: 23px;
  box-shadow: 0 8px 19px #6033d526;
}

.hero button {
  color: inherit;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
}

.hero small {
  color: #efe7ff;
  font-weight: 700;
  font-size: .84rem;
}

.hero strong {
  display: block;
  font-size: 1.28rem;
  line-height: 1.2;
}

.hero span {
  font-size: .87rem;
  color: #f2eaff;
}

.hero:after, .hero:before {
  content: '';
  position: absolute;
  z-index: -1;
  width: 145px;
  height: 145px;
  right: -53px;
  top: -31px;
  border: 1px solid #ffffff55;
  border-radius: 50%;
  box-shadow: 0 0 0 14px #ffffff1b,0 0 0 30px #ffffff17;
  pointer-events: none;
}

.hero:before {
  width: 26px;
  height: 26px;
  background: #ffad8a;
  right: 22px;
  top: 19px;
  border: 0;
  box-shadow: none;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 18px 0 8px;
  gap: 6px;
}

.section-head h2 {
  font-size: 1.12rem;
  letter-spacing: -.025em;
}

.text-button {
  background: transparent;
  border: 0;
  min-height: 42px;
  color: var(--deep);
  font-size: .86rem;
  font-weight: 800;
  padding: 3px 2px;
}

.card, .row, .empty {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 15px;
  box-shadow: var(--shadow);
}

.stack {
  display: grid;
  gap: 8px;
}

.row {
  width: 100%;
  text-align: left;
  padding: 9px 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 62px;
}

.row strong, .appointment strong, .shortcut strong {
  display: block;
  font-size: .96rem;
  overflow-wrap: anywhere;
}

.row small, .shortcut small, .appointment small {
  font-size: .81rem;
  color: var(--muted);
  display: block;
  margin-top: 2px;
  overflow-wrap: anywhere;
}

.row .tail {
  margin-left: auto;
  text-align: right;
  white-space: nowrap;
  flex: none;
}

.row .tail strong {
  font-size: .78rem;
  color: var(--deep);
}

.badge {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--lav);
  color: var(--deep);
  flex: none;
}

.coral {
  background: var(--coral);
  color: var(--coral-ink);
}

.teal {
  background: var(--mint);
  color: var(--mint-ink);
}

.sky {
  background: var(--sky);
  color: var(--sky-ink);
}

.gold {
  background: var(--yellow);
  color: var(--yellow-ink);
}

.purple {
  background: var(--lav);
  color: var(--deep);
}

.shortcuts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.shortcut {
  padding: 11px;
  text-align: left;
}

.shortcut .badge {
  width: 34px;
  height: 34px;
  margin-bottom: 6px;
}

.shortcut svg {
  width: 19px;
  height: 19px;
}

.tabs, .days, .children {
  display: grid;
  gap: 4px;
}

.tabs {
  background: var(--lav);
  border-radius: 13px;
  padding: 3px;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  margin-bottom: 14px;
}

.tabs button, .days button, .children button {
  border: 0;
  background: none;
  border-radius: 10px;
  min-height: 44px;
  font-weight: 720;
  font-size: .88rem;
  padding: 4px;
  color: var(--muted);
}

.tabs [aria-pressed=true] {
  color: var(--deep);
  background: white;
  box-shadow: var(--shadow);
}

.children {
  grid-template-columns: repeat(5,minmax(0,1fr));
  margin-bottom: 12px;
}

.children button {
  outline-offset: -2px;
  min-height: 65px;
  font-size: clamp(.61rem,2.8vw,.75rem);
  padding: 5px 1px;
}

.children [aria-pressed=true] {
  background: var(--paper);
  box-shadow: inset 0 0 0 2px #ad92f4;
  color: var(--deep);
}

.kid {
  margin: 0 auto 4px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  font-size: .95rem;
  border-radius: 50%;
  font-weight: 850;
}

.days {
  grid-template-columns: repeat(5,minmax(0,1fr));
  margin-top: 8px;
}

.days button {
  background: var(--paper);
  border: 1px solid var(--line);
  min-height: 51px;
}

.days span {
  display: block;
}

.days [aria-pressed=true] {
  background: var(--purple);
  color: white;
  border-color: var(--purple);
}

.week {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .9rem;
  padding: 1px 3px;
}

.icon-button {
  display: grid;
  place-items: center;
  padding: 0;
  width: 44px;
  height: 44px;
  background: none;
  border: 0;
  flex: none;
}

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

.times strong, .times small {
  display: block;
  font-size: .78rem;
}

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

.lesson .row {
  border-left: 5px solid #9b78f2;
}

.lesson:nth-child(4n+2) .row {
  border-left-color: #64cca9;
}

.lesson:nth-child(4n+3) .row {
  border-left-color: #ffab92;
}

.lesson:nth-child(4n+4) .row {
  border-left-color: #81aafa;
}

.empty {
  padding: 17px;
  color: var(--muted);
  font-size: .9rem;
}

.button {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 12px;
  background: var(--purple);
  color: white;
  font-weight: 760;
  min-height: 46px;
  padding: 8px 13px;
  font-size: .92rem;
}

.button.secondary {
  background: var(--lav);
  color: var(--deep);
}

.button.danger {
  background: var(--coral);
  color: var(--coral-ink);
}

.block {
  width: 100%;
}

.below {
  margin-top: 14px;
}

.line-gap {
  margin: 11px 0;
}

.filter {
  width: auto;
  max-width: 100%;
  margin-bottom: 1px;
}

.appointment {
  display: grid;
  grid-template-columns: 46px 1fr 19px;
  align-items: start;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 13px 10px;
  min-height: 83px;
}

.appointment .date {
  display: grid;
  justify-items: center;
  align-content: center;
  border-radius: 11px;
  height: 51px;
  font-size: .71rem;
  font-weight: 800;
}

.appointment .date b {
  font-size: 1.13rem;
  line-height: 1.1;
}

.appointment svg {
  width: 18px;
  height: 18px;
  color: var(--deep);
}

.appointment .pill {
  font-size: .72rem;
  font-weight: 800;
  border-radius: 8px;
  padding: 3px 7px;
  display: inline-block;
  margin-top: 3px;
}

.quick {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 7px;
}

.list-row {
  display: grid;
  grid-template-columns: 44px minmax(0,1fr) 44px;
  align-items: center;
  gap: 2px;
}

.check {
  height: 44px;
  width: 44px;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  padding: 0;
}

.check span {
  border: 1.5px solid #9588aa;
  border-radius: 6px;
  width: 23px;
  height: 23px;
  display: grid;
  place-items: center;
}

.check[aria-pressed=true] span {
  background: var(--purple);
  color: white;
  border-color: var(--purple);
}

.check svg {
  width: 17px;
  height: 17px;
}

.list-title {
  text-align: left;
  border: 0;
  background: none;
  min-height: 45px;
  overflow-wrap: anywhere;
  font-weight: 680;
  font-size: .91rem;
}

.list-title small {
  display: block;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 500;
}

.done .list-title {
  color: var(--muted);
  text-decoration: line-through;
}

.back {
  margin: -8px 0 7px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.field {
  display: grid;
  gap: 5px;
  min-width: 0;
  font-weight: 730;
  font-size: .87rem;
  margin-bottom: 11px;
}

input, select, textarea {
  display: block;
  min-width: 0;
  width: 100%;
  border: 1px solid #d9cbee;
  border-radius: 10px;
  background: white;
  color: var(--ink);
  min-height: 45px;
  padding: 6px 9px;
  font-size: 1rem;
}

input[type=date], input[type=time] {
  appearance: none;
  text-align: left;
}

textarea {
  resize: vertical;
  min-height: 73px;
}

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

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 15px;
}

.form-actions .button:first-child {
  flex: 1;
}

.form-error {
  color: #981e29;
  font-size: .86rem;
  font-weight: 700;
  margin: 10px 0;
}

.shift-end {
  background: var(--lav);
  color: var(--deep);
  padding: 12px;
  border-radius: 12px;
  margin: 0 0 12px;
  font-size: .9rem;
}

.edit-day {
  margin: 9px 0;
  padding: 8px 10px;
}

.edit-day summary {
  cursor: pointer;
  min-height: 42px;
  display: flex;
  align-items: center;
  font-weight: 800;
  color: var(--deep);
  justify-content: space-between;
  gap: 6px;
}

.edit-day summary:after {
  content: '+';
}

.edit-day[open] summary:after {
  content: '−';
}

.edit-lesson {
  padding-top: 9px;
  border-top: 1px solid var(--line);
}

.edit-lesson+.edit-lesson {
  margin-top: 7px;
}

.profile {
  padding: 14px;
  display: grid;
  gap: 10px;
}

.notice {
  position: fixed;
  z-index: 4;
  bottom: calc(74px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: min(440px,90%);
  background: var(--ink);
  color: white;
  border-radius: 12px;
  padding: 10px 13px;
  box-shadow: var(--shadow);
  font-size: .9rem;
}

.welcome {
  min-height: 100dvh;
  max-width: 480px;
  display: grid;
  align-content: center;
  padding: 26px;
}

.welcome .brand {
  margin-bottom: 18px;
}

.welcome .card {
  padding: 17px;
}

.welcome .heading {
  margin-bottom: 14px;
}

.welcome .button {
  width: 100%;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
