/* 예약판·방문 넣기·장비 예약 */
.board-groups { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 12px; }
.board-groups a { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border: 2px solid var(--line); border-radius: 10px; color: var(--text-2); text-decoration: none; font-size: 16px; }
.board-groups a[aria-current="page"] { border-color: var(--text); background: var(--text); color: #fff; }
.board-groups a[aria-current="page"] .muted { color: #fff; }
.board-groups .board-groups__toggle { border-style: dashed; }

.board-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0 16px; }
.board-nav__view { margin-left: auto; }
.board-nav__range { white-space: nowrap; }
@media (max-width: 600px) {
  /* 좁으면 날짜를 윗줄에 두고, 지난주·다음 주·보기 단추를 아랫줄에 모은다 */
  .board-nav__range { order: -1; flex: 1 0 100%; font-size: 20px; }
}

.board-strips { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 12px; margin-bottom: 16px; }
.board-strips > .card { margin-top: 0; }
.board-strip__title { margin: 0 0 8px; font-size: 18px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
details.board-strip summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; }

/* 방문 하나 */
.visit { display: block; padding: 4px 8px; border-radius: 8px; border-left: 4px solid var(--accent); background: var(--accent-soft); color: var(--text); text-decoration: none; line-height: 1.3; }
.visit:hover { color: var(--text); outline: 2px solid var(--accent); }
.visit--others { border-left-color: var(--warn); background: var(--warn-soft); }
.visit--with { border-left-color: var(--line); background: var(--surface-2); }
.visit--handover { border-left-color: var(--danger); background: var(--danger-soft); }
.visit + .visit { margin-top: 3px; }
.visit__title { display: block; font-weight: 700; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.visit__sub { display: block; font-size: 13px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 주 보기(PC) */
.board-table { width: 100%; min-width: 1000px; table-layout: fixed; border-collapse: separate; border-spacing: 0; background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius-lg); }
.board-table th, .board-table td { padding: 6px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.board-table thead th { position: sticky; top: 0; z-index: 1; background: var(--surface-2); font-size: 15px; text-align: left; }
.board-table .is-today { background: var(--accent-soft); }
.board-table thead .is-today { background: var(--accent-soft); }
.board-table__who, .board-who { width: 150px; text-align: left; font-size: 15px; }
.board-who { display: table-cell; }
.board-who__name { display: block; font-weight: 700; }
.board-who .chip { margin-top: 3px; font-size: 13px; padding: 1px 8px; }
tr.is-doctor > th, tr.is-doctor > td { background: var(--surface-2); }
.slots { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.slot { min-height: 30px; font-size: 14px; }
.slot--free a { display: flex; align-items: center; justify-content: center; min-height: 30px; border: 1px dashed var(--line); border-radius: 8px; color: var(--text-3); text-decoration: none; }
.slot--free a:hover, .slot--free a:focus-visible { border-color: var(--accent); color: var(--accent); }
.slot--cont { display: flex; align-items: center; padding-left: 8px; color: var(--text-3); font-size: 13px; }
.slot--empty { border-radius: 8px; background: repeating-linear-gradient(45deg, transparent 0 6px, var(--surface-2) 6px 8px); }
.board-cell__cars { display: flex; flex-wrap: wrap; gap: 3px; margin-bottom: 4px; }
.board-cell__cars .chip { font-size: 12px; padding: 1px 6px; }
.board-cell__untimed { margin: 4px 0 0; font-size: 13px; color: var(--text-2); }

/* 하루 보기(휴대폰) */
.board-days { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin-bottom: 10px; }
.board-days a { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 56px; border: 2px solid var(--line); border-radius: 10px; color: var(--text); text-decoration: none; font-size: 15px; }
.board-days a span { font-size: 13px; color: var(--text-3); }
.board-days a[aria-current="page"] { border-color: var(--text); background: var(--text); color: #fff; }
.board-days a[aria-current="page"] span { color: #fff; }
.board-day__tools { display: flex; justify-content: flex-end; margin-bottom: 8px; }
.board-slots-head, .board-row__slots { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
.board-slots-head { position: sticky; top: 0; z-index: 1; padding: 6px 0; background: var(--bg); font-size: 13px; font-weight: 700; text-align: center; }
.board-slots-head small { display: block; font-weight: 400; color: var(--text-3); }
.board-rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.board-row { padding: 10px; border: 2px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.board-row.is-doctor { background: var(--surface-2); }
.board-row__head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 6px; }
.board-row__head .board-who__name { display: inline; }
.board-row__cell { min-width: 0; min-height: 52px; }
.board-row__cell .visit__title { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.board-free { display: flex; align-items: center; justify-content: center; min-height: 52px; border: 1px dashed var(--line); border-radius: 8px; color: var(--text-3); font-size: 20px; text-decoration: none; }
.board-free:hover, .board-free:focus-visible { border-color: var(--accent); color: var(--accent); }

/* 기본: PC 는 주, 휴대폰은 하루. ?view= 로 고르면 그것만 */
@media (max-width: 900px) { .board-week:not(.is-forced) { display: none; } }
@media (min-width: 901px) { .board-day:not(.is-forced) { display: none; } .board-day { max-width: 760px; } }

.board-legend { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 15px; color: var(--text-2); }
.board-legend li { display: inline-flex; align-items: center; gap: 6px; }
.board-legend .visit { display: inline-block; padding: 0 8px; }
.board-legend .board-free { min-height: 28px; width: 32px; font-size: 16px; }
.board-sum td { white-space: nowrap; }
.board-sum__total th, .board-sum__total td { border-top: 2px solid var(--line); font-weight: 700; }

/* 방문 넣기 */
.visit-form { max-width: 860px; display: flex; flex-direction: column; gap: 16px; }
.visit-form > .card, .visit-form > div > .card { margin-top: 0; }
.visit-form h2 { margin: 0 0 10px; font-size: 20px; }
.pick-list { display: flex; flex-wrap: wrap; gap: 8px; }
.pick { position: relative; display: inline-flex; cursor: pointer; }
.pick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pick > span { display: inline-flex; flex-direction: column; justify-content: center; min-height: 48px; padding: 6px 14px; border: 2px solid var(--line); border-radius: 10px; background: var(--surface); font-size: 16px; line-height: 1.25; }
.pick small { font-size: 13px; color: var(--text-3); }
.pick input:checked + span { border-color: var(--accent); background: var(--accent-soft); font-weight: 700; }
.pick input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.pick input:disabled + span { opacity: .55; cursor: not-allowed; }
.pick--busy > span { border-style: dashed; }
.pick-list--slots .pick > span { min-width: 120px; }
.visit-start .select, .visit-round .input { max-width: 220px; }
.visit-hint { margin: 0 0 12px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); font-size: 16px; }
.visit-form .visit-edu { display: none; border: 0; padding: 0; margin: 0; }
.visit-form:has(input[name="work_kind"][value="교육"]:checked) .visit-edu { display: flex; }
.visit-preview { margin: 0 0 14px; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 17px; }

/* 장비 예약 */
.gear-table td { padding: 6px; }
.gear-table form { margin: 0; }
.gear-cell { display: inline-flex; align-items: center; justify-content: center; min-width: 64px; min-height: 40px; padding: 0 8px; border: 2px solid var(--line); border-radius: 8px; background: var(--surface-2); font-size: 15px; }
button.gear-cell { cursor: pointer; font: inherit; color: var(--text-3); }
.gear-cell--free { border-style: dashed; background: var(--surface); color: var(--text-3); }
.gear-cell--mine { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-strong); font-weight: 700; }
