:root {
  --brand: #4c1d95;
  --brand-strong: #3b1675;
  --reward: #f59e0b;
  --background: #f9fafb;
  --border: #d8d2cb;
  --decorative-border: #efece6;
  --danger-soft: #fee2e2;
  --bg: var(--background);
  --surface: rgba(255, 255, 255, .86);
  --surface-solid: #fff;
  --text: #1f2937;
  --muted: #6b7280;
  --line: var(--decorative-border);
  --primary: var(--brand);
  --primary-strong: var(--brand-strong);
  --accent: var(--reward);
  --success: #10b981;
  --danger: #ef4444;
  --shadow: 0 18px 50px rgba(50, 35, 90, .12);
  --control-hover-lift: translateY(-1px);
  --icon-hover-fill: color-mix(in srgb, currentColor 14%, var(--surface-solid));
  --icon-hover-shadow: 0 5px 14px color-mix(in srgb, currentColor 18%, transparent);
  --radius: 22px;
  --fab-size: 48px;
  --fab-gap: 12px;
  --fab-inset-inline: max(18px, env(safe-area-inset-right));
  --fab-inset-block: max(18px, env(safe-area-inset-bottom));
  --safe-area-bottom: env(safe-area-inset-bottom, 0px);
  font-family: Inter, ui-rounded, -apple-system, BlinkMacSystemFont, "SF Pro Display", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --brand: #b8a0ed;
    --brand-strong: #9274d3;
    --reward: #f0b96f;
    --success: #82b991;
    --danger: #e3948c;
    --danger-soft: #3d2428;
    --background: #0d0b18;
    --border: #615b70;
    --decorative-border: rgba(232, 226, 255, .12);
    --bg: var(--background);
    --surface: rgba(29, 25, 48, .9);
    --surface-solid: #1d1930;
    --text: #f7f5ff;
    --muted: #aaa4c3;
    --line: var(--decorative-border);
    --shadow: 0 18px 50px rgba(0, 0, 0, .32);
  }
  .theme-hero_hq { --bg: #10172d; }
  .theme-art_studio { --bg: #211713; }
  .theme-panda_pet { --bg: #101914; --text: #f8f9fa; }
}
* { box-sizing: border-box; }
button, a, summary, [type="button"], [type="submit"], .parent-nav-item {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
html { scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; color: var(--text); background: var(--bg); background-image: radial-gradient(circle at 10% 0%, color-mix(in srgb, var(--primary) 16%, transparent), transparent 32rem); }
body.system-page {
  position: relative;
  min-height: 100vh;
  overflow-x: clip;
  color-scheme: light;
  background:
    radial-gradient(circle at 8% 8%, rgba(109, 40, 217, .20) 0%, rgba(109, 40, 217, .08) 24%, transparent 48%),
    radial-gradient(circle at 92% 84%, rgba(147, 51, 234, .16) 0%, transparent 40%),
    linear-gradient(135deg, #fcfbff 0%, var(--bg) 62%);
}
body.system-page::before {
  content: "";
  position: fixed;
  z-index: 0;
  width: 760px;
  height: 760px;
  right: -360px;
  top: 80px;
  border: 1px solid rgba(76, 29, 149, .16);
  border-radius: 50%;
  pointer-events: none;
}
body.system-page::after {
  content: "";
  position: fixed;
  z-index: 0;
  width: 420px;
  height: 420px;
  right: -170px;
  bottom: -180px;
  background: radial-gradient(circle, rgba(109, 40, 217, .16) 0%, transparent 68%);
  pointer-events: none;
}
.system-page .topbar { position: relative; z-index: 10; }
.system-page .page, .system-page .site-footer { position: relative; z-index: 1; }
button, input, select, textarea { font: inherit; }
a { color: inherit; }
.topbar { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 12px max(20px, env(safe-area-inset-left)); border-bottom: 1px solid var(--line); backdrop-filter: blur(18px); position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 78%, transparent); }
.landing-topbar, .app-topbar { position: relative; top: auto; width: min(1160px, calc(100% - 32px)); min-height: 72px; margin: 0 auto; padding: 18px 0; border-bottom: 0; background: transparent; backdrop-filter: none; }
.topbar > * { display: flex; align-items: center; gap: 12px; }
.brand-wrap { display: inline-flex; align-items: center; gap: 10px; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.language-switcher { position: relative; z-index: 30; display: inline-block; width: 44px; height: 44px; min-height: 44px; margin-top: 0; }
.language-switcher-face { display: grid; place-items: center; width: 44px; height: 44px; min-height: 44px; padding: 0; color: var(--muted); background: var(--surface-solid); border: 1px solid var(--border); border-radius: 99px; font: inherit; font-size: 1.15rem; cursor: pointer; list-style: none; }
.language-switcher-face::-webkit-details-marker { display: none; }
.language-switcher-face::marker { content: ""; }
.language-switcher-face > span { white-space: nowrap; }
.language-switcher:focus-within .language-switcher-face,
.language-switcher[open] .language-switcher-face { border-color: var(--primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 16%, transparent); }
.language-switcher-menu { position: absolute; top: calc(100% + 8px); left: 50%; z-index: 50; display: grid; gap: 4px; min-width: 56px; margin: 0; padding: 6px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-solid); box-shadow: var(--shadow); transform: translateX(-50%); }
.language-switcher-option { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 9px; color: var(--text); background: transparent; font: inherit; font-size: 1.15rem; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; transition: color .14s, background .14s, transform .14s; }
.language-switcher-option:hover, .language-switcher-option:focus-visible, .language-switcher-option:active, .language-switcher-option[aria-current="true"] { color: var(--primary); background: color-mix(in srgb, var(--primary) 10%, var(--surface-solid)); outline: none; }
.language-switcher-option:active { transform: scale(.94); }
.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; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 850; text-decoration: none; letter-spacing: -.02em; }
.app-version { color: var(--muted); font-size: .68rem; font-weight: 750; letter-spacing: .02em; text-decoration: none; border-radius: 7px; padding: 4px 5px; }
.app-version:hover, .app-version:focus-visible { color: var(--primary); background: color-mix(in srgb, var(--primary) 10%, transparent); }
.brand-mark { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 14px; color: white; background: linear-gradient(145deg, var(--primary), var(--primary-strong)); box-shadow: 0 8px 22px color-mix(in srgb, var(--primary) 35%, transparent); }
.brand-logo { object-fit: cover; }
.page { width: min(1160px, calc(100% - 32px)); margin: 0 auto; padding: 42px 0 max(80px, env(safe-area-inset-bottom)); }
.child-area .page {
  padding-bottom: 36px;
}
.hero { min-height: calc(100vh - 180px); display: flex; flex-direction: column; justify-content: center; align-items: flex-start; max-width: 780px; }
.landing-page .page { min-height: calc(100vh - 164px); display: grid; align-items: center; padding-block: clamp(38px, 8vh, 96px); }
.landing-page .hero { min-height: min(640px, calc(100vh - 164px)); max-width: 800px; }
.landing-page .hero h1 { text-wrap: balance; }
.auth-page .page { min-height: calc(100vh - 164px); display: grid; place-items: center; padding-block: clamp(36px, 8vh, 96px); }
.auth-page .narrow-card {
  margin: 0;
  border-color: color-mix(in srgb, var(--primary) 18%, var(--line));
  background: color-mix(in srgb, var(--surface-solid) 88%, transparent);
  box-shadow: var(--shadow);
}
.auth-page .narrow-card .eyebrow { margin-bottom: 12px; }
.auth-page .narrow-card h1 { font-size: clamp(2rem, 5vw, 2.85rem); letter-spacing: -.05em; }
.auth-page .narrow-card .button-large { width: 100%; }
.hero h1, .section-heading h1, .child-hero h1 { margin: 0; font-size: clamp(2.4rem, 8vw, 5.8rem); line-height: .96; letter-spacing: -.065em; }
.hero p:not(.eyebrow) { max-width: 600px; color: var(--muted); font-size: clamp(1.05rem, 2vw, 1.3rem); line-height: 1.6; }
.eyebrow { margin: 0 0 8px; color: var(--primary); text-transform: uppercase; letter-spacing: .14em; font-size: .76rem; font-weight: 850; }
.hero-actions, .inline-form, .approval-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.site-footer { display: flex; width: min(1160px, calc(100% - 32px)); margin: -48px auto 0; padding: 22px 0 max(22px, env(safe-area-inset-bottom)); align-items: center; justify-content: center; gap: 2px; color: var(--muted); font-size: .72rem; font-weight: 750; text-align: center; }
.site-footer a { display: inline-flex; padding: 7px 8px; align-items: center; gap: 4px; border-radius: 9px; text-decoration: none; }
.site-footer a:hover, .site-footer a:focus-visible { color: var(--primary); background: color-mix(in srgb, var(--primary) 10%, transparent); }
.footer-docs-short { display: none; }
.github-link .action-icon { width: 15px; height: 15px; }
.history-actor { color: var(--muted); }
.birthday-change-pending { color: var(--muted); font-weight: 700; }
.button { border: 0; border-radius: 14px; padding: 11px 16px; font: inherit; font-weight: 780; cursor: pointer; text-decoration: none; text-align: center; transition: transform .16s; }
.button, .text-button, .icon-button, .share-copy-button, .quick-action, .dialog-close, .info-button, .photo-history-button, .history-photo-button, .history-note-button { font-family: inherit; }
.button:hover, .button:focus-visible { transform: var(--control-hover-lift); }
.button-large { padding: 15px 22px; border-radius: 17px; font-size: 1.05rem; }
.button-primary { color: #fff; background: linear-gradient(145deg, var(--primary), var(--primary-strong)); }
.button-secondary { color: var(--text); background: color-mix(in srgb, var(--primary) 12%, var(--surface-solid)); border: 1px solid var(--line); }
.button-danger { color: #fff; background: var(--danger); }
.form-actions .button-danger, .dialog-actions .button-danger { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.button-danger .action-icon { width: 18px; height: 18px; }
.task-search { position: relative; z-index: 3; display: grid; gap: 8px; margin-bottom: 18px; }
.task-search > label { color: var(--text); font-weight: 750; }
.task-search-results { position: absolute; z-index: 20; top: 100%; right: 0; left: 0; max-height: min(320px, 48vh); overflow-y: auto; padding: 6px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-solid); box-shadow: 0 16px 40px rgba(45, 42, 50, .16); }
.task-search-results[hidden] { display: none; }
.task-search-option { display: block; width: 100%; border: 0; border-radius: 10px; padding: 12px 14px; color: var(--text); background: transparent; font: inherit; font-weight: 750; text-align: left; cursor: pointer; }
.task-search-option:hover, .task-search-option:focus-visible { color: var(--primary); background: color-mix(in srgb, var(--primary) 10%, var(--surface-solid)); outline: none; }
.text-button { appearance: none; border: 0; background: none; color: var(--muted); font-weight: 750; cursor: pointer; padding: 8px; transition: transform .16s; }
.text-button:hover, .text-button:focus-visible { transform: var(--control-hover-lift); }
.topbar-icon-button { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; color: var(--muted); background: var(--surface-solid); border: 1px solid var(--border); border-radius: 99px; cursor: pointer; transition: transform .14s, background .14s, box-shadow .14s, color .14s; }
.topbar-icon-button:hover, .topbar-icon-button:focus-visible { transform: var(--control-hover-lift); color: var(--primary); background: var(--icon-hover-fill); box-shadow: var(--icon-hover-shadow); }
.topbar-icon-button .action-icon { width: 20px; height: 20px; }
.push-control { display: grid; place-items: center; width: 44px; height: 44px; min-height: 44px; padding: 0; border: 1px solid var(--line); border-radius: 99px; color: var(--text); background: var(--surface-solid); cursor: pointer; transition: transform .14s, background .14s, box-shadow .14s; }
.push-control:hover, .push-control:focus-visible { transform: var(--control-hover-lift); background: var(--icon-hover-fill); box-shadow: var(--icon-hover-shadow); }
.push-control:disabled { cursor: progress; opacity: .72; transform: none; box-shadow: none; }
.push-icon, .push-control .action-icon { width: 20px; height: 20px; fill: currentColor; }
.push-enabled { color: var(--success); border-color: color-mix(in srgb, var(--success) 36%, var(--line)); }
.push-install { color: var(--text); border-color: color-mix(in srgb, var(--accent) 58%, var(--border)); }
.push-disabled, .push-unsupported { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 32%, var(--line)); }
.danger { color: var(--danger); }
.narrow-card, .panel, .profile-card, .item-card, .stat-card, .approval-card, .goal-card { background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); border-radius: var(--radius); backdrop-filter: blur(18px); }
.narrow-card { width: min(460px, 100%); margin: 8vh auto; padding: clamp(24px, 5vw, 44px); }
.narrow-card h1 { margin-top: 0; }
.stack-form { display: grid; gap: 16px; }
.stack-form[hidden] { display: none !important; }
.stack-form p, .stack-form label { margin: 0; display: grid; gap: 7px; min-width: 0; color: var(--text); font-weight: 750; }
.stack-form p > label { display: block; }
.stack-form p > label::after { content: ":"; }
.stack-form p.field-required > label::after, .stack-form p > label.field-required::after { content: " *:"; color: var(--danger); font-weight: 900; }
.stack-form p > label.required-label-decorated::after { content: ""; }
.required-marker-star { color: var(--danger); font-weight: 900; }
.required-marker-colon { color: inherit; }
.field-label-text { display: inline; }
.field-control, .stack-form input, .stack-form select, .stack-form textarea, .pin-input { width: 100%; min-height: 48px; color: var(--text); background-color: var(--surface-solid); border: 1px solid var(--border); border-radius: 13px; padding: 12px 13px; outline: none; font-weight: 650; line-height: 1.35; }
.date-input-shell {
  display: grid;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}
.stack-form p:has(> input[type="date"]),
.stack-form p:has(> input[type="datetime-local"]),
.stack-form p:has(> input[type="time"]),
.stack-form p:has(> .date-input-shell),
.stack-form label:has(> input[type="date"]),
.stack-form label:has(> input[type="datetime-local"]),
.stack-form label:has(> input[type="time"]),
.stack-form label:has(> .date-input-shell) {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}
.stack-form input[type="date"],
.stack-form input[type="datetime-local"],
.stack-form input[type="time"],
.field-control[type="date"],
.field-control[type="datetime-local"],
.field-control[type="time"] {
  display: block;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0 !important;
  overflow: hidden;
  -webkit-appearance: none;
  appearance: none;
}
.stack-form input[type="date"]::-webkit-datetime-edit,
.stack-form input[type="date"]::-webkit-datetime-edit-fields-wrapper,
.field-control[type="date"]::-webkit-datetime-edit,
.field-control[type="date"]::-webkit-datetime-edit-fields-wrapper {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}
.stack-form input[type="date"]::-webkit-calendar-picker-indicator,
.field-control[type="date"]::-webkit-calendar-picker-indicator {
  margin: 0;
  flex-shrink: 0;
  cursor: pointer;
}
.stack-form input[type="checkbox"],
.stack-form input[type="radio"] { width: 22px; height: 22px; min-height: 22px; padding: 0; margin: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; accent-color: var(--primary); }
.stack-form p:has(> input[type="checkbox"]) { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.stack-form p:has(> input[type="checkbox"]) > label { display: inline; cursor: pointer; }
.stack-form p:has(> input[type="checkbox"]) > input[type="checkbox"] { flex: 0 0 22px; }
.stack-form p:has(> input[type="checkbox"]) > .helptext { flex: 0 0 100%; margin-left: 0; }
.auth-page .setup-card { width: min(860px, 100%); }
.setup-card h1 { margin-bottom: 0; }
.setup-card .auth-help { max-width: 720px; margin: 28px 0 32px; line-height: 1.5; text-align: left; text-wrap: balance; }
.recovery-code {
  margin: 24px 0 28px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--text);
  background: color-mix(in srgb, var(--primary) 6%, var(--surface-solid));
  overflow-x: auto;
}
.recovery-code code { display: block; min-width: max-content; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 1rem; font-weight: 750; line-height: 1.45; letter-spacing: .02em; }
.recovery-code-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.recovery-code-row .recovery-code { min-width: 0; margin: 0; }
.recovery-code-row .share-copy-button { min-height: 48px; white-space: nowrap; }
.setup-open-parent { display: flex; width: max-content; margin-left: auto; }
.setup-card .stack-form { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; row-gap: 22px; }
.setup-card .stack-form > p { min-width: 0; align-self: start; align-content: start; }
.setup-card .stack-form > p > input:not([type="checkbox"]),
.setup-card .stack-form > p > select { width: 100%; height: 48px; min-height: 48px; }
.setup-card .stack-form > .errorlist,
.setup-card .stack-form > p:has(> input[type="checkbox"]),
.setup-card .stack-form > .button { grid-column: 1 / -1; }
.setup-card .stack-form p:has(> input[type="checkbox"]) { display: flex; align-items: center; gap: 10px; }
.setup-card .stack-form p:has(> input[type="checkbox"]) > input[type="checkbox"] { order: 1; flex: 0 0 auto; }
.setup-card .stack-form p:has(> input[type="checkbox"]) > label { display: block; cursor: pointer; }
.setup-card .stack-form > p.is-disabled { opacity: .52; }
.setup-card .stack-form > p.is-disabled > input,
.setup-card .stack-form > p.is-disabled > select { cursor: not-allowed; background-color: color-mix(in srgb, var(--muted) 10%, var(--surface-solid)); }
.stack-form input[type="file"] { padding: 7px; }
.stack-form input[type="file"]::file-selector-button { min-height: 34px; margin-right: 10px; padding: 6px 11px; border: 0; border-radius: 9px; color: var(--text); background: color-mix(in srgb, var(--muted) 12%, var(--surface-solid)); font: inherit; font-weight: 750; cursor: pointer; }
.field-control::placeholder, .stack-form input::placeholder, .stack-form textarea::placeholder, .pin-input::placeholder { color: var(--muted); font-weight: 500; opacity: .72; }
.field-control:focus, .stack-form input:focus, .stack-form select:focus, .stack-form textarea:focus, .pin-input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 16%, transparent); }
select.field-control, .stack-form select {
  min-height: 48px;
  padding-right: 44px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='m4 6 4 4 4-4' stroke='%236f6975' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
  font-weight: 750;
  cursor: pointer;
}
.messages { position: fixed; z-index: 30; top: 84px; right: 16px; width: min(380px, calc(100% - 32px)); display: grid; gap: 8px; }
.message { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 13px 13px 16px; border-radius: 14px; background: var(--surface-solid); border: 1px solid var(--line); box-shadow: var(--shadow); transition: opacity .2s, transform .2s; }
.message.is-hiding { opacity: 0; transform: translateY(-8px); }
.message-close { flex: 0 0 auto; width: 34px; height: 34px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 10px; color: var(--muted); background: transparent; cursor: pointer; transition: transform .14s, background .14s, box-shadow .14s; }
.message-close:hover, .message-close:focus-visible { transform: var(--control-hover-lift); background: var(--icon-hover-fill); box-shadow: var(--icon-hover-shadow); }
.message-success { border-left: 5px solid var(--success); }
.message-error { border-left: 5px solid var(--danger); }
.profile-grid, .item-grid, .stats-grid, .approval-grid, .catalog-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 18px; }
.item-grid { grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); }
.profile-select-heading { margin-bottom: 28px; }
.profile-card { padding: 28px; text-align: center; position: relative; overflow: hidden; }
.profile-card-last-badge { position: absolute; top: 12px; right: 12px; padding: 5px 9px; border-radius: 99px; font-size: .7rem; font-weight: 780; background: var(--surface-solid); }
.profile-avatar, .profile-mini { display: grid; place-items: center; margin: 0 auto; color: white; background: linear-gradient(145deg, var(--primary), var(--accent)); font-weight: 900; }
.profile-avatar:not(.profile-photo), .profile-mini:not(.profile-photo) { color: var(--primary); background: color-mix(in srgb, var(--primary) 9%, var(--surface-solid)); border: 1px solid color-mix(in srgb, var(--primary) 28%, var(--line)); text-transform: uppercase; }
.profile-avatar { width: 86px; height: 86px; border-radius: 29px; font-size: 2rem; }
.profile-mini { width: 42px; height: 42px; border-radius: 14px; margin: 0; }
.profile-photo { object-fit: cover; display: block; }
.child-identity { display: flex; flex: 1 1 auto; align-items: center; gap: 18px; min-width: 0; }
.hero-avatar { width: 92px; height: 92px; border-radius: 28px; object-fit: cover; box-shadow: var(--shadow); border: 2px solid color-mix(in srgb, var(--surface-solid) 72%, transparent); }
.child-greeting { min-width: 0; }
.child-greeting h1 { overflow-wrap: anywhere; text-wrap: balance; }
.child-greeting-supporting { max-width: 36rem; margin: 10px 0 0; color: var(--muted); font-size: clamp(1.05rem, 2.2vw, 1.9rem); font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; }
.pin-dialog, .action-dialog { width: min(440px, calc(100% - 28px)); max-height: calc(100dvh - 28px); overflow-y: auto; border: 1px solid var(--line); border-radius: 24px; color: var(--text); background: var(--surface-solid); padding: 32px; box-shadow: var(--shadow); font-family: inherit; }
.share-dialog[open] {
  display: grid;
  align-content: start;
  justify-items: stretch;
  row-gap: 16px;
}
.share-dialog > h2,
.share-dialog > p,
.share-dialog > label,
.share-dialog .dialog-context,
.share-dialog .share-dialog-toolbar,
.share-dialog .danger-warning,
.share-dialog .dialog-actions {
  margin: 0;
  width: 100%;
  max-width: 100%;
  text-align: start;
}
.share-dialog.action-dialog .dialog-context {
  margin: 0;
}
.share-dialog > label {
  display: grid;
  gap: 10px;
  color: var(--text);
  font-weight: 750;
}
.share-dialog .share-dialog-toolbar {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 10px;
}
.share-dialog .share-dialog-toolbar .icon-button {
  flex: 0 0 auto;
}
.share-dialog .share-dialog-toolbar .share-copy-button {
  flex: 0 0 44px;
  width: 44px;
  min-width: 44px;
}
.share-copy-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 44px;
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--primary) 18%, var(--line));
  border-radius: 14px;
  color: var(--primary);
  background: color-mix(in srgb, var(--primary) 8%, var(--surface-solid));
  font: inherit;
  font-weight: 780;
  line-height: 1.2;
  cursor: pointer;
  transition: transform .14s, background .14s, box-shadow .14s;
}
.share-copy-button:hover, .share-copy-button:focus-visible {
  transform: var(--control-hover-lift);
}
.share-dialog .dialog-actions {
  position: static;
  z-index: auto;
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  justify-content: flex-start;
  margin: 0;
  padding: 0;
  background: transparent;
}
.share-dialog .dialog-actions .button {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
}
.share-dialog .field-control {
  max-height: 6.5rem;
}
.pin-dialog::backdrop, .action-dialog::backdrop { background: rgba(8, 6, 18, .66); backdrop-filter: blur(8px); }
.action-dialog h2 { margin-top: 0; padding-right: 24px; }
.action-dialog > p { color: var(--muted); font-size: .94rem; font-weight: 720; line-height: 1.5; letter-spacing: .01em; }
.action-dialog .dialog-context { margin: -8px 0 18px; color: var(--muted); font-weight: 750; }
.pin-input { font-size: 2rem; text-align: center; letter-spacing: .35em; }
.dialog-close { position: absolute; right: 14px; top: 12px; width: 44px; height: 44px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 11px; background: none; color: var(--muted); cursor: pointer; transition: transform .14s, background .14s, box-shadow .14s; }
.dialog-close:hover, .dialog-close:focus-visible { transform: var(--control-hover-lift); background: var(--icon-hover-fill); box-shadow: var(--icon-hover-shadow); }
.choice-fieldset { min-width: 0; margin: 0; padding: 0; border: 0; display: grid; gap: 10px; }
.choice-fieldset legend {
  display: block;
  float: left;
  width: 100%;
  margin: 0 0 10px;
  padding: 0;
  color: var(--text);
  font-weight: 750;
  line-height: 1.35;
}
.choice-fieldset > label {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 48px;
  margin: 0;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  font-weight: 720;
  cursor: pointer;
}
.choice-fieldset > label:has(input:checked) {
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary) 11%, var(--surface-solid));
}
.choice-fieldset > label > input[type="radio"],
.choice-fieldset > label > input[type="checkbox"] {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  min-height: 22px;
  margin: 0;
}
.choice-list { max-height: min(46vh, 420px); overflow-y: auto; display: grid; gap: 8px; padding: 2px; }
.choice-option,
.stack-form label.choice-option {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 13px;
  cursor: pointer;
}
.choice-option-assign .assigned-task-note-input,
.stack-form label.choice-option-assign .assigned-task-note-input {
  display: none;
  grid-column: 1 / -1;
  width: 100% !important;
  max-width: none !important;
  min-width: 0;
  height: auto !important;
  min-height: 48px;
  margin: 0;
  box-sizing: border-box;
}
.choice-option-assign:has(> input[type="checkbox"]:checked) .assigned-task-note-input,
.stack-form label.choice-option-assign:has(> input[type="checkbox"]:checked) .assigned-task-note-input {
  display: block;
}
.choice-option:hover { border-color: color-mix(in srgb, var(--primary) 45%, var(--line)); }
.choice-option:has(input:checked) { background: color-mix(in srgb, var(--primary) 11%, var(--surface-solid)); border-color: var(--primary); }
.choice-option > input[type="checkbox"],
.stack-form label.choice-option > input[type="checkbox"] {
  width: 20px;
  height: 20px;
  min-height: 20px;
  margin: 0;
  padding: 0;
  accent-color: var(--primary);
}
.choice-icon { font-size: 1.25rem; line-height: 1; }
.choice-title { min-width: 0; font-weight: 720; overflow-wrap: anywhere; }
.choice-value { color: var(--success); font-size: .9rem; font-weight: 820; line-height: 1.2; white-space: nowrap; }
.choice-value-negative { color: var(--danger); }
.button:disabled { cursor: not-allowed; opacity: .55; transform: none; }
.child-hero { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; padding: 16px 0 30px; }
.child-hero h1 { font-size: clamp(2.4rem, 7vw, 4.6rem); }
.waiting-parents-strip { display: grid; gap: 10px; margin: -6px 0 22px; padding: 14px 16px; border: 1px solid color-mix(in srgb, var(--accent) 42%, var(--line)); border-radius: var(--radius); background: color-mix(in srgb, var(--accent) 8%, var(--surface-solid)); }
.waiting-parents-strip .eyebrow { margin: 0; }
.waiting-parents-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.waiting-parents-chip { display: grid; gap: 2px; min-width: min(100%, 160px); max-width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-solid); color: var(--text); text-decoration: none; }
.waiting-parents-chip:hover { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }
.waiting-parents-kind { color: var(--accent); font-size: .74rem; font-weight: 780; letter-spacing: .02em; text-transform: uppercase; }
.waiting-parents-chip strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .95rem; }
.balance-orb { flex: 0 0 auto; min-width: 152px; min-height: 152px; display: grid; place-content: center; text-align: center; border-radius: 50%; color: #fff; background: radial-gradient(circle at 30% 20%, var(--accent), var(--primary)); box-shadow: 0 20px 55px color-mix(in srgb, var(--primary) 36%, transparent); }
.balance-orb strong { font-size: 2.6rem; line-height: 1; }
.balance-orb span { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; }
.tabbar { display: flex; gap: 6px; overflow-x: auto; position: sticky; top: calc(10px + env(safe-area-inset-top, 0px)); z-index: 8; padding: 8px; margin: 0 0 34px; border: 1px solid var(--line); border-radius: 17px; background: var(--surface-solid); backdrop-filter: blur(20px); }
.tabbar a { flex: 1; min-width: max-content; padding: 10px 14px; text-align: center; text-decoration: none; font-weight: 750; border-radius: 12px; }
.tabbar a:hover { background: color-mix(in srgb, var(--primary) 12%, transparent); }
.tabbar::before, .tabbar::after, .manage-tabs::before, .manage-tabs::after { content: ""; position: absolute; top: 1px; bottom: 1px; z-index: 2; width: 28px; pointer-events: none; opacity: 0; transition: opacity .16s; }
.tabbar::before, .manage-tabs::before { left: 1px; border-radius: inherit; background: linear-gradient(90deg, var(--surface-solid), transparent); }
.tabbar::after, .manage-tabs::after { right: 1px; border-radius: inherit; background: linear-gradient(270deg, var(--surface-solid), transparent); }
.manage-tabs::before, .manage-tabs::after { background: linear-gradient(90deg, var(--surface), transparent); }
.manage-tabs::after { background: linear-gradient(270deg, var(--surface), transparent); }
.tabbar.is-scrollable:not(.is-at-start)::before, .tabbar.is-scrollable:not(.is-at-end)::after,
.manage-tabs.is-scrollable:not(.is-at-start)::before, .manage-tabs.is-scrollable:not(.is-at-end)::after { opacity: 1; }
.content-section { scroll-margin-top: calc(90px + env(safe-area-inset-top, 0px)); padding: 30px 0; }
.section-heading h2, .parent-section-heading h1 { margin: 0 0 18px; font-size: clamp(1.7rem, 4vw, 2.5rem); line-height: 1.1; letter-spacing: -.04em; }
.item-card { padding: 20px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; container-type: inline-size; }
.item-card > button,
.item-card > form.workflow-card-action { grid-column: 1 / -1; justify-self: end; }
@container (min-width: 380px) {
  .item-card > button,
  .item-card > form.workflow-card-action { grid-column: 3; grid-row: 1; }
}
.item-card .status-pill { grid-column: 1 / -1; }
.reward-card > form { margin: 0; }
.item-icon { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 17px; color: var(--primary); background: color-mix(in srgb, var(--primary) 12%, var(--surface-solid)); font-size: 1.6rem; }
.approval-card h3 { margin: 0 0 5px; }
.item-card h3 { margin: 0; flex: 1 1 8ch; min-width: 8ch; overflow-wrap: break-word; }
.item-card p { margin: 0; }
.amount { font-variant-numeric: tabular-nums; font-weight: 850; color: var(--danger); }
.amount.positive { color: var(--success); }
.status-pill { display: inline-flex; width: fit-content; padding: 7px 10px; border-radius: 99px; background: color-mix(in srgb, var(--accent) 17%, var(--surface-solid)); color: var(--text); font-size: .76rem; font-weight: 780; }
.status-danger { background: color-mix(in srgb, var(--danger) 17%, var(--surface-solid)); }
.pending-list, .ledger { margin-top: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.pending-list h3 { padding: 0 18px; }
.list-row, .ledger-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.list-row:last-child, .ledger-row:last-child { border-bottom: 0; }
.two-column { display: grid; grid-template-columns: 1.2fr .8fr; gap: 24px; }
.panel, .goal-card { padding: 22px; }
.progress { height: 12px; margin-top: 14px; border-radius: 99px; overflow: hidden; background: color-mix(in srgb, var(--muted) 14%, transparent); }
.progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--primary), var(--accent)); }
.goal-card-heading, .goal-status-row, .goal-title, .dialog-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.building-plan-goals { display: grid; gap: 16px; }
.goal-title { justify-content: flex-start; min-width: 0; }
.goal-title strong { min-width: 0; overflow-wrap: anywhere; }
.goal-title .item-icon { width: 42px; height: 42px; flex: 0 0 auto; font-size: 1.25rem; }
.goal-status-row { margin-top: 14px; }
.goal-status-label, .goal-mode-button { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: .78rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.goal-status-label .info-button { width: 44px; height: 44px; }
.goal-mode-button { padding: 6px 0; border: 0; color: var(--primary); background: transparent; cursor: pointer; transition: transform .16s; }
.goal-mode-button:hover, .goal-mode-button:focus-visible { transform: var(--control-hover-lift); }
.goal-mode-button .action-icon { width: 17px; height: 17px; }
.goal-add-button { min-height: 40px; padding: 8px 13px; }
.goal-mode-options { display: grid; gap: 10px; }
.goal-mode-option { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 13px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.goal-mode-option label { display: flex; min-width: 0; align-items: center; gap: 11px; cursor: pointer; }
.goal-mode-option label > input[type="radio"] { width: 22px; height: 22px; flex: 0 0 auto; margin: 0; accent-color: var(--primary); }
.goal-mode-option label > span { display: grid; min-width: 0; gap: 3px; }
.goal-mode-option strong, .goal-mode-option small { margin: 0; }
.goal-mode-option small { color: var(--muted); font-size: .9rem; font-weight: 500; }
.goal-mode-option .info-button { width: 44px; height: 44px; }
.goal-quick-options { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 12px 0 18px; }
.goal-quick-options .button { min-height: 42px; padding: 8px 10px; }
.stack-form .goal-add-preview { display: flex; align-items: baseline; gap: 6px; margin: 0; color: var(--muted); white-space: nowrap; }
.dialog-actions { justify-content: flex-end; flex-wrap: wrap; margin-top: 4px; }
.dialog-actions form { margin: 0; }
.goal-mode-form .dialog-actions { flex-wrap: nowrap; }
.goal-mode-form .dialog-actions .button { min-width: 0; }
.ledger-row { justify-content: initial; }
.ledger-row > div { flex: 1; display: grid; gap: 2px; align-content: start; min-width: 0; }
.ledger-row small { color: var(--muted); }
.ledger-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: color-mix(in srgb, var(--primary) 10%, transparent); font-weight: 850; }
.ledger-icon .action-icon { width: 20px; height: 20px; fill: currentColor; }
.history-row-actions { display: flex; flex: 0 0 auto; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px 10px; }
.history-kind-icon { display: grid; flex: 0 0 30px; place-items: center; width: 30px; height: 30px; border-radius: 9px; color: var(--primary); background: color-mix(in srgb, var(--primary) 10%, var(--surface-solid)); }
.history-kind-icon .action-icon { width: 17px; height: 17px; }
.history-decision { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 6px; min-height: 34px; padding: 6px 9px; border-radius: 99px; font-size: .76rem; font-weight: 850; white-space: nowrap; }
.history-decision .action-icon { width: 19px; height: 19px; }
.history-decision-approved { color: var(--success); background: color-mix(in srgb, var(--success) 12%, var(--surface-solid)); }
.history-decision-rejected { color: var(--danger); background: color-mix(in srgb, var(--danger) 12%, var(--surface-solid)); }
.history-decision-informational { color: var(--muted); background: color-mix(in srgb, var(--muted) 14%, var(--surface-solid)); }
.history-rejection-reason { margin-top: 2px; color: var(--danger) !important; overflow-wrap: anywhere; }
.stat-card { padding: 22px; }
.stat-card h2, .stat-card p { margin-top: 0; }
.parent-title { margin-bottom: 28px; }
.parent-refresh-status { display: flex; align-items: center; justify-content: flex-end; gap: 10px; min-height: 0; margin: -16px 0 14px; color: var(--muted); font-size: .82rem; font-weight: 700; }
.parent-refresh-status:has(span:empty) { display: none; }
.parent-refresh-status .text-button { min-height: 32px; padding: 4px 8px; }
.child-card-header { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.child-card-header h2 { margin: 0; }
.child-balance-row { display: flex; align-items: baseline; justify-content: flex-start; flex-wrap: nowrap; gap: 8px 16px; margin: 12px 0 14px; }
.child-balance-row .stat-value, .child-balance-row .saved-total { margin-bottom: 0; }
.credit-caption { display: flex; align-items: center; gap: 6px; margin: 0; color: var(--muted); font-size: .9rem; font-weight: 720; line-height: 1.2; letter-spacing: .01em; }
.credit-caption > span { display: inline-flex; align-items: center; min-height: 28px; }
.child-metadata-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 4px 10px;
  min-width: 0;
  margin: 0 0 4px;
}
.child-metadata-row > .child-meta-item { flex: 0 1 auto; margin: 0; white-space: nowrap; }
.child-meta-item { display: inline-flex; align-items: center; gap: 6px; }
.lottery-parent-status { display: inline-flex; align-items: center; gap: 6px; margin: 0; color: var(--muted); font-size: .9rem; font-weight: 720; }
.lottery-parent-status > .action-icon { flex: 0 0 auto; width: 18px; height: 18px; }
.credit-caption > .action-icon { flex: 0 0 18px; width: 18px; height: 18px; }
.meta-info-button {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  min-width: 28px;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 9px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  transition: transform .14s, background .14s, box-shadow .14s, color .14s;
}
.meta-info-button:hover, .meta-info-button:focus-visible {
  transform: var(--control-hover-lift);
  color: var(--primary);
  background: var(--icon-hover-fill);
  box-shadow: var(--icon-hover-shadow);
}
.meta-info-button .action-icon { width: 16px; height: 16px; }
.stat-card > .button, .stat-card > form .button { width: 100%; }
.stat-card > form { margin-top: 10px; }
.child-quick-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: 14px;
  align-items: stretch;
}
.quick-action {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: auto;
  min-width: 0;
  min-height: 58px;
  height: auto;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: var(--primary);
  background: color-mix(in srgb, var(--primary) 8%, var(--surface-solid));
  cursor: pointer;
  transition: transform .14s, background .14s, box-shadow .14s;
}
.quick-action:hover, .quick-action:focus-visible { transform: var(--control-hover-lift); background: color-mix(in srgb, var(--primary) 14%, var(--surface-solid)); box-shadow: var(--icon-hover-shadow); }
.quick-action .action-icon { flex: 0 0 auto; width: 22px; height: 22px; display: block; }
.quick-action span {
  display: block;
  max-width: 100%;
  color: var(--text);
  font-size: .78rem;
  font-weight: 780;
  line-height: 1.1;
  text-align: center;
  white-space: nowrap;
}
.quick-action-more {
  width: 52px;
  min-width: 52px;
  padding-inline: 0;
}
.child-more-actions { display: grid; gap: 10px; margin-top: 8px; }
.child-more-action {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--text);
  background: color-mix(in srgb, var(--primary) 8%, var(--surface-solid));
  font: inherit;
  font-weight: 750;
  text-align: left;
  cursor: pointer;
  transition: transform .14s, background .14s, box-shadow .14s;
}
.child-more-action:hover, .child-more-action:focus-visible {
  transform: var(--control-hover-lift);
  background: color-mix(in srgb, var(--primary) 14%, var(--surface-solid));
  box-shadow: var(--icon-hover-shadow);
}
.child-more-action .action-icon { flex: 0 0 22px; width: 22px; height: 22px; color: var(--primary); }
.child-more-action span { flex: 1 1 auto; min-width: 0; }
.choice-option-disabled { opacity: .52; cursor: not-allowed; }
.choice-option-disabled:hover { border-color: var(--line); }
.choice-title { display: grid; }
.choice-title small { color: var(--muted); font-weight: 650; }
.assigned-tasks-dialog { width: min(620px, calc(100% - 28px)); max-height: calc(100dvh - 28px); overflow-y: auto; }
.assigned-tasks-dialog .choice-list { max-height: 280px; overflow-y: auto; }
.custom-assigned-task { display: grid; gap: 10px; padding-top: 4px; }
.custom-assigned-task h3 { margin: 0; }
.assigned-task-history { display: grid; gap: 12px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.assigned-task-batch { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; }
.assigned-task-batch-header.list-row,
.assigned-task-history-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 44px;
  align-items: center;
  column-gap: 12px;
  padding: 12px 14px;
}
.assigned-task-batch-header { border-bottom: 0; }
.assigned-task-history-row { border-top: 1px solid var(--line); }
.assigned-task-batch-copy { grid-column: 1 / 3; min-width: 0; }
.assigned-task-history-copy { min-width: 0; }
.assigned-task-history-status {
  color: var(--muted);
  font-size: .88rem;
  font-weight: 750;
  text-align: right;
  white-space: nowrap;
}
.assigned-task-cancel {
  grid-column: 3;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: 44px;
  min-height: 44px;
  margin: 0;
}
.assigned-tasks-priority { margin-bottom: 32px; padding: 22px; border: 2px solid color-mix(in srgb, var(--accent) 58%, var(--line)); border-radius: var(--radius); background: color-mix(in srgb, var(--accent) 9%, var(--surface-solid)); box-shadow: var(--shadow); }
.assigned-tasks-priority > p { color: var(--muted); }
.assigned-task-list { display: grid; gap: 10px; }
.assigned-task-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: 14px; padding: 14px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface-solid); }
.assigned-task-row > div { display: grid; gap: 2px; min-width: 0; }
.assigned-task-row h3 { min-width: 0; overflow-wrap: break-word; }
.assigned-task-row .amount { white-space: nowrap; }
.assigned-task-row h3, .assigned-task-row p { margin: 0; }
.assigned-task-note { margin-top: 6px; display: grid; gap: 2px; color: var(--text); }
.assigned-task-note-label { font-size: .78em; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; color: var(--accent); }
.assigned-task-note-body { font-size: 1em; font-weight: 600; line-height: 1.35; color: var(--text); overflow-wrap: break-word; }
.assigned-task-history-note { display: block; margin-top: 4px; color: var(--muted); }
.assignment-presets,
.assignment-preset-save { display: grid; gap: 12px; margin: 18px 0 8px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: color-mix(in srgb, var(--primary) 5%, var(--surface-solid)); }
.assignment-presets h3,
.assignment-preset-save h3 { margin: 0; }
.assignment-preset-save > p { margin: 0; color: var(--muted); }
.assignment-preset-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.assignment-preset-row:first-of-type { border-top: 0; padding-top: 0; }
.assignment-preset-row.is-paused { opacity: .72; }
.assignment-preset-copy { display: grid; gap: 2px; min-width: 0; }
.assignment-preset-copy small { color: var(--muted); }
.assignment-preset-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.compact-action-button { min-height: 40px; padding: .45rem .85rem; font-size: .88rem; }
.preset-cadence-options { display: grid; gap: 10px; margin: 0; padding: 0; border: 0; }
.preset-cadence-options > legend { padding: 0; font-weight: 780; }
.preset-cadence-options > .help-text { margin: -2px 0 2px; }
.preset-cadence-choice { align-items: center; }
.preset-weekday-list { display: flex; flex-wrap: wrap; gap: 8px 12px; }
.preset-cadence-panel {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-solid);
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.preset-cadence-panel .field-control,
.preset-cadence-panel select { width: 100%; }
.stack-form .preset-cadence-panel[hidden],
.assignment-preset-save .preset-cadence-panel[hidden],
.preset-cadence-panel[hidden] { display: none !important; }
.stat-value { margin-bottom: .35rem; font-size: 2.1rem; line-height: 1.08; font-weight: 900; }
.stat-value small { margin-left: .18em; font-size: .75em; color: var(--text); opacity: 1; text-transform: uppercase; }
.balance-positive { color: var(--success); }
.balance-negative { color: var(--danger); }
.balance-zero { color: var(--text); }
.saved-total { display: flex; align-items: center; gap: 4px; margin: 0 0 2px; color: var(--muted); font-size: .88rem; font-weight: 720; }
.saved-total { position: relative; padding-right: 44px; white-space: nowrap; line-height: 1.2; }
.saved-total .info-button { position: absolute; top: 50%; right: 0; margin: 0; transform: translateY(-50%); }
.parent-goal-summary { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px 10px; margin: 12px 0 4px; padding: 13px 14px; color: var(--text); border: 1px solid var(--line); border-radius: 14px; background: color-mix(in srgb, var(--primary) 6%, var(--surface-solid)); text-decoration: none; }
.parent-goal-summary:hover, .parent-goal-summary:focus-visible { border-color: var(--primary); }
.goal-summary-title { min-width: 0; overflow-wrap: anywhere; font-weight: 800; }
.goal-summary-progress, .parent-goal-summary small { color: var(--muted); font-size: .78rem; font-weight: 750; }
.parent-goal-summary .progress { grid-column: 1 / -1; margin-top: 3px; height: 9px; }
.goal-summary-status { display: inline-flex; align-items: center; justify-self: start; gap: 4px; }
.parent-goal-summary > small:not(.goal-summary-status) { justify-self: end; }
.building-plan-layout { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr); gap: 24px; align-items: start; }
.building-plan-layout .proposal-section { padding: 0; }
details { margin-top: 12px; }
summary { cursor: pointer; font-weight: 780; padding: 8px 0; }
details .stack-form, details .inline-form { margin-top: 14px; }
.pending-groups { display: grid; gap: 22px; }
.pending-child-group { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: color-mix(in srgb, var(--surface) 82%, transparent); box-shadow: var(--shadow); }
.pending-child-heading { display: flex; align-items: center; gap: 12px; padding: 15px 18px; border-bottom: 1px solid var(--line); }
.pending-child-heading h3 { margin: 0; font-size: 1.2rem; }
.pending-requests-panel {
  overflow: hidden;
  border: 2px solid color-mix(in srgb, var(--accent) 62%, var(--line));
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--accent) 8%, var(--surface));
  box-shadow: var(--shadow);
}
.pending-panel-heading {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 24%, var(--line));
  background: color-mix(in srgb, var(--accent) 14%, var(--surface-solid));
}
.pending-panel-heading h2 {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.2;
  letter-spacing: -.02em;
  font-weight: 820;
}
.pending-count-badge {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  padding: 4px 9px;
  border-radius: 99px;
  color: #fff;
  background: var(--danger);
  font-size: .78rem;
  font-weight: 850;
  line-height: 1;
}
.pending-request-list { display: grid; }
.pending-request-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 88%, transparent);
}
.pending-request-row:last-child { border-bottom: 0; }
.pending-request-avatar { align-self: center; }
.pending-request-avatar .profile-mini { width: 44px; height: 44px; border-radius: 13px; }
.pending-request-copy { display: grid; min-width: 0; gap: 3px; align-content: center; }
.pending-request-copy h3, .pending-request-copy p { margin: 0; overflow-wrap: anywhere; }
.pending-request-copy h3 { line-height: 1.2; }
.pending-request-copy small { color: var(--muted); font-weight: 650; }
.pending-request-meta { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 8px; row-gap: 0; color: var(--muted); line-height: 1.25; }
.pending-request-meta strong { color: var(--text); font-size: .88rem; font-weight: 800; line-height: 1.25; }
.pending-request-sep { flex: 0 0 auto; color: var(--muted); font-size: .88rem; font-weight: 700; line-height: 1.25; }
.pending-request-meta .eyebrow { display: inline; margin: 0; font-size: .72rem; letter-spacing: .08em; line-height: 1.25; }
.pending-request-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.pending-request-actions form { display: flex; margin: 0; }
.pending-request-actions .decision-icon-button { width: 44px; height: 44px; border-radius: 13px; }
.pending-request-actions .evidence-thumb-button { width: 44px; height: 44px; border-radius: 12px; }
.pending-request-row[data-approval-processing] { opacity: .62; }
.pending-request-row[data-approval-processing] .pending-request-actions { pointer-events: none; }
[data-approval-submit][aria-busy="true"] { cursor: progress; }
[data-approval-submit][aria-busy="true"] .action-icon { visibility: hidden; }
[data-approval-submit][aria-busy="true"]::before { grid-area: 1 / 1; width: 18px; height: 18px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; content: ""; animation: approval-button-spin .7s linear infinite; }
@keyframes approval-button-spin { to { transform: rotate(360deg); } }
.pending-evidence-cluster { display: flex; flex: 0 0 auto; align-items: center; gap: 8px; }
.pending-empty-state { display: flex; align-items: center; gap: 10px; padding: 18px; color: var(--success); font-size: .94rem; font-weight: 720; line-height: 1.4; }
.pending-empty-state p { margin: 0; }
.pending-empty-state .action-icon { width: 22px; height: 22px; color: var(--success); }
.empty-panel { display: flex; align-items: center; gap: 12px; padding: 18px 20px; border: 1px dashed color-mix(in srgb, var(--muted) 30%, var(--line)); border-radius: var(--radius); color: var(--muted); background: color-mix(in srgb, var(--surface-solid) 64%, transparent); font-weight: 700; }
.empty-panel p { margin: 0; }
.empty-panel-mark { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 11px; color: var(--success); background: color-mix(in srgb, var(--success) 12%, var(--surface-solid)); font-weight: 900; }
.approval-list { display: grid; }
.approval-card { padding: 18px; display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(360px, .9fr); gap: 14px; align-items: center; border-bottom: 1px solid var(--line); background: transparent; border-radius: 0; box-shadow: none; backdrop-filter: none; }
.approval-card.has-evidence { grid-template-columns: auto minmax(0, 1fr) 84px auto; }
.approval-card:last-child { border-bottom: 0; }
.approval-actions { grid-column: 1 / -1; align-items: stretch; }
.approval-card .approval-actions { grid-column: 3; justify-content: flex-end; }
.approval-card.has-evidence .approval-actions { grid-column: 4; flex-wrap: nowrap; }
.approval-copy { display: grid; min-width: 0; gap: 4px; align-content: center; }
.approval-copy h3, .approval-copy p { margin: 0; overflow-wrap: anywhere; }
.approval-copy .eyebrow { margin: 0; }
.approval-copy .photo-bonus { margin-top: 2px; }
.evidence-thumb-button { display: block; width: 84px; height: 84px; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: color-mix(in srgb, var(--muted) 8%, var(--surface-solid)); cursor: zoom-in; }
.evidence-thumb-button img { display: block; width: 100%; height: 100%; object-fit: cover; }
.decision-icon-button { display: inline-grid; place-items: center; width: 48px; height: 48px; padding: 0; border: 1px solid currentColor; border-radius: 15px; background: var(--surface-solid); cursor: pointer; transition: transform .14s, box-shadow .14s, background .14s; }
.decision-icon-button:hover, .decision-icon-button:focus-visible { transform: var(--control-hover-lift); background: var(--icon-hover-fill); box-shadow: var(--icon-hover-shadow); }
.decision-icon-button .action-icon { width: 25px; height: 25px; }
.decision-approve { color: var(--success); background: color-mix(in srgb, var(--success) 10%, var(--surface-solid)); }
.decision-revise { color: var(--primary); background: color-mix(in srgb, var(--primary) 9%, var(--surface-solid)); }
.decision-revise .action-icon { width: 22px; height: 22px; }
.decision-reject { color: var(--danger); background: color-mix(in srgb, var(--danger) 9%, var(--surface-solid)); }
.compact-decision-button { width: 44px; height: 44px; min-width: 44px; min-height: 44px; border-radius: 13px; }
.compact-decision-button .action-icon { width: 22px; height: 22px; }
.dialog-decision-action { justify-self: end; scroll-margin-bottom: 12px; }
.workflow-card-button { justify-self: end; }
.item-card > form.workflow-card-action { display: flex; width: auto; margin: 0; }
.task-decision-dialog .button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.task-decision-dialog .button .action-icon { width: 21px; height: 21px; }
.inline-reject { display: flex; flex: 1; min-width: min(320px, 100%); gap: 8px; }
.catalog-grid { grid-template-columns: 1fr; }
.catalog-grid .panel { align-self: start; }
.manage-section { display: grid; gap: 0; }
.manage-section[hidden] { display: none; }
.manage-empty {
  display: grid;
  gap: 8px;
  justify-items: stretch;
  align-content: center;
  text-align: left;
  padding: 18px;
}
.manage-empty .empty-state {
  margin: 0;
  padding: 0;
  max-width: none;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 750;
  line-height: 1.4;
  letter-spacing: normal;
}
.manage-section:has(> .catalog-create) > .manage-empty {
  padding-bottom: 18px;
}
.catalog-list { margin: 0 0 18px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.catalog-list .list-row { padding: 10px 12px; }
.catalog-list small { color: var(--muted); }
.catalog-list .catalog-token { display: inline-block; margin-left: .28em; font-size: .86rem; font-weight: 820; line-height: 1.2; }
.catalog-list .catalog-token-positive { color: var(--success); }
.catalog-list .catalog-token-negative { color: var(--danger); }
.history-panel { margin-top: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
#parent-settings details > summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; list-style: none; }
#parent-settings details > summary::-webkit-details-marker { display: none; }
#parent-settings details > summary::after { content: "›"; flex: 0 0 auto; margin-left: auto; color: var(--muted); font-size: 1.7rem; line-height: 1; transform: rotate(90deg); transition: transform .16s; }
#parent-settings details[open] > summary::after { transform: rotate(-90deg); }
.history-panel .eyebrow { display: block; }
.history-title { display: block; font-size: clamp(1.45rem, 3vw, 2rem); letter-spacing: -.035em; }
.history-filter { display: grid; grid-template-columns: minmax(160px, 280px) auto; align-items: center; gap: 10px; padding: 22px 22px 16px; color: var(--muted); font-weight: 700; }
.history-filter.is-loading { opacity: .7; }
.history-filter.is-loading .field-control { cursor: wait; }
.history-filter-button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; width: fit-content; min-height: 44px; }
.history-filter-button strong { min-width: 20px; padding: 2px 5px; border-radius: 99px; color: #fff; background: var(--primary); font-size: .72rem; }
.history-filter-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 0 22px 14px; }
.history-filter-chips button { min-height: 44px; padding: 8px 12px; border: 1px solid color-mix(in srgb, var(--primary) 30%, var(--line)); border-radius: 99px; color: var(--primary); background: color-mix(in srgb, var(--primary) 8%, var(--surface-solid)); font: inherit; font-size: .78rem; font-weight: 750; cursor: pointer; transition: transform .16s, background .14s, box-shadow .14s; }
.history-filter-chips button:hover, .history-filter-chips button:focus-visible { transform: var(--control-hover-lift); }
.history-filter-chips .history-clear-filters, .history-clear-filters { display: inline-grid; place-items: center; flex: 0 0 44px; width: 44px; min-width: 44px; height: 44px; min-height: 44px; padding: 0; border-radius: 12px; }
.history-clear-filters:hover, .history-clear-filters:focus-visible { background: var(--icon-hover-fill); box-shadow: var(--icon-hover-shadow); }
.history-clear-filters .action-icon { width: 20px; height: 20px; }
.history-empty-state { display: block; }
.history-filter-dialog { width: min(520px, calc(100% - 28px)); }
.history-filter-label { grid-template-columns: auto minmax(0, 1fr); align-items: center; }
.history-filter-label .field-control { grid-column: 1 / -1; }
.history-filter-label > .action-icon { width: 16px; height: 16px; }
.history-custom-range { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.history-custom-range[hidden] { display: none; }
.history-panel .ledger { margin: 0; border-width: 1px 0 0; border-radius: 0; box-shadow: none; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 16px 22px; border-top: 1px solid var(--line); color: var(--muted); font-size: .88rem; font-weight: 700; }
.catalog-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.catalog-row:last-child { border-bottom: 0; }
.catalog-row.is-inactive { background: color-mix(in srgb, var(--muted) 6%, var(--surface-solid)); }
.catalog-row.is-inactive .catalog-title { color: var(--muted); }
.catalog-row.is-editing { align-items: start; }
.catalog-row.is-editing .catalog-actions { opacity: .55; }
.catalog-summary, .catalog-actions { display: flex; align-items: center; gap: 10px; }
.catalog-summary { min-width: 0; }
.catalog-summary > span:last-child { min-width: 0; overflow-wrap: anywhere; font-family: inherit; }
.catalog-title { color: var(--text); font-family: inherit; font-size: 1rem; font-weight: 650; line-height: 1.35; letter-spacing: normal; }
.catalog-emoji { flex: 0 0 auto; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: color-mix(in srgb, var(--primary) 10%, transparent); font-size: 1.25rem; }
.catalog-actions form { margin: 0; }
.catalog-hidden-pill { margin-left: .4em; vertical-align: middle; }
.icon-button { width: 44px; height: 44px; min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 0; border: 1px solid color-mix(in srgb, var(--primary) 18%, var(--line)); border-radius: 11px; color: var(--primary); background: color-mix(in srgb, var(--primary) 8%, var(--surface-solid)); cursor: pointer; font-size: 1.05rem; transition: transform .14s, background .14s, box-shadow .14s; }
.icon-button:hover, .icon-button:focus-visible { transform: var(--control-hover-lift); background: var(--icon-hover-fill); box-shadow: var(--icon-hover-shadow); }
.icon-button:disabled { cursor: not-allowed; opacity: .55; }
.icon-button:disabled:hover, .icon-button:disabled:focus-visible { transform: none; box-shadow: none; }
.icon-button.danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 24%, var(--line)); background: color-mix(in srgb, var(--danger) 7%, var(--surface-solid)); }
.goal-manage-actions .icon-button.danger { color: var(--primary); border-color: color-mix(in srgb, var(--primary) 18%, var(--line)); background: color-mix(in srgb, var(--primary) 8%, var(--surface-solid)); }
.icon-button .action-icon { flex: 0 0 22px; width: 22px; height: 22px; display: block; }
@media (max-width: 600px) {
  .icon-button .action-icon { flex-basis: 20px; width: 20px; height: 20px; }
}
.action-icon { width: 20px; height: 20px; display: block; fill: currentColor; pointer-events: none; }
.catalog-edit-form { grid-column: 1 / -1; padding: 14px; margin: 2px 0 4px; border-radius: 13px; background: color-mix(in srgb, var(--primary) 6%, var(--surface-solid)); }
.catalog-edit-form[hidden] { display: none; }
.form-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
.catalog-edit-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.catalog-delete-action { width: 44px; min-width: 44px; margin-top: 4px; }
.catalog-create { margin-top: 8px; }
.catalog-divider { display: flex; align-items: center; gap: 10px; margin: 4px 0 18px; color: var(--primary); font-size: .82rem; font-weight: 850; text-transform: uppercase; letter-spacing: .11em; }
.catalog-divider > span { padding: 5px 10px; border-radius: 99px; background: color-mix(in srgb, var(--primary) 9%, var(--surface-solid)); }
.catalog-divider::before, .catalog-divider::after { content: ""; height: 1px; flex: 1; background: color-mix(in srgb, var(--primary) 24%, var(--line)); }

