/* Issue #37. Scoped rules keep existing chat composition and document layouts intact. */
body.home-navigation-v1 .app{max-width:480px!important}
body.home-navigation-v1:has(#home:not(.hidden)) header,body.home-navigation-v1:has(#appMenu:not(.hidden)) header,body.home-navigation-v1:has(#recordHub:not(.hidden)) header{display:none}
body.home-navigation-v1:has(#home:not(.hidden)) main{padding:0 20px calc(96px + env(safe-area-inset-bottom))!important}
.home-navigation-v1 #home{padding:0!important}
.home-hero{margin:0 -20px;background:#eeefdc;overflow:hidden}
.home-hero img{display:block;width:100%;height:auto;aspect-ratio:1536/562;object-fit:cover}
.home-welcome{margin:18px 0 0}
.home-welcome p{font-size:13px;line-height:1.65;margin:3px 0;color:#617061}
.home-navigation-v1 #greeting{font-size:15px;font-weight:650;letter-spacing:.01em;color:#3c5843;margin:0 0 4px}
.home-primary-talk{width:100%;position:relative;z-index:2;display:flex;align-items:center;justify-content:space-between;gap:14px;border:1px solid #55775b;border-radius:22px;padding:23px 22px;margin:-25px 0 0;background:linear-gradient(120deg,#365f46,#668867);color:#fff;text-align:left;box-shadow:0 10px 22px #3454401c;cursor:pointer;min-height:120px}
.home-primary-talk>span{display:block;min-width:0}.home-primary-talk b{display:block;font-size:25px;line-height:1.5;letter-spacing:-.02em}
.home-primary-talk small,.home-primary-talk>span>span{display:block;font-size:12px;line-height:1.8;color:#f2f6ea;font-weight:400}
.home-primary-talk>svg{width:39px;height:39px;fill:none;stroke:currentColor;stroke-width:1.4;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0;opacity:.88}
.home-section-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:27px 0 12px}
.home-navigation-v1 .home-section-heading h2{font-size:17px;line-height:1.5;letter-spacing:.02em;color:#36513c;margin:0}
.home-section-heading button,.home-page-top button{font:inherit;font-size:12px;color:#4f6d4f;min-height:44px;border:0;background:transparent;cursor:pointer;padding:7px 0}
.home-shortcuts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.home-shortcut{display:flex;align-items:center;gap:9px;text-align:left;border:1px solid #e2e7d7;border-radius:17px;min-height:86px;padding:15px 12px;background:#edf2e7;color:#36543e;cursor:pointer}
.home-shortcut:nth-child(2){background:#f8eddf;border-color:#f0e2d1;color:#735948}
.home-shortcut:nth-child(3){background:#f9f2dc;border-color:#efe5c8;color:#6c5c35}
.home-shortcut:nth-child(4){background:#ebf1f3;border-color:#dfe8eb;color:#456675}
.home-shortcut>span{min-width:0}.home-shortcut b{font-size:14px;line-height:1.6;display:block;word-break:keep-all;overflow-wrap:anywhere}
.home-shortcut small{display:block;font-size:10px;line-height:1.7;margin-top:3px;font-weight:400}
.home-nav-icon{display:block;width:27px;height:27px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linejoin:round;stroke-linecap:round;flex-shrink:0}
.home-class-note{font-size:12px!important;background:#f1f4e8;border-radius:12px;padding:12px;line-height:1.8;color:#52654d}
.home-navigation-v1 #home:has(#homeResume[hidden]) .home-resume-heading{display:none}
.home-resume-link{width:100%;background:#fffdf8;border:1px solid #e5e5d7;border-radius:17px;text-align:left;padding:16px 44px 16px 17px;position:relative;min-height:83px;color:#36513c;cursor:pointer}
.home-resume-link small{display:block;color:#6e7c68;font-size:11px;line-height:1.6;margin-bottom:5px}
.home-resume-link b{display:block;font-size:15px;line-height:1.6;overflow-wrap:anywhere;font-weight:650}
.home-resume-link>span{position:absolute;right:14px;top:50%;transform:translateY(-50%);color:#7c9573}.home-resume-link .home-nav-icon{width:22px;height:22px}
#homeOverviewStatus{font-size:12px;line-height:1.7;color:#6b765d;margin:12px 0 0}
.home-reload{font:inherit;min-height:44px;background:none;border:0;color:#4c6949;text-decoration:underline;font-size:12px;padding:8px 0;cursor:pointer}
#home:has(#homeOverviewStatus:empty) .home-reload{display:none}
.home-navigation-v1 #bottomNav{grid-template-columns:repeat(4,minmax(0,1fr))!important;max-width:480px!important}
.home-navigation-v1 #bottomNav .nav-btn{min-height:58px;font-size:11px;padding:8px 4px}
.home-navigation-v1 #bottomNav .nav-btn[aria-current="page"]{color:#365b40!important;background:#e9f0e1!important;font-weight:700}
.home-navigation-v1 #appMenu,.home-navigation-v1 #recordHub{padding:5px 0 0!important}
.home-page-top{display:flex;justify-content:space-between;align-items:center;margin:0 0 17px}.home-page-top>span{font-size:10px;letter-spacing:.15em;color:#87917e}
.home-navigation-v1 #appMenuTitle{font-size:28px;line-height:1.55;color:#35503a;margin:0 0 9px;letter-spacing:-.02em}
.home-menu-lead{font-size:13px;line-height:1.9;color:#6a7866;margin:0 0 24px}
.home-menu-group{margin-bottom:26px}.home-menu-group>h3{font-size:17px;color:#35513b;margin:0 0 3px;line-height:1.6}
.home-menu-description{font-size:11px;color:#75826c;margin:0 0 10px;line-height:1.7}
.home-menu-link{width:100%;display:flex;align-items:center;gap:13px;border:1px solid #e5e7dc;border-radius:15px;padding:16px;background:#fffdf9;color:#3d583f;text-align:left;margin:7px 0;min-height:65px;cursor:pointer;box-shadow:none}
.home-menu-link b{font-size:15px;line-height:1.6;font-weight:650;display:block}.home-menu-link small{font-size:11px;line-height:1.7;font-weight:400;color:#72806b;display:block;margin-top:2px}
.home-account-link{font-size:14px;min-height:51px;padding-left:18px}.home-logout{min-height:51px;background:#f5eee8;color:#785447;font-size:13px}
.home-record-card{background:#fffdf9;border:1px solid #e5e7dc;border-radius:16px;padding:15px 17px;margin:12px 0}.home-record-card p{font-size:14px;line-height:1.9;white-space:pre-wrap;overflow-wrap:anywhere;margin:0}
.home-record-card .home-record-date{color:#78866f;font-size:11px;white-space:normal;margin-bottom:7px}
#homeRecordStatus{font-size:13px;line-height:1.8;color:#68765f}.home-record-actions{display:grid;gap:8px;margin-bottom:20px}.home-record-actions .btn{margin:0}
.home-navigation-v1 :is(.home-shortcut,.home-menu-link,.home-primary-talk,.home-resume-link,.home-section-heading button,.home-page-top button,.nav-btn):focus-visible{outline:3px solid #a07835;outline-offset:3px}
.home-navigation-v1 .account-panel{max-height:calc(100dvh - 112px)}
.home-navigation-v1 [hidden]{display:none!important}
@media(max-width:360px){.home-primary-talk{padding:20px 16px}.home-primary-talk b{font-size:22px}.home-primary-talk>svg{width:30px}.home-shortcut{padding:13px 10px;gap:7px}.home-shortcut b{font-size:13px}.home-shortcut .home-nav-icon{width:23px;height:23px}}
@media(prefers-reduced-motion:reduce){.home-navigation-v1 *{scroll-behavior:auto!important}}

.weekly-record-reference{border-top:1px solid #e2e8dc;margin:20px 0;padding:16px 0}.weekly-record-reference summary{cursor:pointer;font-weight:700;color:#456e53}.weekly-record-reference input[type=checkbox]{width:20px;height:20px;vertical-align:middle;margin-right:8px}.weekly-record-reference input[type=date]{box-sizing:border-box;max-width:100%}#weeklyRecordPreview{max-height:360px;overflow:auto;overflow-wrap:anywhere}.weekly-record-item{border-top:1px solid #e2e8dc;padding:12px 0}.weekly-record-item small{color:#64715d}.weekly-record-item p{white-space:pre-wrap;margin:8px 0;line-height:1.7}

.record-choice{display:flex;align-items:center;gap:8px;margin:8px 0;font-size:14px;cursor:pointer}.record-choice input[type=checkbox]{width:20px;height:20px;flex:0 0 20px;margin:0}.record-choice span{flex:1;min-width:0}

.weekly-history-dates{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.weekly-history-dates input{box-sizing:border-box;max-width:100%;min-width:0}.weekly-history-actions{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0}.weekly-history-item{display:block;width:100%;text-align:left;white-space:normal;overflow-wrap:anywhere;margin:8px 0}#weeklyHistoryMore[hidden],#weeklyHistoryRetry[hidden]{display:none}@media(max-width:440px){.weekly-history-dates{grid-template-columns:1fr}}

/* Private revisit notes */
.revisit-card label{display:block;font-weight:700;margin:12px 0 6px}
.revisit-card input:not([type=checkbox]),.revisit-card select,.revisit-card textarea{display:block;width:100%;max-width:100%;box-sizing:border-box}
.revisit-card textarea{resize:vertical}.revisit-card .revisit-confirm{display:flex;align-items:flex-start;gap:8px;font-weight:400;line-height:1.6}.revisit-confirm input{flex:0 0 auto;margin-top:6px}
.revisit-actions{display:flex;flex-wrap:wrap;align-items:center;gap:8px}.revisit-actions .btn{width:auto;flex:1 1 150px}
.revisit-note{padding:16px;margin:12px 0;border:1px solid var(--line);border-radius:18px;background:var(--paper)}.revisit-note p,.revisit-latest{white-space:pre-wrap;overflow-wrap:anywhere}.revisit-note p{margin-top:5px}
.revisit-private,.revisit-latest{line-height:1.7;padding:14px;background:rgba(113,146,123,.10);border-radius:14px}.revisit-latest:empty{display:none}#revisitMore[hidden]{display:none}
