:root {
  --bg: #f3f6fb;
  --surface: #fff;
  --ink: #183247;
  --muted: #5c6d7e;
  --line: #dde5ed;
  --blue: #2858d6;
  --blue-dark: #1c42ab;
  --blue-soft: #eaf0ff;
  --yellow: #ffe588;
  --mint: #ddf1e8;
  --peach: #f8d6c8;
  --error: #9c3427;
  --radius: 24px;
  --font: "Avenir Next", Avenir, "Segoe UI", system-ui, sans-serif;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: anywhere;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: wait;
  opacity: 0.6;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  color: inherit;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 4px;
}
button svg,
svg.icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}
svg.icon {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: middle;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: clamp(32px, 4vw, 46px);
  font-weight: 750;
  letter-spacing: -1.8px;
  line-height: 1.18;
}
h2 {
  font-size: 21px;
  letter-spacing: -0.5px;
  line-height: 1.3;
}
h3 {
  font-size: 17px;
  letter-spacing: -0.2px;
  line-height: 1.4;
}
[hidden] {
  display: none !important;
}
.session-shield {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 24px;
  text-align: center;
}
.skip {
  position: fixed;
  top: -100px;
  left: 16px;
  background: white;
  padding: 12px;
  z-index: 100;
}
.skip:focus {
  top: 10px;
}
.topbar {
  min-height: 100px;
  max-width: 1200px;
  margin: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 28px;
  padding: env(safe-area-inset-top, 0px) calc(32px + env(safe-area-inset-right, 0px)) 0 calc(32px + env(safe-area-inset-left, 0px));
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 32px;
  letter-spacing: -1.6px;
  font-weight: 800;
  min-height: 44px;
  overflow-wrap: normal;
}
.brand img {
  border-radius: 12px;
}
.brand-dot {
  color: var(--blue);
}
.brand-caption {
  font-size: 14px;
  color: var(--muted);
}
.header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 14px;
}
.sync-label {
  font-size: 12px;
  color: var(--muted);
}
.icon-button {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 50%;
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.icon-button:hover {
  background: var(--blue-soft);
}
.main-nav {
  max-width: 1136px;
  margin: auto;
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  padding: 0 0 16px;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 20px;
  border-radius: 14px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
  min-height: 48px;
}
.nav-link.active {
  color: var(--blue);
  background: var(--blue-soft);
}
.nav-link:hover {
  background: var(--surface);
}
.view {
  max-width: 1200px;
  margin: auto;
  padding: 36px calc(32px + env(safe-area-inset-right, 0px)) 60px calc(32px + env(safe-area-inset-left, 0px));
  min-height: 60vh;
  outline: none;
}
.page-heading {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  margin-bottom: 28px;
}
.page-heading > div:first-child {
  min-width: 0;
  flex: 1 1 16ch;
}
.page-heading p {
  color: var(--muted);
  margin-top: 8px;
}
.date-label {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 8px;
}
.heading-art {
  height: 64px;
  width: 64px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--yellow);
  color: var(--ink);
  transform: rotate(-8deg);
  flex-shrink: 0;
}
.heading-art svg {
  width: 34px;
  height: 34px;
}
.child-switcher {
  display: flex;
  gap: 8px;
  overflow: auto;
  padding: 2px 4px 14px;
  margin: 0 -4px 14px;
  scrollbar-width: none;
}
.child-button {
  background: white;
  border: 1px solid var(--line);
  padding: 8px 16px 8px 8px;
  border-radius: 100px;
  display: flex;
  align-items: center;
  gap: 9px;
  white-space: nowrap;
  min-height: 48px;
  font-size: 14px;
  font-weight: 650;
}
.child-button.active {
  background: var(--ink);
  border-color: var(--ink);
  color: white;
}
.avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  font-size: 12px;
  font-weight: 750;
  flex-shrink: 0;
  background: var(--blue-soft);
  color: var(--blue-dark);
}
.avatar.all {
  background: var(--blue-soft);
}
.avatar.all svg {
  width: 18px;
  height: 18px;
}
.kid-0 {
  background: #e7e4fa;
  color: #53439a;
}
.kid-1 {
  background: var(--mint);
  color: #236548;
}
.kid-2 {
  background: var(--peach);
  color: #87402b;
}
.kid-3 {
  background: #e0edfa;
  color: #245b8e;
}
.day-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  gap: 28px;
}
.main-column,
.aside-column {
  min-width: 0;
}
.next-up {
  background: var(--blue);
  border-radius: var(--radius);
  color: white;
  padding: 28px;
  position: relative;
  overflow: hidden;
  margin-bottom: 30px;
}
.next-up .next-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #e5ebff;
  margin-bottom: 20px;
}
.next-up h2 {
  font-size: 28px;
  letter-spacing: -0.8px;
  max-width: 80%;
  margin: 8px 0;
}
.next-up p {
  font-size: 14px;
  color: #eef2ff;
  max-width: 80%;
}
.next-up .next-time {
  font-size: 14px;
  line-height: 1.4;
  font-weight: 650;
}
.next-up .next-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid #ffffff35;
}
.next-foot span {
  font-size: 13px;
  color: #eef2ff;
}
.round-link {
  height: 44px;
  width: 44px;
  border-radius: 50%;
  background: white;
  color: var(--blue);
  display: grid;
  place-items: center;
  border: 0;
  flex-shrink: 0;
}
.next-orbit {
  position: absolute;
  right: 28px;
  top: 30px;
  width: 52px;
  height: 52px;
  border-radius: 18px;
  transform: rotate(8deg);
  display: grid;
  place-items: center;
  background: var(--yellow);
  color: var(--ink);
}
.next-orbit svg {
  width: 28px;
  height: 28px;
}
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 18px;
}
.section-head a {
  font-size: 13px;
  color: var(--blue);
  font-weight: 650;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.section-head a svg {
  width: 16px;
  height: 16px;
}
.paper {
  background: white;
  border-radius: var(--radius);
  padding: 24px;
  border: 1px solid #e5ebf2;
}
.agenda {
  position: relative;
}
.agenda-row {
  display: grid;
  grid-template-columns: minmax(4.75ch, max-content) 16px minmax(0, 1fr);
  gap: 12px;
  position: relative;
  padding: 0 0 26px;
}
.agenda-row:last-child {
  padding-bottom: 0;
}
.agenda-time {
  font-size: 14px;
  font-weight: 700;
  padding-top: 1px;
  font-variant-numeric: tabular-nums;
}
.agenda-time small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}
.agenda-track {
  position: relative;
}
.agenda-track:after {
  content: "";
  width: 2px;
  background: var(--line);
  position: absolute;
  left: 6px;
  top: 16px;
  bottom: -18px;
}
.agenda-row:last-child .agenda-track:after {
  display: none;
}
.agenda-track:before {
  content: "";
  display: block;
  width: 10px;
  height: 10px;
  border: 3px solid white;
  outline: 1px solid var(--line);
  border-radius: 50%;
  background: #90a0b5;
  margin-top: 6px;
}
.agenda-row.current .agenda-track:before {
  background: var(--blue);
  outline-color: var(--blue);
}
.agenda-text {
  min-width: 0;
}
.agenda-text h3 {
  font-size: 15px;
}
.agenda-text p {
  font-size: 13px;
  color: var(--muted);
  margin-top: 3px;
}
.agenda-text .tag {
  margin-top: 8px;
}
.tag {
  font-size: 11px;
  font-weight: 650;
  padding: 3px 8px;
  border-radius: 7px;
  display: inline-flex;
  gap: 5px;
  align-items: center;
  background: var(--bg);
  color: var(--muted);
}
.tag.wilma {
  background: var(--blue-soft);
  color: var(--blue-dark);
}
.tag.transparent_classroom {
  background: var(--mint);
  color: #236548;
}
.tag.myclub {
  background: var(--peach);
  color: #87402b;
}
.tag.attention {
  background: #fff2cb;
  color: #775712;
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}
.text-button {
  border: 0;
  background: none;
  padding: 10px 0;
  min-height: 44px;
  color: var(--blue);
  font-weight: 650;
  font-size: 14px;
}
.aside-column > section {
  margin-bottom: 28px;
}
.message-preview {
  background: white;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px;
  margin-bottom: 12px;
  width: 100%;
  text-align: left;
  display: block;
}
.message-preview:hover {
  border-color: #a3b6da;
}
.message-preview h3 {
  font-size: 16px;
  margin: 12px 0 7px;
}
.message-preview .preview {
  font-size: 13px;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.message-preview .message-meta {
  font-size: 12px;
  color: var(--muted);
  margin-top: 14px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.week-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(max-content, 1fr));
  gap: 8px;
  margin: 18px -4px 22px;
  overflow-x: auto;
  padding: 4px 4px 8px;
}
.week-day {
  border: 0;
  border-radius: 13px;
  min-height: 70px;
  min-width: 44px;
  padding: 7px 1px;
  background: transparent;
  text-align: center;
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 2px;
}
.week-day span {
  font-size: 11px;
  color: var(--muted);
}
.week-day b {
  font-size: 17px;
  white-space: nowrap;
}
.week-day.today {
  background: var(--blue);
  color: white;
}
.week-day.today span {
  color: #e5ebff;
}
.week-day.selected:not(.today) {
  background: var(--blue-soft);
  outline: 1px solid var(--blue);
}
.week-dot {
  display: block;
  width: 4px;
  height: 4px;
  background: currentColor;
  border-radius: 50%;
  margin-top: 3px;
}
.upcoming-row {
  display: flex;
  gap: 14px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  align-items: start;
}
.date-stamp {
  width: 42px;
  flex-shrink: 0;
  text-align: center;
  font-size: 22px;
  font-weight: 750;
  line-height: 1.1;
  padding-top: 3px;
  min-width: 0;
}
.date-stamp small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
  margin-top: 5px;
}
.upcoming-row h3 {
  font-size: 14px;
}
.upcoming-row p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
}
.source-list {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  padding: 20px 0;
  font-size: 12px;
  color: var(--muted);
}
.source-status {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}
.status-dot {
  height: 6px;
  width: 6px;
  background: #438565;
  border-radius: 50%;
  display: inline-block;
}
.source-status.issue .status-dot {
  background: #ba5c21;
}
.source-status.issue {
  color: #915018;
}
.empty {
  padding: 30px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}
