#calendar-expanded-dialog{z-index:2500;padding:12px}
#calendar-expanded-dialog::part(panel){display:flex;flex-direction:column;box-sizing:border-box;width:min(1280px,calc(100vw - 32px));max-width:calc(100vw - 32px);height:min(900px,calc(100dvh - 32px));max-height:calc(100dvh - 32px);padding:20px;background:rgb(var(--mdui-color-surface-container-high));color:var(--text-main)}
#calendar-expanded-dialog::part(body){display:flex;flex-direction:column;flex:1;min-height:0;min-width:0;padding:0;overflow:hidden}
#calendar-expanded-dialog::part(header){padding:0 0 8px}
#calendar-expanded-dialog::part(action){display:none}
.ce-heading{display:flex;align-items:center;justify-content:space-between;width:100%;gap:12px}
.ce-heading mdui-button-icon,.ce-toolbar mdui-button-icon{color:inherit;flex:none}
.ce-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;padding-bottom:8px;flex:none}
.ce-navigation{display:flex;align-items:center;gap:4px;min-width:0}
.ce-navigation>strong{min-width:130px;font-size:1rem;text-align:center;overflow-wrap:anywhere}
.ce-tools{display:flex;align-items:center}
.ce-views{display:flex;border-radius:24px;padding:4px;background:rgba(128,128,128,.12);gap:2px}
.ce-views button{min-height:36px;min-width:58px;padding:6px 16px;border:0;border-radius:20px;background:transparent;color:inherit;font:inherit;font-size:.85rem;cursor:pointer}
.ce-views button[aria-pressed=true]{background:rgb(var(--mdui-color-primary-container));color:rgb(var(--mdui-color-on-primary-container));box-shadow:0 1px 4px #0002}
.ce-legend{display:flex;flex-wrap:wrap;gap:8px 16px;font-size:.72rem;line-height:1.6;padding:4px 0 10px;flex:none;max-height:60px;overflow:auto;scrollbar-width:thin}
.ce-legend>span{overflow-wrap:anywhere}
.ce-legend>span[style]::before{content:'';display:inline-block;width:8px;height:8px;border-radius:50%;background:var(--ce-event-color);margin-right:5px}
.ce-content{flex:1;min-height:0;min-width:0;overflow:auto;scrollbar-width:thin;scrollbar-color:#8886 transparent;overscroll-behavior:contain}
.ce-status{font-size:.72rem;line-height:1.5;opacity:.7;margin:8px 0 0;max-height:48px;overflow:auto;flex:none}
.ce-month-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));min-height:100%;border-top:1px solid #8884;border-left:1px solid #8884;box-sizing:border-box}
.ce-weekday{padding:6px;text-align:center;font-size:.75rem;border-bottom:1px solid #8884;background:rgb(var(--mdui-color-surface-container-high));position:sticky;top:0;z-index:2}
.ce-month-cell{min-width:0;min-height:100px;padding:4px;box-sizing:border-box;border-right:1px solid #8884;border-bottom:1px solid #8884;cursor:pointer}
.ce-outside>.ce-date{opacity:.4}
.ce-selected{background:rgba(128,128,128,.08)}
.ce-holiday>.ce-date,.ce-holiday.ce-weekday,.ce-time-date.ce-holiday{color:#c94444}
.mdui-theme-dark .ce-holiday>.ce-date,.mdui-theme-dark .ce-holiday.ce-weekday,.mdui-theme-dark .ce-time-date.ce-holiday{color:#ff9999}
.ce-date{border:0;color:inherit;background:transparent;display:flex;align-items:center;gap:6px;max-width:100%;font:inherit;font-size:.8rem;min-height:30px;padding:0 4px;cursor:pointer}
.ce-date>span{display:flex;align-items:center;justify-content:center;width:26px;height:26px;flex:none;border-radius:50%}
.ce-date[aria-current=date]>span,.ce-time-date[aria-current=date]>strong{background:#d74747;color:#fff}
.ce-date>small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.62rem;opacity:.7}
.ce-month-events{display:flex;flex-direction:column;gap:3px;min-width:0}
.ce-event-chip,.ce-time-event{border:0;border-left:3px solid var(--ce-event-color);background:#8882;background:color-mix(in srgb,var(--ce-event-color) 16%,rgb(var(--mdui-color-surface-container-high)));color:var(--text-main);font:inherit;cursor:pointer;text-align:left;border-radius:4px}
.ce-event-chip{display:block;box-sizing:border-box;width:100%;max-width:100%;padding:3px 4px;line-height:1.4;font-size:.7rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-height:22px}
.ce-more{border:0;border-radius:4px;background:transparent;color:inherit;font:inherit;font-size:.65rem;opacity:.8;text-align:left;cursor:pointer;padding:2px 5px;min-height:24px}
.ce-time-scroll{height:100%;overflow:auto;scrollbar-width:thin;overscroll-behavior:contain}
.ce-time-table{min-width:0;--ce-days:1}
.ce-week-table{min-width:740px}
.ce-time-header,.ce-all-day,.ce-time-grid{display:grid;grid-template-columns:52px repeat(var(--ce-days),minmax(0,1fr));min-width:0}
.ce-time-header{position:sticky;top:0;z-index:5;background:rgb(var(--mdui-color-surface-container-high));border-bottom:1px solid #8884}
.ce-time-zone{font-size:.62rem;padding:8px 4px;color:inherit;opacity:.65}
.ce-time-date{display:flex;align-items:center;justify-content:center;gap:6px;border:0;background:transparent;color:inherit;font:inherit;cursor:pointer;min-height:52px;min-width:0}
.ce-time-date small{font-size:.7rem}
.ce-time-date strong{display:flex;justify-content:center;align-items:center;width:28px;height:28px;border-radius:50%;font-size:1rem}
.ce-all-day{border-bottom:1px solid #8884}
.ce-all-day-column{display:flex;flex-direction:column;gap:3px;padding:4px;min-width:0;border-left:1px solid #8883;max-height:108px;overflow:auto;scrollbar-width:thin}
.ce-time-grid{height:1152px;position:relative}
.ce-hours{position:sticky;left:0;background:rgb(var(--mdui-color-surface-container-high));z-index:2}
.ce-hours span{position:absolute;right:6px;font-size:.62rem;line-height:1;transform:translateY(2px);opacity:.65}
.ce-time-column{position:relative;min-width:0;overflow:hidden;border-left:1px solid #8883;background:repeating-linear-gradient(to bottom,transparent 0,transparent 23px,#8882 23px,#8882 24px,transparent 24px,transparent 47px,#8884 47px,#8884 48px)}
.ce-time-event{position:absolute;box-sizing:border-box;overflow:hidden;padding:2px 4px;line-height:1.25;min-width:0;z-index:1}
.ce-time-event strong,.ce-time-event small{display:block;overflow:hidden;text-overflow:ellipsis;overflow-wrap:anywhere;font-size:.72rem}
.ce-time-event small{font-size:.62rem;opacity:.8}
.ce-now{position:absolute;left:0;right:0;border-top:2px solid #e54848;z-index:3;pointer-events:none}
.ce-now::before{content:'';position:absolute;left:0;top:-4px;width:6px;height:6px;border-radius:50%;background:#e54848}
#calendar-event-dialog,#calendar-accounts-dialog{z-index:2800}
#calendar-delete-dialog{z-index:3000}
#calendar-map-dialog{z-index:3200}
#calendar-expanded-dialog button:focus-visible{outline:2px solid rgb(var(--mdui-color-primary));outline-offset:-2px}
#calendar-expand{color:inherit}
@media(max-width:600px){#calendar-expanded-dialog{padding:6px}
#calendar-expanded-dialog::part(panel){width:calc(100vw - 12px);max-width:calc(100vw - 12px);height:calc(100dvh - 12px);max-height:calc(100dvh - 12px);padding:12px;border-radius:20px;flex-shrink:0}
.ce-toolbar{gap:6px}
.ce-navigation{width:100%}
.ce-navigation>strong{flex:1;min-width:0;font-size:.9rem}
.ce-navigation mdui-button{min-width:0}
.ce-views button{min-width:50px;padding:4px 14px}
.ce-legend{max-height:42px;font-size:.65rem;padding-bottom:5px}
.ce-month-cell{padding:2px;min-height:100px}
.ce-date{display:flex;flex-direction:column;gap:0;align-items:center;width:100%;padding:0}
.ce-date small{max-width:100%;font-size:.55rem}
.ce-event-chip{font-size:.58rem;padding:2px;min-height:20px;border-left-width:2px}
.ce-more{font-size:.55rem;padding:2px}
.ce-week-table{min-width:680px}
.ce-heading{font-size:1.1rem}
.ce-status{font-size:.65rem}
}
