* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; color: #344054; background: #eff7ff; font-family: "Noto Sans JP", sans-serif; }
button, input, select { font: inherit; }
.feature-shell { width: min(1680px, calc(100% - 32px)); margin: 20px auto 56px; }
.schedule-app { --task-column-width: 489px; --schedule-card-bg: #e1ecff; --schedule-heading-bg: #b9cdf4; --settings-label-size: 14px; --settings-control-size: 16px; --settings-option-size: 14px; --settings-control-height: 44px; padding: 24px; border: 1px solid #c7d8f4; border-radius: 14px; background: var(--schedule-card-bg); box-shadow: 0 10px 30px rgba(16, 24, 40, .08); }
.schedule-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.schedule-heading h1 { margin: 0 0 5px; color: #1d2939; font-family: "M PLUS Rounded 1c", "Noto Sans JP", sans-serif; font-size: clamp(1.35rem, 2vw, 1.8rem); }
.schedule-heading p { margin: 0; color: #667085; font-size: .88rem; }
.schedule-heading-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.button { min-height: 40px; padding: 8px 16px; border: 1px solid transparent; border-radius: 9px; cursor: pointer; font-weight: 700; }
.button:focus-visible, input:focus-visible, select:focus-visible, [contenteditable]:focus-visible { outline: 3px solid rgba(0, 122, 204, .28); outline-offset: 1px; }
.button--export { color: #fff; background: #075ea8; white-space: nowrap; }
.button--export:hover { background: #064f8c; }
.button--preview { color: #075ea8; border-color: #9ac5e8; background: #fff; white-space: nowrap; }
.button--preview:hover { background: #edf6ff; }
.button--add { color: #075ea8; border-color: #9ac5e8; background: #edf6ff; }
.button--add:hover { background: #dceeff; }
.schedule-title-setting { display: grid; gap: 6px; width: calc(100% - 12px); min-width: 0; margin-left: 12px; color: #102a56; font-size: var(--settings-label-size); font-weight: 800; line-height: 1.4; }
.schedule-title-setting input { min-height: var(--settings-control-height); padding: 8px 11px; border: 1px solid #b9c7d7; border-radius: 7px; color: #1d2939; background: #fff; font-size: var(--settings-control-size); font-weight: 700; }
.schedule-settings { display: grid; grid-template-columns: calc(var(--task-column-width) - 24px) 170px 170px minmax(300px, max-content); align-items: end; column-gap: 24px; row-gap: 12px; min-width: 0; margin-bottom: 12px; padding: 14px 0; border: 1px solid #dce5ef; border-radius: 10px; background: #f8fbfe; }
.schedule-settings label { display: grid; gap: 5px; color: #102a56; font-size: var(--settings-label-size); font-weight: 800; line-height: 1.4; }
.schedule-settings input:not([type="checkbox"]):not([type="radio"]), .schedule-settings select { min-height: var(--settings-control-height); padding: 7px 10px; border: 1px solid #b9c7d7; border-radius: 7px; color: #1d2939; background: #fff; font-size: var(--settings-control-size); font-weight: 700; }
.date-setting__label { display: flex; align-items: center; gap: 6px; min-height: 24px; color: #102a56; font-weight: 800; }
.date-setting__icon { flex: 0 0 21px; width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.date-input-wrap { position: relative; display: block; width: 100%; }
.schedule-settings .date-input-wrap input { width: 100%; padding-right: 42px; cursor: pointer; }
.date-input__icon { position: absolute; top: 50%; right: 11px; width: 24px; height: 24px; pointer-events: none; transform: translateY(-50%); fill: none; stroke: #102a56; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.date-input-wrap input::-webkit-calendar-picker-indicator { width: 32px; height: 100%; margin: 0; padding: 0; opacity: 0; cursor: pointer; }
.date-setting--end, .date-setting--start { width: 170px; }
.unit-setting-panel { display: flex; align-items: end; justify-content: flex-start; gap: 12px; min-width: 0; }
.unit-setting { flex: 0 0 132px; min-width: 132px; }
.schedule-options { display: flex; align-items: end; min-width: 0; padding-bottom: 6px; }
.schedule-settings .check-setting { display: flex; align-items: center; gap: 7px; min-height: 28px; cursor: pointer; font-size: var(--settings-option-size); }
.schedule-settings .check-setting[hidden] { display: none; }
.check-setting input { width: 17px; height: 17px; margin: 0; accent-color: #075ea8; }
.week-display-options { display: flex; align-items: flex-start; flex-direction: column; gap: 4px; min-width: 0; margin: 0; padding: 0; border: 0; }
.week-display-options[hidden] { display: none; }
.week-display-options legend { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.week-display-options label { display: flex; grid: none; align-items: center; gap: 5px; min-height: 28px; white-space: nowrap; cursor: pointer; font-size: var(--settings-option-size); }
.week-display-options input { width: 17px; height: 17px; margin: 0; accent-color: #075ea8; }
.schedule-message { min-height: 22px; color: #b42318; font-size: .8rem; font-weight: 700; }
.schedule-message.is-success { color: #067647; }
.schedule-table-wrap { --period-min-width: 42px; overflow-x: hidden; overflow-y: auto; max-height: calc(100vh - 315px); min-height: 330px; border: 1px solid #98a2b3; border-radius: 9px 9px 0 9px; background: #fff; }
.schedule-bottom-scrollbar-shell { width: calc(100% - var(--task-column-width)); margin-left: var(--task-column-width); }
.schedule-bottom-scrollbar-shell[hidden] { display: none; }
.schedule-bottom-scrollbar { height: 18px; overflow-x: auto; overflow-y: hidden; }
.schedule-bottom-scrollbar__content { height: 1px; }
.schedule-table { width: var(--schedule-table-width, 100%); min-width: var(--schedule-table-width, 100%); border-collapse: separate; border-spacing: 0; color: #000; table-layout: fixed; font-size: .78rem; }
.task-column { width: var(--task-column-width); }
.period-column { width: var(--period-width, var(--period-min-width)); }
.schedule-table th, .schedule-table td { height: 40px; padding: 0; border-right: 1px solid #98a2b3; border-bottom: 1px solid #98a2b3; text-align: center; }
.schedule-table thead th { position: sticky; z-index: 3; color: #000; background: var(--schedule-heading-bg); font-weight: 700; }
.schedule-table thead tr th:not(.task-heading) { top: var(--header-top, 0); height: var(--header-height, 44px); }
.task-heading { top: 0; left: 0; z-index: 7 !important; width: var(--task-column-width); min-width: var(--task-column-width); padding: 0 !important; background: var(--schedule-heading-bg) !important; }
.task-heading-grid, .task-cell { display: grid; grid-template-columns: minmax(248px, 1fr) 84px 52px; gap: 6px; }
.task-heading-grid { align-items: stretch; height: 100%; padding: 0 7px; }
.task-heading-grid span { display: flex; align-items: center; justify-content: center; min-width: 0; padding: 0 5px; border-left: 1px solid #98a2b3; }
.task-heading-grid span:first-child { border-left: 0; }
.task-cell { position: sticky; left: 0; z-index: 2; align-items: center; width: var(--task-column-width); min-width: var(--task-column-width); padding: 4px 7px !important; background: #fff; text-align: left !important; }
.task-field { min-width: 0; min-height: 30px; padding: 5px 7px; overflow: hidden; border: 1px solid transparent; border-radius: 5px; white-space: nowrap; text-overflow: ellipsis; }
.task-field:hover { border-color: #b9c7d7; }
.major-row .task-cell { background: #edf3f8; }
.major-row .timeline-placeholder { background: #edf3f8; }
.major-row td { box-sizing: border-box; height: 40px; border-top: 0; }
.major-field { display: flex; align-items: center; gap: 7px; min-width: 0; }
.major-name { flex: 1; }
.hierarchy-folder { flex: 0 0 19px; width: 19px; height: 19px; fill: none; stroke: #667085; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.6; }
.minor-field { display: flex; align-items: center; gap: 6px; min-width: 0; padding-left: 8px; }
.minor-field .task-field { flex: 1; }
.structure-drag-handle, .minor-drag-handle { display: grid; flex: 0 0 24px; width: 24px; height: 28px; padding: 3px; place-items: center; border: 0; border-radius: 5px; color: #667085; background: transparent; cursor: grab; }
.structure-drag-handle:hover, .minor-drag-handle:hover { color: #075ea8; background: #eaf5ff; }
.structure-drag-handle:active, .minor-drag-handle:active { cursor: grabbing; }
.structure-drag-handle svg, .minor-drag-handle svg { width: 16px; height: 20px; fill: currentColor; }
.minor-row.is-item-dragging { opacity: .5; }
.major-row.is-group-dragging { opacity: .5; }
.is-drop-target-before td { box-shadow: inset 0 3px #1570ef; }
.is-drop-target-after td { box-shadow: inset 0 -3px #1570ef; }
.major-operation { display: flex; align-self: stretch; align-items: center; justify-content: center; min-height: 32px; }
.task-operation { display: flex; align-items: center; justify-content: center; gap: 6px; min-width: 0; }
.delete-task { width: 34px; height: 30px; padding: 0; border: 1px solid #f0b4ae; border-radius: 6px; color: #b42318; background: #fff; cursor: pointer; font-size: 1rem; }
.delete-task:hover { background: #fff1f0; }
.delete-major { flex: 0 0 28px; width: 28px; height: 28px; padding: 5px; border: 1px solid #f0b4ae; border-radius: 6px; color: #b42318; background: #fff; cursor: pointer; line-height: 1; }
.delete-major svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.delete-major:hover { background: #fff1f0; }
.inline-add { min-height: 30px; padding: 3px 10px; border: 1px dashed #9ac5e8; border-radius: 6px; color: #075ea8; background: #f7fbff; cursor: pointer; font-weight: 700; }
.inline-add:hover { background: #eaf5ff; }
.inline-add[aria-disabled="true"] { color: #98a2b3; border-color: #d0d5dd; background: #f2f4f7; cursor: not-allowed; }
.minor-add-row .task-cell, .major-add-row .task-cell { background: #f8fbfe; }
.minor-add-row td, .major-add-row td { height: 38px; }
.minor-add-cell { display: flex; grid-column: 1 / 4; justify-content: stretch; padding-left: 34px; }
.minor-add-cell .inline-add, .major-add-cell .inline-add { width: 100%; }
.major-add-cell { display: flex; grid-column: 1 / 4; justify-content: stretch; }
.timeline-placeholder { background: #f8fbfe; }
.date-group-heading { left: var(--task-column-width); z-index: 5 !important; min-width: var(--period-width, var(--period-min-width)); padding-left: 10px !important; background: var(--schedule-heading-bg) !important; text-align: left !important; }
.period-heading { width: var(--period-width, var(--period-min-width)); min-width: var(--period-min-width); padding: 2px !important; line-height: 1.25; white-space: pre-line; background: #fff !important; }
.period-heading.is-weekend, .period-heading.is-holiday { color: inherit; }
.period-heading.is-weekend.has-non-working-background, .period-heading.is-holiday.has-non-working-background { color: #fff; background: #6b7280 !important; }
.timeline-cell { position: relative; width: var(--period-width, var(--period-min-width)); min-width: var(--period-min-width); cursor: grab; background: #fff; user-select: none; touch-action: none; }
.major-timeline-cell { cursor: default; background: #edf3f8; }
.schedule-app.is-timeline-dragging .timeline-cell[data-task-id] { cursor: grabbing; }
.timeline-cell.is-active::after { position: absolute; inset: 7px 0; content: ""; background: var(--task-color); }
.timeline-cell.is-active.is-range-start::after { left: 4px; border-radius: 7px 0 0 7px; }
.timeline-cell.is-active.is-range-end::after { right: 4px; border-radius: 0 7px 7px 0; }
.timeline-cell.is-active.is-range-start.is-range-end::after { border-radius: 7px; }
.minor-row.is-previewing .timeline-cell.is-active:not(.is-drag-preview)::after { display: none; }
.timeline-cell.is-drag-preview::after { display: block; position: absolute; inset: 7px 0; content: ""; background: var(--task-color); }
.timeline-cell.is-drag-preview.is-preview-start::after { left: 4px; border-radius: 7px 0 0 7px; }
.timeline-cell.is-drag-preview.is-preview-end::after { right: 4px; border-radius: 0 7px 7px 0; }
.timeline-cell.is-drag-preview.is-preview-start.is-preview-end::after { border-radius: 7px; }
.schedule-actions { display: flex; justify-content: flex-start; margin-top: 12px; }
.excel-preview-dialog { width: min(1200px, calc(100% - 32px)); max-width: none; max-height: calc(100vh - 32px); padding: 0; overflow: hidden; border: 1px solid #b9c7d7; border-radius: 12px; color: #344054; background: #fff; box-shadow: 0 20px 60px rgba(16, 24, 40, .24); }
.excel-preview-dialog::backdrop { background: rgba(16, 24, 40, .55); }
.excel-preview-dialog__panel { display: grid; grid-template-rows: minmax(0, 1fr) auto; max-height: calc(100vh - 34px); }
.excel-preview-dialog__footer { display: flex; align-items: center; justify-content: flex-end; gap: 12px; padding: 14px 18px; background: #f8fbfe; }
.excel-preview-dialog__body { min-height: 260px; padding: 18px; overflow: auto; }
.excel-preview-dialog__footer { border-top: 1px solid #dce5ef; }
.excel-preview-table { width: max-content; border-collapse: collapse; table-layout: fixed; font-size: .78rem; }
.excel-preview-table th, .excel-preview-table td { min-width: 0; height: 34px; padding: 6px 4px; overflow: hidden; border: 1px solid #98a2b3; color: #000; background: #fff; text-align: center; white-space: pre-line; text-overflow: ellipsis; }
.excel-preview-table .preview-major { text-align: left; font-weight: 700; }
.excel-preview-table .preview-minor { text-align: left; }
.excel-preview-table .preview-assignee { text-align: left; }
.excel-preview-table .preview-group-row th { background: #f2f4f7; }
.excel-preview-table .preview-major-period { font-weight: 700; }
.excel-preview-table .preview-period { font-weight: 500; }
.excel-preview-table thead .preview-non-working { color: #fff; background: #6b7280; }
.excel-preview-table .preview-period.is-active { background: #75bfff; }
@media (max-width: 760px) {
  .feature-shell { width: calc(100% - 18px); margin: 14px auto 36px; }
  .schedule-app { padding: 14px; }
  .schedule-heading { align-items: stretch; flex-direction: column; }
  .schedule-heading-actions { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .button--export, .button--preview { width: 100%; }
  .schedule-settings { grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; margin-left: 0; }
  .schedule-title-setting { grid-column: 1 / -1; grid-row: 1; }
  .date-setting--start { grid-column: 1; grid-row: 2; }
  .date-setting--end { grid-column: 2; grid-row: 2; }
  .unit-setting-panel { grid-column: 1 / -1; grid-row: 3; justify-content: flex-start; }
  .unit-setting { flex-basis: 150px; }
  .date-setting--end { justify-self: stretch; width: 100%; }
  .date-setting--start { width: 100%; }
  .schedule-options { padding-bottom: 6px; }
  .schedule-table-wrap { max-height: calc(100vh - 420px); min-height: 280px; }
  .schedule-bottom-scrollbar-shell { width: 100%; margin-left: 0; }
  .excel-preview-dialog { width: calc(100% - 16px); }
  .excel-preview-dialog__footer { display: grid; grid-template-columns: 1fr 1fr; }
}

