/* Shared PociMo theme and components. Load after Bootstrap; rule order is intentional. */

/* Font and theme */
@font-face { font-family: 'Fredoka'; src: url("../brand/fonts/Fredoka-variable.ttf") format('truetype'); font-style: normal; font-weight: 300 700; font-display: swap; }
:root { --ink: #142d4e; --muted: #65758a; --wash: #f7f9fc; --navy: #19365a; --navy-dark: #102642; --pastel-blue: #e3ecf7; --pastel-gold: #fff2c9; --line: #dce5f0; --radius: 1.15rem; --bs-body-font-family: 'Fredoka', sans-serif; --bs-body-font-weight: 400; --bs-primary: #19365a; --bs-primary-rgb: 25,54,90; --bs-link-color: #19365a; --bs-link-hover-color: #102642; }

/* Base layout and shared controls */
html { min-width: 320px; }
body { background: linear-gradient(180deg, #f1f5fb 0, var(--wash) 650px); line-height: 1.65; color: var(--ink); min-height: 100vh; }
.navbar { position: sticky; top: 0; z-index: 1030; margin-bottom: clamp(1.25rem, 4vw, 2rem); background: rgba(255,255,255,.96) !important; border-bottom: 1px solid #e7eaf2; backdrop-filter: blur(12px); }
.navbar .container { min-height: 64px; }
.navbar-brand, .navbar-brand:hover { color: var(--ink) !important; font-weight: 700; letter-spacing: -.02em; }
.navbar-brand { display: inline-flex; align-items: center; gap: .5rem; margin-right: .25rem; padding-top: 0; padding-bottom: 0; font-family: 'Fredoka', sans-serif; font-size: 2rem; font-weight: 700; white-space: nowrap; }
.brand-logo { display: block; width: 224px; max-width: 100%; height: auto; }
.nav-link { color: #697386 !important; font-weight: 600; padding: .65rem .8rem !important; border-radius: .6rem; }
.nav-link:hover, .nav-link.active { color: var(--navy) !important; background: #eaf0f8; }
.page-shell { max-width: 1180px; }
main { padding-bottom: 2rem; }
.eyebrow { color: var(--navy); font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.card, .task-card { border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 .35rem 1.2rem rgba(25,54,90,.045); }
.card { overflow: visible; }
h1, h2, h3, h4 { overflow-wrap: anywhere; line-height: 1.25; }
h2, h3, h4 { font-weight: 700; letter-spacing: -.02em; }
.page-title { font-weight: 700; letter-spacing: -.02em; font-size: clamp(1.8rem, 3vw, 2.5rem); }
.page-breadcrumb { --bs-breadcrumb-divider: ''; font-weight: 700; letter-spacing: -.015em; }
.page-breadcrumb .breadcrumb-item a { color: var(--ink); text-decoration: none; }
.page-breadcrumb .breadcrumb-item a:hover { color: var(--navy); }
.page-breadcrumb .breadcrumb-item.active { color: var(--muted); }
.page-breadcrumb .breadcrumb-item + .breadcrumb-item::before { content: '→'; color: var(--navy); padding-right: .55rem; }
.form-control, .form-select, .btn { min-height: 44px; }
.form-control-sm, .form-select-sm, .btn-sm { min-height: 38px; }
.btn { border-radius: .8rem; padding: .6rem 1rem; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; }
.btn-primary { --bs-btn-bg: var(--navy); --bs-btn-border-color: var(--navy); --bs-btn-hover-bg: var(--navy-dark); --bs-btn-hover-border-color: var(--navy-dark); --bs-btn-active-bg: var(--navy-dark); --bs-btn-active-border-color: var(--navy-dark); --bs-btn-disabled-bg: var(--navy); --bs-btn-disabled-border-color: var(--navy); }
.btn-primary:hover { background: var(--navy-dark); border-color: var(--navy-dark); }
.stat-card { min-height: 142px; border-bottom: 4px solid #c7d8ed; background: linear-gradient(145deg, #fff 40%, #fff8e5); }
.stat-value { color: var(--navy-dark); font-variant-numeric: tabular-nums; font-size: 2rem; font-weight: 700; letter-spacing: -.04em; }

/* Parent overview */
.overview-child { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 1.5rem; align-items: center; }
.overview-child-progress, .overview-child-attention { min-width: 0; overflow-wrap: anywhere; }
.overview-waiting-link { color: var(--muted); }
.collection-toolbar .form-select { max-width: 100%; min-width: min(12rem, 100%); }
#payment-requests, #issued-penalties, #weekly-board { scroll-margin-top: 5.5rem; }
@media (max-width: 767.98px) { .overview-child { grid-template-columns: minmax(0, 1fr); gap: 1rem; } }
.section-nav { gap: .35rem; overflow-x: auto; white-space: nowrap; }
.section-nav .nav-link { background: transparent; }
.task-card { border-top: 4px solid #c7d8ed; }
.card-header { background: linear-gradient(120deg, #eaf0f8, #fff5d8) !important; border-color: var(--line); }
.card-header:first-child { border-radius: var(--radius) var(--radius) 0 0; }
.task-actions .btn { min-height: 44px; }
.task-photo { max-height: 180px; max-width: 100%; object-fit: cover; border-radius: .75rem; }

/* Calendar */
.calendar-table { min-width: 700px; }
.calendar-table td { height: 130px; width: 14%; vertical-align: top; }
.calendar-day { background: #fff; border-color: #e7eaf2; }
.calendar-day.calendar-month-start { background: #edf2f9; border-left: 2px solid #c7d8ed; }
.calendar-day.calendar-today { background: #fff1c4; box-shadow: inset 0 0 0 2px var(--navy); }
.calendar-date { display: flex; align-items: baseline; gap: .35rem; color: var(--ink); }
.calendar-date > strong { font-size: 1.05rem; }
.calendar-date > span { color: var(--muted); font-size: .75rem; font-weight: 700; text-transform: uppercase; }
.calendar-date .calendar-today-label { color: var(--navy); }
.calendar-task { display: block; padding: .3rem; border-radius: .4rem; color: inherit; text-decoration: none; line-height: 1.25; }
.calendar-task:hover, .calendar-task:focus { background: #e0eaf6; color: var(--navy); }
.calendar-task .badge { margin-right: .25rem; text-transform: capitalize; }
.calendar-task-title { display: block; font-weight: 500; line-height: 1.4; overflow-wrap: anywhere; }
.calendar-key { display: flex; flex-wrap: wrap; gap: .5rem 1rem; color: var(--muted); }
.calendar-key > span { white-space: nowrap; }
.calendar-counts { display: flex; flex-wrap: wrap; gap: .25rem; margin-top: .35rem; }
.calendar-count { display: inline-flex; align-items: center; gap: .2rem; padding: .2rem .3rem; border-radius: .45rem; white-space: nowrap; font-weight: 700; color: var(--navy); }
.calendar-count-unlocks { background: #fff0bd; }
.calendar-count-care { background: #e0f2e7; }
.calendar-count-tasks { background: #e2eaf7; }
.calendar-count-extra { background: #f0e5f7; }
.calendar-task em { display: block; margin-top: .15rem; color: var(--muted); font-size: .88em; font-weight: 400; font-style: normal; line-height: 1.35; overflow-wrap: anywhere; }

/* Native disclosures and authentication */
details { position: relative; }
details > summary { cursor: pointer; list-style: none; }
details > summary::-webkit-details-marker { display: none; }
details[open] > form { background: #fff; z-index: 2; }
.auth-panel { max-width: 440px; margin: clamp(1rem, 8vw, 5rem) auto 0; }
.welcome-panel { max-width: 900px; margin: clamp(1rem, 7vw, 5rem) auto 0; }

@media (max-width: 991.98px) {
    .navbar-collapse { padding: .5rem 0 .75rem; }
    .navbar-nav .nav-link { padding: .75rem .65rem !important; }
    .navbar-nav .nav-link.ms-lg-2 { margin-top: .25rem; }
}

@media (max-width: 575.98px) {
    .navbar .container, .page-shell { padding-left: 1rem; padding-right: 1rem; }
    .navbar .container { min-height: 58px; padding-left: .65rem; padding-right: .65rem; }
    .navbar { margin-bottom: 1.25rem; }
    .navbar-brand { font-size: 1.5rem; gap: .4rem; }
    .brand-logo { width: 200px; }
    h1 { font-size: 1.65rem; }
    h2 { font-size: 1.35rem; }
    .card, .task-card { border-radius: .85rem; }
    .card.p-4, .task-card.p-4 { padding: 1rem !important; }
    .stat-card { min-height: 112px; }
    .stat-value { font-size: 1.45rem; }
    .table-responsive { margin-left: -.25rem; margin-right: -.25rem; }
    .table { font-size: .9rem; }
    .calendar-table { min-width: 640px; }
    .calendar-table td { height: 112px; }
    details[open] > form { position: static !important; min-width: 0 !important; width: 100%; margin-top: .5rem !important; }
    .mobile-stack { flex-direction: column !important; align-items: stretch !important; }
    .mobile-stack > * { width: 100%; }
    .mobile-actions { justify-content: flex-start !important; }
    .mobile-actions form, .mobile-actions .btn, .mobile-actions details { width: 100%; }
    .mobile-actions form .btn, .mobile-actions details > summary { width: 100%; text-align: center; }
    .card .d-flex.justify-content-between.align-items-center { align-items: flex-start !important; gap: .75rem; }
    .card .d-flex.flex-wrap.gap-2.justify-content-md-end { justify-content: flex-start !important; }
    .card .d-flex.flex-wrap.gap-2.justify-content-md-end > form,
    .card .d-flex.flex-wrap.gap-2.justify-content-md-end > details { flex: 1 1 auto; }
    .auth-panel, .welcome-panel { margin-top: 1rem; }
}

/* Help guides and page headers */
.help-hero, .page-hero { background: linear-gradient(120deg, #e3ecf7, #fff2c9); border-radius: 1rem; color: #19365a; }
.help-mascot { font-size: 3rem; }
.help-icon { font-size: 1.7rem; background: #eaf0f8; border-radius: .9rem; padding: .5rem .8rem; align-self: flex-start; }
.help-guide-card { color: var(--ink); border-bottom: 4px solid #c7d8ed; }
.help-guide-card:hover { border-color: var(--navy); background: #f6f9fd; }
.guide-reader { max-width: 780px; }
.guide-content { font-size: 1.075rem; line-height: 1.8; overflow-wrap: anywhere; }
.guide-content h3 { font-size: 1.15rem; font-weight: 700; color: #19365a; margin: 1.6rem 0 .6rem; }
.guide-content > :first-child { margin-top: 0; }
.guide-content > :last-child { margin-bottom: 0; }
.guide-content p { white-space: pre-line; }
.guide-content li { padding-left: .25rem; margin-bottom: .5rem; }
.guide-content li::marker { color: #19365a; font-weight: bold; }
.task-help { border: 1px solid #cedbec; border-radius: .85rem; background: #f0f5fb; }
.task-help > summary { padding: .85rem 1rem; color: #19365a; font-weight: 700; }
.task-help > summary:focus-visible { outline: 3px solid var(--navy); border-radius: .85rem; }
.help-chevron { float: right; }
.task-help[open] .help-chevron { transform: rotate(45deg); }
.help-note { border-radius: .75rem; background: #fff6df; color: #695321; }
/* Shared FAQ-inspired surfaces; business actions retain their semantic colours. */
.page-hero { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding: clamp(1.5rem, 4vw, 3rem); }
.page-hero-copy { min-width: 0; max-width: 850px; }
.page-hero-copy > p { max-width: 65ch; color: #4c576c; }
.page-hero-icon { font-size: 2.8rem; line-height: 1; padding: 1rem; border-radius: 1.3rem; background: rgba(255,255,255,.65); flex-shrink: 0; }
.page-character { display: block; flex-shrink: 0; }
.page-character img { display: block; width: 100%; height: auto; }
.page-hero-character { width: clamp(112px, 14vw, 160px); }
.page-card-character { width: 84px; }
.task-celebration { max-width: 440px; margin: 1.5rem auto; overflow: hidden; }
.task-celebration-heading { background: linear-gradient(120deg, var(--pastel-blue), var(--pastel-gold)); padding: 2rem 1.5rem; text-align: center; }
.task-celebration-heading h1 { color: var(--navy); }
.task-celebration-character { width: 164px; margin: 0 auto 1rem; }
.task-celebration-body { padding: 1.5rem; text-align: center; }
.task-celebration-reward { font-size: 2rem; font-weight: 600; color: var(--navy); }
.task-celebration-status { padding: .75rem 1rem; border-radius: .7rem; background: #fff6df; color: #695321; }

.hero-detail { color: #19365a; font-size: .85rem; font-weight: 600; }
.card h2, .card h3 { color: #19365a; }
a.card { color: var(--ink); border-bottom: 4px solid #c7d8ed; transition: border-color .15s, box-shadow .15s; }
a.card:hover { color: var(--ink); border-color: #91accf; box-shadow: 0 .4rem 1.3rem rgba(25,54,90,.1); }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--navy); outline-offset: 3px; }
.form-control, .form-select { border-color: #d5dfeb; border-radius: .7rem; padding: .6rem .8rem; }
.form-select { padding-right: 2.5rem; }
.form-control:focus, .form-select:focus { border-color: #809fc6; box-shadow: 0 0 0 .2rem rgba(25,54,90,.15); }
.form-label { font-weight: 600; color: #364e6d; }
.form-check-input:checked { background-color: var(--navy); border-color: var(--navy); }
/* Equal choices and navigation share one treatment. Filled buttons commit work.
   Keep the secondary alias consistent for older clients and generated controls. */
.btn-outline-primary, .btn-outline-secondary { --bs-btn-color: #19365a; --bs-btn-bg: transparent; --bs-btn-border-color: #a8bedb; --bs-btn-hover-bg: #e3ecf7; --bs-btn-hover-color: #19365a; --bs-btn-hover-border-color: #829fbd; --bs-btn-active-bg: #d5e3f1; --bs-btn-active-color: #19365a; --bs-btn-active-border-color: #829fbd; --bs-btn-disabled-color: #19365a; --bs-btn-disabled-bg: transparent; --bs-btn-disabled-border-color: #a8bedb; }
.btn-success { --bs-btn-bg: #287455; --bs-btn-border-color: #287455; --bs-btn-hover-bg: #205e45; --bs-btn-hover-border-color: #205e45; }
.btn-warning { --bs-btn-bg: #f7d885; --bs-btn-border-color: #f7d885; --bs-btn-color: #574013; --bs-btn-hover-bg: #f0ca65; --bs-btn-hover-border-color: #f0ca65; }
.badge { border-radius: .6rem; padding: .45em .7em; font-weight: 650; white-space: normal; line-height: 1.35; }
.badge.bg-primary, .badge.bg-info { background: #e6eef8 !important; color: #19365a !important; }
.badge.bg-success { background: #e1f3e9 !important; color: #246347 !important; }
.badge.bg-warning, .badge.text-bg-warning { background: #fff0c9 !important; color: #735211 !important; }
.badge.bg-secondary { background: #edf1f6 !important; color: #51657e !important; }
.progress { background: #e8eef6; border-radius: 1rem; }
.progress-bar { border-radius: 1rem; }
.progress-bar.bg-success { background: #529c7d !important; }
.alert { border-radius: 1rem; border-width: 1px; }
.alert-warning { background: #fff5dc; border-color: #f0dfb2; color: #72561f; }
.table { --bs-table-bg: transparent; --bs-table-border-color: #dee7f1; }
.table thead th { background: #eef3f9; color: #506985; font-size: .8rem; letter-spacing: .025em; padding: .85rem; }
.table:not(.calendar-table) td { padding: 1rem .85rem; }
.calendar-task { padding: .5rem; background: #f1f5fb; margin-bottom: .3rem; border-radius: .65rem; }
.border-top, .border-bottom, .border-start { border-color: var(--line) !important; }
.auth-panel { max-width: 500px; }
.auth-heading { margin: -1rem -1rem 1.5rem; padding: 1.5rem 1rem; border-radius: .9rem; text-align: center; background: linear-gradient(120deg, var(--pastel-blue), var(--pastel-gold)); }
.auth-heading .page-hero-icon { display: inline-block; font-size: 2rem; padding: .75rem; margin-bottom: 1rem; }
.auth-character { width: 128px; margin: 0 auto 1rem; }
.auth-heading p { color: #4c576c; }
.reward-label { display: inline-block; align-self: flex-start; color: #286247; background: #eaf6ef; padding: .35rem .75rem; border-radius: .7rem; }
.empty-state { text-align: center; padding: 2rem !important; background: linear-gradient(120deg, var(--pastel-blue), var(--pastel-gold)); }
.empty-state-icon { display: block; font-size: 2.5rem; margin-bottom: .75rem; }
@media (max-width: 575.98px) {
    .page-hero { gap: .75rem; padding: 1.25rem; align-items: flex-start; }
    .page-hero-icon { font-size: 1.75rem; padding: .6rem; border-radius: .85rem; }
    .page-hero-character { width: 92px; }
    .page-card-character { width: 68px; }
    .page-hero .page-title { font-size: 1.7rem; }
    .page-hero-copy > p { font-size: .95rem; }
    .auth-heading { margin: 0 0 1.25rem; }
    .auth-character { width: 104px; }
    .btn { padding-left: .8rem; padding-right: .8rem; }
}
@media (max-width: 359.98px) {
    .navbar-brand { font-size: 1.35rem; gap: .3rem; }
    .brand-logo { width: 180px; }
    .guest-navigation .nav-link { padding-left: .45rem !important; padding-right: .45rem !important; }
}
@media (prefers-reduced-motion: reduce) { a.card { transition: none; } }

/* Task creation wizard */
.task-wizard { border-top: 4px solid #c7d8ed; scroll-margin-top: 90px; }
.task-wizard [hidden] { display: none !important; }
.wizard-progress { display: flex; gap: .5rem; padding: 0; list-style: none; margin: .5rem 0 1.5rem; }
.wizard-progress li { flex: 1; padding: .65rem; border-radius: .7rem; background: #f0f4f9; color: #506985; font-size: .9rem; }
.wizard-progress li.is-current { background: #e3ecf7; color: #19365a; font-weight: 700; box-shadow: inset 0 -3px #91accf; }
.wizard-choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; }
.wizard-choice { display: flex; gap: .65rem; padding: 1rem; border: 1px solid var(--line); border-radius: .85rem; cursor: pointer; }
.wizard-choice:has(input:checked) { background: #e8f0fa; border-color: #91accf; }
.wizard-choice input { flex-shrink: 0; align-self: flex-start; margin-top: .4rem; accent-color: var(--navy); }
.wizard-schedule { background: #f2f6fb; padding: 1.25rem; border-radius: .85rem; }
.wizard-day { border: 1px solid var(--line); padding: .6rem .7rem; border-radius: .65rem; background: white; cursor: pointer; }
.wizard-day:has(input:checked) { background: #e3ecf7; border-color: #91accf; }
.wizard-day input { accent-color: var(--navy); }
.wizard-review { padding: 1.25rem; border-radius: .85rem; background: linear-gradient(120deg, #e8f0fa, #fff5d8); overflow-wrap: anywhere; }
.wizard-review dt { color: #506985; font-size: .8rem; }
.wizard-review dd { white-space: pre-line; margin-bottom: 1rem; }
.wizard-review dd:last-child { margin-bottom: 0; }
@media (max-width: 767.98px) { .wizard-choices { grid-template-columns: 1fr; } }
.parent-sidebar { --bs-offcanvas-width: 264px; background: #fff; border-right: 1px solid var(--line); }
.sidebar-heading { padding: .75rem; background: linear-gradient(120deg, var(--pastel-blue), var(--pastel-gold)); }
.sidebar-heading > div { flex: 1; min-width: 0; }
.sidebar-heading .navbar-brand { display: flex; margin-right: 0; }
.sidebar-portal-label { flex-shrink: 0; padding: .55rem 1rem; text-align: center; color: var(--navy); background: #e8f0f7; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.sidebar-body { display: flex; flex-direction: column; min-height: 0; padding: .4rem .75rem .75rem; overflow-y: auto; background: #f3f7fb; }
.sidebar-navigation { gap: .2rem; }
.sidebar-group-label { color: var(--muted); font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: .85rem .8rem .4rem; }
.sidebar-navigation .nav-link { display: flex; gap: .7rem; align-items: center; min-height: 44px; }
.sidebar-navigation .nav-link.active { box-shadow: inset 3px 0 var(--navy); }
.sidebar-children { margin: 0 0 .35rem .9rem; padding-left: .35rem; border-left: 1px solid var(--line); }
.sidebar-child-avatar { display: grid; place-items: center; flex-shrink: 0; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: #e1f1ee; color: #168078; font-size: .8rem; font-weight: 700; }
.sidebar-child-name { min-width: 0; overflow-wrap: anywhere; }
#notification-settings { scroll-margin-top: 100px; }

/* Record actions and disclosure enhancements */
.record-actions { display: flex; flex-wrap: wrap; align-items: flex-start; gap: .5rem; }

/* Activity ledger */
.activity-entry-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 1rem; }
.activity-entry-description { min-width: 0; overflow-wrap: anywhere; }
.activity-entry-totals { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* Signed-out navigation */
.guest-navigation { margin-left: auto; }
.guest-navigation .navbar-nav { flex-direction: row; align-items: center; gap: .25rem; }
.guest-navigation .nav-link { padding: .5rem .65rem !important; min-height: 44px; display: inline-flex; align-items: center; }
.record-actions > form { display: flex; margin: 0; }
.record-actions > .btn, .record-actions > form > .btn, .record-actions > details > summary.btn { min-height: 44px; padding: .6rem 1rem; font-size: .9rem; width: auto; }
.record-actions > .record-edit[open] { flex-basis: 100%; order: 10; }
.record-edit > form.row { width: 100%; margin-left: 0; margin-right: 0; }
.record-edit-form { background: #f7f9fc !important; }
/* Expanded operations read as separate panels, with explicit close controls. */
.disclosure > summary { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.disclosure-title { min-width: 0; overflow-wrap: anywhere; }
.disclosure-toggle { display: inline-flex; align-items: center; gap: .65rem; flex-shrink: 0; }
.disclosure-state { display: none; font-size: .85rem; font-weight: 600; }
.disclosure[open] > summary .disclosure-state { display: inline; }
.disclosure-chevron { width: .5rem; height: .5rem; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); margin: -.2rem .15rem 0; }
.disclosure[open] > summary .disclosure-chevron { transform: rotate(225deg); margin-top: .2rem; }
.record-actions > .record-edit[open] > summary.btn { width: 100%; justify-content: space-between; background: #eaf0f8; color: var(--navy); border: 1px solid #cedbec; border-radius: .85rem .85rem 0 0; text-align: left; }
.record-edit[open] > form { margin-top: 0 !important; border-top: 0 !important; border-top-left-radius: 0 !important; border-top-right-radius: 0 !important; }
.inline-form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: .75rem; }
.inline-form-actions > .btn { width: auto !important; margin-top: 0 !important; }
/* Native disclosure hints remain available when JavaScript is disabled. */
details:not(.disclosure) > summary::after { content: ' ▾'; }
details:not(.disclosure)[open] > summary::after { content: ' ▴ Close'; }
details:not(.disclosure) > summary:has(.help-chevron)::after { content: none; }


/* Collections */
.collection-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; padding: .85rem 1rem; background: #f1f5fb; border: 1px solid var(--line); border-radius: .8rem; }
.collection-toolbar [hidden] { display: none !important; }
.record-selection { flex-shrink: 0; margin: .3rem .65rem 0 0; }
.collection-pagination { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .75rem; }
.collection-record { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 1rem; }
.collection-record > .record-actions { margin-top: 0 !important; }
.collection-record:has(.record-edit[open]) { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 767.98px) { .collection-record { grid-template-columns: minmax(0, 1fr); } }

/* Parent sidebar */
.sidebar-icon { width: 1.25rem; text-align: center; font-size: 1.1rem; flex-shrink: 0; }
.sidebar-account { flex-shrink: 0; padding: .75rem; border-top: 1px solid var(--line); background: #f3f7fb; }
.sidebar-account-card { padding: .8rem; border: 1px solid var(--line); border-radius: .9rem; background: #fff; }
.sidebar-account-identity { display: flex; align-items: center; gap: .65rem; }
.sidebar-avatar { display: grid; place-items: center; flex-shrink: 0; width: 2.2rem; height: 2.2rem; border-radius: 50%; background: #e1f1ee; color: #168078; font-size: 1.05rem; font-weight: 700; }
.sidebar-username { min-width: 0; overflow-wrap: anywhere; }
.sidebar-account-label { display: block; color: var(--muted); font-size: .72rem; line-height: 1.4; }
.sidebar-account-name { display: block; color: var(--ink); font-size: .95rem; line-height: 1.5; }
.sidebar-logout { display: flex; align-items: center; justify-content: space-between; gap: .75rem; min-height: 44px; margin-top: .75rem; padding: .5rem .7rem; border: 1px solid var(--line); border-radius: .6rem; color: var(--navy); font-size: .85rem; font-weight: 600; text-decoration: none; }
.sidebar-logout:hover { color: var(--navy-dark); background: #edf3f9; border-color: #b9cce0; }
.sidebar-logout:focus-visible { outline: 3px solid #8099c5; outline-offset: 3px; }
.parent-mobile-header { position: sticky; top: 0; z-index: 1030; display: flex; justify-content: space-between; align-items: center; padding: .4rem .65rem; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); margin-bottom: 1.25rem; }
@media (min-width: 992px) {
    .parent-sidebar { position: fixed; inset: 0 auto 0 0; width: 248px; height: 100dvh; display: flex; flex-direction: column; z-index: 1030; }
    .parent-sidebar .offcanvas-header { display: flex; }
    .parent-sidebar .offcanvas-body { flex: 1; min-height: 0; overflow-y: auto !important; background: #f3f7fb !important; }
    .parent-portal main.page-shell { width: calc(100% - 248px); max-width: none; margin-left: 248px; padding: 2rem clamp(1.5rem, 3vw, 3rem); }
    .parent-portal .portal-content { max-width: 1180px; margin: 0 auto; }
}

#notification-reminder[hidden] { display: none !important; }

#pair-qr svg { width: min(100%, 18rem); height: auto; }

/* Reusable presentation helpers; progress widths remain template-supplied. */
.preserve-lines { white-space: pre-wrap; }
.evidence-photo { max-height: 240px; }
.progress-compact { height: 8px; }
.progress-standard { height: 10px; }
.wrap-content { min-width: 0; overflow-wrap: anywhere; }
.task-workspace { max-width: 760px; }
.pairing-card { max-width: 38rem; }
.pairing-code { letter-spacing: .12em; }
.currency-select { max-width: 220px; }
.legacy-job-edit { min-width: 280px; }
.legacy-schedule-edit { min-width: 300px; }
/* Family setup checklist keeps step numbers beside wrapping content. */
.setup-step { display: grid; grid-template-columns: 2rem minmax(0, 1fr); gap: 1rem; }
.setup-step-number { display: flex; align-items: center; justify-content: center; width: 2rem; height: 2rem; border-radius: 50%; background: var(--bs-primary-bg-subtle, #e8edf8); color: var(--bs-primary, #23426d); font-weight: 700; }
.setup-step-number.setup-step-complete { background: #e3f3e9; color: #146c43; }

/* Personal task setup and weekly unlocks. */
.assignment-card { border: 1px solid #dce3ef; border-radius: 1.35rem; transition: transform .15s ease, box-shadow .15s ease; }
.assignment-card:hover, .assignment-card:focus-visible { transform: translateY(-3px); box-shadow: 0 10px 28px #23334d18; border-color: #879bc2; }
.assignment-card:focus-visible { outline: 3px solid #8099c5; outline-offset: 3px; }
.unlock-card { background: linear-gradient(135deg, #f1f5fc, #fff6da); border: 1px solid #e9d69b; }
.assignment-preview { border-radius: 1rem; background: #eff4fb; border: 1px solid #d3dfef; color: #293b5a; }
.unlock-celebration { animation: unlock-appear .45s ease-out; }
@keyframes unlock-appear { from { opacity: .4; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .unlock-celebration { animation: none; } .assignment-card { transition: none; } }

#allocation-form [hidden] { display: none !important; }
.photo-camera-video { display: block; width: 100%; max-height: 50vh; object-fit: contain; background: #102540; border-radius: 1rem; }
.photo-camera-preview { display: block; max-width: 100%; max-height: 20rem; object-fit: contain; border-radius: 1rem; }
.photo-camera-preview[hidden] { display: none; }
.child-weekly-overview summary { cursor: pointer; list-style: none; }
.child-weekly-overview summary::-webkit-details-marker { display: none; }
.child-weekly-overview summary:focus-visible { outline: 3px solid #9db8d8; outline-offset: 5px; border-radius: .5rem; }
.child-simple-card .h5 { font-size: 1.1rem; line-height: 1.35; }
.child-simple-counter { color: var(--muted); font-size: .9rem; }
.child-unlock-card { border-top: 3px solid #f3d577; }
.child-simple-card .reward-label { padding: .3rem .65rem; text-align: center; }

/* Mo's invitation reminder in the parent Home header. */
.page-hero-with-invitation .page-hero-copy { flex: 1 1 20rem; }
.hero-invitation { display: flex; align-items: center; gap: 1rem; flex: 0 1 27rem; min-width: 0; }
.hero-invitation .page-hero-character { width: clamp(80px, 9vw, 120px); }
.hero-speech { position: relative; min-width: 0; padding: 1.25rem; border: 1px solid #c7dedb; border-radius: 1.25rem; background: #fff; box-shadow: 0 .3rem 1rem rgba(20,45,78,.06); }
.hero-speech::after { content: ""; position: absolute; right: -.5rem; top: 50%; width: .9rem; height: .9rem; background: #fff; border-top: 1px solid #c7dedb; border-right: 1px solid #c7dedb; transform: translateY(-50%) rotate(45deg); }
.hero-speech-title { color: var(--navy); font-weight: 700; font-size: 1.1rem; line-height: 1.35; margin-bottom: .5rem; }
.hero-speech > p { overflow-wrap: anywhere; }
@media (max-width: 1199.98px) {
  .page-hero-with-invitation { flex-wrap: wrap; }
  .page-hero-with-invitation .page-hero-copy { flex-basis: 100%; }
  .hero-invitation { flex-basis: 100%; max-width: 32rem; }
  .hero-speech { flex: 1; }
}
@media (max-width: 575.98px) {
  .hero-invitation { gap: .75rem; }
  .hero-invitation .page-hero-character { width: 72px; }
  .hero-speech { padding: 1rem; }
}

/* Inline PociMo name and light invitation actions preserve both brand colours. */
.pocimo-name { white-space: nowrap; font-weight: 550; }
.pocimo-name-poci { color: #142d4e; }
.pocimo-name-mo { color: #168078; }
.btn-pocimo-invite { display: inline-block; --bs-btn-bg: #fff; --bs-btn-hover-color: var(--navy); --bs-btn-hover-bg: var(--pastel-blue); --bs-btn-active-color: var(--navy); --bs-btn-active-bg: var(--pastel-blue); --bs-btn-disabled-color: var(--navy); --bs-btn-disabled-bg: #fff; }
/* Grown Up day story: one expandable block per task, sized for phones first. */
.day-view-switch { display: flex; padding: .3rem; gap: .3rem; border-radius: 1rem; background: #eaf0f5; }
.day-view-switch a { flex: 1; text-align: center; padding: .8rem .5rem; border-radius: .75rem; color: #344b63; font-weight: 700; text-decoration: none; }
.day-view-switch a.active { background: #fff; color: #142d4e; box-shadow: 0 2px 8px #142d4e12; }
.day-view-switch a:focus-visible, .day-timeline-card summary:focus-visible { outline: 3px solid #168078; outline-offset: 3px; }
.day-timeline-section { max-width: 48rem; margin-inline: auto; }
.day-timeline { list-style: none; padding: 0; margin: 1.5rem 0; }
.day-timeline-item { position: relative; padding: 0 0 1.25rem 1.65rem; border-left: 2px solid #dce6ed; margin-left: .4rem; }
.day-timeline-item::before { content: ''; position: absolute; top: 1.3rem; left: -.45rem; width: .8rem; height: .8rem; border-radius: 50%; background: #8a9cae; box-shadow: 0 0 0 4px #f6f8fa; }
.day-timeline-done::before { background: #168078; }
.day-timeline-active::before { background: #c29732; }
.day-timeline-item:last-child { border-color: transparent; }
.day-timeline-card { background: #fff; border: 1px solid #dce6ed; border-radius: 1.1rem; box-shadow: 0 4px 16px #142d4e06; overflow: hidden; }
.day-timeline-card > summary { display: block; padding: 1.1rem; cursor: pointer; list-style: none; }
.day-timeline-card summary::-webkit-details-marker { display: none; }
.day-timeline-topline, .day-timeline-bottom { display: flex; gap: .7rem; align-items: center; justify-content: space-between; }
.day-timeline-time { font-weight: 700; font-variant-numeric: tabular-nums; color: #52677d; font-size: .85rem; }
.day-timeline-status { background: #edf1f5; color: #40566c; border-radius: 2rem; padding: .25rem .65rem; font-size: .75rem; font-weight: 700; text-align: right; }
.day-timeline-done .day-timeline-status { color: #11665e; background: #e4f4ee; }
.day-timeline-active .day-timeline-status { color: #755510; background: #fff3cf; }
.day-timeline-title { display: block; font-size: 1.1rem; font-weight: 750; color: #142d4e; margin: .7rem 0 .35rem; overflow-wrap: anywhere; }
.day-timeline-meta { display: block; color: #52677d; font-size: .85rem; }
.day-timeline-bottom { margin-top: .9rem; min-height: 1.5rem; }
.day-timeline-evidence { display: flex; gap: .75rem; font-size: .85rem; }
.day-timeline-expand { color: #168078; font-weight: 650; font-size: .8rem; }
.day-timeline-card[open] .day-timeline-expand span { display: inline-block; transform: rotate(180deg); }
.day-timeline-details { border-top: 1px solid #e6edf2; padding: 1.1rem; background: #fbfcfd; }
.day-timeline-event + .day-timeline-event { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid #e6edf2; }
.day-timeline-details .task-photo { max-width: 100%; border-radius: .75rem; }
.day-timeline-empty { text-align: center; background: linear-gradient(135deg, #edf4fa, #fff8e5); padding: 2.5rem 1rem; border: 1px solid #e1e9ed; border-radius: 1.25rem; }
.day-timeline-empty > span { display: block; font-size: 2rem; margin-bottom: .75rem; }
@media (min-width: 768px) {
  .day-view-switch { max-width: 30rem; margin-inline: auto; }
  .day-timeline-card summary, .day-timeline-details { padding: 1.35rem; }
}

.day-date-picker { display: flex; align-items: center; flex-wrap: wrap; gap: .6rem; }
.day-date-picker .form-control { width: auto; flex: 1 1 10rem; max-width: 13rem; }
.day-date-picker .form-label { font-size: .85rem; color: #52677d; }

/* Equal child views; the underline identifies the page currently being read. */
.child-tabs { display: flex; flex-wrap: nowrap; gap: .25rem; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; border-bottom: 1px solid #cedde9; padding: .25rem .25rem 0; }
.child-tab { flex: 1 0 auto; padding: .85rem 1rem; border-bottom: 3px solid transparent; border-radius: .65rem .65rem 0 0; color: #344b63; text-align: center; font-size: .9rem; font-weight: 600; white-space: nowrap; text-decoration: none; }
.child-tab:hover { background: #edf3f8; color: #142d4e; }
.child-tab.active { background: #e6f1f3; border-bottom-color: #168078; color: #142d4e; }
.child-tab:focus-visible { outline: 3px solid #168078; outline-offset: -3px; }

.day-timeline-context { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem .65rem; }
.day-timeline-kind { display: inline-flex; align-items: center; gap: .3rem; padding: .2rem .55rem; border-radius: .5rem; font-size: .75rem; font-weight: 600; background: #e8eff7; color: #19365a; }
.day-timeline-kind-care { background: #e3f2e9; color: #245d46; }
.day-timeline-kind-unlock { background: #fff2cc; color: #725516; }
.day-timeline-kind-extra { background: #f1e9f8; color: #62427f; }
