/* One control vocabulary, with comfortable touch targets and stable action footers. */
#profile-dialog{--control-green:#246b4a;--control-ink:#222b2b}
#profile-dialog .profile-tabs button[aria-pressed="true"]{background:#246b4a!important;color:#fff!important;opacity:1}
#profile-dialog .profile-tabs button[aria-pressed="false"]{background:transparent!important;color:#222b2b!important}
#profile-dialog button,#profile-dialog input,#profile-dialog select,#profile-dialog summary{font-family:inherit}
#profile-dialog button{font-size:13px;line-height:1.3;min-height:36px;padding:8px 12px;border-radius:10px}
#profile-dialog .dialog-title button{min-width:36px;width:36px;padding:6px}
#profile-dialog input[type="checkbox"]{appearance:none!important;-webkit-appearance:none!important;display:inline-block!important;position:relative;box-sizing:border-box!important;width:20px!important;height:20px!important;min-width:20px!important;min-height:20px!important;max-width:20px!important;padding:0!important;margin:0!important;border:1.5px solid #91ac9c!important;border-radius:5px!important;background:#fff!important;flex:0 0 20px!important;vertical-align:middle;cursor:pointer}
#profile-dialog input[type="checkbox"]:checked{background:#246b4a!important;border-color:#246b4a!important}
#profile-dialog input[type="checkbox"]:checked::after{content:'';display:block;position:absolute;left:5px;top:2px;width:5px;height:10px;border:solid white;border-width:0 2px 2px 0;transform:rotate(45deg)}
#profile-dialog input[type="checkbox"]:focus-visible{outline:3px solid #e5ba46;outline-offset:3px}
#profile-dialog input[type="checkbox"]:disabled{opacity:.5;cursor:default}
#profile-dialog .personal-block{margin:10px 0;background:#f7faf5;border-radius:12px}
#profile-dialog .personal-block>summary{font-size:14px;padding:12px 14px;min-height:40px}
#profile-dialog .personal-block-body{padding:0 14px 14px}
#profile-dialog .nitu-fields{border:0!important;background:transparent!important;padding:0!important;margin:0!important;border-radius:0!important;min-width:0}
#profile-dialog .nitu-fields>legend{font-size:13px;font-weight:700;padding:0;margin:12px 0 8px}
#profile-dialog .remember-choice,#profile-dialog .personal-shortcut>label{font-size:13px;font-weight:400;display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:flex-start!important;gap:10px;min-height:36px}
#profile-dialog .personal-shortcut{min-height:44px;display:flex;gap:8px;align-items:center;padding:6px 0;border-bottom:1px solid #dde7df}
#profile-dialog .personal-shortcut>label{flex:1;margin:0;text-align:left}
#profile-dialog .personal-shortcut button{min-width:32px;width:32px;height:32px;min-height:32px;padding:5px}
#profile-dialog .personal-phrase{grid-template-columns:minmax(0,1fr) auto auto;gap:14px;min-height:44px;padding:10px 0}
#profile-dialog .personal-phrase>span{font-size:13px;line-height:1.5}
#profile-dialog .personal-phrase>label{font-size:11px;display:flex!important;flex-direction:column;gap:5px;align-items:center;min-width:55px}
#profile-dialog .notice-channel-row{grid-template-columns:minmax(0,1fr) 60px 60px;gap:10px;padding:12px 0}
#profile-dialog .notice-channel-row strong{font-size:13px;font-weight:600}
#profile-dialog .notice-channel-row label{font-size:11px;display:flex;flex-direction:column;gap:5px;align-items:center}
#notice-preferences-form{display:flex!important;flex-direction:column;gap:10px}#notice-preferences-form>.personal-block{margin:0}
.notice-save-footer{display:flex;flex-wrap:wrap;justify-content:flex-end;align-items:center;gap:8px;padding:12px 0 0;border-top:1px solid #c9dacc}
.notice-save-footer>p{width:100%;margin:0;line-height:1.5}.notice-save-footer>[role="status"]{order:3;font-size:12px;color:#456254}
.personal-work-menu>summary,.project-more-actions>summary{list-style:none}.personal-work-menu>summary::-webkit-details-marker,.project-more-actions>summary::-webkit-details-marker{display:none}
.nitu-more-summary{display:inline-flex;align-items:center;justify-content:center;gap:6px;font-size:12px;font-weight:500;min-height:36px;cursor:pointer;border:1px solid #a8c1b2;border-radius:10px;background:#fff;padding:7px 10px;white-space:nowrap}.nitu-more-summary::after{content:'⌄';font-size:14px}
.work-layout-toolbar{display:grid!important;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:10px}.work-layout-toolbar>.small{grid-column:1}.work-layout-toolbar>.scope-switch{grid-column:2}.work-layout-toolbar>.personal-work-menu{grid-column:3;min-width:0}
#work-list[data-layout="cards"] .project-grid{align-items:stretch}
#work-list[data-layout="cards"] .project-card{display:flex!important;flex-direction:column;gap:12px;min-width:0}
#work-list[data-layout="cards"] .project-card>.personal-description{margin:0}
#work-list[data-layout="cards"] .project-card>.card-checklist{min-height:66px}
#work-list .project-card>.project-actions{margin-top:auto!important;padding-top:12px;border-top:1px solid #cfddd2;display:flex!important;align-items:center;flex-wrap:wrap;gap:8px}
#work-list .project-actions button{font-size:12px;padding:7px 10px;min-height:36px;border-radius:10px;display:inline-flex;align-items:center;justify-content:center;gap:7px}
#work-list .project-more-actions{position:relative;margin-left:auto}
#work-list .project-more-actions[open]>button{position:absolute;right:0;bottom:calc(100% + 6px);white-space:nowrap;background:white;z-index:5;box-shadow:0 4px 12px #173e3215}
#work-list[data-layout="list"] .project-actions{grid-column:1/-1;grid-row:5}
.control-symbol{display:inline-flex;flex-shrink:0}.control-symbol svg{width:18px;height:18px}
button.nitu-icon-action{display:inline-flex;align-items:center;justify-content:center;gap:7px;border:1px solid #afc4b8;background:#fff;color:#244735;text-decoration:none;border-radius:9px}
.control-tooltip{position:fixed;z-index:2147483647;max-width:min(280px,calc(100vw - 16px));font:12px/1.4 system-ui,sans-serif;background:#173e32;color:white;border-radius:8px;padding:7px 10px;pointer-events:none;box-shadow:0 3px 12px #173e3220}
.control-tooltip[hidden]{display:none!important}
.logout-caption{display:none}
@media(hover:hover) and (pointer:fine) and (min-width:721px){button.nitu-icon-action{min-width:34px!important;max-width:36px;width:34px!important;min-height:34px!important;height:34px;padding:6px!important}.nitu-icon-action>.control-label{display:none}}
@media(max-width:720px),(pointer:coarse){#profile-dialog button,#profile-dialog .dialog-title button{min-height:44px}#profile-dialog .personal-shortcut button{min-width:44px;width:44px;height:44px}#profile-dialog .remember-choice,#profile-dialog .personal-shortcut>label,#profile-dialog .personal-phrase>label,#profile-dialog .notice-channel-row label{min-height:44px}button.nitu-icon-action{min-height:44px;min-width:44px}#work-list .project-actions{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));align-items:stretch}#work-list .project-actions button{min-height:44px}#work-list .project-more-actions{margin-left:0}.project-more-actions>summary{width:100%;box-sizing:border-box;min-height:44px}.work-layout-toolbar{grid-template-columns:1fr auto}.work-layout-toolbar>.small{grid-column:1/-1}.work-layout-toolbar>.scope-switch{grid-column:1;justify-self:start}.work-layout-toolbar>.personal-work-menu{grid-column:2;justify-self:end}.work-layout-toolbar summary{font-size:11px;white-space:normal}.personal-phrase{grid-template-columns:minmax(0,1fr) 60px 70px!important}.personal-phrase>span{grid-column:auto!important}.notice-save-footer{justify-content:stretch}.notice-save-footer>button{flex:1}.logout-caption{display:block;font-size:10px;font-weight:400}#logout-nav span{max-width:65px;white-space:normal!important;font-size:9px!important}.control-tooltip{display:none!important}}
@media(prefers-reduced-motion:reduce){#profile-dialog *,button.nitu-icon-action{scroll-behavior:auto;transition:none}}

#profile-dialog .personal-phrase>label{position:relative}#profile-dialog .personal-phrase input[type="checkbox"]{position:absolute!important;width:34px!important;height:34px!important;min-width:34px!important;min-height:34px!important;max-width:34px!important;opacity:0;inset:0 auto auto 50%;transform:translateX(-50%);z-index:1}.phrase-choice-symbol{display:flex;align-items:center;justify-content:center;width:32px;height:32px;box-sizing:border-box;border:1px solid #abc2b3;background:white;border-radius:8px;color:#496658}.phrase-choice-symbol svg{width:18px;height:18px}.personal-phrase input:checked+.phrase-choice-symbol{background:#246b4a;color:white;border-color:#246b4a}.personal-phrase input:focus-visible+.phrase-choice-symbol{outline:3px solid #e5ba46;outline-offset:2px}@media(hover:hover) and (pointer:fine) and (min-width:721px){.personal-phrase .phrase-choice-text{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}}@media(max-width:720px),(pointer:coarse){#profile-dialog .personal-phrase input[type="checkbox"]{width:44px!important;height:44px!important;min-width:44px!important;min-height:44px!important;max-width:44px!important}.phrase-choice-symbol{width:44px;height:44px}}
#work-list[data-layout="cards"] .project-card>.project-actions>button{width:auto;min-width:0;min-height:36px;padding:7px 10px;font-size:12px;flex:0 1 auto}
.work-layout-toolbar:has(>.personal-work-menu[hidden]){grid-template-columns:minmax(0,1fr) auto}
@media(max-width:720px),(pointer:coarse){#work-list[data-layout="cards"] .project-card>.project-actions>button{width:100%;min-height:44px}.work-layout-toolbar:has(>.personal-work-menu[hidden]){grid-template-columns:1fr auto}}

#logout>.logout-caption,#logout-nav>.logout-caption{display:none;margin:0}
@media(max-width:720px),(pointer:coarse){#logout>.logout-caption,#logout-nav>.logout-caption{display:block;color:inherit;font-size:10px;line-height:1.3;margin:0}}

@media(max-width:720px),(pointer:coarse){#work-list .project-card>.project-actions{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))}#work-list .project-more-actions>summary{white-space:normal;font-size:11px}#scope-switch{max-width:100%;gap:3px}#scope-switch button{min-width:0;padding:8px 10px;font-size:13px;flex:1;white-space:normal}#logout-nav>.logout-caption{font-size:8px}}

/* Mobile correction: give copy its own row, keep controls aligned and touchable. */
@media(max-width:720px){
 #profile-dialog .personal-phrase{grid-template-columns:repeat(2,minmax(0,1fr))!important;align-items:start;gap:10px 14px;padding:16px 0}
 #profile-dialog .personal-phrase>span{grid-column:1/-1!important;min-width:0;overflow-wrap:anywhere;line-height:1.5}
 #profile-dialog .personal-phrase>label{min-width:0;width:100%;display:grid!important;grid-template-columns:44px minmax(0,1fr);align-items:center;justify-content:start;gap:8px;font-size:11px;text-align:left}
 #profile-dialog .personal-phrase input[type=checkbox]{inset:0 auto auto 0;transform:none}
 #profile-dialog .personal-phrase .phrase-choice-text{position:static;width:auto;height:auto;overflow:visible;clip-path:none;line-height:1.4;overflow-wrap:normal}
 #profile-dialog .personal-phrase .phrase-choice-symbol{width:44px;height:44px}
 #personal-phrases{max-height:min(420px,50svh);overscroll-behavior:contain}
 #profile-dialog .voice-actions{position:static;display:grid;grid-template-columns:minmax(0,1fr);gap:10px;padding:12px 0}
 #profile-dialog .voice-actions button,.notice-save-footer>button{min-width:0;width:100%;white-space:normal;overflow-wrap:anywhere;line-height:1.4}
 #project-style-dialog .style-preview{display:grid;grid-template-columns:32px minmax(0,1fr);gap:12px;padding:16px;align-items:center;min-width:0}
 #style-preview-symbol{width:32px;height:32px;display:flex;align-items:center;justify-content:center}
 #project-style-dialog .style-preview>strong{font-size:15px;line-height:1.4;min-width:0;overflow-wrap:anywhere}
 #project-style-dialog .style-preview-week{grid-column:1/-1;min-width:0;width:100%;padding:10px}
 #project-style-dialog .style-preview-week b{grid-column:1/-1;font-size:12px;line-height:1.4;white-space:normal}
 #project-style-dialog .style-preview-week small{font-size:11px}
 #project-style-dialog input,#project-style-dialog p{max-width:100%;min-width:0;overflow-wrap:anywhere}
 #project-style-dialog .color-grid{gap:12px}
 aside nav{align-items:stretch}
 aside nav button{display:grid!important;grid-template-rows:24px 28px 12px;align-content:start;justify-items:center;gap:2px;padding:8px 2px;min-height:84px;min-width:0;text-align:center}
 aside nav button>.ui-icon{grid-row:1;width:22px;height:22px;margin:0}
 aside nav button>span,aside #logout-nav>span{grid-row:2;align-self:center;max-width:100%;min-width:0;margin:0;font-size:10px!important;line-height:1.2;white-space:normal!important;text-align:center;overflow-wrap:normal}
 aside #logout-nav>span{font-size:9px!important}
 aside #logout-nav>.logout-caption{grid-row:3;display:block;font-size:8px;line-height:1.2;white-space:nowrap;align-self:start}
 main{padding-bottom:calc(124px + env(safe-area-inset-bottom))}
 .day-progress-bottom{align-items:center;gap:12px}.day-progress-bottom p{flex:1;min-width:0;overflow-wrap:anywhere}
 .notice-feed-card .section-title{flex-wrap:wrap;gap:8px}.today-week-link{max-width:100%;white-space:normal;line-height:1.5}
}

@media(max-width:720px){aside{height:calc(94px + env(safe-area-inset-bottom))}}

@media(max-width:720px){aside nav button.desktop-nav{display:none!important}}

@media(max-width:360px){aside nav button>span{font-size:9px!important}}
