/* Buttons: soft and rounded. They press down. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: 48px; padding: var(--s-2) var(--s-5);
  font-family: var(--font-display); font-weight: 800; font-size: var(--text-base);
  color: var(--ink); background: var(--stone-light);
  border: var(--edge); border-radius: var(--radius);
  box-shadow: var(--btn-shadow);
  transition: transform var(--fast) var(--ease), box-shadow var(--fast) var(--ease), filter var(--fast);
  text-decoration: none; text-align: center;
}
.btn:hover { filter: brightness(1.05); }
.btn:active { transform: translateY(var(--px)); box-shadow: var(--btn-shadow-active); }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; filter: grayscale(0.6); }
.btn.go { background: var(--go); color: var(--white); text-shadow: 0 1px 0 var(--go-dark); }
.btn.gem { background: var(--gem); color: var(--white); text-shadow: 0 2px 0 var(--gem-dark); }
.btn.gold { background: var(--gold); }
.btn.wood { background: var(--wood); }
.btn.danger { background: var(--bad); color: var(--white); }
.btn.big { min-height: 60px; font-size: var(--text-lg); padding-inline: var(--s-6); }
.btn.small { min-height: 40px; padding-inline: var(--s-3); font-size: var(--text-sm); }
.btn.wide { width: 100%; }
.btn.ghost { background: transparent; box-shadow: none; border-color: transparent; text-decoration: underline; min-height: 40px; }
.btn.ghost:active { transform: none; }
.btn.icon { padding-inline: var(--s-2); min-width: 48px; }

/* Panels: paper signs and stone slabs. */
.panel {
  background: var(--paper); border: var(--edge); border-radius: var(--radius);
  box-shadow: var(--drop); padding: var(--s-5);
}
.panel.stone { background: var(--stone-light); }
.panel.tight { padding: var(--s-3) var(--s-4); }
.panel > h2 { font-size: var(--text-lg); margin-bottom: var(--s-3); }

/* Pills in the top bar. */
.pill {
  display: inline-flex; align-items: center; gap: var(--s-2);
  min-height: 40px; padding: 0 var(--s-3);
  background: var(--paper); border: var(--edge); border-radius: 999px;
  font-family: var(--font-display); font-weight: 800; font-variant-numeric: tabular-nums;
}
.pill svg { width: 20px; height: 20px; }
.pill.bump { animation: bump 320ms var(--ease); }
@keyframes bump { 40% { transform: scale(1.14); } }

.topbar { display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; }
.topbar .who { display: flex; align-items: center; gap: var(--s-2); background: none; border: 0; padding: 0; font-family: var(--font-display); font-weight: 800; }
.kid-photo { display: block; border-radius: 50%; object-fit: cover; aspect-ratio: 1; height: auto; border: 2px solid var(--white); box-shadow: 0 0 0 2px var(--line); background: var(--paper-2); }
.topbar .who .kid-photo { width: 40px; }
.topbar .who svg { width: 40px; height: 40px; background: var(--paper); border: var(--edge); border-radius: var(--radius); }
.topbar .spacer { flex: 1; }

.back { align-self: flex-start; }

/* Forms. */
.field { display: flex; flex-direction: column; gap: var(--s-1); }
.field > span { font-weight: 700; font-size: var(--text-sm); }
.field small { color: var(--ink-soft); font-size: var(--text-xs); }
.check { display: flex; align-items: flex-start; gap: var(--s-2); font-size: var(--text-sm); line-height: 1.4; cursor: pointer; }
.check input { flex: none; width: 22px; height: 22px; margin: 0; accent-color: var(--go); }
.input {
  min-height: 48px; padding: var(--s-2) var(--s-3); width: 100%;
  background: var(--white); border: var(--edge); border-radius: var(--radius);
  box-shadow: inset 0 3px 0 rgb(0 0 0 / 0.08);
}
.input:focus-visible { outline-offset: 0; }
.form { display: flex; flex-direction: column; gap: var(--s-3); }
.form-error { background: var(--bad-bg); border: 2px solid var(--bad); border-radius: var(--radius); padding: var(--s-2) var(--s-3); font-weight: 600; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); }
@media (max-width: 420px) { .grid-2 { grid-template-columns: 1fr; } }

/* Segmented choice (year picker, tabs). */
.seg { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.seg button {
  min-width: 44px; min-height: 44px; padding: 0 var(--s-3);
  background: var(--white); border: var(--edge); border-radius: var(--radius);
  font-family: var(--font-display); font-weight: 800;
}
.seg button[aria-pressed="true"], .seg button[aria-selected="true"] { background: var(--gold); box-shadow: inset 0 -4px 0 rgb(0 0 0 / 0.15); }

/* Stars. */
.stars { display: inline-flex; gap: 2px; }
.stars svg { width: 16px; height: 16px; }
.stars .off { opacity: 0.25; filter: grayscale(1); }

/* Toasts. */
.toasts { position: fixed; left: 0; right: 0; bottom: calc(var(--s-4) + env(safe-area-inset-bottom)); display: flex; flex-direction: column; align-items: center; gap: var(--s-2); z-index: 90; pointer-events: none; padding: 0 var(--s-4); }
.toast { background: var(--ink); color: var(--white); padding: var(--s-2) var(--s-4); border-radius: var(--radius); font-weight: 700; animation: screen-in var(--normal) var(--ease); max-width: 32rem; }
.toast.bad { background: var(--bad); }

/* Modal sheet. */
.veil { position: fixed; inset: 0; background: rgb(20 24 32 / 0.55); display: grid; place-items: center; padding: var(--s-4); z-index: 80; }
.veil .panel { width: min(100%, 26rem); max-height: 90dvh; overflow: auto; animation: screen-in var(--normal) var(--ease); }

.badge { display: inline-block; padding: 2px var(--s-2); border: 2px solid var(--line); border-radius: 999px; font-size: var(--text-xs); font-weight: 800; background: var(--white); }
.badge.pending { background: var(--gold); }
.badge.approved { background: var(--good-bg); }
.badge.declined, .badge.cancelled { background: var(--stone-light); }

.empty { text-align: center; color: var(--ink-soft); padding: var(--s-5) var(--s-3); }

/* Header band of a child's screen, and the tab bar under it. The general look dresses them up in classic.css. */
.hero { display: flex; flex-direction: column; gap: var(--s-4); }
.tabbar {
  position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); z-index: 60;
  width: min(100%, 34rem); display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-1);
  padding: 6px var(--s-2) calc(6px + env(safe-area-inset-bottom));
  background: var(--paper); border: var(--edge); border-bottom: 0;
}
.tab {
  display: grid; justify-items: center; gap: 2px; padding: 6px var(--s-1); min-height: 52px;
  background: none; border: 0; border-radius: 14px; color: var(--ink-soft);
  font-family: var(--font-display); font-weight: 800; font-size: var(--text-xs);
}
.tab svg { width: 26px; height: 26px; }
.tab.current { color: var(--go-dark); background: var(--go-soft); }
.toasts { bottom: calc(84px + env(safe-area-inset-bottom)); }