.empty svg {
  display: block;
  width: 30px;
  height: 30px;
  margin: 0 auto 12px;
  color: var(--blue);
}
.empty h2,
.empty h3 {
  color: var(--ink);
  margin-bottom: 8px;
  font-size: 17px;
  line-height: 1.4;
}
.empty p {
  max-width: 380px;
  margin: auto;
}
.error-panel {
  border: 1px solid #e5c6aa;
  background: #fff8ec;
  padding: 18px 20px;
  border-radius: 16px;
  margin-bottom: 20px;
  font-size: 14px;
  color: #714a1e;
}
.error-panel p {
  margin: 5px 0 0;
}
.error-panel input {
  max-width: 180px;
}
.connection {
  background: #fff2cb;
  color: #684d12;
  padding: 12px 24px;
  text-align: center;
  font-size: 14px;
}
.filter-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.search-field {
  position: relative;
  flex: 1;
  min-width: 180px;
}
.search-field svg {
  position: absolute;
  left: 15px;
  top: 15px;
  color: var(--muted);
}
.search-field input {
  width: 100%;
  padding-left: 46px;
}
.input,
select {
  border: 1px solid #cbd6e3;
  background: white;
  color: var(--ink);
  min-height: 50px;
  border-radius: 13px;
  padding: 12px 14px;
  width: 100%;
}
.filter-row select {
  width: auto;
  max-width: 100%;
  height: 3.125em;
}
.field-label {
  font-size: 13px;
  font-weight: 650;
  display: block;
  margin-bottom: 7px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.feed-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 20px;
}
.group-label {
  font-size: 14px;
  color: var(--muted);
  font-weight: 600;
  margin: 24px 0 14px;
}
.group-label:first-child {
  margin-top: 0;
}
.calendar-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}
.calendar-layout .paper {
  position: sticky;
  top: 24px;
}
.calendar-event {
  display: flex;
  align-items: start;
  gap: 20px;
  padding: 22px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 18px;
  margin: 0 0 12px;
}
.calendar-event .event-main {
  flex: 1;
  min-width: 0;
}
.calendar-event h3 {
  font-size: 16px;
  margin: 0 0 8px;
}
.calendar-event p {
  font-size: 13px;
  color: var(--muted);
  margin-top: 8px;
}
.calendar-event .event-time {
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
}
.calendar-note {
  font-size: 12px;
  color: var(--muted);
  margin-top: 12px;
}
.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}
.settings-grid .paper > p {
  color: var(--muted);
  font-size: 14px;
  margin: 12px 0 20px;
}
.settings-grid .paper > h2 {
  display: flex;
  gap: 10px;
  align-items: center;
}
.button {
  min-height: 48px;
  border: 1px solid transparent;
  background: var(--blue);
  color: white;
  padding: 12px 20px;
  border-radius: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 700;
}
.button:hover {
  background: var(--blue-dark);
}
.button.secondary {
  background: white;
  color: var(--ink);
  border-color: #cbd6e3;
}
.button.secondary:hover {
  background: var(--bg);
}
.button.danger {
  background: #fff0ec;
  color: var(--error);
  border-color: #eed2ca;
}
.settings-row {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  font-size: 14px;
}
.settings-row > div {
  min-width: 0;
}
.settings-row .avatar {
  width: 40px;
  height: 40px;
}
.settings-row small {
  display: block;
  font-size: 12px;
  color: var(--muted);
}
.settings-row .row-end {
  margin-left: auto;
}
.install-steps {
  font-size: 14px;
  color: var(--muted);
  padding-left: 22px;
  margin: 16px 0;
}
.install-steps li {
  margin: 10px 0;
}
.page-footer {
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  padding: 0 24px 32px;
}
.toast {
  position: fixed;
  left: 50%;
  bottom: 30px;
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  background: var(--ink);
  color: white;
  font-size: 14px;
  padding: 14px 22px;
  border-radius: 14px;
  box-shadow: 0 8px 30px #18324720;
  max-width: calc(100vw - 32px);
  width: max-content;
  z-index: 100;
  transition:
    opacity 0.2s,
    transform 0.2s;
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
.loading-state {
  padding: 90px 24px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}
.loader {
  display: inline-block;
  border: 2px solid var(--line);
  border-top-color: var(--blue);
  border-radius: 50%;
  width: 26px;
  height: 26px;
  animation: rotate 1s linear infinite;
  margin-bottom: 12px;
}
.spinning svg {
  animation: rotate 1s linear infinite;
}
@keyframes rotate {
  to {
    transform: rotate(360deg);
  }
}
.login-screen {
  position: fixed;
  inset: 0;
  overflow: auto;
  background: var(--bg);
  z-index: 50;
  padding: calc(40px + env(safe-area-inset-top, 0px)) calc(24px + env(safe-area-inset-right, 0px)) calc(40px + var(--safe-bottom)) calc(24px + env(safe-area-inset-left, 0px));
  display: grid;
  place-items: center;
}
.login-card {
  width: 100%;
  max-width: 980px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: white;
  border-radius: 32px;
  overflow: hidden;
  border: 1px solid var(--line);
  min-height: 560px;
}
.login-story {
  padding: 48px;
  background: var(--blue);
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}
.login-story .brand-dot {
  color: var(--yellow);
}
.login-story .brand img {
  border: 1px solid #ffffff35;
}
.login-story h1 {
  font-size: 46px;
  letter-spacing: -1.8px;
  line-height: 1.12;
  margin-top: 40px;
}
.login-story p {
  font-size: 15px;
  line-height: 1.7;
  color: #e8edff;
  margin: 20px 0;
  max-width: 280px;
}
.family-glyph {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  align-items: end;
  height: 90px;
}
.family-glyph span {
  display: block;
  border-radius: 50% 50% 12px 12px;
  width: 48px;
  height: 68px;
  background: var(--yellow);
  position: relative;
}
.family-glyph span:before {
  content: "";
  position: absolute;
  left: 20px;
  top: 18px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ink);
}
.family-glyph span:nth-child(2) {
  height: 90px;
  background: var(--mint);
  transform: rotate(6deg);
}
.family-glyph span:nth-child(3) {
  height: 55px;
  background: var(--peach);
  transform: rotate(-6deg);
}
.family-glyph span:nth-child(4) {
  height: 75px;
  background: #d9d6f3;
}
.login-form {
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.login-form h2 {
  font-size: 27px;
  margin-bottom: 12px;
  letter-spacing: -0.8px;
}
.login-form > p {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 28px;
}
.login-form .button {
  width: 100%;
}
.login-form .input {
  margin-bottom: 14px;
}
.login-form .key-details {
  border-top: 1px solid var(--line);
  margin-top: 24px;
  padding-top: 20px;
}
.key-details summary {
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  min-height: 44px;
}
.key-details p {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 20px;
}
.login-hint {
  font-size: 13px;
  color: var(--muted);
  margin-top: 20px;
  line-height: 1.6;
}
.login-error {
  font-size: 13px;
  color: var(--error);
  min-height: 24px;
  margin-top: 12px;
}
.secure-caption {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  gap: 7px;
  align-items: center;
  margin-top: 30px;
}
.secure-caption svg {
  width: 16px;
  height: 16px;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 0;
  max-width: 620px;
  width: calc(100% - 32px);
  color: var(--ink);
  max-height: 85dvh;
  box-shadow: 0 24px 100px #18324730;
}
body.dialog-open {
  overflow: hidden;
}
dialog::backdrop {
  background: #18324770;
  backdrop-filter: blur(4px);
}
.dialog-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 24px 16px;
  position: sticky;
  top: 0;
  background: white;
  border-bottom: 1px solid var(--line);
}
.dialog-head h2 {
  margin-top: 10px;
  font-size: 21px;
}
.dialog-body {
  padding: 24px;
  white-space: pre-wrap;
  font-size: 15px;
  overflow-wrap: anywhere;
  line-height: 1.75;
}
.dialog-meta {
  padding: 0 24px 20px;
  color: var(--muted);
  font-size: 12px;
}
.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}
.no-script {
  position: fixed;
  bottom: 0;
  background: white;
  padding: 20px;
  z-index: 200;
}
.retry-panel {
  max-width: 500px;
  margin: 40px auto;
}
.update-button {
  margin-left: 10px;
  font: inherit;
  color: inherit;
  text-decoration: underline;
  border: 0;
  background: none;
  min-height: 40px;
}
.notice {
  font-size: 13px;
  padding: 14px 18px;
  background: var(--blue-soft);
  border-radius: 14px;
  margin-bottom: 20px;
  color: var(--blue-dark);
}
@media (min-width: 1400px) {
  .topbar {
    min-height: 116px;
  }
  .view {
    padding-top: 44px;
  }
  .day-layout {
    gap: 36px;
  }
  .next-up {
    padding: 32px;
  }
}
@media (max-width: 900px) {
  .main-nav {
    margin: 0 24px;
  }
  .topbar {
    padding: env(safe-area-inset-top, 0px) calc(24px + env(safe-area-inset-right, 0px)) 0 calc(24px + env(safe-area-inset-left, 0px));
  }
  .view {
    padding: 28px calc(24px + env(safe-area-inset-right, 0px)) 40px calc(24px + env(safe-area-inset-left, 0px));
  }
  .day-layout {
    gap: 20px;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  }
  .next-up {
    padding: 24px;
  }
  .next-up h2 {
    font-size: 25px;
  }
  .calendar-layout {
    grid-template-columns: 260px minmax(0, 1fr);
  }
  .brand-caption {
    display: none;
  }
}
@media (max-width: 680px) {
  body {
    font-size: 15px;
  }
  .topbar {
    min-height: 80px;
    padding: env(safe-area-inset-top, 0px) calc(20px + env(safe-area-inset-right, 0px)) 0 calc(20px + env(safe-area-inset-left, 0px));
    gap: 12px;
  }
  .brand {
    font-size: 28px;
    gap: 9px;
  }
  .brand img {
    width: 34px;
    height: 34px;
  }
  .sync-label {
    font-size: 10px;
    max-width: 100px;
    text-align: right;
  }
  .header-actions {
    gap: 10px;
    flex: 1 1 120px;
    min-width: 0;
    justify-content: flex-end;
  }
  .icon-button {
    width: 44px;
    height: 44px;
  }
  .main-nav {
    position: fixed;
    z-index: 20;
    bottom: 0;
    left: 0;
    right: 0;
    max-width: none;
    margin: 0;
    border-top: 1px solid var(--line);
    border-bottom: 0;
    padding: 8px calc(8px + env(safe-area-inset-right, 0px)) calc(8px + var(--safe-bottom)) calc(8px + env(safe-area-inset-left, 0px));
    background: #fffffff5;
    backdrop-filter: blur(18px);
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
  }
  .nav-link {
    flex-direction: column;
    gap: 5px;
    padding: 7px 2px;
    font-size: 11px;
    line-height: 1.2;
    border-radius: 13px;
    min-height: 54px;
  }
  .nav-link svg {
    width: 22px;
    height: 22px;
  }
  .view {
    padding: 20px calc(20px + env(safe-area-inset-right, 0px)) 36px calc(20px + env(safe-area-inset-left, 0px));
    min-height: 60vh;
  }
  .page-heading {
    margin-bottom: 24px;
    align-items: center;
  }
  .page-heading p {
    font-size: 13px;
    margin-top: 7px;
  }
  .date-label {
    font-size: 12px;
    margin-bottom: 7px;
  }
  h1 {
    font-size: 33px;
    letter-spacing: -1.2px;
  }
  .heading-art {
    width: 48px;
    height: 48px;
  }
  .heading-art svg {
    width: 26px;
    height: 26px;
  }
  .child-switcher {
    margin-right: -20px;
    padding-right: 20px;
    margin-bottom: 10px;
  }
  .child-button {
    font-size: 13px;
    padding-right: 14px;
  }
  .day-layout {
    display: block;
  }
  .next-up {
    padding: 24px;
    border-radius: 22px;
    margin-bottom: 26px;
  }
  .next-up h2 {
    font-size: 27px;
    max-width: 84%;
    letter-spacing: -0.6px;
  }
  .next-up .next-label {
    margin-bottom: 18px;
    font-size: 12px;
  }
  .next-orbit {
    width: 44px;
    height: 44px;
    top: 22px;
    right: 24px;
  }
  .next-orbit svg {
    width: 25px;
    height: 25px;
  }
  .next-foot {
    margin-top: 22px !important;
  }
  .section-head {
    margin-bottom: 12px;
  }
  .section-head h2 {
    font-size: 20px;
  }
  .paper {
    padding: 20px;
    border-radius: 22px;
  }
  .main-column > section {
    margin-bottom: 28px;
  }
  .aside-column > section {
    margin-bottom: 26px;
  }
  .agenda-row {
    grid-template-columns: minmax(4.75ch, max-content) 14px minmax(0, 1fr);
    gap: 10px;
    padding-bottom: 25px;
  }
  .agenda-text h3 {
    font-size: 15px;
  }
  .agenda-time {
    font-size: 13px;
  }
  .agenda-time small {
    font-size: 10px;
  }
  .source-list {
    padding: 16px 0 8px;
    gap: 12px;
    font-size: 11px;
  }
  .feed-grid {
    display: block;
  }
  .filter-row {
    gap: 8px;
  }
  .search-field {
    flex-basis: 100%;
  }
  .filter-row select {
    flex: 1;
    width: 0;
    min-width: 0;
    font-size: 13px;
  }
  .message-preview {
    padding: 18px;
    border-radius: 17px;
  }
  .message-preview h3 {
    font-size: 16px;
  }
  .calendar-layout {
    display: block;
  }
  .calendar-layout > .paper {
    position: static;
    margin-bottom: 24px;
  }
  .calendar-event {
    gap: 14px;
    padding: 18px;
    position: relative;
  }
  .calendar-event .event-time {
    font-size: 12px;
  }
  .calendar-event h3 {
    font-size: 15px;
  }
  .settings-grid {
    display: block;
  }
  .settings-grid > .paper {
    margin-bottom: 20px;
  }
  .page-footer {
    padding-bottom: calc(110px + var(--safe-bottom));
    font-size: 11px;
  }
  .toast {
    bottom: calc(94px + var(--safe-bottom));
    font-size: 13px;
    padding: 13px 18px;
  }
  .login-screen {
    padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) 0 env(safe-area-inset-left, 0px);
    display: block;
  }
  .login-card {
    border: 0;
    border-radius: 0;
    display: block;
    min-height: 100dvh;
  }
  .login-story {
    /* Reserve a separate row for the family illustration as text wraps. */
    padding: 30px 28px 96px;
    min-height: 290px;
    border-radius: 0 0 32px 32px;
  }
  .login-story .brand {
    font-size: 27px;
  }
  .login-story h1 {
    font-size: 37px;
    line-height: 1.1;
    margin-top: 28px;
    max-width: 270px;
  }
  .login-story p {
    font-size: 13px;
    max-width: 230px;
    margin: 14px 0 0;
  }
  .family-glyph {
    position: absolute;
    right: 24px;
    bottom: 26px;
    gap: 5px;
    height: 70px;
    transform: scale(0.75);
    transform-origin: bottom right;
  }
  .family-glyph span {
    width: 34px;
    height: 48px;
  }
  .family-glyph span:before {
    left: 14px;
    top: 15px;
  }
  .family-glyph span:nth-child(2) {
    height: 65px;
  }
  .family-glyph span:nth-child(3) {
    height: 38px;
  }
  .family-glyph span:nth-child(4) {
    height: 53px;
  }
  .login-form {
    padding: 32px 28px calc(32px + var(--safe-bottom));
    max-width: 450px;
    margin: auto;
  }
  .login-form h2 {
    font-size: 24px;
  }
  .login-form > p {
    margin-bottom: 22px;
  }
  .secure-caption {
    margin-top: 24px;
  }
  .connection {
    font-size: 12px;
    padding: 10px 20px;
  }
  .dialog-head {
    padding: 20px 20px 16px;
  }
  .dialog-head h2 {
    font-size: 19px;
  }
  .dialog-body {
    padding: 20px;
    font-size: 16px;
  }
  dialog {
    max-height: 88dvh;
  }
  .dialog-meta {
    padding: 0 20px 20px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
@media (forced-colors: active) {
  .nav-link.active,
  .child-button.active {
    outline: 2px solid Highlight;
  }
  .agenda-track:before,
  .status-dot {
    background: CanvasText;
  }
  .button {
    border: 1px solid ButtonText;
  }
}
/* Keep form controls at 16px on iOS to avoid zooming during one-handed entry. */
input,
select,
.filter-row select {
  font-size: 16px;
}
.message-meta svg {
  width: 14px;
  height: 14px;
}

/* Durable family records: the action sits outside the card's open-message button. */
.message-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  margin-bottom: 12px;
  overflow: hidden;
  min-width: 0;
}
.message-card .message-preview {
  border: 0;
  border-radius: 17px 17px 0 0;
  margin: 0;
  padding-bottom: 14px;
}
.message-card .message-preview:hover { background: var(--blue-soft); }
.message-actions, .event-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.message-actions { padding: 0 16px 10px; }
.event-actions { margin-top: 10px; }
.pin-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  min-width: 44px;
  padding: 8px 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}
