:root {
  --primary: #1fa64a;
  --primary-ink: #fff;
  --primary-container: #d4f0dc;
  --on-primary-container: #0d3d1c;
  --accent: #c48a4a;
  --accent-ink: #fff;
  --secondary-container: #f3e4c8;
  --on-secondary-container: #3d2a12;
  --ok: #1fa64a;
  --ok-container: #d4f0dc;
  --warn: #e0a020;
  --warn-container: #fff3c4;
  --danger: #ba1a1a;
  --danger-container: #ffdad6;
  --bg: #f6f1e6;
  --surface: #f6f1e6;
  --surface-low: #f1e8d8;
  --surface-container: #ebe3d4;
  --card: #fffcf6;
  --ink: #1a1814;
  --muted: #5c574e;
  --line: #ddd4c4;
  --outline: #7d766a;
  --child-bg: #f6f1e6;
  --star: #b57a0a;
  --star-container: #fff6d4;
  --radius: 20px;
  --radius-sm: 12px;
  --tap: 48px;
  --shadow: 0 1px 2px rgba(28, 27, 22, 0.05), 0 10px 28px rgba(28, 27, 22, 0.05);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Figtree, "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.45;
  font-weight: 500;
}
.ms {
  font-family: "Material Symbols Outlined";
  font-weight: 500;
  font-style: normal;
  font-size: 22px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  direction: ltr;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "liga";
  font-variation-settings: "FILL" 0, "wght" 500, "GRAD" 0, "opsz" 24;
  user-select: none;
  width: 22px;
  height: 22px;
}
.is-on .ms,
.cabinet-tab.is-on .ms,
.child-tab.is-on .ms {
  font-variation-settings: "FILL" 1, "wght" 600, "GRAD" 0, "opsz" 24;
}
a { color: var(--primary); }
.wrap { max-width: 920px; margin: 0 auto; padding: 24px 16px 80px; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}
h1, h2 { margin: 0 0 12px; }
.muted { color: var(--muted); }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.stack { display: grid; gap: 10px; }
input:where(:not([type="checkbox"], [type="radio"], [type="hidden"], [type="file"], [type="range"], [type="button"], [type="submit"], [type="reset"])),
select,
textarea {
  font: inherit;
  border-radius: 12px;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 12px 14px;
  min-height: 48px;
  background: var(--surface-container);
  color: var(--ink);
}
input:where(:not([type="checkbox"], [type="radio"], [type="hidden"], [type="file"], [type="range"], [type="button"], [type="submit"], [type="reset"])):focus,
select:focus,
textarea:focus {
  outline: none;
  background: var(--card);
  border-bottom-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent);
}
input[type="checkbox"],
input[type="radio"] {
  width: 20px;
  height: 20px;
  margin: 0;
  padding: 0;
  min-height: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  box-shadow: none;
  accent-color: var(--primary);
  flex-shrink: 0;
}
input[type="checkbox"]:focus,
input[type="radio"]:focus,
input[type="checkbox"]:focus-visible,
input[type="radio"]:focus-visible {
  outline: none;
  box-shadow: none;
  background: transparent;
  border: 0;
}
button, .btn {
  font: inherit;
  background: var(--primary);
  color: var(--primary-ink);
  border: 0;
  min-height: var(--tap);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  font-weight: 650;
  border-radius: 999px;
}
:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--primary) 45%, #fff);
  outline-offset: 2px;
}
button.secondary, .btn.secondary { background: var(--primary-container); color: var(--on-primary-container); border: 0; }
button.accent, .btn.accent { background: var(--accent); color: var(--accent-ink); }
button.ok { background: var(--ok); }
button.danger { background: var(--danger); }
.hidden { display: none !important; }
.header-tools {
  margin-left: auto;
  display: flex;
  gap: 2px;
  align-items: center;
  position: relative;
  flex-shrink: 0;
  flex-wrap: nowrap;
}
.tool-slot { position: relative; flex-shrink: 0; }
.icon-btn {
  position: relative;
  width: 44px;
  height: 44px;
  min-height: 44px;
  min-width: 44px;
  padding: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink);
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  flex-shrink: 0;
}
.icon-btn svg,
.icon-btn .ms { width: 22px; height: 22px; display: block; font-size: 22px; }
.icon-btn[aria-label]::after {
  content: attr(aria-label);
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 40;
  box-shadow: var(--shadow);
}
.icon-btn[aria-label]:hover::after,
.icon-btn[aria-label]:focus-visible::after {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.12s ease 0.28s, visibility 0s linear 0.28s;
}
.tool-slot.is-open > .icon-btn[aria-label]::after {
  opacity: 0;
  visibility: hidden;
  transition: none;
}
.header-tools > :last-child.icon-btn::after,
.header-tools > :last-child .icon-btn::after {
  left: auto;
  right: 0;
  transform: none;
}
.icon-btn:hover,
.tool-slot.is-open .icon-btn {
  background: var(--card);
  border-color: var(--line);
}
.menu-pop {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  min-width: 220px;
  box-shadow: var(--shadow);
  z-index: 30;
  padding: 6px;
}
.menu-item {
  width: 100%;
  display: flex;
  justify-content: flex-start;
  gap: 6px;
  min-height: 40px;
  background: transparent;
  color: var(--ink);
  border: 0;
  border-radius: 10px;
  padding: 0 10px;
  text-decoration: none;
  font: inherit;
  font-weight: 500;
}
.menu-item:hover { background: var(--surface-low); }
.menu-item.is-current { background: var(--primary-container); color: var(--on-primary-container); font-weight: 700; }
.menu-code { color: var(--muted); font-size: 12px; }
.menu-empty, .menu-who {
  margin: 0;
  padding: 10px 12px;
  color: var(--muted);
}
.menu-who { color: var(--ink); font-weight: 600; }
body.child .icon-btn { width: 48px; height: 48px; min-height: 48px; min-width: 48px; }
.lang { margin-left: auto; }
.nav {
  position: sticky; top: 0; z-index: 2;
  background: var(--card);
  border-bottom: 1px solid var(--line);
  padding: 10px 16px;
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
}
.nav .header-tools { margin-left: auto; }
.nav a { min-height: 40px; display: inline-flex; align-items: center; }
.big-card {
  padding: 24px;
  border-radius: 20px;
}
.big-card button { width: 100%; font-size: 1.2rem; min-height: 64px; }
.assignee { display: flex; gap: 8px; align-items: center; }
.error { color: var(--danger); }
.ok-text { color: var(--ok); }
.pill { background: var(--primary-container); color: var(--on-primary-container); border-radius: 999px; padding: 4px 10px; font-size: 13px; }
.role-gate .role-btn {
  width: 100%;
  flex-direction: column;
  gap: 4px;
  min-height: 72px;
  padding: 12px 16px;
}
.role-gate .role-btn small {
  font-weight: 400;
  opacity: 0.85;
  font-size: 0.9rem;
}
body.child .role-gate .role-btn {
  min-height: 88px;
  font-size: 1.15rem;
}
.join-box button { width: 100%; font-size: 1.15rem; min-height: 64px; }
.join-box input { min-height: 56px; font-size: 1.1rem; }
.invite-qr {
  display: block;
  width: 196px;
  height: 196px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px;
}
.profile-invite {
  display: grid;
  gap: 10px;
  justify-items: start;
}
.profile-invite .invite-qr { margin: 0; }
.profile-invite .invite-url {
  word-break: break-all;
  font-size: 13px;
}
.profile-family-actions button { width: 100%; }
.join-family-warn {
  margin: 0;
  padding: 10px 12px;
  border-radius: 16px;
  background: color-mix(in srgb, var(--warn, #c9a227) 16%, var(--surface-container));
  font-size: 0.92rem;
  line-height: 1.35;
}
.qr-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: #111;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 24px 16px 32px;
}
.qr-overlay video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.qr-overlay .qr-aim,
.qr-overlay button {
  position: relative;
  z-index: 1;
}
.qr-overlay .qr-aim {
  color: #fff;
  margin: 0;
  text-align: center;
  text-shadow: 0 1px 4px #000;
}
.qr-overlay button { min-width: 200px; }

body.parent,
body.child { padding-bottom: 0; }
body.cabinet-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--bg);
  --cabinet-top-h: 68px;
  --home-return-h: 0px;
}
body.cabinet-shell.has-home-return {
  --home-return-h: 56px;
}
body.cabinet-shell .home-return-bar {
  flex: 0 0 auto;
  width: 100%;
  order: 0;
}
.cabinet-sidebar {
  width: 248px;
  flex: 0 0 248px;
  background: var(--surface-low);
  color: var(--ink);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  align-self: flex-start;
  max-height: 100vh;
  border-right: 1px solid var(--line);
}
.cabinet-brand {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 20px 16px 18px;
  border-bottom: 1px solid var(--line);
}
.cabinet-brand img {
  width: 40px;
  height: 40px;
  border-radius: 0;
  background: transparent;
}
.cabinet-brand strong {
  font-size: 1.02rem;
  line-height: 1.25;
  font-weight: 750;
  letter-spacing: -0.02em;
}
.cabinet-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 12px;
}
.cabinet-nav button {
  position: relative;
  justify-content: flex-start;
  gap: 12px;
  width: 100%;
  min-height: 52px;
  padding: 0 14px;
  border: 0;
  border-radius: 18px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 650;
}
.cabinet-nav button svg,
.cabinet-nav button .ms {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  font-size: 22px;
}
.cabinet-nav button:hover {
  background: color-mix(in srgb, var(--primary) 8%, transparent);
  color: var(--ink);
}
.cabinet-nav button.is-on {
  background: var(--secondary-container);
  color: var(--on-secondary-container);
  font-weight: 750;
}
.cabinet-nav button[data-badge]::after {
  content: attr(data-badge);
  margin-left: auto;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  line-height: 18px;
  text-align: center;
  font-weight: 700;
}
.cabinet-stage {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
body.cabinet-shell .cabinet-body {
  display: flex;
  flex: 1;
  min-width: 0;
  min-height: 0;
  align-items: stretch;
}
body.cabinet-shell .cabinet-sidebar {
  min-height: 0;
  max-height: none;
  position: relative;
  top: auto;
  align-self: stretch;
}
body.cabinet-shell .cabinet-stage {
  min-height: 0;
}
.cabinet-top {
  position: sticky;
  top: 0;
  z-index: 12;
  background: color-mix(in srgb, var(--card) 88%, transparent);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
  padding: 10px 20px;
  display: flex;
  gap: 12px 20px;
  align-items: center;
  min-height: 68px;
}
body.cabinet-shell .cabinet-top {
  width: 100%;
  flex: 0 0 auto;
  top: var(--home-return-h);
  z-index: 20;
  min-height: var(--cabinet-top-h);
}
.cabinet-top-brand {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  flex-shrink: 0;
  margin: 0;
  padding: 0 4px 0 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: inherit;
  cursor: pointer;
  min-height: 44px;
}
.cabinet-top-brand:hover,
.cabinet-top-brand:focus-visible {
  background: transparent;
}
.cabinet-top-brand img {
  width: 40px;
  height: 40px;
  border-radius: 0;
  background: transparent;
}
.cabinet-top-brand strong {
  font-size: 1.08rem;
  line-height: 1.2;
  font-weight: 750;
  letter-spacing: -0.02em;
}
body.parent.is-cabinet .cabinet-clock {
  display: none;
}
.cabinet-top-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  min-width: 0;
  flex: 1;
}
.cabinet-app-name {
  font-size: 1.08rem;
  font-weight: 750;
  letter-spacing: -0.02em;
}
.cabinet-clock {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-size: 0.95rem;
}
.cabinet-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  min-width: 0;
}
.cabinet-stat {
  background: var(--primary-container);
  color: var(--on-primary-container);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 13px;
  white-space: nowrap;
  font-weight: 650;
}
.cabinet-stat.is-alert {
  background: var(--secondary-container);
  color: var(--on-secondary-container);
  font-weight: 750;
}
body.cabinet-shell .cabinet-top .icon-btn {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 12px;
  background: var(--surface-container);
}
body.cabinet-shell .cabinet-top .icon-btn:hover,
body.cabinet-shell .cabinet-top .tool-slot.is-open .icon-btn {
  background: var(--card);
  border-color: var(--line);
}
body.parent .cabinet-menu-btn { display: none; }
.cabinet-backdrop { display: none; }
body.parent .wrap.parent-wrap {
  max-width: 1080px;
  width: 100%;
  margin: 0;
  padding: 24px 28px 40px;
}
body.parent.cabinet-shell:not(.is-cabinet) .parent-wrap {
  max-width: 520px;
  margin: 32px auto;
}
.cabinet-footer {
  flex: 0 0 auto;
  width: 100%;
  background: var(--surface-low);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
}
.cabinet-footer-inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr auto;
  gap: 20px 28px;
  align-items: start;
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px 28px 32px;
}
.cabinet-footer-brand strong {
  display: block;
  color: var(--ink);
  margin-bottom: 6px;
}
.cabinet-footer-brand p,
.cabinet-footer-meta p {
  margin: 0 0 6px;
}
.cabinet-footer-brand a,
.cabinet-footer-links a {
  color: var(--muted);
  text-decoration: none;
}
.cabinet-footer-brand a:hover,
.cabinet-footer-links a:hover {
  color: var(--primary);
}
.cabinet-footer-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cabinet-page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 12px;
  margin-bottom: 4px;
}
.cabinet-page-head h1 {
  margin: 0;
  font-size: 1.7rem;
  font-weight: 750;
  letter-spacing: -0.03em;
}
.cabinet-subhead {
  margin: 8px 0 0;
  font-size: 1rem;
}
.cabinet-search-input {
  width: 100%;
  margin-bottom: 6px;
}
.search-pop {
  min-width: 280px;
}
.family-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 0;
  background: var(--star-container);
  color: var(--star);
  font-size: 13px;
  font-weight: 700;
}
.icon-btn[data-badge]::after {
  content: attr(data-badge);
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  line-height: 16px;
  text-align: center;
}
.tool-slot .icon-btn { position: relative; }
.summary-card {
  display: grid;
  grid-template-columns: 1fr 88px;
  gap: 12px;
  align-items: center;
}
.summary-card p { margin: 0; }
.summary-card .insight { margin-top: 8px; }
.ring {
  width: 88px;
  height: 88px;
}
.ring svg { display: block; width: 88px; height: 88px; }
.ring-label {
  font-size: 14px;
  font-weight: 700;
}
.attention-list, .upcoming-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.attention-item, .upcoming-item {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  justify-content: space-between;
  padding: 12px 14px;
  border-radius: 16px;
  background: var(--secondary-container);
  border: 0;
  color: var(--on-secondary-container);
}
.attention-item button { min-height: 40px; flex-shrink: 0; }
.kid-card {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 10px 12px;
  align-items: start;
  border-left: 0;
  box-shadow: inset 4px 0 0 var(--line), var(--shadow);
}
.kid-card.is-wait { box-shadow: inset 4px 0 0 var(--warn), var(--shadow); }
.kid-card.is-ok { box-shadow: inset 4px 0 0 var(--ok), var(--shadow); }
.kid-card.is-alert { box-shadow: inset 4px 0 0 var(--danger), var(--shadow); }
.kid-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--star-container);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 750;
}
.kid-meta { display: grid; gap: 2px; }
.kid-meta strong { font-size: 1.05rem; }
.kid-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 8px 14px;
  flex-wrap: wrap;
  align-items: center;
}
.kid-actions button.accent { flex: 1 1 100%; min-height: 44px; }
.kid-tasks {
  grid-column: 1 / -1;
  display: grid;
  gap: 6px;
}
.kid-task {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 12px;
  background: var(--surface-low);
}
.kid-task span {
  min-width: 0;
  font-size: 0.95rem;
}
.kid-task button {
  flex-shrink: 0;
  min-height: 40px;
}
.task-assignee-row {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}
.task-assignee-row button { min-height: 40px; flex-shrink: 0; }
.text-link {
  background: transparent;
  color: var(--primary);
  border: 0;
  padding: 0;
  min-height: 0;
  min-width: 0;
  display: inline;
  font: inherit;
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.text-link:hover { color: var(--accent); }
.member-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr;
}
.member-card {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 4px 12px;
  align-items: center;
  padding: 14px;
  margin-bottom: 0;
  border-left: 0;
  box-shadow: inset 4px 0 0 var(--line), var(--shadow);
}
.member-card.is-wait { box-shadow: inset 4px 0 0 var(--warn), var(--shadow); }
.member-card.is-ok { box-shadow: inset 4px 0 0 var(--ok), var(--shadow); }
.member-card.is-alert { box-shadow: inset 4px 0 0 var(--danger), var(--shadow); }
.member-avatar {
  width: 44px;
  height: 44px;
  font-size: 0.95rem;
  position: relative;
}
.owner-mark {
  position: absolute;
  right: -5px;
  bottom: -5px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  color: var(--star);
  display: grid;
  place-items: center;
  box-shadow: 0 1px 3px color-mix(in srgb, var(--ink) 16%, transparent);
  pointer-events: none;
}
.owner-mark .ms {
  font-size: 14px;
  width: 14px;
  height: 14px;
  font-variation-settings: "FILL" 1, "wght" 600, "GRAD" 0, "opsz" 20;
}
.member-meta { min-width: 0; }
.member-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.member-name-row .member-name {
  flex: 0 1 auto;
  width: auto;
  max-width: calc(100% - 88px);
}
.owner-badge {
  flex: none;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.01em;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--star-container);
  color: var(--star);
  white-space: nowrap;
}
.member-meta strong {
  display: block;
  font-size: 0.98rem;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.member-line {
  display: block;
  font-size: 12px;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.member-stars {
  font-size: 13px;
  white-space: nowrap;
  color: var(--muted);
}
.member-card .member-add-task {
  grid-column: 1 / -1;
  min-height: 40px;
  width: 100%;
}
.member-links {
  grid-column: 1 / -1;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}
.member-name, .kid-name {
  background: transparent;
  border: 0;
  padding: 0;
  min-height: 0;
  min-width: 0;
  color: inherit;
  font: inherit;
  font-weight: 700;
  text-align: left;
  display: block;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.member-name:hover, .kid-name:hover { color: var(--primary); }
.kid-avatar { cursor: pointer; }
.profile-back {
  justify-self: start;
  font-size: 14px;
}
.subview-back {
  justify-content: flex-start;
  gap: 8px;
  width: auto;
  background: transparent;
  color: var(--ink);
  border: 0;
  min-height: 44px;
  padding: 0 10px 0 0;
  font-weight: 650;
  border-radius: 12px;
}
.subview-back:hover { background: var(--surface-container); color: var(--ink); }
.subview-back .ms { font-size: 20px; }
.profile-head {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 8px 14px;
  align-items: start;
}
.profile-head .kid-avatar {
  width: 56px;
  height: 56px;
  font-size: 1.2rem;
  cursor: default;
}
.profile-head h1 {
  margin: 0;
  font-size: 1.4rem;
}
.profile-head-main {
  min-width: 0;
}
.profile-name-form button {
  justify-self: start;
}
.profile-dash {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
}
.profile-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.profile-stat {
  background: var(--surface-container);
  border-radius: 16px;
  padding: 10px 12px;
}
.profile-stat b {
  display: block;
  font-size: 1.15rem;
  line-height: 1.2;
}
.profile-stat span {
  font-size: 12px;
  color: var(--muted);
}
.period-tabs {
  display: flex;
  gap: 6px;
}
.period-tabs button {
  flex: 1;
  min-height: 40px;
  background: var(--surface-container);
  color: var(--ink);
  border: 0;
}
.period-tabs button.is-on {
  background: var(--primary);
  color: var(--primary-ink);
}
.profile-task {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 4px 12px;
  align-items: start;
}
.profile-task .stack { grid-column: 2; }
.profile-task .proof-materials,
.profile-task .profile-done { grid-column: 2 / -1; }
.profile-task .task-preview-icon {
  grid-row: 1;
}
.profile-task strong { font-size: 1rem; }
.status-pill {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--surface-container);
  color: var(--muted);
  white-space: nowrap;
}
.status-pill.is-ok { background: var(--ok-container); color: var(--ok); }
.status-pill.is-wait { background: var(--warn-container); color: var(--warn); }
.status-pill.is-alert { background: var(--danger-container); color: var(--danger); }
.member-tile {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  min-height: 100%;
  border-style: dashed;
}
.member-tile p { margin: 0; }
.member-add {
  padding: 14px 16px;
}
.member-add h2 {
  margin: 0;
  font-size: 1rem;
}
.invite-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(31, 42, 55, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.invite-modal-card {
  width: min(360px, 100%);
  background: var(--card);
  border-radius: 28px;
  padding: 20px;
  display: grid;
  gap: 10px;
  box-shadow: 0 16px 48px rgba(28, 27, 22, 0.18);
}
.invite-modal-card h3 { margin: 0; }
.invite-modal-card .invite-qr { margin: 0 auto; }
.invite-modal-card .row { justify-content: stretch; }
.invite-modal-card .row button { flex: 1; }
@media (min-width: 720px) {
  .member-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1280px) {
  .member-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.empty-cta {
  text-align: left;
  border-style: dashed;
  background: var(--surface-low);
  box-shadow: none;
}
.empty-cta p { margin: 0; }
.empty-cta button { width: 100%; }
.fab {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 21;
  border-radius: 18px;
  background: var(--primary);
  color: var(--primary-ink);
  min-height: 56px;
  padding: 0 22px;
  font-weight: 750;
  gap: 8px;
  box-shadow: 0 8px 24px color-mix(in srgb, var(--primary) 38%, transparent);
}
.fab .ms { font-size: 22px; }
@media (max-width: 960px) {
  body.cabinet-shell { display: block; }
  .cabinet-sidebar {
    display: none !important;
  }
  body.parent.is-cabinet .cabinet-menu-btn { display: none !important; }
  .cabinet-backdrop { display: none; }
  body.parent .wrap.parent-wrap { padding: 16px 16px 24px; }
  .cabinet-top { padding: 10px 12px; }
  body.cabinet-shell .cabinet-top {
    gap: 8px;
    flex-wrap: nowrap;
  }
  .cabinet-app-name { display: none; }
  body.cabinet-shell .cabinet-top-brand strong { display: none; }
  body.parent .cabinet-stats {
    flex: 1;
    min-width: 0;
    flex-wrap: nowrap;
    overflow-x: auto;
  }
  body.parent .cabinet-stat {
    font-size: 12px;
    padding: 4px 8px;
  }
  body.cabinet-shell:not(.is-cabinet) .cabinet-app-name { display: inline; }
  body.cabinet-shell:not(.is-cabinet) .cabinet-top-brand strong { display: inline; }
  .member-card .member-add-task { min-height: 44px; }
  .member-links .text-link { padding: 6px 0; font-size: 14px; }
  .profile-dash { grid-template-columns: 1fr; }
  .period-tabs button { min-height: 44px; }
  .kid-task button, .task-assignee-row button, .profile-task .profile-done { min-height: 44px; }
  body.is-cabinet:not(.is-subview) .cabinet-tabbar,
  body.child.is-cabinet:not(.is-subview) .child-tabbar { display: flex; }
  .fab { right: 16px; bottom: 88px; }
  .cabinet-footer-inner {
    grid-template-columns: 1fr;
    padding: 20px 16px 28px;
  }
  body.is-cabinet:not(.is-subview) .cabinet-footer-inner {
    padding-bottom: 108px;
  }
}

.home-return-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex: 1 0 100%;
  order: -1;
  position: sticky;
  top: 0;
  z-index: 60;
  padding: 10px 16px;
  background: var(--star-container);
  color: var(--star);
  border-bottom: 1px solid #f0d48a;
  box-shadow: none;
}
.home-return-bar p {
  margin: 0;
  font-weight: 700;
  font-size: 1rem;
}
.home-return-bar button {
  background: var(--star);
  color: #fff;
  font-weight: 700;
  min-height: 44px;
  white-space: nowrap;
  animation: none;
}
@keyframes home-return-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(224, 122, 95, 0.55); }
  50% { box-shadow: 0 0 0 10px rgba(224, 122, 95, 0); }
}
body.child .home-return-bar {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 8px 16px;
}
body.child .home-return-bar p {
  flex: 0 1 auto;
  min-width: 0;
  font-weight: 650;
  font-size: 0.95rem;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
body.child .home-return-bar button {
  width: auto;
  min-height: 40px;
  padding: 0 14px;
  flex-shrink: 0;
}
body.child.is-acting-child .child-tabbar { position: fixed; }
.invite-modal-card input:not([type="checkbox"]) { width: 100%; }
.pin-input {
  -webkit-text-security: disc;
  text-security: disc;
}
.legal-modal {
  z-index: 120;
}
.legal-modal-card {
  width: min(460px, 100%);
}
.legal-check {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 0;
  padding: 12px 0;
  cursor: pointer;
  font-size: 15px;
  line-height: 1.4;
}
.legal-check input {
  width: 22px;
  height: 22px;
  min-width: 22px;
  margin: 2px 0 0;
  accent-color: var(--primary);
  flex-shrink: 0;
}
.legal-check-text a {
  font-weight: 700;
  color: var(--primary);
}
.legal-continue {
  width: 100%;
  margin-top: 8px;
}
.legal-continue:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
body.child .legal-check {
  min-height: 56px;
  font-size: 1.05rem;
}
body.child .legal-check input {
  width: 26px;
  height: 26px;
  min-width: 26px;
}
.pin-error { margin: 0; }
.app-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(20px);
  background: var(--ink);
  color: #fff;
  padding: 12px 16px;
  border-radius: 12px;
  z-index: 80;
  opacity: 0;
  pointer-events: none;
  max-width: min(420px, calc(100% - 32px));
  transition: opacity .2s, transform .2s;
}
.app-toast.is-on { opacity: 1; transform: translateX(-50%) translateY(0); }
.editor-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.editor-top h1,
.editor-top h2 { margin: 0; flex: 1; text-align: left; font-size: 1.7rem; font-weight: 750; letter-spacing: -0.03em; }
.task-editor { max-width: 720px; }
.field { display: grid; gap: 4px; }
.field > span,
.field > label { font-weight: 600; font-size: 0.92rem; }
.seg {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.seg button {
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--line);
  min-height: 44px;
}
.seg button.is-on, .seg button[aria-pressed="true"] {
  background: var(--primary);
  color: var(--primary-ink);
  border-color: var(--primary);
}
.person-chips, .day-row, .preview-avatars, .assignee-status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.assignee-wizard {
  display: grid;
  gap: 12px;
}
.assignee-block {
  display: grid;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
}
.assignee-block-head {
  justify-content: space-between;
  width: 100%;
  min-height: 48px;
  padding: 0 12px;
  background: transparent;
  color: inherit;
  border: 0;
  border-radius: 12px;
  font-weight: 700;
}
.assignee-block-head .chip-check {
  width: 18px;
  opacity: 0;
  color: var(--ok);
}
.assignee-block-head.is-on,
.assignee-block-head[aria-pressed="true"] {
  background: var(--primary-container);
  color: var(--on-primary-container);
}
.assignee-block-head.is-on .chip-check,
.assignee-block-head[aria-pressed="true"] .chip-check { opacity: 1; }
.assignee-block-head:disabled {
  opacity: 0.5;
}
.assignee-reset {
  width: 100%;
}
.assignee-status {
  margin: 4px 0 0;
  font-weight: 750;
  font-size: 1rem;
  color: var(--ink);
}
.assignee-status.muted {
  font-weight: 500;
}
.person-chip {
  display: inline-flex;
  align-items: center;
  background: var(--card);
  color: var(--ink);
  border: 2px solid var(--line);
  border-radius: 999px;
  min-height: 48px;
  padding: 4px 12px 4px 4px;
  gap: 8px;
}
.person-chip .kid-avatar,
.summary-person .kid-avatar {
  width: 36px;
  height: 36px;
  font-size: 0.9rem;
  flex-shrink: 0;
}
.person-chip .summary-person-name,
.person-chip > span:nth-of-type(2) {
  white-space: nowrap;
}
.person-chip.is-on { border-color: var(--ok); background: var(--ok-container); }
.person-chip .chip-check { width: 18px; opacity: 0; font-weight: 700; color: var(--ok); }
.person-chip.is-on .chip-check { opacity: 1; }
.day-chip {
  width: 44px;
  min-width: 44px;
  padding: 0;
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--line);
}
.day-chip.is-on { background: var(--primary); color: var(--primary-ink); }
.icon-current {
  justify-content: flex-start;
  gap: 12px;
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--line);
}
.title-with-icon {
  display: flex;
  align-items: stretch;
  background: var(--surface-container);
  border-bottom: 2px solid transparent;
  border-radius: 12px;
  min-height: 52px;
}
.title-icon-btn {
  width: 52px;
  min-width: 52px;
  min-height: 52px;
  padding: 0;
  border: 0;
  border-radius: 12px 0 0 12px;
  background: transparent;
  color: inherit;
}
.title-icon-btn:hover { background: color-mix(in srgb, var(--primary) 12%, var(--surface-container)); }
.wizard-pane .title-with-icon input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  border-radius: 0;
  min-height: 48px;
}
.title-icon-change {
  justify-self: start;
  margin-top: 2px;
}
.task-preview-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  line-height: 1;
  background: var(--primary-container);
  flex: none;
}
.task-preview-card, .review-card-head {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 10px;
  align-items: start;
}
.task-card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: stretch;
}
#panelTasks {
  container-type: inline-size;
  container-name: task-cards;
}
.task-card-grid > .card {
  margin-bottom: 0;
}
.task-card-grid .empty-cta {
  grid-column: 1 / -1;
}
@container task-cards (min-width: 720px) {
  .task-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.task-list-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  min-width: 0;
  height: 100%;
  position: relative;
}
.task-list-card.is-complete {
  background: color-mix(in srgb, var(--ink) 8%, var(--surface-container));
  box-shadow: none;
}
.task-list-card.is-unaccepted,
.review-card.is-unaccepted,
.profile-task.is-unaccepted,
.kid-task.is-unaccepted,
.upcoming-item.is-unaccepted,
.attention-item.is-unaccepted,
.child-task.is-unaccepted {
  box-shadow: 0 0 0 2px var(--danger);
  background: color-mix(in srgb, var(--danger) 8%, var(--card));
}
.profile-task.is-complete,
.kid-task.is-complete,
.upcoming-item.is-complete,
.review-card.is-complete,
.child-task.is-complete,
.child-task.is-done {
  background: color-mix(in srgb, var(--ink) 8%, var(--surface-container));
  box-shadow: none;
}
.task-card-head {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 44px;
  gap: 10px;
  align-items: start;
}
.task-card-title {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 750;
  line-height: 1.3;
  letter-spacing: -0.02em;
}
.task-card-desc {
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.4;
}
.task-card-due {
  margin: 0;
}
.task-card-label {
  margin: 4px 0 0;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.01em;
}
.task-card-section {
  display: grid;
  gap: 8px;
}
.task-card-proofs {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-start;
}
.task-card-foot {
  display: flex;
  justify-content: flex-end;
  margin-top: auto;
  padding-top: 4px;
}
.task-card-done {
  margin-left: auto;
}
.task-preview-icon,
.child-ico {
  position: relative;
}
.task-complete-check,
.task-status-mark {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  color: var(--ok);
  display: grid;
  place-items: center;
  z-index: 1;
  box-shadow: 0 1px 4px color-mix(in srgb, var(--ink) 18%, transparent);
  pointer-events: none;
}
.task-status-mark.is-alert {
  color: var(--danger);
}
.task-complete-check .ms,
.task-status-mark .ms {
  font-size: 18px;
  width: 18px;
  height: 18px;
  font-variation-settings: "FILL" 1, "wght" 600, "GRAD" 0, "opsz" 24;
}
.kid-task > .task-status-mark,
.upcoming-item > .task-status-mark {
  position: static;
  flex: none;
}
.task-card-head .icon-btn[aria-label]::after {
  left: auto;
  right: 0;
  transform: none;
}
.done-pick-card {
  width: min(420px, 100%);
}
.done-pick-list {
  display: grid;
  gap: 8px;
}
.done-pick-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 8px 12px;
  border-radius: 12px;
  background: var(--surface-container);
  cursor: pointer;
}
.done-pick-row input {
  width: 20px;
  height: 20px;
  accent-color: var(--ok);
}
.proof-material {
  position: relative;
  overflow: hidden;
}
.proof-material.is-thumb img,
.proof-material.is-thumb video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}
.proof-ready-check {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  color: var(--ok);
  display: grid;
  place-items: center;
  z-index: 1;
  box-shadow: 0 1px 4px color-mix(in srgb, var(--ink) 18%, transparent);
  pointer-events: none;
}
.proof-ready-check .ms,
.proof-material.is-ready .proof-ready-check .ms {
  font-size: 18px;
  width: 18px;
  height: 18px;
  color: var(--ok);
  font-variation-settings: "FILL" 1, "wght" 600, "GRAD" 0, "opsz" 24;
}
.proof-note-field {
  position: relative;
  flex: 1 1 100%;
  width: 100%;
  min-height: 88px;
  margin: 0;
  padding: 16px 40px 16px 16px;
  border: 0;
  border-radius: 16px;
  background: var(--surface-container);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.proof-note-field p {
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.4;
}
.icon-modal-card {
  width: min(480px, 100%);
  max-height: min(88vh, 720px);
  align-content: start;
}
.icon-modal-card #iconModalSearch {
  width: 100%;
  min-height: 48px;
}
.icon-modal-found {
  margin: 0;
  font-size: 0.85rem;
}
.icon-grid {
  display: grid;
  gap: 12px;
  overflow: auto;
  max-height: min(52vh, 480px);
  padding-right: 2px;
}
.icon-group {
  display: grid;
  gap: 8px;
}
.icon-group-title {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--muted);
}
.icon-group-grid,
.icon-grid.is-search {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.icon-pick {
  display: grid;
  justify-items: center;
  gap: 4px;
  font-size: 1.6rem;
  min-height: 72px;
  padding: 8px 4px;
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--line);
}
.icon-pick-glyph { line-height: 1; }
.icon-pick-name {
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  color: var(--muted);
}
.status-avatar {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: var(--surface-container);
  padding: 6px 10px;
  min-height: 36px;
  min-width: 0;
  border-radius: 999px;
  color: var(--ink);
  font-weight: 650;
  font-size: 0.92rem;
  line-height: 1.2;
}
.status-avatar .status-name {
  white-space: nowrap;
}
.status-mark {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--card);
  border: 1px solid var(--line);
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.status-avatar.is-approved .status-mark { background: var(--ok); color: #fff; border-color: var(--ok); }
.status-avatar.is-submitted .status-mark, .status-avatar.is-pending_review .status-mark { background: var(--warn); }
.status-avatar.is-returned .status-mark { background: var(--danger); color: #fff; border-color: var(--danger); }
.status-mark[hidden] { display: none; }
.review-thumb, .review-photo { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; cursor: pointer; }
.review-photo { width: 100%; height: auto; max-height: 320px; }
.proof-materials {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.proof-materials.is-lg { gap: 16px; justify-content: center; }
.proof-material {
  width: 88px;
  height: 88px;
  border-radius: 24px;
  border: 0;
  padding: 0;
  background: var(--surface-container);
  color: var(--primary);
  display: grid;
  place-items: center;
  cursor: pointer;
  flex: none;
}
div.proof-material { cursor: default; }
.profile-task .proof-materials,
.review-card .proof-materials { grid-column: 2 / -1; }
.review-card .proof-materials { grid-column: 1 / -1; }
.review-card { display: grid; gap: 12px; }
.proof-material .ms {
  font-size: 40px;
  width: 40px;
  height: 40px;
}
.proof-material.is-lg {
  width: 104px;
  height: 104px;
  border-radius: 28px;
}
.proof-material.is-lg .ms {
  font-size: 48px;
  width: 48px;
  height: 48px;
}
.proof-material.is-hero {
  width: 140px;
  height: 140px;
  border-radius: 36px;
}
.proof-material.is-hero .ms {
  font-size: 64px;
  width: 64px;
  height: 64px;
}
.proof-material.is-hero .proof-ready-check {
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
}
.proof-material.is-hero .proof-ready-check .ms {
  font-size: 26px;
  width: 26px;
  height: 26px;
}
.proof-material.is-ready {
  background: var(--secondary-container);
  color: var(--on-secondary-container);
}
.proof-material.is-ready .ms {
  font-variation-settings: "FILL" 1, "wght" 600, "GRAD" 0, "opsz" 48;
  color: var(--accent);
}
body.child .proof-material.is-hero {
  width: 156px;
  height: 156px;
}
body.child .proof-material.is-hero .ms {
  font-size: 72px;
  width: 72px;
  height: 72px;
}
.report-step {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 12px;
  padding: 8px 0 16px;
}
.report-step h3 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 750;
}
.report-step .muted { margin: 0; }
.report-step textarea {
  width: 100%;
  min-height: 140px;
  border: 0;
  border-radius: 16px;
  background: var(--surface-container);
  padding: 14px;
  font-size: 1.05rem;
  text-align: left;
}
.report-step .secondary { min-height: 48px; }
.report-hero-row {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}
#reportWizard { z-index: 100; }
#reportWizardError { margin: 0 20px 8px; }
body.is-report-wizard { overflow: hidden; }
#mediaLightbox {
  z-index: 120;
  align-items: center;
}
#mediaLightbox .lightbox-card {
  width: min(720px, 100%);
  max-height: min(92vh, 860px);
  overflow: auto;
  border-radius: 24px;
}
#mediaLightbox img,
#mediaLightbox video {
  width: 100%;
  max-height: min(72vh, 640px);
  object-fit: contain;
  background: #1c1b16;
  border-radius: 16px;
}
#mediaLightbox .lightbox-note {
  margin: 0;
  padding: 8px 4px 12px;
  font-size: 1.15rem;
  font-weight: 650;
  white-space: pre-wrap;
  text-align: left;
}
.needs-fix { color: var(--danger); font-weight: 700; }
.file-preview { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; }
.hint-chip { justify-content: flex-start; text-align: left; height: auto; min-height: 44px; }
.complete-sheet {
  position: fixed;
  inset: 0;
  background: rgba(31, 42, 55, 0.45);
  z-index: 40;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.complete-sheet-card {
  width: min(560px, 100%);
  background: var(--card);
  border-radius: 28px 28px 0 0;
  padding: 20px 16px 28px;
  display: grid;
  gap: 10px;
}
.child-detail .task-preview-icon { font-size: 3rem; }
.proof-files { display: grid; gap: 8px; }
@media (min-width: 720px) {
  .complete-sheet { align-items: center; }
  .complete-sheet-card { border-radius: 16px; }
}

body.child .cabinet-nav button { min-height: 56px; }
body.child .cabinet-top .icon-btn {
  width: 48px;
  height: 48px;
  min-width: 48px;
  min-height: 48px;
}
body.child .wrap.child-wrap {
  max-width: 800px;
  width: 100%;
  margin: 0;
  padding: 24px 28px 40px;
}
body.child.cabinet-shell:not(.is-cabinet) .child-wrap {
  max-width: 520px;
  margin: 32px auto;
}
body.child .child-panel { width: 100%; }
body.child .cabinet-page-head h1 { font-size: 1.75rem; }

.child-star-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--star-container);
  color: var(--star);
  font-weight: 700;
  font-size: 13px;
  border: 0;
}
.child-star-chip .ms {
  font-variation-settings: "FILL" 1, "wght" 600, "GRAD" 0, "opsz" 24;
  font-size: 18px;
  width: 18px;
  height: 18px;
}
.child-proof .ms { font-size: 28px; width: 28px; height: 28px; }
.child-star-chip.hidden { display: none; }

