:root{color-scheme:dark;--bg:#101319;--panel:#191e28;--line:#303746;--text:#f0eef7;--muted:#a3aaba;--accent:#b9a3f4;--input:#222936}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font:14px/1.5 system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif}button,input,select,textarea{font:inherit}button{border:1px solid var(--line);border-radius:9px;padding:9px 14px;background:#222835;color:var(--text);cursor:pointer;min-height:40px;touch-action:manipulation}button:hover{background:#30374a}button:disabled{opacity:.5;cursor:default}button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:2px solid var(--accent);outline-offset:3px}button.primary{background:var(--accent);color:#191322;border-color:var(--accent);font-weight:650}button.danger{color:#ffafba;border-color:#733d49;background:#38212a}button.subtle{background:transparent}input,select,textarea{width:100%;padding:11px;border:1px solid #3b4354;border-radius:9px;background:var(--input);color:var(--text);min-width:0}input[type=color]{height:45px;padding:6px}input[type=checkbox]{width:18px;height:18px;accent-color:var(--accent)}textarea{resize:vertical}label{display:grid;gap:6px;margin:14px 0;color:#d5d8e2}.muted{color:var(--muted)}.small{font-size:12px}.wide{width:100%}.brand{font-size:25px;font-weight:800;letter-spacing:1px;display:flex;align-items:center;gap:13px}.brand span{font-size:10px;letter-spacing:2px;color:var(--muted);font-weight:600}.auth{min-height:100dvh;display:grid;place-items:center;padding:28px;background:radial-gradient(ellipse at 75% 10%,#32274c 0,transparent 55%)}.auth-card{width:min(420px,100%)}.auth h1{font-size:42px;line-height:1.12;letter-spacing:-1.7px;margin:36px 0 20px}.auth form button{width:100%;margin-top:10px}.app-header{height:76px;display:flex;align-items:center;justify-content:space-between;padding:0 26px;border-bottom:1px solid var(--line)}.header-actions{display:flex;align-items:center;gap:10px}#account-name{color:var(--muted);max-width:180px;overflow:hidden;text-overflow:ellipsis}.app-layout{display:grid;grid-template-columns:240px 1fr;min-height:calc(100dvh - 76px)}.sidebar{padding:22px 18px;border-right:1px solid var(--line);display:flex;flex-direction:column;gap:12px}.section-heading{display:flex;align-items:center;justify-content:space-between;gap:8px}h2{font-size:18px;margin:0}h3{font-size:15px;margin:24px 0 10px}.section-heading>button{padding:3px 12px;font-size:22px}.calendar-entry{display:grid;grid-template-columns:1fr auto;align-items:center;padding:8px 0;border-bottom:1px solid #232936}.calendar-entry label{display:flex;align-items:center;gap:10px;margin:0;min-width:0}.calendar-entry .name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:block}.calendar-entry .access{display:block;font-size:11px;color:var(--muted)}.calendar-entry button{background:transparent;border:0;padding:4px 10px;font-size:20px}.sidebar-bottom{margin-top:auto;padding-top:30px}main{min-width:0;padding:24px;display:grid;grid-template-columns:minmax(0,1fr) 255px;align-items:start;gap:20px}.calendar-panel,.upcoming{border:1px solid var(--line);border-radius:13px;background:var(--panel);overflow:hidden}.toolbar{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:14px;padding:18px;border-bottom:1px solid var(--line)}.toolbar h1{font-size:25px;letter-spacing:-.7px;margin:0;white-space:nowrap}.nav,.view-actions,.segmented{display:flex;gap:6px;align-items:center}.view-actions{justify-content:flex-end}.segmented{gap:0;border:1px solid var(--line);border-radius:8px;overflow:hidden}.segmented button{border:0;border-radius:0;background:transparent;padding:8px 10px}.segmented .selected{background:#5e478a;color:#fff}.month-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr))}.weekday{text-align:center;padding:13px 2px;border-bottom:1px solid var(--line);background:#202632;color:var(--muted);font-size:12px}.day-cell{position:relative;min-height:108px;border:0;border-radius:0;border-right:1px solid var(--line);border-bottom:1px solid var(--line);padding:8px 5px;background:transparent;text-align:left;min-width:0;cursor:pointer;overflow:hidden}.day-cell:nth-child(7n){border-right:0}.day-cell:hover{background:#232a38}.day-cell.blank{cursor:default}.date-number{font-size:12px;display:inline-grid;place-items:center;width:25px;height:25px;margin-bottom:5px}.day-cell.today .date-number{border-radius:50%;background:var(--accent);color:#1a1227;font-weight:700}.day-cell.outside .date-number{color:#737f94}.chip{display:block;margin:3px 0;padding:2px 6px;border-radius:5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:11px;color:#fff;background:#333d55;border-left:3px solid var(--event-color,#b9a3f4);height:22px}.more{font-size:11px;color:var(--muted);padding-left:4px}.upcoming{padding:20px}.upcoming .section-heading{margin-bottom:18px;flex-wrap:wrap}.agenda-event{display:block;width:100%;text-align:left;border:1px solid var(--line);border-left:3px solid var(--event-color,#b9a3f4);background:#202735;margin:9px 0;padding:12px;min-width:0}.agenda-event strong{display:block;overflow-wrap:anywhere;font-size:14px}.agenda-event .meta{display:block;font-size:12px;color:#c8cdd8;margin-top:4px}.empty-state{padding:35px 14px;color:var(--muted);text-align:center}.upcoming .empty-state{padding:15px 0}.agenda-date{font-size:12px;color:var(--muted);margin-top:20px}#day-agenda{padding:18px;min-height:480px}.upcoming button{font-size:12px}dialog{color:var(--text);background:var(--panel);border:1px solid #465068;border-radius:17px;width:min(540px,calc(100vw - 28px));max-height:calc(100dvh - 28px);padding:24px;box-shadow:0 28px 100px #0008;overflow-y:auto}dialog::backdrop{background:#05080dbb;backdrop-filter:blur(3px)}.dialog-heading{display:flex;justify-content:space-between;align-items:center;gap:12px}.dialog-heading h2{font-size:24px}.dialog-heading button{border:0;background:transparent;font-size:24px}.eyebrow{font-size:9px;color:var(--muted);letter-spacing:1.6px;margin:0 0 6px}.dialog-footer{display:flex;align-items:center;justify-content:flex-end;gap:8px;margin-top:22px;flex-wrap:wrap}.spacer{flex:1}.two-cols{display:grid;grid-template-columns:1fr 1fr;gap:14px}.check{display:flex;align-items:center;gap:8px}.time-selects{display:grid;grid-template-columns:1fr 1fr 1.25fr;gap:5px}.time-selects select{padding:10px 4px}fieldset{border:0;margin:0;padding:0;min-width:0}legend{padding:0;margin:0 0 7px;color:#d5d8e2}.form-error{color:#ffafba;font-size:13px;white-space:pre-line}.member{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:10px 0}#notice{position:fixed;left:50%;transform:translateX(-50%);top:14px;z-index:10;max-width:calc(100vw - 28px);width:max-content;background:#333347;color:#fff;border:1px solid #77708d;border-radius:10px;padding:10px 16px;box-shadow:0 5px 30px #0008;pointer-events:none}#notice:empty{display:none}[hidden]{display:none!important}@media(min-width:1600px){.day-cell{min-height:130px}}@media(max-width:1200px){main{grid-template-columns:minmax(0,1fr)}.upcoming{display:none}.app-layout{grid-template-columns:210px 1fr}.toolbar{grid-template-columns:auto 1fr}.toolbar h1{text-align:right}.view-actions{grid-column:1/-1;justify-content:flex-end}}@media(max-width:700px){.app-header{padding:0 14px;height:68px}.brand{font-size:22px;gap:8px}.brand span{font-size:9px}.header-actions{gap:5px}.header-actions button{padding:8px;font-size:12px}#account-name{display:none}.app-layout{display:flex;flex-direction:column;min-height:calc(100dvh - 68px)}.sidebar{border-right:0;border-bottom:1px solid var(--line);padding:10px 14px;gap:4px}.sidebar .section-heading h2{font-size:14px}.sidebar .section-heading>button{font-size:19px;min-height:32px}.sidebar-bottom{display:none}#calendar-list{display:flex;flex-wrap:wrap;gap:8px}.calendar-entry{background:#1d2330;border:1px solid var(--line);border-radius:9px;padding:7px 5px 7px 9px;max-width:100%}.calendar-entry .name{max-width:180px}.calendar-entry .access{font-size:10px}.calendar-entry button{min-height:30px;padding:0 8px}.calendar-entry label{font-size:12px}.sidebar>button{width:auto;align-self:flex-start;padding:6px 0;min-height:34px;font-size:12px;border:0;color:var(--accent)}main{display:block;padding:12px 7px}.toolbar{padding:12px 8px;gap:12px 5px}.toolbar h1{font-size:22px}.nav{gap:4px}.nav button{padding:7px 9px}.view-actions{justify-content:space-between}.weekday{padding:10px 0;font-size:11px}.day-cell{height:93px;min-height:93px;padding:4px 2px}.date-number{margin-bottom:1px;width:23px;height:23px}.chip{padding:2px 3px;font-size:10px;margin:2px 0;height:20px;border-left-width:2px}.more{font-size:10px;padding-left:2px}dialog{padding:20px 16px}.two-cols{gap:8px}.dialog-footer{gap:6px}.dialog-footer button{font-size:12px;padding:9px 11px}.auth h1{font-size:36px}#day-agenda{min-height:340px}}@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}

.preset-actions{display:flex;gap:8px;flex-wrap:wrap}.preset-actions button{font-size:12px;padding:7px 10px}.pattern-day{display:flex;gap:12px;border-bottom:1px solid var(--line);padding:7px 0;font-size:12px}.pattern-day>span:first-child{min-width:48px;color:var(--muted)}#repeat-pattern{max-height:240px;overflow-y:auto}

@media(max-width:700px){.toolbar h1{white-space:normal;min-width:0;overflow-wrap:anywhere;font-size:20px}}

/* Calendar guide and release history */
[hidden]{display:none!important}.workspace-tabs{display:flex;gap:8px;padding:10px 26px;border-bottom:1px solid var(--line)}.workspace-tabs [aria-selected=true]{background:#5e478a;border-color:#8c79cf}.info-panel{max-width:1080px;margin:0 auto;padding:28px 24px 70px}.info-heading h1{font-size:30px;margin:8px 0}.info-links{display:flex;flex-wrap:wrap;gap:10px;margin:22px 0}.info-links a{padding:8px 12px;border:1px solid var(--line);border-radius:8px;color:var(--text);text-decoration:none}.guide-card{padding:24px;margin:20px 0;background:var(--panel);border:1px solid var(--line);border-radius:13px;scroll-margin-top:16px}.guide-card h2{font-size:22px}.guide-card p,.guide-card li{max-width:80ch;line-height:1.7}.guide-card li{margin:8px 0}.guide-card figure{margin:20px 0}.guide-card img{display:block;width:100%;height:auto;border:1px solid var(--line);border-radius:9px}.guide-card figcaption{color:var(--muted);font-size:13px;margin-top:10px}.release-entry{border-top:1px solid var(--line);padding-top:16px;margin-top:18px}.release-entry h3{margin:0 0 6px}.release-entry ul{padding-left:22px}#release-dialog{max-width:600px}.guide-card a{color:var(--accent)}@media(max-width:600px){.workspace-tabs{padding:10px 14px}.info-panel{padding:18px 12px 40px}.info-heading h1{font-size:26px}.guide-card{padding:17px}.guide-card h2{font-size:20px}.info-links{gap:7px}.info-links a{font-size:13px}}

/* Keep Coming up independent of the calendar page. */
@media(min-width:1201px){.upcoming{position:sticky;top:16px;display:flex;flex-direction:column;max-height:calc(100dvh - 184px)}.upcoming>.section-heading{flex:0 0 auto}#upcoming-list{min-height:0;overflow-y:auto;overscroll-behavior-y:contain;scrollbar-gutter:stable;padding-right:6px;touch-action:pan-y}}

/* Keep the calendar inside the current window; only its lists scroll. */
.calendar-mode{height:100dvh;overflow:hidden}.calendar-mode #workspace{height:100dvh;display:flex;flex-direction:column;overflow:hidden}.calendar-mode .app-header,.calendar-mode .workspace-tabs{flex-shrink:0}.calendar-mode #calendar-workspace{flex:1;min-height:0;overflow:hidden}.calendar-mode main{min-height:0;height:100%;align-items:stretch;padding:16px;overflow:hidden;display:grid}.calendar-mode .calendar-panel{display:flex;flex-direction:column;min-height:0;height:100%}.calendar-mode .toolbar{flex-shrink:0}.calendar-mode .month-grid{flex:1;min-height:0;grid-template-rows:40px repeat(6,minmax(0,1fr))}.calendar-mode .month-grid[data-view=Week]{grid-template-rows:40px minmax(0,1fr)}.calendar-mode .day-cell{min-height:0;height:auto;padding:4px 5px}.calendar-mode .date-number{height:20px;margin-bottom:2px}.calendar-mode .upcoming{position:static;height:100%;min-height:0;max-height:none;display:flex;flex-direction:column}.calendar-mode #upcoming-list{flex:1;min-height:0;overflow-y:auto;overscroll-behavior-y:contain;scrollbar-gutter:stable}.calendar-mode #day-agenda{min-height:0;flex:1;overflow-y:auto;overscroll-behavior-y:contain}.calendar-mode .sidebar{min-height:0}.calendar-mode .sidebar-bottom{padding-top:12px}@media(max-width:1200px){.calendar-mode .upcoming{display:none}}@media(max-width:700px){.calendar-mode main{padding:8px 7px}.calendar-mode .month-grid{grid-template-rows:30px repeat(6,minmax(0,1fr))}.calendar-mode .month-grid[data-view=Week]{grid-template-rows:30px minmax(0,1fr)}.calendar-mode .day-cell{padding:2px}.calendar-mode .date-number{height:18px;width:20px;font-size:11px}.calendar-mode .weekday{padding:5px 0}.calendar-mode .toolbar{padding:8px;gap:6px}.calendar-mode .workspace-tabs{padding:6px 14px}.calendar-mode .workspace-tabs button{padding:6px 14px;min-height:36px}.calendar-mode .sidebar{padding-top:6px;padding-bottom:6px;flex-shrink:0}.calendar-mode .sidebar .section-heading{min-height:30px}.calendar-mode .sidebar>button{min-height:28px;padding:3px 0}.calendar-mode .calendar-entry{padding-top:4px;padding-bottom:4px}.calendar-mode .more{font-size:10px;line-height:12px}}

/* Full-screen phone calendar; desktop controls retain their existing layout. */
.phone-only{display:none}#phone-menu-dialog{margin:0;max-width:min(360px,94vw);width:94vw;max-height:100dvh;height:100dvh;border-radius:0 14px 14px 0;padding:20px;overflow-y:auto}#phone-menu-dialog .sidebar{border:0;padding:0;gap:12px;display:flex;flex-direction:column}#phone-menu-dialog #calendar-list{display:block}#phone-menu-dialog .calendar-entry{display:grid;grid-template-columns:1fr auto;margin-bottom:6px;max-width:none;padding:10px}#phone-menu-dialog .calendar-entry .name{max-width:230px}#phone-menu-dialog .sidebar>button{width:100%;border:1px solid var(--line);min-height:44px;padding:10px}#phone-menu-dialog .sidebar-bottom{display:block;margin-top:10px;padding-top:10px}.phone-account-actions{display:flex;gap:10px;margin-top:20px}.phone-account-actions button{flex:1}
@media(max-width:700px),(max-height:500px) and (pointer:coarse){
 #phone-menu{display:inline-grid;place-items:center;font-size:24px;padding:0;width:42px;height:42px;min-height:42px;background:transparent;border:0}.app-header{height:calc(60px + env(safe-area-inset-top,0px));padding:env(safe-area-inset-top,0px) 12px 0;justify-content:flex-start;gap:12px;position:sticky;top:0;background:var(--bg);z-index:20}.app-header .brand{font-size:22px;gap:8px}.app-header .header-actions,.workspace-tabs{display:none}.calendar-mode #workspace{padding-bottom:calc(64px + env(safe-area-inset-bottom,0px))}.calendar-mode #calendar-workspace{display:flex;flex-direction:column}.calendar-mode main{flex:1;min-height:0;padding:0 6px 6px}.calendar-mode .calendar-panel{border-radius:0 0 10px 10px}.calendar-mode .toolbar{display:grid;grid-template-columns:1fr auto;gap:5px;padding:10px 8px}.calendar-mode .toolbar .nav{display:contents}.calendar-mode .toolbar h1{grid-column:1;grid-row:1;text-align:center;font-size:20px;margin:0 33px;white-space:nowrap}.calendar-mode #previous,.calendar-mode #next{grid-row:1;grid-column:1;width:32px;height:40px;min-height:40px;padding:0;font-size:25px;z-index:1}.calendar-mode #next{justify-self:end}.calendar-mode #today{grid-row:1;grid-column:2;min-height:40px;padding:7px 9px}.calendar-mode .view-actions{display:none}.calendar-mode .month-grid{grid-template-rows:32px repeat(6,minmax(0,1fr))}.calendar-mode .weekday{font-size:11px;padding:7px 0}.calendar-mode .day-cell{padding:5px 3px;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;touch-action:manipulation}.calendar-mode .date-number{font-size:13px;height:24px;width:24px;margin-bottom:4px}.calendar-mode .selected-day .date-number{border-radius:50%;outline:2px solid var(--accent);outline-offset:0}.calendar-mode .selected-day:not(.today) .date-number{background:#5e478a;color:#fff}.calendar-mode .chip{font-size:10px;padding:2px 3px;line-height:17px;height:21px;margin:2px 0}.calendar-mode .more{font-size:10px;line-height:14px}.calendar-mode .upcoming{display:none}.calendar-mode #day-agenda{padding:8px 12px 78px}.calendar-mode #day-agenda .agenda-event{padding:15px 12px;margin:10px 0}.calendar-mode #day-agenda .agenda-event strong{font-size:17px}.calendar-mode #day-agenda .agenda-event .meta{font-size:14px}body:has(#day-agenda:not([hidden])) #period-title{font-size:16px;white-space:normal;line-height:1.2}#phone-tabs{display:grid;grid-template-columns:repeat(3,1fr);position:fixed;bottom:0;left:0;right:0;height:calc(64px + env(safe-area-inset-bottom,0px));padding:5px 12px env(safe-area-inset-bottom,0px);background:#151a24;border-top:1px solid var(--line);z-index:30}#phone-tabs button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:0;min-height:50px;background:transparent;border:0;border-radius:8px;color:var(--muted);padding:0;font-size:12px}#phone-tabs button>span:first-child{font-size:25px;line-height:30px}#phone-tabs button[aria-selected=true]{color:#cfb8ff;background:#241e34}#phone-add-event{display:grid;place-items:center;position:fixed;right:17px;bottom:calc(80px + env(safe-area-inset-bottom,0px));height:52px;width:52px;min-height:52px;border-radius:50%;border:1px solid #d0bafa;background:var(--accent);color:#20172e;font-size:34px;line-height:1;padding:0;box-shadow:0 3px 14px #0005;z-index:25}.info-panel{padding-bottom:100px}dialog{max-height:calc(100dvh - env(safe-area-inset-top,0px) - 20px)}
}

@media(max-width:700px),(max-height:500px) and (pointer:coarse){.calendar-mode .chip{font-size:11px}#phone-tabs button{-webkit-tap-highlight-color:transparent}}

/* All seven themes use the same native Upland Heritage structure. */
.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}
:root[data-theme]{color-scheme:light;--bg:#3d3227;--panel:#f2eddf;--line:#bfb6a1;--text:#28261d;--muted:#6c695a;--accent:#535c3b;--input:#faf6ed;--hero-text:#faf1dc;--on-accent:#fff9e9;--heading-font:Georgia,'Times New Roman',serif;--hero-base:#463625}
:root[data-theme=marshland]{--bg:#333b27;--panel:#f2efdf;--line:#b2b39a;--text:#252c20;--muted:#626a53;--accent:#4a5736;--input:#faf7ed;--hero-base:#3e492f}
:root[data-theme=hunting]{--bg:#342416;--panel:#f0e9dc;--line:#b4a287;--text:#30281a;--muted:#6e634e;--accent:#30472d;--input:#f9f3e7;--hero-base:#4a2f1d;--hero-text:#f1d28d}
:root[data-theme=canvas]{--bg:#49462f;--panel:#e9dfc7;--line:#ada184;--text:#2b3022;--muted:#6a6c53;--accent:#4a5134;--input:#f5ecd9;--hero-base:#363d2a;--hero-text:#f5e6bc;--heading-font:'Arial Narrow',Impact,Arial,sans-serif}
:root[data-theme=faith-journal]{--bg:#613135;--panel:#fff9f2;--line:#d3b69a;--text:#492923;--muted:#85645c;--accent:#963e50;--input:#fffdfa;--hero-base:#63272d;--hero-text:#fff0d7}
:root[data-theme=wilderness]{color-scheme:dark;--bg:#20170f;--panel:#282b1d;--line:#5d583d;--text:#f4ecd8;--muted:#c2bea5;--accent:#c78c4d;--input:#343727;--hero-base:#293123;--hero-text:#fff4e1;--on-accent:#261a0e;--heading-font:'Segoe UI',Arial,sans-serif}
:root[data-theme=faith-field]{--bg:#36462f;--panel:#f4ead4;--line:#bdb89b;--text:#2c3c28;--muted:#6c7258;--accent:#465937;--input:#fbf5e7;--hero-base:#4b5b3a;--hero-text:#fff3d9}
:root[data-theme] button{background:var(--input);color:var(--text);border-color:var(--line)}:root[data-theme] button:hover{background:color-mix(in srgb,var(--accent) 15%,var(--panel))}:root[data-theme] button.primary{background:var(--accent);color:var(--on-accent);border-color:var(--accent)}:root[data-theme] label{color:var(--text)}:root[data-theme] input,:root[data-theme] select,:root[data-theme] textarea{color:var(--text);background:var(--input);border-color:var(--line)}:root[data-theme] button.danger{background:color-mix(in srgb,#be4354 12%,var(--panel));color:#a1263d;border-color:#ad5866}:root[data-theme=wilderness] button.danger{color:#ffc2cc}
:root[data-theme] h1,:root[data-theme] h2,:root[data-theme] h3{font-family:var(--heading-font)}:root[data-theme] .calendar-panel,:root[data-theme] .upcoming,:root[data-theme] .sidebar{background:linear-gradient(120deg,#ffffff10,transparent 65%),var(--panel);border-color:var(--line)}:root[data-theme] .sidebar{margin:16px 0 16px 16px;border:1px solid var(--line);border-radius:12px;padding:18px;gap:15px;overflow:auto}:root[data-theme] .calendar-mode .app-layout{grid-template-columns:235px 1fr}:root[data-theme] .app-layout{grid-template-columns:235px 1fr}:root[data-theme] .calendar-mode main{gap:16px;padding:16px;grid-template-columns:minmax(0,1fr) 250px}:root[data-theme] .calendar-panel{border-radius:12px}:root[data-theme] .toolbar{padding:14px;grid-template-columns:1fr auto 1fr;gap:10px}:root[data-theme] .toolbar h1{font-size:clamp(23px,2.1vw,34px);letter-spacing:-.6px}:root[data-theme] .weekday{background:color-mix(in srgb,var(--accent) 9%,var(--panel));color:var(--text);font-family:var(--heading-font);text-transform:uppercase;letter-spacing:1px;font-size:13px}:root[data-theme] .date-number{font-family:var(--heading-font);font-size:16px}:root[data-theme] .day-cell:hover{background:color-mix(in srgb,var(--accent) 8%,var(--panel))}:root[data-theme] .day-cell.outside .date-number{color:var(--muted);opacity:.65}:root[data-theme] .day-cell.today .date-number{background:var(--accent);color:var(--on-accent)}:root[data-theme] .chip{background:color-mix(in srgb,var(--event-color,#777) 17%,var(--panel));color:var(--text)}:root[data-theme] .agenda-event{color:var(--text);background:color-mix(in srgb,var(--event-color,#777) 8%,var(--panel));border-color:var(--line);border-left-color:var(--event-color,var(--accent))}:root[data-theme] .agenda-event .meta{color:var(--muted)}:root[data-theme] .calendar-entry{border-color:var(--line)}:root[data-theme] .calendar-entry button{background:transparent}:root[data-theme] .segmented .selected{background:var(--accent);color:var(--on-accent)}:root[data-theme] .segmented button{background:transparent}:root[data-theme] dialog{border-color:var(--line)}:root[data-theme] .guide-card{background:var(--panel);border-color:var(--line)}:root[data-theme] .info-links a{background:var(--panel);color:var(--text)}:root[data-theme] .auth{background:radial-gradient(ellipse at 75% 10%,color-mix(in srgb,var(--accent) 15%,var(--panel)),var(--panel))}:root[data-theme] .auth .brand{font-family:var(--heading-font)}
:root[data-theme] .app-header{position:relative;height:164px;flex-shrink:0;padding:0;border:0;background:var(--hero-base);overflow:hidden;isolation:isolate}:root[data-theme] #theme-pattern,:root[data-theme] #theme-scene{position:absolute;inset:0;pointer-events:none;z-index:-2;overflow:hidden}:root[data-theme] #theme-scene{left:45%}:root[data-theme] #theme-pattern svg,:root[data-theme] #theme-scene svg,:root[data-theme] #theme-emblem svg{width:100%;height:100%;display:block}:root[data-theme] .app-header::after{content:'';position:absolute;inset:0;background:linear-gradient(90deg,#0003,transparent 55%);z-index:-1;pointer-events:none}:root[data-theme] .app-header .brand{position:absolute;left:30px;top:25px;font-family:var(--heading-font);font-size:30px;letter-spacing:4px;color:var(--hero-text);font-weight:500;gap:9px;text-shadow:0 1px 6px #0007}:root[data-theme] .app-header .brand>span{font:inherit;letter-spacing:inherit;color:inherit}:root[data-theme] #theme-emblem{width:68px;height:90px;margin-top:-10px;margin-bottom:-35px}:root[data-theme] #theme-emblem:empty{display:none}:root[data-theme] .header-actions{position:absolute;right:22px;top:21px;z-index:3;gap:9px}:root[data-theme] .header-actions #account-name{color:var(--hero-text);background:#0005;border-radius:8px;padding:6px 9px;font-size:12px;max-width:120px}:root[data-theme] .header-actions button,:root[data-theme] .header-actions select{min-height:38px;padding:7px 10px;background:color-mix(in srgb,var(--panel) 95%,transparent);color:var(--text);border-color:var(--line)}:root[data-theme] .theme-picker{margin:0;width:190px}:root[data-theme] .app-header .workspace-tabs{position:absolute;bottom:14px;left:28px;margin:0;padding:0;border:0;gap:20px;z-index:2}:root[data-theme] .app-header .workspace-tabs button{background:transparent;color:var(--hero-text);border:0;border-bottom:3px solid transparent;border-radius:0;font-family:var(--heading-font);font-size:16px;letter-spacing:1px;padding:6px 12px}:root[data-theme] .app-header .workspace-tabs [aria-selected=true]{border-bottom-color:var(--hero-text)}:root[data-theme] #sidebar-primary>button{width:100%;background:var(--accent);color:var(--on-accent);font-family:var(--heading-font);font-size:17px;margin-bottom:9px;min-height:44px}:root[data-theme] .sidebar .section-heading h2{text-transform:uppercase;letter-spacing:1px;font-size:14px}:root[data-theme] .sidebar>button{color:var(--text);border-color:var(--line);background:transparent;text-align:left}:root[data-theme] .upcoming .section-heading h2{font-size:24px}:root[data-theme] #phone-menu-dialog{background:var(--panel)}:root[data-theme] #phone-menu-dialog .sidebar{margin:0;border:0;padding:0;border-radius:0}:root[data-theme] #phone-menu-dialog .calendar-entry{background:var(--input);border-color:var(--line)}:root[data-theme] #theme-quote{font-family:var(--heading-font);font-style:italic;border-top:1px solid var(--line);padding:15px 0;color:var(--text)}
:root[data-theme=wilderness] .app-header>.brand{left:50%;transform:translateX(-50%);font-size:28px;letter-spacing:2px;white-space:nowrap}:root[data-theme=wilderness] #theme-scene{left:0;opacity:.65}:root[data-theme=wilderness] .app-header::after{background:linear-gradient(#1117,#1113)}:root[data-theme=faith-journal] #theme-pattern{background:linear-gradient(120deg,#35141944,transparent)}:root[data-theme=faith-journal] .app-header .brand::before{content:'✝';color:#dbbd87;font-size:36px;margin-right:10px}
@media(min-width:701px) and (max-width:1200px){:root[data-theme] .calendar-mode main{grid-template-columns:minmax(0,1fr)}:root[data-theme] .toolbar{grid-template-columns:auto 1fr}:root[data-theme] .toolbar h1{text-align:right}:root[data-theme] .view-actions{grid-column:1/-1}:root[data-theme] .header-actions #account-name{display:none}:root[data-theme] .app-header .brand{font-size:25px;letter-spacing:2px}:root[data-theme] .theme-picker{width:165px}}
@media(max-width:700px),(max-height:500px) and (pointer:coarse){
 :root[data-theme] .app-header{height:calc(clamp(100px,18dvh,154px) + env(safe-area-inset-top,0px));padding:0;position:relative;top:auto}:root[data-theme] #theme-scene{left:0;top:52px;opacity:.95}:root[data-theme] .app-header::after{background:linear-gradient(#0002,transparent 75%)}:root[data-theme] .app-header .brand,:root[data-theme=wilderness] .app-header>.brand{top:calc(14px + env(safe-area-inset-top,0px));left:50%;transform:translateX(-50%);font-family:var(--heading-font);font-size:21px;letter-spacing:1.6px;gap:5px;white-space:nowrap}:root[data-theme] #phone-menu{position:absolute;left:7px;top:calc(7px + env(safe-area-inset-top,0px));z-index:4;color:var(--hero-text);height:38px;width:38px;min-height:38px;padding:0;background:#0002;border-radius:7px}:root[data-theme] #phone-header-controls{position:absolute;right:7px;top:calc(8px + env(safe-area-inset-top,0px));z-index:4}:root[data-theme] #phone-header-controls #today{position:static;display:block;min-height:36px;height:36px;padding:5px 7px;font-size:11px;background:color-mix(in srgb,var(--panel) 94%,transparent);color:var(--text);border-color:var(--line)}:root[data-theme] .header-actions,:root[data-theme] .app-header .workspace-tabs{display:none}:root[data-theme] #theme-emblem{height:38px;width:35px;margin:-6px 0 -10px 3px}:root[data-theme=faith-journal] .app-header .brand::before{font-size:24px;margin:0 2px 0 0}:root[data-theme] .calendar-mode main{grid-template-columns:minmax(0,1fr);gap:0;padding:0 5px 5px}:root[data-theme] .calendar-mode .app-layout{display:flex}:root[data-theme] .calendar-panel{border-radius:8px}:root[data-theme] .calendar-mode .toolbar{position:relative;display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);gap:0;padding:5px 4px}:root[data-theme] .calendar-mode .toolbar .nav{display:contents}:root[data-theme] .calendar-mode #period-title{grid-column:2;grid-row:1;margin:0;font-family:var(--heading-font);font-size:23px;line-height:1.2;white-space:nowrap;text-align:center;letter-spacing:0}:root[data-theme] .calendar-mode #previous,:root[data-theme] .calendar-mode #next{position:static;grid-row:1;width:32px;height:36px;min-height:36px;padding:0;font-size:25px;background:transparent;border-color:transparent;color:var(--text)}:root[data-theme] .calendar-mode #previous{grid-column:1;justify-self:end;margin:0 8px 0 0}:root[data-theme] .calendar-mode #next{grid-column:3;justify-self:start;margin:0 0 0 8px}:root[data-theme] .calendar-mode .view-actions{display:none}:root[data-theme] .calendar-mode .weekday{font-size:11px;letter-spacing:.4px;padding:7px 0}:root[data-theme] .calendar-mode .date-number{font-size:15px}:root[data-theme] .calendar-mode .selected-day .date-number{outline-color:var(--accent)}:root[data-theme] .calendar-mode .selected-day:not(.today) .date-number{background:var(--accent);color:var(--on-accent)}:root[data-theme] .calendar-mode .upcoming{display:none}:root[data-theme] #phone-tabs{background:var(--panel);border-color:var(--line)}:root[data-theme] #phone-tabs button{color:var(--muted)}:root[data-theme] #phone-tabs [aria-selected=true]{background:color-mix(in srgb,var(--accent) 13%,var(--panel));color:var(--text);border-bottom:3px solid var(--accent)}:root[data-theme] #phone-add-event{background:var(--accent);color:var(--on-accent);border-color:var(--line)}:root[data-theme] .calendar-mode .sidebar{margin:0}:root[data-theme] .calendar-mode #day-agenda .agenda-event{color:var(--text)}:root[data-theme] #phone-menu-dialog .sidebar{margin:0}:root[data-theme] #phone-menu-dialog .sidebar>button{color:var(--text)}:root[data-theme] #phone-menu-dialog .calendar-entry .name{max-width:210px}:root[data-theme] #phone-menu-dialog label{color:var(--text)}:root[data-theme] .info-panel{padding-bottom:100px}:root[data-theme] #notice{bottom:calc(72px + env(safe-area-inset-bottom,0px));top:auto}:root[data-theme] .calendar-mode:has(#day-agenda:not([hidden])) #period-title{font-size:18px;white-space:normal}:root[data-theme] .calendar-mode .chip{font-size:11px}
}

:root[data-theme=hunting] #theme-scene{left:0;top:auto;bottom:0;height:18px}:root[data-theme=hunting] .app-header::before{content:'';position:absolute;inset:7px 7px 25px;border:1px dashed #c5a66a77;pointer-events:none;z-index:-1}:root[data-theme=canvas] .app-header::before{content:'';position:absolute;inset:7px;border:1px dashed #c5b38399;pointer-events:none;z-index:-1}

:root[data-theme] .sidebar .section-heading h2{font-size:13px;letter-spacing:.7px;white-space:nowrap}:root[data-theme=faith-field]{--hero-base:#e3dcc7;--hero-text:#2d422d}:root[data-theme] .header-actions #account-name{background:var(--panel);color:var(--text)}@media(min-width:701px){:root[data-theme=upland] #theme-scene,:root[data-theme=marshland] #theme-scene,:root[data-theme=faith-field] #theme-scene{top:54px}}

@media(max-width:700px),(max-height:500px) and (pointer:coarse){:root[data-theme=hunting] .app-header,:root[data-theme=canvas] .app-header,:root[data-theme=faith-journal] .app-header{height:calc(80px + env(safe-area-inset-top,0px))}}@media(min-width:701px) and (max-width:1000px){:root[data-theme] .theme-picker{width:145px}:root[data-theme=wilderness] .app-header>.brand{font-size:22px}}

/* Readable native controls over wide artwork, with the shared Heritage layout. */
:root[data-theme] #theme-quote{margin:4px 0 0;padding:16px 0 0;font-size:15px;line-height:1.55;flex-shrink:0}
:root[data-theme] #theme-quote span,:root[data-theme] #theme-quote cite{display:block}
:root[data-theme] #theme-quote cite{font-size:13px;margin-top:7px;font-style:normal;color:var(--muted)}
:root[data-theme] .calendar-mode .date-number{font-size:18px;width:29px;height:29px;line-height:1;margin-bottom:4px}
:root[data-theme] .calendar-mode .chip{font-size:12px;line-height:18px;height:24px;padding:3px 6px}
:root[data-theme] .calendar-mode .day-cell{padding:6px}
:root[data-theme] .calendar-mode .weekday{font-size:14px;padding:9px 0}
:root[data-theme] .calendar-mode .month-grid{grid-template-rows:42px repeat(6,minmax(0,1fr))}
:root[data-theme] .calendar-mode .month-grid[data-view=Week]{grid-template-rows:42px minmax(0,1fr)}
:root[data-theme] .agenda-event strong{font-size:15px}
:root[data-theme] .agenda-event .meta,:root[data-theme] .agenda-date{font-size:13px}
:root[data-theme] .calendar-entry .access{font-size:12px}
:root[data-theme] .sidebar .section-heading h2{font-size:14px}
:root[data-theme] #theme-pattern{opacity:.7}
:root[data-theme=canvas] #theme-pattern svg{display:none}
:root[data-theme=canvas] #theme-pattern{background:repeating-linear-gradient(0deg,#f2ddaf09 0 1px,transparent 1px 3px),repeating-linear-gradient(90deg,#0002 0 1px,transparent 1px 4px);opacity:1}
:root[data-theme=upland] #theme-scene,:root[data-theme=marshland] #theme-scene,:root[data-theme=faith-field] #theme-scene{top:0;left:34%;mask-image:linear-gradient(90deg,transparent,#000 18%)}
:root[data-theme] .app-header .brand{font-size:34px;top:28px}
:root[data-theme=wilderness] .app-header>.brand{font-size:30px}
@media(min-width:1201px){
 :root[data-theme] .calendar-mode main{grid-template-columns:minmax(0,1fr) 270px}
 :root[data-theme] .calendar-mode .toolbar{padding:16px}
 :root[data-theme] .calendar-mode #period-title{font-size:34px}
 :root[data-theme] .app-header{height:176px}
}
@media(min-width:701px) and (max-width:1200px){
 :root[data-theme] .app-header .brand{font-size:27px;letter-spacing:2px}
 :root[data-theme=wilderness] .app-header>.brand{font-size:24px;top:75px}
}
@media(max-width:700px),(max-height:500px) and (pointer:coarse){
 :root[data-theme=upland] #theme-scene,:root[data-theme=marshland] #theme-scene,:root[data-theme=faith-field] #theme-scene{top:49px;left:0;mask-image:none}
 :root[data-theme] .app-header .brand,:root[data-theme=wilderness] .app-header>.brand{font-size:21px;top:calc(14px + env(safe-area-inset-top,0px));letter-spacing:1.2px}
 :root[data-theme] .calendar-mode .toolbar{padding:9px 4px}
 :root[data-theme] .calendar-mode #period-title{font-size:25px}
 :root[data-theme] .calendar-mode .weekday{font-size:12px;padding:7px 0;letter-spacing:.4px}
 :root[data-theme] .calendar-mode .month-grid{grid-template-rows:34px repeat(6,minmax(0,1fr))}
 :root[data-theme] .calendar-mode .month-grid[data-view=Week]{grid-template-rows:34px minmax(0,1fr)}
 :root[data-theme] .calendar-mode .date-number{font-size:17px;width:25px;height:25px;margin-bottom:3px}
 :root[data-theme] .calendar-mode .day-cell{padding:5px 2px}
 :root[data-theme] .calendar-mode .chip{font-size:11px;height:22px;line-height:16px;padding:3px;margin:2px 0}
 :root[data-theme] #theme-quote{font-size:16px;padding:18px 0 8px}
}
@media(max-width:350px){:root[data-theme] .app-header .brand,:root[data-theme=wilderness] .app-header>.brand{font-size:17px;letter-spacing:.6px}:root[data-theme] .calendar-mode #period-title{font-size:22px}}

/* Keep the complete scene inside an artwork area clear of account controls. */
:root[data-theme=marshland] #theme-scene,:root[data-theme=wilderness] #theme-scene,:root[data-theme=faith-field] #theme-scene{left:350px;right:450px;top:0;bottom:0;opacity:1;mask-image:none;display:flex;justify-content:center;align-items:center}
:root[data-theme=marshland] #theme-scene svg,:root[data-theme=wilderness] #theme-scene svg,:root[data-theme=faith-field] #theme-scene svg{width:auto;max-width:100%;height:100%;mask-image:linear-gradient(90deg,transparent,#000 8%,#000 92%,transparent)}
:root[data-theme=wilderness] .app-header::after{background:linear-gradient(90deg,#0001,transparent 35%,transparent 75%,#0001)}
:root[data-theme=wilderness] .app-header>.brand{text-shadow:0 1px 5px #000,0 0 12px #000;top:22px}
:root[data-theme=faith-field] #theme-pattern{top:auto;bottom:0;height:12px;opacity:.5}
:root[data-theme=faith-field] .app-header .brand{text-shadow:none}
@media(min-width:701px) and (max-width:1200px){
 :root[data-theme=marshland] #theme-scene,:root[data-theme=wilderness] #theme-scene,:root[data-theme=faith-field] #theme-scene{left:310px;right:0;top:60px}
 :root[data-theme=wilderness] .app-header>.brand{left:50%;top:22px}
}
@media(max-width:700px),(max-height:500px) and (pointer:coarse){
 :root[data-theme=marshland] #theme-scene,:root[data-theme=wilderness] #theme-scene,:root[data-theme=faith-field] #theme-scene{left:0;right:0;top:49px;bottom:0;mask-image:linear-gradient(90deg,transparent,#000 7%,#000 93%,transparent)}
 :root[data-theme=wilderness] .app-header>.brand{top:calc(14px + env(safe-area-inset-top,0px))}
 :root[data-theme=faith-field] #theme-pattern{height:8px}
}
@media(min-width:701px) and (max-width:1000px){:root[data-theme=wilderness] .app-header>.brand{top:75px}}

/* Artwork fits inside the shared header; it must not resize the calendar. */
:root[data-theme=marshland] #theme-scene,:root[data-theme=wilderness] #theme-scene,:root[data-theme=faith-field] #theme-scene{left:max(28%,calc(100% - 1380px));right:0;top:0;bottom:0;display:block;mask-image:linear-gradient(90deg,transparent,#000 15%)}
:root[data-theme=marshland] #theme-scene svg,:root[data-theme=wilderness] #theme-scene svg,:root[data-theme=faith-field] #theme-scene svg{width:100%;max-width:none;height:100%;mask-image:none}
:root[data-theme=marshland] #theme-scene svg{mask-image:linear-gradient(90deg,#000 0,#000 90%,transparent)}
:root[data-theme=wilderness] #theme-scene{mask-image:linear-gradient(90deg,transparent,#000 14%)}
:root[data-theme=wilderness] .app-header::after{background:linear-gradient(90deg,#10160e55,transparent 35%,transparent 75%,#10160e22)}
:root[data-theme=marshland] .header-actions,:root[data-theme=faith-field] .header-actions{top:auto;bottom:15px}
:root[data-theme=marshland] .header-actions{bottom:5px}
:root[data-theme=faith-field] .app-header::after{background:linear-gradient(90deg,#e3dcc7 0,transparent 40%)}
:root[data-theme=hunting] #theme-emblem{width:78px;height:88px;margin-top:-8px;margin-bottom:-32px}
:root[data-theme=canvas] #theme-emblem{width:84px;height:64px;margin-top:0;margin-bottom:-14px}
@media(min-width:701px) and (max-width:1200px){
 :root[data-theme=marshland] #theme-scene,:root[data-theme=faith-field] #theme-scene{left:30%}
 :root[data-theme=marshland] .header-actions{top:21px;bottom:auto}
 :root[data-theme=marshland] #theme-scene{top:62px}
 :root[data-theme=wilderness] .header-actions{top:21px}
}
@media(max-width:700px),(max-height:500px) and (pointer:coarse){
 :root[data-theme=marshland] #theme-scene,:root[data-theme=wilderness] #theme-scene,:root[data-theme=faith-field] #theme-scene{left:0;right:0;top:49px;bottom:0;mask-image:none}
 :root[data-theme=wilderness] .app-header::after{background:none}
 :root[data-theme=faith-field] .app-header::after{background:none}
 :root[data-theme=hunting] #theme-emblem{height:38px;width:38px;margin:-6px 0 -10px 3px}
 :root[data-theme=canvas] #theme-emblem{height:32px;width:40px;margin:0 0 -7px 3px}
}
