*{box-sizing:border-box}:root{--navy:#173c67;--blue:#2e75b6;--bg:#f3f6f9;--line:#cdd8e2;--text:#293845;--muted:#6a7b89;--red:#b64d4d;--green:#4b9158;--orange:#c17b2e;--purple:#7951a8;--yellow:#c79b26}html{scroll-behavior:smooth}body{margin:0;background:var(--bg);color:var(--text);font-family:"Yu Gothic","Meiryo",sans-serif;line-height:1.55}a{color:#1769aa}.hero{position:relative;min-height:265px;color:#fff;overflow:hidden;display:flex;align-items:center;padding:32px 5%}.hero-slides,.hero-slide,.hero-overlay{position:absolute;inset:0}.hero-slide{opacity:0;background-size:cover;background-position:center;transition:opacity 1.1s}.hero-slide.active{opacity:1}.hero-overlay{background:linear-gradient(90deg,rgba(8,37,70,.9),rgba(18,68,112,.64) 58%,rgba(20,73,115,.32))}.hero-content{position:relative;z-index:2;text-shadow:0 2px 8px #0007}.hero-content h1{font-size:clamp(26px,4vw,42px);margin:2px 0 6px}.hero-content p{margin:0}.hero-dots{position:absolute;z-index:3;bottom:16px;left:5%;display:flex;gap:8px}.hero-dot{width:10px;height:10px;border:2px solid #fff;border-radius:50%;padding:0;background:transparent}.hero-dot.active{background:#fff}main{width:min(1320px,95%);margin:18px auto 48px}.panel{background:#fff;border:1px solid var(--line);border-radius:13px;padding:18px;margin-bottom:16px;box-shadow:0 3px 12px #19334e0d}.notice{background:#fff8e8;border:1px solid #edd69d;border-left:5px solid #d39a24;border-radius:8px;padding:11px 14px;margin-bottom:16px}.controls{display:grid;grid-template-columns:1.1fr 1.5fr 1.35fr .8fr .9fr 1.45fr;gap:10px;align-items:end}label{display:block;font-size:13px;font-weight:700;margin-bottom:4px}select,input[type=search],input[type=number]{width:100%;border:1px solid #bdcad5;border-radius:8px;background:#fff;padding:9px 10px;font-size:14px}.summary{display:flex;gap:12px;white-space:nowrap;background:#eaf4fc;border:1px solid #bed9ed;border-radius:9px;padding:7px 11px;align-items:center;justify-content:center;min-height:41px}.summary strong{color:var(--blue);font-size:19px}.section-head{display:flex;justify-content:space-between;gap:15px;align-items:center;margin-bottom:12px}.section-head h2{margin:0;color:var(--navy)}.section-head p{margin:2px 0;color:var(--muted);font-size:13px}.actions{display:flex;gap:7px;flex-wrap:wrap}.btn{border:0;border-radius:7px;padding:8px 12px;background:var(--blue);color:#fff;font-weight:700;cursor:pointer}.btn.secondary{background:#65798a}.btn.danger{background:var(--red)}.table-wrap{overflow-x:auto}table{width:100%;min-width:930px;border-collapse:collapse;table-layout:fixed}th,td{border:1px solid #bdcad4}th{background:#edf3f8;height:40px;color:#31516c}th:first-child{width:58px}.period{background:#f7f8fa;text-align:center;font-weight:700}.slot{height:100px;padding:6px;vertical-align:top;cursor:pointer}.slot.empty:after{content:"＋";display:block;text-align:center;color:#9aa7b2;margin-top:31px}.slot:hover{background:#f5faff}.block{height:100%;border-radius:7px;padding:7px;background:#eaf4fc;border-left:5px solid var(--blue);overflow:hidden}.block.english{background:#edf8ed;border-color:var(--green)}.block.human{background:#fff3e8;border-color:var(--orange)}.block.practical{background:#f2ecfb;border-color:var(--purple)}.block.teacher{background:#fff8dc;border-color:#b78a19}.block.otherdept{box-shadow:inset 0 0 0 2px #d0aa3d}.block b{font-size:12.5px;line-height:1.3;display:block}.block small{font-size:11px;color:#536777}.selected-line{margin-top:12px;font-size:13px;color:var(--muted);white-space:nowrap;overflow:auto;padding:7px 0}.filter-panel{padding-bottom:14px}.filters{display:grid;grid-template-columns:2fr repeat(3,1fr);gap:10px}.cross-row{display:flex;align-items:center;gap:8px;margin:12px 0 0;padding-top:10px;border-top:1px solid #e3e9ee;font-size:14px}.cross-row input{width:18px;height:18px}.cross-row span{font-weight:400;color:var(--muted);font-size:12px}.cross-row.disabled{opacity:.55}.section-details{padding:0}.section-details>summary{cursor:pointer;list-style:none;display:flex;justify-content:space-between;align-items:center;padding:15px 18px;font-weight:700;color:var(--navy)}.section-details>summary::-webkit-details-marker{display:none}.section-details>summary:after{content:"＋";font-size:20px}.section-details[open]>summary:after{content:"−"}.section-details>summary small{margin-left:auto;margin-right:14px;color:var(--muted);font-weight:400}.legend{display:flex;gap:14px;padding:0 18px 10px;color:var(--muted);font-size:12px}.dot{width:9px;height:9px;display:inline-block;border-radius:50%;margin-right:4px}.dot.major{background:var(--blue)}.dot.english{background:var(--green)}.dot.human{background:var(--orange)}.dot.practical{background:var(--purple)}.cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(275px,1fr));gap:11px;padding:0 18px 18px}.card{border:1px solid var(--line);border-radius:9px;background:#fff;padding:13px;text-align:left;cursor:pointer}.card:hover{background:#f8fbfe;border-color:var(--blue)}.card.otherdept{border-color:#d7bd68}.card h3{font-size:15.5px;margin:5px 0 6px}.card p{font-size:12.5px;color:var(--muted);margin:2px 0}.badge{display:inline-block;border-radius:99px;padding:2px 7px;background:#e8eef4;color:#435768;font-size:10.5px;margin:0 3px 3px 0}.badge.required{background:#fee5e5;color:#9e3838}.badge.practical{background:#eee5fb;color:#6d469a}.badge.other{background:#fff0c4;color:#785e13}.badge.verified{background:#def4e7;color:#28714a}.badge.year{background:#e7f1fb;color:#2c628d}.badge.self{background:#f0f1f3;color:#5c6670}.modal.hidden{display:none}.modal{position:fixed;inset:0;z-index:50}.back{position:absolute;inset:0;background:#0c1d2f99}.dialog{position:relative;width:min(1120px,96%);max-height:92vh;overflow:auto;margin:4vh auto;background:#fff;border-radius:15px;padding:21px;box-shadow:0 20px 60px #0005}.head{display:flex;justify-content:space-between;gap:15px}.head h2{margin:0;color:var(--navy);font-size:clamp(22px,4vw,32px)}.head p{margin:0;color:var(--muted)}.close{border:0;background:none;font-size:34px;color:#60717f;cursor:pointer}.choice{width:100%;display:block;text-align:left;border:1px solid var(--line);background:#fff;border-radius:8px;padding:11px;margin:7px 0;cursor:pointer}.choice:hover{background:#f6fbff;border-color:var(--blue)}.detail-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:16px 0}.info-box,.raw{background:#f4f7fa;border-radius:10px;padding:13px;overflow-wrap:anywhere}.raw{white-space:pre-wrap;font-size:13.5px;line-height:1.7}.info-box p{margin:3px 0}.detail-section h3{color:var(--navy);margin:19px 0 7px}.warning{background:#fff8e7;border:1px solid #edd69d;border-radius:8px;padding:9px 11px;color:#69531e}.credit-inputs{display:grid;grid-template-columns:repeat(5,1fr);gap:9px;padding:0 18px 14px}.credit-inputs label{font-size:12px}.progress-settings{padding:0 18px 12px}.progress-bars{padding:0 18px}.progress-row{display:grid;grid-template-columns:145px 1fr 110px;gap:10px;align-items:center;margin:8px 0}.progress-track{height:13px;background:#e7edf2;border-radius:99px;overflow:hidden}.progress-fill{height:100%;background:var(--blue)}.progress-message{margin:12px 18px 18px;background:#f5f8fa;border-radius:9px;padding:11px;font-size:13px}.empty-state{padding:24px;text-align:center;color:var(--muted);background:#f6f8fa;border-radius:9px}footer{text-align:center;color:#6f7d89;padding:22px;font-size:13px}@media(max-width:1100px){.controls{grid-template-columns:repeat(3,1fr)}.credit-inputs{grid-template-columns:repeat(3,1fr)}}@media(max-width:760px){.controls,.filters,.detail-grid,.credit-inputs{grid-template-columns:1fr}.section-head{align-items:flex-start;flex-direction:column}.summary{justify-content:flex-start}.cross-row{align-items:flex-start;flex-wrap:wrap}.progress-row{grid-template-columns:1fr}.hero{min-height:235px}}
@media print{body *{visibility:hidden!important}#timetablePanel,#timetablePanel *{visibility:visible!important}#timetablePanel{position:absolute;left:0;top:0;width:100%;margin:0;border:0;box-shadow:none;padding:0}.actions,.selected-line,.section-head p{display:none!important}table{min-width:0}.slot{height:92px}}
/* v2.1 UI refinements */
.control-panel{padding:16px 18px}.control-grid{display:grid;gap:10px;align-items:end}.primary-controls{grid-template-columns:1.05fr 1.5fr 1.15fr .72fr .82fr 1.28fr}.filter-divider{height:1px;background:#e3e9ee;margin:13px 0 11px}.filter-controls{grid-template-columns:2fr 1fr 1.1fr .9fr minmax(265px,1.35fr)}.search-control{min-width:0}.cross-row{display:flex;align-items:center;gap:7px;margin:0;padding:0 2px 8px;border:0;font-size:13px;white-space:nowrap;min-height:41px}.cross-row input{width:17px;height:17px;flex:0 0 auto}.cross-title{font-weight:700;color:var(--text)}.cross-row span#crossNote{font-weight:400;color:var(--muted);font-size:11.5px}.cross-row.disabled{opacity:.52}
.legend-box{margin:0 18px 12px;padding:9px 11px;background:#f7f9fb;border:1px solid var(--line);border-radius:8px}.dot.teacher{background:#d18a24}
.card{position:relative;overflow:hidden;border-left:6px solid var(--blue);background:linear-gradient(90deg,#eef7ff 0,#fff 31%);padding:13px 13px 12px}.card.major{border-left-color:#1769aa;background:linear-gradient(90deg,#eef7ff 0,#fff 31%)}.card.english{border-left-color:var(--green);background:linear-gradient(90deg,#eef8ef 0,#fff 31%)}.card.human{border-left-color:var(--orange);background:linear-gradient(90deg,#fff4e7 0,#fff 31%)}.card.practical{border-left-color:var(--purple);background:linear-gradient(90deg,#f3edfb 0,#fff 31%)}.card.teacher{border-left-color:#d18a24;background:linear-gradient(90deg,#fff2df 0,#fff 31%)}.card.other{border-left-color:#8393a1;background:linear-gradient(90deg,#f2f5f7 0,#fff 31%)}.card.otherdept{box-shadow:inset 0 0 0 2px #d7aa32}.card h3{font-size:15.5px;margin:5px 0 7px;color:#243847}.card-meta{display:flex;flex-wrap:wrap;gap:5px 10px;font-size:12.5px;color:#536777;margin:3px 0}.card-meta strong{color:#344d61}.eval-main{margin-top:8px;padding-top:7px;border-top:1px solid #e4e9ed;font-size:12px!important;color:#4d6272!important}.eval-main b{color:#315f84}.badge.category-major{background:#e6f2fc;color:#1769aa}.badge.category-english{background:#e8f5e9;color:#397a40}.badge.category-human{background:#fff0df;color:#9a5c1c}.badge.category-practical{background:#eee5fb;color:#70499c}.badge.category-teacher{background:#fff0d9;color:#885b16}
.block.major{background:#eaf4fc;border-color:#1769aa}.block.english{background:#edf8ed;border-color:var(--green)}.block.human{background:#fff3e8;border-color:var(--orange)}.block.practical{background:#f2ecfb;border-color:var(--purple)}.block.teacher{background:#fff2df;border-color:#d18a24}.block.other{background:#f1f4f6;border-color:#8393a1}
@media(max-width:1180px){.primary-controls{grid-template-columns:repeat(3,1fr)}.filter-controls{grid-template-columns:2fr 1fr 1fr}.cross-row{white-space:normal}}
@media(max-width:760px){.primary-controls,.filter-controls{grid-template-columns:1fr}.cross-row{padding-bottom:2px}.legend-box{margin-left:12px;margin-right:12px}}
/* v2.2: compact, informative course choices in timetable modal */
.choice{display:block;width:100%;text-align:left;border-left:5px solid var(--line);}
.choice.major{border-left-color:#3b82f6;background:#f7fbff}
.choice.english{border-left-color:#22c55e;background:#f7fff9}
.choice.human{border-left-color:#f59e0b;background:#fffaf2}
.choice.practical{border-left-color:#8b5cf6;background:#fbf8ff}
.choice.teacher{border-left-color:#f97316;background:#fff8f3}
.choice.other{border-left-color:#94a3b8;background:#fafafa}
.choice.otherdept{outline:1px solid #d8b400;outline-offset:-1px}
.choice-meta{display:block;margin-top:5px;font-size:.86rem;color:#5f6f82;line-height:1.45}
.choice .badge{display:inline-block;margin-top:6px}

/* v2.3: restore the clearer v1-style progress and syllabus detail UI */
.progress-details{padding:0;overflow:hidden}.progress-summary-toggle{list-style:none;display:flex!important;justify-content:space-between!important;align-items:center;padding:17px 18px!important}.progress-summary-toggle::-webkit-details-marker{display:none}.progress-summary-toggle h2{margin:0;color:var(--navy);font-size:20px}.progress-summary-toggle p{margin:3px 0 0;color:var(--muted);font-size:13px}.fold-hint{background:#eaf4fc;color:#2f75b5;border:1px solid #b9d8ee;border-radius:99px;padding:5px 11px;font-size:12px;font-weight:700}.progress-details[open] .fold-hint{font-size:0}.progress-details[open] .fold-hint:after{content:"閉じる";font-size:12px}.progress-details>summary:after{display:none!important}.progress-inner{padding:0 18px 18px;border-top:1px solid var(--line)}.progress-head{display:flex;justify-content:space-between;align-items:center;margin:15px 0 10px}.progress-head p{margin:0;color:var(--muted);font-size:13px}.progress-layout{display:grid;grid-template-columns:minmax(300px,.95fr) minmax(500px,1.55fr);gap:16px}.credit-details{border:1px solid var(--line);border-radius:10px;padding:0 13px 13px;background:#fff}.credit-details summary{cursor:pointer;font-weight:700;color:var(--navy);padding:12px 0}.credit-inputs{display:grid!important;grid-template-columns:repeat(2,minmax(120px,1fr))!important;gap:10px!important;padding:0!important}.credit-inputs label{font-size:12px;font-weight:700;color:#23394c}.credit-inputs input{display:block;width:100%;margin-top:5px;padding:9px 10px;border:1px solid #bfcbd7;border-radius:8px;background:#fff}.credit-inputs small{display:block;color:var(--muted);font-weight:400;margin-top:3px}.progress-summary{display:grid;grid-template-columns:repeat(3,minmax(130px,1fr));gap:10px;margin-bottom:12px}.metric{border:1px solid var(--line);border-radius:10px;padding:12px;background:#f8fafc}.metric b{display:block;color:var(--navy);font-size:21px;margin:4px 0}.metric small{color:var(--muted)}.plan-toggle{display:block;width:max-content;max-width:100%;margin:0 0 12px;padding:9px 11px;background:#eef6fc;border:1px solid #bdd8ed;border-radius:8px;font-size:13px}.requirement-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:9px}.req-card{border:1px solid var(--line);border-radius:9px;padding:10px;background:#fff}.req-card.planned-view{background:#f3f9fd;border-color:#b9d8ee}.req-card .top{display:flex;justify-content:space-between;gap:8px;font-size:12px}.req-card .top b{color:var(--navy)}.planned-label{font-size:10px;color:#2f75b5;font-weight:700;margin-left:5px}.progbar{height:8px;background:#e6edf3;border-radius:99px;overflow:hidden;margin:7px 0}.progbar span{display:block;height:100%;background:#397fb9}.req-card.ok .progbar span{background:#4f9651}.req-card.warn .progbar span{background:#c69222}.milestones{display:grid;grid-template-columns:repeat(3,minmax(180px,1fr));gap:10px;margin-top:12px}.milestone{border:1px solid var(--line);border-radius:10px;padding:12px;background:#f9fbfd}.milestone strong{display:block;color:var(--navy);margin-bottom:5px}.milestone span{display:block;margin-bottom:4px;font-weight:700}.milestone .ok{color:#337a51}.milestone .warn{color:#9a6814}.milestone small{color:var(--muted);line-height:1.55}.progress-message{margin:12px 0 0}.progress-foot{font-size:11px;color:var(--muted);margin:10px 0 0}
.detail-section h3{color:var(--navy);font-size:19px;margin:22px 0 8px}.detail-grid{gap:14px;margin:14px 0 18px}.info-box{background:#f4f7fa;border-radius:12px;padding:15px}.info-box p{margin:5px 0;line-height:1.55}.raw{background:#f4f7fa;border-radius:10px;padding:15px;white-space:pre-wrap;font-size:14px;line-height:1.75}.eval-bars{padding:4px 0 2px}.eval-row{display:grid;grid-template-columns:minmax(180px,320px) 1fr 55px;gap:12px;align-items:center;margin:12px 0}.eval-row span{color:#34495d}.eval-row b{text-align:right;font-size:16px}.eval-track{height:18px;background:#e5ebf1;border-radius:99px;overflow:hidden}.eval-track i{display:block;height:100%;background:#4f83bf;border-radius:99px}
@media(max-width:900px){.progress-layout,.progress-summary,.milestones{grid-template-columns:1fr}.credit-inputs{grid-template-columns:1fr!important}.eval-row{grid-template-columns:1fr 55px}.eval-track{grid-column:1/3}}

.badge.application{background:#fde2e2;color:#9b2f2f}.badge.adult-special{background:#e8ddf7;color:#69449a}.badge.confirm{background:#fff0c4;color:#785e13}.choice-meta{display:block;margin-top:3px;color:var(--muted);font-size:12px}.warning b{color:var(--navy)}
/* v2.7: source-preserving evaluation display */
.eval-unweighted{background:#f4f7fa;border-radius:10px;padding:14px 15px;color:#41586b}.eval-unweighted>b{color:var(--navy)}.eval-unweighted p{margin:8px 0 0;font-size:13px;color:var(--muted)}.eval-chips{display:flex;flex-wrap:wrap;gap:7px;margin-top:10px}.eval-chip{display:inline-block;background:#fff;border:1px solid #ccd9e4;border-radius:99px;padding:4px 9px;font-size:12px;color:#40566a}.eval-note{margin:8px 0 0;padding:8px 10px;background:#f7f9fb;border-radius:7px;color:#5c6f7f;font-size:12.5px}.eval-source-warning{margin:8px 0 0;padding:8px 10px;background:#fff4df;border:1px solid #ebcf99;border-radius:7px;color:#7a591c;font-size:12.5px}.eval-formula{margin-top:10px;padding:9px 10px;background:#fff;border:1px solid #d6e0e8;border-radius:7px;font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:12.5px;color:#31475a}


/* v2.8: unified section open/close UI */
.section-details{padding:0;overflow:hidden}
.section-details>.section-toggle{
  list-style:none;
  display:flex!important;
  justify-content:space-between!important;
  align-items:center;
  gap:14px;
  padding:17px 18px!important;
  cursor:pointer;
  border-radius:13px;
}
.section-details>.section-toggle::-webkit-details-marker{display:none}
.section-details>.section-toggle:after{display:none!important;content:none!important}
.section-toggle>div{min-width:0}
.section-toggle h2{
  margin:0;
  color:var(--navy);
  font-size:20px;
  line-height:1.35;
}
.section-toggle p{
  margin:3px 0 0;
  color:var(--muted);
  font-size:13px;
  font-weight:400;
}
.section-toggle .fold-hint{
  flex:0 0 auto;
  background:#eaf4fc;
  color:#2f75b5;
  border:1px solid #b9d8ee;
  border-radius:99px;
  padding:5px 11px;
  font-size:12px;
  font-weight:700;
}
.section-details[open]>.section-toggle .fold-hint{font-size:0}
.section-details[open]>.section-toggle .fold-hint:after{content:"閉じる";font-size:12px}
.section-details:not([open])>.section-toggle .fold-hint{font-size:12px}
.section-details[open]>.section-toggle{border-bottom-left-radius:0;border-bottom-right-radius:0}
#courseDetails .legend-box{border-top:1px solid var(--line);padding-top:10px}
.progress-inner{border-top:1px solid var(--line)}
.progress-summary-toggle{all:unset}
.progress-message small{color:var(--muted);line-height:1.55}

/* Make the 2026+ external-credit rule visible without adding another block. */
.credit-inputs label small+small{
  margin-top:5px;
  padding-top:5px;
  border-top:1px dashed #d9e1e8;
  color:#5d7080;
}


/* v2.9: multiple vertically comparable timetable plans */
.timetable-area{margin:0 0 16px}
.timetable-area-head{display:flex;justify-content:space-between;align-items:flex-end;margin:0 2px 10px}
.timetable-area-head h2{margin:0;color:var(--navy);font-size:21px}
.timetable-area-head p{margin:3px 0 0;color:var(--muted);font-size:13px}
#timetablePlans{display:grid;gap:14px}
.timetable-plan{padding:0;overflow:hidden;margin:0}
.timetable-toggle{background:#fff}
.plan-title-wrap h2{display:flex;align-items:center;flex-wrap:wrap;gap:8px}
.plan-base-badge{display:inline-block;font-size:10px;line-height:1;background:#e4f3e7;color:#367244;border:1px solid #bddcc3;border-radius:99px;padding:5px 8px;font-weight:700}
.timetable-plan-inner{border-top:1px solid var(--line);padding:12px 14px 14px}
.plan-toolbar{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:10px;flex-wrap:wrap}
.plan-toolbar-left{display:flex;gap:7px;flex-wrap:wrap}
.plan-stat{background:#f3f6f8;border:1px solid var(--line);border-radius:99px;padding:5px 9px;color:#506474;font-size:12px;font-weight:700}
.plan-actions{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}
.btn.small{padding:6px 9px;font-size:11.5px;border-radius:7px}
.btn.active-base{background:#e4f3e7;color:#367244;border-color:#bddcc3}
.add-plan-btn{margin-top:12px;width:100%;background:#f7fafc;color:#2f75b5;border:1px dashed #9fc6e3}
.detail-plan-action{display:flex;align-items:flex-end;gap:10px;flex-wrap:wrap;margin-top:18px}
.detail-plan-action label{font-size:12px;color:#536777;font-weight:700}
.detail-plan-action select{display:block;min-width:180px;margin-top:4px;padding:8px 10px;border:1px solid #bdcbd8;border-radius:8px;background:#fff}
.summary{align-items:center}
.summary span:first-child{white-space:nowrap}
.summary #summaryPlanName{font-size:13px}

/* Print one timetable plan only */
@media print{
  body.printing-plan .hero,
  body.printing-plan .notice,
  body.printing-plan .control-panel,
  body.printing-plan .timetable-area-head,
  body.printing-plan #courseDetails,
  body.printing-plan #progressDetails,
  body.printing-plan .add-plan-btn,
  body.printing-plan footer,
  body.printing-plan .timetable-plan:not(.print-target),
  body.printing-plan .plan-toolbar{display:none!important}
  body.printing-plan main{max-width:none!important;margin:0!important;padding:0!important}
  body.printing-plan #timetablePlans{display:block!important}
  body.printing-plan .timetable-plan.print-target{display:block!important;border:none!important;box-shadow:none!important}
  body.printing-plan .timetable-plan.print-target>summary{display:flex!important;padding:0 0 10px!important}
  body.printing-plan .timetable-plan.print-target .fold-hint{display:none!important}
  body.printing-plan .timetable-plan-inner{display:block!important;border:none!important;padding:0!important}
  body.printing-plan .table-wrap{overflow:visible!important}
}
@media(max-width:900px){
  .plan-toolbar{align-items:flex-start}
  .plan-actions{justify-content:flex-start}
}


/* v2.9.1: timetable open/close UI aligned with course/progress sections */
.timetable-plan>.timetable-toggle{
  position:relative;
  padding:17px 18px!important;
}
.timetable-plan>.timetable-toggle::marker{content:""}
.timetable-plan>.timetable-toggle::-webkit-details-marker{display:none!important}
.timetable-plan>.timetable-toggle:before{display:none!important;content:none!important}
.timetable-plan>.timetable-toggle .fold-hint{
  margin-left:auto;
  flex:0 0 auto;
}
.timetable-plan>.timetable-toggle .plan-title-wrap{
  flex:1 1 auto;
  min-width:0;
}


/* v2.10: timetable toggle alignment + backup tools */
.timetable-plan>.timetable-toggle{
  display:flex!important;
  justify-content:space-between!important;
  align-items:center!important;
  width:100%!important;
  min-width:0;
  list-style:none!important;
  box-sizing:border-box;
}
.timetable-plan>.timetable-toggle::marker{content:""!important;font-size:0!important}
.timetable-plan>.timetable-toggle::-webkit-details-marker{display:none!important}
.timetable-plan>.timetable-toggle .plan-title-wrap{flex:1 1 auto;min-width:0}
.timetable-plan>.timetable-toggle .plan-fold-hint{
  margin-left:auto!important;
  flex:0 0 auto!important;
  align-self:center;
}
.plan-fold-hint .label-close{display:none}
.timetable-plan[open]>.timetable-toggle .plan-fold-hint .label-open{display:none}
.timetable-plan[open]>.timetable-toggle .plan-fold-hint .label-close{display:inline}
.timetable-plan[open]>.timetable-toggle .plan-fold-hint{font-size:12px!important}
.timetable-plan[open]>.timetable-toggle .plan-fold-hint:after{display:none!important;content:none!important}

.data-tools{
  display:flex;
  align-items:center;
  gap:7px;
  flex-wrap:wrap;
  margin-top:11px;
  padding-top:10px;
  border-top:1px solid #e3e9ee;
}
.data-tools-label{font-size:12px;font-weight:700;color:#38566f;margin-right:2px}
.data-tools-note{font-size:11.5px;color:var(--muted);margin-left:3px}

/* Legacy page-print rules are bypassed by the dedicated print window in v2.10. */


/* v2.12 */
#creditPeriodLabel{
  color:var(--muted);
  font-size:11px;
  font-weight:500;
  margin-left:5px;
}


/* v2.13: responsive mobile layout (same URL, same data/logic) */
.mobile-timetable{display:none}
.mobile-day-tabs{
  display:grid;
  grid-template-columns:repeat(6,1fr);
  gap:6px;
  margin-bottom:9px;
}
.mobile-day-tab{
  border:1px solid #c8d5df;
  background:#f6f9fb;
  color:#40596e;
  border-radius:8px;
  min-height:42px;
  font-weight:700;
  cursor:pointer;
}
.mobile-day-tab small{
  display:block;
  min-height:12px;
  margin-top:1px;
  font-size:9px;
  font-weight:600;
  color:#7a8995;
}
.mobile-day-tab.active{
  background:#e8f3fb;
  border-color:#81b4d9;
  color:#1f6598;
}
.mobile-day-panel{
  border:1px solid #d6e0e8;
  border-radius:10px;
  overflow:hidden;
  background:#fff;
}
.mobile-day-title{
  padding:8px 11px;
  background:#eef4f8;
  color:#31516c;
  font-weight:700;
  border-bottom:1px solid #d6e0e8;
}
.mobile-period-row{
  display:grid;
  grid-template-columns:48px minmax(0,1fr);
  border-bottom:1px solid #e5ebef;
  min-height:58px;
}
.mobile-period-row:last-child{border-bottom:0}
.mobile-period-label{
  display:flex;
  align-items:center;
  justify-content:center;
  background:#f8fafb;
  border-right:1px solid #e5ebef;
  font-weight:700;
  color:#536777;
  font-size:12px;
}
.mobile-course,.mobile-empty{
  margin:6px;
  border:1px solid #d2dde5;
  border-radius:8px;
  text-align:left;
  padding:7px 9px;
  cursor:pointer;
  background:#fff;
}
.mobile-course{
  border-left:5px solid var(--blue);
  background:#eaf4fc;
}
.mobile-course.english{border-left-color:var(--green);background:#edf8ed}
.mobile-course.human{border-left-color:var(--orange);background:#fff3e8}
.mobile-course.practical{border-left-color:var(--purple);background:#f2ecfb}
.mobile-course.teacher{border-left-color:#b78a19;background:#fff8dc}
.mobile-course.otherdept{box-shadow:inset 0 0 0 1px #d0aa3d}
.mobile-course b{display:block;font-size:12.5px;line-height:1.3}
.mobile-course small{display:block;color:#627585;font-size:10.5px;margin-top:3px}
.mobile-empty{
  color:#6e8190;
  background:#fbfcfd;
  text-align:center;
  font-size:11px;
}

@media(max-width:760px){
  body{font-size:14px}
  .hero{min-height:165px;padding:18px 4%}
  .hero-content h1{font-size:22px;line-height:1.25}
  .hero-content p:first-child{font-size:12px}
  .hero-content p:last-child{font-size:11px;max-width:92%}
  .hero-dots{bottom:10px;left:4%}
  main{width:96%;margin:10px auto 28px}
  .notice{font-size:11.5px;padding:9px 10px;margin-bottom:10px}
  .panel{border-radius:10px;margin-bottom:10px}
  .control-panel{padding:12px}

  .primary-controls{
    grid-template-columns:1fr 1fr!important;
    gap:8px!important;
  }
  .primary-controls>div:nth-child(1),
  .primary-controls>div:nth-child(2),
  .primary-controls>.summary{grid-column:1/-1}
  .primary-controls label,.filter-controls label{font-size:11px}
  select,input[type=search],input[type=number]{font-size:13px;padding:8px}

  .filter-controls{
    grid-template-columns:1fr 1fr!important;
    gap:8px!important;
  }
  .filter-controls .search-control,
  .filter-controls .cross-row{grid-column:1/-1}
  .filter-divider{margin:10px 0!important}
  .cross-row{font-size:12px;margin-top:3px;padding-top:7px}
  .cross-row span{font-size:10.5px}
  .summary{
    display:grid;
    grid-template-columns:1fr;
    gap:0;
    justify-items:start;
    padding:7px 9px;
  }
  .summary strong{font-size:15px}

  .data-tools{gap:6px}
  .data-tools-label,.data-tools-note{width:100%}
  .data-tools .btn{flex:1 1 calc(50% - 4px)}
  .data-tools-note{font-size:10px}

  .timetable-area-head h2{font-size:18px}
  .timetable-area-head p{font-size:10.5px;line-height:1.45}
  .desktop-timetable{display:none}
  .mobile-timetable{display:block}
  .timetable-plan-inner{padding:9px}
  .plan-toolbar{display:block}
  .plan-toolbar-left{margin-bottom:7px}
  .plan-actions{
    display:grid!important;
    grid-template-columns:1fr 1fr;
    gap:5px!important;
  }
  .plan-actions .btn{width:100%;padding:7px 5px;font-size:10.5px}
  .plan-title-wrap h2{font-size:17px}
  .plan-title-wrap p{font-size:11px}
  .plan-base-badge{font-size:9px}
  .section-toggle{padding:12px!important}
  .section-toggle h2{font-size:17px}
  .section-toggle p{font-size:10.5px}
  .fold-hint{font-size:10.5px!important;padding:4px 8px!important}

  .cards{grid-template-columns:1fr;padding:0 10px 12px;gap:7px}
  .card{padding:10px}
  .card h3{font-size:14px}
  .card p{font-size:11px}
  .legend{overflow-x:auto;white-space:nowrap;padding:0 10px 8px}
  .legend span{flex:0 0 auto}

  .dialog{
    width:100%;
    max-height:100dvh;
    height:100dvh;
    margin:0;
    border-radius:0;
    padding:14px 12px 22px;
  }
  .head{position:sticky;top:-14px;background:#fff;z-index:3;padding:8px 0;border-bottom:1px solid #e5ebef}
  .head h2{font-size:20px}
  .close{font-size:30px}
  .detail-grid{grid-template-columns:1fr!important}
  .raw{font-size:12px;line-height:1.65}
  .detail-section h3{font-size:17px}

  .progress-layout,.progress-summary,.milestones{grid-template-columns:1fr!important}
  .progress-inner{padding-top:8px}
  .progress-head{padding:0 10px!important}
  .progress-layout{padding:0 10px 10px!important}
  .credit-inputs{grid-template-columns:1fr 1fr!important;padding:8px!important}
  .requirement-grid{grid-template-columns:1fr!important}
  .progress-summary{grid-template-columns:1fr 1fr!important}
  .metric{padding:10px!important}
  .metric b{font-size:20px!important}
}

@media(max-width:420px){
  .primary-controls,.filter-controls{grid-template-columns:1fr 1fr!important}
  .mobile-day-tabs{gap:4px}
  .mobile-day-tab{min-height:38px;font-size:12px;padding:3px}
  .credit-inputs{grid-template-columns:1fr!important}
  .progress-summary{grid-template-columns:1fr!important}
}


/* v2.14: desktop timetable compacting without changing overall composition */
@media(min-width:761px){
  .timetable-plan .table-wrap table{font-size:11px}
  .timetable-plan .table-wrap th{height:30px;padding:4px}
  .timetable-plan .table-wrap .slot{height:76px;padding:4px}
  .timetable-plan .table-wrap .period{font-size:11px}
  .timetable-plan .table-wrap .block{padding:5px 6px}
  .timetable-plan .table-wrap .block b{
    font-size:10.5px;
    line-height:1.22;
    display:-webkit-box;
    -webkit-line-clamp:2;
    -webkit-box-orient:vertical;
    overflow:hidden;
  }
  .timetable-plan .table-wrap .block small{
    font-size:9px;
    line-height:1.25;
  }
  .timetable-plan-inner{padding:10px 12px 12px}
  .plan-toolbar{margin-bottom:8px}
}

/* Mobile weekly timetable */
.mobile-view-toggle{
  display:flex;
  gap:5px;
  justify-content:flex-end;
  margin-bottom:8px;
}
.mobile-view-toggle button{
  border:1px solid #c8d5df;
  background:#f7f9fb;
  color:#52697b;
  border-radius:99px;
  padding:5px 10px;
  font-size:10.5px;
  font-weight:700;
}
.mobile-view-toggle button.active{
  background:#e8f3fb;
  border-color:#81b4d9;
  color:#1f6598;
}
.mobile-week-wrap{
  width:100%;
  overflow:hidden;
  border:1px solid #d6e0e8;
  border-radius:9px;
  background:#fff;
}
.mobile-week-grid{
  display:grid;
  grid-template-columns:28px repeat(6,minmax(0,1fr));
  grid-auto-rows:48px;
  width:100%;
}
.mobile-week-corner,
.mobile-week-head,
.mobile-week-period,
.mobile-week-cell{
  border-right:1px solid #e3e9ee;
  border-bottom:1px solid #e3e9ee;
}
.mobile-week-head{
  display:flex;
  align-items:center;
  justify-content:center;
  background:#eef4f8;
  color:#31516c;
  font-size:10px;
  font-weight:700;
}
.mobile-week-corner{background:#eef4f8}
.mobile-week-period{
  display:flex;
  align-items:center;
  justify-content:center;
  background:#f8fafb;
  color:#667989;
  font-size:9px;
  font-weight:700;
}
.mobile-week-cell{
  appearance:none;
  border-top:0;
  border-left:0;
  margin:0;
  padding:2px 2px;
  background:#fff;
  min-width:0;
  overflow:hidden;
  cursor:pointer;
}
.mobile-week-cell:last-child,
.mobile-week-head:last-child{border-right:0}
.mobile-week-cell.filled{
  border-left:3px solid var(--blue);
  background:#eaf4fc;
}
.mobile-week-cell.english{border-left-color:var(--green);background:#edf8ed}
.mobile-week-cell.human{border-left-color:var(--orange);background:#fff3e8}
.mobile-week-cell.practical{border-left-color:var(--purple);background:#f2ecfb}
.mobile-week-cell.teacher{border-left-color:#b78a19;background:#fff8dc}
.mobile-week-cell.otherdept{box-shadow:inset 0 0 0 1px #d0aa3d}
.mobile-week-cell b{
  display:-webkit-box;
  -webkit-line-clamp:3;
  -webkit-box-orient:vertical;
  overflow:hidden;
  font-size:7.5px;
  line-height:1.1;
  word-break:break-all;
  color:#203c52;
}
.mobile-week-cell.empty{background:#fbfcfd}
.mobile-week-cell.empty:after{
  content:"+";
  display:block;
  text-align:center;
  color:#c2cdd5;
  font-size:12px;
  line-height:43px;
}

@media(max-width:420px){
  .mobile-week-grid{grid-template-columns:25px repeat(6,minmax(0,1fr));grid-auto-rows:44px}
  .mobile-week-cell b{font-size:7px}
  .mobile-week-period,.mobile-week-head{font-size:8.5px}
}


/* v2.15: section toggle labels */
.section-fold-hint .label-close{display:none}
.section-details[open]>.section-toggle .section-fold-hint .label-open{display:none}
.section-details[open]>.section-toggle .section-fold-hint .label-close{display:inline}
.section-details[open]>.section-toggle .section-fold-hint{
  font-size:12px!important;
}
.section-details[open]>.section-toggle .section-fold-hint:after{
  display:none!important;
  content:none!important;
}
.section-details:not([open])>.section-toggle .section-fold-hint .label-open{display:inline}
.section-details:not([open])>.section-toggle .section-fold-hint .label-close{display:none}

/* Mobile detail quick facts */
.mobile-detail-quick{display:none}

@media(max-width:760px){
  /* Ensure only one open/close label appears on mobile */
  .section-details>.section-toggle .section-fold-hint{
    font-size:10.5px!important;
    padding:4px 8px!important;
  }
  .section-details[open]>.section-toggle .section-fold-hint:after{
    display:none!important;
    content:none!important;
  }

  /* More compact course list */
  .cards{
    gap:5px!important;
    padding:0 8px 9px!important;
  }
  .card{
    padding:8px 9px!important;
    border-radius:8px!important;
  }
  .card h3{
    font-size:13px!important;
    line-height:1.28;
    margin:3px 0 4px!important;
  }
  .card-meta{
    display:flex;
    flex-wrap:wrap;
    gap:2px 7px;
    font-size:10px!important;
    line-height:1.3;
  }
  .card p,
  .eval-main{
    font-size:10.5px!important;
    line-height:1.35;
    margin:2px 0!important;
  }
  .badge{
    font-size:9px!important;
    padding:1px 5px!important;
    margin:0 2px 2px 0!important;
  }
  .legend{
    font-size:10px!important;
    padding-bottom:6px!important;
    gap:9px!important;
  }

  /* Quick facts at the very top of course detail */
  .mobile-detail-quick{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:6px;
    margin:10px 0 11px;
  }
  .mobile-detail-quick>div{
    background:#eef4f8;
    border:1px solid #d6e0e8;
    border-radius:8px;
    padding:7px 8px;
    min-width:0;
  }
  .mobile-detail-quick span{
    display:block;
    color:#6a7b89;
    font-size:9.5px;
    margin-bottom:2px;
  }
  .mobile-detail-quick b{
    display:block;
    color:#173c67;
    font-size:11px;
    line-height:1.3;
    overflow-wrap:anywhere;
  }

  /* Keep evaluation near the top visually */
  .detail-grid{
    margin:8px 0 10px!important;
    gap:7px!important;
  }
  .info-box{
    padding:10px!important;
  }
  .info-box p{
    font-size:11px;
    margin:3px 0!important;
  }
  .detail-section h3{
    margin:15px 0 6px!important;
  }
  .eval-row{
    grid-template-columns:minmax(90px,140px) 1fr 42px!important;
    gap:6px!important;
    margin:8px 0!important;
  }
  .eval-row span{font-size:10.5px}
  .eval-row b{font-size:11px}
  .eval-track{height:12px!important}
}

@media(max-width:420px){
  .mobile-detail-quick{grid-template-columns:1fr 1fr}
}


/* v2.16: compact desktop course list for faster comparison */
@media(min-width:761px){
  #courseDetails .legend-box{
    padding-top:8px;
    padding-bottom:7px;
    margin-bottom:8px;
  }

  #courseDetails .cards{
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:8px;
    padding:0 12px 12px;
  }

  #courseDetails .card{
    padding:10px 11px;
    border-radius:9px;
    min-height:0;
  }

  #courseDetails .card h3{
    font-size:14px;
    line-height:1.28;
    margin:3px 0 5px;
  }

  #courseDetails .card-meta{
    display:flex;
    flex-wrap:wrap;
    gap:2px 8px;
    font-size:10.5px;
    line-height:1.35;
    margin-bottom:2px;
  }

  #courseDetails .card p{
    font-size:10.5px;
    line-height:1.38;
    margin:2px 0;
  }

  #courseDetails .eval-main{
    font-size:10.5px;
    line-height:1.35;
    margin-top:3px;
  }

  #courseDetails .badge{
    font-size:9.5px;
    padding:2px 6px;
    margin-right:3px;
    margin-bottom:2px;
  }

  #courseDetails .section-toggle{
    padding:14px 16px!important;
  }

  #courseDetails .section-toggle h2{
    font-size:18px;
  }

  #courseDetails .section-toggle p{
    font-size:11.5px;
  }
}

@media(min-width:761px) and (max-width:1180px){
  #courseDetails .cards{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}