.pin-button .icon { width: 18px; height: 18px; }
.pin-button:hover { background: var(--blue-soft); color: var(--blue); }
.pin-button.is-pinned { background: var(--blue-soft); color: var(--blue); }
.pin-button.is-pinned > .icon:first-child { fill: currentColor; fill-opacity: .13; }
.pin-caption, .pin-help { color: var(--muted); font-size: 12px; }
.dialog-pin {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 24px 24px;
  border-top: 1px solid var(--line);
}
.dialog-pin .pin-button { flex-shrink: 0; }
.dialog-pin .pin-help { margin: 0; }
.saved-intro {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 22px;
  margin-bottom: 28px;
  background: var(--blue-soft);
  border-radius: 18px;
}
.saved-mark { color: var(--blue); padding-top: 3px; }
.saved-intro h2 { font-size: 18px; margin: 0 0 8px; }
.saved-intro p { color: var(--muted); font-size: 14px; margin: 0; }
.saved-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.saved-layout > section { min-width: 0; }
.section-title { display: flex; align-items: center; gap: 10px; font-size: 19px; margin-bottom: 16px; }
.section-title > span {
  font-size: 12px;
  padding: 3px 8px;
  background: var(--blue-soft);
  color: var(--blue);
  border-radius: 20px;
}
.saved-empty-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; }
.sync-notice {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 16px 20px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 16px;
  margin-bottom: 24px;
  font-size: 14px;
}
.sync-notice .loader { flex-shrink: 0; width: 20px; height: 20px; margin: 0; }
.sync-notice p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.storage-summary { padding: 16px; background: var(--blue-soft); border-radius: 14px; }
.storage-summary > p { font-size: 14px; margin: 0; color: var(--muted); }
.storage-summary .text-button { display: inline-flex; align-items: center; gap: 8px; }
@media (max-width: 680px) {
  .main-nav { gap: 2px; }
  .nav-link { overflow-wrap: anywhere; text-align: center; }
  .saved-layout { display: block; }
  .saved-layout > section + section { margin-top: 28px; }
  .saved-intro { padding: 18px; gap: 12px; }
  .saved-intro h2 { font-size: 17px; }
  .dialog-pin { padding: 16px 20px 20px; flex-wrap: wrap; gap: 8px; }
  .calendar-event { flex-wrap: wrap; }
  .calendar-event .event-main { min-width: 120px; }
  .calendar-event .event-time { flex-basis: 100%; text-align: right; }
}

