:root {
  --cream: #faf6ec;
  --paper: #fffdf7;
  --ink: #303d2d;
  --muted: #707666;
  --terra: #b85131;
  --terra-dark: #934027;
  --peach: #f7e3cf;
  --sage: #e5e8ce;
  --line: #e4dfd1;
  --focus: #47745b;
  color: var(--ink);
  background: var(--cream);
  font-family: ui-rounded, 'Avenir Next', 'Trebuchet MS', system-ui, sans-serif;
  font-size: 15px;
  font-synthesis: none;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; color: inherit; border: 0; background: none; }
button, a { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
button:disabled { opacity: .48; cursor: not-allowed; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
input, select, textarea { color: var(--ink); }
a { color: var(--terra); text-underline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(1.8rem, 3vw, 2.55rem); line-height: 1.15; letter-spacing: -.045em; font-weight: 750; }
h2 { font-size: 1.3rem; line-height: 1.3; letter-spacing: -.025em; }
h3 { font-size: 1rem; line-height: 1.35; }
p { line-height: 1.55; }
em { color: var(--terra); font-style: normal; }
small { font-size: .76rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* The main task is a small app canvas. Lists retain natural document scrolling. */
.site-shell { width: min(1180px, 100%); margin: 0 auto; padding: 0 32px; }
header { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); }
.brand { padding: 8px 0; display: flex; align-items: center; gap: 7px; white-space: nowrap; font-size: 1.6rem; font-weight: 800; letter-spacing: -.065em; }
.brand-sun { font-size: 1.6rem; color: #cc9c39; line-height: 1; }
.header-motto { color: var(--terra); font-family: 'Bradley Hand', 'Segoe Print', cursive; font-size: 1rem; }
nav { display: flex; align-items: center; gap: 3px; }
.nav-link { padding: 9px 12px; border-radius: 22px; font-size: .8rem; white-space: nowrap; color: var(--muted); }
.nav-link.selected { background: var(--peach); color: var(--terra-dark); font-weight: 650; }
.nav-link:hover:not(.selected) { background: #efeadf; }
.header-right { display: flex; align-items: center; gap: 13px; }
.language { display: flex; padding: 3px; gap: 2px; border-radius: 22px; background: #f0ebdf; }
.language button { min-width: 33px; min-height: 31px; padding: 5px 7px; border-radius: 18px; font-size: .7rem; font-weight: 700; color: var(--muted); }
.language .chosen { background: var(--paper); color: var(--ink); box-shadow: 0 2px 5px #413b1a08; }
.profile-button { display: flex; align-items: center; gap: 7px; font-size: .74rem; white-space: nowrap; padding: 0; }
.tiny-avatar { width: 30px; height: 30px; object-fit: cover; border-radius: 50%; background: var(--peach); }
.icon-button { min-width: 34px; min-height: 34px; border-radius: 50%; background: #eee9dc; font-size: 1.3rem; display: inline-grid; place-items: center; flex-shrink: 0; }
.demo-bar { height: 25px; padding: 4px 24px; display: flex; justify-content: center; gap: 20px; align-items: center; background: #e9e8d6; color: #5d664c; font-size: .65rem; }
.demo-bar button { padding: 0; font-size: .65rem; text-decoration: underline; text-underline-offset: 2px; }
main { padding: 25px 0 35px; min-width: 0; }
footer { min-height: 36px; display: flex; justify-content: center; align-items: center; gap: 9px; font-size: .65rem; color: #818674; border-top: 1px solid var(--line); }
footer span { color: #bd9c75; }
body.app-fit { height: 100dvh; overflow: hidden; }
.app-fit #app { height: 100%; min-height: 0; display: flex; flex-direction: column; }
.app-fit .site-shell { flex: 1; min-height: 0; display: grid; grid-template-rows: 64px minmax(0, 1fr) 28px; }
.app-fit header { min-height: 0; }
.app-fit main { min-height: 0; overflow: hidden; padding: 18px 0 16px; }
.app-fit footer { min-height: 0; }
.page-heading { margin: 0 0 24px; }
.page-heading p { font-size: .9rem; color: var(--muted); margin-top: 8px; }

/* Centered selection stays completely visible at laptop sizes, including 20 people. */
.compact-home { height: 100%; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 15px; max-width: 960px; margin: 0 auto; }
.home-heading { display: flex; justify-content: space-between; gap: 24px; align-items: center; width: 100%; }
.home-heading .page-heading { margin: 0; }
.home-heading h1 { font-size: 2.25rem; }
.home-heading p { margin-top: 5px; font-size: .85rem; }
.role-filter { display: flex; gap: 3px; background: #efeadf; border-radius: 24px; padding: 4px; flex-shrink: 0; }
.role-filter button { padding: 8px 12px; border-radius: 20px; font-size: .73rem; white-space: nowrap; color: var(--muted); }
.role-filter .chosen { background: var(--paper); color: var(--ink); font-weight: 650; }
.choose-title { font-size: 1rem; font-weight: 600; text-align: center; margin: 3px 0 0; }
.people-grid { display: flex; flex-wrap: wrap; gap: 12px 18px; justify-content: center; margin: 0 auto; max-width: 100%; }
.density-small { width: 654px; }
.density-eight { width: 614px; }
.density-twelve { width: 810px; }
.density-twenty { width: 630px; gap: 8px 15px; }
.person-tile { position: relative; min-width: 0; width: 150px; flex: 0 0 auto; }
.density-eight .person-tile { width: 140px; }
.density-twelve .person-tile { width: 120px; }
.density-twenty .person-tile { width: 114px; }
.person-card { display: flex; flex-direction: column; align-items: center; width: 100%; padding: 8px 8px 7px; border-radius: 19px; transition: background .18s, transform .18s; }
.person-card:hover:not(:disabled) { background: #f0ead9; transform: translateY(-3px); }
.avatar-image { display: block; width: 126px; height: 126px; object-fit: cover; border-radius: 23px; border: 1px solid #d8d9c4; background: var(--sage); box-shadow: 0 5px 12px #65533308; }
.person-name { display: block; font-size: 1rem; font-weight: 700; margin-top: 8px; line-height: 1.3; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person-card small { display: block; color: var(--muted); font-size: .68rem; line-height: 1.3; margin-top: 3px; max-width: 100%; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.edit-avatar { position: absolute; top: 99px; right: 3px; width: 28px; height: 28px; background: var(--paper); border: 1px solid var(--line); border-radius: 50%; display: grid; place-items: center; color: var(--terra); box-shadow: 0 3px 8px #403c2510; opacity: .85; font-size: .8rem; }
.person-tile:hover .edit-avatar { opacity: 1; }
.density-eight .avatar-image { width: 108px; height: 108px; border-radius: 20px; }
.density-eight .edit-avatar { top: 83px; right: 8px; }
.density-twelve .avatar-image { width: 86px; height: 86px; border-radius: 18px; }
.density-twelve .edit-avatar { top: 62px; right: 6px; width: 25px; height: 25px; }
.density-twenty .person-card { padding: 3px 7px; }
.density-twenty .avatar-image { width: 62px; height: 62px; border-radius: 15px; }
.density-twenty .person-name { font-size: .85rem; margin-top: 5px; }
.density-twenty .person-card small { font-size: .61rem; margin-top: 1px; }
.density-twenty .edit-avatar { top: 44px; right: 15px; width: 23px; height: 23px; font-size: .7rem; }
.handover-strip { width: min(100%, 620px); display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 12px 18px; border: 1px solid #dfd8c4; border-radius: 13px; background: #f3ead8; color: #6c674f; font-size: .78rem; margin-top: 5px; }
.handover-strip>span:first-child { font-weight: 650; color: var(--ink); }
.handover-strip b { margin-left: 12px; color: var(--terra); }
.personal-note { font-size: .72rem; color: var(--muted); text-align: center; }

/* Compact writing flow; actions remain fixed within the canvas. */
.wizard { max-width: 920px; height: 100%; min-height: 0; margin: 0 auto; display: grid; grid-template-rows: auto auto auto minmax(0, 1fr) auto; }
.wizard-top { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 0 12px; }
.text-button { padding: 6px 0; color: var(--terra); font-size: .79rem; text-underline-offset: 3px; }
.text-button:hover { text-decoration: underline; }
.person-chip { display: flex; align-items: center; gap: 8px; font-size: .83rem; font-weight: 600; }
.person-chip small { color: var(--muted); font-weight: 400; margin-left: 4px; }
.stepper { list-style: none; padding: 0; margin: 0 0 18px; display: flex; }
.stepper li { flex: 1; position: relative; min-width: 0; }
.stepper li:not(:last-child):after { content: ''; position: absolute; height: 1px; background: var(--line); top: 14px; left: calc(50% + 21px); right: calc(-50% + 21px); }
.stepper button { display: flex; flex-direction: column; align-items: center; gap: 5px; width: 100%; padding: 0 3px; }
.stepper button>span { display: grid; place-items: center; width: 29px; height: 29px; font-size: .75rem; border-radius: 50%; background: #ede8db; color: #828374; font-weight: 650; }
.stepper small { color: var(--muted); font-size: .69rem; line-height: 1.25; }
.stepper .current button>span { background: var(--terra); color: var(--paper); box-shadow: 0 0 0 3px #f6e5d3; }
.stepper .current small { color: var(--terra); font-weight: 650; }
.stepper .passed button>span { background: var(--sage); color: #61704d; }
.wizard-heading { margin-bottom: 18px; }
.wizard-heading h1 { font-size: 2rem; outline: none; }
.wizard-heading p { font-size: .84rem; color: var(--muted); margin-top: 7px; }
.wizard-body { min-height: 0; overflow: auto; overscroll-behavior: contain; scrollbar-gutter: stable; padding: 1px 3px 4px 1px; }
.slide-next { animation: next-step .28s cubic-bezier(.2,.7,.3,1) both; }
.slide-prev { animation: previous-step .28s cubic-bezier(.2,.7,.3,1) both; }
@keyframes next-step { from { opacity: .25; transform: translateX(30px); } to { opacity: 1; transform: translateX(0); } }
@keyframes previous-step { from { opacity: .25; transform: translateX(-30px); } to { opacity: 1; transform: translateX(0); } }
.field { display: flex; flex-direction: column; gap: 6px; margin: 0 0 15px; min-width: 0; }
.field>span { font-weight: 600; font-size: .79rem; }
.field small { color: var(--muted); font-weight: 400; font-size: .73rem; line-height: 1.4; }
input, select, textarea { width: 100%; background: var(--paper); border: 1px solid #d8d5c7; border-radius: 10px; padding: 10px 12px; min-height: 41px; font-size: .88rem; }
input::placeholder, textarea::placeholder { color: #96988a; }
textarea { resize: vertical; line-height: 1.6; min-height: 75px; }
.wizard-body textarea { max-height: 180px; }
.wizard-body textarea[rows='6'] { height: 185px; }
.wizard-body textarea[rows='5'] { height: 155px; }
.wizard-body textarea[rows='4'] { height: 125px; }
.wizard-body textarea[rows='2'] { height: 75px; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.field-row>.field { margin-bottom: 15px; }
input[type='checkbox'] { width: 18px; height: 18px; min-height: 18px; accent-color: var(--terra); flex-shrink: 0; }
.checkbox-row { display: flex; align-items: flex-start; gap: 10px; font-size: .79rem; line-height: 1.5; }
.checkbox-row input { margin-top: 2px; }
.wizard-actions { display: flex; align-items: center; justify-content: space-between; gap: 20px; border-top: 1px solid var(--line); padding-top: 14px; margin-top: 12px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 43px; padding: 11px 23px; border-radius: 24px; font-size: .83rem; font-weight: 650; text-decoration: none; transition: background .18s, transform .18s; }
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button.primary { background: var(--terra); color: var(--paper); }
.button.primary:hover { background: var(--terra-dark); }
.button.secondary { background: #eee9db; color: var(--ink); }
.save-area { display: flex; align-items: center; gap: 18px; font-size: .7rem; color: var(--muted); }
.skip-link { color: var(--terra); font-size: .72rem; padding: 8px 0; text-decoration: underline; text-underline-offset: 3px; }
.care-block { margin-bottom: 17px; }
.care-block h3 { margin-bottom: 10px; font-size: .85rem; }
.option-group { display: flex; flex-wrap: wrap; gap: 8px; }
.option { padding: 9px 15px; min-height: 39px; border-radius: 11px; background: var(--paper); border: 1px solid var(--line); font-size: .79rem; }
.option.chosen { background: var(--sage); border-color: #a8b18c; font-weight: 650; }
.food-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(180px, 1fr); gap: 24px; align-items: start; }
.measurement-note { font-size: .79rem; padding: 12px 16px; border-radius: 12px; background: var(--sage); margin-bottom: 18px; color: #626c50; }
.measurement-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 18px; }
.med-counter { display: flex; align-items: center; justify-content: space-between; gap: 15px; font-size: .75rem; color: var(--muted); margin-bottom: 14px; }
.med-counter>div { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.med-dot { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 50%; background: #ece7d9; font-size: .7rem; }
.med-dot.recorded { background: var(--sage); }
.med-dot.chosen { background: var(--terra); color: var(--paper); }
.med-row { border: 1px solid var(--line); background: var(--paper); border-radius: 17px; padding: 20px; margin-bottom: 12px; }
.med-name { display: flex; align-items: center; gap: 13px; margin-bottom: 20px; }
.med-name h3 { font-size: 1rem; margin-bottom: 5px; overflow-wrap: anywhere; }
.med-name p { color: var(--muted); font-size: .78rem; overflow-wrap: anywhere; }
.small-icon { display: grid; place-items: center; min-width: 39px; width: 39px; height: 39px; background: var(--peach); border-radius: 12px; color: var(--terra); font-size: 1.3rem; }
.med-fields { display: flex; gap: 16px; flex-wrap: wrap; }
.med-fields>.field { flex: 1; min-width: 130px; margin-bottom: 0; }
.med-fields>.grow { flex: 2; }
.soft-tip { font-size: .74rem; color: var(--muted); line-height: 1.6; }
.review-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.review-summary { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.report-meta { display: flex; flex-wrap: wrap; gap: 9px 14px; color: var(--terra); font-size: .75rem; margin-bottom: 14px; }
.report-meta>span:not(:last-child):after { content: '·'; margin-left: 14px; color: #aaa48d; }
.report-narrative { white-space: pre-wrap; font-size: .88rem; line-height: 1.65; overflow-wrap: anywhere; margin-bottom: 18px; }
.therapy-meta { font-size: .76rem; color: var(--muted); margin-bottom: 12px; }
.summary-sections { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.summary-sections h3 { color: var(--terra); font-size: .8rem; margin-bottom: 8px; }
.summary-sections p, .report-note p { font-size: .77rem; line-height: 1.6; margin-bottom: 6px; white-space: pre-wrap; overflow-wrap: anywhere; }
.med-summary { font-size: .75rem; line-height: 1.6; padding-left: 16px; margin: 0; }
.med-summary li { margin-bottom: 7px; overflow-wrap: anywhere; }
.values-list { display: grid; grid-template-columns: 1fr 1fr; gap: 7px 10px; font-size: .73rem; }
.values-list>span { color: var(--muted); }
.values-list strong { font-weight: 500; }
.report-note { border-top: 1px solid var(--line); margin-top: 15px; padding-top: 15px; }
.report-note h3 { font-size: .8rem; color: var(--terra); margin-bottom: 7px; }
.shift-selection-note { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 12px; margin: -4px 0 13px; font-size: .74rem; color: var(--muted); line-height: 1.5; }
.shift-selection-note strong { color: #586747; font-weight: 600; }
.shift-selection-note .text-button { padding: 1px 0; font-size: .73rem; }
.shift-warning { color: #a1472f; font-size: .77rem; line-height: 1.5; margin: 0 0 12px; }
.shift-selection-note .shift-warning { flex-basis: 100%; margin: 0; }
.shift-report-timing { font-size: .74rem; color: var(--muted); margin: -3px 0 13px; line-height: 1.5; }
.thanks { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 20px; }
.thanks-flower { font-size: 4rem; line-height: 1; }
.thanks h1 { font-size: 2.8rem; }
.thanks p { color: var(--muted); font-size: .95rem; max-width: 500px; }
.thanks-actions { display: flex; justify-content: center; gap: 12px; margin-top: 5px; }

/* Reading and administration remain normal, scrollable pages. */
.tabs { display: flex; gap: 8px; border-bottom: 1px solid var(--line); margin-bottom: 22px; flex-wrap: wrap; }
.tabs button { padding: 10px 14px 13px; color: var(--muted); border-bottom: 2px solid transparent; font-size: .8rem; }
.tabs button.selected { color: var(--terra); border-bottom-color: var(--terra); font-weight: 650; }
.highlight-card { display: flex; align-items: center; gap: 20px; border: 1px solid #e5dbc4; background: #f4ecda; border-radius: 17px; padding: 20px; margin-bottom: 16px; }
.highlight-card>span { font-size: 2rem; color: #bd9554; }
.highlight-card>div { flex: 1; min-width: 0; }
.highlight-card p { font-size: .9rem; white-space: pre-wrap; overflow-wrap: anywhere; margin-bottom: 9px; }
.highlight-card small { color: var(--muted); }
.empty-state { grid-column: 1 / -1; padding: 36px 20px; text-align: center; color: var(--muted); }
.empty-state>span { display: block; font-size: 2.2rem; color: #a2ad7e; margin-bottom: 15px; }
.empty-state h3 { color: var(--ink); font-size: 1rem; margin-bottom: 9px; }
.empty-state p { font-size: .85rem; }
.history-filters { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.history-filters .field>span { font-size: .72rem; }
.history-filters input, .history-filters select { font-size: .8rem; min-width: 0; padding: 10px; }
.reports-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px; }
.report-card { background: var(--paper); padding: 21px; border: 1px solid var(--line); border-radius: 17px; text-align: left; transition: transform .18s; min-width: 0; }
.report-card:hover { transform: translateY(-2px); }
.report-card-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; font-size: .75rem; color: var(--muted); }
.shift-badge { padding: 5px 10px; background: var(--sage); color: #5d684a; border-radius: 20px; font-size: .68rem; }
.report-card>p { font-size: .87rem; line-height: 1.65; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-wrap; overflow-wrap: anywhere; margin-bottom: 17px; }
.report-card-bottom { border-top: 1px solid var(--line); padding-top: 14px; display: flex; justify-content: space-between; gap: 15px; font-size: .74rem; }
.report-card-bottom>span { color: var(--terra); }
.contact-tools { display: flex; align-items: center; gap: 20px; margin-bottom: 22px; flex-wrap: wrap; }
.contact-tools .tabs { margin: 0; flex: 1; }
.contact-tools .field { margin: 0; width: 210px; }
.contact-tools .button { font-size: .78rem; }
.contacts-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.contact-card { border: 1px solid var(--line); border-radius: 18px; background: var(--paper); padding: 23px; overflow-wrap: anywhere; }
.contact-kind { display: block; font-size: .67rem; color: var(--terra); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 13px; }
.contact-card h2 { font-size: 1.2rem; margin-bottom: 5px; }
.contact-card .contact-category { font-size: .76rem; margin: 0 0 17px; color: var(--muted); }
.contact-card>p:not(.contact-category) { font-size: .82rem; color: var(--muted); margin: 16px 0 12px; white-space: pre-wrap; }
.phone-link, .website-link { display: block; text-decoration: none; font-size: .87rem; margin: 9px 0; }
.website-link { font-size: .75rem; }
.admin-list { margin-bottom: 22px; }
.admin-row { display: flex; align-items: center; gap: 17px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.list-avatar { width: 43px; height: 43px; border-radius: 13px; object-fit: cover; background: var(--sage); flex-shrink: 0; }
.admin-symbol { width: 43px; height: 43px; display: grid; place-items: center; background: var(--sage); border-radius: 13px; font-size: 1.35rem; }
.admin-row>div { flex: 1; min-width: 0; }
.admin-row strong { font-size: .9rem; }
.admin-row p { font-size: .75rem; color: var(--muted); margin-top: 4px; overflow-wrap: anywhere; }
.export-section { max-width: 760px; padding: 8px 0 30px; }
.export-section h2 { margin-bottom: 13px; }
.export-section>p { font-size: .86rem; color: var(--muted); }
.export-actions { display: flex; flex-wrap: wrap; gap: 13px; margin: 24px 0 20px; }
.shift-admin-heading { display: flex; justify-content: space-between; gap: 25px; align-items: flex-start; margin-bottom: 18px; }
.shift-admin-heading>p { max-width: 680px; font-size: .83rem; color: var(--muted); line-height: 1.65; }
.shift-admin-heading>.button { flex-shrink: 0; }
.shift-admin-list { border-top: 1px solid var(--line); }
.shift-admin-row { display: grid; grid-template-columns: minmax(180px, 1.2fr) minmax(200px, 1.2fr) 105px minmax(145px, .8fr); gap: 18px; align-items: center; padding: 19px 5px; border-bottom: 1px solid var(--line); }
.shift-admin-name { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.shift-admin-name strong { font-size: .94rem; overflow-wrap: anywhere; }
.shift-admin-name small { color: var(--muted); font-size: .77rem; overflow-wrap: anywhere; }
.shift-admin-time { display: flex; flex-direction: column; gap: 5px; }
.shift-admin-time span { color: var(--muted); font-size: .78rem; }
.shift-admin-time strong { font-weight: 500; font-size: .84rem; }
.shift-state { justify-self: start; font-size: .68rem; color: var(--muted); border-radius: 18px; background: #eee9dc; padding: 6px 10px; }
.shift-state.active { background: var(--sage); color: #566445; }
.shift-row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 18px; }
.shift-admin-row.archived .shift-admin-name { opacity: .7; }
.shift-modal { max-width: 600px; }
.shift-duration-fields { padding: 14px 0 0; border: 0; border-top: 1px solid var(--line); margin: 5px 0 15px; }
.shift-duration-fields legend { font-size: .8rem; font-weight: 650; padding-right: 10px; }
.shift-duration-fields .field { margin-bottom: 9px; }
.shift-editor-preview { padding: 12px 15px; background: var(--sage); border-radius: 11px; color: #566445; font-size: .82rem; line-height: 1.6; }
.history-filters.with-shifts { grid-template-columns: 1.5fr repeat(5, minmax(0, 1fr)); }
.shift-badge { overflow-wrap: anywhere; max-width: 60%; }
.gate { max-width: 510px; margin: 12px auto 20px; }
.gate .page-heading h1 { font-size: 2.1rem; }
.gate .page-heading p { font-size: .88rem; }
.gate form { border: 1px solid var(--line); border-radius: 19px; padding: 24px; background: var(--paper); }
.gate form .button { width: 100%; }
.demo-link { display: block; margin: 20px auto; }
#form-error { font-size: .8rem; color: #a33f2e; margin: 10px 0; line-height: 1.5; }

/* Editors and profile library. */
.modal-backdrop { position: fixed; inset: 0; z-index: 20; background: #303a2e66; backdrop-filter: blur(4px); display: flex; justify-content: center; align-items: center; padding: 20px; }
.modal { width: 100%; max-width: 530px; max-height: calc(100dvh - 40px); overflow: auto; background: var(--paper); border-radius: 22px; padding: 25px; box-shadow: 0 20px 70px #2d3c222b; overscroll-behavior: contain; }
.modal-header { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; margin-bottom: 20px; }
.modal-header h2 { font-size: 1.3rem; margin-top: 4px; }
.modal-header p { font-size: .75rem; color: var(--muted); margin-top: 7px; }
.modal-actions { display: flex; gap: 12px; justify-content: flex-end; padding-top: 18px; margin-top: 10px; border-top: 1px solid var(--line); }
.report-modal { max-width: 820px; }
.people-modal { max-width: 610px; }
.avatar-modal { max-width: 720px; padding: 20px; }
.avatar-modal .modal-header { margin-bottom: 16px; }
.avatar-modal .modal-actions { padding-top: 12px; margin-top: 8px; }
.avatar-picker { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 9px; }
.avatar-choice { padding: 4px; border: 2px solid transparent; border-radius: 13px; background: #f4efdf; position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; transition: border-color .15s, background .15s; min-width: 0; }
.avatar-choice:hover { background: var(--peach); }
.avatar-choice.chosen { border-color: var(--terra); background: var(--peach); }
.picker-image { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 8px; background: var(--sage); }
.avatar-choice>span { font-size: .58rem; color: var(--muted); line-height: 1.2; }
.avatar-details { border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin: 0 0 20px; }
.avatar-details summary { font-size: .8rem; color: var(--terra); cursor: pointer; }
.avatar-details .avatar-picker { margin-top: 14px; grid-template-columns: repeat(6, minmax(0, 1fr)); max-height: 320px; overflow: auto; padding: 3px; }
.avatar-selected-label { font-weight: 700; margin-left: 8px; color: var(--ink); }
.account-fields { border: 0; border-top: 1px solid var(--line); margin: 0; padding: 16px 0 0; }
.account-fields legend { padding: 0 8px 0 0; font-size: .82rem; font-weight: 650; }
.account-fields .soft-tip { margin-bottom: 15px; }
.profile-select { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.profile-select>button { display: flex; align-items: center; gap: 10px; padding: 11px; border-radius: 13px; background: #f2eedf; font-size: .85rem; }
#toast { position: fixed; z-index: 30; bottom: 20px; left: 50%; transform: translate(-50%, 12px); max-width: min(90vw, 650px); width: max-content; background: var(--ink); color: var(--paper); padding: 12px 20px; border-radius: 13px; font-size: .8rem; line-height: 1.5; opacity: 0; pointer-events: none; transition: opacity .18s, transform .18s; box-shadow: 0 6px 20px #25321b22; }
#toast.visible { opacity: 1; transform: translate(-50%, 0); }

@media (min-width: 1000px) and (max-height: 760px) {
  .app-fit .site-shell { grid-template-rows: 58px minmax(0, 1fr) 24px; }
  .app-fit main { padding-top: 12px; padding-bottom: 12px; }
  .compact-home { gap: 11px; }
  .home-heading h1 { font-size: 2rem; }
  .home-heading p { font-size: .8rem; }
  .density-eight .avatar-image { width: 96px; height: 96px; }
  .density-eight .edit-avatar { top: 72px; }
  .density-twenty { gap: 6px 15px; }
  .density-twenty .avatar-image { width: 58px; height: 58px; }
  .density-twenty .edit-avatar { top: 40px; }
  .wizard-top { padding-bottom: 9px; }
  .stepper { margin-bottom: 13px; }
  .wizard-heading { margin-bottom: 14px; }
  .wizard-heading h1 { font-size: 1.9rem; }
  .wizard-actions { padding-top: 11px; margin-top: 8px; }
}

@media (max-width: 1080px) {
  .site-shell { padding-left: 24px; padding-right: 24px; }
  header { gap: 12px; }
  .brand { font-size: 1.45rem; }
  .brand-sun { font-size: 1.4rem; }
  .nav-link { font-size: .75rem; padding: 9px 10px; }
  .profile-button>span { display: none; }
  .header-right { gap: 9px; }
  .density-twelve { width: 696px; gap: 12px; }
  .density-twelve .person-tile { width: 106px; }
  .contacts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contact-tools .tabs { flex-basis: 100%; order: 1; }
  .contact-tools .field { flex: 1; order: 2; }
  .contact-tools>.button { order: 3; }
  .shift-admin-row { grid-template-columns: minmax(140px, 1.1fr) minmax(150px, 1.2fr) 90px minmax(130px, .8fr); gap: 13px; }
  .shift-row-actions { gap: 12px; }
}

@media (max-width: 800px) {
  :root { font-size: 14px; }
  body.app-fit { height: auto; min-height: 100dvh; overflow: auto; }
  .app-fit #app { height: auto; min-height: 100dvh; display: flex; }
  .app-fit .site-shell { display: flex; flex-direction: column; min-height: 0; }
  .app-fit main { overflow: visible; flex: 1; padding-top: 22px; padding-bottom: 24px; }
  .app-fit header { min-height: 65px; }
  .app-fit footer { min-height: 35px; }
  header { flex-wrap: wrap; padding: 10px 0 0; gap: 10px 15px; min-height: 70px; }
  .brand { flex: 1; padding-top: 5px; padding-bottom: 8px; }
  .header-right { margin-bottom: 5px; }
  nav { order: 3; flex-basis: 100%; width: 100%; justify-content: space-between; border-top: 1px solid #eee8da; padding: 8px 0; }
  .nav-link { flex: 1; font-size: .78rem; padding: 9px 8px; }
  .header-motto { font-size: .8rem; order: 3; width: 100%; text-align: center; padding: 4px 0 11px; }
  .compact-home { height: auto; gap: 19px; }
  .home-heading { flex-direction: column; gap: 17px; align-items: center; text-align: center; }
  .home-heading h1 { font-size: 2.2rem; }
  .home-heading p { font-size: .85rem; }
  .role-filter button { font-size: .76rem; padding: 9px 14px; }
  .choose-title { margin-top: 2px; }
  .density-small, .density-eight, .density-twelve { width: 574px; }
  .density-small .person-tile, .density-eight .person-tile, .density-twelve .person-tile { width: 130px; }
  .density-twenty { width: 560px; }
  .density-twenty .person-tile { width: 100px; }
  .avatar-image { width: 104px; height: 104px; }
  .edit-avatar { top: 79px; right: 0; }
  .density-twelve .avatar-image { width: 88px; height: 88px; }
  .wizard { height: auto; display: block; }
  .wizard-top { padding-bottom: 17px; }
  .stepper { margin-bottom: 22px; }
  .wizard-heading { margin-bottom: 22px; }
  .wizard-heading h1 { font-size: 1.9rem; }
  .wizard-heading p { font-size: .86rem; }
  .wizard-body { overflow: visible; padding: 0; }
  .wizard-body textarea { max-height: none; }
  .wizard-actions { margin-top: 22px; padding-top: 18px; }
  .save-area { flex-direction: column; gap: 4px; }
  .review-grid { grid-template-columns: 1fr; gap: 22px; }
  .review-summary { padding: 19px; }
  .history-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .history-filters.with-shifts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .reports-grid { gap: 15px; }
  .person-chip small { font-size: .68rem; }
  .avatar-picker { gap: 7px; }
  .thanks { min-height: 400px; }
  .shift-admin-heading { flex-direction: column; gap: 15px; }
  .shift-admin-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 12px 18px; padding: 18px 0; }
  .shift-row-actions { justify-content: flex-start; }
}

@media (max-width: 550px) {
  .site-shell { padding-left: 18px; padding-right: 18px; }
  .demo-bar { padding: 5px 13px; height: auto; min-height: 25px; justify-content: space-between; gap: 10px; font-size: .6rem; }
  .demo-bar button { font-size: .6rem; }
  .brand { font-size: 1.55rem; }
  .brand-sun { font-size: 1.35rem; }
  .language button { min-width: 31px; min-height: 30px; }
  .profile-button .tiny-avatar { width: 29px; height: 29px; }
  .icon-button { min-width: 31px; min-height: 31px; }
  .nav-link { font-size: .72rem; padding: 9px 5px; }
  main { padding-top: 22px; }
  h1 { font-size: 2rem; }
  .page-heading p { font-size: .85rem; }
  .home-heading h1 { font-size: 2.15rem; }
  .home-heading p { font-size: .8rem; }
  .choose-title { font-size: .96rem; }
  .people-grid { width: 100%; gap: 12px 8px; }
  .density-small .person-tile, .density-eight .person-tile, .density-twelve .person-tile { width: calc((100% - 16px) / 3); }
  .density-twenty { gap: 11px 5px; }
  .density-twenty .person-tile { width: calc((100% - 15px) / 4); }
  .person-card { padding: 5px 3px; border-radius: 15px; }
  .avatar-image, .density-eight .avatar-image, .density-twelve .avatar-image { width: min(88px, 100%); height: auto; aspect-ratio: 1; border-radius: 17px; }
  .edit-avatar, .density-eight .edit-avatar, .density-twelve .edit-avatar { top: 65px; right: 0; width: 25px; height: 25px; }
  .person-name { font-size: .88rem; margin-top: 7px; }
  .person-card small { font-size: .63rem; }
  .density-twenty .avatar-image { width: min(61px, 100%); height: auto; }
  .density-twenty .person-name { font-size: .77rem; }
  .density-twenty .person-card small { font-size: .56rem; }
  .density-twenty .edit-avatar { top: 42px; right: 1px; width: 22px; height: 22px; }
  .handover-strip { padding: 13px 14px; font-size: .72rem; gap: 10px; margin-top: 1px; }
  .handover-strip b { margin-left: 5px; }
  .person-chip { font-size: .76rem; gap: 6px; }
  .person-chip small { display: none; }
  .wizard-top .text-button { font-size: .76rem; }
  .stepper button>span { width: 25px; height: 25px; font-size: .7rem; }
  .stepper small { font-size: .53rem; line-height: 1.35; }
  .stepper li:not(:last-child):after { top: 12px; left: calc(50% + 17px); right: calc(-50% + 17px); }
  .stepper button { padding: 0 1px; gap: 7px; }
  .wizard-heading h1 { font-size: 1.8rem; }
  .wizard-heading p { font-size: .82rem; line-height: 1.6; }
  .field-row { gap: 13px; }
  .field { margin-bottom: 17px; }
  .field>span { font-size: .78rem; }
  input, select, textarea { font-size: 16px; padding: 10px 11px; }
  .button { min-height: 44px; padding: 11px 18px; font-size: .81rem; }
  .wizard-actions { gap: 11px; flex-wrap: wrap; }
  .save-area { order: 3; flex-basis: 100%; flex-direction: row; justify-content: center; gap: 20px; margin-top: 2px; }
  .wizard-actions>.button:last-child { margin-left: auto; }
  .option { min-height: 40px; padding: 9px 12px; font-size: .75rem; }
  .option-group { gap: 7px; }
  .food-layout { grid-template-columns: 1fr; gap: 0; }
  .measurement-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 13px; }
  .measurement-note { padding: 12px; font-size: .75rem; line-height: 1.6; }
  .med-row { padding: 17px; }
  .med-name { align-items: flex-start; gap: 10px; }
  .med-name h3 { font-size: .95rem; }
  .med-name p { font-size: .74rem; }
  .med-fields { gap: 14px; }
  .med-fields>.field { flex-basis: 100%; }
  .med-counter { font-size: .72rem; align-items: flex-start; }
  .med-counter>div { gap: 5px; }
  .med-dot { width: 25px; height: 25px; font-size: .68rem; }
  .therapy-notes { grid-template-columns: 1fr; gap: 0; }
  .summary-sections { grid-template-columns: 1fr; gap: 16px; }
  .report-meta { font-size: .71rem; }
  .report-narrative { font-size: .85rem; }
  .values-list { font-size: .76rem; }
  .thanks h1 { font-size: 2.4rem; }
  .thanks p { font-size: .88rem; }
  .thanks-actions { flex-direction: column; width: 100%; max-width: 260px; }
  .highlight-card { gap: 12px; flex-wrap: wrap; padding: 17px; }
  .highlight-card>span { font-size: 1.6rem; }
  .highlight-card .button { margin-left: auto; }
  .highlight-card p { font-size: .85rem; }
  .history-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 11px; }
  .history-filters.with-shifts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .history-filters .search-field { grid-column: 1 / -1; }
  .history-filters input, .history-filters select { font-size: 16px; }
  .reports-grid { grid-template-columns: 1fr; }
  .report-card { padding: 19px; }
  .contact-tools { gap: 13px; }
  .contact-tools .tabs { gap: 1px; justify-content: space-between; }
  .contact-tools .tabs button { font-size: .75rem; padding: 10px 8px; }
  .contact-tools .field { flex-basis: 100%; }
  .contacts-grid { grid-template-columns: 1fr; gap: 16px; }
  .contact-card { padding: 21px; }
  .tabs { gap: 2px; }
  .tabs button { font-size: .75rem; padding: 10px 9px 12px; }
  .admin-row { gap: 11px; flex-wrap: wrap; }
  .admin-row>div { flex-basis: calc(100% - 62px); }
  .admin-row>.text-button { margin-left: 54px; font-size: .75rem; }
  .admin-row>.text-button+.text-button { margin-left: 10px; }
  .export-actions { flex-direction: column; align-items: stretch; }
  .gate form { padding: 21px; }
  .gate .page-heading h1 { font-size: 1.95rem; }
  .modal-backdrop { padding: 12px; }
  .modal { padding: 20px; border-radius: 19px; max-height: calc(100dvh - 24px); }
  .modal-header { margin-bottom: 18px; gap: 12px; }
  .modal-header h2 { font-size: 1.2rem; }
  .modal-header p { font-size: .73rem; line-height: 1.6; }
  .avatar-picker { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
  .avatar-choice { border-radius: 10px; padding: 3px; }
  .avatar-choice>span { font-size: .6rem; }
  .avatar-details .avatar-picker { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .modal-actions { gap: 10px; }
  .modal-actions .button { padding-left: 16px; padding-right: 16px; }
  .profile-select { grid-template-columns: 1fr; }
  .account-fields .field { margin-bottom: 18px; }
}

/* Short displays and enlarged text can scroll instead of losing access to controls. */
@media (min-width: 801px) and (max-height: 590px) {
  body.app-fit { height: auto; min-height: 100dvh; overflow: auto; }
  .app-fit #app { height: auto; min-height: 100dvh; }
  .app-fit .site-shell { display: block; }
  .app-fit header { min-height: 58px; }
  .app-fit main { overflow: visible; }
  .app-fit footer { min-height: 28px; }
  .compact-home { height: auto; padding: 12px 0; }
  .wizard { height: auto; display: block; }
  .wizard-body { overflow: visible; }
}

@media (prefers-reduced-motion: reduce) {
  *, *:before, *:after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
/* One compact editor per medication event. */
.med-event-tabs{display:flex;flex-wrap:wrap;gap:5px;margin:8px 0 10px;max-height:76px;overflow:auto}
.med-event-tabs button{padding:5px 9px;font-size:.76rem;border-radius:12px}
.med-event-tabs button.chosen{background:var(--focus);color:var(--paper)}
.med-needed{align-self:center;font-size:.84rem;white-space:nowrap}
.med-needed input{accent-color:var(--focus)}
.home-drafts{width:100%;background:#e9ecd9;border-radius:18px;padding:12px 15px;box-sizing:border-box}.home-drafts h2{font-size:.86rem;margin:0 0 8px}.home-draft-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(100px,1fr));gap:7px}.home-draft-card{display:flex;align-items:center;gap:7px;min-width:0;background:#fffdf7;border:1px solid #d9dec6;border-radius:12px;padding:7px;text-align:left;cursor:pointer}.home-draft-card .tiny-avatar{width:30px;height:30px;flex-shrink:0}.home-draft-card span{min-width:0}.home-draft-card strong,.home-draft-card small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.home-draft-card strong{font-size:.74rem}.home-draft-card small{font-size:.65rem;color:#66715c;margin-top:2px}.compact-home:has(.home-drafts){gap:10px}.compact-home:has(.home-drafts) .choose-title{margin:0}.compact-home:has(.home-drafts) .people-grid{gap:8px 15px}@media(max-width:600px){.home-draft-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.home-drafts{padding:12px}.home-draft-card strong{font-size:.8rem}}
.gate.gate-welcome{max-width:880px;display:grid;grid-template-columns:1fr 360px;align-items:center;gap:65px;margin:15px auto 20px;min-height:430px}.gate-intro{position:relative;padding:15px 0}.gate-sun{font-size:70px;line-height:1;color:#b85131;display:grid;place-items:center;width:112px;height:112px;background:#f7e3cf;border-radius:46% 54% 50% 43%;margin-bottom:20px}.gate-wordmark{font-size:1.5rem;font-weight:700;letter-spacing:-.04em;margin-bottom:12px}.gate-intro h1{font-size:2.5rem;max-width:350px;margin-bottom:14px}.gate-intro>p:last-of-type{max-width:330px;color:var(--muted);font-size:.95rem}.gate-leaf{display:block;margin-top:20px;font-size:2rem;color:#6a7857}.gate-entry form{padding:24px;border-radius:24px;box-shadow:0 12px 35px #414b3010}.gate-entry h2{font-size:1.2rem;margin-bottom:17px}.gate-entry .field{margin-bottom:13px}.gate-entry .field input,.gate-entry .field select{padding:11px 12px}.gate-access-note{font-size:.73rem;color:var(--muted);line-height:1.5;margin-top:14px}.gate-entry #form-error:empty{display:none}.gate-entry #form-error{max-height:62px;overflow:auto;margin:9px 0}.gate-entry .demo-link{font-size:.72rem;margin:13px auto 0}.screen-login main,.screen-setup main{min-height:0}.screen-login footer,.screen-setup footer{margin-top:10px;padding-bottom:15px}@media(min-width:701px) and (max-height:750px){.gate.gate-welcome{min-height:0;margin:5px auto 10px}.gate-entry form{padding:20px}.gate-entry .field{margin-bottom:10px}.gate-entry h2{margin-bottom:12px}.gate-sun{width:90px;height:90px;font-size:58px;margin-bottom:15px}.gate-intro h1{font-size:2.2rem}.screen-login header,.screen-setup header{min-height:80px}}@media(max-width:700px){.gate.gate-welcome{display:block;max-width:390px;margin:0 auto 20px;min-height:0}.gate-intro{text-align:center;padding:0 0 20px}.gate-sun{width:60px;height:60px;font-size:38px;margin:0 auto 10px}.gate-wordmark{display:none}.gate-intro h1{font-size:1.9rem;margin:0 auto 8px}.gate-intro>p:last-of-type{margin:auto;font-size:.82rem}.gate-leaf{display:none}.gate-entry form{padding:20px}.gate-entry .demo-link{margin:12px auto}.screen-login header .header-motto,.screen-setup header .header-motto{display:none}}
@media(min-width:1000px){.compact-home:has(.home-drafts) .density-twenty{width:800px;gap:6px 12px}.compact-home:has(.home-drafts) .density-twenty .person-tile{width:100px}.compact-home:has(.home-drafts) .density-twenty .avatar-image{width:54px;height:54px}.compact-home:has(.home-drafts) .density-twenty .edit-avatar{top:37px;right:11px}.compact-home:has(.home-drafts) .home-heading h1{font-size:1.85rem}.compact-home:has(.home-drafts) .handover-strip{padding:9px 15px;margin-top:0}}
@media(min-width:900px){.compact-home .density-eight{width:100%;flex-wrap:nowrap;gap:8px}.compact-home .density-eight .person-tile{width:calc((100% - 56px)/8);max-width:115px}.compact-home .density-eight .avatar-image{width:clamp(64px,7vw,96px);height:clamp(64px,7vw,96px);max-width:100%;aspect-ratio:1}.compact-home .density-eight .edit-avatar{top:clamp(46px,5.5vw,72px);right:0}.compact-home:has(.home-drafts){justify-content:center}.compact-home:has(.home-drafts) .home-drafts{padding:9px 12px}.compact-home:has(.home-drafts) .home-draft-card{padding:5px}.compact-home:has(.home-drafts) .home-drafts h2{margin-bottom:6px}}
@media(min-width:900px) and (max-height:650px){.screen-home.app-fit .site-shell{grid-template-rows:54px minmax(0,1fr) 22px}.screen-home.app-fit main{padding-top:8px;padding-bottom:8px}.compact-home{gap:8px}.compact-home .home-heading h1{font-size:1.65rem}.compact-home .home-heading p{font-size:.73rem;margin-top:3px}.compact-home .density-eight .avatar-image{width:68px;height:68px}.compact-home .density-eight .edit-avatar{top:47px;width:22px;height:22px}.compact-home .density-eight .person-name{font-size:.82rem;margin-top:5px}.compact-home .density-eight .person-card{padding:4px}.compact-home .handover-strip{padding:8px 12px;margin-top:0}.compact-home .density-twenty .avatar-image{width:44px;height:44px}.compact-home .density-twenty .edit-avatar{top:29px}.compact-home .density-twenty .person-name{font-size:.75rem;margin-top:3px}.compact-home .density-twenty .person-card small{font-size:.56rem}}
.home-draft-tile{min-width:0;display:flex;align-items:center;background:#fffdf7;border:1px solid #d9dec6;border-radius:12px;overflow:hidden}.home-draft-tile .home-draft-card{border:0;background:transparent;flex:1;min-width:0}.home-draft-delete{flex-shrink:0;color:#934027;font-size:.64rem;padding:8px 6px;border-left:1px solid #e4dfd1}.home-draft-delete:hover{background:#f7e3cf}.home-draft-grid:has(.home-draft-tile){grid-template-columns:repeat(auto-fit,minmax(160px,1fr))}@media(min-width:900px){.home-draft-grid:has(.home-draft-tile){grid-template-columns:repeat(auto-fit,minmax(135px,1fr))}}@media(max-width:600px){.home-draft-grid:has(.home-draft-tile){grid-template-columns:repeat(2,minmax(0,1fr))}.home-draft-delete{font-size:.6rem;padding:8px 5px}}

/* Shared header geometry: changing page must not move the wordmark or account controls. */
html { scrollbar-gutter: stable; }
:root { --app-header-height: 64px; --app-footer-height: 28px; --header-account-width: 242px; }
.site-shell>header {
  display: grid;
  grid-template-columns: 175px minmax(0, 1fr) var(--header-account-width);
  grid-template-rows: 1fr;
  align-items: center;
  justify-content: normal;
  gap: 20px;
  height: var(--app-header-height);
  min-height: var(--app-header-height);
  padding: 0;
}
.site-shell>header>.brand { grid-column: 1; grid-row: 1; justify-self: start; line-height: 1.2; }
.site-shell>header>nav,
.site-shell>header>.header-motto { grid-column: 2; grid-row: 1; justify-self: center; min-width: 0; }
.site-shell>header>.header-right {
  grid-column: 3;
  grid-row: 1;
  justify-self: stretch;
  justify-content: flex-start;
  margin: 0;
  min-width: 0;
}
.app-fit .site-shell,
.screen-home.app-fit .site-shell { grid-template-rows: var(--app-header-height) minmax(0, 1fr) var(--app-footer-height); }
@media (min-width: 801px) and (max-height: 760px) {
  :root { --app-header-height: 58px; --app-footer-height: 24px; }
}
@media (min-width: 801px) and (max-height: 650px) {
  :root { --app-header-height: 54px; --app-footer-height: 22px; }
}
@media (min-width: 801px) and (max-width: 1080px) {
  :root { --header-account-width: 156px; }
  .site-shell>header { grid-template-columns: 158px minmax(0, 1fr) var(--header-account-width); gap: 12px; }
}
@media (min-width: 801px) and (max-width: 960px) {
  .site-shell>header>nav { gap: 1px; }
  .site-shell>header .nav-link { padding-inline: 7px; font-size: .69rem; }
}
@media (max-width: 800px) {
  :root { --app-header-height: 108px; --header-account-width: 148px; }
  .site-shell>header {
    grid-template-columns: minmax(0, 1fr) var(--header-account-width);
    grid-template-rows: 46px 43px;
    column-gap: 10px;
    row-gap: 0;
    padding: 8px 0 10px;
  }
  .site-shell>header>.header-right { grid-column: 2; gap: 9px; }
  .site-shell>header>nav,
  .site-shell>header>.header-motto,
  .screen-login header .header-motto,
  .screen-setup header .header-motto {
    display: flex;
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: stretch;
    justify-content: center;
    align-items: center;
    margin: 0;
    padding: 0;
    width: 100%;
    height: 43px;
    border: 0;
  }
  .site-shell>header>nav { justify-content: space-between; }
  .site-shell>header>.brand { padding: 0; }
}
@media (max-width: 360px) {
  .site-shell>header>.brand { font-size: 1.3rem; gap: 5px; }
  .site-shell>header .brand-sun { font-size: 1.2rem; }
  .site-shell>header .nav-link { font-size: .65rem; padding-inline: 3px; }
}
.report-management{border-top:1px solid var(--line);padding-top:16px;margin-top:18px}.report-management h3{font-size:.9rem;margin-bottom:10px}.report-management-row{display:flex;align-items:end;gap:12px;flex-wrap:wrap}.report-management-row .field{margin:0;max-width:210px}.report-management .report-delete{color:var(--terra-dark);margin-left:auto;padding:12px 0}.report-management-error,#report-management-error{color:#a33f2e;font-size:.8rem;margin-top:9px}.report-submitted{margin-top:15px}
