#classCalendarButton { position:relative; }
.signed-in-dashboard #classCalendarButton:not([hidden]) {
  display:inline-flex; flex-direction:row; align-items:center; justify-content:center; gap:6px; white-space:nowrap;
}
.signed-in-dashboard #classCalendarButton .dashboard-dock-icon { width:17px; height:17px; flex:none; }
#classCalendarButton[hidden], #classCalendarDot[hidden] { display:none!important; }
#classCalendarDot, #classCalendarPlanner.cc-cal-has-today::after {
  width:8px; height:8px; border-radius:50%; background:#ffd472; flex:none;
}
#classCalendarDot { position:absolute; top:2px; right:2px; box-shadow:0 0 0 2px #12325b; }
#classCalendarPlanner.cc-cal-has-today::after { content:""; border:1px solid #90550d; }
#classCalendarPlanner:not([hidden]) { display:flex; gap:.5rem; justify-content:space-between; align-items:center; }
@media (max-width:760px) { #classCalendarButton { display:none!important; } }
@media (min-width:761px) { #classCalendarPlanner { display:none!important; } }

.cc-cal-ui {
  --cc-navy:#10294d;
  --cc-mountain:#154894;
  --cc-blue:#245fc0;
  --cc-sky:#e4f0fa;
  --cc-page:#edf5fd;
  --cc-card:#fff;
  --cc-ink:#102442;
  --cc-muted:#435773;
  --cc-line:#becdde;
  --cc-control:#788ca5;
  --cc-weekend:#e5edf5;
  --cc-selected:#d7ebff;
  --cc-focus:#2162b5;
  --cc-gold:#ffd675;
  --cc-gold-ink:#17263a;
  --cc-lesson:#2054a4;
  --cc-assessment:#00665b;
  --cc-milestone:#85570d;
  --cc-reminder:#925013;
  --cc-lesson-bg:#edf5ff;
  --cc-assessment-bg:#e6f7f3;
  --cc-milestone-bg:#fffae7;
  --cc-reminder-bg:#fff4e7;
  color-scheme:light;
  color:var(--cc-ink);
  background:var(--cc-card);
  border:1px solid var(--cc-line);
  border-radius:18px;
  padding:0;
  font:inherit;
  text-align:start;
}
[data-climb-theme="dark"] .cc-cal-ui {
  --cc-sky:#122847;
  --cc-page:#0a172c;
  --cc-card:#10243e;
  --cc-ink:#f3f7fe;
  --cc-muted:#c1d2e7;
  --cc-line:#536b89;
  --cc-control:#7f9bb8;
  --cc-weekend:#1a304a;
  --cc-selected:#224b76;
  --cc-focus:#8ac9ff;
  --cc-lesson:#a5c9ff;
  --cc-assessment:#78e4cf;
  --cc-milestone:#ffda7f;
  --cc-reminder:#ffbf84;
  --cc-lesson-bg:#192f52;
  --cc-assessment-bg:#14393e;
  --cc-milestone-bg:#332d26;
  --cc-reminder-bg:#332821;
  color-scheme:dark;
}
.cc-cal-ui::backdrop { background:#061427ad; }
.cc-cal-ui :is(input,select,textarea,button) { font:inherit; }
.cc-cal-ui :is(input,select,textarea) {
  color:var(--cc-ink); background:var(--cc-card); border:1px solid var(--cc-control); border-radius:8px;
}
.cc-cal-ui :is(button,input,select,textarea):focus-visible { outline:2px solid var(--cc-focus); outline-offset:2px; }
.cc-cal-ui button:disabled { opacity:.62; cursor:not-allowed; }
.cc-cal-ui :is(h2,h3,h4,p) { margin:0; color:inherit; }
.cc-cal-ui button {
  color:var(--cc-ink); min-height:40px; border-radius:9px; padding:6px 10px; border:1px solid var(--cc-line);
  background:var(--cc-card); cursor:pointer;
}
.cc-cal-ui button[hidden] { display:none; }
.cc-cal-ui button:not(:disabled):hover { filter:brightness(.94); }
.cc-cal-ui .cc-cal-gold {
  background:var(--cc-gold); border-color:#a56b1d; color:var(--cc-gold-ink); white-space:nowrap;
  border-radius:999px; padding:.35rem .7rem; font-weight:750;
}
#classCalendarDialog {
  background:linear-gradient(150deg,var(--cc-sky),var(--cc-page) 65%);
  width:min(1240px,calc(100vw - 32px)); max-width:none; max-height:calc(100dvh - 36px);
  overflow:auto; scrollbar-gutter:stable; overscroll-behavior:contain;
}
.cc-cal-toolbar {
  position:sticky; top:0; z-index:2; display:flex; gap:12px; align-items:center; flex-wrap:wrap;
  color:#f7faff; background:linear-gradient(105deg,#102544,#173762);
  padding:12px 18px; box-shadow:0 3px 10px #0b1d3a22;
}
.cc-cal-toolbar h2 { font-size:1rem; font-weight:760; letter-spacing:0.005em; }
.cc-cal-toolbar-heading { display:flex; align-items:center; flex-wrap:wrap; gap:7px; }
.cc-cal-class { color:#f7faff; background:#2e507b; border-radius:99px; padding:.28rem .65rem; font-size:.84rem; }
.cc-cal-tabs {
  display:flex; gap:3px; border:1px solid #6a88ad; border-radius:11px; padding:3px; background:#213f66;
  margin-inline:auto;
}
.cc-cal-tabs button { color:#f6f9fd; background:transparent; border-color:transparent; min-height:36px; white-space:nowrap; font-weight:650; }
.cc-cal-tabs button[aria-pressed="true"] { color:white; background:#2158ac; border-color:#83baff; }
.cc-cal-toolbar :is(button:focus-visible,input:focus-visible), .cc-cal-band :is(button:focus-visible,input:focus-visible) { outline-color:#ffe095; }
.cc-cal-toolbar-actions { display:flex; gap:8px; align-items:center; }
.cc-cal-toolbar .cc-cal-close, .cc-cal-homework header button {
  background:#26466c; border-color:#7592b4; color:#fff; font-size:1.2rem; line-height:1; min-width:40px;
}
.cc-cal-status {
  display:flex; gap:10px; justify-content:flex-end; align-items:center; padding:0 20px;
  color:var(--cc-muted); font-size:.9rem;
}
.cc-cal-status:not(:empty) { padding-block:7px; min-height:28px; }
.cc-cal-status button { min-height:32px; }
.cc-cal-body { padding:18px; }
.cc-cal-month-layout { display:grid; grid-template-columns:minmax(0,1.95fr) minmax(0,1fr); gap:16px; align-items:start; }
.cc-cal-card { min-width:0; background:var(--cc-card); border:1px solid var(--cc-line); border-radius:14px; overflow:hidden;
  box-shadow:0 8px 21px #0d254012; }
.cc-cal-band {
  display:flex; gap:14px; padding:13px 16px; align-items:center; color:#fff;
  background:linear-gradient(100deg,#154894,#285eb2);
}
.cc-cal-band h3 { font-size:clamp(1.16rem,3.2vw,1.6rem); overflow-wrap:anywhere; }
.cc-cal-band small { display:block; color:#e3efff; font-variant-numeric:tabular-nums; }
.cc-cal-band .cc-cal-gold { margin-inline-start:auto; }
.cc-cal-band button { color:#fff; background:#ffffff15; border-color:#95b8e3; font-weight:650; }
.cc-cal-arrows { display:flex; gap:4px; direction:ltr; }
.cc-cal-ui[dir="rtl"] .cc-cal-arrows { direction:rtl; }
.cc-cal-ui[dir="rtl"] .cc-cal-arrows button { transform:scaleX(-1); }
.cc-cal-arrows button { min-height:36px; width:34px; font-size:1.35rem; line-height:1; padding:3px; }
.cc-cal-grid { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:5px; padding:12px; }
.cc-cal-weekday { display:grid; align-content:center; justify-content:center; min-height:30px; font-size:.81rem; font-weight:750; text-align:center; }
.cc-cal-weekday[data-off="true"] { color:var(--cc-muted); }
.cc-cal-grid .cc-cal-day {
  position:relative; display:grid; place-items:center; text-align:center; min-height:54px; padding:5px 1px 13px;
  line-height:1; font-weight:650; font-variant-numeric:tabular-nums; border-color:var(--cc-control); border-radius:9px;
}
.cc-cal-day[data-off="true"] { background:var(--cc-weekend); }
.cc-cal-day[aria-current="date"] { border-color:var(--cc-focus); }
.cc-cal-day[aria-pressed="true"] { border-color:var(--cc-focus); box-shadow:inset 0 0 0 1px var(--cc-focus); background:var(--cc-selected); }
.cc-cal-marker { position:absolute; line-height:1; font-size:.82rem; pointer-events:none; }
.cc-cal-lesson { color:var(--cc-lesson); }
.cc-cal-assessment { color:var(--cc-assessment); }
.cc-cal-milestone { color:var(--cc-milestone); }
.cc-cal-reminder { color:var(--cc-reminder); }
.cc-cal-marker.cc-cal-milestone { top:3px; right:4px; }
.cc-cal-marker.cc-cal-lesson { bottom:3px; left:4px; }
.cc-cal-marker.cc-cal-assessment { bottom:3px; left:50%; transform:translateX(-50%); }
.cc-cal-marker.cc-cal-reminder { bottom:3px; right:4px; }
.cc-cal-legend {
  display:flex; flex-wrap:wrap; justify-content:center; gap:4px 13px; padding:8px; margin:0 12px 12px;
  border:1px solid var(--cc-line); border-radius:8px; font-size:.78rem; color:var(--cc-muted);
}
.cc-cal-legend > span { display:inline-flex; align-items:center; gap:4px; }
.cc-cal-memo > header { color:#fff; background:var(--cc-navy); padding:15px 16px; }
.cc-cal-memo > header p { color:#d7e6f9; font-size:.87rem; margin-block-start:4px; }
.cc-cal-memo-content { display:grid; gap:10px; padding:12px; }
.cc-cal-memo-card { display:grid; gap:6px; border:1px solid var(--cc-accent); border-inline-start:4px solid var(--cc-accent);
  border-radius:9px; padding:10px; background:var(--cc-tint); overflow-wrap:anywhere; }
.cc-cal-memo-card p { font-size:.9rem; }
.cc-cal-memo-card p + p { margin-block-start:4px; }
.cc-cal-board-detail + .cc-cal-board-detail { border-block-start:1px solid var(--cc-line); padding-block-start:8px; }
.cc-cal-memo-lesson { --cc-accent:var(--cc-lesson); --cc-tint:var(--cc-lesson-bg); }
.cc-cal-memo-assessment { --cc-accent:var(--cc-assessment); --cc-tint:var(--cc-assessment-bg); }
.cc-cal-memo-milestone { --cc-accent:var(--cc-milestone); --cc-tint:var(--cc-milestone-bg); }
.cc-cal-memo-reminder { --cc-accent:var(--cc-reminder); --cc-tint:var(--cc-reminder-bg); }
.cc-cal-reminder-line, .cc-cal-memo-actions { display:flex; flex-wrap:wrap; align-items:center; gap:6px; }
.cc-cal-category { border:1px solid var(--cc-reminder); color:var(--cc-reminder); border-radius:999px; padding:.12rem .45rem; font-weight:700; }
.cc-cal-week-band { flex-wrap:wrap; gap:8px; }
.cc-cal-week-caption { display:flex; align-items:center; justify-content:center; gap:10px; flex:1; flex-wrap:wrap; text-align:center; }
.cc-cal-week-caption .cc-cal-gold { margin:0; }
.cc-cal-week-jump { display:flex; align-items:center; gap:7px; font-size:.8rem; }
.cc-cal-week-jump input { min-height:36px; width:9rem; padding:4px 6px; }
.cc-cal-plan-note { padding:12px; color:var(--cc-muted)!important; font-size:.9rem; }
.cc-cal-table-wrap { overflow:auto; padding:12px; }
.cc-cal-plan-table { width:100%; table-layout:fixed; border-collapse:separate; border-spacing:0; border:1px solid var(--cc-line);
  border-radius:12px; overflow:hidden; font-size:.86rem; }
.cc-cal-plan-table :is(th,td) {
  text-align:start; border-block-end:1px solid var(--cc-line); border-inline-end:1px solid var(--cc-line);
  vertical-align:middle; padding:7px; overflow-wrap:anywhere;
}
.cc-cal-plan-table :is(th,td):last-child { border-inline-end:none; }
.cc-cal-plan-table tr:last-child td, .cc-cal-plan-table tr:last-child th[scope="row"] { border-block-end:none; }
.cc-cal-plan-table th:first-child { width:128px; }
.cc-cal-plan-table :is(th[scope="row"],thead th) { background:var(--cc-page); }
.cc-cal-plan-table thead th[data-planner-day] > span {
  display:block; border-radius:999px; color:#fff; background:linear-gradient(110deg,#154894,#285cbb);
  text-align:center; padding:5px 2px;
}
.cc-cal-plan-table .cc-cal-weekend:not([data-planner-day]) { background:var(--cc-weekend); text-align:center; }
.cc-cal-plan-table th.cc-cal-weekend { width:84px; }
.cc-cal-plan-table .cc-cal-row-homework :is(th,td) { background:var(--cc-milestone-bg); }
.cc-cal-field-label { display:flex; align-items:center; gap:6px; }
.cc-cal-field-icon { display:grid; place-items:center; color:#fff; background:#245ac2; border-radius:50%;
  min-width:27px; height:27px; font-size:1rem; font-weight:700; }
.cc-cal-field-lesson { background:#4841a7; }
.cc-cal-field-standard { background:#126d70; }
.cc-cal-field-objective { background:#20548c; }
.cc-cal-field-resources { background:#286488; }
.cc-cal-field-homework { background:#8a520b; }
.cc-cal-cell { position:relative; }
.cc-cal-cell textarea { display:block; width:100%; min-height:55px; resize:vertical; border-color:transparent;
  padding:5px; background:transparent; line-height:1.35; overflow-wrap:anywhere; }
.cc-cal-cell textarea:hover, .cc-cal-cell textarea:focus { border-color:var(--cc-control); }
.cc-cal-row-homework textarea { padding-inline-end:39px; }
.cc-cal-cell .cc-cal-suggest { background:var(--cc-blue); color:#fff; font-size:.8rem; font-weight:650; text-align:start; margin-block-start:3px; }
.cc-cal-cell .cc-cal-enlarge { position:absolute; inset-block-start:2px; inset-inline-end:2px;
  background:#10294d; color:#ffd675; border-color:#94641b; width:36px; min-height:36px; padding:4px; }
.cc-cal-day-pills { display:none; }
.cc-cal-reminder-editor { width:min(440px,calc(100vw - 28px)); max-width:none; overflow:auto; }
.cc-cal-reminder-editor > header, .cc-cal-homework > header { background:var(--cc-navy); color:#fff; padding:14px 16px; }
.cc-cal-form { display:grid; gap:12px; padding:16px; }
.cc-cal-form label { display:grid; gap:5px; font-weight:650; }
.cc-cal-form :is(input,select) { width:100%; padding:.5rem; min-height:42px; }
.cc-cal-form footer { display:flex; justify-content:flex-end; flex-wrap:wrap; gap:8px; }
.cc-cal-form footer .cc-cal-danger { margin-inline-end:auto; color:#b42318; border-color:currentColor; }
:root[data-climb-theme="dark"] .cc-cal-form footer .cc-cal-danger { color:#ffb4a8; }
.cc-cal-reminder-edit { margin-inline-start:auto; min-height:36px; min-width:44px; padding:.15rem .6rem; font-size:.8rem;
  border:1px solid var(--cc-reminder); border-radius:999px; background:transparent; color:inherit; }
.cc-cal-homework { width:min(1100px,calc(100vw - 40px)); min-height:min(420px,74dvh); max-height:calc(100dvh - 28px); max-width:none; overflow:auto; }
.cc-cal-homework > header { display:flex; align-items:center; justify-content:space-between; gap:14px; }
.cc-cal-homework > header h2 { font-size:clamp(1.05rem,2.8vw,1.7rem); }
.cc-cal-project-body { padding:clamp(20px,5vw,62px); }
.cc-cal-project-meta { display:flex; flex-wrap:wrap; gap:10px; align-items:center; color:var(--cc-muted); }
.cc-cal-project-body .cc-cal-project-text { margin-block-start:clamp(20px,6dvh,50px); white-space:pre-wrap;
  overflow-wrap:anywhere; font-size:clamp(2rem,5.2vw,4.2rem); font-weight:760; line-height:1.22; }
#classCalendarPrint { display:none; }
.cc-cal-toolbar .cc-cal-gear {
  display:inline-grid; place-items:center; flex:none; width:40px; min-height:40px; height:40px;
  padding:8px; border-radius:50%; border-color:#7592b4; background:#26466c; color:#f7faff;
}
.cc-cal-gear svg { width:20px; height:20px; }
.cc-cal-settings {
  position:fixed; inset:auto; top:var(--cc-settings-top,70px); left:var(--cc-settings-left,16px); margin:0;
  width:min(384px,calc(100vw - 16px)); max-width:none; max-height:calc(100dvh - 16px);
  box-shadow:0 13px 32px #071b404a; overflow:hidden;
}
.cc-cal-settings[open] { display:grid; grid-template-rows:auto minmax(0,1fr) auto; }
.cc-cal-settings::backdrop { background:transparent; }
.cc-cal-settings > header, .cc-cal-settings > footer {
  display:flex; justify-content:space-between; align-items:center; gap:8px; padding:9px 13px;
}
.cc-cal-settings > header { border-block-end:1px solid var(--cc-line); }
.cc-cal-settings > footer { border-block-start:1px solid var(--cc-line); background:var(--cc-page); }
.cc-cal-settings h3 { font-size:1.04rem; }
.cc-cal-settings h4 { color:var(--cc-muted); font-size:.82rem; font-weight:700; }
.cc-cal-settings .cc-cal-settings-close { padding:0; min-height:34px; width:34px; font-size:1.16rem; }
.cc-cal-settings-body { display:grid; gap:13px; overflow:auto; overscroll-behavior:contain; padding:12px 13px; }
.cc-cal-settings-summary { display:flex; align-items:center; justify-content:space-between; gap:6px; margin-block-end:5px; }
.cc-cal-settings-count, .cc-cal-synced { font-size:.72rem; color:var(--cc-muted); background:var(--cc-sky);
  border-radius:999px; padding:3px 7px; }
.cc-cal-settings-modes { display:flex; margin-block-start:6px; gap:3px; padding:3px; border-radius:999px;
  border:1px solid var(--cc-line); background:var(--cc-page); }
.cc-cal-settings-modes button {
  flex:1; border-radius:999px; border-color:transparent; min-height:34px; padding:3px 6px;
  background:transparent; font-size:.82rem; font-weight:650; white-space:nowrap;
}
.cc-cal-settings-modes button:first-child { flex:2; }
.cc-cal-settings-modes button[aria-pressed="true"], .cc-cal-settings .cc-cal-settings-save {
  background:var(--cc-blue); color:white; border-color:#6c9bdb; font-weight:700;
}
.cc-cal-settings .cc-cal-settings-save { min-width:82px; }
.cc-cal-settings .cc-cal-settings-reset { background:transparent; color:var(--cc-ink); border-color:transparent; }
.cc-cal-settings-rows { list-style:none; display:grid; gap:5px; margin:0; padding:0; }
.cc-cal-settings-rows li {
  min-width:0; display:flex; align-items:center; gap:5px; border:1px solid var(--cc-line); border-radius:8px;
  padding:0 4px 0 6px; padding-inline:6px 4px; background:var(--cc-page); font-size:.88rem;
}
.cc-cal-settings-rows label { flex:1; display:flex; align-items:center; min-width:0; gap:6px; padding-block:4px; cursor:pointer; }
.cc-cal-settings-rows input[type="checkbox"] { accent-color:var(--cc-blue); width:1rem; height:1rem; flex:none; margin:2px; }
.cc-cal-setting-label { overflow-wrap:anywhere; font-weight:600; }
.cc-cal-settings .cc-cal-rename { min-height:35px; width:36px; padding:0; flex:none; border-color:transparent; background:transparent; }
.cc-cal-settings .cc-cal-rename-input { flex:1; min-width:0; min-height:32px; padding:4px; }
.cc-cal-homework-dot { flex:none; width:8px; height:8px; border:1px solid #a16c1e; border-radius:50%; background:var(--cc-gold); }
.cc-cal-settings .cc-cal-term-link {
  display:flex; justify-content:space-between; align-items:center; gap:8px; width:100%; text-align:start;
  background:var(--cc-sky); font-size:.86rem; font-weight:680;
}
.cc-cal-settings .cc-cal-settings-status, .cc-cal-settings .cc-cal-settings-note { color:var(--cc-muted); font-size:.84rem; }
.cc-cal-settings > .cc-cal-settings-status { padding:12px; }
.cc-cal-settings .cc-cal-settings-note { margin-block-start:5px; }
@media (max-width:760px), (pointer:coarse) and (max-height:600px) and (orientation:landscape) {
  .cc-cal-settings {
    inset:auto 0 0; width:100%; max-height:calc(100dvh - 22px); border-radius:17px 17px 0 0; border-block-end:0;
    animation:cc-cal-settings-enter 180ms ease-out both;
  }
  .cc-cal-settings::backdrop { background:#06142799; }
  .cc-cal-settings > header { padding-block:11px; }
  .cc-cal-settings > footer { padding-block-end:calc(8px + env(safe-area-inset-bottom)); }
  .cc-cal-settings-rows label, .cc-cal-settings .cc-cal-rename { min-height:40px; }
  .cc-cal-settings .cc-cal-settings-save { min-width:min(140px,49vw); }
}
@keyframes cc-cal-settings-enter {
  from { transform:translateY(24px); opacity:.3; }
  to { transform:translateY(0); opacity:1; }
}
@media (prefers-reduced-motion:reduce) { .cc-cal-settings { animation:none; } }

@media (max-width:760px) {
  #classCalendarDialog { width:100vw; height:100dvh; max-height:100dvh; border:0; border-radius:0; scrollbar-gutter:auto; }
  .cc-cal-toolbar { padding:8px 9px; column-gap:5px; row-gap:6px; }
  .cc-cal-toolbar-heading { flex:1; }
  .cc-cal-toolbar-heading h2 { display:none; }
  .cc-cal-toolbar-actions { gap:4px; }
  .cc-cal-toolbar .cc-cal-gold { padding:5px 8px; font-size:.85rem; }
  .cc-cal-tabs { order:3; width:100%; }
  .cc-cal-tabs button { flex:1; }
  .cc-cal-body { padding:9px; }
  .cc-cal-month-layout { grid-template-columns:1fr; gap:11px; }
  .cc-cal-grid { padding:6px; gap:3px; }
  .cc-cal-grid .cc-cal-day { min-height:44px; padding:4px 1px 12px; }
  .cc-cal-marker { font-size:.71rem; }
  .cc-cal-band { gap:7px; padding:9px; }
  .cc-cal-weekday { font-size:.72rem; overflow-wrap:anywhere; }
  .cc-cal-legend { font-size:.72rem; margin:0 6px 6px; }
  .cc-cal-table-wrap { padding:6px; }
}
@media (max-width:640px) and (orientation:portrait) {
  .cc-cal-day-pills { display:flex; padding:7px 6px 2px; gap:5px; overflow-x:auto; }
  .cc-cal-day-pills button { flex:none; border-radius:99px; font-size:.8rem; }
  .cc-cal-day-pills button[aria-pressed="true"] { background:var(--cc-blue); color:white; border-color:#80b9fa; }
  .cc-cal-plan-table :is([data-current="false"],.cc-cal-weekend) { display:none; }
  .cc-cal-plan-table th:first-child { width:123px; }
  .cc-cal-field-label { gap:4px; }
  .cc-cal-week-caption { flex-basis:44%; gap:3px; font-size:.85rem; }
}
@media (min-width:620px) and (max-width:760px) and (orientation:landscape) {
  .cc-cal-month-layout { grid-template-columns:minmax(0,1.8fr) minmax(0,1fr); }
  .cc-cal-toolbar .cc-cal-tabs { order:0; width:auto; }
  .cc-cal-plan-table th:first-child { width:110px; }
}
@media (max-height:560px) and (orientation:landscape) {
  .cc-cal-grid .cc-cal-day { min-height:42px; }
}
@page classroom-calendar-week { size:A4 landscape; margin:10mm 12mm; }
@media print {
  body.cc-cal-print-active > :not(#classCalendarPrint) { display:none!important; }
  html:has(body.cc-cal-print-active), body.cc-cal-print-active {
    min-height:0!important; background:#fff!important; color-scheme:light!important;
    margin:0!important; padding:0!important; overflow:visible!important;
  }
  body.cc-cal-print-active { display:block!important; }
  body.cc-cal-print-active #classCalendarPrint {
    display:block; width:100%; page:classroom-calendar-week;
    -webkit-print-color-adjust:exact; print-color-adjust:exact;
  }
  .cc-cal-print-sheet {
    display:flex; flex-direction:column; width:100%; min-height:186mm;
    background:white; color:#12223a; font:11pt/1.3 system-ui,sans-serif;
  }
  .cc-cal-print-sheet header { flex:none; margin:0 0 4mm; }
  .cc-cal-print-sheet h1 { color:#10294d; font-size:13pt; font-weight:750; margin:0 0 1.3mm; }
  .cc-cal-print-sheet p { margin:0; color:#30435c; }
  .cc-cal-print-sheet table { flex:1 0 auto; table-layout:fixed; width:100%; border-collapse:collapse; }
  .cc-cal-print-field-col { width:13%; }
  .cc-cal-print-sheet :is(td,th) {
    border:1px solid #697e98; padding:2.3mm 2.6mm; text-align:start;
    white-space:pre-wrap; overflow-wrap:anywhere; vertical-align:top;
  }
  .cc-cal-print-sheet thead { display:table-header-group; }
  .cc-cal-print-sheet thead th { background:#dce9f9; color:#10294d; }
  .cc-cal-print-sheet tbody tr { height:var(--cc-row-height); break-inside:avoid; }
  .cc-cal-print-sheet tbody th { background:#edf3fa; color:#10294d; }
  .cc-cal-print-sheet .cc-cal-print-homework > * { background:#fffbeb; }
}

.cc-cal-compact-nav, .cc-cal-action-compact, .cc-cal-legend-short, .cc-cal-plan-date-compact,
.cc-cal-cell .cc-cal-cell-preview { display:none; }
.cc-cal-memo > .cc-cal-memo-actions { padding:0 12px 12px; }
.cc-cal-memo > .cc-cal-memo-actions:empty { display:none; }
.cc-cal-cell-editor {
  width:min(550px,calc(100vw - 22px));
  max-height:calc(100dvh - 16px);
}
.cc-cal-cell-editor > header {
  display:flex; justify-content:space-between; align-items:center; gap:10px;
  padding:8px 12px; background:var(--cc-navy); color:white;
}
.cc-cal-cell-editor > header h3 { font-size:1rem; }
.cc-cal-cell-editor textarea { min-height:88px; padding:8px; resize:vertical; font-size:16px; }

@media screen and (orientation:landscape) and (max-height:540px) {
  #classCalendarDialog[open] {
    display:flex; flex-direction:column; inset:0; margin:0; padding:0;
    width:100vw; max-width:none; height:100dvh; max-height:100dvh;
    border:0; border-radius:0; overflow:hidden; scrollbar-gutter:auto;
    padding-inline-start: env(safe-area-inset-left);
    padding-inline-end: env(safe-area-inset-right);
  }
  #classCalendarDialog[dir="rtl"] {
    padding-inline-start:env(safe-area-inset-right);
    padding-inline-end:env(safe-area-inset-left);
  }
  #classCalendarDialog .cc-cal-toolbar {
    position:relative; flex:none; height:40px; min-height:40px;
    display:grid; grid-template-columns:minmax(0,auto) auto minmax(0,1fr) auto;
    align-items:center; padding:3px 6px; gap:clamp(3px,1vw,10px);
    flex-wrap:nowrap;
  }
  #classCalendarTitle { display:none; }
  .cc-cal-toolbar-heading { min-width:0; }
  .cc-cal-toolbar .cc-cal-class {
    display:block; min-width:0; max-width:min(16vw,142px); padding:4px 6px;
    font-size:clamp(10px,1.4vw,12px); overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
  }
  #classCalendarDialog .cc-cal-tabs { order:0; width:auto; margin:0; padding:2px; gap:2px; }
  #classCalendarDialog .cc-cal-tabs button {
    min-height:25px; padding:3px 5px; font-size:clamp(10px,1.45vw,12px); line-height:1.2;
  }
  .cc-cal-compact-nav {
    display:flex; min-width:0; gap:3px; align-items:center; justify-content:center;
    white-space:nowrap; font-size:clamp(10px,1.4vw,12px); font-weight:700;
  }
  .cc-cal-compact-date { min-width:0; overflow:hidden; text-overflow:ellipsis; }
  .cc-cal-toolbar :is(.cc-cal-compact-arrow,.cc-cal-close,.cc-cal-gear) {
    width:30px; height:30px; min-width:0; min-height:0; padding:2px;
    border-radius:7px; background:#25466d; color:#fff; border-color:#607e9f; flex:none;
  }
  .cc-cal-compact-arrow { font-size:18px!important; line-height:1; }
  [dir="rtl"] .cc-cal-compact-arrow { transform:scaleX(-1); }
  .cc-cal-toolbar .cc-cal-gear svg { width:17px; height:17px; }
  .cc-cal-toolbar-actions { gap:3px; }
  #classCalendarDialog .cc-cal-toolbar .cc-cal-gold {
    padding:3px 6px; min-height:27px; font-size:clamp(9px,1.4vw,11px); line-height:1.2;
  }
  #classCalendarDialog .cc-cal-compact-nav .cc-cal-gold { min-height:0; }
  .cc-cal-action-compact, .cc-cal-legend-short, .cc-cal-plan-date-compact { display:inline; }
  .cc-cal-action-normal, .cc-cal-legend-normal, .cc-cal-plan-date-normal { display:none; }
  .cc-cal-status:not(:empty) {
    position:absolute; inset-inline-end:8px; bottom:max(8px,env(safe-area-inset-bottom)); z-index:3;
    background:var(--cc-card); border:1px solid var(--cc-line); padding:3px 7px;
    border-radius:8px; max-width:min(85vw,340px); font-size:.75rem; pointer-events:none;
  }
  .cc-cal-status button { pointer-events:auto; }
  .cc-cal-body {
    display:flex; flex:1; min-height:0; min-width:0; padding:6px;
    padding-block-end:max(6px,env(safe-area-inset-bottom)); overflow:hidden;
  }
  .cc-cal-body > :is(.cc-cal-month-layout,.cc-cal-plan) { flex:1; min-height:0; min-width:0; overflow:hidden; }
  .cc-cal-body .cc-cal-band { display:none; }
  #classCalendarDialog .cc-cal-month-layout {
    display:grid; grid-template-columns:minmax(0,64fr) minmax(0,36fr);
    grid-template-rows:minmax(0,1fr); align-items:stretch; gap:8px;
  }
  .cc-cal-month-panel, .cc-cal-memo, .cc-cal-plan { display:flex; flex-direction:column; min-height:0; }
  .cc-cal-month-layout .cc-cal-grid {
    flex:1; min-height:0; padding:4px; gap:3px; grid-template-columns:repeat(7,minmax(0,1fr));
    grid-template-rows:20px repeat(var(--week-rows,5),minmax(0,1fr));
  }
  .cc-cal-month-layout .cc-cal-weekday { min-height:0; font-size:11px; line-height:1; }
  .cc-cal-month-layout .cc-cal-grid .cc-cal-day {
    min-height:0; padding:0 1px 3px; border-radius:6px; font-size:13px; line-height:1;
  }
  .cc-cal-month-layout .cc-cal-marker { font-size:8px; }
  .cc-cal-month-layout .cc-cal-legend {
    min-height:18px; flex:none; margin:0 4px 4px; padding:1px 2px; flex-wrap:nowrap;
    align-items:center; gap:clamp(3px,1vw,11px); font-size:clamp(8px,1.35vw,11px); line-height:1;
  }
  .cc-cal-legend > span { white-space:nowrap; gap:2px; }
  .cc-cal-memo > header {
    display:flex; align-items:center; gap:6px; min-height:25px; padding:4px 8px; flex:none;
  }
  .cc-cal-memo > header h3 { font-size:12px; white-space:nowrap; }
  .cc-cal-memo > header p { font-size:11px; margin:0; min-width:0; }
  .cc-cal-memo > header p::before { content:"· "; }
  .cc-cal-memo-class { display:none; }
  .cc-cal-memo-content {
    flex:1; min-height:0; overflow:auto; align-content:start; overscroll-behavior:contain; padding:5px;
  }
  .cc-cal-memo-content:empty { display:none; }
  .cc-cal-memo > .cc-cal-memo-actions {
    order:0; flex:none; padding:5px; gap:4px; border-block-end:1px solid var(--cc-line);
  }
  .cc-cal-memo > .cc-cal-memo-content { order:1; }
  .cc-cal-memo-actions button { min-height:26px; font-size:11px; padding:3px 6px; }
  .cc-cal-memo-card { padding:5px; gap:3px; }
  .cc-cal-memo-card h4, .cc-cal-memo-card p { font-size:11px; }
  .cc-cal-plan .cc-cal-plan-note { padding:4px 6px; font-size:11px; }
  .cc-cal-table-wrap { display:flex; flex:1; min-height:0; padding:0; overflow:hidden; }
  .cc-cal-plan-table { display:grid; grid-template-rows:26px minmax(0,1fr); min-height:0; }
  .cc-cal-plan-table > thead { display:grid; min-height:0; }
  .cc-cal-plan-table > tbody {
    display:grid; min-height:0; grid-template-rows:repeat(var(--plan-rows,6),minmax(0,1fr));
  }
  .cc-cal-plan-table :is(thead,tbody) > tr {
    display:grid; min-height:0;
    grid-template-columns:minmax(72px,16%) repeat(var(--working-days,5),minmax(0,1fr));
  }
  .cc-cal-plan-table :is(th,td) {
    display:flex; align-items:center; min-height:0; padding:2px 4px; min-width:0;
    font-size:11px; line-height:1.25; overflow:hidden;
  }
  .cc-cal-plan-table .cc-cal-weekend, .cc-cal-cell :is(textarea,.cc-cal-suggest) { display:none; }
  .cc-cal-plan-table th:first-child { width:auto; }
  .cc-cal-plan-table .cc-cal-field-icon { width:18px; min-width:18px; height:18px; font-size:11px; }
  .cc-cal-plan-table .cc-cal-field-label { gap:3px; }
  .cc-cal-plan-table thead th[data-planner-day] > span { width:100%; padding:2px 0; }
  .cc-cal-plan-table .cc-cal-cell { display:flex; align-items:center; gap:1px; width:100%; height:100%; }
  .cc-cal-cell .cc-cal-cell-preview {
    display:flex; align-items:center; flex:1; min-height:0; height:100%; min-width:0;
    padding:1px 2px; border:0; border-radius:5px; background:transparent; text-align:start;
  }
  .cc-cal-cell-preview span, .cc-cal-field-label bdi {
    display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden; overflow-wrap:anywhere;
  }
  .cc-cal-cell .cc-cal-enlarge {
    position:static; flex:none; width:24px; min-height:24px; padding:0; font-size:14px;
  }
}

/* Weekly Plan tools: Smart Import (Pro) and Copy to other classes. Their windows load with weekly-plan-tools.css. */
.cc-cal-plan-tools {
  display:flex; flex-wrap:wrap; gap:8px; align-items:center; justify-content:flex-end;
  padding:10px 12px 0;
}
.cc-cal-ui .cc-cal-tool {
  display:inline-flex; align-items:center; gap:7px; min-height:38px; padding:5px 13px; border-radius:999px;
  font-weight:700; border-color:var(--cc-control); background:var(--cc-card); color:var(--cc-ink);
}
.cc-cal-ui .cc-cal-tool-ai { border-color:var(--cc-lesson); background:var(--cc-lesson-bg); }
.cc-cal-tool-spark, .cc-cal-tool-icon { font-size:1rem; line-height:1; }
.cc-cal-pro {
  border-radius:999px; padding:1px 7px; font-size:.7rem; font-weight:800; letter-spacing:.04em;
  background:var(--cc-gold); color:var(--cc-gold-ink); border:1px solid #a56b1d;
}
@media (max-width:640px) and (orientation:portrait) {
  .cc-cal-plan-tools { padding:8px 6px 0; gap:6px; }
  .cc-cal-ui .cc-cal-tool { flex:1 1 0; justify-content:center; padding:5px 8px; font-size:.85rem; }
}
@media screen and (orientation:landscape) and (max-height:540px) {
  .cc-cal-plan-tools { flex:none; padding:0 0 5px; gap:5px; }
  .cc-cal-ui .cc-cal-tool { min-height:26px; padding:2px 9px; font-size:11px; gap:4px; }
  .cc-cal-pro { font-size:9px; padding:0 5px; }
}
