:root {
  --navy: #102f4f;
  --navy-deep: #08233c;
  --navy-soft: #31506a;
  --green: #63856b;
  --green-deep: #234d38;
  --green-light: #dce8df;
  --yellow: #f4c400;
  --yellow-deep: #6b5600;
  --yellow-light: #f4c400;
  --beige: #f4ede1;
  --cream: #fbfaf6;
  --orange: #c96631;
  --ink: #162633;
  --muted: #667784;
  --white: #fff;
  --border: #e5dfd4;
  --shadow: 0 24px 70px rgba(16, 47, 79, .1);
  --shadow-soft: 0 14px 38px rgba(16, 47, 79, .07);
  --font-ui: "Outfit", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-editorial: "Lora", Georgia, serif;
  font-family: var(--font-ui);
  color: var(--ink);
  background: var(--cream);
}
* { box-sizing: border-box; }
html { min-width: 320px; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 92% 4%, rgba(99,133,107,.11) 0, transparent 31rem), radial-gradient(circle at 4% 70%, rgba(244,196,0,.07) 0, transparent 28rem), var(--cream); }
.environment-banner { position: relative; z-index: 20; display: flex; align-items: center; justify-content: center; gap: 18px; min-height: 48px; padding: 10px 20px; color: #fff; background: #624b18; border-bottom: 3px solid #e7c45e; text-align: center; letter-spacing: .015em; }
.environment-banner a { display: inline-flex; align-items: center; min-height: 44px; color: #fff; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
button, input { font: inherit; }
a { color: inherit; }
h1, h2, h3 { margin-top: 0; color: var(--navy-deep); font-family: var(--font-editorial); font-weight: 650; }
h1 { font-size: clamp(2.2rem, 4.8vw, 4.4rem); line-height: 1.04; letter-spacing: -.045em; }
h2 { letter-spacing: -.025em; }
p { margin-top: 0; }
.site-header { position: relative; z-index: 20; border-bottom: 1px solid rgba(16,47,79,.09); background: rgba(255,255,255,.92); box-shadow: 0 7px 26px rgba(16,47,79,.045); backdrop-filter: blur(16px); }
.header-inner { width: min(1480px, calc(100% - 48px)); min-height: 108px; margin: auto; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 28px; }
.brand { justify-self: start; display: flex; align-items: center; min-height: 44px; text-decoration: none; }
.brand-logo { display: block; width: 196px; height: 74px; object-fit: contain; object-position: left center; }
.header-title { justify-self: center; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 44px; text-align: center; text-decoration: none; line-height: 1.05; }
.header-title strong { color: var(--navy-deep); font-family: var(--font-editorial); font-size: 1.55rem; font-weight: 650; letter-spacing: -.025em; }
.header-title small { margin-top: 7px; color: var(--green); font-size: .72rem; font-weight: 750; letter-spacing: .22em; text-transform: uppercase; }
.logout-form { justify-self: end; }
.header-spacer { justify-self: end; width: 196px; }
.link-button { min-height: 44px; border: 0; padding: 11px 13px; background: transparent; color: var(--navy-soft); cursor: pointer; font-weight: 650; }
.link-button:hover { color: var(--navy-deep); }
.help-text a { display: inline-flex; align-items: center; min-height: 44px; }

@media (max-width: 620px) {
  .environment-banner { flex-direction: column; gap: 2px; padding: 8px 14px; font-size: .78rem; }
}
.page-shell { width: min(1400px, calc(100% - 48px)); min-height: calc(100vh - 196px); margin: 34px auto 64px; }
footer { padding: 26px; border-top: 1px solid rgba(16,47,79,.07); color: var(--muted); text-align: center; font-family: var(--font-editorial); font-size: .78rem; }
.eyebrow { margin-bottom: 13px; color: var(--green); font-family: var(--font-ui); font-size: .72rem; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
.muted, .help-text { color: var(--muted); }
.messages { width: min(720px, 100%); margin: 0 auto 18px; }
.message { padding: 14px 17px; border-radius: 13px; color: #833a31; background: #f8e5e1; box-shadow: var(--shadow-soft); }
.login-layout { min-height: 720px; display: grid; grid-template-columns: minmax(0, 1.52fr) minmax(360px, .68fr); overflow: hidden; border: 1px solid var(--border); border-radius: 36px; background: var(--white); box-shadow: var(--shadow); }
.intro-panel { padding: clamp(44px, 5vw, 72px); display: flex; flex-direction: column; justify-content: center; background: linear-gradient(145deg, #f6efe4, #edf4ef); }
.intro-panel h1 { max-width: 760px; margin-bottom: 15px; }
.intro-panel > p:not(.eyebrow) { max-width: 580px; margin-bottom: 0; color: var(--navy-soft); font-size: 1.12rem; line-height: 1.55; }
.calendar-art { display: block; width: min(100%, 820px); height: auto; margin: 34px auto 0; border: 8px solid rgba(255,255,255,.74); border-radius: 24px; box-shadow: 0 25px 55px rgba(16,47,79,.17); }
.trust-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 11px; margin: 28px auto 0; }
.trust-row span { min-width: 122px; padding: 10px 15px; border: 1px solid rgba(16,47,79,.07); border-radius: 999px; color: var(--navy-soft); background: rgba(255,255,255,.76); text-align: center; font-size: .78rem; font-weight: 700; }
.login-card { align-self: center; padding: clamp(36px, 4.5vw, 68px); }
.login-card h2 { margin-bottom: 10px; font-size: clamp(2rem, 3vw, 2.7rem); }
.field { margin: 23px 0; }
.field label { display: block; margin-bottom: 8px; color: var(--navy-deep); font-weight: 700; }
.field input, .field select { width: 100%; min-height: 55px; padding: 14px 16px; border: 1px solid #cbd5da; border-radius: 14px; color: var(--ink); background: #fff; outline: none; }
.field input:focus, .field select:focus { border-color: var(--green); box-shadow: 0 0 0 4px rgba(99,133,107,.13); }
.errorlist { padding: 0; color: #a23e32; list-style: none; font-size: .85rem; }
.primary-button { width: 100%; min-height: 55px; border: 0; border-radius: 14px; color: #fff; background: linear-gradient(135deg, var(--navy), var(--navy-deep)); box-shadow: 0 10px 22px rgba(16,47,79,.19); cursor: pointer; font-weight: 750; }
.help-text { margin: 23px 0 0; font-size: .82rem; line-height: 1.5; }
.welcome, .child-hero { display: flex; justify-content: space-between; align-items: flex-start; gap: 32px; }
.family-welcome { position: relative; overflow: hidden; margin-bottom: 28px; padding: 48px 54px; border-radius: 32px; color: white; background: linear-gradient(132deg, var(--navy-deep), #185077); box-shadow: var(--shadow); }
.family-welcome::after { content: ""; position: absolute; width: 330px; height: 330px; right: -78px; bottom: -220px; border: 42px solid rgba(255,255,255,.055); border-radius: 50%; }
.family-welcome h1 { max-width: 850px; margin-bottom: 13px; color: white; font-size: clamp(2.35rem, 4vw, 4rem); }
.family-welcome .eyebrow { color: #cfe6d7; }
.family-welcome p:not(.eyebrow) { margin-bottom: 0; color: rgba(255,255,255,.76); font-size: 1.04rem; }
.status-pill { position: relative; z-index: 1; flex: 0 0 auto; padding: 9px 14px; border-radius: 999px; color: var(--green-deep); background: #edf7f0; font-size: .76rem; font-weight: 800; }
.status-pill.closed { color: #7b4a25; background: #f5e3d4; }
.family-welcome .status-pill { background: rgba(255,255,255,.94); }
.campaign-card { display: grid; grid-template-columns: minmax(0, 1.62fr) minmax(290px, .58fr); gap: clamp(26px, 4vw, 56px); align-items: center; margin-bottom: 30px; padding: 25px; border: 1px solid var(--border); border-radius: 30px; background: rgba(255,255,255,.93); box-shadow: var(--shadow-soft); }
.campaign-card > img { display: block; width: 100%; height: auto; border-radius: 21px; box-shadow: 0 18px 40px rgba(16,47,79,.14); }
.campaign-copy { padding: 18px 22px 18px 0; }
.campaign-copy h2 { margin-bottom: 22px; font-size: clamp(1.8rem, 2.6vw, 3.1rem); line-height: 1.17; }
.campaign-facts { display: grid; grid-template-columns: 1fr; gap: 10px; margin: 0; }
.campaign-facts div { padding: 13px 15px; border-radius: 14px; background: var(--beige); }
.campaign-facts dt { color: var(--muted); font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }
.campaign-facts dd { margin: 3px 0 0; color: var(--navy-deep); font-size: .9rem; font-weight: 700; }
.children-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.branch-cub, .branch-brownie { --branch: var(--yellow); --branch-deep: var(--yellow-deep); --branch-soft: var(--yellow-light); --branch-wash: var(--white); }
.branch-scout, .branch-guide { --branch: var(--green); --branch-deep: var(--green-deep); --branch-soft: var(--green-light); --branch-wash: #f4f9f5; }
.child-card { position: relative; overflow: hidden; padding: 25px; border: 1px solid var(--border); border-top: 5px solid var(--branch, var(--green)); border-radius: 24px; background: linear-gradient(150deg, var(--white), var(--branch-wash, #f4f9f5)); box-shadow: var(--shadow-soft); }
.child-card.branch-cub, .child-card.branch-brownie { background: var(--white); }
.child-card::after { content: ""; position: absolute; width: 130px; height: 130px; right: -72px; top: -70px; border: 20px solid var(--branch-soft, var(--green-light)); border-radius: 50%; opacity: .55; }
.child-heading { position: relative; z-index: 1; display: flex; align-items: center; gap: 14px; }
.child-heading h2 { margin: 0 0 2px; font-size: 1.55rem; }
.child-heading p { margin: 0; color: var(--branch-deep, var(--green-deep)); font-size: .86rem; font-weight: 650; }
.avatar { display: grid; place-items: center; flex: 0 0 auto; width: 82px; height: 88px; border-radius: 22px; color: white; background: var(--branch, var(--green)); box-shadow: 0 9px 18px rgba(99,133,107,.22); font-size: 1.25rem; font-weight: 800; }
.avatar-portrait { display: block; object-fit: cover; object-position: center; border: 0; border-radius: 0; background: transparent; box-shadow: none !important; mix-blend-mode: multiply; }
.branch-cub .avatar-portrait, .branch-brownie .avatar-portrait, .branch-guide .avatar-portrait { mix-blend-mode: normal; }
.branch-cub .avatar-initial, .branch-brownie .avatar-initial { box-shadow: 0 9px 18px rgba(244,196,0,.24); }
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); margin: 24px 0; overflow: hidden; border: 1px solid var(--border); border-radius: 17px; background: white; }
.metrics-four { grid-template-columns: repeat(4, 1fr); }
.metrics div { padding: 15px 8px; text-align: center; background: rgba(255,255,255,.9); }
.metrics div + div { border-left: 1px solid var(--border); }
.metrics .remaining { background: var(--branch-soft, var(--green-light)); }
.metrics .collected { background: #f3eee4; }
.metrics dt { color: var(--muted); font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.metrics dd { margin: 4px 0 0; color: var(--navy-deep); font-family: var(--font-editorial); font-size: 1.55rem; font-weight: 700; }
.card-link { display: flex; align-items: center; justify-content: space-between; min-height: 44px; padding-top: 3px; color: var(--navy-deep); text-decoration: none; font-weight: 750; }
.card-link span { color: var(--branch, var(--green)); }
.back-link { display: inline-flex; align-items: center; min-height: 44px; margin-bottom: 12px; color: var(--navy-soft); text-decoration: none; font-size: .9rem; font-weight: 700; }
.child-page { --branch: var(--green); --branch-deep: var(--green-deep); --branch-soft: var(--green-light); --branch-wash: #f4f9f5; max-width: 1240px; margin: auto; }
.child-page.branch-cub, .child-page.branch-brownie { --branch: var(--yellow); --branch-deep: var(--yellow-deep); --branch-soft: var(--yellow-light); --branch-wash: var(--white); }
.child-hero { margin-bottom: 26px; padding: 26px 30px; border: 1px solid var(--border); border-left: 6px solid var(--branch); border-radius: 24px; background: linear-gradient(135deg, white, var(--branch-wash)); box-shadow: var(--shadow-soft); }
.child-page.branch-cub .child-hero, .child-page.branch-brownie .child-hero { background: var(--white); }
.detail-identity { display: flex; align-items: center; gap: 18px; }
.detail-identity h1 { margin-bottom: 5px; font-size: clamp(2.2rem, 4vw, 3.8rem); }
.detail-identity > div > p:not(.eyebrow) { margin: 0; color: var(--muted); }
.detail-identity .eyebrow { margin-bottom: 7px; color: var(--branch-deep); }
.avatar-large { width: 136px; height: 145px; font-size: 1.7rem; }
.avatar-large.avatar-initial { border-radius: 30px; }
.avatar-edit-wrap { position: relative; display: inline-flex; flex: 0 0 auto; }
.avatar-edit-wrap .avatar { flex: none; }
.avatar-change-link { position: absolute; z-index: 2; right: -3px; bottom: 0; display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid color-mix(in srgb, var(--branch) 45%, white); border-radius: 13px; color: var(--branch-deep); background: var(--branch-soft); box-shadow: 0 7px 18px rgba(16,47,79,.15); text-decoration: none; font-size: 1rem; font-weight: 800; line-height: 1; transition: transform .18s ease, box-shadow .18s ease; }
.avatar-change-link:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(16,47,79,.19); }
.avatar-change-link:focus-visible { outline: 3px solid color-mix(in srgb, var(--branch) 35%, transparent); outline-offset: 3px; }
.child-detail-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(360px, .75fr); grid-template-areas: "workspace visual"; gap: 28px; align-items: start; }
.child-workspace { grid-area: workspace; }
.child-calendar-visual { grid-area: visual; margin: 0; padding: 17px; border: 1px solid var(--border); border-radius: 25px; background: white; box-shadow: var(--shadow-soft); }
.child-calendar-visual img { display: block; width: 100%; height: auto; border-radius: 18px; }
.child-calendar-visual p { margin: 18px 5px 5px; color: var(--navy-soft); font-family: var(--font-editorial); font-size: 1.02rem; line-height: 1.5; text-align: center; }
.child-calendar-visual strong { color: var(--navy-deep); font-size: 1.18em; }
.metrics-large { margin: 0 0 20px; }
.metrics-large div { padding: 23px 12px; }
.metrics-large dd { font-size: 2.15rem; }
.action-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.action-card { display: flex; gap: 13px; min-height: 82px; padding: 16px; border: 1px solid var(--border); border-radius: 18px; color: var(--navy-deep); background: white; opacity: 1; text-align: left; }
.action-card.action-enabled { opacity: 1; text-decoration: none; transition: transform .18s ease, box-shadow .18s ease; }
.action-card.action-enabled:hover { transform: translateY(-2px); box-shadow: var(--shadow-soft); }
.action-card:not(.action-enabled) > span:last-child { opacity: .57; }
.action-card span:last-child { display: flex; flex-direction: column; gap: 4px; }
.action-card strong { font-size: 1.03rem; }
.action-card small { color: var(--muted); }
.action-icon { display: grid; place-items: center; flex: 0 0 auto; width: 43px; height: 43px; border-radius: 14px; color: var(--branch-deep); background: var(--branch-soft); font-size: 1.2rem; }
.recent-panel, .history-card, .audit-card { margin-top: 22px; padding: 23px; border: 1px solid var(--border); border-radius: 21px; background: white; box-shadow: var(--shadow-soft); }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.section-heading h2 { margin-bottom: 0; }
.section-heading a, .history-heading a, .sale-actions a { color: var(--green); font-weight: 750; }
.section-heading a, .sale-actions a { display: inline-flex; align-items: center; min-height: 44px; }
.compact-list, .audit-list { margin: 18px 0 0; padding: 0; list-style: none; }
.compact-list li { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; color: var(--muted); }
.compact-list li + li { border-top: 1px solid var(--border); }
.compact-list strong { color: var(--navy-deep); }
.form-layout { max-width: 680px; margin: 10px auto 0; }
.form-heading { text-align: center; }
.form-heading h1 { margin-bottom: 12px; }
.form-heading > p:last-child, .history-heading p:last-child { color: var(--muted); }
.form-metrics { max-width: 680px; }
.data-form { padding: 28px; border: 1px solid var(--border); border-radius: 23px; background: white; box-shadow: var(--shadow-soft); }
.data-form .field:first-of-type { margin-top: 0; }
.data-form .field input, .data-form .field select { font-size: 1.15rem; font-weight: 700; }
.text-button { min-height: 44px; padding: 9px 12px; border: 0; color: var(--danger); background: transparent; font: inherit; font-weight: 750; cursor: pointer; }
.field-help { margin: 7px 2px 0; color: var(--muted); font-size: .8rem; }
.primary-button:disabled { cursor: not-allowed; opacity: .58; }
.input-with-unit { position: relative; }
.input-with-unit input { padding-right: 48px; }
.input-with-unit span { position: absolute; top: 50%; right: 17px; transform: translateY(-50%); color: var(--green); font-size: 1.2rem; font-weight: 800; }
.form-alert { margin-bottom: 20px; padding: 14px 16px; border: 1px solid #e7b6aa; border-radius: 13px; color: #8a352b; background: #fff1ed; }
.form-alert .errorlist { margin: 0; }
.rule-note { margin: -4px 0 22px; padding: 13px 15px; border-radius: 12px; color: #72501f; background: #fbf3df; font-size: .86rem; }
.danger-link { display: flex; align-items: center; justify-content: center; min-height: 44px; margin-top: 10px; color: #a23e32; text-align: center; font-weight: 750; }
.confirmation-card { max-width: 680px; margin: 26px auto; padding: clamp(30px, 6vw, 56px); border: 1px solid #e5c4bc; border-radius: 29px; background: white; box-shadow: var(--shadow); }
.confirmation-card h1 { font-size: clamp(2.1rem, 4vw, 3.2rem); }
.confirmation-card > p:not(.eyebrow) { color: var(--muted); line-height: 1.65; }
.confirmation-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 28px; }
.danger-button, .secondary-button, .small-primary-button { display: grid; place-items: center; min-height: 51px; padding: 12px 18px; border: 0; border-radius: 13px; cursor: pointer; text-decoration: none; font-weight: 750; }
.danger-button { color: white; background: #aa4537; }
.secondary-button { color: var(--navy-deep); background: var(--beige); }
.small-primary-button { color: white !important; background: var(--green); }
.history-heading { display: flex; justify-content: space-between; align-items: center; gap: 24px; max-width: 780px; margin: 10px 0 24px; }
.history-heading h1 { margin-bottom: 10px; }
.history-card, .audit-card { max-width: 780px; }
.history-card h2, .audit-card h2 { margin-bottom: 18px; }
.sale-row { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 17px 0; }
.sale-row + .sale-row { border-top: 1px solid var(--border); }
.sale-row time, .sale-row strong { display: block; }
.sale-row time { margin-bottom: 5px; color: var(--muted); font-size: .78rem; }
.sale-row strong { color: var(--navy-deep); }
.sale-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.sale-actions .danger-link-inline { color: #a23e32; }
.empty-copy { margin-bottom: 0; color: var(--muted); }
.audit-list { border-left: 2px solid var(--green-light); }
.audit-list li { position: relative; display: grid; grid-template-columns: 145px 145px 1fr; gap: 12px; padding: 12px 0 12px 20px; color: var(--muted); }
.audit-list li::before { content: ""; position: absolute; left: -6px; top: 18px; width: 10px; height: 10px; border-radius: 50%; background: var(--green); }
.audit-list time { font-size: .78rem; }
.audit-list strong { color: var(--navy-deep); }
.empty-state { grid-column: 1 / -1; padding: 42px; border: 1px dashed var(--border); border-radius: 22px; text-align: center; }
.avatar-page { max-width: 1240px; margin: auto; }
.avatar-page-heading { display: flex; align-items: center; justify-content: space-between; gap: 32px; margin-bottom: 26px; padding: 31px 35px; border: 1px solid var(--border); border-left: 6px solid var(--branch); border-radius: 26px; background: linear-gradient(135deg, white, var(--branch-wash, #fffaf0)); box-shadow: var(--shadow-soft); }
.avatar-page-heading h1 { margin-bottom: 10px; font-size: clamp(2.2rem, 4vw, 3.7rem); }
.avatar-page-heading p:last-child { margin-bottom: 0; color: var(--muted); }
.avatar-current { width: 136px; height: 145px; border: 0; border-radius: 0; object-fit: cover; background: transparent; box-shadow: none !important; mix-blend-mode: multiply; }
.avatar-gallery { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.avatar-page.branch-cub .avatar-choice[value="boy-01"], .avatar-page.branch-brownie .avatar-choice[value="girl-01"] { order: 1; }
.avatar-page.branch-cub .avatar-choice[value="boy-05"], .avatar-page.branch-brownie .avatar-choice[value="girl-05"] { order: 2; }
.avatar-page.branch-cub .avatar-choice[value="boy-02"], .avatar-page.branch-brownie .avatar-choice[value="girl-02"] { order: 3; }
.avatar-page.branch-cub .avatar-choice[value="boy-06"], .avatar-page.branch-brownie .avatar-choice[value="girl-06"] { order: 4; }
.avatar-page.branch-cub .avatar-choice[value="boy-03"], .avatar-page.branch-brownie .avatar-choice[value="girl-03"] { order: 5; }
.avatar-page.branch-cub .avatar-choice[value="boy-07"], .avatar-page.branch-brownie .avatar-choice[value="girl-07"] { order: 6; }
.avatar-page.branch-cub .avatar-choice[value="boy-04"], .avatar-page.branch-brownie .avatar-choice[value="girl-04"] { order: 7; }
.avatar-choice { position: relative; padding: 11px 11px 15px; overflow: hidden; border: 2px solid transparent; border-radius: 24px; color: var(--navy-deep); background: white; box-shadow: var(--shadow-soft); cursor: pointer; text-align: left; transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.avatar-choice:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--branch) 48%, white); box-shadow: 0 19px 44px rgba(16,47,79,.13); }
.avatar-choice:focus-visible { outline: 4px solid color-mix(in srgb, var(--branch) 28%, transparent); outline-offset: 3px; }
.avatar-choice.is-selected { border-color: var(--branch); background: white; box-shadow: 0 0 0 2px var(--branch), var(--shadow-soft); }
.avatar-choice img { display: block; width: 100%; height: auto; aspect-ratio: 290 / 310; border-radius: 0; object-fit: cover; mix-blend-mode: multiply; }
.avatar-page.branch-cub .avatar-current, .avatar-page.branch-cub .avatar-choice img,
.avatar-page.branch-brownie .avatar-current, .avatar-page.branch-brownie .avatar-choice img,
.avatar-page.branch-guide .avatar-current, .avatar-page.branch-guide .avatar-choice img { mix-blend-mode: normal; }
.avatar-choice span { display: block; margin: 13px 4px 0; font-weight: 750; }
.avatar-choice strong { position: absolute; top: 20px; right: 20px; padding: 6px 9px; border-radius: 999px; color: var(--yellow-deep); background: rgba(255,255,255,.94); box-shadow: 0 7px 17px rgba(16,47,79,.14); font-size: .68rem; }
.avatar-note, .form-errors { margin: 21px 0 0; padding: 14px 17px; border-radius: 14px; font-size: .86rem; }
.avatar-note { color: var(--navy-soft); background: var(--beige); text-align: center; }
.form-errors { margin: 0 0 18px; color: #8a352b; background: #fff1ed; }
@media (min-width: 1500px) {
  .header-inner { width: min(1580px, calc(100% - 72px)); }
  .page-shell { width: min(1500px, calc(100% - 72px)); }
  .login-layout { min-height: 760px; }
  .children-grid { gap: 28px; }
  .child-card { padding: 29px; }
}
@media (max-width: 1000px) {
  .brand-logo { width: 160px; }
  .header-spacer { width: 160px; }
  .login-layout { grid-template-columns: 1fr; }
  .login-card { order: -1; width: min(620px, 100%); justify-self: center; }
  .intro-panel { min-height: 520px; }
  .children-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .campaign-card { grid-template-columns: 1fr; }
  .campaign-copy { padding: 8px 8px 4px; text-align: center; }
  .campaign-facts { grid-template-columns: repeat(2, 1fr); }
  .child-detail-grid { grid-template-columns: 1fr; grid-template-areas: "visual" "workspace"; }
  .child-calendar-visual img { max-width: 760px; margin: auto; }
  .avatar-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .header-inner { width: calc(100% - 24px); min-height: 84px; grid-template-columns: 1fr 90px 1fr; gap: 0; }
  .brand-logo { width: 96px; height: 51px; }
  .header-title { width: 90px; justify-self: center; }
  .header-title strong { font-size: 1rem; }
  .header-title small { margin-top: 5px; font-size: .59rem; letter-spacing: .15em; }
  .header-spacer { display: block; width: 96px; }
  .link-button { padding: 8px 0; font-size: .76rem; }
  .page-shell { width: calc(100% - 24px); min-height: calc(100vh - 150px); margin: 16px auto 42px; }
  footer { padding: 21px 16px; }
  h1 { font-size: 2.35rem; }
  .login-layout { min-height: 0; border-radius: 24px; }
  .login-card { padding: 30px 23px 34px; }
  .login-card h2 { font-size: 2rem; }
  .intro-panel { min-height: 0; padding: 31px 18px 29px; }
  .intro-panel h1 { font-size: 2.35rem; }
  .intro-panel > p:not(.eyebrow) { font-size: 1rem; }
  .calendar-art { margin-top: 25px; border-width: 5px; border-radius: 18px; }
  .trust-row { gap: 8px; margin-top: 20px; }
  .trust-row span { min-width: 0; padding: 8px 11px; font-size: .7rem; }
  .family-welcome { margin: 0 -12px 20px; padding: 31px 23px 36px; border-radius: 0 0 28px 28px; }
  .welcome, .child-hero { flex-direction: column; gap: 13px; }
  .family-welcome h1 { font-size: 2.25rem; }
  .campaign-card { gap: 17px; padding: 13px; border-radius: 22px; }
  .campaign-card > img { border-radius: 17px; }
  .campaign-copy { padding: 7px 8px 8px; }
  .campaign-copy h2 { margin-bottom: 16px; font-size: 1.55rem; }
  .campaign-facts { grid-template-columns: 1fr; }
  .children-grid { grid-template-columns: 1fr; gap: 15px; }
  .child-card { padding: 20px; border-radius: 21px; }
  .child-heading { align-items: flex-start; }
  .back-link { margin-bottom: 4px; }
  .child-hero { margin-bottom: 16px; padding: 20px 18px; border-radius: 21px; }
  .detail-identity { align-items: flex-start; gap: 14px; }
  .detail-identity h1 { font-size: 2.25rem; }
  .avatar { width: 76px; height: 81px; }
  .avatar-large { width: 104px; height: 111px; }
  .avatar-large.avatar-initial { border-radius: 24px; }
  .child-detail-grid { gap: 16px; }
  .child-calendar-visual { padding: 11px; border-radius: 21px; }
  .child-calendar-visual img { border-radius: 15px; }
  .child-calendar-visual p { margin-top: 13px; font-size: .9rem; }
  .metrics-large div { padding: 18px 7px; }
  .metrics-large dd { font-size: 1.8rem; }
  .metrics-four { grid-template-columns: repeat(2, 1fr); }
  .metrics-four div:nth-child(3) { border-left: 0; }
  .metrics-four div:nth-child(n+3) { border-top: 1px solid var(--border); }
  .action-grid { grid-template-columns: 1fr; gap: 11px; }
  .action-card { min-height: 76px; }
  .compact-list li, .history-heading, .sale-row { align-items: flex-start; flex-direction: column; }
  .sale-actions { flex-wrap: wrap; justify-content: flex-start; }
  .audit-list li { grid-template-columns: 1fr; gap: 4px; }
  .confirmation-actions { grid-template-columns: 1fr; }
  .data-form, .recent-panel, .history-card, .audit-card { padding: 20px; }
  .avatar-page-heading { align-items: flex-start; margin: 0 -3px 18px; padding: 24px 20px; gap: 15px; border-radius: 22px; }
  .avatar-page-heading h1 { font-size: 2.25rem; }
  .avatar-page-heading .avatar-current { width: 84px; height: 90px; border-radius: 0; }
  .avatar-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
  .avatar-choice { padding: 7px 7px 12px; border-radius: 19px; }
  .avatar-choice img { border-radius: 0; }
  .avatar-choice span { margin: 10px 3px 0; font-size: .78rem; }
  .avatar-choice strong { top: 13px; right: 13px; padding: 4px 7px; }
}

/* ==========================================================================
   FAMILY PORTAL ENHANCEMENTS — 2026/2027
   ========================================================================== */

/* Password Input & Eye Toggle Button */
.password-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}
.password-input-wrapper input {
  width: 100%;
  padding-right: 50px;
}
.eye-toggle-btn {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: var(--muted, #64748b);
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}
.eye-toggle-btn:hover {
  color: var(--text, #1e293b);
  background: rgba(0,0,0,0.05);
}
.eye-toggle-btn [hidden] {
  display: none;
}

/* Family Guide Banner */
.family-guide-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 16px;
  margin-bottom: 24px;
}
@media (max-width: 650px) {
  .family-guide-banner {
    flex-direction: column;
    align-items: flex-start;
  }
  .family-guide-banner .guide-btn {
    width: 100%;
    text-align: center;
  }
}
.family-guide-banner .banner-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.family-guide-banner .banner-text strong {
  color: #166534;
  font-size: 0.95rem;
}
.family-guide-banner .banner-text span {
  color: #15803d;
  font-size: 0.84rem;
}

/* How It Works Guide Page */
.how-it-works-layout {
  max-width: 760px;
  margin: 0 auto;
}
.steps-timeline {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin: 32px 0;
}
.timeline-step {
  display: flex;
  gap: 20px;
  background: white;
  padding: 24px;
  border-radius: 18px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}
.step-badge {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary, #0f172a);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 800;
  flex-shrink: 0;
}
.step-body {
  flex: 1;
}
.step-body h2 {
  font-size: 1.15rem;
  margin-top: 2px;
  margin-bottom: 8px;
  color: var(--primary, #0f172a);
}
.step-body p {
  font-size: 0.94rem;
  line-height: 1.6;
  color: #334155;
}
.step-tip {
  margin-top: 12px;
  padding: 10px 14px;
  background: #f8fafc;
  border-left: 3px solid var(--secondary, #3b82f6);
  border-radius: 0 8px 8px 0;
  font-size: 0.84rem;
  color: #475569;
}
.how-it-works-actions {
  display: flex;
  justify-content: center;
  margin: 36px 0;
}
.how-it-works-actions .primary-button {
  min-height: 48px;
  padding: 12px 28px;
  font-size: 1rem;
}
