body.orbit-on .container{max-width:1530px;margin-right:auto}.orbit-page{max-width:1200px}.save-status-bar{display:flex;gap:8px;align-items:center;flex-wrap:wrap;font-size:12px;margin:0 0 18px}.save-status-bar button{padding:6px 10px}.save-status-bar .bad{color:var(--accent-red);font-weight:bold}.recovery-settings{padding-top:14px}.backup-reminder{padding:12px;background:var(--pill-bg);border-radius:10px}.recovery-row{padding:14px 0;display:flex;gap:10px;flex-wrap:wrap;border-bottom:1px solid var(--border-color)}.recovery-row strong{width:100%}.recovery-row small{width:100%}#orbitDialog{background:var(--panel-bg);color:var(--text-main);border:1px solid var(--border-color);border-radius:18px;padding:24px;max-width:650px;width:calc(100% - 32px);max-height:85dvh;overflow:auto}#orbitDialog::backdrop{background:#0009}#orbitDialog button{margin:8px 8px 8px 0}#orbitDialog label{display:block}#orbitSearchResults{margin-bottom:20px}#orbitSearchResults[hidden]{display:none}#orbitSearchResults button{display:block;width:100%;text-align:left;padding:12px;margin:6px 0;background:var(--panel-hover);color:var(--text-main);border:1px solid var(--border-color);border-radius:8px}#orbitMenu{display:none}.note-document details{margin:12px 0}.note-document summary{cursor:pointer;padding:10px}.note-meta{padding:12px 0}.today-grid{max-width:1100px}body.orbit-on button:focus-visible,body.orbit-on a:focus-visible{outline:3px solid var(--accent-green);outline-offset:3px}
@media(max-width:800px){body.orbit-on .container{margin-left:0!important;padding:14px 14px 50px!important;width:100%;max-width:100%}#orbitMenu{display:block;min-width:58px}#orbitSide{transform:translateX(-100%);width:245px;transition:transform .15s;box-shadow:4px 0 20px #0003;padding-top:65px}body.nav-open #orbitSide{transform:translateX(0)}body.nav-open #orbitMenu{position:fixed;top:12px;left:14px;z-index:70}.orbit-top input{min-width:0;width:100%}.orbit-top{gap:8px}.orbit-page{max-width:100%;min-width:0}body.orbit-on .section-title{font-size:25px;flex-wrap:wrap}body.orbit-on button,body.orbit-on select,body.orbit-on input:not([type=checkbox]):not([type=color]),body.orbit-on summary{min-height:44px}body.orbit-on input[type=checkbox]{width:22px;height:22px;flex-shrink:0}body.orbit-on textarea{font-size:16px!important}body.orbit-on input,body.orbit-on select{font-size:16px!important;max-width:100%}.notes-layout,.diary-grid,.files-layout,.focus-grid,#goalBoard,.goal-columns,.today-grid,.o-stats,.qgrid,.fgrid{display:grid!important;grid-template-columns:minmax(0,1fr)!important;width:100%;gap:14px}.notes-tree{max-height:220px;overflow:auto}.notes-tree button{width:100%}.note-document{padding:16px!important;min-width:0}.note-meta{display:grid!important;grid-template-columns:1fr!important}.note-actions{display:flex;flex-wrap:wrap;gap:6px}.note-actions span{width:100%}.orbit-ring{width:min(290px,100%);height:auto;aspect-ratio:1}body.orbit-on #pomoCard{padding:16px}.focus-tabs{flex-wrap:wrap}.focus-tabs button{flex:1}.goal-list{max-height:230px;overflow:auto}.goal-columns{overflow:visible!important}.goal-columns>section{min-width:0!important}.goal-task-card{overflow-wrap:anywhere}.habit-scroll{overflow:auto}.hm-row{min-width:980px}.hm-row>b{position:sticky;left:0;background:var(--panel-bg);z-index:2}.hour-scroll{max-height:65dvh}.hour-grid{min-width:720px}#orbitPage-calendar .cal-nav{flex-wrap:wrap;gap:8px}#orbitSettings .row{align-items:flex-start;flex-direction:column}body.orbit-on .modal-content{width:100%!important;max-width:100%!important;max-height:92dvh!important;padding:18px!important}#eventModal .modal-content{width:100%!important}body.orbit-on .todo-main-row{flex-wrap:wrap}.todo-actions{flex-wrap:wrap}.todo-item{min-width:0;overflow-wrap:anywhere}.noteBlockText{min-width:0;width:100%}.block-code textarea{overflow:auto}.o-card{min-width:0}.month-grid,.calendar-grid{min-width:600px}#calendarGrid{min-width:560px}#eventsPanel{overflow-x:auto}#dashboardPanel{overflow-x:auto}canvas{max-width:100%}#orbitDialog{padding:18px}.save-status-bar{font-size:11px}.save-status-bar span{width:100%}.o-stats{grid-template-columns:repeat(3,minmax(0,1fr))!important}.o-stats .o-card{padding:12px 8px}.o-stats .o-card b{font-size:22px}.o-stats .o-card span{font-size:11px}}
#mobileAgenda,#mobileHabits{display:none}#mobileAgenda button,#mobileHabits button{display:block;margin:8px 0;width:100%;text-align:left;padding:12px}#mobileAgenda h3,#mobileHabits h3{margin-top:0}
@media(max-width:800px){#mobileAgenda,#mobileHabits{display:block;margin-bottom:16px}#orbitPage-calendar:not(.show-mobile-grids)>:not(#mobileAgenda):not(.section-title){display:none!important}}
@media(max-width:800px){body.orbit-on .notes-tree{min-height:0!important;height:auto!important;max-height:220px!important}body.orbit-on .notes-layout{align-items:start!important}.notes-tree .selected{position:relative}.notes-tree{overflow:auto!important}}

@media(max-width:800px){#orbitSide{display:flex!important}body.nav-open .orbit-top input{visibility:hidden}body.nav-open #orbitSide{z-index:60}#orbitMenu{z-index:70}}
/* Files: clear on-device status and usable touch controls. */
.files-header{display:flex;align-items:center;justify-content:space-between;gap:20px;margin:24px 0}.files-header h1{font-size:32px;margin:5px 0 8px;letter-spacing:-1px}.files-header p{color:var(--text-muted);margin:0;font-size:14px}.files-eyebrow{font-size:10px;letter-spacing:1.7px;color:var(--text-muted);font-weight:700}.files-header>button{padding:13px 22px!important;font-weight:700}.file-storage-note{display:flex;gap:12px;align-items:center;border:1px solid var(--border-color);background:var(--panel-bg);padding:14px 18px;border-radius:13px;margin-bottom:24px}.file-storage-dot{width:8px;height:8px;background:#bf7751;border-radius:50%;flex:none}.file-storage-note>div{flex:1}.file-storage-note b{font-size:12px;display:block;margin-bottom:4px}.file-storage-note span:not(.file-storage-dot){font-size:12px;color:var(--text-muted)}.file-storage-note button{border:0;background:none;color:var(--accent-green);font-weight:600;cursor:pointer}.files-layout{grid-template-columns:200px minmax(0,1fr)!important;gap:24px}.file-folders{padding:18px 10px;gap:5px}.file-folder-title{font-size:10px;letter-spacing:1.5px;color:var(--text-muted);padding:5px 12px 13px}.file-folders button{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:43px;font-size:13px}.file-folders button span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.file-folders small{float:none}.file-local-summary{border-top:1px solid var(--border-color);padding:18px 12px 0;margin-top:18px;font-size:12px;font-weight:600}.file-local-summary small{display:block;font-size:11px;line-height:1.6;margin-top:8px;color:var(--text-muted);font-weight:400}.file-main{min-width:0}.file-toolbar{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0 0 17px}.file-toolbar h2{font-size:19px;margin:0}.file-toolbar>div{display:flex;gap:7px}.file-toolbar input{width:170px!important;min-width:0!important}.file-toolbar input,.file-toolbar select,.file-toolbar button{font-size:11px!important;padding:9px!important;min-height:36px;background:var(--panel-bg);border:1px solid var(--border-color);border-radius:8px;color:var(--text-main)}.file-drop-v3{border:1.5px dashed var(--border-color);background:var(--panel-bg);border-radius:13px;padding:23px;display:flex;align-items:center;justify-content:space-between;gap:16px}.file-drop-v3 b{display:block;font-size:13px}.file-drop-v3 span{display:block;color:var(--text-muted);font-size:11px;line-height:1.6;margin-top:7px}.file-drop-v3 button,.file-empty button{background:var(--pill-bg);border:1px solid var(--border-color);border-radius:8px;padding:10px 16px;color:var(--text-main);cursor:pointer;font-weight:600;white-space:nowrap}.file-drop-v3.drag-active{border-color:var(--accent-green);background:#2f6f4f12}.file-drop-v3 input[hidden]{display:none!important}#fileUploadStatus{font-size:12px;color:var(--accent-green);line-height:1.6;margin:12px 0;overflow-wrap:anywhere}.file-results-summary{font-size:11px;color:var(--text-muted);margin:20px 0 10px}.file-row{display:flex;gap:14px;align-items:center;padding:16px;background:var(--panel-bg);border:1px solid var(--border-color);border-radius:11px;margin-bottom:8px;min-width:0}.file-type{flex:none;width:43px;height:48px;background:var(--pill-bg);border-radius:8px;display:grid;place-items:center;font-size:10px;font-weight:700;letter-spacing:.5px;color:var(--accent-green)}.file-info{min-width:0;flex:1}.file-info b{display:block;font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.file-info small{display:block;font-size:11px;color:var(--text-muted);margin-top:7px;overflow-wrap:anywhere}.file-actions{display:flex;align-items:center;gap:11px}.file-actions button,.file-actions a{border:0;background:none;color:var(--text-muted);font-size:11px;cursor:pointer;padding:5px;text-decoration:none}.file-actions a{color:var(--accent-green)}.file-empty{padding:55px 20px 65px;text-align:center;border:1px solid var(--border-color);border-radius:13px;background:var(--panel-bg)}.file-empty-icon{margin:auto auto 18px;width:50px;height:58px;display:grid;place-items:center;background:var(--pill-bg);border:1px solid var(--border-color);border-radius:8px;font-size:25px;color:var(--text-muted)}.file-empty h3{font-size:16px;margin:0 0 10px}.file-empty p{color:var(--text-muted);font-size:12px;margin:0 0 20px}.file-results.is-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:12px}.is-grid .file-row{flex-wrap:wrap;margin:0}.is-grid .file-actions{width:100%;justify-content:flex-end}.file-preview,#fileFolderDialog{border:1px solid var(--border-color);border-radius:16px;padding:25px;background:var(--panel-bg);color:var(--text-main);max-width:min(700px,90vw)}.file-preview::backdrop,#fileFolderDialog::backdrop{background:#0006}.file-preview h2{font-size:18px;overflow-wrap:anywhere}.file-preview img{display:block;max-width:100%;max-height:65vh;margin-bottom:20px}.file-preview pre{white-space:pre-wrap;overflow:auto;max-height:60vh;max-width:100%;font-size:13px}.file-preview>button,.file-preview>a{display:inline-block;margin:12px 12px 0 0;padding:10px 15px;color:var(--text-main);border:1px solid var(--border-color);border-radius:7px;background:var(--pill-bg);text-decoration:none}#fileFolderDialog input{display:block;margin-top:10px;width:100%;box-sizing:border-box}#fileFolderDialog label{font-size:13px}.file-dialog-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:25px}.file-dialog-actions button{padding:10px 15px;border-radius:8px;border:1px solid var(--border-color);cursor:pointer}#folderError{font-size:12px;color:#b24f3d}
@media(max-width:800px){.files-header{margin:18px 0;gap:10px;align-items:flex-start}.files-header h1{font-size:28px}.files-header p{font-size:12px;line-height:1.6}.files-header>button{font-size:12px;padding:10px 13px!important;white-space:nowrap}.file-storage-note{padding:13px;align-items:flex-start;gap:9px;margin-bottom:17px}.file-storage-dot{margin-top:4px}.file-storage-note button{font-size:11px;max-width:62px}.file-storage-note span:not(.file-storage-dot){font-size:11px;line-height:1.6;display:block}.files-layout{grid-template-columns:minmax(0,1fr)!important;gap:17px}.file-folders{display:flex!important;flex-direction:row;overflow:auto;padding:8px;gap:6px}.file-folder-title,.file-local-summary{display:none}.file-folders button{flex:none;gap:16px;font-size:12px;min-height:44px;white-space:nowrap;padding:9px 12px}.file-toolbar{display:block}.file-toolbar h2{margin-bottom:12px}.file-toolbar>div{display:grid;grid-template-columns:minmax(0,1fr) 120px;gap:7px}.file-toolbar input{width:100%!important}.file-toolbar button{grid-column:2;grid-row:2}.file-toolbar select{width:120px;min-width:0;font-size:12px!important}.file-toolbar input{font-size:14px!important}.file-drop-v3{padding:17px;align-items:flex-start}.file-drop-v3 b{font-size:12px}.file-drop-v3 span{font-size:10px}.file-drop-v3 button{font-size:11px;padding:8px 11px}.file-row{gap:11px;padding:13px;flex-wrap:wrap}.file-info{width:calc(100% - 60px)}.file-actions{width:100%;border-top:1px solid var(--border-color);padding-top:5px;justify-content:flex-end;gap:13px}.file-actions button,.file-actions a{min-height:44px;display:flex;align-items:center;font-size:12px;padding:0 8px}.file-empty{padding:40px 16px}.file-results.is-grid{grid-template-columns:minmax(0,1fr)}.file-preview,#fileFolderDialog{max-width:calc(100vw - 30px);box-sizing:border-box;width:calc(100vw - 30px)}}
@media(max-width:800px){.file-folders{flex-wrap:wrap;overflow:visible}.file-folders button{flex:1 0 auto;justify-content:center}.file-toolbar>div{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.file-toolbar input{grid-column:1/-1}.file-toolbar select{width:100%;grid-column:1;grid-row:2}.file-toolbar button{grid-column:2;grid-row:2}.file-toolbar select,.file-toolbar button{font-size:11px!important}.file-actions{gap:10px}}
/* Preserve drawer content height instead of compressing advanced fields. */
#eventModal .modal-content>*{flex-shrink:0}#eventModal .dr-foot{z-index:4}#eventModal .dr-advanced{margin-bottom:20px}
@media(max-width:800px){body.orbit-on .todo-main-row{display:block}.todo-main-row>label{align-items:flex-start!important}.todo-main-row>div:last-child{display:flex!important;flex-wrap:wrap;gap:8px!important;margin-top:12px;padding-left:0}.todo-main-row .group-badge{white-space:nowrap;word-break:normal;font-size:10px!important}.todo-main-row>div:last-child>span{flex:none;max-width:100%;white-space:nowrap}.todo-main-row>div:last-child>button{flex:none;white-space:nowrap;min-width:60px;min-height:36px!important}.todo-item .task-title{line-height:1.5}.todo-item .subtask-container{margin-top:10px}#eventModal .modal-content{padding-bottom:0!important}#eventModal .dr-foot{flex-wrap:wrap;gap:7px!important;padding:12px!important}#eventModal .dr-foot button{font-size:12px;flex:1;min-width:60px;white-space:nowrap}#eventModal .dr-foot .btn-add{padding:10px!important}#eventModal .dr-del{margin-left:0}#eventModal #modalTitleText{font-size:23px;overflow-wrap:anywhere}#eventModal .dr-advanced{padding:12px!important;margin-bottom:20px}#eventModal .modal-content>div:not(.dr-top):not(.dr-foot):not(#drSubs){grid-template-columns:1fr;gap:6px!important;padding:8px 12px}#eventModal .modal-content input,#eventModal .modal-content select{min-width:0}#eventModal #drSubs{padding:12px!important}#eventModal .modal-content>div>label{white-space:normal}}
@media(max-width:800px){.qn-compose{display:grid!important;grid-template-columns:1fr 1fr!important;gap:10px!important}.qn-compose textarea{grid-column:1/-1;width:100%;min-height:120px;box-sizing:border-box}.qn-compose button{width:100%}#notesCard>div:first-child{display:grid!important;grid-template-columns:1fr;gap:12px!important}#notesCard>div:first-child>div{display:flex!important;flex-wrap:wrap;gap:7px!important}#notesCard>div:first-child>div:first-child{display:grid!important;grid-template-columns:1fr 2fr 1fr}#notesCard>div:first-child button{font-size:11px;white-space:normal}#noteDatePicker{width:100%;min-width:0;font-size:13px!important;padding:6px}#notesCard>div:first-child>div:nth-child(2)>button{flex:1}#starRatingBar{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:6px;max-width:100%}.rating-bar .rating-star{width:auto!important;height:44px!important;margin:0!important;min-width:0}.rating-bar{width:100%}#notesCard>div:has(>#starRatingBar){min-width:0;width:100%}#notesCard>div:has(>#starRatingBar)>div{width:100%;min-width:0}#dashboardPanel>div{min-width:0;max-width:100%}#chartSvgBox{min-width:280px;width:100%;overflow:auto}#chartSvgBox svg{min-width:500px}#dashboardPanel{overflow:visible}#dashboardPanel .dashboard-grid{display:grid!important;grid-template-columns:1fr!important}.note-document:has(>.o-empty){min-height:180px!important}.note-document{min-height:0!important}}
@media(max-width:800px){.analytics-grid{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:24px!important}.analytics-grid>div{min-width:0}.chart-svg-container{width:100%;min-width:0!important;overflow-x:auto}#chartSvgBox{min-width:0}#starRatingBar{width:100%}.rating-bar{flex-wrap:wrap!important}#notesCard .rating-bar>span{flex:none}#notesCard>div:has(.rating-bar)>div{width:100%;min-width:0}}
/* Native controls must keep readable contrast in both Orbit palettes. */
body.orbit-on input:not([type=checkbox]):not([type=color]),body.orbit-on select,body.orbit-on textarea{background:var(--panel-bg);color:var(--text-main);border:1px solid var(--border-color)}body.orbit-on button:disabled{opacity:.5}body.orbit-on #orbitSettings select{max-width:100%;width:min(100%,300px);box-sizing:border-box}body.orbit-on #orbitSettings .row>div{min-width:0}body.orbit-on .chart-svg-container:has(>p:only-child){min-height:80px}#orbitSettings p{line-height:1.6}
@media(max-width:800px){#orbitSettings{box-sizing:border-box;min-width:0}#orbitSettings .row{width:100%;box-sizing:border-box}#orbitSettings select{width:100%!important;max-width:100%!important}#orbitSettings .recovery-settings button{margin:3px 3px 3px 0}.notes-tree:empty{display:none}}
body.orbit-on .chart-svg-container:has(>div:only-child){min-height:75px;height:75px}
#moodCalendarContainer:has(>div:only-child){display:block!important}#moodCalendarContainer>div:only-child{width:100%;box-sizing:border-box}body.orbit-on #chartSvgBox:not(:has(svg)){min-height:75px;height:75px}#moodCalendarContainer{min-width:0}

/* Useful contrast for legacy palettes and native date controls. */
body.orbit-on{--acc2:var(--accent-purple)}
body.theme-orbit{--acc2:#e4572e;color-scheme:light}
body.theme-orbitdark{--acc2:#ff7a52;color-scheme:dark}
body.theme-orbitdark .qcard button{background:#1e211d;color:#eeeadf;border-color:#54604f}
body.orbit-on .rating-star{border:1px solid var(--border-color)}
body.orbit-on .rating-star.active{background:var(--accent-green)!important;color:var(--bg-color)!important}
/* Wide note tables scroll inside the note instead of widening the page. */
.note-block{min-width:0;max-width:100%}.noteTablePreview{display:block;min-width:0;max-width:100%;overflow:auto}.noteTablePreview table{width:max-content;min-width:100%;max-width:none}.block-table{overflow:hidden}.block-code textarea{white-space:pre;overflow:auto}
/* Imported spans must not stretch one month column at the expense of others. */
#calendarGrid{grid-template-columns:repeat(7,minmax(0,1fr))}#calendarGrid .cal-day-cell{min-width:0}#calendarGrid .event-badge{white-space:normal;overflow-wrap:anywhere;line-height:1.35}
