[data-schedule], [data-schedule] .sec-body { transition: none; }
[data-schedule] .sec-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.schedule-roulette-link { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; color: var(--red); font-size: 14px; font-weight: 700; }
.schedule-roulette-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.schedule-tabs { display: flex; flex-shrink: 0; padding: 1px; border: 1px solid var(--line); border-radius: 999px; background: #fff; }
.schedule-tabs button { border: 0; border-radius: 999px 0 0 999px; background: transparent; color: var(--muted); padding: 10px 24px; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; transition: background-color .18s, color .18s; }
.schedule-tabs button:last-child { border-radius: 0 999px 999px 0; }
.schedule-tabs button[aria-selected="true"] { background: var(--red); color: #fff; }
.schedule-tabs button:focus-visible, .course-point:focus-visible, .schedule-close:focus-visible { outline: 2px solid var(--red); outline-offset: 5px; }
[data-schedule] [hidden] { display: none !important; }
.calendar-workspace { display: grid; grid-template-columns: minmax(0, 1fr) 0px; gap: 0; align-items: start; transition: grid-template-columns .44s cubic-bezier(.22, 1, .36, 1), gap .44s cubic-bezier(.22, 1, .36, 1); }
.calendar-workspace.has-selection { grid-template-columns: minmax(0, 1fr) 350px; gap: 28px; }
[data-schedule] .cal { min-width: 0; transition: none; }
.cal-heading { position: relative; display: flex; align-items: center; justify-content: center; min-height: 36px; margin-bottom: 22px; }
.cal-month-title { max-width: calc(100% - 110px); margin: 0; font-size: 19px; letter-spacing: -.03em; }
.cal-month-trigger { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 6px 8px; border: 0; border-radius: 8px; background: transparent; color: var(--ink); font: inherit; font-weight: 700; line-height: 1.3; text-align: center; cursor: pointer; }
.cal-month-trigger:hover { background: #f4f2ee; }
.cal-month-label { text-wrap: balance; }
.cal-month-trigger svg { flex-shrink: 0; width: 14px; height: 14px; fill: none; stroke: var(--muted); stroke-width: 1.6; transition: transform .18s; }
.cal-month-trigger[aria-expanded="true"] svg { transform: rotate(180deg); }
.cal-today { position: absolute; right: 0; top: 50%; transform: translateY(-50%); padding: 7px 13px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; transition: background .18s; }
.cal-month-picker { position: fixed; inset: auto; width: min(300px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); margin: 0; padding: 16px; overflow-y: auto; overscroll-behavior: contain; border: 1px solid var(--line); border-radius: 16px; background: #fff; color: var(--ink); box-shadow: 0 12px 40px rgb(17 17 19 / 12%); }
.cal-month-picker:not([data-positioned]) { visibility: hidden; }
.cal-picker-year { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.cal-picker-year > button { width: 34px; height: 34px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font: inherit; font-size: 24px; cursor: pointer; }
.cal-picker-year > button:disabled { opacity: .3; cursor: default; }
.cal-picker-year label { display: flex; align-items: center; gap: 4px; font-size: 16px; font-weight: 700; }
.cal-picker-year input { width: 72px; padding: 5px 0; appearance: textfield; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: #fff; color: var(--ink); font: inherit; text-align: center; }
.cal-picker-year input::-webkit-inner-spin-button, .cal-picker-year input::-webkit-outer-spin-button { appearance: none; margin: 0; }
.cal-picker-months { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.cal-picker-months button { min-height: 40px; padding: 8px; border: 0; border-radius: 8px; background: transparent; color: var(--ink); font: inherit; font-size: 14px; cursor: pointer; }
.cal-picker-months button[aria-current="true"] { background: color-mix(in srgb, var(--red) 10%, white); color: var(--red); font-weight: 700; }
.cal-picker-months button:hover, .cal-picker-year > button:not(:disabled):hover { background: #f4f2ee; }
.cal-month-trigger:focus-visible, .cal-month-picker button:focus-visible, .cal-picker-year input:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.cal-today:hover { background: #f4f2ee; }
.cal-today:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
.cal-weekdays { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); padding-bottom: 12px; margin-bottom: 5px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 11px; font-weight: 600; }
.cal-weekdays span { text-align: center; }
.cal-weekdays .sat { color: #2a5b96; }
.cal-weekdays .sun { color: var(--red); }
.cal-scroll { position: relative; height: min(68vh, 660px); min-height: 420px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #d6d4ce transparent; overflow-anchor: none; }
.cal-scroll:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
[data-schedule] .cal-grid { display: flow-root; position: relative; user-select: none; -webkit-user-select: none; touch-action: pan-y; }
.cal-week { transition: none; position: relative; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
[data-schedule] .cal-cell { border: 0; border-bottom: 1px solid #eeede9; border-radius: 6px; min-height: 84px; width: 100%; padding: 7px 5px; background: transparent; color: inherit; font-family: inherit; text-align: left; cursor: pointer; transition: background-color .44s cubic-bezier(.22, 1, .36, 1); }
[data-schedule] .cal-cell:hover { background: #f4f2ee; }
[data-schedule] .cal-cell.other-month { background: #f8f7f4; }
[data-schedule] .cal-cell.sel { background: #e1ddd6; box-shadow: none; border-bottom-color: transparent; }
[data-schedule] .cal-cell.joined-left { border-top-left-radius: 0; border-bottom-left-radius: 0; }
[data-schedule] .cal-cell.joined-right { border-top-right-radius: 0; border-bottom-right-radius: 0; }
[data-schedule] .cal-cell.joined-top { border-top-left-radius: 0; border-top-right-radius: 0; }
[data-schedule] .cal-cell.joined-bottom { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
[data-schedule] .cal-cell:focus-visible { outline: 2px solid var(--red); outline-offset: -3px; }
.cal-grid.pointer-input .cal-cell:focus-visible { outline: none; }
.cal-ev.k-ops { background: #ececec; color: #555; }
.cal-ev.k-holiday { background: #e5f3e8; color: #177a30; }
.cal-cell.holiday .cal-num { color: #177a30; }
.cal-cell-date { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 2px 6px; min-height: 22px; }
[data-schedule] .cal-cell.today .cal-num { width: 24px; height: 24px; background: var(--red); color: #fff; }
.cal-cell > * { transition: opacity .44s cubic-bezier(.22, 1, .36, 1); }
.cal-cell.other-month:not(.sel) > * { opacity: .55; }
.cal-range-space { flex: 0 0 auto; height: calc(var(--range-lanes) * 20px - 2px); }
.cal-ranges { position: absolute; inset: 31px 0 auto; z-index: 1; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); grid-auto-rows: 18px; row-gap: 2px; pointer-events: none; }
.cal-ranges .cal-range { display: block; min-width: 0; margin: 0 5px; padding: 1px 6px; line-height: 16px; transition: opacity .44s cubic-bezier(.22, 1, .36, 1); }
.cal-range.tentative { padding-block: 0; }
.cal-range.continues-before { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.cal-range.continues-after { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.cal-range.other-month:not(.selected) { opacity: .55; }
.cal-event-dot { display: none; }
.cal-event-dot.k-holiday { background: #177a30; }
.cal-event-dot.k-ops { background: #777; }
.cal-event-dot.k-seminar { background: #c98b00; }
.cal-sidebar { align-self: stretch; min-width: 0; max-height: 720px; overflow-y: auto; scrollbar-width: thin; padding: 0 4px 24px 0; animation: calendar-detail-in .44s cubic-bezier(.22, 1, .36, 1); }
.cal-selection-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 0 18px; border-bottom: 1px solid var(--line); }
.cal-selection-head h2 { margin: 0; font-size: 16px; letter-spacing: -.02em; }
.cal-selection-count { margin-left: 5px; font-size: 12px; color: var(--muted); font-weight: 500; }
.cal-selected-event { padding: 24px 0; border-bottom: 1px solid var(--line); }
.cal-selected-event .schedule-detail-date { margin: 0 0 8px; font-weight: 500; font-variant-numeric: tabular-nums; }
.cal-selected-event h3 { margin: 0 0 10px; font-size: 18px; line-height: 1.4; letter-spacing: -.02em; }
.cal-selected-event .schedule-detail-body { font-size: 13px; line-height: 1.7; }
@keyframes calendar-detail-in { from { opacity: 0; transform: translateX(8px); } to { opacity: 1; transform: none; } }
@media (min-width: 901px) {
  [data-schedule].calendar-view { display: flex; flex-direction: column; height: 100dvh; min-height: 0; padding-bottom: 24px; }
  .calendar-view .sec-head { flex-shrink: 0; }
  .calendar-view .sec-body { flex: 1; min-height: 0; }
  #calendar-panel, .calendar-workspace { height: 100%; min-height: 0; }
  .calendar-workspace { grid-template-rows: minmax(0, 1fr); }
  [data-schedule] .cal { position: relative; top: auto; display: flex; flex-direction: column; height: 100%; min-height: 0; }
  .cal-heading, .cal-weekdays { flex-shrink: 0; }
  .cal-scroll { flex: 1; height: auto; min-height: 0; container-type: size; }
  [data-schedule] .cal-cell { min-height: clamp(52px, calc(100cqh / 6), 84px); }
  .cal-sidebar { max-height: 100%; }
}
@media (max-width: 900px) {
  .calendar-workspace, .calendar-workspace.has-selection { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .cal-sidebar { max-height: none; overflow: visible; }
  .cal-scroll { height: min(56vh, 500px); min-height: 300px; }
  [data-schedule] .cal-cell { min-height: 65px; padding: 5px 3px; }
  [data-schedule] .cal-cell.has::after { display: none; }
  .cal-event-dot { display: block; width: 5px; height: 5px; background: var(--red); border-radius: 50%; margin: auto auto 3px; }
  .cal-cell-date { gap: 1px; }
  .cal-ranges { top: 27px; }
  .cal-ranges .cal-range { margin-inline: 3px; font-size: 10px; }
  .cal-ranges .cal-single { display: none; }
}
.course-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.course-heading h2 { margin: 0; font-size: 18px; letter-spacing: -.02em; }
.course-heading > span { font-size: 13px; color: var(--muted); }
.course-map { position: relative; aspect-ratio: 1000 / 740; margin-top: 12px; }
.course-track { display: block; width: 100%; height: 100%; overflow: visible; }
.course-base, .course-progress { fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-width: 5; }
.course-base { stroke: #dddcd8; }
.course-progress { stroke: var(--red); }
.course-flag { fill: none; stroke: var(--red); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.course-stops { margin: 0; padding: 0; list-style: none; }
.course-stop { position: absolute; --point-size: 28px; }
.course-stop.importance-2 { --point-size: 42px; }
.course-stop.importance-3 { --point-size: 54px; }
.course-point { position: absolute; left: 0; top: 0; transform: translate(-50%, -50%); display: grid; place-items: center; width: var(--point-size); height: var(--point-size); padding: 0; border: 2px solid #aaa8a3; border-radius: 50%; background: #fff; font: inherit; font-size: 11px; font-weight: 700; color: #66645f; cursor: pointer; transition: box-shadow .18s, border-color .18s; }
.course-point:hover { border-color: var(--red); box-shadow: 0 0 0 6px rgb(166 25 46 / 9%); }
.course-stop.completed .course-point { color: #fff; background: var(--red); border-color: var(--red); }
.course-stop.importance-3 .course-point { border-color: var(--red); color: var(--red); font-size: 15px; }
.course-stop.importance-3.completed .course-point { color: #fff; }
.course-label { position: absolute; bottom: calc(var(--point-size) / 2 + 14px); left: 0; transform: translateX(-50%); width: 180px; text-align: center; pointer-events: none; }
.course-label time { display: block; font-size: 12px; color: var(--muted); }
.course-label h3 { margin: 4px 0 0; font-size: 15px; line-height: 1.4; letter-spacing: -.02em; }
.course-stop.importance-2 h3 { font-size: 18px; }
.course-stop.importance-3 h3 { font-size: 24px; }
.course-label small { display: inline-block; margin: 4px 3px 0; font-size: 11px; color: var(--muted); }
.course-stop.label-below .course-label { bottom: auto; top: calc(var(--point-size) / 2 + 14px); }
.schedule-dialog { position: fixed; inset: 0; margin: auto; width: min(480px, calc(100% - 32px)); max-height: calc(100dvh - 48px); padding: 32px; border: 1px solid var(--line); border-radius: 18px; background: #fff; color: var(--ink); box-shadow: 0 24px 80px rgb(0 0 0 / 15%); }
.schedule-dialog::backdrop { background: rgb(17 17 19 / 30%); }
.schedule-close { position: absolute; right: 12px; top: 12px; border: 0; background: transparent; padding: 4px 8px; font: inherit; font-size: 24px; color: var(--muted); cursor: pointer; }
.schedule-detail > h2 { margin: 0 24px 24px 0; font-size: 21px; }
.schedule-detail-event + .schedule-detail-event { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--line); }
.schedule-detail-date, .schedule-detail-place { margin: 0 0 8px; font-size: 13px; color: var(--muted); }
.schedule-detail-event h3 { font-size: 19px; margin: 0 0 12px; }
.schedule-detail-body { margin: 12px 0 0; font-size: 14px; line-height: 1.75; white-space: pre-line; }
.schedule-tentative { display: inline-block; margin-bottom: 12px; border: 1px dashed #9a7216; border-radius: 4px; padding: 2px 6px; color: #806012; font-size: 11px; }
@media (max-width: 640px) {
  .cal-heading { min-height: 50px; }
  .cal-month-title { max-width: calc(100% - 104px); font-size: 14px; }
  .cal-month-trigger { min-height: 44px; padding-inline: 5px; }
  [data-schedule] .sec-head { gap: 8px 16px; }
  .schedule-tabs button { padding: 8px 18px; font-size: 13px; }
  .course-map { aspect-ratio: 360 / 1300; margin-top: 8px; }
  .course-base, .course-progress { stroke-width: 3; }
  .course-flag { stroke-width: 3; }
  .course-label, .course-stop.label-below .course-label { width: clamp(115px, 40vw, 156px); left: calc(var(--point-size) / 2 + 14px); top: -14px; bottom: auto; transform: none; text-align: left; }
  .course-stop.label-left .course-label { left: auto; right: calc(var(--point-size) / 2 + 14px); text-align: right; }
  .course-label time { font-size: 11px; }
  .course-label h3, .course-stop.importance-2 h3 { font-size: 16px; }
  .course-stop.importance-3 h3 { font-size: 21px; }
  .schedule-dialog { padding: 28px 24px; }
}
.schedule-record-link { color:var(--red); text-decoration:underline; text-underline-offset:3px; font-weight:600; }
@media (prefers-reduced-motion: reduce) { .schedule-tabs button, .course-point, .calendar-workspace, .cal-cell, .cal-cell > *, .cal-ranges .cal-range, .cal-month-trigger svg { transition: none; } .cal-sidebar { animation: none; } }