.child-settings-accordion { display: grid; gap: 12px; }
.child-settings-acc {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.child-settings-acc > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  font-weight: 850;
  font-size: 1.1rem;
  user-select: none;
}
.child-settings-acc > summary::-webkit-details-marker { display: none; }
.child-settings-acc-icon {
  flex: 0 0 auto;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 14px;
  background: color-mix(in srgb, var(--primary) 12%, var(--surface-solid));
  font-size: 1.25rem;
}
.child-settings-acc-title { flex: 1 1 auto; min-width: 0; }
.child-settings-acc-chevron {
  flex: 0 0 auto;
  width: 28px; height: 28px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 2px solid var(--border);
  color: var(--muted);
  transition: transform .16s;
}
.child-settings-acc[open] > summary .child-settings-acc-chevron {
  transform: rotate(180deg);
  color: var(--primary);
  border-color: var(--primary);
}
.child-settings-acc-body {
  padding: 16px 18px 18px;
  border-top: 1px solid var(--border);
}
.child-settings-hint { margin: 0 0 14px; color: var(--muted); line-height: 1.4; }
.child-settings-theme-grid { gap: 12px; }
.child-settings-theme-grid .theme-choice-preview {
  min-height: 92px;
  padding: 14px 44px 14px 14px;
  gap: 4px;
}
.child-settings-theme-grid .theme-choice-preview strong {
  font-size: clamp(1rem, 2.8vw, 1.25rem);
}
.theme-choice-sub {
  position: relative;
  z-index: 1;
  display: block;
  font-weight: 650;
  font-size: .72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  text-align: center;
}
.theme-choice.theme-daily .theme-choice-preview {
  border-style: dashed;
  padding-right: 14px;
  background:
    repeating-linear-gradient(-45deg, transparent, transparent 8px, color-mix(in srgb, var(--primary) 8%, transparent) 8px, color-mix(in srgb, var(--primary) 8%, transparent) 16px),
    var(--surface-solid);
}
.theme-choice.theme-daily > input:checked + .theme-choice-preview {
  border-style: solid;
  background: color-mix(in srgb, var(--accent) 22%, var(--surface-solid));
}
.theme-daily-emoji { position: relative; z-index: 1; font-size: 1.45rem; line-height: 1; }
.child-avatar-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.child-avatar-preview {
  width: 88px;
  height: 88px;
  border-radius: 28px;
  object-fit: cover;
  border: 3px solid color-mix(in srgb, var(--primary) 40%, var(--border));
  background: color-mix(in srgb, var(--primary) 14%, var(--surface-solid));
}
.child-avatar-form .avatar-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-width: 160px;
}
.child-avatar-form .avatar-actions .button { width: 100%; justify-content: center; }
.pin-guide {
  display: grid;
  gap: 8px;
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
}
.pin-guide li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 2px solid var(--border);
  background: var(--surface-solid);
  font-weight: 750;
  color: var(--muted);
}
.pin-guide .step-num {
  flex: 0 0 auto;
  width: 28px; height: 28px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--primary) 35%, var(--border));
  font-size: .9rem;
  font-weight: 850;
}
.pin-guide li.is-done {
  color: var(--text);
  border-color: color-mix(in srgb, var(--success) 45%, var(--border));
  background: color-mix(in srgb, var(--success) 10%, var(--surface-solid));
}
.pin-guide li.is-done .step-num {
  border-color: var(--success);
  background: var(--success);
  color: #fff;
}
.pin-guide li.is-active {
  color: var(--text);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent);
  background: color-mix(in srgb, var(--primary) 8%, var(--surface-solid));
}
.pin-guide li.is-active .step-num {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}
.pin-step-label {
  margin: 0 0 6px;
  text-align: center;
  font-weight: 800;
  font-size: 1.05rem;
}
.pin-dots { display: flex; justify-content: center; gap: 18px; margin: 12px 0 8px; }
.pin-dots span {
  width: 26px; height: 26px; border-radius: 50%;
  border: 3px solid var(--primary); background: transparent;
}
.pin-dots span.filled { background: var(--primary); }
.pin-pad {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
  max-width: 360px;
  margin: 14px auto 0;
}
.pin-pad button {
  display: grid;
  place-items: center;
  min-height: 76px;
  border-radius: 18px;
  border: 2px solid var(--border);
  background: var(--surface-solid);
  color: var(--text);
  font-size: 1.85rem;
  font-weight: 850;
  cursor: pointer;
  touch-action: manipulation;
}
.pin-pad-back .action-icon {
  width: 32px;
  height: 32px;
  fill: currentColor;
}
.pin-save-row { margin-top: 14px; text-align: center; }
.pin-save-row[hidden] { display: none; }
.child-pin-form.is-pin-mismatch .pin-dots span,
.child-pin-form.is-pin-mismatch .pin-step-label {
  animation: pin-mismatch-shake .36s ease;
}
@keyframes pin-mismatch-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