.child-avatar {
  width: 72px;
  height: 72px;
  flex: none;
  border: 0;
  border-radius: 50%;
  background: #ffdb8b;
  color: var(--ink);
  display: grid;
  place-items: center;
  font-size: 28px;
  font-weight: 700;
  padding: 0;
  min-height: 72px;
  min-width: 72px;
}
.child-section {
  margin: 8px 0 4px;
  font-size: 1.05rem;
  font-weight: 700;
}
.child-section.is-muted {
  margin-top: 8px;
  font-size: 0.95rem;
  color: var(--muted);
  font-weight: 600;
}
.child-task {
  width: 100%;
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  display: flex;
  justify-content: flex-start;
  gap: 12px;
  align-items: center;
  margin: 0 0 10px;
  text-align: left;
  min-height: 76px;
  font-weight: 400;
  box-shadow: var(--shadow);
}
.child-task:hover { border-color: color-mix(in srgb, var(--primary) 40%, var(--line)); }
.child-task.is-done { background: var(--surface-low); }
.child-ico {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 28px;
  flex: none;
  line-height: 1;
  background: var(--primary-container);
}
.child-task-main { flex: 1; min-width: 0; }
.child-task-title { font-weight: 700; font-size: 1.02rem; }
.child-meta { font-size: 13px; color: var(--muted); margin-top: 4px; }
.child-tag {
  font-size: 12px;
  color: var(--star);
  background: var(--star-container);
  border: 0;
  padding: 3px 8px;
  border-radius: 999px;
  display: inline-block;
  margin-top: 6px;
  font-weight: 700;
}
.child-tag.is-fix {
  color: var(--danger);
  background: var(--danger-container);
}
.child-check {
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 12px;
  background: color-mix(in srgb, var(--ok) 16%, #fff);
  color: var(--ok);
  display: grid;
  place-items: center;
}
.child-check.is-alert {
  background: var(--danger-container);
  color: var(--danger);
}
.child-check.is-next {
  background: color-mix(in srgb, var(--primary) 12%, #fff);
  color: var(--primary);
}
.child-check svg,
.child-check .ms { width: 22px; height: 22px; display: block; font-size: 22px; }
.cabinet-tabbar,
.child-tabbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 20;
  min-height: 72px;
  background: color-mix(in srgb, var(--card) 92%, transparent);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
  display: none;
  justify-content: space-around;
  align-items: stretch;
  padding: 6px 8px env(safe-area-inset-bottom);
}
.cabinet-tab,
.child-tab {
  flex: 1;
  min-height: 56px;
  background: transparent;
  color: var(--muted);
  border: 0;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 11px;
  font-weight: 700;
  padding: 6px 4px;
}
.cabinet-tab svg,
.cabinet-tab .ms,
.child-tab svg,
.child-tab .ms { width: 24px; height: 24px; display: block; font-size: 24px; }
.cabinet-tab b,
.child-tab b { font-weight: 700; }
.cabinet-tab.is-on,
.child-tab.is-on {
  color: var(--on-secondary-container);
  background: var(--secondary-container);
}
.child-hero { text-align: center; padding: 8px 0 4px; }
.child-big-ico {
  width: 88px;
  height: 88px;
  border-radius: 24px;
  display: grid;
  place-items: center;
  font-size: 44px;
  margin: auto;
}
.child-hero h2 { font-size: 1.45rem; margin: 12px 0 8px; font-weight: 700; }
.child-pill {
  display: inline-block;
  border-radius: 999px;
  padding: 4px 10px;
  background: var(--star-container);
  border: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--star);
}
.child-info {
  padding: 16px 20px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--line);
}
.child-info.is-fix {
  background: var(--danger-container);
  border-color: transparent;
}
.child-info strong, .child-info small { display: block; }
.child-info small { color: var(--muted); font-size: 13px; margin-top: 4px; font-weight: 400; }
.child-proofs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}
.child-proof {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  border-radius: var(--radius);
  padding: 14px 12px;
  text-align: center;
  min-height: 88px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}