.detail-copy { padding: 0 24px 16px; }
.detail-copy > p { color: var(--muted); font-size: 13px; margin: 0; }
.detail-copy .text-button { display: inline-flex; align-items: center; gap: 8px; min-width: 44px; }
.detail-copy .login-error:not(:empty) { margin: 8px 0 0; }
@media (max-width: 680px) { .detail-copy { padding: 0 20px 16px; } }

/* Contextual assistant: a phone sheet and a desktop drawer. */
.header-assistant { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 8px 13px; border: 1px solid var(--line); border-radius: 24px; background: white; color: var(--blue); font-size: 13px; font-weight: 650; }
.header-assistant .icon { width: 19px; height: 19px; }
.header-assistant:hover { border-color: var(--blue); background: var(--blue-soft); }
.assistant-entry { display: flex; width: 100%; text-align: left; align-items: center; gap: 14px; min-height: 76px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 15px 20px; margin: 0 0 28px; color: var(--ink); }
.assistant-entry-icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; background: var(--blue-soft); color: var(--blue); flex-shrink: 0; }
.assistant-entry > span:nth-child(2) { flex: 1; min-width: 0; }
.assistant-entry strong { display: block; font-size: 16px; }
.assistant-entry small { display: block; color: var(--muted); font-size: 13px; margin-top: 3px; }
.assistant-entry:hover { border-color: var(--blue); }
#assistantDialog { position: fixed; inset: auto 0 0; margin: 0; width: 100%; max-width: none; height: 90dvh; max-height: 100dvh; border: 1px solid var(--line); border-bottom: 0; border-radius: 24px 24px 0 0; padding: 0; background: var(--bg); overflow: hidden; box-shadow: 0 -12px 64px #18324720; }
#assistantDialog::backdrop { background: #18324738; backdrop-filter: blur(1px); }
dialog[hidden]::backdrop { display: none; }
#assistantPanelContent { height: 100%; min-height: 0; display: flex; flex-direction: column; }
.assistant-panel-head { flex: 0 0 auto; display: flex; align-items: center; gap: 11px; background: white; padding: 16px 18px 14px; border-bottom: 1px solid var(--line); }
.assistant-panel-mark { width: 38px; height: 38px; border-radius: 13px; display: grid; place-items: center; color: var(--blue); background: var(--blue-soft); flex-shrink: 0; }
.assistant-panel-head > div { flex: 1; min-width: 0; }
.assistant-panel-head h2 { font-size: 17px; letter-spacing: -.4px; }
.assistant-panel-head p { color: var(--muted); font-size: 12px; margin-top: 2px; }
#closeAssistant { flex-shrink: 0; background: var(--bg); border-color: transparent; }
#assistantScroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 22px 20px 14px; scrollbar-gutter: stable; }
.assistant-intro { color: var(--ink); font-size: 20px; font-weight: 650; line-height: 1.5; letter-spacing: -.4px; }
.assistant-intro span { color: var(--muted); font-size: 14px; font-weight: 400; letter-spacing: 0; }
.assistant-prompts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 20px 0 18px; }
.assistant-chip { min-height: 44px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: white; color: var(--ink); font-size: 13px; font-weight: 600; text-align: left; }
.assistant-chip:hover { background: var(--blue-soft); color: var(--blue); border-color: var(--blue); }
.assistant-context, .assistant-privacy { border-top: 1px solid var(--line); }
.assistant-context > summary, .assistant-privacy > summary { cursor: pointer; min-height: 44px; padding: 12px 0; color: var(--muted); font-size: 12px; font-weight: 600; }
.assistant-context > summary { display: flex; align-items: center; gap: 9px; }
.assistant-context > summary::after { content: "+"; margin-left: auto; font-size: 19px; flex-shrink: 0; }
.assistant-context[open] > summary::after { content: "−"; }
.assistant-context > summary .icon { width: 17px; height: 17px; }
.assistant-context-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 6px 0 16px; }
.assistant-context-grid > div:first-child, .assistant-record { grid-column: 1 / -1; min-width: 0; }
.assistant-context-grid select, .assistant-context-grid input { width: 100%; min-width: 0; max-width: 100%; font-size: 16px; min-height: 44px; }
.assistant-context-grid .field-label { font-size: 12px; }
.assistant-context-grid > div { min-width: 0; }
.assistant-privacy p { color: var(--muted); font-size: 12px; line-height: 1.65; margin: 0 0 12px; }
.assistant-composer { flex: 0 0 auto; background: white; border-top: 1px solid var(--line); padding: 6px 20px calc(16px + var(--safe-bottom)); max-height: 60%; overflow-y: auto; overscroll-behavior: contain; }
.assistant-input-box { display: flex; align-items: flex-end; gap: 4px; border: 1px solid var(--line); border-radius: 18px; background: var(--bg); padding: 6px; }
.assistant-input-box:focus-within { outline: 2px solid var(--blue); outline-offset: 2px; }
.assistant-question { display: block; flex: 1 1 auto; width: 100%; min-width: 0; resize: none; height: 66px; min-height: 66px; max-height: 120px; border: 0; font-family: inherit; line-height: 1.45; font-size: 16px; padding: 7px 6px; border-radius: 12px; background: transparent; color: var(--ink); }
.assistant-question:focus-visible { outline: none; }
.assistant-consent { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; font-size: 12px; line-height: 1.45; color: var(--muted); cursor: pointer; min-height: 44px; }
.assistant-consent input { width: 20px; height: 20px; flex-shrink: 0; margin: 2px 0 0; accent-color: var(--blue); }
.assistant-send { flex: 0 0 48px; width: 48px; height: 48px; display: grid; place-items: center; background: var(--blue); color: white; border: 0; border-radius: 13px; }
.assistant-send .icon { transform: rotate(-90deg); }
.assistant-send:hover { background: var(--blue-dark); }
.assistant-stop { min-height: 48px; flex-shrink: 0; padding: 8px 12px; font-size: 13px; }
.assistant-composer .login-error { font-size: 12px; margin: 0 0 10px; min-height: 0; }
.assistant-composer .login-error:empty { display: none; }
.assistant-availability { display: flex; align-items: center; gap: 12px; padding: 12px; margin: 12px 0; border-radius: 12px; background: var(--blue-soft); }
.assistant-availability > .icon { flex-shrink: 0; }
.assistant-availability p { font-size: 13px; color: var(--muted); margin: 0; }
.assistant-availability .loader { width: 20px; height: 20px; margin: 0; flex-shrink: 0; }
.assistant-working { display: flex; gap: 12px; align-items: center; padding: 12px 0 28px; }
.assistant-working .loader { margin: 0; width: 24px; height: 24px; flex-shrink: 0; }
.assistant-working h3 { font-size: 16px; }
.assistant-working p { color: var(--muted); font-size: 12px; margin-top: 4px; }
.assistant-eyebrow { display: flex; align-items: center; gap: 8px; color: var(--blue); font-size: 12px; font-weight: 700; }
.assistant-answer h2 { font-size: 16px; line-height: 1.5; margin: 14px 0; padding: 12px 14px; border-radius: 14px; background: var(--blue-soft); }
.assistant-answer-text { white-space: pre-wrap; font-size: 16px; line-height: 1.75; overflow-wrap: anywhere; }
.assistant-answer-note { color: var(--muted); font-size: 11px; margin: 14px 0 18px; }
.assistant-warning { display: flex; align-items: flex-start; gap: 9px; font-size: 12px; padding: 12px; margin: 14px 0 0; border-radius: 12px; background: #fff4db; }
.assistant-warning .icon { flex-shrink: 0; width: 18px; height: 18px; }
.assistant-sources { margin-top: 24px; }
.assistant-sources > h2 { font-size: 15px; margin-bottom: 6px; }
.assistant-sources > p { color: var(--muted); font-size: 12px; margin: 0 0 12px; }
.assistant-source { display: block; text-align: left; width: 100%; background: white; border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin-bottom: 10px; }
.assistant-source:hover { border-color: var(--blue); }
.assistant-source-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 11px; margin-bottom: 10px; }
.assistant-source > strong { display: block; color: var(--ink); font-size: 14px; }
.assistant-source-preview { display: block; color: var(--muted); font-size: 12px; margin-top: 6px; }
.assistant-source-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; color: var(--blue); font-size: 11px; margin-top: 12px; }
.assistant-back { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin: -6px 0 18px; }
.assistant-back .icon { transform: rotate(180deg); }
.assistant-source-heading h3 { margin-top: 12px; font-size: 19px; }
.assistant-source-body { white-space: pre-wrap; font-size: 16px; line-height: 1.75; margin: 20px 0; overflow-wrap: anywhere; }
.dialog-assistant { padding: 0 24px 14px; }
.dialog-assistant .text-button { display: inline-flex; align-items: center; gap: 8px; }
@media (min-width: 681px) {
  #assistantDialog { inset: 16px 16px 16px auto; width: 440px; max-width: calc(100% - 32px); height: calc(100dvh - 32px); max-height: calc(100dvh - 32px); border-bottom: 1px solid var(--line); border-radius: 24px; box-shadow: -16px 0 64px #18324720; }
}
@media (max-width: 680px) {
  .topbar { flex-wrap: nowrap; gap: 8px; padding-left: calc(16px + env(safe-area-inset-left, 0px)); padding-right: calc(16px + env(safe-area-inset-right, 0px)); }
  .brand { font-size: 26px; gap: 7px; }
  .brand img { width: 30px; height: 30px; }
  .header-actions { flex: 1 1 auto; display: grid; grid-template-columns: auto 44px; column-gap: 8px; row-gap: 0; margin: 8px 0; }
  .header-assistant { grid-column: 1; grid-row: 1; justify-self: end; padding: 8px 9px; font-size: 12px; gap: 5px; }
  .header-assistant .icon { width: 17px; height: 17px; }
  #refreshBtn { grid-column: 2; grid-row: 1; }
  .sync-label { grid-column: 1 / -1; grid-row: 2; max-width: none; font-size: 9px; min-height: 14px; }
  .assistant-entry { padding: 14px; margin-bottom: 22px; gap: 12px; }
  .assistant-entry small { font-size: 12px; }
  .assistant-entry > .icon { width: 18px; flex-shrink: 0; }
  .assistant-panel-head { padding-left: calc(16px + env(safe-area-inset-left, 0px)); padding-right: calc(16px + env(safe-area-inset-right, 0px)); }
  #assistantScroll { padding-left: calc(18px + env(safe-area-inset-left, 0px)); padding-right: calc(18px + env(safe-area-inset-right, 0px)); }
  .assistant-composer { padding-left: calc(18px + env(safe-area-inset-left, 0px)); padding-right: calc(18px + env(safe-area-inset-right, 0px)); }
  .dialog-assistant { padding: 0 20px 14px; }
  #assistantDialog.keyboard-open { border-radius: 18px 18px 0 0; }
  .keyboard-open .assistant-panel-head { padding-top: 8px; padding-bottom: 8px; }
  .keyboard-open .assistant-composer { max-height: 72%; padding-bottom: 10px; }
  .keyboard-open .assistant-question { min-height: 60px; }
}
@media (prefers-reduced-motion: reduce) {
  #assistantDialog, #assistantDialog * { scroll-behavior: auto; }
}
.header-assistant span { white-space: nowrap; }
@media (max-width: 360px) {
  .brand { font-size: 24px; gap: 6px; }
  .brand img { width: 28px; height: 28px; }
  .header-assistant { padding-left: 8px; padding-right: 8px; }
}

