:root{font-family:system-ui,-apple-system,"Segoe UI",sans-serif;color:#272727;background:#efefef;font-size:16px}
*{box-sizing:border-box}
body{margin:0;height:100dvh;display:flex;flex-direction:column;overflow:hidden}
button,input,select,textarea{font:inherit}
button{cursor:pointer}
button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible{outline:3px solid #4777a6;outline-offset:3px}
.site-header{background:#fff;color:#252525;border-bottom:5px solid #4777a6;padding:1rem clamp(1rem,3vw,2.4rem);display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:1rem;flex:none;z-index:10}
.header-plan{grid-column:2;display:flex;flex-direction:column;align-items:center;gap:.3rem}
.site-header h1{text-align:center}
.site-header > .outline-button{grid-column:3;justify-self:end}
.brand{display:flex;align-items:center;font-size:1.55rem;font-weight:750;line-height:1.1}
.brand small{display:block;font-size:.88rem;font-weight:600;margin-top:.28rem}
.outline-button,.outline-dark,.solid-button{border-radius:.7rem;padding:.65rem .9rem;min-height:44px;font-weight:650}
.outline-button{border:1px solid #3c6b99;background:#4777a6;color:#fff}
.outline-dark{border:1px solid #8eabc5;background:#fff;color:#315b80}
.solid-button{border:1px solid #356692;background:#4777a6;color:#fff}
.text-button{border:0;background:transparent;color:#315f87;text-decoration:underline;padding:.5rem 0}
main{width:100%;max-width:1600px;margin:0 auto;min-height:0;flex:1;overflow-y:auto}
.eyebrow{margin:0 0 .28rem;text-transform:uppercase;letter-spacing:.08em;font-size:.74rem;font-weight:750;color:#4f6c87}
h1{font-size:clamp(1.7rem,2.5vw,2.4rem);margin:0;line-height:1.2}
h2{font-size:1.3rem;margin:0}
.plan{background:#fff;border:1px solid #d5d9dd;box-shadow:0 6px 20px #1c3e5a10;overflow:hidden;height:100%;min-height:0;display:flex;flex-direction:column}
.edit-hint{background:#dceaf6;color:#244a6b;padding:.55rem 1rem;font-weight:700;display:flex;align-items:center;justify-content:space-between;gap:.7rem;flex-wrap:wrap}
.edit-hint[hidden]{display:none}
.history-bar{display:flex;justify-content:center;align-items:center;gap:.45rem}
.history-bar button{min-height:34px;padding:.25rem .55rem;font-size:.78rem}
#jump-today{background:#fff0aa;color:#4a3e18;border-color:#d6be61}
.mobile-date{display:none}
.mobile-date.today{background:#fff0aa;color:#4a3e18;border-radius:.35rem}
.desktop-plan{flex:1;min-height:0;overflow:auto;scrollbar-width:auto;scrollbar-color:#4777a6 #e7eef5;overscroll-behavior:contain}
.desktop-plan table{width:max-content;min-width:100%;border-collapse:separate;border-spacing:0;table-layout:fixed}
.desktop-plan th,.desktop-plan td{padding:.75rem .65rem;text-align:center;border-right:1px solid #e0e5e9;border-bottom:1px solid #e0e5e9;vertical-align:middle}
.desktop-plan th:last-child,.desktop-plan td:last-child{border-right:0}
.desktop-plan thead th{background:#edf3f8;color:#315c7d;font-size:.86rem;position:sticky;top:0;z-index:3}
.desktop-plan th:first-child,.desktop-plan td:first-child{width:145px;min-width:145px;position:sticky;left:0;z-index:2;background:#fff}
.desktop-plan th:last-child,.desktop-plan td:last-child{width:180px;min-width:180px;position:sticky;right:0;z-index:2;background:#fff;box-shadow:-5px 0 10px #173a210e}
.desktop-plan thead th:first-child,.desktop-plan thead th:last-child{background:#edf3f8;z-index:4}
.desktop-plan .day-header,.desktop-plan .day-cell{width:138px;min-width:138px}
.desktop-plan td{height:4.2rem;font-size:.89rem}
.desktop-plan .group-row th{background:#e2ebf3;color:#315c7d;font-size:.87rem;font-weight:750;padding:.48rem .7rem}
.desktop-plan .group-row th{position:static;width:auto;min-width:0}
.desktop-plan .group-row th span{position:sticky;left:1rem}
.dog-name{font-weight:750}
.dog-name.has-photo{height:4.2rem;padding:.3rem;isolation:isolate;overflow:hidden}
.dog-name-photo{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center 40%;z-index:-2}
.has-photo::before{content:"";position:absolute;inset:0;background:#112a3d45;z-index:-1;pointer-events:none}
.has-photo .dog-profile-link{color:#fff;background:#153b5cdd;padding:.3rem .45rem;border-radius:.35rem;text-decoration-color:#fff}
.has-photo .dog-profile-link:hover,.has-photo .dog-profile-link:focus-visible{color:#fff;background:#12344a}
.has-photo .review-mark{color:#fff;background:#153b5cdd;padding:.1rem .25rem;border-radius:.2rem}
.dog-profile-link{appearance:none;border:0;background:transparent;color:#245c8b;text-decoration:underline;text-underline-offset:.18em;font:inherit;font-weight:750;padding:.15rem 0;text-align:left;cursor:pointer}
.dog-profile-link:hover,.dog-profile-link:focus-visible{color:#143e62;outline-offset:3px}
.profile-dialog{width:min(94vw,700px);max-height:90vh;overflow-y:auto}
.profile-header{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin-bottom:1rem}
.profile-photo{display:block;width:100%;max-height:340px;object-fit:contain;background:#edf3f8;border-radius:.5rem}
.profile-status{color:#315c7d;font-weight:700}
.profile-short{font-weight:650;line-height:1.55}
.profile-description p{line-height:1.6;margin:.85rem 0}
.profile-checked{font-size:.82rem;color:#596b77;margin-top:1.4rem}
.profile-source{display:inline-block;color:#245c8b;margin-bottom:.3rem}
.profile-change{margin:.5rem 0;color:#315c7d}
.review-mark{font-size:.76rem;color:#936419;margin-left:.35rem}
.cell{display:flex;align-items:center;justify-content:center;width:100%;border:0;background:transparent;color:inherit;text-align:center;padding:.15rem;min-height:2.6rem;border-radius:.25rem;font-weight:650}
.cell:disabled{cursor:default}
.cell.is-editable:hover,.cell.is-editable:focus-visible{background:#dceaf6;outline:2px solid #4777a6}
.cell .secondary{display:block;font-size:.78rem;font-weight:500;margin-top:.1rem}
.day-today{background:#fff0aa!important;color:#4a3e18!important}
.state-confirmed{background:#dff0e3!important;color:#1c5731!important}
.state-completed{background:#c9e8d0!important;color:#1c5731!important}
.state-requested{background:#fff4d8;color:#704f19}
.state-unneeded,.state-therapy,.state-sick,.state-inactive,.state-unplaced{background:#e4e9e4!important;color:#536557!important}
.state-open{color:#7b8b7d}
.status-icon{width:2.1rem;height:2.1rem;flex:none;display:block}
.status-icon.small{width:1.5rem;height:1.5rem}
.smiley-wrap{display:inline-flex;align-items:center;gap:.3rem;white-space:nowrap}
.smiley-days{font-size:.76rem;font-weight:700}
.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}
.note-cell{font-size:.84rem;color:#405a47;overflow-wrap:anywhere}
.mobile-plan{display:none}
.staff-panel{margin-top:1.3rem;padding:1.3rem;border:1px solid #d5d9dd;border-top:4px solid #4777a6;border-radius:.4rem;background:#fff}
.staff-panel[hidden]{display:none}
.panel-heading{display:flex;align-items:center;justify-content:space-between;gap:1rem}
.staff-panel>p,.simulator p{color:#566a79;line-height:1.5}
.simulator{border-top:1px solid #dbe3e9;padding-top:1rem;margin-top:1rem}
.simulator summary{font-weight:750;cursor:pointer}
.sim-fields{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.8rem;margin:1rem 0}
.group-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.8rem;margin:1rem 0}
.dog-management{display:flex;align-items:end;gap:.7rem;flex-wrap:wrap;margin:1rem 0}
.dog-management label{flex:1 1 260px}
.sim-actions{display:flex;gap:.65rem;flex-wrap:wrap}
label{display:flex;flex-direction:column;gap:.35rem;font-weight:650;font-size:.9rem}
input,select,textarea{width:100%;border:1px solid #9db3c7;border-radius:.6rem;padding:.65rem;color:#272727;background:#fff;min-height:44px}
textarea{resize:vertical}
dialog{border:0;border-radius:1rem;box-shadow:0 24px 70px #18394e55;width:min(92vw,450px);padding:1.5rem;color:#272727}
dialog::backdrop{background:#142c3faa}
dialog form{display:grid;gap:.9rem}
dialog form label[hidden]{display:none}
.dialog-context{margin:0;color:#516c80}
.dialog-actions{display:flex;justify-content:flex-end;gap:.7rem;margin-top:.3rem}
@media(max-width:760px){.desktop-plan{display:none}
.mobile-plan{display:block;flex:1;min-height:0;overflow-y:auto;padding:.8rem}
.header-plan{grid-column:1/-1;grid-row:2;width:100%}
.history-bar{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.35rem;width:100%}
.history-bar button{width:100%;min-height:40px;padding:.25rem;font-size:.8rem}
.mobile-date{display:block;text-align:center;font-size:1rem;font-weight:750;color:#315c7d;background:#edf3f8;padding:.7rem;border-bottom:1px solid #d5d9dd;flex:none}
#older-days{grid-column:1}
#jump-today{grid-column:2}
#newer-days{grid-column:3}
.mobile-group{margin:1rem 0 .35rem;padding:.4rem .1rem;color:#315c7d;font-size:.85rem;font-weight:750}
.dog-card{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:center;gap:.7rem;padding:.75rem .8rem;border-bottom:1px solid #e1e6ea;background:#fff;min-height:62px}
.dog-card.state-confirmed{background:#dff0e3}
.dog-card.state-completed{background:#c9e8d0}
.dog-card.state-requested{background:#fff4d8}
.dog-card.state-unneeded,.dog-card.state-therapy,.dog-card.state-sick,.dog-card.state-inactive,.dog-card.state-unplaced{background:#e4e9e4}
.dog-card-name{font-weight:750}
.dog-name-banner{position:relative;display:flex;align-items:center;justify-content:center;min-height:2rem;text-align:center;isolation:isolate;overflow:hidden;border-radius:.35rem}
.dog-name-banner.has-photo{min-height:3.2rem}
.dog-card-note{display:block;margin-top:.16rem;color:#526b7c;font-size:.76rem;overflow-wrap:anywhere}
.prior-status{display:flex;align-items:center;gap:.3rem;margin-top:.25rem;font-size:.74rem;color:#526b7c}
.dog-card .cell{width:100%;text-align:center;overflow-wrap:anywhere;min-width:0}
.dog-card>div{min-width:0}
.sim-fields{grid-template-columns:repeat(2,minmax(0,1fr))}
.group-fields{grid-template-columns:1fr}
.dog-management button{flex:1 1 140px}
.site-header{padding:.55rem .75rem;gap:.3rem;grid-template-columns:minmax(0,1fr) auto}
.site-header h1{font-size:1.2rem}
.site-header > .outline-button{grid-column:2;grid-row:1}
.brand{font-size:.88rem}
.brand small{font-size:.62rem}
.outline-button{font-size:.75rem;padding:.35rem .5rem}
}
@media(max-width:390px){.sim-fields{grid-template-columns:1fr}
.history-bar button{font-size:.72rem}
}
body[data-remote-loading="true"] main { display: none; }
.connection-status { margin: 1rem; padding: 1rem; border-radius: .6rem; background: #fff3cc; color: #4a3b19; }
