.mobile-date-trigger,.mobile-date-status{display:none}
body:has(.mobile-date-sheet[open]){overflow:hidden}
.mobile-date-sheet:not([open]){display:none}
.mobile-date-sheet{--date-row-height:36px;--date-row-gap:3px;background:var(--paper);color:var(--ink);border:1px solid var(--line);box-shadow:0 -16px 80px #20211f24;max-width:100%;width:100%;max-height:calc(100dvh - 12px);inset:auto 0 0;margin:0;padding:34px 20px calc(14px + env(safe-area-inset-bottom));border-radius:24px 24px 0 0;display:flex;flex-direction:column;overflow:hidden;overscroll-behavior:contain}
.mobile-date-sheet::backdrop{background:#20211f52;backdrop-filter:blur(3px)}
.mobile-date-close{position:absolute;right:6px;top:3px;width:44px;height:32px;display:grid;place-items:center;border:0;background:none;color:var(--muted);font-size:23px;font-weight:300;line-height:1;padding:0}
.mobile-date-close:hover{color:var(--ink)}
#mobile-date-content{min-height:0;overflow-y:auto;overscroll-behavior:contain;flex:1 1 auto}
.mobile-date-sheet .archive-calendar .calendar-head{margin-bottom:8px}
.mobile-date-sheet .calendar-title{font-size:17px;border-bottom:0}
.mobile-date-sheet .archive-calendar .calendar-nav .icon-button{width:36px;height:36px;border-radius:50%}
.mobile-date-sheet .calendar-month-action{margin-bottom:10px}
.mobile-date-sheet .calendar-month-action>span{font-size:12px}
.mobile-date-sheet .calendar-month-action>button{min-height:32px;padding:3px 11px;border-radius:8px;font-size:12px}
.mobile-date-sheet .archive-calendar .calendar-weekdays,.mobile-date-sheet .calendar-week{grid-template-columns:32px repeat(7,minmax(0,1fr));gap:3px}
.mobile-date-sheet .archive-calendar .calendar-days{gap:var(--date-row-gap);height:calc(6 * var(--date-row-height) + 5 * var(--date-row-gap))}
.mobile-date-sheet .calendar-week{flex:0 0 var(--date-row-height)}
.mobile-date-sheet .archive-calendar .calendar-day{min-height:36px;max-height:none;font-size:13px;border-radius:8px}
.mobile-date-sheet .calendar-week-button{min-height:36px;font-size:10px;border-color:transparent;border-radius:8px}
.mobile-date-sheet .calendar-day.has-record{background:#e8eae2}
.mobile-date-sheet .calendar-day.selected{background:var(--ink);color:var(--paper)}
.mobile-date-sheet .calendar-day.has-record:after{bottom:5px;border-radius:50%}
.mobile-date-sheet .calendar-key{font-size:11px;margin-top:8px}
.mobile-date-sheet .calendar-selection{font-size:12px;min-height:32px;margin-top:8px;padding-top:8px}
.mobile-date-sheet .calendar-selection>span{max-width:none}
.mobile-date-footer{display:grid;grid-template-columns:1fr 1.6fr;gap:12px;border-top:1px solid var(--line);margin-top:10px;padding-top:10px;flex:0 0 auto}
.mobile-date-footer button{min-height:44px;border-radius:10px;font-size:14px;font-weight:500}
.mobile-date-reset{border:1px solid var(--line)}
.mobile-date-apply{background:var(--ink);color:var(--paper);display:flex;align-items:center;justify-content:space-between;padding:0 20px}
.mobile-month-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:15px 0 25px;font-size:12px}
.mobile-month-heading input{width:72px;background:white;border:1px solid var(--line);padding:8px 5px;font:16px var(--mono)}
.mobile-month-heading label{display:flex;align-items:center;gap:8px}
@media(max-width:760px){
 .archive-sidebar:has(>.archive-calendar):not(:has(.sidebar-series)){display:none}
 .archive-sidebar>.archive-calendar{display:none}
 .archive-sidebar{display:block}
 .archive-sidebar:has(.sidebar-series) .sidebar-label{margin-top:0;padding-top:0}
 .archive-sidebar .sidebar-series{display:flex;flex-direction:row;gap:6px;flex-wrap:wrap}
 .archive-sidebar .sidebar-series a{border:1px solid var(--line);border-radius:6px;gap:10px;font-size:12px;min-height:40px;padding:8px 10px}
 .archive-layout{gap:20px;padding-top:22px;padding-bottom:0}
 #main:has(.archive-layout){padding-bottom:24px;min-height:0}
 body:has(.archive-layout) .site-footer{padding-bottom:calc(84px + env(safe-area-inset-bottom))}
 .archive-collection{margin-bottom:20px}
 .mobile-date-trigger{position:fixed;z-index:20;bottom:calc(22px + env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);display:inline-flex;align-items:center;justify-content:center;gap:9px;min-width:128px;height:46px;padding:0 19px;border-radius:999px;background:#fffefa;border:1px solid #d9dbd2;box-shadow:0 4px 16px #20211f16,0 1px 3px #20211f0c;font-size:13px;font-weight:550;letter-spacing:.3px;white-space:nowrap;transition:box-shadow .2s,background .2s}
 .mobile-date-trigger:hover{box-shadow:0 6px 20px #20211f24;background:white}
 .mobile-date-trigger svg{color:var(--ink)}
 .mobile-date-trigger.has-selection{border-color:#b6b9af}
 body[data-theme] .mobile-date-trigger{border:1px solid var(--theme-accent)}
 .mobile-date-trigger i{display:block;width:5px;height:5px;background:var(--red);border-radius:50%;margin-left:1px}
 body:has(.mobile-date-sheet[open]) .mobile-date-trigger{visibility:hidden}
 .mobile-date-status{display:flex;align-items:center;gap:10px;font:11px var(--mono);color:var(--muted);margin:-6px 0 19px}
 .mobile-date-status a{display:grid;place-items:center;width:28px;height:28px;border:1px solid var(--line);border-radius:50%;font:18px var(--sans)}
 .archive-results>.mobile-date-trigger{margin:0}
}
@media(max-width:360px){.mobile-date-sheet{padding-left:16px;padding-right:16px}.mobile-date-sheet .archive-calendar .calendar-weekdays,.mobile-date-sheet .calendar-week{gap:2px;grid-template-columns:30px repeat(7,minmax(0,1fr))}.mobile-date-sheet .archive-calendar .calendar-day{min-height:36px;font-size:12px}.mobile-date-sheet .calendar-week-button{min-height:36px}}
@media(prefers-reduced-motion:no-preference){.mobile-date-sheet[open]{animation:date-sheet-enter .24s cubic-bezier(.2,.8,.2,1)}@keyframes date-sheet-enter{from{opacity:0;transform:translateY(32px)}to{opacity:1;transform:none}}}
@media(prefers-reduced-motion:reduce){.mobile-date-trigger{transition:none}}

@media(max-height:540px){
 .mobile-date-sheet{--date-row-height:30px;--date-row-gap:2px;padding-top:30px;padding-bottom:10px;border-radius:18px 18px 0 0}
 .mobile-date-sheet .archive-calendar .calendar-head{margin-bottom:4px}
 .mobile-date-sheet .archive-calendar .calendar-nav .icon-button{width:32px;height:32px}
 .mobile-date-sheet .calendar-month-action{margin-bottom:6px}
 .mobile-date-sheet .archive-calendar .calendar-weekdays{margin-bottom:4px}
 .mobile-date-sheet .archive-calendar .calendar-day,.mobile-date-sheet .calendar-week-button{min-height:30px}
 .mobile-date-sheet .calendar-key{margin-top:6px}
 .mobile-date-sheet .calendar-selection{min-height:28px;margin-top:6px;padding-top:6px}
 .mobile-date-footer{margin-top:8px;padding-top:8px}
}
