@font-face {
  font-family: Fredoka;
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fredoka-400.ttf") format("truetype");
}

@font-face {
  font-family: Fredoka;
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fredoka-500.ttf") format("truetype");
}

@font-face {
  font-family: Fredoka;
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fredoka-600.ttf") format("truetype");
}

@font-face {
  font-family: Fredoka;
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fredoka-700.ttf") format("truetype");
}

:root {
  color-scheme: light;
  font-family: Fredoka, "Trebuchet MS", "Segoe UI", sans-serif;
  --canvas: #e9e3d7;
  --paper: #f7f4ee;
  --rail: #eae4d8;
  --surface: #fff;
  --active-surface: #2b2a28;
  --active-ink: #fff;
  --ink: #2b2a28;
  --muted: #857c70;
  --line: #ded5c5;
  --green: #1d7a61;
  --green-dark: #14563f;
  --orange: #d9632f;
  --orange-dark: #ab4a20;
  --danger: #a52828;
  --dot: #e4ddd0;
  --orb-empty: #eee7da;
  --success-surface: #e6efe9;
  --success-ink: #5f6b64;
  --success-line: #9dbcaa;
  --success-shadow: #c3d4c9;
  --banner-ok-bg: #eef4f0;
  --banner-ok-ink: #3d6b58;
  --banner-ok-line: #c7ddd1;
  --banner-neutral-bg: #f2ede4;
  --banner-neutral-ink: #6e655a;
  --banner-neutral-line: #ddd4c7;
  --banner-error-bg: #fdeee6;
  --banner-error-ink: #a8542a;
  --banner-error-line: #f0c4ab;
  --overlay: rgba(247, 244, 238, .94);
  --pin-chrome: #ebe5da;
  --pin-action: #eee8dd;
  --pin-dot-border: #bcb3a5;
  --empty-ink: #b3a998;
  --hint-ink: #a79d8f;
  --panel-surface: color-mix(in srgb, var(--surface) 92%, var(--paper));
  --control-surface: var(--surface);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body {
  display: block;
  color: var(--ink);
  background: var(--paper);
}

button,
a {
  font: inherit;
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

button:focus-visible,
a:focus-visible {
  outline: 4px solid #f0a34f;
  outline-offset: 2px;
}

.board-stage {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 100dvh;
}

.board {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 224px 1fr;
  overflow: hidden;
  border-radius: 0;
  background: var(--paper);
  box-shadow: none;
}

.family-rail {
  min-height: 0;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  overflow: hidden;
  background: var(--rail);
  border-right: 2px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 4px 2px;
}

.brand-mark {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #fff;
  background: var(--green);
  font-size: 18px;
  font-weight: 600;
}

.brand strong {
  font-size: 14px;
  font-weight: 600;
}

.mode-tabs {
  display: flex;
  gap: 6px;
}

.mode-tab {
  min-height: 44px;
  flex: 1;
  border: 0;
  border-radius: 14px;
  cursor: pointer;
  color: var(--muted);
  background: var(--surface);
  box-shadow: 0 3px 0 var(--line);
  font-size: 13px;
  font-weight: 500;
}

.mode-tab.active {
  color: var(--active-ink);
  background: var(--active-surface);
  box-shadow: 0 3px 0 #141312;
}

.calendar-tab {
  flex: none;
  width: 100%;
}

.rail-divider {
  height: 2px;
  flex: none;
  margin: 1px 0;
  border-radius: 2px;
  background: var(--line);
}

.people-rail {
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow: auto;
  scrollbar-width: thin;
}

.person-rail-button {
  width: 100%;
  min-height: 58px;
  padding: 6px 9px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 18px;
  cursor: pointer;
  text-align: left;
  background: transparent;
}

.person-rail-button.selected {
  background: var(--surface);
  box-shadow: 0 4px 0 var(--line);
}

.person-avatar {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  display: grid;
  place-items: center;
  border: 3px solid var(--person);
  border-radius: 50%;
  background: color-mix(in srgb, var(--person) 14%, var(--surface));
  font-size: 23px;
  line-height: 1;
}

.person-rail-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.person-rail-copy strong {
  overflow: hidden;
  font-size: 16px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.person-rail-copy span {
  color: var(--muted);
  font-size: 11px;
}

.rail-spacer {
  flex: 1;
  min-height: 2px;
}

.family-progress-card {
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 20px;
  background: var(--surface);
  box-shadow: 0 4px 0 var(--line);
}

.progress-orb {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  border-radius: 50%;
  background: var(--orb-empty);
}

.progress-orb span {
  width: 100%;
  height: var(--progress);
  background: linear-gradient(180deg, #f0a34f, var(--orange));
  transition: height .25s ease;
}

.rail-eyebrow {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .1em;
}

.family-progress-card strong {
  display: block;
  font-size: 18px;
  font-weight: 600;
}

.print-button {
  min-height: 44px;
  border: 0;
  border-radius: 18px;
  cursor: pointer;
  color: #fff;
  background: var(--orange);
  box-shadow: 0 4px 0 var(--orange-dark);
  font-size: 14px;
  font-weight: 500;
}

.print-button:disabled {
  cursor: wait;
  opacity: .7;
}

.board-main {
  position: relative;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at 1px 1px, var(--dot) 1px, transparent 0) 0 0 / 26px 26px,
    var(--paper);
}

.board-header {
  height: 88px;
  flex: 0 0 88px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.date-controls,
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.board-now {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 0 1 auto;
}

.board-clock {
  min-width: 5.5ch;
  font-size: 28px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.board-weather {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 6px 0;
}

.board-weather-icon {
  font-size: 28px;
  line-height: 1;
}

.board-weather-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.board-weather-copy strong {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.1;
}

.board-weather-copy span {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.icon-button {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 14px;
  cursor: pointer;
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 3px 0 var(--line);
  text-decoration: none;
  font-size: 21px;
}

.date-title {
  min-width: 98px;
  display: flex;
  flex-direction: column;
}

.date-title strong {
  font-size: 30px;
  font-weight: 600;
  line-height: 1;
}

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

.jump-today {
  min-height: 44px;
  padding: 0 13px;
  border: 0;
  border-radius: 13px;
  cursor: pointer;
  color: #fff;
  background: var(--green);
  box-shadow: 0 3px 0 var(--green-dark);
  font-size: 12px;
  font-weight: 500;
}

.week-strip {
  display: flex;
  gap: 6px;
}

.week-day {
  width: 46px;
  min-height: 56px;
  padding: 5px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  border: 0;
  border-radius: 14px;
  cursor: pointer;
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 3px 0 var(--line);
}

.week-day span {
  font-size: 10px;
  opacity: .72;
}

.week-day strong {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.1;
}

.week-day em {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--orange);
}

.week-day.selected {
  color: var(--active-ink);
  background: var(--active-surface);
  box-shadow: 0 3px 0 #141312;
}

.week-day.selected em {
  background: #f0a34f;
}

.week-day.today:not(.selected) {
  box-shadow: 0 3px 0 var(--line), inset 0 0 0 2px var(--green);
}

.admin-button {
  width: 48px;
  height: 48px;
  flex-basis: 48px;
}

.view-root {
  min-height: 0;
  flex: 1;
  padding: 2px 24px 20px;
}

.today-view {
  height: 100%;
  display: grid;
  grid-template-rows: repeat(3, minmax(0, 1fr));
}

.time-lane {
  min-height: 0;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 4px;
}

.time-lane:not(:last-child) {
  border-bottom: 2px dotted var(--line);
}

.lane-title {
  width: 124px;
  flex: 0 0 124px;
}

.lane-title strong {
  display: block;
  font-size: 21px;
  font-weight: 600;
  line-height: 1.1;
}

.lane-title span {
  color: var(--muted);
  font-size: 12px;
}

.magnet-list {
  min-width: 0;
  min-height: 0;
  flex: 1;
  max-height: 100%;
  padding: 5px 6px 9px 2px;
  display: flex;
  flex-wrap: wrap;
  align-content: center;
  gap: 11px;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: thin;
}

.magnet {
  flex: 1 1 240px;
  min-width: 218px;
  max-width: none;
  min-height: 62px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 21px;
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 4px 0 color-mix(in srgb, var(--tint) 32%, var(--line)), inset 0 0 0 2px color-mix(in srgb, var(--tint) 24%, transparent);
  text-align: left;
}

button.magnet {
  cursor: pointer;
}

.magnet.completed {
  color: var(--success-ink);
  background: var(--success-surface);
  box-shadow: 0 4px 0 var(--success-shadow), inset 0 0 0 2px var(--success-line);
}

.magnet.completed .magnet-title {
  text-decoration: line-through;
}

.magnet-icon {
  flex: 0 0 auto;
  font-size: 27px;
  line-height: 1;
}

.magnet-copy {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.magnet-title {
  overflow: hidden;
  font-size: 16px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.magnet-meta {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.magnet-owner {
  max-width: 58px;
  overflow: hidden;
  flex: 0 0 auto;
  font-size: 19px;
  white-space: nowrap;
}

.magnet-announce {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: var(--control-surface);
  color: inherit;
  font: inherit;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}

.magnet-announce:hover,
.magnet-announce:focus-visible {
  background: var(--surface);
  outline: none;
}

.empty-copy {
  align-self: center;
  color: var(--empty-ink);
  font-size: 14px;
}

.everyone-view {
  height: 100%;
  display: grid;
  grid-auto-columns: minmax(174px, 1fr);
  grid-auto-flow: column;
  gap: 12px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.person-column {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.person-column-head {
  min-height: 58px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 19px;
  cursor: pointer;
  background: color-mix(in srgb, var(--person) 10%, var(--surface));
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--person) 28%, transparent);
  text-align: left;
}

.person-column-head .person-avatar {
  width: 38px;
  height: 38px;
  flex-basis: 38px;
  border-width: 2px;
  font-size: 20px;
}

.column-copy {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.column-copy strong {
  overflow: hidden;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.column-copy span {
  color: var(--muted);
  font-size: 11px;
}

.mini-orb {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  border-radius: 50%;
  background: var(--orb-empty);
}

.mini-orb::after {
  width: 100%;
  height: var(--progress);
  background: var(--person);
  content: "";
}

.column-items {
  min-height: 0;
  padding: 2px 5px 7px 2px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: thin;
}

.person-column .magnet {
  flex: 0 0 auto;
  min-width: 0;
  width: 100%;
  min-height: 59px;
  padding: 9px 11px;
}

.person-column .magnet-icon {
  font-size: 24px;
}

.person-column .magnet-owner {
  display: none;
}

.all-done {
  padding: 12px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  border-radius: 20px;
  color: var(--green);
  background: var(--success-surface);
  box-shadow: inset 0 0 0 2px var(--success-line);
  font-size: 14px;
  font-weight: 600;
}

.calendar-view {
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sync-banner {
  min-height: 38px;
  padding: 8px 13px;
  display: flex;
  align-items: center;
  gap: 9px;
  border-radius: 16px;
  color: var(--banner-ok-ink);
  background: var(--banner-ok-bg);
  box-shadow: inset 0 0 0 2px var(--banner-ok-line);
  font-size: 13px;
  font-weight: 500;
}

.sync-banner.neutral {
  color: var(--banner-neutral-ink);
  background: var(--banner-neutral-bg);
  box-shadow: inset 0 0 0 2px var(--banner-neutral-line);
}

.sync-banner.error {
  color: var(--banner-error-ink);
  background: var(--banner-error-bg);
  box-shadow: inset 0 0 0 2px var(--banner-error-line);
}

.sync-banner button {
  margin-left: auto;
  padding: 6px 13px;
  border: 0;
  border-radius: 11px;
  cursor: pointer;
  background: var(--surface);
  box-shadow: 0 3px 0 var(--line);
  font-size: 12px;
}

.calendar-head,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 9px;
}

.calendar-day-head {
  min-height: 40px;
  padding: 6px 11px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-radius: 15px;
  background: var(--surface);
  box-shadow: 0 3px 0 var(--line);
}

.calendar-day-head.today {
  color: #fff;
  background: var(--green);
  box-shadow: 0 3px 0 var(--green-dark);
}

.calendar-day-head span {
  font-size: 11px;
  opacity: .8;
}

.calendar-day-head strong {
  font-size: 18px;
  font-weight: 600;
}

.calendar-spans {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 9px;
  align-items: start;
}

.calendar-span {
  min-height: 54px;
  padding: 9px 13px;
  display: flex;
  align-items: center;
  gap: 9px;
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 4px 0 var(--line), inset 0 0 0 2px color-mix(in srgb, var(--line) 70%, transparent);
}

.calendar-span-icon {
  flex: none;
  font-size: 19px;
  line-height: 1;
}

.calendar-span-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.calendar-span-copy strong {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.15;
}

.calendar-span-copy span {
  color: var(--muted);
  font-size: 11px;
}

.calendar-grid {
  min-height: 0;
  flex: 1;
}

.calendar-day {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.calendar-event {
  padding: 9px 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  border-radius: 17px;
  background: var(--surface);
  box-shadow: 0 4px 0 color-mix(in srgb, var(--tint) 30%, var(--line)), inset 0 0 0 2px color-mix(in srgb, var(--tint) 22%, transparent);
}

.calendar-event time {
  color: var(--tint);
  font-size: 11px;
  font-weight: 600;
}

.calendar-event strong {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.15;
}

.calendar-event span {
  color: var(--muted);
  font-size: 10px;
}

.person-view {
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.person-back-hint {
  align-self: center;
  color: var(--hint-ink);
  font-size: 12px;
}

.person-view-head {
  min-height: 66px;
  display: flex;
  align-items: center;
  gap: 13px;
}

.person-view-head .person-avatar {
  width: 56px;
  height: 56px;
  flex-basis: 56px;
  font-size: 28px;
}

.person-title-copy {
  min-width: 0;
}

.person-title-copy span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .1em;
}

.person-title-copy h1 {
  margin: 0;
  font-size: 30px;
  font-weight: 600;
  line-height: 1;
}

.person-progress-copy {
  font-size: 18px;
  font-weight: 600;
}

.person-head-progress {
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  border-radius: 50%;
  background: var(--orb-empty);
}

.person-head-progress span {
  width: 100%;
  height: var(--progress);
  background: var(--person);
}

.celebration {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--green);
  background: var(--success-surface);
  box-shadow: inset 0 0 0 2px var(--success-line);
  font-size: 13px;
  font-weight: 600;
}

.person-view-head .print-button {
  min-width: 150px;
  margin-left: auto;
  padding: 0 16px;
}

.person-grid {
  min-height: 0;
  flex: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) 262px;
  gap: 14px;
}

.person-panel {
  min-width: 0;
  min-height: 0;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-radius: 22px;
  background: var(--panel-surface);
}

.person-panel.rewards-panel,
.person-panel.family-panel {
  background: var(--surface);
  box-shadow: 0 5px 0 var(--line);
}

.person-panel > strong {
  font-size: 17px;
  font-weight: 600;
}

.person-panel-items {
  min-height: 0;
  padding: 2px 5px 9px 2px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  overflow-x: clip;
  overflow-y: auto;
  scrollbar-width: thin;
}

.travel-link {
  color: var(--green);
  font-size: 11px;
  font-weight: 600;
}

.agenda-day-label,
.mobile-person-control,
.mobile-bottom-nav {
  display: none;
}

.person-panel .magnet {
  flex: 0 0 auto;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  min-height: 104px;
  padding: 12px 9px;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  text-align: center;
}

.person-panel .magnet-icon {
  font-size: 34px;
}

.person-panel .magnet-owner {
  display: none;
}

.person-panel .magnet-title {
  width: 100%;
  max-width: 100%;
  display: -webkit-box;
  font-size: 19px;
  line-height: 1.08;
  overflow-wrap: anywhere;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.person-panel .magnet-copy,
.person-panel .magnet-meta {
  min-width: 0;
  width: 100%;
  max-width: 100%;
}

.points-head {
  display: flex;
  align-items: center;
}

.points-head span {
  display: block;
  color: var(--orange);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .12em;
}

.points-head strong {
  display: block;
  font-size: 30px;
  font-weight: 600;
  line-height: 1;
}

.points-head b {
  margin-left: auto;
  font-size: 30px;
}

.panel-eyebrow {
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .12em;
}

.reward-button,
.family-overview-button {
  min-height: 47px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 15px;
  text-align: left;
}

.reward-button {
  cursor: pointer;
  background: color-mix(in srgb, var(--orange) 12%, var(--surface));
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--orange) 35%, var(--line));
}

.reward-button:disabled {
  cursor: default;
  opacity: .6;
  background: color-mix(in srgb, var(--muted) 10%, var(--surface));
  box-shadow: inset 0 0 0 2px var(--line);
}

.reward-copy {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.reward-copy > span {
  font-size: 13px;
  font-weight: 500;
}

.reward-lock {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.family-overview-button {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 28px;
  column-gap: 10px;
  cursor: pointer;
  background: color-mix(in srgb, var(--person) 8%, var(--surface));
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--person) 23%, transparent);
}

.family-overview-button .person-avatar {
  width: 34px;
  height: 34px;
  flex-basis: 34px;
  display: grid;
  border-width: 2px;
  font-size: 18px;
}

.family-overview-button .mini-orb {
  width: 28px;
  height: 28px;
  flex-basis: 28px;
  display: flex;
  justify-self: end;
}

.family-overview-button > div {
  min-width: 0;
  flex: 1;
}

.family-overview-button > div strong,
.family-overview-button > div span {
  display: block;
}

.family-overview-button > div strong {
  font-size: 14px;
}

.family-overview-button > div span {
  color: var(--muted);
  font-size: 10px;
}

.panel-hint {
  margin-top: auto;
  color: var(--hint-ink);
  font-size: 10px;
}

.toast {
  position: absolute;
  z-index: 50;
  left: 50%;
  bottom: 26px;
  max-width: 70%;
  padding: 13px 22px;
  border-radius: 999px;
  color: #fff;
  background: #173f36;
  box-shadow: 0 10px 30px rgba(43, 42, 40, .35);
  transform: translateX(-50%);
  font-size: 14px;
  font-weight: 500;
  text-align: center;
}

.toast.error {
  background: var(--danger);
}

.parent-pin-gate {
  position: absolute;
  z-index: 80;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(43, 42, 40, .48);
  backdrop-filter: blur(3px);
}

.parent-pin-gate[hidden] {
  display: none;
}

.parent-pin-panel {
  position: relative;
  width: 350px;
  padding: 24px;
  border-radius: 22px;
  background: var(--paper);
  box-shadow: 0 18px 55px rgba(43, 42, 40, .35);
  text-align: center;
}

.parent-pin-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  color: var(--muted);
  background: var(--pin-chrome);
  font-size: 25px;
  line-height: 1;
}

.parent-pin-lock {
  display: block;
  margin-bottom: 5px;
  font-size: 31px;
}

.parent-pin-panel h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
}

.parent-pin-panel p {
  margin: 4px 0 14px;
  color: var(--muted);
  font-size: 13px;
}

.parent-pin-display {
  min-height: 20px;
  display: flex;
  justify-content: center;
  gap: 11px;
  margin-bottom: 13px;
}

.parent-pin-display span {
  width: 17px;
  height: 17px;
  border: 2px solid var(--pin-dot-border);
  border-radius: 50%;
  background: transparent;
}

.parent-pin-display span.filled {
  border-color: var(--green);
  background: var(--green);
}

.parent-pin-panel .parent-pin-error {
  margin: -5px 0 9px;
  color: var(--danger);
  font-weight: 500;
}

.parent-pin-pad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
}

.parent-pin-pad button {
  min-height: 52px;
  border: 0;
  border-radius: 14px;
  cursor: pointer;
  background: var(--surface);
  box-shadow: 0 3px 0 var(--line), inset 0 0 0 1px var(--line);
  font-size: 22px;
  font-weight: 600;
}

.parent-pin-pad .parent-pin-action {
  color: var(--muted);
  background: var(--pin-action);
  font-size: 13px;
  font-weight: 500;
}

.loading-state {
  position: absolute;
  z-index: 20;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 10px;
  background: var(--overlay);
}

.loading-state[hidden] {
  display: none;
}

.loading-mark {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #fff;
  background: var(--green);
  font-size: 28px;
}

.loading-state strong {
  font-size: 16px;
  font-weight: 500;
}

@media (prefers-reduced-motion: no-preference) {
  .magnet,
  .mode-tab,
  .icon-button,
  .week-day,
  .person-rail-button {
    transition: transform .12s ease, box-shadow .12s ease, background-color .12s ease;
  }

  button:active,
  a:active {
    transform: translateY(2px);
  }
}

:root[data-preset="ocean"] { --green: #087e8b; --orange: #e05d3f; --canvas: #dcebed; --rail: #e8f0ef; }
:root[data-preset="garden"] { --green: #377a4b; --orange: #c85b37; --canvas: #e4e9df; --rail: #edf0e8; }
:root[data-preset="sunrise"] { --green: #17746a; --orange: #c94f3d; --canvas: #f1e3d8; --rail: #f4ebe2; }
:root[data-preset="mono"] { --green: #3f665d; --orange: #8a5145; --canvas: #e4e4e2; --rail: #eeeeeb; }
:root[data-theme="dark"] {
  color-scheme: dark;
  --canvas: #171a1a;
  --paper: #202423;
  --rail: #292e2c;
  --surface: #303633;
  --active-surface: #f4f1e9;
  --active-ink: #202423;
  --ink: #f4f1e9;
  --muted: #c0b9ad;
  --line: #4b514d;
  --green-dark: #0c4c3d;
  --orange-dark: #71361f;
  --dot: #2f3533;
  --orb-empty: #3a413e;
  --success-surface: #24352e;
  --success-ink: #c5d9ce;
  --success-line: #3f5f52;
  --success-shadow: #1a2822;
  --banner-ok-bg: #24352e;
  --banner-ok-ink: #b7d4c6;
  --banner-ok-line: #3f5f52;
  --banner-neutral-bg: #32312c;
  --banner-neutral-ink: #d2c9bb;
  --banner-neutral-line: #524e47;
  --banner-error-bg: #3a2a24;
  --banner-error-ink: #f0b899;
  --banner-error-line: #6a4334;
  --overlay: rgba(23, 26, 26, .94);
  --pin-chrome: #3a413e;
  --pin-action: #3a413e;
  --pin-dot-border: #6a726e;
  --empty-ink: #9a9388;
  --hint-ink: #9a9388;
  --panel-surface: #2a302e;
  --control-surface: #383f3c;
}
@media (prefers-color-scheme: dark) {
  :root[data-theme="system"] {
    color-scheme: dark;
    --canvas: #171a1a;
    --paper: #202423;
    --rail: #292e2c;
    --surface: #303633;
    --active-surface: #f4f1e9;
    --active-ink: #202423;
    --ink: #f4f1e9;
    --muted: #c0b9ad;
    --line: #4b514d;
    --green-dark: #0c4c3d;
    --orange-dark: #71361f;
    --dot: #2f3533;
    --orb-empty: #3a413e;
    --success-surface: #24352e;
    --success-ink: #c5d9ce;
    --success-line: #3f5f52;
    --success-shadow: #1a2822;
    --banner-ok-bg: #24352e;
    --banner-ok-ink: #b7d4c6;
    --banner-ok-line: #3f5f52;
    --banner-neutral-bg: #32312c;
    --banner-neutral-ink: #d2c9bb;
    --banner-neutral-line: #524e47;
    --banner-error-bg: #3a2a24;
    --banner-error-ink: #f0b899;
    --banner-error-line: #6a4334;
    --overlay: rgba(23, 26, 26, .94);
    --pin-chrome: #3a413e;
    --pin-action: #3a413e;
    --pin-dot-border: #6a726e;
    --empty-ink: #9a9388;
    --hint-ink: #9a9388;
    --panel-surface: #2a302e;
    --control-surface: #383f3c;
  }
}
:root[data-text-size="large"] { font-size: 112.5%; }
:root[data-text-size="extra_large"] { font-size: 125%; }
:root[data-text-size="small"] { font-size: 93.75%; }
:root[data-contrast="high"] { --ink: #111; --muted: #3f3f3f; --line: #6d655a; }
:root[data-theme="dark"][data-contrast="high"] { --ink: #fff; --muted: #eee; --line: #aaa; }
@media (prefers-color-scheme: dark) {
  :root[data-theme="system"][data-contrast="high"] { --ink: #fff; --muted: #eee; --line: #aaa; }
}
:root.reduce-motion * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
:root.large-targets button,
:root.large-targets a { min-height: 48px; }

@media (max-width: 767px) {
  html,
  body {
    width: 100%;
    height: auto;
    min-height: 100%;
    overflow: visible;
  }

  body {
    display: block;
    padding: 0;
  }

  .board-stage,
  .board {
    position: static;
    width: 100%;
    height: auto;
    min-height: 100dvh;
  }

  .board {
    display: block;
    overflow: visible;
    border-radius: 0;
    box-shadow: none;
    transform: none;
  }

  .family-rail {
    display: none;
  }

  .board-main {
    min-height: 100dvh;
    padding-bottom: 76px;
    overflow: visible;
  }

  .board-header {
    position: sticky;
    z-index: 30;
    top: 0;
    height: auto;
    min-height: 76px;
    padding: 10px 12px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    border-bottom: 1px solid var(--line);
    background: color-mix(in srgb, var(--paper) 94%, transparent);
    backdrop-filter: blur(12px);
  }

  .mobile-person-control {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  .mobile-person-control label {
    color: var(--muted);
    font-size: 10px;
    font-weight: 600;
  }

  .mobile-person-control select {
    width: 100%;
    min-height: 42px;
    padding: 0 34px 0 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    background: var(--surface);
    font: inherit;
    font-weight: 600;
  }

  .date-controls {
    grid-column: 1 / -1;
    justify-content: center;
  }

  .board-now {
    grid-column: 1 / -1;
    justify-content: center;
    margin: 0;
    gap: 16px;
  }

  .board-clock {
    font-size: 22px;
  }

  .board-weather-icon {
    font-size: 24px;
  }

  .board-weather-copy strong {
    font-size: 16px;
  }

  .date-title {
    min-width: 0;
    flex: 1;
    text-align: center;
  }

  .date-title strong { font-size: 19px; }
  .date-title span { font-size: 12px; }
  .jump-today { position: absolute; right: 58px; top: 15px; }
  .header-actions { grid-column: 2; grid-row: 1; }
  .week-strip { display: none; }
  .admin-button { width: 44px; height: 44px; }

  .view-root {
    min-height: auto;
    padding: 14px 12px 24px;
  }

  .today-view {
    height: auto;
    display: flex;
    flex-direction: column;
    gap: 18px;
  }

  .time-lane {
    display: block;
    padding: 0;
    border: 0 !important;
  }

  .lane-title {
    width: auto;
    margin-bottom: 8px;
  }

  .magnet-list,
  .column-items,
  .person-panel-items {
    max-height: none;
    overflow: visible;
  }

  .magnet-list {
    display: grid;
    gap: 9px;
  }

  .magnet {
    flex: none;
    width: 100%;
    min-width: 0;
    max-width: none;
  }

  .everyone-view {
    height: auto;
    display: grid;
    grid-auto-flow: row;
    grid-auto-columns: auto;
    grid-template-columns: 1fr;
    overflow: visible;
  }

  .calendar-view,
  .person-view {
    height: auto;
  }

  .calendar-head,
  .calendar-spans {
    display: none;
  }

  .calendar-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .calendar-day {
    overflow: visible;
  }

  .agenda-day-label {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding: 0 2px 3px;
    border-bottom: 1px solid var(--line);
  }

  .agenda-day-label span { color: var(--muted); }

  .person-view-head {
    min-height: auto;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .person-view-head .print-button {
    grid-column: 1 / -1;
    width: 100%;
    margin: 0;
  }

  .celebration,
  .person-back-hint { display: none; }

  .person-grid {
    display: grid;
    grid-template-columns: 1fr;
  }

  .person-panel {
    min-height: auto;
    border-radius: 8px;
  }

  .person-panel .magnet {
    min-height: 72px;
    flex-direction: row;
    justify-content: flex-start;
    text-align: left;
  }

  .mobile-bottom-nav {
    position: fixed;
    z-index: 60;
    right: 0;
    bottom: 0;
    left: 0;
    min-height: 66px;
    padding: 6px max(8px, env(safe-area-inset-right)) max(6px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    border-top: 1px solid var(--line);
    background: var(--surface);
  }

  .mobile-bottom-nav button {
    min-width: 0;
    min-height: 52px;
    display: grid;
    place-items: center;
    gap: 1px;
    border: 0;
    border-radius: 8px;
    color: var(--muted);
    background: transparent;
    font-size: 11px;
  }

  .mobile-bottom-nav button span { font-size: 19px; }
  .mobile-bottom-nav button.active { color: #fff; background: var(--green); }

  .toast {
    position: fixed;
    bottom: 76px;
    max-width: calc(100% - 24px);
  }

  .parent-pin-gate {
    position: fixed;
  }
}
