/* Color Lines: presentation layer for the existing application. Print stays separate. */
@media screen {
  :root {
    --bg:#fff; --surface:#fff; --surface-soft:#f6f7f9;
    --text:#24262b; --muted:#646a75; --line:#e4e7ec; --navy:#24262b;
    --brand:#1264dc; --brand-dark:#1264dc; --brand-foreground:#fff;
    --success-bg:#eef7f0; --success-text:#287d3b;
    --warning-bg:#fff7df; --warning-text:#806113;
    --shadow:0 8px 28px #18243b12; --shadow-soft:none;
  }
  html { background:#fff; scrollbar-gutter:stable; }
  body { background:#fff; color:var(--text); }
  body, button, input, select, textarea, h1, h2, h3, h4 {
    font-family:'Nunito Sans',system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
  }
  .app { display:grid; grid-template-columns:224px minmax(0,1fr); grid-template-rows:auto 1fr; min-height:100dvh; align-items:start; }
  .app-sidebar { grid-column:1; grid-row:1 / span 2; position:sticky; top:0; min-height:100dvh; padding:36px 20px; border-right:1px solid var(--line); background:#fff; z-index:110; }
  .app-sidebar .brand { position:relative; display:block; margin:14px 4px 38px; padding:0; }
  .app-sidebar .brand h1 { color:var(--text); font-size:32px; font-weight:900; text-transform:none; letter-spacing:-1.6px; line-height:1.15; white-space:nowrap; }
  .brand-dot { color:var(--brand); }
  .brand-sprinkles { position:absolute; display:flex; gap:5px; top:-23px; right:4px; transform:rotate(12deg); }
  .brand-sprinkles i { display:block; width:4px; height:15px; border-radius:3px; background:#1264dc; transform:rotate(-15deg); }
  .brand-sprinkles i:nth-child(2) { background:#c91583; transform:rotate(18deg); margin-top:4px; }
  .brand-sprinkles i:nth-child(3) { background:#f2c230; transform:rotate(45deg); margin-top:10px; }
  .app-sidebar .tabs-wrap { position:static; width:100%; margin:0; padding:0; border:0; border-radius:0; box-shadow:none; background:#fff; }
  .app-sidebar .tabs { display:flex; flex-direction:column; gap:8px; padding:0; align-items:stretch; }
  .app-sidebar .tab { flex:none; position:relative; border:0; border-radius:7px; text-align:left; padding:12px 17px; min-height:46px; color:var(--text); font-size:16px; font-weight:800; background:transparent; }
  .app-sidebar .tab.active { background:var(--surface-soft); color:var(--text)!important; }
  .app-sidebar .tab.active::after { content:''; position:absolute; left:0; right:auto; top:10px; bottom:10px!important; width:4px; height:auto!important; border-radius:3px; background:var(--brand)!important; }
  .app-sidebar .global-menu { margin-top:12px; position:relative; }
  .app-sidebar #moreMenuButton { width:100%; text-align:left; justify-content:flex-start; border:0; padding:12px 17px; font-size:16px; font-weight:800; background:#fff; }
  .app-sidebar #moreMenuButton[aria-expanded=true] { background:var(--surface-soft); }
  .app-sidebar .more-menu { position:fixed; top:96px; left:208px; right:auto; min-width:230px; width:max-content; max-width:calc(100vw - 32px); max-height:calc(100dvh - 120px); overflow-y:auto; background:#fff; opacity:1; backdrop-filter:none; z-index:120; border:1px solid var(--line); border-radius:8px; padding:7px; box-shadow:var(--shadow); }
  .app-sidebar .more-menu .button { display:flex; width:100%; padding:10px 13px; min-height:40px; border:0; border-radius:5px; justify-content:flex-start; font-size:14px; }
  .app-sidebar .more-menu .mobile-menu-action { display:none; }
  .app-sidebar .menu-account { max-width:240px; overflow-wrap:anywhere; font-size:12px; }
  .app > header { grid-column:2; grid-row:1; position:relative; top:auto; background:#fff; backdrop-filter:none; border:0; z-index:20; }
  .app > header .header-inner { width:100%; max-width:none; padding:26px 40px 0; margin:0; display:flex; justify-content:flex-end; }
  .app > header .header-actions { display:flex; align-items:center; justify-content:flex-end; width:100%; flex-wrap:wrap; gap:12px; }
  .app > header #workspaceSwitcher { margin-right:auto; }
  .app > header .workspace-switcher label { font-size:12px; color:var(--muted); }
  .app > main, .app > #authGate, .app > #workspaceLoading { grid-column:2; grid-row:2; width:100%; max-width:1440px; min-width:0; padding:30px 40px 45px; margin:0 auto; box-sizing:border-box; }
  .app > main { display:flex; flex-direction:column; gap:0; }
  .app .view { width:100%; min-width:0; }
  .app .view > .page-intro { display:flex!important; margin:0 0 24px; padding:0; border:0; background:transparent; box-shadow:none; }
  .app .view > .page-intro h2 { font-size:32px; line-height:1.2; letter-spacing:-.8px; font-weight:900; color:var(--text); }
  .app .view > .page-intro p { color:var(--muted); font-size:14px; line-height:1.6; margin-top:8px; }
  .app .button, dialog .button { font-size:14px; line-height:1.4; font-weight:800; min-height:42px; border-radius:7px; padding:9px 14px; box-shadow:none; }
  .app .button:not(.secondary):not(.danger) { color:var(--brand-foreground)!important; }
  .app .button.secondary { color:var(--text); background:#fff; border-color:#d6dbe3; }
  .app .button.secondary:hover:not(:disabled) { background:var(--surface-soft); }
  .app .panel, .app .empty-state, .app .access-panel, .app .home-card, .app .about-card { border-radius:8px; box-shadow:none; background:#fff; border-color:var(--line); }
  .app .field input:not([type=checkbox]):not([type=radio]), .app .field select, .app .field textarea,
  dialog .field input:not([type=checkbox]):not([type=radio]), dialog .field select, dialog .field textarea { border:1px solid #d5dae3; border-radius:6px; background:#fff; color:var(--text); padding:11px 12px; font-size:16px; }
  .app .subtab, .app .view-toggle, .app .mode-toggle { border-radius:5px; font-size:13px; }
  .app .subtab.active, .app .view-toggle.active { background:var(--surface-soft); color:var(--text); }
  .app #mobileBottomNav { display:none!important; }
  .app [hidden], .app-sidebar [hidden] { display:none!important; }
  .app .auth-gate { align-self:start; border:0; border-radius:0; background:white; text-align:left; }
  .app .auth-gate h2 { font-size:56px; max-width:560px; line-height:1.04; font-weight:900; letter-spacing:-2px; }
  .app .auth-gate p { max-width:650px; color:var(--muted); line-height:1.7; }
  .app .auth-gate-actions { justify-content:flex-start; }
  .app .auth-gate-video { display:block; width:100%; max-width:760px; aspect-ratio:16/9; margin-top:32px; border:1px solid var(--line); border-radius:12px; background:var(--surface-soft); }
  /* Signed out: use the core blue instead of the Home screen's red accent, matching the promo video. */
  .app:has(> #authGate:not([hidden])) { --brand:#1264dc; --brand-dark:#1264dc; --brand-foreground:#fff; }
  .app .auth-gate-accent { color:#1264dc; }
  .app .auth-gate-lines { display:flex; gap:9px; margin-bottom:26px; }
  .app .auth-gate-lines i { width:9px; height:54px; border-radius:6px; background:#1264dc; }
  .app .auth-gate-lines i:nth-child(2) { background:#00857e; } .app .auth-gate-lines i:nth-child(3) { background:#c91583; }
  .app .auth-gate-lines i:nth-child(4) { background:#783ec6; } .app .auth-gate-lines i:nth-child(5) { background:#f2c230; }
  .app .auth-gate-lines i:nth-child(6) { background:#287d3b; }
  .app .plan-tools { display:flex; align-items:end; justify-content:flex-start; gap:12px; flex-wrap:wrap; width:100%; padding:0 0 20px; border:0; border-bottom:1px solid var(--line); margin:0 0 22px; background:transparent; box-shadow:none; }
  .app .plan-tools label { font-size:12px; color:var(--muted); display:grid; gap:5px; }
  .app .plan-tools select { min-height:42px; padding:8px 12px; font-size:14px; background:#fff; border:1px solid #d6dbe3; border-radius:7px; }
  .app .plan-gap-filter { margin-left:auto; }
  .app .plan-gap-filter[aria-pressed=true] { background:var(--surface-soft); border-color:var(--brand); }
  html[data-plan-workspace=true] #kidFilter { display:none; }
  .app #scheduleView .registration-grid, .app #scheduleView .plan-single-layout { display:block!important; width:100%; border:0; background:transparent; padding:0; box-shadow:none; }
  .app #scheduleView .plan-summer-grid { width:100%; border-collapse:collapse; border-spacing:0; table-layout:fixed; }
  .app #scheduleView .plan-summer-grid th, .app #scheduleView .plan-summer-grid td { border:0; border-bottom:1px solid var(--line); background:transparent; padding:20px 18px; vertical-align:top; }
  .app #scheduleView .plan-summer-grid thead th { font-size:14px; font-weight:800; padding:12px 18px; color:var(--text); }
  .app #scheduleView .plan-summer-grid th:first-child { width:130px; padding-left:0; font-size:14px; font-weight:800; }
  .app #scheduleView .plan-summer-grid td { min-width:180px; }
  .app #scheduleView .plan-camp-cell { position:relative; display:flex; flex-direction:column; align-items:flex-start; justify-content:flex-start; gap:7px; width:100%; min-height:85px; padding:0 0 0 16px; border:0; border-radius:3px; background:#fff; color:var(--text); box-shadow:none; }
  .app #scheduleView .plan-camp-cell:not(.is-empty)::before { content:''; position:absolute; left:0; top:1px; bottom:2px; width:4px; border-radius:3px; background:var(--plan-accent,var(--brand)); }
  .app #scheduleView .plan-camp-cell strong { font-size:17px; line-height:1.35; font-weight:800; }
  .app #scheduleView .plan-camp-cell:hover:not(:disabled) { background:var(--surface-soft); }
  .app #scheduleView .plan-camp-cell.is-empty { padding-left:0; justify-content:center; color:var(--muted); border:0; background:transparent; }
  .app #scheduleView .plan-cell-status { margin-top:0; font-size:12px; line-height:1.5; gap:4px; color:var(--muted); }
  .app #scheduleView .plan-week-time { font-size:13px; color:var(--muted); }
  .app #scheduleView .plan-single-weeks { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; }
  .app #scheduleView .plan-single-weeks .plan-camp-cell { padding:18px 18px 18px 31px; border:1px solid var(--line); border-radius:8px; min-height:180px; gap:10px; }
  .app #scheduleView .plan-single-weeks .plan-camp-cell:not(.is-empty)::before { left:17px; top:54px; bottom:18px; }
  .app #scheduleView .plan-week-date { color:var(--muted); font-size:13px; font-weight:800; margin-left:-13px; margin-bottom:7px; }
  .app #scheduleView .plan-single-weeks .plan-cell-status { margin-top:auto; }
  .app #costsView { max-width:none; }
  .app #costsView .cost-stat { background:#fff!important; border:0!important; border-bottom:2px solid var(--line)!important; border-radius:0!important; padding:16px 0!important; }
  .app #costsView .cost-stat strong { color:var(--text); font-size:30px; }
  .app #costsView .cost-summary { gap:22px!important; }
  .app #costsView .cost-row { background:#fff; }
  .app #sharingView .access-shell { background:#fff; }
  .app .success-text { color:var(--success-text); }
}
@media screen and (max-width:1100px) {
  .app { grid-template-columns:190px minmax(0,1fr); }
  .app-sidebar { padding:34px 16px; }
  .app-sidebar .more-menu { left:174px; }
  .app-sidebar .brand h1 { font-size:29px; }
  .app > header .header-inner { padding:22px 24px 0; }
  .app > main, .app > #authGate, .app > #workspaceLoading { padding:26px 24px 36px; }
  .app #scheduleView .plan-single-weeks { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .app #scheduleView .plan-summer-grid th:first-child { width:105px; }
  .app #scheduleView .plan-summer-grid { table-layout:auto; }
}
@media screen and (max-width:720px) {
  .app { display:block; }
  .app-sidebar { position:relative; top:auto; min-height:0; padding:28px 16px 14px; border-right:0; border-bottom:1px solid var(--line); }
  .app-sidebar .brand { margin:6px 0 22px; width:max-content; }
  .app-sidebar .brand h1 { font-size:29px; }
  .brand-sprinkles { right:0; top:-20px; }
  .app-sidebar .tabs { flex-direction:row; justify-content:space-between; gap:4px; padding-right:59px; }
  .app-sidebar .tab { flex:1; min-height:42px; padding:9px 8px; text-align:center; font-size:14px; }
  .app-sidebar .tab.active::after { left:9px; right:9px; top:auto!important; bottom:0!important; width:auto; height:3px!important; }
  .app-sidebar .global-menu { position:absolute; right:16px; bottom:14px; margin:0; }
  .app-sidebar #moreMenuButton { min-height:42px; width:auto; padding:9px 6px; font-size:14px; }
  .app-sidebar .more-menu { position:absolute; left:auto; right:0; top:46px; max-height:65dvh; }
  .app-sidebar .more-menu .mobile-menu-action { display:flex; }
  html[data-mobile-shell="true"] .app-sidebar .tabs-wrap:not([hidden]) { display:block!important; }
  html[data-mobile-shell="true"] .app > header { position:relative; top:auto; }
  .app > header .header-inner { padding:14px 16px 0; flex-direction:row; }
  .app > header .header-actions { display:flex!important; flex-direction:row; justify-content:flex-end; gap:8px; }
  .app > header #showAddKidButton { display:inline-flex; }
  .app > main, .app > #authGate, .app > #workspaceLoading { padding:22px 16px 35px; width:100%; margin:0; }
  .app .view > .page-intro h2 { font-size:28px; }
  .app .view > .page-intro { align-items:stretch; gap:16px; }
  .app .auth-gate h2 { font-size:34px; }
  .app .auth-gate-lines { gap:7px; margin-bottom:18px; } .app .auth-gate-lines i { width:7px; height:36px; }
  .app .plan-tools { gap:10px; margin-bottom:18px; }
  .app .plan-tools label { max-width:100%; }
  .app .plan-gap-filter { margin-left:0; }
  .app #scheduleView .plan-summer-grid th:first-child { width:90px; }
  .app #scheduleView .plan-summer-grid th, .app #scheduleView .plan-summer-grid td { padding:16px 10px; }
  .app #scheduleView .plan-single-weeks { grid-template-columns:minmax(0,1fr); }
  .app #scheduleView .plan-single-weeks .plan-camp-cell { min-height:160px; }
  .app #scheduleView .plan-camp-cell strong { font-size:15px; }
  .app .page-actions { flex-wrap:wrap; }
  .app .camp-directory-actions { flex-wrap:wrap; }
}
@media print {
  .app-sidebar { display:none!important; }
}

/* Screen-specific finishes: retain the existing forms and actions. */
@media screen {
  .app > main { margin:0 auto!important; gap:0!important; }
  .app .view > .page-intro { margin-bottom:24px!important; }
  .app .plan-add { margin-left:auto; }
  .app .plan-add + .plan-gap-filter { margin-left:0; }
  .app #campsView .camps-list.directory { display:grid!important; grid-template-columns:repeat(2,minmax(0,1fr))!important; gap:18px!important; border:0!important; background:#fff!important; }
  .app #campsView .camp-directory-head { display:none!important; }
  .app #campsView .camp-directory-card { display:flex!important; flex-direction:column; align-items:stretch!important; gap:13px!important; min-width:0; padding:21px!important; border:1px solid var(--line)!important; border-radius:8px!important; background:#fff!important; box-shadow:none; }
  .app #campsView .camp-directory-card:hover { border-color:#b7c2d0!important; }
  .app #campsView .camp-directory-card > div { min-width:0; overflow-wrap:anywhere; }
  .app #campsView .camp-directory-card > div:first-child { padding-left:13px; border-left:4px solid var(--camp-accent,var(--brand)); }
  .app #campsView .camp-directory-title strong { font-size:19px!important; font-weight:800; }
  .app #campsView .camp-directory-kids { font-size:14px; color:var(--muted); }
  .app #campsView .camp-directory-cost { font-size:15px; font-weight:800; }
  .app #campsView:not([hidden]) .camp-directory-cost::after { content:' / week'; font-size:13px; font-weight:400; color:var(--muted); }
  .app #campsView .camp-directory-actions { display:flex!important; align-items:center; justify-content:flex-start; flex-wrap:wrap; gap:8px!important; margin-top:auto; padding-top:14px; border-top:1px solid var(--line); }
  .app #campsView .camp-directory-actions .button { width:auto!important; min-height:42px!important; padding:9px 12px!important; flex:0 0 auto; white-space:nowrap; }
  .app #costsView .cost-summary .cost-stat { border:0!important; border-bottom:2px solid var(--line)!important; padding:16px 0!important; border-radius:0; }
  .app #costsView .cost-stat strong { font-size:30px!important; font-weight:800; }
  .app #costsView .cost-stat span { font-size:13px!important; }
  .app #costsView .budget-filters { background:var(--surface-soft); width:max-content; max-width:100%; padding:3px; border-radius:7px; }
  .app #costsView .budget-filters button { min-height:38px; padding:8px 13px; border-radius:5px; font-size:13px; font-weight:800; }
  .app #costsView .budget-filters button[aria-pressed=true] { background:#fff; color:var(--text); border-color:transparent; box-shadow:0 1px 3px #16213018; }
  .app #costsView .budget-list-panel { border:0; border-radius:0; }
  .app #costsView .budget-column-head { background:#fff; border-bottom:1px solid var(--line); font-size:13px; }
  .app #costsView .cost-card-main strong { font-size:15px!important; font-weight:800!important; }
  .app #costsView .cost-meta, .app #costsView .budget-week, .app #costsView .budget-week small { font-size:13px; }
  .app #costsView .cost-card > .pill { font-size:12px!important; border-radius:5px; }
  .app #costsView .budget-status-paid { background:#eef7f0!important; color:#287d3b!important; }
  .app #costsView .budget-status-unpaid { background:#fff1f3!important; color:#b52b3e!important; }
  .app #sharingView .access-panel { background:#fff!important; border:1px solid var(--line)!important; border-radius:8px!important; box-shadow:none!important; }
  .app #sharingView .share-access-hero { border:0!important; padding:0!important; }
  .app #sharingView .share-access-guide { gap:15px; background:#fff; }
  .app #sharingView .share-access-guide > div { background:var(--surface-soft)!important; border:0!important; border-radius:6px; padding:15px; }
  .app #sharingView .share-access-workspace-tip { background:#fff!important; border:0!important; padding:0!important; color:var(--muted); font-size:13px; }
  .app #sharingView .share-access-preview { background:var(--surface-soft)!important; border:0!important; border-radius:6px!important; padding:16px!important; }
  .app #sharingView .access-chip, .app #sharingView .access-type-badge { background:var(--surface-soft); color:var(--text); border-color:var(--line); }
  .app #sharingView .share-access-form-row { display:grid!important; grid-template-columns:repeat(2,minmax(0,1fr))!important; gap:18px!important; }
  .app #sharingView .share-access-form-row > button { grid-column:1 / -1; justify-self:start; }
  .sharing-invite-next { margin-top:22px; border-left:3px solid var(--brand); padding:0 0 0 17px; }
  .sharing-invite-next h3 { font-size:17px; }
  .sharing-invite-next p { font-size:14px; color:var(--muted); line-height:1.6; margin:8px 0 14px; }
  dialog { font-family:'Nunito Sans',system-ui,sans-serif; }
  dialog::backdrop { background:#1b253b55; backdrop-filter:none; }
  dialog:not(#campDialog):not(#kidDialog) { border:1px solid var(--line); border-radius:10px; background:#fff; box-shadow:0 18px 70px #18243b26; }
  dialog .button:not(.secondary):not(.danger) { background:var(--brand); color:var(--brand-foreground); border-color:var(--brand); }
  dialog .button.secondary { background:#fff; color:var(--text); border-color:#d6dbe3; }
  dialog .form-actions { gap:10px; }
  dialog h3 { font-weight:800; letter-spacing:-.4px; }
  #campDialog, #kidDialog { border-radius:10px!important; box-shadow:0 18px 70px #18243b26!important; }
  #campDialog #campDialogTitle, #kidDialog h3 { color:var(--text)!important; font-family:inherit; font-size:23px!important; }
  #campDialog .form-section { border-color:var(--line)!important; background:#fff!important; border-radius:7px!important; }
  #campDialog .form-section-title { font-size:15px!important; font-weight:800!important; color:var(--text)!important; }
  #campDialog .form-section-hint { color:var(--muted)!important; font-size:13px!important; }
  #campDialog .field input:not([type=checkbox]):not([type=radio]), #campDialog .field select, #campDialog .field textarea { border:1px solid #d5dae3!important; border-radius:6px!important; background:#fff!important; font-size:16px!important; }
  #campDialog .field-toggle { background:var(--surface-soft)!important; border-radius:6px!important; }
  #campDialog .field-toggle button.active { background:#fff!important; color:var(--text)!important; box-shadow:0 1px 3px #16213018; }
  .new-plan-chooser { width:min(520px,calc(100vw - 32px)); max-height:calc(100dvh - 32px); overflow:auto; }
  .new-plan-chooser .dialog-grid { display:grid; grid-template-columns:1fr 1fr; gap:16px; margin:20px 0; }
  .new-plan-chooser .field { min-width:0; }
  .new-plan-chooser .field select { width:100%; }
}
@media screen and (min-width:721px) and (max-width:1100px) {
  .app #costsView .budget-column-head { display:none!important; }
  .app #costsView .cost-card { grid-template-columns:minmax(0,1fr) auto!important; grid-template-areas:'camp amount' 'week status' 'edit edit'!important; }
  .app #costsView .cost-card > .cost-card-main { grid-area:camp!important; }
  .app #costsView .cost-card > .cost-card-amount { grid-area:amount!important; }
  .app #costsView .cost-card > .budget-week { grid-area:week!important; }
  .app #costsView .cost-card > .pill { grid-area:status!important; justify-self:end; }
  .app #costsView .cost-card > .budget-review-button { grid-area:edit!important; justify-self:start; }
}
@media screen and (max-width:1000px) {
  .app #campsView .camps-list.directory { grid-template-columns:minmax(0,1fr)!important; }
}
@media screen and (max-width:720px) {
  .app .plan-add { margin-left:0; }
  .app #sharingView .share-access-form-row { grid-template-columns:minmax(0,1fr)!important; }
  .app #sharingView .share-access-guide { grid-template-columns:minmax(0,1fr); }
  .app #costsView .cost-stat strong { font-size:24px!important; }
  .app #costsView .cost-stat span { font-size:12px!important; }
  .app #costsView .budget-filters { width:100%; }
  .app #costsView .budget-filters button { padding:8px 7px; font-size:12px; }
  .new-plan-chooser .dialog-grid { grid-template-columns:minmax(0,1fr); }
}
/* A paper-sized preview may scroll inside its region without widening the app. */
@media screen {
  .app #printPreviewList { width:100%; max-width:100%; min-width:0; overflow-x:auto; }
}

/* Sign-in on wide screens: copy and buttons on the left, the video beside them. */
@media screen and (min-width:1101px) {
  .app .auth-gate { display:grid; grid-template-columns:minmax(0,500px) minmax(0,1fr); column-gap:56px; align-content:start; max-width:1320px; margin:0; padding-top:72px; }
  .app .auth-gate > :not(.auth-gate-video) { grid-column:1; }
  .app .auth-gate-video { grid-column:2; grid-row:1 / span 5; align-self:center; max-width:none; margin-top:0; }
}

/* Camp website links use the screen accent instead of the browser's default blue. */
@media screen {
  .app #campsView .camp-meta a { color:var(--brand); font-weight:700; text-underline-offset:2px; }
}

/* Phone pass (Nov 2026): alignment, toolbar order and denser summaries. Layout only. */
@media screen and (max-width:720px) {
  /* The kid picker lines up with page content instead of touching the left edge. */
  html[data-mobile-shell="true"] .app > header .header-inner { width:100%!important; margin:0!important; padding:12px 28px 0!important; box-sizing:border-box; }
  html[data-mobile-shell="true"] .app > header #kidFilter { width:100%; }

  /* Plan toolbar: picker + add on one row, the two tools side by side, Full site as a quiet link. */
  html[data-mobile-shell="true"] .app .plan-tools { display:grid!important; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:10px; align-items:end; }
  html[data-mobile-shell="true"] .app .plan-tools > label { grid-column:1; min-width:0; }
  html[data-mobile-shell="true"] .app .plan-tools > label select { width:100%; }
  html[data-mobile-shell="true"] .app .plan-workspace-label { grid-column:1 / -1; order:-1; min-height:0!important; height:auto; padding:0!important; margin:0 0 -4px; font-size:13px; line-height:1.3; }
  html[data-mobile-shell="true"] .app .plan-tools .plan-add { grid-column:2; width:100%; }
  html[data-mobile-shell="true"] .app .plan-tools .plan-gap-filter,
  html[data-mobile-shell="true"] .app .plan-tools .plan-export { width:100%; min-width:0; padding-inline:8px; }
  html[data-mobile-shell="true"] .app .plan-tools .plan-full-site { grid-column:1 / -1; justify-self:start; min-height:36px; padding:6px 0; border:0; background:none; color:var(--muted); font-weight:700; text-decoration:underline; }

  /* Budget: the three totals share one row; Edit sits beside the quick action instead of below it. */
  html[data-mobile-shell="true"] .app #costsView .cost-summary { grid-template-columns:repeat(3,minmax(0,1fr))!important; gap:12px!important; }
  html[data-mobile-shell="true"] .app #costsView .cost-stat { min-width:0; padding:10px 0!important; display:flex; flex-direction:column; justify-content:space-between; gap:6px; }
  html[data-mobile-shell="true"] .app #costsView .cost-stat strong { font-size:21px!important; letter-spacing:-.4px; }
  html[data-mobile-shell="true"] .app #costsView .cost-card { grid-template-areas:'camp amount' 'week status' 'week edit'!important; }
  html[data-mobile-shell="true"] .app #costsView .cost-card > .budget-review-button { justify-self:end!important; align-self:end; }

  /* Camps: a comfortable tap target for the website link. */
  html[data-mobile-shell="true"] .app #campsView .camp-meta a { display:inline-block; padding:6px 0; }
}

/* First visit (Nov 2026): new-account welcome, refreshed setup dialog and the Plan welcome note. */
@media screen {
  .app #homeView .home-grid { display:block!important; max-width:none; margin:0; padding:0; border:0!important; }
  .app #homeView .home-welcome { max-width:640px; padding:56px 0 40px; }
  .app #homeView .home-welcome-lines { display:flex; gap:9px; margin-bottom:26px; }
  .app #homeView .home-welcome-lines i, #onboardingDialog .onboarding-lines i { width:9px; height:54px; border-radius:6px; background:#1264dc; }
  .app #homeView .home-welcome-lines i:nth-child(2), #onboardingDialog .onboarding-lines i:nth-child(2) { background:#00857e; }
  .app #homeView .home-welcome-lines i:nth-child(3), #onboardingDialog .onboarding-lines i:nth-child(3) { background:#c91583; }
  .app #homeView .home-welcome-lines i:nth-child(4), #onboardingDialog .onboarding-lines i:nth-child(4) { background:#783ec6; }
  .app #homeView .home-welcome-lines i:nth-child(5), #onboardingDialog .onboarding-lines i:nth-child(5) { background:#f2c230; }
  .app #homeView .home-welcome-lines i:nth-child(6), #onboardingDialog .onboarding-lines i:nth-child(6) { background:#287d3b; }
  .app #homeView .home-welcome h2 { font-size:56px; line-height:1.04; font-weight:900; letter-spacing:-2px; margin:0; color:var(--text); }
  .app #homeView .home-welcome h2 span { color:#1264dc; }
  .app #homeView .home-welcome p { margin:18px 0 28px; max-width:540px; color:var(--muted); font-size:17px; line-height:1.65; }
  .app #homeView .home-welcome-start { min-height:52px; padding:12px 30px; font-size:17px; }
  .app #homeView .home-welcome-steps { display:flex; flex-wrap:wrap; gap:10px 28px; margin:32px 0 0; padding:20px 0 0; border-top:1px solid var(--line); list-style:none; counter-reset:welcome; color:var(--muted); font-size:14px; font-weight:700; }
  .app #homeView .home-welcome-steps li { counter-increment:welcome; display:flex; align-items:center; gap:9px; }
  .app #homeView .home-welcome-steps li::before { content:counter(welcome); display:inline-grid; place-items:center; width:24px; height:24px; border-radius:50%; background:var(--surface-soft); color:var(--text); font-size:12px; }

  #onboardingDialog .onboarding-brand { grid-template-columns:auto minmax(0,1fr); background:#fff; }
  #onboardingDialog .onboarding-lines { display:flex; gap:6px; }
  #onboardingDialog .onboarding-lines i { width:7px; height:40px; }
  #onboardingDialog .onboarding-brand h3 { font-family:inherit; font-weight:900; letter-spacing:-.5px; }
  #onboardingDialog .onboarding-step { margin:0; padding:0; font-size:15px; font-weight:800; color:var(--text); }
  #onboardingDialog .onboarding-kid-row { grid-template-columns:minmax(0,1fr) auto; border-radius:8px; }
  #onboardingDialog .onboarding-kid-dates { grid-column:1 / -1; }
  #onboardingDialog .onboarding-kid-dates summary { cursor:pointer; color:var(--brand); font-size:14px; font-weight:700; width:max-content; max-width:100%; }
  #onboardingDialog .onboarding-kid-dates[open] summary { margin-bottom:12px; }
  #onboardingDialog .onboarding-dates { margin:6px 0 0; padding:16px 0 0; border:0; border-top:1px solid var(--line); display:grid; gap:12px; min-width:0; }
  #onboardingDialog .onboarding-dates-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
  #onboardingDialog .onboarding-hint { margin:0; color:var(--muted); font-size:13px; line-height:1.5; }
  #onboardingDialog #addOnboardingKidButton { justify-self:start; }

  .app #scheduleView .plan-welcome-note { display:flex; align-items:center; justify-content:space-between; gap:16px 24px; flex-wrap:wrap; margin:0 0 22px; padding:18px 20px; border-left:4px solid #1264dc; border-radius:8px; background:var(--surface-soft); }
  .app #scheduleView .plan-welcome-note[hidden] { display:none; }
  .app #scheduleView .plan-welcome-note strong { display:block; font-size:17px; font-weight:800; color:var(--text); }
  .app #scheduleView .plan-welcome-note span { display:block; margin-top:4px; color:var(--muted); font-size:14px; }
  .app #scheduleView .plan-welcome-actions { display:flex; flex-wrap:wrap; gap:10px; }
}
@media screen and (max-width:720px) {
  .app #homeView .home-welcome { padding:28px 0 24px; }
  .app #homeView .home-welcome h2 { font-size:38px; letter-spacing:-1.2px; }
  .app #homeView .home-welcome-lines { gap:7px; margin-bottom:18px; }
  .app #homeView .home-welcome-lines i { width:7px; height:36px; }
  .app #homeView .home-welcome-start { width:100%; }
  .app #homeView .home-welcome-steps { flex-direction:column; gap:12px; }
  #onboardingDialog .onboarding-dates-grid { grid-template-columns:minmax(0,1fr); }
  #onboardingDialog .onboarding-brand { grid-template-columns:auto minmax(0,1fr); }
  .app #scheduleView .plan-welcome-actions, .app #scheduleView .plan-welcome-actions .button { width:100%; }
}

/* Account → Delete account (Nov 2026). */
#authDialog .delete-account { margin-top:18px; padding-top:14px; border-top:1px solid var(--line); }
#authDialog .delete-account summary { cursor:pointer; color:#c52f40; font-weight:800; font-size:14px; width:max-content; }
#authDialog .delete-account[open] summary { margin-bottom:10px; }
#authDialog .delete-account p { font-size:14px; line-height:1.55; margin:0 0 10px; }
#authDialog .delete-account .field { display:grid; gap:6px; margin:10px 0; }
#authDialog .delete-account-actions { justify-content:flex-start; margin:6px 0 0; }