.theme-magic_academy .child-settings-acc { border: 2px solid #c5a059; border-radius: 12px; }
.theme-block_world .child-settings-acc { border-radius: 0; box-shadow: 4px 4px 0 #1e3b1f; }
.theme-block_world .pin-pad button { border-radius: 0; }
.theme-hero_hq .child-settings-acc { border: 2px solid #1f2937; border-radius: 5px; box-shadow: 5px 5px 0 #1f2937; }
.theme-hero_hq .pin-pad button { border-radius: 5px; border-color: #1f2937; }
.theme-art_studio .child-settings-acc { border: 2px solid #f2cc8f; border-radius: 30px 18px 28px 20px; }
.theme-panda_pet .child-settings-acc {
  border-radius: 34px;
  border: 2px solid color-mix(in srgb, #2d6a4f 32%, transparent);
  box-shadow: 0 10px 0 color-mix(in srgb, #ffb5a7 45%, transparent);
}
.theme-blockville .child-settings-acc { border: 1px solid #393b3d; border-radius: 8px; background: #232527; }
.theme-blockville .pin-pad button { border-radius: 8px; border-color: #393b3d; background: #2a2c2e; color: #fff; }

.onboarding-heading { max-width: 760px; margin-bottom: 28px; }
.onboarding-heading > p:last-child { max-width: 620px; color: var(--muted); line-height: 1.55; }
.onboarding-panel { max-width: 920px; margin-inline: auto; }
.theme-choice-fieldset { min-width: 0; padding: 0; border: 0; }
.theme-choice-fieldset > legend { margin-bottom: 14px; font-size: 1.1rem; font-weight: 800; }
.theme-choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.theme-choice { position: relative; display: block; min-width: 0; cursor: pointer; }
.theme-choice > input[type="radio"], .theme-choice > input[type="checkbox"] {
  position: absolute;
  width: 1px;
  height: 1px;
  min-width: 1px;
  min-height: 1px;
  margin: -1px;
  padding: 0;
  opacity: 0;
}
.theme-choice-preview { position: relative; min-height: 174px; display: flex; flex-direction: column; justify-content: center; overflow: hidden; padding: 22px 56px 22px 22px; color: var(--text); background-color: var(--bg); isolation: isolate; transition: transform .16s, border-color .16s, box-shadow .16s; }
.theme-choice-preview::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 7px; background: var(--primary); }
.theme-choice-preview strong { position: relative; z-index: 1; font-size: clamp(1.3rem, 3vw, 1.75rem); line-height: 1.08; text-align: center; text-wrap: balance; }
@media (hover: hover) and (pointer: fine) {
  .theme-choice:hover .theme-choice-preview { transform: translateY(-2px); }
}
.theme-choice > input:focus-visible + .theme-choice-preview { outline: 4px solid color-mix(in srgb, var(--primary) 42%, transparent); outline-offset: 4px; }
.theme-choice > input:checked + .theme-choice-preview { border-color: var(--primary); box-shadow: 0 0 0 5px color-mix(in srgb, var(--primary) 22%, transparent), var(--shadow); }
.theme-choice-check { position: absolute; top: 16px; right: 16px; display: grid; place-items: center; width: 30px; height: 30px; border: 2px solid color-mix(in srgb, var(--text) 25%, transparent); border-radius: 50%; color: transparent; background: var(--surface-solid); }
.theme-choice > input:checked + .theme-choice-preview .theme-choice-check { border-color: var(--primary); color: white; background: var(--primary); }
.account-management { display: grid; gap: 18px; }
.account-management > .panel { min-width: 0; }
.account-section-heading { margin-bottom: 14px; }
.account-section-heading h3 { margin: 0; font-size: 1.25rem; }
.account-type-picker { display: grid; gap: 7px; max-width: 360px; color: var(--text); font-weight: 750; }
.account-create-form { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; row-gap: 22px; margin-top: 18px; }
.account-create-form > p { min-width: 0; align-self: start; align-content: start; }
.account-create-form > .errorlist,
.account-create-form > .button { grid-column: 1 / -1; }
.account-create-form[hidden] { display: none; }
.account-list { margin: 14px -10px -4px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.existing-accounts-panel .account-list { margin-top: 0; }
.account-list-heading { margin: 0; padding: 12px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: .82rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.account-list-heading:not(:first-child) { border-top: 1px solid var(--line); }
.account-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 11px 12px; border-bottom: 1px solid var(--line); }
.account-row:last-child { border-bottom: 0; }
.account-summary { min-width: 0; display: flex; align-items: center; gap: 10px; }
.account-summary strong { overflow-wrap: anywhere; }
.account-summary small { color: var(--muted); }
.device-icon { flex: 0 0 42px; width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid color-mix(in srgb, var(--primary) 28%, var(--line)); border-radius: 14px; color: var(--primary); background: color-mix(in srgb, var(--primary) 9%, var(--surface-solid)); }
.device-icon .action-icon { width: 22px; height: 22px; }
.device-copy { min-width: 0; display: grid; gap: 2px; }
.device-copy > small { overflow-wrap: anywhere; }
.device-revoke-icon { display: none; }
.account-edit-form { grid-column: 1 / -1; padding: 14px; margin: 3px 0; border-radius: 13px; background: color-mix(in srgb, var(--primary) 6%, var(--surface-solid)); }
.account-edit-form[hidden] { display: none; }
.account-edit-dialog { width: min(620px, calc(100% - 28px)); overflow-x: hidden; }
.account-edit-dialog .stack-form { margin-top: 18px; min-width: 0; max-width: 100%; }
.stack-form .helptext, .stack-form .help-text, .stack-form ul { margin: 0; color: var(--muted); font-family: inherit; font-size: .82rem; font-weight: 500; line-height: 1.45; }
.stack-form ul { padding-left: 20px; }
.stack-form .checkbox-field { grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: 10px; }
.stack-form .checkbox-field input[type="checkbox"] { width: 22px; height: 22px; padding: 0; margin: 0; accent-color: var(--primary); }
.stack-form .checkbox-field label { display: block; color: var(--text); cursor: pointer; }
.stack-form .checkbox-field .helptext { grid-column: 2; }
.stack-form .field-control:has(input[type="checkbox"]) {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  min-height: 0;
  height: auto;
  padding: 0;
  border: 0;
  background: transparent;
}
.stack-form .field-control:has(input[type="checkbox"]) > div {
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-solid);
}
.stack-form .field-control:has(input[type="checkbox"]) label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  cursor: pointer;
}
.stack-form .field-control:has(input[type="checkbox"]) input[type="checkbox"] { flex: 0 0 22px; }
.help-text { display: block; color: var(--muted); line-height: 1.45; }
.empty-state { padding: 18px; color: var(--muted); font-size: .94rem; font-weight: 720; line-height: 1.4; letter-spacing: .01em; text-align: left; }
.compact-panel { max-width: 560px; }
.form-error { color: var(--danger); }
.auth-help { margin: 18px 0 0; text-align: center; color: var(--muted); font-weight: 700; }
.auth-help a { color: var(--primary); }
.auth-note { color: var(--muted); line-height: 1.55; }
.account-name { min-width: 0; display: grid; gap: 2px; }
.account-name small { overflow-wrap: anywhere; }
.changelog-heading { margin-bottom: 28px; }
.changelog-heading > p:last-child { max-width: 680px; color: var(--muted); line-height: 1.55; }
.release-list { display: grid; gap: 20px; }
.release-card { padding: clamp(22px, 4vw, 36px); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); border-radius: var(--radius); backdrop-filter: blur(18px); }
.release-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.release-header h2 { margin: 0; font-size: clamp(1.5rem, 3vw, 2.2rem); letter-spacing: -.035em; }
.release-header time { display: block; margin-top: 5px; color: var(--muted); font-size: .82rem; font-weight: 700; }
.release-badge { padding: 7px 10px; color: var(--primary); background: color-mix(in srgb, var(--primary) 11%, var(--surface-solid)); border-radius: 99px; font-size: .75rem; font-weight: 800; white-space: nowrap; }
.release-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(22px, 4vw, 48px); padding-top: 18px; }
.release-columns h3 { margin: 0 0 12px; font-size: 1rem; text-transform: uppercase; letter-spacing: .08em; color: var(--primary); }
.release-columns ul { margin: 0; padding-left: 20px; display: grid; gap: 9px; line-height: 1.5; }
.empty-release-section { margin: 0; color: var(--muted); line-height: 1.5; }
.release-pagination { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 24px; color: var(--muted); font-size: .88rem; font-weight: 750; }
.release-pagination .button { min-height: 42px; padding: 9px 14px; }

.parent-shell { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 26px; align-items: start; }
.parent-navigation { position: sticky; top: 94px; display: grid; gap: 7px; padding: 9px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface-solid); box-shadow: var(--shadow); }
.parent-nav-item { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 48px; padding: 12px; border-radius: 12px; color: var(--muted); text-decoration: none; font-weight: 780; }
.parent-nav-icon { display: contents; }
.parent-nav-item .action-icon { justify-self: center; width: 22px; height: 22px; order: 1; }
.parent-nav-label { min-width: 0; justify-self: start; line-height: 1.2; text-align: left; order: 2; }
.parent-nav-item:hover, .parent-nav-item.is-active { color: var(--primary); background: color-mix(in srgb, var(--primary) 10%, var(--surface-solid)); }
.parent-nav-item .nav-count { order: 3; justify-self: end; width: max-content; }
.nav-count { min-width: 25px; padding: 3px 7px; border-radius: 99px; color: #fff; background: var(--danger); text-align: center; font-size: .72rem; font-weight: 800; line-height: 1; }
.parent-workspace, .parent-panel { min-width: 0; }
.parent-panel[hidden] { display: none; }
.parent-panel > .content-section { padding-top: 0; }
.parent-version-footer { display: flex; margin-top: 32px; padding: 0; align-items: center; justify-content: center; gap: 2px; color: var(--muted); font-size: .72rem; font-weight: 750; text-align: center; }
.parent-version-footer a { display: inline-flex; padding: 7px 8px; align-items: center; gap: 4px; border-radius: 9px; text-decoration: none; }
.parent-version-footer a:hover, .parent-version-footer a:focus-visible { color: var(--primary); background: color-mix(in srgb, var(--primary) 10%, transparent); }
.parent-home-panel { display: flex; flex-direction: column; gap: 16px; }
.parent-pending-section { order: -1; padding-top: 0; }
.parent-children-section { order: 0; }
.info-button, .photo-history-button, .history-photo-button, .history-note-button { display: inline-grid; flex: 0 0 auto; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 9px; color: var(--muted); background: transparent; cursor: pointer; transition: transform .14s, background .14s, box-shadow .14s, color .14s; }
.info-button:hover, .photo-history-button:hover, .history-photo-button:hover, .history-note-button:hover,
.info-button:focus-visible, .photo-history-button:focus-visible, .history-photo-button:focus-visible, .history-note-button:focus-visible { transform: var(--control-hover-lift); color: var(--primary); background: var(--icon-hover-fill); box-shadow: var(--icon-hover-shadow); }
.manage-tabs { display: flex; gap: 7px; overflow-x: auto; position: relative; margin: 0 0 18px; padding: 5px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.manage-tabs a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 8px 12px; border-radius: 10px; color: var(--muted); font-weight: 780; text-decoration: none; white-space: nowrap; }
.manage-tabs a:hover, .manage-tabs a:focus-visible, .manage-tabs a.is-active { color: var(--primary); background: color-mix(in srgb, var(--primary) 10%, transparent); }
.manage-tabs a.is-active { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary) 28%, transparent); }
.manage-tabs .action-icon { flex: 0 0 22px; width: 22px; height: 22px; }
.goal-filter { display: flex; gap: 6px; overflow-x: auto; margin: 0 0 14px; padding-bottom: 2px; }
.goal-filter a { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 12px; border-radius: 99px; color: var(--muted); background: color-mix(in srgb, var(--muted) 7%, var(--surface-solid)); font-size: .82rem; font-weight: 760; text-decoration: none; white-space: nowrap; }
.goal-filter a.is-active, .goal-filter a:hover, .goal-filter a:focus-visible { color: var(--primary); background: color-mix(in srgb, var(--primary) 12%, var(--surface-solid)); }
.goal-manage-list { display: grid; gap: 10px; }
.goal-manage-row { display: grid; grid-template-columns: minmax(150px, 1.1fr) minmax(150px, 1fr) minmax(120px, .8fr) minmax(194px, max-content); gap: 12px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-solid); }
.goal-manage-heading, .goal-manage-heading > div { display: flex; align-items: center; gap: 9px; min-width: 0; }
.goal-manage-heading > .info-button { flex: 0 0 auto; }
.goal-manage-heading > div { display: grid; gap: 2px; }
.goal-manage-heading strong { overflow-wrap: anywhere; }
.goal-manage-heading small { color: var(--muted); }
.goal-manage-progress { min-width: 0; color: var(--muted); font-size: .84rem; font-weight: 760; }
.goal-manage-progress .progress { margin-top: 6px; height: 8px; }
.goal-manage-status { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: .82rem; font-weight: 740; }
.goal-manage-status > .action-icon { flex: 0 0 18px; width: 18px; height: 18px; }
.goal-status-label > .action-icon, .goal-mode-button > .action-icon { flex: 0 0 18px; width: 18px; height: 18px; }
.goal-manage-actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.goal-manage-row[data-goal-status="completed"] .goal-manage-actions,
.goal-manage-row[data-goal-status="cancelled"] .goal-manage-actions,
.goal-manage-row[data-goal-status="completed"] .catalog-edit-form,
.goal-manage-row[data-goal-status="cancelled"] .catalog-edit-form { display: none; }
.evidence-thumb { width: 76px; height: 76px; object-fit: cover; border-radius: 13px; cursor: zoom-in; }
.evidence-dialog { width: min(580px, calc(100% - 24px)); }
.evidence-preview { width: 100%; max-height: 360px; object-fit: contain; border-radius: 15px; background: color-mix(in srgb, var(--muted) 8%, var(--surface-solid)); }
.evidence-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.evidence-actions .button { display: inline-flex; align-items: center; gap: 7px; }
textarea.child-claim-note { min-height: 72px; resize: none; font-size: 1rem; }
.evidence-lightbox { width: min(94vw, 1100px); max-width: none; padding: 42px 12px 12px; border: 0; border-radius: 20px; background: var(--text); }
.evidence-lightbox::backdrop { background: rgba(0, 0, 0, .88); }
.evidence-lightbox img { display: block; max-width: 100%; max-height: 85vh; margin: auto; object-fit: contain; }
.revision-list { display: grid; gap: 10px; margin-bottom: 20px; }
.notice-block { display: flex; align-items: flex-start; gap: 12px; margin: 0 0 16px; padding: 14px 16px; border: 1px solid var(--notice-border, var(--line)); border-radius: 14px; color: var(--text); background: var(--notice-background, var(--surface-solid)); line-height: 1.45; }
.notice-block.notice-info { --notice-border: color-mix(in srgb, var(--muted) 36%, var(--line)); --notice-background: color-mix(in srgb, var(--muted) 8%, var(--surface-solid)); }
.notice-block.notice-warning { --notice-border: color-mix(in srgb, var(--accent) 45%, var(--line)); --notice-background: color-mix(in srgb, var(--accent) 10%, var(--surface-solid)); }
.notice-block.notice-danger { --notice-border: color-mix(in srgb, var(--danger) 42%, var(--line)); --notice-background: color-mix(in srgb, var(--danger) 9%, var(--surface-solid)); }
.notice-block > .action-icon { flex: 0 0 22px; width: 22px; height: 22px; }
.notice-block > p { min-width: 0; margin: 0; }
.notice-block > div { min-width: 0; flex: 1 1 auto; }
.notice-block > button { flex: 0 0 auto; margin-left: auto; }
.revision-card p, .credit-warning p { line-height: 1.45; }
.task-response-list { display: grid; gap: 10px; margin-bottom: 20px; }
.task-response-list > h3 { margin-bottom: 0; }
.task-response-card { display: flex; align-items: center; gap: 12px; padding: 15px 16px; border: 1px solid color-mix(in srgb, var(--danger) 38%, var(--line)); border-radius: var(--radius); background: color-mix(in srgb, var(--danger) 7%, var(--surface-solid)); }
.task-response-card > .action-icon { flex: 0 0 auto; width: 23px; height: 23px; color: var(--danger); }
.task-response-copy { display: grid; min-width: 0; gap: 3px; }
.task-response-status { color: var(--danger); font-size: .78rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.task-response-card p { margin: 4px 0 0; color: var(--muted); line-height: 1.45; overflow-wrap: anywhere; }
.task-response-card > form { flex: 0 0 auto; margin-left: auto; }
.task-response-acknowledge { flex: 0 0 auto; }
@media (max-width: 640px) {
  .task-response-card { align-items: flex-start; flex-wrap: wrap; }
  .task-response-card > form { margin-left: auto; }
}
.photo-bonus { color: var(--success) !important; font-weight: 800; }
.empty-state { max-width: 100%; margin: 0; overflow-wrap: anywhere; }
.item-card { min-width: 0; overflow: hidden; }
.item-card > div { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 10px; row-gap: 2px; min-width: 0; }
.item-card .amount { flex: 0 0 auto; white-space: nowrap; }
.amount.negative { color: var(--danger); }
.parent-panel .subsection-heading { margin-top: clamp(38px, 6vw, 64px); }
.sound-toggle { display: inline-grid; flex: 0 0 auto; place-items: center; width: 44px; height: 44px; min-width: 44px; min-height: 44px; padding: 0; border: 1px solid var(--border); border-radius: 99px; color: var(--muted); background: var(--surface-solid); cursor: pointer; transition: transform .14s, background .14s, box-shadow .14s, color .14s; }
.sound-toggle .action-icon { width: 22px; height: 22px; fill: currentColor; }
.sound-toggle.sound-enabled { color: var(--success); border-color: color-mix(in srgb, var(--success) 42%, var(--border)); background: color-mix(in srgb, var(--success) 9%, var(--surface-solid)); }
.sound-toggle.sound-disabled { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 42%, var(--border)); background: color-mix(in srgb, var(--danger) 9%, var(--surface-solid)); }
.sound-toggle:hover, .sound-toggle:focus-visible { transform: var(--control-hover-lift); background: var(--icon-hover-fill); box-shadow: var(--icon-hover-shadow); }
.floating-actions {
  position: fixed;
  right: var(--fab-inset-inline);
  bottom: var(--fab-inset-block);
  z-index: 18;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--fab-gap);
  pointer-events: none;
}
body:has(.onboarding-panel) .floating-actions { display: none; }
.floating-actions > * { pointer-events: auto; }
.feedback-launcher {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: var(--fab-size);
  padding: 0 16px;
  border: 1px solid color-mix(in srgb, var(--primary) 45%, var(--border));
  border-radius: 99px;
  color: #fff;
  background: var(--primary);
  box-shadow: var(--shadow);
  font-weight: 800;
  cursor: pointer;
  transition: transform .16s;
}
.feedback-launcher .action-icon { width: 22px; height: 22px; fill: currentColor; }
.feedback-launcher:hover, .feedback-launcher:focus-visible { transform: var(--control-hover-lift); }
.gift-launcher {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: var(--fab-size);
  padding: 0 16px;
  border: 1px solid color-mix(in srgb, var(--accent) 55%, var(--border));
  border-radius: 99px;
  color: var(--text);
  background: var(--surface-solid);
  box-shadow: var(--shadow);
  font-weight: 800;
  cursor: pointer;
  transition: transform .16s;
}
.gift-launcher:hover, .gift-launcher:focus-visible { transform: var(--control-hover-lift); }
.gift-launcher .action-icon { width: 22px; height: 22px; fill: var(--accent); }
.task-search { display: grid; gap: 7px; max-width: 540px; margin: 0 0 18px; color: var(--muted); font-weight: 750; }
.feedback-dialog { width: min(560px, calc(100% - 24px)); max-height: calc(100dvh - 24px); overflow-y: auto; }
.feedback-admin { padding: 22px; }
.feedback-filter { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)) auto; align-items: end; gap: 12px; margin-bottom: 20px; }
.feedback-filter label { display: grid; gap: 7px; color: var(--text); font-weight: 750; }
.feedback-list { display: grid; gap: 12px; }
.feedback-card { min-width: 0; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-solid); overflow: hidden; }
.feedback-summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px; cursor: pointer; list-style: none; }
.feedback-summary > div { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.feedback-card-body { padding: 0 18px 18px; border-top: 1px solid var(--line); }
.feedback-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.feedback-card time { color: var(--muted); font-size: .78rem; font-weight: 700; white-space: nowrap; }
.feedback-card-body > p { overflow-wrap: anywhere; line-height: 1.5; }
.feedback-kind-idea { color: var(--brand); background: color-mix(in srgb, var(--brand) 12%, var(--surface-solid)); }
.feedback-kind-resolved { color: var(--success); background: color-mix(in srgb, var(--success) 13%, var(--surface-solid)); }
.feedback-kind { padding: 5px 8px; border-radius: 99px; color: var(--primary); background: color-mix(in srgb, var(--primary) 11%, var(--surface-solid)); font-size: .72rem; font-weight: 800; }
.feedback-meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 14px 0; }
.feedback-meta div { min-width: 0; }
.feedback-meta dt { color: var(--muted); font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.feedback-meta dd { margin: 3px 0 0; overflow-wrap: anywhere; font-size: .82rem; }
.feedback-device { grid-column: span 2; }
.feedback-actions { align-items: end; }
.feedback-actions form { display: flex; align-items: center; justify-content: flex-end; gap: 8px; min-width: 0; }
.feedback-screenshot-button { flex: 0 0 44px; width: 44px; height: 44px; color: var(--primary); }
.feedback-email-warning,
.backup-warning {
  display: block;
  width: 100%;
  max-width: 100%;
  margin-inline: 0;
  box-sizing: border-box;
  text-align: start;
  line-height: 1.45;
}
.backup-panel .backup-warning { margin-top: 12px; overflow-wrap: anywhere; }
.backup-panel { margin-top: 18px; }
.backup-panel [data-backup-details] { width: 100%; min-width: 0; }
.network-access-panel .service-details dd { white-space: normal; }
.network-access-panel > .button, .email-panel > .button { display: flex; margin-top: 18px; margin-left: auto; }
.network-access-panel .action-dialog .settings-description { margin-bottom: 18px; }
.settings-form { gap: 12px; }
.settings-block { margin: 0 0 22px; }
.settings-block:last-child { margin-bottom: 0; }
.settings-block-heading {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.settings-summary-copy { display: grid; flex: 1 1 auto; min-width: 0; gap: 3px; }
.settings-summary-description { color: var(--muted); font-size: .78rem; font-weight: 500; line-height: 1.35; }
.settings-block-list { display: grid; gap: 12px; }
.settings-block .settings-form { display: grid; gap: 12px; }
.settings-section { margin: 0; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-solid); overflow: hidden; }
.settings-section + .settings-section { margin-top: 0; }
.settings-section > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-sizing: border-box;
  min-height: 60px;
  padding: 16px 18px;
  list-style: none;
  color: var(--text);
  font-size: 1rem;
  font-weight: 820;
  line-height: 1.3;
  cursor: pointer;
}
.settings-section[open] > summary { border-bottom: 1px solid var(--line); }
.settings-section > .settings-group { padding: 10px 18px 16px; }
.settings-section > article,
.settings-section > .account-management,
.settings-section > section.panel {
  margin: 0;
  padding: 16px 18px 18px;
  border: 0;
  box-shadow: none;
  background: transparent;
  backdrop-filter: none;
}
.settings-section > article.panel,
.settings-section > section.panel {
  /* Accordion already provides the outer chrome. */
  border-radius: 0;
}
.settings-section .account-management {
  display: grid;
  gap: 14px;
}
.settings-section .account-management > .panel {
  margin: 0;
  border: 1px solid var(--line);
  box-shadow: none;
  background: color-mix(in srgb, var(--surface-solid) 88%, transparent);
}
.settings-section .settings-description { margin: 0; }
.settings-section .backup-heading { margin: 0; }
.settings-summary-label { flex: 1 1 auto; min-width: 0; line-height: 1.3; }
.settings-add-divider { display: flex; align-items: center; gap: 12px; margin: 2px 0; color: var(--primary); font-size: .76rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.settings-add-divider::before, .settings-add-divider::after { content: ""; height: 1px; flex: 1 1 auto; background: color-mix(in srgb, var(--primary) 28%, var(--line)); }
.settings-add-divider span { flex: 0 0 auto; padding: 7px 12px; border-radius: 99px; background: color-mix(in srgb, var(--primary) 9%, var(--surface-solid)); }
.settings-summary-status {
  flex: 0 1 auto;
  max-width: min(56%, 16rem);
  min-width: 0;
  margin-right: 0;
  overflow: visible;
  white-space: normal;
  line-height: 1.25;
  text-align: right;
}
.parent-accordion:not([open]) > summary { box-sizing: border-box; min-height: 68px; padding: 16px 22px; }
#parent-settings .parent-accordion:not([open]) > summary,
#parent-settings .parent-accordion > summary {
  min-height: 60px;
  padding: 16px 18px;
}
.parent-accordion > summary { width: 100%; }
.parent-panel[data-parent-panel="catalogs"] .manage-section.panel { padding: 18px; }
.parent-area-label { margin: 0; color: var(--muted); font-size: .84rem; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.settings-save-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px 16px;
  margin-top: 4px;
  padding: 4px 2px 0;
}
.settings-save-hint {
  flex: 1 1 180px;
  margin: 0;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 500;
  line-height: 1.4;
}
.settings-group { display: grid; gap: 0; }
.settings-group > .settings-row { grid-template-columns: minmax(170px, .42fr) minmax(0, 1fr); align-items: center; column-gap: 16px; row-gap: 4px; padding: 12px 0; }
.settings-group > .settings-row > label { display: block; color: var(--text); font-size: 1rem; font-weight: 750; line-height: 1.45; }
.settings-group > .settings-row > .field-control { grid-column: 2; min-width: 0; }
.settings-group > .settings-row > .helptext { grid-column: 2; color: var(--muted); font-size: .76rem; font-weight: 450; line-height: 1.45; }
.settings-group > .settings-row.checkbox-field { grid-template-columns: minmax(170px, .42fr) minmax(0, 1fr); align-items: center; }
.settings-group > .settings-row.checkbox-field > input[type="checkbox"] { grid-column: 2; }
.settings-group .catalog-divider { margin: 2px 0 8px; }
.backup-heading, .backup-actions { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.settings-description { flex: 1 1 420px; margin: 0; color: var(--muted); font-size: .9rem; font-weight: 500; line-height: 1.55; }
.service-status { display: inline-flex; align-items: center; gap: 8px; border-radius: 99px; padding: 7px 11px; font-size: .78rem; font-weight: 850; }
.service-status > span:first-child { flex: 0 0 auto; width: 10px; height: 10px; border-radius: 50%; }
.service-status > [data-backup-summary-label] { flex: 1 1 auto; min-width: 0; }
.service-status-good { color: var(--success); background: color-mix(in srgb, var(--success) 11%, var(--surface-solid)); }
.service-status-good > span:first-child { background: var(--success); box-shadow: 0 0 0 4px color-mix(in srgb, var(--success) 14%, transparent); }
.service-status-warning { color: #b45309; background: color-mix(in srgb, var(--accent) 13%, var(--surface-solid)); }
.service-status-warning > span:first-child { background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent); }
.service-status-bad { color: var(--danger); background: color-mix(in srgb, var(--danger) 9%, var(--surface-solid)); }
.service-status-bad > span:first-child { background: var(--danger); box-shadow: 0 0 0 4px color-mix(in srgb, var(--danger) 14%, transparent); }
.parent-panel[data-parent-panel="settings"] .button-secondary { color: #fff; background: linear-gradient(145deg, var(--primary), var(--primary-strong)); border-color: transparent; }
.service-details { display: grid; margin: 20px 0; border-block: 1px solid var(--line); }
.service-details div { min-width: 0; display: grid; grid-template-columns: minmax(170px, .42fr) minmax(0, 1fr); align-items: baseline; gap: 16px; padding: 10px 0; }
.service-details div + div { border-top: 1px solid var(--line); }
.service-details dt { color: var(--text); font-size: 1rem; font-weight: 750; line-height: 1.45; }
.service-details dt::after { content: ":"; }
.service-details dd { min-width: 0; margin: 0; color: var(--text); font-family: inherit; font-size: .9rem; font-weight: 650; line-height: 1.45; overflow-wrap: anywhere; }
.backup-actions { justify-content: flex-end; margin-top: 18px; }
.backup-actions form { margin: 0; }
.device-pairing-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 12px; align-items: end; }
.device-pairing-actions form { display: contents; }
.device-pairing-actions label { display: grid; grid-column: 1 / -1; gap: 7px; font-weight: 750; }
.device-pairing-actions .button { width: 100%; height: 100%; min-height: 48px; display: grid; place-items: center; line-height: 1.2; }
.device-pairing-actions:not(:has(form)) { grid-template-columns: minmax(0, 1fr); }
.settings-section .device-pairing-actions + .account-list { margin-top: 12px; }
.backup-audit { margin-top: 18px; }
.backup-audit ul { padding-left: 20px; color: var(--muted); font-family: inherit; font-size: .86rem; line-height: 1.5; }
.backup-dialog { width: min(620px, calc(100% - 24px)); max-height: calc(100dvh - 24px); overflow-y: auto; }
.confetti-layer { position: fixed; inset: 0; z-index: 100; pointer-events: none; overflow: hidden; }
.confetti-layer i { --x: 50vw; --delay: 0s; --spin: 360deg; position: absolute; top: -20px; left: var(--x); width: 9px; height: 15px; background: var(--accent); animation: confetti-fall 2s var(--delay) ease-in forwards; }
.confetti-layer i:nth-child(3n) { background: var(--primary); }
.confetti-layer i:nth-child(3n + 1) { background: var(--success); }
.confetti-layer.theme-hero_hq i:nth-child(2n) { width: 16px; height: 16px; clip-path: polygon(50% 0,61% 35%,98% 35%,68% 57%,79% 94%,50% 72%,21% 94%,32% 57%,2% 35%,39% 35%); background: #fbbf24; }
.confetti-layer.theme-art_studio i { width: 10px; height: 10px; border-radius: 50%; background: #f2cc8f; box-shadow: 0 0 8px #e07a5f; }
.confetti-layer.theme-panda_pet i:nth-child(2n) { width: 13px; height: 8px; border-radius: 100% 0 100% 0; background: #2d6a4f; }
.confetti-layer.theme-panda_pet i:nth-child(2n + 1) { width: 12px; height: 11px; clip-path: polygon(50% 90%,5% 42%,12% 12%,38% 8%,50% 30%,62% 8%,88% 12%,95% 42%); background: #ffb5a7; }
.confetti-layer.theme-blockville i { background: #00a2ff; box-shadow: 0 0 9px #00a2ff; }
.confetti-layer.theme-blockville i:nth-child(2n) { background: #00e676; box-shadow: 0 0 9px #00e676; }
@keyframes confetti-fall { to { transform: translateY(110vh) rotate(var(--spin)); opacity: .15; } }

.system-lottery-card {
  --lottery-frame: color-mix(in srgb, var(--primary) 72%, #111827);
  --lottery-glow: color-mix(in srgb, var(--accent) 44%, transparent);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  margin: 18px 0 24px;
  padding: 20px;
  overflow: hidden;
  border: 3px solid var(--lottery-frame);
  border-radius: 22px;
  background:
    radial-gradient(circle at 12% 20%, var(--lottery-glow), transparent 32%),
    color-mix(in srgb, var(--surface-solid) 92%, var(--accent));
  box-shadow: 0 14px 34px rgba(17, 24, 39, .16), inset 0 0 0 4px color-mix(in srgb, var(--accent) 20%, transparent);
}
.lottery-card-art {
  display: grid;
  grid-template-columns: repeat(3, 34px);
  gap: 5px;
  padding: 12px;
  border: 2px solid rgba(255, 255, 255, .72);
  border-radius: 14px;
  background: linear-gradient(135deg, #697078, #eef1f3 48%, #848b92);
  box-shadow: 0 7px 16px rgba(17, 24, 39, .24);
  transform: rotate(-3deg);
}
.lottery-card-art span {
  display: grid;
  width: 34px;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 7px;
  color: #fff;
  background: rgba(35, 42, 48, .48);
  font-size: 1.05rem;
  font-weight: 900;
}
.lottery-card-copy h3 { margin: 2px 0 4px; font-size: clamp(1.35rem, 3vw, 1.8rem); }
.lottery-card-copy p { margin: 4px 0; }
.lottery-system-label { margin: 0; color: var(--primary); font-size: .76rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.lottery-price { color: var(--danger); font-size: 1.05rem; font-weight: 900; }
.lottery-weekly-status { color: var(--muted); font-size: .88rem; font-weight: 700; }
.lottery-card-action { min-width: 160px; text-align: right; }
.lottery-purchase-dialog, .lottery-ticket-dialog { width: min(94vw, 560px); }
.lottery-risk-warning { display: grid; gap: 4px; margin-top: 16px; }
.lottery-risk-warning p { margin: 0; }
.lottery-scratch-help { color: var(--muted); }
.scratch-ticket { position: relative; width: min(100%, 440px); aspect-ratio: 1; margin: 18px auto; overflow: hidden; border: 5px solid var(--lottery-frame, var(--primary)); border-radius: 20px; background: var(--surface-solid); box-shadow: 0 16px 34px rgba(17, 24, 39, .24); }
.scratch-grid { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); }
.scratch-number { display: grid; place-items: center; border: 1px dashed color-mix(in srgb, var(--muted) 36%, transparent); background: color-mix(in srgb, var(--surface-solid) 94%, var(--accent)); font-size: clamp(1.35rem, 7vw, 2.2rem); font-weight: 950; opacity: .72; transition: opacity .2s ease, transform .25s ease, box-shadow .25s ease; }
.scratch-number.scratch-hidden { color: transparent; }
.scratch-number.scratch-revealed { opacity: 1; }
.scratch-number.scratch-positive { color: #087a4f; }
.scratch-number.scratch-negative { color: #c72f3f; }
.scratch-number.scratch-match { z-index: 1; transform: scale(1.08); box-shadow: inset 0 0 0 4px var(--accent), 0 0 22px var(--lottery-glow, rgba(245, 158, 11, .45)); }
.scratch-surface, .scratch-particles { position: absolute; inset: 0; width: 100%; height: 100%; }
.scratch-surface { z-index: 2; cursor: crosshair; touch-action: none; transition: opacity .4s ease; }
.scratch-surface:focus-visible { outline: 4px solid var(--accent); outline-offset: -5px; }
.scratch-surface.scratch-finished { pointer-events: none; opacity: 0; }
.scratch-particles { z-index: 3; pointer-events: none; overflow: hidden; }
.scratch-particles i { position: absolute; width: 5px; height: 3px; border-radius: 50%; background: #9aa1a8; animation: scratch-flake .48s ease-out forwards; }
@keyframes scratch-flake { to { opacity: 0; transform: translate(var(--particle-x), var(--particle-y)) rotate(160deg); } }
.scratch-progress { color: var(--muted); text-align: center; font-weight: 750; }
.lottery-result { margin-top: 14px; padding: 16px; border-radius: 16px; background: color-mix(in srgb, var(--accent) 16%, var(--surface-solid)); text-align: center; }
.lottery-result strong { display: block; font-size: 1.45rem; }
.lottery-result p { margin: 6px 0 0; }
.theme-magic_academy .system-lottery-card, .theme-magic_academy .scratch-ticket { border-radius: 10px; border-color: #b58a32; }
.theme-magic_academy .system-lottery-card { background-image: radial-gradient(circle at 15% 20%, rgba(214,169,74,.3), transparent 30%), linear-gradient(135deg, rgba(107,29,50,.08), transparent); }
.theme-block_world .system-lottery-card, .theme-block_world .scratch-ticket { border-radius: 0; box-shadow: 6px 6px 0 #1e3b1f; }
.theme-block_world .lottery-card-art, .theme-block_world .scratch-number { border-radius: 0; }
.theme-hero_hq .system-lottery-card, .theme-hero_hq .scratch-ticket { border-radius: 5px; box-shadow: 6px 6px 0 #1f2937; }
.theme-hero_hq .lottery-system-label, .theme-hero_hq .lottery-card-copy h3 { text-transform: uppercase; }
.theme-art_studio .system-lottery-card, .theme-art_studio .scratch-ticket { border-radius: 30px 18px 28px 20px; }
.theme-art_studio .lottery-card-art { transform: rotate(2deg); }
.theme-panda_pet .system-lottery-card, .theme-panda_pet .scratch-ticket { border-radius: 34px; }
.theme-panda_pet .system-lottery-card { box-shadow: 0 12px 0 color-mix(in srgb, #ffb5a7 46%, transparent); }
.theme-blockville .system-lottery-card, .theme-blockville .scratch-ticket { border-radius: 10px; border-color: #00a2ff; box-shadow: 0 0 25px rgba(0,162,255,.28), inset 0 0 0 3px rgba(0,230,118,.25); }

.theme-magic_academy { --primary: #6b1d32; --primary-strong: #34101d; --accent: #d6a94a; --bg: #efe7d7; font-family: Georgia, "Times New Roman", serif; }
.theme-magic_academy .item-card, .theme-magic_academy .panel, .theme-magic_academy .goal-card { border: 2px solid #c5a059; border-radius: 12px; }
.theme-magic_academy .section-heading h2, .theme-magic_academy .child-hero h1 { font-family: Palatino, Georgia, serif; letter-spacing: -.025em; }
.theme-magic_academy .button-primary { border-radius: 999px; box-shadow: inset 0 -4px 0 rgba(0,0,0,.18); }
.theme-magic_academy .button:hover { box-shadow: 0 0 15px rgba(212, 175, 55, .6); }
.theme-block_world { --primary: #397a35; --primary-strong: #204f24; --accent: #d1a13a; --bg: #dfead5; font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; }
.theme-block_world { background-image: linear-gradient(rgba(30,59,31,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(30,59,31,.035) 1px, transparent 1px); background-size: 20px 20px; }
.theme-block_world .item-card, .theme-block_world .panel, .theme-block_world .goal-card, .theme-block_world .button { border-radius: 0; box-shadow: 4px 4px 0 #1e3b1f; }
.theme-block_world .button { min-height: 48px; padding: 12px 16px; font-size: 1rem; line-height: 1.25; }
.theme-block_world .item-icon { border-radius: 0; image-rendering: pixelated; }
.theme-hero_hq { --primary: #1e3a8a; --primary-strong: #172554; --accent: #fbbf24; --danger: #dc2626; --bg: #eef2ff; }
.theme-hero_hq .item-card, .theme-hero_hq .panel, .theme-hero_hq .goal-card, .theme-hero_hq .button { border: 2px solid #1f2937; border-radius: 5px; box-shadow: 5px 5px 0 #1f2937; }
.theme-hero_hq .section-heading h2, .theme-hero_hq .child-hero h1 { text-transform: uppercase; letter-spacing: -.035em; }
.theme-art_studio { --primary: #e07a5f; --primary-strong: #b95640; --accent: #f2cc8f; --success: #81b29a; --bg: #f4f1de; }
.theme-art_studio { background-image: radial-gradient(circle at 20% 10%, rgba(224,122,95,.12), transparent 28rem), repeating-linear-gradient(105deg, transparent 0 22px, rgba(129,178,154,.035) 23px 24px); }
.theme-art_studio .item-card, .theme-art_studio .panel, .theme-art_studio .goal-card { border: 2px solid #f2cc8f; border-radius: 30px 18px 28px 20px; }
.theme-panda_pet { --primary: #2d6a4f; --primary-strong: #1b4332; --accent: #ffb5a7; --bg: #f8f9fa; --text: #212529; }
.theme-panda_pet { background-image: radial-gradient(circle, rgba(45,106,79,.07) 2px, transparent 2px); background-size: 30px 30px; }
.theme-panda_pet .item-card, .theme-panda_pet .panel, .theme-panda_pet .goal-card { border-radius: 34px; border: 2px solid color-mix(in srgb, #2d6a4f 32%, transparent); box-shadow: 0 10px 0 color-mix(in srgb, #ffb5a7 45%, transparent); }
.theme-panda_pet .button { border-radius: 999px; }
.theme-blockville {
  --primary: #00a2ff;
  --primary-strong: #0082cc;
  --accent: #00e676;
  --success: #00e676;
  --danger: #ff3b30;
  --bg: #191b1d;
  --surface: rgba(35, 37, 39, .96);
  --surface-solid: #232527;
  --text: #fff;
  --muted: #8d9399;
  --line: #393b3d;
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.theme-blockville .item-card, .theme-blockville .panel, .theme-blockville .goal-card, .theme-blockville .action-dialog {
  border: 1px solid #393b3d;
  border-radius: 8px;
  background: #232527;
}
.theme-blockville .button {
  border-radius: 8px;
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .25);
  font-weight: 850;
  text-transform: none;
}
.theme-blockville .button:active { transform: translateY(2px); box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .25); }
.theme-blockville .section-heading h2, .theme-blockville .child-hero h1, .theme-blockville .item-card h3 { font-weight: 900; letter-spacing: -.025em; }
.theme-blockville .balance-orb { border-color: #00a2ff; box-shadow: 0 0 24px rgba(0, 162, 255, .25); }
.theme-magic_academy .theme-choice-preview { background-image: radial-gradient(circle at 15% 20%, rgba(214,169,74,.3), transparent 30%), linear-gradient(135deg, rgba(107,29,50,.08), transparent); }
.theme-magic_academy .theme-choice-preview strong { font-family: Palatino, Georgia, serif; letter-spacing: -.025em; }
.theme-block_world .theme-choice-preview { background-image: linear-gradient(rgba(30,59,31,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(30,59,31,.035) 1px, transparent 1px); background-size: 20px 20px; }
.theme-hero_hq .theme-choice-preview { background-image: linear-gradient(135deg, rgba(30,58,138,.12), transparent 62%); }
.theme-hero_hq .theme-choice-preview strong { text-transform: uppercase; letter-spacing: -.035em; }
.theme-art_studio .theme-choice-preview { background-image: radial-gradient(circle at 20% 10%, rgba(224,122,95,.12), transparent 28rem), repeating-linear-gradient(105deg, transparent 0 22px, rgba(129,178,154,.035) 23px 24px); }
.theme-panda_pet .theme-choice-preview { background-image: radial-gradient(circle, rgba(45,106,79,.07) 2px, transparent 2px); background-size: 30px 30px; }
.theme-blockville .theme-choice-preview { border-color: #393b3d; background: #232527; box-shadow: 0 0 25px rgba(0,162,255,.22), inset 0 0 0 2px rgba(0,230,118,.16); }

@media (prefers-color-scheme: dark) {
  body.system-page {
    color-scheme: dark;
    background:
      radial-gradient(circle at 8% 8%, rgba(146, 116, 211, .30) 0%, rgba(76, 29, 149, .16) 28%, transparent 50%),
      radial-gradient(circle at 92% 84%, rgba(109, 40, 217, .24) 0%, transparent 42%),
      linear-gradient(135deg, #171225 0%, var(--bg) 62%);
  }
  body.system-page::before { border-color: rgba(184, 160, 237, .20); }
  body.system-page::after { background: radial-gradient(circle, rgba(146, 116, 211, .22) 0%, transparent 68%); }
  .icon-button {
    color: #d8c9ff;
    border-color: color-mix(in srgb, #b8a0ed 42%, var(--line));
    background: color-mix(in srgb, #6b46c1 22%, var(--surface-solid));
  }
  .icon-button:hover, .icon-button:focus-visible {
    color: #f1eaff;
    background: color-mix(in srgb, #8b5cf6 34%, var(--surface-solid));
    transform: var(--control-hover-lift);
    box-shadow: var(--icon-hover-shadow);
  }
  .icon-button.danger, .goal-manage-actions .icon-button.danger {
    color: #ffb4ad;
    border-color: color-mix(in srgb, var(--danger) 44%, var(--line));
    background: color-mix(in srgb, var(--danger) 18%, var(--surface-solid));
  }
  .share-copy-button {
    color: #d8c9ff;
    border-color: color-mix(in srgb, #b8a0ed 42%, var(--line));
    background: color-mix(in srgb, #6b46c1 22%, var(--surface-solid));
  }
  .theme-magic_academy { --bg: #150d10; }
  .theme-block_world { --bg: #101910; }
  .theme-hero_hq { --bg: #10172d; }
  .theme-art_studio { --bg: #211713; }
  .theme-panda_pet { --bg: #101914; --text: #f8f9fa; }
  .theme-blockville { --bg: #191b1d; --text: #fff; }
}
@media (max-width: 1000px) {
  .building-plan-layout { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  body.system-page::before { width: 420px; height: 420px; right: -280px; top: 120px; }
  body.system-page::after { width: 280px; height: 280px; right: -140px; bottom: -100px; }
  .system-lottery-card { grid-template-columns: 88px 1fr; padding: 16px; gap: 13px; }
  .lottery-card-art { grid-template-columns: repeat(3, 22px); padding: 8px; }
  .lottery-card-art span { width: 22px; font-size: .8rem; }
  .lottery-card-action { grid-column: 1 / -1; min-width: 0; text-align: stretch; }
  .lottery-card-action .button { width: 100%; }
  .page { width: min(100% - 24px, 1160px); padding-top: 26px; padding-bottom: calc(92px + env(safe-area-inset-bottom)); }
  .child-area .page { padding-bottom: 28px; }
  .parent-area .page { padding-bottom: calc(92px + var(--safe-area-bottom)); }
  .parent-version-footer, .site-footer { flex-wrap: wrap; }
  .parent-version-footer { padding-bottom: 0; }
  .site-footer { padding-bottom: calc(18px + var(--safe-area-bottom)); }
  .child-area .site-footer { margin-top: 10px; }
  .parent-version-footer .footer-release, .site-footer .footer-release { order: 2; flex-basis: 100%; justify-content: center; padding-top: 2px; font-size: .66rem; font-weight: 650; }
  .parent-version-footer .footer-release + span, .site-footer .footer-release + span { display: none; }
  .footer-product, .footer-docs-long { display: none; }
  .footer-docs-short { display: inline; }
  .parent-version-footer a, .site-footer a { white-space: nowrap; }
  .topbar { min-height: 64px; }
  .brand-name { display: none; }
  .landing-topbar, .app-topbar { width: min(100% - 24px, 1160px); min-height: 64px; padding: 12px 0; }
  .landing-topbar .brand-name, .app-topbar .brand-name { display: inline; }
  .child-area .app-topbar .brand-name { display: none; }
  .landing-page .page, .auth-page .page { min-height: calc(100vh - 148px); padding-block: 28px 54px; }
  .landing-page .hero { min-height: calc(100vh - 184px); justify-content: center; }
  .landing-page .hero h1 { font-size: clamp(3.2rem, 15vw, 4.6rem); }
  .auth-page .narrow-card { padding: 28px 22px; }
  .setup-card .stack-form { grid-template-columns: 1fr; }
  .app-version { font-size: .58rem; max-width: 54px; line-height: 1.05; }
  .child-hero { align-items: flex-end; }
  .hero-avatar { width: 68px; height: 68px; border-radius: 21px; }
  .child-identity { gap: 12px; }
  .balance-orb { min-width: 116px; min-height: 116px; }
  .balance-orb strong { font-size: 2rem; }
  .two-column { grid-template-columns: 1fr; }
  .child-quick-actions { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 6px; }
  .quick-action { min-height: 56px; padding: 8px 10px; }
  .quick-action .action-icon { width: 20px; height: 20px; }
  .quick-action span { font-size: .76rem; }
  .quick-action-more { width: 48px; min-width: 48px; }
  .goal-card-heading { align-items: flex-start; }
  .goal-card-heading > span { text-align: right; white-space: nowrap; font-size: .82rem; }
  .goal-status-row { align-items: flex-start; }
  .goal-status-row .goal-add-button { flex: 0 0 auto; }
  .goal-manage-row { grid-template-columns: minmax(0, 1fr) auto; }
  .goal-manage-progress, .goal-manage-status, .goal-manage-row > .catalog-edit-form { grid-column: 1 / -1; }
  .goal-manage-actions { grid-column: 2; grid-row: 1; }
  .inline-reject { flex-direction: column; }
  .messages { top: 72px; }
  .catalog-row { grid-template-columns: minmax(0, 1fr) auto; }
  .catalog-actions { justify-content: flex-end; }
  .approval-card, .approval-card.has-evidence { grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; padding: 14px; }
  .task-approval-card .item-icon { width: 46px; height: 46px; border-radius: 14px; font-size: 1.35rem; }
  .task-approval-card .approval-copy { grid-column: 2; }
  .task-approval-card .approval-copy .eyebrow { margin-bottom: 3px; }
  .task-approval-card .approval-copy h3 { margin-bottom: 3px; line-height: 1.18; }
  .task-approval-card .approval-actions,
  .task-approval-card.has-evidence .approval-actions { grid-column: 2 / -1; justify-content: flex-start; gap: 8px; margin-top: 2px; }
  .approval-card:not(.task-approval-card) .approval-actions { grid-column: 1 / -1; justify-content: flex-end; }
  .approval-card:not(.has-evidence) .approval-copy { grid-column: 2 / -1; }
  .task-approval-card:not(.has-evidence) .approval-copy { grid-column: 2 / -1; }
  .approval-card.has-evidence .evidence-thumb-button { grid-column: 3; grid-row: 1; width: 58px; height: 58px; }
  .approval-card .approval-actions form { flex: 0 0 auto; }
  .decision-icon-button { width: 44px; height: 44px; border-radius: 13px; }
  .pending-child-heading { padding: 12px 14px; }
  .pending-panel-heading { padding: 12px 14px; }
  .pending-request-row { grid-template-columns: 42px minmax(0, 1fr); gap: 10px; padding: 12px 14px; }
  .pending-request-avatar .profile-mini { width: 42px; height: 42px; }
  .pending-request-actions { grid-column: 2; justify-content: flex-start; flex-wrap: wrap; margin-top: 2px; }
  .pending-request-actions .decision-icon-button { width: 44px; height: 44px; }
  .pending-request-actions .evidence-thumb-button { width: 44px; height: 44px; }
  .account-row { gap: 8px; padding-inline: 10px; }
  .device-icon { flex-basis: 36px; width: 36px; height: 36px; border-radius: 12px; }
  .device-icon .action-icon { width: 20px; height: 20px; }
  .device-revoke-label { display: none; }
  .device-revoke-icon { display: inline-grid; place-items: center; }
  .device-revoke-button { width: 44px; min-width: 44px; height: 44px; padding: 0; display: grid; place-items: center; }
  .theme-choice-grid { grid-template-columns: 1fr; }
  .child-settings-theme-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .child-settings-theme-grid .theme-choice-preview {
    min-height: 84px;
    padding: 10px 34px 10px 12px;
  }
  .child-settings-theme-grid .theme-choice-preview strong { font-size: .92rem; }
  .child-settings-theme-grid .theme-choice-sub { font-size: .6rem; }
  .child-settings-theme-grid .theme-choice-check { top: 8px; right: 8px; width: 24px; height: 24px; }
  .child-settings-theme-grid .theme-daily-emoji { font-size: 1.15rem; }
  .release-columns { grid-template-columns: 1fr; }
  .topbar { gap: 7px; padding-inline: max(10px, env(safe-area-inset-left)); }
  .topbar > * { gap: 7px; }
  .topbar-actions { gap: 5px; }
  .language-switcher { width: 44px; }
  .history-filter { grid-template-columns: minmax(0, 1fr) auto; }
  .history-filter .history-filter-button { width: 44px; min-width: 44px; padding: 0; }
  .history-filter-button span { display: none; }
  .history-filter { padding: 16px 16px 12px; }
  .history-filter-chips { padding-inline: 16px; }
  .history-custom-range { grid-template-columns: 1fr; }
  .ledger-row { padding: 10px 14px; gap: 8px 10px; align-items: flex-start; flex-wrap: wrap; }
  .ledger-row > div { min-width: calc(100% - 52px); gap: 1px; }
  .history-row-actions {
    width: calc(100% - 52px);
    margin-left: 52px;
    justify-content: flex-start;
    gap: 8px;
  }
  .history-row-actions > .amount { margin-left: auto; }
  .history-row-actions > .history-kind-icon:last-child { margin-left: auto; }
  .history-row-actions > .amount + .history-kind-icon { margin-left: 0; }
  .history-decision-informational { min-width: 34px; justify-content: center; padding-inline: 8px; }
  .history-decision-informational .history-decision-label { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
  .parent-accordion:not([open]) > summary { min-height: 60px; padding: 14px 16px; }
  .child-metadata-row {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 6px;
  }
  .child-metadata-row .ticket-label { font-size: .78rem; }
  .pagination { flex-wrap: wrap; padding-inline: 14px; }
  .text-button { padding-inline: 4px; font-size: .86rem; }
  .parent-shell { display: block; }
  .parent-home-panel { gap: 12px; }
  .parent-pending-section { padding-bottom: 8px; }
  .parent-navigation { position: fixed; z-index: 20; inset: auto 0 0; grid-template-columns: repeat(4, 25%); column-gap: 0; row-gap: 0; padding: 7px 0 calc(7px + var(--safe-area-bottom)); border-width: 1px 0 0; border-radius: 0; }
  .parent-nav-item { position: relative; display: flex; place-self: stretch; width: 100%; min-width: 0; align-items: center; justify-content: center; flex-direction: column; gap: 3px; padding: 7px 2px; text-align: center; font-size: .66rem; line-height: 1.05; }
  .parent-nav-icon { display: grid; position: relative; place-items: center; width: 28px; height: 24px; }
  .parent-nav-item .action-icon { width: 22px; height: 22px; }
  .parent-nav-label { text-align: center; }
  .parent-nav-item .nav-count {
    position: absolute;
    top: -5px;
    right: -6px;
    z-index: 1;
    box-sizing: border-box;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    display: grid;
    place-items: center;
    font-size: .6rem;
    line-height: 1;
    box-shadow: 0 0 0 2px var(--surface-solid);
  }
  .parent-title { display: none; }
  .action-dialog {
    position: fixed;
    inset: auto 0 0;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    max-height: min(90svh, calc(100dvh - 12px));
    margin: 0;
    border-width: 1px 1px 0;
    border-radius: 24px 24px 0 0;
    padding: 22px 18px calc(16px + var(--safe-area-bottom));
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
  .action-dialog.account-edit-dialog {
    width: 100%;
    max-width: 100%;
  }
  .history-filter-dialog {
    width: 100%;
    max-width: 100%;
  }
  .history-filter-dialog h2 {
    margin: 0 0 14px;
  }
  .history-filter-dialog .stack-form {
    display: grid;
    gap: 14px;
    margin-top: 0;
  }
  .history-filter-dialog .dialog-actions {
    position: sticky;
    bottom: 0;
    z-index: 1;
    margin-top: 2px;
    padding-top: 14px;
    padding-bottom: var(--safe-area-bottom);
    border-top: 1px solid var(--line);
    background: var(--surface-solid);
  }
  .manage-tabs a { flex: 0 0 auto; }
  .dialog-actions { align-items: stretch; }
  .dialog-actions .button, .dialog-actions form { flex: 1 1 auto; }
  .dialog-actions form .button { width: 100%; }
  .share-dialog .dialog-actions { align-items: stretch; flex-wrap: nowrap; }
  .approval-card .evidence-thumb { width: 62px; height: 62px; }
  .evidence-actions { display: grid; grid-template-columns: 1fr; }
  .evidence-actions .button { justify-content: center; }
  .evidence-dialog .evidence-preview { max-height: 28svh; }
  .revision-card, .credit-warning { align-items: stretch; flex-direction: column; }
  .child-area .sound-toggle { width: 44px; height: 44px; }
  .floating-actions {
    --fab-inset-inline: 12px;
    --fab-inset-block: calc(12px + var(--safe-area-bottom));
  }
  .parent-area .floating-actions {
    --fab-inset-block: calc(88px + var(--safe-area-bottom));
  }
  .feedback-launcher,
  .gift-launcher {
    width: var(--fab-size);
    min-width: var(--fab-size);
    padding: 0;
    justify-content: center;
  }
  .feedback-launcher span,
  .gift-launcher span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }
  .recovery-code-row { grid-template-columns: 1fr; }
  .recovery-code-row .share-copy-button { justify-self: end; }
  .account-create-form { grid-template-columns: 1fr; }
  .child-hero.has-avatar .balance-orb { min-width: 92px; min-height: 92px; }
  .child-hero.has-avatar .balance-orb strong { font-size: 1.7rem; }
  .child-hero.has-avatar .balance-orb span { font-size: .68rem; }
  .feedback-filter { grid-template-columns: 1fr; }
  .feedback-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feedback-summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 8px 12px;
    padding: 14px 16px;
  }
  .feedback-summary > div { align-items: flex-start; }
  .feedback-summary time { margin: 0; text-align: left; }
  .feedback-actions { align-items: stretch; flex-direction: column; }
  .feedback-actions form { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; }
  .service-details div { grid-template-columns: 1fr; gap: 3px; }
  .settings-group > .settings-row { grid-template-columns: 1fr; row-gap: 6px; }
  .settings-group > .settings-row > .field-control,
  .settings-group > .settings-row > .helptext { grid-column: 1; }
  .settings-group > .settings-row.checkbox-field { grid-template-columns: 1fr; }
  .settings-group > .settings-row.checkbox-field > input[type="checkbox"] { grid-column: 1; }
  .settings-summary-status { max-width: min(56%, 12rem); font-size: .72rem; padding: 5px 8px; }
  .settings-save-actions { padding-bottom: 4px; }
  .feedback-actions form:not(:has(.feedback-screenshot-button)) { grid-template-columns: minmax(0, 1fr) auto; }
}
@media (hover: none) {
  .button:hover,
  .text-button:hover,
  .icon-button:hover,
  .share-copy-button:hover,
  .topbar-icon-button:hover,
  .push-control:hover,
  .dialog-close:hover,
  .quick-action:hover,
  .decision-icon-button:hover,
  .message-close:hover,
  .goal-mode-button:hover,
  .sound-toggle:hover,
  .feedback-launcher:hover,
  .gift-launcher:hover,
  .history-filter-chips button:hover,
  .child-more-action:hover,
  .meta-info-button:hover,
  .info-button:hover,
  .photo-history-button:hover,
  .history-photo-button:hover,
  .history-note-button:hover,
  .history-clear-filters:hover {
    transform: none;
    box-shadow: none;
  }
  .parent-nav-item:hover:not(.is-active) {
    color: var(--muted);
    background: transparent;
  }
}