.child-proof svg { width: 28px; height: 28px; display: block; }
.child-proof small { display: block; font-size: 12px; font-weight: 700; }
.child-proof.is-on {
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary) 12%, #fff);
  color: var(--primary);
}
.child-primary {
  min-height: 56px;
  border: 0;
  border-radius: 999px;
  background: var(--primary);
  color: var(--primary-ink);
  font-weight: 750;
  font-size: 1.05rem;
  width: 100%;
  box-shadow: 0 8px 24px color-mix(in srgb, var(--primary) 38%, transparent);
}
.child-me-hero {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 16px;
  align-items: center;
}
.child-stars {
  margin: 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--star-container);
  border: 0;
  color: var(--star);
  font-weight: 700;
}
body.child .complete-sheet-card { padding: 24px 18px 28px; }
body.child .complete-sheet-card h3 { font-size: 1.25rem; font-weight: 700; }
body.child .complete-sheet-card button { width: 100%; }
body.child.is-subview .child-tabbar,
body.child:not(.is-cabinet) .child-tabbar,
body.is-subview .cabinet-tabbar,
body:not(.is-cabinet) .cabinet-tabbar { display: none; }
body.child.is-acting-child .child-tabbar,
body.is-acting-child .cabinet-tabbar { position: fixed; }
@media (max-width: 960px) {
  body.child.is-cabinet:not(.is-subview) .child-wrap { padding: 16px 16px 24px; }
  body.child.is-subview .child-wrap { padding: 16px; }
  body.child.cabinet-shell:not(.is-cabinet) .child-wrap { padding: 16px; margin: 16px auto; }
}
@media (min-width: 961px) {
  body.child .child-tabbar,
  .cabinet-tabbar { display: none !important; }
}

