.timetable-main { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 38px 0 80px; }
.tool-heading { margin-bottom: 18px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.tool-heading h1 { margin: 0; font-size: 32px; letter-spacing: -.045em; }
.tool-heading > p:nth-of-type(2) { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.tool-tabs { display: flex; gap: 7px; margin-top: 17px; }
.tool-tab { padding: 8px 13px; border: 1px solid var(--line); border-radius: 7px; color: var(--muted); background: var(--surface); font-size: 12px; font-weight: 750; text-decoration: none; }
.tool-tab.is-active { color: white; border-color: var(--primary); background: var(--primary); }
.analysis-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: stretch; }
.analysis-left, .analysis-side { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; min-height: 0; min-width: 0; }
.analysis-left, .analysis-side { grid-template-rows: auto auto; align-content: start; }
.tool-card, .schedule-card { min-width: 0; padding: 20px; border: 1px solid var(--line); border-radius: 3px; background: var(--surface); box-shadow: none; }
.card-heading, .schedule-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.card-heading h2, .schedule-heading h2 { margin: 0; font-size: 17px; letter-spacing: -.025em; }
.card-heading .section-kicker, .schedule-heading .section-kicker { margin-bottom: 5px; font-size: 10px; }
.compact-heading { margin-bottom: 8px; }
.step-state { padding: 6px 9px; border-radius: 999px; color: var(--muted); background: var(--surface-soft); font-size: 10px; font-weight: 800; }
.step-state.is-complete { color: #426a4c; background: #e4efe4; }
.step-state.is-loading { color: var(--primary-dark); background: var(--primary-soft); }
.upload-card { padding: 17px 20px; }
.upload-card .card-heading { margin-bottom: 10px; }
.upload-dropzone { min-height: 145px; display: grid; grid-template-columns: auto 1fr auto; place-items: center; align-content: center; gap: 5px 12px; overflow: hidden; padding: 16px 20px; border: 1px dashed #cdb8a4; border-radius: 2px; color: var(--muted); background: #fcfaf7; text-align: left; cursor: pointer; }
.upload-dropzone:hover { border-color: var(--primary); background: #fffaf4; }
.upload-icon { grid-row: 1 / span 3; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--primary); font-size: 20px; }
.upload-dropzone strong { color: var(--ink); font-size: 14px; }
.upload-dropzone small { font-size: 11px; }
.upload-dropzone .button { grid-column: 3; grid-row: 1 / span 3; min-height: 36px; margin: 0; padding: 0 12px; pointer-events: none; }
.upload-dropzone.has-image { position: relative; display: block; padding: 0; border-style: solid; }
.upload-dropzone.has-image > :not(img):not(input) { display: none; }
.upload-dropzone img { width: 100%; height: 145px; display: block; object-fit: contain; background: white; }
.upload-dropzone img[hidden] { display: none; }
.upload-actions { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 9px; }
.upload-actions p { max-width: 60%; overflow: hidden; margin: 0; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.upload-actions .button { min-height: 35px; padding: 0 12px; font-size: 11px; }
.button:disabled { cursor: not-allowed; color: #998d83; border-color: var(--line); background: #ece7e2; transform: none; }
.course-table-wrap { min-height: 122px; overflow-x: auto; border: 1px solid #ece4dc; }
.course-table { width: 100%; border-collapse: collapse; }
.course-table th { padding: 8px 9px; color: var(--muted); background: var(--surface-soft); font-size: 10px; text-align: left; }
.course-table td { padding: 9px; border-bottom: 1px solid #ece4dc; font-size: 11px; }
.course-table .empty-row td { height: 86px; color: #9a8d82; text-align: center; }
.result-actions, .save-actions { display: flex; justify-content: flex-end; gap: 7px; margin-top: 10px; }
.result-actions .button, .save-actions .button { min-height: 34px; padding: 0 11px; border-radius: 7px; font-size: 11px; }
.result-card, .availability-card { display: flex; flex-direction: column; }
.result-card { margin-top: 18px; }
.result-card .course-table-wrap { flex: initial; max-height: 360px; }
.result-card .course-table, .result-card .course-table tbody { height: auto; }
.result-card .result-actions, .availability-card .save-actions { margin-top: auto; padding-top: 12px; }
.availability-description { margin: 0 0 12px; color: var(--muted); font-size: 11px; }
.availability-settings { display: grid; gap: 10px; margin: 0; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.time-setting { display: grid; grid-template-columns: 1fr 145px; align-items: center; gap: 15px; }
.time-setting span { color: var(--muted); font-size: 12px; }
.time-setting input, .time-setting select { width: 100%; height: 39px; padding: 0 10px; border: 1px solid var(--line); border-radius: 9px; outline: none; color: var(--ink); background: #fcfaf7; font: inherit; font-size: 12px; }
.time-picker { display: grid; grid-template-columns: 64px 1fr; gap: 6px; }
.time-picker select { padding: 0 7px; }
.schedule-card { padding: 17px 20px; }
.schedule-card .schedule-heading { margin-bottom: 9px; }
.schedule-legend { display: flex; gap: 14px; color: var(--muted); font-size: 11px; }
.schedule-legend span { display: flex; align-items: center; gap: 5px; }
.schedule-legend i { width: 10px; height: 10px; border-radius: 3px; }
.course-color { background: var(--primary); }
.available-color { background: #dce9d8; }
.schedule-guide { margin: 0 0 9px; color: var(--muted); font-size: 10px; }
.schedule-scroll { width: 100%; }
.weekly-schedule { width: 100%; min-width: 0; display: grid; grid-template-columns: 40px repeat(5, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); --schedule-height: 420px; }
.schedule-results { margin-top: 18px; }
.schedule-boards { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); justify-items: center; gap: 16px; }
.schedule-board { width: 100%; max-width: 516px; min-width: 0; }
.schedule-board h3 { margin: 8px 0 12px; font-size: 14px; }
.time-rail { position: relative; height: var(--schedule-height); overflow: clip; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface-soft); }
.time-rail .time-label { position: absolute; left: 4px; font-size: 10px; color: var(--muted); line-height: 1; transform: translateY(-50%); }
.time-rail .time-label:first-child { transform: translateY(3px); }
.time-rail .time-label:last-child { transform: translateY(-110%); }
.day-timeline { position: relative; min-width: 0; height: var(--schedule-height); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background-image: linear-gradient(to bottom, #d9cec3 1px, transparent 1px), linear-gradient(to bottom, #eee7df 1px, transparent 1px); background-size: 100% calc(100% / var(--schedule-hours)), 100% calc(100% / (var(--schedule-hours) * 2)); }
.analysis-progress { margin-top: 14px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-soft); font-size: 12px; }
.analysis-progress p { margin: 0 0 8px; line-height: 1.6; overflow-wrap: anywhere; }
.analysis-progress p:first-child { display: flex; justify-content: space-between; gap: 8px; }
#analysis-elapsed { color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.analysis-progress ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0; }
.analysis-progress li { padding: 5px 7px; border-radius: 5px; color: var(--muted); background: var(--surface); }
.analysis-progress li[data-state="active"] { color: white; background: var(--primary); font-weight: 750; }
.analysis-progress li[data-state="done"] { color: #426a4c; background: #e4efe4; }
.analysis-progress[data-phase="error"] { border-color: var(--danger); }
.analysis-progress[data-phase="error"] strong { color: var(--danger); }
.ai-notice { font-size: 12px; line-height: 1.6; color: var(--muted); }
.schedule-cell.day-agenda { min-height: 180px; padding: 6px; }
.day-agenda p { height: auto; min-height: 44px; margin: 0 0 6px; white-space: pre-line; overflow-wrap: anywhere; }
.course-table input, .course-table select { min-width: 70px; max-width: 145px; padding: 6px; border: 1px solid var(--line); border-radius: 4px; font: inherit; }
#study-days { display: flex; flex-wrap: wrap; gap: 10px; border: 0; padding: 0; font-size: 12px; }
#study-days label { display: flex; align-items: center; gap: 4px; }
.schedule-cell { position: relative; min-height: 26px; padding: 2px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fffdf9; font-size: 8px; }
.schedule-cell.schedule-header { min-height: auto; padding: 8px 4px; color: var(--muted); background: var(--surface-soft); font-size: 11px; font-weight: 800; text-align: center; }
.schedule-cell.time-label { display: flex; align-items: flex-start; justify-content: center; color: #9a8d82; background: var(--surface-soft); }
.course-block, .available-block { position: absolute; box-sizing: border-box; display: flex; align-items: center; justify-content: center; overflow: clip; padding: 0; border: 1px solid #ffffff90; border-radius: 4px; text-align: center; font-size: 10px; line-height: 1.4; white-space: pre-line; overflow-wrap: anywhere; }
.course-block { color: white; background: var(--primary); }
.available-block { color: #426a4c; background: #dce9d8; }
@media (max-width: 900px) { .analysis-grid, .schedule-boards { grid-template-columns: 1fr; } .analysis-left, .analysis-side { grid-template-rows: auto; } .schedule-cell { min-height: 38px; } }
@media (max-width: 620px) { .timetable-main { width: min(100% - 28px, 640px); padding-top: 36px; } .tool-card, .schedule-card { padding: 21px; } .upload-actions { align-items: stretch; flex-direction: column; } .upload-actions p { max-width: 100%; } .time-setting { grid-template-columns: 1fr 125px; } .main-nav { display: none; } }
@media (max-width: 620px) { .time-setting { grid-template-columns: 1fr 156px; } .account-actions { gap: 4px; } .account-actions .button { padding: 9px; font-size: 12px; white-space: nowrap; } }
