/*@3.SCHC.1*/

/*@3.SCHC.143*/
.sch-container { max-width: 1060px; margin: 0 auto; padding: 1rem 1rem 1.1rem; }
@media (max-width: 768px) {
  .sch-container { padding-block-end: calc(4rem + var(--sa-b)); }
}

/*@3.SCHC.151*/
.sch-icsbar {
  display: flex; align-items: center; gap: .6rem; flex-wrap: wrap;
  margin-block-end: .8rem;
  padding: .65rem .85rem;
  border: 1px solid color-mix(in srgb, var(--st-warn, #f59e0b) 38%, transparent);
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--st-warn, #f59e0b) 8%, transparent);
  font-size: .82rem; line-height: 1.6; color: var(--text-primary);
}
.sch-icsbar[hidden] { display: none; }
.sch-icsbar > i { color: var(--st-warn, #f59e0b); flex: none; }
.sch-icsbar-t { flex: 1 1 14rem; min-inline-size: 0; }
.sch-icsbar-t b { font-weight: 800; }
.sch-icsbar-t span { display: block; font-size: .74rem; color: var(--text-secondary); }
.sch-icsbar-go {
  flex: none; cursor: pointer;
  padding: .38rem .9rem;
  border-radius: var(--radius-md);
  border: 1px solid color-mix(in srgb, var(--st-warn, #f59e0b) 45%, transparent);
  background: color-mix(in srgb, var(--st-warn, #f59e0b) 16%, transparent);
  color: var(--text-primary);
  font-family: inherit; font-size: .78rem; font-weight: 700;
}
.sch-icsbar-go:hover { background: color-mix(in srgb, var(--st-warn, #f59e0b) 26%, transparent); }

/*@3.SCHC.2*/
.sch-container, .sch-modal-overlay, .sch-sheet-overlay {
  --sch-tile: var(--bg-elevated);
  --sch-tile-line: transparent;
  --sch-tile-shadow: none;
  --sch-ev-bg: #374151;
  --sch-ev-line: #4b5563;
  --sch-ev-shadow: 0 1px 2px rgba(0,0,0,0.28);
  --sch-hair: rgba(148,163,184,0.16);
  --sch-veil: rgba(9,12,20,0.26);
  --sch-hatch: rgba(255,255,255,0.028);
  --sch-offbg: transparent;
  --sch-seam: #111827;
  --sch-todaybg: rgba(167,139,250,0.05);
  --sch-done-tint: rgba(0,0,0,0.24);
  --sch-done-line: rgba(255,255,255,0.16);
  /*@3.SCHC.140*/
  --sch-k-lecture:   #a78bfa;
  --sch-k-study:     #10b981;
  --sch-k-exam:      #ef4444;
  --sch-k-task:      #f59e0b;
  --sch-k-intensive: #38bdf8;
  --sch-k-late:      #f472b6;
}
[data-theme="dim"] .sch-container, [data-theme="dim"] .sch-modal-overlay, [data-theme="dim"] .sch-sheet-overlay {
  --sch-tile: #202431;
  --sch-tile-line: rgba(255,255,255,0.07);
  --sch-ev-bg: #252a37;
  --sch-ev-line: rgba(255,255,255,0.13);
  --sch-ev-shadow: 0 1px 2px rgba(0,0,0,0.4);
  --sch-hair: rgba(148,163,184,0.14);
  --sch-veil: rgba(4,5,10,0.32);
  --sch-hatch: rgba(255,255,255,0.022);
  --sch-seam: #0f111a;
  --sch-done-tint: rgba(0,0,0,0.3);
  --sch-done-line: rgba(255,255,255,0.14);
  --sch-k-lecture:   #b39dfb;
  --sch-k-study:     #2dd4a7;
  --sch-k-exam:      #f56565;
  --sch-k-task:      #fbbf24;
  --sch-k-intensive: #55c7fa;
  --sch-k-late:      #f78ec4;
}
/*@3.SCHC.3*/
[data-theme="light"] .sch-container, [data-theme="light"] .sch-modal-overlay, [data-theme="light"] .sch-sheet-overlay {
  --sch-tile: #ffffff;
  --sch-tile-line: #dde4ee;
  --sch-tile-shadow: 0 1px 2px rgba(15,23,42,0.05);
  --sch-ev-bg: #ffffff;
  --sch-ev-line: #dfe5ee;
  --sch-ev-shadow: 0 1px 2px rgba(15,23,42,0.06);
  --sch-hair: rgba(15,23,42,0.065);
  --sch-veil: rgba(100,116,139,0.038);
  --sch-hatch: transparent;
  --sch-offbg: #f8fafc;
  --sch-seam: #f5f7fb;
  --sch-todaybg: rgba(167,139,250,0.045);
  --sch-done-tint: rgba(15,23,42,0.055);
  --sch-done-line: rgba(15,23,42,0.14);
  --sch-k-lecture:   #6d3fd4;
  --sch-k-study:     #04785d;
  --sch-k-exam:      #cc2222;
  --sch-k-task:      #a05a06;
  --sch-k-intensive: #0369a1;
  --sch-k-late:      #b8256f;
}


.sch-actions { display: flex; gap: 0.3rem; }

/*@3.SCHC.4*/
:where(.sch-container, .sch-modal-overlay, .sch-sheet-overlay) :where(button) {
  border: 0 solid transparent;
  background: none;
  color: inherit;
  font-family: inherit;
  -webkit-appearance: none;
  appearance: none;
}

/*@3.SCHC.5*/
.sch-code {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600; letter-spacing: 0.005em;
}

/*@3.SCHC.106*/
.sch-tools {
  background: var(--bg-card); border: 1px solid var(--border-color);
  border-radius: var(--radius-xl); padding: 0.5rem 0.6rem;
  margin-bottom: 0.75rem; position: relative; z-index: 20;
}
.sch-tools > .sch-week-nav,
.sch-tools > .sch-month-nav {
  margin: 0.5rem 0 0; padding-top: 0.5rem;
  border-top: 1px solid var(--border-color);
}
/*@3.SCHC.111*/
@media (min-width: 1024px) {
  .sch-tools { display: flex; align-items: center; gap: 0.9rem; }
  .sch-tools > .sch-toolbar-row { flex: 0 0 auto; }
  .sch-tools > .sch-week-nav,
  .sch-tools > .sch-month-nav {
    margin: 0; margin-inline-start: auto; padding-top: 0; border-top: 0;
  }
}

/*@3.SCHC.6*/
/*@3.SCHC.134*/
.sch-toolbar-row {
  display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; margin-bottom: 0;
}
.sch-view-toggle { display: flex; align-items: center; gap: 0.4rem; }

/*@3.SCHC.7*/
.sch-view-btn,
.sch-tool {
  position: relative;
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.34rem 0.85rem; border-radius: var(--radius-pill);
  border: 1px solid var(--border-color); background: var(--bg-elevated);
  color: var(--text-secondary); cursor: pointer; font-weight: 700;
  font-size: 0.78rem; font-family: inherit; transition: all 0.2s;
  white-space: nowrap;
}
.sch-view-btn:hover,
.sch-tool:hover { border-color: var(--text-secondary); color: var(--text-primary); }
.sch-view-btn.active,
.sch-tool.is-on {
  background: rgba(167,139,250,.15); border-color: #a78bfa; color: #a78bfa;
}
.sch-tool-car { font-size: 0.6rem !important; opacity: 0.6; transition: transform 0.2s; }
.sch-tool-spacer { flex: 1 1 auto; }

/*@3.SCHC.8*/
.sch-tb-group { display: flex; align-items: center; gap: 0.4rem; }
.sch-tb-div {
  inline-size: 1px; align-self: stretch; background: var(--border-color);
  margin: 0.1rem 0.35rem;
}

/*@3.SCHC.107*/
.sch-cf { position: relative; }
.sch-cf-n {
  position: absolute; top: -5px; inset-inline-end: -5px;
  min-width: 16px; height: 16px; padding: 0 4px; border-radius: var(--radius-pill);
  background: #a78bfa; color: #fff; font-size: 0.62rem; font-weight: 800; line-height: 16px;
  text-align: center; font-variant-numeric: tabular-nums;
  box-shadow: 0 0 0 2px var(--bg-card);
}
.sch-cf.open > .sch-tool { border-color: #a78bfa; color: #a78bfa; }
.sch-cf.open .sch-tool-car { transform: rotate(180deg); }
.sch-cf-pop {
  display: none; position: absolute; top: calc(100% + 0.4rem); inset-inline-end: 0;
  width: min(300px, calc(100vw - 2rem)); max-height: 320px; overflow-y: auto; z-index: 80;
  background: var(--bg-surface); border: 1px solid var(--border-color);
  border-radius: var(--radius-lg); box-shadow: 0 16px 38px -12px rgba(0,0,0,0.5);
  padding: 0.5rem;
}
.sch-cf.open > .sch-cf-pop { display: block; }
.sch-cf-head {
  display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
  padding: 0.1rem 0.35rem 0.4rem; margin-bottom: 0.35rem;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.72rem; font-weight: 800; color: var(--text-muted);
}
.sch-cf-all {
  background: transparent; border: none; cursor: pointer; font-family: inherit;
  font-size: 0.72rem; font-weight: 800; color: #a78bfa;
  padding: 0.15rem 0.35rem; border-radius: var(--radius-sm);
}
.sch-cf-all:hover:not(:disabled) { background: rgba(167,139,250,0.14); }
.sch-cf-all:disabled { color: var(--text-muted); opacity: 0.5; cursor: default; }
.sch-cf-list { display: flex; flex-direction: column; gap: 0.1rem; }
.sch-cf-item {
  display: flex; align-items: center; gap: 0.5rem; width: 100%; text-align: start;
  padding: 0.4rem 0.45rem; border: none; border-radius: var(--radius-md);
  background: transparent; color: var(--text-secondary);
  font-family: inherit; font-size: 0.82rem; font-weight: 600; cursor: pointer;
}
.sch-cf-item:hover { background: var(--bg-elevated); color: var(--text-primary); }
.sch-cf-box {
  width: 16px; height: 16px; flex-shrink: 0; border-radius: 5px;
  border: 1.5px solid var(--border-color); display: grid; place-items: center;
  font-size: 0.55rem; color: transparent; transition: background 0.15s, border-color 0.15s;
}
.sch-cf-item.is-on .sch-cf-box {
  background: var(--chip-color, #a78bfa); border-color: var(--chip-color, #a78bfa); color: #fff;
}
.sch-cf-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--chip-color, #a78bfa); flex-shrink: 0; }
.sch-cf-nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sch-cf-code { font-size: 0.7rem; color: var(--text-muted); flex-shrink: 0; }
.sch-cf-item.is-off { opacity: 0.45; }
.sch-cf-item.is-off .sch-cf-dot { background: var(--text-muted); }

/*@3.SCHC.12*/
.sch-week-nav { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.55rem; justify-content: center; }
.sch-nav-btn {
  width: 32px; height: 32px; border: 1px solid var(--border-color); border-radius: var(--radius-md);
  background: transparent; color: var(--text-muted); cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: all 0.2s;
}
.sch-nav-btn:hover { background: var(--bg-elevated); color: var(--text-primary); }
/*@3.SCHC.13*/
[dir="ltr"] .sch-nav-btn i { transform: scaleX(-1); }

.sch-nav-label {
  border: none; background: transparent; cursor: default; font-family: inherit;
  padding: 0 0.6rem; display: flex; flex-direction: column; align-items: center; gap: 1px;
  min-width: 9rem;
}
/*@3.SCHC.14*/
.sch-wk-num { font-size: 0.98rem; font-weight: 800; color: var(--text-primary); line-height: 1.15; }
.sch-wk-date { font-size: 0.7rem; font-weight: 600; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.sch-today-btn {
  padding: 0.25rem 0.6rem; border: 1px solid var(--border-color); border-radius: var(--radius-pill);
  background: transparent; color: var(--text-muted); font-size: 0.75rem; font-weight: 700;
  cursor: pointer; font-family: inherit; transition: all 0.2s;
}
.sch-today-btn:hover { border-color: #a78bfa; color: var(--st-accent); }

/*@3.SCHC.15*/
.sch-focus-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; flex-wrap: wrap;
  margin: 0 0 0.7rem; padding: 0.55rem 0.85rem; background: rgba(167,139,250,0.12);
  border: 1.5px solid #a78bfa; border-radius: var(--radius-md);
}
.sch-focus-text { font-size: 0.82rem; font-weight: 700; color: var(--text-primary); }
.sch-outrange {
  margin: 0 0 0.7rem; padding: 0.45rem 0.8rem; border-radius: var(--radius-md);
  background: rgba(245,158,11,0.10); border: 1px solid rgba(245,158,11,0.35);
  color: var(--st-warn, #f59e0b); font-size: 0.76rem; font-weight: 700; text-align: center;
}

/*@3.SCHC.16*/
.sch-chips { display: flex; flex-wrap: wrap; gap: 0.3rem; margin: 0 0 0.5rem; align-items: center; }
.sch-chip {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.25rem 0.7rem; border-radius: var(--radius-pill);
  border: 1px solid var(--border-color); background: var(--bg-elevated);
  color: var(--text-secondary); font-family: inherit; font-size: 0.73rem; font-weight: 700;
  cursor: pointer; transition: all 0.2s; white-space: nowrap;
}
.sch-chip:hover { transform: translateY(-1px); border-color: var(--chip-color, #a78bfa); }
.sch-chip .sch-chip-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--chip-color, #a78bfa); flex-shrink: 0; }
/*@3.SCHC.17*/
.sch-chip.is-off { opacity: 0.42; text-decoration: line-through; }
.sch-chip.is-off .sch-chip-dot { background: var(--text-muted); }
/*@3.SCHC.18*/
.sch-chip.is-on {
  background: color-mix(in srgb, var(--chip-color, #a78bfa) 16%, var(--bg-elevated));
  border-color: var(--chip-color, #a78bfa);
  color: var(--text-primary);
  box-shadow: inset 0 0 0 1px var(--chip-color, #a78bfa);
}
.sch-chip.is-on .sch-chip-dot { background: var(--chip-color, #a78bfa); }
.sch-chip-clear { border-style: dashed; }

/*@3.SCHC.19*/
.sch-chip-n {
  font-size: 0.66rem; font-weight: 800; line-height: 1;
  padding: 0.14rem 0.34rem; border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--text-muted) 22%, transparent);
  color: var(--text-secondary); font-variant-numeric: tabular-nums;
}
.sch-chip.is-on .sch-chip-n {
  background: color-mix(in srgb, var(--chip-color, #a78bfa) 30%, transparent);
  color: var(--text-primary);
}
/*@3.SCHC.20*/
.sch-chip.is-empty { opacity: 0.5; }
.sch-chip.is-empty .sch-chip-dot { background: var(--text-muted); }

/*@3.SCHC.21*/
.sch-daystrip {
  display: flex; gap: 0.25rem; margin: 0 0 0.5rem;
  background: var(--bg-elevated); border: 1px solid var(--border-color);
  border-radius: var(--radius-pill); padding: 3px;
}
.sch-strip-day {
  flex: 1; min-width: 0; padding: 0.2rem 0.1rem;
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  border: none; background: transparent; color: var(--text-muted);
  border-radius: var(--radius-pill); cursor: pointer; font-family: inherit;
  transition: background 0.2s, color 0.2s;
}
.sch-strip-dn { font-size: 0.6rem; font-weight: 700; line-height: 1.1; }
.sch-strip-num { font-size: 0.78rem; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
/*@3.SCHC.22*/
.sch-strip-day.is-in { background: var(--bg-card); color: var(--text-primary); }
/*@3.SCHC.23*/
.sch-strip-day.is-today .sch-strip-num {
  background: #a78bfa; color: #fff; border-radius: 999px;
  min-width: 1.35rem; height: 1.35rem; display: inline-flex;
  align-items: center; justify-content: center;
}
.sch-strip-day:hover { color: var(--text-primary); }

/*@3.SCHC.24*/
.sch-grid-wrap {
  overflow-x: hidden; overflow-y: auto; min-block-size: 320px;
  border: 1px solid var(--border-color); border-radius: var(--radius-xl);
  background: var(--bg-card); position: relative;
  overscroll-behavior: contain;
}
/*@3.SCHC.25*/
.sch-grid-inner { min-width: 0; overflow: clip; }
/*@3.SCHC.26*/
.sch-body { padding-block-end: 8px; }
/*@3.SCHC.27*/
.sch-grid-wrap::-webkit-scrollbar { width: 6px; }
.sch-grid-wrap::-webkit-scrollbar-track { background: transparent; }
.sch-grid-wrap::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 9999px; }

/*@3.SCHC.28*/
.sch-head-row {
  display: grid; position: sticky; inset-block-start: 0; z-index: 12;
  background: var(--bg-elevated); border-block-end: 1px solid var(--border-color);
}
.sch-head-gutter { border-inline-end: 1px solid var(--border-color); }
.sch-day-head {
  text-align: center; padding: 0.45rem 0.25rem; font-weight: 700; font-size: 0.8rem;
  line-height: 1.3; border-inline-start: 1px solid var(--border-color);
  background: transparent; color: var(--text-primary); cursor: pointer;
  font-family: inherit; transition: background 0.2s;
}
.sch-day-head:hover { background: rgba(167,139,250,0.08); }
.sch-day-head .sch-dh-num {
  display: inline-flex; align-items: center; justify-content: center;
  margin-block-start: 2px; min-width: 1.5rem; height: 1.5rem;
  font-size: 0.82rem; color: var(--text-primary);
  font-variant-numeric: tabular-nums; font-weight: 800;
}
/*@3.SCHC.29*/
.sch-day-head.today .sch-dh-num {
  background: #a78bfa; color: #fff; border-radius: 999px;
}

/*@3.SCHC.30*/
.sch-allday-row {
  display: grid; background: var(--bg-card);
  border-block-end: 1px solid var(--border-color);
}
.sch-allday-label {
  font-size: 0.6rem; font-weight: 700; color: var(--text-muted);
  display: flex; align-items: center; justify-content: center; text-align: center;
  padding: 0.25rem 0.15rem; line-height: 1.2;
}
/*@3.SCHC.31*/
.sch-allday-cell {
  position: relative;
  display: flex; flex-wrap: wrap; align-content: center; align-items: center;
  gap: 3px; padding: 0.3rem 0.35rem; min-height: 30px; max-height: 30px; overflow: hidden;
  border-inline-start: 1px solid var(--border-color);
  background: transparent; border-block: 0; border-inline-end: 0;
  cursor: pointer; font-family: inherit;
}
.sch-adot { position: relative; }
.sch-adot {
  width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; cursor: pointer;
  background: var(--dot-color, #a78bfa); border: none; padding: 0;
  transition: transform 0.2s;
}
/*@3.SCHC.32*/
.sch-adot::after { content: ''; position: absolute; inset: -7px; }
.sch-adot:hover { transform: scale(1.35); }
.sch-adot.is-done { opacity: 0.4; }
.sch-adot.is-late { box-shadow: 0 0 0 2px var(--bg-card), 0 0 0 3px var(--st-danger); }
.sch-adot-more { font-size: 0.6rem; font-weight: 800; color: var(--text-muted); }

/*@3.SCHC.33*/
.sch-body { display: grid; position: relative; }
.sch-gutter { position: relative; border-inline-end: 1px solid var(--border-color); }
.sch-hour-label {
  position: absolute; inset-inline: 0; transform: translateY(-0.5em);
  text-align: center; font-size: 0.66rem; font-weight: 600; color: var(--text-muted);
  font-variant-numeric: tabular-nums; pointer-events: none;
  line-height: 1.15;
}
/*@3.SCHC.34*/
.sch-hour-label.is-first { transform: translateY(1px); }
.sch-hour-label.is-last { transform: translateY(-1.15em); }
.sch-daycol {
  position: relative; border-inline-start: 1px solid var(--border-color); cursor: pointer;
}
/*@3.SCHC.35*/
.sch-daycol.is-off {
  background-color: var(--sch-offbg);
  background-image: repeating-linear-gradient(135deg,
    var(--sch-hatch) 0 1px, transparent 1px 7px);
}
.sch-daycol.is-today { background-color: var(--sch-todaybg); }
/*@3.SCHC.36*/
.sch-pastveil {
  position: absolute; inset-inline: 0; inset-block-start: 0;
  background: var(--sch-veil); pointer-events: none; z-index: 1;
}
.sch-hourline { position: absolute; inset-inline: 0; border-block-start: 1px solid var(--sch-hair); pointer-events: none; opacity: .55; }
/*@3.SCHC.37*/

/*@3.SCHC.38*/
/*@3.SCHC.144*/
.sch-gaplayer {
  position: absolute; inset-inline-start: var(--sch-gut, 66px); inset-inline-end: 0;
  inset-block-start: 0; pointer-events: none; z-index: 3;
}
.sch-gapband {
  position: absolute; inset-inline: 0; pointer-events: auto;
  display: flex; align-items: center; justify-content: center; gap: 0.45rem;
  border: none;
  /*@3.SCHC.145*/
  border-block: 1px dashed var(--border-color);
  background: none;
  color: color-mix(in srgb, var(--text-muted) 84%, transparent);
  font-family: inherit; font-size: 0.66rem; font-weight: 600; letter-spacing: 0.01em;
  cursor: pointer; transition: color 0.2s, background 0.2s, border-color 0.2s;
}
.sch-gapband i { font-size: 0.6rem; transition: transform 0.2s; }
.sch-gapband:hover, .sch-gapband:focus-visible {
  color: var(--text-primary); background: var(--sch-seam);
  border-block-color: var(--border-color); border-block-style: solid; outline: none;
}
.sch-gapband:hover i { transform: translateY(2px); }
/*@3.SCHC.39*/
.sch-gapband::after { content: ''; position: absolute; inset: -5px 0; }

/*@3.SCHC.40*/
.sch-nowrail {
  position: absolute; inset-inline: 0; height: 0; z-index: 5; pointer-events: none;
  border-block-start: 1px dashed color-mix(in srgb, var(--st-danger, #ef4444) 30%, transparent);
}
/*@3.SCHC.41*/
.sch-nowrail::before {
  content: ''; position: absolute; inset-block-start: -3.5px;
  /*@3.SCHC.42*/
  inset-inline-start: var(--sch-dot-x, 66px);
  margin-inline-start: -3.5px;   /*@3.SCHC.43*/
  width: 7px; height: 7px; border-radius: 50%; background: var(--st-danger, #ef4444);
  z-index: 1;
}
.sch-nowline {
  position: absolute; inset-inline: 0; height: 0; z-index: 6; pointer-events: none;
  border-block-start: 1.5px solid var(--st-danger, #ef4444);
}
/*@3.SCHC.44*/
.sch-nowchip {
  position: absolute; inset-inline: 2px; transform: translateY(-50%);
  z-index: 6; pointer-events: none; text-align: center;
  font-size: 0.6rem; font-weight: 800; line-height: 1.5;
  font-variant-numeric: tabular-nums; white-space: nowrap;
  color: #fff; background: var(--st-danger, #ef4444);
  border-radius: var(--radius-sm);
}

/*@3.SCHC.45*/
.sch-edge {
  position: absolute; inset-inline: 0; display: flex; justify-content: center; gap: 3px;
  z-index: 5; padding: 2px 0; background: linear-gradient(var(--bg-card), transparent);
}
.sch-edge.is-late { inset-block-end: 0; background: linear-gradient(transparent, var(--bg-card)); }
.sch-edge.is-early { inset-block-start: 0; }
.sch-edge button {
  position: relative;
  width: 8px; height: 8px; border-radius: 50%; border: none; padding: 0; cursor: pointer;
  background: var(--dot-color, #a78bfa); opacity: 0.85;
}
.sch-edge button::after { content: ''; position: absolute; inset: -8px; }
.sch-edge button:hover { opacity: 1; transform: scale(1.3); }

/*@3.SCHC.46*/
.sch-ev {
  position: absolute; z-index: 3; overflow: hidden; cursor: pointer; text-align: start;
  display: flex; flex-direction: column; justify-content: center; gap: 1px;
  padding: 5px 7px; padding-inline-start: 11px;
  border-radius: 9px; border: 1px solid var(--sch-ev-line);
  background: var(--sch-ev-bg); color: var(--text-primary);
  box-shadow: var(--sch-ev-shadow);
  transition: transform .22s cubic-bezier(.4,0,.2,1), box-shadow .22s cubic-bezier(.4,0,.2,1),
              border-color .22s, opacity .3s, filter .3s;
}
.sch-ev::before {
  content: ''; position: absolute; inset-block: 5px; inset-inline-start: 4px; width: 3.5px;
  border-radius: 3px; z-index: 2; opacity: .88;
  background: var(--event-color, var(--text-muted));
  transition: opacity .2s;
}
.sch-ev:hover {
  transform: translateY(-2px); z-index: 6;
  box-shadow: 0 12px 26px -12px var(--shadow-base), 0 2px 6px var(--shadow-base);
  border-color: color-mix(in srgb, var(--event-color, var(--text-muted)) 50%, var(--sch-ev-line));
}
.sch-ev:hover::before { opacity: 1; }
.sch-ev > * { position: relative; z-index: 3; }

/*@3.SCHC.150*/
.sch-ev.is-spill {
  border-block-start-style: dashed;
  border-block-start-color: color-mix(in srgb, var(--event-color, var(--text-muted)) 55%, transparent);
  border-start-start-radius: 2px; border-start-end-radius: 2px;
}
.sch-ev.is-spill::before { inset-block-start: 0; border-start-start-radius: 0; border-start-end-radius: 0; }
.sch-ev-cont {
  flex-shrink: 0; font-size: .62rem; line-height: 1;
  color: color-mix(in srgb, var(--event-color, var(--text-muted)) 78%, var(--text-muted));
}

.sch-ev-head { display: flex; align-items: center; gap: .3rem; min-width: 0; }
.sch-ev-ico { flex-shrink: 0; color: var(--text-muted); font-size: .7rem; line-height: 1; }
/*@3.SCHC.47*/
.sch-ev-title {
  font-size: .76rem; font-weight: 700; line-height: 1.25; min-width: 0; flex: 0 1 auto;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text-primary);
}
/*@3.SCHC.48*/
.sch-ev-title .sch-ev-tx { display: inline; }
.sch-ev-title.is-mq { text-overflow: clip; }
.sch-ev-title.is-mq .sch-ev-tx {
  display: inline-block; will-change: transform;
  animation: schMarquee var(--mq-dur, 12s) linear 0s infinite;
}
@keyframes schMarquee {
  0%, 28%   { transform: translateX(0) }
  93%, 100% { transform: translateX(var(--mq-x, 0)) }
}
.sch-ev-time {
  font-size: .65rem; font-weight: 700; color: var(--text-secondary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums;
}
.sch-ev-meta {
  font-size: .63rem; color: var(--text-secondary); opacity: .9;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sch-ev-note { font-size: .6rem; opacity: .85; flex-shrink: 0; }

/*@3.SCHC.49*/
.sch-ev.is-xs { padding: 2px 6px; padding-inline-start: 11px; gap: 0; }
.sch-ev.is-xs .sch-ev-time, .sch-ev.is-xs .sch-ev-meta { display: none; }
.sch-ev.is-xs .sch-ev-title { font-size: .69rem; }
.sch-ev.is-sm .sch-ev-meta { display: none; }
.sch-ev.is-narrow .sch-ev-end,
.sch-ev.is-narrow .sch-ev-meta,
.sch-ev.is-narrow .sch-ev-ico { display: none; }
.sch-ev.is-vnarrow .sch-ev-time { display: none; }
.sch-ev .is-hidden { display: none; }

/*@3.SCHC.50*/
.sch-ev.is-now {
  border-color: color-mix(in srgb, var(--event-color, var(--text-muted)) 62%, var(--sch-ev-line));
  box-shadow: 0 3px 12px -4px var(--shadow-base); z-index: 5;
}
.sch-ev.is-now::before {
  opacity: 1;
  background: linear-gradient(to bottom,
    var(--event-color, var(--text-muted)) var(--p, 0%),
    color-mix(in srgb, var(--event-color, var(--text-muted)) 22%, var(--sch-ev-bg)) var(--p, 0%));
  transition: background 1s linear;
}

/*@3.SCHC.51*/
.sch-ev.k-exam::before {
  opacity: 1;
  background: repeating-linear-gradient(to bottom, var(--st-danger, #ef4444) 0 5px, transparent 5px 9px);
}
.sch-ev.k-exam { border-color: color-mix(in srgb, var(--st-danger, #ef4444) 38%, var(--sch-ev-line)); }
.sch-ev.k-exam .sch-ev-ico { color: var(--st-danger, #ef4444); }

/*@3.SCHC.52*/
.sch-ev.is-done, .sch-ev.is-done.is-expired { opacity: .58; }
.sch-ev.is-done::after {
  content: ''; position: absolute; inset: 0; z-index: 4; pointer-events: none; border-radius: inherit;
  background-color: var(--sch-done-tint);
  background-image: repeating-linear-gradient(135deg, var(--sch-done-line) 0 1px, transparent 1px 6px);
}
.sch-ev.is-done::before { filter: saturate(.3); opacity: .65; }
.sch-ev.is-done .sch-ev-title { text-decoration: none; font-style: normal; }
.sch-ev.is-expired { opacity: .72; }
.sch-ev.is-clipped .sch-ev-title::before { content: '↑ '; color: var(--st-warn, #f59e0b); }

.sch-ev-check {
  font-family: inherit;
  position: absolute; inset-block-start: 3px; inset-inline-end: 3px;
  width: 18px; height: 18px; padding: 0; line-height: 15px; font-size: 0.66rem;
  border-radius: 50%; background: transparent; color: var(--text-muted);
  border: 1px solid var(--border-color); opacity: 0; cursor: pointer; transition: opacity 0.2s;
}
.sch-ev:hover .sch-ev-check { opacity: 0.95; }
.sch-ev-check:hover { color: var(--st-ok); border-color: var(--st-ok); }
/*@3.SCHC.53*/
.sch-ev-check.is-done {
  opacity: 1; color: var(--st-ok);
  background: color-mix(in srgb, var(--st-ok) 18%, var(--bg-elevated));
  border-color: color-mix(in srgb, var(--st-ok) 45%, transparent);
}

/*@3.SCHC.54*/

/*@3.SCHC.55*/
.sch-agenda { display: flex; flex-direction: column; gap: 0.7rem; }
.sch-ag-day {
  border: 1px solid var(--border-color); border-radius: var(--radius-xl);
  background: var(--bg-card); overflow: hidden;
}
.sch-ag-day.is-today { border-color: #a78bfa; box-shadow: 0 0 0 1px rgba(167,139,250,0.35); }
.sch-ag-head {
  display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap;
  padding: 0.5rem 0.85rem; background: var(--bg-elevated);
  border-block-end: 1px solid var(--border-color);
}
.sch-ag-dname { font-size: 0.88rem; font-weight: 800; color: var(--text-primary); }
.sch-ag-ddate { font-size: 0.72rem; font-weight: 600; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.sch-ag-count {
  margin-inline-start: auto; font-size: 0.68rem; font-weight: 700;
  padding: 0.1rem 0.5rem; border-radius: var(--radius-pill);
  background: var(--bg-card); color: var(--text-secondary); border: 1px solid var(--border-color);
}
.sch-ag-today-badge {
  font-size: 0.66rem; font-weight: 800; padding: 0.1rem 0.5rem;
  border-radius: var(--radius-pill); background: rgba(167,139,250,0.16); color: #a78bfa;
}
.sch-ag-list { display: flex; flex-direction: column; }
/*@3.SCHC.56*/
.sch-ag-item {
  font-family: inherit;
  display: flex; align-items: flex-start; gap: 0.6rem; padding: 0.55rem 0.85rem;
  border-block-end: 1px dashed var(--border-color); cursor: pointer;
  border-inline-start: 3px solid color-mix(in srgb, var(--event-color, var(--text-muted)) 72%, var(--bg-card));
  transition: background 0.2s;
}
.sch-ag-item:last-child { border-block-end: none; }
/*@3.SCHC.57*/
.sch-ag-item { border-block-end-style: solid; }
.sch-ag-item:hover { background: var(--bg-elevated); }
.sch-ag-time {
  font-variant-numeric: tabular-nums; font-size: 0.7rem; font-weight: 700;
  color: var(--text-secondary); min-width: 4.6rem; flex-shrink: 0; padding-block-start: 1px;
}
/*@3.SCHC.58*/
.sch-ag-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.sch-ag-title { font-size: 0.86rem; font-weight: 700; color: var(--text-primary); line-height: 1.3; }
.sch-ag-sub { font-size: 0.72rem; line-height: 1.3; color: var(--text-muted); }
.sch-ag-ico { font-size: 0.8rem; color: var(--text-muted); flex-shrink: 0; padding-block-start: 2px; }
/*@3.SCHC.59*/
.sch-ag-item.is-done {
  background-image: repeating-linear-gradient(
    135deg,
    transparent 0 5px,
    color-mix(in srgb, currentColor 12%, transparent) 5px 6px
  );
}
.sch-ag-item.is-done .sch-ag-title {
  font-style: italic; text-decoration: line-through;
  text-decoration-color: var(--st-ok); text-decoration-thickness: 1.5px;
  opacity: 0.72;
}
.sch-ag-item.is-done .sch-ag-sub { font-style: italic; opacity: 0.7; }
.sch-ag-empty { padding: 0.55rem 0.85rem; font-size: 0.76rem; color: var(--text-muted); font-weight: 600; }
/*@3.SCHC.60*/
.sch-ag-day.is-empty .sch-ag-head { background: transparent; border-block-end: none; opacity: 0.65; }
.sch-ag-group-label {
  font-size: 0.66rem; font-weight: 800; color: var(--text-muted);
  padding: 0.35rem 0.85rem 0.1rem; text-transform: uppercase; letter-spacing: 0.03em;
}
/*@3.SCHC.61*/
/*@3.SCHC.148*/
.sch-ag-gap {
  inline-size: 100%; display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.5rem 0.7rem; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.01em;
  color: color-mix(in srgb, var(--text-muted) 84%, transparent);
  background: none; font-family: inherit; cursor: pointer;
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-lg);
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}
.sch-ag-gap > i { font-size: 0.62rem; transition: transform 0.2s; }
.sch-ag-gap > em { font-style: normal; opacity: .8; font-variant-numeric: tabular-nums; unicode-bidi: isolate; }
.sch-ag-gap > em::before { content: '·'; margin-inline-end: .4rem; opacity: .6; }
.sch-ag-gap:hover, .sch-ag-gap:focus-visible {
  color: var(--text-primary); background: var(--sch-seam);
  border-color: var(--border-color); border-style: solid; outline: none;
}
.sch-ag-gap:hover > i { transform: translateY(2px); }

/*@3.SCHC.62*/
.sch-dayfilter {
  display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; flex-wrap: wrap;
  margin: 0 0 0.7rem; padding: 0.45rem 0.8rem; border-radius: var(--radius-md);
  background: rgba(167,139,250,0.10); border: 1px solid rgba(167,139,250,0.4);
  font-size: 0.78rem; font-weight: 700; color: var(--text-primary);
}

/*@3.SCHC.63*/
.sch-sheet-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.55); backdrop-filter: blur(4px);
  z-index: 2100; display: flex; align-items: center; justify-content: center; padding: max(1rem, var(--sa-t)) max(1rem, var(--sa-r)) max(1rem, var(--sa-b)) max(1rem, var(--sa-l));
}
.sch-sheet {
  background: var(--bg-surface); border: 1.5px solid var(--border-color);
  border-radius: var(--radius-xl); width: 100%; max-width: 440px; max-height: 88vh;
  overflow-y: auto; box-shadow: 0 24px 60px rgba(0,0,0,0.45);
}
.sch-sheet-head {
  position: relative; padding: 1rem 1.1rem 0.85rem;
  border-block-end: 1px solid var(--border-color);
  border-inline-start: 4px solid var(--event-color, #a78bfa);
}
.sch-sheet-kind {
  display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.7rem; font-weight: 800;
  padding: 0.15rem 0.6rem; border-radius: var(--radius-pill);
  background: var(--bg-elevated); color: var(--text-secondary); margin-block-end: 0.4rem;
}
.sch-sheet-title { font-size: 1.05rem; font-weight: 800; color: var(--text-primary); line-height: 1.3; }
.sch-sheet-course { font-size: 0.8rem; font-weight: 600; color: var(--text-secondary); margin-block-start: 2px; }
.sch-sheet-close {
  position: absolute; inset-block-start: 0.6rem; inset-inline-end: 0.6rem;
  width: 32px; height: 32px; border: none; background: transparent; color: var(--text-muted);
  border-radius: var(--radius-md); cursor: pointer; font-size: 0.95rem;
}
.sch-sheet-close:hover { background: var(--bg-elevated); color: var(--text-primary); }
.sch-sheet-body { padding: 0.9rem 1.1rem; display: flex; flex-direction: column; gap: 0.7rem; }
.sch-sheet-row { display: flex; align-items: flex-start; gap: 0.6rem; font-size: 0.84rem; color: var(--text-secondary); }
.sch-sheet-row i { color: var(--text-muted); width: 1.1rem; text-align: center; padding-block-start: 2px; flex-shrink: 0; }
.sch-sheet-row b { color: var(--text-primary); font-weight: 700; }
.sch-sheet-row .mono { font-variant-numeric: tabular-nums; }
.sch-sheet-note {
  background: var(--bg-elevated); border: 1px dashed var(--border-color);
  border-radius: var(--radius-md); padding: 0.6rem 0.75rem;
  font-size: 0.82rem; line-height: 1.7; color: var(--text-secondary); white-space: pre-wrap;
}
.sch-sheet-video { position: relative; padding-block-end: 56.25%; border-radius: var(--radius-md); overflow: hidden; background: #000; }
.sch-sheet-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.sch-sheet-link {
  display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.8rem; font-weight: 700;
  color: #a78bfa; text-decoration: none;
}
.sch-sheet-link:hover { text-decoration: underline; }
/*@3.SCHC.64*/
.sch-sheet-actions {
  display: flex; gap: 0.4rem; flex-wrap: nowrap; padding: 0.85rem 1.1rem;
  border-block-start: 1px solid var(--border-color); background: var(--bg-card);
  overflow-x: auto; scrollbar-width: none;
}
.sch-sheet-actions::-webkit-scrollbar { display: none; }
.sch-sheet-actions .sch-btn {
  flex: 1 1 0; min-width: 0; justify-content: center;
  padding-inline: 0.55rem; white-space: nowrap;
}
/*@3.SCHC.65*/
@media (max-width: 420px) { .sch-sheet-actions .sch-btn i { display: none; } }

@media (max-width: 640px) {
  .sch-sheet-overlay { align-items: flex-end; padding: var(--sa-t) var(--sa-r) var(--sa-b) var(--sa-l); }
  .sch-sheet { max-width: none; border-radius: var(--radius-xl) var(--radius-xl) 0 0; max-height: 92vh; }
}

/*@3.SCHC.66*/
.sch-fab {
  position: fixed; bottom: 80px; width: 48px; height: 48px; border-radius: 50%;
  background: #a78bfa; color: #fff; border: none; font-size: 1.2rem; cursor: pointer;
  box-shadow: 0 4px 16px rgba(167,139,250,0.4); display: flex; align-items: center;
  justify-content: center; transition: all 0.2s; z-index: 100;
}
.sch-fab { inset-inline-end: 1.5rem; }
.sch-fab:hover { transform: scale(1.1); }

/*@3.SCHC.130*/
/*@3.SCHC.138*/
.sch-month-wrapper {
  display: grid; grid-template-columns: minmax(0, 476px) minmax(0, 1fr);
  gap: 0.9rem; align-items: start;
  max-inline-size: 1000px; margin-inline: auto;
}
.sch-month-pane,
.sch-month-rail {
  border: 1px solid var(--border-color); border-radius: var(--radius-xl);
  background: var(--bg-card); padding: 0.85rem 0.8rem;
}
.sch-month-rail { padding: 0.85rem 0.9rem; min-inline-size: 0; }
@media (max-width: 820px) {
  .sch-month-wrapper { grid-template-columns: minmax(0, 1fr); max-inline-size: 520px; }
}

/*@3.SCHC.67*/
.sch-month-nav { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-bottom: 0.7rem; }
.sch-month-label { font-weight: 800; font-size: 1rem; }
/*@3.SCHC.135*/
.sch-month-grid {
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr));
  grid-auto-rows: minmax(0, 1fr); gap: 3px;
  inline-size: 100%; margin-inline: auto;
}
.sch-month-day-header { text-align: center; font-size: 0.72rem; font-weight: 700; color: var(--text-muted); padding: 0.4rem 0; }
.sch-month-cell {
  font-family: inherit;
  text-align: center; padding: 0.4rem 0.2rem; border-radius: var(--radius-md);
  cursor: pointer; transition: background 0.15s, border-color 0.15s;
  /*@3.SCHC.68*/
  aspect-ratio: 1; min-inline-size: 0; min-block-size: 0; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 4px;
  border: 1px solid var(--border-color); background: transparent;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}
.sch-month-cell:hover { background: var(--bg-elevated); }
.sch-month-head { display: contents; }
.sch-month-cell.today { border-color: #a78bfa; }
.sch-month-cell.is-pick {
  border-color: #a78bfa;
  background: color-mix(in oklab, #a78bfa 14%, transparent);
}
.sch-month-cell.today .sch-month-day-num {
  background: #a78bfa; color: #fff; border-radius: 999px;
  min-width: 1.5rem; height: 1.5rem; display: inline-flex; align-items: center; justify-content: center;
}
.sch-month-cell.empty, .sch-month-cell.out { cursor: default; border-color: transparent; }
.sch-month-cell.out-of-term { opacity: 0.5; }
.sch-month-day-num { font-size: 0.85rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.sch-month-wk {
  display: block; font-size: 0.56rem; font-weight: 700; color: var(--text-muted); line-height: 1;
}
.sch-month-dots { display: flex; gap: 3px; justify-content: center; align-items: center; flex-wrap: wrap; }
/*@3.SCHC.136*/
.sch-month-dot { inline-size: 6px; block-size: 6px; border-radius: 50%; flex-shrink: 0; }
.sch-month-dot.is-exam      { background: var(--sch-k-exam); }
.sch-month-dot.is-late      { background: var(--sch-k-late); }
.sch-month-dot.is-task      { background: var(--sch-k-task); }
.sch-month-dot.is-lecture   { background: var(--sch-k-lecture); }
.sch-month-dot.is-study     { background: var(--sch-k-study); }
.sch-month-dot.is-intensive { background: var(--sch-k-intensive); }

.sch-legend {
  display: flex; flex-wrap: wrap; gap: 0.5rem 0.9rem; justify-content: center;
  margin-top: 0.75rem; padding-top: 0.6rem; border-top: 1px solid var(--border-color);
  font-size: 0.72rem; color: var(--text-secondary);
}
.sch-legend-item { display: inline-flex; align-items: center; gap: 0.35rem; white-space: nowrap; }

/*@3.SCHC.69*/
.sch-modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.55); backdrop-filter: blur(4px);
  z-index: 2000; display: flex; align-items: center; justify-content: center; padding: max(1rem, var(--sa-t)) max(1rem, var(--sa-r)) max(1rem, var(--sa-b)) max(1rem, var(--sa-l));
}
/*@3.SCHC.70*/
#modal-confirm { z-index: 2200; }
.sch-modal {
  background: var(--bg-surface); border: 1.5px solid var(--border-color);
  border-radius: var(--radius-xl); padding: 1.5rem; width: 100%; max-width: 400px;
  max-height: 85vh; overflow-y: auto; box-shadow: 0 24px 60px rgba(0,0,0,0.4);
}
.sch-modal-compact { max-width: 300px; display: flex; flex-direction: column; gap: 0.5rem; }
.sch-modal h3 { font-size: 1.05rem; font-weight: 800; margin: 0 0 1rem; }
.sch-label { display: block; font-size: 0.78rem; font-weight: 700; color: var(--text-secondary); margin: 0.5rem 0 0.25rem; }
.sch-input, .sch-select {
  width: 100%; padding: 0.5rem 0.6rem; background: var(--bg-elevated);
  border: 1.5px solid var(--border-color); border-radius: var(--radius-md);
  color: var(--text-primary); font-family: inherit; font-size: 0.88rem; margin-bottom: 0.25rem;
}
.sch-input:focus, .sch-select:focus { outline: none; border-color: #a78bfa; }
.sch-modal textarea.sch-input { resize: vertical; min-height: 2.2rem; font-family: inherit; line-height: 1.5; }

/*@3.SCHC.105*/
.sch-pf-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0.3rem 0.75rem;
  margin: 0.15rem 0 0.4rem;
}
.sch-pf {
  display: flex; align-items: center; gap: 0.4rem; min-width: 0;
  font-size: 0.8rem; font-weight: 600; color: var(--text-secondary); cursor: pointer;
}
.sch-pf span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sch-pf input {
  width: 0.95rem; height: 0.95rem; flex-shrink: 0; margin: 0;
  accent-color: #a78bfa; cursor: pointer;
}
.sch-pf:hover { color: var(--text-primary); }
.sch-pf-wide {
  padding-top: 0.45rem; margin-bottom: 0.2rem;
  border-top: 1px solid var(--border-color);
}

/*@3.SCHC.71*/
.sch-time-row { display: flex; gap: 0.75rem; }
.sch-time-row > div { flex: 1; min-width: 0; }

.sch-modal-actions { display: flex; gap: 0.5rem; margin-top: 1rem; flex-wrap: wrap; }
.sch-del-scope { margin-top: 1rem; padding-top: 0.75rem; border-top: 1px solid var(--border-color); }
.sch-del-scope-q { font-size: 0.85rem; font-weight: 700; color: var(--text-secondary); margin: 0 0 0.25rem; }
/*@3.SCHC.72*/
.sch-del-scope.is-hit {
  border-top-color: var(--st-danger, #f87171);
  border-radius: var(--radius-md);
  padding-inline: 0.55rem;
}
/*@3.SCHC.112*/
@keyframes sch-scope-pulse {
  0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--st-danger, #f87171) 42%, transparent); }
  100% { box-shadow: 0 0 0 8px color-mix(in srgb, var(--st-danger, #f87171) 0%, transparent); }
}
@media (prefers-reduced-motion: no-preference) {
  .sch-del-scope.is-hit { animation: sch-scope-pulse 0.62s ease-out 1; }
}

.sch-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  padding: 0.55rem 1rem; border-radius: var(--radius-md); font-family: inherit;
  font-size: 0.85rem; font-weight: 700; cursor: pointer; border: none; transition: all 0.2s;
}
.sch-btn:hover { transform: translateY(-1px); }
.sch-btn-primary { background: #a78bfa; color: #fff; }
.sch-btn-primary:hover { background: #9167f5; }
.sch-btn-secondary { background: var(--bg-elevated); color: var(--text-secondary); border: 1.5px solid var(--border-color); }
.sch-btn-secondary:hover { color: var(--text-primary); border-color: var(--text-muted); }
.sch-btn-danger { background: rgba(239,68,68,0.1); color: #ef4444; border: 1.5px solid rgba(239,68,68,0.3); }
.sch-btn-danger:hover { background: rgba(239,68,68,0.18); }
.sch-btn-xs { padding: 0.3rem 0.6rem; font-size: 0.72rem; }
.sch-btn-block { width: 100%; }

.sch-choose-btn {
  display: flex; align-items: center; gap: 0.6rem; padding: 0.8rem 1rem; width: 100%;
  border: 1px solid var(--border-color); border-radius: var(--radius-lg); background: transparent;
  color: var(--text-primary); font-size: 0.9rem; font-weight: 700; cursor: pointer;
  transition: all 0.2s; font-family: inherit;
}
.sch-choose-btn:hover { background: var(--bg-elevated); transform: translateY(-1px); }
/*@3.SCHC.73*/
.sch-choose-btn i {
  font-size: 1.1rem; width: 1.3rem; text-align: center;
  color: var(--k, var(--st-accent));
}
#choose-lecture { --k: var(--st-accent, #a78bfa); }
#choose-study   { --k: var(--st-ok, #10b981); }
#choose-exam    { --k: var(--st-danger, #ef4444); }
#choose-general { --k: var(--text-muted); }
.sch-choose-btn.is-plan { --k: var(--st-warn, #f59e0b); }
/*@3.SCHC.74*/
.sch-choose-btn:hover { border-color: var(--k, #a78bfa); }
.sch-choose-btn:hover i { filter: none; }

.sch-day-toggles { display: flex; gap: 0.5rem; padding: 0.5rem 0; flex-wrap: wrap; }
.sch-day-toggles label { display: flex; align-items: center; gap: 0.3rem; font-size: 0.85rem; cursor: pointer; }

/*@3.SCHC.75*/
.sch-timepick { display: flex; align-items: center; gap: 0.3rem; margin-bottom: 0.25rem; direction: ltr; }
.sch-timepick select {
  flex: 1 1 auto; min-width: 0; padding: 0.5rem 0.3rem; background: var(--bg-elevated);
  border: 1.5px solid var(--border-color); border-radius: var(--radius-md);
  color: var(--text-primary); font-family: inherit; font-size: 0.88rem;
  text-align: center; text-align-last: center;
}
.sch-timepick select:focus { outline: none; border-color: #a78bfa; }
.sch-timepick .tp-mer { flex: 0 0 3rem; font-weight: 700; }
.sch-timepick .tp-colon { color: var(--text-secondary); font-weight: 700; padding: 0 0.05rem; }

/*@3.SCHC.76*/
.sch-modal-editor { max-width: 580px; }
.sch-editor-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.75rem; }
.sch-editor-head h3 { margin: 0; font-size: 1.05rem; font-weight: 800; }
.sch-editor-close {
  width: 34px; height: 34px; border: none; background: transparent; color: var(--text-muted);
  border-radius: var(--radius-md); cursor: pointer; display: flex; align-items: center;
  justify-content: center; transition: all 0.2s;
}
.sch-editor-close:hover { background: var(--bg-elevated); color: var(--text-primary); }
.sch-editor-section { padding: 0.75rem 0; border-top: 1px solid var(--border-color); }
.sch-editor-section:first-of-type { border-top: none; }
.sch-editor-subhead { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; font-size: 0.85rem; font-weight: 800; margin-bottom: 0.25rem; flex-wrap: wrap; }
.sch-editor-hint { font-size: 0.72rem; color: var(--text-muted); margin: 0 0 0.6rem; line-height: 1.5; }

/*@3.SCHC.77*/
.sch-term-sug {
  background: color-mix(in srgb, var(--st-warn, #f59e0b) 7%, transparent);
  border: 1px solid color-mix(in srgb, var(--st-warn, #f59e0b) 30%, transparent);
  border-inline-start: 3px solid var(--st-warn, #f59e0b);
  border-radius: var(--radius-lg);
  padding: .75rem .85rem; margin-block-start: .7rem;
}
.sch-term-sug-h {
  display: flex; align-items: center; gap: .45rem;
  font-size: .85rem; font-weight: 800; color: var(--text-primary); margin-block-end: .5rem;
}
.sch-term-sug-h > i { color: var(--st-warn, #f59e0b); }
.sch-term-sug-l { display: flex; flex-wrap: wrap; gap: .35rem; margin-block-end: .55rem; }
.sch-term-sug-l span {
  display: inline-flex; align-items: baseline; gap: .4rem;
  background: var(--bg-elevated); border: 1px solid var(--border-color);
  border-radius: var(--radius-md); padding: .22rem .5rem; font-size: .72rem;
}
.sch-term-sug-l b { color: var(--text-secondary); font-weight: 700; }
.sch-term-sug-l em {
  font-family: 'JetBrains Mono', monospace; font-style: normal;
  color: var(--text-primary); font-variant-numeric: tabular-nums;
  direction: ltr; unicode-bidi: isolate;
}

/*@3.SCHC.78*/
.sch-pending {
  background: rgba(167,139,250,.07);
  border: 1px solid rgba(167,139,250,.3);
  border-inline-start: 3px solid #a78bfa;
  border-radius: var(--radius-lg);
  padding: .75rem .85rem; margin: .75rem 0 .25rem;
}
.sch-pending-h {
  display: flex; align-items: center; gap: .45rem;
  font-size: .85rem; font-weight: 800; color: var(--text-primary); margin-bottom: .5rem;
}
.sch-pending-h > i { color: #a78bfa; }
.sch-pending-list { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .6rem; }
.sch-pending-i {
  display: inline-flex; align-items: baseline; gap: .35rem; max-width: 100%;
  background: var(--bg-elevated); border: 1px solid var(--border-color);
  border-radius: var(--radius-md); padding: .22rem .5rem; font-size: .72rem;
}
/*@3.SCHC.79*/
.sch-pending-i b {
  font-family: 'JetBrains Mono', monospace; font-weight: 700; color: var(--text-primary);
  direction: ltr; unicode-bidi: isolate;
}
.sch-pending-i span {
  color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  direction: ltr; unicode-bidi: isolate;
}
.sch-pending-i em { color: #a78bfa; font-style: normal; font-weight: 700; font-size: .68rem; }
.sch-pending .sch-editor-hint { margin-bottom: .6rem; }

/*@3.SCHC.80*/
.sch-mods { margin-top: .5rem; }
.sch-mods-btn {
  display: inline-flex; align-items: center; gap: .35rem;
  background: transparent; border: 1px dashed var(--border-color);
  border-radius: var(--radius-md); padding: .28rem .55rem;
  color: var(--text-muted); font-family: inherit; font-size: .72rem;
  font-weight: 700; cursor: pointer; transition: all .2s;
}
.sch-mods-btn:hover { border-color: #a78bfa; color: #a78bfa; }
.sch-mods-list { display: flex; flex-direction: column; gap: .3rem; margin-top: .45rem; }
.sch-mods-row { display: flex; align-items: center; gap: .45rem; }
.sch-mods-row > span {
  flex-shrink: 0; width: 1.5rem; text-align: center;
  font-family: 'JetBrains Mono', monospace; font-size: .7rem; color: var(--text-muted);
}
.sch-mods-row > input { flex: 1; min-width: 0; }

.sch-daychips { display: flex; flex-wrap: wrap; gap: 0.3rem; margin: 0.25rem 0 0.5rem; }
.sch-daychip {
  padding: 0.28rem 0.55rem; border-radius: var(--radius-pill); font-size: 0.74rem; font-weight: 700;
  border: 1px solid var(--border-color); background: transparent; color: var(--text-muted);
  cursor: pointer; transition: all 0.2s; font-family: inherit;
}
.sch-daychip.on { background: #a78bfa; color: #fff; border-color: #a78bfa; }
.sch-ecourse {
  border: 1px solid var(--border-color); border-radius: var(--radius-lg);
  padding: 0.7rem 0.8rem; margin-bottom: 0.6rem; background: var(--bg-elevated);
}
.sch-ecourse-head { display: flex; align-items: center; gap: 0.5rem; font-size: 0.88rem; font-weight: 700; margin-bottom: 0.35rem; }
.sch-ecourse-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.sch-ecourse-row { display: flex; gap: 0.6rem; align-items: flex-end; flex-wrap: wrap; }
.sch-ecourse-row > div { flex: 1; min-width: 92px; }
.sch-ecourse .sch-input, .sch-ecourse .sch-select { margin-bottom: 0; }
.sch-room-wrap { margin-top: 0.4rem; }

/*@3.SCHC.81*/
[data-theme="dark"] .sch-ecourse,
[data-theme="dim"] .sch-ecourse { border-color: var(--border-hover); }
[data-theme="dark"] .sch-input, [data-theme="dark"] .sch-select, [data-theme="dark"] .sch-timepick select,
[data-theme="dim"] .sch-input, [data-theme="dim"] .sch-select, [data-theme="dim"] .sch-timepick select {
  border-color: var(--border-hover);
}
[data-theme="dark"] .sch-ecourse .sch-input, [data-theme="dark"] .sch-ecourse .sch-select, [data-theme="dark"] .sch-ecourse .sch-timepick select,
[data-theme="dim"] .sch-ecourse .sch-input, [data-theme="dim"] .sch-ecourse .sch-select, [data-theme="dim"] .sch-ecourse .sch-timepick select {
  background: var(--bg-surface);
}
[data-theme="dark"] .sch-daychip, [data-theme="dim"] .sch-daychip { border-color: var(--border-hover); }
/*@3.SCHC.82*/
[data-theme="dark"] .sch-ev, [data-theme="dim"] .sch-ev { border-color: var(--border-hover); }
/*@3.SCHC.83*/
[data-theme] .sch-ev.is-done,
.sch-ev.is-done { border-color: var(--border-color); }
[data-theme] .sch-ev.is-done::before,
.sch-ev.is-done::before { filter: saturate(0.45); }

/*@3.SCHC.84*/
.sch-purge-grid { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0.3rem 0 0.6rem; }
.sch-purge-count {
  margin: 0.5rem 0; padding: 0.5rem 0.8rem; border-radius: var(--radius-md);
  background: rgba(239,68,68,0.08); border: 1px solid rgba(239,68,68,0.3);
  font-size: 0.82rem; font-weight: 800; color: #ef4444; text-align: center;
}

/*@3.SCHC.85*/
.sch-legacy-box {
  background: var(--bg-elevated); border: 1px dashed var(--border-color);
  border-radius: var(--radius-md); padding: 0.75rem 0.85rem;
  font-size: 0.82rem; line-height: 1.8; color: var(--text-secondary);
}

/*@3.SCHC.86*/
@media (max-width: 768px) {
  .sch-container { padding-inline: 0.75rem; padding-block-start: 0.75rem; }
  /*@3.SCHC.133*/
  .sch-month-wrapper { padding: 0.55rem 0.4rem; }
}
@media (max-width: 640px) {
  /*@3.SCHC.87*/
  .sch-ev { padding: 4px 5px; padding-inline-start: 10px; }
  .sch-ev-title { font-size: 0.72rem; }
  .sch-ev-check { opacity: 0.95; }
  /*@3.SCHC.88*/
  .sch-ev-check::after { content: ''; position: absolute; inset: -13px; }

  /*@3.SCHC.108*/
  .sch-tools { padding: 0.6rem 0.65rem; }
  .sch-toolbar-row { gap: 0.35rem; }
  .sch-view-btn, .sch-tool {
    min-block-size: 34px; padding: 0.4rem 0.7rem; font-size: 0.74rem;
    justify-content: center;
  }
  .sch-tb-div { display: none; }
  .sch-tool-spacer { display: none; }

  .sch-today-btn { min-height: 40px; }
  .sch-nav-btn { width: 40px; height: 40px; }
  .sch-chip { min-height: 36px; padding-block: 0.4rem; }
  /*@3.SCHC.90*/
  .sch-edge button::after { inset: -18px; }
  .sch-adot { width: 11px; height: 11px; pointer-events: none; }
  .sch-adot::after { display: none; }
  .sch-allday-cell { min-height: 44px; max-height: 44px; }
  .sch-ag-time { min-width: 4rem; font-size: 0.66rem; }
}

/*@3.SCHC.91*/
@media print {
  body > *:not(.sch-print-hint) { display: none !important; }
  body::before {
    content: "استخدم زر الطباعة داخل الصفحة للحصول على نسخة مصمَّمة · Use the in-page print button";
    display: block; padding: 24px; text-align: center;
    font-family: inherit; font-size: 12pt; font-weight: 700; color: #000;
  }
}

/*@3.SCHC.92*/
.sch-acc { padding: 0; border-top: 1px solid var(--border-color); }
.sch-acc:first-of-type { border-top: none; }
.sch-acc-head {
  display: flex; align-items: center; gap: 0.6rem; width: 100%;
  padding: 0.8rem 0.15rem; border: none; background: none;
  color: var(--text-primary); font-family: inherit;
  font-size: 0.88rem; font-weight: 800; text-align: start;
  cursor: pointer; transition: color 0.2s;
}
.sch-acc-head:hover { color: var(--st-accent, #a78bfa); }
.sch-acc-title { flex-shrink: 0; }
/*@3.SCHC.93*/
.sch-acc-sum {
  flex: 1; min-width: 0; text-align: end;
  font-size: 0.72rem; font-weight: 600; color: var(--text-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sch-acc-caret {
  flex-shrink: 0; font-size: 0.7rem; color: var(--text-muted);
  transition: transform 0.25s ease;
}
.sch-acc.is-open .sch-acc-caret { transform: rotate(180deg); }
.sch-acc.is-open .sch-acc-sum { opacity: 0; }

.sch-acc-body { display: none; padding-block-end: 0.85rem; }
.sch-acc.is-open .sch-acc-body { display: block; animation: schAccIn 0.22s ease; }
@keyframes schAccIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .sch-acc.is-open .sch-acc-body { animation: none; }
  .sch-acc-caret { transition: none; }
}

/*@3.SCHC.94*/
.sch-ecourse.is-collapsed .sch-ecourse-body { display: none; }
.sch-ecourse-head { cursor: pointer; }
.sch-ecourse-caret {
  margin-inline-start: auto; font-size: 0.68rem; color: var(--text-muted);
  transition: transform 0.25s ease;
}
.sch-ecourse:not(.is-collapsed) .sch-ecourse-caret { transform: rotate(180deg); }

/*@3.SCHC.95*/
.sch-dh-load {
  display: block; height: 3px; margin: 4px auto 0; width: 62%;
  border-radius: 9999px; background: var(--sch-hair); overflow: hidden;
}
.sch-dh-load i {
  display: block; height: 100%; border-radius: 9999px;
  background: color-mix(in srgb, var(--st-accent, #a78bfa) 62%, transparent);
  transition: width .4s cubic-bezier(.4,0,.2,1);
}
/*@3.SCHC.96*/
.sch-day-head.is-heavy .sch-dh-load i {
  background: linear-gradient(90deg, var(--st-warn, #f59e0b), var(--st-danger, #ef4444));
}
.sch-day-head.today .sch-dh-load i { background: var(--st-accent, #a78bfa); }

/*@3.SCHC.97*/
.sch-pulse {
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  padding: 0.85rem 1rem; margin-bottom: 0.85rem;
  border-radius: var(--radius-xl);
  background: var(--bg-card); border: 1px solid var(--border-color);
  box-shadow: var(--sch-ev-shadow, 0 1px 2px rgba(0,0,0,0.22));
}
.sch-pulse-main { display: flex; align-items: center; gap: 0.85rem; min-width: 0; flex: 1 1 15rem; }
/*@3.SCHC.98*/
.sch-pulse-main.is-hit, .sch-pulse-next.is-hit {
  cursor: pointer; border-radius: var(--radius-md);
  transition: background-color .18s, transform .18s;
}
.sch-pulse-main.is-hit { margin: -0.3rem -0.45rem; padding: 0.3rem 0.45rem; }
.sch-pulse-next.is-hit { margin-block: -0.3rem; padding-block: 0.3rem; padding-inline-end: 0.5rem; }
.sch-pulse-main.is-hit:hover, .sch-pulse-next.is-hit:hover {
  background: color-mix(in srgb, var(--c, var(--st-accent, #a78bfa)) 9%, transparent);
}
.sch-pulse-main.is-hit:active, .sch-pulse-next.is-hit:active { transform: scale(.99); }
.sch-pulse-main.is-hit:focus-visible, .sch-pulse-next.is-hit:focus-visible {
  outline: 2px solid var(--c, var(--st-accent, #a78bfa)); outline-offset: 2px;
}
.sch-pulse-orb {
  position: relative; width: 44px; height: 44px; flex-shrink: 0; border-radius: 50%;
  display: grid; place-items: center; font-size: 1rem;
  background: color-mix(in srgb, var(--c, var(--st-accent, #a78bfa)) 16%, var(--bg-elevated));
  color: var(--c, var(--st-accent, #a78bfa));
}
/*@3.SCHC.99*/
.sch-pulse-orb::before {
  content: ''; position: absolute; inset: 0; border-radius: 50%;
  border: 1.5px solid color-mix(in srgb, var(--c, var(--st-accent, #a78bfa)) 55%, transparent);
  animation: schRipple 2.6s cubic-bezier(.4,0,.2,1) infinite;
}
@keyframes schRipple { 0% { transform: scale(1); opacity: .9 } 70% { transform: scale(1.55); opacity: 0 } 100% { opacity: 0 } }
.sch-pulse-txt { min-width: 0; flex: 1; }
.sch-pulse-kicker {
  display: flex; align-items: center; gap: 0.4rem;
  font-size: 0.66rem; font-weight: 800; letter-spacing: 0.09em;
  color: var(--c, var(--st-accent, #a78bfa));
}
.sch-pulse-dot {
  width: 6px; height: 6px; border-radius: 50%; background: currentColor;
  animation: schBlink 1.6s ease-in-out infinite;
}
@keyframes schBlink { 0%, 100% { opacity: 1 } 50% { opacity: .25 } }
.sch-pulse-title {
  font-size: 1.02rem; font-weight: 800; line-height: 1.35;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sch-pulse-sub {
  font-size: 0.76rem; color: var(--text-secondary); font-weight: 600;
  display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center;
}
.sch-pulse-sub .sep { color: var(--text-muted); opacity: 0.6; }
.sch-pulse-bar { margin-top: 0.4rem; height: 4px; border-radius: 9999px; background: var(--bg-body); overflow: hidden; }
.sch-pulse-bar i {
  display: block; height: 100%; border-radius: 9999px;
  background: var(--c, var(--st-accent, #a78bfa));
  transition: width .8s cubic-bezier(.4,0,.2,1);
}
.sch-pulse-next {
  min-width: 0; padding-inline-start: 1.1rem;
  border-inline-start: 1px solid var(--border-color);
}
.sch-pulse-next.is-empty { opacity: 0.5; }
.sch-pn-kick { font-size: 0.63rem; font-weight: 800; letter-spacing: 0.09em; color: var(--text-muted); }
.sch-pn-row { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.15rem; min-width: 0; }
.sch-pn-rail { width: 3px; height: 26px; border-radius: 3px; background: var(--c2, var(--text-muted)); flex-shrink: 0; }
.sch-pn-title { font-size: 0.84rem; font-weight: 700; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sch-pn-sub { font-size: 0.7rem; color: var(--text-muted); font-weight: 600; white-space: nowrap; }
.sch-pulse-stats { display: flex; gap: 0.35rem; flex-shrink: 0; margin-inline-start: auto; }
.sch-stat {
  min-width: 3.6rem; text-align: center; padding: 0.35rem 0.5rem;
  border-radius: var(--radius-md); background: var(--bg-elevated);
}
.sch-stat b { display: block; font-size: 1.18rem; font-weight: 800; line-height: 1.2; font-variant-numeric: tabular-nums; }
.sch-stat span { font-size: 0.63rem; font-weight: 700; color: var(--text-muted); }
.sch-stat.is-exam b { color: var(--st-danger, #ef4444); }

/*@3.SCHC.100*/
@keyframes schColIn { from { opacity: 0; transform: translateY(10px) } to { opacity: 1; transform: none } }
@keyframes schEvIn  { from { opacity: 0; transform: translateY(8px) scale(.965) } to { opacity: 1; transform: none } }
@keyframes schLineIn { from { clip-path: inset(0 100% 0 0) } to { clip-path: inset(0 0 0 0) } }
.sch-anim .sch-daycol { animation: schColIn .5s cubic-bezier(.4,0,.2,1) both; animation-delay: calc(var(--i, 0) * 55ms); }
.sch-anim .sch-day-head { animation: schColIn .45s cubic-bezier(.4,0,.2,1) both; animation-delay: calc(var(--i, 0) * 45ms); }
.sch-anim .sch-ev { animation: schEvIn .45s cubic-bezier(.4,0,.2,1) both; animation-delay: calc(180ms + var(--i, 0) * 55ms + var(--j, 0) * 40ms); }
.sch-anim .sch-nowline, .sch-anim .sch-nowrail { animation: schLineIn .7s cubic-bezier(.4,0,.2,1) both; animation-delay: .55s; }

@media (prefers-reduced-motion: reduce) {
  .sch-anim .sch-daycol, .sch-anim .sch-day-head, .sch-anim .sch-ev,
  .sch-anim .sch-nowline, .sch-anim .sch-nowrail { animation: none; }
  .sch-pulse-orb::before, .sch-pulse-dot { animation: none; }
  /*@3.SCHC.101*/
  .sch-ev-title.is-mq { text-overflow: ellipsis; }
  .sch-ev-title.is-mq .sch-ev-tx { display: inline; animation: none; }
}

/*@3.SCHC.102*/
@media (max-width: 640px) {
  .sch-pulse {
    gap: 0.55rem 0.7rem; padding: 0.6rem 0.7rem; margin-bottom: 0.6rem;
    align-items: flex-start;
  }
  .sch-pulse-main { flex: 1 1 100%; gap: 0.6rem; align-items: center; }
  .sch-pulse-orb { width: 34px; height: 34px; font-size: 0.82rem; }
  .sch-pulse-title { font-size: 0.92rem; }
  .sch-pulse-sub { font-size: 0.71rem; }
  .sch-pulse-kicker { font-size: 0.6rem; }
  /*@3.SCHC.103*/
  .sch-pulse-next { display: none; }
  /*@3.SCHC.104*/
  .sch-pulse-stats {
    margin-inline-start: 0; width: 100%; gap: 0.3rem;
  }
  .sch-stat {
    flex: 1; min-width: 0; display: flex; align-items: baseline;
    justify-content: center; gap: 0.3rem; padding: 0.25rem 0.4rem;
  }
  .sch-stat b { display: inline; font-size: 0.95rem; }
  .sch-stat span { font-size: 0.6rem; }
}

/*@3.SCHC.121*/
/*@3.SCHC.129*/
.sch-ev[data-drag="1"] {
  cursor: grab;
  touch-action: none;
  -webkit-user-select: none; user-select: none;
  -webkit-touch-callout: none;
}
.sch-ev.sch-dragging {
  cursor: grabbing;
  z-index: 40;
  opacity: .92;
  box-shadow: 0 10px 24px -8px rgba(0, 0, 0, .45);
  /*@3.SCHC.122*/
  transition: none !important;
  pointer-events: none;
}
/*@3.SCHC.123*/
html.sch-drag-on, html.sch-drag-on body {
  -webkit-user-select: none; user-select: none;
  -webkit-touch-callout: none;
}
.sch-drag-tip {
  /*@3.SCHC.125*/
  position: absolute; z-index: 60; pointer-events: none;
  padding: .22rem .5rem; border-radius: var(--radius-md);
  background: var(--bg-elevated, var(--bg-card)); border: 1px solid var(--border-color);
  color: var(--text-primary); font-size: .72rem; font-weight: 800;
  white-space: nowrap; unicode-bidi: isolate; direction: ltr;
  box-shadow: 0 6px 14px -6px rgba(0, 0, 0, .4);
}

/*@3.SCHC.124*/
.sch-say {
  position: fixed; z-index: 9999;
  inset-block-end: calc(var(--sa-b) + 76px);
  /*@3.SCHC.142*/
  left: 50%; transform: translateX(-50%) translateY(8px);
  max-inline-size: min(30rem, 90vw);
  padding: .5rem .85rem; border-radius: var(--radius-pill);
  background: var(--bg-elevated, var(--bg-card));
  border: 1px solid var(--border-color); color: var(--text-primary);
  font-size: .8rem; font-weight: 700; text-align: center;
  box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .5);
  opacity: 0; visibility: hidden;
  transition: opacity .18s, transform .18s, visibility .18s;
}
.sch-say.is-on { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
@media (prefers-reduced-motion: reduce) { .sch-say { transition: none; } }

/*@3.SCHC.126*/
.sch-ctx {
  /*@3.SCHC.146*/
  --ctx-line: color-mix(in srgb, var(--text-muted) 26%, transparent);
  position: fixed; z-index: 9998;
  min-inline-size: 12rem; max-inline-size: min(20rem, 88vw);
  padding: .3rem;
  background: var(--bg-elevated, var(--bg-card));
  border: 1px solid var(--ctx-line); border-radius: var(--radius-lg);
  box-shadow: 0 14px 34px -12px rgba(0, 0, 0, .55);
  opacity: 0; transform: translateY(-4px) scale(.98);
  transition: opacity .14s ease, transform .14s ease;
}
.sch-ctx.is-on { opacity: 1; transform: none; }
.sch-ctx { max-block-size: min(78vh, 32rem); overflow-y: auto; overscroll-behavior: contain; }
.sch-ctx-sep {
  block-size: 1px; margin: .28rem .4rem;
  background: var(--ctx-line);
}
@media (prefers-reduced-motion: reduce) { .sch-ctx { transition: none; } }
.sch-ctx-h {
  padding: .34rem .55rem .45rem;
  font-size: .72rem; font-weight: 800; color: var(--text-muted);
  border-block-end: 1px solid var(--ctx-line); margin-block-end: .25rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sch-ctx-i {
  display: flex; align-items: center; gap: .6rem; inline-size: 100%;
  padding: .55rem .55rem; border: 0; border-radius: var(--radius-md);
  background: none; color: var(--text-primary);
  font-family: inherit; font-size: .84rem; font-weight: 700;
  text-align: start; cursor: pointer;
}
.sch-ctx-i > i { inline-size: 1rem; text-align: center; font-size: .8rem; color: var(--k, var(--text-muted)); flex-shrink: 0; }
.sch-ctx-i > span { min-inline-size: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sch-ctx-i:hover { background: color-mix(in srgb, var(--text-primary) 10%, transparent); }
.sch-ctx-i:focus-visible { outline: 2px solid var(--st-accent, #a78bfa); outline-offset: -2px; }
.sch-ctx-i.is-danger { color: var(--st-bad, #ef4444); }
.sch-ctx-i.is-danger > i { color: inherit; }
.sch-ctx-i.is-cancel { color: var(--text-muted); }
/*@3.SCHC.127*/
@media (max-width: 640px) {
  /*@3.SCHC.147*/
  /*@3.SCHC.149*/
  .sch-ctx {
    min-inline-size: 11rem;
    max-inline-size: min(17.5rem, calc(100vw - 1.6rem));
    padding: .26rem;
  }
  .sch-ctx-h { padding: .3rem .5rem .4rem; font-size: .7rem; }
  .sch-ctx-i { padding: .6rem .5rem; font-size: .84rem; gap: .55rem; }
  .sch-ctx-sep { margin: .22rem .35rem; }
}

/*@3.SCHC.128*/
html.sch-move-on .sch-daycol { cursor: copy; }
html.sch-move-on .sch-ev { pointer-events: none; }
.sch-ev.sch-move-src {
  outline: 2px dashed var(--st-accent, #a78bfa); outline-offset: 1px;
  opacity: .55;
}

/*@3.SCHC.137*/
.sch-pulse.is-quiet { --c: var(--text-muted); }
.sch-pulse.is-quiet .sch-pulse-orb { opacity: .8; }
.sch-pulse.is-quiet .sch-pulse-stats { opacity: .55; }

.sch-mr-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem;
  padding-block-end: 0.55rem; margin-block-end: 0.55rem;
  border-block-end: 1px solid var(--border-color);
}
.sch-mr-day { font-size: 0.86rem; font-weight: 800; color: var(--text-primary); }
.sch-mr-open {
  display: inline-flex; align-items: center; gap: 0.3rem; flex-shrink: 0;
  background: none; border: 0; padding: 0.1rem 0.2rem; cursor: pointer;
  font-family: inherit; font-size: 0.72rem; font-weight: 700; color: #a78bfa;
  border-radius: var(--radius-sm);
}
.sch-mr-open:hover { background: rgba(167,139,250,.14); }
.sch-mr-open > i { font-size: 0.6rem; }

.sch-mr-list { display: flex; flex-direction: column; gap: 0.3rem; }
/*@3.SCHC.141*/
.sch-mr-row {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 0.5rem; inline-size: 100%; min-inline-size: 0;
  text-align: start; cursor: pointer; font-family: inherit;
  padding: 0.4rem 0.5rem; padding-inline-start: 0.7rem;
  border-radius: 9px; border: 1px solid var(--sch-ev-line);
  background: var(--sch-ev-bg); color: var(--text-primary);
  box-shadow: var(--sch-ev-shadow);
  transition: transform .22s cubic-bezier(.4,0,.2,1), box-shadow .22s cubic-bezier(.4,0,.2,1),
              border-color .22s, opacity .3s;
}
.sch-mr-row::before {
  content: ''; position: absolute; inset-block: 5px; inset-inline-start: 4px;
  inline-size: 3.5px; border-radius: 3px; z-index: 2; opacity: .88;
  background: var(--row-c, var(--text-muted));
}
.sch-mr-row > * { position: relative; z-index: 3; }
.sch-mr-row:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px -12px var(--shadow-base), 0 2px 6px var(--shadow-base);
  border-color: color-mix(in srgb, var(--row-c, var(--text-muted)) 50%, var(--sch-ev-line));
}
.sch-mr-row:hover::before { opacity: 1; }
.sch-mr-row.is-done { opacity: .58; }
.sch-mr-row.is-done::after {
  content: ''; position: absolute; inset: 0; z-index: 4; pointer-events: none; border-radius: inherit;
  background-color: var(--sch-done-tint);
  background-image: repeating-linear-gradient(135deg, var(--sch-done-line) 0 1px, transparent 1px 6px);
}
.sch-mr-row.is-done::before { filter: saturate(.3); opacity: .65; }
.sch-mr-t {
  font-size: 0.68rem; font-weight: 700; color: var(--text-muted); flex-shrink: 0;
}
.sch-mr-n {
  font-size: 0.78rem; font-weight: 600; color: var(--text-secondary);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1 1 auto; min-inline-size: 0;
}
.sch-mr-r { font-size: 0.68rem; color: var(--text-muted); flex-shrink: 0; }

.sch-mr-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0.5rem; padding: 1.6rem 0.8rem; text-align: center; color: var(--text-muted);
}
.sch-mr-empty > i { font-size: 1.15rem; opacity: .7; }
.sch-mr-empty > b { font-size: 0.8rem; font-weight: 700; color: var(--text-secondary); }
.sch-mr-add {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.34rem 0.85rem; border-radius: var(--radius-pill);
  border: 1px solid var(--border-color); background: var(--bg-elevated);
  color: var(--text-secondary); cursor: pointer; font-weight: 700;
  font-size: 0.75rem; font-family: inherit; transition: all .2s;
}
.sch-mr-add:hover { border-color: #a78bfa; color: #a78bfa; }
.sch-mr-add > i { font-size: 0.65rem; }

/*@3.SCHC.139*/
.sch-head-gutter { display: grid; place-items: center; }
.sch-span-corner {
  inline-size: 100%; block-size: 100%; min-block-size: 34px;
  display: grid; place-items: center;
  background: none; border: 0; padding: 0; cursor: pointer;
  color: var(--text-muted); transition: color .2s, background .2s;
  border-radius: var(--radius-md);
}
.sch-span-corner > i { font-size: 0.78rem; }
.sch-span-corner:hover { color: #a78bfa; background: rgba(167,139,250,.12); }
.sch-span-corner:focus-visible { outline: 2px solid #a78bfa; outline-offset: -2px; }
