:root {
  --ink: #20231f;
  --muted: #6c7068;
  --paper: #fbfaf5;
  --panel: #ffffff;
  --sage: #dbe7d0;
  --blue: #d8e6f3;
  --rose: #f1d8d2;
  --gold: #f3e4ba;
  --shadow: 0 18px 45px rgb(45 45 38 / 10%);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
}

html.turbo-loading {
  cursor: wait;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 20% 0%, rgb(219 231 208 / 55%), transparent 34rem),
    linear-gradient(135deg, #fbfaf5, #f7f3ea 58%, #eef4ed);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  min-height: 100vh;
}

body::before {
  background: rgb(251 250 245 / 70%);
  content: "";
  inset: 0;
  pointer-events: none;
  position: fixed;
}

button,
input {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.page {
  min-height: 100vh;
  position: relative;
}

.shell {
  margin: 0 auto;
  max-width: 42rem;
  padding: clamp(1.25rem, 4vw, 2.5rem);
}

.home-header {
  padding: 12vh 0 2rem;
}

.screen-header {
  align-items: center;
  display: grid;
  gap: 1rem;
  grid-template-columns: 3.25rem 1fr;
  padding: 2rem 0;
}

.eyebrow {
  color: var(--muted);
  font-size: .82rem;
  font-weight: 750;
  letter-spacing: 0;
  margin: 0 0 .35rem;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(2.4rem, 9vw, 4.3rem);
  line-height: .95;
}

h2 {
  font-size: 1.35rem;
}

.kid-grid,
.season-list,
.category-list {
  display: grid;
  gap: .85rem;
}

.kid-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.kid-tile,
.season-row,
.category-row,
.empty-state {
  background: rgb(255 255 255 / 78%);
  box-shadow: var(--shadow);
}

.kid-tile {
  align-items: end;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  display: flex;
  font-size: clamp(1.6rem, 7vw, 2.6rem);
  font-weight: 800;
  padding: 1rem;
}

.kid-tile:nth-child(1) {
  background: linear-gradient(145deg, var(--sage), #fff);
}

.kid-tile:nth-child(2) {
  background: linear-gradient(145deg, var(--rose), #fff);
}

.kid-tile:nth-child(3) {
  background: linear-gradient(145deg, var(--blue), #fff);
}

.kid-tile:nth-child(4) {
  background: linear-gradient(145deg, var(--gold), #fff);
}

.season-row {
  align-items: center;
  border-radius: 8px;
  display: flex;
  font-size: 1.35rem;
  font-weight: 750;
  justify-content: space-between;
  min-height: 5rem;
  padding: 1.1rem 1.25rem;
}

.icon-link,
.count-button,
.menu-button {
  align-items: center;
  border: 0;
  border-radius: 999px;
  color: var(--ink);
  display: inline-flex;
  justify-content: center;
}

.icon-link {
  background: rgb(255 255 255 / 78%);
  box-shadow: var(--shadow);
  font-size: 2.6rem;
  height: 3.25rem;
  line-height: 1;
  width: 3.25rem;
}

.action-bar {
  display: flex;
  gap: .65rem;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.soft-button {
  background: var(--panel);
  border: 0;
  border-radius: 8px;
  box-shadow: 0 10px 22px rgb(45 45 38 / 8%);
  color: var(--ink);
  min-height: 2.75rem;
  padding: .75rem 1rem;
}

.soft-button.primary {
  background: var(--sage);
  font-weight: 750;
}

.soft-button.danger {
  background: var(--rose);
}

.category-row {
  align-items: center;
  border-radius: 8px;
  display: grid;
  gap: .75rem;
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 4.75rem;
  padding: .8rem .8rem .8rem 1.15rem;
}

.category-name {
  font-size: 1.05rem;
  font-weight: 750;
  overflow-wrap: anywhere;
}

.counter {
  align-items: center;
  display: flex;
  gap: .45rem;
}

.count-button,
.menu-button {
  background: #f2f1ea;
  font-size: 1.4rem;
  height: 2.45rem;
  min-width: 2.45rem;
}

.count {
  display: inline-block;
  font-size: 1.25rem;
  font-weight: 850;
  min-width: 2ch;
  text-align: center;
}

.empty-state {
  border-radius: 8px;
  padding: 1.25rem;
}

.empty-state p,
.modal p {
  color: var(--muted);
  margin-top: .35rem;
}

.modal {
  border: 0;
  border-radius: 8px;
  box-shadow: var(--shadow);
  max-width: min(90vw, 24rem);
  padding: 0;
  width: 100%;
}

.modal::backdrop {
  background: rgb(32 35 31 / 38%);
}

.modal-body {
  display: grid;
  gap: .9rem;
  padding: 1.1rem;
}

.modal-actions {
  display: flex;
  gap: .65rem;
  justify-content: flex-end;
}

.field-label {
  color: var(--muted);
  font-size: .9rem;
  font-weight: 750;
}

.text-field {
  border: 0;
  border-radius: 8px;
  box-shadow: inset 0 0 0 1px rgb(32 35 31 / 12%);
  min-height: 3rem;
  padding: .75rem .85rem;
  width: 100%;
}

.auth-page {
  display: grid;
  place-items: center;
}

.auth-panel {
  background: rgb(255 255 255 / 78%);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 1.25rem;
  padding: clamp(1.25rem, 5vw, 2rem);
  width: min(100%, 24rem);
}

.auth-form {
  display: grid;
  gap: 1rem;
}

.auth-form > div {
  display: grid;
  gap: .4rem;
}

.auth-alert {
  background: var(--rose);
  border-radius: 8px;
  padding: .75rem .85rem;
}

.auth-submit {
  width: 100%;
}

@media (hover: hover) {
  a,
  button {
    transition: transform 160ms ease, opacity 160ms ease, box-shadow 160ms ease;
  }

  a:hover,
  button:hover {
    transform: translateY(-1px);
  }
}

@media (max-width: 34rem) {
  .kid-grid {
    grid-template-columns: 1fr;
  }

  .category-row {
    align-items: start;
    grid-template-columns: 1fr;
  }

  .counter {
    justify-content: space-between;
    width: 100%;
  }
}

@view-transition {
  navigation: auto;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 220ms;
}