/* Family assistant access, confirmed by the server before the switch changes. */
.admin-ai-card > p { margin-bottom: 18px; }
.admin-ai-toggle-row { display: flex; align-items: center; gap: 16px; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.admin-ai-toggle-row > div { flex: 1; min-width: 0; }
.admin-ai-toggle-row #memberAiLabel { display: block; font-size: 15px; font-weight: 650; }
.admin-ai-toggle-row small { display: block; margin-top: 5px; color: var(--muted); font-size: 12px; }
.admin-switch { flex: 0 0 64px; width: 64px; height: 44px; border: 0; border-radius: 22px; background: transparent; padding: 6px 2px; position: relative; }
.admin-switch::before { content: ""; position: absolute; inset: 6px 2px; border-radius: 20px; background: #8795a3; }
.admin-switch > span { position: absolute; width: 24px; height: 24px; top: 10px; left: 6px; border-radius: 50%; background: white; box-shadow: 0 1px 3px #18324730; }
.admin-switch[aria-checked="true"]::before { background: var(--blue); }
.admin-switch[aria-checked="true"] > span { left: 34px; }
.admin-switch:disabled { cursor: default; }
.admin-access { margin-top: 18px; }
.admin-access > summary { min-height: 44px; padding: 12px 0; color: var(--blue); font-size: 14px; font-weight: 650; cursor: pointer; }
.admin-access p { font-size: 13px; color: var(--muted); margin: 8px 0 14px; }
.admin-access .button { min-height: 44px; margin-top: 12px; }
.admin-access .field-label { margin-top: 16px; }
.admin-access input { width: 100%; min-width: 0; font-size: 16px; }
.admin-ai-card .admin-notice { color: var(--ink); font-size: 13px; margin: 16px 0 0; }
.admin-ai-card .admin-notice:empty, .admin-ai-card .login-error:empty { display: none; }
.admin-ai-card .admin-verify-note { font-size: 13px; margin: 14px 0 0; color: var(--muted); }

.admin-key-role { display: inline-block; margin-left: 8px; padding: 2px 7px; border-radius: 8px; background: var(--blue-soft); color: var(--blue); font-size: 11px; font-weight: 650; }
