button.calendar-button{padding:12px 0;color:#a3a3a3;font-size:12px;font-weight:400;line-height:normal;white-space:nowrap;transition:color .25s ease;touch-action:manipulation}
#week-calendar{touch-action:manipulation}
#calendar-dialog{touch-action:pan-y pinch-zoom}
button.calendar-button:hover,button.calendar-button[aria-expanded="true"]{color:#ededed}
#calendar-dialog{position:fixed;inset:auto;margin:0;width:304px;max-width:calc(100% - 24px);max-height:calc(100dvh - 24px);padding:14px;border:1px solid #414141;border-radius:14px;background:#1c1c1c;color:#dedede;box-shadow:0 16px 70px #0006;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#555 transparent}
#calendar-dialog::backdrop{background:#09090938;backdrop-filter:blur(2px)}
#calendar-dialog[data-motion="closing"]::backdrop{opacity:0;backdrop-filter:blur(0)}
#calendar-dialog .calendar-heading{height:32px;display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
#calendar-dialog .calendar-month{font-size:12px;font-weight:400;letter-spacing:.01em;text-align:center;font-variant-numeric:tabular-nums}
#calendar-dialog .calendar-month-arrow{display:flex;align-items:center;justify-content:center;flex-shrink:0;width:30px;height:30px;padding:0;color:#909090;border-radius:5px;transition:color .25s ease,background .25s ease}
#calendar-dialog .calendar-month-arrow svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.3;stroke-linecap:round;stroke-linejoin:round}
#calendar-dialog .calendar-month-arrow:hover{color:#ededed;background:#ffffff06}
#calendar-dialog .calendar-weekdays{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:2px;height:20px;margin-bottom:4px;font-size:9px;line-height:20px;text-align:center;color:#717171}
#calendar-dialog .calendar-grid{display:grid;grid-template-rows:repeat(6,34px);gap:4px;touch-action:pan-y pinch-zoom;user-select:none}
#calendar-dialog .calendar-week{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:2px;min-width:0}
#calendar-dialog .calendar-cell{display:block;min-width:0;height:34px}
#calendar-dialog .calendar-day{display:flex;align-items:center;justify-content:center;width:100%;height:34px;padding:0;border:1px solid transparent;border-radius:6px;background:none;color:#8a8a8a;font-size:11px;font-variant-numeric:tabular-nums;line-height:1;transition:color .22s ease,background .22s ease,border-color .22s ease;touch-action:pan-y pinch-zoom}
#calendar-dialog .calendar-day.is-adjacent{color:#616161}
#calendar-dialog .calendar-day.is-today{color:#c4c4c4;border-color:transparent}
#calendar-dialog .calendar-day:hover{background:none;color:#ddd}
#calendar-dialog .calendar-day.is-selected{background:#ffffff0a;border-color:#ffffff08;border-radius:7px;color:#f4f4f4}
#calendar-dialog .calendar-day.is-selected:hover{background:#ffffff0a;border-color:#ffffff08;color:#fff}
#calendar-dialog .calendar-footer{display:flex;justify-content:center;margin-top:8px}
#calendar-dialog button:focus-visible{outline:1px solid #c5c5c5;outline-offset:2px}
#calendar-dialog[open]{display:flex;flex-direction:column}
#calendar-dialog .calendar-heading,#calendar-dialog .calendar-weekdays,#calendar-dialog .calendar-footer{flex:none}
#calendar-dialog .calendar-grid{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#555 transparent;overflow-anchor:none}
#calendar-dialog .calendar-day.is-selected:focus-visible{outline-color:#eee}
@media(max-width:700px){button.calendar-button{font-size:11px}}
@media(prefers-reduced-motion:reduce){button.calendar-button,#calendar-dialog,#calendar-dialog *,#calendar-dialog::backdrop{transition:none!important}}

/* A compact continuous rail, with native touch and trackpad momentum. */
#app .toolbar{display:flex;align-items:center;justify-content:space-between;gap:24px;padding-top:20px;padding-bottom:12px}
#week-calendar{display:flex;align-items:center;gap:12px;width:284px;max-width:48%;flex-shrink:0;min-width:0}
#week-calendar button.calendar-button{width:28px;min-width:28px;height:34px;padding:0;text-align:left;font-size:12px;font-weight:400;letter-spacing:0;overflow:hidden}
#week-strip{--rail-day-width:28px;--rail-gap:8px;display:flex;align-items:center;gap:var(--rail-gap);flex:1;min-width:0;height:36px;padding:1px 0;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;scroll-snap-type:none;overflow-anchor:none;overscroll-behavior-x:contain;touch-action:pan-x pinch-zoom;user-select:none;cursor:grab}
#week-strip::-webkit-scrollbar{display:none}
#week-strip:active{cursor:grabbing}
#week-strip .week-day{display:flex;flex-direction:column;align-items:center;justify-content:center;flex:0 0 var(--rail-day-width);width:var(--rail-day-width);height:34px;min-width:0;padding:2px 0;gap:3px;border:1px solid transparent;border-radius:4px;background:none;color:#737373;touch-action:pan-x pinch-zoom;transition:color .25s ease,background .25s ease,border-color .25s ease;cursor:inherit}
#week-strip .week-day-name,#week-strip .week-day-number{font-size:11px;font-weight:400;line-height:1;letter-spacing:0;font-variant-numeric:tabular-nums}
#week-strip .week-day-name{font-size:9px;color:#575757}
#week-strip .week-day:hover{background:none;color:#aaa}
#week-strip .week-day.is-today{border-color:transparent}
#week-strip .week-day.is-selected{background:none;border-color:transparent;color:#f1f1f1}
#week-strip .week-day.is-selected .week-day-name{color:#f1f1f1}
#week-strip .week-day.is-selected:hover{background:none;border-color:transparent;color:#fff}
#week-calendar button:focus-visible{outline:1px solid #aaa;outline-offset:-2px}
#app .toolbar>.actions{margin-left:auto;flex-shrink:0}
@media(max-width:700px){
  #app .toolbar{display:flex;flex-wrap:nowrap;align-items:center;gap:12px;padding-top:16px;padding-bottom:12px}
  #week-calendar{flex:0 1 240px;width:240px;max-width:none;gap:12px}
  #week-calendar button.calendar-button{width:24px;min-width:24px;font-size:11px}
  #week-strip{--rail-day-width:24px;--rail-gap:6px;height:34px}
  #week-strip .week-day{height:32px}
  #week-strip .week-day-name{font-size:9px}
  #week-strip .week-day-number{font-size:10px}
  #app .toolbar>.actions{gap:10px;margin-left:0}
  #calendar-dialog .calendar-month{font-size:11px}
  #calendar-dialog .calendar-weekdays{font-size:9px}
  #calendar-dialog .calendar-day{font-size:10px}
}
@media(max-height:650px){#app .toolbar{padding-top:12px;padding-bottom:10px}}
@media(max-height:430px){#app .toolbar{padding-top:8px;padding-bottom:6px}}
@media(prefers-reduced-motion:reduce){#week-calendar,#week-calendar *{transition:none!important;scroll-behavior:auto!important}}

/* Keep the current date visible independently of the selected date. */
#week-strip .week-day{position:relative}
#week-strip .week-day.is-today::after{content:'';position:absolute;bottom:0;left:50%;width:2px;height:2px;border-radius:50%;background:#a3a3a3;transform:translateX(-50%)}
#week-strip .week-day.is-today.is-selected::after{background:#ededed}
#calendar-dialog .calendar-day{position:relative}
#calendar-dialog .calendar-day.is-today::after{content:'';position:absolute;bottom:4px;left:50%;width:2px;height:2px;border-radius:50%;background:#a3a3a3;transform:translateX(-50%)}
#calendar-dialog .calendar-day.is-today.is-selected::after{background:#ededed}