.page-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  width: 100%;
}
.page-toolbar h1,
.page-toolbar h2 {
  margin: 0;
  flex: 1;
  text-align: left;
  font-size: 1.7rem;
  font-weight: 750;
  letter-spacing: -0.03em;
}
.icon-btn.is-tonal {
  width: 48px;
  height: 48px;
  min-width: 48px;
  min-height: 48px;
  border-radius: 16px;
  background: color-mix(in srgb, var(--primary) 14%, #fff);
  color: var(--primary);
  border: 0;
}
.icon-btn.is-tonal:hover {
  background: color-mix(in srgb, var(--primary) 22%, #fff);
}
.family-add-footer {
  width: 100%;
  min-height: 48px;
  justify-content: center;
  background: transparent;
  color: var(--primary);
  border: 0;
  font-weight: 600;
}
.family-add-footer:hover { background: color-mix(in srgb, var(--primary) 8%, #fff); }
body.is-wizard { overflow: hidden; }
.wizard-sheet {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(28, 27, 22, 0.42);
  display: flex;
  justify-content: center;
  align-items: stretch;
}
.wizard-dialog {
  width: min(560px, 100%);
  height: 100%;
  max-height: 100%;
  background: var(--card);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.wizard-bar {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 12px 12px 4px;
}
.wizard-bar .icon-btn {
  background: var(--surface-container);
  border-radius: 12px;
}
.wizard-bar-text { flex: 1; min-width: 0; padding-top: 8px; }
.wizard-bar-text h2 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 750;
  letter-spacing: -0.02em;
}
.wizard-bar-text p { margin: 2px 0 0; font-size: 0.85rem; }
.wizard-progress {
  height: 4px;
  background: var(--surface-container);
  margin: 0 20px 8px;
  border-radius: 999px;
  overflow: hidden;
}
.wizard-progress i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--primary);
  border-radius: 999px;
  transition: width 0.2s ease;
}
.wizard-bar,
.wizard-progress,
.wizard-footer { flex-shrink: 0; }
.wizard-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 8px 20px 16px;
}
.wizard-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 8px 12px 16px;
}
.wizard-footer .text-btn {
  background: transparent;
  color: var(--primary);
  border: 0;
  font-weight: 600;
  min-width: 88px;
}
.wizard-footer .filled-btn {
  background: var(--primary);
  color: #fff;
  border: 0;
  border-radius: 999px;
  min-width: 112px;
  font-weight: 600;
}
.md-seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  border: 0;
  background: transparent;
}
.md-seg button {
  background: var(--surface-container);
  color: var(--ink);
  border: 0;
  border-radius: 999px;
  min-height: 48px;
  font-weight: 650;
}
.md-seg button[aria-pressed="true"] {
  background: var(--secondary-container);
  color: var(--on-secondary-container);
}
.md-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.md-chip {
  background: var(--surface-container);
  color: var(--ink);
  border: 0;
  border-radius: 999px;
  min-height: 40px;
  padding: 0 14px;
  font-weight: 650;
}
.md-chip[aria-pressed="true"] {
  background: var(--secondary-container);
  color: var(--on-secondary-container);
}
.wizard-pane .card { margin-bottom: 0; }
#editorModeCollective:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.field-label {
  display: block;
  font-size: 0.92rem;
  font-weight: 600;
}
#editorTimeBlock {
  margin-top: 8px;
}
.wizard-pane .field input,
.wizard-pane .field select,
.wizard-pane .field textarea {
  width: 100%;
  min-height: 52px;
  border-radius: 12px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: var(--surface-container);
}
@media (min-width: 640px) {
  .wizard-sheet {
    align-items: center;
    padding: 24px;
  }
  .wizard-dialog {
    width: 560px;
    height: 720px;
    min-height: 0;
    max-height: calc(100dvh - 48px);
    flex: 0 0 auto;
    border-radius: 28px;
    box-shadow: 0 16px 48px rgba(28, 27, 22, 0.2);
  }
}
@media (max-width: 639px) {
  .wizard-dialog { height: 100%; min-height: 100%; }
}
.proof-tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.proof-tile {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  min-height: 88px;
  padding: 14px 10px;
  border-radius: 18px;
  background: var(--surface-container);
  color: var(--ink);
  border: 0;
  font-weight: 650;
  font-size: 0.82rem;
  text-align: center;
  line-height: 1.2;
  white-space: normal;
}
.proof-tile .ms {
  font-size: 26px;
  width: 26px;
  height: 26px;
  color: var(--primary);
}
.proof-tile.is-on,
.proof-tile[aria-pressed="true"] {
  background: var(--secondary-container);
  color: var(--on-secondary-container);
}
.proof-tile.is-on .ms,
.proof-tile[aria-pressed="true"] .ms {
  font-variation-settings: "FILL" 1, "wght" 600, "GRAD" 0, "opsz" 24;
  color: var(--accent);
}
.star-stepper {
  display: flex;
  align-items: center;
  gap: 8px;
}
.star-stepper input {
  width: 72px;
  text-align: center;
  font-size: 1.25rem;
  font-weight: 750;
}
.star-stepper .star-glyph {
  font-variation-settings: "FILL" 1, "wght" 600, "GRAD" 0, "opsz" 24;
  color: var(--star);
  font-size: 28px;
  width: 28px;
  height: 28px;
}
.task-summary {
  display: grid;
  gap: 16px;
}
.task-summary-head {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.task-summary-head .task-preview-icon {
  width: 56px;
  height: 56px;
  font-size: 1.6rem;
  border-radius: 16px;
}
.task-summary-head strong {
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}
.task-summary-rows {
  display: grid;
  gap: 8px;
  margin: 0;
}
.task-summary-rows div {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--surface-low);
}
.task-summary-rows dt {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.task-summary-rows dd {
  margin: 0;
  font-weight: 650;
}
.task-summary-instruction {
  margin: 4px 0 0;
}
.task-summary-people {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 16px;
  background: var(--surface-low);
}
.task-summary-people h4 {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.task-summary-assigned {
  margin: 0;
  font-weight: 750;
}
.summary-people {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.summary-person {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 6px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--line);
  font-weight: 650;
  max-width: 100%;
}
.summary-person-name {
  overflow-wrap: anywhere;
}
.reward-balances {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.reward-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--star-container);
  color: var(--star);
  font-size: 13px;
  font-weight: 700;
}
.reward-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr;
}
.reward-grid > .empty-cta { grid-column: 1 / -1; }
@media (min-width: 720px) {
  .reward-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.reward-card {
  display: grid;
  gap: 10px;
  margin-bottom: 0;
  padding: 14px;
  align-content: start;
}
.reward-card-title {
  margin: 0;
  font-size: 1.05rem;
}
.reward-card > p { margin: 0; }
.reward-photos {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}
.reward-photos img,
.reward-thumb img {
  width: 88px;
  height: 88px;
  object-fit: cover;
  border-radius: 12px;
  background: var(--surface-container);
  display: block;
  flex: none;
}
.reward-thumb {
  position: relative;
  margin: 0;
  flex: none;
}
.reward-thumb-del {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 28px;
  height: 28px;
  min-width: 28px;
  min-height: 28px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--card) 90%, transparent);
  color: var(--ink);
}
.reward-form .field textarea {
  min-height: 96px;
  resize: vertical;
}
.reward-form-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.reward-form-actions button { flex: 1; }
.reward-redeem {
  display: grid;
  gap: 8px;
}
.child-reward-card {
  display: grid;
  gap: 8px;
  margin-bottom: 0;
}
.child-reward-card h3 { margin: 0; font-size: 1.15rem; }
.child-reward-card p { margin: 0; }
.child-reward-shop {
  display: grid;
  gap: 12px;
}
.child-reward-shop > .card { margin-bottom: 0; }
.child-reward-card .reward-photos img {
  width: 100%;
  height: 160px;
  flex: 1 1 140px;
}
.child-reward-card .child-primary { margin-top: 4px; }
