/* Cindy课程表：轻盈的校园配色及适合iPad触摸的表格。 */
:root{color-scheme:light;--ink:#233b53;--muted:#587088;--blue:#23669a;--paper:#fafdff;--line:#dce7ee}
*{box-sizing:border-box}
body{margin:0;background:#eaf4fc;color:var(--ink);font-family:"PingFang SC","Microsoft YaHei",sans-serif}
button,select{font:inherit}button{cursor:pointer;min-height:44px;border:1px solid #cfdae3;border-radius:9px;padding:10px 20px;background:var(--paper);color:var(--ink);font-weight:600}
button:disabled{opacity:.5;cursor:wait}button:focus-visible,select:focus-visible,.ctTableWrap:focus-visible{outline:3px solid #ebaa30;outline-offset:3px}
[hidden]{display:none!important}
.ctPage{max-width:1440px;margin:auto;padding:clamp(20px,4vw,52px);padding-bottom:max(28px,env(safe-area-inset-bottom))}
.ctHeader{display:flex;align-items:center;justify-content:space-between;gap:24px;margin-bottom:28px}
.ctIdentity{display:flex;align-items:center;gap:18px}.ctIdentity img{border-radius:18px;object-fit:cover;flex-shrink:0}
h1{font-size:clamp(25px,3vw,36px);letter-spacing:.02em;margin:3px 0 0;font-weight:750}.ctEyebrow{margin:0;font-size:14px;letter-spacing:.12em;color:var(--muted)}
.ctMode{display:flex;background:#d9e8f3;padding:4px;border-radius:11px;flex-shrink:0}.ctMode button{border:0;background:transparent;min-width:76px;padding:10px 18px;border-radius:7px}.ctMode .ctModeActive{background:var(--ink);color:#fafdff}
.ctToolbar{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:14px;font-size:14px;color:var(--muted)}.ctToolbar p{margin:0}#ctStatus{font-size:13px}
.ctTableWrap{background:var(--paper);border:1px solid #cbdde9;border-radius:14px;overflow:auto;max-height:calc(100dvh - 240px);min-height:240px}
table{width:100%;border-spacing:0;table-layout:fixed;min-width:810px}th,td{border-bottom:1px solid var(--line);border-right:1px solid var(--line)}tr:last-child>*{border-bottom:0}tr>*:last-child{border-right:0}
thead th{position:sticky;top:0;background:var(--ink);color:#fafdff;z-index:2;padding:17px 8px;font-size:15px;font-weight:600}
thead th:first-child{width:7%;left:0;z-index:3}tbody th{position:sticky;left:0;z-index:1;background:#f1f6fa;padding:12px 5px;font-size:15px;font-weight:600}
tbody th small{display:block;font-size:11px;color:var(--muted);font-weight:400;margin-top:5px}td{padding:6px;vertical-align:middle;height:72px}
.ctCourse{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:5px;text-align:center;height:59px;border-radius:7px;padding:9px 6px;background:var(--subject-bg,#edf2f6);color:var(--subject-ink,#3c536b)}
.ctCourse strong{font-size:clamp(14px,1.4vw,18px);font-weight:600;line-height:1.4;white-space:normal}.ctCourse small{font-size:11px;line-height:1.4;opacity:.85}.ctEmpty{background:transparent;color:#8ba0af;font-size:20px}
td select{display:block;width:100%;min-height:59px;border:1px solid #b6cbdc;border-radius:7px;background:var(--subject-bg,#edf2f6);color:var(--subject-ink,#3c536b);padding:8px 22px 8px 6px;font-size:14px;font-weight:600;cursor:pointer}
.ctBreak>*{border-top:2px solid #bed2e1}thead .ctToday{background:#355b78}.ctDayNote{display:block;font-size:10px;color:#c6e8ff;margin-top:3px}
.ctTomorrow{box-shadow:inset 3px 0 #3987bb,inset -3px 0 #3987bb}
thead .ctTomorrow{background:#23669a;box-shadow:inset 3px 0 #3987bb,inset -3px 0 #3987bb,inset 0 3px #3987bb}
thead .ctTomorrow .ctDayNote{color:#fafdff;font-weight:700}
tbody .ctTomorrow{background:#eff7fd}
tbody tr:last-child .ctTomorrow{box-shadow:inset 3px 0 #3987bb,inset -3px 0 #3987bb,inset 0 -3px #3987bb}
.ctFooter{display:flex;justify-content:space-between;align-items:center;gap:15px;margin-top:18px;min-height:44px}.ctFooter p{margin:0;font-size:13px;color:#a56a15;font-style:italic}.ctActions{display:flex;gap:10px}.ctSave{background:var(--blue);border-color:var(--blue);color:#fafdff}
.ctSrOnly{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(max-width:850px){.ctPage{padding:24px 18px}.ctHeader{margin-bottom:22px}.ctIdentity{gap:12px}.ctIdentity img{width:60px;height:60px}.ctTableWrap{max-height:calc(100dvh - 210px)}.ctCourse small{font-size:10px}td{height:68px;padding:5px}}
@media(max-width:520px){.ctPage{padding:20px 12px}.ctHeader{gap:12px;align-items:flex-start;flex-wrap:wrap}.ctIdentity img{width:54px;height:54px}h1{font-size:25px}.ctMode{margin-left:auto}.ctToolbar{align-items:flex-start;flex-direction:column;gap:6px}.ctTableWrap{max-height:calc(100dvh - 260px)}.ctFooter{align-items:flex-start;flex-wrap:wrap}.ctActions{margin-left:auto}}
@media(min-width:760px) and (max-height:850px){.ctPage{padding:18px 24px}.ctHeader{margin-bottom:16px}.ctIdentity img{width:54px;height:54px}h1{font-size:28px}.ctToolbar{margin-bottom:10px}.ctTableWrap{max-height:calc(100dvh - 190px)}thead th{padding:11px 8px}td{height:46px;padding:4px}.ctCourse{min-height:38px;padding:5px;gap:3px}.ctCourse strong{font-size:14px}.ctCourse small{font-size:10px}tbody th{padding:6px 5px;font-size:13px}td select{min-height:44px}.ctFooter{margin-top:12px}}
.ctCourse small{white-space:nowrap}.ctCourse .ctLongTeacher{font-size:8px}
.ctLongCourse{padding:5px;gap:3px}.ctLongCourse strong{font-size:12px;line-height:1.2}
@media(min-width:760px) and (max-height:850px){.ctCourse{height:48px;min-height:0}.ctLongCourse{padding:3px;gap:2px}.ctLongCourse strong{font-size:11px;line-height:1.15}}
.ctTrainingRow td{vertical-align:top;padding-top:8px;padding-bottom:8px;background:#f3f8fc}
.ctTrainingStack{display:grid;gap:8px}.ctTrainingCourse{background:#e5eefb;color:#305e87}
.ctTrainingCourse small{font-size:13px;font-weight:700;opacity:1;font-variant-numeric:tabular-nums}
.ctSpecialNote{display:block;margin-top:3px;font-size:10px;font-weight:400;color:#d4e8f7}
.ctWeekendPeriod{vertical-align:middle;background:#f3f8fc}.ctWeekendPeriod .ctTrainingCourse{margin:8px 0}
td>.ctTrainingCourse{margin-top:4px}
#ctTitle{touch-action:manipulation;cursor:pointer;user-select:none;-webkit-user-select:none}#ctTitle:focus-visible{outline:2px solid #3987bb;outline-offset:4px}
.ctFitDisplay{overflow:hidden}.ctFitDisplay .ctPage{max-width:none;width:100%;height:100dvh;display:grid;grid-template-rows:auto auto minmax(0,1fr) auto;padding:16px 20px;gap:10px}
.ctFitDisplay .ctHeader,.ctFitDisplay .ctToolbar,.ctFitDisplay .ctFooter{margin:0}
.ctFitDisplay .ctTableWrap{min-height:0;max-height:none;height:100%;overflow:hidden}
.ctFitDisplay table{transform-origin:top left}.ctFitDisplay thead th,.ctFitDisplay tbody th{position:static}
.ctFitDisplay .ctFooter{min-height:20px}.ctImmersive:not(.ctEditing) .ctFooter{display:none}
.ctImmersive .ctIdentity img{width:40px;height:40px}.ctImmersive h1{font-size:24px}.ctImmersive .ctEyebrow{font-size:12px}
.ctImmersive.ctFitDisplay:not(.ctEditing) .ctPage{grid-template-rows:auto auto minmax(0,1fr)}
.ctFitDisplay.ctEditing .ctTableWrap{overflow:auto;scrollbar-width:none}
.ctFitDisplay.ctEditing .ctTableWrap::-webkit-scrollbar{display:none}
@media(min-width:700px) and (max-height:850px){
 .ctFitDisplay .ctCourse{height:36px;padding:3px;gap:1px}.ctFitDisplay .ctCourse strong{font-size:12px;line-height:1.15}
 .ctFitDisplay .ctCourse small{font-size:8px;line-height:1.15}.ctFitDisplay .ctLongCourse strong{font-size:10px;line-height:1.05}
 .ctFitDisplay td{height:42px;padding:3px}.ctFitDisplay tbody th{padding:3px;font-size:12px}
 .ctFitDisplay thead th{padding:8px 5px;font-size:13px}.ctFitDisplay .ctTrainingRow td{padding:4px 3px}
 .ctFitDisplay .ctTrainingStack{gap:4px}.ctFitDisplay .ctTrainingCourse small{font-size:11px}
 .ctFitDisplay .ctHeader{gap:12px}.ctFitDisplay .ctIdentity img{width:44px;height:44px}.ctFitDisplay h1{font-size:25px}
 .ctFitDisplay .ctPage{padding:12px 16px;gap:8px}
}
