/* Shared Home layout. Activity uses the existing authorized state projection. */
.home-activity-layout,.home-main-column { min-width:0; }
html body #home-recent-activity[hidden] { display:none; }
html body #home-recent-activity { align-self:start; margin:0 0 16px; padding:12px; border:1px solid var(--theme-border,#d4ded7); border-radius:16px; background:var(--theme-surface,#fff); color:var(--theme-text,#17291e); }
#home-recent-activity header { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:4px; }
#home-activity-title { margin:0; font-size:.95rem; }
#home-recent-activity header button { min-height:44px; padding:8px; border:0; background:transparent; color:var(--church-green,#28623e); font:inherit; cursor:pointer; }
#home-recent-activity .home-activity-feed { display:grid; gap:0; list-style:none; margin:0; padding:0; }
.home-activity-feed li { display:grid; grid-template-columns:58px minmax(0,1fr); gap:8px; padding:7px 0; border-top:1px solid var(--theme-border,#d4ded7); font-size:.78rem; line-height:1.35; overflow-wrap:anywhere; }
.home-activity-feed time { color:var(--theme-muted,#52645a); font-size:.72rem; font-weight:600; }
.home-activity-feed strong { display:block; }
.home-activity-feed span { color:var(--theme-muted,#52645a); }
.home-activity-feed .home-activity-empty { display:block; padding:8px 0; }
@media(min-width:1050px) {
 html body #app-view .home-main-column > #home-favorite-slot { width:calc(100% - 36px); margin:0 18px 16px; }

 html body #app-view.sunday-screen > .home-activity-layout { width:min(1050px,100%); max-width:none; }
 html body #app-view.sunday-screen > .event-summary { width:min(1050px,100%); }
 html body #app-view.sunday-screen > header.shared-header { position:relative; z-index:5; width:min(1050px,100%); height:0; min-height:0; padding:0; margin-block:0; border:0; gap:0; }
 html body #app-view.sunday-screen > .shared-header > .brand-version-lockup { display:none; }
 html body #app-view.sunday-screen > .shared-header > .shared-header-actions { position:absolute; top:8px; right:0; }
 html body #app-view.sunday-screen > .event-summary { min-height:62px; padding:4px 64px 4px 18px; margin-block:0; }
 html body #app-view.sunday-screen > .shared-header > .account-menu { top:58px; right:0; }


 html body .home-activity-layout:has(#home-recent-activity:not([hidden])) { display:grid; grid-template-columns:minmax(0,1fr) minmax(280px,340px); gap:20px; align-items:start; }
 html body #app-view .home-activity-layout .assignment-home-surface { width:100%; max-width:none; margin-inline:0; padding-top:0; }
}

/* Desktop workspace: assignment and check-in share a row; tools use columns. */
@media(min-width:1050px) {
 html body.shared-app-active .shared-shell { width:calc(100% - 48px); max-width:1680px; }
 html body #app-view.sunday-screen > :is(.home-activity-layout,.event-summary,header.shared-header) { width:100%; max-width:none; }
 html body #app-view.sunday-screen > .home-activity-layout:has(#home-recent-activity:not([hidden])) { grid-template-columns:minmax(0,1fr) minmax(300px,360px); gap:24px; }
 html body #app-view.sunday-screen .home-main-column .assignment-home-surface { display:grid; grid-template-columns:minmax(0,1.35fr) minmax(220px,1fr); gap:12px; padding:0; }
 html body #app-view.sunday-screen .home-main-column .assignment-hero { grid-column:1 / -1; grid-row:1; margin:0; min-height:112px; padding:16px; border-radius:12px; display:grid; grid-template-columns:minmax(0,1fr) auto; align-content:center; gap:6px 16px; }
 html body #app-view.sunday-screen .home-main-column .assignment-hero .home-assignment-heading { grid-column:1 / -1; }
 html body #app-view.sunday-screen .home-main-column .assignment-hero h2 { grid-column:1; grid-row:2; }
 html body #app-view.sunday-screen .home-main-column .assignment-hero .assignment-time { grid-column:2; grid-row:2; margin:0; align-self:center; }
 html body #app-view.sunday-screen .home-main-column .assignment-hero #next-duty-card { grid-column:1 / -1; }
 html body #app-view.sunday-screen .home-main-column .today-actions { grid-column:2; grid-row:1; display:flex; align-items:stretch; margin:0; padding:0; }
 html body #app-view.sunday-screen .home-main-column #presence-toggle { width:100%; height:100%; min-height:0; margin:0; padding:16px; border-radius:12px; display:flex; flex-wrap:wrap; justify-content:space-between; gap:12px; }
 html body #app-view.sunday-screen .home-main-column #home-lower-section { grid-column:1 / -1; grid-row:2; display:grid; grid-template-columns:1fr 1fr; gap:12px; margin:0; padding:0; }
 html body #app-view.sunday-screen .home-main-column #home-lower-section > .home-issues-card { grid-column:1 / -1; }
 html body #app-view.sunday-screen .home-main-column .home-lower-actions { grid-column:1 / -1; margin:0; gap:12px; }
 html body #app-view.sunday-screen .home-main-column #home-lower-section .home-guide-link { min-height:64px; margin:0; border-radius:12px; }
 html body #app-view.sunday-screen .home-main-column > #home-favorite-slot { width:100%; margin:12px 0 0; }
 html body #app-view.sunday-screen > .event-summary { min-height:58px; padding-left:0; }
 html body #app-view.sunday-screen .home-main-column #home-favorite-prompt { width:100%; max-width:none; box-sizing:border-box; margin:0; }
 html body #app-view.sunday-screen > #home-refresh-status { width:100%; margin-top:16px; }
}

/* Consistent desktop alignment and compact controls. */
@media(min-width:1050px) {
 html body #app-view.sunday-screen .home-main-column .assignment-hero { grid-template-columns:minmax(0,1fr); gap:5px; min-height:0; padding:16px 18px; }
 html body #app-view.sunday-screen .home-main-column .assignment-hero .assignment-time { grid-column:1; grid-row:3; justify-self:start; font-size:.9rem; }
 html body #app-view.sunday-screen .home-main-column .assignment-hero #next-duty-card { grid-row:4; }
 html body #app-view.sunday-screen .home-main-column #presence-toggle { justify-content:flex-start; gap:12px; padding:14px 16px; }
 html body #app-view.sunday-screen .home-main-column #presence-toggle .presence-action-copy { flex:1; text-align:left; }
 html body #app-view.sunday-screen .home-main-column #presence-toggle .presence-action-cue { margin-left:auto; }
 html body #app-view.sunday-screen .home-main-column .home-lower-actions > :is(button,a),
 html body #app-view.sunday-screen .home-main-column #home-lower-section .home-guide-link { min-height:56px; height:auto; padding:12px 16px; border-radius:12px; }
 html body #app-view.sunday-screen .home-main-column > #home-favorite-slot { display:block; width:100%; max-width:none; }
 html body #app-view.sunday-screen .home-main-column #home-favorite-slot #home-favorite-prompt { width:100%; max-width:none; padding:14px 16px; border-radius:12px; }
 html body #app-view.sunday-screen .home-main-column #home-favorite-prompt h2 { font-size:.95rem; }
 html body #app-view.sunday-screen .home-main-column #home-favorite-prompt p { margin:3px 0 0; }
 html body #home-recent-activity { border-radius:12px; }
}

/* Desktop revision: a work surface rather than enlarged phone tiles. */
@media(min-width:1050px) {
 html body #app-view.sunday-screen > .home-activity-layout:has(#home-recent-activity:not([hidden])) { grid-template-columns:minmax(0,1fr) 340px !important; gap:20px !important; }
 html body #app-view.sunday-screen .home-main-column { padding:0 !important; background:var(--theme-surface,#fff) !important; border:1px solid var(--theme-border,#d4ded7) !important; border-radius:10px !important; overflow:hidden !important; }
 html body #app-view.sunday-screen .home-main-column .assignment-home-surface { display:block !important; padding:0 !important; }
 html body #app-view.sunday-screen .home-main-column .assignment-hero { display:grid !important; grid-template-columns:minmax(0,1fr) auto !important; gap:3px 20px !important; border:0 !important; border-radius:0 !important; box-shadow:none !important; min-height:0 !important; padding:14px 18px !important; }
 html body #app-view.sunday-screen .home-main-column .assignment-hero .home-assignment-heading { grid-column:1 !important; grid-row:1 !important; }
 html body #app-view.sunday-screen .home-main-column .assignment-hero h2 { grid-column:1 !important; grid-row:2 !important; font-size:1.4rem !important; }
 html body #app-view.sunday-screen .home-main-column .assignment-hero .assignment-time { grid-column:2 !important; grid-row:1 / 3 !important; align-self:center !important; font-size:.85rem !important; }
 html body #app-view.sunday-screen .home-main-column .assignment-hero #next-duty-card { grid-column:1 / -1 !important; grid-row:3 !important; }
 html body #app-view.sunday-screen .home-main-column #home-lower-section { display:flex !important; flex-direction:column !important; gap:0 !important; padding:0 18px !important; }
 html body #app-view.sunday-screen .home-main-column #home-lower-section > *,
 html body #app-view.sunday-screen .home-main-column #home-lower-section .home-guide-link { width:100% !important; margin:0 !important; border:0 !important; border-bottom:1px solid var(--theme-border,#d4ded7) !important; border-radius:0 !important; box-shadow:none !important; background:transparent !important; }
 html body #app-view.sunday-screen .home-main-column #presence-toggle { min-height:58px !important; padding:8px 0 !important; border:0 !important; border-bottom:1px solid var(--theme-border,#d4ded7) !important; border-radius:0 !important; box-shadow:none !important; background:transparent !important; }
 html body #app-view.sunday-screen .home-main-column .home-issues-card { padding:12px 0 !important; }
 html body #app-view.sunday-screen .home-main-column .home-lower-actions { display:flex !important; justify-content:flex-start !important; gap:10px !important; padding:10px 0 !important; }
 html body #app-view.sunday-screen .home-main-column .home-lower-actions > :is(button,a) { flex:0 0 auto !important; width:auto !important; min-height:42px !important; padding:8px 16px !important; border-radius:7px !important; box-shadow:none !important; font-size:.85rem !important; }
 html body #app-view.sunday-screen .home-main-column #home-lower-section .home-guide-link { min-height:54px !important; padding:9px 0 !important; justify-content:flex-start !important; }
 html body #app-view.sunday-screen .home-main-column #home-lower-section .home-guide-link > :last-child { margin-left:auto !important; }
 html body #app-view.sunday-screen .home-main-column > #home-favorite-slot { margin:0 !important; padding:0 18px !important; }
 html body #app-view.sunday-screen .home-main-column #home-favorite-slot #home-favorite-prompt { border:0 !important; border-radius:0 !important; box-shadow:none !important; padding:12px 0 !important; background:transparent !important; }
 html body #app-view.sunday-screen .home-main-column #home-favorite-prompt .eyebrow { display:none !important; }
 html body #app-view.sunday-screen .home-main-column #home-favorite-prompt button { min-height:38px !important; padding:8px 12px !important; border-radius:7px !important; }
 html body #home-recent-activity { border-radius:10px !important; }
}

/* Final desktop typography, alignment and interaction finish. */
@media(min-width:1050px) {
 html body #app-view.sunday-screen .home-main-column .assignment-hero { grid-template-columns:minmax(0,1fr) !important; gap:4px !important; padding:16px 18px !important; }
 html body #app-view.sunday-screen .home-main-column .assignment-hero .home-assignment-heading { grid-row:1 !important; }
 html body #app-view.sunday-screen .home-main-column .assignment-hero h2 { grid-row:2 !important; margin:0 !important; font-size:1.55rem !important; line-height:1.25 !important; }
 html body #app-view.sunday-screen .home-main-column .assignment-hero .assignment-time { grid-column:1 !important; grid-row:3 !important; justify-self:start !important; margin:0 !important; font-size:.84rem !important; font-weight:500 !important; }
 html body #app-view.sunday-screen .home-main-column .assignment-hero #next-duty-card { grid-row:4 !important; margin-top:6px !important; font-size:.8rem !important; }
 html body #app-view.sunday-screen .home-main-column #presence-toggle { display:grid !important; grid-template-columns:28px minmax(0,1fr) auto !important; justify-content:flex-start !important; gap:10px !important; }
 html body #app-view.sunday-screen .home-main-column #presence-toggle::before { display:none !important; }
 html body #app-view.sunday-screen .home-main-column #presence-toggle .presence-action-copy { flex:1 !important; justify-self:start !important; align-items:flex-start !important; text-align:left !important; }
 html body #app-view.sunday-screen .home-main-column #presence-toggle :is(.presence-line,#presence-title) { text-align:left !important; justify-content:flex-start !important; }
 html body #app-view.sunday-screen .home-main-column #home-lower-section .home-guide-link { gap:12px !important; font-size:.9rem !important; }
 html body #app-view.sunday-screen .home-main-column .lower-row-icon { width:22px !important; height:22px !important; flex:0 0 22px !important; }
 html body #app-view.sunday-screen .home-main-column .home-issues-card { padding:14px 0 8px !important; }
 html body #app-view.sunday-screen .home-main-column .home-lower-actions { padding:12px 0 !important; }
 html body #app-view.sunday-screen .home-main-column #home-favorite-prompt { gap:16px !important; }
 html body #app-view.sunday-screen .home-main-column #home-favorite-prompt p { font-size:.76rem !important; color:var(--theme-muted,#52645a) !important; }
 html body #app-view.sunday-screen .home-main-column #home-favorite-prompt button { background:transparent !important; color:var(--theme-text,#173b2a) !important; border:1px solid var(--theme-border,#d4ded7) !important; font-size:.78rem !important; }
 html body #home-recent-activity { padding:12px 14px !important; }
 html body #home-recent-activity header { margin-bottom:0 !important; }
 html body #home-recent-activity header button { font-size:.78rem !important; font-weight:600 !important; color:var(--theme-text,#173b2a) !important; }
 html body #home-recent-activity .home-activity-feed li { padding:10px 0 !important; font-size:.8rem !important; line-height:1.45 !important; }
 html body #home-recent-activity .home-activity-feed strong { margin-bottom:2px !important; font-weight:650 !important; }
 html body #app-view.sunday-screen .home-main-column :is(button,a):focus-visible,
 html body #home-recent-activity button:focus-visible { outline:2px solid #4a8960 !important; outline-offset:3px !important; }
 html body #app-view.sunday-screen .home-main-column #home-lower-section .home-guide-link:hover { background:var(--theme-surface-strong,#f3f7f4) !important; }
}

html[data-theme="dark"] #app-view .app-navigation-brand .theme-logo-light { display:none !important; }
html[data-theme="dark"] #app-view .app-admin-utility { color:#d5e4d9; }

/* Computer accounts are operational identities, not roster members. */
html body #app-view.computer-home .home-main-column .assignment-home-surface .assignment-hero,
html body #app-view.computer-home #home-lower-section #presence-toggle,
html body #app-view.computer-home #sunday-presence-prompt,
html body #app-view.computer-home #location-check-prompt { display:none !important; }

html body #app-view .home-sunday-out[hidden] { display:none !important; }
html body #app-view.sunday-screen > .home-sunday-out { width:100%; display:flex; align-items:center; gap:16px; margin:16px 0 0; padding:10px 14px; border:1px solid var(--theme-border,#d4ded7); border-radius:8px; background:var(--theme-surface,#fff); color:var(--theme-text,#173b2a); font-size:.8rem; }
.home-sunday-out > strong { white-space:nowrap; }
.home-sunday-out strong small { margin-left:5px; color:var(--theme-muted,#52645a); }
.sunday-out-names { display:flex; align-items:center; gap:8px; overflow:auto; min-width:0; flex:1; }
.sunday-out-names > span { display:flex; align-items:center; gap:6px; white-space:nowrap; padding:5px 9px; background:var(--theme-surface-strong,#f1f5f2); border-radius:5px; }
.sunday-out-names small { color:var(--theme-muted,#52645a); }
.home-sunday-out > a { color:inherit; white-space:nowrap; min-height:32px; display:flex; align-items:center; }

@media(max-width:759px) { html body #app-view.sunday-screen > .home-sunday-out { flex-wrap:wrap; gap:6px 12px; box-sizing:border-box; } .home-sunday-out > a { margin-left:auto; } .home-sunday-out .sunday-out-names { order:3; flex-basis:100%; } }

/* Dense activity; scroll the list without moving the surrounding workspace. */
html body #home-recent-activity .home-activity-feed { max-height:min(65vh,640px); overflow-y:auto; overscroll-behavior:contain; scrollbar-gutter:stable; }
html body #home-recent-activity .home-activity-feed li { grid-template-columns:52px minmax(0,1fr); gap:6px; padding:6px 0 !important; font-size:12px !important; line-height:1.35 !important; }
html body #home-recent-activity .home-activity-feed time { font-size:11px; }
html body #home-recent-activity .home-activity-feed strong { margin-bottom:1px !important; }

/* Readable desktop proportions instead of stretching to fill the monitor. */
@media(min-width:1050px) {
 html body #app-view.sunday-screen > .home-activity-layout,
 html body #app-view.sunday-screen > .event-summary,
 html body #app-view.sunday-screen > header.shared-header,
 html body #app-view.sunday-screen > .home-sunday-out,
 html body #app-view.sunday-screen > #home-refresh-status { width:min(1120px,100%) !important; max-width:1120px !important; margin-left:0 !important; margin-right:0 !important; }
 html body #app-view.sunday-screen > .home-activity-layout:has(#home-recent-activity:not([hidden])) { grid-template-columns:minmax(0,760px) 340px !important; }
 html body #app-view.sunday-screen > .home-activity-layout:not(:has(#home-recent-activity:not([hidden]))) { max-width:760px !important; }
}
