.week-board { height: clamp(420px, calc(100vh - 180px), 720px); min-height: 0; }
.day { min-height: 0; }
.day-head { flex: 0 0 30px; margin-bottom: 5px; }
.day.today .date, .month-day.today .month-date {
  border-radius: 50%; background: #608bb6; color: #fff;
}
.holiday-marker { font-size: 10px; line-height: 16px; color: #b46b65; white-space: nowrap; cursor: help; }
.holiday-marker.workday { color: #8792a1; }
.month-tools { display: flex; align-items: center; gap: 14px; margin: 0 0 12px; color: #8a96a8; font-size: 11px; }
.range-create { background: transparent; border: 1px solid var(--line-strong); border-radius: 7px; padding: 5px 9px; color: #637a92; cursor: pointer; }
.range-create:hover { background: var(--blue-wash); }
.month-help { flex: 1; }
.holiday-source { color: #8a96a8; text-decoration: none; white-space: nowrap; }
.holiday-source:hover { text-decoration: underline; }
.month-grid { display: block; }
.month-week { position: relative; display: grid; grid-template-columns: repeat(8, minmax(112px, 1fr)); column-gap: 12px; --span-height: 0px; }
.month-day { display: flex; flex-direction: column; min-width: 0; height: calc(146px + var(--span-height)); min-height: 0; padding: 5px 7px 4px; border-bottom: 1px solid #f0f3f7; }
.month-day.outside { opacity: 1; }
.month-day.outside .month-date { color: #b9c1cd; }
.month-day-head { display: flex; align-items: center; justify-content: space-between; gap: 4px; height: 26px; flex: 0 0 26px; touch-action: none; user-select: none; }
.month-date { display: grid; place-items: center; width: 24px; height: 24px; font-size: 13px; }
.week-range-label { color: #8d9eb1; font-size: 10px; white-space: nowrap; }
.month-day .span-space { height: var(--span-height); flex: 0 0 var(--span-height); }
.month-week-goal .month-todo-list { margin-top: 4px; }
.month-day.range-selected { background: #e9f2fb; box-shadow: inset 0 0 0 1px #c2d6ec; border-radius: 5px; }
.month-day.range-start, .month-day.range-end { background: #dceafa; }
body.is-selecting-range { user-select: none; cursor: crosshair; }
.month-spans { display: grid; position: absolute; top: 33px; left: 0; right: 0; grid-template-columns: repeat(8, minmax(112px, 1fr)); column-gap: 12px; grid-auto-rows: 22px; max-height: 66px; overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; pointer-events: none; z-index: 2; }
.span-task { display: flex; align-items: center; min-width: 0; height: 20px; padding: 0 5px; border-radius: 5px; background: #e7eff8; color: #5e7c9b; font-size: 11px; line-height: 20px; cursor: pointer; pointer-events: auto; }
.span-task[data-color="sage"] { background: #e8f1e9; color: #617e69; }
.span-task[data-color="sand"] { background: #f6eddf; color: #977b52; }
.span-task[data-color="rose"] { background: #f5e7eb; color: #9d717e; }
.span-task.continues-before { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.span-task.continues-after { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.span-task.completed .span-text { text-decoration: line-through; opacity: .55; }
.span-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.span-task .edit-button { width: 22px; height: 20px; color: inherit; }
.week-spans { display: grid; gap: 2px; max-height: 88px; overflow-y: auto; flex: 0 0 auto; margin-bottom: 3px; }
.range-dialog { width: min(410px, calc(100% - 28px)); padding: 24px; border: 1px solid var(--line); border-radius: 18px; color: var(--ink); box-shadow: 0 24px 100px #24385122; }
.range-dialog::backdrop { background: #26344a26; backdrop-filter: blur(3px); }
.range-dialog h2 { font-size: 19px; margin: 0 0 18px; }
.range-dialog form { display: grid; gap: 14px; }
.range-dialog label { display: grid; gap: 7px; color: #7b899a; font-size: 12px; }
.range-dialog textarea { width: 100%; min-height: 65px; padding: 9px 10px; background: #f7f9fc !important; border: 1px solid var(--line); border-radius: 7px; resize: vertical; font: inherit; color: var(--ink); outline: none; }
.range-dates { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.range-dates input { width: 100%; min-width: 0; padding: 8px; border: 1px solid var(--line-strong); border-radius: 7px; background: white; color: var(--ink); }
.range-colors { border: 0; margin: 0; padding: 0; display: flex; gap: 12px; }
.range-colors legend { margin-bottom: 8px; font-size: 12px; color: #7b899a; }
.range-colors label { display: block; cursor: pointer; }
.range-colors input { accent-color: #6f9fd4; }
.range-color-dot { display: inline-block; vertical-align: middle; width: 19px; height: 19px; border-radius: 50%; }
.range-hint { margin: 0; color: #96a0af; font-size: 11px; }
.range-error { min-height: 15px; margin: 0; color: #b46565; font-size: 12px; }
.range-actions { display: flex; justify-content: flex-end; gap: 8px; }
.range-actions button { border: 0; border-radius: 7px; padding: 8px 15px; cursor: pointer; background: #f1f4f8; color: #6d7e92; }
.range-actions button[type="submit"] { background: #668db5; color: #fff; }
button:focus-visible, [tabindex]:focus-visible { outline: 2px solid #83acd5; outline-offset: 2px; }
@media (max-width: 600px) { .month-tools { align-items: flex-start; flex-wrap: wrap; gap: 8px; } .month-help { min-width: 170px; } .holiday-source { margin-left: auto; } }
