/* Mobile layouts share the existing event editor, colours and RSVP controls. */
.mobile-header,.mobile-navigation,.mobile-calendar,.mobile-period,.mobile-create-row{display:none}
.event-title-button{border:0;background:none;padding:0;color:inherit;font:inherit;text-align:left;cursor:pointer;overflow-wrap:anywhere}
.event-title-button:hover{text-decoration:underline}
@media(max-width:600px){
    .app-shell{display:block;min-height:100dvh}
    .app-shell>.rail,.app-shell>.sidebar{display:none}
    .workspace{width:100%;min-width:0;overflow:visible}
    .page-body{min-height:0;padding-bottom:calc(85px + env(safe-area-inset-bottom))}
    .page-body>.content-layout{min-height:0;display:block}
    .mobile-header{display:flex;align-items:center;justify-content:flex-end;gap:12px;padding:12px 18px;background:#fff;border-bottom:1px solid #dfe6f1}
    .mobile-header .account-signout{right:0;left:auto;top:100%;bottom:auto;z-index:50}
    .mobile-navigation{position:fixed;bottom:0;left:0;right:0;z-index:4;display:flex;justify-content:space-around;background:#fff;border-top:1px solid #dfe6f1;padding:8px 4px calc(8px + env(safe-area-inset-bottom))}
    .mobile-navigation a{flex:1;min-width:0;min-height:49px;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:2px;font:500 11px 'DM Sans',sans-serif;color:#65778e;text-decoration:none;border-radius:8px}
    .mobile-navigation a>span{font-size:23px;line-height:28px}
    .mobile-navigation a.active{background:#eef3ff;color:#315fc4}
    .desktop-calendar{display:none}
    .calendar-content{padding:22px 14px!important;width:100%}
    .mobile-calendar{display:block}
    .mobile-month-heading{display:flex;align-items:center;gap:2px}
    .mobile-month-heading h1{flex:1;min-width:0;margin:0;font:700 24px Manrope,sans-serif;letter-spacing:-.8px;color:#26364b}
    .mobile-month-heading button{flex:none;width:44px;height:44px;border:0;background:none;color:#425d83;font-size:26px;border-radius:8px}
    .mobile-subtitle{font:12px 'DM Sans',sans-serif;color:#65778e;margin:3px 0 18px}
    .mobile-view-switch{display:flex;gap:4px;padding:4px;margin-bottom:16px;border:1px solid #dfe6f1;border-radius:12px;background:#eef3fb}
    .mobile-view-switch button{flex:1;min-height:44px;border:0;border-radius:9px;background:transparent;color:#65778e;font:600 13px 'DM Sans',sans-serif}
    .mobile-view-switch button[aria-pressed=true]{background:#fff;color:#315fc4;box-shadow:0 1px 4px #26364b14}
    .mobile-week-hint{margin:0 0 12px;color:#65778e;font:12px 'DM Sans',sans-serif}
    .mobile-week{display:flex;align-items:stretch;gap:12px;overflow-x:auto;scroll-snap-type:x proximity;overscroll-behavior-x:contain;padding:3px 2px 14px;min-height:240px;border-radius:12px}
    .mobile-week:focus-visible{outline:2px solid #315fc4;outline-offset:2px}
    .mobile-week-day{flex:0 0 85%;min-width:0;scroll-snap-align:start;background:#f4f7fc;border:1px solid #dfe6f1;border-radius:14px;padding:10px}
    .mobile-week-day-top{display:flex;align-items:stretch;gap:8px;margin:0 0 12px}
    .mobile-week-day h3{flex:1;min-width:0;margin:0}
    .mobile-week-new{flex:none;display:inline-flex;align-items:center;justify-content:center;min-height:48px;padding:0 14px;border:1px solid #c9d6ee;border-radius:9px;background:#fff;color:#315fc4;font:600 13px 'DM Sans',sans-serif;white-space:nowrap}
    .mobile-week-new:hover{background:#e6edfc;border-color:#315fc4}
    .mobile-week-day h3 button{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;min-height:48px;padding:8px 10px;border:0;border-radius:9px;background:#fff;color:#40536b;font:500 13px 'DM Sans',sans-serif}
    .mobile-week-day h3 button.today{box-shadow:inset 0 0 0 1px #315fc4}
    .mobile-week-day h3 button[aria-pressed=true]{background:#315fc4;color:#fff}
    .mobile-week-day .events-state{padding:12px 4px}
    .mobile-week-day .events-photo-tray-heading{flex-wrap:wrap}
    .mobile-filters{display:flex;gap:7px;flex-wrap:wrap;margin-bottom:16px}
    .mobile-filters button{min-height:44px;padding:0 16px;border:1px solid #dfe6f1;border-radius:24px;background:#fff;color:#65778e;font:500 13px 'DM Sans',sans-serif}
    .mobile-filters button[aria-pressed=true]{background:#e6edfc;color:#315fc4;border-color:#315fc4}
    .mobile-month{background:#fff;border:1px solid #dfe6f1;border-radius:16px;padding:8px 0}
    .mobile-weekdays,.mobile-days{display:grid;grid-template-columns:repeat(7,minmax(0,1fr))}
    .mobile-weekdays span{text-align:center;padding:10px 0;color:#65778e;font-size:11px}
    .mobile-days>button{min-width:0;min-height:48px;border:0;border-radius:11px;background:none;color:#40536b;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;font:13px 'DM Sans',sans-serif}
    .mobile-days>button.outside{color:#8290a2}
    .mobile-days>button.today{box-shadow:inset 0 0 0 1px #315fc4}
    .mobile-days>button[aria-pressed=true]{background:#315fc4;color:#fff}
    .mobile-event-dots{display:flex;align-items:center;gap:3px;height:8px;line-height:8px}
    .mobile-event-dots i{display:block;width:5px;height:5px;border-radius:50%}
    .mobile-days>button[aria-pressed=true] .mobile-event-dots i{background:#fff!important}
    .mobile-agenda-heading{display:flex;align-items:center;justify-content:space-between;gap:6px;margin:16px 0 8px}
    .mobile-agenda-heading h2{font:700 15px Manrope,sans-serif;margin:0;color:#26364b}
    .mobile-agenda-heading button{min-height:44px;border:0;background:none;padding:0 10px;color:#315fc4;font:500 12px 'DM Sans',sans-serif}
    .mobile-agenda{display:flex;flex-direction:column;gap:10px}
    .mobile-create-row{display:flex;justify-content:flex-end;margin-top:20px}
    .mobile-create{display:inline-flex;align-items:center;justify-content:center;min-height:46px;padding:0 20px;border:0;border-radius:24px;background:#315fc4;color:#fff;font:600 13px 'DM Sans',sans-serif;text-decoration:none;box-shadow:0 4px 12px #315fc422}
    .mobile-create:hover{color:#fff;background:#264c9b}
    .events-content{padding:22px 14px 24px}
    .events-content .events-heading{gap:0 12px;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:start}
    .events-content .events-heading .mobile-create-row{margin:0}
    .events-content .events-heading .events-filter{grid-column:1/-1}
    .page-heading h1{font-size:26px;margin:0 0 8px}
    .page-heading p{margin-bottom:18px}
    .events-content .events-filter{margin-bottom:16px;gap:6px;padding:0;border:0;background:none}
    .events-content .events-filter button{min-height:44px;padding:0 16px;border:1px solid #dfe6f1;border-radius:24px;background:#fff}
    .events-content .events-filter button[aria-pressed=true]{border-color:#315fc4;background:#e6edfc}
    .mobile-period{display:flex;gap:8px;margin-bottom:18px}
    .mobile-period button{min-height:44px;padding:0 14px;border:0;border-bottom:2px solid transparent;background:none;color:#65778e;font:500 13px 'DM Sans',sans-serif}
    .mobile-period button[aria-pressed=true]{color:#315fc4;border-bottom-color:#315fc4}
    .show-upcoming .past-section,.show-past .upcoming-section,.events-section>h2{display:none}
    .past-section{margin-top:0}
    .events-entry{border-radius:13px;box-shadow:none;border-left-width:3px}
    .events-entry .events-item{display:flex;flex-wrap:wrap;padding:14px;gap:8px 12px}
    .events-item-date{display:none}
    .upcoming-section .events-item-date{display:flex;width:54px;height:54px}
    .events-item-details{flex:1;min-width:0}
    .events-item-details h3{font-size:15px;margin:0 0 4px}
    .events-item-details p{font-size:12px;line-height:1.6}
    .events-item-people{font-size:12px;color:var(--event-text)}
    .events-item-actions{width:100%;justify-content:flex-end;gap:8px}
    .events-entry .events-rsvp-button,.events-entry .events-rsvp-choice,.events-entry .events-rsvp-choice select,.events-photo-add,.events-photos-toggle{min-height:44px}
    .event-title-button{min-height:44px}
    .mobile-agenda .event-same-day-prefix,.upcoming-section .event-date-prefix{display:none}
    .past-section .event-date-separator,.past-section .event-time{display:none}
    .right-panels{margin-top:4px}
    .mobile-ideas-open>.calendar-content{display:none}
    .content-layout:not(.mobile-ideas-open)>.right-panels{display:none}
    .right-panels .ideas-body{max-height:none}
    .plan-idea-drag{touch-action:auto;user-select:text;cursor:default}
    .plan-idea-drag-handle,.plan-ideas-hint,.plan-idea-desktop-hint{display:none}
    .ideas-icon-rail{flex-wrap:wrap;justify-content:flex-start;padding:6px}
    .ideas-icon-rail .account-menu{display:none}
    /* Mobile browsers stretch inset:0 fixed boxes to the toolbar-hidden (large) viewport, which pushed the bottom of the sheet under the browser chrome; pin the backdrop to the visible viewport instead. */
    .modal-backdrop{align-items:end;padding:0;z-index:20;inset:0 0 auto;height:100dvh}
    .event-modal{width:100%;max-height:90dvh;overflow-y:auto;border-radius:20px 20px 0 0;padding:24px 18px calc(24px + env(safe-area-inset-bottom))}
    .event-modal input,.event-modal select,.plan-idea-form input{font-size:16px;min-height:44px;min-width:0}
    .event-modal button{min-height:44px}
    .event-modal .form-row{gap:8px}
    button:focus-visible,a:focus-visible{outline:2px solid #315fc4;outline-offset:2px}
}
